1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[32286],{29660:(e,t,o)=>{o.d(t,{Ks:()=>w,Lm:()=>g,Ng:()=>d,oU:()=>f});var n=o(52873);let a={geolocation:{label:"Geolocation",description:"Core where-is-this-image workflow.",color:"#3b82f6"},"property-search":{label:"Property Search",description:"Geo + parcel refinement workflow.",color:"#a1a1aa",badge:"Live"},orca15:{label:"Orca 1.5",description:"Our most advanced geolocation model.",color:"#06b6d4",badge:"Advanced"},unknown:{label:"Other",description:"Unclassified workflow.",color:"#71717a"}},i={all:"All Surfaces",atlanta:"Atlanta",boston:"Boston",chicago:"Chicago",global:"Global",lagos:"Lagos",lisbon:"Lisbon",london:"London",madrid:"Madrid",memphis:"Memphis","mexico-city":"Mexico City",miami:"Miami","miami-satellite":"Miami Satellite",nyc:"New York",paris:"Paris","rio-de-janeiro":"Rio de Janeiro","san-francisco":"San Francisco","sao-paulo":"Sao Paulo",tijuana:"Tijuana",unknown:"Unknown"},l=["geolocation","property-search","orca15","unknown"];function r(e){if("number"==typeof e&&Number.isFinite(e))return e;if("string"==typeof e){let t=Number(e);return Number.isFinite(t)?t:null}return null}function s(e,t){if(0===e.length)return null;let o=[...e].sort((e,t)=>e-t),n=Math.min(o.length-1,Math.max(0,Math.ceil(o.length*t)-1));return Math.round(o[n])}function c(e){if(null==e)return null;let t=r(e);return null===t?null:t<=1?Math.max(0,Math.min(100,Math.round(100*t))):Math.max(0,Math.min(100,Math.round(t)))}function d(e){return a[e]}function u(e){if(!e)return"unknown";let t=e.toLowerCase().trim().replace(/_/g,"-").replace(/\s+/g,"-");return"new-york"===t?"nyc":"worldwide"===t||"geo-estimation"===t?"global":t||"unknown"}function g(e){let t=("string"==typeof e?e:"string"==typeof e?.analysisMode?e.analysisMode:"").toLowerCase().trim(),o="object"==typeof e&&null!==e?e.analysisResults:null,n=["string"==typeof o?.model?o.model:"","string"==typeof o?.aiModel?o.aiModel:""].join(" ").toLowerCase();return t.includes("property-search")||t.includes("property_search")||t.includes("interior")?"property-search":t.includes("orca15")||t.includes("orca-1.5")||t.includes("orca2")||t.includes("orca-2")||t.includes("flamingo")||n.includes("orca-1.5")||n.includes("orca-2")||n.includes("flamingo")?"orca15":""===t||"default"===t||"orca"===t||"geo-estimation"===t||"geo_estimation"===t||"geolocation"===t||"location-analysis"===t?"geolocation":"unknown"}function f(e){return e&&l.includes(e)?e:null}function m(e){return"property-search"===e?n.w9.property_search:n.w9.location_analysis}function w(e,t){let o=Math.max(1,t?.timelineDays??14),n=Date.now(),d=[],f=new Map,w=new Date;w.setHours(0,0,0,0);for(let e=o-1;e>=0;e-=1){let t=new Date(w.getTime()-864e5*e),o=t.toISOString().slice(0,10);d.push(o),f.set(o,{dateKey:o,label:t.toLocaleDateString("en-US",{month:"short",day:"numeric"}),count:0,creditsUsed:0,workflows:{geolocation:0,"property-search":0,orca15:0,unknown:0},cities:{}})}let h=new Map,p=new Map,y=[],b=[],S=0,x=null,M=0;for(let t of e){let e=g(t),o=u(t.city),a=function(e){let t=e.createdAt??e.timestamp;if(!t)return null;let o=t instanceof Date?t.getTime():new Date(t).getTime();return Number.isFinite(o)?o:null}(t),i=c(t.confidenceScore)??c(t.analysisResults?.geolocation&&"object"==typeof t.analysisResults.geolocation?t.analysisResults.geolocation.confidence:null)??c(t.analysisResults?.confidence),l=r(t.processingTimeMs),s=m(e);S+=s;let d=h.get(o)??{count:0,creditsUsed:0,lastTimestamp:null};d.count+=1,d.creditsUsed+=s,d.lastTimestamp=null!==a?null===d.lastTimestamp?a:Math.max(d.lastTimestamp,a):d.lastTimestamp,h.set(o,d);let w=p.get(e)??{count:0,confidenceSum:0,confidenceCount:0};if(w.count+=1,null!==i&&(w.confidenceSum+=i,w.confidenceCount+=1,y.push(i)),p.set(e,w),null!==l&&l>=0&&b.push(l),null!==a){x=null===x?a:Math.max(x,a),a>=n-6048e5&&(M+=1);let t=new Date(a).toISOString().slice(0,10),i=f.get(t);i&&(i.count+=1,i.creditsUsed+=s,i.workflows[e]+=1,i.cities[o]=(i.cities[o]||0)+1)}}let v=e.length,N=y.filter(e=>e>=90).length,V=y.filter(e=>e>=75&&e<90).length,C=y.filter(e=>e>=50&&e<75).length,L=y.filter(e=>e<50).length,k=e=>y.length>0?Math.round(e/y.length*100):0,D=d.map(e=>f.get(e)).filter(e=>!!e),R=D.filter(e=>e.count>0).length,j=(p.get("geolocation")?.count||0)+(p.get("orca15")?.count||0),$=p.get("property-search")?.count||0;return{byCity:Array.from(h.entries()).map(([e,t])=>{let o;return{slug:e,label:i[o=u(e)]??o,count:t.count,creditsUsed:t.creditsUsed,lastTimestamp:t.lastTimestamp}}).sort((e,t)=>
1t.count-e.count),byWorkflow:l.map(e=>{let t=p.get(e)??{count:0,confidenceSum:0,confidenceCount:0},o=a[e];return{id:e,label:o.label,description:o.description,color:o.color,badge:o.badge,count:t.count,accuracy:t.confidenceCount>0?Math.round(t.confidenceSum/t.confidenceCount):null,creditsUsed:t.count*m(e)}}).filter(e=>e.count>0).sort((e,t)=>t.count-e.count),confidence:{overall:y.length>0?Math.round(y.reduce((e,t)=>e+t,0)/y.length):null,bands:{high:k(N),strong:k(V),medium:k(C),low:k(L)},lowConfidenceRate:y.length>0?Math.round(L/y.length*100):null,reviewReadyRate:y.length>0?Math.round((N+V)/y.length*100):null},creditsUsed:S,dailyAverage:R>0?Math.round(v/R):v,latestTimestamp:x,latency:{avgMs:b.length>0?Math.round(b.reduce((e,t)=>e+t,0)/b.length):null,p50Ms:s(b,.5),p95Ms:s(b,.95)},peakDay:D.reduce((e,t)=>Math.max(e,t.count),0),recent7d:M,timeline:D,totalAnalyses:v,weeklyUsage:{batch:Math.max(0,v-j-$),geolocation:j,verification:$}}}},36806:(e,t,o)=>{o.d(t,{A7:()=>l,f4:()=>n});let n="AIzaSyA_9ts5_XfpCrS0Mw-3-9Ii44a9mVZdOsY",a=null,i=null;async function l(){return n||a||i||(i=(async()=>{try{let e=await fetch("/api/config/google-maps");if(e.ok)return a=(await e.json()).apiKey||""}catch(e){console.error("[google-maps-config] Failed to fetch API key:",e)}return""})())}},40184:(e,t,o)=>{async function n(e,t,o={}){let{initialRadius:i=25,maxRadius:l=200,fallbackSteps:r=5,preference:s=window.google?.maps?.StreetViewPreference?.NEAREST,debug:c=!1}=o;if(!window.google?.maps?.StreetViewService)return{found:!1,error:"Google Maps Street View Service not available"};let d=new window.google.maps.StreetViewService,u=new window.google.maps.LatLng(e,t);c&&console.log(`ð£ï¸ Starting enhanced Street View search at: [${e}, ${t}]`);let g=[];for(let e=0;e<r;e++){let t=Math.min(i*Math.pow(1.6,e),l);if(g.push(Math.round(t)),t>=l)break}c&&console.log(`ð Search radii: ${g.join("m, ")}m`);let f=e=>{let t=window.google.maps.geometry.spherical.computeDistanceBetween(u,new window.google.maps.LatLng(e.location.lat,e.location.lng));return c&&console.log(`â
Found Street View ${Math.round(t)}m away at radius ${e.radius}m`),{...e,distance:Math.round(t),searchRadius:e.radius}},m=o=>a(d,{lat:e,lng:t},o,s,c).then(e=>({...e,radius:o}));try{if(g.length){let e=await m(g[0]);if(e.found)return f(e);for(let e of(await Promise.allSettled(g.slice(1).map(m))))if("fulfilled"===e.status&&e.value.found)return f(e.value)}}catch(e){c&&console.warn("â ï¸ Radius search failed:",e)}c&&console.log(`ð Trying alternative Street View preferences...`);try{var w,h,p,y;let o,n=await (w=d,h={lat:e,lng:t},p=l,y=c,o=[window.google.maps.StreetViewPreference.BEST,window.google.maps.StreetViewPreference.NEAREST],new Promise(async e=>{for(let t of o)try{let o=await a(w,h,p,t,y);if(o.found)return void e(o)}catch(e){y&&console.warn("Alternative preference failed:",e)}e({found:!1,error:"No Street View available with any preference"})}));if(n.found){let e=window.google.maps.geometry.spherical.computeDistanceBetween(u,new window.google.maps.LatLng(n.location.lat,n.location.lng));return c&&console.log(`â
Found Street View with alternative preference: ${Math.round(e)}m away`),{...n,distance:Math.round(e),searchRadius:l}}}catch(e){c&&console.warn("â ï¸ Alternative preference search failed:",e)}return c&&console.error(`â No Street View found within ${l}m of: [${e}, ${t}]`),{found:!1,error:`No Street View imagery available within ${l}m radius`}}function a(e,t,o,n,a){return new Promise(a=>{console.log(`ð [Street View Debug] Searching radius ${o}m at [${t.lat}, ${t.lng}]`),e.getPanorama({location:new window.google.maps.LatLng(t.lat,t.lng),radius:o,preference:n},(e,t)=>{if(console.log(`ð [Street View Debug] Radius ${o}m response:`,{status:t,hasData:!!e,hasLocation:!!e?.location,hasLatLng:!!e?.location?.latLng}),t===window.google.maps.StreetViewStatus.OK&&e?.location?.latLng){let t=e.location.latLng,n={found:!0,data:e,location:{lat:t.lat(),lng:t.lng()}};console.log(`â
[Street View Debug] Found at radius ${o}m:`,n.location),a(n)}else console.log(`â ï¸ [Street View Debug] No Street View at radius ${o}m, status: ${t}`),a({found:!1,error:`Status: ${t}`})})})}async function i(e,t,o,a={}){let{panoramaOptions:l={},...r}=a;console.log(`ð [Street View Debug] Starting panorama creation for [${t}, ${o}]`);let s=await n(t,o,r);if(console.log(`ð [Street View Debug] Search result:`,{found:s.found,distance:s.distance,searchR
1adius:s.searchRadius,location:s.location,error:s.error}),!s.found)throw console.warn(`â [Street View Debug] No Street View found: ${s.error}`),Error(s.error||"Street View not available");let c={position:new window.google.maps.LatLng(s.location.lat,s.location.lng),pov:{heading:210,pitch:10},zoom:1,addressControl:!1,linksControl:!1,panControl:!1,enableCloseButton:!1,zoomControl:!1,fullscreenControl:!1,motionTracking:!1,motionTrackingControl:!1};console.log(`ð [Street View Debug] Creating panorama at [${s.location.lat}, ${s.location.lng}]`);let d=window.getComputedStyle(e);console.log(`ð [Street View Debug] Container diagnostics:`,{width:d.width,height:d.height,display:d.display,visibility:d.visibility,position:d.position,zIndex:d.zIndex,clientWidth:e.clientWidth,clientHeight:e.clientHeight,offsetWidth:e.offsetWidth,offsetHeight:e.offsetHeight});let u=new window.google.maps.StreetViewPanorama(e,{...c,...l});return u.addListener("status_changed",()=>{let t=u.getStatus();if(console.log(`ð [Street View Debug] Status changed:`,t),t===window.google.maps.StreetViewStatus.OK){console.log("â
[Street View Debug] Panorama loaded successfully");let t=u.getLocation();t&&console.log(`ð [Street View Debug] Final location:`,{lat:t.latLng.lat(),lng:t.latLng.lng(),description:t.description}),setTimeout(()=>{let t=e.children;console.log(`ð [Street View Debug] Panorama content check:`,{containerHasChildren:t.length>0,childrenCount:t.length,firstChildType:t[0]?.tagName,containerHasScrollHeight:e.scrollHeight>0,containerIsVisible:e.offsetHeight>0&&e.offsetWidth>0});let o=e.querySelectorAll("canvas"),n=e.querySelectorAll('[style*="webgl"], [class*="gm-"], [class*="street"]');console.log(`ð [Street View Debug] Rendering elements:`,{canvasCount:o.length,webglElementsCount:n.length,hasGoogleMapsContent:e.innerHTML.includes("gm-")||e.innerHTML.includes("street")})},1e3)}else console.error("â [Street View Debug] Panorama failed with status:",t)}),u.addListener("pano_changed",()=>{console.log(`ð [Street View Debug] Pano changed:`,u.getPano())}),setTimeout(()=>{u&&(console.log(`ð [Street View Debug] Triggering resize`),window.google.maps.event.trigger(u,"resize"))},250),{panorama:u,result:s}}o.d(t,{uH:()=>n,wt:()=>i})},43447:(e,t,o)=>{o.d(t,{SQ:()=>g,_2:()=>f,mB:()=>m,rI:()=>d,ty:()=>u});var n=o(95155),a=o(12115),i=o(45291),l=o(76721),r=o(64577),s=o(67401),c=o(91337);let d=i.bL,u=i.l9;i.YJ,i.ZL,i.Pb,i.z6,a.forwardRef(({className:e,inset:t,children:o,...a},r)=>(0,n.jsxs)(i.ZP,{ref:r,className:(0,c.cn)("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...a,children:[o,(0,n.jsx)(l.A,{className:"ml-auto h-4 w-4"})]})).displayName=i.ZP.displayName,a.forwardRef(({className:e,...t},o)=>(0,n.jsx)(i.G5,{ref:o,className:(0,c.cn)("z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t})).displayName=i.G5.displayName;let g=a.forwardRef(({className:e,sideOffset:t=4,...o},a)=>(0,n.jsx)(i.ZL,{children:(0,n.jsx)(i.UC,{ref:a,sideOffset:t,className:(0,c.cn)("z-50 min-w-[8rem] overflow-hidden rounded-xl border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...o})}));g.displayName=i.UC.displayName;let f=a.forwardRef(({className:e,inset:t,...o},a)=>(0,n.jsx)(i.q7,{ref:a,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...o}));f.displayName=i.q7.displayName,a.forwardRef(({className:e,children:t,checked:o,...a},l)=>
1(0,n.jsxs)(i.H_,{ref:l,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:o,...a,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(i.VF,{children:(0,n.jsx)(r.A,{className:"h-4 w-4"})})}),t]})).displayName=i.H_.displayName,a.forwardRef(({className:e,children:t,...o},a)=>(0,n.jsxs)(i.hN,{ref:a,className:(0,c.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...o,children:[(0,n.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,n.jsx)(i.VF,{children:(0,n.jsx)(s.A,{className:"h-2 w-2 fill-current"})})}),t]})).displayName=i.hN.displayName,a.forwardRef(({className:e,inset:t,...o},a)=>(0,n.jsx)(i.JU,{ref:a,className:(0,c.cn)("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...o})).displayName=i.JU.displayName;let m=a.forwardRef(({className:e,...t},o)=>(0,n.jsx)(i.wv,{ref:o,className:(0,c.cn)("-mx-1 my-1 h-px bg-muted",e),...t}));m.displayName=i.wv.displayName},68293:(e,t,o)=>{o.d(t,{As:()=>i,CI:()=>s,Jv:()=>l,Rt:()=>r});var n=o(12115),a=o(39422);function i(){let[e,t]=(0,n.useState)({isAuthenticated:!1,user:null,loading:!0});return(0,n.useEffect)(()=>{(async()=>{try{let{data:e}=await a.yK.getSession();e?.user?t({isAuthenticated:!0,user:{id:e.user.id,email:e.user.email,name:e.user.name||e.user.email,picture:e.user.image||null},loading:!1}):t({isAuthenticated:!1,user:null,loading:!1})}catch(e){t({isAuthenticated:!1,user:null,loading:!1})}})()},[]),e}let l=e=>{let t=e?`?callbackUrl=${encodeURIComponent(e)}`:"";window.location.href=`/auth${t}`},r=()=>async()=>{try{console.log("\uD83D\uDD13 Signing out..."),await a.yK.signOut(),console.log("â
Sign out successful, redirecting to home"),window.location.href="/"}catch(e){console.error("â Sign out error:",e),window.location.href="/"}},s=async()=>{try{console.log("\uD83D\uDD13 Signing out..."),await a.yK.signOut(),console.log("â
Sign out successful, redirecting to home"),window.location.href="/"}catch(e){console.error("â Sign out error:",e),window.location.href="/"}}}}]);
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.