PageSourceSearch

https://app.adcero.io/_next/static/chunks/15685.316f9d1d934aa13c.js

js adcero.io collected 2026-09-24 15:05:31 UTC 14,631 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[15685],{15685:(e,s,t)=>{t.r(s),t.d(s,{GoogleMapsReviewsPanel:()=>S});var l=t(95155),n=t(12115),a=t(39347),r=t(93499),i=t(35299),o=t(21873),c=t(33789),d=t(90235),x=t(64461),m=t(90368),u=t(27937),p=t(47507),h=t(68122),g=t(25016),f=t(19638),j=t(58870),v=t(4246),b=t(65313);let N=[{key:"pains",className:"border-rose-200/80 bg-rose-50/70 text-rose-700"},{key:"desires",className:"border-violet-200/80 bg-violet-50/70 text-violet-700"},{key:"objections",className:"border-amber-200/80 bg-amber-50/70 text-amber-700"},{key:"praise",className:"border-emerald-200/80 bg-emerald-50/70 text-emerald-700"}];function w(e){var s,t;let{filters:a,onThemeSelect:r}=e,[i,o]=(0,n.useState)(0),[c,d]=(0,n.useState)(void 0),[g,f]=(0,n.useState)("lowest_rating"),[v,N]=(0,n.useState)(null),w=(null==a?void 0:a.unansweredNegative)===!0,{data:k,isLoading:S,isError:C,refetch:_}=(0,x.oo)({platform:"google_maps",rating:c,sort:g,...a},i,25),A=null!=(s=null==k?void 0:k.mentions)?s:[],M=null!=(t=null==k?void 0:k.total)?t:0,E=Math.max(1,Math.ceil(M/25));return(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,l.jsxs)("span",{className:"text-xs text-muted-foreground",children:[(0,l.jsx)("b",{className:"font-semibold text-brand-secondary",children:M})," review",1===M?"":"s"," collected"]}),!w&&(0,l.jsxs)("div",{className:"flex flex-nowrap items-center gap-2",children:[(0,l.jsxs)(p.l6,{value:String(null!=c?c:"all"),onValueChange:e=>{d("all"===e?void 0:Number(e)),o(0)},children:[(0,l.jsx)(p.bq,{className:"glass-pill h-8 w-auto max-w-36 border-purple-200/70 px-3 text-xs font-medium text-brand-secondary shadow-none",children:(0,l.jsx)(p.yv,{placeholder:"Rating"})}),(0,l.jsxs)(p.gC,{children:[(0,l.jsx)(p.eb,{value:"all",children:"All ratings"}),[1,2,3,4,5].map(e=>(0,l.jsxs)(p.eb,{value:String(e),children:[e,"★",e<=2?" — critical":""]},e))]})]}),(0,l.jsxs)(p.l6,{value:g,onValueChange:e=>{f(e),o(0)},children:[(0,l.jsx)(p.bq,{className:"glass-pill h-8 w-auto max-w-32 border-purple-200/70 px-3 text-xs font-medium text-brand-secondary shadow-none",children:(0,l.jsx)(p.yv,{placeholder:"Sort"})}),(0,l.jsxs)(p.gC,{children:[(0,l.jsx)(p.eb,{value:"lowest_rating",children:"Worst first"}),(0,l.jsx)(p.eb,{value:"newest",children:"Newest"})]})]})]})]}),S?(0,l.jsx)("div",{className:"space-y-2",children:Array.from({length:5}).map((e,s)=>(0,l.jsx)(h.E,{className:"h-20 w-full rounded-xl"},s))}):C?(0,l.jsx)(b.E,{onRetry:()=>void _()}):0===A.length?(0,l.jsxs)("div",{className:"glass-surface px-4 py-10 text-center",children:[(0,l.jsx)("p",{className:"text-sm font-medium text-foreground",children:"No reviews yet"}),(0,l.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:c?"No ".concat(c,"★ reviews collected — try another rating filter."):"Confirm your listing above and start reading reviews."})]}):(0,l.jsx)("ul",{className:"divide-y divide-purple-100/70",children:A.map(e=>{var s,t;return(0,l.jsx)("li",{children:(0,l.jsx)(y,{mention:e,themes:null!=(t=null==k||null==(s=k.themesByMention)?void 0:s[e.id])?t:[],onThemeSelect:r,onOpen:()=>N(e)})},e.id)})}),E>1&&(0,l.jsxs)("div",{className:"flex items-center justify-between border-t border-purple-100/70 pt-3 text-xs text-muted-foreground",children:[(0,l.jsxs)("span",{children:["Page ",i+1," of ",E]}),(0,l.jsxs)("div",{className:"flex gap-1.5",children:[(0,l.jsx)("button",{type:"button",className:"btn-frost-soft inline-flex items-center disabled:opacity-40",disabled:0===i,onClick:()=>o(e=>Math.max(0,e-1)),children:(0,l.jsx)(m.A,{className:"h-3.5 w-3.5"})}),(0,l.jsx)("button",{type:"button",className:"btn-frost-soft inline-flex items-center disabled:opacity-40",disabled:i+1>=E,onClick:()=>o(e=>e+1),children:(0,l.jsx)(u.A,{className:"h-3.5 w-3.5"})})]})]}),(0,l.jsx)(j.D,{mention:v,onClose:()=>N(null)})]})}function y(e){var s,t,n,r,o,c;let{mention:d,onOpen:x,themes:m=[],onThemeSelect:u}=e,p=null==(s=d.tags)?void 0:s.insight,h=null!=(r=d.extraction)?r:null,j=p?f.e_[p.angle]:null,b=null==j?void 0:j.icon,w="pending"===d.extraction_status,y=!!(null==(n=d.tags)||null==(t=n.google)?void 0:t.ownerResponseText),k=null!=d.rating&&2>=Number(d.rating),S=[],C=0;if(h)for(let{key:e,className:s}of N)for(let t of h[e])S.length<3?S.push({text:t.phrase,className:s}):C++;return(0,l.jsxs)("div",{children:[(0,l.jsxs)("button",{type:"button",className:"flex w-full flex-col gap-1.5 rounded-lg px-2 py-3 text-left transition-colors hover:bg-purple-50/40 dark:hover:bg-white/5",onClick:x,children:[(0,l.jsxs)("span",{className:"flex flex-wrap items-center gap-2",children:[null!=d.rating&&(0,l.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-xs font-semibold text-amber-600",children:[(0,l.jsx)(a.A,{className:"h-3 w-3 fill-current"}),Number(d.rating).toFixed(1)]}),y?(0,l.jsx)("span",{className:"glass-pill px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-emerald-700",children:"Owner replied"}):k?(0,l.jsx)("span",{className:"glass-pill px-2 py-0.5 text-[10px] font-semibold uppercase tracking-wide text-rose-700",children:"No reply"}):null]}),d.body?(0,l.jsx)("span",{className:"text-sm leading-snug text-foreground
1/85",children:(o=d.body,c=220,o.length>220?"".concat(o.slice(0,c-1),"…"):o)}):(0,l.jsx)("span",{className:"text-xs italic text-muted-foreground",children:"Star-only review (no text)"}),(0,l.jsxs)("span",{className:"flex flex-wrap items-center gap-1.5",children:[j&&b&&(0,l.jsxs)("span",{className:(0,g.cn)("inline-flex items-center gap-1 rounded-full border px-2 py-0.5 text-[10px] font-semibold",j.className),children:[(0,l.jsx)(b,{className:(0,g.cn)("h-3 w-3",j.dot)}),j.label]}),S.map((e,s)=>(0,l.jsxs)("span",{className:(0,g.cn)("inline-flex max-w-[260px] items-center truncate rounded-full border px-2 py-0.5 text-[10px] italic",e.className),children:["“",e.text,"”"]},s)),C>0&&(0,l.jsxs)("span",{className:"text-[10px] text-muted-foreground",children:["+",C," more"]}),w&&(0,l.jsxs)("span",{className:"inline-flex items-center gap-1 text-[10px] text-muted-foreground",children:[(0,l.jsx)(i.A,{className:"h-3 w-3 animate-spin motion-reduce:animate-none"}),"analyzing…"]})]}),d.posted_at&&(0,l.jsx)("span",{className:"text-[11px] text-muted-foreground",children:new Date(d.posted_at).toLocaleDateString()})]}),(0,l.jsx)("div",{className:"px-2 pb-3",children:(0,l.jsx)(v.Fo,{themes:m,onSelect:u})})]})}var k=t(46258);function S(e){var s,t,o,c,d,m,u,p,h,g,f,j;let{source:N}=e,S=(0,x.MC)(),A=S.data,[M,E]=(0,n.useState)(!1),[F,R]=(0,n.useState)(null),[T,G]=(0,n.useState)(!1),L=!!(null==A?void 0:A.place),O=!!(null==A||null==(s=A.place)?void 0:s.confirmedAt),P=M||!L&&!(null==A?void 0:A.resolving),U=L&&O&&!P,D=(0,x.lV)(void 0,"google_maps",U),q=(0,x.oo)({platform:"google_maps",unansweredNegative:!0},0,1,U);(0,n.useEffect)(()=>{R(null),G(!1)},[null==N?void 0:N.id,null==A||null==(t=A.place)?void 0:t.url]);let z=e=>{G(!1),R(e)};if((null==A?void 0:A.place)&&O&&!P){let e=A.place,s=null==(c=D.data)?void 0:c.themes.find(e=>e.id===F),t=null!=(p=null==(d=q.data)?void 0:d.total)?p:0;return(0,l.jsx)(v.UT,{rail:(0,l.jsx)(v.CL,{identity:(0,l.jsxs)("div",{className:"space-y-2",children:[(0,l.jsxs)("div",{className:"flex items-center gap-3",children:[(0,l.jsx)(k.v,{sourceType:"google_maps_reviews"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("p",{className:"truncate text-sm font-semibold",children:null!=(h=e.title)?h:"Google Maps listing"}),(0,l.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:null!=(g=e.address)?g:"Address unavailable"}),(0,l.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[null!=e.totalScore&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{className:"inline h-3 w-3 fill-current text-amber-500"})," ",Number(e.totalScore).toFixed(1)," \xb7 "]}),null!=(f=e.reviewsCount)?f:0," reviews"]})]})]}),(0,l.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-xs font-medium text-brand-secondary",children:["Open in Maps ",(0,l.jsx)(r.A,{className:"h-3 w-3"})]})]}),source:N,vitals:(0,l.jsxs)("div",{className:"glass-surface space-y-3 p-3",children:[(0,l.jsxs)("div",{className:"flex items-center justify-between text-xs",children:[(0,l.jsx)("span",{className:"text-muted-foreground",children:"Reviews collected"}),(0,l.jsx)("b",{className:"tabular-nums",children:A.reviewsIngested})]}),(0,l.jsx)(v.x9,{distribution:null==(u=D.data)||null==(m=u.reviewStats)?void 0:m.histogram})]}),alert:q.isError?(0,l.jsx)(b.E,{message:"We could not check for unanswered reviews.",onRetry:()=>void q.refetch()}):t>0?(0,l.jsxs)("div",{className:"banner-resume space-y-2 p-3 text-xs",children:[(0,l.jsxs)("p",{className:"font-semibold text-amber-800",children:[t," unanswered 1–2★ review",1===t?"":"s"]}),(0,l.jsxs)("div",{className:"flex flex-wrap gap-2",children:[(0,l.jsx)("button",{type:"button",className:"btn-frost-soft",onClick:()=>{R(null),G(!0)},children:"Show reviews"}),(0,l.jsx)("a",{href:e.url,target:"_blank",rel:"noreferrer",className:"btn-frost-soft",children:"Reply on Google ↗"})]})]}):void 0,themes:D,selectedThemeId:F,onSelectTheme:z,countOf:e=>{var s,t;return null!=(t=null==(s=e.slice)?void 0:s.frequency)?t:0},footer:(0,l.jsx)("button",{type:"button",className:"btn-frost-soft",onClick:()=>E(!0),children:"Edit link"})}),children:(0,l.jsxs)("div",{className:"space-y-3",children:[A.lastError&&!A.scraping&&(0,l.jsxs)("div",{className:"banner-resume p-3 text-xs",children:[A.lastError.message," — check the link and try again."]}),T&&(0,l.jsxs)("div",{className:"glass-surface flex items-center justify-between gap-2 p-3 text-xs",children:[(0,l.jsx)("span",{children:"Showing unanswered 1–2★ reviews"}),(0,l.jsx)("button",{type:"button",className:"btn-frost-soft",onClick:()=>G(!1),children:"Clear"})]}),s?(0,l.jsx)(v.Fz,{theme:s,platform:"google_maps",renderMention:e=>(0,l.jsx)(y,{mention:e}),onClear:()=>R(null)}):(0,l.jsx)(w,{filters:T?{unansweredNegative:!0,sort:"lowest_rating"}:void 0,onThemeSelect:z},T?"unanswered":"all")]})})}return(0,l.jsx)("div",{className:"section-frost",children:(0,l.jsxs)("div",{className:"space-y-4 p-4",children:[(0,l.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[(0,l.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,l.jsx)(k.v,{sourceType:"google_maps_reviews",size:"sm"}),(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsx)("h3",{className:"text-sm font-semibold",children:"Google Maps reviews"}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:"Star ratings and reviews on your listing — worst first, so pain points surface immediately."})]})]}),(0,l.jsx)("div",{className:"flex flex-wrap items-center gap-2",children:L&&!P&&(0,l.jsx)("button",{type:"button",className:"btn-frost-soft flex-none",onClick:()=>E(!0),children:"Edit link"})})]}),(null==A?void 0:A.lastError)&&!A.resolving&&!A.scraping&&(0,l.jsxs)("div",{className:"banner-resume text-xs",children:[A.lastError.message," — check the link and try again."]}),P?(0,l.jsx)(C,{initialUrl:null!=(j=null==A||null==(o=A.place)?void 0:o.url)?j:"",pending:(null==A?void 0:A.resolving)===!0,onSubmitted:()=>E(!1)}):(null==A?void 0:A.resolving)||S.isLoading?(0,l.jsxs)("div",{className:"glass-surface flex items-center gap-2 px-3 py-4 text-xs text-muted-foreground",children:[(0,l.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin motion-reduce:animate-none"}),"Looking up your listing…"]}):(null==A?void 0:A.place)&&!O?(0,l.jsx)(_,{place:A.place,onEdit:()=>E(!0)}):null]})})}function C(e){let{initialUrl:s,pending:t,onSubmitted:a}
1=e,r=(0,x.Dp)(),[m,u]=(0,n.useState)(s),p=!r.isPending&&!t&&""!==m.trim();return(0,l.jsxs)("div",{className:"space-y-3",children:[(0,l.jsxs)("div",{className:"space-y-1.5",children:[(0,l.jsx)(d.J,{className:"text-xs",children:"Your Google Maps listing URL"}),(0,l.jsx)(c.p,{value:m,onChange:e=>u(e.target.value),placeholder:"https://www.google.com/maps/place/YourBusiness/…",className:"glass-surface h-9 border-purple-100/70 text-sm shadow-none"}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:"Open your business on Google Maps and copy the address-bar URL, or use the Share button's short link."})]}),(0,l.jsxs)("button",{type:"button",className:"btn-frost-primary inline-flex items-center gap-1.5 disabled:opacity-50",onClick:()=>r.mutate({placeUrl:m.trim()},{onSuccess:a}),disabled:!p,children:[r.isPending||t?(0,l.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin motion-reduce:animate-none"}):(0,l.jsx)(o.A,{className:"h-3.5 w-3.5"}),"Find my listing"]})]})}function _(e){var s;let{place:t,onEdit:n}=e,o=(0,x.aj)();return(0,l.jsxs)("div",{className:"glass-surface space-y-3 px-3 py-3",children:[(0,l.jsxs)("div",{className:"min-w-0",children:[(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsx)("span",{className:"truncate text-sm font-medium text-foreground",children:null!=(s=t.title)?s:"Google Maps listing"}),(0,l.jsx)("a",{href:t.url,target:"_blank",rel:"noreferrer","aria-label":"Open the listing on Google Maps",className:"flex-none text-muted-foreground transition-colors hover:text-brand-secondary",children:(0,l.jsx)(r.A,{className:"h-3 w-3"})})]}),(0,l.jsx)("p",{className:"text-xs text-muted-foreground",children:t.degraded?(0,l.jsx)(l.Fragment,{children:"We couldn't read details for this listing — it may have no reviews yet."}):(0,l.jsxs)(l.Fragment,{children:[t.address&&(0,l.jsxs)(l.Fragment,{children:[t.address," \xb7 "]}),null!=t.totalScore&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(a.A,{className:"inline h-3 w-3 -translate-y-px text-amber-500"})," ",Number(t.totalScore).toFixed(1)," \xb7"," "]}),null!=t.reviewsCount&&(0,l.jsxs)(l.Fragment,{children:[t.reviewsCount," reviews"]})]})})]}),t.brandMismatch&&(0,l.jsx)("p",{className:"banner-resume p-3 text-xs",children:"This listing's name doesn't match your brand — we haven't read any reviews from it. Confirm only if it really is your business; its reviews become your customer voice."}),(0,l.jsxs)("div",{className:"flex items-center gap-2",children:[(0,l.jsxs)("button",{type:"button",className:"btn-frost-primary inline-flex items-center gap-1.5 disabled:opacity-50",disabled:o.isPending,onClick:()=>o.mutate(void 0),children:[o.isPending?(0,l.jsx)(i.A,{className:"h-3.5 w-3.5 animate-spin motion-reduce:animate-none"}):null,"Yes, this is my listing — start reading reviews"]}),(0,l.jsx)("button",{type:"button",className:"btn-frost-soft",onClick:n,children:"Not my listing"})]})]})}}}]);

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.