"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7407],{97480:function(e,n,t){t.d(n,{Z:function(){return r}});/**
 * @license lucide-react v0.404.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(39076).Z)("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]])},34989:function(e,n,t){t.d(n,{Z:function(){return r}});/**
 * @license lucide-react v0.404.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(39076).Z)("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]])},14125:function(e,n,t){t.d(n,{Z:function(){return r}});/**
 * @license lucide-react v0.404.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let r=(0,t(39076).Z)("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]])},34974:function(e,n,t){t.d(n,{Z:function(){return A}});var r=t(40957),o=t(36726),a=t(20491),i=t(18638),c=t(45613),l=t(8703),u=t(42494),s=t.n(u),d=t(34614),f=t(45491),p=t(40929),m=t(44438),v=t(68185),h=t(54328),g=t(74824),w=t(9331),C=p.createContext(null),x=function(e){var n=e.visible,t=e.maskTransitionName,r=e.getContainer,i=e.prefixCls,c=e.rootClassName,l=e.icons,u=e.countRender,d=e.showSwitch,f=e.showProgress,m=e.current,v=e.transform,x=e.count,y=e.scale,b=e.minScale,R=e.maxScale,M=e.closeIcon,k=e.onActive,Z=e.onClose,E=e.onZoomIn,S=e.onZoomOut,N=e.onRotateRight,T=e.onRotateLeft,I=e.onFlipX,P=e.onFlipY,j=e.onReset,D=e.toolbarRender,_=e.zIndex,O=e.image,F=(0,p.useContext)(C),Y=l.rotateLeft,L=l.rotateRight,X=l.zoomIn,A=l.zoomOut,W=l.close,z=l.left,V=l.right,K=l.flipX,U=l.flipY,G="".concat(i,"-operations-operation");p.useEffect(function(){var e=function(e){e.keyCode===h.Z.ESC&&Z()};return n&&window.addEventListener("keydown",e),function(){window.removeEventListener("keydown",e)}},[n]);var B=function(e,n){e.preventDefault(),e.stopPropagation(),k(n)},H=p.useCallback(function(e){var n=e.type,t=e.disabled,r=e.onClick,o=e.icon;return p.createElement("div",{key:n,className:s()(G,"".concat(i,"-operations-operation-").concat(n),(0,a.Z)({},"".concat(i,"-operations-operation-disabled"),!!t)),onClick:r},o)},[G,i]),q=d?H({icon:z,onClick:function(e){return B(e,-1)},type:"prev",disabled:0===m}):void 0,J=d?H({icon:V,onClick:function(e){return B(e,1)},type:"next",disabled:m===x-1}):void 0,Q=H({icon:U,onClick:P,type:"flipY"}),$=H({icon:K,onClick:I,type:"flipX"}),ee=H({icon:Y,onClick:T,type:"rotateLeft"}),en=H({icon:L,onClick:N,type:"rotateRight"}),et=H({icon:A,onClick:S,type:"zoomOut",disabled:y<=b}),er=H({icon:X,onClick:E,type:"zoomIn",disabled:y===R}),eo=p.createElement("div",{className:"".concat(i,"-operations")},Q,$,ee,en,et,er);return p.createElement(w.ZP,{visible:n,motionName:t},function(e){var n=e.className,t=e.style;return p.createElement(g.Z,{open:!0,getContainer:null!=r?r:document.body},p.createElement("div",{className:s()("".concat(i,"-operations-wrapper"),n,c),style:(0,o.Z)((0,o.Z)({},t),{},{zIndex:_})},null===M?null:p.createElement("button",{className:"".concat(i,"-close"),onClick:Z},M||W),d&&p.createElement(p.Fragment,null,p.createElement("div",{className:s()("".concat(i,"-switch-left"),(0,a.Z)({},"".concat(i,"-switch-left-disabled"),0===m)),onClick:function(e){return B(e,-1)}},z),p.createElement("div",{className:s()("".concat(i,"-switch-right"),(0,a.Z)({},"".concat(i,"-switch-right-disabled"),m===x-1)),onClick:function(e){return B(e,1)}},V)),p.createElement("div",{className:"".concat(i,"-footer")},f&&p.createElement("div",{className:"".concat(i,"-progress")},u?u(m+1,x):"".concat(m+1," / ").concat(x)),D?D(eo,(0,o.Z)((0,o.Z)({icons:{prevIcon:q,nextIcon:J,flipYIcon:Q,flipXIcon:$,rotateLeftIcon:ee,rotateRightIcon:en,zoomOutIcon:et,zoomInIcon:er},actions:{onActive:k,onFlipY:P,onFlipX:I,onRotateLeft:T,onRotateRight:N,onZoomOut:S,onZoomIn:E,onReset:j,onClose:Z},transform:v},F?{current:m,total:x}:{}),{},{image:O})):eo)))})},y=t(46789),b=t(97227),R={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1},M=t(96092);function k(e,n,t,r){var o=n+t,i=(t-r)/2;if(t>r){if(n>0)return(0,a.Z)({},e,i);if(n<0&&o<r)return(0,a.Z)({},e,-i)}else if(n<0||o>r)return(0,a.Z)({},e,n<0?i:-i);return{}}function Z(e,n,t,r){var a=(0,d.g1)(),i=a.width,c=a.height,l=null;return e<=i&&n<=c?l={x:0,y:0}:(e>i||n>c)&&(l=(0,o.Z)((0,o.Z)({},k("x",t,e,i)),k("y",r,n,c))),l}function E(e){var n=e.src,t=e.isCustomPlaceholder,r=e.fallback,o=(0,p.useState)(t?"loading":"normal"),a=(0,i.Z)(o,2),c=a[0],l=a[1],u=(0,p.useRef)(!1),s="error"===c;(0,p.useEffect)(function(){var e=!0;return new Promise(function(e){var t=document.createElement("img");t.onerror=function(){return e(!1)},t.onload=function(){return e(!0)},t.src=n}).then(function(n){!n&&e&&l("error")}),function(){e=!1}},[n]),(0,p.useEffect)(function(){t&&!u.current?l("loading"):s&&l("normal")},[n]);var d=function(){l("normal")};return[function(e){u.current=!1,"loading"===c&&null!=e&&e.complete&&(e.naturalWidth||e.naturalHeight)&&(u.current=!0,d())},s&&r?{src:r}:{onLoad:d,src:n},c]}function S(e,n){return Math.hypot(e.x-n.x,e.y-n.y)}var N=["fallback","src","imgRef"],T=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],I=function(e){var n=e.fallback,t=e.src,o=e.imgRef,a=(0,l.Z)(e,N),c=E({src:t,fallback:n}),u=(0,i.Z)(c,2),s=u[0],d=u[1];return p.createElement("img",(0,r.Z)({ref:function(e){o.current=e,s(e)}},a,d))},P=function(e){var n,t,c,u,f,g,w,k,E,N,P,j,D,_,O,F,Y,L,X,A,W,z,V,K,U,G,B,H,q=e.prefixCls,J=e.src,Q=e.alt,$=e.imageInfo,ee=e.fallback,en=e.movable,et=void 0===en||en,er=e.onClose,eo=e.visible,ea=e.icons,ei=e.rootClassName,ec=e.closeIcon,el=e.getContainer,eu=e.current,es=void 0===eu?0:eu,ed=e.count,ef=void 0===ed?1:ed,ep=e.countRender,em=e.scaleStep,ev=void 0===em?.5:em,eh=e.minScale,eg=void 0===eh?1:eh,ew=e.maxScale,eC=void 0===ew?50:ew,ex=e.transitionName,ey=e.maskTransitionName,eb=void 0===ey?"fade":ey,eR=e.imageRender,eM=e.imgCommonProps,ek=e.toolbarRender,eZ=e.onTransform,eE=e.onChange,eS=(0,l.Z)(e,T),eN=(0,p.useRef)(),eT=(0,p.useContext)(C),eI=eT&&ef>1,eP=eT&&ef>=1,ej=(0,p.useState)(!0),eD=(0,i.Z)(ej,2),e_=eD[0],eO=eD[1],eF=(n=(0,p.useRef)(null),t=(0,p.useRef)([]),c=(0,p.useState)(R),f=(u=(0,i.Z)(c,2))[0],g=u[1],w=function(e,r){null===n.current&&(t.current=[],n.current=(0,b.Z)(function(){g(function(e){var a=e;return t.current.forEach(function(e){a=(0,o.Z)((0,o.Z)({},a),e)}),n.current=null,null==eZ||eZ({transform:a,action:r}),a})})),t.current.push((0,o.Z)((0,o.Z)({},f),e))},{transform:f,resetTransform:function(e){g(R),(0,y.Z)(R,f)||null==eZ||eZ({transform:R,action:e})},updateTransform:w,dispatchZoomChange:function(e,n,t,r,o){var a=eN.current,i=a.width,c=a.height,l=a.offsetWidth,u=a.offsetHeight,s=a.offsetLeft,p=a.offsetTop,m=e,v=f.scale*e;v>eC?(v=eC,m=eC/f.scale):v<eg&&(m=(v=o?v:eg)/f.scale);var h=null!=r?r:innerHeight/2,g=m-1,C=g*((null!=t?t:innerWidth/2)-f.x-s),x=g*(h-f.y-p),y=f.x-(C-g*i*.5),b=f.y-(x-g*c*.5);if(e<1&&1===v){var R=l*v,M=u*v,k=(0,d.g1)(),Z=k.width,E=k.height;R<=Z&&M<=E&&(y=0,b=0)}w({x:y,y:b,scale:v},n)}}),eY=eF.transform,eL=eF.resetTransform,eX=eF.updateTransform,eA=eF.dispatchZoomChange,eW=(k=eY.rotate,E=eY.scale,N=eY.x,P=eY.y,j=(0,p.useState)(!1),_=(D=(0,i.Z)(j,2))[0],O=D[1],F=(0,p.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),Y=function(e){eo&&_&&eX({x:e.pageX-F.current.diffX,y:e.pageY-F.current.diffY},"move")},L=function(){if(eo&&_){O(!1);var e=F.current,n=e.transformX,t=e.transformY;if(N!==n&&P!==t){var r=eN.current.offsetWidth*E,a=eN.current.offsetHeight*E,i=eN.current.getBoundingClientRect(),c=i.left,l=i.top,u=k%180!=0,s=Z(u?a:r,u?r:a,c,l);s&&eX((0,o.Z)({},s),"dragRebound")}}},(0,p.useEffect)(function(){var e,n,t,r;if(et){t=(0,v.Z)(window,"mouseup",L,!1),r=(0,v.Z)(window,"mousemove",Y,!1);try{window.top!==window.self&&(e=(0,v.Z)(window.top,"mouseup",L,!1),n=(0,v.Z)(window.top,"mousemove",Y,!1))}catch(e){(0,M.Kp)(!1,"[rc-image] ".concat(e))}}return function(){var o,a,i,c;null===(o=t)||void 0===o||o.remove(),null===(a=r)||void 0===a||a.remove(),null===(i=e)||void 0===i||i.remove(),null===(c=n)||void 0===c||c.remove()}},[eo,_,N,P,k,et]),{isMoving:_,onMouseDown:function(e){et&&0===e.button&&(e.preventDefault(),e.stopPropagation(),F.current={diffX:e.pageX-N,diffY:e.pageY-P,transformX:N,transformY:P},O(!0))},onMouseMove:Y,onMouseUp:L,onWheel:function(e){if(eo&&0!=e.deltaY){var n=1+Math.min(Math.abs(e.deltaY/100),1)*ev;e.deltaY>0&&(n=1/n),eA(n,"wheel",e.clientX,e.clientY)}}}),ez=eW.isMoving,eV=eW.onMouseDown,eK=eW.onWheel,eU=(X=eY.rotate,A=eY.scale,W=eY.x,z=eY.y,V=(0,p.useState)(!1),U=(K=(0,i.Z)(V,2))[0],G=K[1],B=(0,p.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),H=function(e){B.current=(0,o.Z)((0,o.Z)({},B.current),e)},(0,p.useEffect)(function(){var e;return eo&&et&&(e=(0,v.Z)(window,"touchmove",function(e){return e.preventDefault()},{passive:!1})),function(){var n;null===(n=e)||void 0===n||n.remove()}},[eo,et]),{isTouching:U,onTouchStart:function(e){if(et){e.stopPropagation(),G(!0);var n=e.touches,t=void 0===n?[]:n;t.length>1?H({point1:{x:t[0].clientX,y:t[0].clientY},point2:{x:t[1].clientX,y:t[1].clientY},eventType:"touchZoom"}):H({point1:{x:t[0].clientX-W,y:t[0].clientY-z},eventType:"move"})}},onTouchMove:function(e){var n=e.touches,t=void 0===n?[]:n,r=B.current,o=r.point1,a=r.point2,c=r.eventType;if(t.length>1&&"touchZoom"===c){var l={x:t[0].clientX,y:t[0].clientY},u={x:t[1].clientX,y:t[1].clientY},s=function(e,n,t,r){var o=S(e,t),a=S(n,r);if(0===o&&0===a)return[e.x,e.y];var i=o/(o+a);return[e.x+i*(n.x-e.x),e.y+i*(n.y-e.y)]}(o,a,l,u),d=(0,i.Z)(s,2),f=d[0],p=d[1];eA(S(l,u)/S(o,a),"touchZoom",f,p,!0),H({point1:l,point2:u,eventType:"touchZoom"})}else"move"===c&&(eX({x:t[0].clientX-o.x,y:t[0].clientY-o.y},"move"),H({eventType:"move"}))},onTouchEnd:function(){if(eo){if(U&&G(!1),H({eventType:"none"}),eg>A)return eX({x:0,y:0,scale:eg},"touchZoom");var e=eN.current.offsetWidth*A,n=eN.current.offsetHeight*A,t=eN.current.getBoundingClientRect(),r=t.left,a=t.top,i=X%180!=0,c=Z(i?n:e,i?e:n,r,a);c&&eX((0,o.Z)({},c),"dragRebound")}}}),eG=eU.isTouching,eB=eU.onTouchStart,eH=eU.onTouchMove,eq=eU.onTouchEnd,eJ=eY.rotate,eQ=eY.scale,e$=s()((0,a.Z)({},"".concat(q,"-moving"),ez));(0,p.useEffect)(function(){e_||eO(!0)},[e_]);var e0=function(e){var n=es+e;!Number.isInteger(n)||n<0||n>ef-1||(eO(!1),eL(e<0?"prev":"next"),null==eE||eE(n,es))},e1=function(e){eo&&eI&&(e.keyCode===h.Z.LEFT?e0(-1):e.keyCode===h.Z.RIGHT&&e0(1))};(0,p.useEffect)(function(){var e=(0,v.Z)(window,"keydown",e1,!1);return function(){e.remove()}},[eo,eI,es]);var e2=p.createElement(I,(0,r.Z)({},eM,{width:e.width,height:e.height,imgRef:eN,className:"".concat(q,"-img"),alt:Q,style:{transform:"translate3d(".concat(eY.x,"px, ").concat(eY.y,"px, 0) scale3d(").concat(eY.flipX?"-":"").concat(eQ,", ").concat(eY.flipY?"-":"").concat(eQ,", 1) rotate(").concat(eJ,"deg)"),transitionDuration:(!e_||eG)&&"0s"},fallback:ee,src:J,onWheel:eK,onMouseDown:eV,onDoubleClick:function(e){eo&&(1!==eQ?eX({x:0,y:0,scale:1},"doubleClick"):eA(1+ev,"doubleClick",e.clientX,e.clientY))},onTouchStart:eB,onTouchMove:eH,onTouchEnd:eq,onTouchCancel:eq})),e9=(0,o.Z)({url:J,alt:Q},$);return p.createElement(p.Fragment,null,p.createElement(m.Z,(0,r.Z)({transitionName:void 0===ex?"zoom":ex,maskTransitionName:eb,closable:!1,keyboard:!0,prefixCls:q,onClose:er,visible:eo,classNames:{wrapper:e$},rootClassName:ei,getContainer:el},eS,{afterClose:function(){eL("close")}}),p.createElement("div",{className:"".concat(q,"-img-wrapper")},eR?eR(e2,(0,o.Z)({transform:eY,image:e9},eT?{current:es}:{})):e2)),p.createElement(x,{visible:eo,transform:eY,maskTransitionName:eb,closeIcon:ec,getContainer:el,prefixCls:q,rootClassName:ei,icons:void 0===ea?{}:ea,countRender:ep,showSwitch:eI,showProgress:eP,current:es,count:ef,scale:eQ,minScale:eg,maxScale:eC,toolbarRender:ek,onActive:e0,onZoomIn:function(){eA(1+ev,"zoomIn")},onZoomOut:function(){eA(1/(1+ev),"zoomOut")},onRotateRight:function(){eX({rotate:eJ+90},"rotateRight")},onRotateLeft:function(){eX({rotate:eJ-90},"rotateLeft")},onFlipX:function(){eX({flipX:!eY.flipX},"flipX")},onFlipY:function(){eX({flipY:!eY.flipY},"flipY")},onClose:er,onReset:function(){eL("reset")},zIndex:void 0!==eS.zIndex?eS.zIndex+1:void 0,image:e9}))},j=t(61661),D=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"],_=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],O=["src"],F=0,Y=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],L=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],X=function(e){var n,t,u,m,v=e.src,h=e.alt,g=e.onPreviewClose,w=e.prefixCls,x=void 0===w?"rc-image":w,y=e.previewPrefixCls,b=void 0===y?"".concat(x,"-preview"):y,R=e.placeholder,M=e.fallback,k=e.width,Z=e.height,S=e.style,N=e.preview,T=void 0===N||N,I=e.className,j=e.onClick,_=e.onError,O=e.wrapperClassName,X=e.wrapperStyle,A=e.rootClassName,W=(0,l.Z)(e,Y),z="object"===(0,c.Z)(T)?T:{},V=z.src,K=z.visible,U=void 0===K?void 0:K,G=z.onVisibleChange,B=z.getContainer,H=z.mask,q=z.maskClassName,J=z.movable,Q=z.icons,$=z.scaleStep,ee=z.minScale,en=z.maxScale,et=z.imageRender,er=z.toolbarRender,eo=(0,l.Z)(z,L),ea=null!=V?V:v,ei=(0,f.Z)(!!U,{value:U,onChange:void 0===G?g:G}),ec=(0,i.Z)(ei,2),el=ec[0],eu=ec[1],es=E({src:v,isCustomPlaceholder:R&&!0!==R,fallback:M}),ed=(0,i.Z)(es,3),ef=ed[0],ep=ed[1],em=ed[2],ev=(0,p.useState)(null),eh=(0,i.Z)(ev,2),eg=eh[0],ew=eh[1],eC=(0,p.useContext)(C),ex=!!T,ey=s()(x,O,A,(0,a.Z)({},"".concat(x,"-error"),"error"===em)),eb=(0,p.useMemo)(function(){var n={};return D.forEach(function(t){void 0!==e[t]&&(n[t]=e[t])}),n},D.map(function(n){return e[n]})),eR=(0,p.useMemo)(function(){return(0,o.Z)((0,o.Z)({},eb),{},{src:ea})},[ea,eb]),eM=(n=p.useState(function(){return String(F+=1)}),t=(0,i.Z)(n,1)[0],u=p.useContext(C),m={data:eR,canPreview:ex},p.useEffect(function(){if(u)return u.register(t,m)},[]),p.useEffect(function(){u&&u.register(t,m)},[ex,eR]),t);return p.createElement(p.Fragment,null,p.createElement("div",(0,r.Z)({},W,{className:ey,onClick:ex?function(e){var n=(0,d.os)(e.target),t=n.left,r=n.top;eC?eC.onPreview(eM,ea,t,r):(ew({x:t,y:r}),eu(!0)),null==j||j(e)}:j,style:(0,o.Z)({width:k,height:Z},X)}),p.createElement("img",(0,r.Z)({},eb,{className:s()("".concat(x,"-img"),(0,a.Z)({},"".concat(x,"-img-placeholder"),!0===R),I),style:(0,o.Z)({height:Z},S),ref:ef},ep,{width:k,height:Z,onError:_})),"loading"===em&&p.createElement("div",{"aria-hidden":"true",className:"".concat(x,"-placeholder")},R),H&&ex&&p.createElement("div",{className:s()("".concat(x,"-mask"),q),style:{display:(null==S?void 0:S.display)==="none"?"none":void 0}},H)),!eC&&ex&&p.createElement(P,(0,r.Z)({"aria-hidden":!el,visible:el,prefixCls:b,onClose:function(){eu(!1),ew(null)},mousePosition:eg,src:ea,alt:h,imageInfo:{width:k,height:Z},fallback:M,getContainer:void 0===B?void 0:B,icons:Q,movable:J,scaleStep:$,minScale:ee,maxScale:en,rootClassName:A,imageRender:et,imgCommonProps:eb,toolbarRender:er},eo)))};X.PreviewGroup=function(e){var n,t,u,s,d,m,v=e.previewPrefixCls,h=e.children,g=e.icons,w=e.items,x=e.preview,y=e.fallback,b="object"===(0,c.Z)(x)?x:{},R=b.visible,M=b.onVisibleChange,k=b.getContainer,Z=b.current,E=b.movable,S=b.minScale,N=b.maxScale,T=b.countRender,I=b.closeIcon,F=b.onChange,Y=b.onTransform,L=b.toolbarRender,X=b.imageRender,A=(0,l.Z)(b,_),W=(n=p.useState({}),u=(t=(0,i.Z)(n,2))[0],s=t[1],d=p.useCallback(function(e,n){return s(function(t){return(0,o.Z)((0,o.Z)({},t),{},(0,a.Z)({},e,n))}),function(){s(function(n){var t=(0,o.Z)({},n);return delete t[e],t})}},[]),[p.useMemo(function(){return w?w.map(function(e){if("string"==typeof e)return{data:{src:e}};var n={};return Object.keys(e).forEach(function(t){["src"].concat((0,j.Z)(D)).includes(t)&&(n[t]=e[t])}),{data:n}}):Object.keys(u).reduce(function(e,n){var t=u[n],r=t.canPreview,o=t.data;return r&&e.push({data:o,id:n}),e},[])},[w,u]),d,!!w]),z=(0,i.Z)(W,3),V=z[0],K=z[1],U=z[2],G=(0,f.Z)(0,{value:Z}),B=(0,i.Z)(G,2),H=B[0],q=B[1],J=(0,p.useState)(!1),Q=(0,i.Z)(J,2),$=Q[0],ee=Q[1],en=(null===(m=V[H])||void 0===m?void 0:m.data)||{},et=en.src,er=(0,l.Z)(en,O),eo=(0,f.Z)(!!R,{value:R,onChange:function(e,n){null==M||M(e,n,H)}}),ea=(0,i.Z)(eo,2),ei=ea[0],ec=ea[1],el=(0,p.useState)(null),eu=(0,i.Z)(el,2),es=eu[0],ed=eu[1],ef=p.useCallback(function(e,n,t,r){var o=U?V.findIndex(function(e){return e.data.src===n}):V.findIndex(function(n){return n.id===e});q(o<0?0:o),ec(!0),ed({x:t,y:r}),ee(!0)},[V,U]);p.useEffect(function(){ei?$||q(0):ee(!1)},[ei]);var ep=p.useMemo(function(){return{register:K,onPreview:ef}},[K,ef]);return p.createElement(C.Provider,{value:ep},h,p.createElement(P,(0,r.Z)({"aria-hidden":!ei,movable:E,visible:ei,prefixCls:void 0===v?"rc-image-preview":v,closeIcon:I,onClose:function(){ec(!1),ed(null)},mousePosition:es,imgCommonProps:er,src:et,fallback:y,icons:void 0===g?{}:g,minScale:S,maxScale:N,getContainer:k,current:H,count:V.length,countRender:T,onTransform:Y,toolbarRender:L,imageRender:X,onChange:function(e,n){q(e),null==F||F(e,n)}},A)))};var A=X},69710:function(e,n,t){t.d(n,{Ee:function(){return W},Rk:function(){return z},Tr:function(){return U},Uv:function(){return O},VY:function(){return F},Z0:function(){return K},ZA:function(){return Y},__:function(){return L},ck:function(){return X},fC:function(){return D},fF:function(){return G},oC:function(){return A},tu:function(){return B},wU:function(){return V},xz:function(){return _}});var r=t(40929),o=t(25719),a=t(96143),i=t(12403),c=t(9245),l=t(96796),u=t(54496),s=t(99786),d=t(29362),f="DropdownMenu",[p,m]=(0,i.b)(f,[u.Wf]),v=(0,u.Wf)(),[h,g]=p(f),w=e=>{let{__scopeDropdownMenu:n,children:t,dir:o,open:a,defaultOpen:i,onOpenChange:l,modal:f=!0}=e,p=v(n),m=r.useRef(null),[g=!1,w]=(0,c.T)({prop:a,defaultProp:i,onChange:l});return(0,d.jsx)(h,{scope:n,triggerId:(0,s.M)(),triggerRef:m,contentId:(0,s.M)(),open:g,onOpenChange:w,onOpenToggle:r.useCallback(()=>w(e=>!e),[w]),modal:f,children:(0,d.jsx)(u.fC,{...p,open:g,onOpenChange:w,dir:o,modal:f,children:t})})};w.displayName=f;var C="DropdownMenuTrigger",x=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,disabled:r=!1,...i}=e,c=g(C,t),s=v(t);return(0,d.jsx)(u.ee,{asChild:!0,...s,children:(0,d.jsx)(l.WV.button,{type:"button",id:c.triggerId,"aria-haspopup":"menu","aria-expanded":c.open,"aria-controls":c.open?c.contentId:void 0,"data-state":c.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...i,ref:(0,a.F)(n,c.triggerRef),onPointerDown:(0,o.M)(e.onPointerDown,e=>{r||0!==e.button||!1!==e.ctrlKey||(c.onOpenToggle(),c.open||e.preventDefault())}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{!r&&(["Enter"," "].includes(e.key)&&c.onOpenToggle(),"ArrowDown"===e.key&&c.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())})})})});x.displayName=C;var y=e=>{let{__scopeDropdownMenu:n,...t}=e,r=v(n);return(0,d.jsx)(u.h_,{...r,...t})};y.displayName="DropdownMenuPortal";var b="DropdownMenuContent",R=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...a}=e,i=g(b,t),c=v(t),l=r.useRef(!1);return(0,d.jsx)(u.VY,{id:i.contentId,"aria-labelledby":i.triggerId,...c,...a,ref:n,onCloseAutoFocus:(0,o.M)(e.onCloseAutoFocus,e=>{var n;l.current||null===(n=i.triggerRef.current)||void 0===n||n.focus(),l.current=!1,e.preventDefault()}),onInteractOutside:(0,o.M)(e.onInteractOutside,e=>{let n=e.detail.originalEvent,t=0===n.button&&!0===n.ctrlKey,r=2===n.button||t;(!i.modal||r)&&(l.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});R.displayName=b;var M=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.ZA,{...o,...r,ref:n})});M.displayName="DropdownMenuGroup";var k=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.__,{...o,...r,ref:n})});k.displayName="DropdownMenuLabel";var Z=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.ck,{...o,...r,ref:n})});Z.displayName="DropdownMenuItem";var E=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.oC,{...o,...r,ref:n})});E.displayName="DropdownMenuCheckboxItem";var S=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.Ee,{...o,...r,ref:n})});S.displayName="DropdownMenuRadioGroup";var N=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.Rk,{...o,...r,ref:n})});N.displayName="DropdownMenuRadioItem";var T=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.wU,{...o,...r,ref:n})});T.displayName="DropdownMenuItemIndicator";var I=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.Z0,{...o,...r,ref:n})});I.displayName="DropdownMenuSeparator",r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.Eh,{...o,...r,ref:n})}).displayName="DropdownMenuArrow";var P=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.fF,{...o,...r,ref:n})});P.displayName="DropdownMenuSubTrigger";var j=r.forwardRef((e,n)=>{let{__scopeDropdownMenu:t,...r}=e,o=v(t);return(0,d.jsx)(u.tu,{...o,...r,ref:n,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});j.displayName="DropdownMenuSubContent";var D=w,_=x,O=y,F=R,Y=M,L=k,X=Z,A=E,W=S,z=N,V=T,K=I,U=e=>{let{__scopeDropdownMenu:n,children:t,open:r,onOpenChange:o,defaultOpen:a}=e,i=v(n),[l=!1,s]=(0,c.T)({prop:r,defaultProp:a,onChange:o});return(0,d.jsx)(u.Tr,{...i,open:l,onOpenChange:s,children:t})},G=P,B=j},54496:function(e,n,t){t.d(n,{Ee:function(){return eY},Eh:function(){return eW},Rk:function(){return eL},Tr:function(){return ez},VY:function(){return ej},Wf:function(){return j},Z0:function(){return eA},ZA:function(){return eD},__:function(){return e_},ck:function(){return eO},ee:function(){return eI},fC:function(){return eT},fF:function(){return eV},h_:function(){return eP},oC:function(){return eF},tu:function(){return eK},wU:function(){return eX}});var r=t(40929),o=t(25719),a=t(31387),i=t(96143),c=t(12403),l=t(12088),u=t(39478),s=t(93800),d=t(62961),f=t(99786),p=t(32512),m=t(45442),v=t(22463),h=t(96796),g=t(74241),w=t(64870),C=t(2073),x=t(18168),y=t(82185),b=t(29362),R=["Enter"," "],M=["ArrowUp","PageDown","End"],k=["ArrowDown","PageUp","Home",...M],Z={ltr:[...R,"ArrowRight"],rtl:[...R,"ArrowLeft"]},E={ltr:["ArrowLeft"],rtl:["ArrowRight"]},S="Menu",[N,T,I]=(0,a.B)(S),[P,j]=(0,c.b)(S,[I,p.D7,g.Pc]),D=(0,p.D7)(),_=(0,g.Pc)(),[O,F]=P(S),[Y,L]=P(S),X=e=>{let{__scopeMenu:n,open:t=!1,children:o,dir:a,onOpenChange:i,modal:c=!0}=e,u=D(n),[s,d]=r.useState(null),f=r.useRef(!1),m=(0,C.W)(i),v=(0,l.gm)(a);return r.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener("pointerdown",n,{capture:!0,once:!0}),document.addEventListener("pointermove",n,{capture:!0,once:!0})},n=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",n,{capture:!0}),document.removeEventListener("pointermove",n,{capture:!0})}},[]),(0,b.jsx)(p.fC,{...u,children:(0,b.jsx)(O,{scope:n,open:t,onOpenChange:m,content:s,onContentChange:d,children:(0,b.jsx)(Y,{scope:n,onClose:r.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:v,modal:c,children:o})})})};X.displayName=S;var A=r.forwardRef((e,n)=>{let{__scopeMenu:t,...r}=e,o=D(t);return(0,b.jsx)(p.ee,{...o,...r,ref:n})});A.displayName="MenuAnchor";var W="MenuPortal",[z,V]=P(W,{forceMount:void 0}),K=e=>{let{__scopeMenu:n,forceMount:t,children:r,container:o}=e,a=F(W,n);return(0,b.jsx)(z,{scope:n,forceMount:t,children:(0,b.jsx)(v.z,{present:t||a.open,children:(0,b.jsx)(m.h,{asChild:!0,container:o,children:r})})})};K.displayName=W;var U="MenuContent",[G,B]=P(U),H=r.forwardRef((e,n)=>{let t=V(U,e.__scopeMenu),{forceMount:r=t.forceMount,...o}=e,a=F(U,e.__scopeMenu),i=L(U,e.__scopeMenu);return(0,b.jsx)(N.Provider,{scope:e.__scopeMenu,children:(0,b.jsx)(v.z,{present:r||a.open,children:(0,b.jsx)(N.Slot,{scope:e.__scopeMenu,children:i.modal?(0,b.jsx)(q,{...o,ref:n}):(0,b.jsx)(J,{...o,ref:n})})})})}),q=r.forwardRef((e,n)=>{let t=F(U,e.__scopeMenu),a=r.useRef(null),c=(0,i.e)(n,a);return r.useEffect(()=>{let e=a.current;if(e)return(0,x.hideOthers)(e)},[]),(0,b.jsx)(Q,{...e,ref:c,trapFocus:t.open,disableOutsidePointerEvents:t.open,disableOutsideScroll:!0,onFocusOutside:(0,o.M)(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>t.onOpenChange(!1)})}),J=r.forwardRef((e,n)=>{let t=F(U,e.__scopeMenu);return(0,b.jsx)(Q,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>t.onOpenChange(!1)})}),Q=r.forwardRef((e,n)=>{let{__scopeMenu:t,loop:a=!1,trapFocus:c,onOpenAutoFocus:l,onCloseAutoFocus:f,disableOutsidePointerEvents:m,onEntryFocus:v,onEscapeKeyDown:h,onPointerDownOutside:C,onFocusOutside:x,onInteractOutside:R,onDismiss:Z,disableOutsideScroll:E,...S}=e,N=F(U,t),I=L(U,t),P=D(t),j=_(t),O=T(t),[Y,X]=r.useState(null),A=r.useRef(null),W=(0,i.e)(n,A,N.onContentChange),z=r.useRef(0),V=r.useRef(""),K=r.useRef(0),B=r.useRef(null),H=r.useRef("right"),q=r.useRef(0),J=E?y.Z:r.Fragment,Q=E?{as:w.g7,allowPinchZoom:!0}:void 0,$=e=>{var n,t;let r=V.current+e,o=O().filter(e=>!e.disabled),a=document.activeElement,i=null===(n=o.find(e=>e.ref.current===a))||void 0===n?void 0:n.textValue,c=function(e,n,t){var r;let o=n.length>1&&Array.from(n).every(e=>e===n[0])?n[0]:n,a=(r=Math.max(t?e.indexOf(t):-1,0),e.map((n,t)=>e[(r+t)%e.length]));1===o.length&&(a=a.filter(e=>e!==t));let i=a.find(e=>e.toLowerCase().startsWith(o.toLowerCase()));return i!==t?i:void 0}(o.map(e=>e.textValue),r,i),l=null===(t=o.find(e=>e.textValue===c))||void 0===t?void 0:t.ref.current;!function e(n){V.current=n,window.clearTimeout(z.current),""!==n&&(z.current=window.setTimeout(()=>e(""),1e3))}(r),l&&setTimeout(()=>l.focus())};r.useEffect(()=>()=>window.clearTimeout(z.current),[]),(0,s.EW)();let ee=r.useCallback(e=>{var n,t,r;return H.current===(null===(n=B.current)||void 0===n?void 0:n.side)&&!!(r=null===(t=B.current)||void 0===t?void 0:t.area)&&function(e,n){let{x:t,y:r}=e,o=!1;for(let e=0,a=n.length-1;e<n.length;a=e++){let i=n[e].x,c=n[e].y,l=n[a].x,u=n[a].y;c>r!=u>r&&t<(l-i)*(r-c)/(u-c)+i&&(o=!o)}return o}({x:e.clientX,y:e.clientY},r)},[]);return(0,b.jsx)(G,{scope:t,searchRef:V,onItemEnter:r.useCallback(e=>{ee(e)&&e.preventDefault()},[ee]),onItemLeave:r.useCallback(e=>{var n;ee(e)||(null===(n=A.current)||void 0===n||n.focus(),X(null))},[ee]),onTriggerLeave:r.useCallback(e=>{ee(e)&&e.preventDefault()},[ee]),pointerGraceTimerRef:K,onPointerGraceIntentChange:r.useCallback(e=>{B.current=e},[]),children:(0,b.jsx)(J,{...Q,children:(0,b.jsx)(d.M,{asChild:!0,trapped:c,onMountAutoFocus:(0,o.M)(l,e=>{var n;e.preventDefault(),null===(n=A.current)||void 0===n||n.focus({preventScroll:!0})}),onUnmountAutoFocus:f,children:(0,b.jsx)(u.XB,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:h,onPointerDownOutside:C,onFocusOutside:x,onInteractOutside:R,onDismiss:Z,children:(0,b.jsx)(g.fC,{asChild:!0,...j,dir:I.dir,orientation:"vertical",loop:a,currentTabStopId:Y,onCurrentTabStopIdChange:X,onEntryFocus:(0,o.M)(v,e=>{I.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,b.jsx)(p.VY,{role:"menu","aria-orientation":"vertical","data-state":eZ(N.open),"data-radix-menu-content":"",dir:I.dir,...P,...S,ref:W,style:{outline:"none",...S.style},onKeyDown:(0,o.M)(S.onKeyDown,e=>{let n=e.target.closest("[data-radix-menu-content]")===e.currentTarget,t=e.ctrlKey||e.altKey||e.metaKey,r=1===e.key.length;n&&("Tab"===e.key&&e.preventDefault(),!t&&r&&$(e.key));let o=A.current;if(e.target!==o||!k.includes(e.key))return;e.preventDefault();let a=O().filter(e=>!e.disabled).map(e=>e.ref.current);M.includes(e.key)&&a.reverse(),function(e){let n=document.activeElement;for(let t of e)if(t===n||(t.focus(),document.activeElement!==n))return}(a)}),onBlur:(0,o.M)(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(z.current),V.current="")}),onPointerMove:(0,o.M)(e.onPointerMove,eN(e=>{let n=e.target,t=q.current!==e.clientX;if(e.currentTarget.contains(n)&&t){let n=e.clientX>q.current?"right":"left";H.current=n,q.current=e.clientX}}))})})})})})})});H.displayName=U;var $=r.forwardRef((e,n)=>{let{__scopeMenu:t,...r}=e;return(0,b.jsx)(h.WV.div,{role:"group",...r,ref:n})});$.displayName="MenuGroup";var ee=r.forwardRef((e,n)=>{let{__scopeMenu:t,...r}=e;return(0,b.jsx)(h.WV.div,{...r,ref:n})});ee.displayName="MenuLabel";var en="MenuItem",et="menu.itemSelect",er=r.forwardRef((e,n)=>{let{disabled:t=!1,onSelect:a,...c}=e,l=r.useRef(null),u=L(en,e.__scopeMenu),s=B(en,e.__scopeMenu),d=(0,i.e)(n,l),f=r.useRef(!1);return(0,b.jsx)(eo,{...c,ref:d,disabled:t,onClick:(0,o.M)(e.onClick,()=>{let e=l.current;if(!t&&e){let n=new CustomEvent(et,{bubbles:!0,cancelable:!0});e.addEventListener(et,e=>null==a?void 0:a(e),{once:!0}),(0,h.jH)(e,n),n.defaultPrevented?f.current=!1:u.onClose()}}),onPointerDown:n=>{var t;null===(t=e.onPointerDown)||void 0===t||t.call(e,n),f.current=!0},onPointerUp:(0,o.M)(e.onPointerUp,e=>{var n;f.current||null===(n=e.currentTarget)||void 0===n||n.click()}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{let n=""!==s.searchRef.current;!t&&(!n||" "!==e.key)&&R.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});er.displayName=en;var eo=r.forwardRef((e,n)=>{let{__scopeMenu:t,disabled:a=!1,textValue:c,...l}=e,u=B(en,t),s=_(t),d=r.useRef(null),f=(0,i.e)(n,d),[p,m]=r.useState(!1),[v,w]=r.useState("");return r.useEffect(()=>{let e=d.current;if(e){var n;w((null!==(n=e.textContent)&&void 0!==n?n:"").trim())}},[l.children]),(0,b.jsx)(N.ItemSlot,{scope:t,disabled:a,textValue:null!=c?c:v,children:(0,b.jsx)(g.ck,{asChild:!0,...s,focusable:!a,children:(0,b.jsx)(h.WV.div,{role:"menuitem","data-highlighted":p?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0,...l,ref:f,onPointerMove:(0,o.M)(e.onPointerMove,eN(e=>{a?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:(0,o.M)(e.onPointerLeave,eN(e=>u.onItemLeave(e))),onFocus:(0,o.M)(e.onFocus,()=>m(!0)),onBlur:(0,o.M)(e.onBlur,()=>m(!1))})})})}),ea=r.forwardRef((e,n)=>{let{checked:t=!1,onCheckedChange:r,...a}=e;return(0,b.jsx)(ep,{scope:e.__scopeMenu,checked:t,children:(0,b.jsx)(er,{role:"menuitemcheckbox","aria-checked":eE(t)?"mixed":t,...a,ref:n,"data-state":eS(t),onSelect:(0,o.M)(a.onSelect,()=>null==r?void 0:r(!!eE(t)||!t),{checkForDefaultPrevented:!1})})})});ea.displayName="MenuCheckboxItem";var ei="MenuRadioGroup",[ec,el]=P(ei,{value:void 0,onValueChange:()=>{}}),eu=r.forwardRef((e,n)=>{let{value:t,onValueChange:r,...o}=e,a=(0,C.W)(r);return(0,b.jsx)(ec,{scope:e.__scopeMenu,value:t,onValueChange:a,children:(0,b.jsx)($,{...o,ref:n})})});eu.displayName=ei;var es="MenuRadioItem",ed=r.forwardRef((e,n)=>{let{value:t,...r}=e,a=el(es,e.__scopeMenu),i=t===a.value;return(0,b.jsx)(ep,{scope:e.__scopeMenu,checked:i,children:(0,b.jsx)(er,{role:"menuitemradio","aria-checked":i,...r,ref:n,"data-state":eS(i),onSelect:(0,o.M)(r.onSelect,()=>{var e;return null===(e=a.onValueChange)||void 0===e?void 0:e.call(a,t)},{checkForDefaultPrevented:!1})})})});ed.displayName=es;var ef="MenuItemIndicator",[ep,em]=P(ef,{checked:!1}),ev=r.forwardRef((e,n)=>{let{__scopeMenu:t,forceMount:r,...o}=e,a=em(ef,t);return(0,b.jsx)(v.z,{present:r||eE(a.checked)||!0===a.checked,children:(0,b.jsx)(h.WV.span,{...o,ref:n,"data-state":eS(a.checked)})})});ev.displayName=ef;var eh=r.forwardRef((e,n)=>{let{__scopeMenu:t,...r}=e;return(0,b.jsx)(h.WV.div,{role:"separator","aria-orientation":"horizontal",...r,ref:n})});eh.displayName="MenuSeparator";var eg=r.forwardRef((e,n)=>{let{__scopeMenu:t,...r}=e,o=D(t);return(0,b.jsx)(p.Eh,{...o,...r,ref:n})});eg.displayName="MenuArrow";var ew="MenuSub",[eC,ex]=P(ew),ey=e=>{let{__scopeMenu:n,children:t,open:o=!1,onOpenChange:a}=e,i=F(ew,n),c=D(n),[l,u]=r.useState(null),[s,d]=r.useState(null),m=(0,C.W)(a);return r.useEffect(()=>(!1===i.open&&m(!1),()=>m(!1)),[i.open,m]),(0,b.jsx)(p.fC,{...c,children:(0,b.jsx)(O,{scope:n,open:o,onOpenChange:m,content:s,onContentChange:d,children:(0,b.jsx)(eC,{scope:n,contentId:(0,f.M)(),triggerId:(0,f.M)(),trigger:l,onTriggerChange:u,children:t})})})};ey.displayName=ew;var eb="MenuSubTrigger",eR=r.forwardRef((e,n)=>{let t=F(eb,e.__scopeMenu),a=L(eb,e.__scopeMenu),c=ex(eb,e.__scopeMenu),l=B(eb,e.__scopeMenu),u=r.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:d}=l,f={__scopeMenu:e.__scopeMenu},p=r.useCallback(()=>{u.current&&window.clearTimeout(u.current),u.current=null},[]);return r.useEffect(()=>p,[p]),r.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),d(null)}},[s,d]),(0,b.jsx)(A,{asChild:!0,...f,children:(0,b.jsx)(eo,{id:c.triggerId,"aria-haspopup":"menu","aria-expanded":t.open,"aria-controls":c.contentId,"data-state":eZ(t.open),...e,ref:(0,i.F)(n,c.onTriggerChange),onClick:n=>{var r;null===(r=e.onClick)||void 0===r||r.call(e,n),e.disabled||n.defaultPrevented||(n.currentTarget.focus(),t.open||t.onOpenChange(!0))},onPointerMove:(0,o.M)(e.onPointerMove,eN(n=>{l.onItemEnter(n),n.defaultPrevented||e.disabled||t.open||u.current||(l.onPointerGraceIntentChange(null),u.current=window.setTimeout(()=>{t.onOpenChange(!0),p()},100))})),onPointerLeave:(0,o.M)(e.onPointerLeave,eN(e=>{var n,r;p();let o=null===(n=t.content)||void 0===n?void 0:n.getBoundingClientRect();if(o){let n=null===(r=t.content)||void 0===r?void 0:r.dataset.side,a="right"===n,i=o[a?"left":"right"],c=o[a?"right":"left"];l.onPointerGraceIntentChange({area:[{x:e.clientX+(a?-5:5),y:e.clientY},{x:i,y:o.top},{x:c,y:o.top},{x:c,y:o.bottom},{x:i,y:o.bottom}],side:n}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>l.onPointerGraceIntentChange(null),300)}else{if(l.onTriggerLeave(e),e.defaultPrevented)return;l.onPointerGraceIntentChange(null)}})),onKeyDown:(0,o.M)(e.onKeyDown,n=>{let r=""!==l.searchRef.current;if(!e.disabled&&(!r||" "!==n.key)&&Z[a.dir].includes(n.key)){var o;t.onOpenChange(!0),null===(o=t.content)||void 0===o||o.focus(),n.preventDefault()}})})})});eR.displayName=eb;var eM="MenuSubContent",ek=r.forwardRef((e,n)=>{let t=V(U,e.__scopeMenu),{forceMount:a=t.forceMount,...c}=e,l=F(U,e.__scopeMenu),u=L(U,e.__scopeMenu),s=ex(eM,e.__scopeMenu),d=r.useRef(null),f=(0,i.e)(n,d);return(0,b.jsx)(N.Provider,{scope:e.__scopeMenu,children:(0,b.jsx)(v.z,{present:a||l.open,children:(0,b.jsx)(N.Slot,{scope:e.__scopeMenu,children:(0,b.jsx)(Q,{id:s.contentId,"aria-labelledby":s.triggerId,...c,ref:f,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var n;u.isUsingKeyboardRef.current&&(null===(n=d.current)||void 0===n||n.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:(0,o.M)(e.onFocusOutside,e=>{e.target!==s.trigger&&l.onOpenChange(!1)}),onEscapeKeyDown:(0,o.M)(e.onEscapeKeyDown,e=>{u.onClose(),e.preventDefault()}),onKeyDown:(0,o.M)(e.onKeyDown,e=>{let n=e.currentTarget.contains(e.target),t=E[u.dir].includes(e.key);if(n&&t){var r;l.onOpenChange(!1),null===(r=s.trigger)||void 0===r||r.focus(),e.preventDefault()}})})})})})});function eZ(e){return e?"open":"closed"}function eE(e){return"indeterminate"===e}function eS(e){return eE(e)?"indeterminate":e?"checked":"unchecked"}function eN(e){return n=>"mouse"===n.pointerType?e(n):void 0}ek.displayName=eM;var eT=X,eI=A,eP=K,ej=H,eD=$,e_=ee,eO=er,eF=ea,eY=eu,eL=ed,eX=ev,eA=eh,eW=eg,ez=ey,eV=eR,eK=ek}}]);