1var q=Object.defineProperty;var l=(w,u)=>q(w,"name",{value:u,configurable:!0});import{e as H,k as O,a as G,u as J,f as K,s as Q,F as X,d as C,H as Y,j as Z,ac as tt,W as et,ad as st}from"#entry";import{M as D}from"./BuLVyR9z.js";import{d as v,ae as at,A as nt,v as rt,E as i,B as m,$ as g,W as _,a0 as M,u as e,F as $,a7 as z,a1 as B,U as n,R as F}from"./D0o_BzFA.js";import"./B4-Q6cIk.js";import"./Czkx91fS.js";import"./CCyKimDB.js";import"./pYGOJxUL.js";import"./YfvY-W3w.js";import"./uSX3Sq1J.js";import"./BlfWmDfB.js";const it={class:"tickets-page"},ot={class:"flex justify-center mb-10 gap-2"},ct={key:0,class:"flex flex-col w-11/12 md:w-4/5 mx-auto tickets-container"},lt={key:0},ut={key:0,class:"flex flex-wrap justify-start tickets-container mb-6 gap-[14px]"},dt={key:1,class:"mt-4 text-white text-center"},kt={key:1},mt={key:0,class:"flex flex-wrap justify-start tickets-container mb-6 gap-[14px]"},pt={key:1,class:"mt-4 text-white text-center"},ft={key:1,class:"my-20"},_t={__name:"index",async setup(w){let u,h;const{t:p}=O(),{loadingTickets:x,getMyTickets:V,getMyPastTickets:E}=G(),{openModal:N,SIGN_IN:j}=J(),U=Z(),r=v("current"),c=v([]),d=v([]),W=K(),{userDetail:b}=Q(W);X({title:p("general.metas.myTicketsTitle"),description:p("general.metas.myTicketsDescription"),ogTitle:p("general.metas.myTicketsTitle"),ogDescription:p("general.metas.myTicketsDescription")});const L=l(()=>{U.query.loginRequired==="true"&&N(j,{isStatic:!1,origin:"my-tickets",cancelOutsideClick:!0,noArrow:!0})},"openLoginModal"),T=l(t=>{if(!Array.isArray(t))return console.warn("transformTicketsForView: apiResponse is not an array",t),[];const o=t.filter(s=>s&&s.event_info&&s.event_info.id);return o.length===0?[]:o.map(s=>{const a=s.event_info||{},k=Array.isArray(s.tickets)?s.tickets:[],R=l(()=>{let f=!1;if(k.length>0)for(const S of k){if(S.invoice_ready===!0)return!0;S.invoice_ready===!1&&(f=!0)}return f?!1:null},"hasInvoiceAvailable");return{eventId:a.id,id:a.id,title:a.title,slug:a.slug,permalink:a.permalink,thumbnails:a.thumbnails,venue:a.venue,start_date:a.start_date,total_tickets:k.length,fan_to_fan_active:a.fan_to_fan_active||!1,cancelation_status:a.cancelation_status,insurance:a.insurance,authorization_file_url:a.authorization_file_url,hide_download_button:a.hide_download_button||!1,downloadUrl:a.all_tickets,is_streaming:a.is_streaming||!1,tickets:k,hasInvoiceAvailable:R,purchase_available:k.some(f=>f.purchase_available)||!1}})},"transformTicketsForView"),I=l(async()=>{try{const t=await V();c.value=T(t)}catch(t){console.error("Error fetching current tickets:",t),c.value=[]}},"fetchCurrentTickets"),P=l(async()=>{try{const t=await E();d.value=T(t)}catch(t){console.error("Error fetching past tickets:",t),d.value=[]}},"fetchPastTickets"),A=l(async t=>{r.value=t,t==="current"&&c.value.length===0?await I():t==="past"&&d.value.length===0&&await P()},"changeSection"),y=l(async()=>{await I()},"init"),{data:yt,pending:vt,error:gt}=([u,h]=at(async()=>Y("my-tickets",async()=>(await y(),{loaded:!0,timestamp:new Date().toISOString()}),{server:!0,client:!0})),u=await u,h(),u);return nt(async()=>{L(),(!c.value||c.value.length===0)&&await y()}),rt(b,async t=>{b.value&&await y()},{immediate:!0}),(t,o)=>(n(),i("div",null,[m(tt),g("div",it,[o[2]||(o[2]=g("div",{class:"flex flex-col items-center mt-12 mb-11"},null,-1)),g("div",ot,[m(C,{"button-id":"current-tickets-tab",text:t.$t("wegow.myTickets.currentTickets"),background:e(r)==="current"?"opacity":"transparent",color:e(r)==="current"?"topaz":"","text-color":e(r)==="current"?"black":"white",size:"xl","custom-padding":"15px 50px",type:"button",class:M(["section-tab",{selected:e(r)==="current"}]),onClick:o[0]||(o[0]=s=>A("current"))},null,8,["text","background","color","text-color","class"]),m(C,{"button-id":"past-tickets-tab",text:t.$t("wegow.myTickets.pastConcerts"),background:e(r)==="past"?"opacity":"transparent",color:e(r)==="past"?"topaz":"","text-color":e(r)==="past"?"black":"white",size:"xl","custom-padding":"15px 50px",type:"button",class:M(["section-tab",{selected:e(r)==="past"}]),onClick:o[1]||(o[1]=s=>A("past"))},null,8,["text","background","color","text-color","class"])]),e(x)?_("",!0):(n(),i("div",ct,[e(r)==="current"?(n(),i("div",lt,[e(c)&&e(c).length>
10?(n(),i("div",ut,[(n(!0),i($,null,z(e(c),s=>(n(),F(D,{key:s?.id||s?.eventId,ticket:s},null,8,["ticket"]))),128))])):(n(),i("div",dt,B(t.$t("wegow.myTickets.noTickets")),1))])):_("",!0),e(r)==="past"?(n(),i("div",kt,[e(d)&&e(d).length>0?(n(),i("div",mt,[(n(!0),i($,null,z(e(d),s=>(n(),F(D,{key:s?.id||s?.eventId,ticket:s},null,8,["ticket"]))),128))])):(n(),i("div",pt,B(t.$t("wegow.myTickets.noPastTickets")),1))])):_("",!0)])),e(x)?(n(),i("div",ft,[m(et)])):_("",!0)]),m(st)]))}},$t=H(_t,[["__scopeId","data-v-e9560bcc"]]);export{$t 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.