|
- (self.webpackChunkant_design_pro=self.webpackChunkant_design_pro||[]).push([[2657],{50061:function(){},273:function(Ce,se,n){"use strict";n.d(se,{Z:function(){return $e}});var $=n(22122),J=n(96156),z=n(28481),ce=n(54549),ye=n(94184),K=n.n(ye),b=n(28991),t=n(67294),ge=n(38475),de=n(8410),ue=n(63441),Ee=function(a){var i=a.prefixCls,r=a.className,l=a.style,h=a.children,s=a.containerRef;return t.createElement(t.Fragment,null,t.createElement("div",{className:K()("".concat(i,"-content"),r),style:(0,b.Z)({},l),"aria-modal":"true",role:"dialog",ref:s},h))},be=Ee,Ne=t.createContext(null),fe=Ne,te=n(15105),we=n(80334);function ve(e){return typeof e=="string"&&String(Number(e))===e?((0,we.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}function ze(e){warning(!("wrapperClassName"in e),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!e.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var me={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Se(e,a){var i,r,l,h,s=e.prefixCls,f=e.open,C=e.placement,F=e.inline,x=e.push,T=e.forceRender,W=e.autoFocus,Q=e.keyboard,B=e.rootClassName,U=e.rootStyle,D=e.zIndex,R=e.className,V=e.style,k=e.motion,g=e.width,_=e.height,j=e.children,p=e.contentWrapperStyle,M=e.mask,q=e.maskClosable,H=e.maskMotion,P=e.maskClassName,I=e.maskStyle,N=e.afterOpenChange,m=e.onClose,E=t.useRef(),y=t.useRef(),A=t.useRef();t.useImperativeHandle(a,function(){return E.current});var ee=function(u){var Y=u.keyCode,G=u.shiftKey;switch(Y){case te.Z.TAB:{if(Y===te.Z.TAB){if(!G&&document.activeElement===A.current){var le;(le=y.current)===null||le===void 0||le.focus({preventScroll:!0})}else if(G&&document.activeElement===y.current){var ie;(ie=A.current)===null||ie===void 0||ie.focus({preventScroll:!0})}}break}case te.Z.ESC:{m&&Q&&(u.stopPropagation(),m(u));break}}};t.useEffect(function(){if(f&&W){var o;(o=E.current)===null||o===void 0||o.focus({preventScroll:!0})}},[f]);var d=t.useState(!1),O=(0,z.Z)(d,2),L=O[0],Z=O[1],c=t.useContext(fe),X;x===!1?X={distance:0}:x===!0?X={}:X=x||{};var w=(i=(r=(l=X)===null||l===void 0?void 0:l.distance)!==null&&r!==void 0?r:c==null?void 0:c.pushDistance)!==null&&i!==void 0?i:180,ae=t.useMemo(function(){return{pushDistance:w,push:function(){Z(!0)},pull:function(){Z(!1)}}},[w]);t.useEffect(function(){if(f){var o;c==null||(o=c.push)===null||o===void 0||o.call(c)}else{var u;c==null||(u=c.pull)===null||u===void 0||u.call(c)}},[f]),t.useEffect(function(){return function(){var o;c==null||(o=c.pull)===null||o===void 0||o.call(c)}},[]);var ne=M&&t.createElement(ue.Z,(0,$.Z)({key:"mask"},H,{visible:f}),function(o,u){var Y=o.className,G=o.style;return t.createElement("div",{className:K()("".concat(s,"-mask"),Y,P),style:(0,b.Z)((0,b.Z)({},G),I),onClick:q&&f?m:void 0,ref:u})}),oe=typeof k=="function"?k(C):k,v={};if(L&&w)switch(C){case"top":v.transform="translateY(".concat(w,"px)");break;case"bottom":v.transform="translateY(".concat(-w,"px)");break;case"left":v.transform="translateX(".concat(w,"px)");break;default:v.transform="translateX(".concat(-w,"px)");break}C==="left"||C==="right"?v.width=ve(g):v.height=ve(_);var S=t.createElement(ue.Z,(0,$.Z)({key:"panel"},oe,{visible:f,forceRender:T,onVisibleChanged:function(u){N==null||N(u)},removeOnLeave:!1,leavedClassName:"".concat(s,"-content-wrapper-hidden")}),function(o,u){var Y=o.className,G=o.style;return t.createElement("div",{className:K()("".concat(s,"-content-wrapper"),Y),style:(0,b.Z)((0,b.Z)((0,b.Z)({},v),G),p)},t.createElement(be,{containerRef:u,prefixCls:s,className:R,style:V},j))}),re=(0,b.Z)({},U);return D&&(re.zIndex=D),t.createElement(fe.Provider,{value:ae},t.createElement("div",{className:K()(s,"".concat(s,"-").concat(C),B,(h={},(0,J.Z)(h,"".concat(s,"-open"),f),(0,J.Z)(h,"".concat(s,"-inline"),F),h)),style:re,tabIndex:-1,ref:E,onKeyDown:ee},ne,t.createElement("div",{tabIndex:0,ref:y,style:me,"aria-hidden":"true","data-sentinel":"start"}),S,t.createElement("div",{tabIndex:0,ref:A,style:me,"aria-hidden":"true","data-sentinel":"end"})))}var xe=t.forwardRef(Se),ke=xe,Pe=function(a){var i=a.open,r=i===void 0?!1:i,l=a.prefixCls,h=l===void 0?"rc-drawer":l,s=a.placement,f=s===void 0?"right":s,C=a.autoFocus,F=C===void 0?!0:C,x=a.keyboard,T=x===void 0?!0:x,W=a.width,Q=W===void 0?378:W,B=a.mask,U=B===void 0?!0:B,D=a.maskClosable,R=D===void 0?!0:D,V=a.getContainer,k=a.forceRender,g=a.afterOpenChange,_=a.destroyOnClose,j=t.useState(!1),p=(0,z.Z)(j,2),M=p[0],q=p[1],H=t.useState(!1),P=(0,z.Z)(H,2),I=P[0],N=P[1];(0,de.Z)(function(){N(!0)},[]);var m=I?r:!1,E=t.useRef(),y=t.useRef();(0,de.Z)(function(){m&&(y.current=document.activeElement)},[m]);var A=function(O){var L;if(q(O),g==null||g(O),!O&&y.current&&!((L=E.current)===null||L===void 0?void 0:L.contains(y.current))){var Z;(Z=y.current)===null||Z===void 0||Z.focus()}};if(!k&&!M&&!m&&_)return null;var ee=(0,b.Z)((0,b.Z)({},a),{},{open:m,prefixCls:h,placement:f,autoFocus:F,keyboard:T,width:Q,mask:U,maskClosable:R,inline:V===!1,afterOpenChange:A,ref:E});return t.createElement(ge.Z,{open:m||k||M,autoDestroy:!1,getContainer:V,autoLock:U&&(m||M)},t.createElement(ke,ee))},Oe=Pe,Ze=Oe,De=n(53124),Re=n(65223),he=n(33603),pe=n(93355),Me=n(4173),Ie=function(e,a){var i={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&a.indexOf(r)<0&&(i[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var l=0,r=Object.getOwnPropertySymbols(e);l<r.length;l++)a.indexOf(r[l])<0&&Object.prototype.propertyIsEnumerable.call(e,r[l])&&(i[r[l]]=e[r[l]]);return i},Ke=(0,pe.b)("default","large"),Ae={distance:180};function Le(e){var a=e.width,i=e.height,r=e.size,l=r===void 0?"default":r,h=e.closable,s=h===void 0?!0:h,f=e.mask,C=f===void 0?!0:f,F=e.push,x=F===void 0?Ae:F,T=e.closeIcon,W=T===void 0?t.createElement(ce.Z,null):T,Q=e.bodyStyle,B=e.drawerStyle,U=e.className,D=e.visible,R=e.open,V=e.children,k=e.style,g=e.title,_=e.headerStyle,j=e.onClose,p=e.footer,M=e.footerStyle,q=e.prefixCls,H=e.getContainer,P=e.extra,I=e.afterVisibleChange,N=e.afterOpenChange,m=Ie(e,["width","height","size","closable","mask","push","closeIcon","bodyStyle","drawerStyle","className","visible","open","children","style","title","headerStyle","onClose","footer","footerStyle","prefixCls","getContainer","extra","afterVisibleChange","afterOpenChange"]),E=t.useContext(De.E_),y=E.getPopupContainer,A=E.getPrefixCls,ee=E.direction,d=A("drawer",q),O=H===void 0&&y?function(){return y(document.body)}:H,L=s&&t.createElement("button",{type:"button",onClick:j,"aria-label":"Close",className:"".concat(d,"-close")},W);[["visible","open"],["afterVisibleChange","afterOpenChange"]].forEach(function(v){var S=(0,z.Z)(v,2),re=S[0],o=S[1]});function Z(){return!g&&!s?null:t.createElement("div",{className:K()("".concat(d,"-header"),(0,J.Z)({},"".concat(d,"-header-close-only"),s&&!g&&!P)),style:_},t.createElement("div",{className:"".concat(d,"-header-title")},L,g&&t.createElement("div",{className:"".concat(d,"-title")},g)),P&&t.createElement("div",{className:"".concat(d,"-extra")},P))}function c(){if(!p)return null;var v="".concat(d,"-footer");return t.createElement("div",{className:v,style:M},p)}var X=K()((0,J.Z)({"no-mask":!C},"".concat(d,"-rtl"),ee==="rtl"),U),w=t.useMemo(function(){return a!=null?a:l==="large"?736:378},[a,l]),ae=t.useMemo(function(){return i!=null?i:l==="large"?736:378},[i,l]),ne={motionName:(0,he.mL)(d,"mask-motion"),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500},oe=function(S){return{motionName:(0,he.mL)(d,"panel-motion-".concat(S)),motionAppear:!0,motionEnter:!0,motionLeave:!0,motionDeadline:500}};return t.createElement(Me.BR,null,t.createElement(Re.Ux,{status:!0,override:!0},t.createElement(Ze,(0,$.Z)({prefixCls:d,onClose:j},m,{open:R!=null?R:D,mask:C,push:x,width:w,height:ae,rootClassName:X,getContainer:O,afterOpenChange:function(S){N==null||N(S),I==null||I(S)},maskMotion:ne,motion:oe,rootStyle:k}),t.createElement("div",{className:"".concat(d,"-wrapper-body"),style:(0,$.Z)({},B)},Z(),t.createElement("div",{className:"".concat(d,"-body"),style:Q},V),c()))))}var $e=Le},57338:function(Ce,se,n){"use strict";var $=n(38663),J=n.n($),z=n(50061),ce=n.n(z)}}]);
|