PageSourceSearch

https://inanctur.com.tr/_nuxt/Cv1peTJS.js

js inanctur.com.tr collected 2026-10-01 13:02:47 UTC 6,406 bytes, 1 lines download raw bytes

1import{u as B,bB as b,r as D,aD as E,bC as M,bt as x,bD as I,ax as K,w as z,aX as N,bE as F,bF as H,n as V}from"./MScFIUOs.js";const v=e=>e==="defer"||e===!1;function Z(...e){var w;const t=typeof e[e.length-1]=="string"?e.pop():void 0;typeof e[0]!="string"&&e.unshift(t);let[a,s,r={}]=e;if(typeof a!="string")throw new TypeError("[nuxt] [asyncData] key must be a string.");if(typeof s!="function")throw new TypeError("[nuxt] [asyncData] handler must be a function.");const n=B(),f=s,h=()=>b.value,m=()=>n.isHydrating?n.payload.data[a]:n.static.data[a];r.server??(r.server=!0),r.default??(r.default=h),r.getCachedData??(r.getCachedData=m),r.lazy??(r.lazy=!1),r.immediate??(r.immediate=!0),r.deep??(r.deep=b.deep),r.dedupe??(r.dedupe="cancel");const l=r.getCachedData(a,n),d=l!=null;if(!n._asyncData[a]||!r.immediate){(w=n.payload._errors)[a]??(w[a]=b.errorValue);const o=r.deep?D:E;n._asyncData[a]={data:o(d?l:r.default()),pending:D(!d),error:M(n.payload._errors,a),status:D("idle"),_default:r.default}}const c={...n._asyncData[a]};delete c._default,c.refresh=c.execute=(o={})=>{if(n._asyncDataPromises[a]){if(v(o.dedupe??r.dedupe))return n._asyncDataPromises[a];n._asyncDataPromises[a].cancelled=!0}if(o._initial||n.isHydrating&&o._initial!==!1){const y=o._initial?l:r.getCachedData(a,n);if(y!=null)return Promise.resolve(y)}c.pending.value=!0,c.status.value="pending";const g=new Promise((y,u)=>{try{y(f(n))}catch(_){u(_)}}).then(async y=>{if(g.cancelled)return n._asyncDataPromises[a];let u=y;r.transform&&(u=await r.transform(y)),r.pick&&(u=J(u,r.pick)),n.payload.data[a]=u,c.data.value=u,c.error.value=b.errorValue,c.status.value="success"}).catch(y=>{if(g.cancelled)return n._asyncDataPromises[a];c.error.value=H(y),c.data.value=V(r.default()),c.status.value="error"}).finally(()=>{g.cancelled||(c.pending.value=!1,delete n._asyncDataPromises[a])});return n._asyncDataPromises[a]=g,n._asyncDataPromises[a]},c.clear=()=>j(n,a);const P=()=>c.refresh({_initial:!0}),A=r.server!==!1&&n.payload.serverRendered;{const o=x();if(o&&A&&r.immediate&&!o.sp&&(o.sp=[]),o&&!o._nuxtOnBeforeMountCbs){o._nuxtOnBeforeMountCbs=[];const u=o._nuxtOnBeforeMountCbs;I(()=>{u.forEach(_=>{_()}),u.splice(0,u.length)}),K(()=>u.splice(0,u.length))}A&&n.isHydrating&&(c.error.value||l!=null)?(c.pending.value=!1,c.status.value=c.error.value?"error":"success"):o&&(n.payload.serverRendered&&n.isHydrating||r.lazy)&&r.immediate?o._nuxtOnBeforeMountCbs.push(P):r.immediate&&P();const g=F();if(r.watch){const u=z(r.watch,()=>c.refresh());g&&N(u)}const y=n.hook("app:data:refresh",async u=>{(!u||u.includes(a))&&await c.refresh()});g&&N(y)}const C=Promise.resolve(n._asyncDataPromises[a]).then(()=>c);return Object.assign(C,c),C}function j(e,t){t in e.payload.data&&(e.payload.data[t]=void 0),t in e.payload._errors&&(e.payload._errors[t]=b.errorValue),e._asyncData[t]&&(e._asyncData[t].data.value=void 0,e._asyncData[t].error.value=b.errorValue,e._asyncData[t].pending.value=!1,e._asyncData[t].status.value="idle"),t in e._asyncDataPromises&&(e._asyncDataPromises[t]&&(e._asyncDataPromises[t].cancelled=!0),e._asyncDataPromises[t]=void 0)}function J(e,t){const a={};for(const s of t)a[s]=e[s];return a}const S="reservation-selection-v1",i=e=>{if(e==null)return 0;const t=String(e).replace(",","."),a=Number(t);return Number.isFinite(a)?a:0},p=e=>e!=null&&e.rooms?e.rooms.reduce((t,a)=>t+i(a.child)+i(a.baby),0):0,T=(e=[])=>{let t=0,a=0,s=0,r=0;return e.forEach(n=>{if(n===""||n===null||n===void 0){r+=1;return}const f=parseInt(String(n),10);if(Number.isNaN(f)){r+=1;return}f<=2?t+=1:f<=11?a+=1:s+=1}),{baby:t,child:a,adultExtra:s,unknown:r}},O=e=>{if(!e)return;Array.isArray(e.childrenAges)||(e.childrenAges=[]);const t=p(e);if(e.childrenAges.length>t){e.childrenAges=e.childrenAges.slice(0,t);return}for(;e.childrenAges.length<t;)e.childrenAges.push("")},G=(e,t)=>{if(!(e!=null&&e.rooms)||e.rooms.length===0)return;const a=t===""||t===null||t===void 0?NaN:parseInt(String(t),10),s=!Number.isNaN(a)&&a<=2,r=!Number.isNaN(a)&&a>2,n=f=>{for(let h=e.rooms.length-1;h>=0;h-=1){const m=e.rooms[h],l=i(m[f]);if(l>0)return m[f]=l-1,!0}return!1};s&&n("baby")||r&&n("child")||n("child")||n("baby")},U=(e,t)=>e?t<=1?i(e.turs_single):i(t===2?e.turs_double:e.turs_triple):0,X=(e,t)=>{const a=parseInt(String(t),10);return Number.isNaN(a)?[]:((e==null?void 0:e.prices)||[]).filter(s=>["turBaby","turChild","turChildNoBed"].includes(String((s==null?void 0:s.turf_PaxType)||""))&&a>=i(s==null?void 0:s.turf_MinAge)&&a<=i(s==null?void 0:s.turf_MaxAge))},Y=(e,t)=>
1{const a=X(e,(t==null?void 0:t.age)??"");return a.length===1?a[0]:a.find(s=>s.turf_PaxType===(t==null?void 0:t.selectedPriceType)&&(s.turf_RoomType||s.turf_PaxType)===(t==null?void 0:t.selectedPriceId))},R=e=>{const t=(e==null?void 0:e.rooms)||[],a=t.reduce((l,d)=>l+i(d.adult),0),s=t.reduce((l,d)=>l+i(d.child)+i(d.baby),0),r=Array.isArray(e.childrenAges)?e.childrenAges:[],n=T(r),f=r.length>0?n.baby:t.reduce((l,d)=>l+i(d.baby),0),h=r.length>0?n.child:t.reduce((l,d)=>l+i(d.child),0),m=r.length>0?n.unknown:0;return{adults:a+n.adultExtra,rooms:t.length,baby:f,child:h,unknown:m,roomKids:s}},q=(e,t)=>{if(!e||!t)return 0;const a=R(t);if(a.unknown>0)return 0;const s=(t.rooms||[]).reduce((h,m)=>{const l=i(m.adult);return l<=0?h:h+l*U(e,l)},0),r=Array.isArray(e.prices)&&e.prices.length>0,n=r?(t.childrenAges||[]).reduce((h,m,l)=>{var c;const d=Y(e,{age:m,...((c=t.childPriceSelections)==null?void 0:c[l])||{}});return h+i(d==null?void 0:d.turf_Price)},0):a.child*i(e.turs_child),f=r?0:a.baby*i(e.turs_baby);return s+n+f},L=e=>{if(!(typeof window>"u"))try{const t=localStorage.getItem(S);if(!t)return;const a=JSON.parse(t);a!=null&&a.rooms&&Array.isArray(a.rooms)&&(e.rooms=a.rooms.map(s=>({adult:i(s.adult)||1,child:i(s.child),baby:i(s.baby),room_type:s.room_type||null,options:s.options||{}}))),Array.isArray(a==null?void 0:a.childrenAges)&&(e.childrenAges=a.childrenAges),Array.isArray(a==null?void 0:a.childPriceSelections)&&(e.childPriceSelections=a.childPriceSelections),O(e)}catch{}},Q=e=>{if(!(typeof window>"u"))try{localStorage.setItem(S,JSON.stringify({rooms:e.rooms,childrenAges:e.childrenAges||[],childPriceSelections:e.childPriceSelections||[]}))}catch{}},$=()=>({getRoomKidsCount:p,getChildrenAgeCounts:T,normalizeChildrenAges:O,removeChildFromRooms:G,getReservationTotals:R,getTourTotal:q,loadReservationSelection:L,saveReservationSelection:Q});export{Z as a,$ as u};

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.