1import{n as e}from"./DzsWT5OZ.js";import{C as t,D as n,K as r,Pt as i,Y as a,jt as o,k as s,lt as c,pt as l,u,wt as d,y as f,yt as p}from"./HEwjUCCq.js";import{d as m,u as h}from"#entry";import{n as g,t as _}from"./DAjgRy9W.js";import{t as v}from"./13wDx5BX.js";import{t as y}from"./DgyuwTBI.js";var b=s({__name:`PaxSelectionForm`,props:{paxSettings:{},form:{default:()=>({})},small:{type:Boolean,default:!1},updateStore:{type:Boolean,default:!1}},setup(e){let s=e,m=h(`PaxSelectionForm`),b=_(),x=d(0),S=d(0),C=d(s.form.childAgeOptions.map(e=>typeof e==`string`?e:e?.value)),{ageOptionsCookie:w,adultsCookie:T}=g(),E=f({get:()=>Number(s.form.adultCount),set:e=>{T.value=e,s.form.adultCount=e,s.updateStore&&(b.voyageFiltersForm.adultCount=e)}}),D=f(()=>s.form.childAgeOptions.map(e=>e).filter(e=>parseInt(e,10)<18).length),O=f(()=>s.form.childAgeOptions.map(e=>e).filter(e=>parseInt(e,10)>=18).length),k=f(()=>s.paxSettings.maxChildCount-S.value),A=f(()=>s.paxSettings.maxChildCount-x.value),j=f(()=>x.value+S.value);return x.value=D.value,S.value=O.value,c(()=>[x.value,S.value],([e,t])=>{if(e===0&&t===0)C.value=[];else{let n=1,r=1;C.value.filter(i=>parseInt(i,10)<18?n<e&&(n+=1,!0):r<t&&(r+=1,!0))}}),c(()=>C.value,e=>{let t=[...e];s.form.childAgeOptions=t,w.value=t,s.updateStore&&(b.voyageFiltersForm.childAgeOptions=t)}),r(()=>{w.value=s.form.childAgeOptions,T.value=s.form.adultCount}),(r,s)=>(a(),t(`div`,{class:i(o(m)(null,{small:e.small}))},[n(v,{modelValue:o(E),"onUpdate:modelValue":s[0]||=e=>p(E)?E.value=e:null,title:r.$t(`globals.adults`),max:e.paxSettings.maxPaxCount,description:r.$t(`pages.voyageSearch.adultDescription`)},null,8,[`modelValue`,`title`,`max`,`description`]),n(v,{modelValue:o(S),"onUpdate:modelValue":s[1]||=e=>p(S)?S.value=e:null,title:r.$t(`globals.juniors`),max:o(A),description:r.$t(`pages.voyageSearch.juniorDescription`)},null,8,[`modelValue`,`title`,`max`,`description`]),n(v,{modelValue:o(x),"onUpdate:modelValue":s[2]||=e=>p(x)?x.value=e:null,title:r.$t(`globals.children`),max:o(k),description:r.$t(`pages.voyageSearch.childDescription`)},null,8,[`modelValue`,`title`,`max`,`description`]),l(n(y,{modelValue:o(C),"onUpdate:modelValue":s[3]||=e=>p(C)?C.value=e:null,"child-count":o(x),"junior-count":o(S)},null,8,[`modelValue`,`child-count`,`junior-count`]),[[u,o(j)>0]])],2))}}),x=e({default:()=>S}),S=Object.assign(m(b,[[`__scopeId`,`data-v-0b9dfd6f`]]),{__name:`PaxSelectionForm`});export{x as n,S as t};
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.