import{Q as v,f as M,Z as ft,bs as Et,aQ as Se,d as z,r as D,ah as ct,W as J,w as W,a5 as Ae,P as I,bt as Vt,a8 as $t,bu as Be,I as U,bv as X,bw as Bt,a9 as fe,B as Pe,am as Ht,bc as Q,a3 as Rt,a0 as ce,af as de,bj as kt,ap as Ft,aP as jt,aR as _t,bx as He,X as ue,aj as Z,by as It,a1 as Wt,T as Re,U as T,bz as zt,Y as Lt,bA as ke,a2 as Xt,bB as Yt,bC as oe,b0 as Ut,b3 as qt,bD as Fe,aX as pt,b2 as Gt,F as Qt,b as Zt,V as Kt,aO as Jt,aV as dt,ac as en,ay as tn,aZ as nn,ae as on,bE as rn,b7 as an}from"./offline.ee04b43a.js";var vt=["moz","ms","webkit"];function sn(){var n=0;return function(e){var t=new Date().getTime(),i=Math.max(0,16-(t-n)),o=window.setTimeout(function(){e(t+i)},i);return n=t+i,o}}function ln(){if(typeof window>"u")return function(){};if(window.requestAnimationFrame)return window.requestAnimationFrame.bind(window);var n=vt.filter(function(e){return"".concat(e,"RequestAnimationFrame")in window})[0];return n?window["".concat(n,"RequestAnimationFrame")]:sn()}function un(n){if(typeof window>"u")return null;if(window.cancelAnimationFrame)return window.cancelAnimationFrame(n);var e=vt.filter(function(t){return"".concat(t,"CancelAnimationFrame")in window||"".concat(t,"CancelRequestAnimationFrame")in window})[0];return e?(window["".concat(e,"CancelAnimationFrame")]||window["".concat(e,"CancelRequestAnimationFrame")]).call(this,n):clearTimeout(n)}var je=ln(),fn=function(e){return un(e.id)},cn=function(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,i=Date.now();function o(){Date.now()-i>=t?e.call():r.id=je(o)}var r={id:je(o)};return r},De={visible:Boolean,prefixCls:String,zIndex:Number,destroyPopupOnHide:Boolean,forceRender:Boolean,animation:[String,Object],transitionName:String,stretch:{type:String},align:{type:Object},point:{type:Object},getRootDomNode:{type:Function},getClassNameFromAlign:{type:Function},onMouseenter:{type:Function},onMouseleave:{type:Function},onMousedown:{type:Function},onTouchstart:{type:Function}},pn=v(v({},De),{},{mobile:{type:Object}}),dn=v(v({},De),{},{mask:Boolean,mobile:{type:Object},maskAnimation:String,maskTransitionName:String});function ht(n){var e=n.prefixCls,t=n.animation,i=n.transitionName;return t?{name:"".concat(e,"-").concat(t)}:i?{name:i}:{}}function gt(n){var e=n.prefixCls,t=n.visible,i=n.zIndex,o=n.mask,r=n.maskAnimation,a=n.maskTransitionName;if(!o)return null;var s={};return(a||r)&&(s=ht({prefixCls:e,transitionName:a,animation:r})),M(Se,v({appear:!0},s),{default:function(){return[ft(M("div",{style:{zIndex:i},class:"".concat(e,"-mask")},null),[[Et("if"),t]])]}})}gt.displayName="Mask";const vn=z({compatConfig:{MODE:3},name:"MobilePopupInner",inheritAttrs:!1,props:pn,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var i=t.expose,o=t.slots,r=D();return i({forceAlign:function(){},getElement:function(){return r.value}}),function(){var a,s=e.zIndex,l=e.visible,u=e.prefixCls,f=e.mobile;f=f===void 0?{}:f;var m=f.popupClassName,c=f.popupStyle,d=f.popupMotion,g=d===void 0?{}:d,y=f.popupRender,S=v({zIndex:s},c),P=ct((a=o.default)===null||a===void 0?void 0:a.call(o));P.length>1&&(P=M("div",{class:"".concat(u,"-content")},[P])),y&&(P=y(P));var C=J(u,m);return M(Se,v({ref:r},g),{default:function(){return[l?M("div",{class:C,style:S},[P]):null]}})}}});var _e=["measure","align",null,"motion"];const hn=function(n,e){var t=D(null),i=D(),o=D(!1);function r(l){o.value||(t.value=l)}function a(){I.cancel(i.value)}function s(l){a(),i.value=I(function(){var u=t.value;switch(t.value){case"align":u="motion";break;case"motion":u="stable";break}r(u),l==null||l()})}return W(n,function(){r("measure")},{immediate:!0,flush:"post"}),Ae(function(){W(t,function(){switch(t.value){case"measure":e();break}t.value&&(i.value=I(Vt(Be.mark(function l(){var u,f;return Be.wrap(function(c){for(;;)switch(c.prev=c.next){case 0:u=_e.indexOf(t.value),f=_e[u+1],f&&u!==-1&&r(f);case 3:case"end":return c.stop()}},l)}))))},{immediate:!0,flush:"post"})}),$t(function(){o.value=!0,a()}),[t,s]},gn=function(n){var e=D({width:0,height:0});function t(o){e.value={width:o.offsetWidth,height:o.offsetHeight}}var i=U(function(){var o={};if(n.value){var r=e.value,a=r.width,s=r.height;n.value.indexOf("height")!==-1&&s?o.height="".concat(s,"px"):n.value.indexOf("minHeight")!==-1&&s&&(o.minHeight="".concat(s,"px")),n.value.indexOf("width")!==-1&&a?o.width="".concat(a,"px"):n.value.indexOf("minWidth")!==-1&&a&&(o.minWidth="".concat(a,"px"))}return o});return[i,t]};function Ie(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(n);e&&(i=i.filter(function(o){return Object.getOwnPropertyDescriptor(n,o).enumerable})),t.push.apply(t,i)}return t}function We(n){for(var e=1;e=0&&t.left>=0&&t.bottom>t.top&&t.right>t.left?t:null}function jn(n,e,t,i){var o=h.clone(n),r={width:e.width,height:e.height};return i.adjustX&&o.left=t.left&&o.left+r.width>t.right&&(r.width-=o.left+r.width-t.right),i.adjustX&&o.left+r.width>t.right&&(o.left=Math.max(t.right-r.width,t.left)),i.adjustY&&o.top=t.top&&o.top+r.height>t.bottom&&(r.height-=o.top+r.height-t.bottom),i.adjustY&&o.top+r.height>t.bottom&&(o.top=Math.max(t.bottom-r.height,t.top)),h.mix(o,r)}function Ve(n){var e,t,i;if(!h.isWindow(n)&&n.nodeType!==9)e=h.offset(n),t=h.outerWidth(n),i=h.outerHeight(n);else{var o=h.getWindow(n);e={left:h.getWindowScrollLeft(o),top:h.getWindowScrollTop(o)},t=h.viewportWidth(o),i=h.viewportHeight(o)}return e.width=t,e.height=i,e}function Qe(n,e){var t=e.charAt(0),i=e.charAt(1),o=n.width,r=n.height,a=n.left,s=n.top;return t==="c"?s+=r/2:t==="b"&&(s+=r),i==="c"?a+=o/2:i==="r"&&(a+=o),{left:a,top:s}}function ae(n,e,t,i,o){var r=Qe(e,t[1]),a=Qe(n,t[0]),s=[a.left-r.left,a.top-r.top];return{left:Math.round(n.left-s[0]+i[0]-o[0]),top:Math.round(n.top-s[1]+i[1]-o[1])}}function Ze(n,e,t){return n.leftt.right}function Ke(n,e,t){return n.topt.bottom}function _n(n,e,t){return n.left>t.right||n.left+e.widtht.bottom||n.top+e.height=t.right||i.top>=t.bottom}function $e(n,e,t){var i=t.target||e,o=Ve(i),r=!Wn(i,t.overflow&&t.overflow.alwaysByViewport);return xt(n,o,t,r)}$e.__getOffsetParent=Oe;$e.__getVisibleRectForElement=Ee;function zn(n,e,t){var i,o,r=h.getDocument(n),a=r.defaultView||r.parentWindow,s=h.getWindowScrollLeft(a),l=h.getWindowScrollTop(a),u=h.viewportWidth(a),f=h.viewportHeight(a);"pageX"in e?i=e.pageX:i=s+e.clientX,"pageY"in e?o=e.pageY:o=l+e.clientY;var m={left:i,top:o,width:0,height:0},c=i>=0&&i<=s+u&&o>=0&&o<=l+f,d=[t.points[0],"cc"];return xt(n,m,We(We({},t),{},{points:d}),c)}const Ln=function(n){if(!n)return!1;if(n.offsetParent)return!0;if(n.getBBox){var e=n.getBBox();if(e.width||e.height)return!0}if(n.getBoundingClientRect){var t=n.getBoundingClientRect();if(t.width||t.height)return!0}return!1};function Xn(n,e){return n===e?!0:!n||!e?!1:"pageX"in e&&"pageY"in e?n.pageX===e.pageX&&n.pageY===e.pageY:"clientX"in e&&"clientY"in e?n.clientX===e.clientX&&n.clientY===e.clientY:!1}function Yn(n,e){n!==document.activeElement&&X(e,n)&&typeof n.focus=="function"&&n.focus()}function tt(n,e){var t=null,i=null;function o(a){var s=fe(a,1),l=s[0].target;if(!!document.documentElement.contains(l)){var u=l.getBoundingClientRect(),f=u.width,m=u.height,c=Math.floor(f),d=Math.floor(m);(t!==c||i!==d)&&Promise.resolve().then(function(){e({width:c,height:d})}),t=c,i=d}}var r=new Bt(o);return n&&r.observe(n),function(){r.disconnect()}}const Un=function(n,e){var t=!1,i=null;function o(){clearTimeout(i)}function r(a){if(!t||a===!0){if(n()===!1)return;t=!0,o(),i=setTimeout(function(){t=!1},e.value)}else o(),i=setTimeout(function(){t=!1,r()},e.value)}return[r,function(){t=!1,o()}]};var qn={align:Object,target:[Object,Function],onAlign:Function,monitorBufferTime:Number,monitorWindowResize:Boolean,disabled:Boolean};function nt(n){return typeof n!="function"?null:n()}function it(n){return de(n)!=="object"||!n?null:n}const Gn=z({compatConfig:{MODE:3},name:"Align",props:qn,emits:["align"],setup:function(e,t){var i=t.expose,o=t.slots,r=D({}),a=D(),s=Un(function(){var y=e.disabled,S=e.target,P=e.align,C=e.onAlign;if(!y&&S&&a.value){var A=a.value,E,x=nt(S),p=it(S);r.value.element=x,r.value.point=p,r.value.align=P;var b=document,N=b.activeElement;return x&&Ln(x)?E=$e(A,x,P):p&&(E=zn(A,p,P)),Yn(N,A),C&&E&&C(A,E),!0}return!1},U(function(){return e.monitorBufferTime})),l=fe(s,2),u=l[0],f=l[1],m=D({cancel:function(){}}),c=D({cancel:function(){}}),d=function(){var S=e.target,P=nt(S),C=it(S);a.value!==c.value.element&&(c.value.cancel(),c.value.element=a.value,c.value.cancel=tt(a.value,u)),(r.value.element!==P||!Xn(r.value.point,C)||!kt(r.value.align,e.align))&&(u(),m.value.element!==P&&(m.value.cancel(),m.value.element=P,m.value.cancel=tt(P,u)))};Ae(function(){Pe(function(){d()})}),Ht(function(){Pe(function(){d()})}),W(function(){return e.disabled},function(y){y?f():u()},{immediate:!0,flush:"post"});var g=D(null);return W(function(){return e.monitorWindowResize},function(y){y?g.value||(g.value=Q(window,"resize",u)):g.value&&(g.value.remove(),g.value=null)},{flush:"post"}),Rt(function(){m.value.cancel(),c.value.cancel(),g.value&&g.value.remove(),f()}),i({forceAlign:function(){return u(!0)}}),function(){var y=o==null?void 0:o.default();return y?ce(y[0],{ref:a},!0,!0):null}}}),Qn=z({compatConfig:{MODE:3},name:"PopupInner",inheritAttrs:!1,props:De,emits:["mouseenter","mouseleave","mousedown","touchstart","align"],setup:function(e,t){var i=t.expose,o=t.attrs,r=t.slots,a=D(),s=D(),l=D(),u=gn(Ft(e,"stretch")),f=fe(u,2),m=f[0],c=f[1],d=function(){e.stretch&&c(e.getRootDomNode())},g=D(!1),y;W(function(){return e.visible},function(w){clearTimeout(y),w?y=setTimeout(function(){g.value=e.visible}):g.value=!1},{immediate:!0});var S=hn(g,d),P=fe(S,2),C=P[0],A=P[1],E=D(),x=function(){return e.point?e.point:e.getRootDomNode},p=function(){var V;(V=a.value)===null||V===void 0||V.forceAlign()},b=function(V,$){var k=e.getClassNameFromAlign($),q=l.value;if(l.value!==k&&(l.value=k),C.value==="align"){var j;q!==k?Promise.resolve().then(function(){p()}):A(function(){var _;(_=E.value)===null||_===void 0||_.call(E)}),(j=e.onAlign)===null||j===void 0||j.call(e,V,$)}},N=U(function(){var w=de(e.animation)==="object"?e.animation:ht(e);return["onAfterEnter","onAfterLeave"].forEach(function(V){var $=w[V];w[V]=function(k){A(),C.value="stable",$==null||$(k)}}),w}),O=function(){return new Promise(function(V){E.value=V})};W([N,C],function(){!N.value&&C.value==="motion"&&A()},{immediate:!0}),i({forceAlign:p,getElement:function(){return s.value.$el||s.value}});var B=U(function(){var w;return!((w=e.align)!==null&&w!==void 0&&w.points&&(C.value==="align"||C.value==="stable"))});return function(){var w,V=e.zIndex,$=e.align,k=e.prefixCls,q=e.destroyPopupOnHide,j=e.onMouseenter,_=e.onMouseleave,ne=e.onTouchstart,he=ne===void 0?function(){}:ne,St=e.onMousedown,ge=C.value,At=[v(v({},m.value),{},{zIndex:V,opacity:ge==="motion"||ge==="stable"||!g.value?null:0,pointerEvents:!g.value&&ge!=="stable"?"none":null}),o.style],ie=ct((w=r.default)===null||w===void 0?void 0:w.call(r,{visible:e.visible}));ie.length>1&&(ie=M("div",{class:"".concat(k,"-content")},[ie]));var Dt=J(k,o.class,l.value),Mt=g.value||!e.visible,Nt=Mt?jt(N.value.name,N.value):{};return M(Se,v(v({ref:s},Nt),{},{onBeforeEnter:O}),{default:function(){return!q||e.visible?ft(M(Gn,{target:x(),key:"popup",ref:a,monitorWindowResize:!0,disabled:B.value,align:$,onAlign:b},{default:function(){return M("div",v(v({class:Dt,onMouseenter:j,onMouseleave:_,onMousedown:He(St,["capture"])},ue({},Z?"onTouchstartPassive":"onTouchstart",He(he,["capture"]))),{},{style:At}),[ie])}}),[[_t,g.value]]):null}})}}}),Zn=z({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:dn,setup:function(e,t){var i=t.attrs,o=t.slots,r=t.expose,a=D(!1),s=D(!1),l=D();return W([function(){return e.visible},function(){return e.mobile}],function(){a.value=e.visible,e.visible&&e.mobile&&(s.value=!0)},{immediate:!0,flush:"post"}),r({forceAlign:function(){var f;(f=l.value)===null||f===void 0||f.forceAlign()},getElement:function(){var f;return(f=l.value)===null||f===void 0?void 0:f.getElement()}}),function(){var u=v(v(v({},e),i),{},{visible:a.value}),f=s.value?M(vn,v(v({},u),{},{mobile:e.mobile,ref:l}),{default:o.default}):M(Qn,v(v({},u),{},{ref:l}),{default:o.default});return M("div",null,[M(gt,u,null),f])}}});function Kn(n,e,t){return t?n[0]===e[0]:n[0]===e[0]&&n[1]===e[1]}function ot(n,e,t){var i=n[e]||{};return v(v({},i),t)}function Jn(n,e,t,i){for(var o=t.points,r=Object.keys(n),a=0;a0&&arguments[0]!==void 0?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,i=typeof e=="function"?e(this.$data,this.$props):e;if(this.getDerivedStateFromProps){var o=this.getDerivedStateFromProps(It(this),v(v({},this.$data),i));if(o===null)return;i=v(v({},i),o||{})}Wt(this.$data,i),this._.isMounted&&this.$forceUpdate(),Pe(function(){t&&t()})},__emit:function(){var e=[].slice.call(arguments,0),t=e[0];t="on".concat(t[0].toUpperCase()).concat(t.substring(1));var i=this.$props[t]||this.$attrs[t];if(e.length&&i)if(Array.isArray(i))for(var o=0,r=i.length;o0&&arguments[0]!==void 0?arguments[0]:[],e=0,t=n.length;e=0||O.indexOf("Bottom")>=0?w.top="".concat(B.height-b.offset[1],"px"):(O.indexOf("Top")>=0||O.indexOf("bottom")>=0)&&(w.top="".concat(-b.offset[1],"px")),O.indexOf("left")>=0||O.indexOf("Right")>=0?w.left="".concat(B.width-b.offset[0],"px"):(O.indexOf("right")>=0||O.indexOf("Left")>=0)&&(w.left="".concat(-b.offset[0],"px")),p.style.transformOrigin="".concat(w.left," ").concat(w.top)}};return function(){var x,p,b,N=e.openClassName,O=e.color,B=e.overlayClassName,w=(x=pt((p=i.default)===null||p===void 0?void 0:p.call(i)))!==null&&x!==void 0?x:null;w=w.length===1?w[0]:w;var V=f.value;if(e.visible===void 0&&d()&&(V=!1),!w)return null;var $=C(on(w)?w:M("span",null,[w])),k=J((b={},ue(b,N||"".concat(l.value,"-open"),!0),ue(b,$.props&&$.props.class,$.props&&$.props.class),b)),q=J(B,ue({},"".concat(l.value,"-").concat(O),O&&ut.test(O))),j,_;O&&!ut.test(O)&&(j={backgroundColor:O},_={"--antd-arrow-background-color":O});var ne=v(v(v({},r),e),{},{prefixCls:l.value,getPopupContainer:u.value,builtinPlacements:S.value,visible:V,ref:m,overlayClassName:q,overlayInnerStyle:j,onVisibleChange:g,onPopupAlign:E});return M(li,ne,{default:function(){return[f.value?ce($,{class:k}):$]},arrowContent:function(){return M("span",{class:"".concat(l.value,"-arrow-content"),style:_},null)},overlay:A})}}}),Pi=an(mi);export{ei as B,oi as T,Pi as a,vi as f,di as g,Ln as i,gi as t};