PageSourceSearch

https://app.bixie.ai/_next/static/chunks/22274.c7f8cdd2ef325c9e.js

js bixie.ai collected 2026-10-05 13:30:51 UTC 6,561 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[22274],{18162:()=>{},22274:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UIMap:()=>m});var r=n(54568);n(18162);var a=n(7620);let l=new Set(["driving","walking","cycling"]),o='\n<svg width="26" height="38" viewBox="0 0 26 38" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">\n  <path d="M13 0C5.82 0 0 5.82 0 13c0 9.2 11.1 23.2 12.02 24.36a1.25 1.25 0 0 0 1.96 0C14.9 36.2 26 22.2 26 13 26 5.82 20.18 0 13 0Z" fill="#2563eb"/>\n  <circle cx="13" cy="13" r="5" fill="#fff"/>\n</svg>'.trim();function i(e){return"number"==typeof e&&Number.isFinite(e)}function s(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}function c(e){return Array.isArray(e)?e.filter(e=>{if(!e||"object"!=typeof e)return!1;let t=i(e.lat)&&i(e.lng),n="string"==typeof e.address&&e.address.trim().length>0;return t||n}):[]}async function d(e,t){let n="".concat("https://nominatim.openstreetmap.org/search","?format=jsonv2&limit=1&q=").concat(encodeURIComponent(e));try{let e=await fetch(n,{signal:t,headers:{Accept:"application/json"}});if(!e.ok)return null;let r=await e.json(),a=Array.isArray(r)?r[0]:void 0;if(!a)return null;let l=Number.parseFloat(String(a.lat)),o=Number.parseFloat(String(a.lon));return Number.isFinite(l)&&Number.isFinite(o)?{lat:l,lng:o}:null}catch(e){return null}}async function u(e,t){return(await Promise.all(e.map(async e=>{var n;let r=null;return(i(e.lat)&&i(e.lng)?r={lat:e.lat,lng:e.lng}:"string"==typeof e.address&&e.address.trim()&&(r=await d(e.address.trim(),t)),r)?{...r,label:null!=(n=e.label)?n:e.address?String(e.address):void 0,description:e.description}:null}))).filter(e=>null!==e)}async function p(e,t,n){if(e.length<2)return null;let r=e.map(e=>[e.lat,e.lng]),a=l.has(t)?t:"driving",o=e.map(e=>"".concat(e.lng,",").concat(e.lat)).join(";"),i="".concat("https://router.project-osrm.org/route/v1","/").concat(a,"/").concat(o,"?overview=full&geometries=geojson");try{var s,c,d,u;let e=await fetch(i,{signal:n,headers:{Accept:"application/json"}});if(!e.ok)return{line:r,distance:0,duration:0,routed:!1};let t=null==(s=(await e.json()).routes)?void 0:s[0],a=null==t||null==(c=t.geometry)?void 0:c.coordinates;if(!Array.isArray(a)||0===a.length)return{line:r,distance:0,duration:0,routed:!1};return{line:a.map(e=>{let[t,n]=e;return[n,t]}),distance:null!=(d=null==t?void 0:t.distance)?d:0,duration:null!=(u=null==t?void 0:t.duration)?u:0,routed:!0}}catch(e){return{line:r,distance:0,duration:0,routed:!1}}}function m(e){let{title:t,center:l,zoom:d,markers:m,route:g,geojson:f,height:h}=e,b=(0,a.useRef)(null),[x,y]=(0,a.useState)("loading"),[v,w]=(0,a.useState)(null),j=(0,a.useMemo)(()=>c(m),[m]),N=(0,a.useMemo)(()=>(function(e){if(!e||"object"!=typeof e)return null;let t=c(e.waypoints);return t.length<2?null:{waypoints:t,profile:e.profile,color:e.color,showWaypoints:e.showWaypoints}})(g),[g]),k=Math.min(720,Math.max(200,i(h)?h:360)),M=!!l&&i(l.lat)&&i(l.lng),S=(0,a.useMemo)(()=>JSON.stringify({center:l,zoom:d,candidates:j,routeSpec:N,geojson:f}),[l,d,j,N,f]);return(0,a.useEffect)(()=>{let e,t=b.current;if(!t)return;let r=!1,a=new AbortController;return y("loading"),w(null),(async()=>{let[{default:c},m,g]=await Promise.all([n.e(89031).then(n.t.bind(n,29742,23)),u(j,a.signal),N?u(N.waypoints,a.signal):Promise.resolve([])]);if(r||!b.current)return;let h=c.map(t,{scrollWheelZoom:!1,attributionControl:!0});c.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{maxZoom:19,attribution:'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'}).addTo(h);let x=c.divIcon({html:o,className:"bx-map-marker",iconSize:[26,38],iconAnchor:[13,38],popupAnchor:[0,-34]}),v=c.latLngBounds([]),k=e=>{let t=c.marker([e.lat,e.lng],{icon:x}).addTo(h),n=[];e.label&&n.push("<strong>".concat(s(String(e.label)),"</strong>")),e.description&&n.push("<span>".concat(s(String(e.description)),"</span>")),n.length>0&&t.bindPopup('<div class="bx-map-popup">'.concat(n.join("<br/>"),"</div>")),v.extend([e.lat,e.lng])};for(let e of m)k(e);if(N&&g.length>=2){var S,A;
1let e=await p(g,null!=(S=N.profile)?S:"driving",a.signal);if(!r&&e&&e.line.length>0){let t=c.polyline(e.line,{color:N.color||"#2563eb",weight:4,opacity:.85}).addTo(h).getBounds();if(t.isValid()&&v.extend(t),!1!==N.showWaypoints)for(let e of g)k(e);e.routed&&e.distance>0&&w({distance:(A=e.distance)>=1e3?"".concat((A/1e3).toFixed(A>=1e4?0:1)," km"):"".concat(Math.round(A)," m"),duration:function(e){let t=Math.round(e/60);if(t<60)return"".concat(t," min");let n=Math.floor(t/60),r=t%60;return r>0?"".concat(n," h ").concat(r," min"):"".concat(n," h")}(e.duration),approximate:!1})}}if(f&&"object"==typeof f)try{let e=c.geoJSON(f,{style:{color:"#2563eb",weight:2,fillOpacity:.15}}).addTo(h).getBounds();e.isValid()&&v.extend(e)}catch(e){}M&&l?h.setView([l.lat,l.lng],i(d)?d:13):v.isValid()?h.fitBounds(v,{padding:[32,32],maxZoom:16}):h.setView([20,0],2),y(m.length>0||v.isValid()||M?"ready":"empty");let C=setTimeout(()=>{r||h.invalidateSize()},60);e=()=>{clearTimeout(C),h.remove()}})(),()=>{r=!0,a.abort(),null==e||e()}},[S,k]),(0,r.jsxs)("div",{className:"my-3",children:[t&&(0,r.jsx)("p",{className:"text-xs font-medium text-muted-foreground mb-1.5 px-0.5",children:t}),(0,r.jsxs)("div",{className:"relative rounded-xl overflow-hidden border border-border/60 bg-muted/20",children:[(0,r.jsx)("div",{ref:b,style:{height:k},className:"w-full bg-muted font-sans",role:"application","aria-label":t?"Map: ".concat(t):"Map"}),"loading"===x&&(0,r.jsx)("div",{className:"absolute inset-0 z-[500] flex items-center justify-center bg-muted/60 backdrop-blur-[1px] pointer-events-none",children:(0,r.jsx)("span",{className:"text-xs font-medium text-muted-foreground animate-text-shimmer",children:"Locating…"})}),"empty"===x&&(0,r.jsx)("div",{className:"absolute inset-0 z-[500] flex items-center justify-center bg-muted/80 px-4 text-center pointer-events-none",children:(0,r.jsx)("span",{className:"text-xs text-muted-foreground",children:"Couldn’t locate the requested place on the map."})}),v&&"ready"===x&&(0,r.jsxs)("div",{className:"absolute bottom-2 left-2 z-[500] rounded-lg border border-border/60 bg-background/90 px-2.5 py-1 text-xs font-medium text-foreground shadow-sm backdrop-blur",children:[(0,r.jsx)("span",{className:"tabular-nums",children:v.distance}),(0,r.jsx)("span",{className:"mx-1 text-muted-foreground/60","aria-hidden":!0,children:"\xb7"}),(0,r.jsx)("span",{className:"tabular-nums",children:v.duration})]})]})]})}}}]);

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.