PageSourceSearch

https://www.shuttleglobal.com/_astro/CoverageBand.astro_astro_type_script_index_0_lang.BYt4JuyK.js

js shuttleglobal.com collected 2026-09-30 20:35:41 UTC 5,309 bytes, 1 lines download raw bytes

1function ot(){const a=document.querySelector("[data-coverage-map]");if(!a||a.dataset.mapReady)return;a.dataset.mapReady="1";const u=JSON.parse(a.dataset.markets||"[]"),g=new IntersectionObserver(w=>{w.some(s=>s.isIntersecting)&&(g.disconnect(),fetch("/maps/land-dots.json").then(s=>s.json()).then(s=>{a.isConnected&&Mt(a,u,s)}).catch(()=>{}))},{rootMargin:"600px 0px"});g.observe(a)}document.addEventListener("astro:page-load",ot);ot();function Mt(a,u,g){const w=a.getContext("2d");if(!w||!u.length)return;const s=g.bounds,U=g.step,at={lat:33,lon:-38},st=new Path2D("M0.8 300.8H100.8V200.8H199.2V399.2H99.2V499.2H0.8ZM300.8 0.8H399.2V100.8H499.2V199.2H399.2V299.2H300.8Z"),rt='CircularStd, "CircularStd Fallback", Arial, sans-serif',it=matchMedia("(prefers-reduced-motion: reduce)"),R=3e3,ct=520;let f=0,p=0,d=1,T=0,k=!1,M=0,q=0,O=300,I=[],y=[];const C=document.createElement("canvas");let E="";const S=t=>[(t.lon-s.lonMin)/(s.lonMax-s.lonMin)*f,(s.latMax-t.lat)/(s.latMax-s.latMin)*p],Z=t=>t<.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2,lt=t=>1-Math.pow(1-t,3),H=t=>Math.max(0,Math.min(1,t)),J=()=>Math.max(.7,Math.min(1.3,f/1e3));function V(){const t=a.getBoundingClientRect();f=t.width,p=t.height,d=Math.min(2,devicePixelRatio||1),a.width=Math.round(f*d),a.height=Math.round(p*d),w.setTransform(d,0,0,d,0,0)}function ft(){const t=`${f}x${p}@${d}`,e=C.getContext("2d")?.isContextLost?.();if(t===E&&!e)return C;C.width=Math.round(f*d),C.height=Math.round(p*d);const n=C.getContext("2d");n.setTransform(d,0,0,d,0,0);const i=U/(s.lonMax-s.lonMin)*f,b=U/(s.latMax-s.latMin)*p,l=Math.max(.9,i*.3);n.fillStyle="#34377f",n.beginPath();for(let r=0;r<g.land.length;r+=2){const c=g.land[r]*i,o=g.land[r+1]*b;n.moveTo(c+l,o),n.arc(c,o,l,0,Math.PI*2)}n.fill();const h=J();for(const r of u){const[c,o]=S(r),P=n.createRadialGradient(c,o,0,c,o,9*h);P.addColorStop(0,"rgba(255,190,0,.35)"),P.addColorStop(1,"rgba(255,190,0,0)"),n.fillStyle=P,n.beginPath(),n.arc(c,o,9*h,0,Math.PI*2),n.fill()}n.fillStyle="#ffcf4d",n.beginPath();for(const r of u){const[c,o]=S(r);n.moveTo(c+2*h,o),n.arc(c,o,2*h,0,Math.PI*2)}return n.fill(),E=t,C}const dt=()=>25,Y=25,A=2,ht=()=>Y-A/2;function ut(t,e){const n=Math.hypot(e[0]-t[0],e[1]-t[1]),i=[(t[0]+e[0])/2,(t[1]+e[1])/2-n*.32],b=Y+5,l=Math.hypot(i[0]-t[0],i[1]-t[1])||1;return{a:[t[0]+(i[0]-t[0])/l*b,t[1]+(i[1]-t[1])/l*b],b:e,c:i}}function $(t,e){const n=1-e;return[n*n*t.a[0]+2*n*e*t.c[0]+e*e*t.b[0],n*n*t.a[1]+2*n*e*t.c[1]+e*e*t.b[1]]}function mt(){if(!y.length){y=u.map((t,e)=>e);for(let t=y.length-1;t>0;t--){const e=Math.floor(Math.random()*(t+1));[y[t],y[e]]=[y[e],y[t]]}}return y.pop()}function x(){const t=w,e=J();t.clearRect(0,0,f,p),t.drawImage(ft(),0,0,f,p);const n=S(at);for(const h of I){const r=M-h.t,c=u[h.i],o=ut(n,S(c)),P=H(r/1100),tt=Z(P),F=Z(H((r-350)/1100)),G=1-H((r-(R-600))/600),et=$(o,F),L=$(o,tt),W=t.createLinearGradient(et[0],et[1],L[0],L[1]);W.addColorStop(0,"rgba(255,190,0,0)"),W.addColorStop(1,`rgba(255,214,110,${.9*G})`),t.strokeStyle=W,t.lineWidth=1.6*e,t.lineCap="round",t.beginPath();for(let v=0;v<=28;v++){const m=$(o,F+(tt-F)*(v/28));v===0?t.moveTo(m[0],m[1]):t.lineTo(m[0],m[1])}if(t.stroke(),t.save(),t.globalAlpha=.18*G,t.strokeStyle="#ffbe00",t.lineWidth=e,t.beginPath(),t.moveTo(o.a[0],o.a[1]),t.quadraticCurveTo(o.c[0],o.c[1],o.b[0],o.b[1]),t.stroke(),t.restore(),P<1)t.save(),t.shadowColor="rgba(255,220,130,1)",t.shadowBlur=12*e,t.fillStyle="#fff4d1",t.beginPath(),t.arc(L[0],L[1],2.4*e,0,Math.PI*2),t.fill(),t.restore();else{const v=H((r-1100)/1400),[m,j]=o.b;t.strokeStyle=`rgba(255,190,0,${.8*(1-v)})`,t.lineWidth=1.4*e,t.beginPath(),t.arc(m,j,(3+16*lt(v))*e,0,Math.PI*2),t.stroke(),t.save(),t.globalAlpha=H((r-1100)/300)*G,t.font=`700 ${Math.round(12.5*e)}px ${rt}`;const _=t.measureText(c.n).width,nt=m+9*e+_>f?m-9*e-_:m+9*e;t.fillStyle="rgba(16,16,46,.85)",t.fillRect(nt-4*e,j-9*e,_+8*e,18*e),t.fillStyle="#ffffff",t.textBaseline="middle",t.textAlign="left",t.fillText(c.n,nt,j+.5),t.restore()}}const i=dt(),b=Math.round(n[0]),l=Math.round(n[1]);t.beginPath(),t.arc(b,l,ht(),0,Math.PI*2),t.lineWidth=A,t.strokeStyle="#ffffff",t.stroke(),t.save(),t.translate(b-i/2,l-i/2),t.scale(i/500,i/500),t.fillStyle="#ffffff",t.fill(st),t.restore(
1)}function N(t){if(k){if(!a.isConnected){z();return}if(M+=Math.min(50,t-q),q=t,M>=O){const e=mt(),[n,i]=S(u[e]);I.some(l=>{const[h,r]=S(u[l.i]);return Math.hypot(h-n,r-i)<120&&M-l.t<R})?O=M+60:(I.push({i:e,t:M}),O=M+ct+Math.random()*380)}I=I.filter(e=>M-e.t<R),x(),T=requestAnimationFrame(N)}}function gt(){if(it.matches)return x();k||(k=!0,q=performance.now(),T=requestAnimationFrame(N))}function z(){k=!1,cancelAnimationFrame(T)}V(),x();const Q=new IntersectionObserver(t=>t.forEach(e=>e.isIntersecting?gt():z()),{threshold:.15});Q.observe(a);const X=()=>{if(!a.isConnected)return B();V(),x()},D=()=>{if(!a.isConnected)return B();document.visibilityState==="visible"&&(E="",x())},pt=()=>{E="",V(),x()};function B(){z(),Q.disconnect(),removeEventListener("resize",X),document.removeEventListener("visibilitychange",D),document.removeEventListener("astro:before-swap",K)}const K=()=>B();addEventListener("resize",X),document.addEventListener("visibilitychange",D),document.addEventListener("astro:before-swap",K),a.addEventListener("contextrestored",pt),document.fonts?.ready.then(()=>{!k&&a.isConnected&&x()})}

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.