PageSourceSearch

https://wei.city/_nuxt/CHpr6s8h.js

js wei.city collected 2026-09-24 14:38:08 UTC 4,510 bytes, 1 lines download raw bytes

1import{_ as T}from"./nYV3oLWA.js";import{r as D}from"./C1sFeeWI.js";import{aR as N,cL as r,aB as n,aw as c,cv as m,dD as a,ay as o,ax as C,aI as _,at as i,a1 as I}from"./BQpWByWK.js";const x={key:0,class:"wc-vsheet",role:"dialog","aria-modal":"true"},B=["aria-label"],L={class:"wc-vsheet__title"},U={key:0,class:"wc-vsheet__channel"},V={class:"wc-vsheet__qrwrap"},q=["innerHTML"],z={key:1,class:"wc-vsheet__stamp"},F={class:"wc-vsheet__code-label"},H={class:"wc-vsheet__code wc-num"},S={key:2,class:"wc-vsheet__time wc-num"},K={key:3,class:"wc-vsheet__offer"},M={key:5,class:"wc-vsheet__terms"},Z={key:6,class:"wc-vsheet__actions"},G=["href"],A=["href"],E={key:7,class:"wc-vsheet__hint"},P=N({__name:"DealVoucherSheet",props:{voucher:{}},emits:["close"],setup(t,{emit:k}){const u=t,f=k,w=i(()=>{const e=(u.voucher?.qrUrl||"").trim();return e?D(e,{ecc:"M",border:1,whiteColor:"#ffffff",blackColor:"#0b1220"}):""});function b(e){if(!e)return"";const s=new Date(e);if(Number.isNaN(s.getTime()))return"";const l={year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1};try{return new Intl.DateTimeFormat(void 0,{...l,timeZone:u.voucher?.dealTimeZoneId||"Asia/Kuala_Lumpur"}).format(s)}catch{return new Intl.DateTimeFormat(void 0,l).format(s)}}const g=i(()=>{switch(u.voucher?.status){case"redeemed":return"voucher.status_redeemed";case"invalid":return"voucher.status_invalid";case"expired":return"voucher.status_expired";case"upcoming":return"voucher.status_upcoming";case"pending_payment":return"voucher.status_pending_payment";case"void":return"voucher.status_void";case"refunded":return"voucher.status_refunded";default:return"voucher.status_active"}}),d=i(()=>{const e=u.voucher?.status||"";return e==="active"||e==="upcoming"}),y=i(()=>{switch(u.voucher?.status){case"redeemed":return"voucher.note_redeemed";case"expired":return"voucher.note_expired";case"void":return"voucher.note_void";case"refunded":return"voucher.note_refunded";case"invalid":return"voucher.note_invalid";default:return""}}),p=i(()=>b(u.voucher?.redeemDeadlineUtc)),v=i(()=>{const e=u.voucher?.channelGeo;return!e||!Number.isFinite(e.lat)||!Number.isFinite(e.lng)?"":`https://www.google.com/maps/dir/?api=1&destination=${e.lat},${e.lng}`}),h=i(()=>{const e=(u.voucher?.channelPhone||"").trim();return e?`tel:${e}`:""});return(e,s)=>{const l=T;return t.voucher?(r(),n("div",x,[c("div",{class:"wc-vsheet__backdrop",onClick:s[0]||(s[0]=$=>f("close"))}),c("div",{class:m(["wc-vsheet__panel",{"is-spent":!d.value}])},[c("button",{type:"button",class:"wc-vsheet__close","aria-label":e.$t("common.close"),onClick:s[1]||(s[1]=$=>f("close"))},[...s[2]||(s[2]=[c("i",{class:"fa-solid fa-xmark","aria-hidden":"true"},null,-1)])],8,B),c("span",{class:m(["wc-vsheet__chip",`is-${t.voucher.status}`])},a(e.$t(g.value)),3),c("h3",L,a(t.voucher.dealTitle),1),t.voucher.channelName?(r(),n("p",U,a(t.voucher.channelName),1)):o("",!0),c("div",V,[w.value?(r(),n("div",{key:0,class:"wc-vsheet__qr",innerHTML:w.value},null,8,q)):o("",!0),t.voucher.status==="redeemed"?(r(),n("span",z,a(e.$t("voucher.status_redeemed")),1)):o("",!0)]),c("p",F,a(e.$t("voucher.code_label")),1),c("p",H,a(t.voucher.codeDisplay),1),d.value&&t.voucher.redeemDeadlineUtc?(r(),C(l,{key:1,class:"wc-vsheet__cd","ends-at-utc":t.voucher.redeemDeadlineUtc,variant:"banner",label:e.$t("voucher.redeem_by"),"time-zone-id":t.voucher.dealTimeZoneId},null,8,["ends-at-utc","label","time-zone-id"])):o("",!0),p.value?(r(),n("p",S,[s[3]||(s[3]=c("i",{class:"fa-regular fa-clock","aria-hidden":"true"},null,-1)),_(" "+a(e.$t("voucher.deadline_at",{time:p.value})),1)])):o("",!0),t.voucher.offerText?(r(),n("p",K,a(t.voucher.offerText),1)):o("",!0),y.value?(r(),n("p",{key:4,class:m(["wc-vsheet__notice",`is-${t.voucher.status}`])},a(e.$t(y.value)),3)):o("",!0),t.voucher.terms?(r(),n("p",M,a(t.voucher.terms),1)):o("",!0),v.value||h.value?(r(),n("div",Z,[v.value?(r(),n("a",{key:0,class:"wc-vsheet__act",href:v.value,target:"_blank",rel:"noopener noreferrer"},[s[4]||(s[4]=c("i",{class:"fa-solid fa-diamond-turn-right","aria-hidden":"true"},null,-1)),_(" "+a(e.$t("nearby.directions")),1)],8,G)):o("",!0),h.value?(r(),n("a",{key:1,class:"wc-vsheet__act",href:h.value},[s[5]||(s[5]=c("i",{class:"fa-solid fa-phone","aria-hidden":"true"},null,-1)),_(" "+a(e.$t("voucher.call_merchant")),1)],8,A)):o("",!0)])):o("",!0),d.value?(r(),n("p",E,a(e.$t("voucher.show_to_merchant_v2")),1)):o("",!0)],2)])):o("",!0)}}}),O=I(P,[["__scopeId","data-v-aba6cd07"]]);export{O as _};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.