You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1 line
25 KiB
1 line
25 KiB
"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[39073],{39073:function(e,t,n){n.d(t,{Z:function(){return Me}});var o=n(59301),r=n(50382),a=n(92310),i=n.n(a),l=n(33614),c=n(81162),s=n(24018),u=n(54099),m=n(80017),f=n(63011),d=n(87693),p=n(71366),g=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],v=o.createContext(null),h=0;function w(e){var t=e.src,n=e.isCustomPlaceholder,r=e.fallback,a=(0,o.useState)(n?"loading":"normal"),i=(0,u.Z)(a,2),l=i[0],c=i[1],s=(0,o.useRef)(!1),m="error"===l;(0,o.useEffect)((function(){(function(e){return new Promise((function(t){var n=document.createElement("img");n.onerror=function(){return t(!1)},n.onload=function(){return t(!0)},n.src=e}))})(t).then((function(e){e||c("error")}))}),[t]),(0,o.useEffect)((function(){n&&!s.current?c("loading"):m&&c("normal")}),[t]);var f=function(){c("normal")};return[function(e){s.current=!1,"loading"===l&&null!=e&&e.complete&&(e.naturalWidth||e.naturalHeight)&&(s.current=!0,f())},m&&r?{src:r}:{onLoad:f,src:t},l]}var C=n(86923),b=n(11207),S=n(20287),x=n(85870);function Z(e,t,n,o){var r=t+n,a=(n-o)/2;if(n>o){if(t>0)return(0,s.Z)({},e,a);if(t<0&&r<o)return(0,s.Z)({},e,-a)}else if(t<0||r>o)return(0,s.Z)({},e,t<0?a:-a);return{}}var y=n(20176),E=n(71783),k={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};var N=n(43403),I=n(43167),M=function(e){var t=e.visible,n=e.maskTransitionName,r=e.getContainer,a=e.prefixCls,l=e.rootClassName,u=e.icons,m=e.countRender,f=e.showSwitch,d=e.showProgress,p=e.current,g=e.transform,h=e.count,w=e.scale,C=e.minScale,b=e.maxScale,x=e.closeIcon,Z=e.onSwitchLeft,y=e.onSwitchRight,E=e.onClose,k=e.onZoomIn,M=e.onZoomOut,R=e.onRotateRight,O=e.onRotateLeft,z=e.onFlipX,j=e.onFlipY,L=e.toolbarRender,P=(0,o.useContext)(v),A=u.rotateLeft,T=u.rotateRight,$=u.zoomIn,D=u.zoomOut,Y=u.close,X=u.left,H=u.right,B=u.flipX,V=u.flipY,W="".concat(a,"-operations-operation");o.useEffect((function(){var e=function(e){e.keyCode===S.Z.ESC&&E()};return t&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}}),[t]);var F=[{icon:V,onClick:j,type:"flipY"},{icon:B,onClick:z,type:"flipX"},{icon:A,onClick:O,type:"rotateLeft"},{icon:T,onClick:R,type:"rotateRight"},{icon:D,onClick:M,type:"zoomOut",disabled:w===C},{icon:$,onClick:k,type:"zoomIn",disabled:w===b}].map((function(e){var t,n=e.icon,r=e.onClick,l=e.type,c=e.disabled;return o.createElement("div",{className:i()(W,(t={},(0,s.Z)(t,"".concat(a,"-operations-operation-").concat(l),!0),(0,s.Z)(t,"".concat(a,"-operations-operation-disabled"),!!c),t)),onClick:r,key:l},n)})),G=o.createElement("div",{className:"".concat(a,"-operations")},F);return o.createElement(I.default,{visible:t,motionName:n},(function(e){var t=e.className,n=e.style;return o.createElement(N.Z,{open:!0,getContainer:null!=r?r:document.body},o.createElement("div",{className:i()("".concat(a,"-operations-wrapper"),t,l),style:n},null===x?null:o.createElement("button",{className:"".concat(a,"-close"),onClick:E},x||Y),f&&o.createElement(o.Fragment,null,o.createElement("div",{className:i()("".concat(a,"-switch-left"),(0,s.Z)({},"".concat(a,"-switch-left-disabled"),0===p)),onClick:Z},X),o.createElement("div",{className:i()("".concat(a,"-switch-right"),(0,s.Z)({},"".concat(a,"-switch-right-disabled"),p===h-1)),onClick:y},H)),o.createElement("div",{className:"".concat(a,"-footer")},d&&o.createElement("div",{className:"".concat(a,"-progress")},m?m(p+1,h):"".concat(p+1," / ").concat(h)),L?L(G,(0,c.Z)({icons:{flipYIcon:F[0],flipXIcon:F[1],rotateLeftIcon:F[2],rotateRightIcon:F[3],zoomOutIcon:F[4],zoomInIcon:F[5]},actions:{onFlipY:j,onFlipX:z,onRotateLeft:O,onRotateRight:R,onZoomOut:M,onZoomIn:k},transform:g},P?{current:p,total:h}:{})):G)))}))},R=["fallback","src","imgRef"],O=["prefixCls","src","alt","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],z=function(e){var t=e.fallback,n=e.src,r=e.imgRef,a=(0,f.Z)(e,R),i=w({src:n,fallback:t}),c=(0,u.Z)(i,2),s=c[0],m=c[1];return o.createElement("img",(0,l.Z)({ref:function(e){r.current=e,s(e)}},a,m))},j=function(e){var t=e.prefixCls,n=e.src,r=e.alt,a=e.fallback,m=e.movable,p=void 0===m||m,g=e.onClose,h=e.visible,w=e.icons,N=void 0===w?{}:w,I=e.rootClassName,R=e.closeIcon,j=e.getContainer,L=e.current,P=void 0===L?0:L,A=e.count,T=void 0===A?1:A,$=e.countRender,D=e.scaleStep,Y=void 0===D?.5:D,X=e.minScale,H=void 0===X?1:X,B=e.maxScale,V=void 0===B?50:B,W=e.transitionName,F=void 0===W?"zoom":W,G=e.maskTransitionName,_=void 0===G?"fade":G,Q=e.imageRender,U=e.imgCommonProps,J=e.toolbarRender,K=e.onTransform,q=e.onChange,ee=(0,f.Z)(e,O),te=(0,o.useRef)(),ne=(0,o.useRef)({deltaX:0,deltaY:0,transformX:0,transformY:0}),oe=(0,o.useState)(!1),re=(0,u.Z)(oe,2),ae=re[0],ie=re[1],le=(0,o.useContext)(v),ce=le&&T>1,se=le&&T>=1,ue=function(e,t,n,r){var a=(0,o.useRef)(null),i=(0,o.useRef)([]),l=(0,o.useState)(k),s=(0,u.Z)(l,2),m=s[0],f=s[1],p=function(e,t){null===a.current&&(i.current=[],a.current=(0,E.Z)((function(){f((function(e){var n=e;return i.current.forEach((function(e){n=(0,c.Z)((0,c.Z)({},n),e)})),a.current=null,null==r||r({transform:n,action:t}),n}))}))),i.current.push((0,c.Z)((0,c.Z)({},m),e))};return{transform:m,resetTransform:function(e){f(k),r&&!(0,y.Z)(k,m)&&r({transform:k,action:e})},updateTransform:p,dispatchZoomChange:function(o,r,a,i){var l=e.current,c=l.width,s=l.height,u=l.offsetWidth,f=l.offsetHeight,g=l.offsetLeft,v=l.offsetTop,h=o,w=m.scale*o;w>n?(h=n/m.scale,w=n):w<t&&(h=t/m.scale,w=t);var C=null!=a?a:innerWidth/2,b=null!=i?i:innerHeight/2,S=h-1,x=S*c*.5,Z=S*s*.5,y=S*(C-m.x-g),E=S*(b-m.y-v),k=m.x-(y-x),N=m.y-(E-Z);if(o<1&&1===w){var I=u*w,M=f*w,R=(0,d.g1)(),O=R.width,z=R.height;I<=O&&M<=z&&(k=0,N=0)}p({x:k,y:N,scale:w},r)}}}(te,H,V,K),me=ue.transform,fe=ue.resetTransform,de=ue.updateTransform,pe=ue.dispatchZoomChange,ge=(0,o.useState)(!0),ve=(0,u.Z)(ge,2),he=ve[0],we=ve[1],Ce=me.rotate,be=me.scale,Se=me.x,xe=me.y,Ze=i()((0,s.Z)({},"".concat(t,"-moving"),ae));(0,o.useEffect)((function(){he||we(!0)}),[he]);var ye=function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),P>0&&(we(!1),fe("prev"),null==q||q(P-1,P))},Ee=function(e){null==e||e.preventDefault(),null==e||e.stopPropagation(),P<T-1&&(we(!1),fe("next"),null==q||q(P+1,P))},ke=function(){if(h&&ae){ie(!1);var e=ne.current,t=e.transformX,n=e.transformY;if(!(Se!==t&&xe!==n))return;var o=te.current.offsetWidth*be,r=te.current.offsetHeight*be,a=te.current.getBoundingClientRect(),i=a.left,l=a.top,s=Ce%180!=0,u=function(e,t,n,o){var r=(0,d.g1)(),a=r.width,i=r.height,l=null;return e<=a&&t<=i?l={x:0,y:0}:(e>a||t>i)&&(l=(0,c.Z)((0,c.Z)({},Z("x",n,e,a)),Z("y",o,t,i))),l}(s?r:o,s?o:r,i,l);u&&de((0,c.Z)({},u),"dragRebound")}},Ne=function(e){h&&ae&&de({x:e.pageX-ne.current.deltaX,y:e.pageY-ne.current.deltaY},"move")},Ie=function(e){h&&ce&&(e.keyCode===S.Z.LEFT?ye():e.keyCode===S.Z.RIGHT&&Ee())};(0,o.useEffect)((function(){var e,t,n,o;if(p){n=(0,b.Z)(window,"mouseup",ke,!1),o=(0,b.Z)(window,"mousemove",Ne,!1);try{window.top!==window.self&&(e=(0,b.Z)(window.top,"mouseup",ke,!1),t=(0,b.Z)(window.top,"mousemove",Ne,!1))}catch(e){(0,x.Kp)(!1,"[rc-image] ".concat(e))}}return function(){var r,a,i,l;null===(r=n)||void 0===r||r.remove(),null===(a=o)||void 0===a||a.remove(),null===(i=e)||void 0===i||i.remove(),null===(l=t)||void 0===l||l.remove()}}),[h,ae,Se,xe,Ce,p]),(0,o.useEffect)((function(){var e=(0,b.Z)(window,"keydown",Ie,!1);return function(){e.remove()}}),[h,ce,P]);var Me=o.createElement(z,(0,l.Z)({},U,{width:e.width,height:e.height,imgRef:te,className:"".concat(t,"-img"),alt:r,style:{transform:"translate3d(".concat(me.x,"px, ").concat(me.y,"px, 0) scale3d(").concat(me.flipX?"-":"").concat(be,", ").concat(me.flipY?"-":"").concat(be,", 1) rotate(").concat(Ce,"deg)"),transitionDuration:!he&&"0s"},fallback:a,src:n,onWheel:function(e){if(h&&0!=e.deltaY){var t=Math.abs(e.deltaY/100),n=1+Math.min(t,1)*Y;e.deltaY>0&&(n=1/n),pe(n,"wheel",e.clientX,e.clientY)}},onMouseDown:function(e){p&&0===e.button&&(e.preventDefault(),e.stopPropagation(),ne.current={deltaX:e.pageX-me.x,deltaY:e.pageY-me.y,transformX:me.x,transformY:me.y},ie(!0))},onDoubleClick:function(e){h&&(1!==be?de({x:0,y:0,scale:1},"doubleClick"):pe(1+Y,"doubleClick",e.clientX,e.clientY))}}));return o.createElement(o.Fragment,null,o.createElement(C.Z,(0,l.Z)({transitionName:F,maskTransitionName:_,closable:!1,keyboard:!0,prefixCls:t,onClose:g,visible:h,wrapClassName:Ze,rootClassName:I,getContainer:j},ee,{afterClose:function(){fe("close")}}),o.createElement("div",{className:"".concat(t,"-img-wrapper")},Q?Q(Me,(0,c.Z)({transform:me},le?{current:P}:{})):Me)),o.createElement(M,{visible:h,transform:me,maskTransitionName:_,closeIcon:R,getContainer:j,prefixCls:t,rootClassName:I,icons:N,countRender:$,showSwitch:ce,showProgress:se,current:P,count:T,scale:be,minScale:H,maxScale:V,toolbarRender:J,onSwitchLeft:ye,onSwitchRight:Ee,onZoomIn:function(){pe(1+Y,"zoomIn")},onZoomOut:function(){pe(1/(1+Y),"zoomOut")},onRotateRight:function(){de({rotate:Ce+90},"rotateRight")},onRotateLeft:function(){de({rotate:Ce-90},"rotateLeft")},onFlipX:function(){de({flipX:!me.flipX},"flipX")},onFlipY:function(){de({flipY:!me.flipY},"flipY")},onClose:g}))},L=n(61414);var P=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],A=["src"],T=function(e){var t,n=e.previewPrefixCls,r=void 0===n?"rc-image-preview":n,a=e.children,i=e.icons,d=void 0===i?{}:i,h=e.items,w=e.preview,C=e.fallback,b="object"===(0,m.Z)(w)?w:{},S=b.visible,x=b.onVisibleChange,Z=b.getContainer,y=b.current,E=b.movable,k=b.minScale,N=b.maxScale,I=b.countRender,M=b.closeIcon,R=b.onChange,O=b.onTransform,z=b.toolbarRender,T=b.imageRender,$=(0,f.Z)(b,P),D=function(e){var t=o.useState({}),n=(0,u.Z)(t,2),r=n[0],a=n[1],i=o.useCallback((function(e,t){return a((function(n){return(0,c.Z)((0,c.Z)({},n),{},(0,s.Z)({},e,t))})),function(){a((function(t){var n=(0,c.Z)({},t);return delete n[e],n}))}}),[]);return[o.useMemo((function(){return e?e.map((function(e){if("string"==typeof e)return{data:{src:e}};var t={};return Object.keys(e).forEach((function(n){["src"].concat((0,L.Z)(g)).includes(n)&&(t[n]=e[n])})),{data:t}})):Object.keys(r).reduce((function(e,t){var n=r[t],o=n.canPreview,a=n.data;return o&&e.push({data:a,id:t}),e}),[])}),[e,r]),i]}(h),Y=(0,u.Z)(D,2),X=Y[0],H=Y[1],B=(0,p.Z)(0,{value:y}),V=(0,u.Z)(B,2),W=V[0],F=V[1],G=(0,o.useState)(!1),_=(0,u.Z)(G,2),Q=_[0],U=_[1],J=(null===(t=X[W])||void 0===t?void 0:t.data)||{},K=J.src,q=(0,f.Z)(J,A),ee=(0,p.Z)(!!S,{value:S,onChange:function(e,t){null==x||x(e,t,W)}}),te=(0,u.Z)(ee,2),ne=te[0],oe=te[1],re=(0,o.useState)(null),ae=(0,u.Z)(re,2),ie=ae[0],le=ae[1],ce=o.useCallback((function(e,t,n){var o=X.findIndex((function(t){return t.id===e}));oe(!0),le({x:t,y:n}),F(o<0?0:o),U(!0)}),[X]);o.useEffect((function(){ne?Q||F(0):U(!1)}),[ne]);var se=o.useMemo((function(){return{register:H,onPreview:ce}}),[H,ce]);return o.createElement(v.Provider,{value:se},a,o.createElement(j,(0,l.Z)({"aria-hidden":!ne,movable:E,visible:ne,prefixCls:r,closeIcon:M,onClose:function(){oe(!1),le(null)},mousePosition:ie,imgCommonProps:q,src:K,fallback:C,icons:d,minScale:k,maxScale:N,getContainer:Z,current:W,count:X.length,countRender:I,onTransform:O,toolbarRender:z,imageRender:T,onChange:function(e,t){F(e),null==R||R(e,t)}},$)))},$=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],D=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],Y=function(e){var t=e.src,n=e.alt,r=e.onPreviewClose,a=e.prefixCls,C=void 0===a?"rc-image":a,b=e.previewPrefixCls,S=void 0===b?"".concat(C,"-preview"):b,x=e.placeholder,Z=e.fallback,y=e.width,E=e.height,k=e.style,N=e.preview,I=void 0===N||N,M=e.className,R=e.onClick,O=e.onError,z=e.wrapperClassName,L=e.wrapperStyle,P=e.rootClassName,A=(0,f.Z)(e,$),T=x&&!0!==x,Y="object"===(0,m.Z)(I)?I:{},X=Y.src,H=Y.visible,B=void 0===H?void 0:H,V=Y.onVisibleChange,W=void 0===V?r:V,F=Y.getContainer,G=void 0===F?void 0:F,_=Y.mask,Q=Y.maskClassName,U=Y.movable,J=Y.icons,K=Y.scaleStep,q=Y.minScale,ee=Y.maxScale,te=Y.imageRender,ne=Y.toolbarRender,oe=(0,f.Z)(Y,D),re=null!=X?X:t,ae=(0,p.Z)(!!B,{value:B,onChange:W}),ie=(0,u.Z)(ae,2),le=ie[0],ce=ie[1],se=w({src:t,isCustomPlaceholder:T,fallback:Z}),ue=(0,u.Z)(se,3),me=ue[0],fe=ue[1],de=ue[2],pe=(0,o.useState)(null),ge=(0,u.Z)(pe,2),ve=ge[0],he=ge[1],we=(0,o.useContext)(v),Ce=!!I,be=i()(C,z,P,(0,s.Z)({},"".concat(C,"-error"),"error"===de)),Se=(0,o.useMemo)((function(){var t={};return g.forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),t}),g.map((function(t){return e[t]}))),xe=function(e,t){var n=o.useState((function(){return String(h+=1)})),r=(0,u.Z)(n,1)[0],a=o.useContext(v),i={data:t,canPreview:e};return o.useEffect((function(){if(a)return a.register(r,i)}),[]),o.useEffect((function(){a&&a.register(r,i)}),[e,t]),r}(Ce,(0,o.useMemo)((function(){return(0,c.Z)((0,c.Z)({},Se),{},{src:re})}),[re,Se]));return o.createElement(o.Fragment,null,o.createElement("div",(0,l.Z)({},A,{className:be,onClick:Ce?function(e){var t=(0,d.os)(e.target),n=t.left,o=t.top;we?we.onPreview(xe,n,o):(he({x:n,y:o}),ce(!0)),null==R||R(e)}:R,style:(0,c.Z)({width:y,height:E},L)}),o.createElement("img",(0,l.Z)({},Se,{className:i()("".concat(C,"-img"),(0,s.Z)({},"".concat(C,"-img-placeholder"),!0===x),M),style:(0,c.Z)({height:E},k),ref:me},fe,{width:y,height:E,onError:O})),"loading"===de&&o.createElement("div",{"aria-hidden":"true",className:"".concat(C,"-placeholder")},x),_&&Ce&&o.createElement("div",{className:i()("".concat(C,"-mask"),Q),style:{display:"none"===(null==k?void 0:k.display)?"none":void 0}},_)),!we&&Ce&&o.createElement(j,(0,l.Z)({"aria-hidden":!le,visible:le,prefixCls:S,onClose:function(){ce(!1),he(null)},mousePosition:ve,src:re,alt:n,fallback:Z,getContainer:G,icons:J,movable:U,scaleStep:K,minScale:q,maxScale:ee,rootClassName:P,imageRender:te,imgCommonProps:Se,toolbarRender:ne},oe)))};Y.PreviewGroup=T,Y.displayName="Image";var X=Y,H=n(62892),B=n(36355),V=n(31724),W=n(51638),F=n(53084),G=n(14988),_={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H188V494h440v326z"}},{tag:"path",attrs:{d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8a325.95 325.95 0 016.5 140.9h74.9c14.8-103.6-11.3-213-81-302.3z"}}]},name:"rotate-left",theme:"outlined"},Q=n(22589),U=function(e,t){return o.createElement(Q.Z,(0,l.Z)({},e,{ref:t,icon:_}))};var J=o.forwardRef(U),K={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"defs",attrs:{},children:[{tag:"style",attrs:{}}]},{tag:"path",attrs:{d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2A399.75 399.75 0 00123.5 631h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8z"}},{tag:"path",attrs:{d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32zm-44 402H396V494h440v326z"}}]},name:"rotate-right",theme:"outlined"},q=function(e,t){return o.createElement(Q.Z,(0,l.Z)({},e,{ref:t,icon:K}))};var ee=o.forwardRef(q),te={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M847.9 592H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h605.2L612.9 851c-4.1 5.2-.4 13 6.3 13h72.5c4.9 0 9.5-2.2 12.6-6.1l168.8-214.1c16.5-21 1.6-51.8-25.2-51.8zM872 356H266.8l144.3-183c4.1-5.2.4-13-6.3-13h-72.5c-4.9 0-9.5 2.2-12.6 6.1L150.9 380.2c-16.5 21-1.6 51.8 25.1 51.8h696c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8z"}}]},name:"swap",theme:"outlined"},ne=function(e,t){return o.createElement(Q.Z,(0,l.Z)({},e,{ref:t,icon:te}))};var oe=o.forwardRef(ne),re={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-in",theme:"outlined"},ae=function(e,t){return o.createElement(Q.Z,(0,l.Z)({},e,{ref:t,icon:re}))};var ie=o.forwardRef(ae),le={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8zm284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11zM696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430z"}}]},name:"zoom-out",theme:"outlined"},ce=function(e,t){return o.createElement(Q.Z,(0,l.Z)({},e,{ref:t,icon:le}))};var se=o.forwardRef(ce),ue=n(64993),me=n(73819),fe=n(17313),de=n(29878),pe=n(1950),ge=n(83116),ve=n(37613);const he=e=>({position:e||"absolute",inset:0}),we=e=>{const{iconCls:t,motionDurationSlow:n,paddingXXS:o,marginXXS:r,prefixCls:a,colorTextLightSolid:i}=e;return{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center",color:i,background:new ue.C("#000").setAlpha(.5).toRgbString(),cursor:"pointer",opacity:0,transition:`opacity ${n}`,[`.${a}-mask-info`]:Object.assign(Object.assign({},fe.vS),{padding:`0 ${o}px`,[t]:{marginInlineEnd:r,svg:{verticalAlign:"baseline"}}})}},Ce=e=>{const{previewCls:t,modalMaskBg:n,paddingSM:o,marginXL:r,margin:a,paddingLG:i,previewOperationColorDisabled:l,previewOperationHoverColor:c,motionDurationSlow:s,iconCls:u,colorTextLightSolid:m}=e,f=new ue.C(n).setAlpha(.1),d=f.clone().setAlpha(.2);return{[`${t}-footer`]:{position:"fixed",bottom:r,left:{_skip_check_:!0,value:0},width:"100%",display:"flex",flexDirection:"column",alignItems:"center",color:e.previewOperationColor},[`${t}-progress`]:{marginBottom:a},[`${t}-close`]:{position:"fixed",top:r,right:{_skip_check_:!0,value:r},display:"flex",color:m,backgroundColor:f.toRgbString(),borderRadius:"50%",padding:o,outline:0,border:0,cursor:"pointer",transition:`all ${s}`,"&:hover":{backgroundColor:d.toRgbString()},[`& > ${u}`]:{fontSize:e.previewOperationSize}},[`${t}-operations`]:{display:"flex",alignItems:"center",padding:`0 ${i}px`,backgroundColor:f.toRgbString(),borderRadius:100,"&-operation":{marginInlineStart:o,padding:o,cursor:"pointer",transition:`all ${s}`,userSelect:"none",[`&:not(${t}-operations-operation-disabled):hover > ${u}`]:{color:c},"&-disabled":{color:l,cursor:"not-allowed"},"&:first-of-type":{marginInlineStart:0},[`& > ${u}`]:{fontSize:e.previewOperationSize}}}}},be=e=>{const{modalMaskBg:t,iconCls:n,previewOperationColorDisabled:o,previewCls:r,zIndexPopup:a,motionDurationSlow:i}=e,l=new ue.C(t).setAlpha(.1),c=l.clone().setAlpha(.2);return{[`${r}-switch-left, ${r}-switch-right`]:{position:"fixed",insetBlockStart:"50%",zIndex:a+1,display:"flex",alignItems:"center",justifyContent:"center",width:e.imagePreviewSwitchSize,height:e.imagePreviewSwitchSize,marginTop:-e.imagePreviewSwitchSize/2,color:e.previewOperationColor,background:l.toRgbString(),borderRadius:"50%",transform:"translateY(-50%)",cursor:"pointer",transition:`all ${i}`,userSelect:"none","&:hover":{background:c.toRgbString()},"&-disabled":{"&, &:hover":{color:o,background:"transparent",cursor:"not-allowed",[`> ${n}`]:{cursor:"not-allowed"}}},[`> ${n}`]:{fontSize:e.previewOperationSize}},[`${r}-switch-left`]:{insetInlineStart:e.marginSM},[`${r}-switch-right`]:{insetInlineEnd:e.marginSM}}},Se=e=>{const{motionEaseOut:t,previewCls:n,motionDurationSlow:o,componentCls:r}=e;return[{[`${r}-preview-root`]:{[n]:{height:"100%",textAlign:"center",pointerEvents:"none"},[`${n}-body`]:Object.assign(Object.assign({},he()),{overflow:"hidden"}),[`${n}-img`]:{maxWidth:"100%",maxHeight:"70%",verticalAlign:"middle",transform:"scale3d(1, 1, 1)",cursor:"grab",transition:`transform ${o} ${t} 0s`,userSelect:"none","&-wrapper":Object.assign(Object.assign({},he()),{transition:`transform ${o} ${t} 0s`,display:"flex",justifyContent:"center",alignItems:"center","& > *":{pointerEvents:"auto"},"&::before":{display:"inline-block",width:1,height:"50%",marginInlineEnd:-1,content:'""'}})},[`${n}-moving`]:{[`${n}-preview-img`]:{cursor:"grabbing","&-wrapper":{transitionDuration:"0s"}}}}},{[`${r}-preview-root`]:{[`${n}-wrap`]:{zIndex:e.zIndexPopup}}},{[`${r}-preview-operations-wrapper`]:{position:"fixed",zIndex:e.zIndexPopup+1},"&":[Ce(e),be(e)]}]},xe=e=>{const{componentCls:t}=e;return{[t]:{position:"relative",display:"inline-block",[`${t}-img`]:{width:"100%",height:"auto",verticalAlign:"middle"},[`${t}-img-placeholder`]:{backgroundColor:e.colorBgContainerDisabled,backgroundImage:"url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTQuNSAyLjVoLTEzQS41LjUgMCAwIDAgMSAzdjEwYS41LjUgMCAwIDAgLjUuNWgxM2EuNS41IDAgMCAwIC41LS41VjNhLjUuNSAwIDAgMC0uNS0uNXpNNS4yODEgNC43NWExIDEgMCAwIDEgMCAyIDEgMSAwIDAgMSAwLTJ6bTguMDMgNi44M2EuMTI3LjEyNyAwIDAgMS0uMDgxLjAzSDIuNzY5YS4xMjUuMTI1IDAgMCAxLS4wOTYtLjIwN2wyLjY2MS0zLjE1NmEuMTI2LjEyNiAwIDAgMSAuMTc3LS4wMTZsLjAxNi4wMTZMNy4wOCAxMC4wOWwyLjQ3LTIuOTNhLjEyNi4xMjYgMCAwIDEgLjE3Ny0uMDE2bC4wMTUuMDE2IDMuNTg4IDQuMjQ0YS4xMjcuMTI3IDAgMCAxLS4wMi4xNzV6IiBmaWxsPSIjOEM4QzhDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=')",backgroundRepeat:"no-repeat",backgroundPosition:"center center",backgroundSize:"30%"},[`${t}-mask`]:Object.assign({},we(e)),[`${t}-mask:hover`]:{opacity:1},[`${t}-placeholder`]:Object.assign({},he())}}},Ze=e=>{const{previewCls:t}=e;return{[`${t}-root`]:(0,de._y)(e,"zoom"),"&":(0,pe.J$)(e,!0)}};var ye=(0,ge.Z)("Image",(e=>{const t=`${e.componentCls}-preview`,n=(0,ve.TS)(e,{previewCls:t,modalMaskBg:new ue.C("#000").setAlpha(.45).toRgbString(),imagePreviewSwitchSize:e.controlHeightLG});return[xe(n),Se(n),(0,me.QA)((0,ve.TS)(n,{componentCls:t})),Ze(n)]}),(e=>({zIndexPopup:e.zIndexPopupBase+80,previewOperationColor:new ue.C(e.colorTextLightSolid).setAlpha(.65).toRgbString(),previewOperationHoverColor:new ue.C(e.colorTextLightSolid).setAlpha(.85).toRgbString(),previewOperationColorDisabled:new ue.C(e.colorTextLightSolid).setAlpha(.25).toRgbString(),previewOperationSize:1.5*e.fontSizeIcon}))),Ee=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const ke={rotateLeft:o.createElement(J,null),rotateRight:o.createElement(ee,null),zoomIn:o.createElement(ie,null),zoomOut:o.createElement(se,null),close:o.createElement(W.Z,null),left:o.createElement(F.Z,null),right:o.createElement(G.Z,null),flipX:o.createElement(oe,null),flipY:o.createElement(oe,{rotate:90})};var Ne=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r<o.length;r++)t.indexOf(o[r])<0&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n};const Ie=e=>{const{prefixCls:t,preview:n,className:a,rootClassName:l,style:c}=e,s=Ne(e,["prefixCls","preview","className","rootClassName","style"]),{getPrefixCls:u,locale:m=V.Z,getPopupContainer:f,image:d}=o.useContext(B.E_),p=u("image",t),g=u(),v=m.Image||V.Z.Image,[h,w]=ye(p),C=i()(l,w),b=i()(a,w,null==d?void 0:d.className),S=o.useMemo((()=>{if(!1===n)return n;const e="object"==typeof n?n:{},{getContainer:t}=e,a=Ne(e,["getContainer"]);return Object.assign(Object.assign({mask:o.createElement("div",{className:`${p}-mask-info`},o.createElement(r.Z,null),null==v?void 0:v.preview),icons:ke},a),{getContainer:t||f,transitionName:(0,H.m)(g,"zoom",e.transitionName),maskTransitionName:(0,H.m)(g,"fade",e.maskTransitionName)})}),[n,v]),x=Object.assign(Object.assign({},null==d?void 0:d.style),c);return h(o.createElement(X,Object.assign({prefixCls:p,preview:S,rootClassName:C,className:b,style:x},s)))};Ie.PreviewGroup=e=>{var{previewPrefixCls:t,preview:n}=e,r=Ee(e,["previewPrefixCls","preview"]);const{getPrefixCls:a}=o.useContext(B.E_),l=a("image",t),c=`${l}-preview`,s=a(),[u,m]=ye(l),f=o.useMemo((()=>{var e;if(!1===n)return n;const t="object"==typeof n?n:{},o=i()(m,null!==(e=t.rootClassName)&&void 0!==e?e:"");return Object.assign(Object.assign({},t),{transitionName:(0,H.m)(s,"zoom",t.transitionName),maskTransitionName:(0,H.m)(s,"fade",t.maskTransitionName),rootClassName:o})}),[n]);return u(o.createElement(X.PreviewGroup,Object.assign({preview:f,previewPrefixCls:c,icons:ke},r)))};var Me=Ie}}]); |