"use strict";(()=>{var e={};e.id=9794,e.ids=[9794],e.modules={20399:e=>{e.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},30517:e=>{e.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},56681:e=>{e.exports=require("playwright")},9486:(e,t,r)=>{r.r(t),r.d(t,{originalPathname:()=>h,patchFetch:()=>g,requestAsyncStorage:()=>p,routeModule:()=>l,serverHooks:()=>m,staticGenerationAsyncStorage:()=>c});var o={};r.r(o),r.d(o,{POST:()=>u});var a=r(49303),i=r(88716),n=r(60670),s=r(87070),d=r(56681);async function u(e){try{let{url:t}=await e.json();if(!t)return s.NextResponse.json({error:"URL is required"},{status:400});let r=await d.chromium.connectOverCDP("http://localhost:9222"),o=r.contexts()[0].pages()[0];await o.goto(t,{waitUntil:"domcontentloaded",timeout:12e4}),await o.waitForSelector("h1",{timeout:5e3}).catch(()=>{}),await o.waitForSelector("a[href*='followers']",{timeout:5e3}).catch(()=>{});let a=await o.evaluate(()=>{let e=document.querySelector("h2")?.innerText||"N/A",t=document.querySelector('button[data-item-id="address"] .fontBodyMedium')?.innerText||"N/A",r=document.querySelector('button[data-tooltip="Copy phone number"] .fontBodyMedium')?.innerText||"N/A",o=document.querySelector('a[data-item-id="authority"] .rogA2c.ITvuef .fontBodyMedium')?.innerText||"N/A",a=document.querySelectorAll("table tbody tr.y0skZc")||[],i=document.querySelector("div[data-item-id] div div")?.innerText||"N/A",n=[];if(a.length)a.forEach(e=>{let t=e.querySelectorAll("td")||[];t.length&&n.push({day:t[0]?.innerText,time:t[1]?.innerText})});else if(i&&"N/A"!==i){let[e,t]=i.split("\n");e&&t&&n.push({day:e,time:t})}return{description:e,address:t,pin:t.match(/\b\d{5}(?:-\d{4})?\b|\b\d{6}\b/g)||[],timing:a,timing_data:n,timing_two:i,phone:"N/A"!==r?r.replace(/\D/g,""):r,website:o}}),i=o.url().match(/@(-?\d+\.\d+),(-?\d+\.\d+),\d+z/),n=parseFloat(i[1]),u=parseFloat(i[2]);return await r.close(),s.NextResponse.json({...a,url:t,latitude:n,longitude:u})}catch(e){return console.error("❌ Scraping Error:",e),s.NextResponse.json({error:"Failed to scrape website"},{status:500})}}let l=new a.AppRouteRouteModule({definition:{kind:i.x.APP_ROUTE,page:"/api/google_map_details/route",pathname:"/api/google_map_details",filename:"route",bundlePath:"app/api/google_map_details/route"},resolvedPagePath:"C:\\Users\\Design Collection\\OneDrive\\Desktop\\Jitendra Vishwakarma\\Next Dashboard\\web crawler for user dev\\Scrape Genius\\app\\api\\google_map_details\\route.js",nextConfigOutput:"",userland:o}),{requestAsyncStorage:p,staticGenerationAsyncStorage:c,serverHooks:m}=l,h="/api/google_map_details/route";function g(){return(0,n.patchFetch)({serverHooks:m,staticGenerationAsyncStorage:c})}}};var t=require("../../../webpack-runtime.js");t.C(e);var r=e=>t(t.s=e),o=t.X(0,[8948,5972],()=>r(9486));module.exports=o})();