1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[30629],{30629:(e,s,t)=>{t.r(s),t.d(s,{default:()=>o});var l=t(95155),r=t(12115);function n({items:e,userRank:s,businessName:t,businessPlaceId:r,onBusinessClick:n}){let a=(t||"").toLowerCase().trim(),o=[...e].sort((e,s)=>e.rank-s.rank),i=!!r&&e.some(e=>e.place_id===r);return(0,l.jsx)("div",{className:"space-y-0.5",children:o.map((e,t)=>{let o=i?!!(e.place_id&&e.place_id===r):a&&(e.title||"").toLowerCase().trim()===a||null!==s&&e.rank===s,d=function(e){let s=null,t=e.reviews??null;if("number"!=typeof e.rating||isNaN(e.rating)){if(e.rating&&"object"==typeof e.rating){let l=e.rating;"number"==typeof l.value&&(s=l.value),"number"==typeof l.votes_count&&null==t&&(t=l.votes_count)}}else s=e.rating;return null!=s?{rating:s,reviews:t}:null}(e),c=null!=e.lat&&null!=e.lng,x=e.place_id?`https://www.google.com/maps/place/?q=place_id:${e.place_id}`:`https://www.google.com/maps/search/${encodeURIComponent(e.title+(e.address?" "+e.address:""))}`,h=c&&n;return(0,l.jsxs)("div",{role:h?"button":void 0,tabIndex:h?0:void 0,onClick:h?()=>n(e.lat,e.lng,e.title):void 0,onKeyDown:h?s=>{("Enter"===s.key||" "===s.key)&&(s.preventDefault(),n(e.lat,e.lng,e.title))}:void 0,className:`flex items-start gap-2.5 px-3 py-2 rounded-lg text-sm ${o?"bg-violet-50 border-l-2 border-violet-500 pl-2.5":"hover:bg-gray-50"} ${h?"cursor-pointer":""}`,title:h?`Show ${e.title} on map`:void 0,children:[(0,l.jsxs)("span",{className:"text-gray-400 font-semibold text-xs w-5 text-right flex-shrink-0 mt-0.5 tabular-nums",children:[t+1,"."]}),(0,l.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,l.jsx)("span",{className:`font-medium truncate ${o?"text-violet-700":"text-gray-900"}`,children:e.title}),(0,l.jsx)("a",{href:x,target:"_blank",rel:"noopener noreferrer",onClick:e=>e.stopPropagation(),className:"text-gray-300 hover:text-gray-500 flex-shrink-0 transition-colors",title:`View ${e.title} on Google Maps`,children:(0,l.jsx)("svg",{className:"w-3.5 h-3.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14"})})})]}),e.category&&(0,l.jsx)("div",{className:"text-xs text-gray-400 truncate",children:e.category}),e.address&&(0,l.jsx)("div",{className:"text-xs text-gray-400 truncate",children:e.address})]}),d&&(0,l.jsxs)("div",{className:"flex items-center gap-1 text-xs text-gray-500 flex-shrink-0 mt-0.5",children:[(0,l.jsx)("span",{className:"text-amber-500",children:"â
"}),(0,l.jsx)("span",{children:d.rating.toFixed(1)}),null!=d.reviews&&(0,l.jsxs)("span",{className:"text-gray-400",children:["(",d.reviews.toLocaleString(),")"]})]})]},t)})})}function a({points:e}){let s=(0,r.useMemo)(()=>{let s=0,t=0,l=0,r=0,n=0;for(let a of e)null===a.rank_position?n++:a.rank_position<=3?s++:a.rank_position<=7?t++:a.rank_position<=13?l++:r++;return[{label:"Top 3",count:s,color:"bg-green-500",textColor:"text-green-700"},{label:"4-7",count:t,color:"bg-yellow-400",textColor:"text-yellow-700"},{label:"8-13",count:l,color:"bg-orange-500",textColor:"text-orange-700"},{label:"14-20",count:r,color:"bg-red-500",textColor:"text-red-600"},{label:"Not found",count:n,color:"bg-gray-300",textColor:"text-gray-500"}]},[e]),t=e.length||1;return(0,l.jsxs)("div",{className:"flex flex-col h-full",children:[(0,l.jsxs)("div",{className:"px-4 pt-4 pb-3 flex-shrink-0",children:[(0,l.jsx)("h4",{className:"text-sm font-semibold text-gray-900 mb-1",children:"Rank Distribution"}),(0,l.jsxs)("p",{className:"text-xs text-gray-400",children:["How you rank across ",e.length," scan locations"]})]}),(0,l.jsx)("div",{className:"px-4 space-y-2.5 flex-shrink-0",children:s.map(s=>(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex justify-between text-xs mb-1",children:[(0,l.jsx)("span",{className:"text-gray-600 font-medium",children:s.label}),(0,l.jsxs)("span",{className:`font-semibold tabular-nums ${s.textColor}`,children:[s.count,"/",e.length]})]}),(0,l.jsx)("div",{className:"h-2 bg-gray-100 rounded-full overflow-hidden",children:(0,l.jsx)("div",{className:`h-full rounded-full ${s.color} transition-all duration-500`,style:{width:`${s.count/t*100}%`}})})]},s.label))}),(0,l.jsx)("div",{className:"px-4 py-4 mt-auto flex-shrink-0",children:(0,l.jsxs)("div",{className:"flex items-center gap-2 text-xs text-gray-400",children:[(0,l.jsx)("svg",{className:"w-4 h-4 flex-shrink-0",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,l.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M15 15l-2 5L9 9l11 4-5 2zm0 0l5 5M7.188 2.239l.777 2.897M5.136 7.965l-2.898-.777M13.95 4.05l-2.122 2.122m-5.657 5.656l-2.12 2.122"})}),(0,l.jsx)("span",{children:"Click a map pin to see who ranks there"})]})})]})}function o({selectedPoint:e,points:s,gridSize:t,gridLocations:r,businessName:o,businessPlaceId:i,onBusinessClick:d}){var c,x;if(!e)return(0,l.jsx)("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden h-full flex flex-col",children:(0,l.jsx)(a,{points:s})});let h=e.is_center||e.grid_row===Math.floor(t/2)&&e.grid_col===Math.floor(t/2),m=`${e.grid_row}-${e.grid_col}`,u=r?.[m],p=e.serp_results,g=p&&p.length>0,f="Unknown location";return h?f="Your Business Location":e.neighborhood_name?f=e.neighborhood_name:u?.neighborhood&&"Unknown"!==u.neighborhood&&(f=u.neighborhood),(0,l.jsxs)("div",{className:"bg-white rounded-xl border border-gray-200 overflow-hidden h-full flex flex-col",children:[(0,l.jsxs)("div",{className:"px-4 py-3 border-b border-gray-100 flex-shrink-0",children:[(0,l.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,l.jsxs)("div",{children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[h&&(0,l.jsx)("span",{className:"w-2 h-2 rounded-full bg-violet-500 flex-shrink-0"}),(0,l.jsx)("h4",{className:"text-sm font-semibold text-gray-900",children:f})]}),h?(0,l.jsx)("span",{className:"text-xs text-gray-400",children:"Searching from your address"}):u?.zipCode?(0,l.jsx)("span",{className:"text-xs text-gray-400",children:u.zipCode}):null]}),u&&!h&&(0,l.jsxs)("span",{className:"text-xs text-gray-400 flex-shrink-0 tabular-nums",children:[Number(u.distanceMi).toFixed(1)," mi"]})]}),(0,l.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,l.jsx)("span",{className:"w-2.5 h-2.5 rounded-full flex-shrink-0",style:{backgroundColor:null===(c=e.rank_position)?"#d1d5db":c<=3?"#22c55e":c<=7?"#facc15":c<=13?"#f97316":"#ef4444"}}),(0,l.jsx)("span",{className:`text-sm font-semibold ${null!==e.rank_position?"text-gray-900":"text-gray-400"}`,children:null!==e.rank_position?`Rank #${e.rank_position}`:"Not in top 20"}),(0,l.jsx)("span",{className:`text-xs font-medium px-2 py-0.5 rounded-full ${null===(x=e.rank_position)?"bg-gray-100 text-gray-500":x<=3?"bg-green-100 text-green-700":x<=7?"bg-yellow-100 text-yellow-700":x<=13?"bg-orange-100 text-orange-700":"bg-red-100 text-red-600"}`,children:null===e.rank_position?"Not Found":e.rank_position<=3?"Top 3":e.rank_position<=7?"Visible":e.rank_position<=13?"Low":"Very Low"})]})]}),(0,l.jsx)("div",{className:"flex-1 overflow-y-auto",children:g?(0,l.jsxs)("div",{className:"p-2",children:[(0,l.jsx)("div",{className:"px-3 py-1.5",children:(0,l.jsx)("h5",{className:"text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Top businesses here"})}),(0,l.jsx)(n,{items:p,userRank:e.rank_position,businessName:o,businessPlaceId:i,onBusinessClick:d})]}):(0,l.jsx)("div",{className:"px-4 py-8 text-center text-gray-400 text-sm",children:"No competitor data for this location. Run a new scan to see who ranks here."})})]})}}}]);
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.