const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["js/index144.js?v=1763625242172","js/page_layout.js?v=1763625242172","js/vue.js?v=1763625242172","js/__commonjsHelpers__.js?v=1763625242172","js/naive.js?v=1763625242172","js/common.js?v=1763625242172","js/public.js?v=1763625242172","css/public.css?v=1763625242172","css/page_layout.css?v=1763625242172","css/index70.css?v=1763625242172"])))=>i.map(i=>d[i]);
import{k as e,a0 as a,R as t,S as o,U as s,H as n,V as r,c as p,a2 as u,X as l,j as c,u as i,aq as d,r as m,e as x,a4 as _,an as v,_ as f}from"./vue.js?v=1763625242172";import{u as b,p as h,bG as g,bH as y,a as C,c as k}from"./page_layout.js?v=1763625242172";import{b as q,u as j}from"./public.js?v=1763625242172";import{dd as w,d_ as P}from"./naive.js?v=1763625242172";const R=h(e({__name:"index",props:{source:{type:Number,default:27}},setup(e){const{isPro:p}=a(b()),u=()=>{q({source:e.source})};return(e,a)=>(t(),o("div",{class:n(["pro-badge",{pro:r(p)}]),onClick:u},a[0]||(a[0]=[s("i",{class:"i-common:pro text-14px color-white"},null,-1),s("span",{class:"text"},"PRO",-1)]),2))}}),[["__scopeId","data-v-2e4cedc1"]]);function S(e){return"function"==typeof e||"[object Object]"===Object.prototype.toString.call(e)&&!i(e)}const z=e({__name:"time",props:{endtime:{default:0}},emits:["finish"],setup(e,{emit:a}){const o=e,s=a,n=p((()=>{const e=Date.now(),a=1e3*o.endtime;return Math.max(0,a-e)})),i=e=>e.toString().padStart(2,"0"),d=({hours:e,minutes:a,seconds:t})=>{let o,s,n,r;const p=Math.floor(e/24);return e%=24,l("div",{class:"inline-flex items-center"},[p>0?l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(o=i(p))?o:{default:()=>[o]}):"",p>0?l("span",{class:"mx-4px"},[c(":")]):"",l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(s=i(e))?s:{default:()=>[s]}),l("span",{class:"mx-4px"},[c(":")]),l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(n=i(a))?n:{default:()=>[n]}),l("span",{class:"mx-4px"},[c(":")]),l(w,{type:"error",size:"small",class:"px-2px h-20px",bordered:!1},S(r=i(t))?r:{default:()=>[r]})])},m=()=>{o.endtime>0&&s("finish")};return(e,a)=>{const o=g;return t(),u(o,{duration:r(n),render:d,"on-finish":m},null,8,["duration"])}}}),I={class:"text-pro"},O={key:0,class:"font-bold"},H={key:1,class:"flex items-center"},$={class:"mr-6px"},D=h(e({__name:"index",props:{arrowPlacement:{type:String,default:"right"}},setup(e){const u=y(),{showCoupon:c,receiveCoupon:i}=a(u),{width:b}=d(),h=m([]),g=p((()=>h.value.length)),w=p((()=>0===g.value?0:h.value[g.value-1].deduct_amount)),R=x({quota:0,total:0,received:0}),S=()=>{1!==i.value.status?i.value.total>0&&q({source:176}):j({width:400,bgColor:"transparent",data:{obtainId:i.value.obtain_id,endTime:i.value.end_time,couponQuota:R,couponList:h.value,onReceive:()=>{q({source:176})}},component:f((()=>C((()=>import("./index144.js?v=1763625242172")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]))))})};return(async()=>{const e=await u.getReceiveCoupon();k(e)&&(P(e.coupons,"deduct_amount"),h.value=e.coupons,e.package_quota&&(R.quota=e.package_quota.quota,R.total=e.package_quota.total,R.received=e.package_quota.total-e.package_quota.quota))})(),(a,p)=>r(c)?(t(),o("div",{key:0,class:n(["coupon-box",e.arrowPlacement]),onClick:S},[p[0]||(p[0]=s("div",{class:"coupon-logo"},null,-1)),s("div",I,[1===r(i).status?(t(),o("div",O,_(r(b)>1500?a.$t("Component.Coupon.index_11",[r(w)]):a.$t("Component.Coupon.index_12",[r(g)])),1)):r(i).total>0?(t(),o("div",H,[s("span",$,_(a.$t("Component.Coupon.index_4")),1),l(z,{endtime:r(i).end_time},null,8,["endtime"])])):v("",!0)])],2)):v("",!0)}}),[["__scopeId","data-v-f507497a"]]);export{D as H,R as P};
