PageSourceSearch

https://explore.aircorsica.com/_nuxt/Destination.C6zi7Dpz.js

js aircorsica.com collected 2026-09-24 21:44:18 UTC 5,539 bytes, 2 lines download raw bytes

1const __vite__fileDeps=["./Scroll.40u3ER-J.js","./formatNumber.DO6heeY6.js","./entry.CTpwKgbi.js","./entry.Cp9_R03R.css","./Scroll.Dkqe13JK.css"],__vite__mapDeps=i=>i.map(i=>__vite__fileDeps[i]);
2import{_ as Y,x as w,y as K,k as y,$ as Z,K as ee,o as c,c as m,B as h,w as C,f as a,F as O,r as R,m as D,I as S,a as v,d as U,t as k,C as te,L as M,S as le,b as q,q as H,s as W,T as ae,H as se,U as ne,V as oe}from"./entry.CTpwKgbi.js";import{_ as ie}from"./AlphabeticList.BE9SFioV.js";import{u as ce}from"./useBreakpoint.WqhKOicx.js";import{u as re}from"./useSelect.CmuE62Qj.js";import{b as ue,o as de}from"./index.BiOHW2Gi.js";import{u as fe}from"./useDigitalData.DiCwC3NI.js";import{L as V,a as ve}from"./Location.Bpeb2kTI.js";import"./Button.CW2g9nYJ.js";import"./nuxt-link.MxwpMcB1.js";import"./formatNumber.DO6heeY6.js";import"./nuxt-img.DmFEFh4T.js";import"./useImageAlias.CMo4t5lQ.js";const me=()=>({key:"air-search",eventName:"Destination display",componentId:"Destination"}),he=ne(()=>oe(()=>import("./Scroll.40u3ER-J.js"),__vite__mapDeps([0,1,2,3,4]),import.meta.url).then(t=>t.default||t)),pe={key:0,class:"results"},ye={key:1,class:"none"},ke={key:1,class:"default"},ge={key:0,class:"recent"},_e={class:"heading"},we={class:"items",scrollbar:""},Ce={class:"all"},De={class:"on-sales"},Se={class:"heading"},be={class:"heading"},xe={__name:"Destination",props:{locale:{type:String,default:"en"},locales:{type:Object,default:()=>({})},rtl:{type:Boolean,default:!1},destination:{type:String,default:""},locations:{type:Array,default:()=>[]},focus:{type:Boolean,default:!1},input:{type:Object,default:null},sales:{type:Array,default:()=>[]}},emits:["select"],setup(t,{emit:G}){const r=t,b=G,N=he,{to:$}=ce(),P=$("md"),p=w(!1);K(()=>r.destination,()=>{p.value=!0});const x=y(()=>r.locations.map(e=>({...e,onSale:!!r.sales.find(l=>l.destination===e.code)}))),s=y(()=>p.value&&r.destination.length>2?x.value.filter(e=>L(e.city.name,r.destination)||L(e.airport.name,r.destination)||L(e.airport.code,r.destination)):x.value.filter(e=>!e.onSale)),j=y(()=>x.value.filter(e=>e.onSale));function L(e,l){return e=e.toLowerCase(),l=l.toLowerCase(),l.split(/\s+/).some(d=>e.includes(d))}const A=ue("recent-destinations",[],void 0),z=y(()=>A.value.map(e=>{var l;return{...e,from:(l=r.locations.find(u=>u.code===e.code))==null?void 0:l.from}}));function B(e){const l=[...A.value],u=l.findIndex(d=>d.code===e.code);u>-1&&l.splice(u,1),l.unshift(e),A.value=l.slice(0,2),se(()=>{b("select",e)})}const{selected:g,select:_}=re(null,s),o=y(()=>s.value&&g.value?s.value.findIndex(e=>e.airport.code===g.value.airport.code):-1),J={Tab:()=>{r.input.toggle(!1)},ArrowUp:({event:e})=>{e.preventDefault(),s.value.length>0&&(g.value?o.value>0&&_(s.value[o.value-1]):_(s.value[s.value.length-1]))},ArrowDown:({event:e})=>{e.preventDefault(),s.value.length>0&&(g.value?o.value<s.value.length-1&&_(s.value[o.value+1]):_(s.value[0]))},Enter:({event:e})=>{e.preventDefault(),s.value.length>0&&o.value>-1&&b("select",s.value[o.value])}};de(["Tab","ArrowUp","ArrowDown","Enter"],e=>{J[e.key]({event:e,shift:e.shiftKey})},{target:r.input});const T=w(null),I=w(null);K(o,()=>{var e,l,u,d,n;if(o.value>-1){let i,f;p.value&&r.destination.length>2?(i=T.value,f=(u=Array.from(((l=(e=T.value)==null?void 0:e.wrapper)==null?void 0:l.children[0].children)??[]))==null?void 0:u[o.value]):(i=I.value,f=(n=Array.from(((d=I.value)==null?void 0:d.wrapper.children[1].children)??[]))==null?void 0:n[o.value]),f&&i.center({target:f,index:o.value},"smooth")}});const Q=$("sm"),E=Z("scroll");ee(()=>{var e,l;r.focus&&!Q.value&&E.value&&((l=(e=E.value)==null?void 0:e.wrapper)==null?void 0:l.scrollTop)<450&&E.value.to({top:450,behavior:"smooth"})});const F=w(null),{displayEvent:X}=fe();return X(F,me()),(e,l)=>{const u=ie;return c(),m("div",{class:D(["destination",{rtl:t.rtl}]),ref_key:"container",ref:F},[(c(),h(M(a(P)||a(p)&&t.destination.length>2?a(N):"div"),{ref_key:"results",ref:T,class:"container",scrollbar:""},{default:C(()=>{var d;return[a(p)&&((d=t.destination)==null?void 0:d.length)>2?(c(),m("div",pe,[a(s).length>0?(c(!0),m(O,{key:0},R(a(s),(n,i)=>(c(),h(a(V),{class:D({selected:i===a(o)}),key:n.city,item:n,locales:t.locales,onClick:S(f=>B(n),["prevent"])},null,8,["class","item","locales","onClick"]))),128)):(c(),m("div",ye,[v("p",null,[U(k(t.locales["no-result"])+' "',1),v("b",null,k(t.destination),1),U('"')])]))])):(c(),m("div",ke,[a(z).length>0?(c(),m("div",ge,[v("h3",_e,k(t.locales["recent-searches"]),1),v("div",we,[(c(!0),m(O,null,R(a(z),(n,i)=>(c(),h(a(ve),{key:i,item:n,locales:t.locales,rtl:t.rtl,onClick:S(f=>B(n),["prevent"])},null,8,["item","locales","rtl","onClick"]))),128))])])):te("",!0),v("div",Ce,[(c(),h(M(a(P)?"div":a(N)),{ref_key:"all",ref:I,scrollbar:""},{default:C(()=>[le(v("span",De,[v("h3",Se,k(t.locales["on-sales"]),1),q(u,H(W({items:a(j),locale:t.locale,by:"name",letter:!1})),{items:C(({item:n,index:i})=>[(c(),h(a(V),{class:D({selected:i===a(o)}),key:i,item:n,locales:t.locales,rtl:t.rtl,onClick:S(f=>b("select",n),["prevent"])},null,8,["class","item","locales","rtl","onClick"]))]),_:1},16)],512),[[ae,a(j).length>0]]),v("h3",be,k(t.locales["all-locations"]),1),q(u,H(W({items:a(s),locale:t.locale,by:"name",letter:!1})),{items:C(({item:n,index:i})=>[(c(),h(a(V),{class:D({selected:i===a(o)}),key:i,item:n,locales:t.locales,rtl:t.rtl,onClick:S(f=>B(n),["prevent"])},null,8,["class","item","locales","rtl","onClick"]))]),_:1},16)]),_:1},512))])]))]}),_:1},512))],2)}}},Fe=Y(xe,[["__scopeId","data-v-68447c06"]]);export{Fe 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.