hlyc-web-pack 3.6.73 → 3.6.75
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/GenerateForm/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
|
@@ -29,7 +29,7 @@ export interface DefaultOptionType {
|
|
|
29
29
|
declare type remoteValueType = string | undefined;
|
|
30
30
|
declare type remotePromiseType = (value: remoteValueType, other?: any) => Promise<SelectType[]>;
|
|
31
31
|
declare type inputConfig = Omit<InputProps, 'inputMode'> & {
|
|
32
|
-
inputMode
|
|
32
|
+
inputMode?: InputProps['type'];
|
|
33
33
|
};
|
|
34
34
|
interface UnionType {
|
|
35
35
|
componentName: 'Input' | 'Select' | 'DatePicker' | 'TimePicker' | 'RemoteSearch';
|
package/lib/index.js
CHANGED
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
Copyright (c) 2018 Jed Watson.
|
|
33
33
|
Licensed under the MIT License (MIT), see
|
|
34
34
|
http://jedwatson.github.io/classnames
|
|
35
|
-
*/$T.Text=function(e){var n=e.ellipsis,r=KT(e,["ellipsis"]),a=t.useMemo((function(){return n&&"object"===O(n)?Y(n,["expandable","rows"]):n}),[n]);return tr("object"!==O(n)||!n||!("expandable"in n)&&!("rows"in n),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),t.createElement(VT,E({},r,{ellipsis:a,component:"span"}))},$T.Link=UT,$T.Title=function(e){var n,r=e.level,a=void 0===r?1:r,o=WT(e,["level"]);return-1!==YT.indexOf(a)?n="h".concat(a):(tr(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),n="h1"),t.createElement(VT,E({},o,{component:n}))},$T.Paragraph=function(e){return t.createElement(VT,E({},e,{component:"div"}))};var fI=F((function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var o=typeof a;if("string"===o||"number"===o)t.push(a);else if(Array.isArray(a)){if(a.length){var i=n.apply(null,a);i&&t.push(i)}}else if("object"===o)if(a.toString===Object.prototype.toString)for(var l in a)e.call(a,l)&&a[l]&&t.push(l);else t.push(a.toString())}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}));function mI(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function hI(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){n.append("".concat(e,"[]"),t)})):n.append(e,r)})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot ".concat(t.method," ").concat(t.action," ").concat(e.status,"'"),r=new Error(n);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),mI(e)):t.onSuccess(mI(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(n),{abort:function(){e.abort()}}}var gI=+new Date,bI=0;function vI(){return"rc-upload-".concat(gI,"-").concat(++bI)}var yI=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",a=t.type||"",o=a.replace(/\/.*$/,"");return n.some((function(t){var e=t.trim();if(/^\*(\/\*)?$/.test(t))return!0;if("."===e.charAt(0)){var n=r.toLowerCase(),i=e.toLowerCase(),l=[i];return".jpg"!==i&&".jpeg"!==i||(l=[".jpg",".jpeg"]),l.some((function(t){return n.endsWith(t)}))}return/\/\*$/.test(e)?o===e.replace(/\/.*$/,""):a===e||!!/^\w+$/.test(e)&&(yt(!1,"Upload takes an invalidate 'accept' type '".concat(e,"'.Skip for check.")),!0)}))}return!0};var xI=function(t,e,n){var r=function t(r,a){r&&(r.path=a||"",r.isFile?r.file((function(t){n(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var n=t.createReader(),r=[];!function t(){n.readEntries((function(n){var a=Array.prototype.slice.apply(n);r=r.concat(a),a.length?t():e(r)}))}()}(r,(function(e){e.forEach((function(e){t(e,"".concat(a).concat(r.name,"/"))}))})))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},wI=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],kI=function(e){eI(r,t.Component);var n=oI(r);function r(){var t;GT(this,r);for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return(t=n.call.apply(n,[this].concat(a))).state={uid:vI()},t.reqs={},t.fileInput=void 0,t._isMounted=void 0,t.onChange=function(e){var n=t.props,r=n.accept,a=n.directory,o=pI(e.target.files).filter((function(t){return!a||yI(t,r)}));t.uploadFiles(o),t.reset()},t.onClick=function(e){var n=t.fileInput;if(n){var r=e.target,a=t.props.onClick;if(r&&"BUTTON"===r.tagName)n.parentNode.focus(),r.blur();n.click(),a&&a(e)}},t.onKeyDown=function(e){"Enter"===e.key&&t.onClick(e)},t.onFileDrop=function(e){var n=t.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(t.props.directory)xI(Array.prototype.slice.call(e.dataTransfer.items),t.uploadFiles,(function(e){return yI(e,t.props.accept)}));else{var r=pI(e.dataTransfer.files).filter((function(e){return yI(e,t.props.accept)}));!1===n&&(r=r.slice(0,1)),t.uploadFiles(r)}},t.uploadFiles=function(e){var n=pI(e),r=n.map((function(e){return e.uid=vI(),t.processFile(e,n)}));Promise.all(r).then((function(e){var n=t.props.onBatchStart;null==n||n(e.map((function(t){return{file:t.origin,parsedFile:t.parsedFile}}))),e.filter((function(t){return null!==t.parsedFile})).forEach((function(e){t.post(e)}))}))},t.processFile=function(){var e=uI(cI().mark((function e(n,r){var a,o,i,l,c,s,u,d,p;return cI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props.beforeUpload,o=n,!a){e.next=14;break}return e.prev=3,e.next=6,a(n,r);case 6:o=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),o=!1;case 12:if(!1!==o){e.next=14;break}return e.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!=typeof(i=t.props.action)){e.next=21;break}return e.next=18,i(n);case 18:l=e.sent,e.next=22;break;case 21:l=i;case 22:if("function"!=typeof(c=t.props.data)){e.next=29;break}return e.next=26,c(n);case 26:s=e.sent,e.next=30;break;case 29:s=c;case 30:return u="object"!==XT(o)&&"string"!=typeof o||!o?n:o,d=u instanceof File?u:new File([u],n.name,{type:n.type}),(p=d).uid=n.uid,e.abrupt("return",{origin:n,data:s,parsedFile:p,action:l});case 35:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n){return e.apply(this,arguments)}}(),t.saveFileInput=function(e){t.fileInput=e},t}return QT(r,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(t){var e=this,n=t.data,r=t.origin,a=t.action,o=t.parsedFile;if(this._isMounted){var i=this.props,l=i.onStart,c=i.customRequest,s=i.name,u=i.headers,d=i.withCredentials,p=i.method,f=r.uid,m=c||hI,h={action:a,filename:s,data:n,file:o,headers:u,withCredentials:d,method:p||"post",onProgress:function(t){var n=e.props.onProgress;null==n||n(t,o)},onSuccess:function(t,n){var r=e.props.onSuccess;null==r||r(t,o,n),delete e.reqs[f]},onError:function(t,n){var r=e.props.onError;null==r||r(t,n,o),delete e.reqs[f]}};l(r),this.reqs[f]=m(h)}}},{key:"reset",value:function(){this.setState({uid:vI()})}},{key:"abort",value:function(t){var e=this.reqs;if(t){var n=t.uid?t.uid:t;e[n]&&e[n].abort&&e[n].abort(),delete e[n]}else Object.keys(e).forEach((function(t){e[t]&&e[t].abort&&e[t].abort(),delete e[t]}))}},{key:"render",value:function(){var t=this.props,e=t.component,n=t.prefixCls,r=t.className,a=t.disabled,o=t.id,i=t.style,l=t.multiple,c=t.accept,s=t.capture,u=t.children,p=t.directory,f=t.openFileDialogOnClick,m=t.onMouseEnter,h=t.onMouseLeave,g=lI(t,wI),b=fI(iI(iI(iI({},n,!0),"".concat(n,"-disabled"),a),r,r)),v=p?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},y=a?{}:{onClick:f?this.onClick:function(){},onKeyDown:f?this.onKeyDown:function(){},onMouseEnter:m,onMouseLeave:h,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return d.default.createElement(e,qT({},y,{className:b,role:"button",style:i}),d.default.createElement("input",qT({},Xl(g,{aria:!0,data:!0}),{id:o,disabled:a,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:c},v,{multiple:l,onChange:this.onChange},null!=s?{capture:s}:{})),u)}}]),r}();function CI(){}var EI=function(e){eI(r,t.Component);var n=oI(r);function r(){var t;GT(this,r);for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return(t=n.call.apply(n,[this].concat(a))).uploader=void 0,t.saveUploader=function(e){t.uploader=e},t}return QT(r,[{key:"abort",value:function(t){this.uploader.abort(t)}},{key:"render",value:function(){return d.default.createElement(kI,qT({},this.props,{ref:this.saveUploader}))}}]),r}();EI.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:CI,onError:CI,onSuccess:CI,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var OI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n},SI=function(e,n){var r=e.style,a=e.height,o=OI(e,["style","height"]);return t.createElement(ZI,E({ref:n},o,{type:"drag",style:E(E({},r),{height:a})}))},NI=t.forwardRef(SI);NI.displayName="Dragger";var PI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},jI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:PI}))},TI=t.forwardRef(jI);"production"!==process.env.NODE_ENV&&(TI.displayName="PaperClipOutlined");var II={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:e}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:e}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:e}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},DI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:II}))},RI=t.forwardRef(DI);"production"!==process.env.NODE_ENV&&(RI.displayName="PictureTwoTone");var MI={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:e}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},zI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:MI}))},AI=t.forwardRef(zI);function LI(t){return E(E({},t),{lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate,name:t.name,size:t.size,type:t.type,uid:t.uid,percent:0,originFileObj:t})}function _I(t,e){var n=fl(e),r=n.findIndex((function(e){return e.uid===t.uid}));return-1===r?n.push(t):n[r]=t,n}function FI(t,e){var n=void 0!==t.uid?"uid":"name";return e.filter((function(e){return e[n]===t[n]}))[0]}"production"!==process.env.NODE_ENV&&(AI.displayName="FileTwoTone");var VI=function(t){return 0===t.indexOf("image/")};var KI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},HI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:KI}))},BI=t.forwardRef(HI);"production"!==process.env.NODE_ENV&&(BI.displayName="DownloadOutlined");var UI=t.forwardRef((function(e,n){var r,a,o,i=e.prefixCls,l=e.className,c=e.style,s=e.locale,u=e.listType,d=e.file,p=e.items,f=e.progress,m=e.iconRender,h=e.actionIconRender,g=e.itemRender,b=e.isImgUrl,v=e.showPreviewIcon,y=e.showRemoveIcon,x=e.showDownloadIcon,w=e.removeIcon,k=e.downloadIcon,C=e.onPreview,O=e.onDownload,S=e.onClose,P=pi(t.useState(!1),2),j=P[0],T=P[1],I=t.useRef();t.useEffect((function(){return I.current=setTimeout((function(){T(!0)}),300),function(){window.clearTimeout(I.current)}}),[]);var D="".concat(i,"-span"),R=m(d),M=t.createElement("div",{className:"".concat(i,"-text-icon")},R);if("picture"===u||"picture-card"===u)if("uploading"===d.status||!d.thumbUrl&&!d.url){var z,A=V((N(z={},"".concat(i,"-list-item-thumbnail"),!0),N(z,"".concat(i,"-list-item-file"),"uploading"!==d.status),z));M=t.createElement("div",{className:A},R)}else{var L,_=(null==b?void 0:b(d))?t.createElement("img",{src:d.thumbUrl||d.url,alt:d.name,className:"".concat(i,"-list-item-image")}):R,F=V((N(L={},"".concat(i,"-list-item-thumbnail"),!0),N(L,"".concat(i,"-list-item-file"),b&&!b(d)),L));M=t.createElement("a",{className:F,onClick:function(t){return C(d,t)},href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer"},_)}var K,H=V((N(r={},"".concat(i,"-list-item"),!0),N(r,"".concat(i,"-list-item-").concat(d.status),!0),N(r,"".concat(i,"-list-item-list-type-").concat(u),!0),r)),B="string"==typeof d.linkProps?JSON.parse(d.linkProps):d.linkProps,U=y?h(("function"==typeof w?w(d):w)||t.createElement(OP,null),(function(){return S(d)}),i,s.removeFile):null,W=x&&"done"===d.status?h(("function"==typeof k?k(d):k)||t.createElement(BI,null),(function(){return O(d)}),i,s.downloadFile):null,Y="picture-card"!==u&&t.createElement("span",{key:"download-delete",className:V("".concat(i,"-list-item-card-actions"),{picture:"picture"===u})},W,U),$=V("".concat(i,"-list-item-name")),q=d.url?[t.createElement("a",E({key:"view",target:"_blank",rel:"noopener noreferrer",className:$,title:d.name},B,{href:d.url,onClick:function(t){return C(d,t)}}),d.name),Y]:[t.createElement("span",{key:"view",className:$,onClick:function(t){return C(d,t)},title:d.name},d.name),Y],G=v?t.createElement("a",{href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:d.url||d.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:function(t){return C(d,t)},title:s.previewFile},t.createElement(Ux,null)):null,X="picture-card"===u&&"uploading"!==d.status&&t.createElement("span",{className:"".concat(i,"-list-item-actions")},G,"done"===d.status&&W,U);K=d.response&&"string"==typeof d.response?d.response:(null===(a=d.error)||void 0===a?void 0:a.statusText)||(null===(o=d.error)||void 0===o?void 0:o.message)||s.uploadError;var Z=t.createElement("span",{className:D},M,q),J=(0,t.useContext(vr).getPrefixCls)(),Q=t.createElement("div",{className:H},t.createElement("div",{className:"".concat(i,"-list-item-info")},Z),X,j&&t.createElement(Ma,{motionName:"".concat(J,"-fade"),visible:"uploading"===d.status,motionDeadline:2e3},(function(e){var n=e.className,r="percent"in d?t.createElement(oO,E({},f,{type:"line",percent:d.percent})):null;return t.createElement("div",{className:V("".concat(i,"-list-item-progress"),n)},r)}))),tt=V("".concat(i,"-list-").concat(u,"-container"),l),et="error"===d.status?t.createElement(vp,{title:K,getPopupContainer:function(t){return t.parentNode}},Q):Q;return t.createElement("div",{className:tt,style:c,ref:n},g?g(et,d,p,{download:O.bind(null,d),preview:C.bind(null,d),remove:S.bind(null,d)}):et)})),WI=E({},Ld);delete WI.onAppearEnd,delete WI.onEnterEnd,delete WI.onLeaveEnd;var YI=function(e,n){var r,a=e.listType,o=e.previewFile,i=e.onPreview,l=e.onDownload,c=e.onRemove,s=e.locale,u=e.iconRender,d=e.isImageUrl,p=e.prefixCls,f=e.items,m=void 0===f?[]:f,h=e.showPreviewIcon,g=e.showRemoveIcon,b=e.showDownloadIcon,v=e.removeIcon,y=e.downloadIcon,x=e.progress,w=e.appendAction,k=e.itemRender,C=sk(),O=pi(t.useState(!1),2),S=O[0],P=O[1];t.useEffect((function(){"picture"!==a&&"picture-card"!==a||(m||[]).forEach((function(t){"undefined"!=typeof document&&"undefined"!=typeof window&&window.FileReader&&window.File&&(t.originFileObj instanceof File||t.originFileObj instanceof Blob)&&void 0===t.thumbUrl&&(t.thumbUrl="",o&&o(t.originFileObj).then((function(e){t.thumbUrl=e||"",C()})))}))}),[a,m,o]),t.useEffect((function(){P(!0)}),[]);var j=function(t,e){if(i)return null==e||e.preventDefault(),i(t)},T=function(t){"function"==typeof l?l(t):t.url&&window.open(t.url)},I=function(t){null==c||c(t)},D=function(e){if(u)return u(e,a);var n="uploading"===e.status,r=d&&d(e)?t.createElement(RI,null):t.createElement(AI,null),o=n?t.createElement(qo,null):t.createElement(TI,null);return"picture"===a?o=n?t.createElement(qo,null):r:"picture-card"===a&&(o=n?s.uploading:r),o},R=function(e,n,r,a){var o={type:"text",size:"small",title:a,onClick:function(t){n(),Hd(e)&&e.props.onClick&&e.props.onClick(t)},className:"".concat(r,"-list-item-card-actions-btn")};if(Hd(e)){var i=Ud(e,E(E({},e.props),{onClick:function(){}}));return t.createElement(af,E({},o,{icon:i}))}return t.createElement(af,o,t.createElement("span",null,e))};t.useImperativeHandle(n,(function(){return{handlePreview:j,handleDownload:T}}));var M=t.useContext(vr),z=M.getPrefixCls,A=M.direction,L=z("upload",p),_=V((N(r={},"".concat(L,"-list"),!0),N(r,"".concat(L,"-list-").concat(a),!0),N(r,"".concat(L,"-list-rtl"),"rtl"===A),r)),F=fl(m.map((function(t){return{key:t.uid,file:t}}))),K="picture-card"===a?"animate-inline":"animate",H={motionDeadline:2e3,motionName:"".concat(L,"-").concat(K),keys:F,motionAppear:S};return"picture-card"!==a&&(H=E(E({},WI),H)),t.createElement("div",{className:_},t.createElement(Ha,E({},H,{component:!1}),(function(e){var n=e.key,r=e.file,o=e.className,i=e.style;return t.createElement(UI,{key:n,locale:s,prefixCls:L,className:o,style:i,file:r,items:m,progress:x,listType:a,isImgUrl:d,showPreviewIcon:h,showRemoveIcon:g,showDownloadIcon:b,removeIcon:v,downloadIcon:y,iconRender:D,actionIconRender:R,itemRender:k,onPreview:j,onDownload:T,onClose:I})})),w&&t.createElement(Ma,H,(function(t){var e=t.className,n=t.style;return Ud(w,(function(t){return{className:V(t.className,e),style:E(E({},n),t.style)}}))})))},$I=t.forwardRef(YI);$I.displayName="UploadList",$I.defaultProps={listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:function(t){return new Promise((function(e){if(t.type&&VI(t.type)){var n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),a=new Image;a.onload=function(){var t=a.width,o=a.height,i=200,l=200,c=0,s=0;t>o?s=-((l=o*(200/t))-i)/2:c=-((i=t*(200/o))-l)/2,r.drawImage(a,c,s,i,l);var u=n.toDataURL();document.body.removeChild(n),e(u)},a.src=window.URL.createObjectURL(t)}else e("")}))},isImageUrl:function(t){if(t.type&&!t.thumbUrl)return VI(t.type);var e=t.thumbUrl||t.url||"",n=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),e=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(e)||[""])[0]}(e);return!(!/^data:image\//.test(e)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(e)&&!n}};var qI=function(t,e,n,r){return new(n||(n=Promise))((function(a,o){function i(t){try{c(r.next(t))}catch(t){o(t)}}function l(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,l)}c((r=r.apply(t,e||[])).next())}))},GI="__LIST_IGNORE_".concat(Date.now(),"__"),XI=function(e,n){var r,a=e.fileList,o=e.defaultFileList,i=e.onRemove,l=e.showUploadList,c=e.listType,s=e.onPreview,u=e.onDownload,d=e.onChange,p=e.onDrop,f=e.previewFile,m=e.disabled,h=e.locale,g=e.iconRender,b=e.isImageUrl,v=e.progress,y=e.prefixCls,x=e.className,w=e.type,k=e.children,C=e.style,S=e.itemRender,P=e.maxCount,j=pi(bc(o||[],{value:a,postState:function(t){return null!=t?t:[]}}),2),T=j[0],I=j[1],D=pi(t.useState("drop"),2),R=D[0],M=D[1],z=t.useRef();t.useEffect((function(){tr("fileList"in e||!("value"in e),"Upload","`value` is not a valid prop, do you mean `fileList`?"),tr(!("transformFile"in e),"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly.")}),[]),t.useMemo((function(){var t=Date.now();(a||[]).forEach((function(e,n){e.uid||Object.isFrozen(e)||(e.uid="__AUTO__".concat(t,"_").concat(n,"__"))}))}),[a]);var A=function(t,e,n){var r=fl(e);1===P?r=r.slice(-1):P&&(r=r.slice(0,P)),I(r);var a={file:t,fileList:r};n&&(a.event=n),null==d||d(a)},L=function(t){var e=t.filter((function(t){return!t.file[GI]}));if(e.length){var n=e.map((function(t){return LI(t.file)})),r=fl(T);n.forEach((function(t){r=_I(t,r)})),n.forEach((function(t,n){var a=t;if(e[n].parsedFile)t.status="uploading";else{var o,i=t.originFileObj;try{o=new File([i],i.name,{type:i.type})}catch(t){(o=new Blob([i],{type:i.type})).name=i.name,o.lastModifiedDate=new Date,o.lastModified=(new Date).getTime()}o.uid=t.uid,a=o}A(a,r)}))}},_=function(t,e,n){try{"string"==typeof t&&(t=JSON.parse(t))}catch(t){}if(FI(e,T)){var r=LI(e);r.status="done",r.percent=100,r.response=t,r.xhr=n;var a=_I(r,T);A(r,a)}},F=function(t,e){if(FI(e,T)){var n=LI(e);n.status="uploading",n.percent=t.percent;var r=_I(n,T);A(n,r,t)}},K=function(t,e,n){if(FI(n,T)){var r=LI(n);r.error=t,r.response=e,r.status="error";var a=_I(r,T);A(r,a)}},H=function(t){var e;Promise.resolve("function"==typeof i?i(t):i).then((function(n){var r;if(!1!==n){var a=function(t,e){var n=void 0!==t.uid?"uid":"name",r=e.filter((function(e){return e[n]!==t[n]}));return r.length===e.length?null:r}(t,T);a&&(e=E(E({},t),{status:"removed"}),null==T||T.forEach((function(t){var n=void 0!==e.uid?"uid":"name";t[n]!==e[n]||Object.isFrozen(t)||(t.status="removed")})),null===(r=z.current)||void 0===r||r.abort(e),A(e,a))}}))},B=function(t){M(t.type),"drop"===t.type&&(null==p||p(t))};t.useImperativeHandle(n,(function(){return{onBatchStart:L,onSuccess:_,onProgress:F,onError:K,fileList:T,upload:z.current}}));var U=t.useContext(vr),W=U.getPrefixCls,Y=U.direction,$=W("upload",y),q=E(E({onBatchStart:L,onError:K,onProgress:F,onSuccess:_},e),{prefixCls:$,beforeUpload:function(t,n){return qI(void 0,void 0,void 0,ji.mark((function r(){var a,o,i,l;return ji.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=e.beforeUpload,o=e.transformFile,i=t,!a){r.next=13;break}return r.next=5,a(t,n);case 5:if(!1!==(l=r.sent)){r.next=8;break}return r.abrupt("return",!1);case 8:if(delete t[GI],l!==GI){r.next=12;break}return Object.defineProperty(t,GI,{value:!0,configurable:!0}),r.abrupt("return",!1);case 12:"object"===O(l)&&l&&(i=l);case 13:if(!o){r.next=17;break}return r.next=16,o(i);case 16:i=r.sent;case 17:return r.abrupt("return",i);case 18:case"end":return r.stop()}}),r)})))},onChange:void 0});delete q.className,delete q.style,k&&!m||delete q.id;var G=function(e){return l?t.createElement(dr,{componentName:"Upload",defaultLocale:or.Upload},(function(n){var r="boolean"==typeof l?{}:l,a=r.showRemoveIcon,o=r.showPreviewIcon,i=r.showDownloadIcon,d=r.removeIcon,p=r.downloadIcon;return t.createElement($I,{listType:c,items:T,previewFile:f,onPreview:s,onDownload:u,onRemove:H,showRemoveIcon:!m&&a,showPreviewIcon:o,showDownloadIcon:i,removeIcon:d,downloadIcon:p,iconRender:g,locale:E(E({},n),h),isImageUrl:b,progress:v,appendAction:e,itemRender:S})})):e};if("drag"===w){var X,Z=V($,(N(X={},"".concat($,"-drag"),!0),N(X,"".concat($,"-drag-uploading"),T.some((function(t){return"uploading"===t.status}))),N(X,"".concat($,"-drag-hover"),"dragover"===R),N(X,"".concat($,"-disabled"),m),N(X,"".concat($,"-rtl"),"rtl"===Y),X),x);return t.createElement("span",null,t.createElement("div",{className:Z,onDrop:B,onDragOver:B,onDragLeave:B,style:C},t.createElement(EI,E({},q,{ref:z,className:"".concat($,"-btn")}),t.createElement("div",{className:"".concat($,"-drag-container")},k))),G())}var J=V($,(N(r={},"".concat($,"-select"),!0),N(r,"".concat($,"-select-").concat(c),!0),N(r,"".concat($,"-disabled"),m),N(r,"".concat($,"-rtl"),"rtl"===Y),r)),Q=t.createElement("div",{className:J,style:k?void 0:{display:"none"}},t.createElement(EI,E({},q,{ref:z})));return"picture-card"===c?t.createElement("span",{className:V("".concat($,"-picture-card-wrapper"),x)},G(Q)):t.createElement("span",{className:x},Q,G())},ZI=t.forwardRef(XI);ZI.Dragger=NI,ZI.LIST_IGNORE=GI,ZI.displayName="Upload",ZI.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0},ZI.Dragger=NI;y(".dialog .ant-modal-content{display:flex;flex-direction:column;height:100%}.dialog .ant-modal-body{flex:auto;overflow:auto}.dialog.ant-modal>.react-draggable{height:100%}");let JI=1;class QI extends d.default.Component{static show(t){let e,r=document.body,a=document.createElement("div"),o=t&&t.onOk,i=t&&t.onCancel;return a.id="dialog-"+JI++,a.style.cssText="position:absolute;top:0;left:0;",r.appendChild(a),(t=t||{}).visible=!0,t.getContainer=!1,t.destroyOnClose=!0,t.onOk=()=>{o&&o(),r.removeChild(a)},t.onCancel=()=>{i&&i(),r.removeChild(a)},f.default.render(n.jsx(QI,Object.assign({},t,{ref:t=>e=t}),void 0),a),e}static confirm(t,e,n){return QI.show({title:t,children:e,onOk:n})}draggleRef;constructor(t){super(t),this.state={disabled:!0,bounds:{left:0,top:0,bottom:0,right:0}}}onStart(t,e){const{clientWidth:n,clientHeight:r}=window.document.documentElement,a=this.draggleRef?.current?.getBoundingClientRect();this.setState({bounds:{left:-a?.left+e?.x,right:n-(a?.right-e?.x),top:-a?.top+e?.y,bottom:r-(a?.bottom-e?.y)}})}render(){let t=this.props,e=this.state;return n.jsx(LE,Object.assign({className:"dialog",maskClosable:!1},t,{title:n.jsx("div",Object.assign({style:{cursor:"move"},onMouseOver:()=>{this.setState({disabled:!1})},onMouseOut:()=>{this.setState({disabled:!0})},onFocus:()=>{},onBlur:()=>{}},{children:t.title}),void 0),modalRender:t=>n.jsx(h.default,Object.assign({disabled:e.disabled,bounds:e.bounds,onStart:(t,e)=>this.onStart(t,e)},{children:n.jsx("div",Object.assign({ref:this.draggleRef},{children:t}),void 0)}),void 0)},{children:t.children}),void 0)}close(t){let e=this.props;t?e.onOk&&e.onOk():e.onCancel&&e.onCancel()}}y(".anchorBL,.BMap_cpyCtrl{display:none}.gaoDe-container{position:relative}.gaoDe-container .input-item-prepend{position:absolute;top:12px;left:12px;z-index:99;width:320px}.gaoDe-container .input-item-prepend .ant-input-group-wrapper{position:relative}.gaoDe-container .input-item-prepend .ant-input-group-wrapper .ant-input-affix-wrapper{padding-top:0;padding-bottom:0;border-radius:0}.gaoDe-container .input-item-prepend .ant-input-group-wrapper .ant-input-affix-wrapper .ant-input{height:30px}");var tD=t.forwardRef(((e,r)=>{const a=t.useRef(null),o=t.useRef(null),l=t.useRef(null),c=t.useMemo((()=>i.v4()),[]),s=t.useMemo((()=>i.v4()),[]),u=t=>{let e=0,n=0;const r=new BMap.Convertor,a=[];a.push(t.point),"baidu"===t.target&&(e=3,n=5),"google"===t.target&&(e=5,n=3),r.translate(a,e,n,(e=>{0===e.status&&t.callback&&t.callback(e.points[0])}))},d=t=>{a.current.addOverlay(new BMap.Marker(t,{icon:new BMap.Icon("https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",new BMap.Size(20,32))}))},p=t.useCallback(((t,e)=>{if(a.current){const n=new BMap.Point(t[0],t[1]);d(n),a.current.centerAndZoom(n,e||18)}else o.current={location:t,zoom:e}}),[]),f=t.useCallback((t=>{console.log("转换为google坐标前:",t.location);const n=new BMap.Point(t.location.lng,t.location.lat);u({target:"google",point:n,callback:n=>{t.location.lng=n.lng,t.location.lat=n.lat,console.log("转换为google坐标后:",t.location),e.onChange&&e.onChange(t)}})}),[e]),m=t.useCallback((t=>{a.current.clearOverlays();const e=new BMap.LocalSearch(a.current,{onSearchComplete:()=>{let t=e.getResults().getPoi(0);if(t){const e=t.point;p([e.lng,e.lat]),f({...t,location:{lng:e.lng,lat:e.lat}})}}});e.search(t)}),[p,f]);return t.useEffect((()=>{const t=()=>{a.current=new BMap.Map(c,{enableMapClick:!1}),a.current.enableScrollWheelZoom(!0);new BMap.Autocomplete({input:s,location:a.current}).addEventListener("onconfirm",(t=>{const{province:e,city:n,district:r,street:a,business:o}=t.item.value;m(e+n+r+a+o)})),a.current.addEventListener("click",(t=>{a.current.clearOverlays(),d(new BMap.Point(t.point.lng,t.point.lat)),f({location:{lng:t.point.lng,lat:t.point.lat}})})),l.current&&l.current(),o.current?p(o.current.location,o.current.zoom):p([116.404,39.915])};if(document.getElementById("lbs"))t();else{window.onMapInit=function(){t()};let e="https://api.map.baidu.com/api?v=3.0&ak=1IzhwXLOwlEnencZUoSnMkSkMVADfT3s&callback=onMapInit",n=document.createElement("script");n.src=e,n.id="lbs",document.head.appendChild(n)}}),[c]),t.useImperativeHandle(r,(()=>({setMapCenter:(t,e)=>{console.log("转换为百度坐标前:",{lng:t[0],lat:t[1]});const n=()=>{const n=new BMap.Point(t[0],t[1]);u({target:"baidu",point:n,callback:t=>{console.log("转换为百度坐标后:",{lng:t.lng,lat:t.lat}),p([t.lng,t.lat],e)}})};try{n()}catch(t){l.current=n}}}))),n.jsxs("div",Object.assign({className:`gaoDe-container ${e.className}`},{children:[n.jsx("div",{id:c,style:e.style?e.style:{width:"100%",height:365}},void 0),n.jsx("div",Object.assign({className:"input-item-prepend"},{children:n.jsx("span",Object.assign({className:"ant-input-group-wrapper"},{children:n.jsxs("span",Object.assign({className:"ant-input-wrapper ant-input-group"},{children:[n.jsx("span",Object.assign({className:"ant-input-group-addon"},{children:"关键字"}),void 0),n.jsx("span",Object.assign({className:"ant-input-affix-wrapper"},{children:n.jsx("input",{id:s,className:"ant-input",type:"text",placeholder:"请输入关键字"},void 0)}),void 0)]}),void 0)}),void 0)}),void 0)]}),void 0)}));y("");var eD=t.forwardRef((function(e,r){const[a,o]=t.useState([]);return t.useImperativeHandle(r,(()=>({setFileList:t=>{o(t)}}))),n.jsx(ZI,Object.assign({onChange:t=>{const{response:n}=t.file;let r=n&&parseInt(n.code);Oi.destroy(),console.log("上传的文件对象:",t),("string"==typeof n||"object"==typeof n&&500===n.status)&&(r=-1),"removed"===t.file.status||-1!==r&&400!==r&&500!==r||(t.file.status="error",Oi.warn(n.msg||"上传失败",1.5)),"done"===t.file.status&&Oi.success("上传成功",1.5),o(t.fileList),"done"===t.file.status&&e.uploadSuccess&&e.uploadSuccess(t.fileList.filter((t=>"done"===t.status)))},fileList:a,onRemove:t=>{o((n=>(n&&(n=n.filter((e=>e.uid!==t.uid)),e.uploadSuccess&&e.uploadSuccess(n.filter((t=>"done"===t.status)))),n)))},onPreview:async t=>{let e=t.url;e||(e=await new Promise((e=>{const n=new FileReader;n.readAsDataURL(t.originFileObj),n.onload=()=>e(n.result)})));const n=new Image;n.src=e;const r=window.open(e);r&&r.document.write(n.outerHTML)}},e,{beforeUpload:(t,n)=>!e.beforeUpload||(e.beforeUpload(t,n)||ZI.LIST_IGNORE)},{children:e.children}),void 0)}));y(".tree-wrap .tree-search{margin-bottom:10px}.tree-wrap .tree-handle-box{display:flex;align-items:center;margin-right:5px;visibility:hidden}.tree-wrap .ant-tree-node-content-wrapper.ant-tree-node-selected .tree-handle-box,.tree-wrap .ant-tree-node-content-wrapper:hover .tree-handle-box{visibility:visible}");const{Search:nD}=fx;var rD=t.forwardRef(((e,r)=>{const[a,o]=C.useSetState({loading:!1,searchOpen:!1,searchValue:"",treeList:[],draggableOpen:!1,processOpen:!1,checkedOpen:!1,firstLevelCollection:[],expandedKeys:[],autoExpandParent:!1,selectNode:[],selectCurrent:[],checkedNode:[],checkedCurrent:[]}),i=t.useCallback((t=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const a=t[r];e.push(t[r]),a.children&&n(a.children)}};n(t),o({firstLevelCollection:e})}),[o]),l=t.useCallback(((t,n)=>{p.default.isArray(t)&&(o({selectNode:t}),e.onSelect&&e.onSelect(t,n))}),[e,o]),c=t.useCallback((t=>{o({autoExpandParent:!1,expandedKeys:t})}),[o]),s=t.useCallback(((t,e)=>{let n;for(let r=0;r<e.length;r++){const a=e[r];a.children&&(a.children.some((e=>e.key===t))?n=a.key:s(t,a.children)&&(n=s(t,a.children)))}return n}),[]),u=t.useCallback((t=>{const{value:e}=t.target,n=a.firstLevelCollection.map((t=>t.title.indexOf(e)>-1?s(t.key,a.treeList):null)).filter(((t,e,n)=>t&&n.indexOf(t)===e));o({searchValue:e,expandedKeys:n,autoExpandParent:!0})}),[s,o,a.firstLevelCollection,a.treeList]),d=t.useCallback((t=>{o({checkedNode:t.checked||t})}),[o]),f=t.useCallback((t=>t.map((t=>{const r=t.title,o=r.indexOf(a.searchValue),i=r.substr(0,o),l=r.substr(o+a.searchValue.length),c=e.processOpen&&!t.processOpen&&!t.disabled?n.jsx(Dy,Object.assign({className:"tree-handle-box"},{children:e.customAction&&e.customAction(t)}),void 0):null,s=o>-1?n.jsxs(jy,Object.assign({justify:"space-between",align:"middle"},{children:[n.jsxs(Dy,{children:[i,n.jsx("span",Object.assign({className:"text-error"},{children:a.searchValue}),void 0),l]},void 0),c]}),void 0):n.jsxs(jy,Object.assign({justify:"space-between",align:"middle"},{children:[n.jsx(Dy,{children:t.title},void 0),c]}),void 0);return t.children?{...t,title:s,children:f(t.children)}:{...t,title:s}}))),[e,a.searchValue]);return t.useEffect((()=>{o({checkedCurrent:(t=>{let e=[];const n=t=>{for(let r of t)a.checkedNode.some((t=>t===r.key))&&e.push(r),r.children&&n(r.children)};return n(t),e})(a.treeList)})}),[o,a.checkedNode,a.treeList]),t.useEffect((()=>{o({selectCurrent:(t=>{let e=[];const n=t=>{for(let r of t)a.selectNode.some((t=>t===r.key))&&e.push(r),r.children&&n(r.children)};return n(t),e})(a.treeList)})}),[o,a.selectNode,a.treeList]),t.useEffect((()=>{p.default.isArray(e.data)&&(o({treeList:e.data}),i(e.data))}),[i,e.data,o]),t.useEffect((()=>{let t={};e.searchOpen&&(t.searchOpen=e.searchOpen),e.draggableOpen&&(t.draggableOpen=e.draggableOpen),e.processOpen&&(t.processOpen=e.processOpen),e.checkedOpen&&(t.checkedOpen=e.checkedOpen),Object.keys(t).length&&o(t)}),[e.checkedOpen,e.draggableOpen,e.processOpen,e.searchOpen,o]),t.useImperativeHandle(r,(()=>({setLoading:t=>{o({loading:t})},getSelectNode:()=>a.selectNode,getSelectCurrent:()=>a.selectCurrent,getCheckedNode:()=>a.checkedNode,getCheckedCurrent:()=>a.checkedCurrent,setSelectNode:t=>{o({selectNode:t})},setCheckedNode:t=>{o({checkedNode:t})}}))),n.jsx("div",Object.assign({className:"tree-wrap"},{children:n.jsxs(_C,Object.assign({spinning:a.loading},{children:[a.searchOpen?n.jsx(nD,{className:"tree-search",placeholder:"输入名称搜索",onChange:u},void 0):null,a.treeList.length?n.jsx(xj,Object.assign({blockNode:!0,height:500,showLine:{showLeafIcon:!1},checkable:a.checkedOpen,treeData:f(a.treeList),expandedKeys:a.expandedKeys,selectedKeys:a.selectNode,checkedKeys:a.checkedNode,autoExpandParent:a.autoExpandParent,onSelect:l,onExpand:c,onCheck:d,draggable:a.draggableOpen,onDrop:t=>{const n=t.node.key,r=t.dragNode.key,i=t.node.pos.split("-"),l=t.dropPosition-Number(i[i.length-1]),c=(t,e,n)=>{for(let r=0;r<t.length;r++){if(t[r].key===e)return n(t[r],r,t);t[r].children&&c(t[r].children,e,n)}};if(e.onVerificationDropCallBack&&e.onVerificationDropCallBack(t,a.treeList))return;if(t.dragNode.noDrag)return void Oi.warn("此节点不支持修改",1.5);const s=[...a.treeList];let u={title:"",key:""};if(c(s,r,((t,e,n)=>{n.splice(e,1),u=t})),t.dropToGap)if((t.node.children||[]).length>0&&t.node.expanded&&1===l)c(s,n,(t=>{t.children=t.children||[],t.children.unshift(u)}));else{let t=[],e=0;c(s,n,((n,r,a)=>{t=a,e=r})),-1===l?t.splice(e,0,u):t.splice(e+1,0,u)}else c(s,n,(t=>{t.children=t.children||[],t.children.push(u)}));e.onDropCallBack&&e.onDropCallBack(t,s),o({treeList:s})},onDragEnter:t=>{o({expandedKeys:t.expandedKeys})}},e.treeConfig),void 0):n.jsx(br,{},void 0)]}),void 0)}),void 0)}));const aD=t=>Object.prototype.toString.call(t.data)===`[object ${t.type}]`,oD=(t,e)=>{for(let n of t){let t=n.value;if("number"==typeof e&&(t=parseInt(n.value)),t===e)return n.label}return e};var iD={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},lD={lang:E({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeWeekPlaceholder:["开始周","结束周"]},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"}),timePickerLocale:E({},iD)};lD.lang.ok="确 定";var cD="${label}不是一个有效的${type}",sD={locale:"zh-cn",Pagination:aE,DatePicker:lD,TimePicker:iD,Calendar:lD,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:cD,method:cD,array:cD,object:cD,number:cD,date:cD,boolean:cD,integer:cD,float:cD,regexp:cD,email:cD,url:cD,hex:cD},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"}},uD={placeholder:"請選擇時間"},dD={lang:E({placeholder:"請選擇日期",yearPlaceholder:"請選擇年份",quarterPlaceholder:"請選擇季度",monthPlaceholder:"請選擇月份",weekPlaceholder:"請選擇周",rangePlaceholder:["開始日期","結束日期"],rangeYearPlaceholder:["開始年份","結束年份"],rangeMonthPlaceholder:["開始月份","結束月份"],rangeWeekPlaceholder:["開始周","結束周"]},{locale:"zh_TW",today:"今天",now:"此刻",backToToday:"返回今天",ok:"確定",timeSelect:"選擇時間",dateSelect:"選擇日期",weekSelect:"選擇周",clear:"清除",month:"月",year:"年",previousMonth:"上個月 (翻頁上鍵)",nextMonth:"下個月 (翻頁下鍵)",monthSelect:"選擇月份",yearSelect:"選擇年份",decadeSelect:"選擇年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH時mm分ss秒",previousYear:"上一年 (Control鍵加左方向鍵)",nextYear:"下一年 (Control鍵加右方向鍵)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世紀",nextCentury:"下一世紀"}),timePickerLocale:E({},uD)};dD.lang.ok="確 定";var pD="${label}不是一個有效的${type}",fD={locale:"zh-hk",Pagination:{items_per_page:"條/頁",jump_to:"跳至",jump_to_confirm:"確定",page:"頁",prev_page:"上一頁",next_page:"下一頁",prev_5:"向前 5 頁",next_5:"向後 5 頁",prev_3:"向前 3 頁",next_3:"向後 3 頁",page_size:"頁碼"},DatePicker:dD,TimePicker:uD,Calendar:dD,global:{placeholder:"請選擇"},Table:{filterTitle:"篩選器",filterConfirm:"確定",filterReset:"重置",filterEmptyText:"無篩選項",selectAll:"全部選取",selectInvert:"反向選取",selectNone:"清空所有",selectionAll:"全選所有",sortTitle:"排序",expand:"展開行",collapse:"關閉行",triggerDesc:"點擊降序",triggerAsc:"點擊升序",cancelSort:"取消排序"},Modal:{okText:"確定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{okText:"確定",cancelText:"取消"},Transfer:{searchPlaceholder:"搜尋資料",itemUnit:"項目",itemsUnit:"項目",remove:"刪除",selectCurrent:"全選當頁",removeCurrent:"刪除當頁",selectAll:"全選所有",removeAll:"刪除全部",selectInvert:"反選當頁"},Upload:{uploading:"正在上傳...",removeFile:"刪除檔案",uploadError:"上傳失敗",previewFile:"檔案預覽",downloadFile:"下载文件"},Empty:{description:"無此資料"},Icon:{icon:"圖標"},Text:{edit:"編輯",copy:"複製",copied:"複製成功",expand:"展開"},PageHeader:{back:"返回"},Form:{defaultValidateMessages:{default:"字段驗證錯誤${label}",required:"請輸入${label}",enum:"${label}必須是其中一個[${enum}]",whitespace:"${label}不能為空字符",date:{format:"${label}日期格式無效",parse:"${label}不能轉換為日期",invalid:"${label}是一個無效日期"},types:{string:pD,method:pD,array:pD,object:pD,number:pD,date:pD,boolean:pD,integer:pD,float:pD,regexp:pD,email:pD,url:pD,hex:pD},string:{len:"${label}須為${len}個字符",min:"${label}最少${min}個字符",max:"${label}最多${max}個字符",range:"${label}須在${min}-${max}字符之間"},number:{len:"${label}必須等於${len}",min:"${label}最小值為${min}",max:"${label}最大值為${max}",range:"${label}須在${min}-${max}之間"},array:{len:"須為${len}個${label}",min:"最少${min}個${label}",max:"最多${max}個${label}",range:"${label}數量須在${min}-${max}之間"},pattern:{mismatch:"${label}與模式不匹配${pattern}"}}},Image:{preview:"預覽"}};g.default.locale("zh-cn");const mD=e=>{const[r,a]=t.useState(sD);return t.useEffect((()=>{const t=t=>{switch(t){case"zh-CN":a(sD),g.default.locale("zh-cn");break;case"zh-HK":a(fD),g.default.locale("zh-hk");break;case"en":a(or),g.default.locale("en")}};t((t=>{if(!t)return null;t=t.toString();const e=window.localStorage.getItem(t);try{return JSON.parse(e)}catch(t){return e}})("i18nextLng")),window.addEventListener("web_pack:language",(e=>{const n=e.language;t(n)}))}),[]),n.jsx(dl,Object.assign({locale:r},{children:e.children}),void 0)};y(".generate-form.ant-form .ant-row.ant-form-item{margin-bottom:8px}.generate-form.ant-form .ant-row .ant-col.ant-form-item-label{padding-bottom:0}.generate-form.ant-form .ant-row .ant-col .ant-picker{width:100%}.generate-form.ant-form .ant-row .ant-col .form-item-divide .ant-form-item{margin-bottom:0}.generate-form.ant-form .ant-row .ant-col .form-item-divide .divide{position:absolute;top:5px;right:-5px;z-index:1;color:#ccc}.multiple-checkbox .ant-checkbox-wrapper{margin-top:5px;margin-bottom:5px;margin-left:10px}.hlyc-web-com-align-right input{padding-right:24px;text-align:right}");const{Option:hD}=Kd,{RangePicker:gD}=Fw,{RangePicker:bD}=mT;var vD,yD=t.forwardRef((function(e,r){const[a]=Fk.useForm();let{className:o,formConfig:l,rowGridConfig:c,colGirdConfig:s,render:u}=e;const d=t.useRef({}),f=t.useRef({}),[m,h]=C.useSetState({update:!1,remoteFetching:!1,remoteData:{},treeSelectData:{},treeSelectFlattenData:{},selectMultiple:{}});let b=t.useMemo((()=>e.list?[...e.list]:[]),[e.list]);const v=t.useMemo((()=>i.v4()),[]),y=t.useCallback(((t,e)=>{const n=e.remoteConfig,r=e.name;let a=d.current[r];n&&n.remoteApi&&(h((t=>(t.remoteFetching=!0,d.current[r]=[],t.remoteData[r]=[],t))),n.remoteApi(t).then((t=>{setTimeout((()=>{void 0===a&&(d.current[r]=[]),r&&h((e=>(e.remoteFetching=!1,d.current[r]=t,e.remoteData[r]=t,e)))}),100)})).catch((()=>{h((t=>(t.remoteFetching=!1,d.current[r]=[],t.remoteData[r]=[],t)))})))}),[h]),x=t.useCallback(((t,e)=>{const n=t.treeSelectConfig;n&&n.data&&n.data.api(e).then((e=>{const r=t.name;if(r){f.current[r]=[];let t=[],a=[];const o=(t,e)=>{for(let[r,i]of t.entries()){const t=n.data?.children||"children";e[r]={},e[r].title=i[n.data?.title],e[r].value=i[n.data?.value],e[r].key=e[r].value,a.push(i),Array.isArray(i[t])&&(e[r].children=[],o(i[t],e[r].children))}};o(e,t),h((e=>(e.treeSelectData[r]=t,e.treeSelectFlattenData[r]=a,e)))}}))}),[h]);return t.useEffect((()=>{if(b){let t={};for(let t of b)"RemoteSearch"===t.componentName&&t.name&&!d.current[t.name]&&t.remoteConfig&&!1!==t.remoteConfig.initLoad&&y(void 0,t),"TreeSelect"===t.componentName&&t.name&&!f.current[t.name]&&t.treeSelectConfig&&t.treeSelectConfig.data&&x(t);a.setFieldsValue(t)}}),[y,x,a,b]),t.useImperativeHandle(r,(()=>({getFormValues:t=>a.getFieldsValue(t),setFormFields:t=>{a.setFields(t)},setFormValues:t=>{a.setFieldsValue(t),setTimeout((()=>{b.forEach((t=>{"RemoteSearch"===t.componentName&&t.remoteConfig&&t.remoteConfig.reLoad&&y(void 0,t)}))}),100)},formSubmit:t=>new Promise(((e,n)=>{a.validateFields(t).then((t=>{for(let e in t)aD({data:t[e],type:"String"})&&(t[e]=t[e].replace(/(^\s*)|(\s*$)/g,""));e(t)})).catch((t=>{t.errorFields&&t.errorFields.length&&(console.warn("请输入或选择表单必填项:",t),Oi.warn("请输入或选择表单必填项",1.5)),n(new Error("false"))}))})),formReset:t=>(a.resetFields(t),a.getFieldsValue())}))),n.jsx(mD,{children:n.jsx(Fk,Object.assign({name:v,className:`generate-form ${o||""}`,form:a},l,{initialValues:{sortSeq:10,startTime:g.default(`${(new Date).getFullYear()}-01-01`),endTime:g.default("2099-12-31"),...l?l.initialValues:void 0}},{children:n.jsxs(jy,Object.assign({},c,{children:[(()=>{const e=(t,e)=>{h((n=>(t.name&&(n.selectMultiple[t.name]=e),n)))};if(!b)return;const r=t=>{const{inputMode:e,...r}=t.inputConfig||{};return n.jsx(fx,Object.assign({disabled:t.disabled,type:e||"text",maxLength:t.maxLength,placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputChange,onPressEnter:t.inputEnter},r),void 0)},o=t=>n.jsx(Kd,Object.assign({allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.selectChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0),i=t=>{const r=t.selectData||[];return n.jsx(Kd,Object.assign({mode:"multiple",allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:n=>{e(t,n.length===r.length),t.multipleChange&&t.multipleChange(n)},filterOption:(t,e)=>!!e&&e.children.toLowerCase().indexOf(t.toLowerCase())>=0,dropdownRender:r=>((t,r)=>{const o=r.selectData||[];return n.jsxs("div",Object.assign({className:"multiple-checkbox"},{children:[n.jsx(gw,Object.assign({checked:r.name?m.selectMultiple[r.name]:void 0,onChange:t=>{const n={};t.target.checked?r.name&&(n[r.name]=o.map((t=>t.value))):r.name&&(n[r.name]=[]),e(r,t.target.checked),a.setFieldsValue(n)}},{children:"全选"}),void 0),t]}),void 0)})(r,t)},t.selectConfig,{children:r.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e)))}),void 0)},l=t=>{const e=t.remoteConfig,r=e&&e.remoteMode,a=e&&e.allowClear,o=e&&e.showSearch;return n.jsx(Kd,Object.assign({mode:r||void 0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,notFoundContent:m.remoteFetching?n.jsx(_C,{size:"small"},void 0):n.jsx(br,{style:{marginTop:8,marginBottom:8},image:br.PRESENTED_IMAGE_SIMPLE},void 0),filterOption:!1,allowClear:!1!==a,showSearch:!1!==o,onFocus:()=>y(void 0,t),onSearch:!1===o?void 0:p.default.debounce((e=>y(e,t)),300),onChange:t.remoteSearchChange},t.selectConfig,{children:t.name&&m.remoteData[t.name]?m.remoteData[t.name].map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0)},c=t=>n.jsx(Fw,Object.assign({disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.datePickerChange},t.datePickerConfig),void 0),u=t=>n.jsx(mT,Object.assign({disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.timePickerChange},t.timePickerConfig),void 0),d=t=>{const e=t.regionSelectionConfig;return n.jsx(lw,{disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,options:e&&e.loadData||[],loadData:e=>(async(t,e)=>{if(e){const n=e[e.length-1];let r=[];if(!t.regionSelectionConfig?.selectLoad)return;n.loading=!0,r=await(t.regionSelectionConfig?.selectLoad(n.id)),n.loading=!1,r.length?n.children=r:n.isLeaf=!0,h({update:!m.update})}})(t,e),changeOnSelect:!0,onChange:t.cascaderChange},void 0)},f=t=>"Input"===t.componentName?r(t):"Select"===t.componentName?o(t):"DatePicker"===t.componentName?c(t):"TimePicker"===t.componentName?u(t):"RemoteSearch"===t.componentName?l(t):null;return b.map(((e,h)=>{let g=null;switch(e.componentName){case"Input":g=r(e);break;case"InputNumber":g=(t=>{const{alignRight:e,...r}=t.inputNumberConfig||{};return n.jsx(zC,Object.assign({disabled:t.disabled,style:{width:"100%"},placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputNumberChange,className:e?"hlyc-web-com-align-right":""},r),void 0)})(e);break;case"HideInput":g=(t=>n.jsx(fx,{style:{display:"none"},maxLength:t.maxLength,disabled:t.disabled,type:"text",placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputChange,onPressEnter:t.inputEnter},void 0))(e);break;case"TextArea":g=(t=>n.jsx(fx.TextArea,{rows:t.rows,disabled:t.disabled,maxLength:t.maxLength,placeholder:t.placeholder||`请输入${t.label}`,onChange:t.textAreaChange},void 0))(e);break;case"AutoComplete":g=(t=>n.jsx(Kd,Object.assign({allowClear:!0,showSearch:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,optionFilterProp:"children",filterOption:(t,e)=>!!e&&e.children.toLowerCase().indexOf(t.toLowerCase())>=0,onChange:t.autoCompleteChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0))(e);break;case"InputAutoComplete":g=(t=>n.jsx(qd,Object.assign({filterOption:(t,e)=>-1!==e.value.toUpperCase().indexOf(t.toUpperCase()),disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.inputAutoCompleteChange},t.inputAutoCompleteConfig),void 0))(e);break;case"Select":g=o(e);break;case"Multiple":g=i(e);break;case"MultipleTag":g=(t=>n.jsx(Kd,Object.assign({mode:"tags",allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.multipleChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0))(e);break;case"RemoteSearch":g=l(e);break;case"DatePicker":g=c(e);break;case"RangePicker":g=(t=>n.jsx(gD,Object.assign({disabled:t.disabled,placeholder:t.rangePickerPlaceholder,onChange:t.rangePickerChange},t.rangePickerConfig),void 0))(e);break;case"TimeRangePicker":g=(t=>n.jsx(bD,Object.assign({disabled:t.disabled,placeholder:t.timeRangePickerPlaceholder,onChange:t.timeRangePickerChange},t.timeRangePickerConfig),void 0))(e);break;case"TimePicker":g=u(e);break;case"Switch":g=(t=>n.jsx(HO,{defaultChecked:!1,checkedChildren:"ON",unCheckedChildren:"OFF",disabled:t.disabled,onChange:t.switchChange},void 0))(e);break;case"Radio":g=(t=>n.jsx(ob.Group,Object.assign({onChange:t.radioChange},{children:t.selectData?t.selectData.map(((e,r)=>n.jsx(ob,Object.assign({disabled:t.disabled,value:e.value},{children:e.label}),r))):null}),void 0))(e);break;case"Checkbox":g=(t=>n.jsx(gw.Group,Object.assign({onChange:t.checkboxChange},{children:t.selectData?t.selectData.map(((e,r)=>n.jsx(gw,Object.assign({disabled:t.disabled,value:e.value},{children:e.label}),r))):null}),void 0))(e);break;case"TreeSelect":g=((t,e)=>{const r=t.name;return n.jsx(sT,Object.assign({disabled:t.disabled,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:m.treeSelectData[r],placeholder:t.placeholder||`请选择${t.label}`,onChange:n=>{if(t.treeSelectConfig&&t.treeSelectConfig.data){const o=t.treeSelectConfig.data,i=o.onChange,l=m.treeSelectFlattenData[r],c=Object.prototype.toString.call(n);let s=[],u={...t};if("[object String]"===c&&(s=l.filter((t=>t[o.value]===n))),"[object Array]"===c&&Array.isArray(n))for(let t=l.length;t--;)n.some((e=>e===l[t][o.value]))&&s.push(l[t]);if(i){const n=i(s,{...t});n&&(u=n),u&&(b[e]=u)}a.setFieldsValue({[u.name]:n}),x(u)}},allowClear:!0,treeDefaultExpandAll:!0},t.treeSelectConfig?.extra),void 0)})(e,h);break;case"Union":let t,s=0;e.unionConfig&&(s=e.unionConfig.unionItems.length,t=100/s+"%"),g=n.jsx(jy,Object.assign({className:"form-item-divide",gutter:16},{children:e.unionConfig?.unionItems.map(((r,a)=>n.jsxs(Dy,Object.assign({style:{width:t}},{children:[n.jsx(Fk.Item,Object.assign({name:r.name,rules:r.rules,noStyle:!0},{children:f(r)}),void 0),a<s-1?n.jsx("span",Object.assign({className:"divide"},{children:e.unionConfig&&(e.unionConfig.divide?e.unionConfig.divide:"~")}),void 0):null]}),a)))}),void 0);break;case"RegionSelection":g=d(e);break;case"Rate":g=(t=>n.jsx(PO,Object.assign({disabled:t.disabled,onChange:t.rateChange},t.rateConfig),void 0))(e);break;default:return null}let v,y={...e};return y.label=(t=>{let e=t.label;return"Union"===t.componentName&&t.rules&&(e=n.jsxs("span",{children:[n.jsx("i",Object.assign({style:{marginRight:4,color:"#ff4d4f",fontStyle:"normal",fontFamily:"SimSun, sans-serif"}},{children:"*"}),void 0),t.label]},void 0)),e})(y),y=p.default.omit(y,["colProps","componentName","selectData","inputConfig","inputNumberConfig","datePickerConfig","rangePickerConfig","timeRangePickerConfig","timePickerConfig","inputAutoCompleteConfig","unionConfig","remoteConfig","selectConfig","regionSelectionConfig","treeSelectConfig","rows","render","rangePickerPlaceholder","timeRangePickerPlaceholder","visible","selectIsHideAll","rateConfig","inputChange","inputNumberChange","inputAutoCompleteChange","inputEnter","textAreaChange","autoCompleteChange","selectChange","multipleChange","remoteSearchChange","datePickerChange","rangePickerChange","timeRangePickerChange","timePickerChange","switchChange","radioChange","checkboxChange","cascaderChange","rateChange"]),"Union"===e.componentName&&(y=p.default.omit(y,["name"])),v=e.colProps?e.colProps:s,t.createElement(Dy,{...v,key:h,style:{display:!1===e.visible?"none":"block"}},n.jsx(Fk.Item,Object.assign({className:"HideInput"===e.componentName?"hide-item":void 0},y,{children:g}),void 0),e.render&&e.render())}))})(),u?n.jsx(Dy,{children:n.jsx(Fk.Item,{children:u&&u()},void 0)},void 0):null]}),void 0)}),void 0)},void 0)})),xD=_(F((function(t,e){function n(t){return"object"!=typeof t||"toString"in t?t:Object.prototype.toString.call(t).slice(8,-1)}Object.defineProperty(e,"__esModule",{value:!0});var r="object"==typeof process&&"production"===process.env.NODE_ENV;function a(t,e){if(!t){if(r)throw new Error("Invariant failed");throw new Error(e())}}e.invariant=a;var o=Object.prototype.hasOwnProperty,i=Array.prototype.splice,l=Object.prototype.toString;function c(t){return l.call(t).slice(8,-1)}var s=Object.assign||function(t,e){return u(e).forEach((function(n){o.call(e,n)&&(t[n]=e[n])})),t},u="function"==typeof Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function d(t){return Array.isArray(t)?s(t.constructor(t.length),t):"Map"===c(t)?new Map(t):"Set"===c(t)?new Set(t):t&&"object"==typeof t?s(Object.create(Object.getPrototypeOf(t)),t):t}var p=function(){function t(){this.commands=s({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,e){return t===e},this.update.newContext=function(){return(new t).update}}return Object.defineProperty(t.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),t.prototype.extend=function(t,e){this.commands[t]=e},t.prototype.update=function(t,e){var n=this,r="function"==typeof e?{$apply:e}:e;Array.isArray(t)&&Array.isArray(r)||a(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),a("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var i=t;return u(r).forEach((function(e){if(o.call(n.commands,e)){var a=t===i;i=n.commands[e](r[e],i,r,t),a&&n.isEquals(i,t)&&(i=t)}else{var l="Map"===c(t)?n.update(t.get(e),r[e]):n.update(t[e],r[e]),s="Map"===c(i)?i.get(e):i[e];n.isEquals(l,s)&&(void 0!==l||o.call(t,e))||(i===t&&(i=d(t)),"Map"===c(i)?i.set(e,l):i[e]=l)}})),i},t}();e.Context=p;var f={$push:function(t,e,n){return h(e,n,"$push"),t.length?e.concat(t):e},$unshift:function(t,e,n){return h(e,n,"$unshift"),t.length?t.concat(e):e},$splice:function(t,e,r,o){return function(t,e){a(Array.isArray(t),(function(){return"Expected $splice target to be an array; got "+n(t)})),b(e.$splice)}(e,r),t.forEach((function(t){b(t),e===o&&t.length&&(e=d(o)),i.apply(e,t)})),e},$set:function(t,e,n){return function(t){a(1===Object.keys(t).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),t},$toggle:function(t,e){g(t,"$toggle");var n=t.length?d(e):e;return t.forEach((function(t){n[t]=!e[t]})),n},$unset:function(t,e,n,r){return g(t,"$unset"),t.forEach((function(t){Object.hasOwnProperty.call(e,t)&&(e===r&&(e=d(r)),delete e[t])})),e},$add:function(t,e,n,r){return v(e,"$add"),g(t,"$add"),"Map"===c(e)?t.forEach((function(t){var n=t[0],a=t[1];e===r&&e.get(n)!==a&&(e=d(r)),e.set(n,a)})):t.forEach((function(t){e!==r||e.has(t)||(e=d(r)),e.add(t)})),e},$remove:function(t,e,n,r){return v(e,"$remove"),g(t,"$remove"),t.forEach((function(t){e===r&&e.has(t)&&(e=d(r)),e.delete(t)})),e},$merge:function(t,e,r,o){var i,l;return i=e,a((l=t)&&"object"==typeof l,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(l)})),a(i&&"object"==typeof i,(function(){return"update(): $merge expects a target of type 'object'; got "+n(i)})),u(t).forEach((function(n){t[n]!==e[n]&&(e===o&&(e=d(o)),e[n]=t[n])})),e},$apply:function(t,e){var r;return a("function"==typeof(r=t),(function(){return"update(): expected spec of $apply to be a function; got "+n(r)+"."})),t(e)}},m=new p;function h(t,e,r){a(Array.isArray(t),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(t)+"."})),g(e[r],r)}function g(t,e){a(Array.isArray(t),(function(){return"update(): expected spec of "+n(e)+" to be an array; got "+n(t)+". Did you forget to wrap your parameter in an array?"}))}function b(t){a(Array.isArray(t),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(t)+". Did you forget to wrap your parameters in an array?"}))}function v(t,e){var r=c(t);a("Map"===r||"Set"===r,(function(){return"update(): "+n(e)+" expects a target of type Set or Map; got "+n(r)}))}e.isEquals=m.update.isEquals,e.extend=m.extend,e.default=m.update,e.default.default=t.exports=s(e.default,e)}))),wD=function(t,e){e.style&&t.props.style&&(e.style=ED(ED({},t.props.style),e.style));e.className&&t.props.className&&(e.className=t.props.className+" "+e.className);return kD.default.cloneElement(t,e)},kD=(vD=d.default)&&vD.__esModule?vD:{default:vD};function CD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ED(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?CD(Object(n),!0).forEach((function(e){OD(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):CD(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function OD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var SD=Object.defineProperty({cloneElement:wD},"__esModule",{value:!0}),ND="function"==typeof Symbol&&Symbol.for,PD=ND?Symbol.for("react.element"):60103,jD=ND?Symbol.for("react.portal"):60106,TD=ND?Symbol.for("react.fragment"):60107,ID=ND?Symbol.for("react.strict_mode"):60108,DD=ND?Symbol.for("react.profiler"):60114,RD=ND?Symbol.for("react.provider"):60109,MD=ND?Symbol.for("react.context"):60110,zD=ND?Symbol.for("react.async_mode"):60111,AD=ND?Symbol.for("react.concurrent_mode"):60111,LD=ND?Symbol.for("react.forward_ref"):60112,_D=ND?Symbol.for("react.suspense"):60113,FD=ND?Symbol.for("react.suspense_list"):60120,VD=ND?Symbol.for("react.memo"):60115,KD=ND?Symbol.for("react.lazy"):60116,HD=ND?Symbol.for("react.block"):60121,BD=ND?Symbol.for("react.fundamental"):60117,UD=ND?Symbol.for("react.responder"):60118,WD=ND?Symbol.for("react.scope"):60119;
|
|
35
|
+
*/$T.Text=function(e){var n=e.ellipsis,r=KT(e,["ellipsis"]),a=t.useMemo((function(){return n&&"object"===O(n)?Y(n,["expandable","rows"]):n}),[n]);return tr("object"!==O(n)||!n||!("expandable"in n)&&!("rows"in n),"Typography.Text","`ellipsis` do not support `expandable` or `rows` props."),t.createElement(VT,E({},r,{ellipsis:a,component:"span"}))},$T.Link=UT,$T.Title=function(e){var n,r=e.level,a=void 0===r?1:r,o=WT(e,["level"]);return-1!==YT.indexOf(a)?n="h".concat(a):(tr(!1,"Typography.Title","Title only accept `1 | 2 | 3 | 4 | 5` as `level` value. And `5` need 4.6.0+ version."),n="h1"),t.createElement(VT,E({},o,{component:n}))},$T.Paragraph=function(e){return t.createElement(VT,E({},e,{component:"div"}))};var fI=F((function(t){!function(){var e={}.hasOwnProperty;function n(){for(var t=[],r=0;r<arguments.length;r++){var a=arguments[r];if(a){var o=typeof a;if("string"===o||"number"===o)t.push(a);else if(Array.isArray(a)){if(a.length){var i=n.apply(null,a);i&&t.push(i)}}else if("object"===o)if(a.toString===Object.prototype.toString)for(var l in a)e.call(a,l)&&a[l]&&t.push(l);else t.push(a.toString())}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):window.classNames=n}()}));function mI(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function hI(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var r=t.data[e];Array.isArray(r)?r.forEach((function(t){n.append("".concat(e,"[]"),t)})):n.append(e,r)})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot ".concat(t.method," ").concat(t.action," ").concat(e.status,"'"),r=new Error(n);return r.status=e.status,r.method=t.method,r.url=t.action,r}(t,e),mI(e)):t.onSuccess(mI(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var r=t.headers||{};return null!==r["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(r).forEach((function(t){null!==r[t]&&e.setRequestHeader(t,r[t])})),e.send(n),{abort:function(){e.abort()}}}var gI=+new Date,bI=0;function vI(){return"rc-upload-".concat(gI,"-").concat(++bI)}var yI=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),r=t.name||"",a=t.type||"",o=a.replace(/\/.*$/,"");return n.some((function(t){var e=t.trim();if(/^\*(\/\*)?$/.test(t))return!0;if("."===e.charAt(0)){var n=r.toLowerCase(),i=e.toLowerCase(),l=[i];return".jpg"!==i&&".jpeg"!==i||(l=[".jpg",".jpeg"]),l.some((function(t){return n.endsWith(t)}))}return/\/\*$/.test(e)?o===e.replace(/\/.*$/,""):a===e||!!/^\w+$/.test(e)&&(yt(!1,"Upload takes an invalidate 'accept' type '".concat(e,"'.Skip for check.")),!0)}))}return!0};var xI=function(t,e,n){var r=function t(r,a){r&&(r.path=a||"",r.isFile?r.file((function(t){n(t)&&(r.fullPath&&!t.webkitRelativePath&&(Object.defineProperties(t,{webkitRelativePath:{writable:!0}}),t.webkitRelativePath=r.fullPath.replace(/^\//,""),Object.defineProperties(t,{webkitRelativePath:{writable:!1}})),e([t]))})):r.isDirectory&&function(t,e){var n=t.createReader(),r=[];!function t(){n.readEntries((function(n){var a=Array.prototype.slice.apply(n);r=r.concat(a),a.length?t():e(r)}))}()}(r,(function(e){e.forEach((function(e){t(e,"".concat(a).concat(r.name,"/"))}))})))};t.forEach((function(t){r(t.webkitGetAsEntry())}))},wI=["component","prefixCls","className","disabled","id","style","multiple","accept","capture","children","directory","openFileDialogOnClick","onMouseEnter","onMouseLeave"],kI=function(e){eI(r,t.Component);var n=oI(r);function r(){var t;GT(this,r);for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return(t=n.call.apply(n,[this].concat(a))).state={uid:vI()},t.reqs={},t.fileInput=void 0,t._isMounted=void 0,t.onChange=function(e){var n=t.props,r=n.accept,a=n.directory,o=pI(e.target.files).filter((function(t){return!a||yI(t,r)}));t.uploadFiles(o),t.reset()},t.onClick=function(e){var n=t.fileInput;if(n){var r=e.target,a=t.props.onClick;if(r&&"BUTTON"===r.tagName)n.parentNode.focus(),r.blur();n.click(),a&&a(e)}},t.onKeyDown=function(e){"Enter"===e.key&&t.onClick(e)},t.onFileDrop=function(e){var n=t.props.multiple;if(e.preventDefault(),"dragover"!==e.type)if(t.props.directory)xI(Array.prototype.slice.call(e.dataTransfer.items),t.uploadFiles,(function(e){return yI(e,t.props.accept)}));else{var r=pI(e.dataTransfer.files).filter((function(e){return yI(e,t.props.accept)}));!1===n&&(r=r.slice(0,1)),t.uploadFiles(r)}},t.uploadFiles=function(e){var n=pI(e),r=n.map((function(e){return e.uid=vI(),t.processFile(e,n)}));Promise.all(r).then((function(e){var n=t.props.onBatchStart;null==n||n(e.map((function(t){return{file:t.origin,parsedFile:t.parsedFile}}))),e.filter((function(t){return null!==t.parsedFile})).forEach((function(e){t.post(e)}))}))},t.processFile=function(){var e=uI(cI().mark((function e(n,r){var a,o,i,l,c,s,u,d,p;return cI().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props.beforeUpload,o=n,!a){e.next=14;break}return e.prev=3,e.next=6,a(n,r);case 6:o=e.sent,e.next=12;break;case 9:e.prev=9,e.t0=e.catch(3),o=!1;case 12:if(!1!==o){e.next=14;break}return e.abrupt("return",{origin:n,parsedFile:null,action:null,data:null});case 14:if("function"!=typeof(i=t.props.action)){e.next=21;break}return e.next=18,i(n);case 18:l=e.sent,e.next=22;break;case 21:l=i;case 22:if("function"!=typeof(c=t.props.data)){e.next=29;break}return e.next=26,c(n);case 26:s=e.sent,e.next=30;break;case 29:s=c;case 30:return u="object"!==XT(o)&&"string"!=typeof o||!o?n:o,d=u instanceof File?u:new File([u],n.name,{type:n.type}),(p=d).uid=n.uid,e.abrupt("return",{origin:n,data:s,parsedFile:p,action:l});case 35:case"end":return e.stop()}}),e,null,[[3,9]])})));return function(t,n){return e.apply(this,arguments)}}(),t.saveFileInput=function(e){t.fileInput=e},t}return QT(r,[{key:"componentDidMount",value:function(){this._isMounted=!0}},{key:"componentWillUnmount",value:function(){this._isMounted=!1,this.abort()}},{key:"post",value:function(t){var e=this,n=t.data,r=t.origin,a=t.action,o=t.parsedFile;if(this._isMounted){var i=this.props,l=i.onStart,c=i.customRequest,s=i.name,u=i.headers,d=i.withCredentials,p=i.method,f=r.uid,m=c||hI,h={action:a,filename:s,data:n,file:o,headers:u,withCredentials:d,method:p||"post",onProgress:function(t){var n=e.props.onProgress;null==n||n(t,o)},onSuccess:function(t,n){var r=e.props.onSuccess;null==r||r(t,o,n),delete e.reqs[f]},onError:function(t,n){var r=e.props.onError;null==r||r(t,n,o),delete e.reqs[f]}};l(r),this.reqs[f]=m(h)}}},{key:"reset",value:function(){this.setState({uid:vI()})}},{key:"abort",value:function(t){var e=this.reqs;if(t){var n=t.uid?t.uid:t;e[n]&&e[n].abort&&e[n].abort(),delete e[n]}else Object.keys(e).forEach((function(t){e[t]&&e[t].abort&&e[t].abort(),delete e[t]}))}},{key:"render",value:function(){var t=this.props,e=t.component,n=t.prefixCls,r=t.className,a=t.disabled,o=t.id,i=t.style,l=t.multiple,c=t.accept,s=t.capture,u=t.children,p=t.directory,f=t.openFileDialogOnClick,m=t.onMouseEnter,h=t.onMouseLeave,g=lI(t,wI),b=fI(iI(iI(iI({},n,!0),"".concat(n,"-disabled"),a),r,r)),v=p?{directory:"directory",webkitdirectory:"webkitdirectory"}:{},y=a?{}:{onClick:f?this.onClick:function(){},onKeyDown:f?this.onKeyDown:function(){},onMouseEnter:m,onMouseLeave:h,onDrop:this.onFileDrop,onDragOver:this.onFileDrop,tabIndex:"0"};return d.default.createElement(e,qT({},y,{className:b,role:"button",style:i}),d.default.createElement("input",qT({},Xl(g,{aria:!0,data:!0}),{id:o,disabled:a,type:"file",ref:this.saveFileInput,onClick:function(t){return t.stopPropagation()},key:this.state.uid,style:{display:"none"},accept:c},v,{multiple:l,onChange:this.onChange},null!=s?{capture:s}:{})),u)}}]),r}();function CI(){}var EI=function(e){eI(r,t.Component);var n=oI(r);function r(){var t;GT(this,r);for(var e=arguments.length,a=new Array(e),o=0;o<e;o++)a[o]=arguments[o];return(t=n.call.apply(n,[this].concat(a))).uploader=void 0,t.saveUploader=function(e){t.uploader=e},t}return QT(r,[{key:"abort",value:function(t){this.uploader.abort(t)}},{key:"render",value:function(){return d.default.createElement(kI,qT({},this.props,{ref:this.saveUploader}))}}]),r}();EI.defaultProps={component:"span",prefixCls:"rc-upload",data:{},headers:{},name:"file",multipart:!1,onStart:CI,onError:CI,onSuccess:CI,multiple:!1,beforeUpload:null,customRequest:null,withCredentials:!1,openFileDialogOnClick:!0};var OI=function(t,e){var n={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&e.indexOf(r)<0&&(n[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(t);a<r.length;a++)e.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(t,r[a])&&(n[r[a]]=t[r[a]])}return n},SI=function(e,n){var r=e.style,a=e.height,o=OI(e,["style","height"]);return t.createElement(ZI,E({ref:n},o,{type:"drag",style:E(E({},r),{height:a})}))},NI=t.forwardRef(SI);NI.displayName="Dragger";var PI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M779.3 196.6c-94.2-94.2-247.6-94.2-341.7 0l-261 260.8c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l261-260.8c32.4-32.4 75.5-50.2 121.3-50.2s88.9 17.8 121.2 50.2c32.4 32.4 50.2 75.5 50.2 121.2 0 45.8-17.8 88.8-50.2 121.2l-266 265.9-43.1 43.1c-40.3 40.3-105.8 40.3-146.1 0-19.5-19.5-30.2-45.4-30.2-73s10.7-53.5 30.2-73l263.9-263.8c6.7-6.6 15.5-10.3 24.9-10.3h.1c9.4 0 18.1 3.7 24.7 10.3 6.7 6.7 10.3 15.5 10.3 24.9 0 9.3-3.7 18.1-10.3 24.7L372.4 653c-1.7 1.7-2.6 4-2.6 6.4s.9 4.7 2.6 6.4l36.9 36.9a9 9 0 0012.7 0l215.6-215.6c19.9-19.9 30.8-46.3 30.8-74.4s-11-54.6-30.8-74.4c-41.1-41.1-107.9-41-149 0L463 364 224.8 602.1A172.22 172.22 0 00174 724.8c0 46.3 18.1 89.8 50.8 122.5 33.9 33.8 78.3 50.7 122.7 50.7 44.4 0 88.8-16.9 122.6-50.7l309.2-309C824.8 492.7 850 432 850 367.5c.1-64.6-25.1-125.3-70.7-170.9z"}}]},name:"paper-clip",theme:"outlined"},jI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:PI}))},TI=t.forwardRef(jI);"production"!==process.env.NODE_ENV&&(TI.displayName="PaperClipOutlined");var II={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 632H136v-39.9l138.5-164.3 150.1 178L658.1 489 888 761.6V792zm0-129.8L664.2 396.8c-3.2-3.8-9-3.8-12.2 0L424.6 666.4l-144-170.7c-3.2-3.8-9-3.8-12.2 0L136 652.7V232h752v430.2z",fill:t}},{tag:"path",attrs:{d:"M424.6 765.8l-150.1-178L136 752.1V792h752v-30.4L658.1 489z",fill:e}},{tag:"path",attrs:{d:"M136 652.7l132.4-157c3.2-3.8 9-3.8 12.2 0l144 170.7L652 396.8c3.2-3.8 9-3.8 12.2 0L888 662.2V232H136v420.7zM304 280a88 88 0 110 176 88 88 0 010-176z",fill:e}},{tag:"path",attrs:{d:"M276 368a28 28 0 1056 0 28 28 0 10-56 0z",fill:e}},{tag:"path",attrs:{d:"M304 456a88 88 0 100-176 88 88 0 000 176zm0-116c15.5 0 28 12.5 28 28s-12.5 28-28 28-28-12.5-28-28 12.5-28 28-28z",fill:t}}]}},name:"picture",theme:"twotone"},DI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:II}))},RI=t.forwardRef(DI);"production"!==process.env.NODE_ENV&&(RI.displayName="PictureTwoTone");var MI={icon:function(t,e){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M534 352V136H232v752h560V394H576a42 42 0 01-42-42z",fill:e}},{tag:"path",attrs:{d:"M854.6 288.6L639.4 73.4c-6-6-14.1-9.4-22.6-9.4H192c-17.7 0-32 14.3-32 32v832c0 17.7 14.3 32 32 32h640c17.7 0 32-14.3 32-32V311.3c0-8.5-3.4-16.7-9.4-22.7zM602 137.8L790.2 326H602V137.8zM792 888H232V136h302v216a42 42 0 0042 42h216v494z",fill:t}}]}},name:"file",theme:"twotone"},zI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:MI}))},AI=t.forwardRef(zI);function LI(t){return E(E({},t),{lastModified:t.lastModified,lastModifiedDate:t.lastModifiedDate,name:t.name,size:t.size,type:t.type,uid:t.uid,percent:0,originFileObj:t})}function _I(t,e){var n=fl(e),r=n.findIndex((function(e){return e.uid===t.uid}));return-1===r?n.push(t):n[r]=t,n}function FI(t,e){var n=void 0!==t.uid?"uid":"name";return e.filter((function(e){return e[n]===t[n]}))[0]}"production"!==process.env.NODE_ENV&&(AI.displayName="FileTwoTone");var VI=function(t){return 0===t.indexOf("image/")};var KI={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},HI=function(e,n){return t.createElement(Yo,ye(ye({},e),{},{ref:n,icon:KI}))},BI=t.forwardRef(HI);"production"!==process.env.NODE_ENV&&(BI.displayName="DownloadOutlined");var UI=t.forwardRef((function(e,n){var r,a,o,i=e.prefixCls,l=e.className,c=e.style,s=e.locale,u=e.listType,d=e.file,p=e.items,f=e.progress,m=e.iconRender,h=e.actionIconRender,g=e.itemRender,b=e.isImgUrl,v=e.showPreviewIcon,y=e.showRemoveIcon,x=e.showDownloadIcon,w=e.removeIcon,k=e.downloadIcon,C=e.onPreview,O=e.onDownload,S=e.onClose,P=pi(t.useState(!1),2),j=P[0],T=P[1],I=t.useRef();t.useEffect((function(){return I.current=setTimeout((function(){T(!0)}),300),function(){window.clearTimeout(I.current)}}),[]);var D="".concat(i,"-span"),R=m(d),M=t.createElement("div",{className:"".concat(i,"-text-icon")},R);if("picture"===u||"picture-card"===u)if("uploading"===d.status||!d.thumbUrl&&!d.url){var z,A=V((N(z={},"".concat(i,"-list-item-thumbnail"),!0),N(z,"".concat(i,"-list-item-file"),"uploading"!==d.status),z));M=t.createElement("div",{className:A},R)}else{var L,_=(null==b?void 0:b(d))?t.createElement("img",{src:d.thumbUrl||d.url,alt:d.name,className:"".concat(i,"-list-item-image")}):R,F=V((N(L={},"".concat(i,"-list-item-thumbnail"),!0),N(L,"".concat(i,"-list-item-file"),b&&!b(d)),L));M=t.createElement("a",{className:F,onClick:function(t){return C(d,t)},href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer"},_)}var K,H=V((N(r={},"".concat(i,"-list-item"),!0),N(r,"".concat(i,"-list-item-").concat(d.status),!0),N(r,"".concat(i,"-list-item-list-type-").concat(u),!0),r)),B="string"==typeof d.linkProps?JSON.parse(d.linkProps):d.linkProps,U=y?h(("function"==typeof w?w(d):w)||t.createElement(OP,null),(function(){return S(d)}),i,s.removeFile):null,W=x&&"done"===d.status?h(("function"==typeof k?k(d):k)||t.createElement(BI,null),(function(){return O(d)}),i,s.downloadFile):null,Y="picture-card"!==u&&t.createElement("span",{key:"download-delete",className:V("".concat(i,"-list-item-card-actions"),{picture:"picture"===u})},W,U),$=V("".concat(i,"-list-item-name")),q=d.url?[t.createElement("a",E({key:"view",target:"_blank",rel:"noopener noreferrer",className:$,title:d.name},B,{href:d.url,onClick:function(t){return C(d,t)}}),d.name),Y]:[t.createElement("span",{key:"view",className:$,onClick:function(t){return C(d,t)},title:d.name},d.name),Y],G=v?t.createElement("a",{href:d.url||d.thumbUrl,target:"_blank",rel:"noopener noreferrer",style:d.url||d.thumbUrl?void 0:{pointerEvents:"none",opacity:.5},onClick:function(t){return C(d,t)},title:s.previewFile},t.createElement(Ux,null)):null,X="picture-card"===u&&"uploading"!==d.status&&t.createElement("span",{className:"".concat(i,"-list-item-actions")},G,"done"===d.status&&W,U);K=d.response&&"string"==typeof d.response?d.response:(null===(a=d.error)||void 0===a?void 0:a.statusText)||(null===(o=d.error)||void 0===o?void 0:o.message)||s.uploadError;var Z=t.createElement("span",{className:D},M,q),J=(0,t.useContext(vr).getPrefixCls)(),Q=t.createElement("div",{className:H},t.createElement("div",{className:"".concat(i,"-list-item-info")},Z),X,j&&t.createElement(Ma,{motionName:"".concat(J,"-fade"),visible:"uploading"===d.status,motionDeadline:2e3},(function(e){var n=e.className,r="percent"in d?t.createElement(oO,E({},f,{type:"line",percent:d.percent})):null;return t.createElement("div",{className:V("".concat(i,"-list-item-progress"),n)},r)}))),tt=V("".concat(i,"-list-").concat(u,"-container"),l),et="error"===d.status?t.createElement(vp,{title:K,getPopupContainer:function(t){return t.parentNode}},Q):Q;return t.createElement("div",{className:tt,style:c,ref:n},g?g(et,d,p,{download:O.bind(null,d),preview:C.bind(null,d),remove:S.bind(null,d)}):et)})),WI=E({},Ld);delete WI.onAppearEnd,delete WI.onEnterEnd,delete WI.onLeaveEnd;var YI=function(e,n){var r,a=e.listType,o=e.previewFile,i=e.onPreview,l=e.onDownload,c=e.onRemove,s=e.locale,u=e.iconRender,d=e.isImageUrl,p=e.prefixCls,f=e.items,m=void 0===f?[]:f,h=e.showPreviewIcon,g=e.showRemoveIcon,b=e.showDownloadIcon,v=e.removeIcon,y=e.downloadIcon,x=e.progress,w=e.appendAction,k=e.itemRender,C=sk(),O=pi(t.useState(!1),2),S=O[0],P=O[1];t.useEffect((function(){"picture"!==a&&"picture-card"!==a||(m||[]).forEach((function(t){"undefined"!=typeof document&&"undefined"!=typeof window&&window.FileReader&&window.File&&(t.originFileObj instanceof File||t.originFileObj instanceof Blob)&&void 0===t.thumbUrl&&(t.thumbUrl="",o&&o(t.originFileObj).then((function(e){t.thumbUrl=e||"",C()})))}))}),[a,m,o]),t.useEffect((function(){P(!0)}),[]);var j=function(t,e){if(i)return null==e||e.preventDefault(),i(t)},T=function(t){"function"==typeof l?l(t):t.url&&window.open(t.url)},I=function(t){null==c||c(t)},D=function(e){if(u)return u(e,a);var n="uploading"===e.status,r=d&&d(e)?t.createElement(RI,null):t.createElement(AI,null),o=n?t.createElement(qo,null):t.createElement(TI,null);return"picture"===a?o=n?t.createElement(qo,null):r:"picture-card"===a&&(o=n?s.uploading:r),o},R=function(e,n,r,a){var o={type:"text",size:"small",title:a,onClick:function(t){n(),Hd(e)&&e.props.onClick&&e.props.onClick(t)},className:"".concat(r,"-list-item-card-actions-btn")};if(Hd(e)){var i=Ud(e,E(E({},e.props),{onClick:function(){}}));return t.createElement(af,E({},o,{icon:i}))}return t.createElement(af,o,t.createElement("span",null,e))};t.useImperativeHandle(n,(function(){return{handlePreview:j,handleDownload:T}}));var M=t.useContext(vr),z=M.getPrefixCls,A=M.direction,L=z("upload",p),_=V((N(r={},"".concat(L,"-list"),!0),N(r,"".concat(L,"-list-").concat(a),!0),N(r,"".concat(L,"-list-rtl"),"rtl"===A),r)),F=fl(m.map((function(t){return{key:t.uid,file:t}}))),K="picture-card"===a?"animate-inline":"animate",H={motionDeadline:2e3,motionName:"".concat(L,"-").concat(K),keys:F,motionAppear:S};return"picture-card"!==a&&(H=E(E({},WI),H)),t.createElement("div",{className:_},t.createElement(Ha,E({},H,{component:!1}),(function(e){var n=e.key,r=e.file,o=e.className,i=e.style;return t.createElement(UI,{key:n,locale:s,prefixCls:L,className:o,style:i,file:r,items:m,progress:x,listType:a,isImgUrl:d,showPreviewIcon:h,showRemoveIcon:g,showDownloadIcon:b,removeIcon:v,downloadIcon:y,iconRender:D,actionIconRender:R,itemRender:k,onPreview:j,onDownload:T,onClose:I})})),w&&t.createElement(Ma,H,(function(t){var e=t.className,n=t.style;return Ud(w,(function(t){return{className:V(t.className,e),style:E(E({},n),t.style)}}))})))},$I=t.forwardRef(YI);$I.displayName="UploadList",$I.defaultProps={listType:"text",progress:{strokeWidth:2,showInfo:!1},showRemoveIcon:!0,showDownloadIcon:!1,showPreviewIcon:!0,previewFile:function(t){return new Promise((function(e){if(t.type&&VI(t.type)){var n=document.createElement("canvas");n.width=200,n.height=200,n.style.cssText="position: fixed; left: 0; top: 0; width: ".concat(200,"px; height: ").concat(200,"px; z-index: 9999; display: none;"),document.body.appendChild(n);var r=n.getContext("2d"),a=new Image;a.onload=function(){var t=a.width,o=a.height,i=200,l=200,c=0,s=0;t>o?s=-((l=o*(200/t))-i)/2:c=-((i=t*(200/o))-l)/2,r.drawImage(a,c,s,i,l);var u=n.toDataURL();document.body.removeChild(n),e(u)},a.src=window.URL.createObjectURL(t)}else e("")}))},isImageUrl:function(t){if(t.type&&!t.thumbUrl)return VI(t.type);var e=t.thumbUrl||t.url||"",n=function(){var t=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").split("/"),e=t[t.length-1].split(/#|\?/)[0];return(/\.[^./\\]*$/.exec(e)||[""])[0]}(e);return!(!/^data:image\//.test(e)&&!/(webp|svg|png|gif|jpg|jpeg|jfif|bmp|dpg|ico)$/i.test(n))||!/^data:/.test(e)&&!n}};var qI=function(t,e,n,r){return new(n||(n=Promise))((function(a,o){function i(t){try{c(r.next(t))}catch(t){o(t)}}function l(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(i,l)}c((r=r.apply(t,e||[])).next())}))},GI="__LIST_IGNORE_".concat(Date.now(),"__"),XI=function(e,n){var r,a=e.fileList,o=e.defaultFileList,i=e.onRemove,l=e.showUploadList,c=e.listType,s=e.onPreview,u=e.onDownload,d=e.onChange,p=e.onDrop,f=e.previewFile,m=e.disabled,h=e.locale,g=e.iconRender,b=e.isImageUrl,v=e.progress,y=e.prefixCls,x=e.className,w=e.type,k=e.children,C=e.style,S=e.itemRender,P=e.maxCount,j=pi(bc(o||[],{value:a,postState:function(t){return null!=t?t:[]}}),2),T=j[0],I=j[1],D=pi(t.useState("drop"),2),R=D[0],M=D[1],z=t.useRef();t.useEffect((function(){tr("fileList"in e||!("value"in e),"Upload","`value` is not a valid prop, do you mean `fileList`?"),tr(!("transformFile"in e),"Upload","`transformFile` is deprecated. Please use `beforeUpload` directly.")}),[]),t.useMemo((function(){var t=Date.now();(a||[]).forEach((function(e,n){e.uid||Object.isFrozen(e)||(e.uid="__AUTO__".concat(t,"_").concat(n,"__"))}))}),[a]);var A=function(t,e,n){var r=fl(e);1===P?r=r.slice(-1):P&&(r=r.slice(0,P)),I(r);var a={file:t,fileList:r};n&&(a.event=n),null==d||d(a)},L=function(t){var e=t.filter((function(t){return!t.file[GI]}));if(e.length){var n=e.map((function(t){return LI(t.file)})),r=fl(T);n.forEach((function(t){r=_I(t,r)})),n.forEach((function(t,n){var a=t;if(e[n].parsedFile)t.status="uploading";else{var o,i=t.originFileObj;try{o=new File([i],i.name,{type:i.type})}catch(t){(o=new Blob([i],{type:i.type})).name=i.name,o.lastModifiedDate=new Date,o.lastModified=(new Date).getTime()}o.uid=t.uid,a=o}A(a,r)}))}},_=function(t,e,n){try{"string"==typeof t&&(t=JSON.parse(t))}catch(t){}if(FI(e,T)){var r=LI(e);r.status="done",r.percent=100,r.response=t,r.xhr=n;var a=_I(r,T);A(r,a)}},F=function(t,e){if(FI(e,T)){var n=LI(e);n.status="uploading",n.percent=t.percent;var r=_I(n,T);A(n,r,t)}},K=function(t,e,n){if(FI(n,T)){var r=LI(n);r.error=t,r.response=e,r.status="error";var a=_I(r,T);A(r,a)}},H=function(t){var e;Promise.resolve("function"==typeof i?i(t):i).then((function(n){var r;if(!1!==n){var a=function(t,e){var n=void 0!==t.uid?"uid":"name",r=e.filter((function(e){return e[n]!==t[n]}));return r.length===e.length?null:r}(t,T);a&&(e=E(E({},t),{status:"removed"}),null==T||T.forEach((function(t){var n=void 0!==e.uid?"uid":"name";t[n]!==e[n]||Object.isFrozen(t)||(t.status="removed")})),null===(r=z.current)||void 0===r||r.abort(e),A(e,a))}}))},B=function(t){M(t.type),"drop"===t.type&&(null==p||p(t))};t.useImperativeHandle(n,(function(){return{onBatchStart:L,onSuccess:_,onProgress:F,onError:K,fileList:T,upload:z.current}}));var U=t.useContext(vr),W=U.getPrefixCls,Y=U.direction,$=W("upload",y),q=E(E({onBatchStart:L,onError:K,onProgress:F,onSuccess:_},e),{prefixCls:$,beforeUpload:function(t,n){return qI(void 0,void 0,void 0,ji.mark((function r(){var a,o,i,l;return ji.wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(a=e.beforeUpload,o=e.transformFile,i=t,!a){r.next=13;break}return r.next=5,a(t,n);case 5:if(!1!==(l=r.sent)){r.next=8;break}return r.abrupt("return",!1);case 8:if(delete t[GI],l!==GI){r.next=12;break}return Object.defineProperty(t,GI,{value:!0,configurable:!0}),r.abrupt("return",!1);case 12:"object"===O(l)&&l&&(i=l);case 13:if(!o){r.next=17;break}return r.next=16,o(i);case 16:i=r.sent;case 17:return r.abrupt("return",i);case 18:case"end":return r.stop()}}),r)})))},onChange:void 0});delete q.className,delete q.style,k&&!m||delete q.id;var G=function(e){return l?t.createElement(dr,{componentName:"Upload",defaultLocale:or.Upload},(function(n){var r="boolean"==typeof l?{}:l,a=r.showRemoveIcon,o=r.showPreviewIcon,i=r.showDownloadIcon,d=r.removeIcon,p=r.downloadIcon;return t.createElement($I,{listType:c,items:T,previewFile:f,onPreview:s,onDownload:u,onRemove:H,showRemoveIcon:!m&&a,showPreviewIcon:o,showDownloadIcon:i,removeIcon:d,downloadIcon:p,iconRender:g,locale:E(E({},n),h),isImageUrl:b,progress:v,appendAction:e,itemRender:S})})):e};if("drag"===w){var X,Z=V($,(N(X={},"".concat($,"-drag"),!0),N(X,"".concat($,"-drag-uploading"),T.some((function(t){return"uploading"===t.status}))),N(X,"".concat($,"-drag-hover"),"dragover"===R),N(X,"".concat($,"-disabled"),m),N(X,"".concat($,"-rtl"),"rtl"===Y),X),x);return t.createElement("span",null,t.createElement("div",{className:Z,onDrop:B,onDragOver:B,onDragLeave:B,style:C},t.createElement(EI,E({},q,{ref:z,className:"".concat($,"-btn")}),t.createElement("div",{className:"".concat($,"-drag-container")},k))),G())}var J=V($,(N(r={},"".concat($,"-select"),!0),N(r,"".concat($,"-select-").concat(c),!0),N(r,"".concat($,"-disabled"),m),N(r,"".concat($,"-rtl"),"rtl"===Y),r)),Q=t.createElement("div",{className:J,style:k?void 0:{display:"none"}},t.createElement(EI,E({},q,{ref:z})));return"picture-card"===c?t.createElement("span",{className:V("".concat($,"-picture-card-wrapper"),x)},G(Q)):t.createElement("span",{className:x},Q,G())},ZI=t.forwardRef(XI);ZI.Dragger=NI,ZI.LIST_IGNORE=GI,ZI.displayName="Upload",ZI.defaultProps={type:"select",multiple:!1,action:"",data:{},accept:"",showUploadList:!0,listType:"text",className:"",disabled:!1,supportServerRender:!0},ZI.Dragger=NI;y(".dialog .ant-modal-content{display:flex;flex-direction:column;height:100%}.dialog .ant-modal-body{flex:auto;overflow:auto}.dialog.ant-modal>.react-draggable{height:100%}");let JI=1;class QI extends d.default.Component{static show(t){let e,r=document.body,a=document.createElement("div"),o=t&&t.onOk,i=t&&t.onCancel;return a.id="dialog-"+JI++,a.style.cssText="position:absolute;top:0;left:0;",r.appendChild(a),(t=t||{}).visible=!0,t.getContainer=!1,t.destroyOnClose=!0,t.onOk=()=>{o&&o(),r.removeChild(a)},t.onCancel=()=>{i&&i(),r.removeChild(a)},f.default.render(n.jsx(QI,Object.assign({},t,{ref:t=>e=t}),void 0),a),e}static confirm(t,e,n){return QI.show({title:t,children:e,onOk:n})}draggleRef;constructor(t){super(t),this.state={disabled:!0,bounds:{left:0,top:0,bottom:0,right:0}}}onStart(t,e){const{clientWidth:n,clientHeight:r}=window.document.documentElement,a=this.draggleRef?.current?.getBoundingClientRect();this.setState({bounds:{left:-a?.left+e?.x,right:n-(a?.right-e?.x),top:-a?.top+e?.y,bottom:r-(a?.bottom-e?.y)}})}render(){let t=this.props,e=this.state;return n.jsx(LE,Object.assign({className:"dialog",maskClosable:!1},t,{title:n.jsx("div",Object.assign({style:{cursor:"move"},onMouseOver:()=>{this.setState({disabled:!1})},onMouseOut:()=>{this.setState({disabled:!0})},onFocus:()=>{},onBlur:()=>{}},{children:t.title}),void 0),modalRender:t=>n.jsx(h.default,Object.assign({disabled:e.disabled,bounds:e.bounds,onStart:(t,e)=>this.onStart(t,e)},{children:n.jsx("div",Object.assign({ref:this.draggleRef},{children:t}),void 0)}),void 0)},{children:t.children}),void 0)}close(t){let e=this.props;t?e.onOk&&e.onOk():e.onCancel&&e.onCancel()}}y(".anchorBL,.BMap_cpyCtrl{display:none}.gaoDe-container{position:relative}.gaoDe-container .input-item-prepend{position:absolute;top:12px;left:12px;z-index:99;width:320px}.gaoDe-container .input-item-prepend .ant-input-group-wrapper{position:relative}.gaoDe-container .input-item-prepend .ant-input-group-wrapper .ant-input-affix-wrapper{padding-top:0;padding-bottom:0;border-radius:0}.gaoDe-container .input-item-prepend .ant-input-group-wrapper .ant-input-affix-wrapper .ant-input{height:30px}");var tD=t.forwardRef(((e,r)=>{const a=t.useRef(null),o=t.useRef(null),l=t.useRef(null),c=t.useMemo((()=>i.v4()),[]),s=t.useMemo((()=>i.v4()),[]),u=t=>{let e=0,n=0;const r=new BMap.Convertor,a=[];a.push(t.point),"baidu"===t.target&&(e=3,n=5),"google"===t.target&&(e=5,n=3),r.translate(a,e,n,(e=>{0===e.status&&t.callback&&t.callback(e.points[0])}))},d=t=>{a.current.addOverlay(new BMap.Marker(t,{icon:new BMap.Icon("https://webapi.amap.com/theme/v1.3/markers/n/mark_b.png",new BMap.Size(20,32))}))},p=t.useCallback(((t,e)=>{if(a.current){const n=new BMap.Point(t[0],t[1]);d(n),a.current.centerAndZoom(n,e||18)}else o.current={location:t,zoom:e}}),[]),f=t.useCallback((t=>{console.log("转换为google坐标前:",t.location);const n=new BMap.Point(t.location.lng,t.location.lat);u({target:"google",point:n,callback:n=>{t.location.lng=n.lng,t.location.lat=n.lat,console.log("转换为google坐标后:",t.location),e.onChange&&e.onChange(t)}})}),[e]),m=t.useCallback((t=>{a.current.clearOverlays();const e=new BMap.LocalSearch(a.current,{onSearchComplete:()=>{let t=e.getResults().getPoi(0);if(t){const e=t.point;p([e.lng,e.lat]),f({...t,location:{lng:e.lng,lat:e.lat}})}}});e.search(t)}),[p,f]);return t.useEffect((()=>{const t=()=>{a.current=new BMap.Map(c,{enableMapClick:!1}),a.current.enableScrollWheelZoom(!0);new BMap.Autocomplete({input:s,location:a.current}).addEventListener("onconfirm",(t=>{const{province:e,city:n,district:r,street:a,business:o}=t.item.value;m(e+n+r+a+o)})),a.current.addEventListener("click",(t=>{a.current.clearOverlays(),d(new BMap.Point(t.point.lng,t.point.lat)),f({location:{lng:t.point.lng,lat:t.point.lat}})})),l.current&&l.current(),o.current?p(o.current.location,o.current.zoom):p([116.404,39.915])};if(document.getElementById("lbs"))t();else{window.onMapInit=function(){t()};let e="https://api.map.baidu.com/api?v=3.0&ak=1IzhwXLOwlEnencZUoSnMkSkMVADfT3s&callback=onMapInit",n=document.createElement("script");n.src=e,n.id="lbs",document.head.appendChild(n)}}),[c]),t.useImperativeHandle(r,(()=>({setMapCenter:(t,e)=>{console.log("转换为百度坐标前:",{lng:t[0],lat:t[1]});const n=()=>{const n=new BMap.Point(t[0],t[1]);u({target:"baidu",point:n,callback:t=>{console.log("转换为百度坐标后:",{lng:t.lng,lat:t.lat}),p([t.lng,t.lat],e)}})};try{n()}catch(t){l.current=n}}}))),n.jsxs("div",Object.assign({className:`gaoDe-container ${e.className}`},{children:[n.jsx("div",{id:c,style:e.style?e.style:{width:"100%",height:365}},void 0),n.jsx("div",Object.assign({className:"input-item-prepend"},{children:n.jsx("span",Object.assign({className:"ant-input-group-wrapper"},{children:n.jsxs("span",Object.assign({className:"ant-input-wrapper ant-input-group"},{children:[n.jsx("span",Object.assign({className:"ant-input-group-addon"},{children:"关键字"}),void 0),n.jsx("span",Object.assign({className:"ant-input-affix-wrapper"},{children:n.jsx("input",{id:s,className:"ant-input",type:"text",placeholder:"请输入关键字"},void 0)}),void 0)]}),void 0)}),void 0)}),void 0)]}),void 0)}));y("");var eD=t.forwardRef((function(e,r){const[a,o]=t.useState([]);return t.useImperativeHandle(r,(()=>({setFileList:t=>{o(t)}}))),n.jsx(ZI,Object.assign({onChange:t=>{const{response:r}=t.file;let a=r&&parseInt(r.code);Oi.destroy(),console.log("上传的文件对象:",t),("string"==typeof r||"object"==typeof r&&500===r.status)&&(a=-1),"removed"===t.file.status||-1!==a&&400!==a&&500!==a||(t.file.status="error",Oi.warn({content:n.jsx("span",{dangerouslySetInnerHTML:{__html:r.message||"上传失败"}},void 0),duration:1.5})),"done"===t.file.status&&Oi.success("上传成功",1.5),o(t.fileList),"done"===t.file.status&&e.uploadSuccess&&e.uploadSuccess(t.fileList.filter((t=>"done"===t.status)))},fileList:a,onRemove:t=>{o((n=>(n&&(n=n.filter((e=>e.uid!==t.uid)),e.uploadSuccess&&e.uploadSuccess(n.filter((t=>"done"===t.status)))),n)))},onPreview:async t=>{let e=t.url;e||(e=await new Promise((e=>{const n=new FileReader;n.readAsDataURL(t.originFileObj),n.onload=()=>e(n.result)})));const n=new Image;n.src=e;const r=window.open(e);r&&r.document.write(n.outerHTML)}},e,{beforeUpload:(t,n)=>!e.beforeUpload||(e.beforeUpload(t,n)||ZI.LIST_IGNORE)},{children:e.children}),void 0)}));y(".tree-wrap .tree-search{margin-bottom:10px}.tree-wrap .tree-handle-box{display:flex;align-items:center;margin-right:5px;visibility:hidden}.tree-wrap .ant-tree-node-content-wrapper.ant-tree-node-selected .tree-handle-box,.tree-wrap .ant-tree-node-content-wrapper:hover .tree-handle-box{visibility:visible}");const{Search:nD}=fx;var rD=t.forwardRef(((e,r)=>{const[a,o]=C.useSetState({loading:!1,searchOpen:!1,searchValue:"",treeList:[],draggableOpen:!1,processOpen:!1,checkedOpen:!1,firstLevelCollection:[],expandedKeys:[],autoExpandParent:!1,selectNode:[],selectCurrent:[],checkedNode:[],checkedCurrent:[]}),i=t.useCallback((t=>{const e=[],n=t=>{for(let r=0;r<t.length;r++){const a=t[r];e.push(t[r]),a.children&&n(a.children)}};n(t),o({firstLevelCollection:e})}),[o]),l=t.useCallback(((t,n)=>{p.default.isArray(t)&&(o({selectNode:t}),e.onSelect&&e.onSelect(t,n))}),[e,o]),c=t.useCallback((t=>{o({autoExpandParent:!1,expandedKeys:t})}),[o]),s=t.useCallback(((t,e)=>{let n;for(let r=0;r<e.length;r++){const a=e[r];a.children&&(a.children.some((e=>e.key===t))?n=a.key:s(t,a.children)&&(n=s(t,a.children)))}return n}),[]),u=t.useCallback((t=>{const{value:e}=t.target,n=a.firstLevelCollection.map((t=>t.title.indexOf(e)>-1?s(t.key,a.treeList):null)).filter(((t,e,n)=>t&&n.indexOf(t)===e));o({searchValue:e,expandedKeys:n,autoExpandParent:!0})}),[s,o,a.firstLevelCollection,a.treeList]),d=t.useCallback((t=>{o({checkedNode:t.checked||t})}),[o]),f=t.useCallback((t=>t.map((t=>{const r=t.title,o=r.indexOf(a.searchValue),i=r.substr(0,o),l=r.substr(o+a.searchValue.length),c=e.processOpen&&!t.processOpen&&!t.disabled?n.jsx(Dy,Object.assign({className:"tree-handle-box"},{children:e.customAction&&e.customAction(t)}),void 0):null,s=o>-1?n.jsxs(jy,Object.assign({justify:"space-between",align:"middle"},{children:[n.jsxs(Dy,{children:[i,n.jsx("span",Object.assign({className:"text-error"},{children:a.searchValue}),void 0),l]},void 0),c]}),void 0):n.jsxs(jy,Object.assign({justify:"space-between",align:"middle"},{children:[n.jsx(Dy,{children:t.title},void 0),c]}),void 0);return t.children?{...t,title:s,children:f(t.children)}:{...t,title:s}}))),[e,a.searchValue]);return t.useEffect((()=>{o({checkedCurrent:(t=>{let e=[];const n=t=>{for(let r of t)a.checkedNode.some((t=>t===r.key))&&e.push(r),r.children&&n(r.children)};return n(t),e})(a.treeList)})}),[o,a.checkedNode,a.treeList]),t.useEffect((()=>{o({selectCurrent:(t=>{let e=[];const n=t=>{for(let r of t)a.selectNode.some((t=>t===r.key))&&e.push(r),r.children&&n(r.children)};return n(t),e})(a.treeList)})}),[o,a.selectNode,a.treeList]),t.useEffect((()=>{p.default.isArray(e.data)&&(o({treeList:e.data}),i(e.data))}),[i,e.data,o]),t.useEffect((()=>{let t={};e.searchOpen&&(t.searchOpen=e.searchOpen),e.draggableOpen&&(t.draggableOpen=e.draggableOpen),e.processOpen&&(t.processOpen=e.processOpen),e.checkedOpen&&(t.checkedOpen=e.checkedOpen),Object.keys(t).length&&o(t)}),[e.checkedOpen,e.draggableOpen,e.processOpen,e.searchOpen,o]),t.useImperativeHandle(r,(()=>({setLoading:t=>{o({loading:t})},getSelectNode:()=>a.selectNode,getSelectCurrent:()=>a.selectCurrent,getCheckedNode:()=>a.checkedNode,getCheckedCurrent:()=>a.checkedCurrent,setSelectNode:t=>{o({selectNode:t})},setCheckedNode:t=>{o({checkedNode:t})}}))),n.jsx("div",Object.assign({className:"tree-wrap"},{children:n.jsxs(_C,Object.assign({spinning:a.loading},{children:[a.searchOpen?n.jsx(nD,{className:"tree-search",placeholder:"输入名称搜索",onChange:u},void 0):null,a.treeList.length?n.jsx(xj,Object.assign({blockNode:!0,height:500,showLine:{showLeafIcon:!1},checkable:a.checkedOpen,treeData:f(a.treeList),expandedKeys:a.expandedKeys,selectedKeys:a.selectNode,checkedKeys:a.checkedNode,autoExpandParent:a.autoExpandParent,onSelect:l,onExpand:c,onCheck:d,draggable:a.draggableOpen,onDrop:t=>{const n=t.node.key,r=t.dragNode.key,i=t.node.pos.split("-"),l=t.dropPosition-Number(i[i.length-1]),c=(t,e,n)=>{for(let r=0;r<t.length;r++){if(t[r].key===e)return n(t[r],r,t);t[r].children&&c(t[r].children,e,n)}};if(e.onVerificationDropCallBack&&e.onVerificationDropCallBack(t,a.treeList))return;if(t.dragNode.noDrag)return void Oi.warn("此节点不支持修改",1.5);const s=[...a.treeList];let u={title:"",key:""};if(c(s,r,((t,e,n)=>{n.splice(e,1),u=t})),t.dropToGap)if((t.node.children||[]).length>0&&t.node.expanded&&1===l)c(s,n,(t=>{t.children=t.children||[],t.children.unshift(u)}));else{let t=[],e=0;c(s,n,((n,r,a)=>{t=a,e=r})),-1===l?t.splice(e,0,u):t.splice(e+1,0,u)}else c(s,n,(t=>{t.children=t.children||[],t.children.push(u)}));e.onDropCallBack&&e.onDropCallBack(t,s),o({treeList:s})},onDragEnter:t=>{o({expandedKeys:t.expandedKeys})}},e.treeConfig),void 0):n.jsx(br,{},void 0)]}),void 0)}),void 0)}));const aD=t=>Object.prototype.toString.call(t.data)===`[object ${t.type}]`,oD=(t,e)=>{for(let n of t){let t=n.value;if("number"==typeof e&&(t=parseInt(n.value)),t===e)return n.label}return e};var iD={placeholder:"请选择时间",rangePlaceholder:["开始时间","结束时间"]},lD={lang:E({placeholder:"请选择日期",yearPlaceholder:"请选择年份",quarterPlaceholder:"请选择季度",monthPlaceholder:"请选择月份",weekPlaceholder:"请选择周",rangePlaceholder:["开始日期","结束日期"],rangeYearPlaceholder:["开始年份","结束年份"],rangeMonthPlaceholder:["开始月份","结束月份"],rangeWeekPlaceholder:["开始周","结束周"]},{locale:"zh_CN",today:"今天",now:"此刻",backToToday:"返回今天",ok:"确定",timeSelect:"选择时间",dateSelect:"选择日期",weekSelect:"选择周",clear:"清除",month:"月",year:"年",previousMonth:"上个月 (翻页上键)",nextMonth:"下个月 (翻页下键)",monthSelect:"选择月份",yearSelect:"选择年份",decadeSelect:"选择年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH时mm分ss秒",previousYear:"上一年 (Control键加左方向键)",nextYear:"下一年 (Control键加右方向键)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世纪",nextCentury:"下一世纪"}),timePickerLocale:E({},iD)};lD.lang.ok="确 定";var cD="${label}不是一个有效的${type}",sD={locale:"zh-cn",Pagination:aE,DatePicker:lD,TimePicker:iD,Calendar:lD,global:{placeholder:"请选择"},Table:{filterTitle:"筛选",filterConfirm:"确定",filterReset:"重置",filterEmptyText:"无筛选项",selectAll:"全选当页",selectInvert:"反选当页",selectNone:"清空所有",selectionAll:"全选所有",sortTitle:"排序",expand:"展开行",collapse:"关闭行",triggerDesc:"点击降序",triggerAsc:"点击升序",cancelSort:"取消排序"},Modal:{okText:"确定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{cancelText:"取消",okText:"确定"},Transfer:{searchPlaceholder:"请输入搜索内容",itemUnit:"项",itemsUnit:"项",remove:"删除",selectCurrent:"全选当页",removeCurrent:"删除当页",selectAll:"全选所有",removeAll:"删除全部",selectInvert:"反选当页"},Upload:{uploading:"文件上传中",removeFile:"删除文件",uploadError:"上传错误",previewFile:"预览文件",downloadFile:"下载文件"},Empty:{description:"暂无数据"},Icon:{icon:"图标"},Text:{edit:"编辑",copy:"复制",copied:"复制成功",expand:"展开"},PageHeader:{back:"返回"},Form:{optional:"(可选)",defaultValidateMessages:{default:"字段验证错误${label}",required:"请输入${label}",enum:"${label}必须是其中一个[${enum}]",whitespace:"${label}不能为空字符",date:{format:"${label}日期格式无效",parse:"${label}不能转换为日期",invalid:"${label}是一个无效日期"},types:{string:cD,method:cD,array:cD,object:cD,number:cD,date:cD,boolean:cD,integer:cD,float:cD,regexp:cD,email:cD,url:cD,hex:cD},string:{len:"${label}须为${len}个字符",min:"${label}最少${min}个字符",max:"${label}最多${max}个字符",range:"${label}须在${min}-${max}字符之间"},number:{len:"${label}必须等于${len}",min:"${label}最小值为${min}",max:"${label}最大值为${max}",range:"${label}须在${min}-${max}之间"},array:{len:"须为${len}个${label}",min:"最少${min}个${label}",max:"最多${max}个${label}",range:"${label}数量须在${min}-${max}之间"},pattern:{mismatch:"${label}与模式不匹配${pattern}"}}},Image:{preview:"预览"}},uD={placeholder:"請選擇時間"},dD={lang:E({placeholder:"請選擇日期",yearPlaceholder:"請選擇年份",quarterPlaceholder:"請選擇季度",monthPlaceholder:"請選擇月份",weekPlaceholder:"請選擇周",rangePlaceholder:["開始日期","結束日期"],rangeYearPlaceholder:["開始年份","結束年份"],rangeMonthPlaceholder:["開始月份","結束月份"],rangeWeekPlaceholder:["開始周","結束周"]},{locale:"zh_TW",today:"今天",now:"此刻",backToToday:"返回今天",ok:"確定",timeSelect:"選擇時間",dateSelect:"選擇日期",weekSelect:"選擇周",clear:"清除",month:"月",year:"年",previousMonth:"上個月 (翻頁上鍵)",nextMonth:"下個月 (翻頁下鍵)",monthSelect:"選擇月份",yearSelect:"選擇年份",decadeSelect:"選擇年代",yearFormat:"YYYY年",dayFormat:"D日",dateFormat:"YYYY年M月D日",dateTimeFormat:"YYYY年M月D日 HH時mm分ss秒",previousYear:"上一年 (Control鍵加左方向鍵)",nextYear:"下一年 (Control鍵加右方向鍵)",previousDecade:"上一年代",nextDecade:"下一年代",previousCentury:"上一世紀",nextCentury:"下一世紀"}),timePickerLocale:E({},uD)};dD.lang.ok="確 定";var pD="${label}不是一個有效的${type}",fD={locale:"zh-hk",Pagination:{items_per_page:"條/頁",jump_to:"跳至",jump_to_confirm:"確定",page:"頁",prev_page:"上一頁",next_page:"下一頁",prev_5:"向前 5 頁",next_5:"向後 5 頁",prev_3:"向前 3 頁",next_3:"向後 3 頁",page_size:"頁碼"},DatePicker:dD,TimePicker:uD,Calendar:dD,global:{placeholder:"請選擇"},Table:{filterTitle:"篩選器",filterConfirm:"確定",filterReset:"重置",filterEmptyText:"無篩選項",selectAll:"全部選取",selectInvert:"反向選取",selectNone:"清空所有",selectionAll:"全選所有",sortTitle:"排序",expand:"展開行",collapse:"關閉行",triggerDesc:"點擊降序",triggerAsc:"點擊升序",cancelSort:"取消排序"},Modal:{okText:"確定",cancelText:"取消",justOkText:"知道了"},Popconfirm:{okText:"確定",cancelText:"取消"},Transfer:{searchPlaceholder:"搜尋資料",itemUnit:"項目",itemsUnit:"項目",remove:"刪除",selectCurrent:"全選當頁",removeCurrent:"刪除當頁",selectAll:"全選所有",removeAll:"刪除全部",selectInvert:"反選當頁"},Upload:{uploading:"正在上傳...",removeFile:"刪除檔案",uploadError:"上傳失敗",previewFile:"檔案預覽",downloadFile:"下载文件"},Empty:{description:"無此資料"},Icon:{icon:"圖標"},Text:{edit:"編輯",copy:"複製",copied:"複製成功",expand:"展開"},PageHeader:{back:"返回"},Form:{defaultValidateMessages:{default:"字段驗證錯誤${label}",required:"請輸入${label}",enum:"${label}必須是其中一個[${enum}]",whitespace:"${label}不能為空字符",date:{format:"${label}日期格式無效",parse:"${label}不能轉換為日期",invalid:"${label}是一個無效日期"},types:{string:pD,method:pD,array:pD,object:pD,number:pD,date:pD,boolean:pD,integer:pD,float:pD,regexp:pD,email:pD,url:pD,hex:pD},string:{len:"${label}須為${len}個字符",min:"${label}最少${min}個字符",max:"${label}最多${max}個字符",range:"${label}須在${min}-${max}字符之間"},number:{len:"${label}必須等於${len}",min:"${label}最小值為${min}",max:"${label}最大值為${max}",range:"${label}須在${min}-${max}之間"},array:{len:"須為${len}個${label}",min:"最少${min}個${label}",max:"最多${max}個${label}",range:"${label}數量須在${min}-${max}之間"},pattern:{mismatch:"${label}與模式不匹配${pattern}"}}},Image:{preview:"預覽"}};g.default.locale("zh-cn");const mD=e=>{const[r,a]=t.useState(sD);return t.useEffect((()=>{const t=t=>{switch(t){case"zh-CN":a(sD),g.default.locale("zh-cn");break;case"zh-HK":a(fD),g.default.locale("zh-hk");break;case"en":a(or),g.default.locale("en")}};t((t=>{if(!t)return null;t=t.toString();const e=window.localStorage.getItem(t);try{return JSON.parse(e)}catch(t){return e}})("i18nextLng")),window.addEventListener("web_pack:language",(e=>{const n=e.language;t(n)}))}),[]),n.jsx(dl,Object.assign({locale:r},{children:e.children}),void 0)};y(".generate-form.ant-form .ant-row.ant-form-item{margin-bottom:8px}.generate-form.ant-form .ant-row .ant-col.ant-form-item-label{padding-bottom:0}.generate-form.ant-form .ant-row .ant-col .ant-picker{width:100%}.generate-form.ant-form .ant-row .ant-col .form-item-divide .ant-form-item{margin-bottom:0}.generate-form.ant-form .ant-row .ant-col .form-item-divide .divide{position:absolute;top:5px;right:-5px;z-index:1;color:#ccc}.multiple-checkbox .ant-checkbox-wrapper{margin-top:5px;margin-bottom:5px;margin-left:10px}.hlyc-web-com-align-right input{padding-right:24px;text-align:right}");const{Option:hD}=Kd,{RangePicker:gD}=Fw,{RangePicker:bD}=mT;var vD,yD=t.forwardRef((function(e,r){const[a]=Fk.useForm();let{className:o,formConfig:l,rowGridConfig:c,colGirdConfig:s,render:u}=e;const d=t.useRef({}),f=t.useRef({}),[m,h]=C.useSetState({update:!1,remoteFetching:!1,remoteData:{},treeSelectData:{},treeSelectFlattenData:{},selectMultiple:{}});let b=t.useMemo((()=>e.list?[...e.list]:[]),[e.list]);const v=t.useMemo((()=>i.v4()),[]),y=t.useCallback(((t,e)=>{const n=e.remoteConfig,r=e.name;let a=d.current[r];n&&n.remoteApi&&(h((t=>(t.remoteFetching=!0,d.current[r]=[],t.remoteData[r]=[],t))),n.remoteApi(t).then((t=>{setTimeout((()=>{void 0===a&&(d.current[r]=[]),r&&h((e=>(e.remoteFetching=!1,d.current[r]=t,e.remoteData[r]=t,e)))}),100)})).catch((()=>{h((t=>(t.remoteFetching=!1,d.current[r]=[],t.remoteData[r]=[],t)))})))}),[h]),x=t.useCallback(((t,e)=>{const n=t.treeSelectConfig;n&&n.data&&n.data.api(e).then((e=>{const r=t.name;if(r){f.current[r]=[];let t=[],a=[];const o=(t,e)=>{for(let[r,i]of t.entries()){const t=n.data?.children||"children";e[r]={},e[r].title=i[n.data?.title],e[r].value=i[n.data?.value],e[r].key=e[r].value,a.push(i),Array.isArray(i[t])&&(e[r].children=[],o(i[t],e[r].children))}};o(e,t),h((e=>(e.treeSelectData[r]=t,e.treeSelectFlattenData[r]=a,e)))}}))}),[h]);return t.useEffect((()=>{if(b){let t={};for(let t of b)"RemoteSearch"===t.componentName&&t.name&&!d.current[t.name]&&t.remoteConfig&&!1!==t.remoteConfig.initLoad&&y(void 0,t),"TreeSelect"===t.componentName&&t.name&&!f.current[t.name]&&t.treeSelectConfig&&t.treeSelectConfig.data&&x(t);a.setFieldsValue(t)}}),[y,x,a,b]),t.useImperativeHandle(r,(()=>({getFormValues:t=>a.getFieldsValue(t),setFormFields:t=>{a.setFields(t)},setFormValues:t=>{a.setFieldsValue(t),setTimeout((()=>{b.forEach((t=>{"RemoteSearch"===t.componentName&&t.remoteConfig&&t.remoteConfig.reLoad&&y(void 0,t)}))}),100)},formSubmit:t=>new Promise(((e,n)=>{a.validateFields(t).then((t=>{for(let e in t)aD({data:t[e],type:"String"})&&(t[e]=t[e].replace(/(^\s*)|(\s*$)/g,""));e(t)})).catch((t=>{t.errorFields&&t.errorFields.length&&(console.warn("请输入或选择表单必填项:",t),Oi.warn("请输入或选择表单必填项",1.5)),n(new Error("false"))}))})),formReset:t=>(a.resetFields(t),a.getFieldsValue())}))),n.jsx(mD,{children:n.jsx(Fk,Object.assign({name:v,className:`generate-form ${o||""}`,form:a},l,{initialValues:{sortSeq:10,startTime:g.default(`${(new Date).getFullYear()}-01-01`),endTime:g.default("2099-12-31"),...l?l.initialValues:void 0}},{children:n.jsxs(jy,Object.assign({},c,{children:[(()=>{const e=(t,e)=>{h((n=>(t.name&&(n.selectMultiple[t.name]=e),n)))};if(!b)return;const r=t=>{const{inputMode:e,...r}=t.inputConfig||{};return n.jsx(fx,Object.assign({disabled:t.disabled,type:e||"text",maxLength:t.maxLength,placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputChange,onPressEnter:t.inputEnter},r),void 0)},o=t=>n.jsx(Kd,Object.assign({allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.selectChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0),i=t=>{const r=t.selectData||[];return n.jsx(Kd,Object.assign({mode:"multiple",allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:n=>{e(t,n.length===r.length),t.multipleChange&&t.multipleChange(n)},filterOption:(t,e)=>!!e&&e.children.toLowerCase().indexOf(t.toLowerCase())>=0,dropdownRender:r=>((t,r)=>{const o=r.selectData||[];return n.jsxs("div",Object.assign({className:"multiple-checkbox"},{children:[n.jsx(gw,Object.assign({checked:r.name?m.selectMultiple[r.name]:void 0,onChange:t=>{const n={};t.target.checked?r.name&&(n[r.name]=o.map((t=>t.value))):r.name&&(n[r.name]=[]),e(r,t.target.checked),a.setFieldsValue(n)}},{children:"全选"}),void 0),t]}),void 0)})(r,t)},t.selectConfig,{children:r.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e)))}),void 0)},l=t=>{const e=t.remoteConfig,r=e&&e.remoteMode,a=e&&e.allowClear,o=e&&e.showSearch;return n.jsx(Kd,Object.assign({mode:r||void 0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,notFoundContent:m.remoteFetching?n.jsx(_C,{size:"small"},void 0):n.jsx(br,{style:{marginTop:8,marginBottom:8},image:br.PRESENTED_IMAGE_SIMPLE},void 0),filterOption:!1,allowClear:!1!==a,showSearch:!1!==o,onFocus:()=>y(void 0,t),onSearch:!1===o?void 0:p.default.debounce((e=>y(e,t)),300),onChange:t.remoteSearchChange},t.selectConfig,{children:t.name&&m.remoteData[t.name]?m.remoteData[t.name].map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0)},c=t=>n.jsx(Fw,Object.assign({disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.datePickerChange},t.datePickerConfig),void 0),u=t=>n.jsx(mT,Object.assign({disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.timePickerChange},t.timePickerConfig),void 0),d=t=>{const e=t.regionSelectionConfig;return n.jsx(lw,{disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,options:e&&e.loadData||[],loadData:e=>(async(t,e)=>{if(e){const n=e[e.length-1];let r=[];if(!t.regionSelectionConfig?.selectLoad)return;n.loading=!0,r=await(t.regionSelectionConfig?.selectLoad(n.id)),n.loading=!1,r.length?n.children=r:n.isLeaf=!0,h({update:!m.update})}})(t,e),changeOnSelect:!0,onChange:t.cascaderChange},void 0)},f=t=>"Input"===t.componentName?r(t):"Select"===t.componentName?o(t):"DatePicker"===t.componentName?c(t):"TimePicker"===t.componentName?u(t):"RemoteSearch"===t.componentName?l(t):null;return b.map(((e,h)=>{let g=null;switch(e.componentName){case"Input":g=r(e);break;case"InputNumber":g=(t=>{const{alignRight:e,...r}=t.inputNumberConfig||{};return n.jsx(zC,Object.assign({disabled:t.disabled,style:{width:"100%"},placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputNumberChange,className:e?"hlyc-web-com-align-right":""},r),void 0)})(e);break;case"HideInput":g=(t=>n.jsx(fx,{style:{display:"none"},maxLength:t.maxLength,disabled:t.disabled,type:"text",placeholder:t.placeholder||`请输入${t.label}`,onChange:t.inputChange,onPressEnter:t.inputEnter},void 0))(e);break;case"TextArea":g=(t=>n.jsx(fx.TextArea,{rows:t.rows,disabled:t.disabled,maxLength:t.maxLength,placeholder:t.placeholder||`请输入${t.label}`,onChange:t.textAreaChange},void 0))(e);break;case"AutoComplete":g=(t=>n.jsx(Kd,Object.assign({allowClear:!0,showSearch:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,optionFilterProp:"children",filterOption:(t,e)=>!!e&&e.children.toLowerCase().indexOf(t.toLowerCase())>=0,onChange:t.autoCompleteChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0))(e);break;case"InputAutoComplete":g=(t=>n.jsx(qd,Object.assign({filterOption:(t,e)=>-1!==e.value.toUpperCase().indexOf(t.toUpperCase()),disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.inputAutoCompleteChange},t.inputAutoCompleteConfig),void 0))(e);break;case"Select":g=o(e);break;case"Multiple":g=i(e);break;case"MultipleTag":g=(t=>n.jsx(Kd,Object.assign({mode:"tags",allowClear:!0,disabled:t.disabled,placeholder:t.placeholder||`请选择${t.label}`,onChange:t.multipleChange},t.selectConfig,{children:t.selectData?t.selectData.map(((t,e)=>n.jsx(hD,Object.assign({value:t.value},{children:t.label}),e))):null}),void 0))(e);break;case"RemoteSearch":g=l(e);break;case"DatePicker":g=c(e);break;case"RangePicker":g=(t=>n.jsx(gD,Object.assign({disabled:t.disabled,placeholder:t.rangePickerPlaceholder,onChange:t.rangePickerChange},t.rangePickerConfig),void 0))(e);break;case"TimeRangePicker":g=(t=>n.jsx(bD,Object.assign({disabled:t.disabled,placeholder:t.timeRangePickerPlaceholder,onChange:t.timeRangePickerChange},t.timeRangePickerConfig),void 0))(e);break;case"TimePicker":g=u(e);break;case"Switch":g=(t=>n.jsx(HO,{defaultChecked:!1,checkedChildren:"ON",unCheckedChildren:"OFF",disabled:t.disabled,onChange:t.switchChange},void 0))(e);break;case"Radio":g=(t=>n.jsx(ob.Group,Object.assign({onChange:t.radioChange},{children:t.selectData?t.selectData.map(((e,r)=>n.jsx(ob,Object.assign({disabled:t.disabled,value:e.value},{children:e.label}),r))):null}),void 0))(e);break;case"Checkbox":g=(t=>n.jsx(gw.Group,Object.assign({onChange:t.checkboxChange},{children:t.selectData?t.selectData.map(((e,r)=>n.jsx(gw,Object.assign({disabled:t.disabled,value:e.value},{children:e.label}),r))):null}),void 0))(e);break;case"TreeSelect":g=((t,e)=>{const r=t.name;return n.jsx(sT,Object.assign({disabled:t.disabled,style:{width:"100%"},dropdownStyle:{maxHeight:400,overflow:"auto"},treeData:m.treeSelectData[r],placeholder:t.placeholder||`请选择${t.label}`,onChange:n=>{if(t.treeSelectConfig&&t.treeSelectConfig.data){const o=t.treeSelectConfig.data,i=o.onChange,l=m.treeSelectFlattenData[r],c=Object.prototype.toString.call(n);let s=[],u={...t};if("[object String]"===c&&(s=l.filter((t=>t[o.value]===n))),"[object Array]"===c&&Array.isArray(n))for(let t=l.length;t--;)n.some((e=>e===l[t][o.value]))&&s.push(l[t]);if(i){const n=i(s,{...t});n&&(u=n),u&&(b[e]=u)}a.setFieldsValue({[u.name]:n}),x(u)}},allowClear:!0,treeDefaultExpandAll:!0},t.treeSelectConfig?.extra),void 0)})(e,h);break;case"Union":let t,s=0;e.unionConfig&&(s=e.unionConfig.unionItems.length,t=100/s+"%"),g=n.jsx(jy,Object.assign({className:"form-item-divide",gutter:16},{children:e.unionConfig?.unionItems.map(((r,a)=>n.jsxs(Dy,Object.assign({style:{width:t}},{children:[n.jsx(Fk.Item,Object.assign({name:r.name,rules:r.rules,noStyle:!0},{children:f(r)}),void 0),a<s-1?n.jsx("span",Object.assign({className:"divide"},{children:e.unionConfig&&(e.unionConfig.divide?e.unionConfig.divide:"~")}),void 0):null]}),a)))}),void 0);break;case"RegionSelection":g=d(e);break;case"Rate":g=(t=>n.jsx(PO,Object.assign({disabled:t.disabled,onChange:t.rateChange},t.rateConfig),void 0))(e);break;default:return null}let v,y={...e};return y.label=(t=>{let e=t.label;return"Union"===t.componentName&&t.rules&&(e=n.jsxs("span",{children:[n.jsx("i",Object.assign({style:{marginRight:4,color:"#ff4d4f",fontStyle:"normal",fontFamily:"SimSun, sans-serif"}},{children:"*"}),void 0),t.label]},void 0)),e})(y),y=p.default.omit(y,["colProps","componentName","selectData","inputConfig","inputNumberConfig","datePickerConfig","rangePickerConfig","timeRangePickerConfig","timePickerConfig","inputAutoCompleteConfig","unionConfig","remoteConfig","selectConfig","regionSelectionConfig","treeSelectConfig","rows","render","rangePickerPlaceholder","timeRangePickerPlaceholder","visible","selectIsHideAll","rateConfig","inputChange","inputNumberChange","inputAutoCompleteChange","inputEnter","textAreaChange","autoCompleteChange","selectChange","multipleChange","remoteSearchChange","datePickerChange","rangePickerChange","timeRangePickerChange","timePickerChange","switchChange","radioChange","checkboxChange","cascaderChange","rateChange"]),"Union"===e.componentName&&(y=p.default.omit(y,["name"])),v=e.colProps?e.colProps:s,t.createElement(Dy,{...v,key:h,style:{display:!1===e.visible?"none":"block"}},n.jsx(Fk.Item,Object.assign({className:"HideInput"===e.componentName?"hide-item":void 0},y,{children:g}),void 0),e.render&&e.render())}))})(),u?n.jsx(Dy,{children:n.jsx(Fk.Item,{children:u&&u()},void 0)},void 0):null]}),void 0)}),void 0)},void 0)})),xD=_(F((function(t,e){function n(t){return"object"!=typeof t||"toString"in t?t:Object.prototype.toString.call(t).slice(8,-1)}Object.defineProperty(e,"__esModule",{value:!0});var r="object"==typeof process&&"production"===process.env.NODE_ENV;function a(t,e){if(!t){if(r)throw new Error("Invariant failed");throw new Error(e())}}e.invariant=a;var o=Object.prototype.hasOwnProperty,i=Array.prototype.splice,l=Object.prototype.toString;function c(t){return l.call(t).slice(8,-1)}var s=Object.assign||function(t,e){return u(e).forEach((function(n){o.call(e,n)&&(t[n]=e[n])})),t},u="function"==typeof Object.getOwnPropertySymbols?function(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}:function(t){return Object.keys(t)};function d(t){return Array.isArray(t)?s(t.constructor(t.length),t):"Map"===c(t)?new Map(t):"Set"===c(t)?new Set(t):t&&"object"==typeof t?s(Object.create(Object.getPrototypeOf(t)),t):t}var p=function(){function t(){this.commands=s({},f),this.update=this.update.bind(this),this.update.extend=this.extend=this.extend.bind(this),this.update.isEquals=function(t,e){return t===e},this.update.newContext=function(){return(new t).update}}return Object.defineProperty(t.prototype,"isEquals",{get:function(){return this.update.isEquals},set:function(t){this.update.isEquals=t},enumerable:!0,configurable:!0}),t.prototype.extend=function(t,e){this.commands[t]=e},t.prototype.update=function(t,e){var n=this,r="function"==typeof e?{$apply:e}:e;Array.isArray(t)&&Array.isArray(r)||a(!Array.isArray(r),(function(){return"update(): You provided an invalid spec to update(). The spec may not contain an array except as the value of $set, $push, $unshift, $splice or any custom command allowing an array value."})),a("object"==typeof r&&null!==r,(function(){return"update(): You provided an invalid spec to update(). The spec and every included key path must be plain objects containing one of the following commands: "+Object.keys(n.commands).join(", ")+"."}));var i=t;return u(r).forEach((function(e){if(o.call(n.commands,e)){var a=t===i;i=n.commands[e](r[e],i,r,t),a&&n.isEquals(i,t)&&(i=t)}else{var l="Map"===c(t)?n.update(t.get(e),r[e]):n.update(t[e],r[e]),s="Map"===c(i)?i.get(e):i[e];n.isEquals(l,s)&&(void 0!==l||o.call(t,e))||(i===t&&(i=d(t)),"Map"===c(i)?i.set(e,l):i[e]=l)}})),i},t}();e.Context=p;var f={$push:function(t,e,n){return h(e,n,"$push"),t.length?e.concat(t):e},$unshift:function(t,e,n){return h(e,n,"$unshift"),t.length?t.concat(e):e},$splice:function(t,e,r,o){return function(t,e){a(Array.isArray(t),(function(){return"Expected $splice target to be an array; got "+n(t)})),b(e.$splice)}(e,r),t.forEach((function(t){b(t),e===o&&t.length&&(e=d(o)),i.apply(e,t)})),e},$set:function(t,e,n){return function(t){a(1===Object.keys(t).length,(function(){return"Cannot have more than one key in an object with $set"}))}(n),t},$toggle:function(t,e){g(t,"$toggle");var n=t.length?d(e):e;return t.forEach((function(t){n[t]=!e[t]})),n},$unset:function(t,e,n,r){return g(t,"$unset"),t.forEach((function(t){Object.hasOwnProperty.call(e,t)&&(e===r&&(e=d(r)),delete e[t])})),e},$add:function(t,e,n,r){return v(e,"$add"),g(t,"$add"),"Map"===c(e)?t.forEach((function(t){var n=t[0],a=t[1];e===r&&e.get(n)!==a&&(e=d(r)),e.set(n,a)})):t.forEach((function(t){e!==r||e.has(t)||(e=d(r)),e.add(t)})),e},$remove:function(t,e,n,r){return v(e,"$remove"),g(t,"$remove"),t.forEach((function(t){e===r&&e.has(t)&&(e=d(r)),e.delete(t)})),e},$merge:function(t,e,r,o){var i,l;return i=e,a((l=t)&&"object"==typeof l,(function(){return"update(): $merge expects a spec of type 'object'; got "+n(l)})),a(i&&"object"==typeof i,(function(){return"update(): $merge expects a target of type 'object'; got "+n(i)})),u(t).forEach((function(n){t[n]!==e[n]&&(e===o&&(e=d(o)),e[n]=t[n])})),e},$apply:function(t,e){var r;return a("function"==typeof(r=t),(function(){return"update(): expected spec of $apply to be a function; got "+n(r)+"."})),t(e)}},m=new p;function h(t,e,r){a(Array.isArray(t),(function(){return"update(): expected target of "+n(r)+" to be an array; got "+n(t)+"."})),g(e[r],r)}function g(t,e){a(Array.isArray(t),(function(){return"update(): expected spec of "+n(e)+" to be an array; got "+n(t)+". Did you forget to wrap your parameter in an array?"}))}function b(t){a(Array.isArray(t),(function(){return"update(): expected spec of $splice to be an array of arrays; got "+n(t)+". Did you forget to wrap your parameters in an array?"}))}function v(t,e){var r=c(t);a("Map"===r||"Set"===r,(function(){return"update(): "+n(e)+" expects a target of type Set or Map; got "+n(r)}))}e.isEquals=m.update.isEquals,e.extend=m.extend,e.default=m.update,e.default.default=t.exports=s(e.default,e)}))),wD=function(t,e){e.style&&t.props.style&&(e.style=ED(ED({},t.props.style),e.style));e.className&&t.props.className&&(e.className=t.props.className+" "+e.className);return kD.default.cloneElement(t,e)},kD=(vD=d.default)&&vD.__esModule?vD:{default:vD};function CD(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function ED(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?CD(Object(n),!0).forEach((function(e){OD(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):CD(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function OD(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var SD=Object.defineProperty({cloneElement:wD},"__esModule",{value:!0}),ND="function"==typeof Symbol&&Symbol.for,PD=ND?Symbol.for("react.element"):60103,jD=ND?Symbol.for("react.portal"):60106,TD=ND?Symbol.for("react.fragment"):60107,ID=ND?Symbol.for("react.strict_mode"):60108,DD=ND?Symbol.for("react.profiler"):60114,RD=ND?Symbol.for("react.provider"):60109,MD=ND?Symbol.for("react.context"):60110,zD=ND?Symbol.for("react.async_mode"):60111,AD=ND?Symbol.for("react.concurrent_mode"):60111,LD=ND?Symbol.for("react.forward_ref"):60112,_D=ND?Symbol.for("react.suspense"):60113,FD=ND?Symbol.for("react.suspense_list"):60120,VD=ND?Symbol.for("react.memo"):60115,KD=ND?Symbol.for("react.lazy"):60116,HD=ND?Symbol.for("react.block"):60121,BD=ND?Symbol.for("react.fundamental"):60117,UD=ND?Symbol.for("react.responder"):60118,WD=ND?Symbol.for("react.scope"):60119;
|
|
36
36
|
/** @license React v16.13.1
|
|
37
37
|
* react-is.production.min.js
|
|
38
38
|
*
|