lu-lowcode-package-form 0.7.14 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +2 -2
- package/dist/index.es.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +3 -1
- package/postcss.config.js +7 -5
- package/src/App.jsx +2 -2
- package/src/components/field/base.jsx +4 -4
- package/src/components/form-container/index.jsx +1 -1
- package/src/components/form-container/layout/form-group-title.jsx +1 -1
- package/tailwind.config.js +1 -0
- package/vite.config.js +1 -0
package/dist/index.cjs.js
CHANGED
|
@@ -262,7 +262,7 @@ html body {
|
|
|
262
262
|
&-hidden.${o}-row`]:{display:"none"},"&-has-warning":{[`${t}-split`]:{color:e.colorError}},"&-has-error":{[`${t}-split`]:{color:e.colorWarning}},[`${t}-label`]:{flexGrow:0,overflow:"hidden",whiteSpace:"nowrap",textAlign:"end",verticalAlign:"middle","&-left":{textAlign:"start"},"&-wrap":{overflow:"unset",lineHeight:e.lineHeight,whiteSpace:"unset"},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:u,color:s,fontSize:c,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required:not(${t}-required-mark-optional)::before`]:{display:"inline-block",marginInlineEnd:e.marginXXS,color:l,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"',[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`${r}-hide-required-mark &`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:f,marginInlineEnd:h},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${o}-col-'"]):not([class*="' ${o}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%"}}},[t]:{"&-explain, &-extra":{clear:"both",color:e.colorTextDescription,fontSize:e.fontSize,lineHeight:e.lineHeight},"&-explain-connected":{width:"100%"},"&-extra":{minHeight:e.controlHeightSM,transition:`color ${e.motionDurationMid} ${e.motionEaseOut}`},"&-explain":{"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning}}},[`&-with-help ${t}-explain`]:{height:"auto",opacity:1},[`${t}-feedback-icon`]:{fontSize:e.fontSize,textAlign:"center",visibility:"visible",animationName:If,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},_A=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-horizontal`]:{[`${n}-label`]:{flexGrow:0},[`${n}-control`]:{flex:"1 1 0",minWidth:0},[`${n}-label[class$='-24'], ${n}-label[class*='-24 ']`]:{[`& + ${n}-control`]:{minWidth:"unset"}}}}},RA=e=>{const{componentCls:t,formItemCls:n}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[n]:{flex:"none",marginInlineEnd:e.margin,marginBottom:0,"&-row":{flexWrap:"nowrap"},[`> ${n}-label,
|
|
263
263
|
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},sa=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),IA=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:sa(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},NA=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${t}-vertical`]:{[n]:{"&-row":{flexDirection:"column"},"&-label > label":{height:"auto"},[`${t}-item-control`]:{width:"100%"}}},[`${t}-vertical ${n}-label,
|
|
264
264
|
.${r}-col-24${n}-label,
|
|
265
|
-
.${r}-col-xl-24${n}-label`]:sa(e),[`@media (max-width: ${Ye(e.screenXSMax)})`]:[IA(e),{[t]:{[`.${r}-col-xs-24${n}-label`]:sa(e)}}],[`@media (max-width: ${Ye(e.screenSMMax)})`]:{[t]:{[`.${r}-col-sm-24${n}-label`]:sa(e)}},[`@media (max-width: ${Ye(e.screenMDMax)})`]:{[t]:{[`.${r}-col-md-24${n}-label`]:sa(e)}},[`@media (max-width: ${Ye(e.screenLGMax)})`]:{[t]:{[`.${r}-col-lg-24${n}-label`]:sa(e)}}}},PA=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0}),Ly=(e,t)=>bn(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),qf=Hr("Form",(e,t)=>{let{rootPrefixCls:n}=t;const r=Ly(e,n);return[OA(r),$A(r),wA(r),_A(r),RA(r),NA(r),_b(r),If]},PA,{order:-1e3}),om=[];function ed(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}const Vy=e=>{let{help:t,helpStatus:n,errors:r=om,warnings:o=om,className:l,fieldId:s,onVisibleChanged:c}=e;const{prefixCls:u}=v.useContext(_f),f=`${u}-item-explain`,h=Br(u),[g,p,y]=qf(u,h),x=j.useMemo(()=>Md(u),[u]),S=Qs(r),m=Qs(o),C=v.useMemo(()=>t!=null?[ed(t,"help",n)]:[].concat(Me(S.map((E,O)=>ed(E,"error","error",O))),Me(m.map((E,O)=>ed(E,"warning","warning",O)))),[t,n,S,m]),w={};return s&&(w.id=`${s}_help`),g(v.createElement(Ti,{motionDeadline:x.motionDeadline,motionName:`${u}-show-help`,visible:!!C.length,onVisibleChanged:c},E=>{const{className:O,style:R}=E;return v.createElement("div",Object.assign({},w,{className:Ee(f,O,y,h,l,p),style:R,role:"alert"}),v.createElement(xI,Object.assign({keys:C},Md(u),{motionName:`${u}-show-help-item`,component:!1}),$=>{const{key:I,error:N,errorStatus:P,className:A,style:B}=$;return v.createElement("div",{key:I,className:Ee(A,{[`${f}-${P}`]:P}),style:B},N)}))}))},TA=["parentNode"],MA="form_item";function al(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function zy(e,t){if(!e.length)return;const n=e.join("_");return t?`${t}_${n}`:TA.includes(n)?`${MA}_${n}`:n}function jy(e,t,n,r,o,l){let s=r;return l!==void 0?s=l:n.validating?s="validating":e.length?s="error":t.length?s="warning":(n.touched||o&&n.validated)&&(s="success"),s}function im(e){return al(e).join("_")}function By(e){const[t]=$f(),n=v.useRef({}),r=v.useMemo(()=>e??Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:o=>l=>{const s=im(o);l?n.current[s]=l:delete n.current[s]}},scrollToField:function(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=al(o),c=zy(s,r.__INTERNAL__.name),u=c?document.getElementById(c):null;u&&oN(u,Object.assign({scrollMode:"if-needed",block:"nearest"},l))},getFieldInstance:o=>{const l=im(o);return n.current[l]}}),[e,t]);return[r]}const Ts={};function DA(e){let{name:t}=e;const n=Ln("Form");j.useEffect(()=>{if(t)return Ts[t]=(Ts[t]||0)+1,process.env.NODE_ENV!=="production"&&n(Ts[t]<=1,"usage","There exist multiple Form with same `name`."),()=>{Ts[t]-=1}},[t])}var AA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const FA=(e,t)=>{const n=v.useContext(eo),{getPrefixCls:r,direction:o,form:l}=v.useContext(Gt),{prefixCls:s,className:c,rootClassName:u,size:f,disabled:h=n,form:g,colon:p,labelAlign:y,labelWrap:x,labelCol:S,wrapperCol:m,hideRequiredMark:C,layout:w="horizontal",scrollToFirstError:E,requiredMark:O,onFinishFailed:R,name:$,style:I,feedbackIcons:N,variant:P}=e,A=AA(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),B=ni(f),U=v.useContext(f0);process.env.NODE_ENV!=="production"&&DA(e);const k=j.useMemo(()=>O!==void 0?O:C?!1:l&&l.requiredMark!==void 0?l.requiredMark:!0,[C,O,l]),L=p??(l==null?void 0:l.colon),H=r("form",s),V=Br(H),[D,F,Y]=qf(H,V),q=Ee(H,`${H}-${w}`,{[`${H}-hide-required-mark`]:k===!1,[`${H}-rtl`]:o==="rtl",[`${H}-${B}`]:B},Y,V,F,l==null?void 0:l.className,c,u),[X]=By(g),{__INTERNAL__:ne}=X;ne.name=$;const re=j.useMemo(()=>({name:$,labelAlign:y,labelCol:S,labelWrap:x,wrapperCol:m,vertical:w==="vertical",colon:L,requiredMark:k,itemRef:ne.itemRef,form:X,feedbackIcons:N}),[$,y,S,m,w,L,k,X,N]);v.useImperativeHandle(t,()=>X);const ve=(ge,de)=>{if(ge){let ye={block:"nearest"};typeof ge=="object"&&(ye=ge),X.scrollToField(de,ye)}},oe=ge=>{if(R==null||R(ge),ge.errorFields.length){const de=ge.errorFields[0].name;if(E!==void 0){ve(E,de);return}l&&l.scrollToFirstError!==void 0&&ve(l.scrollToFirstError,de)}};return D(v.createElement(xb.Provider,{value:P},v.createElement(O0,{disabled:h},v.createElement(_i.Provider,{value:B},v.createElement(Cb,{validateMessages:U},v.createElement(Do.Provider,{value:re},v.createElement(Oa,Object.assign({id:$},A,{name:$,onFinishFailed:oe,form:X,style:Object.assign(Object.assign({},l==null?void 0:l.style),I),className:q}))))))))},Hy=v.forwardRef(FA);process.env.NODE_ENV!=="production"&&(Hy.displayName="Form");function LA(e){if(typeof e=="function")return e;const t=so(e);return t.length<=1?t[0]:t}const ky=()=>{const{status:e,errors:t=[],warnings:n=[]}=j.useContext(ar);if(process.env.NODE_ENV!=="production"){const r=Ln("Form.Item");process.env.NODE_ENV!=="production"&&r(e!==void 0,"usage","Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus")}return{status:e,errors:t,warnings:n}};ky.Context=ar;function VA(e){const[t,n]=v.useState(e),r=j.useRef(null),o=j.useRef([]),l=j.useRef(!1);v.useEffect(()=>(l.current=!1,()=>{l.current=!0,fn.cancel(r.current),r.current=null}),[]);function s(c){l.current||(r.current===null&&(o.current=[],r.current=fn(()=>{r.current=null,n(u=>{let f=u;return o.current.forEach(h=>{f=h(f)}),f})})),o.current.push(c))}return[t,s]}function zA(){const{itemRef:e}=v.useContext(Do),t=v.useRef({});function n(r,o){const l=o&&typeof o=="object"&&o.ref,s=r.join("_");return(t.current.name!==s||t.current.originRef!==l)&&(t.current.name=s,t.current.originRef=l,t.current.ref=co(e(r),l)),t.current.ref}return n}const jA=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},BA=F0(["Form","item-item"],(e,t)=>{let{rootPrefixCls:n}=t;const r=Ly(e,n);return[jA(r)]}),HA=e=>{const{prefixCls:t,status:n,wrapperCol:r,children:o,errors:l,warnings:s,_internalItemRender:c,extra:u,help:f,fieldId:h,marginBottom:g,onErrorVisibleChanged:p}=e,y=`${t}-item`,x=v.useContext(Do),S=r||x.wrapperCol||{},m=Ee(`${y}-control`,S.className),C=v.useMemo(()=>Object.assign({},x),[x]);delete C.labelCol,delete C.wrapperCol;const w=v.createElement("div",{className:`${y}-control-input`},v.createElement("div",{className:`${y}-control-input-content`},o)),E=v.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=g!==null||l.length||s.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(_f.Provider,{value:E},v.createElement(Vy,{fieldId:h,errors:l,warnings:s,help:f,helpStatus:n,className:`${y}-explain-connected`,onVisibleChanged:p})),!!g&&v.createElement("div",{style:{width:0,height:g}})):null,R={};h&&(R.id=`${h}_extra`);const $=u?v.createElement("div",Object.assign({},R,{className:`${y}-extra`}),u):null,I=c&&c.mark==="pro_table_render"&&c.render?c.render(e,{input:w,errorList:O,extra:$}):v.createElement(v.Fragment,null,w,O,$);return v.createElement(Do.Provider,{value:C},v.createElement(ya,Object.assign({},S,{className:m}),I),v.createElement(BA,{prefixCls:t}))};var kA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},WA=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:kA}))},Wy=v.forwardRef(WA);process.env.NODE_ENV!=="production"&&(Wy.displayName="QuestionCircleOutlined");var KA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function UA(e){return e?typeof e=="object"&&!v.isValidElement(e)?e:{title:e}:null}const qA=e=>{let{prefixCls:t,label:n,htmlFor:r,labelCol:o,labelAlign:l,colon:s,required:c,requiredMark:u,tooltip:f}=e;var h;const[g]=h0("Form"),{vertical:p,labelAlign:y,labelCol:x,labelWrap:S,colon:m}=v.useContext(Do);if(!n)return null;const C=o||x||{},w=l||y,E=`${t}-item-label`,O=Ee(E,w==="left"&&`${E}-left`,C.className,{[`${E}-wrap`]:!!S});let R=n;const $=s===!0||m!==!1&&s!==!1;$&&!p&&typeof n=="string"&&n.trim()!==""&&(R=n.replace(/[:|:]\s*$/,""));const N=UA(f);if(N){const{icon:U=v.createElement(Wy,null)}=N,k=KA(N,["icon"]),L=v.createElement(jf,Object.assign({},k),v.cloneElement(U,{className:`${t}-item-tooltip`,title:"",onClick:H=>{H.preventDefault()},tabIndex:null}));R=v.createElement(v.Fragment,null,R,L)}const P=u==="optional",A=typeof u=="function";A?R=u(R,{required:!!c}):P&&!c&&(R=v.createElement(v.Fragment,null,R,v.createElement("span",{className:`${t}-item-optional`,title:""},(g==null?void 0:g.optional)||((h=Oi.Form)===null||h===void 0?void 0:h.optional))));const B=Ee({[`${t}-item-required`]:c,[`${t}-item-required-mark-optional`]:P||A,[`${t}-item-no-colon`]:!$});return v.createElement(ya,Object.assign({},C,{className:O}),v.createElement("label",{htmlFor:r,className:B,title:typeof n=="string"?n:""},R))},GA={success:J0,warning:tb,error:xl,validating:wl};function Ky(e){let{children:t,errors:n,warnings:r,hasFeedback:o,validateStatus:l,prefixCls:s,meta:c,noStyle:u}=e;const f=`${s}-item`,{feedbackIcons:h}=v.useContext(Do),g=jy(n,r,c,null,!!o,l),{isFormItemInput:p,status:y,hasFeedback:x,feedbackIcon:S}=v.useContext(ar),m=v.useMemo(()=>{var C;let w;if(o){const O=o!==!0&&o.icons||h,R=g&&((C=O==null?void 0:O({status:g,errors:n,warnings:r}))===null||C===void 0?void 0:C[g]),$=g&&GA[g];w=R!==!1&&$?v.createElement("span",{className:Ee(`${f}-feedback-icon`,`${f}-feedback-icon-${g}`)},R||v.createElement($,null)):null}const E={status:g||"",errors:n,warnings:r,hasFeedback:!!o,feedbackIcon:w,isFormItemInput:!0};return u&&(E.status=(g??y)||"",E.isFormItemInput=p,E.hasFeedback=!!(o??x),E.feedbackIcon=o!==void 0?E.feedbackIcon:S),E},[g,o,u,p,y]);return v.createElement(ar.Provider,{value:m},t)}var XA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function YA(e){const{prefixCls:t,className:n,rootClassName:r,style:o,help:l,errors:s,warnings:c,validateStatus:u,meta:f,hasFeedback:h,hidden:g,children:p,fieldId:y,required:x,isRequired:S,onSubItemMetaChange:m}=e,C=XA(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),w=`${t}-item`,{requiredMark:E}=v.useContext(Do),O=v.useRef(null),R=Qs(s),$=Qs(c),I=l!=null,N=!!(I||s.length||c.length),P=!!O.current&&yf(O.current),[A,B]=v.useState(null);rn(()=>{if(N&&O.current){const V=getComputedStyle(O.current);B(parseInt(V.marginBottom,10))}},[N,P]);const U=V=>{V||B(null)},L=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const D=V?R:f.errors,F=V?$:f.warnings;return jy(D,F,f,"",!!h,u)}(),H=Ee(w,n,r,{[`${w}-with-help`]:I||R.length||$.length,[`${w}-has-feedback`]:L&&h,[`${w}-has-success`]:L==="success",[`${w}-has-warning`]:L==="warning",[`${w}-has-error`]:L==="error",[`${w}-is-validating`]:L==="validating",[`${w}-hidden`]:g});return v.createElement("div",{className:H,style:o,ref:O},v.createElement(pc,Object.assign({className:`${w}-row`},uo(C,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),v.createElement(qA,Object.assign({htmlFor:y},e,{requiredMark:E,required:x??S,prefixCls:t})),v.createElement(HA,Object.assign({},e,f,{errors:R,warnings:$,prefixCls:t,status:L,help:l,marginBottom:A,onErrorVisibleChanged:U}),v.createElement(Sb.Provider,{value:m},v.createElement(Ky,{prefixCls:t,meta:f,errors:f.errors,warnings:f.warnings,hasFeedback:h,validateStatus:L},p)))),!!A&&v.createElement("div",{className:`${w}-margin-offset`,style:{marginBottom:-A}}))}const ZA="__SPLIT__";function QA(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>{const l=e[o],s=t[o];return l===s||typeof l=="function"||typeof s=="function"})}const JA=v.memo(e=>{let{children:t}=e;return t},(e,t)=>QA(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function am(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function eF(e){const{name:t,noStyle:n,className:r,dependencies:o,prefixCls:l,shouldUpdate:s,rules:c,children:u,required:f,label:h,messageVariables:g,trigger:p="onChange",validateTrigger:y,hidden:x,help:S}=e,{getPrefixCls:m}=v.useContext(Gt),{name:C}=v.useContext(Do),w=LA(u),E=typeof w=="function",O=v.useContext(Sb),{validateTrigger:R}=v.useContext(Ii),$=y!==void 0?y:R,I=t!=null,N=m("form",l),P=Br(N),[A,B,U]=qf(N,P),k=Ln("Form.Item");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&k(t!==null,"usage","`null` is passed as `name` property");const L=v.useContext(hl),H=v.useRef(),[V,D]=VA({}),[F,Y]=xi(()=>am()),q=de=>{const ye=L==null?void 0:L.getKey(de.name);if(Y(de.destroy?am():de,!0),n&&S!==!1&&O){let pe=de.name;if(de.destroy)pe=H.current||pe;else if(ye!==void 0){const[ce,te]=ye;pe=[ce].concat(Me(te)),H.current=pe}O(de,pe)}},X=(de,ye)=>{D(pe=>{const ce=Object.assign({},pe),me=[].concat(Me(de.name.slice(0,-1)),Me(ye)).join(ZA);return de.destroy?delete ce[me]:ce[me]=de,ce})},[ne,re]=v.useMemo(()=>{const de=Me(F.errors),ye=Me(F.warnings);return Object.values(V).forEach(pe=>{de.push.apply(de,Me(pe.errors||[])),ye.push.apply(ye,Me(pe.warnings||[]))}),[de,ye]},[V,F.errors,F.warnings]),ve=zA();function oe(de,ye,pe){return n&&!x?v.createElement(Ky,{prefixCls:N,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:F,errors:ne,warnings:re,noStyle:!0},de):v.createElement(YA,Object.assign({key:"row"},e,{className:Ee(r,U,P,B),prefixCls:N,fieldId:ye,isRequired:pe,errors:ne,warnings:re,meta:F,onSubItemMetaChange:X}),de)}if(!I&&!E&&!o)return A(oe(w));let ge={};return typeof h=="string"?ge.label=h:t&&(ge.label=String(t)),g&&(ge=Object.assign(Object.assign({},ge),g)),A(v.createElement(Of,Object.assign({},e,{messageVariables:ge,trigger:p,validateTrigger:$,onMetaChange:q}),(de,ye,pe)=>{const ce=al(t).length&&ye?ye.name:[],te=zy(ce,C),me=f!==void 0?f:!!(c&&c.some(ae=>{if(ae&&typeof ae=="object"&&ae.required&&!ae.warningOnly)return!0;if(typeof ae=="function"){const Pe=ae(pe);return Pe&&Pe.required&&!Pe.warningOnly}return!1})),Ne=Object.assign({},de);let Z=null;if(process.env.NODE_ENV!=="production"&&k(!(s&&o),"usage","`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."),Array.isArray(w)&&I)process.env.NODE_ENV!=="production"&&k(!1,"usage","A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."),Z=w;else if(E&&(!(s||o)||I))process.env.NODE_ENV!=="production"&&k(!!(s||o),"usage","A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."),process.env.NODE_ENV!=="production"&&k(!I,"usage","A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");else if(o&&!E&&!I)process.env.NODE_ENV!=="production"&&k(!1,"usage","Must set `name` or use a render function when `dependencies` is set.");else if(ma(w)){process.env.NODE_ENV!=="production"&&k(w.props.defaultValue===void 0,"usage","`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");const ae=Object.assign(Object.assign({},w.props),Ne);if(ae.id||(ae.id=te),S||ne.length>0||re.length>0||e.extra){const je=[];(S||ne.length>0)&&je.push(`${te}_help`),e.extra&&je.push(`${te}_extra`),ae["aria-describedby"]=je.join(" ")}ne.length>0&&(ae["aria-invalid"]="true"),me&&(ae["aria-required"]="true"),Ca(w)&&(ae.ref=ve(ce,w)),new Set([].concat(Me(al(p)),Me(al($)))).forEach(je=>{ae[je]=function(){for(var fe,se,be,ke,$e,Je=arguments.length,Ge=new Array(Je),He=0;He<Je;He++)Ge[He]=arguments[He];(be=Ne[je])===null||be===void 0||(fe=be).call.apply(fe,[Ne].concat(Ge)),($e=(ke=w.props)[je])===null||$e===void 0||(se=$e).call.apply(se,[ke].concat(Ge))}});const Te=[ae["aria-required"],ae["aria-invalid"],ae["aria-describedby"]];Z=v.createElement(JA,{control:Ne,update:w,childProps:Te},ei(w,ae))}else E&&(s||o)&&!I?Z=w(pe):(process.env.NODE_ENV!=="production"&&k(!ce.length,"usage","`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."),Z=w);return oe(Z,te,me)}))}const Uy=eF;Uy.useStatus=ky;var tF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const nF=e=>{var{prefixCls:t,children:n}=e,r=tF(e,["prefixCls","children"]);if(process.env.NODE_ENV!=="production"){const c=Ln("Form.List");process.env.NODE_ENV!=="production"&&c(typeof r.name=="number"||(Array.isArray(r.name)?!!r.name.length:!!r.name),"usage","Miss `name` prop.")}const{getPrefixCls:o}=v.useContext(Gt),l=o("form",t),s=v.useMemo(()=>({prefixCls:l,status:"error"}),[l]);return v.createElement(pb,Object.assign({},r),(c,u,f)=>v.createElement(_f.Provider,{value:s},n(c.map(h=>Object.assign(Object.assign({},h),{fieldKey:h.key})),u,{errors:f.errors,warnings:f.warnings})))};function rF(){const{form:e}=j.useContext(Do);return e}const Vr=Hy;Vr.Item=Uy;Vr.List=nF;Vr.ErrorList=Vy;Vr.useForm=By;Vr.useFormInstance=rF;Vr.useWatch=yb;Vr.Provider=Cb;Vr.create=()=>{process.env.NODE_ENV!=="production"&&Pi(!1,"Form","antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.")};var Gf=v.createContext(null),oF=function(t){for(var n=t.prefixCls,r=t.level,o=t.isStart,l=t.isEnd,s="".concat(n,"-indent-unit"),c=[],u=0;u<r;u+=1)c.push(v.createElement("span",{key:u,className:Ee(s,z(z({},"".concat(s,"-start"),o[u]),"".concat(s,"-end"),l[u]))}));return v.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},c)};const iF=v.memo(oF);var aF=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],lm="open",sm="close",lF="---",sF=function(e){ti(n,e);var t=xa(n);function n(){var r;Gn(this,n);for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return r=t.call.apply(t,[this].concat(l)),z(we(r),"state",{dragNodeHighlight:!1}),z(we(r),"selectHandle",void 0),z(we(r),"cacheIndent",void 0),z(we(r),"onSelectorClick",function(c){var u=r.props.context.onNodeClick;u(c,Pn(r.props)),r.isSelectable()?r.onSelect(c):r.onCheck(c)}),z(we(r),"onSelectorDoubleClick",function(c){var u=r.props.context.onNodeDoubleClick;u(c,Pn(r.props))}),z(we(r),"onSelect",function(c){if(!r.isDisabled()){var u=r.props.context.onNodeSelect;u(c,Pn(r.props))}}),z(we(r),"onCheck",function(c){if(!r.isDisabled()){var u=r.props,f=u.disableCheckbox,h=u.checked,g=r.props.context.onNodeCheck;if(!(!r.isCheckable()||f)){var p=!h;g(c,Pn(r.props),p)}}}),z(we(r),"onMouseEnter",function(c){var u=r.props.context.onNodeMouseEnter;u(c,Pn(r.props))}),z(we(r),"onMouseLeave",function(c){var u=r.props.context.onNodeMouseLeave;u(c,Pn(r.props))}),z(we(r),"onContextMenu",function(c){var u=r.props.context.onNodeContextMenu;u(c,Pn(r.props))}),z(we(r),"onDragStart",function(c){var u=r.props.context.onNodeDragStart;c.stopPropagation(),r.setState({dragNodeHighlight:!0}),u(c,we(r));try{c.dataTransfer.setData("text/plain","")}catch{}}),z(we(r),"onDragEnter",function(c){var u=r.props.context.onNodeDragEnter;c.preventDefault(),c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragOver",function(c){var u=r.props.context.onNodeDragOver;c.preventDefault(),c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragLeave",function(c){var u=r.props.context.onNodeDragLeave;c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragEnd",function(c){var u=r.props.context.onNodeDragEnd;c.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(c,we(r))}),z(we(r),"onDrop",function(c){var u=r.props.context.onNodeDrop;c.preventDefault(),c.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(c,we(r))}),z(we(r),"onExpand",function(c){var u=r.props,f=u.loading,h=u.context.onNodeExpand;f||h(c,Pn(r.props))}),z(we(r),"setSelectHandle",function(c){r.selectHandle=c}),z(we(r),"getNodeState",function(){var c=r.props.expanded;return r.isLeaf()?null:c?lm:sm}),z(we(r),"hasChildren",function(){var c=r.props.eventKey,u=r.props.context.keyEntities,f=hr(u,c)||{},h=f.children;return!!(h||[]).length}),z(we(r),"isLeaf",function(){var c=r.props,u=c.isLeaf,f=c.loaded,h=r.props.context.loadData,g=r.hasChildren();return u===!1?!1:u||!h&&!g||h&&f&&!g}),z(we(r),"isDisabled",function(){var c=r.props.disabled,u=r.props.context.disabled;return!!(u||c)}),z(we(r),"isCheckable",function(){var c=r.props.checkable,u=r.props.context.checkable;return!u||c===!1?!1:u}),z(we(r),"syncLoadData",function(c){var u=c.expanded,f=c.loading,h=c.loaded,g=r.props.context,p=g.loadData,y=g.onNodeLoad;f||p&&u&&!r.isLeaf()&&!h&&y(Pn(r.props))}),z(we(r),"isDraggable",function(){var c=r.props,u=c.data,f=c.context.draggable;return!!(f&&(!f.nodeDraggable||f.nodeDraggable(u)))}),z(we(r),"renderDragHandler",function(){var c=r.props.context,u=c.draggable,f=c.prefixCls;return u!=null&&u.icon?v.createElement("span",{className:"".concat(f,"-draggable-icon")},u.icon):null}),z(we(r),"renderSwitcherIconDom",function(c){var u=r.props.switcherIcon,f=r.props.context.switcherIcon,h=u||f;return typeof h=="function"?h(Q(Q({},r.props),{},{isLeaf:c})):h}),z(we(r),"renderSwitcher",function(){var c=r.props.expanded,u=r.props.context.prefixCls;if(r.isLeaf()){var f=r.renderSwitcherIconDom(!0);return f!==!1?v.createElement("span",{className:Ee("".concat(u,"-switcher"),"".concat(u,"-switcher-noop"))},f):null}var h=Ee("".concat(u,"-switcher"),"".concat(u,"-switcher_").concat(c?lm:sm)),g=r.renderSwitcherIconDom(!1);return g!==!1?v.createElement("span",{onClick:r.onExpand,className:h},g):null}),z(we(r),"renderCheckbox",function(){var c=r.props,u=c.checked,f=c.halfChecked,h=c.disableCheckbox,g=r.props.context.prefixCls,p=r.isDisabled(),y=r.isCheckable();if(!y)return null;var x=typeof y!="boolean"?y:null;return v.createElement("span",{className:Ee("".concat(g,"-checkbox"),u&&"".concat(g,"-checkbox-checked"),!u&&f&&"".concat(g,"-checkbox-indeterminate"),(p||h)&&"".concat(g,"-checkbox-disabled")),onClick:r.onCheck},x)}),z(we(r),"renderIcon",function(){var c=r.props.loading,u=r.props.context.prefixCls;return v.createElement("span",{className:Ee("".concat(u,"-iconEle"),"".concat(u,"-icon__").concat(r.getNodeState()||"docu"),c&&"".concat(u,"-icon_loading"))})}),z(we(r),"renderSelector",function(){var c=r.state.dragNodeHighlight,u=r.props,f=u.title,h=f===void 0?lF:f,g=u.selected,p=u.icon,y=u.loading,x=u.data,S=r.props.context,m=S.prefixCls,C=S.showIcon,w=S.icon,E=S.loadData,O=S.titleRender,R=r.isDisabled(),$="".concat(m,"-node-content-wrapper"),I;if(C){var N=p||w;I=N?v.createElement("span",{className:Ee("".concat(m,"-iconEle"),"".concat(m,"-icon__customize"))},typeof N=="function"?N(r.props):N):r.renderIcon()}else E&&y&&(I=r.renderIcon());var P;typeof h=="function"?P=h(x):O?P=O(x):P=h;var A=v.createElement("span",{className:"".concat(m,"-title")},P);return v.createElement("span",{ref:r.setSelectHandle,title:typeof h=="string"?h:"",className:Ee("".concat($),"".concat($,"-").concat(r.getNodeState()||"normal"),!R&&(g||c)&&"".concat(m,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick},I,A,r.renderDropIndicator())}),z(we(r),"renderDropIndicator",function(){var c=r.props,u=c.disabled,f=c.eventKey,h=r.props.context,g=h.draggable,p=h.dropLevelOffset,y=h.dropPosition,x=h.prefixCls,S=h.indent,m=h.dropIndicatorRender,C=h.dragOverNodeKey,w=h.direction,E=!!g,O=!u&&E&&C===f,R=S??r.cacheIndent;return r.cacheIndent=S,O?m({dropPosition:y,dropLevelOffset:p,indent:R,prefixCls:x,direction:w}):null}),r}return Xn(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var o=this.props.selectable,l=this.props.context.selectable;return typeof o=="boolean"?o:l}},{key:"render",value:function(){var o,l=this.props,s=l.eventKey,c=l.className,u=l.style,f=l.dragOver,h=l.dragOverGapTop,g=l.dragOverGapBottom,p=l.isLeaf,y=l.isStart,x=l.isEnd,S=l.expanded,m=l.selected,C=l.checked,w=l.halfChecked,E=l.loading,O=l.domRef,R=l.active;l.data;var $=l.onMouseMove,I=l.selectable,N=Kt(l,aF),P=this.props.context,A=P.prefixCls,B=P.filterTreeNode,U=P.keyEntities,k=P.dropContainerKey,L=P.dropTargetKey,H=P.draggingNodeKey,V=this.isDisabled(),D=Ri(N,{aria:!0,data:!0}),F=hr(U,s)||{},Y=F.level,q=x[x.length-1],X=this.isDraggable(),ne=!V&&X,re=H===s,ve=I!==void 0?{"aria-selected":!!I}:void 0;return v.createElement("div",it({ref:O,className:Ee(c,"".concat(A,"-treenode"),(o={},z(z(z(z(z(z(z(z(z(z(o,"".concat(A,"-treenode-disabled"),V),"".concat(A,"-treenode-switcher-").concat(S?"open":"close"),!p),"".concat(A,"-treenode-checkbox-checked"),C),"".concat(A,"-treenode-checkbox-indeterminate"),w),"".concat(A,"-treenode-selected"),m),"".concat(A,"-treenode-loading"),E),"".concat(A,"-treenode-active"),R),"".concat(A,"-treenode-leaf-last"),q),"".concat(A,"-treenode-draggable"),X),"dragging",re),z(z(z(z(z(z(o,"drop-target",L===s),"drop-container",k===s),"drag-over",!V&&f),"drag-over-gap-top",!V&&h),"drag-over-gap-bottom",!V&&g),"filter-node",B&&B(Pn(this.props))))),style:u,draggable:ne,"aria-grabbed":re,onDragStart:ne?this.onDragStart:void 0,onDragEnter:X?this.onDragEnter:void 0,onDragOver:X?this.onDragOver:void 0,onDragLeave:X?this.onDragLeave:void 0,onDrop:X?this.onDrop:void 0,onDragEnd:X?this.onDragEnd:void 0,onMouseMove:$},ve,D),v.createElement(iF,{prefixCls:A,level:Y,isStart:y,isEnd:x}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(v.Component),Sa=function(t){return v.createElement(Gf.Consumer,null,function(n){return v.createElement(sF,it({},t,{context:n}))})};Sa.displayName="TreeNode";Sa.isTreeNode=1;function _o(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Go(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function Xf(e){return e.split("-")}function cF(e,t){var n=[],r=hr(t,e);function o(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(s){var c=s.key,u=s.children;n.push(c),o(u)})}return o(r.children),n}function uF(e){if(e.parent){var t=Xf(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function dF(e){var t=Xf(e.pos);return Number(t[t.length-1])===0}function cm(e,t,n,r,o,l,s,c,u,f){var h,g=e.clientX,p=e.clientY,y=e.target.getBoundingClientRect(),x=y.top,S=y.height,m=(f==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-g),C=(m-12)/r,w=u.filter(function(V){var D;return(D=c[V])===null||D===void 0||(D=D.children)===null||D===void 0?void 0:D.length}),E=hr(c,n.props.eventKey);if(p<x+S/2){var O=s.findIndex(function(V){return V.key===E.key}),R=O<=0?0:O-1,$=s[R].key;E=hr(c,$)}var I=E.key,N=E,P=E.key,A=0,B=0;if(!w.includes(I))for(var U=0;U<C&&uF(E);U+=1)E=E.parent,B+=1;var k=t.props.data,L=E.node,H=!0;return dF(E)&&E.level===0&&p<x+S/2&&l({dragNode:k,dropNode:L,dropPosition:-1})&&E.key===n.props.eventKey?A=-1:(N.children||[]).length&&w.includes(P)?l({dragNode:k,dropNode:L,dropPosition:0})?A=0:H=!1:B===0?C>-1.5?l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1:l({dragNode:k,dropNode:L,dropPosition:0})?A=0:l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1:l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1,{dropPosition:A,dropLevelOffset:B,dropTargetKey:E.key,dropTargetPos:E.pos,dragOverNodeKey:P,dropContainerKey:A===0?null:((h=E.parent)===null||h===void 0?void 0:h.key)||null,dropAllowed:H}}function um(e,t){if(e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function td(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(xt(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ut(!1,"`checkedKeys` is not an array or an object"),null;return t}function Zd(e,t){var n=new Set;function r(o){if(!n.has(o)){var l=hr(t,o);if(l){n.add(o);var s=l.parent,c=l.node;c.disabled||s&&r(s.key)}}}return(e||[]).forEach(function(o){r(o)}),Me(n)}function fF(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r;break}return v.createElement("div",{style:o})}function qy(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function vF(e,t){var n=v.useState(!1),r=le(n,2),o=r[0],l=r[1];rn(function(){if(o)return e(),function(){t()}},[o]),rn(function(){return l(!0),function(){l(!1)}},[])}var hF=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Gy=function(t,n){var r=t.className,o=t.style,l=t.motion,s=t.motionNodes,c=t.motionType,u=t.onMotionStart,f=t.onMotionEnd,h=t.active,g=t.treeNodeRequiredProps,p=Kt(t,hF),y=v.useState(!0),x=le(y,2),S=x[0],m=x[1],C=v.useContext(Gf),w=C.prefixCls,E=s&&c!=="hide";rn(function(){s&&E!==S&&m(E)},[s]);var O=function(){s&&u()},R=v.useRef(!1),$=function(){s&&!R.current&&(R.current=!0,f())};vF(O,$);var I=function(P){E===P&&$()};return s?v.createElement(Ti,it({ref:n,visible:S},l,{motionAppear:c==="show",onVisibleChanged:I}),function(N,P){var A=N.className,B=N.style;return v.createElement("div",{ref:P,className:Ee("".concat(w,"-treenode-motion"),A),style:B},s.map(function(U){var k=Object.assign({},(qy(U.data),U.data)),L=U.title,H=U.key,V=U.isStart,D=U.isEnd;delete k.children;var F=il(H,g);return v.createElement(Sa,it({},k,F,{title:L,active:h,data:U.data,key:H,isStart:V,isEnd:D}))}))}):v.createElement(Sa,it({domRef:n,className:r,style:o},p,{active:h}))};Gy.displayName="MotionTreeNode";var gF=v.forwardRef(Gy);function pF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function o(l,s){var c=new Map;l.forEach(function(f){c.set(f,!0)});var u=s.filter(function(f){return!c.has(f)});return u.length===1?u[0]:null}return n<r?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function dm(e,t,n){var r=e.findIndex(function(c){return c.key===n}),o=e[r+1],l=t.findIndex(function(c){return c.key===n});if(o){var s=t.findIndex(function(c){return c.key===o.key});return t.slice(l+1,s)}return t.slice(l+1)}var mF=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],fm={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},bF=function(){},Ni="RC_TREE_MOTION_".concat(Math.random()),Qd={key:Ni},Xy={key:Ni,level:0,index:0,pos:"0",node:Qd,nodes:[Qd]},vm={parent:null,children:[],pos:Xy.pos,data:Qd,title:null,key:Ni,isStart:[],isEnd:[]};function hm(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function gm(e){var t=e.key,n=e.pos;return Nl(t,n)}function yF(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var Yy=v.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var o=e.expandedKeys,l=e.selectedKeys,s=e.checkedKeys,c=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,h=e.keyEntities,g=e.disabled,p=e.dragging,y=e.dragOverNodeKey,x=e.dropPosition,S=e.motion,m=e.height,C=e.itemHeight,w=e.virtual,E=e.focusable,O=e.activeItem,R=e.focused,$=e.tabIndex,I=e.onKeyDown,N=e.onFocus,P=e.onBlur,A=e.onActiveChange,B=e.onListChangeStart,U=e.onListChangeEnd,k=Kt(e,mF),L=v.useRef(null),H=v.useRef(null);v.useImperativeHandle(t,function(){return{scrollTo:function(be){L.current.scrollTo(be)},getIndentWidth:function(){return H.current.offsetWidth}}});var V=v.useState(o),D=le(V,2),F=D[0],Y=D[1],q=v.useState(r),X=le(q,2),ne=X[0],re=X[1],ve=v.useState(r),oe=le(ve,2),ge=oe[0],de=oe[1],ye=v.useState([]),pe=le(ye,2),ce=pe[0],te=pe[1],me=v.useState(null),Ne=le(me,2),Z=Ne[0],ae=Ne[1],Pe=v.useRef(r);Pe.current=r;function Te(){var se=Pe.current;re(se),de(se),te([]),ae(null),U()}rn(function(){Y(o);var se=pF(F,o);if(se.key!==null)if(se.add){var be=ne.findIndex(function(De){var et=De.key;return et===se.key}),ke=hm(dm(ne,r,se.key),w,m,C),$e=ne.slice();$e.splice(be+1,0,vm),de($e),te(ke),ae("show")}else{var Je=r.findIndex(function(De){var et=De.key;return et===se.key}),Ge=hm(dm(r,ne,se.key),w,m,C),He=r.slice();He.splice(Je+1,0,vm),de(He),te(Ge),ae("hide")}else ne!==r&&(re(r),de(r))},[o,r]),v.useEffect(function(){p||Te()},[p]);var je=S?ge:r,fe={expandedKeys:o,selectedKeys:l,loadedKeys:c,loadingKeys:u,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:y,dropPosition:x,keyEntities:h};return v.createElement(v.Fragment,null,R&&O&&v.createElement("span",{style:fm,"aria-live":"assertive"},yF(O)),v.createElement("div",null,v.createElement("input",{style:fm,disabled:E===!1||g,tabIndex:E!==!1?$:null,onKeyDown:I,onFocus:N,onBlur:P,value:"",onChange:bF,"aria-label":"for screen reader"})),v.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},v.createElement("div",{className:"".concat(n,"-indent")},v.createElement("div",{ref:H,className:"".concat(n,"-indent-unit")}))),v.createElement(Ff,it({},k,{data:je,itemKey:gm,height:m,fullHeight:!1,virtual:w,itemHeight:C,prefixCls:"".concat(n,"-list"),ref:L,onVisibleChange:function(be,ke){var $e=new Set(be),Je=ke.filter(function(Ge){return!$e.has(Ge)});Je.some(function(Ge){return gm(Ge)===Ni})&&Te()}}),function(se){var be=se.pos,ke=Object.assign({},(qy(se.data),se.data)),$e=se.title,Je=se.key,Ge=se.isStart,He=se.isEnd,De=Nl(Je,be);delete ke.key,delete ke.children;var et=il(De,fe);return v.createElement(gF,it({},ke,et,{title:$e,active:!!O&&Je===O.key,pos:be,data:se.data,isStart:Ge,isEnd:He,motion:S,motionNodes:Je===Ni?ce:null,motionType:Z,onMotionStart:B,onMotionEnd:Te,treeNodeRequiredProps:fe,onMouseMove:function(){A(null)}}))}))});Yy.displayName="NodeList";var SF=10,mc=function(e){ti(n,e);var t=xa(n);function n(){var r;Gn(this,n);for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return r=t.call.apply(t,[this].concat(l)),z(we(r),"destroyed",!1),z(we(r),"delayedDragEnterLogic",void 0),z(we(r),"loadingRetryTimes",{}),z(we(r),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:ba()}),z(we(r),"dragStartMousePosition",null),z(we(r),"dragNode",void 0),z(we(r),"currentMouseOverDroppableNodeKey",null),z(we(r),"listRef",v.createRef()),z(we(r),"onNodeDragStart",function(c,u){var f=r.state,h=f.expandedKeys,g=f.keyEntities,p=r.props.onDragStart,y=u.props.eventKey;r.dragNode=u,r.dragStartMousePosition={x:c.clientX,y:c.clientY};var x=_o(h,y);r.setState({draggingNodeKey:y,dragChildrenKeys:cF(y,g),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(x),window.addEventListener("dragend",r.onWindowDragEnd),p==null||p({event:c,node:Pn(u.props)})}),z(we(r),"onNodeDragEnter",function(c,u){var f=r.state,h=f.expandedKeys,g=f.keyEntities,p=f.dragChildrenKeys,y=f.flattenNodes,x=f.indent,S=r.props,m=S.onDragEnter,C=S.onExpand,w=S.allowDrop,E=S.direction,O=u.props,R=O.pos,$=O.eventKey,I=we(r),N=I.dragNode;if(r.currentMouseOverDroppableNodeKey!==$&&(r.currentMouseOverDroppableNodeKey=$),!N){r.resetDragState();return}var P=cm(c,N,u,x,r.dragStartMousePosition,w,y,g,h,E),A=P.dropPosition,B=P.dropLevelOffset,U=P.dropTargetKey,k=P.dropContainerKey,L=P.dropTargetPos,H=P.dropAllowed,V=P.dragOverNodeKey;if(p.indexOf(U)!==-1||!H){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(D){clearTimeout(r.delayedDragEnterLogic[D])}),N.props.eventKey!==u.props.eventKey&&(c.persist(),r.delayedDragEnterLogic[R]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var D=Me(h),F=hr(g,u.props.eventKey);F&&(F.children||[]).length&&(D=Go(h,u.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(D),C==null||C(D,{node:Pn(u.props),expanded:!0,nativeEvent:c.nativeEvent})}},800)),N.props.eventKey===U&&B===0){r.resetDragState();return}r.setState({dragOverNodeKey:V,dropPosition:A,dropLevelOffset:B,dropTargetKey:U,dropContainerKey:k,dropTargetPos:L,dropAllowed:H}),m==null||m({event:c,node:Pn(u.props),expandedKeys:h})}),z(we(r),"onNodeDragOver",function(c,u){var f=r.state,h=f.dragChildrenKeys,g=f.flattenNodes,p=f.keyEntities,y=f.expandedKeys,x=f.indent,S=r.props,m=S.onDragOver,C=S.allowDrop,w=S.direction,E=we(r),O=E.dragNode;if(O){var R=cm(c,O,u,x,r.dragStartMousePosition,C,g,p,y,w),$=R.dropPosition,I=R.dropLevelOffset,N=R.dropTargetKey,P=R.dropContainerKey,A=R.dropAllowed,B=R.dropTargetPos,U=R.dragOverNodeKey;h.indexOf(N)!==-1||!A||(O.props.eventKey===N&&I===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():$===r.state.dropPosition&&I===r.state.dropLevelOffset&&N===r.state.dropTargetKey&&P===r.state.dropContainerKey&&B===r.state.dropTargetPos&&A===r.state.dropAllowed&&U===r.state.dragOverNodeKey||r.setState({dropPosition:$,dropLevelOffset:I,dropTargetKey:N,dropContainerKey:P,dropTargetPos:B,dropAllowed:A,dragOverNodeKey:U}),m==null||m({event:c,node:Pn(u.props)}))}}),z(we(r),"onNodeDragLeave",function(c,u){r.currentMouseOverDroppableNodeKey===u.props.eventKey&&!c.currentTarget.contains(c.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var f=r.props.onDragLeave;f==null||f({event:c,node:Pn(u.props)})}),z(we(r),"onWindowDragEnd",function(c){r.onNodeDragEnd(c,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)}),z(we(r),"onNodeDragEnd",function(c,u){var f=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),f==null||f({event:c,node:Pn(u.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)}),z(we(r),"onNodeDrop",function(c,u){var f,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,p=g.dragChildrenKeys,y=g.dropPosition,x=g.dropTargetKey,S=g.dropTargetPos,m=g.dropAllowed;if(m){var C=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),x!==null){var w=Q(Q({},il(x,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===x,data:hr(r.state.keyEntities,x).node}),E=p.indexOf(x)!==-1;ut(!E,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var O=Xf(S),R={event:c,node:Pn(w),dragNode:r.dragNode?Pn(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(p),dropToGap:y!==0,dropPosition:y+Number(O[O.length-1])};h||C==null||C(R),r.dragNode=null}}}),z(we(r),"cleanDragState",function(){var c=r.state.draggingNodeKey;c!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null}),z(we(r),"triggerExpandActionExpand",function(c,u){var f=r.state,h=f.expandedKeys,g=f.flattenNodes,p=u.expanded,y=u.key,x=u.isLeaf;if(!(x||c.shiftKey||c.metaKey||c.ctrlKey)){var S=g.filter(function(C){return C.key===y})[0],m=Pn(Q(Q({},il(y,r.getTreeNodeRequiredProps())),{},{data:S.data}));r.setExpandedKeys(p?_o(h,y):Go(h,y)),r.onNodeExpand(c,m)}}),z(we(r),"onNodeClick",function(c,u){var f=r.props,h=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(c,u),h==null||h(c,u)}),z(we(r),"onNodeDoubleClick",function(c,u){var f=r.props,h=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(c,u),h==null||h(c,u)}),z(we(r),"onNodeSelect",function(c,u){var f=r.state.selectedKeys,h=r.state,g=h.keyEntities,p=h.fieldNames,y=r.props,x=y.onSelect,S=y.multiple,m=u.selected,C=u[p.key],w=!m;w?S?f=Go(f,C):f=[C]:f=_o(f,C);var E=f.map(function(O){var R=hr(g,O);return R?R.node:null}).filter(function(O){return O});r.setUncontrolledState({selectedKeys:f}),x==null||x(f,{event:"select",selected:w,node:u,selectedNodes:E,nativeEvent:c.nativeEvent})}),z(we(r),"onNodeCheck",function(c,u,f){var h=r.state,g=h.keyEntities,p=h.checkedKeys,y=h.halfCheckedKeys,x=r.props,S=x.checkStrictly,m=x.onCheck,C=u.key,w,E={event:"check",node:u,checked:f,nativeEvent:c.nativeEvent};if(S){var O=f?Go(p,C):_o(p,C),R=_o(y,C);w={checked:O,halfChecked:R},E.checkedNodes=O.map(function(B){return hr(g,B)}).filter(function(B){return B}).map(function(B){return B.node}),r.setUncontrolledState({checkedKeys:O})}else{var $=va([].concat(Me(p),[C]),!0,g),I=$.checkedKeys,N=$.halfCheckedKeys;if(!f){var P=new Set(I);P.delete(C);var A=va(Array.from(P),{checked:!1,halfCheckedKeys:N},g);I=A.checkedKeys,N=A.halfCheckedKeys}w=I,E.checkedNodes=[],E.checkedNodesPositions=[],E.halfCheckedKeys=N,I.forEach(function(B){var U=hr(g,B);if(U){var k=U.node,L=U.pos;E.checkedNodes.push(k),E.checkedNodesPositions.push({node:k,pos:L})}}),r.setUncontrolledState({checkedKeys:I},!1,{halfCheckedKeys:N})}m==null||m(w,E)}),z(we(r),"onNodeLoad",function(c){var u,f=c.key,h=r.state.keyEntities,g=hr(h,f);if(!(g!=null&&(u=g.children)!==null&&u!==void 0&&u.length)){var p=new Promise(function(y,x){r.setState(function(S){var m=S.loadedKeys,C=m===void 0?[]:m,w=S.loadingKeys,E=w===void 0?[]:w,O=r.props,R=O.loadData,$=O.onLoad;if(!R||C.indexOf(f)!==-1||E.indexOf(f)!==-1)return null;var I=R(c);return I.then(function(){var N=r.state.loadedKeys,P=Go(N,f);$==null||$(P,{event:"load",node:c}),r.setUncontrolledState({loadedKeys:P}),r.setState(function(A){return{loadingKeys:_o(A.loadingKeys,f)}}),y()}).catch(function(N){if(r.setState(function(A){return{loadingKeys:_o(A.loadingKeys,f)}}),r.loadingRetryTimes[f]=(r.loadingRetryTimes[f]||0)+1,r.loadingRetryTimes[f]>=SF){var P=r.state.loadedKeys;ut(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Go(P,f)}),y()}x(N)}),{loadingKeys:Go(E,f)}})});return p.catch(function(){}),p}}),z(we(r),"onNodeMouseEnter",function(c,u){var f=r.props.onMouseEnter;f==null||f({event:c,node:u})}),z(we(r),"onNodeMouseLeave",function(c,u){var f=r.props.onMouseLeave;f==null||f({event:c,node:u})}),z(we(r),"onNodeContextMenu",function(c,u){var f=r.props.onRightClick;f&&(c.preventDefault(),f({event:c,node:u}))}),z(we(r),"onFocus",function(){var c=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];c==null||c.apply(void 0,f)}),z(we(r),"onBlur",function(){var c=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];c==null||c.apply(void 0,f)}),z(we(r),"getTreeNodeRequiredProps",function(){var c=r.state,u=c.expandedKeys,f=c.selectedKeys,h=c.loadedKeys,g=c.loadingKeys,p=c.checkedKeys,y=c.halfCheckedKeys,x=c.dragOverNodeKey,S=c.dropPosition,m=c.keyEntities;return{expandedKeys:u||[],selectedKeys:f||[],loadedKeys:h||[],loadingKeys:g||[],checkedKeys:p||[],halfCheckedKeys:y||[],dragOverNodeKey:x,dropPosition:S,keyEntities:m}}),z(we(r),"setExpandedKeys",function(c){var u=r.state,f=u.treeData,h=u.fieldNames,g=Xu(f,c,h);r.setUncontrolledState({expandedKeys:c,flattenNodes:g},!0)}),z(we(r),"onNodeExpand",function(c,u){var f=r.state.expandedKeys,h=r.state,g=h.listChanging,p=h.fieldNames,y=r.props,x=y.onExpand,S=y.loadData,m=u.expanded,C=u[p.key];if(!g){var w=f.indexOf(C),E=!m;if(ut(m&&w!==-1||!m&&w===-1,"Expand state not sync with index check"),E?f=Go(f,C):f=_o(f,C),r.setExpandedKeys(f),x==null||x(f,{node:u,expanded:E,nativeEvent:c.nativeEvent}),E&&S){var O=r.onNodeLoad(u);O&&O.then(function(){var R=Xu(r.state.treeData,f,p);r.setUncontrolledState({flattenNodes:R})}).catch(function(){var R=r.state.expandedKeys,$=_o(R,C);r.setExpandedKeys($)})}}}),z(we(r),"onListChangeStart",function(){r.setUncontrolledState({listChanging:!0})}),z(we(r),"onListChangeEnd",function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})}),z(we(r),"onActiveChange",function(c){var u=r.state.activeKey,f=r.props,h=f.onActiveChange,g=f.itemScrollOffset,p=g===void 0?0:g;u!==c&&(r.setState({activeKey:c}),c!==null&&r.scrollTo({key:c,offset:p}),h==null||h(c))}),z(we(r),"getActiveItem",function(){var c=r.state,u=c.activeKey,f=c.flattenNodes;return u===null?null:f.find(function(h){var g=h.key;return g===u})||null}),z(we(r),"offsetActiveKey",function(c){var u=r.state,f=u.flattenNodes,h=u.activeKey,g=f.findIndex(function(x){var S=x.key;return S===h});g===-1&&c<0&&(g=f.length),g=(g+c+f.length)%f.length;var p=f[g];if(p){var y=p.key;r.onActiveChange(y)}else r.onActiveChange(null)}),z(we(r),"onKeyDown",function(c){var u=r.state,f=u.activeKey,h=u.expandedKeys,g=u.checkedKeys,p=u.fieldNames,y=r.props,x=y.onKeyDown,S=y.checkable,m=y.selectable;switch(c.which){case _e.UP:{r.offsetActiveKey(-1),c.preventDefault();break}case _e.DOWN:{r.offsetActiveKey(1),c.preventDefault();break}}var C=r.getActiveItem();if(C&&C.data){var w=r.getTreeNodeRequiredProps(),E=C.data.isLeaf===!1||!!(C.data[p.children]||[]).length,O=Pn(Q(Q({},il(f,w)),{},{data:C.data,active:!0}));switch(c.which){case _e.LEFT:{E&&h.includes(f)?r.onNodeExpand({},O):C.parent&&r.onActiveChange(C.parent.key),c.preventDefault();break}case _e.RIGHT:{E&&!h.includes(f)?r.onNodeExpand({},O):C.children&&C.children.length&&r.onActiveChange(C.children[0].key),c.preventDefault();break}case _e.ENTER:case _e.SPACE:{S&&!O.disabled&&O.checkable!==!1&&!O.disableCheckbox?r.onNodeCheck({},O,!g.includes(f)):!S&&m&&!O.disabled&&O.selectable!==!1&&r.onNodeSelect({},O);break}}}x==null||x(c)}),z(we(r),"setUncontrolledState",function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var h=!1,g=!0,p={};Object.keys(c).forEach(function(y){if(y in r.props){g=!1;return}h=!0,p[y]=c[y]}),h&&(!u||g)&&r.setState(Q(Q({},p),f))}}),z(we(r),"scrollTo",function(c){r.listRef.current.scrollTo(c)}),r}return Xn(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,l=o.activeKey,s=o.itemScrollOffset,c=s===void 0?0:s;l!==void 0&&l!==this.state.activeKey&&(this.setState({activeKey:l}),l!==null&&this.scrollTo({key:l,offset:c}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,l=o.focused,s=o.flattenNodes,c=o.keyEntities,u=o.draggingNodeKey,f=o.activeKey,h=o.dropLevelOffset,g=o.dropContainerKey,p=o.dropTargetKey,y=o.dropPosition,x=o.dragOverNodeKey,S=o.indent,m=this.props,C=m.prefixCls,w=m.className,E=m.style,O=m.showLine,R=m.focusable,$=m.tabIndex,I=$===void 0?0:$,N=m.selectable,P=m.showIcon,A=m.icon,B=m.switcherIcon,U=m.draggable,k=m.checkable,L=m.checkStrictly,H=m.disabled,V=m.motion,D=m.loadData,F=m.filterTreeNode,Y=m.height,q=m.itemHeight,X=m.virtual,ne=m.titleRender,re=m.dropIndicatorRender,ve=m.onContextMenu,oe=m.onScroll,ge=m.direction,de=m.rootClassName,ye=m.rootStyle,pe=Ri(this.props,{aria:!0,data:!0}),ce;return U&&(xt(U)==="object"?ce=U:typeof U=="function"?ce={nodeDraggable:U}:ce={}),v.createElement(Gf.Provider,{value:{prefixCls:C,selectable:N,showIcon:P,icon:A,switcherIcon:B,draggable:ce,draggingNodeKey:u,checkable:k,checkStrictly:L,disabled:H,keyEntities:c,dropLevelOffset:h,dropContainerKey:g,dropTargetKey:p,dropPosition:y,dragOverNodeKey:x,indent:S,direction:ge,dropIndicatorRender:re,loadData:D,filterTreeNode:F,titleRender:ne,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},v.createElement("div",{role:"tree",className:Ee(C,w,de,z(z(z({},"".concat(C,"-show-line"),O),"".concat(C,"-focused"),l),"".concat(C,"-active-focused"),f!==null)),style:ye},v.createElement(Yy,it({ref:this.listRef,prefixCls:C,style:E,data:s,disabled:H,selectable:N,checkable:!!k,motion:V,dragging:u!==null,height:Y,itemHeight:q,virtual:X,focusable:R,focused:l,tabIndex:I,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ve,onScroll:oe},this.getTreeNodeRequiredProps(),pe))))}}],[{key:"getDerivedStateFromProps",value:function(o,l){var s=l.prevProps,c={prevProps:o};function u($){return!s&&$ in o||s&&s[$]!==o[$]}var f,h=l.fieldNames;if(u("fieldNames")&&(h=ba(o.fieldNames),c.fieldNames=h),u("treeData")?f=o.treeData:u("children")&&(ut(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=Oy(o.children)),f){c.treeData=f;var g=kf(f,{fieldNames:h});c.keyEntities=Q(z({},Ni,Xy),g.keyEntities),process.env.NODE_ENV!=="production"&&$D(f,h)}var p=c.keyEntities||l.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))c.expandedKeys=o.autoExpandParent||!s&&o.defaultExpandParent?Zd(o.expandedKeys,p):o.expandedKeys;else if(!s&&o.defaultExpandAll){var y=Q({},p);delete y[Ni],c.expandedKeys=Object.keys(y).map(function($){return y[$].key})}else!s&&o.defaultExpandedKeys&&(c.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Zd(o.defaultExpandedKeys,p):o.defaultExpandedKeys);if(c.expandedKeys||delete c.expandedKeys,f||c.expandedKeys){var x=Xu(f||l.treeData,c.expandedKeys||l.expandedKeys,h);c.flattenNodes=x}if(o.selectable&&(u("selectedKeys")?c.selectedKeys=um(o.selectedKeys,o):!s&&o.defaultSelectedKeys&&(c.selectedKeys=um(o.defaultSelectedKeys,o))),o.checkable){var S;if(u("checkedKeys")?S=td(o.checkedKeys)||{}:!s&&o.defaultCheckedKeys?S=td(o.defaultCheckedKeys)||{}:f&&(S=td(o.checkedKeys)||{checkedKeys:l.checkedKeys,halfCheckedKeys:l.halfCheckedKeys}),S){var m=S,C=m.checkedKeys,w=C===void 0?[]:C,E=m.halfCheckedKeys,O=E===void 0?[]:E;if(!o.checkStrictly){var R=va(w,!0,p);w=R.checkedKeys,O=R.halfCheckedKeys}c.checkedKeys=w,c.halfCheckedKeys=O}}return u("loadedKeys")&&(c.loadedKeys=o.loadedKeys),c}}]),n}(v.Component);z(mc,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:fF,allowDrop:function(){return!0},expandAction:!1});z(mc,"TreeNode",Sa);var CF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},xF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:CF}))},Yf=v.forwardRef(xF);process.env.NODE_ENV!=="production"&&(Yf.displayName="FileOutlined");var wF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},EF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:wF}))},Zy=v.forwardRef(EF);process.env.NODE_ENV!=="production"&&(Zy.displayName="FolderOpenOutlined");var OF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},$F=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:OF}))},Qy=v.forwardRef($F);process.env.NODE_ENV!=="production"&&(Qy.displayName="FolderOutlined");var _F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},RF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:_F}))},Jy=v.forwardRef(RF);process.env.NODE_ENV!=="production"&&(Jy.displayName="HolderOutlined");const IF=new on("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),NF=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),PF=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${Ye(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),TF=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:l,nodeSelectedBg:s,nodeHoverBg:c}=t,u=t.paddingXS;return{[n]:Object.assign(Object.assign({},rr(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:Object.assign({},Cl(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:IF,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${r}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${Ye(o)} 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:l,lineHeight:`${Ye(l)}`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${r}:hover &`]:{opacity:.45}},[`&${r}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:Object.assign(Object.assign({},NF(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:l,margin:0,lineHeight:`${Ye(l)}`,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,borderRadius:t.borderRadius,"&-noop":{cursor:"unset"},[`&:not(${n}-switcher-noop):hover`]:{backgroundColor:t.colorBgTextHover},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(l).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(l).div(2).equal()).mul(.8).equal(),height:t.calc(l).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:u,alignSelf:"flex-start",marginTop:t.marginXXS},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:l,margin:0,padding:`0 ${Ye(t.calc(t.paddingXS).div(2).equal())}`,color:"inherit",lineHeight:`${Ye(l)}`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:c},[`&${n}-node-selected`]:{backgroundColor:s},[`${n}-iconEle`]:{display:"inline-block",width:l,height:l,lineHeight:`${Ye(l)}`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:Object.assign({lineHeight:`${Ye(l)}`,userSelect:"none"},PF(e,t)),[`${r}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(l).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${Ye(t.calc(l).div(2).equal())} !important`}}}}})}},MF=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:r,directoryNodeSelectedBg:o,directoryNodeSelectedColor:l}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:l,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:o},[`${t}-switcher`]:{color:l},[`${t}-node-content-wrapper`]:{color:l,background:"transparent"}}}}}},eS=(e,t)=>{const n=`.${e}`,r=`${n}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),l=bn(t,{treeCls:n,treeNodeCls:r,treeNodePadding:o});return[TF(e,l),MF(l)]},tS=e=>{const{controlHeightSM:t}=e;return{titleHeight:t,nodeHoverBg:e.controlItemBgHover,nodeSelectedBg:e.controlItemBgActive}},DF=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},tS(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})},AF=Hr("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:Wf(`${n}-checkbox`,e)},eS(n,e),_b(e)]},DF),pm=4;function FF(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:o,direction:l="ltr"}=e,s=l==="ltr"?"left":"right",c=l==="ltr"?"right":"left",u={[s]:-n*o+pm,[c]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[s]=o+pm;break}return j.createElement("div",{style:u,className:`${r}-drop-indicator`})}var LF={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},VF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:LF}))},nS=v.forwardRef(VF);process.env.NODE_ENV!=="production"&&(nS.displayName="CaretDownFilled");var zF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},jF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:zF}))},rS=v.forwardRef(jF);process.env.NODE_ENV!=="production"&&(rS.displayName="MinusSquareOutlined");var BF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},HF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:BF}))},oS=v.forwardRef(HF);process.env.NODE_ENV!=="production"&&(oS.displayName="PlusSquareOutlined");const iS=e=>{const{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:o}=e,{isLeaf:l,expanded:s,loading:c}=r;if(c)return v.createElement(wl,{className:`${t}-switcher-loading-icon`});let u;if(o&&typeof o=="object"&&(u=o.showLeafIcon),l){if(!o)return null;if(typeof u!="boolean"&&u){const g=typeof u=="function"?u(r):u,p=`${t}-switcher-line-custom-icon`;return ma(g)?ei(g,{className:Ee(g.props.className||"",p)}):g}return u?v.createElement(Yf,{className:`${t}-switcher-line-icon`}):v.createElement("span",{className:`${t}-switcher-leaf-line`})}const f=`${t}-switcher-icon`,h=typeof n=="function"?n(r):n;return ma(h)?ei(h,{className:Ee(h.props.className||"",f)}):h!==void 0?h:o?s?v.createElement(rS,{className:`${t}-switcher-line-icon`}):v.createElement(oS,{className:`${t}-switcher-line-icon`}):v.createElement(nS,{className:f})},Zf=j.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:o,virtual:l,tree:s}=j.useContext(Gt),{prefixCls:c,className:u,showIcon:f=!1,showLine:h,switcherIcon:g,blockNode:p=!1,children:y,checkable:x=!1,selectable:S=!0,draggable:m,motion:C,style:w}=e,E=r("tree",c),O=r(),R=C??Object.assign(Object.assign({},Md(O)),{motionAppear:!1}),$=Object.assign(Object.assign({},e),{checkable:x,selectable:S,showIcon:f,motion:R,blockNode:p,showLine:!!h,dropIndicatorRender:FF}),[I,N,P]=AF(E),[,A]=or(),B=A.paddingXS/2+(((n=A.Tree)===null||n===void 0?void 0:n.titleHeight)||A.controlHeightSM),U=j.useMemo(()=>{if(!m)return!1;let L={};switch(typeof m){case"function":L.nodeDraggable=m;break;case"object":L=Object.assign({},m);break}return L.icon!==!1&&(L.icon=L.icon||j.createElement(Jy,null)),L},[m]),k=L=>j.createElement(iS,{prefixCls:E,switcherIcon:g,treeNodeProps:L,showLine:h});return I(j.createElement(mc,Object.assign({itemHeight:B,ref:t,virtual:l},$,{style:Object.assign(Object.assign({},s==null?void 0:s.style),w),prefixCls:E,className:Ee({[`${E}-icon-hide`]:!f,[`${E}-block-node`]:p,[`${E}-unselectable`]:!S,[`${E}-rtl`]:o==="rtl"},s==null?void 0:s.className,u,N,P),direction:o,checkable:x&&j.createElement("span",{className:`${E}-checkbox-inner`}),selectable:S,switcherIcon:k,draggable:U}),y))});process.env.NODE_ENV!=="production"&&(Zf.displayName="Tree");var Io;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Io||(Io={}));function Qf(e,t,n){const{key:r,children:o}=n;function l(s){const c=s[r],u=s[o];t(c,s)!==!1&&Qf(u||[],t,n)}e.forEach(l)}function kF(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:o,fieldNames:l}=e;const s=[];let c=Io.None;if(r&&r===o)return[r];if(!r||!o)return[];function u(f){return f===r||f===o}return Qf(t,f=>{if(c===Io.End)return!1;if(u(f)){if(s.push(f),c===Io.None)c=Io.Start;else if(c===Io.Start)return c=Io.End,!1}else c===Io.Start&&s.push(f);return n.includes(f)},ba(l)),s}function nd(e,t,n){const r=Me(t),o=[];return Qf(e,(l,s)=>{const c=r.indexOf(l);return c!==-1&&(o.push(s),r.splice(c,1)),!!r.length},ba(n)),o}var mm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function WF(e){const{isLeaf:t,expanded:n}=e;return t?v.createElement(Yf,null):n?v.createElement(Zy,null):v.createElement(Qy,null)}function bm(e){let{treeData:t,children:n}=e;return t||Oy(n)}const KF=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:o}=e,l=mm(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const s=v.useRef(),c=v.useRef(),u=()=>{const{keyEntities:N}=kf(bm(l));let P;return n?P=Object.keys(N):r?P=Zd(l.expandedKeys||o||[],N):P=l.expandedKeys||o,P},[f,h]=v.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[g,p]=v.useState(()=>u());v.useEffect(()=>{"selectedKeys"in l&&h(l.selectedKeys)},[l.selectedKeys]),v.useEffect(()=>{"expandedKeys"in l&&p(l.expandedKeys)},[l.expandedKeys]);const y=(N,P)=>{var A;return"expandedKeys"in l||p(N),(A=l.onExpand)===null||A===void 0?void 0:A.call(l,N,P)},x=(N,P)=>{var A;const{multiple:B,fieldNames:U}=l,{node:k,nativeEvent:L}=P,{key:H=""}=k,V=bm(l),D=Object.assign(Object.assign({},P),{selected:!0}),F=(L==null?void 0:L.ctrlKey)||(L==null?void 0:L.metaKey),Y=L==null?void 0:L.shiftKey;let q;B&&F?(q=N,s.current=H,c.current=q,D.selectedNodes=nd(V,q,U)):B&&Y?(q=Array.from(new Set([].concat(Me(c.current||[]),Me(kF({treeData:V,expandedKeys:g,startKey:H,endKey:s.current,fieldNames:U}))))),D.selectedNodes=nd(V,q,U)):(q=[H],s.current=H,c.current=q,D.selectedNodes=nd(V,q,U)),(A=l.onSelect)===null||A===void 0||A.call(l,q,D),"selectedKeys"in l||h(q)},{getPrefixCls:S,direction:m}=v.useContext(Gt),{prefixCls:C,className:w,showIcon:E=!0,expandAction:O="click"}=l,R=mm(l,["prefixCls","className","showIcon","expandAction"]),$=S("tree",C),I=Ee(`${$}-directory`,{[`${$}-directory-rtl`]:m==="rtl"},w);return v.createElement(Zf,Object.assign({icon:WF,ref:t,blockNode:!0},R,{showIcon:E,expandAction:O,prefixCls:$,className:I,expandedKeys:g,selectedKeys:f,onSelect:x,onExpand:y}))},aS=v.forwardRef(KF);process.env.NODE_ENV!=="production"&&(aS.displayName="DirectoryTree");const Jf=Zf;Jf.DirectoryTree=aS;Jf.TreeNode=Sa;const UF=function(e){var t=v.useRef({valueLabels:new Map});return v.useMemo(function(){var n=t.current.valueLabels,r=new Map,o=e.map(function(l){var s,c=l.value,u=(s=l.label)!==null&&s!==void 0?s:n.get(c);return r.set(c,u),Q(Q({},l),{},{label:u})});return t.current.valueLabels=r,[o]},[e])},qF=function(e,t,n,r){return v.useMemo(function(){var o=e.map(function(u){var f=u.value;return f}),l=t.map(function(u){var f=u.value;return f}),s=o.filter(function(u){return!r[u]});if(n){var c=va(o,!0,r);o=c.checkedKeys,l=c.halfCheckedKeys}return[Array.from(new Set([].concat(Me(s),Me(o)))),l]},[e,t,n,r])};function lS(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function GF(e){var t=e||{},n=t.label,r=t.value,o=t.children,l=r||"value";return{_title:n?[n]:["title","label"],value:l,key:l,children:o||"children"}}function Jd(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function XF(e,t){var n=[];function r(o){o.forEach(function(l){var s=l[t.children];s&&(n.push(l[t.value]),r(s))})}return r(e),n}function ef(e){return e==null}const YF=function(e,t){return v.useMemo(function(){var n=kf(e,{fieldNames:t,initWrapper:function(o){return Q(Q({},o),{},{valueEntities:new Map})},processEntity:function(o,l){var s=o.node[t.value];if(process.env.NODE_ENV!=="production"){var c=o.node.key;ut(!ef(s),"TreeNode `value` is invalidate: undefined"),ut(!l.valueEntities.has(s),"Same `value` exist in the tree: ".concat(s)),ut(!c||String(c)===String(s),"`key` or `value` with TreeNode must be the same or you can remove one of them. key: ".concat(c,", value: ").concat(s,"."))}l.valueEntities.set(s,o)}});return n},[e,t])};var ev=function(){return null},ZF=["children","value"];function sS(e){return so(e).map(function(t){if(!v.isValidElement(t)||!t.type)return null;var n=t,r=n.key,o=n.props,l=o.children,s=o.value,c=Kt(o,ZF),u=Q({key:r,value:s},c),f=sS(l);return f.length&&(u.children=f),u}).filter(function(t){return t})}function tf(e){if(!e)return e;var t=Q({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return ut(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function QF(e,t,n,r,o,l){var s=null,c=null;function u(){function f(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return h.map(function(y,x){var S="".concat(g,"-").concat(x),m=y[l.value],C=n.includes(m),w=f(y[l.children]||[],S,C),E=v.createElement(ev,y,w.map(function(R){return R.node}));if(t===m&&(s=E),C){var O={pos:S,node:E,children:w};return p||c.push(O),O}return null}).filter(function(y){return y})}c||(c=[],f(r),c.sort(function(h,g){var p=h.node.props.value,y=g.node.props.value,x=n.indexOf(p),S=n.indexOf(y);return x-S}))}Object.defineProperty(e,"triggerNode",{get:function(){return ut(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return ut(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),o?c:c.map(function(h){var g=h.node;return g})}})}const JF=function(e,t,n){var r=n.treeNodeFilterProp,o=n.filterTreeNode,l=n.fieldNames,s=l.children;return v.useMemo(function(){if(!t||o===!1)return e;var c;if(typeof o=="function")c=o;else{var u=t.toUpperCase();c=function(g,p){var y=p[r];return String(y).toUpperCase().includes(u)}}function f(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return h.reduce(function(p,y){var x=y[s],S=g||c(t,tf(y)),m=f(x||[],S);return(S||m.length)&&p.push(Q(Q({},y),{},z({isLeaf:void 0},s,m))),p},[])}return f(e)},[e,t,s,r,o])};function ym(e){var t=v.useRef();t.current=e;var n=v.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function eL(e,t){var n=t.id,r=t.pId,o=t.rootPId,l={},s=[],c=e.map(function(u){var f=Q({},u),h=f[n];return l[h]=f,f.key=f.key||h,f});return c.forEach(function(u){var f=u[r],h=l[f];h&&(h.children=h.children||[],h.children.push(u)),(f===o||!h&&o===null)&&s.push(u)}),s}function tL(e,t,n){return v.useMemo(function(){return e?n?eL(e,Q({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:sS(t)},[t,n,e])}var cS=v.createContext(null),uS=v.createContext(null),nL={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},rL=function(t,n){var r=Pb(),o=r.prefixCls,l=r.multiple,s=r.searchValue,c=r.toggleOpen,u=r.open,f=r.notFoundContent,h=v.useContext(uS),g=h.virtual,p=h.listHeight,y=h.listItemHeight,x=h.listItemScrollOffset,S=h.treeData,m=h.fieldNames,C=h.onSelect,w=h.dropdownMatchSelectWidth,E=h.treeExpandAction,O=h.treeTitleRender,R=v.useContext(cS),$=R.checkable,I=R.checkedKeys,N=R.halfCheckedKeys,P=R.treeExpandedKeys,A=R.treeDefaultExpandAll,B=R.treeDefaultExpandedKeys,U=R.onTreeExpand,k=R.treeIcon,L=R.showTreeIcon,H=R.switcherIcon,V=R.treeLine,D=R.treeNodeFilterProp,F=R.loadData,Y=R.treeLoadedKeys,q=R.treeMotion,X=R.onTreeLoad,ne=R.keyEntities,re=v.useRef(),ve=Sl(function(){return S},[u,S],function(He,De){return De[0]&&He[1]!==De[1]}),oe=v.useState(null),ge=le(oe,2),de=ge[0],ye=ge[1],pe=ne[de],ce=v.useMemo(function(){return $?{checked:I,halfChecked:N}:null},[$,I,N]);v.useEffect(function(){if(u&&!l&&I.length){var He;(He=re.current)===null||He===void 0||He.scrollTo({key:I[0]}),ye(I[0])}},[u]);var te=String(s).toLowerCase(),me=function(De){return te?String(De[D]).toLowerCase().includes(te):!1},Ne=v.useState(B),Z=le(Ne,2),ae=Z[0],Pe=Z[1],Te=v.useState(null),je=le(Te,2),fe=je[0],se=je[1],be=v.useMemo(function(){return P?Me(P):s?fe:ae},[ae,fe,P,s]);v.useEffect(function(){s&&se(XF(S,m))},[s]);var ke=function(De){Pe(De),se(De),U&&U(De)},$e=function(De){De.preventDefault()},Je=function(De,et){var Re=et.node;$&&Jd(Re)||(C(Re.key,{selected:!I.includes(Re.key)}),l||c(!1))};if(v.useImperativeHandle(n,function(){var He;return{scrollTo:(He=re.current)===null||He===void 0?void 0:He.scrollTo,onKeyDown:function(et){var Re,lt=et.which;switch(lt){case _e.UP:case _e.DOWN:case _e.LEFT:case _e.RIGHT:(Re=re.current)===null||Re===void 0||Re.onKeyDown(et);break;case _e.ENTER:{if(pe){var st=(pe==null?void 0:pe.node)||{},Wt=st.selectable,vt=st.value;Wt!==!1&&Je(null,{node:{key:de},selected:!I.includes(vt)})}break}case _e.ESC:c(!1)}},onKeyUp:function(){}}}),ve.length===0)return v.createElement("div",{role:"listbox",className:"".concat(o,"-empty"),onMouseDown:$e},f);var Ge={fieldNames:m};return Y&&(Ge.loadedKeys=Y),be&&(Ge.expandedKeys=be),v.createElement("div",{onMouseDown:$e},pe&&u&&v.createElement("span",{style:nL,"aria-live":"assertive"},pe.node.value),v.createElement(mc,it({ref:re,focusable:!1,prefixCls:"".concat(o,"-tree"),treeData:ve,height:p,itemHeight:y,itemScrollOffset:x,virtual:g!==!1&&w!==!1,multiple:l,icon:k,showIcon:L,switcherIcon:H,showLine:V,loadData:s?null:F,motion:q,activeKey:de,checkable:$,checkStrictly:!0,checkedKeys:ce,selectedKeys:$?[]:I,defaultExpandAll:A,titleRender:O},Ge,{onActiveChange:ye,onSelect:Je,onCheck:Je,onExpand:ke,onLoad:X,filterTreeNode:me,expandAction:E})))},dS=v.forwardRef(rL);process.env.NODE_ENV!=="production"&&(dS.displayName="OptionList");var tv="SHOW_ALL",nv="SHOW_PARENT",bc="SHOW_CHILD";function Sm(e,t,n,r){var o=new Set(e);return t===bc?e.filter(function(l){var s=n[l];return!(s&&s.children&&s.children.some(function(c){var u=c.node;return o.has(u[r.value])})&&s.children.every(function(c){var u=c.node;return Jd(u)||o.has(u[r.value])}))}):t===nv?e.filter(function(l){var s=n[l],c=s?s.parent:null;return!(c&&!Jd(c.node)&&o.has(c.key))}):e}function oL(e){var t=e.searchPlaceholder,n=e.treeCheckStrictly,r=e.treeCheckable,o=e.labelInValue,l=e.value,s=e.multiple;ut(!t,"`searchPlaceholder` has been removed."),n&&o===!1&&ut(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(o||n)&&ut(lS(l).every(function(c){return c&&xt(c)==="object"&&"value"in c}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),n||s||r?ut(!l||Array.isArray(l),"`value` should be an array when `TreeSelect` is checkable or multiple."):ut(!Array.isArray(l),"`value` should not be array when `TreeSelect` is single mode.")}var iL=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender"];function aL(e){return!e||xt(e)!=="object"}var fS=v.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,o=r===void 0?"rc-tree-select":r,l=e.value,s=e.defaultValue,c=e.onChange,u=e.onSelect,f=e.onDeselect,h=e.searchValue,g=e.inputValue,p=e.onSearch,y=e.autoClearSearchValue,x=y===void 0?!0:y,S=e.filterTreeNode,m=e.treeNodeFilterProp,C=m===void 0?"value":m,w=e.showCheckedStrategy,E=e.treeNodeLabelProp,O=e.multiple,R=e.treeCheckable,$=e.treeCheckStrictly,I=e.labelInValue,N=e.fieldNames,P=e.treeDataSimpleMode,A=e.treeData,B=e.children,U=e.loadData,k=e.treeLoadedKeys,L=e.onTreeLoad,H=e.treeDefaultExpandAll,V=e.treeExpandedKeys,D=e.treeDefaultExpandedKeys,F=e.onTreeExpand,Y=e.treeExpandAction,q=e.virtual,X=e.listHeight,ne=X===void 0?200:X,re=e.listItemHeight,ve=re===void 0?20:re,oe=e.listItemScrollOffset,ge=oe===void 0?0:oe,de=e.onDropdownVisibleChange,ye=e.dropdownMatchSelectWidth,pe=ye===void 0?!0:ye,ce=e.treeLine,te=e.treeIcon,me=e.showTreeIcon,Ne=e.switcherIcon,Z=e.treeMotion,ae=e.treeTitleRender,Pe=Kt(e,iL),Te=qb(n),je=R&&!$,fe=R||$,se=$||I,be=fe||O,ke=jr(s,{value:l}),$e=le(ke,2),Je=$e[0],Ge=$e[1],He=v.useMemo(function(){return R?w||bc:tv},[w,R]);process.env.NODE_ENV!=="production"&&oL(e);var De=v.useMemo(function(){return GF(N)},[JSON.stringify(N)]),et=jr("",{value:h!==void 0?h:g,postState:function(Qe){return Qe||""}}),Re=le(et,2),lt=Re[0],st=Re[1],Wt=function(Qe){st(Qe),p==null||p(Qe)},vt=tL(A,B,P),Ut=YF(vt,De),bt=Ut.keyEntities,wt=Ut.valueEntities,ft=v.useCallback(function(We){var Qe=[],Fe=[];return We.forEach(function(ze){wt.has(ze)?Fe.push(ze):Qe.push(ze)}),{missingRawValues:Qe,existRawValues:Fe}},[wt]),Xt=JF(vt,lt,{fieldNames:De,treeNodeFilterProp:C,filterTreeNode:S}),Pt=v.useCallback(function(We){if(We){if(E)return We[E];for(var Qe=De._title,Fe=0;Fe<Qe.length;Fe+=1){var ze=We[Qe[Fe]];if(ze!==void 0)return ze}}},[De,E]),Ot=v.useCallback(function(We){var Qe=lS(We);return Qe.map(function(Fe){return aL(Fe)?{value:Fe}:Fe})},[]),Et=v.useCallback(function(We){var Qe=Ot(We);return Qe.map(function(Fe){var ze=Fe.label,Le=Fe.value,Ce=Fe.halfChecked,Ve,Ze=wt.get(Le);if(Ze){var Vt;ze=(Vt=ze)!==null&&Vt!==void 0?Vt:Pt(Ze.node),Ve=Ze.node.disabled}else if(ze===void 0){var Qt=Ot(Je).find(function(zt){return zt.value===Le});ze=Qt.label}return{label:ze,value:Le,halfChecked:Ce,disabled:Ve}})},[wt,Pt,Ot,Je]),Ct=v.useMemo(function(){return Ot(Je)},[Ot,Je]),Yt=v.useMemo(function(){var We=[],Qe=[];return Ct.forEach(function(Fe){Fe.halfChecked?Qe.push(Fe):We.push(Fe)}),[We,Qe]},[Ct]),$t=le(Yt,2),Xe=$t[0],yt=$t[1],Ke=v.useMemo(function(){return Xe.map(function(We){return We.value})},[Xe]),rt=qF(Xe,yt,je,bt),at=le(rt,2),Be=at[0],Ue=at[1],Ae=v.useMemo(function(){var We=Sm(Be,He,bt,De),Qe=We.map(function(Ce){var Ve,Ze;return(Ve=(Ze=bt[Ce])===null||Ze===void 0||(Ze=Ze.node)===null||Ze===void 0?void 0:Ze[De.value])!==null&&Ve!==void 0?Ve:Ce}),Fe=Qe.map(function(Ce){var Ve=Xe.find(function(Vt){return Vt.value===Ce}),Ze;return I&&Ve.label!==void 0?Ze=Ve.label:!I&&ae&&(Ze=ae(Ve)),{value:Ce,label:Ze}}),ze=Et(Fe),Le=ze[0];return!be&&Le&&ef(Le.value)&&ef(Le.label)?[]:ze.map(function(Ce){var Ve;return Q(Q({},Ce),{},{label:(Ve=Ce.label)!==null&&Ve!==void 0?Ve:Ce.value})})},[De,be,Be,Xe,Et,He,bt]),dt=UF(Ae),_t=le(dt,1),Tt=_t[0],qt=ym(function(We,Qe,Fe){var ze=Et(We);if(Ge(ze),x&&st(""),c){var Le=We;if(je){var Ce=Sm(We,He,bt,De);Le=Ce.map(function(yn){var Sn=wt.get(yn);return Sn?Sn.node[De.value]:yn})}var Ve=Qe||{triggerValue:void 0,selected:void 0},Ze=Ve.triggerValue,Vt=Ve.selected,Qt=Le;if($){var zt=yt.filter(function(yn){return!Le.includes(yn.value)});Qt=[].concat(Me(Qt),Me(zt))}var In=Et(Qt),Mn={preValue:Xe,triggerValue:Ze},un=!0;($||Fe==="selection"&&!Vt)&&(un=!1),QF(Mn,Ze,We,vt,un,De),fe?Mn.checked=Vt:Mn.selected=Vt;var zn=se?In:In.map(function(yn){return yn.value});c(be?zn:zn[0],se?null:In.map(function(yn){return yn.label}),Mn)}}),Ft=v.useCallback(function(We,Qe){var Fe,ze=Qe.selected,Le=Qe.source,Ce=bt[We],Ve=Ce==null?void 0:Ce.node,Ze=(Fe=Ve==null?void 0:Ve[De.value])!==null&&Fe!==void 0?Fe:We;if(!be)qt([Ze],{selected:!0,triggerValue:Ze},"option");else{var Vt=ze?[].concat(Me(Ke),[Ze]):Be.filter(function(Sn){return Sn!==Ze});if(je){var Qt=ft(Vt),zt=Qt.missingRawValues,In=Qt.existRawValues,Mn=In.map(function(Sn){return wt.get(Sn).key}),un;if(ze){var zn=va(Mn,!0,bt);un=zn.checkedKeys}else{var yn=va(Mn,{checked:!1,halfCheckedKeys:Ue},bt);un=yn.checkedKeys}Vt=[].concat(Me(zt),Me(un.map(function(Sn){return bt[Sn].node[De.value]})))}qt(Vt,{selected:ze,triggerValue:Ze},Le||"option")}ze||!be?u==null||u(Ze,tf(Ve)):f==null||f(Ze,tf(Ve))},[ft,wt,bt,De,be,Ke,qt,je,u,f,Be,Ue]),W=v.useCallback(function(We){if(de){var Qe={};Object.defineProperty(Qe,"documentClickClose",{get:function(){return ut(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),de(We,Qe)}},[de]),ue=ym(function(We,Qe){var Fe=We.map(function(ze){return ze.value});if(Qe.type==="clear"){qt(Fe,{},"selection");return}Qe.values.length&&Ft(Qe.values[0].value,{selected:!1,source:"selection"})}),Ie=v.useMemo(function(){return{virtual:q,dropdownMatchSelectWidth:pe,listHeight:ne,listItemHeight:ve,listItemScrollOffset:ge,treeData:Xt,fieldNames:De,onSelect:Ft,treeExpandAction:Y,treeTitleRender:ae}},[q,pe,ne,ve,ge,Xt,De,Ft,Y,ae]),tt=v.useMemo(function(){return{checkable:fe,loadData:U,treeLoadedKeys:k,onTreeLoad:L,checkedKeys:Be,halfCheckedKeys:Ue,treeDefaultExpandAll:H,treeExpandedKeys:V,treeDefaultExpandedKeys:D,onTreeExpand:F,treeIcon:te,treeMotion:Z,showTreeIcon:me,switcherIcon:Ne,treeLine:ce,treeNodeFilterProp:C,keyEntities:bt}},[fe,U,k,L,Be,Ue,H,V,D,F,te,Z,me,Ne,ce,C,bt]);return v.createElement(uS.Provider,{value:Ie},v.createElement(cS.Provider,{value:tt},v.createElement(Mf,it({ref:t},Pe,{id:Te,prefixCls:o,mode:be?"multiple":void 0,displayValues:Tt,onDisplayValuesChange:ue,searchValue:lt,onSearch:Wt,OptionList:dS,emptyOptions:!vt.length,onDropdownVisibleChange:W,dropdownMatchSelectWidth:pe}))))});process.env.NODE_ENV!=="production"&&(fS.displayName="TreeSelect");var Pl=fS;Pl.TreeNode=ev;Pl.SHOW_ALL=tv;Pl.SHOW_PARENT=nv;Pl.SHOW_CHILD=bc;const lL=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:r}=e,o=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${Ye(e.paddingXS)} ${Ye(e.calc(e.paddingXS).div(2).equal())}`},eS(n,bn(e,{colorBgContainer:r})),{[o]:{borderRadius:0,[`${o}-list-holder-inner`]:{alignItems:"stretch",[`${o}-treenode`]:{[`${o}-node-content-wrapper`]:{flex:"auto"}}}}},Wf(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${o}-switcher${o}-switcher_close`]:{[`${o}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function sL(e,t,n){return Hr("TreeSelect",r=>{const o=bn(r,{treePrefixCls:t});return[lL(o)]},tS)(e,n)}var cL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const uL=(e,t)=>{var n,{prefixCls:r,size:o,disabled:l,bordered:s=!0,className:c,rootClassName:u,treeCheckable:f,multiple:h,listHeight:g=256,listItemHeight:p=26,placement:y,notFoundContent:x,switcherIcon:S,treeLine:m,getPopupContainer:C,popupClassName:w,dropdownClassName:E,treeIcon:O=!1,transitionName:R,choiceTransitionName:$="",status:I,treeExpandAction:N,builtinPlacements:P,dropdownMatchSelectWidth:A,popupMatchSelectWidth:B,allowClear:U,variant:k,dropdownStyle:L,tagRender:H}=e,V=cL(e,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear","variant","dropdownStyle","tagRender"]);const{getPopupContainer:D,getPrefixCls:F,renderEmpty:Y,direction:q,virtual:X,popupMatchSelectWidth:ne,popupOverflow:re}=v.useContext(Gt);if(process.env.NODE_ENV!=="production"){const Et=Ln("TreeSelect");process.env.NODE_ENV!=="production"&&Et(h!==!1||!f,"usage","`multiple` will always be `true` when `treeCheckable` is true"),Et.deprecated(!E,"dropdownClassName","popupClassName"),Et.deprecated(A===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&Et(!("showArrow"in V),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),Et.deprecated(!("bordered"in V),"bordered","variant")}const ve=F(),oe=F("select",r),ge=F("select-tree",r),de=F("tree-select",r),{compactSize:ye,compactItemClassnames:pe}=Ol(oe,q),ce=Br(oe),te=Br(de),[me,Ne,Z]=ry(oe,ce),[ae]=sL(de,ge,te),[Pe,Te]=vc(k,s),je=Ee(w||E,`${de}-dropdown`,{[`${de}-dropdown-rtl`]:q==="rtl"},u,Z,ce,te,Ne),fe=!!(f||h),se=ly(V.suffixIcon,V.showArrow),be=(n=B??A)!==null&&n!==void 0?n:ne,{status:ke,hasFeedback:$e,isFormItemInput:Je,feedbackIcon:Ge}=v.useContext(ar),He=fc(ke,I),{suffixIcon:De,removeIcon:et,clearIcon:Re}=ay(Object.assign(Object.assign({},V),{multiple:fe,showSuffixIcon:se,hasFeedback:$e,feedbackIcon:Ge,prefixCls:oe,componentName:"TreeSelect"})),lt=U===!0?{clearIcon:Re}:U;let st;x!==void 0?st=x:st=(Y==null?void 0:Y("Select"))||v.createElement(Jb,{componentName:"Select"});const Wt=uo(V,["suffixIcon","removeIcon","clearIcon","itemIcon","switcherIcon"]),vt=v.useMemo(()=>y!==void 0?y:q==="rtl"?"bottomRight":"bottomLeft",[y,q]),Ut=ni(Et=>{var Ct;return(Ct=o??ye)!==null&&Ct!==void 0?Ct:Et}),bt=v.useContext(eo),wt=l??bt,ft=Ee(!r&&de,{[`${oe}-lg`]:Ut==="large",[`${oe}-sm`]:Ut==="small",[`${oe}-rtl`]:q==="rtl",[`${oe}-${Pe}`]:Te,[`${oe}-in-form-item`]:Je},ml(oe,He,$e),pe,c,u,Z,ce,te,Ne),Xt=Et=>v.createElement(iS,{prefixCls:ge,switcherIcon:S,treeNodeProps:Et,showLine:m}),[Pt]=bf("SelectLike",L==null?void 0:L.zIndex),Ot=v.createElement(Pl,Object.assign({virtual:X,disabled:wt},Wt,{dropdownMatchSelectWidth:be,builtinPlacements:ey(P,re),ref:t,prefixCls:oe,className:ft,listHeight:g,listItemHeight:p,treeCheckable:f&&v.createElement("span",{className:`${oe}-tree-checkbox-inner`}),treeLine:!!m,suffixIcon:De,multiple:fe,placement:vt,removeIcon:et,allowClear:lt,switcherIcon:Xt,showTreeIcon:O,notFoundContent:st,getPopupContainer:C||D,treeMotion:null,dropdownClassName:je,dropdownStyle:Object.assign(Object.assign({},L),{zIndex:Pt}),choiceTransitionName:qs(ve,"",$),transitionName:qs(ve,"slide-up",R),treeExpandAction:N,tagRender:fe?H:void 0}));return me(ae(Ot))},dL=v.forwardRef(uL),oi=dL,fL=Rb(oi);oi.TreeNode=ev;oi.SHOW_ALL=tv;oi.SHOW_PARENT=nv;oi.SHOW_CHILD=bc;oi._InternalPanelDoNotUseOrYouWillBeFired=fL;process.env.NODE_ENV!=="production"&&(oi.displayName="TreeSelect");const to=function(t){let{label:n,children:r,prompt:o,...l}=t;return Dt.jsxs("div",{className:"relative",children:[n&&Dt.jsx("div",{className:"h-8 text-sm flex justify-between items-center",children:n}),Dt.jsx("div",{className:"w-full flex items-stretch",children:r}),Dt.jsx("div",{className:"text-xs text-gray-500 min-h-5 flex items-center",children:o})]})},{TextArea:vL,Password:hL,Search:gL}=ri,pL=e=>Dt.jsx(to,{...e,children:Dt.jsx(ri,{...e})}),mL=e=>{let{value:t,...n}=e;return t=t||"系统自动生成",Dt.jsx(to,{...n,children:Dt.jsx(ri,{...n,disabled:!0,value:t})})},bL=e=>Dt.jsx(to,{...e,children:Dt.jsx(vL,{...e})}),yL=e=>Dt.jsx(to,{...e,children:Dt.jsx(hL,{...e})}),SL=e=>Dt.jsx(to,{...e,children:Dt.jsx(gL,{...e})});function vS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return CL(e,t,n,r,o,l,c=>({value:c[t],title:c[n],key:c[t],disabled:c[t]===s}))}function CL(e,t,n,r,o,l,s){if(!Array.isArray(e)||e.length===0)return[];const c=e.map(u=>({...u,...s(u)}));return c.filter(u=>{const f=c.filter(h=>u[t]===h[r]);return u[o]=f.length>0?f:[],u[r]===l})}var Js={exports:{}};/**
|
|
265
|
+
.${r}-col-xl-24${n}-label`]:sa(e),[`@media (max-width: ${Ye(e.screenXSMax)})`]:[IA(e),{[t]:{[`.${r}-col-xs-24${n}-label`]:sa(e)}}],[`@media (max-width: ${Ye(e.screenSMMax)})`]:{[t]:{[`.${r}-col-sm-24${n}-label`]:sa(e)}},[`@media (max-width: ${Ye(e.screenMDMax)})`]:{[t]:{[`.${r}-col-md-24${n}-label`]:sa(e)}},[`@media (max-width: ${Ye(e.screenLGMax)})`]:{[t]:{[`.${r}-col-lg-24${n}-label`]:sa(e)}}}},PA=e=>({labelRequiredMarkColor:e.colorError,labelColor:e.colorTextHeading,labelFontSize:e.fontSize,labelHeight:e.controlHeight,labelColonMarginInlineStart:e.marginXXS/2,labelColonMarginInlineEnd:e.marginXS,itemMarginBottom:e.marginLG,verticalLabelPadding:`0 0 ${e.paddingXS}px`,verticalLabelMargin:0}),Ly=(e,t)=>bn(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),qf=Hr("Form",(e,t)=>{let{rootPrefixCls:n}=t;const r=Ly(e,n);return[OA(r),$A(r),wA(r),_A(r),RA(r),NA(r),_b(r),If]},PA,{order:-1e3}),om=[];function ed(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0;return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}const Vy=e=>{let{help:t,helpStatus:n,errors:r=om,warnings:o=om,className:l,fieldId:s,onVisibleChanged:c}=e;const{prefixCls:u}=v.useContext(_f),f=`${u}-item-explain`,h=Br(u),[g,p,y]=qf(u,h),x=j.useMemo(()=>Md(u),[u]),S=Qs(r),m=Qs(o),C=v.useMemo(()=>t!=null?[ed(t,"help",n)]:[].concat(Me(S.map((E,O)=>ed(E,"error","error",O))),Me(m.map((E,O)=>ed(E,"warning","warning",O)))),[t,n,S,m]),w={};return s&&(w.id=`${s}_help`),g(v.createElement(Ti,{motionDeadline:x.motionDeadline,motionName:`${u}-show-help`,visible:!!C.length,onVisibleChanged:c},E=>{const{className:O,style:R}=E;return v.createElement("div",Object.assign({},w,{className:Ee(f,O,y,h,l,p),style:R,role:"alert"}),v.createElement(xI,Object.assign({keys:C},Md(u),{motionName:`${u}-show-help-item`,component:!1}),$=>{const{key:I,error:N,errorStatus:P,className:A,style:B}=$;return v.createElement("div",{key:I,className:Ee(A,{[`${f}-${P}`]:P}),style:B},N)}))}))},TA=["parentNode"],MA="form_item";function al(e){return e===void 0||e===!1?[]:Array.isArray(e)?e:[e]}function zy(e,t){if(!e.length)return;const n=e.join("_");return t?`${t}_${n}`:TA.includes(n)?`${MA}_${n}`:n}function jy(e,t,n,r,o,l){let s=r;return l!==void 0?s=l:n.validating?s="validating":e.length?s="error":t.length?s="warning":(n.touched||o&&n.validated)&&(s="success"),s}function im(e){return al(e).join("_")}function By(e){const[t]=$f(),n=v.useRef({}),r=v.useMemo(()=>e??Object.assign(Object.assign({},t),{__INTERNAL__:{itemRef:o=>l=>{const s=im(o);l?n.current[s]=l:delete n.current[s]}},scrollToField:function(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};const s=al(o),c=zy(s,r.__INTERNAL__.name),u=c?document.getElementById(c):null;u&&oN(u,Object.assign({scrollMode:"if-needed",block:"nearest"},l))},getFieldInstance:o=>{const l=im(o);return n.current[l]}}),[e,t]);return[r]}const Ts={};function DA(e){let{name:t}=e;const n=Ln("Form");j.useEffect(()=>{if(t)return Ts[t]=(Ts[t]||0)+1,process.env.NODE_ENV!=="production"&&n(Ts[t]<=1,"usage","There exist multiple Form with same `name`."),()=>{Ts[t]-=1}},[t])}var AA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const FA=(e,t)=>{const n=v.useContext(eo),{getPrefixCls:r,direction:o,form:l}=v.useContext(Gt),{prefixCls:s,className:c,rootClassName:u,size:f,disabled:h=n,form:g,colon:p,labelAlign:y,labelWrap:x,labelCol:S,wrapperCol:m,hideRequiredMark:C,layout:w="horizontal",scrollToFirstError:E,requiredMark:O,onFinishFailed:R,name:$,style:I,feedbackIcons:N,variant:P}=e,A=AA(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),B=ni(f),U=v.useContext(f0);process.env.NODE_ENV!=="production"&&DA(e);const k=j.useMemo(()=>O!==void 0?O:C?!1:l&&l.requiredMark!==void 0?l.requiredMark:!0,[C,O,l]),L=p??(l==null?void 0:l.colon),H=r("form",s),V=Br(H),[D,F,Y]=qf(H,V),q=Ee(H,`${H}-${w}`,{[`${H}-hide-required-mark`]:k===!1,[`${H}-rtl`]:o==="rtl",[`${H}-${B}`]:B},Y,V,F,l==null?void 0:l.className,c,u),[X]=By(g),{__INTERNAL__:ne}=X;ne.name=$;const re=j.useMemo(()=>({name:$,labelAlign:y,labelCol:S,labelWrap:x,wrapperCol:m,vertical:w==="vertical",colon:L,requiredMark:k,itemRef:ne.itemRef,form:X,feedbackIcons:N}),[$,y,S,m,w,L,k,X,N]);v.useImperativeHandle(t,()=>X);const ve=(ge,de)=>{if(ge){let ye={block:"nearest"};typeof ge=="object"&&(ye=ge),X.scrollToField(de,ye)}},oe=ge=>{if(R==null||R(ge),ge.errorFields.length){const de=ge.errorFields[0].name;if(E!==void 0){ve(E,de);return}l&&l.scrollToFirstError!==void 0&&ve(l.scrollToFirstError,de)}};return D(v.createElement(xb.Provider,{value:P},v.createElement(O0,{disabled:h},v.createElement(_i.Provider,{value:B},v.createElement(Cb,{validateMessages:U},v.createElement(Do.Provider,{value:re},v.createElement(Oa,Object.assign({id:$},A,{name:$,onFinishFailed:oe,form:X,style:Object.assign(Object.assign({},l==null?void 0:l.style),I),className:q}))))))))},Hy=v.forwardRef(FA);process.env.NODE_ENV!=="production"&&(Hy.displayName="Form");function LA(e){if(typeof e=="function")return e;const t=so(e);return t.length<=1?t[0]:t}const ky=()=>{const{status:e,errors:t=[],warnings:n=[]}=j.useContext(ar);if(process.env.NODE_ENV!=="production"){const r=Ln("Form.Item");process.env.NODE_ENV!=="production"&&r(e!==void 0,"usage","Form.Item.useStatus should be used under Form.Item component. For more information: https://u.ant.design/form-item-usestatus")}return{status:e,errors:t,warnings:n}};ky.Context=ar;function VA(e){const[t,n]=v.useState(e),r=j.useRef(null),o=j.useRef([]),l=j.useRef(!1);v.useEffect(()=>(l.current=!1,()=>{l.current=!0,fn.cancel(r.current),r.current=null}),[]);function s(c){l.current||(r.current===null&&(o.current=[],r.current=fn(()=>{r.current=null,n(u=>{let f=u;return o.current.forEach(h=>{f=h(f)}),f})})),o.current.push(c))}return[t,s]}function zA(){const{itemRef:e}=v.useContext(Do),t=v.useRef({});function n(r,o){const l=o&&typeof o=="object"&&o.ref,s=r.join("_");return(t.current.name!==s||t.current.originRef!==l)&&(t.current.name=s,t.current.originRef=l,t.current.ref=co(e(r),l)),t.current.ref}return n}const jA=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},BA=F0(["Form","item-item"],(e,t)=>{let{rootPrefixCls:n}=t;const r=Ly(e,n);return[jA(r)]}),HA=e=>{const{prefixCls:t,status:n,wrapperCol:r,children:o,errors:l,warnings:s,_internalItemRender:c,extra:u,help:f,fieldId:h,marginBottom:g,onErrorVisibleChanged:p}=e,y=`${t}-item`,x=v.useContext(Do),S=r||x.wrapperCol||{},m=Ee(`${y}-control`,S.className),C=v.useMemo(()=>Object.assign({},x),[x]);delete C.labelCol,delete C.wrapperCol;const w=v.createElement("div",{className:`${y}-control-input`},v.createElement("div",{className:`${y}-control-input-content`},o)),E=v.useMemo(()=>({prefixCls:t,status:n}),[t,n]),O=g!==null||l.length||s.length?v.createElement("div",{style:{display:"flex",flexWrap:"nowrap"}},v.createElement(_f.Provider,{value:E},v.createElement(Vy,{fieldId:h,errors:l,warnings:s,help:f,helpStatus:n,className:`${y}-explain-connected`,onVisibleChanged:p})),!!g&&v.createElement("div",{style:{width:0,height:g}})):null,R={};h&&(R.id=`${h}_extra`);const $=u?v.createElement("div",Object.assign({},R,{className:`${y}-extra`}),u):null,I=c&&c.mark==="pro_table_render"&&c.render?c.render(e,{input:w,errorList:O,extra:$}):v.createElement(v.Fragment,null,w,O,$);return v.createElement(Do.Provider,{value:C},v.createElement(ya,Object.assign({},S,{className:m}),I),v.createElement(BA,{prefixCls:t}))};var kA={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M623.6 316.7C593.6 290.4 554 276 512 276s-81.6 14.5-111.6 40.7C369.2 344 352 380.7 352 420v7.6c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V420c0-44.1 43.1-80 96-80s96 35.9 96 80c0 31.1-22 59.6-56.1 72.7-21.2 8.1-39.2 22.3-52.1 40.9-13.1 19-19.9 41.8-19.9 64.9V620c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8v-22.7a48.3 48.3 0 0130.9-44.8c59-22.7 97.1-74.7 97.1-132.5.1-39.3-17.1-76-48.3-103.3zM472 732a40 40 0 1080 0 40 40 0 10-80 0z"}}]},name:"question-circle",theme:"outlined"},WA=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:kA}))},Wy=v.forwardRef(WA);process.env.NODE_ENV!=="production"&&(Wy.displayName="QuestionCircleOutlined");var KA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function UA(e){return e?typeof e=="object"&&!v.isValidElement(e)?e:{title:e}:null}const qA=e=>{let{prefixCls:t,label:n,htmlFor:r,labelCol:o,labelAlign:l,colon:s,required:c,requiredMark:u,tooltip:f}=e;var h;const[g]=h0("Form"),{vertical:p,labelAlign:y,labelCol:x,labelWrap:S,colon:m}=v.useContext(Do);if(!n)return null;const C=o||x||{},w=l||y,E=`${t}-item-label`,O=Ee(E,w==="left"&&`${E}-left`,C.className,{[`${E}-wrap`]:!!S});let R=n;const $=s===!0||m!==!1&&s!==!1;$&&!p&&typeof n=="string"&&n.trim()!==""&&(R=n.replace(/[:|:]\s*$/,""));const N=UA(f);if(N){const{icon:U=v.createElement(Wy,null)}=N,k=KA(N,["icon"]),L=v.createElement(jf,Object.assign({},k),v.cloneElement(U,{className:`${t}-item-tooltip`,title:"",onClick:H=>{H.preventDefault()},tabIndex:null}));R=v.createElement(v.Fragment,null,R,L)}const P=u==="optional",A=typeof u=="function";A?R=u(R,{required:!!c}):P&&!c&&(R=v.createElement(v.Fragment,null,R,v.createElement("span",{className:`${t}-item-optional`,title:""},(g==null?void 0:g.optional)||((h=Oi.Form)===null||h===void 0?void 0:h.optional))));const B=Ee({[`${t}-item-required`]:c,[`${t}-item-required-mark-optional`]:P||A,[`${t}-item-no-colon`]:!$});return v.createElement(ya,Object.assign({},C,{className:O}),v.createElement("label",{htmlFor:r,className:B,title:typeof n=="string"?n:""},R))},GA={success:J0,warning:tb,error:xl,validating:wl};function Ky(e){let{children:t,errors:n,warnings:r,hasFeedback:o,validateStatus:l,prefixCls:s,meta:c,noStyle:u}=e;const f=`${s}-item`,{feedbackIcons:h}=v.useContext(Do),g=jy(n,r,c,null,!!o,l),{isFormItemInput:p,status:y,hasFeedback:x,feedbackIcon:S}=v.useContext(ar),m=v.useMemo(()=>{var C;let w;if(o){const O=o!==!0&&o.icons||h,R=g&&((C=O==null?void 0:O({status:g,errors:n,warnings:r}))===null||C===void 0?void 0:C[g]),$=g&&GA[g];w=R!==!1&&$?v.createElement("span",{className:Ee(`${f}-feedback-icon`,`${f}-feedback-icon-${g}`)},R||v.createElement($,null)):null}const E={status:g||"",errors:n,warnings:r,hasFeedback:!!o,feedbackIcon:w,isFormItemInput:!0};return u&&(E.status=(g??y)||"",E.isFormItemInput=p,E.hasFeedback=!!(o??x),E.feedbackIcon=o!==void 0?E.feedbackIcon:S),E},[g,o,u,p,y]);return v.createElement(ar.Provider,{value:m},t)}var XA=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function YA(e){const{prefixCls:t,className:n,rootClassName:r,style:o,help:l,errors:s,warnings:c,validateStatus:u,meta:f,hasFeedback:h,hidden:g,children:p,fieldId:y,required:x,isRequired:S,onSubItemMetaChange:m}=e,C=XA(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange"]),w=`${t}-item`,{requiredMark:E}=v.useContext(Do),O=v.useRef(null),R=Qs(s),$=Qs(c),I=l!=null,N=!!(I||s.length||c.length),P=!!O.current&&yf(O.current),[A,B]=v.useState(null);rn(()=>{if(N&&O.current){const V=getComputedStyle(O.current);B(parseInt(V.marginBottom,10))}},[N,P]);const U=V=>{V||B(null)},L=function(){let V=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const D=V?R:f.errors,F=V?$:f.warnings;return jy(D,F,f,"",!!h,u)}(),H=Ee(w,n,r,{[`${w}-with-help`]:I||R.length||$.length,[`${w}-has-feedback`]:L&&h,[`${w}-has-success`]:L==="success",[`${w}-has-warning`]:L==="warning",[`${w}-has-error`]:L==="error",[`${w}-is-validating`]:L==="validating",[`${w}-hidden`]:g});return v.createElement("div",{className:H,style:o,ref:O},v.createElement(pc,Object.assign({className:`${w}-row`},uo(C,["_internalItemRender","colon","dependencies","extra","fieldKey","getValueFromEvent","getValueProps","htmlFor","id","initialValue","isListField","label","labelAlign","labelCol","labelWrap","messageVariables","name","normalize","noStyle","preserve","requiredMark","rules","shouldUpdate","trigger","tooltip","validateFirst","validateTrigger","valuePropName","wrapperCol","validateDebounce"])),v.createElement(qA,Object.assign({htmlFor:y},e,{requiredMark:E,required:x??S,prefixCls:t})),v.createElement(HA,Object.assign({},e,f,{errors:R,warnings:$,prefixCls:t,status:L,help:l,marginBottom:A,onErrorVisibleChanged:U}),v.createElement(Sb.Provider,{value:m},v.createElement(Ky,{prefixCls:t,meta:f,errors:f.errors,warnings:f.warnings,hasFeedback:h,validateStatus:L},p)))),!!A&&v.createElement("div",{className:`${w}-margin-offset`,style:{marginBottom:-A}}))}const ZA="__SPLIT__";function QA(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(o=>{const l=e[o],s=t[o];return l===s||typeof l=="function"||typeof s=="function"})}const JA=v.memo(e=>{let{children:t}=e;return t},(e,t)=>QA(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function am(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function eF(e){const{name:t,noStyle:n,className:r,dependencies:o,prefixCls:l,shouldUpdate:s,rules:c,children:u,required:f,label:h,messageVariables:g,trigger:p="onChange",validateTrigger:y,hidden:x,help:S}=e,{getPrefixCls:m}=v.useContext(Gt),{name:C}=v.useContext(Do),w=LA(u),E=typeof w=="function",O=v.useContext(Sb),{validateTrigger:R}=v.useContext(Ii),$=y!==void 0?y:R,I=t!=null,N=m("form",l),P=Br(N),[A,B,U]=qf(N,P),k=Ln("Form.Item");process.env.NODE_ENV!=="production"&&process.env.NODE_ENV!=="production"&&k(t!==null,"usage","`null` is passed as `name` property");const L=v.useContext(hl),H=v.useRef(),[V,D]=VA({}),[F,Y]=xi(()=>am()),q=de=>{const ye=L==null?void 0:L.getKey(de.name);if(Y(de.destroy?am():de,!0),n&&S!==!1&&O){let pe=de.name;if(de.destroy)pe=H.current||pe;else if(ye!==void 0){const[ce,te]=ye;pe=[ce].concat(Me(te)),H.current=pe}O(de,pe)}},X=(de,ye)=>{D(pe=>{const ce=Object.assign({},pe),me=[].concat(Me(de.name.slice(0,-1)),Me(ye)).join(ZA);return de.destroy?delete ce[me]:ce[me]=de,ce})},[ne,re]=v.useMemo(()=>{const de=Me(F.errors),ye=Me(F.warnings);return Object.values(V).forEach(pe=>{de.push.apply(de,Me(pe.errors||[])),ye.push.apply(ye,Me(pe.warnings||[]))}),[de,ye]},[V,F.errors,F.warnings]),ve=zA();function oe(de,ye,pe){return n&&!x?v.createElement(Ky,{prefixCls:N,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:F,errors:ne,warnings:re,noStyle:!0},de):v.createElement(YA,Object.assign({key:"row"},e,{className:Ee(r,U,P,B),prefixCls:N,fieldId:ye,isRequired:pe,errors:ne,warnings:re,meta:F,onSubItemMetaChange:X}),de)}if(!I&&!E&&!o)return A(oe(w));let ge={};return typeof h=="string"?ge.label=h:t&&(ge.label=String(t)),g&&(ge=Object.assign(Object.assign({},ge),g)),A(v.createElement(Of,Object.assign({},e,{messageVariables:ge,trigger:p,validateTrigger:$,onMetaChange:q}),(de,ye,pe)=>{const ce=al(t).length&&ye?ye.name:[],te=zy(ce,C),me=f!==void 0?f:!!(c&&c.some(ae=>{if(ae&&typeof ae=="object"&&ae.required&&!ae.warningOnly)return!0;if(typeof ae=="function"){const Pe=ae(pe);return Pe&&Pe.required&&!Pe.warningOnly}return!1})),Ne=Object.assign({},de);let Z=null;if(process.env.NODE_ENV!=="production"&&k(!(s&&o),"usage","`shouldUpdate` and `dependencies` shouldn't be used together. See https://u.ant.design/form-deps."),Array.isArray(w)&&I)process.env.NODE_ENV!=="production"&&k(!1,"usage","A `Form.Item` with a `name` prop must have a single child element. For information on how to render more complex form items, see https://u.ant.design/complex-form-item."),Z=w;else if(E&&(!(s||o)||I))process.env.NODE_ENV!=="production"&&k(!!(s||o),"usage","A `Form.Item` with a render function must have either `shouldUpdate` or `dependencies`."),process.env.NODE_ENV!=="production"&&k(!I,"usage","A `Form.Item` with a render function cannot be a field, and thus cannot have a `name` prop.");else if(o&&!E&&!I)process.env.NODE_ENV!=="production"&&k(!1,"usage","Must set `name` or use a render function when `dependencies` is set.");else if(ma(w)){process.env.NODE_ENV!=="production"&&k(w.props.defaultValue===void 0,"usage","`defaultValue` will not work on controlled Field. You should use `initialValues` of Form instead.");const ae=Object.assign(Object.assign({},w.props),Ne);if(ae.id||(ae.id=te),S||ne.length>0||re.length>0||e.extra){const je=[];(S||ne.length>0)&&je.push(`${te}_help`),e.extra&&je.push(`${te}_extra`),ae["aria-describedby"]=je.join(" ")}ne.length>0&&(ae["aria-invalid"]="true"),me&&(ae["aria-required"]="true"),Ca(w)&&(ae.ref=ve(ce,w)),new Set([].concat(Me(al(p)),Me(al($)))).forEach(je=>{ae[je]=function(){for(var fe,se,be,ke,$e,Je=arguments.length,Ge=new Array(Je),He=0;He<Je;He++)Ge[He]=arguments[He];(be=Ne[je])===null||be===void 0||(fe=be).call.apply(fe,[Ne].concat(Ge)),($e=(ke=w.props)[je])===null||$e===void 0||(se=$e).call.apply(se,[ke].concat(Ge))}});const Te=[ae["aria-required"],ae["aria-invalid"],ae["aria-describedby"]];Z=v.createElement(JA,{control:Ne,update:w,childProps:Te},ei(w,ae))}else E&&(s||o)&&!I?Z=w(pe):(process.env.NODE_ENV!=="production"&&k(!ce.length,"usage","`name` is only used for validate React element. If you are using Form.Item as layout display, please remove `name` instead."),Z=w);return oe(Z,te,me)}))}const Uy=eF;Uy.useStatus=ky;var tF=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const nF=e=>{var{prefixCls:t,children:n}=e,r=tF(e,["prefixCls","children"]);if(process.env.NODE_ENV!=="production"){const c=Ln("Form.List");process.env.NODE_ENV!=="production"&&c(typeof r.name=="number"||(Array.isArray(r.name)?!!r.name.length:!!r.name),"usage","Miss `name` prop.")}const{getPrefixCls:o}=v.useContext(Gt),l=o("form",t),s=v.useMemo(()=>({prefixCls:l,status:"error"}),[l]);return v.createElement(pb,Object.assign({},r),(c,u,f)=>v.createElement(_f.Provider,{value:s},n(c.map(h=>Object.assign(Object.assign({},h),{fieldKey:h.key})),u,{errors:f.errors,warnings:f.warnings})))};function rF(){const{form:e}=j.useContext(Do);return e}const Vr=Hy;Vr.Item=Uy;Vr.List=nF;Vr.ErrorList=Vy;Vr.useForm=By;Vr.useFormInstance=rF;Vr.useWatch=yb;Vr.Provider=Cb;Vr.create=()=>{process.env.NODE_ENV!=="production"&&Pi(!1,"Form","antd v4 removed `Form.create`. Please remove or use `@ant-design/compatible` instead.")};var Gf=v.createContext(null),oF=function(t){for(var n=t.prefixCls,r=t.level,o=t.isStart,l=t.isEnd,s="".concat(n,"-indent-unit"),c=[],u=0;u<r;u+=1)c.push(v.createElement("span",{key:u,className:Ee(s,z(z({},"".concat(s,"-start"),o[u]),"".concat(s,"-end"),l[u]))}));return v.createElement("span",{"aria-hidden":"true",className:"".concat(n,"-indent")},c)};const iF=v.memo(oF);var aF=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],lm="open",sm="close",lF="---",sF=function(e){ti(n,e);var t=xa(n);function n(){var r;Gn(this,n);for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return r=t.call.apply(t,[this].concat(l)),z(we(r),"state",{dragNodeHighlight:!1}),z(we(r),"selectHandle",void 0),z(we(r),"cacheIndent",void 0),z(we(r),"onSelectorClick",function(c){var u=r.props.context.onNodeClick;u(c,Pn(r.props)),r.isSelectable()?r.onSelect(c):r.onCheck(c)}),z(we(r),"onSelectorDoubleClick",function(c){var u=r.props.context.onNodeDoubleClick;u(c,Pn(r.props))}),z(we(r),"onSelect",function(c){if(!r.isDisabled()){var u=r.props.context.onNodeSelect;u(c,Pn(r.props))}}),z(we(r),"onCheck",function(c){if(!r.isDisabled()){var u=r.props,f=u.disableCheckbox,h=u.checked,g=r.props.context.onNodeCheck;if(!(!r.isCheckable()||f)){var p=!h;g(c,Pn(r.props),p)}}}),z(we(r),"onMouseEnter",function(c){var u=r.props.context.onNodeMouseEnter;u(c,Pn(r.props))}),z(we(r),"onMouseLeave",function(c){var u=r.props.context.onNodeMouseLeave;u(c,Pn(r.props))}),z(we(r),"onContextMenu",function(c){var u=r.props.context.onNodeContextMenu;u(c,Pn(r.props))}),z(we(r),"onDragStart",function(c){var u=r.props.context.onNodeDragStart;c.stopPropagation(),r.setState({dragNodeHighlight:!0}),u(c,we(r));try{c.dataTransfer.setData("text/plain","")}catch{}}),z(we(r),"onDragEnter",function(c){var u=r.props.context.onNodeDragEnter;c.preventDefault(),c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragOver",function(c){var u=r.props.context.onNodeDragOver;c.preventDefault(),c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragLeave",function(c){var u=r.props.context.onNodeDragLeave;c.stopPropagation(),u(c,we(r))}),z(we(r),"onDragEnd",function(c){var u=r.props.context.onNodeDragEnd;c.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(c,we(r))}),z(we(r),"onDrop",function(c){var u=r.props.context.onNodeDrop;c.preventDefault(),c.stopPropagation(),r.setState({dragNodeHighlight:!1}),u(c,we(r))}),z(we(r),"onExpand",function(c){var u=r.props,f=u.loading,h=u.context.onNodeExpand;f||h(c,Pn(r.props))}),z(we(r),"setSelectHandle",function(c){r.selectHandle=c}),z(we(r),"getNodeState",function(){var c=r.props.expanded;return r.isLeaf()?null:c?lm:sm}),z(we(r),"hasChildren",function(){var c=r.props.eventKey,u=r.props.context.keyEntities,f=hr(u,c)||{},h=f.children;return!!(h||[]).length}),z(we(r),"isLeaf",function(){var c=r.props,u=c.isLeaf,f=c.loaded,h=r.props.context.loadData,g=r.hasChildren();return u===!1?!1:u||!h&&!g||h&&f&&!g}),z(we(r),"isDisabled",function(){var c=r.props.disabled,u=r.props.context.disabled;return!!(u||c)}),z(we(r),"isCheckable",function(){var c=r.props.checkable,u=r.props.context.checkable;return!u||c===!1?!1:u}),z(we(r),"syncLoadData",function(c){var u=c.expanded,f=c.loading,h=c.loaded,g=r.props.context,p=g.loadData,y=g.onNodeLoad;f||p&&u&&!r.isLeaf()&&!h&&y(Pn(r.props))}),z(we(r),"isDraggable",function(){var c=r.props,u=c.data,f=c.context.draggable;return!!(f&&(!f.nodeDraggable||f.nodeDraggable(u)))}),z(we(r),"renderDragHandler",function(){var c=r.props.context,u=c.draggable,f=c.prefixCls;return u!=null&&u.icon?v.createElement("span",{className:"".concat(f,"-draggable-icon")},u.icon):null}),z(we(r),"renderSwitcherIconDom",function(c){var u=r.props.switcherIcon,f=r.props.context.switcherIcon,h=u||f;return typeof h=="function"?h(Q(Q({},r.props),{},{isLeaf:c})):h}),z(we(r),"renderSwitcher",function(){var c=r.props.expanded,u=r.props.context.prefixCls;if(r.isLeaf()){var f=r.renderSwitcherIconDom(!0);return f!==!1?v.createElement("span",{className:Ee("".concat(u,"-switcher"),"".concat(u,"-switcher-noop"))},f):null}var h=Ee("".concat(u,"-switcher"),"".concat(u,"-switcher_").concat(c?lm:sm)),g=r.renderSwitcherIconDom(!1);return g!==!1?v.createElement("span",{onClick:r.onExpand,className:h},g):null}),z(we(r),"renderCheckbox",function(){var c=r.props,u=c.checked,f=c.halfChecked,h=c.disableCheckbox,g=r.props.context.prefixCls,p=r.isDisabled(),y=r.isCheckable();if(!y)return null;var x=typeof y!="boolean"?y:null;return v.createElement("span",{className:Ee("".concat(g,"-checkbox"),u&&"".concat(g,"-checkbox-checked"),!u&&f&&"".concat(g,"-checkbox-indeterminate"),(p||h)&&"".concat(g,"-checkbox-disabled")),onClick:r.onCheck},x)}),z(we(r),"renderIcon",function(){var c=r.props.loading,u=r.props.context.prefixCls;return v.createElement("span",{className:Ee("".concat(u,"-iconEle"),"".concat(u,"-icon__").concat(r.getNodeState()||"docu"),c&&"".concat(u,"-icon_loading"))})}),z(we(r),"renderSelector",function(){var c=r.state.dragNodeHighlight,u=r.props,f=u.title,h=f===void 0?lF:f,g=u.selected,p=u.icon,y=u.loading,x=u.data,S=r.props.context,m=S.prefixCls,C=S.showIcon,w=S.icon,E=S.loadData,O=S.titleRender,R=r.isDisabled(),$="".concat(m,"-node-content-wrapper"),I;if(C){var N=p||w;I=N?v.createElement("span",{className:Ee("".concat(m,"-iconEle"),"".concat(m,"-icon__customize"))},typeof N=="function"?N(r.props):N):r.renderIcon()}else E&&y&&(I=r.renderIcon());var P;typeof h=="function"?P=h(x):O?P=O(x):P=h;var A=v.createElement("span",{className:"".concat(m,"-title")},P);return v.createElement("span",{ref:r.setSelectHandle,title:typeof h=="string"?h:"",className:Ee("".concat($),"".concat($,"-").concat(r.getNodeState()||"normal"),!R&&(g||c)&&"".concat(m,"-node-selected")),onMouseEnter:r.onMouseEnter,onMouseLeave:r.onMouseLeave,onContextMenu:r.onContextMenu,onClick:r.onSelectorClick,onDoubleClick:r.onSelectorDoubleClick},I,A,r.renderDropIndicator())}),z(we(r),"renderDropIndicator",function(){var c=r.props,u=c.disabled,f=c.eventKey,h=r.props.context,g=h.draggable,p=h.dropLevelOffset,y=h.dropPosition,x=h.prefixCls,S=h.indent,m=h.dropIndicatorRender,C=h.dragOverNodeKey,w=h.direction,E=!!g,O=!u&&E&&C===f,R=S??r.cacheIndent;return r.cacheIndent=S,O?m({dropPosition:y,dropLevelOffset:p,indent:R,prefixCls:x,direction:w}):null}),r}return Xn(n,[{key:"componentDidMount",value:function(){this.syncLoadData(this.props)}},{key:"componentDidUpdate",value:function(){this.syncLoadData(this.props)}},{key:"isSelectable",value:function(){var o=this.props.selectable,l=this.props.context.selectable;return typeof o=="boolean"?o:l}},{key:"render",value:function(){var o,l=this.props,s=l.eventKey,c=l.className,u=l.style,f=l.dragOver,h=l.dragOverGapTop,g=l.dragOverGapBottom,p=l.isLeaf,y=l.isStart,x=l.isEnd,S=l.expanded,m=l.selected,C=l.checked,w=l.halfChecked,E=l.loading,O=l.domRef,R=l.active;l.data;var $=l.onMouseMove,I=l.selectable,N=Kt(l,aF),P=this.props.context,A=P.prefixCls,B=P.filterTreeNode,U=P.keyEntities,k=P.dropContainerKey,L=P.dropTargetKey,H=P.draggingNodeKey,V=this.isDisabled(),D=Ri(N,{aria:!0,data:!0}),F=hr(U,s)||{},Y=F.level,q=x[x.length-1],X=this.isDraggable(),ne=!V&&X,re=H===s,ve=I!==void 0?{"aria-selected":!!I}:void 0;return v.createElement("div",it({ref:O,className:Ee(c,"".concat(A,"-treenode"),(o={},z(z(z(z(z(z(z(z(z(z(o,"".concat(A,"-treenode-disabled"),V),"".concat(A,"-treenode-switcher-").concat(S?"open":"close"),!p),"".concat(A,"-treenode-checkbox-checked"),C),"".concat(A,"-treenode-checkbox-indeterminate"),w),"".concat(A,"-treenode-selected"),m),"".concat(A,"-treenode-loading"),E),"".concat(A,"-treenode-active"),R),"".concat(A,"-treenode-leaf-last"),q),"".concat(A,"-treenode-draggable"),X),"dragging",re),z(z(z(z(z(z(o,"drop-target",L===s),"drop-container",k===s),"drag-over",!V&&f),"drag-over-gap-top",!V&&h),"drag-over-gap-bottom",!V&&g),"filter-node",B&&B(Pn(this.props))))),style:u,draggable:ne,"aria-grabbed":re,onDragStart:ne?this.onDragStart:void 0,onDragEnter:X?this.onDragEnter:void 0,onDragOver:X?this.onDragOver:void 0,onDragLeave:X?this.onDragLeave:void 0,onDrop:X?this.onDrop:void 0,onDragEnd:X?this.onDragEnd:void 0,onMouseMove:$},ve,D),v.createElement(iF,{prefixCls:A,level:Y,isStart:y,isEnd:x}),this.renderDragHandler(),this.renderSwitcher(),this.renderCheckbox(),this.renderSelector())}}]),n}(v.Component),Sa=function(t){return v.createElement(Gf.Consumer,null,function(n){return v.createElement(sF,it({},t,{context:n}))})};Sa.displayName="TreeNode";Sa.isTreeNode=1;function _o(e,t){if(!e)return[];var n=e.slice(),r=n.indexOf(t);return r>=0&&n.splice(r,1),n}function Go(e,t){var n=(e||[]).slice();return n.indexOf(t)===-1&&n.push(t),n}function Xf(e){return e.split("-")}function cF(e,t){var n=[],r=hr(t,e);function o(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];l.forEach(function(s){var c=s.key,u=s.children;n.push(c),o(u)})}return o(r.children),n}function uF(e){if(e.parent){var t=Xf(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function dF(e){var t=Xf(e.pos);return Number(t[t.length-1])===0}function cm(e,t,n,r,o,l,s,c,u,f){var h,g=e.clientX,p=e.clientY,y=e.target.getBoundingClientRect(),x=y.top,S=y.height,m=(f==="rtl"?-1:1)*(((o==null?void 0:o.x)||0)-g),C=(m-12)/r,w=u.filter(function(V){var D;return(D=c[V])===null||D===void 0||(D=D.children)===null||D===void 0?void 0:D.length}),E=hr(c,n.props.eventKey);if(p<x+S/2){var O=s.findIndex(function(V){return V.key===E.key}),R=O<=0?0:O-1,$=s[R].key;E=hr(c,$)}var I=E.key,N=E,P=E.key,A=0,B=0;if(!w.includes(I))for(var U=0;U<C&&uF(E);U+=1)E=E.parent,B+=1;var k=t.props.data,L=E.node,H=!0;return dF(E)&&E.level===0&&p<x+S/2&&l({dragNode:k,dropNode:L,dropPosition:-1})&&E.key===n.props.eventKey?A=-1:(N.children||[]).length&&w.includes(P)?l({dragNode:k,dropNode:L,dropPosition:0})?A=0:H=!1:B===0?C>-1.5?l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1:l({dragNode:k,dropNode:L,dropPosition:0})?A=0:l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1:l({dragNode:k,dropNode:L,dropPosition:1})?A=1:H=!1,{dropPosition:A,dropLevelOffset:B,dropTargetKey:E.key,dropTargetPos:E.pos,dragOverNodeKey:P,dropContainerKey:A===0?null:((h=E.parent)===null||h===void 0?void 0:h.key)||null,dropAllowed:H}}function um(e,t){if(e){var n=t.multiple;return n?e.slice():e.length?[e[0]]:e}}function td(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else if(xt(e)==="object")t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0};else return ut(!1,"`checkedKeys` is not an array or an object"),null;return t}function Zd(e,t){var n=new Set;function r(o){if(!n.has(o)){var l=hr(t,o);if(l){n.add(o);var s=l.parent,c=l.node;c.disabled||s&&r(s.key)}}}return(e||[]).forEach(function(o){r(o)}),Me(n)}function fF(e){var t=e.dropPosition,n=e.dropLevelOffset,r=e.indent,o={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:o.top=0,o.left=-n*r;break;case 1:o.bottom=0,o.left=-n*r;break;case 0:o.bottom=0,o.left=r;break}return v.createElement("div",{style:o})}function qy(e){if(e==null)throw new TypeError("Cannot destructure "+e)}function vF(e,t){var n=v.useState(!1),r=le(n,2),o=r[0],l=r[1];rn(function(){if(o)return e(),function(){t()}},[o]),rn(function(){return l(!0),function(){l(!1)}},[])}var hF=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Gy=function(t,n){var r=t.className,o=t.style,l=t.motion,s=t.motionNodes,c=t.motionType,u=t.onMotionStart,f=t.onMotionEnd,h=t.active,g=t.treeNodeRequiredProps,p=Kt(t,hF),y=v.useState(!0),x=le(y,2),S=x[0],m=x[1],C=v.useContext(Gf),w=C.prefixCls,E=s&&c!=="hide";rn(function(){s&&E!==S&&m(E)},[s]);var O=function(){s&&u()},R=v.useRef(!1),$=function(){s&&!R.current&&(R.current=!0,f())};vF(O,$);var I=function(P){E===P&&$()};return s?v.createElement(Ti,it({ref:n,visible:S},l,{motionAppear:c==="show",onVisibleChanged:I}),function(N,P){var A=N.className,B=N.style;return v.createElement("div",{ref:P,className:Ee("".concat(w,"-treenode-motion"),A),style:B},s.map(function(U){var k=Object.assign({},(qy(U.data),U.data)),L=U.title,H=U.key,V=U.isStart,D=U.isEnd;delete k.children;var F=il(H,g);return v.createElement(Sa,it({},k,F,{title:L,active:h,data:U.data,key:H,isStart:V,isEnd:D}))}))}):v.createElement(Sa,it({domRef:n,className:r,style:o},p,{active:h}))};Gy.displayName="MotionTreeNode";var gF=v.forwardRef(Gy);function pF(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=e.length,r=t.length;if(Math.abs(n-r)!==1)return{add:!1,key:null};function o(l,s){var c=new Map;l.forEach(function(f){c.set(f,!0)});var u=s.filter(function(f){return!c.has(f)});return u.length===1?u[0]:null}return n<r?{add:!0,key:o(e,t)}:{add:!1,key:o(t,e)}}function dm(e,t,n){var r=e.findIndex(function(c){return c.key===n}),o=e[r+1],l=t.findIndex(function(c){return c.key===n});if(o){var s=t.findIndex(function(c){return c.key===o.key});return t.slice(l+1,s)}return t.slice(l+1)}var mF=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],fm={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},bF=function(){},Ni="RC_TREE_MOTION_".concat(Math.random()),Qd={key:Ni},Xy={key:Ni,level:0,index:0,pos:"0",node:Qd,nodes:[Qd]},vm={parent:null,children:[],pos:Xy.pos,data:Qd,title:null,key:Ni,isStart:[],isEnd:[]};function hm(e,t,n,r){return t===!1||!n?e:e.slice(0,Math.ceil(n/r)+1)}function gm(e){var t=e.key,n=e.pos;return Nl(t,n)}function yF(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}var Yy=v.forwardRef(function(e,t){var n=e.prefixCls,r=e.data;e.selectable,e.checkable;var o=e.expandedKeys,l=e.selectedKeys,s=e.checkedKeys,c=e.loadedKeys,u=e.loadingKeys,f=e.halfCheckedKeys,h=e.keyEntities,g=e.disabled,p=e.dragging,y=e.dragOverNodeKey,x=e.dropPosition,S=e.motion,m=e.height,C=e.itemHeight,w=e.virtual,E=e.focusable,O=e.activeItem,R=e.focused,$=e.tabIndex,I=e.onKeyDown,N=e.onFocus,P=e.onBlur,A=e.onActiveChange,B=e.onListChangeStart,U=e.onListChangeEnd,k=Kt(e,mF),L=v.useRef(null),H=v.useRef(null);v.useImperativeHandle(t,function(){return{scrollTo:function(be){L.current.scrollTo(be)},getIndentWidth:function(){return H.current.offsetWidth}}});var V=v.useState(o),D=le(V,2),F=D[0],Y=D[1],q=v.useState(r),X=le(q,2),ne=X[0],re=X[1],ve=v.useState(r),oe=le(ve,2),ge=oe[0],de=oe[1],ye=v.useState([]),pe=le(ye,2),ce=pe[0],te=pe[1],me=v.useState(null),Ne=le(me,2),Z=Ne[0],ae=Ne[1],Pe=v.useRef(r);Pe.current=r;function Te(){var se=Pe.current;re(se),de(se),te([]),ae(null),U()}rn(function(){Y(o);var se=pF(F,o);if(se.key!==null)if(se.add){var be=ne.findIndex(function(De){var et=De.key;return et===se.key}),ke=hm(dm(ne,r,se.key),w,m,C),$e=ne.slice();$e.splice(be+1,0,vm),de($e),te(ke),ae("show")}else{var Je=r.findIndex(function(De){var et=De.key;return et===se.key}),Ge=hm(dm(r,ne,se.key),w,m,C),He=r.slice();He.splice(Je+1,0,vm),de(He),te(Ge),ae("hide")}else ne!==r&&(re(r),de(r))},[o,r]),v.useEffect(function(){p||Te()},[p]);var je=S?ge:r,fe={expandedKeys:o,selectedKeys:l,loadedKeys:c,loadingKeys:u,checkedKeys:s,halfCheckedKeys:f,dragOverNodeKey:y,dropPosition:x,keyEntities:h};return v.createElement(v.Fragment,null,R&&O&&v.createElement("span",{style:fm,"aria-live":"assertive"},yF(O)),v.createElement("div",null,v.createElement("input",{style:fm,disabled:E===!1||g,tabIndex:E!==!1?$:null,onKeyDown:I,onFocus:N,onBlur:P,value:"",onChange:bF,"aria-label":"for screen reader"})),v.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},v.createElement("div",{className:"".concat(n,"-indent")},v.createElement("div",{ref:H,className:"".concat(n,"-indent-unit")}))),v.createElement(Ff,it({},k,{data:je,itemKey:gm,height:m,fullHeight:!1,virtual:w,itemHeight:C,prefixCls:"".concat(n,"-list"),ref:L,onVisibleChange:function(be,ke){var $e=new Set(be),Je=ke.filter(function(Ge){return!$e.has(Ge)});Je.some(function(Ge){return gm(Ge)===Ni})&&Te()}}),function(se){var be=se.pos,ke=Object.assign({},(qy(se.data),se.data)),$e=se.title,Je=se.key,Ge=se.isStart,He=se.isEnd,De=Nl(Je,be);delete ke.key,delete ke.children;var et=il(De,fe);return v.createElement(gF,it({},ke,et,{title:$e,active:!!O&&Je===O.key,pos:be,data:se.data,isStart:Ge,isEnd:He,motion:S,motionNodes:Je===Ni?ce:null,motionType:Z,onMotionStart:B,onMotionEnd:Te,treeNodeRequiredProps:fe,onMouseMove:function(){A(null)}}))}))});Yy.displayName="NodeList";var SF=10,mc=function(e){ti(n,e);var t=xa(n);function n(){var r;Gn(this,n);for(var o=arguments.length,l=new Array(o),s=0;s<o;s++)l[s]=arguments[s];return r=t.call.apply(t,[this].concat(l)),z(we(r),"destroyed",!1),z(we(r),"delayedDragEnterLogic",void 0),z(we(r),"loadingRetryTimes",{}),z(we(r),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:ba()}),z(we(r),"dragStartMousePosition",null),z(we(r),"dragNode",void 0),z(we(r),"currentMouseOverDroppableNodeKey",null),z(we(r),"listRef",v.createRef()),z(we(r),"onNodeDragStart",function(c,u){var f=r.state,h=f.expandedKeys,g=f.keyEntities,p=r.props.onDragStart,y=u.props.eventKey;r.dragNode=u,r.dragStartMousePosition={x:c.clientX,y:c.clientY};var x=_o(h,y);r.setState({draggingNodeKey:y,dragChildrenKeys:cF(y,g),indent:r.listRef.current.getIndentWidth()}),r.setExpandedKeys(x),window.addEventListener("dragend",r.onWindowDragEnd),p==null||p({event:c,node:Pn(u.props)})}),z(we(r),"onNodeDragEnter",function(c,u){var f=r.state,h=f.expandedKeys,g=f.keyEntities,p=f.dragChildrenKeys,y=f.flattenNodes,x=f.indent,S=r.props,m=S.onDragEnter,C=S.onExpand,w=S.allowDrop,E=S.direction,O=u.props,R=O.pos,$=O.eventKey,I=we(r),N=I.dragNode;if(r.currentMouseOverDroppableNodeKey!==$&&(r.currentMouseOverDroppableNodeKey=$),!N){r.resetDragState();return}var P=cm(c,N,u,x,r.dragStartMousePosition,w,y,g,h,E),A=P.dropPosition,B=P.dropLevelOffset,U=P.dropTargetKey,k=P.dropContainerKey,L=P.dropTargetPos,H=P.dropAllowed,V=P.dragOverNodeKey;if(p.indexOf(U)!==-1||!H){r.resetDragState();return}if(r.delayedDragEnterLogic||(r.delayedDragEnterLogic={}),Object.keys(r.delayedDragEnterLogic).forEach(function(D){clearTimeout(r.delayedDragEnterLogic[D])}),N.props.eventKey!==u.props.eventKey&&(c.persist(),r.delayedDragEnterLogic[R]=window.setTimeout(function(){if(r.state.draggingNodeKey!==null){var D=Me(h),F=hr(g,u.props.eventKey);F&&(F.children||[]).length&&(D=Go(h,u.props.eventKey)),"expandedKeys"in r.props||r.setExpandedKeys(D),C==null||C(D,{node:Pn(u.props),expanded:!0,nativeEvent:c.nativeEvent})}},800)),N.props.eventKey===U&&B===0){r.resetDragState();return}r.setState({dragOverNodeKey:V,dropPosition:A,dropLevelOffset:B,dropTargetKey:U,dropContainerKey:k,dropTargetPos:L,dropAllowed:H}),m==null||m({event:c,node:Pn(u.props),expandedKeys:h})}),z(we(r),"onNodeDragOver",function(c,u){var f=r.state,h=f.dragChildrenKeys,g=f.flattenNodes,p=f.keyEntities,y=f.expandedKeys,x=f.indent,S=r.props,m=S.onDragOver,C=S.allowDrop,w=S.direction,E=we(r),O=E.dragNode;if(O){var R=cm(c,O,u,x,r.dragStartMousePosition,C,g,p,y,w),$=R.dropPosition,I=R.dropLevelOffset,N=R.dropTargetKey,P=R.dropContainerKey,A=R.dropAllowed,B=R.dropTargetPos,U=R.dragOverNodeKey;h.indexOf(N)!==-1||!A||(O.props.eventKey===N&&I===0?r.state.dropPosition===null&&r.state.dropLevelOffset===null&&r.state.dropTargetKey===null&&r.state.dropContainerKey===null&&r.state.dropTargetPos===null&&r.state.dropAllowed===!1&&r.state.dragOverNodeKey===null||r.resetDragState():$===r.state.dropPosition&&I===r.state.dropLevelOffset&&N===r.state.dropTargetKey&&P===r.state.dropContainerKey&&B===r.state.dropTargetPos&&A===r.state.dropAllowed&&U===r.state.dragOverNodeKey||r.setState({dropPosition:$,dropLevelOffset:I,dropTargetKey:N,dropContainerKey:P,dropTargetPos:B,dropAllowed:A,dragOverNodeKey:U}),m==null||m({event:c,node:Pn(u.props)}))}}),z(we(r),"onNodeDragLeave",function(c,u){r.currentMouseOverDroppableNodeKey===u.props.eventKey&&!c.currentTarget.contains(c.relatedTarget)&&(r.resetDragState(),r.currentMouseOverDroppableNodeKey=null);var f=r.props.onDragLeave;f==null||f({event:c,node:Pn(u.props)})}),z(we(r),"onWindowDragEnd",function(c){r.onNodeDragEnd(c,null,!0),window.removeEventListener("dragend",r.onWindowDragEnd)}),z(we(r),"onNodeDragEnd",function(c,u){var f=r.props.onDragEnd;r.setState({dragOverNodeKey:null}),r.cleanDragState(),f==null||f({event:c,node:Pn(u.props)}),r.dragNode=null,window.removeEventListener("dragend",r.onWindowDragEnd)}),z(we(r),"onNodeDrop",function(c,u){var f,h=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,g=r.state,p=g.dragChildrenKeys,y=g.dropPosition,x=g.dropTargetKey,S=g.dropTargetPos,m=g.dropAllowed;if(m){var C=r.props.onDrop;if(r.setState({dragOverNodeKey:null}),r.cleanDragState(),x!==null){var w=Q(Q({},il(x,r.getTreeNodeRequiredProps())),{},{active:((f=r.getActiveItem())===null||f===void 0?void 0:f.key)===x,data:hr(r.state.keyEntities,x).node}),E=p.indexOf(x)!==-1;ut(!E,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var O=Xf(S),R={event:c,node:Pn(w),dragNode:r.dragNode?Pn(r.dragNode.props):null,dragNodesKeys:[r.dragNode.props.eventKey].concat(p),dropToGap:y!==0,dropPosition:y+Number(O[O.length-1])};h||C==null||C(R),r.dragNode=null}}}),z(we(r),"cleanDragState",function(){var c=r.state.draggingNodeKey;c!==null&&r.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),r.dragStartMousePosition=null,r.currentMouseOverDroppableNodeKey=null}),z(we(r),"triggerExpandActionExpand",function(c,u){var f=r.state,h=f.expandedKeys,g=f.flattenNodes,p=u.expanded,y=u.key,x=u.isLeaf;if(!(x||c.shiftKey||c.metaKey||c.ctrlKey)){var S=g.filter(function(C){return C.key===y})[0],m=Pn(Q(Q({},il(y,r.getTreeNodeRequiredProps())),{},{data:S.data}));r.setExpandedKeys(p?_o(h,y):Go(h,y)),r.onNodeExpand(c,m)}}),z(we(r),"onNodeClick",function(c,u){var f=r.props,h=f.onClick,g=f.expandAction;g==="click"&&r.triggerExpandActionExpand(c,u),h==null||h(c,u)}),z(we(r),"onNodeDoubleClick",function(c,u){var f=r.props,h=f.onDoubleClick,g=f.expandAction;g==="doubleClick"&&r.triggerExpandActionExpand(c,u),h==null||h(c,u)}),z(we(r),"onNodeSelect",function(c,u){var f=r.state.selectedKeys,h=r.state,g=h.keyEntities,p=h.fieldNames,y=r.props,x=y.onSelect,S=y.multiple,m=u.selected,C=u[p.key],w=!m;w?S?f=Go(f,C):f=[C]:f=_o(f,C);var E=f.map(function(O){var R=hr(g,O);return R?R.node:null}).filter(function(O){return O});r.setUncontrolledState({selectedKeys:f}),x==null||x(f,{event:"select",selected:w,node:u,selectedNodes:E,nativeEvent:c.nativeEvent})}),z(we(r),"onNodeCheck",function(c,u,f){var h=r.state,g=h.keyEntities,p=h.checkedKeys,y=h.halfCheckedKeys,x=r.props,S=x.checkStrictly,m=x.onCheck,C=u.key,w,E={event:"check",node:u,checked:f,nativeEvent:c.nativeEvent};if(S){var O=f?Go(p,C):_o(p,C),R=_o(y,C);w={checked:O,halfChecked:R},E.checkedNodes=O.map(function(B){return hr(g,B)}).filter(function(B){return B}).map(function(B){return B.node}),r.setUncontrolledState({checkedKeys:O})}else{var $=va([].concat(Me(p),[C]),!0,g),I=$.checkedKeys,N=$.halfCheckedKeys;if(!f){var P=new Set(I);P.delete(C);var A=va(Array.from(P),{checked:!1,halfCheckedKeys:N},g);I=A.checkedKeys,N=A.halfCheckedKeys}w=I,E.checkedNodes=[],E.checkedNodesPositions=[],E.halfCheckedKeys=N,I.forEach(function(B){var U=hr(g,B);if(U){var k=U.node,L=U.pos;E.checkedNodes.push(k),E.checkedNodesPositions.push({node:k,pos:L})}}),r.setUncontrolledState({checkedKeys:I},!1,{halfCheckedKeys:N})}m==null||m(w,E)}),z(we(r),"onNodeLoad",function(c){var u,f=c.key,h=r.state.keyEntities,g=hr(h,f);if(!(g!=null&&(u=g.children)!==null&&u!==void 0&&u.length)){var p=new Promise(function(y,x){r.setState(function(S){var m=S.loadedKeys,C=m===void 0?[]:m,w=S.loadingKeys,E=w===void 0?[]:w,O=r.props,R=O.loadData,$=O.onLoad;if(!R||C.indexOf(f)!==-1||E.indexOf(f)!==-1)return null;var I=R(c);return I.then(function(){var N=r.state.loadedKeys,P=Go(N,f);$==null||$(P,{event:"load",node:c}),r.setUncontrolledState({loadedKeys:P}),r.setState(function(A){return{loadingKeys:_o(A.loadingKeys,f)}}),y()}).catch(function(N){if(r.setState(function(A){return{loadingKeys:_o(A.loadingKeys,f)}}),r.loadingRetryTimes[f]=(r.loadingRetryTimes[f]||0)+1,r.loadingRetryTimes[f]>=SF){var P=r.state.loadedKeys;ut(!1,"Retry for `loadData` many times but still failed. No more retry."),r.setUncontrolledState({loadedKeys:Go(P,f)}),y()}x(N)}),{loadingKeys:Go(E,f)}})});return p.catch(function(){}),p}}),z(we(r),"onNodeMouseEnter",function(c,u){var f=r.props.onMouseEnter;f==null||f({event:c,node:u})}),z(we(r),"onNodeMouseLeave",function(c,u){var f=r.props.onMouseLeave;f==null||f({event:c,node:u})}),z(we(r),"onNodeContextMenu",function(c,u){var f=r.props.onRightClick;f&&(c.preventDefault(),f({event:c,node:u}))}),z(we(r),"onFocus",function(){var c=r.props.onFocus;r.setState({focused:!0});for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];c==null||c.apply(void 0,f)}),z(we(r),"onBlur",function(){var c=r.props.onBlur;r.setState({focused:!1}),r.onActiveChange(null);for(var u=arguments.length,f=new Array(u),h=0;h<u;h++)f[h]=arguments[h];c==null||c.apply(void 0,f)}),z(we(r),"getTreeNodeRequiredProps",function(){var c=r.state,u=c.expandedKeys,f=c.selectedKeys,h=c.loadedKeys,g=c.loadingKeys,p=c.checkedKeys,y=c.halfCheckedKeys,x=c.dragOverNodeKey,S=c.dropPosition,m=c.keyEntities;return{expandedKeys:u||[],selectedKeys:f||[],loadedKeys:h||[],loadingKeys:g||[],checkedKeys:p||[],halfCheckedKeys:y||[],dragOverNodeKey:x,dropPosition:S,keyEntities:m}}),z(we(r),"setExpandedKeys",function(c){var u=r.state,f=u.treeData,h=u.fieldNames,g=Xu(f,c,h);r.setUncontrolledState({expandedKeys:c,flattenNodes:g},!0)}),z(we(r),"onNodeExpand",function(c,u){var f=r.state.expandedKeys,h=r.state,g=h.listChanging,p=h.fieldNames,y=r.props,x=y.onExpand,S=y.loadData,m=u.expanded,C=u[p.key];if(!g){var w=f.indexOf(C),E=!m;if(ut(m&&w!==-1||!m&&w===-1,"Expand state not sync with index check"),E?f=Go(f,C):f=_o(f,C),r.setExpandedKeys(f),x==null||x(f,{node:u,expanded:E,nativeEvent:c.nativeEvent}),E&&S){var O=r.onNodeLoad(u);O&&O.then(function(){var R=Xu(r.state.treeData,f,p);r.setUncontrolledState({flattenNodes:R})}).catch(function(){var R=r.state.expandedKeys,$=_o(R,C);r.setExpandedKeys($)})}}}),z(we(r),"onListChangeStart",function(){r.setUncontrolledState({listChanging:!0})}),z(we(r),"onListChangeEnd",function(){setTimeout(function(){r.setUncontrolledState({listChanging:!1})})}),z(we(r),"onActiveChange",function(c){var u=r.state.activeKey,f=r.props,h=f.onActiveChange,g=f.itemScrollOffset,p=g===void 0?0:g;u!==c&&(r.setState({activeKey:c}),c!==null&&r.scrollTo({key:c,offset:p}),h==null||h(c))}),z(we(r),"getActiveItem",function(){var c=r.state,u=c.activeKey,f=c.flattenNodes;return u===null?null:f.find(function(h){var g=h.key;return g===u})||null}),z(we(r),"offsetActiveKey",function(c){var u=r.state,f=u.flattenNodes,h=u.activeKey,g=f.findIndex(function(x){var S=x.key;return S===h});g===-1&&c<0&&(g=f.length),g=(g+c+f.length)%f.length;var p=f[g];if(p){var y=p.key;r.onActiveChange(y)}else r.onActiveChange(null)}),z(we(r),"onKeyDown",function(c){var u=r.state,f=u.activeKey,h=u.expandedKeys,g=u.checkedKeys,p=u.fieldNames,y=r.props,x=y.onKeyDown,S=y.checkable,m=y.selectable;switch(c.which){case _e.UP:{r.offsetActiveKey(-1),c.preventDefault();break}case _e.DOWN:{r.offsetActiveKey(1),c.preventDefault();break}}var C=r.getActiveItem();if(C&&C.data){var w=r.getTreeNodeRequiredProps(),E=C.data.isLeaf===!1||!!(C.data[p.children]||[]).length,O=Pn(Q(Q({},il(f,w)),{},{data:C.data,active:!0}));switch(c.which){case _e.LEFT:{E&&h.includes(f)?r.onNodeExpand({},O):C.parent&&r.onActiveChange(C.parent.key),c.preventDefault();break}case _e.RIGHT:{E&&!h.includes(f)?r.onNodeExpand({},O):C.children&&C.children.length&&r.onActiveChange(C.children[0].key),c.preventDefault();break}case _e.ENTER:case _e.SPACE:{S&&!O.disabled&&O.checkable!==!1&&!O.disableCheckbox?r.onNodeCheck({},O,!g.includes(f)):!S&&m&&!O.disabled&&O.selectable!==!1&&r.onNodeSelect({},O);break}}}x==null||x(c)}),z(we(r),"setUncontrolledState",function(c){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!r.destroyed){var h=!1,g=!0,p={};Object.keys(c).forEach(function(y){if(y in r.props){g=!1;return}h=!0,p[y]=c[y]}),h&&(!u||g)&&r.setState(Q(Q({},p),f))}}),z(we(r),"scrollTo",function(c){r.listRef.current.scrollTo(c)}),r}return Xn(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var o=this.props,l=o.activeKey,s=o.itemScrollOffset,c=s===void 0?0:s;l!==void 0&&l!==this.state.activeKey&&(this.setState({activeKey:l}),l!==null&&this.scrollTo({key:l,offset:c}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var o=this.state,l=o.focused,s=o.flattenNodes,c=o.keyEntities,u=o.draggingNodeKey,f=o.activeKey,h=o.dropLevelOffset,g=o.dropContainerKey,p=o.dropTargetKey,y=o.dropPosition,x=o.dragOverNodeKey,S=o.indent,m=this.props,C=m.prefixCls,w=m.className,E=m.style,O=m.showLine,R=m.focusable,$=m.tabIndex,I=$===void 0?0:$,N=m.selectable,P=m.showIcon,A=m.icon,B=m.switcherIcon,U=m.draggable,k=m.checkable,L=m.checkStrictly,H=m.disabled,V=m.motion,D=m.loadData,F=m.filterTreeNode,Y=m.height,q=m.itemHeight,X=m.virtual,ne=m.titleRender,re=m.dropIndicatorRender,ve=m.onContextMenu,oe=m.onScroll,ge=m.direction,de=m.rootClassName,ye=m.rootStyle,pe=Ri(this.props,{aria:!0,data:!0}),ce;return U&&(xt(U)==="object"?ce=U:typeof U=="function"?ce={nodeDraggable:U}:ce={}),v.createElement(Gf.Provider,{value:{prefixCls:C,selectable:N,showIcon:P,icon:A,switcherIcon:B,draggable:ce,draggingNodeKey:u,checkable:k,checkStrictly:L,disabled:H,keyEntities:c,dropLevelOffset:h,dropContainerKey:g,dropTargetKey:p,dropPosition:y,dragOverNodeKey:x,indent:S,direction:ge,dropIndicatorRender:re,loadData:D,filterTreeNode:F,titleRender:ne,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop}},v.createElement("div",{role:"tree",className:Ee(C,w,de,z(z(z({},"".concat(C,"-show-line"),O),"".concat(C,"-focused"),l),"".concat(C,"-active-focused"),f!==null)),style:ye},v.createElement(Yy,it({ref:this.listRef,prefixCls:C,style:E,data:s,disabled:H,selectable:N,checkable:!!k,motion:V,dragging:u!==null,height:Y,itemHeight:q,virtual:X,focusable:R,focused:l,tabIndex:I,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:ve,onScroll:oe},this.getTreeNodeRequiredProps(),pe))))}}],[{key:"getDerivedStateFromProps",value:function(o,l){var s=l.prevProps,c={prevProps:o};function u($){return!s&&$ in o||s&&s[$]!==o[$]}var f,h=l.fieldNames;if(u("fieldNames")&&(h=ba(o.fieldNames),c.fieldNames=h),u("treeData")?f=o.treeData:u("children")&&(ut(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),f=Oy(o.children)),f){c.treeData=f;var g=kf(f,{fieldNames:h});c.keyEntities=Q(z({},Ni,Xy),g.keyEntities),process.env.NODE_ENV!=="production"&&$D(f,h)}var p=c.keyEntities||l.keyEntities;if(u("expandedKeys")||s&&u("autoExpandParent"))c.expandedKeys=o.autoExpandParent||!s&&o.defaultExpandParent?Zd(o.expandedKeys,p):o.expandedKeys;else if(!s&&o.defaultExpandAll){var y=Q({},p);delete y[Ni],c.expandedKeys=Object.keys(y).map(function($){return y[$].key})}else!s&&o.defaultExpandedKeys&&(c.expandedKeys=o.autoExpandParent||o.defaultExpandParent?Zd(o.defaultExpandedKeys,p):o.defaultExpandedKeys);if(c.expandedKeys||delete c.expandedKeys,f||c.expandedKeys){var x=Xu(f||l.treeData,c.expandedKeys||l.expandedKeys,h);c.flattenNodes=x}if(o.selectable&&(u("selectedKeys")?c.selectedKeys=um(o.selectedKeys,o):!s&&o.defaultSelectedKeys&&(c.selectedKeys=um(o.defaultSelectedKeys,o))),o.checkable){var S;if(u("checkedKeys")?S=td(o.checkedKeys)||{}:!s&&o.defaultCheckedKeys?S=td(o.defaultCheckedKeys)||{}:f&&(S=td(o.checkedKeys)||{checkedKeys:l.checkedKeys,halfCheckedKeys:l.halfCheckedKeys}),S){var m=S,C=m.checkedKeys,w=C===void 0?[]:C,E=m.halfCheckedKeys,O=E===void 0?[]:E;if(!o.checkStrictly){var R=va(w,!0,p);w=R.checkedKeys,O=R.halfCheckedKeys}c.checkedKeys=w,c.halfCheckedKeys=O}}return u("loadedKeys")&&(c.loadedKeys=o.loadedKeys),c}}]),n}(v.Component);z(mc,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:fF,allowDrop:function(){return!0},expandAction:!1});z(mc,"TreeNode",Sa);var CF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{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.7zM790.2 326H602V137.8L790.2 326zm1.8 562H232V136h302v216a42 42 0 0042 42h216v494z"}}]},name:"file",theme:"outlined"},xF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:CF}))},Yf=v.forwardRef(xF);process.env.NODE_ENV!=="production"&&(Yf.displayName="FileOutlined");var wF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 444H820V330.4c0-17.7-14.3-32-32-32H473L355.7 186.2a8.15 8.15 0 00-5.5-2.2H96c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h698c13 0 24.8-7.9 29.7-20l134-332c1.5-3.8 2.3-7.9 2.3-12 0-17.7-14.3-32-32-32zM136 256h188.5l119.6 114.4H748V444H238c-13 0-24.8 7.9-29.7 20L136 643.2V256zm635.3 512H159l103.3-256h612.4L771.3 768z"}}]},name:"folder-open",theme:"outlined"},EF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:wF}))},Zy=v.forwardRef(EF);process.env.NODE_ENV!=="production"&&(Zy.displayName="FolderOpenOutlined");var OF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M880 298.4H521L403.7 186.2a8.15 8.15 0 00-5.5-2.2H144c-17.7 0-32 14.3-32 32v592c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V330.4c0-17.7-14.3-32-32-32zM840 768H184V256h188.5l119.6 114.4H840V768z"}}]},name:"folder",theme:"outlined"},$F=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:OF}))},Qy=v.forwardRef($F);process.env.NODE_ENV!=="production"&&(Qy.displayName="FolderOutlined");var _F={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M300 276.5a56 56 0 1056-97 56 56 0 00-56 97zm0 284a56 56 0 1056-97 56 56 0 00-56 97zM640 228a56 56 0 10112 0 56 56 0 00-112 0zm0 284a56 56 0 10112 0 56 56 0 00-112 0zM300 844.5a56 56 0 1056-97 56 56 0 00-56 97zM640 796a56 56 0 10112 0 56 56 0 00-112 0z"}}]},name:"holder",theme:"outlined"},RF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:_F}))},Jy=v.forwardRef(RF);process.env.NODE_ENV!=="production"&&(Jy.displayName="HolderOutlined");const IF=new on("ant-tree-node-fx-do-not-use",{"0%":{opacity:0},"100%":{opacity:1}}),NF=(e,t)=>({[`.${e}-switcher-icon`]:{display:"inline-block",fontSize:10,verticalAlign:"baseline",svg:{transition:`transform ${t.motionDurationSlow}`}}}),PF=(e,t)=>({[`.${e}-drop-indicator`]:{position:"absolute",zIndex:1,height:2,backgroundColor:t.colorPrimary,borderRadius:1,pointerEvents:"none","&:after":{position:"absolute",top:-3,insetInlineStart:-6,width:8,height:8,backgroundColor:"transparent",border:`${Ye(t.lineWidthBold)} solid ${t.colorPrimary}`,borderRadius:"50%",content:'""'}}}),TF=(e,t)=>{const{treeCls:n,treeNodeCls:r,treeNodePadding:o,titleHeight:l,nodeSelectedBg:s,nodeHoverBg:c}=t,u=t.paddingXS;return{[n]:Object.assign(Object.assign({},rr(t)),{background:t.colorBgContainer,borderRadius:t.borderRadius,transition:`background-color ${t.motionDurationSlow}`,[`&${n}-rtl`]:{[`${n}-switcher`]:{"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(90deg)"}}}}},[`&-focused:not(:hover):not(${n}-active-focused)`]:Object.assign({},Cl(t)),[`${n}-list-holder-inner`]:{alignItems:"flex-start"},[`&${n}-block-node`]:{[`${n}-list-holder-inner`]:{alignItems:"stretch",[`${n}-node-content-wrapper`]:{flex:"auto"},[`${r}.dragging`]:{position:"relative","&:after":{position:"absolute",top:0,insetInlineEnd:0,bottom:o,insetInlineStart:0,border:`1px solid ${t.colorPrimary}`,opacity:0,animationName:IF,animationDuration:t.motionDurationSlow,animationPlayState:"running",animationFillMode:"forwards",content:'""',pointerEvents:"none"}}}},[`${r}`]:{display:"flex",alignItems:"flex-start",padding:`0 0 ${Ye(o)} 0`,outline:"none","&-rtl":{direction:"rtl"},"&-disabled":{[`${n}-node-content-wrapper`]:{color:t.colorTextDisabled,cursor:"not-allowed","&:hover":{background:"transparent"}}},[`&-active ${n}-node-content-wrapper`]:{background:t.controlItemBgHover},[`&:not(${r}-disabled).filter-node ${n}-title`]:{color:"inherit",fontWeight:500},"&-draggable":{cursor:"grab",[`${n}-draggable-icon`]:{flexShrink:0,width:l,lineHeight:`${Ye(l)}`,textAlign:"center",visibility:"visible",opacity:.2,transition:`opacity ${t.motionDurationSlow}`,[`${r}:hover &`]:{opacity:.45}},[`&${r}-disabled`]:{[`${n}-draggable-icon`]:{visibility:"hidden"}}}},[`${n}-indent`]:{alignSelf:"stretch",whiteSpace:"nowrap",userSelect:"none","&-unit":{display:"inline-block",width:l}},[`${n}-draggable-icon`]:{visibility:"hidden"},[`${n}-switcher`]:Object.assign(Object.assign({},NF(e,t)),{position:"relative",flex:"none",alignSelf:"stretch",width:l,margin:0,lineHeight:`${Ye(l)}`,textAlign:"center",cursor:"pointer",userSelect:"none",transition:`all ${t.motionDurationSlow}`,borderRadius:t.borderRadius,"&-noop":{cursor:"unset"},[`&:not(${n}-switcher-noop):hover`]:{backgroundColor:t.colorBgTextHover},"&_close":{[`${n}-switcher-icon`]:{svg:{transform:"rotate(-90deg)"}}},"&-loading-icon":{color:t.colorPrimary},"&-leaf-line":{position:"relative",zIndex:1,display:"inline-block",width:"100%",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(l).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),marginInlineStart:-1,borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&:after":{position:"absolute",width:t.calc(t.calc(l).div(2).equal()).mul(.8).equal(),height:t.calc(l).div(2).equal(),borderBottom:`1px solid ${t.colorBorder}`,content:'""'}}}),[`${n}-checkbox`]:{top:"initial",marginInlineEnd:u,alignSelf:"flex-start",marginTop:t.marginXXS},[`${n}-node-content-wrapper, ${n}-checkbox + span`]:{position:"relative",zIndex:"auto",minHeight:l,margin:0,padding:`0 ${Ye(t.calc(t.paddingXS).div(2).equal())}`,color:"inherit",lineHeight:`${Ye(l)}`,background:"transparent",borderRadius:t.borderRadius,cursor:"pointer",transition:`all ${t.motionDurationMid}, border 0s, line-height 0s, box-shadow 0s`,"&:hover":{backgroundColor:c},[`&${n}-node-selected`]:{backgroundColor:s},[`${n}-iconEle`]:{display:"inline-block",width:l,height:l,lineHeight:`${Ye(l)}`,textAlign:"center",verticalAlign:"top","&:empty":{display:"none"}}},[`${n}-unselectable ${n}-node-content-wrapper:hover`]:{backgroundColor:"transparent"},[`${n}-node-content-wrapper`]:Object.assign({lineHeight:`${Ye(l)}`,userSelect:"none"},PF(e,t)),[`${r}.drop-container`]:{"> [draggable]":{boxShadow:`0 0 0 2px ${t.colorPrimary}`}},"&-show-line":{[`${n}-indent`]:{"&-unit":{position:"relative",height:"100%","&:before":{position:"absolute",top:0,insetInlineEnd:t.calc(l).div(2).equal(),bottom:t.calc(o).mul(-1).equal(),borderInlineEnd:`1px solid ${t.colorBorder}`,content:'""'},"&-end":{"&:before":{display:"none"}}}},[`${n}-switcher`]:{background:"transparent","&-line-icon":{verticalAlign:"-0.15em"}}},[`${r}-leaf-last`]:{[`${n}-switcher`]:{"&-leaf-line":{"&:before":{top:"auto !important",bottom:"auto !important",height:`${Ye(t.calc(l).div(2).equal())} !important`}}}}})}},MF=e=>{const{treeCls:t,treeNodeCls:n,treeNodePadding:r,directoryNodeSelectedBg:o,directoryNodeSelectedColor:l}=e;return{[`${t}${t}-directory`]:{[n]:{position:"relative","&:before":{position:"absolute",top:0,insetInlineEnd:0,bottom:r,insetInlineStart:0,transition:`background-color ${e.motionDurationMid}`,content:'""',pointerEvents:"none"},"&:hover":{"&:before":{background:e.controlItemBgHover}},"> *":{zIndex:1},[`${t}-switcher`]:{transition:`color ${e.motionDurationMid}`},[`${t}-node-content-wrapper`]:{borderRadius:0,userSelect:"none","&:hover":{background:"transparent"},[`&${t}-node-selected`]:{color:l,background:"transparent"}},"&-selected":{"\n &:hover::before,\n &::before\n ":{background:o},[`${t}-switcher`]:{color:l},[`${t}-node-content-wrapper`]:{color:l,background:"transparent"}}}}}},eS=(e,t)=>{const n=`.${e}`,r=`${n}-treenode`,o=t.calc(t.paddingXS).div(2).equal(),l=bn(t,{treeCls:n,treeNodeCls:r,treeNodePadding:o});return[TF(e,l),MF(l)]},tS=e=>{const{controlHeightSM:t}=e;return{titleHeight:t,nodeHoverBg:e.controlItemBgHover,nodeSelectedBg:e.controlItemBgActive}},DF=e=>{const{colorTextLightSolid:t,colorPrimary:n}=e;return Object.assign(Object.assign({},tS(e)),{directoryNodeSelectedColor:t,directoryNodeSelectedBg:n})},AF=Hr("Tree",(e,t)=>{let{prefixCls:n}=t;return[{[e.componentCls]:Wf(`${n}-checkbox`,e)},eS(n,e),_b(e)]},DF),pm=4;function FF(e){const{dropPosition:t,dropLevelOffset:n,prefixCls:r,indent:o,direction:l="ltr"}=e,s=l==="ltr"?"left":"right",c=l==="ltr"?"right":"left",u={[s]:-n*o+pm,[c]:0};switch(t){case-1:u.top=-3;break;case 1:u.bottom=-3;break;default:u.bottom=-3,u[s]=o+pm;break}return j.createElement("div",{style:u,className:`${r}-drop-indicator`})}var LF={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M840.4 300H183.6c-19.7 0-30.7 20.8-18.5 35l328.4 380.8c9.4 10.9 27.5 10.9 37 0L858.9 335c12.2-14.2 1.2-35-18.5-35z"}}]},name:"caret-down",theme:"filled"},VF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:LF}))},nS=v.forwardRef(VF);process.env.NODE_ENV!=="production"&&(nS.displayName="CaretDownFilled");var zF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h368c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"minus-square",theme:"outlined"},jF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:zF}))},rS=v.forwardRef(jF);process.env.NODE_ENV!=="production"&&(rS.displayName="MinusSquareOutlined");var BF={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M328 544h152v152c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V544h152c4.4 0 8-3.6 8-8v-48c0-4.4-3.6-8-8-8H544V328c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v152H328c-4.4 0-8 3.6-8 8v48c0 4.4 3.6 8 8 8z"}},{tag:"path",attrs:{d:"M880 112H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V144c0-17.7-14.3-32-32-32zm-40 728H184V184h656v656z"}}]},name:"plus-square",theme:"outlined"},HF=function(t,n){return v.createElement(Rn,it({},t,{ref:n,icon:BF}))},oS=v.forwardRef(HF);process.env.NODE_ENV!=="production"&&(oS.displayName="PlusSquareOutlined");const iS=e=>{const{prefixCls:t,switcherIcon:n,treeNodeProps:r,showLine:o}=e,{isLeaf:l,expanded:s,loading:c}=r;if(c)return v.createElement(wl,{className:`${t}-switcher-loading-icon`});let u;if(o&&typeof o=="object"&&(u=o.showLeafIcon),l){if(!o)return null;if(typeof u!="boolean"&&u){const g=typeof u=="function"?u(r):u,p=`${t}-switcher-line-custom-icon`;return ma(g)?ei(g,{className:Ee(g.props.className||"",p)}):g}return u?v.createElement(Yf,{className:`${t}-switcher-line-icon`}):v.createElement("span",{className:`${t}-switcher-leaf-line`})}const f=`${t}-switcher-icon`,h=typeof n=="function"?n(r):n;return ma(h)?ei(h,{className:Ee(h.props.className||"",f)}):h!==void 0?h:o?s?v.createElement(rS,{className:`${t}-switcher-line-icon`}):v.createElement(oS,{className:`${t}-switcher-line-icon`}):v.createElement(nS,{className:f})},Zf=j.forwardRef((e,t)=>{var n;const{getPrefixCls:r,direction:o,virtual:l,tree:s}=j.useContext(Gt),{prefixCls:c,className:u,showIcon:f=!1,showLine:h,switcherIcon:g,blockNode:p=!1,children:y,checkable:x=!1,selectable:S=!0,draggable:m,motion:C,style:w}=e,E=r("tree",c),O=r(),R=C??Object.assign(Object.assign({},Md(O)),{motionAppear:!1}),$=Object.assign(Object.assign({},e),{checkable:x,selectable:S,showIcon:f,motion:R,blockNode:p,showLine:!!h,dropIndicatorRender:FF}),[I,N,P]=AF(E),[,A]=or(),B=A.paddingXS/2+(((n=A.Tree)===null||n===void 0?void 0:n.titleHeight)||A.controlHeightSM),U=j.useMemo(()=>{if(!m)return!1;let L={};switch(typeof m){case"function":L.nodeDraggable=m;break;case"object":L=Object.assign({},m);break}return L.icon!==!1&&(L.icon=L.icon||j.createElement(Jy,null)),L},[m]),k=L=>j.createElement(iS,{prefixCls:E,switcherIcon:g,treeNodeProps:L,showLine:h});return I(j.createElement(mc,Object.assign({itemHeight:B,ref:t,virtual:l},$,{style:Object.assign(Object.assign({},s==null?void 0:s.style),w),prefixCls:E,className:Ee({[`${E}-icon-hide`]:!f,[`${E}-block-node`]:p,[`${E}-unselectable`]:!S,[`${E}-rtl`]:o==="rtl"},s==null?void 0:s.className,u,N,P),direction:o,checkable:x&&j.createElement("span",{className:`${E}-checkbox-inner`}),selectable:S,switcherIcon:k,draggable:U}),y))});process.env.NODE_ENV!=="production"&&(Zf.displayName="Tree");var Io;(function(e){e[e.None=0]="None",e[e.Start=1]="Start",e[e.End=2]="End"})(Io||(Io={}));function Qf(e,t,n){const{key:r,children:o}=n;function l(s){const c=s[r],u=s[o];t(c,s)!==!1&&Qf(u||[],t,n)}e.forEach(l)}function kF(e){let{treeData:t,expandedKeys:n,startKey:r,endKey:o,fieldNames:l}=e;const s=[];let c=Io.None;if(r&&r===o)return[r];if(!r||!o)return[];function u(f){return f===r||f===o}return Qf(t,f=>{if(c===Io.End)return!1;if(u(f)){if(s.push(f),c===Io.None)c=Io.Start;else if(c===Io.Start)return c=Io.End,!1}else c===Io.Start&&s.push(f);return n.includes(f)},ba(l)),s}function nd(e,t,n){const r=Me(t),o=[];return Qf(e,(l,s)=>{const c=r.indexOf(l);return c!==-1&&(o.push(s),r.splice(c,1)),!!r.length},ba(n)),o}var mm=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};function WF(e){const{isLeaf:t,expanded:n}=e;return t?v.createElement(Yf,null):n?v.createElement(Zy,null):v.createElement(Qy,null)}function bm(e){let{treeData:t,children:n}=e;return t||Oy(n)}const KF=(e,t)=>{var{defaultExpandAll:n,defaultExpandParent:r,defaultExpandedKeys:o}=e,l=mm(e,["defaultExpandAll","defaultExpandParent","defaultExpandedKeys"]);const s=v.useRef(),c=v.useRef(),u=()=>{const{keyEntities:N}=kf(bm(l));let P;return n?P=Object.keys(N):r?P=Zd(l.expandedKeys||o||[],N):P=l.expandedKeys||o,P},[f,h]=v.useState(l.selectedKeys||l.defaultSelectedKeys||[]),[g,p]=v.useState(()=>u());v.useEffect(()=>{"selectedKeys"in l&&h(l.selectedKeys)},[l.selectedKeys]),v.useEffect(()=>{"expandedKeys"in l&&p(l.expandedKeys)},[l.expandedKeys]);const y=(N,P)=>{var A;return"expandedKeys"in l||p(N),(A=l.onExpand)===null||A===void 0?void 0:A.call(l,N,P)},x=(N,P)=>{var A;const{multiple:B,fieldNames:U}=l,{node:k,nativeEvent:L}=P,{key:H=""}=k,V=bm(l),D=Object.assign(Object.assign({},P),{selected:!0}),F=(L==null?void 0:L.ctrlKey)||(L==null?void 0:L.metaKey),Y=L==null?void 0:L.shiftKey;let q;B&&F?(q=N,s.current=H,c.current=q,D.selectedNodes=nd(V,q,U)):B&&Y?(q=Array.from(new Set([].concat(Me(c.current||[]),Me(kF({treeData:V,expandedKeys:g,startKey:H,endKey:s.current,fieldNames:U}))))),D.selectedNodes=nd(V,q,U)):(q=[H],s.current=H,c.current=q,D.selectedNodes=nd(V,q,U)),(A=l.onSelect)===null||A===void 0||A.call(l,q,D),"selectedKeys"in l||h(q)},{getPrefixCls:S,direction:m}=v.useContext(Gt),{prefixCls:C,className:w,showIcon:E=!0,expandAction:O="click"}=l,R=mm(l,["prefixCls","className","showIcon","expandAction"]),$=S("tree",C),I=Ee(`${$}-directory`,{[`${$}-directory-rtl`]:m==="rtl"},w);return v.createElement(Zf,Object.assign({icon:WF,ref:t,blockNode:!0},R,{showIcon:E,expandAction:O,prefixCls:$,className:I,expandedKeys:g,selectedKeys:f,onSelect:x,onExpand:y}))},aS=v.forwardRef(KF);process.env.NODE_ENV!=="production"&&(aS.displayName="DirectoryTree");const Jf=Zf;Jf.DirectoryTree=aS;Jf.TreeNode=Sa;const UF=function(e){var t=v.useRef({valueLabels:new Map});return v.useMemo(function(){var n=t.current.valueLabels,r=new Map,o=e.map(function(l){var s,c=l.value,u=(s=l.label)!==null&&s!==void 0?s:n.get(c);return r.set(c,u),Q(Q({},l),{},{label:u})});return t.current.valueLabels=r,[o]},[e])},qF=function(e,t,n,r){return v.useMemo(function(){var o=e.map(function(u){var f=u.value;return f}),l=t.map(function(u){var f=u.value;return f}),s=o.filter(function(u){return!r[u]});if(n){var c=va(o,!0,r);o=c.checkedKeys,l=c.halfCheckedKeys}return[Array.from(new Set([].concat(Me(s),Me(o)))),l]},[e,t,n,r])};function lS(e){return Array.isArray(e)?e:e!==void 0?[e]:[]}function GF(e){var t=e||{},n=t.label,r=t.value,o=t.children,l=r||"value";return{_title:n?[n]:["title","label"],value:l,key:l,children:o||"children"}}function Jd(e){return!e||e.disabled||e.disableCheckbox||e.checkable===!1}function XF(e,t){var n=[];function r(o){o.forEach(function(l){var s=l[t.children];s&&(n.push(l[t.value]),r(s))})}return r(e),n}function ef(e){return e==null}const YF=function(e,t){return v.useMemo(function(){var n=kf(e,{fieldNames:t,initWrapper:function(o){return Q(Q({},o),{},{valueEntities:new Map})},processEntity:function(o,l){var s=o.node[t.value];if(process.env.NODE_ENV!=="production"){var c=o.node.key;ut(!ef(s),"TreeNode `value` is invalidate: undefined"),ut(!l.valueEntities.has(s),"Same `value` exist in the tree: ".concat(s)),ut(!c||String(c)===String(s),"`key` or `value` with TreeNode must be the same or you can remove one of them. key: ".concat(c,", value: ").concat(s,"."))}l.valueEntities.set(s,o)}});return n},[e,t])};var ev=function(){return null},ZF=["children","value"];function sS(e){return so(e).map(function(t){if(!v.isValidElement(t)||!t.type)return null;var n=t,r=n.key,o=n.props,l=o.children,s=o.value,c=Kt(o,ZF),u=Q({key:r,value:s},c),f=sS(l);return f.length&&(u.children=f),u}).filter(function(t){return t})}function tf(e){if(!e)return e;var t=Q({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return ut(!1,"New `rc-tree-select` not support return node instance as argument anymore. Please consider to remove `props` access."),t}}),t}function QF(e,t,n,r,o,l){var s=null,c=null;function u(){function f(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"0",p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;return h.map(function(y,x){var S="".concat(g,"-").concat(x),m=y[l.value],C=n.includes(m),w=f(y[l.children]||[],S,C),E=v.createElement(ev,y,w.map(function(R){return R.node}));if(t===m&&(s=E),C){var O={pos:S,node:E,children:w};return p||c.push(O),O}return null}).filter(function(y){return y})}c||(c=[],f(r),c.sort(function(h,g){var p=h.node.props.value,y=g.node.props.value,x=n.indexOf(p),S=n.indexOf(y);return x-S}))}Object.defineProperty(e,"triggerNode",{get:function(){return ut(!1,"`triggerNode` is deprecated. Please consider decoupling data with node."),u(),s}}),Object.defineProperty(e,"allCheckedNodes",{get:function(){return ut(!1,"`allCheckedNodes` is deprecated. Please consider decoupling data with node."),u(),o?c:c.map(function(h){var g=h.node;return g})}})}const JF=function(e,t,n){var r=n.treeNodeFilterProp,o=n.filterTreeNode,l=n.fieldNames,s=l.children;return v.useMemo(function(){if(!t||o===!1)return e;var c;if(typeof o=="function")c=o;else{var u=t.toUpperCase();c=function(g,p){var y=p[r];return String(y).toUpperCase().includes(u)}}function f(h){var g=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return h.reduce(function(p,y){var x=y[s],S=g||c(t,tf(y)),m=f(x||[],S);return(S||m.length)&&p.push(Q(Q({},y),{},z({isLeaf:void 0},s,m))),p},[])}return f(e)},[e,t,s,r,o])};function ym(e){var t=v.useRef();t.current=e;var n=v.useCallback(function(){return t.current.apply(t,arguments)},[]);return n}function eL(e,t){var n=t.id,r=t.pId,o=t.rootPId,l={},s=[],c=e.map(function(u){var f=Q({},u),h=f[n];return l[h]=f,f.key=f.key||h,f});return c.forEach(function(u){var f=u[r],h=l[f];h&&(h.children=h.children||[],h.children.push(u)),(f===o||!h&&o===null)&&s.push(u)}),s}function tL(e,t,n){return v.useMemo(function(){return e?n?eL(e,Q({id:"id",pId:"pId",rootPId:null},n!==!0?n:{})):e:sS(t)},[t,n,e])}var cS=v.createContext(null),uS=v.createContext(null),nL={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},rL=function(t,n){var r=Pb(),o=r.prefixCls,l=r.multiple,s=r.searchValue,c=r.toggleOpen,u=r.open,f=r.notFoundContent,h=v.useContext(uS),g=h.virtual,p=h.listHeight,y=h.listItemHeight,x=h.listItemScrollOffset,S=h.treeData,m=h.fieldNames,C=h.onSelect,w=h.dropdownMatchSelectWidth,E=h.treeExpandAction,O=h.treeTitleRender,R=v.useContext(cS),$=R.checkable,I=R.checkedKeys,N=R.halfCheckedKeys,P=R.treeExpandedKeys,A=R.treeDefaultExpandAll,B=R.treeDefaultExpandedKeys,U=R.onTreeExpand,k=R.treeIcon,L=R.showTreeIcon,H=R.switcherIcon,V=R.treeLine,D=R.treeNodeFilterProp,F=R.loadData,Y=R.treeLoadedKeys,q=R.treeMotion,X=R.onTreeLoad,ne=R.keyEntities,re=v.useRef(),ve=Sl(function(){return S},[u,S],function(He,De){return De[0]&&He[1]!==De[1]}),oe=v.useState(null),ge=le(oe,2),de=ge[0],ye=ge[1],pe=ne[de],ce=v.useMemo(function(){return $?{checked:I,halfChecked:N}:null},[$,I,N]);v.useEffect(function(){if(u&&!l&&I.length){var He;(He=re.current)===null||He===void 0||He.scrollTo({key:I[0]}),ye(I[0])}},[u]);var te=String(s).toLowerCase(),me=function(De){return te?String(De[D]).toLowerCase().includes(te):!1},Ne=v.useState(B),Z=le(Ne,2),ae=Z[0],Pe=Z[1],Te=v.useState(null),je=le(Te,2),fe=je[0],se=je[1],be=v.useMemo(function(){return P?Me(P):s?fe:ae},[ae,fe,P,s]);v.useEffect(function(){s&&se(XF(S,m))},[s]);var ke=function(De){Pe(De),se(De),U&&U(De)},$e=function(De){De.preventDefault()},Je=function(De,et){var Re=et.node;$&&Jd(Re)||(C(Re.key,{selected:!I.includes(Re.key)}),l||c(!1))};if(v.useImperativeHandle(n,function(){var He;return{scrollTo:(He=re.current)===null||He===void 0?void 0:He.scrollTo,onKeyDown:function(et){var Re,lt=et.which;switch(lt){case _e.UP:case _e.DOWN:case _e.LEFT:case _e.RIGHT:(Re=re.current)===null||Re===void 0||Re.onKeyDown(et);break;case _e.ENTER:{if(pe){var st=(pe==null?void 0:pe.node)||{},Wt=st.selectable,vt=st.value;Wt!==!1&&Je(null,{node:{key:de},selected:!I.includes(vt)})}break}case _e.ESC:c(!1)}},onKeyUp:function(){}}}),ve.length===0)return v.createElement("div",{role:"listbox",className:"".concat(o,"-empty"),onMouseDown:$e},f);var Ge={fieldNames:m};return Y&&(Ge.loadedKeys=Y),be&&(Ge.expandedKeys=be),v.createElement("div",{onMouseDown:$e},pe&&u&&v.createElement("span",{style:nL,"aria-live":"assertive"},pe.node.value),v.createElement(mc,it({ref:re,focusable:!1,prefixCls:"".concat(o,"-tree"),treeData:ve,height:p,itemHeight:y,itemScrollOffset:x,virtual:g!==!1&&w!==!1,multiple:l,icon:k,showIcon:L,switcherIcon:H,showLine:V,loadData:s?null:F,motion:q,activeKey:de,checkable:$,checkStrictly:!0,checkedKeys:ce,selectedKeys:$?[]:I,defaultExpandAll:A,titleRender:O},Ge,{onActiveChange:ye,onSelect:Je,onCheck:Je,onExpand:ke,onLoad:X,filterTreeNode:me,expandAction:E})))},dS=v.forwardRef(rL);process.env.NODE_ENV!=="production"&&(dS.displayName="OptionList");var tv="SHOW_ALL",nv="SHOW_PARENT",bc="SHOW_CHILD";function Sm(e,t,n,r){var o=new Set(e);return t===bc?e.filter(function(l){var s=n[l];return!(s&&s.children&&s.children.some(function(c){var u=c.node;return o.has(u[r.value])})&&s.children.every(function(c){var u=c.node;return Jd(u)||o.has(u[r.value])}))}):t===nv?e.filter(function(l){var s=n[l],c=s?s.parent:null;return!(c&&!Jd(c.node)&&o.has(c.key))}):e}function oL(e){var t=e.searchPlaceholder,n=e.treeCheckStrictly,r=e.treeCheckable,o=e.labelInValue,l=e.value,s=e.multiple;ut(!t,"`searchPlaceholder` has been removed."),n&&o===!1&&ut(!1,"`treeCheckStrictly` will force set `labelInValue` to `true`."),(o||n)&&ut(lS(l).every(function(c){return c&&xt(c)==="object"&&"value"in c}),"Invalid prop `value` supplied to `TreeSelect`. You should use { label: string, value: string | number } or [{ label: string, value: string | number }] instead."),n||s||r?ut(!l||Array.isArray(l),"`value` should be an array when `TreeSelect` is checkable or multiple."):ut(!Array.isArray(l),"`value` should not be array when `TreeSelect` is single mode.")}var iL=["id","prefixCls","value","defaultValue","onChange","onSelect","onDeselect","searchValue","inputValue","onSearch","autoClearSearchValue","filterTreeNode","treeNodeFilterProp","showCheckedStrategy","treeNodeLabelProp","multiple","treeCheckable","treeCheckStrictly","labelInValue","fieldNames","treeDataSimpleMode","treeData","children","loadData","treeLoadedKeys","onTreeLoad","treeDefaultExpandAll","treeExpandedKeys","treeDefaultExpandedKeys","onTreeExpand","treeExpandAction","virtual","listHeight","listItemHeight","listItemScrollOffset","onDropdownVisibleChange","dropdownMatchSelectWidth","treeLine","treeIcon","showTreeIcon","switcherIcon","treeMotion","treeTitleRender"];function aL(e){return!e||xt(e)!=="object"}var fS=v.forwardRef(function(e,t){var n=e.id,r=e.prefixCls,o=r===void 0?"rc-tree-select":r,l=e.value,s=e.defaultValue,c=e.onChange,u=e.onSelect,f=e.onDeselect,h=e.searchValue,g=e.inputValue,p=e.onSearch,y=e.autoClearSearchValue,x=y===void 0?!0:y,S=e.filterTreeNode,m=e.treeNodeFilterProp,C=m===void 0?"value":m,w=e.showCheckedStrategy,E=e.treeNodeLabelProp,O=e.multiple,R=e.treeCheckable,$=e.treeCheckStrictly,I=e.labelInValue,N=e.fieldNames,P=e.treeDataSimpleMode,A=e.treeData,B=e.children,U=e.loadData,k=e.treeLoadedKeys,L=e.onTreeLoad,H=e.treeDefaultExpandAll,V=e.treeExpandedKeys,D=e.treeDefaultExpandedKeys,F=e.onTreeExpand,Y=e.treeExpandAction,q=e.virtual,X=e.listHeight,ne=X===void 0?200:X,re=e.listItemHeight,ve=re===void 0?20:re,oe=e.listItemScrollOffset,ge=oe===void 0?0:oe,de=e.onDropdownVisibleChange,ye=e.dropdownMatchSelectWidth,pe=ye===void 0?!0:ye,ce=e.treeLine,te=e.treeIcon,me=e.showTreeIcon,Ne=e.switcherIcon,Z=e.treeMotion,ae=e.treeTitleRender,Pe=Kt(e,iL),Te=qb(n),je=R&&!$,fe=R||$,se=$||I,be=fe||O,ke=jr(s,{value:l}),$e=le(ke,2),Je=$e[0],Ge=$e[1],He=v.useMemo(function(){return R?w||bc:tv},[w,R]);process.env.NODE_ENV!=="production"&&oL(e);var De=v.useMemo(function(){return GF(N)},[JSON.stringify(N)]),et=jr("",{value:h!==void 0?h:g,postState:function(Qe){return Qe||""}}),Re=le(et,2),lt=Re[0],st=Re[1],Wt=function(Qe){st(Qe),p==null||p(Qe)},vt=tL(A,B,P),Ut=YF(vt,De),bt=Ut.keyEntities,wt=Ut.valueEntities,ft=v.useCallback(function(We){var Qe=[],Fe=[];return We.forEach(function(ze){wt.has(ze)?Fe.push(ze):Qe.push(ze)}),{missingRawValues:Qe,existRawValues:Fe}},[wt]),Xt=JF(vt,lt,{fieldNames:De,treeNodeFilterProp:C,filterTreeNode:S}),Pt=v.useCallback(function(We){if(We){if(E)return We[E];for(var Qe=De._title,Fe=0;Fe<Qe.length;Fe+=1){var ze=We[Qe[Fe]];if(ze!==void 0)return ze}}},[De,E]),Ot=v.useCallback(function(We){var Qe=lS(We);return Qe.map(function(Fe){return aL(Fe)?{value:Fe}:Fe})},[]),Et=v.useCallback(function(We){var Qe=Ot(We);return Qe.map(function(Fe){var ze=Fe.label,Le=Fe.value,Ce=Fe.halfChecked,Ve,Ze=wt.get(Le);if(Ze){var Vt;ze=(Vt=ze)!==null&&Vt!==void 0?Vt:Pt(Ze.node),Ve=Ze.node.disabled}else if(ze===void 0){var Qt=Ot(Je).find(function(zt){return zt.value===Le});ze=Qt.label}return{label:ze,value:Le,halfChecked:Ce,disabled:Ve}})},[wt,Pt,Ot,Je]),Ct=v.useMemo(function(){return Ot(Je)},[Ot,Je]),Yt=v.useMemo(function(){var We=[],Qe=[];return Ct.forEach(function(Fe){Fe.halfChecked?Qe.push(Fe):We.push(Fe)}),[We,Qe]},[Ct]),$t=le(Yt,2),Xe=$t[0],yt=$t[1],Ke=v.useMemo(function(){return Xe.map(function(We){return We.value})},[Xe]),rt=qF(Xe,yt,je,bt),at=le(rt,2),Be=at[0],Ue=at[1],Ae=v.useMemo(function(){var We=Sm(Be,He,bt,De),Qe=We.map(function(Ce){var Ve,Ze;return(Ve=(Ze=bt[Ce])===null||Ze===void 0||(Ze=Ze.node)===null||Ze===void 0?void 0:Ze[De.value])!==null&&Ve!==void 0?Ve:Ce}),Fe=Qe.map(function(Ce){var Ve=Xe.find(function(Vt){return Vt.value===Ce}),Ze;return I&&Ve.label!==void 0?Ze=Ve.label:!I&&ae&&(Ze=ae(Ve)),{value:Ce,label:Ze}}),ze=Et(Fe),Le=ze[0];return!be&&Le&&ef(Le.value)&&ef(Le.label)?[]:ze.map(function(Ce){var Ve;return Q(Q({},Ce),{},{label:(Ve=Ce.label)!==null&&Ve!==void 0?Ve:Ce.value})})},[De,be,Be,Xe,Et,He,bt]),dt=UF(Ae),_t=le(dt,1),Tt=_t[0],qt=ym(function(We,Qe,Fe){var ze=Et(We);if(Ge(ze),x&&st(""),c){var Le=We;if(je){var Ce=Sm(We,He,bt,De);Le=Ce.map(function(yn){var Sn=wt.get(yn);return Sn?Sn.node[De.value]:yn})}var Ve=Qe||{triggerValue:void 0,selected:void 0},Ze=Ve.triggerValue,Vt=Ve.selected,Qt=Le;if($){var zt=yt.filter(function(yn){return!Le.includes(yn.value)});Qt=[].concat(Me(Qt),Me(zt))}var In=Et(Qt),Mn={preValue:Xe,triggerValue:Ze},un=!0;($||Fe==="selection"&&!Vt)&&(un=!1),QF(Mn,Ze,We,vt,un,De),fe?Mn.checked=Vt:Mn.selected=Vt;var zn=se?In:In.map(function(yn){return yn.value});c(be?zn:zn[0],se?null:In.map(function(yn){return yn.label}),Mn)}}),Ft=v.useCallback(function(We,Qe){var Fe,ze=Qe.selected,Le=Qe.source,Ce=bt[We],Ve=Ce==null?void 0:Ce.node,Ze=(Fe=Ve==null?void 0:Ve[De.value])!==null&&Fe!==void 0?Fe:We;if(!be)qt([Ze],{selected:!0,triggerValue:Ze},"option");else{var Vt=ze?[].concat(Me(Ke),[Ze]):Be.filter(function(Sn){return Sn!==Ze});if(je){var Qt=ft(Vt),zt=Qt.missingRawValues,In=Qt.existRawValues,Mn=In.map(function(Sn){return wt.get(Sn).key}),un;if(ze){var zn=va(Mn,!0,bt);un=zn.checkedKeys}else{var yn=va(Mn,{checked:!1,halfCheckedKeys:Ue},bt);un=yn.checkedKeys}Vt=[].concat(Me(zt),Me(un.map(function(Sn){return bt[Sn].node[De.value]})))}qt(Vt,{selected:ze,triggerValue:Ze},Le||"option")}ze||!be?u==null||u(Ze,tf(Ve)):f==null||f(Ze,tf(Ve))},[ft,wt,bt,De,be,Ke,qt,je,u,f,Be,Ue]),W=v.useCallback(function(We){if(de){var Qe={};Object.defineProperty(Qe,"documentClickClose",{get:function(){return ut(!1,"Second param of `onDropdownVisibleChange` has been removed."),!1}}),de(We,Qe)}},[de]),ue=ym(function(We,Qe){var Fe=We.map(function(ze){return ze.value});if(Qe.type==="clear"){qt(Fe,{},"selection");return}Qe.values.length&&Ft(Qe.values[0].value,{selected:!1,source:"selection"})}),Ie=v.useMemo(function(){return{virtual:q,dropdownMatchSelectWidth:pe,listHeight:ne,listItemHeight:ve,listItemScrollOffset:ge,treeData:Xt,fieldNames:De,onSelect:Ft,treeExpandAction:Y,treeTitleRender:ae}},[q,pe,ne,ve,ge,Xt,De,Ft,Y,ae]),tt=v.useMemo(function(){return{checkable:fe,loadData:U,treeLoadedKeys:k,onTreeLoad:L,checkedKeys:Be,halfCheckedKeys:Ue,treeDefaultExpandAll:H,treeExpandedKeys:V,treeDefaultExpandedKeys:D,onTreeExpand:F,treeIcon:te,treeMotion:Z,showTreeIcon:me,switcherIcon:Ne,treeLine:ce,treeNodeFilterProp:C,keyEntities:bt}},[fe,U,k,L,Be,Ue,H,V,D,F,te,Z,me,Ne,ce,C,bt]);return v.createElement(uS.Provider,{value:Ie},v.createElement(cS.Provider,{value:tt},v.createElement(Mf,it({ref:t},Pe,{id:Te,prefixCls:o,mode:be?"multiple":void 0,displayValues:Tt,onDisplayValuesChange:ue,searchValue:lt,onSearch:Wt,OptionList:dS,emptyOptions:!vt.length,onDropdownVisibleChange:W,dropdownMatchSelectWidth:pe}))))});process.env.NODE_ENV!=="production"&&(fS.displayName="TreeSelect");var Pl=fS;Pl.TreeNode=ev;Pl.SHOW_ALL=tv;Pl.SHOW_PARENT=nv;Pl.SHOW_CHILD=bc;const lL=e=>{const{componentCls:t,treePrefixCls:n,colorBgElevated:r}=e,o=`.${n}`;return[{[`${t}-dropdown`]:[{padding:`${Ye(e.paddingXS)} ${Ye(e.calc(e.paddingXS).div(2).equal())}`},eS(n,bn(e,{colorBgContainer:r})),{[o]:{borderRadius:0,[`${o}-list-holder-inner`]:{alignItems:"stretch",[`${o}-treenode`]:{[`${o}-node-content-wrapper`]:{flex:"auto"}}}}},Wf(`${n}-checkbox`,e),{"&-rtl":{direction:"rtl",[`${o}-switcher${o}-switcher_close`]:{[`${o}-switcher-icon svg`]:{transform:"rotate(90deg)"}}}}]}]};function sL(e,t,n){return Hr("TreeSelect",r=>{const o=bn(r,{treePrefixCls:t});return[lL(o)]},tS)(e,n)}var cL=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n};const uL=(e,t)=>{var n,{prefixCls:r,size:o,disabled:l,bordered:s=!0,className:c,rootClassName:u,treeCheckable:f,multiple:h,listHeight:g=256,listItemHeight:p=26,placement:y,notFoundContent:x,switcherIcon:S,treeLine:m,getPopupContainer:C,popupClassName:w,dropdownClassName:E,treeIcon:O=!1,transitionName:R,choiceTransitionName:$="",status:I,treeExpandAction:N,builtinPlacements:P,dropdownMatchSelectWidth:A,popupMatchSelectWidth:B,allowClear:U,variant:k,dropdownStyle:L,tagRender:H}=e,V=cL(e,["prefixCls","size","disabled","bordered","className","rootClassName","treeCheckable","multiple","listHeight","listItemHeight","placement","notFoundContent","switcherIcon","treeLine","getPopupContainer","popupClassName","dropdownClassName","treeIcon","transitionName","choiceTransitionName","status","treeExpandAction","builtinPlacements","dropdownMatchSelectWidth","popupMatchSelectWidth","allowClear","variant","dropdownStyle","tagRender"]);const{getPopupContainer:D,getPrefixCls:F,renderEmpty:Y,direction:q,virtual:X,popupMatchSelectWidth:ne,popupOverflow:re}=v.useContext(Gt);if(process.env.NODE_ENV!=="production"){const Et=Ln("TreeSelect");process.env.NODE_ENV!=="production"&&Et(h!==!1||!f,"usage","`multiple` will always be `true` when `treeCheckable` is true"),Et.deprecated(!E,"dropdownClassName","popupClassName"),Et.deprecated(A===void 0,"dropdownMatchSelectWidth","popupMatchSelectWidth"),process.env.NODE_ENV!=="production"&&Et(!("showArrow"in V),"deprecated","`showArrow` is deprecated which will be removed in next major version. It will be a default behavior, you can hide it by setting `suffixIcon` to null."),Et.deprecated(!("bordered"in V),"bordered","variant")}const ve=F(),oe=F("select",r),ge=F("select-tree",r),de=F("tree-select",r),{compactSize:ye,compactItemClassnames:pe}=Ol(oe,q),ce=Br(oe),te=Br(de),[me,Ne,Z]=ry(oe,ce),[ae]=sL(de,ge,te),[Pe,Te]=vc(k,s),je=Ee(w||E,`${de}-dropdown`,{[`${de}-dropdown-rtl`]:q==="rtl"},u,Z,ce,te,Ne),fe=!!(f||h),se=ly(V.suffixIcon,V.showArrow),be=(n=B??A)!==null&&n!==void 0?n:ne,{status:ke,hasFeedback:$e,isFormItemInput:Je,feedbackIcon:Ge}=v.useContext(ar),He=fc(ke,I),{suffixIcon:De,removeIcon:et,clearIcon:Re}=ay(Object.assign(Object.assign({},V),{multiple:fe,showSuffixIcon:se,hasFeedback:$e,feedbackIcon:Ge,prefixCls:oe,componentName:"TreeSelect"})),lt=U===!0?{clearIcon:Re}:U;let st;x!==void 0?st=x:st=(Y==null?void 0:Y("Select"))||v.createElement(Jb,{componentName:"Select"});const Wt=uo(V,["suffixIcon","removeIcon","clearIcon","itemIcon","switcherIcon"]),vt=v.useMemo(()=>y!==void 0?y:q==="rtl"?"bottomRight":"bottomLeft",[y,q]),Ut=ni(Et=>{var Ct;return(Ct=o??ye)!==null&&Ct!==void 0?Ct:Et}),bt=v.useContext(eo),wt=l??bt,ft=Ee(!r&&de,{[`${oe}-lg`]:Ut==="large",[`${oe}-sm`]:Ut==="small",[`${oe}-rtl`]:q==="rtl",[`${oe}-${Pe}`]:Te,[`${oe}-in-form-item`]:Je},ml(oe,He,$e),pe,c,u,Z,ce,te,Ne),Xt=Et=>v.createElement(iS,{prefixCls:ge,switcherIcon:S,treeNodeProps:Et,showLine:m}),[Pt]=bf("SelectLike",L==null?void 0:L.zIndex),Ot=v.createElement(Pl,Object.assign({virtual:X,disabled:wt},Wt,{dropdownMatchSelectWidth:be,builtinPlacements:ey(P,re),ref:t,prefixCls:oe,className:ft,listHeight:g,listItemHeight:p,treeCheckable:f&&v.createElement("span",{className:`${oe}-tree-checkbox-inner`}),treeLine:!!m,suffixIcon:De,multiple:fe,placement:vt,removeIcon:et,allowClear:lt,switcherIcon:Xt,showTreeIcon:O,notFoundContent:st,getPopupContainer:C||D,treeMotion:null,dropdownClassName:je,dropdownStyle:Object.assign(Object.assign({},L),{zIndex:Pt}),choiceTransitionName:qs(ve,"",$),transitionName:qs(ve,"slide-up",R),treeExpandAction:N,tagRender:fe?H:void 0}));return me(ae(Ot))},dL=v.forwardRef(uL),oi=dL,fL=Rb(oi);oi.TreeNode=ev;oi.SHOW_ALL=tv;oi.SHOW_PARENT=nv;oi.SHOW_CHILD=bc;oi._InternalPanelDoNotUseOrYouWillBeFired=fL;process.env.NODE_ENV!=="production"&&(oi.displayName="TreeSelect");const to=function(t){let{label:n,children:r,prompt:o,...l}=t;return Dt.jsxs("div",{className:"frelative",children:[n&&Dt.jsx("div",{className:"fh-8 ftext-sm fflex fjustify-between fitems-center",children:n}),Dt.jsx("div",{className:"fw-full fflex fitems-stretch",children:r}),Dt.jsx("div",{className:"ftext-xs ftext-gray-500 fmin-h-5 fflex fitems-center",children:o})]})},{TextArea:vL,Password:hL,Search:gL}=ri,pL=e=>Dt.jsx(to,{...e,children:Dt.jsx(ri,{...e})}),mL=e=>{let{value:t,...n}=e;return t=t||"系统自动生成",Dt.jsx(to,{...n,children:Dt.jsx(ri,{...n,disabled:!0,value:t})})},bL=e=>Dt.jsx(to,{...e,children:Dt.jsx(vL,{...e})}),yL=e=>Dt.jsx(to,{...e,children:Dt.jsx(hL,{...e})}),SL=e=>Dt.jsx(to,{...e,children:Dt.jsx(gL,{...e})});function vS(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"id",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"title",r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"parentId",o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"children",l=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0,s=arguments.length>6&&arguments[6]!==void 0?arguments[6]:0;return CL(e,t,n,r,o,l,c=>({value:c[t],title:c[n],key:c[t],disabled:c[t]===s}))}function CL(e,t,n,r,o,l,s){if(!Array.isArray(e)||e.length===0)return[];const c=e.map(u=>({...u,...s(u)}));return c.filter(u=>{const f=c.filter(h=>u[t]===h[r]);return u[o]=f.length>0?f:[],u[r]===l})}var Js={exports:{}};/**
|
|
266
266
|
* @license
|
|
267
267
|
* Lodash <https://lodash.com/>
|
|
268
268
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -288,4 +288,4 @@ __p += '`),kt&&(Oe+=`' +
|
|
|
288
288
|
function print() { __p += __j.call(arguments, '') }
|
|
289
289
|
`:`;
|
|
290
290
|
`)+Oe+`return __p
|
|
291
|
-
}`;var At=cg(function(){return Zt(M,ct+"return "+Oe).apply(n,K)});if(At.source=Oe,vu(At))throw At;return At}function iO(i){return Jt(i).toLowerCase()}function aO(i){return Jt(i).toUpperCase()}function lO(i,a,d){if(i=Jt(i),i&&(d||a===n))return bv(i);if(!i||!(a=mr(a)))return i;var b=Kr(i),_=Kr(a),M=yv(b,_),K=Sv(b,_)+1;return Ko(b,M,K).join("")}function sO(i,a,d){if(i=Jt(i),i&&(d||a===n))return i.slice(0,xv(i)+1);if(!i||!(a=mr(a)))return i;var b=Kr(i),_=Sv(b,Kr(a))+1;return Ko(b,0,_).join("")}function cO(i,a,d){if(i=Jt(i),i&&(d||a===n))return i.replace(dt,"");if(!i||!(a=mr(a)))return i;var b=Kr(i),_=yv(b,Kr(a));return Ko(b,_).join("")}function uO(i,a){var d=A,b=B;if(xn(a)){var _="separator"in a?a.separator:_;d="length"in a?Mt(a.length):d,b="omission"in a?mr(a.omission):b}i=Jt(i);var M=i.length;if(Bi(i)){var K=Kr(i);M=K.length}if(d>=M)return i;var G=d-Hi(b);if(G<1)return b;var ee=K?Ko(K,0,G).join(""):i.slice(0,G);if(_===n)return ee+b;if(K&&(G+=ee.length-G),hu(_)){if(i.slice(G).search(_)){var Se,xe=ee;for(_.global||(_=Nc(_.source,Jt(We.exec(_))+"g")),_.lastIndex=0;Se=_.exec(xe);)var Oe=Se.index;ee=ee.slice(0,Oe===n?G:Oe)}}else if(i.indexOf(mr(_),G)!=G){var qe=ee.lastIndexOf(_);qe>-1&&(ee=ee.slice(0,qe))}return ee+b}function dO(i){return i=Jt(i),i&&Yt.test(i)?i.replace(Et,jS):i}var fO=Xi(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),mu=uh("toUpperCase");function sg(i,a,d){return i=Jt(i),a=d?n:a,a===n?AS(i)?kS(i):$S(i):i.match(a)||[]}var cg=Lt(function(i,a){try{return gr(i,n,a)}catch(d){return vu(d)?d:new Rt(d)}}),vO=So(function(i,a){return Rr(a,function(d){d=ao(d),bo(i,d,du(i[d],i))}),i});function hO(i){var a=i==null?0:i.length,d=ht();return i=a?mn(i,function(b){if(typeof b[1]!="function")throw new Ir(s);return[d(b[0]),b[1]]}):[],Lt(function(b){for(var _=-1;++_<a;){var M=i[_];if(gr(M[0],this,b))return gr(M[1],this,b)}})}function gO(i){return jC(Pr(i,g))}function bu(i){return function(){return i}}function pO(i,a){return i==null||i!==i?a:i}var mO=fh(),bO=fh(!0);function fr(i){return i}function yu(i){return Hv(typeof i=="function"?i:Pr(i,g))}function yO(i){return Wv(Pr(i,g))}function SO(i,a){return Kv(i,Pr(a,g))}var CO=Lt(function(i,a){return function(d){return Va(d,i,a)}}),xO=Lt(function(i,a){return function(d){return Va(i,d,a)}});function Su(i,a,d){var b=jn(a),_=Ql(a,b);d==null&&!(xn(a)&&(_.length||!b.length))&&(d=a,a=i,i=this,_=Ql(a,jn(a)));var M=!(xn(d)&&"chain"in d)||!!d.chain,K=xo(i);return Rr(_,function(G){var ee=a[G];i[G]=ee,K&&(i.prototype[G]=function(){var Se=this.__chain__;if(M||Se){var xe=i(this.__wrapped__),Oe=xe.__actions__=cr(this.__actions__);return Oe.push({func:ee,args:arguments,thisArg:i}),xe.__chain__=Se,xe}return ee.apply(i,zo([this.value()],arguments))})}),i}function wO(){return Bn._===this&&(Bn._=XS),this}function Cu(){}function EO(i){return i=Mt(i),Lt(function(a){return Uv(a,i)})}var OO=Qc(mn),$O=Qc(vv),_O=Qc(wc);function ug(i){return iu(i)?Ec(ao(i)):r1(i)}function RO(i){return function(a){return i==null?n:di(i,a)}}var IO=hh(),NO=hh(!0);function xu(){return[]}function wu(){return!1}function PO(){return{}}function TO(){return""}function MO(){return!0}function DO(i,a){if(i=Mt(i),i<1||i>F)return[];var d=X,b=Un(i,X);a=ht(a),i-=X;for(var _=_c(b,a);++d<i;)a(d);return _}function AO(i){return Nt(i)?mn(i,ao):br(i)?[i]:cr(Nh(Jt(i)))}function FO(i){var a=++qS;return Jt(i)+a}var LO=os(function(i,a){return i+a},0),VO=Jc("ceil"),zO=os(function(i,a){return i/a},1),jO=Jc("floor");function BO(i){return i&&i.length?Zl(i,fr,Vc):n}function HO(i,a){return i&&i.length?Zl(i,ht(a,2),Vc):n}function kO(i){return pv(i,fr)}function WO(i,a){return pv(i,ht(a,2))}function KO(i){return i&&i.length?Zl(i,fr,Hc):n}function UO(i,a){return i&&i.length?Zl(i,ht(a,2),Hc):n}var qO=os(function(i,a){return i*a},1),GO=Jc("round"),XO=os(function(i,a){return i-a},0);function YO(i){return i&&i.length?$c(i,fr):0}function ZO(i,a){return i&&i.length?$c(i,ht(a,2)):0}return T.after=yw,T.ary=Bh,T.assign=aE,T.assignIn=tg,T.assignInWith=ms,T.assignWith=lE,T.at=sE,T.before=Hh,T.bind=du,T.bindAll=vO,T.bindKey=kh,T.castArray=Pw,T.chain=Vh,T.chunk=j1,T.compact=B1,T.concat=H1,T.cond=hO,T.conforms=gO,T.constant=bu,T.countBy=Yx,T.create=cE,T.curry=Wh,T.curryRight=Kh,T.debounce=Uh,T.defaults=uE,T.defaultsDeep=dE,T.defer=Sw,T.delay=Cw,T.difference=k1,T.differenceBy=W1,T.differenceWith=K1,T.drop=U1,T.dropRight=q1,T.dropRightWhile=G1,T.dropWhile=X1,T.fill=Y1,T.filter=Qx,T.flatMap=tw,T.flatMapDeep=nw,T.flatMapDepth=rw,T.flatten=Dh,T.flattenDeep=Z1,T.flattenDepth=Q1,T.flip=xw,T.flow=mO,T.flowRight=bO,T.fromPairs=J1,T.functions=bE,T.functionsIn=yE,T.groupBy=ow,T.initial=tx,T.intersection=nx,T.intersectionBy=rx,T.intersectionWith=ox,T.invert=CE,T.invertBy=xE,T.invokeMap=aw,T.iteratee=yu,T.keyBy=lw,T.keys=jn,T.keysIn=dr,T.map=ds,T.mapKeys=EE,T.mapValues=OE,T.matches=yO,T.matchesProperty=SO,T.memoize=vs,T.merge=$E,T.mergeWith=ng,T.method=CO,T.methodOf=xO,T.mixin=Su,T.negate=hs,T.nthArg=EO,T.omit=_E,T.omitBy=RE,T.once=ww,T.orderBy=sw,T.over=OO,T.overArgs=Ew,T.overEvery=$O,T.overSome=_O,T.partial=fu,T.partialRight=qh,T.partition=cw,T.pick=IE,T.pickBy=rg,T.property=ug,T.propertyOf=RO,T.pull=sx,T.pullAll=Fh,T.pullAllBy=cx,T.pullAllWith=ux,T.pullAt=dx,T.range=IO,T.rangeRight=NO,T.rearg=Ow,T.reject=fw,T.remove=fx,T.rest=$w,T.reverse=cu,T.sampleSize=hw,T.set=PE,T.setWith=TE,T.shuffle=gw,T.slice=vx,T.sortBy=bw,T.sortedUniq=Sx,T.sortedUniqBy=Cx,T.split=tO,T.spread=_w,T.tail=xx,T.take=wx,T.takeRight=Ex,T.takeRightWhile=Ox,T.takeWhile=$x,T.tap=Bx,T.throttle=Rw,T.thru=us,T.toArray=Qh,T.toPairs=og,T.toPairsIn=ig,T.toPath=AO,T.toPlainObject=eg,T.transform=ME,T.unary=Iw,T.union=_x,T.unionBy=Rx,T.unionWith=Ix,T.uniq=Nx,T.uniqBy=Px,T.uniqWith=Tx,T.unset=DE,T.unzip=uu,T.unzipWith=Lh,T.update=AE,T.updateWith=FE,T.values=Qi,T.valuesIn=LE,T.without=Mx,T.words=sg,T.wrap=Nw,T.xor=Dx,T.xorBy=Ax,T.xorWith=Fx,T.zip=Lx,T.zipObject=Vx,T.zipObjectDeep=zx,T.zipWith=jx,T.entries=og,T.entriesIn=ig,T.extend=tg,T.extendWith=ms,Su(T,T),T.add=LO,T.attempt=cg,T.camelCase=BE,T.capitalize=ag,T.ceil=VO,T.clamp=VE,T.clone=Tw,T.cloneDeep=Dw,T.cloneDeepWith=Aw,T.cloneWith=Mw,T.conformsTo=Fw,T.deburr=lg,T.defaultTo=pO,T.divide=zO,T.endsWith=HE,T.eq=qr,T.escape=kE,T.escapeRegExp=WE,T.every=Zx,T.find=Jx,T.findIndex=Th,T.findKey=fE,T.findLast=ew,T.findLastIndex=Mh,T.findLastKey=vE,T.floor=jO,T.forEach=zh,T.forEachRight=jh,T.forIn=hE,T.forInRight=gE,T.forOwn=pE,T.forOwnRight=mE,T.get=gu,T.gt=Lw,T.gte=Vw,T.has=SE,T.hasIn=pu,T.head=Ah,T.identity=fr,T.includes=iw,T.indexOf=ex,T.inRange=zE,T.invoke=wE,T.isArguments=hi,T.isArray=Nt,T.isArrayBuffer=zw,T.isArrayLike=ur,T.isArrayLikeObject=On,T.isBoolean=jw,T.isBuffer=Uo,T.isDate=Bw,T.isElement=Hw,T.isEmpty=kw,T.isEqual=Ww,T.isEqualWith=Kw,T.isError=vu,T.isFinite=Uw,T.isFunction=xo,T.isInteger=Gh,T.isLength=gs,T.isMap=Xh,T.isMatch=qw,T.isMatchWith=Gw,T.isNaN=Xw,T.isNative=Yw,T.isNil=Qw,T.isNull=Zw,T.isNumber=Yh,T.isObject=xn,T.isObjectLike=En,T.isPlainObject=Wa,T.isRegExp=hu,T.isSafeInteger=Jw,T.isSet=Zh,T.isString=ps,T.isSymbol=br,T.isTypedArray=Zi,T.isUndefined=eE,T.isWeakMap=tE,T.isWeakSet=nE,T.join=ix,T.kebabCase=KE,T.last=Mr,T.lastIndexOf=ax,T.lowerCase=UE,T.lowerFirst=qE,T.lt=rE,T.lte=oE,T.max=BO,T.maxBy=HO,T.mean=kO,T.meanBy=WO,T.min=KO,T.minBy=UO,T.stubArray=xu,T.stubFalse=wu,T.stubObject=PO,T.stubString=TO,T.stubTrue=MO,T.multiply=qO,T.nth=lx,T.noConflict=wO,T.noop=Cu,T.now=fs,T.pad=GE,T.padEnd=XE,T.padStart=YE,T.parseInt=ZE,T.random=jE,T.reduce=uw,T.reduceRight=dw,T.repeat=QE,T.replace=JE,T.result=NE,T.round=GO,T.runInContext=J,T.sample=vw,T.size=pw,T.snakeCase=eO,T.some=mw,T.sortedIndex=hx,T.sortedIndexBy=gx,T.sortedIndexOf=px,T.sortedLastIndex=mx,T.sortedLastIndexBy=bx,T.sortedLastIndexOf=yx,T.startCase=nO,T.startsWith=rO,T.subtract=XO,T.sum=YO,T.sumBy=ZO,T.template=oO,T.times=DO,T.toFinite=wo,T.toInteger=Mt,T.toLength=Jh,T.toLower=iO,T.toNumber=Dr,T.toSafeInteger=iE,T.toString=Jt,T.toUpper=aO,T.trim=lO,T.trimEnd=sO,T.trimStart=cO,T.truncate=uO,T.unescape=dO,T.uniqueId=FO,T.upperCase=fO,T.upperFirst=mu,T.each=zh,T.eachRight=jh,T.first=Ah,Su(T,function(){var i={};return oo(T,function(a,d){nn.call(T.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),T.VERSION=r,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){T[i].placeholder=T}),Rr(["drop","take"],function(i,a){Bt.prototype[i]=function(d){d=d===n?1:Fn(Mt(d),0);var b=this.__filtered__&&!a?new Bt(this):this.clone();return b.__filtered__?b.__takeCount__=Un(d,b.__takeCount__):b.__views__.push({size:Un(d,X),type:i+(b.__dir__<0?"Right":"")}),b},Bt.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Rr(["filter","map","takeWhile"],function(i,a){var d=a+1,b=d==L||d==V;Bt.prototype[i]=function(_){var M=this.clone();return M.__iteratees__.push({iteratee:ht(_,3),type:d}),M.__filtered__=M.__filtered__||b,M}}),Rr(["head","last"],function(i,a){var d="take"+(a?"Right":"");Bt.prototype[i]=function(){return this[d](1).value()[0]}}),Rr(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Bt.prototype[i]=function(){return this.__filtered__?new Bt(this):this[d](1)}}),Bt.prototype.compact=function(){return this.filter(fr)},Bt.prototype.find=function(i){return this.filter(i).head()},Bt.prototype.findLast=function(i){return this.reverse().find(i)},Bt.prototype.invokeMap=Lt(function(i,a){return typeof i=="function"?new Bt(this):this.map(function(d){return Va(d,i,a)})}),Bt.prototype.reject=function(i){return this.filter(hs(ht(i)))},Bt.prototype.slice=function(i,a){i=Mt(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Bt(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=Mt(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Bt.prototype.toArray=function(){return this.take(X)},oo(Bt.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),b=/^(?:head|last)$/.test(a),_=T[b?"take"+(a=="last"?"Right":""):a],M=b||/^find/.test(a);_&&(T.prototype[a]=function(){var K=this.__wrapped__,G=b?[1]:arguments,ee=K instanceof Bt,Se=G[0],xe=ee||Nt(K),Oe=function(jt){var kt=_.apply(T,zo([jt],G));return b&&qe?kt[0]:kt};xe&&d&&typeof Se=="function"&&Se.length!=1&&(ee=xe=!1);var qe=this.__chain__,ct=!!this.__actions__.length,pt=M&&!qe,At=ee&&!ct;if(!M&&xe){K=At?K:new Bt(this);var mt=i.apply(K,G);return mt.__actions__.push({func:us,args:[Oe],thisArg:n}),new Nr(mt,qe)}return pt&&At?i.apply(this,G):(mt=this.thru(Oe),pt?b?mt.value()[0]:mt.value():mt)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(i){var a=Fl[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",b=/^(?:pop|shift)$/.test(i);T.prototype[i]=function(){var _=arguments;if(b&&!this.__chain__){var M=this.value();return a.apply(Nt(M)?M:[],_)}return this[d](function(K){return a.apply(Nt(K)?K:[],_)})}}),oo(Bt.prototype,function(i,a){var d=T[a];if(d){var b=d.name+"";nn.call(Ui,b)||(Ui[b]=[]),Ui[b].push({name:a,func:d})}}),Ui[rs(n,C).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=dC,Bt.prototype.reverse=fC,Bt.prototype.value=vC,T.prototype.at=Hx,T.prototype.chain=kx,T.prototype.commit=Wx,T.prototype.next=Kx,T.prototype.plant=qx,T.prototype.reverse=Gx,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=Xx,T.prototype.first=T.prototype.head,Pa&&(T.prototype[Pa]=Ux),T},ki=WS();ai?((ai.exports=ki)._=ki,yc._=ki):Bn._=ki}).call(Ka)})(Js,Js.exports);var xL=Js.exports;const wL=e=>{let{request:t,title:n,disabledValue:r,callError:o,...l}=e;const[s,c]=j.useState(!1),[u,f]=j.useState([]);j.useEffect(()=>{h()},[]);const h=async()=>{if(t&&typeof t=="function"){var g;const p=await t();if(p.code>0){o&&typeof o=="function"&&o(p.message);return}let y=vS(((g=p.data)===null||g===void 0?void 0:g.list)||p.data||[],"id",n||"title",l.parentId||"parentId","children",0,r);y=[{value:0,title:"根节点",children:y}],l.treeData=y,f(y)}l.treeData&&f(l.treeData),c(!0)};return Dt.jsx(to,{...l,children:s&&Dt.jsx(oi,{...l,treeData:u,treeDefaultExpandAll:!0,style:{width:"100%"}})})},rv=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:l,options:s,...c}=e;const[u,f]=j.useState([]);j.useEffect(()=>{h()},[]);const h=async()=>{if(t&&typeof t=="function"){var g;const p=await t();if(p.code>0){l&&typeof l=="function"&&l(p.message);return}let y=((g=p.data)===null||g===void 0?void 0:g.list)||p.data;Array.isArray(y)&&y.length>0&&f(y.map(x=>({label:x[n],value:x[r]})))}s&&s.length>0&&f(s)};return Dt.jsx(to,{...c,children:Dt.jsx(Ai,{...c,options:u,style:{width:"100%"}})})},EL=e=>{let{onChange:t,value:n,...r}=e;const[o,l]=j.useState("");j.useEffect(()=>{if(n)try{n=JSON.parse(n),l(n.label)}catch{}},[n]);const s=(c,u)=>{t&&typeof t=="function"&&t(JSON.stringify(u)),l(u.label)};return Dt.jsx(rv,{...r,onChange:s,value:o,mode:"single"})},OL=e=>{let{onChange:t,value:n,...r}=e;const[o,l]=j.useState([]);j.useEffect(()=>{if(n)try{n=JSON.parse(n),Array.isArray(n)&&l(n)}catch{}},[n]);const s=(c,u)=>{t&&typeof t=="function"&&t(JSON.stringify(u)),u.map(f=>f.label),l(u)};return Dt.jsx(rv,{...r,onChange:s,value:o,mode:"multiple"})},$L=j.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const l=j.useRef(0),s=()=>{l.current++,r(l.current)};return Dt.jsxs(to,{...o,children:[Dt.jsxs("div",{ref:t,children:["form-set-value:",n]}),Dt.jsx($l,{onClick:s,children:"test"})]})}),_L=e=>{let{children:t,layout:n}=e;n=n||"1";const r=s=>{const c=s.split(",").map(Number),u=24;return c.map(f=>f/c.reduce((h,g)=>h+g)*u)},o=j.useMemo(()=>r(n),[n]);console.log("colSpans",o);const l=j.useMemo(()=>j.Children.toArray(t).map((s,c)=>{const u=s.props,f=(u==null?void 0:u.componentId)||(u==null?void 0:u.__id);return f?(o==null?void 0:o[c])&&Dt.jsx(ya,{span:o[c],children:Dt.jsx(Vr.Item,{style:{marginBottom:0},label:"",name:f,rules:[{required:u.isRequired,message:"".concat(u.title,"不能为空!")}],children:s},"".concat(f,"-form-item"))},c):(o==null?void 0:o[c])&&Dt.jsx(ya,{span:o[c],children:s},c)}),[t,o]);return Dt.jsx(pc,{gutter:24,children:l})},RL=e=>{let{title:t}=e;return t?Dt.jsx("div",{className:"h-11 border-b flex items-center text-lg font-medium mb-5 ",children:t}):null};function IL(e,t){const n=[];let r=[];const o=(l,s)=>{const c=l-s.length;s.push(...new Array(c).fill(j.createElement("div")))};for(const l of e){const{_componentName:s}=(l==null?void 0:l.props)||{};s&&s.startsWith("Layout")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([l])):(r.push(l),r.length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const ov=j.forwardRef((e,t)=>{let{cols:n=1,children:r}=e;const[o]=Vr.useForm(),[l,s]=j.useState(null),c=j.useRef(null);j.useImperativeHandle(t,()=>({formRef:o,initializeFieldVisibility:f}),[]),j.useEffect(()=>{u(),s(p())},[r,n]);const u=()=>{c.current=new Map;const y=j.Children.toArray(r);y.forEach(x=>{const{componentId:S,__id:m,...C}=x.props,w=S||m;c.current.set(w,{children:y.filter(E=>{var O;return E.props.__withId===w||((O=E.props.__withIds)===null||O===void 0?void 0:O.includes(w))}),show:!0})}),f()},f=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const x=o.getFieldsValue();for(let S of c.current.keys())h(S,x);y&&s(p())},h=(y,x)=>{let S=!1;return c.current.has(y)&&c.current.get(y).children.forEach(C=>{if(C.props.__withFunc&&typeof C.props.__withFunc=="function"){const w=C.props.__withFunc(x),E=C.props.componentId||C.props.__id;if(c.current.has(E)){const O=c.current.get(E);O.show!==w&&(O.show=w,c.current.set(E,O),S=!0)}}}),S},g=xL.debounce((y,x)=>{const S=o.getFieldsValue();let m=!1;y.forEach(C=>{C.name&&C.name.length>0&&(m=h(C.name[0],S))}),m&&s(p())},100),p=()=>{const y=j.Children.toArray(r);return IL(y.filter(S=>{const m=S.props.componentId||S.props.__id;return c.current.has(m)&&c.current.get(m).show}),n).map((S,m)=>Dt.jsx(pc,{gutter:[24,24],children:S.map((C,w)=>{const{componentId:E,__id:O,_componentName:R,...$}=C.props,I=E||O,N=R&&R.startsWith("Layout");return Dt.jsx(ya,{span:N?24:24/S.length,style:{marginBottom:0},children:N?C:Dt.jsx(Vr.Item,{style:{marginBottom:0},label:"",name:I,rules:[{required:$.isRequired,message:"".concat($.title,"不能为空!")}],children:C})},I||"col-".concat(w))})},"row-".concat(m)))};return Dt.jsx(Vr,{form:o,className:"form-container p-6 w-full h-full box-border overflow-auto",onFieldsChange:g,children:l})});function NL(e){return j.forwardRef((t,n)=>Dt.jsx(e,{...t,ref:n,forwardedRef:n}))}class LL extends j.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return Dt.jsx(ov,{...n,ref:t})}}const PL=NL(e=>{let{forwardedRef:t,...n}=e;return Dt.jsx(ov,{...n,ref:t})}),TL=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:l,addRoot:s=!0,title:c,...u}=e;const[f,h]=j.useState(!1),[g,p]=j.useState([]);j.useEffect(()=>{y()},[]),j.useEffect(()=>{console.log("CheckboxTree value ",n),typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(n)&&C(n)},[n]);const y=async()=>{if(t&&typeof t=="function"){var P;const A=await t();if(A.code>0){o&&typeof o=="function"&&o(A.message);return}let B=vS(((P=A.data)===null||P===void 0?void 0:P.list)||A.data||[],"id",c||"title",(u==null?void 0:u.parentId)||"parentId","children",0,l);s&&(B=[{value:0,title:"根节点",children:B}]),u.treeData=B,console.log("treeData",B),p(B)}u.treeData&&p(u.treeData),h(!0)},[x,S]=j.useState([]),[m,C]=j.useState([]),[w,E]=j.useState([]),[O,R]=j.useState(!0),$=P=>{console.log("onExpand",P),S(P),R(!1)},I=P=>{console.log("onCheck",P),C(P),r(P)},N=(P,A)=>{console.log("onSelect",A),E(P)};return Dt.jsx(to,{...u,children:Dt.jsx(Jf,{checkable:!0,onExpand:$,onCheck:I,onSelect:N,expandedKeys:x,autoExpandParent:O,checkedKeys:m,selectedKeys:w,treeData:g})})},ML=e=>Dt.jsx(to,{...e,children:Dt.jsx(gc,{...e})}),DL=e=>Dt.jsx(to,{...e,children:Dt.jsx(hc.Group,{...e})}),AL={Input:pL,TextArea:bL,Password:yL,Search:SL,TreeSelect:wL,Select:rv,WithSingleSelect:EL,WithMultipleSelect:OL,CodeMachine:mL,Checkbox:ML,CheckboxTree:TL,RadioGrop:DL,Custom:$L},FL={FormRow:_L,FormGroupTitle:RL};exports.Field=AL;exports.FormContainer=ov;exports.FormContainerWrapper=PL;exports.Layout=FL;
|
|
291
|
+
}`;var At=cg(function(){return Zt(M,ct+"return "+Oe).apply(n,K)});if(At.source=Oe,vu(At))throw At;return At}function iO(i){return Jt(i).toLowerCase()}function aO(i){return Jt(i).toUpperCase()}function lO(i,a,d){if(i=Jt(i),i&&(d||a===n))return bv(i);if(!i||!(a=mr(a)))return i;var b=Kr(i),_=Kr(a),M=yv(b,_),K=Sv(b,_)+1;return Ko(b,M,K).join("")}function sO(i,a,d){if(i=Jt(i),i&&(d||a===n))return i.slice(0,xv(i)+1);if(!i||!(a=mr(a)))return i;var b=Kr(i),_=Sv(b,Kr(a))+1;return Ko(b,0,_).join("")}function cO(i,a,d){if(i=Jt(i),i&&(d||a===n))return i.replace(dt,"");if(!i||!(a=mr(a)))return i;var b=Kr(i),_=yv(b,Kr(a));return Ko(b,_).join("")}function uO(i,a){var d=A,b=B;if(xn(a)){var _="separator"in a?a.separator:_;d="length"in a?Mt(a.length):d,b="omission"in a?mr(a.omission):b}i=Jt(i);var M=i.length;if(Bi(i)){var K=Kr(i);M=K.length}if(d>=M)return i;var G=d-Hi(b);if(G<1)return b;var ee=K?Ko(K,0,G).join(""):i.slice(0,G);if(_===n)return ee+b;if(K&&(G+=ee.length-G),hu(_)){if(i.slice(G).search(_)){var Se,xe=ee;for(_.global||(_=Nc(_.source,Jt(We.exec(_))+"g")),_.lastIndex=0;Se=_.exec(xe);)var Oe=Se.index;ee=ee.slice(0,Oe===n?G:Oe)}}else if(i.indexOf(mr(_),G)!=G){var qe=ee.lastIndexOf(_);qe>-1&&(ee=ee.slice(0,qe))}return ee+b}function dO(i){return i=Jt(i),i&&Yt.test(i)?i.replace(Et,jS):i}var fO=Xi(function(i,a,d){return i+(d?" ":"")+a.toUpperCase()}),mu=uh("toUpperCase");function sg(i,a,d){return i=Jt(i),a=d?n:a,a===n?AS(i)?kS(i):$S(i):i.match(a)||[]}var cg=Lt(function(i,a){try{return gr(i,n,a)}catch(d){return vu(d)?d:new Rt(d)}}),vO=So(function(i,a){return Rr(a,function(d){d=ao(d),bo(i,d,du(i[d],i))}),i});function hO(i){var a=i==null?0:i.length,d=ht();return i=a?mn(i,function(b){if(typeof b[1]!="function")throw new Ir(s);return[d(b[0]),b[1]]}):[],Lt(function(b){for(var _=-1;++_<a;){var M=i[_];if(gr(M[0],this,b))return gr(M[1],this,b)}})}function gO(i){return jC(Pr(i,g))}function bu(i){return function(){return i}}function pO(i,a){return i==null||i!==i?a:i}var mO=fh(),bO=fh(!0);function fr(i){return i}function yu(i){return Hv(typeof i=="function"?i:Pr(i,g))}function yO(i){return Wv(Pr(i,g))}function SO(i,a){return Kv(i,Pr(a,g))}var CO=Lt(function(i,a){return function(d){return Va(d,i,a)}}),xO=Lt(function(i,a){return function(d){return Va(i,d,a)}});function Su(i,a,d){var b=jn(a),_=Ql(a,b);d==null&&!(xn(a)&&(_.length||!b.length))&&(d=a,a=i,i=this,_=Ql(a,jn(a)));var M=!(xn(d)&&"chain"in d)||!!d.chain,K=xo(i);return Rr(_,function(G){var ee=a[G];i[G]=ee,K&&(i.prototype[G]=function(){var Se=this.__chain__;if(M||Se){var xe=i(this.__wrapped__),Oe=xe.__actions__=cr(this.__actions__);return Oe.push({func:ee,args:arguments,thisArg:i}),xe.__chain__=Se,xe}return ee.apply(i,zo([this.value()],arguments))})}),i}function wO(){return Bn._===this&&(Bn._=XS),this}function Cu(){}function EO(i){return i=Mt(i),Lt(function(a){return Uv(a,i)})}var OO=Qc(mn),$O=Qc(vv),_O=Qc(wc);function ug(i){return iu(i)?Ec(ao(i)):r1(i)}function RO(i){return function(a){return i==null?n:di(i,a)}}var IO=hh(),NO=hh(!0);function xu(){return[]}function wu(){return!1}function PO(){return{}}function TO(){return""}function MO(){return!0}function DO(i,a){if(i=Mt(i),i<1||i>F)return[];var d=X,b=Un(i,X);a=ht(a),i-=X;for(var _=_c(b,a);++d<i;)a(d);return _}function AO(i){return Nt(i)?mn(i,ao):br(i)?[i]:cr(Nh(Jt(i)))}function FO(i){var a=++qS;return Jt(i)+a}var LO=os(function(i,a){return i+a},0),VO=Jc("ceil"),zO=os(function(i,a){return i/a},1),jO=Jc("floor");function BO(i){return i&&i.length?Zl(i,fr,Vc):n}function HO(i,a){return i&&i.length?Zl(i,ht(a,2),Vc):n}function kO(i){return pv(i,fr)}function WO(i,a){return pv(i,ht(a,2))}function KO(i){return i&&i.length?Zl(i,fr,Hc):n}function UO(i,a){return i&&i.length?Zl(i,ht(a,2),Hc):n}var qO=os(function(i,a){return i*a},1),GO=Jc("round"),XO=os(function(i,a){return i-a},0);function YO(i){return i&&i.length?$c(i,fr):0}function ZO(i,a){return i&&i.length?$c(i,ht(a,2)):0}return T.after=yw,T.ary=Bh,T.assign=aE,T.assignIn=tg,T.assignInWith=ms,T.assignWith=lE,T.at=sE,T.before=Hh,T.bind=du,T.bindAll=vO,T.bindKey=kh,T.castArray=Pw,T.chain=Vh,T.chunk=j1,T.compact=B1,T.concat=H1,T.cond=hO,T.conforms=gO,T.constant=bu,T.countBy=Yx,T.create=cE,T.curry=Wh,T.curryRight=Kh,T.debounce=Uh,T.defaults=uE,T.defaultsDeep=dE,T.defer=Sw,T.delay=Cw,T.difference=k1,T.differenceBy=W1,T.differenceWith=K1,T.drop=U1,T.dropRight=q1,T.dropRightWhile=G1,T.dropWhile=X1,T.fill=Y1,T.filter=Qx,T.flatMap=tw,T.flatMapDeep=nw,T.flatMapDepth=rw,T.flatten=Dh,T.flattenDeep=Z1,T.flattenDepth=Q1,T.flip=xw,T.flow=mO,T.flowRight=bO,T.fromPairs=J1,T.functions=bE,T.functionsIn=yE,T.groupBy=ow,T.initial=tx,T.intersection=nx,T.intersectionBy=rx,T.intersectionWith=ox,T.invert=CE,T.invertBy=xE,T.invokeMap=aw,T.iteratee=yu,T.keyBy=lw,T.keys=jn,T.keysIn=dr,T.map=ds,T.mapKeys=EE,T.mapValues=OE,T.matches=yO,T.matchesProperty=SO,T.memoize=vs,T.merge=$E,T.mergeWith=ng,T.method=CO,T.methodOf=xO,T.mixin=Su,T.negate=hs,T.nthArg=EO,T.omit=_E,T.omitBy=RE,T.once=ww,T.orderBy=sw,T.over=OO,T.overArgs=Ew,T.overEvery=$O,T.overSome=_O,T.partial=fu,T.partialRight=qh,T.partition=cw,T.pick=IE,T.pickBy=rg,T.property=ug,T.propertyOf=RO,T.pull=sx,T.pullAll=Fh,T.pullAllBy=cx,T.pullAllWith=ux,T.pullAt=dx,T.range=IO,T.rangeRight=NO,T.rearg=Ow,T.reject=fw,T.remove=fx,T.rest=$w,T.reverse=cu,T.sampleSize=hw,T.set=PE,T.setWith=TE,T.shuffle=gw,T.slice=vx,T.sortBy=bw,T.sortedUniq=Sx,T.sortedUniqBy=Cx,T.split=tO,T.spread=_w,T.tail=xx,T.take=wx,T.takeRight=Ex,T.takeRightWhile=Ox,T.takeWhile=$x,T.tap=Bx,T.throttle=Rw,T.thru=us,T.toArray=Qh,T.toPairs=og,T.toPairsIn=ig,T.toPath=AO,T.toPlainObject=eg,T.transform=ME,T.unary=Iw,T.union=_x,T.unionBy=Rx,T.unionWith=Ix,T.uniq=Nx,T.uniqBy=Px,T.uniqWith=Tx,T.unset=DE,T.unzip=uu,T.unzipWith=Lh,T.update=AE,T.updateWith=FE,T.values=Qi,T.valuesIn=LE,T.without=Mx,T.words=sg,T.wrap=Nw,T.xor=Dx,T.xorBy=Ax,T.xorWith=Fx,T.zip=Lx,T.zipObject=Vx,T.zipObjectDeep=zx,T.zipWith=jx,T.entries=og,T.entriesIn=ig,T.extend=tg,T.extendWith=ms,Su(T,T),T.add=LO,T.attempt=cg,T.camelCase=BE,T.capitalize=ag,T.ceil=VO,T.clamp=VE,T.clone=Tw,T.cloneDeep=Dw,T.cloneDeepWith=Aw,T.cloneWith=Mw,T.conformsTo=Fw,T.deburr=lg,T.defaultTo=pO,T.divide=zO,T.endsWith=HE,T.eq=qr,T.escape=kE,T.escapeRegExp=WE,T.every=Zx,T.find=Jx,T.findIndex=Th,T.findKey=fE,T.findLast=ew,T.findLastIndex=Mh,T.findLastKey=vE,T.floor=jO,T.forEach=zh,T.forEachRight=jh,T.forIn=hE,T.forInRight=gE,T.forOwn=pE,T.forOwnRight=mE,T.get=gu,T.gt=Lw,T.gte=Vw,T.has=SE,T.hasIn=pu,T.head=Ah,T.identity=fr,T.includes=iw,T.indexOf=ex,T.inRange=zE,T.invoke=wE,T.isArguments=hi,T.isArray=Nt,T.isArrayBuffer=zw,T.isArrayLike=ur,T.isArrayLikeObject=On,T.isBoolean=jw,T.isBuffer=Uo,T.isDate=Bw,T.isElement=Hw,T.isEmpty=kw,T.isEqual=Ww,T.isEqualWith=Kw,T.isError=vu,T.isFinite=Uw,T.isFunction=xo,T.isInteger=Gh,T.isLength=gs,T.isMap=Xh,T.isMatch=qw,T.isMatchWith=Gw,T.isNaN=Xw,T.isNative=Yw,T.isNil=Qw,T.isNull=Zw,T.isNumber=Yh,T.isObject=xn,T.isObjectLike=En,T.isPlainObject=Wa,T.isRegExp=hu,T.isSafeInteger=Jw,T.isSet=Zh,T.isString=ps,T.isSymbol=br,T.isTypedArray=Zi,T.isUndefined=eE,T.isWeakMap=tE,T.isWeakSet=nE,T.join=ix,T.kebabCase=KE,T.last=Mr,T.lastIndexOf=ax,T.lowerCase=UE,T.lowerFirst=qE,T.lt=rE,T.lte=oE,T.max=BO,T.maxBy=HO,T.mean=kO,T.meanBy=WO,T.min=KO,T.minBy=UO,T.stubArray=xu,T.stubFalse=wu,T.stubObject=PO,T.stubString=TO,T.stubTrue=MO,T.multiply=qO,T.nth=lx,T.noConflict=wO,T.noop=Cu,T.now=fs,T.pad=GE,T.padEnd=XE,T.padStart=YE,T.parseInt=ZE,T.random=jE,T.reduce=uw,T.reduceRight=dw,T.repeat=QE,T.replace=JE,T.result=NE,T.round=GO,T.runInContext=J,T.sample=vw,T.size=pw,T.snakeCase=eO,T.some=mw,T.sortedIndex=hx,T.sortedIndexBy=gx,T.sortedIndexOf=px,T.sortedLastIndex=mx,T.sortedLastIndexBy=bx,T.sortedLastIndexOf=yx,T.startCase=nO,T.startsWith=rO,T.subtract=XO,T.sum=YO,T.sumBy=ZO,T.template=oO,T.times=DO,T.toFinite=wo,T.toInteger=Mt,T.toLength=Jh,T.toLower=iO,T.toNumber=Dr,T.toSafeInteger=iE,T.toString=Jt,T.toUpper=aO,T.trim=lO,T.trimEnd=sO,T.trimStart=cO,T.truncate=uO,T.unescape=dO,T.uniqueId=FO,T.upperCase=fO,T.upperFirst=mu,T.each=zh,T.eachRight=jh,T.first=Ah,Su(T,function(){var i={};return oo(T,function(a,d){nn.call(T.prototype,d)||(i[d]=a)}),i}(),{chain:!1}),T.VERSION=r,Rr(["bind","bindKey","curry","curryRight","partial","partialRight"],function(i){T[i].placeholder=T}),Rr(["drop","take"],function(i,a){Bt.prototype[i]=function(d){d=d===n?1:Fn(Mt(d),0);var b=this.__filtered__&&!a?new Bt(this):this.clone();return b.__filtered__?b.__takeCount__=Un(d,b.__takeCount__):b.__views__.push({size:Un(d,X),type:i+(b.__dir__<0?"Right":"")}),b},Bt.prototype[i+"Right"]=function(d){return this.reverse()[i](d).reverse()}}),Rr(["filter","map","takeWhile"],function(i,a){var d=a+1,b=d==L||d==V;Bt.prototype[i]=function(_){var M=this.clone();return M.__iteratees__.push({iteratee:ht(_,3),type:d}),M.__filtered__=M.__filtered__||b,M}}),Rr(["head","last"],function(i,a){var d="take"+(a?"Right":"");Bt.prototype[i]=function(){return this[d](1).value()[0]}}),Rr(["initial","tail"],function(i,a){var d="drop"+(a?"":"Right");Bt.prototype[i]=function(){return this.__filtered__?new Bt(this):this[d](1)}}),Bt.prototype.compact=function(){return this.filter(fr)},Bt.prototype.find=function(i){return this.filter(i).head()},Bt.prototype.findLast=function(i){return this.reverse().find(i)},Bt.prototype.invokeMap=Lt(function(i,a){return typeof i=="function"?new Bt(this):this.map(function(d){return Va(d,i,a)})}),Bt.prototype.reject=function(i){return this.filter(hs(ht(i)))},Bt.prototype.slice=function(i,a){i=Mt(i);var d=this;return d.__filtered__&&(i>0||a<0)?new Bt(d):(i<0?d=d.takeRight(-i):i&&(d=d.drop(i)),a!==n&&(a=Mt(a),d=a<0?d.dropRight(-a):d.take(a-i)),d)},Bt.prototype.takeRightWhile=function(i){return this.reverse().takeWhile(i).reverse()},Bt.prototype.toArray=function(){return this.take(X)},oo(Bt.prototype,function(i,a){var d=/^(?:filter|find|map|reject)|While$/.test(a),b=/^(?:head|last)$/.test(a),_=T[b?"take"+(a=="last"?"Right":""):a],M=b||/^find/.test(a);_&&(T.prototype[a]=function(){var K=this.__wrapped__,G=b?[1]:arguments,ee=K instanceof Bt,Se=G[0],xe=ee||Nt(K),Oe=function(jt){var kt=_.apply(T,zo([jt],G));return b&&qe?kt[0]:kt};xe&&d&&typeof Se=="function"&&Se.length!=1&&(ee=xe=!1);var qe=this.__chain__,ct=!!this.__actions__.length,pt=M&&!qe,At=ee&&!ct;if(!M&&xe){K=At?K:new Bt(this);var mt=i.apply(K,G);return mt.__actions__.push({func:us,args:[Oe],thisArg:n}),new Nr(mt,qe)}return pt&&At?i.apply(this,G):(mt=this.thru(Oe),pt?b?mt.value()[0]:mt.value():mt)})}),Rr(["pop","push","shift","sort","splice","unshift"],function(i){var a=Fl[i],d=/^(?:push|sort|unshift)$/.test(i)?"tap":"thru",b=/^(?:pop|shift)$/.test(i);T.prototype[i]=function(){var _=arguments;if(b&&!this.__chain__){var M=this.value();return a.apply(Nt(M)?M:[],_)}return this[d](function(K){return a.apply(Nt(K)?K:[],_)})}}),oo(Bt.prototype,function(i,a){var d=T[a];if(d){var b=d.name+"";nn.call(Ui,b)||(Ui[b]=[]),Ui[b].push({name:a,func:d})}}),Ui[rs(n,C).name]=[{name:"wrapper",func:n}],Bt.prototype.clone=dC,Bt.prototype.reverse=fC,Bt.prototype.value=vC,T.prototype.at=Hx,T.prototype.chain=kx,T.prototype.commit=Wx,T.prototype.next=Kx,T.prototype.plant=qx,T.prototype.reverse=Gx,T.prototype.toJSON=T.prototype.valueOf=T.prototype.value=Xx,T.prototype.first=T.prototype.head,Pa&&(T.prototype[Pa]=Ux),T},ki=WS();ai?((ai.exports=ki)._=ki,yc._=ki):Bn._=ki}).call(Ka)})(Js,Js.exports);var xL=Js.exports;const wL=e=>{let{request:t,title:n,disabledValue:r,callError:o,...l}=e;const[s,c]=j.useState(!1),[u,f]=j.useState([]);j.useEffect(()=>{h()},[]);const h=async()=>{if(t&&typeof t=="function"){var g;const p=await t();if(p.code>0){o&&typeof o=="function"&&o(p.message);return}let y=vS(((g=p.data)===null||g===void 0?void 0:g.list)||p.data||[],"id",n||"title",l.parentId||"parentId","children",0,r);y=[{value:0,title:"根节点",children:y}],l.treeData=y,f(y)}l.treeData&&f(l.treeData),c(!0)};return Dt.jsx(to,{...l,children:s&&Dt.jsx(oi,{...l,treeData:u,treeDefaultExpandAll:!0,style:{width:"100%"}})})},rv=e=>{let{request:t,option_label:n="label",option_value:r="id",disabledValue:o,callError:l,options:s,...c}=e;const[u,f]=j.useState([]);j.useEffect(()=>{h()},[]);const h=async()=>{if(t&&typeof t=="function"){var g;const p=await t();if(p.code>0){l&&typeof l=="function"&&l(p.message);return}let y=((g=p.data)===null||g===void 0?void 0:g.list)||p.data;Array.isArray(y)&&y.length>0&&f(y.map(x=>({label:x[n],value:x[r]})))}s&&s.length>0&&f(s)};return Dt.jsx(to,{...c,children:Dt.jsx(Ai,{...c,options:u,style:{width:"100%"}})})},EL=e=>{let{onChange:t,value:n,...r}=e;const[o,l]=j.useState("");j.useEffect(()=>{if(n)try{n=JSON.parse(n),l(n.label)}catch{}},[n]);const s=(c,u)=>{t&&typeof t=="function"&&t(JSON.stringify(u)),l(u.label)};return Dt.jsx(rv,{...r,onChange:s,value:o,mode:"single"})},OL=e=>{let{onChange:t,value:n,...r}=e;const[o,l]=j.useState([]);j.useEffect(()=>{if(n)try{n=JSON.parse(n),Array.isArray(n)&&l(n)}catch{}},[n]);const s=(c,u)=>{t&&typeof t=="function"&&t(JSON.stringify(u)),u.map(f=>f.label),l(u)};return Dt.jsx(rv,{...r,onChange:s,value:o,mode:"multiple"})},$L=j.forwardRef((e,t)=>{let{value:n,onChange:r,...o}=e;const l=j.useRef(0),s=()=>{l.current++,r(l.current)};return Dt.jsxs(to,{...o,children:[Dt.jsxs("div",{ref:t,children:["form-set-value:",n]}),Dt.jsx($l,{onClick:s,children:"test"})]})}),_L=e=>{let{children:t,layout:n}=e;n=n||"1";const r=s=>{const c=s.split(",").map(Number),u=24;return c.map(f=>f/c.reduce((h,g)=>h+g)*u)},o=j.useMemo(()=>r(n),[n]);console.log("colSpans",o);const l=j.useMemo(()=>j.Children.toArray(t).map((s,c)=>{const u=s.props,f=(u==null?void 0:u.componentId)||(u==null?void 0:u.__id);return f?(o==null?void 0:o[c])&&Dt.jsx(ya,{span:o[c],children:Dt.jsx(Vr.Item,{style:{marginBottom:0},label:"",name:f,rules:[{required:u.isRequired,message:"".concat(u.title,"不能为空!")}],children:s},"".concat(f,"-form-item"))},c):(o==null?void 0:o[c])&&Dt.jsx(ya,{span:o[c],children:s},c)}),[t,o]);return Dt.jsx(pc,{gutter:24,children:l})},RL=e=>{let{title:t}=e;return t?Dt.jsx("div",{className:"fh-11 border-b fflex fitems-center text-lg font-medium mb-5 ",children:t}):null};function IL(e,t){const n=[];let r=[];const o=(l,s)=>{const c=l-s.length;s.push(...new Array(c).fill(j.createElement("div")))};for(const l of e){const{_componentName:s}=(l==null?void 0:l.props)||{};s&&s.startsWith("Layout")?(r.length>0&&(o(t,r),n.push(r),r=[]),n.push([l])):(r.push(l),r.length===t&&(n.push(r),r=[]))}return r.length>0&&(o(t,r),n.push(r)),n}const ov=j.forwardRef((e,t)=>{let{cols:n=1,children:r}=e;const[o]=Vr.useForm(),[l,s]=j.useState(null),c=j.useRef(null);j.useImperativeHandle(t,()=>({formRef:o,initializeFieldVisibility:f}),[]),j.useEffect(()=>{u(),s(p())},[r,n]);const u=()=>{c.current=new Map;const y=j.Children.toArray(r);y.forEach(x=>{const{componentId:S,__id:m,...C}=x.props,w=S||m;c.current.set(w,{children:y.filter(E=>{var O;return E.props.__withId===w||((O=E.props.__withIds)===null||O===void 0?void 0:O.includes(w))}),show:!0})}),f()},f=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;const x=o.getFieldsValue();for(let S of c.current.keys())h(S,x);y&&s(p())},h=(y,x)=>{let S=!1;return c.current.has(y)&&c.current.get(y).children.forEach(C=>{if(C.props.__withFunc&&typeof C.props.__withFunc=="function"){const w=C.props.__withFunc(x),E=C.props.componentId||C.props.__id;if(c.current.has(E)){const O=c.current.get(E);O.show!==w&&(O.show=w,c.current.set(E,O),S=!0)}}}),S},g=xL.debounce((y,x)=>{const S=o.getFieldsValue();let m=!1;y.forEach(C=>{C.name&&C.name.length>0&&(m=h(C.name[0],S))}),m&&s(p())},100),p=()=>{const y=j.Children.toArray(r);return IL(y.filter(S=>{const m=S.props.componentId||S.props.__id;return c.current.has(m)&&c.current.get(m).show}),n).map((S,m)=>Dt.jsx(pc,{gutter:[24,24],children:S.map((C,w)=>{const{componentId:E,__id:O,_componentName:R,...$}=C.props,I=E||O,N=R&&R.startsWith("Layout");return Dt.jsx(ya,{span:N?24:24/S.length,style:{marginBottom:0},children:N?C:Dt.jsx(Vr.Item,{style:{marginBottom:0},label:"",name:I,rules:[{required:$.isRequired,message:"".concat($.title,"不能为空!")}],children:C})},I||"col-".concat(w))})},"row-".concat(m)))};return Dt.jsx(Vr,{form:o,className:"form-container fp-6 fw-full fh-full box-border overflow-auto",onFieldsChange:g,children:l})});function NL(e){return j.forwardRef((t,n)=>Dt.jsx(e,{...t,ref:n,forwardedRef:n}))}class LL extends j.PureComponent{render(){const{forwardedRef:t,...n}=this.props;return Dt.jsx(ov,{...n,ref:t})}}const PL=NL(e=>{let{forwardedRef:t,...n}=e;return Dt.jsx(ov,{...n,ref:t})}),TL=e=>{let{request:t,value:n,onChange:r,callError:o,disabledValue:l,addRoot:s=!0,title:c,...u}=e;const[f,h]=j.useState(!1),[g,p]=j.useState([]);j.useEffect(()=>{y()},[]),j.useEffect(()=>{console.log("CheckboxTree value ",n),typeof n=="string"&&(n=JSON.parse(n)),Array.isArray(n)&&C(n)},[n]);const y=async()=>{if(t&&typeof t=="function"){var P;const A=await t();if(A.code>0){o&&typeof o=="function"&&o(A.message);return}let B=vS(((P=A.data)===null||P===void 0?void 0:P.list)||A.data||[],"id",c||"title",(u==null?void 0:u.parentId)||"parentId","children",0,l);s&&(B=[{value:0,title:"根节点",children:B}]),u.treeData=B,console.log("treeData",B),p(B)}u.treeData&&p(u.treeData),h(!0)},[x,S]=j.useState([]),[m,C]=j.useState([]),[w,E]=j.useState([]),[O,R]=j.useState(!0),$=P=>{console.log("onExpand",P),S(P),R(!1)},I=P=>{console.log("onCheck",P),C(P),r(P)},N=(P,A)=>{console.log("onSelect",A),E(P)};return Dt.jsx(to,{...u,children:Dt.jsx(Jf,{checkable:!0,onExpand:$,onCheck:I,onSelect:N,expandedKeys:x,autoExpandParent:O,checkedKeys:m,selectedKeys:w,treeData:g})})},ML=e=>Dt.jsx(to,{...e,children:Dt.jsx(gc,{...e})}),DL=e=>Dt.jsx(to,{...e,children:Dt.jsx(hc.Group,{...e})}),AL={Input:pL,TextArea:bL,Password:yL,Search:SL,TreeSelect:wL,Select:rv,WithSingleSelect:EL,WithMultipleSelect:OL,CodeMachine:mL,Checkbox:ML,CheckboxTree:TL,RadioGrop:DL,Custom:$L},FL={FormRow:_L,FormGroupTitle:RL};exports.Field=AL;exports.FormContainer=ov;exports.FormContainerWrapper=PL;exports.Layout=FL;
|
package/dist/index.es.js
CHANGED
|
@@ -23074,15 +23074,15 @@ const lo = function(t) {
|
|
|
23074
23074
|
...l
|
|
23075
23075
|
} = t;
|
|
23076
23076
|
return /* @__PURE__ */ At.jsxs("div", {
|
|
23077
|
-
className: "
|
|
23077
|
+
className: "frelative",
|
|
23078
23078
|
children: [n && /* @__PURE__ */ At.jsx("div", {
|
|
23079
|
-
className: "
|
|
23079
|
+
className: "fh-8 ftext-sm fflex fjustify-between fitems-center",
|
|
23080
23080
|
children: n
|
|
23081
23081
|
}), /* @__PURE__ */ At.jsx("div", {
|
|
23082
|
-
className: "
|
|
23082
|
+
className: "fw-full fflex fitems-stretch",
|
|
23083
23083
|
children: r
|
|
23084
23084
|
}), /* @__PURE__ */ At.jsx("div", {
|
|
23085
|
-
className: "
|
|
23085
|
+
className: "ftext-xs ftext-gray-500 fmin-h-5 fflex fitems-center",
|
|
23086
23086
|
children: o
|
|
23087
23087
|
})]
|
|
23088
23088
|
});
|
|
@@ -27007,7 +27007,7 @@ const jL = (e) => {
|
|
|
27007
27007
|
title: t
|
|
27008
27008
|
} = e;
|
|
27009
27009
|
return t ? /* @__PURE__ */ At.jsx("div", {
|
|
27010
|
-
className: "
|
|
27010
|
+
className: "fh-11 border-b fflex fitems-center text-lg font-medium mb-5 ",
|
|
27011
27011
|
children: t
|
|
27012
27012
|
}) : null;
|
|
27013
27013
|
};
|
|
@@ -27115,7 +27115,7 @@ const wS = /* @__PURE__ */ ao((e, t) => {
|
|
|
27115
27115
|
};
|
|
27116
27116
|
return /* @__PURE__ */ At.jsx(Hr, {
|
|
27117
27117
|
form: o,
|
|
27118
|
-
className: "form-container
|
|
27118
|
+
className: "form-container fp-6 fw-full fh-full box-border overflow-auto",
|
|
27119
27119
|
onFieldsChange: g,
|
|
27120
27120
|
children: l
|
|
27121
27121
|
});
|
package/dist/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.
|
|
1
|
+
*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.frelative{position:relative}.fflex{display:flex}.fh-11{height:2.75rem}.fh-8{height:2rem}.fh-full{height:100%}.fmin-h-5{min-height:1.25rem}.fw-\[960px\]{width:960px}.fw-full{width:100%}.fflex-col{flex-direction:column}.fitems-center{align-items:center}.fitems-stretch{align-items:stretch}.fjustify-between{justify-content:space-between}.frounded{border-radius:.25rem}.fbg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity))}.fp-6{padding:1.5rem}.fpb-10{padding-bottom:2.5rem}.ftext-sm{font-size:.875rem;line-height:1.25rem}.ftext-xs{font-size:.75rem;line-height:1rem}.ftext-gray-500{--tw-text-opacity: 1;color:rgb(107 114 128 / var(--tw-text-opacity))}
|
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lu-lowcode-package-form",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@ant-design/icons": "^4.8.1",
|
|
6
6
|
"@testing-library/jest-dom": "^5.17.0",
|
|
7
7
|
"@testing-library/react": "^13.4.0",
|
|
8
8
|
"@testing-library/user-event": "^13.5.0",
|
|
9
9
|
"antd": "^5.13.2",
|
|
10
|
+
"postcss-modules": "^6.0.0",
|
|
10
11
|
"web-vitals": "^2.1.4"
|
|
11
12
|
},
|
|
12
13
|
"main": "dist/index.cjs.js",
|
|
@@ -50,6 +51,7 @@
|
|
|
50
51
|
"autoprefixer": "^10.4.19",
|
|
51
52
|
"babel-loader": "^9.1.3",
|
|
52
53
|
"postcss": "^8.4.38",
|
|
54
|
+
"postcss-prefixer": "^3.0.0",
|
|
53
55
|
"react": "^18.2.0",
|
|
54
56
|
"react-dom": "^18.2.0",
|
|
55
57
|
"react-scripts": "5.0.1",
|
package/postcss.config.js
CHANGED
package/src/App.jsx
CHANGED
|
@@ -39,8 +39,8 @@ function App() {
|
|
|
39
39
|
}
|
|
40
40
|
return (
|
|
41
41
|
|
|
42
|
-
<div className="App
|
|
43
|
-
<div className='
|
|
42
|
+
<div className="App fflex fflex-col fitems-center">
|
|
43
|
+
<div className='fw-[960px] frounded fbg-slate-100 fflex fflex-col fitems-center fpb-10'>
|
|
44
44
|
<FormContainerWrapper cols={cols} className="" ref={formRef} >
|
|
45
45
|
<Field.Input label="分组名" __id="title" />
|
|
46
46
|
<Field.TreeSelect label="分组名" __id="title11"></Field.TreeSelect>
|
|
@@ -5,12 +5,12 @@ export const BaseWrapper = function BaseWrapper({
|
|
|
5
5
|
...otherProps
|
|
6
6
|
}) {
|
|
7
7
|
return (
|
|
8
|
-
<div className="
|
|
9
|
-
{label && <div className='
|
|
10
|
-
<div className="
|
|
8
|
+
<div className="frelative">
|
|
9
|
+
{label && <div className='fh-8 ftext-sm fflex fjustify-between fitems-center'>{label}</div>}
|
|
10
|
+
<div className="fw-full fflex fitems-stretch">
|
|
11
11
|
{children}
|
|
12
12
|
</div>
|
|
13
|
-
<div className="
|
|
13
|
+
<div className="ftext-xs ftext-gray-500 fmin-h-5 fflex fitems-center">{prompt}</div>
|
|
14
14
|
</div>
|
|
15
15
|
);
|
|
16
16
|
};
|
|
@@ -158,7 +158,7 @@ const FormContainer = forwardRef(({ cols = 1, children }, ref) => {
|
|
|
158
158
|
};
|
|
159
159
|
|
|
160
160
|
return (
|
|
161
|
-
<Form form={form} className="form-container
|
|
161
|
+
<Form form={form} className="form-container fp-6 fw-full fh-full box-border overflow-auto" onFieldsChange={handleFieldsChange}>
|
|
162
162
|
{formContent}
|
|
163
163
|
</Form>
|
|
164
164
|
);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const FormGroupTitle = ({ title }) => {
|
|
2
|
-
return (title? <div className="
|
|
2
|
+
return (title? <div className="fh-11 border-b fflex fitems-center text-lg font-medium mb-5 ">{title}</div>: null )
|
|
3
3
|
};
|
|
4
4
|
|
|
5
5
|
export default FormGroupTitle;
|
package/tailwind.config.js
CHANGED
package/vite.config.js
CHANGED
|
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite';
|
|
|
2
2
|
import react from '@vitejs/plugin-react';
|
|
3
3
|
import tailwindcss from 'tailwindcss'
|
|
4
4
|
import autoprefixer from 'autoprefixer'
|
|
5
|
+
import prefixer from 'postcss-prefixer'
|
|
5
6
|
import babel from '@rollup/plugin-babel';
|
|
6
7
|
|
|
7
8
|
export default defineConfig({
|