PageSourceSearch

https://nationaltaxis.lovable.app/assets/argyll-tariff-DH19KER0.js

js nationaltaxis.lovable.app collected 2026-10-03 03:35:57 UTC 5,252 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/tariff-payload-telemetry-YSwoMkv7.js","assets/preload-helper-zJ_50EbN.js"])))=>i.map(i=>d[i]);
2import{t as e}from"./preload-helper-zJ_50EbN.js";var t={tariffVersion:`2025-04-22`,tariffEffectiveDate:`22 April 2025`,tariffSourceUrl:`https://www.argyll-bute.gov.uk/transport-and-streets/taxis-and-minicabs`,t1InitialGBP:3.8,t1SubseqYards:176,t2InitialGBP:4.55,t2SubseqYards:150,t3InitialGBP:5.31,t3SubseqYards:120,initialYards:860,subseqStepGBP:.25,phoneBookingSurchargeGBP:.4,minibusSurchargePct:.3,eightSeaterLocalSurchargePct:1,airportPickupDropFeeGBP:10,airportMeetGreetFeeGBP:25,wavPassengerThreshold:4,wavRateAtOrBelow:`saloon`,wavRateAbove:`minibus`,wavRateUnknown:`minibus`,deadMileageEnabled:!0,deadMileageThresholdMiles:20,deadMileageShortJourneyMaxMiles:10,deadMileagePerMileGBP:2,deadMileageFlatGBP:0,minimumNoticeEnabled:!0,minimumNoticeLocalRadiusMiles:8,minimumNoticeLocalMinutes:30,minimumNoticeBaseMinutes:120,minimumNoticePerMileMinutes:3,minimumNoticeMaxMinutes:720},n={...t};function r(){return n}var i=new Set;function a(e){return i.add(e),e(n),()=>i.delete(e)}var o=.9144,s=n.tariffVersion,c=n.tariffEffectiveDate,l=n.tariffSourceUrl;function u(){s=n.tariffVersion,c=n.tariffEffectiveDate,l=n.tariffSourceUrl}u();function d(e){let t=new Intl.DateTimeFormat(`en-GB`,{timeZone:`Europe/London`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1}).formatToParts(e).reduce((e,t)=>(t.type!==`literal`&&(e[t.type]=t.value),e),{});return{month:Number(t.month),day:Number(t.day),hour:Number(t.hour===`24`?`0`:t.hour),minute:Number(t.minute)}}function f(e){let t=e?new Date(e):new Date;if(Number.isNaN(t.getTime()))return f();let{month:n,day:r,hour:i}=d(t);return n===12&&(r===24&&i>=22||r===25||r===26||r===27&&i<7)||n===12&&r===31&&i>=22||n===1&&(r===1||r===2&&i<7)?3:n===12&&(r===24||r===31)&&i>=18&&i<22||n===1&&(r===2&&i>=7||r===3&&i<7)||i>=22||i<7?2:1}var p=0;function m(){return p}function h(e,t){let n=p;if(n<=e){let r=`[argyll-tariff] Estimator "${t.estimator}" did not invoke computeArgyllFare (before=${e}, after=${n}). Every fare must be computed through the Argyll & Bute tariff source of truth (src/lib/argyll-tariff.ts). Context: `+JSON.stringify(t);throw console.error(r),Error(r)}console.info(`[argyll-tariff] `+JSON.stringify({estimator:t.estimator,tariffCalls:n-e,tariffVersion:s,tariffEffectiveDate:c,pickup:t.pickup,dropoff:t.dropoff,departAt:t.departAt,vehicleType:t.vehicleType}))}var g=class extends Error{code=`TARIFF_PAYLOAD_INVALID`;expectedVersion;receivedVersion;context;constructor(e,t){super(`[argyll-tariff] Estimator "${t.estimator}" returned a payload with tariffVersion=${JSON.stringify(e)} which does not match the active Argyll & Bute tariff (${s}).`),this.name=`TariffPayloadError`,this.expectedVersion=s,this.receivedVersion=e,this.context=t}};function _(e){return e instanceof g}function v(t,n){let r=t?.tariffVersion??null;if(!t||r!==s){let t=new g(r,n);console.error(t.message,n);try{e(()=>import(`./tariff-payload-telemetry-YSwoMkv7.js`).then(e=>e.emitTariffPayloadFailure({ctx:n,expectedVersion:s,receivedVersion:r,message:t.message})),__vite__mapDeps([0,1]))}catch{}throw t}}function y(e){p+=1;let t=e.phoneBooked??!0,r=f(e.departAt),i=e.config??n,a=!!e.minibus&&!e.eightSeaterLocal,u=a?Math.min(r+1,3):r,d=t=>{let n=t===1?i.t1InitialGBP:t===2?i.t2InitialGBP:i.t3InitialGBP,r=t===1?i.t1SubseqYards:t===2?i.t2SubseqYards:i.t3SubseqYards,a=i.initialYards*o,s=r*o,c=n;if(e.distanceMeters>a){let t=e.distanceMeters-a,n=Math.max(0,Math.ceil((t-1e-6)/s));c+=n*i.subseqStepGBP}return Math.round(c*100)/100},m=d(r),h=d(u),g=t?i.phoneBookingSurchargeGBP:0,_=h+g,v=e.eightSeaterLocal?i.eightSeaterLocalSurchargePct:0,y=v?Math.round(_*v*100)/100:0,b=a&&r===3?1.3:0,x=y+b,S=Math.round((_+x)*100)/100,C=[];C.push(r===1?`Tariff 1 (daytime, 07:00–22:00) applied.`:r===2?`Tariff 2 (evening/night 22:00–07:00 or Christmas/New Year evening) applied.`:`Tariff 3 (Christmas/New Year overnight) applied.`),e.eightSeaterLocal?C.push(`8-seater local Helensburgh rate (+${Math.round(i.eightSeaterLocalSurchargePct*100)}%, double saloon rate) applied.`):a&&(r===3?C.push(`Large mini-bus scale-up: Tariff 3 rates + £1.30 flat surcharge (Argyll & Bute Council rule).`):C.push(`
2Large mini-bus scale-up: Tariff ${r} would apply → charged at Tariff ${u} rates (Argyll & Bute Council rule).`)),t&&C.push(`Pre-booked / phone-hire surcharge £${g.toFixed(2)} applied.`);let w={fareGBP:S,tariff:r,meterGBP:h,phoneBookingGBP:g,minibusSurchargeGBP:x,baseTariffMeterGBP:m,effectiveMeterTariff:u,minibusScaleFlatGBP:b,notes:C,tariffVersion:s,tariffEffectiveDate:c,tariffSourceUrl:l};return(typeof process<`u`&&{}.FARE_DEBUG||typeof globalThis<`u`&&globalThis.__FARE_DEBUG__)&&console.log(`[FARE_DEBUG] computeArgyllFare`,{input:{distanceMeters:e.distanceMeters,distanceMiles:e.distanceMeters/1609.344,departAt:e.departAt,minibus:!!e.minibus,eightSeaterLocal:!!e.eightSeaterLocal,phoneBooked:t},rules:{tariff:r,baseTariffMeterGBP:m,meterGBP:h,phoneBookingGBP:g,effectiveMeterTariff:u,minibusScaleFlatGBP:b,minibusSurchargeGBP:x,total:S},notes:C}),w}export{v as a,r as c,a as d,s as i,m as l,c as n,h as o,l as r,y as s,t,_ 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.