System.register(["./index-legacy.sLMPZLm9.js","./index-legacy.DjPCm-Xr.js","./_getTag-legacy.CG1mexpa.js","./useState-legacy.VsKoz4di.js"],(function(e,t){"use strict";var o,a,n,r,l,s,i,u,c,d,p,v,m,f,b,g,y,h,w;return{setters:[e=>{o=e.Z,a=e.l,n=e.d,r=e.h,l=e.o,s=e.k,i=e.W,u=e.g,c=e.i,d=e.w,p=e.D},e=>{v=e.g,m=e.p,f=e.f,b=e.j,g=e.b},e=>{y=e.w,h=e.l},e=>{w=e.u}],execute:function(){const t=e=>{const{componentCls:t,colorPrimary:o}=e;return{[t]:{position:"absolute",background:"transparent",pointerEvents:"none",boxSizing:"border-box",color:`var(--wave-color, ${o})`,boxShadow:"0 0 0 0 currentcolor",opacity:.2,"&.wave-motion-appear":{transition:[`box-shadow 0.4s ${e.motionEaseOutCirc}`,`opacity 2s ${e.motionEaseOutCirc}`].join(","),"&-active":{boxShadow:"0 0 0 6px currentcolor",opacity:0}}}}},x=v("Wave",(e=>[t(e)]));function C(e){return e&&"#fff"!==e&&"#ffffff"!==e&&"rgb(255, 255, 255)"!==e&&"rgba(255, 255, 255, 1)"!==e&&function(e){const t=(e||"").match(/rgba?\((\d*), (\d*), (\d*)(, [\d.]*)?\)/);return!(t&&t[1]&&t[2]&&t[3]&&t[1]===t[2]&&t[2]===t[3])}(e)&&!/rgba\((?:\d*, ){3}0\)/.test(e)&&"transparent"!==e}function E(e){return Number.isNaN(e)?0:e}const T=n({props:{target:m(),className:String},setup(e){const t=r(null),[n,u]=w(null),[c,d]=w([]),[p,v]=w(0),[m,f]=w(0),[b,g]=w(0),[h,x]=w(0),[T,N]=w(!1);function R(){const{target:t}=e,o=getComputedStyle(t);u(function(e){const{borderTopColor:t,borderColor:o,backgroundColor:a}=getComputedStyle(e);return C(t)?t:C(o)?o:C(a)?a:null}(t));const a="static"===o.position,{borderLeftWidth:n,borderTopWidth:r}=o;v(a?t.offsetLeft:E(-parseFloat(n))),f(a?t.offsetTop:E(-parseFloat(r))),g(t.offsetWidth),x(t.offsetHeight);const{borderTopLeftRadius:l,borderTopRightRadius:s,borderBottomLeftRadius:i,borderBottomRightRadius:c}=o;d([l,s,c,i].map((e=>E(parseFloat(e)))))}let S,L,$;const j=()=>{clearTimeout($),y.cancel(L),null==S||S.disconnect()},W=()=>{var e;const a=null===(e=t.value)||void 0===e?void 0:e.parentElement;a&&(o(null,a),a.parentElement&&a.parentElement.removeChild(a))};l((()=>{j(),$=setTimeout((()=>{W()}),5e3);const{target:t}=e;t&&(L=y((()=>{R(),N(!0)})),"undefined"!=typeof ResizeObserver&&(S=new ResizeObserver(R),S.observe(t)))})),s((()=>{j()}));const k=e=>{"opacity"===e.propertyName&&W()};return()=>{if(!T.value)return null;const o={left:`${p.value}px`,top:`${m.value}px`,width:`${b.value}px`,height:`${h.value}px`,borderRadius:c.value.map((e=>`${e}px`)).join(" ")};return n&&(o["--wave-color"]=n.value),a(i,{appear:!0,name:"wave-motion",appearFromClass:"wave-motion-appear",appearActiveClass:"wave-motion-appear",appearToClass:"wave-motion-appear wave-motion-appear-active"},{default:()=>[a("div",{ref:t,class:e.className,style:o,onTransitionend:k},null)]})}}});function N(e,t){const n=u();let r;return s((()=>{null==r||r()})),function(){var l;const s=f(n);null==r||r(),!(null===(l=null==t?void 0:t.value)||void 0===l?void 0:l.disabled)&&s&&(r=function(e,t){const n=document.createElement("div");return n.style.position="absolute",n.style.left="0px",n.style.top="0px",null==e||e.insertBefore(n,null==e?void 0:e.firstChild),o(a(T,{target:e,className:t},null),n),()=>{o(null,n),n.parentElement&&n.parentElement.removeChild(n)}}(s,e.value))}}e("W",n({compatConfig:{MODE:3},name:"Wave",props:{disabled:Boolean},setup(e,t){let{slots:o}=t;const a=u(),{prefixCls:n,wave:r}=b("wave",e),[,i]=x(n),v=N(c((()=>g(n.value,i.value))),r);let m;const y=()=>{f(a).removeEventListener("click",m,!0)};return l((()=>{d((()=>e.disabled),(()=>{y(),p((()=>{const t=f(a);null==t||t.removeEventListener("click",m,!0),t&&1===t.nodeType&&!e.disabled&&(m=e=>{"INPUT"===e.target.tagName||!h(e.target)||!t.getAttribute||t.getAttribute("disabled")||t.disabled||t.className.includes("disabled")||t.className.includes("-leave")||v()},t.addEventListener("click",m,!0))}))}),{immediate:!0,flush:"post"})})),s((()=>{y()})),()=>{var e;return null===(e=o.default)||void 0===e?void 0:e.call(o)[0]}}}))}}}));
