PageSourceSearch

https://francofia.com/_next/static/chunks/10747.b1115acf8393f72a.js

js francofia.com collected 2026-09-24 14:43:37 UTC 5,245 bytes, 7 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[10747],{5257:(e,t,r)=>{r.d(t,{Z:()=>n});function n(e){return String(e??"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#39;")}},10747:(e,t,r)=>{r.r(t),r.d(t,{default:()=>u});var n=r(95155),a=r(12115),o=r(67378),i=r(5257);function l(e){let t=/^var\((--[\w-]+)\)$/.exec(e);return t&&getComputedStyle(document.documentElement).getPropertyValue(t[1]).trim()||e}let c="gm-script";function s(e,t){let r=window.google.maps;t.forEach(t=>{if(!t.lat||!t.lng||isNaN(t.lat)||isNaN(t.lng))return;let n=function(e){if(e.is_existing_client)return"var(--ok)";switch(e.type){case"ferreteria":return"#3b82f6";case"corraloneria":return"#f97316";case"sanitarios":return"#8b5cf6";case"obra":return"#eab308";case"constructora":return"#78350f";default:return"var(--ink-3)"}}(t),a=new r.Marker({position:{lat:t.lat,lng:t.lng},map:e,icon:{url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 18 18"><circle cx="9" cy="9" r="7.5" fill="${l(n)}" stroke="white" stroke-width="2.5"/></svg>`),scaledSize:new r.Size(18,18),anchor:new r.Point(9,9)},title:t.name}),o=(t.whatsapp_number||"").replace(/[^\d+]/g,"").replace(/^\+/,""),c=o?`<a href="https://wa.me/${(0,i.Z)(o)}" target="_blank" rel="noreferrer" style="color:var(--ok);font-weight:500">WhatsApp</a>`:"",s=`<a href="https://www.google.com/maps/dir/?api=1&destination=${t.lat},${t.lng}" target="_blank" rel="noreferrer" style="color:var(--brand-700);font-weight:500">📍 C\xf3mo llegar</a>`,u=new r.InfoWindow({content:`<div style="min-width:180px;font-size:13px;line-height:1.7;color:var(--ink);font-family:system-ui">
2        <b>${(0,i.Z)(t.name)}</b><br/>
3        ${(0,i.Z)(t.type)} \xb7 ${(0,i.Z)(t.locality)}<br/>
4        ${t.phone?(0,i.Z)(t.phone)+"<br/>":""}
5        ${t.is_existing_client?`<span style="color:var(--warn);font-size:11px">⚠ Ya es cliente — ${t.client_codigo?`c\xf3d <b>${(0,i.Z)(t.client_codigo)}</b>`:"<b>alta pendiente</b> (sin c\xf3digo Tango)"}${t.client_base?` \xb7 base <b>${(0,i.Z)(t.client_base)}</b>`:""}</span><br/>`:""}
6        ${s}${c?" \xb7 "+c:""}
7      </div>`});a.addListener("click",()=>u.open(e,a))})}function u({prospects:e}){let{toast:t}=(0,o.d)(),r=(0,a.useRef)(null),i=(0,a.useRef)(null),d=(0,a.useRef)(null);return(0,a.useEffect)(()=>{if(!r.current)return;let e="AIzaSyDnRCKqjZOpZc8-ki2DwWvFq-iWQXxSfX4";if(!e)return void console.warn("[MapView] NEXT_PUBLIC_GOOGLE_MAPS_API_KEY no configurada");let t=!1;return new Promise((t,r)=>{let n=window;if(n.google?.maps)return t();let a=document.getElementById(c);if(a){let e=setInterval(()=>{n.google?.maps&&(clearInterval(e),t())},100),o=setTimeout(()=>{clearInterval(e),r(Error("Google Maps timeout"))},15e3);a.addEventListener("load",()=>{clearInterval(e),clearTimeout(o),t()}),a.addEventListener("error",()=>{clearInterval(e),clearTimeout(o),r(Error("Google Maps load error"))});return}let o=document.createElement("script");o.id=c,o.src=`https://maps.googleapis.com/maps/api/js?key=${e}&libraries=visualization`,o.async=!0,o.onload=()=>t(),o.onerror=()=>r(Error("Google Maps load error")),document.head.appendChild(o)}).then(()=>{if(t||!r.current)return;let e=window.google.maps;i.current||(i.current=new e.Map(r.current,{center:{lat:-34.6,lng:-58.4},zoom:11,mapTypeId:"roadmap"})),d.current&&d.current.length>0&&(s(i.current,d.current),d.current=null)}).catch(e=>{t||console.error("[MapView] error cargando Google Maps:",e)}),()=>{t=!0,i.current=null}},[]),(0,a.useEffect)(()=>{if(!e||0===e.length)return;let t=window?.google?.maps;i.current&&t?s(i.current,e):d.current=e},[e]),(0,n.jsxs)("div",{className:"bg-[var(--surface)] rounded shadow overflow-hidden relative",children:[0===e.length&&(0,n.jsx)("div",{className:"p-8 text-center text-[var(--text-muted)] text-sm",children:"No hay prospects con coordenadas disponibles."}),(0,n.jsxs)("button",{type:"button",onClick:()=>{navigator.geolocation?navigator.geolocation.getCurrentPosition(e=>{let t=i.current,r=window.google?.maps;if(!t||!r)return;
7let n={lat:e.coords.latitude,lng:e.coords.longitude},a=l("var(--brand-500)");t.panTo(n),t.setZoom(15),new r.Marker({position:n,map:t,icon:{url:"data:image/svg+xml;charset=UTF-8,"+encodeURIComponent(`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="22" height="22"><circle cx="12" cy="12" r="9" fill="${a}" fill-opacity="0.25"/><circle cx="12" cy="12" r="5" fill="${a}" stroke="white" stroke-width="2"/></svg>`),scaledSize:new r.Size(22,22),anchor:new r.Point(11,11)},title:"Tu ubicaci\xf3n"})},e=>t({title:"No se pudo obtener tu ubicaci\xf3n",description:e.message,type:"error"}),{enableHighAccuracy:!0,timeout:1e4}):t({title:"Tu navegador no soporta geolocalizaci\xf3n",type:"error"})},className:"absolute top-3 right-3 z-10 bg-[var(--surface)] shadow-md rounded-full px-3 py-2 text-sm font-medium text-[var(--text-primary)] hover:bg-[var(--surface)] flex items-center gap-1.5",title:"Centrar en mi ubicaci\xf3n",children:[(0,n.jsx)("span",{children:"\uD83D\uDCCD"})," Mi ubicaci\xf3n"]}),(0,n.jsx)("div",{ref:r,style:{height:"calc(100vh - 220px)",minHeight:"600px",width:"100%"}})]})}}}]);

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.