PageSourceSearch

https://member.ufabet888.red/assets/1789559418326/D51M6ip6.js

js ufabet888.red collected 2026-10-06 13:18:06 UTC 58,019 bytes, 1 lines download raw bytes

1import{_ as at}from"./B48F4MML.js";import{x as de,d as q,f as i,a as n,F as N,g as C,b as e,t as d,h as t,at as Ot,v as H,M as We,n as Ce,S as te,aj as rt,r as a,l as ge,o as ne,c as ce,w as _e,e as S,V as Wt,H as fe,B as T,P as oe,K as ve,L as Ve,Y as he,a7 as Vt,I as J,A as Nt,p as X,J as ke,aC as At,G,a2 as Fe,aD as Gt,a0 as qt,Q as De,_ as ct,q as Ht,W as zt,a3 as dt,aa as Kt,aE as Yt,u as Qt,D as Zt,aF as Jt,E as tt,a9 as ye,ac as Xt,X as es,an as ts,R as st,al as ot}from"./zGN25SIG.js";import{_ as nt}from"./BK-wbo4x.js";import{C as je}from"./qF8I_tPr.js";import{_ as Ne}from"./BmwrrxPv.js";import{_ as $e}from"./_W7IREBl.js";import{u as Ae,_ as ss,a as os}from"./BuAYzzXT.js";import{_ as ns}from"./B_rfAPYF.js";import{_ as is}from"./CivJAmq1.js";import{v as ut}from"./BKT09osN.js";import"./CTTOQ1fF.js";import"./DxzWTJS2.js";const it=de("/images/ucoin/icn-uc-prize-effect.png?v=1"),ls=de("/images/ucoin/icn-uc-prize.webp?v=1"),as=de("/images/ucoin/icn-uc-no-prize.webp?v=2"),rs=de("/images/ucoin/uc-confetti.gif?v=1"),cs=de("/images/ucoin/uc-reward-bg.webp?v=1"),ds=de("/images/ucoin/uc-no-reward-bg.webp"),us={key:0,class:"absolute",src:rs},ms={class:"relative pt-[30%]"},ps={key:0,class:"flex items-center justify-center mx-auto"},fs={class:"absolute bottom-[20px] flex flex-col gap-4 items-center justify-center w-full"},vs={class:"text-[#202020] text-xl font-semibold"},hs=["innerHTML"],gs={class:"flex flex-row items-center justify-center w-full"},bs={class:"text-3xl text-[#000] font-medium"},xs={key:1,class:"flex items-center justify-center mx-auto"},ws={class:"absolute bottom-[20%] flex flex-col items-center justify-center w-full"},ys={class:"text-[#202020] text-xl font-semibold"},_s=["innerHTML"],ks=q({__name:"UCoinRewardPopup",props:{ucoin:{default:"0"},withReward:{type:Boolean,default:!1}},emits:["submitButtonClick"],setup(f,{emit:m}){const o=m,u=Ot(()=>{o("submitButtonClick",{btn:"submit"})},500);return(s,l)=>(n(),i(N,null,[s.withReward?(n(),i("img",us)):C("",!0),e("div",ms,[s.withReward?(n(),i("div",ps,[l[3]||(l[3]=e("img",{class:"w-[85%]",src:cs,alt:"ucoin reward-bg"},null,-1)),e("div",fs,[e("div",vs,d(s.$t("ucoin.rewardDialog.title")),1),e("div",{class:"w-[65%] text-[#8D6B3C] text-sm",innerHTML:s.$t("ucoin.rewardDialog.desc",{coin:`<span class='font-bold'>${s.ucoin}</span>`,uCoinTextCSS:`<span class='font-bold'>${s.$t("menu.uCoin")}</span>`})},null,8,hs),e("div",gs,[l[2]||(l[2]=e("img",{class:"w-[32px] mr-2",src:$e,alt:"ucoin icon"},null,-1)),e("span",bs,"+"+d(s.ucoin),1)]),e("div",null,[e("button",{class:"uc-reward-btn text-sm font-medium btn-click-animation",onClick:l[0]||(l[0]=(...p)=>t(u)&&t(u)(...p))},d(s.$t("ucoin.button.collectReward")),1)])])])):(n(),i("div",xs,[l[4]||(l[4]=e("img",{class:"w-[85%]",src:ds,alt:"ucoin reward-bg"},null,-1)),e("div",ws,[e("div",ys,d(s.$t("ucoin.noRewardDialog.title")),1),e("div",{class:"pt-4 w-[60%] text-[#8D6B3C] text-sm",innerHTML:s.$t("ucoin.noRewardDialog.desc",{coin:`<span class='font-bold'>${s.ucoin}</span>`,uCoinTextCSS:`<span class='font-bold'>${s.$t("menu.uCoin")}</span>`})},null,8,_s)]),e("button",{class:"uc-no-reward-btn absolute bottom-8 text-sm font-medium btn-click-animation",onClick:l[1]||(l[1]=(...p)=>t(u)&&t(u)(...p))},d(s.$t("ucoin.button.noReward")),1)]))])],64))}}),Cs=Object.assign(H(ks,[["__scopeId","data-v-eed5f6bc"]]),{__name:"UCoinRewardPopup"}),$s={class:"checkin-container relative"},Rs={key:1,class:"rank-tag absolute left-0 top-0"},Ss={class:"flex flex-cols justify-center items-center"},Is={class:"text-[#FCDD9A] text-xs ml-2 opacity-1"},Bs={key:3,class:"flex justify-center items-center"},Ls={key:4,class:"flex flex-col justify-center items-center"},Fs={class:"text-[#FFF] text-[26px] flex flex-row"},Ds={key:1,class:"h-[18px]"},Us={key:2},Ms={key:0,class:"flex justify-center items-center relative"},Ts={key:1,class:"flex justify-center items-center relative"},Ps={key:3,class:"flex justify-center items-center text-center pb-6"},Es={class:"text-sm w-[70%] text-[#FBDEB2]"},js={class:"flex justify-center items-center"},Os=["disabled"],Ws=q({__name:"CheckIn",setup(f){const m=We(),o=Ce(),{ucoinDisplay:u,expiringUcoin:s,ucoinExpiringInfo:l}=te(o),p=Ae(),{submitCheckInRes:h,myCheckInInfoList:g}=te(p),_=rt(),{myRank:w}=te(_),v=a(""),{t:b,locale:k}=ge(),I=a(!0),$=a(!1),y=a(!1),B=a(!1),L=a(!1),M=a(!1),F=a(0);async function K(){await Promise.all([p.getCheckInInfoRequest(),_.getMyRank(!0)]),v.value=w.value?.playerRankName||"bronze",await E()}const E=async()=>{$.value=g.value?.enable||!1,y.value=g.value?.enableCheckBtn||!1,B.value=g.value?.isCheckInToday||!1,I.value=!1},ee=async()=>{try{y.value&&(M.value=!0,y.value=!1,F.value=0,await p.submitCheckInInfoRequest(),h.value&&(F.value=h.value?.coin||0,L.value=!0,await E())
1)}catch{}finally{y.value=!1,M.value=!1}},W=async()=>{await E(),L.value=!1},ie=async()=>{await m.push({path:"/"+oe.REWARDS_HISTORY,query:{tab:"allHistory"}})};return ne(async()=>{await K()}),(ue,j)=>{const me=Wt,be=Ne;return n(),i("div",$s,[L.value?(n(),ce(me,{key:0,"with-top-margin":!1},{default:_e(()=>[S(Cs,{ucoin:F.value,"with-reward":F.value>0,onSubmitButtonClick:W},null,8,["ucoin","with-reward"])]),_:1})):C("",!0),v.value?(n(),i("div",Rs,d(v.value),1)):C("",!0),I.value?C("",!0):(n(),i("div",{key:2,class:"absolute right-0 top-6 cursor-pointer uc-history",onClick:ie},[e("div",Ss,[e("div",Is,d(t(b)("menu.submenu.history")),1),j[0]||(j[0]=e("div",{class:"ml-1"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",width:"7",height:"8",viewBox:"0 0 7 8",fill:"none"},[e("path",{d:"M6.5 3.13397C7.16667 3.51887 7.16667 4.48113 6.5 4.86603L2 7.4641C1.33333 7.849 0.5 7.36788 0.5 6.59808L0.5 1.40192C0.5 0.632124 1.33333 0.150998 2 0.535898L6.5 3.13397Z",fill:"#FCDD9A"})])],-1))])])),I.value?(n(),i("div",Bs,[S(be,{class:"w-[64px]"})])):C("",!0),I.value?C("",!0):(n(),i("div",Ls,[j[4]||(j[4]=e("div",{class:"mt-4"},null,-1)),e("div",Fs,[j[1]||(j[1]=e("img",{class:"w-[32px] mr-2",src:$e,alt:"ucoin icon"},null,-1)),fe(" "+d(t(u)==="0.00"?"0":t(u)),1)]),(n(),i("div",Ds)),$.value?(n(),i("div",Us,[y.value?(n(),i("div",Ms,j[2]||(j[2]=[e("img",{class:"absolute max-w-[130px] max-h-[170px] z-0 prize-effect-animation",src:it,alt:"ucoin prize icon"},null,-1),e("img",{class:"max-w-[88px] max-h-[103px] z-10 prize-animation",src:ls,alt:"ucoin prize icon"},null,-1)]))):(n(),i("div",Ts,j[3]||(j[3]=[e("img",{class:"absolute max-w-[130px] max-h-[170px] z-0",src:it,alt:"ucoin prize icon"},null,-1),e("img",{class:"max-w-[88px] max-h-[103px] z-10 pb-4",src:as,alt:"ucoin prize icon"},null,-1)])))])):(n(),i("div",Ps,[e("div",Es,d(t(b)("info.emptyCheckInInfo")),1)])),e("div",js,[e("button",{class:T(["",y.value?"checkin-btn btn-click-animation":"checkin-btn-disabled text-dim"]),disabled:!y.value,onClick:ee},d(M.value?"Please wait...":y.value?t(b)("btn.checkinNow"):t(b)("btn.checkinToday")),11,Os)]),j[5]||(j[5]=e("div",{class:"mt-4"},null,-1))]))])}}}),Vs=Object.assign(H(Ws,[["__scopeId","data-v-b91e9c33"]]),{__name:"CheckIn"}),Ns=de("/images/ucoin/icn-uc-prize.webp"),As={key:0,class:"ucoin-modal-mask"},Gs=q({__name:"UcoinModalContainer",props:{isOpen:{type:Boolean,default:!1},contentClass:{default:""},clickOutsideToClose:{type:Boolean,default:!0}},emits:["close"],setup(f,{emit:m}){const o=f,u=m,s=()=>{o.clickOutsideToClose&&u("close")};return ve(()=>o.isOpen,l=>{l?document.body.classList.add("overflow-hidden"):document.body.classList.remove("overflow-hidden")}),Ve(()=>{document.body.classList.remove("overflow-hidden")}),(l,p)=>l.isOpen?(n(),i("div",As,[e("div",{class:"ucoin-modal-wrapper",onClick:he(s,["self","stop"])},[e("div",{class:T(["ucoin-modal-content",l.contentClass])},[Vt(l.$slots,"default",{},void 0,!0)],2)])])):C("",!0)}}),mt=Object.assign(H(Gs,[["__scopeId","data-v-12556be5"]]),{__name:"UcoinModalContainer"}),qs={class:"free-ticket-modal-inner"},Hs={class:"modal-header flex items-center justify-between p-4 border-b border-[#fdd38722]"},zs={class:"text-[#FDD387] font-semibold text-lg"},Ks={class:"p-4"},Ys={key:0,class:"flex flex-col"},Qs={class:"ticket-list max-h-[60vh] overflow-y-auto w-full pr-1"},Zs={class:"relative w-32 overflow-hidden mr-4 shrink-0"},Js=["src"],Xs={class:"flex-1 min-w-0"},eo={class:"text-white font-medium text-sm truncate mb-1"},to={class:"text-gray-400 text-[12px] mb-2 flex items-center"},so=["disabled","onClick"],oo={key:0,class:"text-gray-500 py-12 text-center text-sm"},no={key:1,class:"flex flex-col items-center pt-6"},io={class:"w-48 rounded-lg overflow-hidden mb-4 shadow-2xl"},lo=["src"],ao={class:"text-[#FDD387] text-lg font-bold mb-1"},ro={class:"text-sm text-gray-300 text-center px-4 mb-8"},co={class:"flex gap-4 w-full"},uo={key:2,class:"flex flex-col items-center pt-6"},mo={key:0,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},po={key:1,xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},fo={key:0,class:"text-white text-xl font-bold mb-2"},vo={key:1,class:"text-sm text-gray-400 text-center mb-8"},ho={key:3,class:"absolute inset-0 z-50 flex items-center justify-center bg-[#1a1a1acc] backdrop-blur-sm"},go=q({__name:"FreeTicketModal",props:{isOpen:{type:Boolean},tickets:{}},emits:["close","redeem"],setup(f,{expose:m,emit:o}){const{t:u}=ge(),s=f,l=o,p=a("LIST"),h=a(null),g=a(!1),_=a(""),w=a(""),v=a(!1),b=()=>{p.value="LIST",v.value=!1,l("close")},k=B=>{h.value=B,p.value="CONFIRM"},I=()=>{h.value&&(v.value=!0,l("redeem",h.value.ticketId))},$=(B,L)=>{v.value=!1,g.value=B,_.value=B?u("info.success","Success"):u("info.failed","Failed"),w.value=L,p.value="RESULT"},y=B=>{B.target.src=X("/images/ucoin/icn-img-not-found.png")};return m({showResult:$,closeModal:b}),ve(()=>s.isOpen,B=>{B&&(p.value="LIST")}),(B,L)=>{const M=Ne;return n(),ce(mt,{"is-open":B.isOpen,onClose:b},{default:_e(()=>[e("div",qs,[e("div",Hs,[e("div",zs,d(t(p)==="LIST"?t(u)("ucoin.freeTickets.title","Free Tickets"):t(p)==="CONFIRM"?t(u)("btn.confirm","Confirm"):t(u)("btn.result","Result")),1),e("button",{class:"p-2 -mr-2 text-gray-400 hover:text-white transition-colors",onClick:he(b,["stop"])},L[2]||(L[2]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"}
1)],-1)]))]),e("div",Ks,[t(p)==="LIST"?(n(),i("div",Ys,[e("div",Qs,[(n(!0),i(N,null,J(B.tickets,F=>(n(),i("div",{key:F.ticketId,class:"ticket-item flex items-center p-3 mb-3 rounded-lg bg-[#ffffff05] border border-[#ffffff11] hover:bg-[#ffffff0a] transition-all"},[e("div",Zs,[e("img",{src:F.ticketImageUrl,class:"w-full h-full object-cover",alt:"Ticket",onError:y},null,40,Js)]),e("div",Xs,[e("div",eo,d(F.ticketTitle),1),e("div",to,[L[3]||(L[3]=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-3 w-3 mr-1",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M12 8v4l3 3m6-3a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),e("span",null,d(t(u)("membership.uTicket.expire",{date:t(Nt)(F.validTo).format("DD MMM YYYY HH:mm")})),1)]),e("button",{class:T(["h-9 px-5 rounded-md min-w-[100px] text-xs font-bold transition-all",{"bg-gradient-to-r from-[#eec276] to-[#efd0a0] text-black active:scale-95":F.ticketStatus==="NEW","bg-[#444] text-gray-400 cursor-not-allowed":F.ticketStatus!=="NEW"}]),disabled:F.ticketStatus!=="NEW",onClick:he(K=>k(F),["stop"])},d(t(u)(`membership.uTicket.status.${F.ticketStatus}`)),11,so)])]))),128)),B.tickets.length===0?(n(),i("div",oo,[L[4]||(L[4]=e("div",{class:"mb-2"},"📭",-1)),fe(" "+d(t(u)("info.noResultRewardRedemption")),1)])):C("",!0)])])):t(p)==="CONFIRM"?(n(),i("div",no,[e("div",io,[e("img",{src:t(h)?.ticketImageUrl,class:"w-full h-full object-cover",alt:"Ticket",onError:y},null,40,lo)]),e("div",ao,d(t(u)("info.confirmRedemption")),1),e("div",ro,d(t(h)?.ticketTitle),1),e("div",co,[e("button",{class:"flex-1 h-12 rounded-lg border border-[#fdd38755] text-[#FDD387] text-sm font-bold active:scale-95 transition-all",onClick:L[0]||(L[0]=F=>p.value="LIST")},d(t(u)("btn.cancel")),1),e("button",{class:"flex-1 h-12 rounded-lg bg-gradient-to-r from-[#eec276] to-[#efd0a0] text-black text-sm font-bold active:scale-95 transition-all",onClick:I},d(t(u)("btn.yes")),1)])])):t(p)==="RESULT"?(n(),i("div",uo,[e("div",{class:T(["w-20 h-20 flex items-center justify-center rounded-md mb-4 shadow-lg",t(g)?"bg-green-500/20 text-green-500":"bg-red-500/20 text-red-500"])},[t(g)?(n(),i("svg",mo,L[5]||(L[5]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)]))):(n(),i("svg",po,L[6]||(L[6]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"},null,-1)])))],2),t(_)?(n(),i("div",fo,d(t(_)),1)):C("",!0),t(w)?(n(),i("div",vo,d(t(w)),1)):C("",!0),e("button",{class:"w-full h-12 rounded-lg bg-gradient-to-r from-[#eec276] to-[#efd0a0] text-black text-sm font-bold active:scale-95 transition-all",onClick:L[1]||(L[1]=F=>p.value="LIST")},d(t(u)("btn.OK")),1)])):C("",!0),t(v)?(n(),i("div",ho,[S(M,{class:"w-16 h-16"})])):C("",!0)])])]),_:1},8,["is-open"])}}}),bo=Object.assign(H(go,[["__scopeId","data-v-2e68f444"]]),{__name:"FreeTicketModal"}),xo={class:"flex items-center"},wo={class:"flex flex-col"},yo={class:"text-[#FDD387] text-sm font-bold leading-tight"},_o={class:"text-gray-400 text-[12px] mt-0.5"},ko={class:"flex items-center"},Co={class:"bg-red-600 text-white text-[12px] font-bold px-2 py-0.5 rounded-full border border-white/20 mr-3"},$o=q({__name:"FreeTicketBanner",setup(f){const m=a([]),o=a(0),u=a(0),s=a(!1),l=a(!1),p=a(null),{t:h}=ge(),g=async()=>{l.value=!0;const k=await ke.getUCoinFreeTicketAvailableCount();k.succ&&k.data&&(o.value=k.data.availableCount),l.value=!1},_=async()=>{l.value=!0;const k=await ke.getUCoinFreeTicketList();k.succ&&k.data&&(m.value=k.data.items,u.value=k.data.totalRecord,o.value=k.data.availableCount),l.value=!1},w=async k=>{const I=await ke.redeemUCoinFreeTicket(k);if(I.succ&&I.data?.success){let $=I.data?.reward?.externalUrl;if($){$=$.replace("http://","https://"),(!$.startsWith("http")||!$.startsWith("https"))&&($=`https://${$}`),p.value?.showResult(!0,h("membership.uTicket.redeemSuccess","Ticket redeemed successfully")),window.open($,"_blank");return}else p.value?.showResult(!0,h("membership.uTicket.redeemSuccess","Ticket redeemed successfully"))}else p.value?.showResult(!1,I.msg||h("membership.uTicket.redeemFailed","Redeem failed"));_()},v=async()=>{l.value=!0;try{await _(),s.value=!0}catch{s.value=!1}finally{l.value=!1}},b=()=>{s.value=!1};return ne(()=>{g()}),(k,I)=>t(o)>0?(n(),i("div",{key:0,class:"free-ticket-banner-container cursor-pointer flex items-center justify-between p-4 mb-4 rounded-lg bg-gradient-to-r from-[#2a2a2a] to-[#141414] border border-[#fdd38733] shadow-lg",onClick:v},[e("div",xo,[I[0]||(I[0]=e("div",{class:"relative w-12 h-12 flex items-center justify-center rounded-full bg-[#1a1a1a] border border-[#fdd38733] mr-4 shrink-0"},[e("img",{src:Ns,class:"w-8 h-auto object-contain",alt:"Free Tickets"}
1)],-1)),e("div",wo,[e("span",yo,d(t(h)("ucoin.freeTickets.title","Free Tickets")),1),e("span",_o,d(t(h)("ucoin.freeTickets.desc","You have free tickets to redeem")),1)])]),e("div",ko,[e("div",Co,d(t(o)),1),I[1]||(I[1]=e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-5 w-5 text-[#FDD387]",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M9 5l7 7-7 7"})],-1))]),S(bo,{ref_key:"ticketModalRef",ref:p,"is-open":t(s),tickets:t(m),onClose:b,onRedeem:w},null,8,["is-open","tickets"])])):C("",!0)}}),Ro=Object.assign(H($o,[["__scopeId","data-v-51e9dd39"]]),{__name:"FreeTicketBanner"}),So={class:"flex items-center text-[12px] min-h-[54px] rounded-xl bg-[#00000080]"},Io=["type","value","disabled","placeholder","maxlength"],Bo=q({__name:"TextInput",props:{disabled:{type:Boolean,default:!1},inputValue:{default:""},inputType:{default:""},placeholder:{default:""},maxLength:{default:30}},emits:["update:inputValue","enter","blur"],setup(f,{emit:m}){const o=m,u=f;function s(h){const g=h.target;u.maxLength&&g.value.length>u.maxLength&&(g.value=g.value.slice(0,u.maxLength)),o("update:inputValue",g.value)}function l(h){const g=h.target;o("enter",g.value)}function p(h){const g=h.target;o("blur",g.value)}return(h,g)=>(n(),i("div",So,[e("input",{type:u.inputType,value:u.inputValue,disabled:u.disabled,placeholder:u.placeholder,maxlength:u.maxLength,oninput:"javascript: if (this.value.length > this.maxLength) this.value = this.value.slice(0, this.maxLength);",class:"block w-full px-4 bg-transparent border-none focus:outline-none text-[12px] text-[#FBDEB2] placeholder-[#FBDEB2] placeholder-opacity-50 disabled:opacity-50",onInput:s,onKeyup:At(l,["enter"]),onBlur:p},null,40,Io)]))}}),Le=Object.assign(Bo,{__name:"TextInput"}),Lo={class:"relative w-full"},Fo={class:"flex-1 truncate"},Do={key:0},Uo={key:1,class:"text-[#FBDEB2] opacity-60"},Mo={key:0,class:"absolute z-[100] mt-1 w-full bg-[#1a1a1a] border border-[#FBDEB2] border-opacity-30 rounded-md shadow-xl overflow-hidden"},To={class:"p-2 border-b border-[#FBDEB2] border-opacity-10"},Po=["placeholder"],Eo={class:"max-h-60 overflow-y-auto py-1 custom-scrollbar"},jo=["onClick"],Oo={key:0,class:"px-3 py-2 text-sm text-gray-500"},Wo=q({__name:"AddressSelect",props:{modelValue:{},options:{},placeholder:{},disabled:{type:Boolean}},emits:["update:modelValue","change"],setup(f,{emit:m}){const o=f,u=m,s=a(!1),l=a(""),p=a(null),h=G(()=>{if(!l.value)return o.options;const v=l.value.toLowerCase();return o.options.filter(b=>b.name_th?.toString().toLowerCase().includes(v))});function g(){o.disabled||(s.value=!s.value,s.value&&(l.value="",qt(()=>{p.value?.focus()})))}function _(v){u("update:modelValue",v.name_th),u("change",v),s.value=!1}const w=v=>{v.target.closest(".relative")||(s.value=!1)};return ne(()=>{document.addEventListener("click",w)}),Ve(()=>{document.removeEventListener("click",w)}),ve(()=>o.options,()=>{l.value=""}),(v,b)=>(n(),i("div",Lo,[e("div",{class:T(["mt-1 flex items-center w-full px-3 py-2 bg-inherit border border-[#FBDEB2] border-opacity-50 ring-1 ring-[#FBDEB2] ring-opacity-50 rounded-md text-sm shadow-sm text-[#FFF] cursor-pointer",{"opacity-50 cursor-not-allowed":v.disabled}]),onClick:g},[e("div",Fo,[v.modelValue?(n(),i("span",Do,d(v.modelValue),1)):(n(),i("span",Uo,d(v.placeholder),1))]),(n(),i("svg",{xmlns:"http://www.w3.org/2000/svg",class:T(["h-4 w-4 ml-2 text-[#FBDEB2] transition-transform duration-200",{"rotate-180":s.value}]),fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},b[2]||(b[2]=[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)]),2))],2),s.value?(n(),i("div",Mo,[e("div",To,[Fe(e("input",{ref_key:"searchInput",ref:p,"onUpdate:modelValue":b[0]||(b[0]=k=>l.value=k),type:"text",class:"w-full px-2 py-1 bg-[#2a2a2a] border border-[#FBDEB2] border-opacity-20 rounded text-sm text-white focus:outline-none focus:border-opacity-50",placeholder:v.$t("btn.search"),onClick:b[1]||(b[1]=he(()=>{},["stop"]))},null,8,Po),[[Gt,l.value]])]),e("ul",Eo,[(n(!0),i(N,null,J(h.value,k=>(n(),i("li",{key:k.id,class:"px-3 py-2 text-sm text-white hover:bg-[#FBDEB2] hover:bg-opacity-10 cursor-pointer transition-colors",onClick:I=>_(k)},d(k.name_th),9,jo))),128)),h.value.length===0?(n(),i("li",Oo,d(v.$t("info.noData")),1)):C("",!0)])])):C("",!0)]))}}),Oe=Object.assign(H(Wo,[["__scopeId","data-v-f24789f0"]]),{__name:"AddressSelect"}),Vo={class:"redemption-request-inner"},No={class:"modal-header flex items-center justify-between p-4 border-b border-[#fdd38722]"},Ao={class:"text-[#FDD387] font-semibold text-lg"},Go={class:"p-4 max-h-[70vh] overflow-y-auto input-wrapper"},qo={key:0,class:"redemption-request-container"},Ho={key:1},zo={class:"flex flex-col items-center pt-6"},Ko={class:"text-white text-xl font-bold mb-2"},Yo={class:"text-sm text-gray-400 text-center mb-4"},Qo={key:0,class:"text-xs text-gray-500 mb-8"},Zo={key:2},Jo={class:"relative flex flex-row items-center mb-6 p-3 rounded-xl bg-[#ffffff05] border border-[#ffffff11]"},Xo={class:"bg-[#010000] rounded-lg w-[80px] h-[80px] flex items-center justify-center overflow-hidden shrink-0"},en=["src"],tn={class:"flex flex-col justify-center ml-4 flex-1"},sn={class:"text-sm font-medium text-white mb-2"},on={class:"flex items-center"},nn={class:"text-[#FDD387] font-bold"},ln={class:"space-y-4"},an={class:"text-gray-400 text-xs mb-1.5 ml-1"},rn={key:0,class:"text-red-500 text-[12px] ml-1"},cn={class:"text-gray-400 text-xs mb-1.5 ml-1"},dn={key:0,class:"text-red-500 text-[12px] ml-1"},un={class:"text-gray-400 text-xs mb-1.5 ml-1"},mn={class:"grid grid-cols-2 gap-4"},pn={class:"text-gray-400 text-xs mb-1.5 ml-1"},fn={class:"text-gray-400 text-xs mb-1.5 ml-1"},vn={class:"grid grid-cols-2 gap-4"},hn={class:"text-gray-400 text-xs mb-1.5 ml-1"},gn={class:"text-gray-400 text-xs mb-1.5 ml-1"},bn={class:"mt-8"},xn=q({__name:"RedemptionRequest",props:{id:{},title:{},description:{},img:{},point:{},soldOut:{type:Boolean},isRedeem:{type:Boolean},rewardId:{}},emits:["close"],setup(f,{emit:m}){const o=f,{displayFullName:u}=te(Ce()),{t:s}=ge(),l=a(""),p=a(""),h=a(""),g=a(""),_=a(""),w=a(""),v=a(""),b=a(""),k=a([]),I=a([]),$=a([]),y=G(()=>{if(!v.value)return[];const R=k.value.find(x=>x.name_th===v.value);return R?I.value.filter(x=>x.province_id===R.id):[]}),B=G(()=>{if(!w.value)return[];const R=I.value.find(x=>x.name_th===w.value);return R?$.value.filter(x=>x.district_id===R.id):[]}),L=a(s("btn.OK")),M=a(s("info.congratulation")),F=a(s("info.succRedeemReward")+" "+s("shipping.shippingDayInfo")),K=a(""),E=a(!1),ee=a(!1);a("");const W=a("");ne(()=>{ie()});async function ie(){l.value=u.value;try{const[x,z,U]=await Promise.all([fetch("/address/provinces.json").then(Q=>Q.json()),fetch("/address/districts.json").then(Q=>Q.json()),fetch("/address/sub_districts.json").then(Q=>Q.json())]);k.value=x,I.value=z,$.value=U}catch{}const R=await ke.getProfile();R.succ&&(p.value=R.user?.phoneCountryCode??"",h.value=R.user?.phoneNumber??"",setTimeout(()=>{window.scrollTo({top:0,behavior:"smooth"})},1e3))}function ue(){w.value="",_.value="",b.value=""}function j(){_.value="",b.value=""}function me(R){R&&R.zip_code&&(b.value=R.zip_code.toString())}function be(R){R.target.src=X("/images/ucoin/icn-img-not-found.png")}function pe(){W.value="",l.value?h.value?g.value?v.value?b.value?E.value=!0:(W.value=s("error.enterPostcode"),window.scrollTo({top:9999,behavior:"smooth"})):(W.value=s("error.enterProvince"),window.scrollTo({top:9999,behavior:"smooth"})):(W.value=s("error.enterAddress"),window.scrollTo({top:9999,behavior:"smooth"})):(W.value=s("error.enterPhoneNumber"),window.scrollTo({top:9999,behavior:"smooth"})):(W.value=s("error.enterFullName"),window.scrollTo({top:9999,behavior:"smooth"}))}function le(R){R.btn==="cancel"&&(E.value=!1)}async function Re(R){if(R.btn==="submit"){const x=ut(),z=await ke.redeemRewardRedemption(Number(o.rewardId),x,p.value,h.value,g.value,_.value,w.value,v.value,b.value);if(z.succ){const U=z.data;K.value=`Reference ID: ${U?.data?.txId||U?.txId||""}`,E.value=!1,ee.value=!0}else W.value=z.msg??"",E.value=!1}}function se(R){E.value=!1,ee.value=!1,E.value=!1,window.location.reload()}return(R,x)=>{const z=is;return n(),i("div",Vo,[e("div",No,[e("div",Ao,d(ee.value?t(s)("btn.result"):E.value?t(s)("info.confirmInformation"):t(s)("ucoin.redemptionRequest.title","Redemption Request")),1),e("button",{class:"p-2 -mr-2 text-gray-400 hover:text-white transition-colors",onClick:x[0]||(x[0]=he(U=>R.$emit("close"),["stop"]))},x[9]||(x[9]=[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-6 w-6",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),e("div",Go,[E.value?(n(),i("div",qo,[S(ss,{fullname:l.value,"phone-number":h.value,address:g.value,"sub-district":_.value,district:w.value,province:v.value,"postal-code":b.value,"btn-label":t(s)("btn.confirm"),"btn-label2":t(s)("btn.edit"),title:"","redeemed-date":void 0,"product-name":void 0,"product-status":void 0,"product-trx-no":void 0,"scroll-to-top":void 0,coin:void 0,"status-type":void 0,"shipping-vendor":void 0,"shipping-tracking-number":void 0,onCancelButtonClick:le,onSubmitButtonClick:Re},null,8,["fullname","phone-number","address","sub-district","district","province","postal-code","btn-label","btn-label2"])])):ee.value?(n(),i("div",Ho,[e("div",zo,[x[10]||(x[10]=e("div",{class:"w-20 h-20 flex items-center justify-center rounded-full mb-4 shadow-lg bg-green-500/20 text-green-500"},[e("svg",{xmlns:"http://www.w3.org/2000/svg",class:"h-10 w-10",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"})])],-1)),e("div",Ko,d(M.value),1),e("div",Yo,d(F.value),1),K.value?(n(),i("div",Qo,d(K.value),1)):C("",!0),e("button",{class:"w-full h-12 rounded-lg bg-gradient-to-r from-[#eec276] to-[#efd0a0] text-black text-sm font-bold active:scale-95 transition-all",onClick:x[1]||(x[1]=U=>
1se())},d(L.value),1)])])):(n(),i("div",Zo,[e("div",Jo,[e("div",Xo,[e("img",{class:"w-full h-full object-cover",src:R.img??t(X)("/images/ucoin/icn-img-not-found.png"),alt:"",onError:be},null,40,en)]),e("div",tn,[e("div",sn,d(R.title),1),e("div",on,[x[12]||(x[12]=e("img",{class:"w-4 h-4 mr-1.5",src:$e,alt:""},null,-1)),e("div",nn,[fe(d(R.point)+" ",1),x[11]||(x[11]=e("span",{class:"text-[12px] font-normal text-gray-400 uppercase ml-0.5"},"coins",-1))])])])]),e("div",ln,[e("div",null,[e("div",an,d(t(s)("user.fullName")),1),S(Le,{"input-value":l.value,"onUpdate:inputValue":x[2]||(x[2]=U=>l.value=U),"input-type":"text",disabled:!0,class:"!bg-[#ffffff08]"},null,8,["input-value"]),l.value?C("",!0):(n(),i("small",rn,d(t(s)("ucoin.redemptionRequest.supportMsg")),1))]),e("div",null,[e("div",cn,d(t(s)("user.phoneNumber")),1),S(Le,{"input-value":h.value,"onUpdate:inputValue":x[3]||(x[3]=U=>h.value=U),"input-type":"text",disabled:!0,class:"!bg-[#ffffff08]"},null,8,["input-value"]),h.value?C("",!0):(n(),i("small",dn,d(t(s)("ucoin.redemptionRequest.supportMsg")),1))]),e("div",null,[e("div",un,d(t(s)("user.address")),1),S(Le,{"input-value":g.value,"onUpdate:inputValue":x[4]||(x[4]=U=>g.value=U),"input-type":"text","max-length":100,placeholder:t(s)("ucoin.redemptionRequest.placeholder.address")},null,8,["input-value","placeholder"])]),e("div",mn,[e("div",null,[e("div",pn,d(t(s)("user.province")),1),S(Oe,{modelValue:v.value,"onUpdate:modelValue":x[5]||(x[5]=U=>v.value=U),options:k.value,placeholder:t(s)("ucoin.redemptionRequest.placeholder.province"),onChange:ue},null,8,["modelValue","options","placeholder"])]),e("div",null,[e("div",fn,d(t(s)("user.district")),1),S(Oe,{modelValue:w.value,"onUpdate:modelValue":x[6]||(x[6]=U=>w.value=U),options:t(y),placeholder:t(s)("ucoin.redemptionRequest.placeholder.district"),disabled:!v.value,onChange:j},null,8,["modelValue","options","placeholder","disabled"])])]),e("div",vn,[e("div",null,[e("div",hn,d(t(s)("user.subDistrict")),1),S(Oe,{modelValue:_.value,"onUpdate:modelValue":x[7]||(x[7]=U=>_.value=U),options:t(B),placeholder:t(s)("ucoin.redemptionRequest.placeholder.subDistrict"),disabled:!w.value,onChange:me},null,8,["modelValue","options","placeholder","disabled"])]),e("div",null,[e("div",gn,d(t(s)("user.postalCode")),1),S(Le,{"input-value":b.value,"onUpdate:inputValue":x[8]||(x[8]=U=>b.value=U),"input-type":"text","max-length":100,placeholder:t(s)("ucoin.redemptionRequest.placeholder.postalCode")},null,8,["input-value","placeholder"])])])]),W.value?(n(),ce(z,{key:0,msg:W.value,type:"error",class:"mt-4"},null,8,["msg"])):C("",!0),e("div",bn,[e("button",{class:"w-full h-12 rounded-lg bg-gradient-to-r from-[#eec276] to-[#efd0a0] text-black text-sm font-bold active:scale-95 transition-all shadow-lg",onClick:pe},d(t(s)("btn.redeem")),1)])]))])])}}}),wn=Object.assign(H(xn,[["__scopeId","data-v-7a5e5a62"]]),{__name:"RedemptionRequest"}),yn={class:"p-6"},_n={class:"relative flex flex-row p-4"},kn={class:"mx-2 bg-[#010000] rounded-md w-[82px] h-[81px] flex items-center justify-center"},Cn=["src"],$n={class:"flex flex-col justify-center w-[70%]"},Rn={class:"text-xs text-[#F5F5F5]"},Sn={class:"redemption-item-point text-xs flex mt-2"},In={class:"self-center text-[#FFF] text-nowrap"},Bn={class:"rank-container flex flex-row items-center mt-1"},Ln=["src"],Fn={key:0,class:"mx-4 mt-4 text-xs text-[#FFF] max-h-[280px] overflow-auto pb-4"},Dn=["innerHTML"],Un={class:"flex gap-3 px-4 pb-4"},Mn={__name:"ConfirmDialog",props:{btnRedirectRoute:{type:String,default:""},btnLabel:{type:String,default:""},btnLabel2:{type:String,default:""},btnLabelDisable:{type:Boolean,default:!1},btnLabel2Disable:{type:Boolean,default:!1},htmlContent:{type:String,default:""},title:{type:String,default:""},img:{type:String,default:""},point:{type:String,default:""},ranksWithLogos:{type:Array,default:()=>[]},scrollToTop:{type:Boolean,default:!0}},emits:["submitButtonClick","cancelButtonClick"],setup(f,{emit:m}){const{showMobileLayout:o}=De(),u=f,s=m;ne(()=>{document.body.classList.toggle("overflow-hidden",!0),u.scrollToTop&&window.scrollTo({top:0,behavior:"smooth"})}),Ve(()=>{document.body.classList.toggle("overflow-hidden",!1)});function l(){s("submitButtonClick",{btn:"submit"})}function p(){s("cancelButtonClick",{btn:"cancel"})}function h(g){g.target.src=X("/images/ucoin/icn-img-not-found.png")}return(g,_)=>{const w=ct;return n(),i("div",yn,[e("div",{class:T(["custom-dialog-container mx-6 relative",{"mx-auto max-w-[396px]":t(o)}])},[e("div",_n,[e("div",kn,[e("img",{class:"p-1",src:f.img??("getPublicUrl"in g?g.getPublicUrl:t(X))("/images/ucoin/icn-img-not-found.png"),alt:"",onError:h}
1,null,40,Cn)]),e("div",$n,[e("div",Rn,d(f.title),1),e("div",Sn,[_[0]||(_[0]=e("img",{class:"w-[15px] mx-1",src:$e,alt:""},null,-1)),e("div",In,d(f.point)+" coins",1)]),e("div",Bn,[(n(!0),i(N,null,J(f.ranksWithLogos,v=>(n(),i("div",{key:v.playerRankId},[e("img",{class:"h-[26px] rounded-md",src:v.rankLogoSrc,alt:""},null,8,Ln)]))),128))])])]),_[1]||(_[1]=e("div",{class:"flex justify-center"},[e("div",{class:"px-4 dot-line"})],-1)),f.htmlContent?(n(),i("div",Fn,[e("div",{innerHTML:f.htmlContent},null,8,Dn)])):C("",!0),e("div",Un,[f.btnLabel2?(n(),ce(w,{key:0,class:"flex-1",variant:"cancel",label:f.btnLabel2,disabled:f.btnLabel2Disable,onClick:p},null,8,["label","disabled"])):C("",!0),f.btnLabel?(n(),ce(w,{key:1,class:"flex-1",variant:"primary",label:f.btnLabel,disabled:f.btnLabelDisable,onClick:l},null,8,["label","disabled"])):C("",!0)])],2)])}}},Tn=H(Mn,[["__scopeId","data-v-5491282d"]]);var Pn=[{id:"2",name:"Default",isSelected:!1,type:"default"},{id:"3",name:"Lowest Coins",isSelected:!1,type:"lowestpoint"},{id:"4",name:"Highest Coins",isSelected:!1,type:"highestpoint"}];const En={class:"flex flex-row items-center mt-2 mb-2"},jn={class:"mx-2 flex flex-1"},On=["src"],Wn={key:0,class:"mx-2"},Vn=["src"],Nn={__name:"UcoinCustomDropDown",props:{label:{type:String,default:""},labelColor:{type:String,default:""},labelSize:{type:String,default:""},labelIconPath:{type:String,default:""},labelIconWidth:{type:String,default:""},actionIconPath:{type:String,default:""},actionIconRotated:{type:Boolean,default:!1},showBoxBorder:{type:Boolean,default:!0},containerStyle:{type:String,default:"1"},highlightBorder:{type:Boolean,default:!1}},emits:["update:inputValue"],setup(f,{emit:m}){const{showMobileLayout:o}=De();return(u,s)=>(n(),i("div",{class:T([t(o)?"h-[34px]":"h-[48px] w-[170px]","custom-dropdown-container flex flex-row justify-between items-center cursor-pointer"]),style:Ht(f.highlightBorder?"border: 1px solid #FBDEB2;":"border: 1px solid #555;")},[e("div",En,[e("div",jn,[e("div",{class:T([f.labelIconWidth?f.labelIconWidth:"w-8 h-8","rounded-lg bg-white/5 flex items-center justify-center overflow-hidden flex-shrink-0"])},[f.labelIconPath?(n(),i("img",{key:0,class:"w-full h-full object-contain",src:f.labelIconPath,alt:"icn-crypto"},null,8,On)):C("",!0)],2)]),f.label?(n(),i("div",{key:0,class:T([f.labelColor||"text-[#FDD387]",f.labelSize||"text-xs"])},d(f.label),3)):C("",!0)]),f.actionIconPath?(n(),i("div",Wn,[e("img",{class:T(["w-[13px] h-[13px] action-icon",{"action-icon--rotated":f.actionIconRotated}]),src:f.actionIconPath,alt:"icn"},null,10,Vn)])):C("",!0)],6))}},An=H(Nn,[["__scopeId","data-v-616009ba"]]),Gn={key:0,class:"flex text-[#FBDEB2] text-sm mx-2 py-2 overflow-x-auto whitespace-nowrap"},qn={key:0,class:"tab-title"},Hn=["onClick"],zn={key:0,class:"tab-title"},Kn=q({__name:"RedemptionFilter",props:{categories:{},activeCategory:{}},emits:["select"],setup(f){const{t:m}=ge();return(o,u)=>o.categories&&o.categories.items?(n(),i("div",Gn,[e("div",{class:T(["cursor-pointer redemption-tab",o.activeCategory!=="ALL"?"opacity-50 redemption-tab--unselected":""]),onClick:u[0]||(u[0]=s=>o.$emit("select","ALL"))},[fe(d(t(m)("ucoin.all"))+" ",1),o.activeCategory==="ALL"?(n(),i("div",qn)):C("",!0)],2),(n(!0),i(N,null,J(o.categories.items,s=>(n(),i("div",{key:s.categoryCode},[e("div",{class:T(["cursor-pointer ml-6 capitalize redemption-tab",o.activeCategory!==s.categoryCode?"opacity-50 redemption-tab--unselected":""]),onClick:l=>o.$emit("select",s.categoryCode)},[fe(d(s.label)+" ",1),o.activeCategory===s.categoryCode?(n(),i("div",zn)):C("",!0)],10,Hn)]))),128))])):C("",!0)}}),Yn=Object.assign(H(Kn,[["__scopeId","data-v-76a8e110"]]),{__name:"RedemptionFilter"}),Qn=["id"],Zn=["src"],Jn={class:"flex flex-col flex-1"},Xn={class:"flex flex-row justify-between items-center"},ei={class:"max-w-[230px] text-xs text-[#F5F5F5] truncate"},ti={class:"flex justify-between items-center mt-2"},si={class:"redemption-item-point text-xs flex"},oi={class:"self-center text-[#FFF] text-nowrap"},ni={key:0},ii={key:1},li={class:"text-[12px] text-[#D9D9D9] mr-1"},ai=["innerHTML"],ri={class:"flex justify-between items-center mt-2"},ci={class:"rank-container flex flex-row items-center"},di=["src"],ui={key:0,class:"text-[#FBDEB2] text-xs text-right"},mi={key:1,class:"text-[#FBDEB2] text-xs text-right"},pi={key:2,class:"text-[#FBDEB2] text-xs text-right"},fi={__name:"RedemptionItem",props:{id:{type:Number,default:0},title:{type:String,default:""},redeemStatusCode:{type:String,default:""},stocks:{type:Number,default:0},img:{type:String,default:""},point:{type:String,default:""},soldOut:{type:Boolean,default:!1},canRedeem:{type:Boolean,default:!1},isPhysicalItem:{type:Boolean,default:!1},tnc:{type:String,default:""},rewardId:{type:Number,default:null},pointWithoutFormat:{type:Number,default:0},remainingPerUser:{type:Number,default:0},ranksWithLogos:{type:Array,default:()=>[]},isUnlimitedPerUser:{type:Boolean,default:!1},isUnlimitedPerSystem:{type:Boolean,default:!1},isSupportMultipleGames:{type:Boolean,default:!1},games:{type:Array,default:()=>[]}},emits:["redeemButtonClick","rewardDetailClick"],setup(f,{emit:m}){const o=f,u=m;G(()=>!!(o.isUnlimitedPerUser&&o.remainingPerUser===0));const s=G(()=>o.soldOut?0:o.isPhysicalItem?o.remainingPerUser?o.stocks<=o.remainingPerUser?o.stocks:o.remainingPerUser:o.stocks:o.remainingPerUser),l=G(()=>o.canRedeem),p=G(()=>o.soldOut);function h(){u("redeemButtonClick",{id:o.id,canRedeem:o.canRedeem,img:o.img,title:o.title,point:o.point,description:o.description,isPhysicalItem:o.isPhysicalItem,tnc:o.tnc,rewardId:o.rewardId,pointWithoutFormat:o.pointWithoutFormat,remainingPerUser:o.remainingPerUser,ranksWithLogos:o.ranksWithLogos,isUnlimitedPerUser:o.isUnlimitedPerUser,isUnlimitedPerSystem:o.isUnlimitedPerSystem,isSupportMultipleGames:o.isSupportMultipleGames,games:o.games})}function g(){u("rewardDetailClick",{btn:"submit",id:o.id,canRedeem:o.canRedeem,img:o.img,title:o.title,point:o.point,description:o.description,isPhysicalItem:o.isPhysicalItem,tnc:o.tnc,rewardId:o.rewardId,pointWithoutFormat:o.pointWithoutFormat,remainingPerUser:o.remainingPerUser,ranksWithLogos:o.ranksWithLogos,isUnlimitedPerUser:o.isUnlimitedPerUser,isUnlimitedPerSystem:o.isUnlimitedPerSystem,isSupportMultipleGames:o.isSupportMultipleGames,games:o.games})}function _(w){w.target.src=X("/images/ucoin/icn-img-not-found.png")}return(w,v)=>(n(),i("div",{id:`redeem-item-${f.id}`,class:"relative redemption-item-container flex flex-row justify-center p-2"},[e("div",{class:"cursor-pointer mr-2 bg-[#010000] rounded-md w-[82px] h-[81px] flex items-center justify-center",onClick:g},[e("img",{class:"p-1 w-[82px] h-[81px] object-scale-down",src:f.img??t(X)("/images/ucoin/icn-img-not-found.png"),alt:"",onError:_}
1,null,40,Zn)]),e("div",Jn,[e("div",Xn,[e("div",ei,d(f.title),1),e("div",{class:"cursor-pointer",onClick:g},v[0]||(v[0]=[e("img",{class:"h-[10px] mx-1",src:zt,alt:""},null,-1)]))]),e("div",ti,[e("div",si,[v[1]||(v[1]=e("img",{class:"w-[15px] mx-1",src:$e,alt:""},null,-1)),e("div",oi,[f.pointWithoutFormat>0?(n(),i("span",ni,d(f.point)+" coins",1)):(n(),i("span",ii,"Free"))])]),e("div",li,[fe(d(w.$t("info.remaining"))+" : ",1),e("div",{class:"inline-block",innerHTML:s.value},null,8,ai)])]),e("div",ri,[e("div",ci,[v[2]||(v[2]=e("div",{class:"ml-1"},null,-1)),(n(!0),i(N,null,J(f.ranksWithLogos,b=>(n(),i("div",{key:b.playerRankId},[e("img",{class:"h-[26px] rounded-md",src:b.rankLogoSrc,alt:""},null,8,di)]))),128))]),p.value?(n(),i("div",ui,d(w.$t("info.soldOut")),1)):f.redeemStatusCode==="CANNOT_REDEEM_INELIGIBLE_RANK"?(n(),i("div",mi,d(w.$t("info.rankNotEnough")),1)):f.redeemStatusCode==="CANNOT_REDEEM_NOT_ENOUGH_UCOIN"?(n(),i("div",pi,d(w.$t("info.coinNotEnough")),1)):(n(),i("div",{key:3,class:T(["w-[66px] h-[26px] flex justify-center items-center",l.value?"redemption-item-button":"redemption-item-button-disabled opacity-75"]),onClick:h},[e("div",{class:T([l.value?"text-[#674E2B]":"text-[#6B6B6B]","text-xs"])},d(w.$t("btn.redeem")),3)],2))])])],8,Qn))}},lt=H(fi,[["__scopeId","data-v-5bac7753"]]),vi={key:0,class:"flex flex-col items-center justify-center"},hi={class:"mt-4 text-xs text-[#F5F5F5] w-[50%] text-center"},gi={key:1,class:"flex flex-col justify-center p-2"},bi={class:"text-[#FBDEB2] text-sm font-bold mb-2 uppercase px-1"},xi=q({__name:"RedemptionList",props:{items:{},loading:{type:Boolean},activeCategory:{},groupedItems:{},emptyMessage:{}},emits:["redeem","rewardDetail"],setup(f){return(m,o)=>{const u=Ne;return n(),i("div",null,[Fe(S(u,{class:"w-[64px] mx-auto"},null,512),[[dt,m.loading]]),m.items.length===0?(n(),i("div",vi,[m.loading?C("",!0):(n(),i(N,{key:0},[o[4]||(o[4]=e("img",{class:"mt-4 opacity-50",src:os,alt:""},null,-1)),e("div",hi,d(m.emptyMessage),1)],64))])):(n(),i("div",gi,[m.activeCategory==="ALL"?(n(!0),i(N,{key:0},J(m.groupedItems,s=>(n(),i("div",{key:s.categoryCode,class:"flex flex-col mb-4"},[e("div",bi,d(s.label),1),(n(!0),i(N,null,J(s.items,l=>(n(),i("div",{key:l.id},[S(lt,{id:l.id,title:l.title,"redeem-status-code":l.redeemStatusCode,stocks:l.stocks,img:l.img,point:l.point,"sold-out":l.soldOut,"can-redeem":l.canRedeem,"is-physical-item":l.isPhysicalItem,tnc:l.tnc,"remaining-per-user":l.remainingPerUser,"reward-id":l.rewardId,"point-without-format":l.pointWithoutFormat,"ranks-with-logos":l.ranksWithLogos,"is-unlimited-per-system":l.isUnlimitedPerSystem,"is-unlimited-per-user":l.isUnlimitedPerUser,"is-support-multiple-games":l.isSupportMultipleGames,games:l.games,onRedeemButtonClick:o[0]||(o[0]=p=>m.$emit("redeem",p)),onRewardDetailClick:o[1]||(o[1]=p=>m.$emit("rewardDetail",p))},null,8,["id","title","redeem-status-code","stocks","img","point","sold-out","can-redeem","is-physical-item","tnc","remaining-per-user","reward-id","point-without-format","ranks-with-logos","is-unlimited-per-system","is-unlimited-per-user","is-support-multiple-games","games"]),o[5]||(o[5]=e("div",{class:"mb-3"},null,-1))]))),128))]))),128)):(n(!0),i(N,{key:1},J(m.items,s=>(n(),i("div",{key:s.id},[S(lt,{id:s.id,title:s.title,"redeem-status-code":s.redeemStatusCode,stocks:s.stocks,img:s.img,point:s.point,"sold-out":s.soldOut,"can-redeem":s.canRedeem,"is-physical-item":s.isPhysicalItem,tnc:s.tnc,"remaining-per-user":s.remainingPerUser,"reward-id":s.rewardId,"point-without-format":s.pointWithoutFormat,"ranks-with-logos":s.ranksWithLogos,"is-unlimited-per-system":s.isUnlimitedPerSystem,"is-unlimited-per-user":s.isUnlimitedPerUser,"is-support-multiple-games":s.isSupportMultipleGames,games:s.games,onRedeemButtonClick:o[2]||(o[2]=l=>m.$emit("redeem",l)),onRewardDetailClick:o[3]||(o[3]=l=>m.$emit("rewardDetail",l))},null,8,["id","title","redeem-status-code","stocks","img","point","sold-out","can-redeem","is-physical-item","tnc","remaining-per-user","reward-id","point-without-format","ranks-with-logos","is-unlimited-per-system","is-unlimited-per-user","is-support-multiple-games","games"]),o[6]||(o[6]=e("div",{class:"mb-3"},null,-1))]))),128)),o[7]||(o[7]=e("div",{class:"pb-[100px]"},null,-1))]))])}}}),wi=Object.assign(xi,{__name:"RedemptionList"}),yi={class:"text-center px-6 -mt-2 mb-4"},_i={class:"game-select-title"},ki={class:"game-select-subtitle mt-1"},Ci={class:"flex-1 overflow-auto px-6 pt-3 pb-[40px]"},$i={class:"game-select-grid"},Ri=["onClick"],Si={class:"game-banner-media"},Ii={key:0,class:"absolute inset-0 bg-white/10 animate-pulse"},Bi=["src","onLoad","onError"],Li={key:0,class:"game-banner-check",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 26 26",fill:"none"},Fi={class:"mx-6 mt-2 pb-6"},Di=q({__name:"GameSelectBottomModalSelector",props:{games:{}}
1,emits:["close","confirm"],setup(f,{emit:m}){const{showMobileLayout:o}=De(),u=f,s=m,l=a(!1),p=a(""),h=G(()=>(u.games??[]).filter(y=>!!y.gameCode)),g=y=>{p.value=y.gameCode};ve(h,y=>{const B=y[0];y.length===1&&B&&g(B)},{immediate:!0});const _=()=>{l.value=!1,setTimeout(()=>{s("close")},300)},w=()=>{_()},v=()=>{const y=h.value.find(B=>B.gameCode===p.value);y&&(l.value=!1,setTimeout(()=>{s("confirm",y)},300))},b=Kt({}),k=y=>!!b[y];function I(y){b[y]=!0}function $(y,B){y.target.src=X("/images/ucoin/icn-img-not-found.png"),b[B]=!0}return ne(()=>{setTimeout(()=>{l.value=!0},100)}),(y,B)=>{const L=ct;return n(),i(N,null,[e("div",{class:T(["game-select-overlay",{show:t(l)}]),onClick:he(w,["prevent"])},null,2),e("div",{class:T(["game-select-content",[{show:t(l)},{"mx-auto max-w-[436px]":t(o)}]])},[e("div",{class:"flex justify-end mx-6 mt-6"},[e("img",{class:"cursor-pointer",src:Yt,alt:"",onClick:_})]),e("div",yi,[e("div",_i,d(y.$t("info.chooseYourGame")),1),e("div",ki,d(y.$t("info.selectGameToApplyReward")),1)]),e("div",Ci,[e("div",$i,[(n(!0),i(N,null,J(t(h),M=>(n(),i("div",{key:M.gameCode,class:T(["game-banner",{selected:t(p)===M.gameCode}]),onClick:F=>g(M)},[e("div",Si,[k(M.gameCode)?C("",!0):(n(),i("div",Ii)),e("img",{class:T(["game-banner-img transition-opacity duration-200",{"opacity-0":!k(M.gameCode)}]),src:M.gameBannerPath,alt:"",onLoad:F=>I(M.gameCode),onError:F=>$(F,M.gameCode)},null,42,Bi)]),t(p)===M.gameCode?(n(),i("svg",Li,B[0]||(B[0]=[e("circle",{cx:"13",cy:"13",r:"13",fill:"#ECCA77"},null,-1),e("path",{d:"M20 9.65225C20 10.0898 19.8356 10.5128 19.5425 10.8228L12.2684 18.5154C11.6574 19.1615 10.6656 19.1615 10.0547 18.5154L6.42998 14.685C5.83545 14.0215 5.86011 12.9756 6.48751 12.3468C7.093 11.7384 8.04095 11.7413 8.6437 12.3468L11.1615 15.0095L17.3287 8.48459C17.9397 7.83847 18.9315 7.83847 19.5425 8.48459C19.8356 8.79461 20 9.21474 20 9.65225Z",fill:"black"},null,-1)]))):C("",!0)],10,Ri))),128))])]),e("div",Fi,[S(L,{variant:"primary",label:y.$t("btn.confirm"),disabled:!t(p),onClick:v},null,8,["label","disabled"])])],2)],64)}}}),Ui=Object.assign(H(Di,[["__scopeId","data-v-f6b8e38e"]]),{__name:"GameSelectBottomModalSelector"}),Mi={key:0,class:"redemption-container"},Ti={class:"flex justify-center items-center text-[#FBDEB2] p-2"},Pi={class:"mx-4 text-sm"},Ei={class:"flex justify-between mx-2"},ji={class:"relative w-[130px] z-10"},Oi={key:0,class:"drop-down-box mt-1 origin-top-right bg-[#1E1E1E] absolute left-0"},Wi={class:"flex flex-col my-2 text-nowrap"},Vi=["id","onClick"],Ni={key:1,class:"redemption-dialog"},Ai=q({__name:"Redemption",setup(f){const{t:m}=ge(),o=Ce(),u=a([]),s=a([]),l=G(()=>{if(R.value!=="ALL")return[];const r=[],c=new Map;return Me.value.items.forEach(P=>{c.set(P.categoryCode,{label:P.label,items:[]})}),s.value.forEach(P=>{const O=c.get(P.categoryCode);O&&O.items.push(P)}),c.forEach((P,O)=>{P.items.length>0&&r.push({categoryCode:O,label:P.label,items:P.items})}),r}),p=a(""),h=a("Default"),g=a(""),_=a(!1),w=a(!1),v=a(!1),b=a(!1),k=a(!1),I=a(!1),$=a(!1),y=a("success"),B=a(""),L=a(""),M=a(""),F=a(""),K=a(""),E=a(0),ee=a(""),W=a(""),ie=a(0),ue=a(""),j=a(!1),me=a(!1),be=a(0),pe=a(!1),le=a(0),Re=a([]),se=a(!1),R=a("ALL"),x=a(null),z=a(!1),U=a(!1),Q=a([]),Se=a(""),Ie=a(""),Ue=a(""),ae=Ae(),{isRefreshRewardRedemptionRequest:pt,
1isRewardRedeeming:ft,redeemRewardRes:Be,rewardCategoryList:Me,myRewardRedemptionList:Ge}=te(ae),vt=Ce(),{getUcoin:qe}=te(vt),He=G(()=>Be.value?.data?.data?.rewardType),ht=G(()=>{let r=Be.value?.data?.data?.externalUrl;return r&&(r=r.replace("http://","https://"),(!r.startsWith("http")||!r.startsWith("https"))&&(r=`https://${r}`)),r}),gt=rt(),{getRankListing:bt}=te(gt),xt=G(()=>se.value||pt.value||ft.value),wt=G(()=>Ge.value.items.length>0&&s.value.length===0?m("info.noResultRewardRedemption"):m("info.emptyRewardRedemption")),yt=pe;ne(async()=>{await kt(),await Ct()});const Te=Qt(),_t=We();async function kt(){await ze()}async function ze(){try{let{test:r}=Te.query;r?r=String(r):r="",se.value=!0,await Promise.all([ae.refreshRewardRedemptionCategoryList(r),ae.refreshRewardRedemptionRequest(R.value==="ALL"?"":R.value,r)])}catch{}finally{se.value=!1}}async function Ct(){const r=Te.query;if(r.redeemId){let c=parseInt(String(r.redeemId));const P=u.value.find(O=>O.id===c);P&&(await _t.replace({query:{}}),await Je(P))}}ve(()=>Ge.value,r=>{$t(r.items)});const $t=async(r=[])=>{u.value=r.map(c=>{const P=(c.ranks??[]).map(O=>{const V=bt.value[O.rankCode];return V?{...O,rankLogoSrc:V.rankLogoSrc}:null}).filter(O=>O!==null);return c.show?{id:c.id,title:c.title,redeemStatusCode:c.redeemStatusCode,soldOut:c.soldOut,img:c.imagePath,point:Zt(c.redeemCoin),pointWithoutFormat:c.redeemCoin,stocks:c.stock,tnc:c.tnc,rewardId:c.id,canRedeem:c.canRedeem,isPhysicalItem:c.isPhysicalItem,remainingPerUser:c.remainingPerUser,ranksWithLogos:P,isUnlimitedPerUser:c.isUnlimitedPerUser,isUnlimitedPerSystem:c.isUnlimitedPerSystem,maxPerUser:c.maxPerUser,maxPerSystem:c.maxPerSystem,categoryCode:c.categoryCode,rewardItemId:c.rewardItemId,isSupportMultipleGames:c.isSupportMultipleGames,games:c.games??[]}:null}).filter(c=>c!==null),s.value=u.value,await Pe(h.value,g.value)},Pe=async(r,c)=>{h.value=r,g.value=c,w.value=!1,_.value=!1;const P=(O,V)=>{const Y=new Map;O.forEach(A=>{const Z=A.rewardItemId||`single-${A.id}`;Y.has(Z)||Y.set(Z,[]),Y.get(Z).push(A)}),Y.forEach(A=>{A.sort((Z,xe)=>{const we=parseInt(Z.pointWithoutFormat)-parseInt(xe.pointWithoutFormat);return we!==0?we:Z.title.localeCompare(xe.title)})});const D=Array.from(Y.values());return D.sort((A,Z)=>{const xe=A[0],we=Z[0];if(V==="highestpoint"){const Ee=Math.max(...A.map(re=>parseInt(re.pointWithoutFormat)));return Math.max(...Z.map(re=>parseInt(re.pointWithoutFormat)))-Ee}else if(V==="lowestpoint"){const Ee=Math.min(...A.map(re=>parseInt(re.pointWithoutFormat))),et=Math.min(...Z.map(re=>parseInt(re.pointWithoutFormat)));return Ee-et}else return V==="popular"?we.title.localeCompare(xe.title):xe.title.localeCompare(we.title)}),D.flat()};if(R.value==="ALL"){const O=Me.value.items.map(D=>D.categoryCode),V=new Map;u.value.forEach(D=>{V.has(D.categoryCode)||V.set(D.categoryCode,[]),V.get(D.categoryCode).push(D)});let Y=[];O.forEach(D=>{const A=V.get(D);A&&(Y=Y.concat(P(A,c)))}),s.value=Y}else s.value=P(u.value,c)},Rt=async r=>{if(se.value||r===R.value)return!1;u.value=[],s.value=[],se.value=!0;try{let{test:c}=Te.query;c?c=String(c):c="",r!==R.value&&(R.value=r,await ae.refreshRewardRedemptionRequest(r==="ALL"?"":r,c),await Pe(h.value,g.value))}catch{}finally{se.value=!1}},St=async()=>{p.value=""},Ke=async()=>{await Ye(),k.value=!1},It=async r=>{r.btn==="submit"&&(await Ye(),b.value=!1)};async function Ye(){if(le.value>qe.value){I.value=!0;return}if(j.value)v.value=!0,b.value=!1,ae.updateIsHideCheckInSection(!0);else{const r=ut();if(await ae.redeemRewardRedemption(ie.value,r,void 0,void 0,void 0,void 0,void 0,void 0,void 0,Se.value||void 0,Ie.value||void 0),Be.value?.succ)y.value="success",L.value=m("info.congratulation"),M.value=m("info.succRedeemReward"),$.value=!0;else{let c=Be.value?.msg||"";c==="Daily Claims Per User Exceeded"?c=m("info.failedRewardDailyClaimsPerUserExceeded"):c=m("info.failedRedeemReward"),y.value="error",L.value=m("membership.uTicket.redeemFailed"),M.value=c,$.value=!0}}await ze()}const Qe=()=>{v.value=!1,b.value=!1,ae.updateIsHideCheckInSection(!1)},Bt=async()=>{k.value=!1},Lt=async()=>{w.value=!1,_.value=!1};function Ft(r){return!x.value?.contains(r.target)}const Dt=async()=>{w.value=!w.value,_.value=!_.value},Ut=()=>{let r=ht.value,c=He.value;$.value=!1,c&&["game","ucoin-sportsbook"].includes(c)&&r&&window.open(r,"_blank"),o.refreshBalance()},Mt=async r=>{r.btn==="cancel"&&(b.value=!1)},Tt=async r=>{r.btn==="submit"&&(Ze(r),b.value=!0)};
1function Ze(r){F.value=r.img,K.value=r.title,E.value=r.point,ee.value=r.description,W.value=r.tnc.replace(/(?:\r\n|\r|\n)/g,"<br>"),ie.value=r.rewardId,ue.value=String(r.id??r.rewardId),j.value=r.isPhysicalItem,me.value=r.soldOut??!1,be.value=r.remainingPerUser,le.value=r.pointWithoutFormat,pe.value=r.canRedeem,Re.value=r.ranksWithLogos,U.value=!!r.isSupportMultipleGames,Q.value=r.games??[];const c=Q.value[0];!U.value&&Q.value.length===1&&c?(Se.value=c.gameCode,Ie.value=c.platform):(Se.value="",Ie.value=""),Ue.value="",B.value=m("info.confirmRedeemItemWithPoint",{item:K.value,point:E.value})}const Je=async r=>{if(r.canRedeem){if(Ze(r),le.value>0&&le.value>qe.value){I.value=!0;return}if(U.value){z.value=!0;return}await Xe()}};async function Xe(){le.value>0?k.value=!0:await Ke()}const Pt=async r=>{Se.value=r.gameCode,Ie.value=r.platform,Ue.value=r.gameBannerPath,z.value=!1,await Xe()},Et=()=>{z.value=!1},jt=async()=>{I.value=!1};return ve(()=>p.value,r=>{s.value=u.value.filter(c=>c.title.toLowerCase().includes(r.toLowerCase()))}),(r,c)=>{const P=ns,O=ts,V=at,Y=Jt("click-outside");return n(),i(N,null,[t(v)?C("",!0):(n(),i("div",Mi,[e("div",Ti,[c[4]||(c[4]=tt('<div data-v-6e98f4fc><svg xmlns="http://www.w3.org/2000/svg" width="54" height="5" viewBox="0 0 54 5" fill="none" data-v-6e98f4fc><line x1="54" y1="4.5" x2="-4.37114e-08" y2="4.5" stroke="url(#paint0_linear_202_10293)" data-v-6e98f4fc></line><line x1="54" y1="0.5" x2="20" y2="0.499997" stroke="url(#paint1_linear_202_10293)" data-v-6e98f4fc></line><defs data-v-6e98f4fc><linearGradient id="paint0_linear_202_10293" x1="54" y1="4" x2="53.201" y2="10.4831" gradientUnits="userSpaceOnUse" data-v-6e98f4fc><stop stop-color="#EEC276" data-v-6e98f4fc></stop><stop offset="1" stop-color="#EFD0A0" stop-opacity="0" data-v-6e98f4fc></stop></linearGradient><linearGradient id="paint1_linear_202_10293" x1="54" y1="0" x2="52.7592" y2="6.33869" gradientUnits="userSpaceOnUse" data-v-6e98f4fc><stop stop-color="#EEC276" data-v-6e98f4fc></stop><stop offset="1" stop-color="#EFD0A0" stop-opacity="0" data-v-6e98f4fc></stop></linearGradient></defs></svg></div>',1)),e("div",Pi,d(t(m)("menu.submenu.uCoinRedemption")),1),c[5]||(c[5]=tt('<div data-v-6e98f4fc><svg xmlns="http://www.w3.org/2000/svg" width="54" height="5" viewBox="0 0 54 5" fill="none" data-v-6e98f4fc><line y1="-0.5" x2="54" y2="-0.5" transform="matrix(1 -8.74228e-08 -8.74228e-08 -1 0 4)" stroke="url(#paint0_linear_202_10296)" data-v-6e98f4fc></line><line y1="-0.5" x2="34" y2="-0.5" transform="matrix(1 -8.74228e-08 -8.74228e-08 -1 0 0)" stroke="url(#paint1_linear_202_10296)" data-v-6e98f4fc></line><defs data-v-6e98f4fc><linearGradient id="paint0_linear_202_10296" x1="0" y1="0" x2="0.799033" y2="-6.48309" gradientUnits="userSpaceOnUse" data-v-6e98f4fc><stop stop-color="#EEC276" data-v-6e98f4fc></stop><stop offset="1" stop-color="#EFD0A0" stop-opacity="0" data-v-6e98f4fc></stop></linearGradient><linearGradient id="paint1_linear_202_10296" x1="0" y1="0" x2="1.24079" y2="-6.33869" gradientUnits="userSpaceOnUse" data-v-6e98f4fc><stop stop-color="#EEC276" data-v-6e98f4fc></stop><stop offset="1" stop-color="#EFD0A0" stop-opacity="0" data-v-6e98f4fc></stop></linearGradient></defs></svg></div>',1))]),e("div",Ei,[S(P,{modelValue:t(p),"onUpdate:modelValue":c[0]||(c[0]=D=>ye(p)?p.value=D:null),placeholder:t(m)("btn.search")},Xt({_:2},[t(p)?{name:"suffix",fn:_e(()=>[e("button",{type:"button",class:"text-white/40 active:text-white/70 transition-colors",onClick:St},c[6]||(c[6]=[e("svg",{class:"w-4 h-4",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor","stroke-width":"2"},[e("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M6 18L18 6M6 6l12 12"})],-1)]))]),key:"0"}:void 0]),1032,["modelValue","placeholder"]),c[7]||(c[7]=e("div",{class:"ml-2"},null,-1)),e("div",ji,[e("div",{ref_key:"dropdownTriggerRef",ref:x},[S(An,{"label-color":"text-[#F5F5F5]",label:t(h),"label-icon-width":"w-0","action-icon-path":("getPublicUrl"in r?r.getPublicUrl:t(X))("/images/layout/icn-arrow-down-white.svg"),"action-icon-rotated":t(_),"highlight-border":t(w),"container-class":"h-[34px]",onClick:Dt},null,8,["label","action-icon-path","action-icon-rotated","highlight-border"])],512),S(es,{name:"dropdown-fade"},{default:_e(()=>[t(_)?Fe((n(),i("div",Oi,[(n(!0),i(N,null,J(t(Pn),D=>(n(),i("div",{key:D.id},[e("div",Wi,[e("div",{id:D.id,class:"flex flex-row rounded-md items-center h-[35px] cursor-pointer langItem text-xs hover:bg-[#3D3320]",onClick:A=>Pe(D.name,D.type)},[e("div",{class:T(["mx-4",D.name==t(h)?"text-[#FFF]":"text-[#FDD387]"])},d(D.name),3)],8,Vi)])]))),128))])),[[Y,{handler:Lt,middleware:Ft}]]):C("",!0)]),_:1})])]),S(Yn,{categories:t(Me),"active-category":t(R),onSelect:Rt},null,8,["categories","active-category"]),S(wi,{items:t(s),loading:t(xt),"active-category":t(R),"grouped-items":t(l),"empty-message":t(wt),onRedeem:Je,onRewardDetail:Tt},null,8,["items","loading","active-category","grouped-items","empty-message"])])),S(mt,{"is-open":t(v),onClose:Qe},{default:_e(()=>[S(wn,{id:t(ue),img:t(F),title:t(K),point:t(E),description:t(ee),tnc:t(W),"reward-id":String(t(ie)),"s
1old-out":t(me),"is-redeem":t(pe),onClose:Qe},null,8,["id","img","title","point","description","tnc","reward-id","sold-out","is-redeem"])]),_:1},8,["is-open"]),S(O,{modelValue:t(k),"onUpdate:modelValue":c[1]||(c[1]=D=>ye(k)?k.value=D:null),title:t(m)("info.confirmRedemption"),message:t(B),"confirm-label":t(m)("btn.yes"),"cancel-label":t(m)("btn.cancel"),"banner-image":t(U)?t(Ue):void 0,onConfirm:Ke,onCancel:Bt},null,8,["modelValue","title","message","confirm-label","cancel-label","banner-image"]),S(V,{modelValue:t($),"onUpdate:modelValue":c[2]||(c[2]=D=>ye($)?$.value=D:null),type:t(y),title:t(L),message:t(M),"confirm-label":t(He)==="game"?t(m)("btn.playNow"):t(m)("btn.OK"),dismissible:!1,onConfirm:Ut},null,8,["modelValue","type","title","message","confirm-label"]),S(V,{modelValue:t(I),"onUpdate:modelValue":c[3]||(c[3]=D=>ye(I)?I.value=D:null),type:"warning",title:t(m)("info.coinNotEnough"),message:t(m)("info.insufficientUcoin"),"confirm-label":t(m)("btn.OK"),onConfirm:jt},null,8,["modelValue","title","message","confirm-label"]),t(b)?(n(),i("div",Ni,[S(Tn,{"btn-label":t(yt)?t(m)("btn.redeem"):"","btn-label2":t(m)("btn.close"),"html-content":t(W),img:t(F),title:t(K),point:t(E),"btn-label-disable":!t(pe),"ranks-with-logos":t(Re),"scroll-to-top":!1,onSubmitButtonClick:It,onCancelButtonClick:Mt},null,8,["btn-label","btn-label2","html-content","img","title","point","btn-label-disable","ranks-with-logos"])])):C("",!0),t(z)?(n(),ce(Ui,{key:2,games:t(Q),onConfirm:Pt,onClose:Et},null,8,["games"])):C("",!0)],64)}}}),Gi=Object.assign(H(Ai,[["__scopeId","data-v-6e98f4fc"]]),{__name:"Redemption"}),qi={class:"bg-[#1c1c1e] nav-gap-h-full"},Hi={key:0},zi={key:0},Ki={key:1},Yi={class:"mx-4"},Qi={class:"mt-4"},Zi={class:"p-4"},Ji={key:1},Xi={key:2,class:"mt-[100px]"},ml=q({__name:"index",setup(f){const m=Ce(),{isUnderReview:o}=te(m),{showMobileLayout:u}=De(),s=a(!1),l=a(!1),p=a(""),h=a(!1),g=We(),_=st();ne(()=>{if(!_.isEnableFeature(ot.MEMBERSHIP)){g.replace("/"+oe.HOME);return}b()});const w=Ae(),{isHideCheckInSection:v}=te(w);async function b(){const $=st();l.value=$.isMaintenance||!1,p.value=$.maintenanceMessage,l.value||(s.value=_.isEnableFeature(ot.MEMBERSHIP),s.value&&w.updateIsHideCheckInSection(!1))}const k=async()=>{h.value=!0,await g.push({path:"/"+oe.REWARDS_LUCKY_SPIN})},I=()=>g.replace("/"+oe.HOME);return($,y)=>{const B=at;return n(),i("div",qi,[t(s)?(n(),i("div",Hi,[t(o)?(n(),i("div",zi,[S(je,{title:$.$t("menu.rewards"),"menu-link":t(oe).HOME,"show-tooltips":!1},null,8,["title","menu-link"]),S(nt,{"img-url":t(X)("/images/pending-review.webp"),"show-text":$.$t("info.userIsUnderReviewPleaseWait")},null,8,["img-url","show-text"])])):(n(),i("div",Ki,[S(je,{"show-tooltips":!1,title:t(v)?$.$t("btn.redeemRequest"):$.$t("btn.uCoinDailyCheckIn"),"menu-link":t(v)?t(oe).REWARDS:t(oe).HOME,"show-lucky-spin":!t(v),"show-lucky-spin-in-progress":t(h),onClickLuckySpin:k},null,8,["title","menu-link","show-lucky-spin","show-lucky-spin-in-progress"]),e("div",Yi,[Fe(S(Vs,null,null,512),[[dt,!t(v)]])]),e("div",Qi,[S(Ro)]),e("div",Zi,[S(Gi)])]))])):(n(),i("div",Ji,[S(je,{title:$.$t("menu.rewards"),"menu-link":t(oe).HOME,"show-tooltips":!1},null,8,["title","menu-link"]),S(B,{modelValue:t(l),"onUpdate:modelValue":y[0]||(y[0]=L=>ye(l)?l.value=L:null),type:"warning",title:$.$t("info.systemMaintenanceNotice"),message:t(p),"confirm-label":$.$t("btn.backToHome"),dismissible:!1,onConfirm:I},null,8,["modelValue","title","message","confirm-label"]),t(l)?C("",!0):(n(),ce(nt,{key:0}))])),t(u)?(n(),i("div",Xi)):C("",!0)])}}});export{ml as default};

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.