1import{_ as B}from"./WhOYCUNG.js";import{u as L,d as Y,r as M,C as Q,x as R,j as V}from"./Bna4rN2y.js";import{q as F,U as O,k as H,y as z,u as o,F as i,L as b,$ as k,a0 as s,Z as n,j as $,x as f,V as u,a1 as Z,Y as m}from"./sMZahMtk.js";const G={key:0,class:"visa-doc w-full flex flex-col"},W={class:"letter-header"},J=["alt"],K={class:"title"},X={class:"properties"},tt={key:0},et={key:1},st={class:"guest"},nt={class:"signoff"},at={key:1,class:"w-full h-screen flex flex-col gap-6 items-center justify-center text-center"},ot="+41 415 391 696",rt=F({__name:"visa",async setup(lt){let _,y;const{t:r}=L(),h=Y(),w=M(),c=Q(),d=$(!1),g=$([]),l=f(()=>c.quote),C=f(()=>(l.value?.travelerInformation??[]).filter(Boolean).filter(e=>e.passportNumber&&e.passportNumber.trim().length>0));R({title:f(()=>l.value?.title?`${r("q.pdf.visa.visaApplication")} - ${l.value.title}`:r("q.pdf.visa.visaApplication"))});const N=t=>t.toString().padStart(2,"0"),v=t=>{if(!t)return"";const e=t instanceof Date?t:new Date(t);return isNaN(e.getTime())?"":`${N(e.getUTCDate())}/${N(e.getUTCMonth()+1)}/${e.getUTCFullYear()}`},q=t=>t.roomSelection?.[0]?.mealPlanSelection?.room?.serviceType,x=t=>q(t)?.serviceProvider,D=t=>{const e=t.roomSelection?.[0]?.bookingId;if(e)return e;const a=q(t)?.nightsbridgeId;return a!=null?String(a):void 0},I=t=>x(t)?.name??r("c.ownArrangement"),E=t=>{const e=g.value.find(a=>a.stopId===t.id);return e?`${v(e.start)}-${v(e.end)}`:""},T=f(()=>{const t=(l.value?.stops??[]).map(e=>e?.destination?.country?.name||e?.destination?.countryName).filter(e=>!!e);return[...new Set(t)]}),A=f(()=>{const t=T.value;return t.length===0?"":t.length===1?t[0]:t.length===2?`${t[0]} ${r("c.and")} ${t[1]}`:`${t.slice(0,-1).join(", ")} ${r("c.and")} ${t[t.length-1]}`}),S=()=>{if(!l.value?.startDate)return;g.value=[];let t=new Date(l.value.startDate);l.value.stops.forEach(e=>{const a=new Date(t);a.setDate(a.getDate()+(e.numberOfNights||0)),g.value.push({stopId:e.id,start:t,end:a}),t=a})},P=async()=>{try{if(typeof h.params.quote!="string"){d.value=!0;return}const t=h.params.quote.split("-"),e=t.pop(),a=e?parseInt(e,10):0;if(isNaN(a)||a<=0){d.value=!0;return}if(c.quoteId=a,c.reference=t.join("-"),await c.getQuote(),c.invalidQuote||!c.quote?.id){d.value=!0;return}}catch(t){d.value=!0,console.error("Error loading quote:",t)}},U=async()=>{if(l.value?.stops){for(const t of l.value.stops)if(t.id)try{const e=await c.getStop(t.id,!1);Object.assign(t,e)}catch(e){console.error(`Error loading stop ${t.id}:`,e)}}};return[_,y]=O(()=>P()),await _,y(),S(),H(async()=>{await U(),await z(),S()}),(t,e)=>o(d)?(u(),i("div",at,[s("h1",null,n(o(r)("e.error")),1),s("button",{class:"btn w-auto inline-block",onClick:e[0]||(e[0]=a=>o(w).push("/"))},[s("span",null,n(o(r)("e.back")),1)])])):(u(),i("div",G,[(u(!0),i(b,null,k(o(C),(a,j)=>(u(),i("article",{key:a.id,class:Z(["visa-letter",{"first-letter":j===0}])},[s("header",W,[e[1]||(e[1]=s("div",{class:"company"},[s("p",null,"Viatu AG"),s("p",null,"Neugasse 6, 6300, Zug, Switzerland"),s("p",null,"CHE- 496.562.005")],-1)),s("img",{src:B,width:"147",height:"32",alt:o(r)("c.viatuLogo"),class:"logo"},null,8,J)]),e[4]||(e[4]=s("hr",{class:"divider"},null,-1)),s("h1",K,[m(n(o(r)("q.pdf.visa.visaApplicationFor")),1),e[2]||(e[2]=s("br",null,null,-1)),m(" "+n(a.firstName)+" "+n(a.lastName),1),e[3]||(e[3]=s("br",null,null,-1)),m(" "+n(o(r)("q.pdf.visa.accommodationConfirmation")),1)]),s("p",null,n(o(r)("q.pdf.visa.salutation")),1),s("p",null,n(o(r)("q.pdf.visa.intro",{name:`${a.firstName} ${a.lastName}`,country:o(A),startDate:v(o(l)?.startDate),endDate:v(o(l)?.endDate)})),1),s("ul",X,[(u(!0),i(b,null,k(o(l)?.stops,p=>(u(),i("li",{key:p.id},[s("div",null,n(E(p))+" - "+n(I(p)),1),s("ul",null,[s("li",null,[m(n(o(r)("q.pdf.visa.confirmationRef"))+": ",1),D(p)?(u(),i("span",tt,"BkID "+n(D(p)),1)):(u(),i("span",et,"â"))])])]))),128))]),s("p",null,n(o(r)("q.pdf.visa.guestDetailsLabel")),1),s("ul",st,[s("li",null,[m(n(a.firstName)+" "+n(a.lastName)+" ",1),s("ul",null,[s("li",null,n(o(r)("q.pdf.visa.passportNo"))+": "+n(a.passportNumber),1)])])]),s("p",null,n(o(r)("q.pdf.visa.kindlyAssist")),1),s("p",null,n(o(r)("q.pdf.visa.contactUs")),1),s("div",nt,[s("p",null,n(o(r)("q.pdf.visa.yoursSincerely")),1),s("p",null,n(o(l)?.salesConsultant?.fullName||""),1),s("p",null,n(o(r)("q.pdf.visa.travelConsultant")),1),s("p",null,n(ot)),s("p",null,n(o(l)?.salesConsultant?.email||""),1)])],2))),128))]))}}),dt=V(rt,[["__scopeId","data-v-1941b36b"]]);export{dt 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.