import{aO as p,c as m,b as h,m as S,t as g,d as r,ai as _,e as D,w as v,X as x,a as i,k as C,r as P,y as f,R as y,V as H,F as T}from"./index-5a763f46.js";function O(e,s){const{days:t}=s;let{hours:n,minutes:a,seconds:l,milliseconds:u}=s;if(e.includes("DD")?e=e.replace("DD",p(t)):n+=t*24,e.includes("HH")?e=e.replace("HH",p(n)):a+=n*60,e.includes("mm")?e=e.replace("mm",p(a)):l+=a*60,e.includes("ss")?e=e.replace("ss",p(l)):u+=l*1e3,e.includes("S")){const o=p(u,3);e.includes("SSS")?e=e.replace("SSS",o):e.includes("SS")?e=e.replace("SS",o.slice(0,2)):e=e.replace("S",o.charAt(0))}return e}const[k,F]=m("count-down"),b={time:h(0),format:S("HH:mm:ss"),autoStart:g,millisecond:Boolean};var N=r({name:k,props:b,emits:["change","finish"],setup(e,{emit:s,slots:t}){const{start:n,pause:a,reset:l,current:u}=_({time:+e.time,millisecond:e.millisecond,onChange:w=>s("change",w),onFinish:()=>s("finish")}),o=D(()=>O(e.format,u.value)),d=()=>{l(+e.time),e.autoStart&&n()};return v(()=>e.time,d,{immediate:!0}),x({start:n,pause:a,reset:d}),()=>i("div",{role:"timer",class:F()},[t.default?t.default(u.value):o.value])}});const M=C(N),B="_wxPopupDialog_1sfd3_1",V="_popupContainer_1sfd3_16",A="_title1_1sfd3_22",E="_popupTips_1sfd3_29",c={wxPopupDialog:B,popupContainer:V,title1:A,popupTips:E},R=r({name:"m-wx-tip",props:{show:{type:Boolean,default:!0},title:{type:String,default:"温馨提示"},message:{type:String,default:"请使用微信打开"}},setup(e){const s=P(!1);return f(()=>{if(!y().weixin&&e.show){s.value=!0;return}}),()=>i(T,null,[i(H,{show:s.value,"onUpdate:show":t=>s.value=t,round:!0,style:{width:"88%"},closeOnClickOverlay:!1,class:c.wxPopupDialog},{default:()=>[i("div",{class:c.popupContainer},[i("p",{class:c.title1},[e.title]),i("p",{class:c.popupTips},[e.message])])]})])}});export{M as C,R as O};
