Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 

2 rader
20 KiB

  1. (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[6358],{53469:function(){},6122:function(bt,nt,a){"use strict";a.d(nt,{Z:function(){return Se}});var R=a(22122),de=a(90484),o=a(95357),q=a(28991),_=a(96156),E=a(28481),Ge=a(81253),n=a(67294),rt=a(94184),ge=a.n(rt),je=a(27678),Pt=a(21770),at=a(57315),ke=a(64019),_e=a(15105),yt=a(80334),ot=["visible","onVisibleChange","getContainer","current","countRender"],et=n.createContext({previewUrls:new Map,setPreviewUrls:function(){return null},current:null,setCurrent:function(){return null},setShowPreview:function(){return null},setMousePosition:function(){return null},registerImage:function(){return function(){return null}},rootClassName:""}),it=et.Provider,st=function(e){var l=e.previewPrefixCls,r=l===void 0?"rc-image-preview":l,c=e.children,u=e.icons,d=u===void 0?{}:u,v=e.preview,C=(0,de.Z)(v)==="object"?v:{},O=C.visible,w=O===void 0?void 0:O,y=C.onVisibleChange,Z=y===void 0?void 0:y,p=C.getContainer,P=p===void 0?void 0:p,k=C.current,V=k===void 0?0:k,h=C.countRender,U=h===void 0?void 0:h,he=(0,Ge.Z)(C,ot),F=(0,n.useState)(new Map),W=(0,E.Z)(F,2),M=W[0],ee=W[1],te=(0,n.useState)(),Y=(0,E.Z)(te,2),J=Y[0],Q=Y[1],we=(0,Pt.Z)(!!w,{value:w,onChange:Z}),ne=(0,E.Z)(we,2),D=ne[0],z=ne[1],G=(0,n.useState)(null),m=(0,E.Z)(G,2),A=m[0],$=m[1],re=w!==void 0,ae=Array.from(M.keys()),b=ae[V],Ue=new Map(Array.from(M).filter(function(oe){var T=(0,E.Z)(oe,2),xe=T[1].canPreview;return!!xe}).map(function(oe){var T=(0,E.Z)(oe,2),xe=T[0],ze=T[1].url;return[xe,ze]})),pe=function(T,xe){var ze=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,Te=function(){ee(function(He){var We=new Map(He),Be=We.delete(T);return Be?We:He})};return ee(function(Ve){return new Map(Ve).set(T,{url:xe,canPreview:ze})}),Te},Ee=function(T){T.stopPropagation(),z(!1),$(null)};return n.useEffect(function(){Q(b)},[b]),n.useEffect(function(){!D&&re&&Q(b)},[b,re,D]),n.createElement(it,{value:{isPreviewGroup:!0,previewUrls:Ue,setPreviewUrls:ee,current:J,setCurrent:Q,setShowPreview:z,setMousePosition:$,registerImage:pe}},c,n.createElement(x,(0,R.Z)({"aria-hidden":!D,visible:D,prefixCls:r,onClose:Ee,mousePosition:A,src:Ue.get(J),icons:d,getContainer:P,countRender:U},he)))},Zt=st,St=a(5461),lt=a(38475),Ke=1,Ye=50,Re=1,pt=.2,Et=function(e){var l,r=e.visible,c=e.maskTransitionName,u=e.getContainer,d=e.prefixCls,v=e.rootClassName,C=e.icons,O=e.countRender,w=e.showSwitch,y=e.showProgress,Z=e.current,p=e.count,P=e.scale,k=e.onSwitchLeft,V=e.onSwitchRight,h=e.onClose,U=e.onZoomIn,he=e.onZoomOut,F=e.onRotateRight,W=e.onRotateLeft,M=C.rotateLeft,ee=C.rotateRight,te=C.zoomIn,Y=C.zoomOut,J=C.close,Q=C.left,we=C.right,ne="".concat(d,"-operations-operation"),D="".concat(d,"-operations-icon"),z=[{icon:J,onClick:h,type:"close"},{icon:te,onClick:U,type:"zoomIn",disabled:P===Ye},{icon:Y,onClick:he,type:"zoomOut",disabled:P===Ke},{icon:ee,onClick:F,type:"rotateRight"},{icon:M,onClick:W,type:"rotateLeft"}],G=n.createElement(n.Fragment,null,w&&n.createElement(n.Fragment,null,n.createElement("div",{className:ge()("".concat(d,"-switch-left"),(0,_.Z)({},"".concat(d,"-switch-left-disabled"),Z===0)),onClick:k},Q),n.createElement("div",{className:ge()("".concat(d,"-switch-right"),(0,_.Z)({},"".concat(d,"-switch-right-disabled"),Z===p-1)),onClick:V},we)),n.createElement("ul",{className:"".concat(d,"-operations")},y&&n.createElement("li",{className:"".concat(d,"-operations-progress")},(l=O==null?void 0:O(Z+1,p))!==null&&l!==void 0?l:"".concat(Z+1," / ").concat(p)),z.map(function(m){var A,$=m.icon,re=m.onClick,ae=m.type,b=m.disabled;return n.createElement("li",{className:ge()(ne,(A={},(0,_.Z)(A,"".concat(d,"-operations-operation-").concat(ae),!0),(0,_.Z)(A,"".concat(d,"-operations-operation-disabled"),!!b),A)),onClick:re,key:ae},n.isValidElement($)?n.cloneElement($,{className:D}):$)})));return n.createElement(St.ZP,{visible:r,motionName:c},function(m){var A=m.className,$=m.style;return n.createElement(lt.Z,{open:!0,getContainer:u!=null?u:document.body},n.createElement("div",{className:ge()("".concat(d,"-operations-wrapper"),A,v),style:$},G))})},ct=Et,xt=a(75164),ut={x:0,y:0,rotate:0,scale:1};function t(s){var e=(0,n.useRef)(null),l=(0,n.useRef)([]),r=(0,n.useState)(ut),c=(0,E.Z)(r,2),u=c[0],d=c[1],v=function(){d(ut)},C=function(y){e.current===null&&(l.current=[],e.current=(0,xt.Z)(function(){d(function(Z){var p=Z;return l.current.forEach(function(P){p=(0,q.Z)((0,q.Z)({},p),P)}),e.current=null,p})})),l.current.push((0,q.Z)((0,q.Z)({},u),y))},O=function(y,Z,p){var P=s.current,k=P.width,V=P.height,h=P.offsetWidth,U=P.offsetHeight,he=P.offsetLeft,F=P.offsetTop,W=y,M=u.scale*y;M>Ye?(W=Ye/u.scale,M=Ye):M<Ke&&(W=Ke/u.scale,M=Ke);var ee=Z!=null?Z:innerWidth/2,te=p!=null?p:innerHeight/2,Y=W-1,J=Y*k*.5,Q=Y*V*.5,we=Y*(ee-u.x-he),ne=Y*(te-u.y-F),D=u.x-(we-J),z=u.y-(ne-Q);if(y<1&&M===1){var G=h*M,m=U*M,A=(0,je.g1)(),$=A.width,re=A.height;G<=$&&m<=re&&(D=0,z=0)}C({x:D,y:z,scale:M})};return{transform:u,resetTransform:v,updateTransform:C,dispatchZoonChange:O}}function f(s,e,l,r){var c=e+l,u=(l-r)/2;if(l>r){if(e>0)return(0,_.Z)({},s,u);if(e<0&&c<r)return(0,_.Z)({},s,-u)}else if(e<0||c>r)return(0,_.Z)({},s,e<0?u:-u);return{}}function i(s,e,l,r){var c=(0,je.g1)(),u=c.width,d=c.height,v=null;return s<=u&&e<=d?v={x:0,y:0}:(s>u||e>d)&&(v=(0,q.Z)((0,q.Z)({},f("x",l,s,u)),f("y",r,e,d))),v}var S=["prefixCls","src","alt","onClose","afterClose","visible","icons","rootClassName","getContainer","countRender","scaleStep","transitionName","maskTransitionName"],N=function(e){var l=e.prefixCls,r=e.src,c=e.alt,u=e.onClose,d=e.afterClose,v=e.visible,C=e.icons,O=C===void 0?{}:C,w=e.rootClassName,y=e.getContainer,Z=e.countRender,p=e.scaleStep,P=p===void 0?.5:p,k=e.transitionName,V=k===void 0?"zoom":k,h=e.maskTransitionName,U=h===void 0?"fade":h,he=(0,Ge.Z)(e,S),F=(0,n.useRef)(),W=(0,n.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),M=(0,n.useState)(!1),ee=(0,E.Z)(M,2),te=ee[0],Y=ee[1],J=(0,n.useContext)(et),Q=J.previewUrls,we=J.current,ne=J.isPreviewGroup,D=J.setCurrent,z=Q.size,G=Array.from(Q.keys()),m=G.indexOf(we),A=ne?Q.get(we):r,$=ne&&z>1,re=ne&&z>=1,ae=t(F),b=ae.transform,Ue=ae.resetTransform,pe=ae.updateTransform,Ee=ae.dispatchZoonChange,oe=b.rotate,T=b.scale,xe=ge()((0,_.Z)({},"".concat(l,"-moving"),te)),ze=function(){Ue()},Te=function(){Ee(Re+P)},Ve=function(){Ee(Re-P)},He=function(){pe({rotate:oe+90})},We=function(){pe({rotate:oe-90})},Be=function(g){g.preventDefault(),g.stopPropagation(),m>0&&D(G[m-1])},ft=function(g){g.preventDefault(),g.stopPropagation(),m<z-1&&D(G[m+1])},vt=function(){if(v&&te){Y(!1);var g=W.current,Pe=g.transformX,ve=g.transformY,me=b.x!==Pe&&b.y!==ve;if(!me)return;var ye=F.current.offsetWidth*T,Le=F.current.offsetHeight*T,Ct=F.current.getBoundingClientRect(),ht=Ct.left,Rt=Ct.top,wt=oe%180!=0,Qe=i(wt?Le:ye,wt?ye:Le,ht,Rt);Qe&&pe((0,q.Z)({},Qe))}},mt=function(g){g.button===0&&(g.preventDefault(),g.stopPropagation(),W.current={deltaX:g.pageX-b.x,deltaY:g.pageY-b.y,transformX:b.x,transformY:b.y},Y(!0))},Fe=function(g){v&&te&&pe({x:g.pageX-W.current.deltaX,y:g.pageY-W.current.deltaY})},Je=function(g){if(!(!v||g.deltaY==0)){var Pe=Math.abs(g.deltaY/100),ve=Math.min(Pe,pt),me=Re+ve*P;g.deltaY>0&&(me=Re/me),Ee(me,g.clientX,g.clientY)}},dt=(0,n.useCallback)(function(I){!v||!$||(I.keyCode===_e.Z.LEFT?m>0&&D(G[m-1]):I.keyCode===_e.Z.RIGHT&&m<z-1&&D(G[m+1]))},[m,z,G,D,$,v]),gt=function(g){v&&(T!==1?pe({x:0,y:0,scale:1}):Ee(Re+P,g.clientX,g.clientY))};return(0,n.useEffect)(function(){var I,g,Pe=(0,ke.Z)(window,"mouseup",vt,!1),ve=(0,ke.Z)(window,"mousemove",Fe,!1),me=(0,ke.Z)(window,"keydown",dt,!1);try{window.top!==window.self&&(I=(0,ke.Z)(window.top,"mouseup",vt,!1),g=(0,ke.Z)(window.top,"mousemove",Fe,!1))}catch(ye){(0,yt.Kp)(!1,"[rc-image] ".concat(ye))}return function(){var ye,Le;Pe.remove(),ve.remove(),me.remove(),(ye=I)===null||ye===void 0||ye.remove(),(Le=g)===null||Le===void 0||Le.remove()}},[v,te,dt]),n.createElement(n.Fragment,null,n.createElement(at.Z,(0,R.Z)({transitionName:V,maskTransitionName:U,closable:!1,keyboard:!0,prefixCls:l,onClose:u,afterClose:ze,visible:v,wrapClassName:xe,rootClassName:w,getContainer:y},he),n.createElement("div",{className:"".concat(l,"-img-wrapper")},n.createElement("img",{width:e.width,height:e.height,onWheel:Je,onMouseDown:mt,onDoubleClick:gt,ref:F,className:"".concat(l,"-img"),src:A,alt:c,style:{transform:"translate3d(".concat(b.x,"px, ").concat(b.y,"px, 0) scale3d(").concat(T,", ").concat(T,", 1) rotate(").concat(oe,"deg)")}}))),n.createElement(ct,{visible:v,maskTransitionName:U,getContainer:y,prefixCls:l,rootClassName:w,icons:O,countRender:Z,showSwitch:$,showProgress:re,current:m,count:z,scale:T,onSwitchLeft:Be,onSwitchRight:ft,onZoomIn:Te,onZoomOut:Ve,onRotateRight:He,onRotateLeft:We,onClose:u}))},x=N,L=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName","crossOrigin","decoding","loading","referrerPolicy","sizes","srcSet","useMap","draggable"],j=["src","visible","onVisibleChange","getContainer","mask","maskClassName","icons","scaleStep"],X=0,K=function(e){var l,r=e.src,c=e.alt,u=e.onPreviewClose,d=e.prefixCls,v=d===void 0?"rc-image":d,C=e.previewPrefixCls,O=C===void 0?"".concat(v,"-preview"):C,w=e.placeholder,y=e.fallback,Z=e.width,p=e.height,P=e.style,k=e.preview,V=k===void 0?!0:k,h=e.className,U=e.onClick,he=e.onError,F=e.wrapperClassName,W=e.wrapperStyle,M=e.rootClassName,ee=e.crossOrigin,te=e.decoding,Y=e.loading,J=e.referrerPolicy,Q=e.sizes,we=e.srcSet,ne=e.useMap,D=e.draggable,z=(0,Ge.Z)(e,L),G=w&&w!==!0,m=(0,de.Z)(V)==="object"?V:{},A=m.src,$=m.visible,re=$===void 0?void 0:$,ae=m.onVisibleChange,b=ae===void 0?u:ae,Ue=m.getContainer,pe=Ue===void 0?void 0:Ue,Ee=m.mask,oe=m.maskClassName,T=m.icons,xe=m.scaleStep,ze=(0,Ge.Z)(m,j),Te=A!=null?A:r,Ve=re!==void 0,He=(0,Pt.Z)(!!re,{value:re,onChange:b}),We=(0,E.Z)(He,2),Be=We[0],ft=We[1],vt=(0,n.useState)(G?"loading":"normal"),mt=(0,E.Z)(vt,2),Fe=mt[0],Je=mt[1],dt=(0,n.useState)(null),gt=(0,E.Z)(dt,2),I=gt[0],g=gt[1],Pe=Fe==="error",ve=n.useContext(et),me=ve.isPreviewGroup,ye=ve.setCurrent,Le=ve.setShowPreview,Ct=ve.setMousePosition,ht=ve.registerImage,Rt=n.useState(function(){return X+=1,X}),wt=(0,E.Z)(Rt,1),Qe=wt[0],tt=!!V,Nt=n.useRef(!1),It=function(){Je("normal")},kt=function(ie){he&&he(ie),Je("error")},Dt=function(ie){if(!Ve){var Mt=(0,je.os)(ie.target),Tt=Mt.left,Lt=Mt.top;me?(ye(Qe),Ct({x:Tt,y:Lt})):g({x:Tt,y:Lt})}me?Le(!0):ft(!0),U&&U(ie)},At=function(ie){ie.stopPropagation(),ft(!1),Ve||g(null)},$t=function(ie){Nt.current=!1,Fe==="loading"&&ie!=null&&ie.complete&&(ie.naturalWidth||ie.naturalHeight)&&(Nt.current=!0,It())};n.useEffect(function(){var qe=ht(Qe,Te);return qe},[]),n.useEffect(function(){ht(Qe,Te,tt)},[Te,tt]),n.useEffect(function(){Pe&&Je("normal"),G&&!Nt.current&&Je("loading")},[r]);var Ut=ge()(v,F,M,(0,_.Z)({},"".concat(v,"-error"),Pe)),zt=Pe&&y?y:Te,Ot={crossOrigin:ee,decoding:te,draggable:D,loading:Y,referrerPolicy:J,sizes:Q,srcSet:we,useMap:ne,alt:c,className:ge()("".concat(v,"-img"),(0,_.Z)({},"".concat(v,"-img-placeholder"),w===!0),h),style:(0,q.Z)({height:p},P)};return n.createElement(n.Fragment,null,n.createElement("div",(0,R.Z)({},z,{className:Ut,onClick:tt?Dt:U,style:(0,q.Z)({width:Z,height:p},W)}),n.createElement("img",(0,R.Z)({},Ot,{ref:$t},Pe&&y?{src:y}:{onLoad:It,onError:kt,src:r},{width:Z,height:p})),Fe==="loading"&&n.createElement("div",{"aria-hidden":"true",className:"".concat(v,"-placeholder")},w),Ee&&tt&&n.createElement("div",{className:ge()("".concat(v,"-mask"),oe),style:{display:((l=Ot.style)===null||l===void 0?void 0:l.display)==="none"?"none":void 0}},Ee)),!me&&tt&&n.createElement(x,(0,R.Z)({"aria-hidden":!Be,visible:Be,prefixCls:O,onClose:At,mousePosition:I,src:zt,alt:c,getContainer:pe,icons:T,scaleStep:xe,rootClassName:M},ze)))};K.PreviewGroup=Zt,K.displayName="Image";var se=K,le=se,ce=a(53124),ue=a(40378),H=a(33603),Ne=a(54549),be=a(67724),Ie=a(8812),Oe=a(17582),Ze=a(3035),B=a(72504),Me=a(16130),Ce=function(s,e){var l={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(l[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(s);c<r.length;c++)e.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(s,r[c])&&(l[r[c]]=s[r[c]]);return l},fe={rotateLeft:n.createElement(Oe.Z,null),rotateRight:n.createElement(Ze.Z,null),zoomIn:n.createElement(B.Z,null),zoomOut:n.createElement(Me.Z,null),close:n.createElement(Ne.Z,null),left:n.createElement(be.Z,null),right:n.createElement(Ie.Z,null)},De=function(e){var l=e.previewPrefixCls,r=e.preview,c=Ce(e,["previewPrefixCls","preview"]),u=n.useContext(ce.E_),d=u.getPrefixCls,v=d("image-preview",l),C=d(),O=n.useMemo(function(){if(r===!1)return r;var w=(0,de.Z)(r)==="object"?r:{};return(0,R.Z)((0,R.Z)({},w),{transitionName:(0,H.mL)(C,"zoom",w.transitionName),maskTransitionName:(0,H.mL)(C,"fade",w.maskTransitionName)})},[r]);return n.createElement(le.PreviewGroup,(0,R.Z)({preview:O,previewPrefixCls:v,icons:fe},c))},Xe=De,Ae=function(s,e){var l={};for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&e.indexOf(r)<0&&(l[r]=s[r]);if(s!=null&&typeof Object.getOwnPropertySymbols=="function")for(var c=0,r=Object.getOwnPropertySymbols(s);c<r.length;c++)e.indexOf(r[c])<0&&Object.prototype.propertyIsEnumerable.call(s,r[c])&&(l[r[c]]=s[r[c]]);return l},$e=function(e){var l=e.prefixCls,r=e.preview,c=Ae(e,["prefixCls","preview"]),u=(0,n.useContext)(ce.E_),d=u.getPrefixCls,v=u.locale,C=v===void 0?ue.Z:v,O=u.getPopupContainer,w=d("image",l),y=d(),Z=C.Image||ue.Z.Image,p=n.useMemo(function(){if(r===!1)return r;var P=(0,de.Z)(r)==="object"?r:{},k=P.getContainer,V=Ae(P,["getContainer"]);return(0,R.Z)((0,R.Z)({mask:n.createElement("div",{className:"".concat(w,"-mask-info")},n.createElement(o.Z,null),Z==null?void 0:Z.preview),icons:fe},V),{getContainer:k||O,transitionName:(0,H.mL)(y,"zoom",P.transitionName),maskTransitionName:(0,H.mL)(y,"fade",P.maskTransitionName)})},[r,Z]);return n.createElement(le,(0,R.Z)({prefixCls:w,preview:p},c))};$e.PreviewGroup=Xe;var Se=$e},12968:function(bt,nt,a){"use strict";var R=a(38663),de=a.n(R),o=a(53469),q=a.n(o)},57315:function(bt,nt,a){"use strict";a.d(nt,{Z:function(){return ut}});var R=a(22122),de=a(28481),o=a(67294),q=a.t(o,2),_=a(38475),E=a(28991),Ge=a(94184),n=a.n(Ge),rt=a(15105);function ge(){var t=(0,E.Z)({},q);return t.useId}var je=0;function Pt(){}var at=ge(),ke=at?function(f){var i=at();return f||i}:function(f){var i=o.useState("ssr-id"),S=(0,de.Z)(i,2),N=S[0],x=S[1];return o.useEffect(function(){var L=je;je+=1,x("rc_unique_".concat(L))},[]),f||N},_e=a(94999),yt=a(64217),ot=a(5461);function et(t){var f=t.prefixCls,i=t.style,S=t.visible,N=t.maskProps,x=t.motionName;return o.createElement(ot.ZP,{key:"mask",visible:S,motionName:x,leavedClassName:"".concat(f,"-mask-hidden")},function(L,j){var X=L.className,K=L.style;return o.createElement("div",(0,R.Z)({ref:j,style:(0,E.Z)((0,E.Z)({},K),i),className:n()("".concat(f,"-mask"),X)},N))})}function it(t,f,i){var S=f;return!S&&i&&(S="".concat(t,"-").concat(i)),S}function st(t,f){var i=t["page".concat(f?"Y":"X","Offset")],S="scroll".concat(f?"Top":"Left");if(typeof i!="number"){var N=t.document;i=N.documentElement[S],typeof i!="number"&&(i=N.body[S])}return i}function Zt(t){var f=t.getBoundingClientRect(),i={left:f.left,top:f.top},S=t.ownerDocument,N=S.defaultView||S.parentWindow;return i.left+=st(N),i.top+=st(N,!0),i}var St=o.memo(function(t){var f=t.children;return f},function(t,f){var i=f.shouldUpdate;return!i}),lt={width:0,height:0,overflow:"hidden",outline:"none"},Ke=o.forwardRef(function(t,f){var i=t.prefixCls,S=t.className,N=t.style,x=t.title,L=t.ariaId,j=t.footer,X=t.closable,K=t.closeIcon,se=t.onClose,le=t.children,ce=t.bodyStyle,ue=t.bodyProps,H=t.modalRender,Ne=t.onMouseDown,be=t.onMouseUp,Ie=t.holderRef,Oe=t.visible,Ze=t.forceRender,B=t.width,Me=t.height,Ce=(0,o.useRef)(),fe=(0,o.useRef)();o.useImperativeHandle(f,function(){return{focus:function(){var e;(e=Ce.current)===null||e===void 0||e.focus()},changeActive:function(e){var l=document,r=l.activeElement;e&&r===fe.current?Ce.current.focus():!e&&r===Ce.current&&fe.current.focus()}}});var De={};B!==void 0&&(De.width=B),Me!==void 0&&(De.height=Me);var Xe;j&&(Xe=o.createElement("div",{className:"".concat(i,"-footer")},j));var Ae;x&&(Ae=o.createElement("div",{className:"".concat(i,"-header")},o.createElement("div",{className:"".concat(i,"-title"),id:L},x)));var $e;X&&($e=o.createElement("button",{type:"button",onClick:se,"aria-label":"Close",className:"".concat(i,"-close")},K||o.createElement("span",{className:"".concat(i,"-close-x")})));var Se=o.createElement("div",{className:"".concat(i,"-content")},$e,Ae,o.createElement("div",(0,R.Z)({className:"".concat(i,"-body"),style:ce},ue),le),Xe);return o.createElement("div",{key:"dialog-element",role:"dialog","aria-labelledby":x?L:null,"aria-modal":"true",ref:Ie,style:(0,E.Z)((0,E.Z)({},N),De),className:n()(i,S),onMouseDown:Ne,onMouseUp:be},o.createElement("div",{tabIndex:0,ref:Ce,style:lt,"aria-hidden":"true"}),o.createElement(St,{shouldUpdate:Oe||Ze},H?H(Se):Se),o.createElement("div",{tabIndex:0,ref:fe,style:lt,"aria-hidden":"true"}))}),Ye=Ke,Re=o.forwardRef(function(t,f){var i=t.prefixCls,S=t.title,N=t.style,x=t.className,L=t.visible,j=t.forceRender,X=t.destroyOnClose,K=t.motionName,se=t.ariaId,le=t.onVisibleChanged,ce=t.mousePosition,ue=(0,o.useRef)(),H=o.useState(),Ne=(0,de.Z)(H,2),be=Ne[0],Ie=Ne[1],Oe={};be&&(Oe.transformOrigin=be);function Ze(){var B=Zt(ue.current);Ie(ce?"".concat(ce.x-B.left,"px ").concat(ce.y-B.top,"px"):"")}return o.createElement(ot.ZP,{visible:L,onVisibleChanged:le,onAppearPrepare:Ze,onEnterPrepare:Ze,forceRender:j,motionName:K,removeOnLeave:X,ref:ue},function(B,Me){var Ce=B.className,fe=B.style;return o.createElement(Ye,(0,R.Z)({},t,{ref:f,title:S,ariaId:se,prefixCls:i,holderRef:Me,style:(0,E.Z)((0,E.Z)((0,E.Z)({},fe),N),Oe),className:n()(x,Ce)}))})});Re.displayName="Content";var pt=Re;function Et(t){var f=t.prefixCls,i=f===void 0?"rc-dialog":f,S=t.zIndex,N=t.visible,x=N===void 0?!1:N,L=t.keyboard,j=L===void 0?!0:L,X=t.focusTriggerAfterClose,K=X===void 0?!0:X,se=t.wrapStyle,le=t.wrapClassName,ce=t.wrapProps,ue=t.onClose,H=t.afterClose,Ne=t.transitionName,be=t.animation,Ie=t.closable,Oe=Ie===void 0?!0:Ie,Ze=t.mask,B=Ze===void 0?!0:Ze,Me=t.maskTransitionName,Ce=t.maskAnimation,fe=t.maskClosable,De=fe===void 0?!0:fe,Xe=t.maskStyle,Ae=t.maskProps,$e=t.rootClassName,Se=(0,o.useRef)(),s=(0,o.useRef)(),e=(0,o.useRef)(),l=o.useState(x),r=(0,de.Z)(l,2),c=r[0],u=r[1],d=ke();function v(){(0,_e.Z)(s.current,document.activeElement)||(Se.current=document.activeElement)}function C(){if(!(0,_e.Z)(s.current,document.activeElement)){var h;(h=e.current)===null||h===void 0||h.focus()}}function O(h){if(h)C();else{if(u(!1),B&&Se.current&&K){try{Se.current.focus({preventScroll:!0})}catch(U){}Se.current=null}c&&(H==null||H())}}function w(h){ue==null||ue(h)}var y=(0,o.useRef)(!1),Z=(0,o.useRef)(),p=function(){clearTimeout(Z.current),y.current=!0},P=function(){Z.current=setTimeout(function(){y.current=!1})},k=null;De&&(k=function(U){y.current?y.current=!1:s.current===U.target&&w(U)});function V(h){if(j&&h.keyCode===rt.Z.ESC){h.stopPropagation(),w(h);return}x&&h.keyCode===rt.Z.TAB&&e.current.changeActive(!h.shiftKey)}return(0,o.useEffect)(function(){x&&(u(!0),v())},[x]),(0,o.useEffect)(function(){return function(){clearTimeout(Z.current)}},[]),o.createElement("div",(0,R.Z)({className:n()("".concat(i,"-root"),$e)},(0,yt.Z)(t,{data:!0})),o.createElement(et,{prefixCls:i,visible:B&&x,motionName:it(i,Me,Ce),style:(0,E.Z)({zIndex:S},Xe),maskProps:Ae}),o.createElement("div",(0,R.Z)({tabIndex:-1,onKeyDown:V,className:n()("".concat(i,"-wrap"),le),ref:s,onClick:k,style:(0,E.Z)((0,E.Z)({zIndex:S},se),{},{display:c?null:"none"})},ce),o.createElement(pt,(0,R.Z)({},t,{onMouseDown:p,onMouseUp:P,ref:e,closable:Oe,ariaId:d,prefixCls:i,visible:x&&c,onClose:w,onVisibleChanged:O,motionName:it(i,Ne,be)}))))}var ct=function(f){var i=f.visible,S=f.getContainer,N=f.forceRender,x=f.destroyOnClose,L=x===void 0?!1:x,j=f.afterClose,X=o.useState(i),K=(0,de.Z)(X,2),se=K[0],le=K[1];return o.useEffect(function(){i&&le(!0)},[i]),!N&&L&&!se?null:o.createElement(_.Z,{open:i||N||se,autoDestroy:!1,getContainer:S,autoLock:i||se},o.createElement(Et,(0,R.Z)({},f,{destroyOnClose:L,afterClose:function(){j==null||j(),le(!1)}})))};ct.displayName="Dialog";var xt=ct,ut=xt}}]);