unis_crm/frontend1/dist/assets/index-KuslyOWx.js

9 lines
23 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

import{r as o,aq as Ae,de as we,bk as De,ar as We,at as Oe,as as oe,df as fe,ce as pe,br as $e,ax as D,bp as Be,ao as Y,bs as Xe,bu as Ge,au as Ke,av as Qe,dg as Ye,dh as Ue,di as ke,dj as Je,dk as Fe,dl as U,dm as Ze,dn as et,cr as tt,cf as le,bM as xe,dp as nt,cM as rt,dq as ot,dr as ve,ds as at,bO as je,b4 as lt,aX as it,dt as st,bw as ct,Q as mt,bx as ut,bt as dt,b0 as ft,cO as pt,b2 as gt,bP as bt,a$ as ht,du as Pe,an as Ne,dv as yt,dw as Ct,dx as $t,dy as xt,dz as vt,dA as St,ap as Et,dB as It,dC as wt}from"./index-D2cxrzyv.js";import{u as Me,g as Re,t as ue,a as Ot}from"./useForm-CaItC8xb.js";import{C as _e,R as Ft}from"./row-C5EMotZ4.js";function jt(e){return e==null?null:typeof e=="object"&&!o.isValidElement(e)?e:{title:e}}function ie(e){const[t,n]=o.useState(e);return o.useEffect(()=>{const r=setTimeout(()=>{n(e)},e.length?0:10);return()=>{clearTimeout(r)}},[e]),t}const Pt=e=>{const{componentCls:t}=e,n=`${t}-show-help`,r=`${t}-show-help-item`;return{[n]:{transition:`opacity ${e.motionDurationFast} ${e.motionEaseInOut}`,"&-appear, &-enter":{opacity:0,"&-active":{opacity:1}},"&-leave":{opacity:1,"&-active":{opacity:0}},[r]:{overflow:"hidden",transition:`height ${e.motionDurationFast} ${e.motionEaseInOut},
opacity ${e.motionDurationFast} ${e.motionEaseInOut},
transform ${e.motionDurationFast} ${e.motionEaseInOut} !important`,[`&${r}-appear, &${r}-enter`]:{transform:"translateY(-5px)",opacity:0,"&-active":{transform:"translateY(0)",opacity:1}},[`&${r}-leave-active`]:{transform:"translateY(-5px)"}}}}},Nt=e=>({legend:{display:"block",width:"100%",marginBottom:e.marginLG,padding:0,color:e.colorTextDescription,fontSize:e.fontSizeLG,lineHeight:"inherit",border:0,borderBottom:`${oe(e.lineWidth)} ${e.lineType} ${e.colorBorder}`},'input[type="search"]':{boxSizing:"border-box"},'input[type="radio"], input[type="checkbox"]':{lineHeight:"normal"},'input[type="file"]':{display:"block"},'input[type="range"]':{display:"block",width:"100%"},"select[multiple], select[size]":{height:"auto"},"input[type='file']:focus,\n input[type='radio']:focus,\n input[type='checkbox']:focus":{outline:0,boxShadow:`0 0 0 ${oe(e.controlOutlineWidth)} ${e.controlOutline}`},output:{display:"block",paddingTop:15,color:e.colorText,fontSize:e.fontSize,lineHeight:e.lineHeight}}),Se=(e,t)=>{const{formItemCls:n}=e;return{[n]:{[`${n}-label > label`]:{height:t},[`${n}-control-input`]:{minHeight:t}}}},Mt=e=>{const{componentCls:t}=e;return{[e.componentCls]:Object.assign(Object.assign(Object.assign({},Oe(e)),Nt(e)),{[`${t}-text`]:{display:"inline-block",paddingInlineEnd:e.paddingSM},"&-small":Object.assign({},Se(e,e.controlHeightSM)),"&-large":Object.assign({},Se(e,e.controlHeightLG))})}},Rt=e=>{const{formItemCls:t,iconCls:n,rootPrefixCls:r,antCls:a,labelRequiredMarkColor:i,labelColor:u,labelFontSize:s,labelHeight:f,labelColonMarginInlineStart:m,labelColonMarginInlineEnd:p,itemMarginBottom:d}=e;return{[t]:Object.assign(Object.assign({},Oe(e)),{marginBottom:d,verticalAlign:"top","&-with-help":{transition:"none"},[`&-hidden,
&-hidden${a}-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":{verticalAlign:"middle",textWrap:"balance"}},"> label":{position:"relative",display:"inline-flex",alignItems:"center",maxWidth:"100%",height:f,color:u,fontSize:s,[`> ${n}`]:{fontSize:e.fontSize,verticalAlign:"top"},[`&${t}-required`]:{"&::before":{display:"inline-block",marginInlineEnd:e.marginXXS,color:i,fontSize:e.fontSize,fontFamily:"SimSun, sans-serif",lineHeight:1,content:'"*"'},[`&${t}-required-mark-hidden, &${t}-required-mark-optional`]:{"&::before":{display:"none"}}},[`${t}-optional`]:{display:"inline-block",marginInlineStart:e.marginXXS,color:e.colorTextDescription,[`&${t}-required-mark-hidden`]:{display:"none"}},[`${t}-tooltip`]:{color:e.colorTextDescription,cursor:"help",writingMode:"horizontal-tb",marginInlineStart:e.marginXXS},"&::after":{content:'":"',position:"relative",marginBlock:0,marginInlineStart:m,marginInlineEnd:p},[`&${t}-no-colon::after`]:{content:'"\\a0"'}}},[`${t}-control`]:{"--ant-display":"flex",flexDirection:"column",flexGrow:1,[`&:first-child:not([class^="'${r}-col-'"]):not([class*="' ${r}-col-'"])`]:{width:"100%"},"&-input":{position:"relative",display:"flex",alignItems:"center",minHeight:e.controlHeight,"&-content":{flex:"auto",maxWidth:"100%",[`&:has(> ${a}-switch:only-child, > ${a}-rate:only-child)`]:{display:"flex",alignItems:"center"}}}},[t]:{"&-additional":{display:"flex",flexDirection:"column"},"&-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:we,animationDuration:e.motionDurationMid,animationTimingFunction:e.motionEaseOutBack,pointerEvents:"none","&-success":{color:e.colorSuccess},"&-error":{color:e.colorError},"&-warning":{color:e.colorWarning},"&-validating":{color:e.colorPrimary}}})}},re=e=>({padding:e.verticalLabelPadding,margin:e.verticalLabelMargin,whiteSpace:"initial",textAlign:"start","> label":{margin:0,"&::after":{visibility:"hidden"}}}),_t=e=>{const{antCls:t,formItemCls:n}=e;return{[`${n}-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"}},[`${t}-col-24${n}-label,
${t}-col-xl-24${n}-label`]:re(e)}}},Lt=e=>{const{componentCls:t,formItemCls:n,inlineItemMarginBottom:r}=e;return{[`${t}-inline`]:{display:"flex",flexWrap:"wrap",[`${n}-inline`]:{flex:"none",marginInlineEnd:e.margin,marginBottom:r,"&-row":{flexWrap:"nowrap"},[`> ${n}-label,
> ${n}-control`]:{display:"inline-block",verticalAlign:"top"},[`> ${n}-label`]:{flex:"none"},[`${t}-text`]:{display:"inline-block"},[`${n}-has-feedback`]:{display:"inline-block"}}}}},Vt=e=>{const{componentCls:t,formItemCls:n,rootPrefixCls:r}=e;return{[`${n} ${n}-label`]:re(e),[`${t}:not(${t}-inline)`]:{[n]:{flexWrap:"wrap",[`${n}-label, ${n}-control`]:{[`&:not([class*=" ${r}-col-xs"])`]:{flex:"0 0 100%",maxWidth:"100%"}}}}}},Tt=e=>{const{componentCls:t,formItemCls:n,antCls:r}=e;return{[`${n}-vertical`]:{[`${n}-row`]:{flexDirection:"column"},[`${n}-label > label`]:{height:"auto"},[`${n}-control`]:{width:"100%"},[`${n}-label,
${r}-col-24${n}-label,
${r}-col-xl-24${n}-label`]:re(e)},[`@media (max-width: ${oe(e.screenXSMax)})`]:[Vt(e),{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-xs-24${n}-label`]:re(e)}}}],[`@media (max-width: ${oe(e.screenSMMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-sm-24${n}-label`]:re(e)}}},[`@media (max-width: ${oe(e.screenMDMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-md-24${n}-label`]:re(e)}}},[`@media (max-width: ${oe(e.screenLGMax)})`]:{[t]:{[`${n}:not(${n}-horizontal)`]:{[`${r}-col-lg-24${n}-label`]:re(e)}}}}},zt=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,inlineItemMarginBottom:0}),Le=(e,t)=>We(e,{formItemCls:`${e.componentCls}-item`,rootPrefixCls:t}),ge=Ae("Form",(e,{rootPrefixCls:t})=>{const n=Le(e,t);return[Mt(n),Rt(n),Pt(n),_t(n),Lt(n),Tt(n),De(n),we]},zt,{order:-1e3}),Ee=[];function de(e,t,n,r=0){return{key:typeof e=="string"?e:`${t}-${r}`,error:e,errorStatus:n}}const Ve=({help:e,helpStatus:t,errors:n=Ee,warnings:r=Ee,className:a,fieldId:i,onVisibleChanged:u})=>{const{prefixCls:s}=o.useContext(fe),f=`${s}-item-explain`,m=pe(s),[p,d,j]=ge(s,m),_=o.useMemo(()=>$e(s),[s]),P=ie(n),h=ie(r),g=o.useMemo(()=>e!=null?[de(e,"help",t)]:[].concat(D(P.map((c,l)=>de(c,"error","error",l))),D(h.map((c,l)=>de(c,"warning","warning",l)))),[e,t,P,h]),N=o.useMemo(()=>{const c={};return g.forEach(({key:l})=>{c[l]=(c[l]||0)+1}),g.map((l,x)=>Object.assign(Object.assign({},l),{key:c[l.key]>1?`${l.key}-fallback-${x}`:l.key}))},[g]),I={};return i&&(I.id=`${i}_help`),p(o.createElement(Be,{motionDeadline:_.motionDeadline,motionName:`${s}-show-help`,visible:!!N.length,onVisibleChanged:u},c=>{const{className:l,style:x}=c;return o.createElement("div",Object.assign({},I,{className:Y(f,l,j,m,a,d),style:x}),o.createElement(Xe,Object.assign({keys:N},$e(s),{motionName:`${s}-show-help-item`,component:!1}),M=>{const{key:y,error:w,errorStatus:b,className:v,style:S}=M;return o.createElement("div",{key:y,className:Y(v,{[`${f}-${b}`]:b}),style:S},w)}))}))};var qt=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Ht=(e,t)=>{const n=o.useContext(Ge),{getPrefixCls:r,direction:a,requiredMark:i,colon:u,scrollToFirstError:s,className:f,style:m}=Ke("form"),{prefixCls:p,className:d,rootClassName:j,size:_,disabled:P=n,form:h,colon:g,labelAlign:N,labelWrap:I,labelCol:c,wrapperCol:l,hideRequiredMark:x,layout:M="horizontal",scrollToFirstError:y,requiredMark:w,onFinishFailed:b,name:v,style:S,feedbackIcons:H,variant:W}=e,L=qt(e,["prefixCls","className","rootClassName","size","disabled","form","colon","labelAlign","labelWrap","labelCol","wrapperCol","hideRequiredMark","layout","scrollToFirstError","requiredMark","onFinishFailed","name","style","feedbackIcons","variant"]),V=Qe(_),T=o.useContext(Ye),A=o.useMemo(()=>w!==void 0?w:x?!1:i!==void 0?i:!0,[x,w,i]),z=g??u,C=r("form",p),G=pe(C),[q,K,ee]=ge(C,G),se=Y(C,`${C}-${M}`,{[`${C}-hide-required-mark`]:A===!1,[`${C}-rtl`]:a==="rtl",[`${C}-${V}`]:V},ee,G,K,f,d,j),[Q]=Me(h),{__INTERNAL__:k}=Q;k.name=v;const $=o.useMemo(()=>({name:v,labelAlign:N,labelCol:c,labelWrap:I,wrapperCol:l,layout:M,colon:z,requiredMark:A,itemRef:k.itemRef,form:Q,feedbackIcons:H}),[v,N,c,l,M,z,A,Q,H]),R=o.useRef(null);o.useImperativeHandle(t,()=>{var E;return Object.assign(Object.assign({},Q),{nativeElement:(E=R.current)===null||E===void 0?void 0:E.nativeElement})});const O=(E,X)=>{if(E){let J={block:"nearest"};typeof E=="object"&&(J=Object.assign(Object.assign({},J),E)),Q.scrollToField(X,J)}},B=E=>{if(b==null||b(E),E.errorFields.length){const X=E.errorFields[0].name;if(y!==void 0){O(y,X);return}s!==void 0&&O(s,X)}};return q(o.createElement(Ue.Provider,{value:W},o.createElement(ke,{disabled:P},o.createElement(Je.Provider,{value:V},o.createElement(Fe,{validateMessages:T},o.createElement(U.Provider,{value:$},o.createElement(Ze,{status:!0},o.createElement(et,Object.assign({id:v},L,{name:v,onFinishFailed:B,form:Q,ref:R,style:Object.assign(Object.assign({},m),S),className:se})))))))))},At=o.forwardRef(Ht);function Dt(e){if(typeof e=="function")return e;const t=tt(e);return t.length<=1?t[0]:t}const Te=()=>{const{status:e,errors:t=[],warnings:n=[]}=o.useContext(le);return{status:e,errors:t,warnings:n}};Te.Context=le;function Wt(e){const[t,n]=o.useState(e),r=o.useRef(null),a=o.useRef([]),i=o.useRef(!1);o.useEffect(()=>(i.current=!1,()=>{i.current=!0,xe.cancel(r.current),r.current=null}),[]);function u(s){i.current||(r.current===null&&(a.current=[],r.current=xe(()=>{r.current=null,n(f=>{let m=f;return a.current.forEach(p=>{m=p(m)}),m})})),a.current.push(s))}return[t,u]}function Bt(){const{itemRef:e}=o.useContext(U),t=o.useRef({});function n(r,a){const i=a&&typeof a=="object"&&nt(a),u=r.join("_");return(t.current.name!==u||t.current.originRef!==i)&&(t.current.name=u,t.current.originRef=i,t.current.ref=rt(e(r),i)),t.current.ref}return n}const Xt=e=>{const{formItemCls:t}=e;return{"@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none)":{[`${t}-control`]:{display:"flex"}}}},Gt=ot(["Form","item-item"],(e,{rootPrefixCls:t})=>{const n=Le(e,t);return Xt(n)});var Kt=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Qt=24,Yt=e=>{const{prefixCls:t,status:n,labelCol:r,wrapperCol:a,children:i,errors:u,warnings:s,_internalItemRender:f,extra:m,help:p,fieldId:d,marginBottom:j,onErrorVisibleChanged:_,label:P}=e,h=`${t}-item`,g=o.useContext(U),N=o.useMemo(()=>{let L=Object.assign({},a||g.wrapperCol||{});return P===null&&!r&&!a&&g.labelCol&&[void 0,"xs","sm","md","lg","xl","xxl"].forEach(T=>{const A=T?[T]:[],z=ve(g.labelCol,A),C=typeof z=="object"?z:{},G=ve(L,A),q=typeof G=="object"?G:{};"span"in C&&!("offset"in q)&&C.span<Qt&&(L=at(L,[].concat(A,["offset"]),C.span))}),L},[a,g.wrapperCol,g.labelCol,P,r]),I=Y(`${h}-control`,N.className),c=o.useMemo(()=>{const{labelCol:L,wrapperCol:V}=g;return Kt(g,["labelCol","wrapperCol"])},[g]),l=o.useRef(null),[x,M]=o.useState(0);je(()=>{m&&l.current?M(l.current.clientHeight):M(0)},[m]);const y=o.createElement("div",{className:`${h}-control-input`},o.createElement("div",{className:`${h}-control-input-content`},i)),w=o.useMemo(()=>({prefixCls:t,status:n}),[t,n]),b=j!==null||u.length||s.length?o.createElement(fe.Provider,{value:w},o.createElement(Ve,{fieldId:d,errors:u,warnings:s,help:p,helpStatus:n,className:`${h}-explain-connected`,onVisibleChanged:_})):null,v={};d&&(v.id=`${d}_extra`);const S=m?o.createElement("div",Object.assign({},v,{className:`${h}-extra`,ref:l}),m):null,H=b||S?o.createElement("div",{className:`${h}-additional`,style:j?{minHeight:j+x}:{}},b,S):null,W=f&&f.mark==="pro_table_render"&&f.render?f.render(e,{input:y,errorList:b,extra:S}):o.createElement(o.Fragment,null,y,H);return o.createElement(U.Provider,{value:c},o.createElement(_e,Object.assign({},N,{className:I}),W),o.createElement(Gt,{prefixCls:t}))};var Ut=function(t,n){return o.createElement(lt,it({},t,{ref:n,icon:st}))},kt=o.forwardRef(Ut),Jt=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const Zt=({prefixCls:e,label:t,htmlFor:n,labelCol:r,labelAlign:a,colon:i,required:u,requiredMark:s,tooltip:f,vertical:m})=>{var p;const[d]=ct("Form"),{labelAlign:j,labelCol:_,labelWrap:P,colon:h}=o.useContext(U);if(!t)return null;const g=r||_||{},N=a||j,I=`${e}-item-label`,c=Y(I,N==="left"&&`${I}-left`,g.className,{[`${I}-wrap`]:!!P});let l=t;const x=i===!0||h!==!1&&i!==!1;x&&!m&&typeof t=="string"&&t.trim()&&(l=t.replace(/[:|]\s*$/,""));const y=jt(f);if(y){const{icon:W=o.createElement(kt,null)}=y,L=Jt(y,["icon"]),V=o.createElement(mt,Object.assign({},L),o.cloneElement(W,{className:`${e}-item-tooltip`,title:"",onClick:T=>{T.preventDefault()},tabIndex:null}));l=o.createElement(o.Fragment,null,l,V)}const w=s==="optional",b=typeof s=="function",v=s===!1;b?l=s(l,{required:!!u}):w&&!u&&(l=o.createElement(o.Fragment,null,l,o.createElement("span",{className:`${e}-item-optional`,title:""},(d==null?void 0:d.optional)||((p=ut.Form)===null||p===void 0?void 0:p.optional))));let S;v?S="hidden":(w||b)&&(S="optional");const H=Y({[`${e}-item-required`]:u,[`${e}-item-required-mark-${S}`]:S,[`${e}-item-no-colon`]:!x});return o.createElement(_e,Object.assign({},g,{className:c}),o.createElement("label",{htmlFor:n,className:H,title:typeof t=="string"?t:""},l))},en={success:gt,warning:pt,error:ft,validating:dt};function ze({children:e,errors:t,warnings:n,hasFeedback:r,validateStatus:a,prefixCls:i,meta:u,noStyle:s,name:f}){const m=`${i}-item`,{feedbackIcons:p}=o.useContext(U),d=Re(t,n,u,null,!!r,a),{isFormItemInput:j,status:_,hasFeedback:P,feedbackIcon:h,name:g}=o.useContext(le),N=o.useMemo(()=>{var I;let c;if(r){const x=r!==!0&&r.icons||p,M=d&&((I=x==null?void 0:x({status:d,errors:t,warnings:n}))===null||I===void 0?void 0:I[d]),y=d?en[d]:null;c=M!==!1&&y?o.createElement("span",{className:Y(`${m}-feedback-icon`,`${m}-feedback-icon-${d}`)},M||o.createElement(y,null)):null}const l={status:d||"",errors:t,warnings:n,hasFeedback:!!r,feedbackIcon:c,isFormItemInput:!0,name:f};return s&&(l.status=(d??_)||"",l.isFormItemInput=j,l.hasFeedback=!!(r??P),l.feedbackIcon=r!==void 0?l.feedbackIcon:h,l.name=f??g),l},[d,r,s,j,_]);return o.createElement(le.Provider,{value:N},e)}var tn=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};function nn(e){const{prefixCls:t,className:n,rootClassName:r,style:a,help:i,errors:u,warnings:s,validateStatus:f,meta:m,hasFeedback:p,hidden:d,children:j,fieldId:_,required:P,isRequired:h,onSubItemMetaChange:g,layout:N,name:I}=e,c=tn(e,["prefixCls","className","rootClassName","style","help","errors","warnings","validateStatus","meta","hasFeedback","hidden","children","fieldId","required","isRequired","onSubItemMetaChange","layout","name"]),l=`${t}-item`,{requiredMark:x,layout:M}=o.useContext(U),y=N||M,w=y==="vertical",b=o.useRef(null),v=ie(u),S=ie(s),H=i!=null,W=!!(H||u.length||s.length),L=!!b.current&&bt(b.current),[V,T]=o.useState(null);je(()=>{if(W&&b.current){const q=getComputedStyle(b.current);T(Number.parseInt(q.marginBottom,10))}},[W,L]);const A=q=>{q||T(null)},C=((q=!1)=>{const K=q?v:m.errors,ee=q?S:m.warnings;return Re(K,ee,m,"",!!p,f)})(),G=Y(l,n,r,{[`${l}-with-help`]:H||v.length||S.length,[`${l}-has-feedback`]:C&&p,[`${l}-has-success`]:C==="success",[`${l}-has-warning`]:C==="warning",[`${l}-has-error`]:C==="error",[`${l}-is-validating`]:C==="validating",[`${l}-hidden`]:d,[`${l}-${y}`]:y});return o.createElement("div",{className:G,style:a,ref:b},o.createElement(Ft,Object.assign({className:`${l}-row`},ht(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"])),o.createElement(Zt,Object.assign({htmlFor:_},e,{requiredMark:x,required:P??h,prefixCls:t,vertical:w})),o.createElement(Yt,Object.assign({},e,m,{errors:v,warnings:S,prefixCls:t,status:C,help:i,marginBottom:V,onErrorVisibleChanged:A}),o.createElement(Pe.Provider,{value:g},o.createElement(ze,{prefixCls:t,meta:m,errors:m.errors,warnings:m.warnings,hasFeedback:p,validateStatus:C,name:I},j)))),!!V&&o.createElement("div",{className:`${l}-margin-offset`,style:{marginBottom:-V}}))}const rn="__SPLIT__";function on(e,t){const n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(a=>{const i=e[a],u=t[a];return i===u||typeof i=="function"||typeof u=="function"})}const an=o.memo(({children:e})=>e,(e,t)=>on(e.control,t.control)&&e.update===t.update&&e.childProps.length===t.childProps.length&&e.childProps.every((n,r)=>n===t.childProps[r]));function Ie(){return{errors:[],warnings:[],touched:!1,validating:!1,name:[],validated:!1}}function ln(e){const{name:t,noStyle:n,className:r,dependencies:a,prefixCls:i,shouldUpdate:u,rules:s,children:f,required:m,label:p,messageVariables:d,trigger:j="onChange",validateTrigger:_,hidden:P,help:h,layout:g}=e,{getPrefixCls:N}=o.useContext(Ne),{name:I}=o.useContext(U),c=Dt(f),l=typeof c=="function",x=o.useContext(Pe),{validateTrigger:M}=o.useContext(yt),y=_!==void 0?_:M,w=t!=null,b=N("form",i),v=pe(b),[S,H,W]=ge(b,v);Ct();const L=o.useContext($t),V=o.useRef(null),[T,A]=Wt({}),[z,C]=xt(()=>Ie()),G=$=>{const R=L==null?void 0:L.getKey($.name);if(C($.destroy?Ie():$,!0),n&&h!==!1&&x){let O=$.name;if($.destroy)O=V.current||O;else if(R!==void 0){const[B,E]=R;O=[B].concat(D(E)),V.current=O}x($,O)}},q=($,R)=>{A(O=>{const B=Object.assign({},O),X=[].concat(D($.name.slice(0,-1)),D(R)).join(rn);return $.destroy?delete B[X]:B[X]=$,B})},[K,ee]=o.useMemo(()=>{const $=D(z.errors),R=D(z.warnings);return Object.values(T).forEach(O=>{$.push.apply($,D(O.errors||[])),R.push.apply(R,D(O.warnings||[]))}),[$,R]},[T,z.errors,z.warnings]),se=Bt();function Q($,R,O){return n&&!P?o.createElement(ze,{prefixCls:b,hasFeedback:e.hasFeedback,validateStatus:e.validateStatus,meta:z,errors:K,warnings:ee,noStyle:!0,name:t},$):o.createElement(nn,Object.assign({key:"row"},e,{className:Y(r,W,v,H),prefixCls:b,fieldId:R,isRequired:O,errors:K,warnings:ee,meta:z,onSubItemMetaChange:q,layout:g,name:t}),$)}if(!w&&!l&&!a)return S(Q(c));let k={};return typeof p=="string"?k.label=p:t&&(k.label=String(t)),d&&(k=Object.assign(Object.assign({},k),d)),S(o.createElement(vt,Object.assign({},e,{messageVariables:k,trigger:j,validateTrigger:y,onMetaChange:G}),($,R,O)=>{const B=ue(t).length&&R?R.name:[],E=Ot(B,I),X=m!==void 0?m:!!(s!=null&&s.some(F=>{if(F&&typeof F=="object"&&F.required&&!F.warningOnly)return!0;if(typeof F=="function"){const te=F(O);return(te==null?void 0:te.required)&&!(te!=null&&te.warningOnly)}return!1})),J=Object.assign({},$);let ae=null;if(Array.isArray(c)&&w)ae=c;else if(!(l&&(!(u||a)||w))){if(!(a&&!l&&!w))if(o.isValidElement(c)){const F=Object.assign(Object.assign({},c.props),J);if(F.id||(F.id=E),h||K.length>0||ee.length>0||e.extra){const ne=[];(h||K.length>0)&&ne.push(`${E}_help`),e.extra&&ne.push(`${E}_extra`),F["aria-describedby"]=ne.join(" ")}K.length>0&&(F["aria-invalid"]="true"),X&&(F["aria-required"]="true"),St(c)&&(F.ref=se(B,c)),new Set([].concat(D(ue(j)),D(ue(y)))).forEach(ne=>{F[ne]=(...be)=>{var he,ye,ce,Ce,me;(ce=J[ne])===null||ce===void 0||(he=ce).call.apply(he,[J].concat(be)),(me=(Ce=c.props)[ne])===null||me===void 0||(ye=me).call.apply(ye,[Ce].concat(be))}});const He=[F["aria-required"],F["aria-invalid"],F["aria-describedby"]];ae=o.createElement(an,{control:J,update:c,childProps:He},Et(c,F))}else l&&(u||a)&&!w?ae=c(O):ae=c}return Q(ae,E,X)}))}const qe=ln;qe.useStatus=Te;var sn=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 a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const cn=e=>{var{prefixCls:t,children:n}=e,r=sn(e,["prefixCls","children"]);const{getPrefixCls:a}=o.useContext(Ne),i=a("form",t),u=o.useMemo(()=>({prefixCls:i,status:"error"}),[i]);return o.createElement(It,Object.assign({},r),(s,f,m)=>o.createElement(fe.Provider,{value:u},n(s.map(p=>Object.assign(Object.assign({},p),{fieldKey:p.key})),f,{errors:m.errors,warnings:m.warnings})))};function mn(){const{form:e}=o.useContext(U);return e}const Z=At;Z.Item=qe;Z.List=cn;Z.ErrorList=Ve;Z.useForm=Me;Z.useFormInstance=mn;Z.useWatch=wt;Z.Provider=Fe;Z.create=()=>{};export{Z as F};