import{bF as c,c as h,b as S,m as g,t as _,d as r,ag as x,e as f,w as m,Z as v,a as i,k as C,r as D,y as b,S as k,R as y,C as P,F as T}from"./index-869d77fb.js";function B(e,n){const{days:s}=n;let{hours:t,minutes:a,seconds:l,milliseconds:u}=n;if(e.includes("DD")?e=e.replace("DD",c(s)):t+=s*24,e.includes("HH")?e=e.replace("HH",c(t)):a+=t*60,e.includes("mm")?e=e.replace("mm",c(a)):l+=a*60,e.includes("ss")?e=e.replace("ss",c(l)):u+=l*1e3,e.includes("S")){const o=c(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[H,F]=h("count-down"),M={time:S(0),format:g("HH:mm:ss"),autoStart:_,millisecond:Boolean};var N=r({name:H,props:M,emits:["change","finish"],setup(e,{emit:n,slots:s}){const{start:t,pause:a,reset:l,current:u}=x({time:+e.time,millisecond:e.millisecond,onChange:w=>n("change",w),onFinish:()=>n("finish")}),o=f(()=>B(e.format,u.value)),d=()=>{l(+e.time),e.autoStart&&t()};return m(()=>e.time,d,{immediate:!0}),v({start:t,pause:a,reset:d}),()=>i("div",{role:"timer",class:F()},[s.default?s.default(u.value):o.value])}});const R=C(N),O="_wxPopupDialog_k3dc3_1",W="_popupContainer_k3dc3_16",Z="_title1_k3dc3_24",A="_popupTips_k3dc3_31",E="_button_k3dc3_38",p={wxPopupDialog:O,popupContainer:W,title1:Z,popupTips:A,button:E},U=r({name:"m-wx-tip",props:{show:{type:Boolean,default:!0},title:{type:String,default:"温馨提示"},message:{type:String,default:"请使用微信打开"},showButton:{type:Boolean,default:!1},buttonText:{type:String,default:"确定"}},emits:["confirm"],setup(e,{emit:n}){const s=D(!1);return b(()=>{if(!k().weixin&&e.show){s.value=!0;return}}),m(()=>[e.show,e.message],()=>{e.show?s.value=!0:s.value=!1}),()=>i(T,null,[i(y,{show:s.value,"onUpdate:show":t=>s.value=t,round:!0,style:{width:"70%",maxWidth:"520px"},closeOnClickOverlay:!1,class:p.wxPopupDialog},{default:()=>[i("div",{class:p.popupContainer},[i("p",{class:p.title1},[e.title]),i("p",{class:p.popupTips},[e.message]),e.showButton&&i(P,{round:!0,class:p.button,onClick:()=>n("confirm")},{default:()=>[e.buttonText]})])]})])}});export{R as C,U as M};