PageSourceSearch

https://app.rankauthority.com/assets/MobileDashboard-hK9uzW96.js

js rankauthority.com collected 2026-10-03 19:21:41 UTC 12,262 bytes, 6 lines download raw bytes

1import{j as e}from"./vendor-motion-rNua61z-.js";import{a as i}from"./vendor-charts-BLh8LVOS.js";import{a8 as we,bf as ve,ao as _e,k as Pe,dz as Ne,dA as Ce,cP as Se,dB as Ie,dC as ke,dD as Ae,dE as Ee,P as De,dF as Ge,dG as Me,dH as Te,dI as Le,ak as M,d as Be,L as Ke,bv as Fe,f as T,dJ as $e,_ as Oe,aO as Y,T as J,g as Re,bJ as Ve,dK as He,dL as Qe}from"./index-BK5kzKbU.js";import{m as Ue}from"./pendingScan-FNhrgOuX.js";import{M as qe}from"./MobileLayout-BLwnkD5u.js";import{A as ze}from"./AiNeuralWithCrawlBanner-BiEXIhQB.js";import{P as Je}from"./ProjectUrlDialog-W0T99-7W.js";import{L as Z}from"./loading-spinner-DiOgG5LZ.js";import{T as We}from"./target-_f3qeyY2.js";import{B as W}from"./brain-DG8u-aGf.js";import"./vendor-sentry-C1HnwJe_.js";import"./vendor-radix-CuFkE-ak.js";import"./ProgressBanner-krEuen7p.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};a.SENTRY_RELEASE={id:"bc0305447246e6e307a2afa711236f6b5f19dae2"};var r=new a.Error().stack;r&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[r]="69fc4363-a9e9-4d9b-841f-6abb26234714",a._sentryDebugIdIdentifier="sentry-dbid-69fc4363-a9e9-4d9b-841f-6abb26234714")}catch{}})();/**
2 * @license lucide-react v0.475.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const Xe=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"m9 15 2 2 4-4",key:"1grp1n"}]],X=we("FileCheck",Xe);function Ye(a){if(!a)return null;const r=a?.rank_authority||a,d=r?.technical_health_score??r?.data_for_seo_summary?.site_health_score??r?.site_health_score??r?.site_health??0,b=r?.total_score??0,f=He(a?.domain_organic?.result1||r?.domain_organic?.result1||[]).filter(l=>l&&Qe(l.Keyword??l.keyword)).slice(0,10).map((l,_)=>({id:`kw-${_}`,keyword:l.Keyword??l.keyword,position:l.Position??l.position??null}));return{siteHealth:Number(d)||0,rankAuthority:Number(b)||0,topKeywords:f}}function ms(){const{user:a}=ve(),r=a?.id||localStorage.getItem("user_id"),d=_e(),{toast:b}=Pe(),[B,f]=i.useState(!1),{mutateAsync:l,isPending:_}=Ne(),{data:K,isLoading:k,isError:F}=Ce(r,{enabled:!!r,refetchInterval:s=>Array.isArray(s)&&s.some(c=>c.seo_scan_in_progress===!0)?3e4:!1}),m=i.useMemo(()=>(K||[]).filter(s=>s.status==="active"||s.is_active===!0),[K]),n=i.useMemo(()=>{const s=sessionStorage.getItem("selectedProjectId");return s&&m.some(t=>String(t.id)===String(s))?s:m[0]?.id||null},[m]),ee=i.useMemo(()=>m.find(s=>String(s.id)===String(n))||null,[m,n]),{isCrawlingInProgress:P}=Se(ee,n),{data:x,isPending:A}=Ie(n,{enabled:!!n,staleTime:300*1e3,refetchInterval:P?3e4:!1}),{data:$,isLoading:O,isError:R}=ke(x?.last_seo_scan,{enabled:!!x?.last_seo_scan,staleTime:300*1e3,refetchInterval:P&&x?.last_seo_scan?3e4:!1}),{data:E,isPending:se,isError:te}=Ae(n,{enabled:!!n,staleTime:3e4,refetchInterval:P?15e3:3e4}),{data:V,isPending:ae}=Ee(n||"",{enabled:!!n,staleTime:3e4}),{data:y,isPending:re,isError:ne}=De(n,{type:"blog",enabled:!!n,staleTime:25e3,refetchInterval:3e4}),{data:N,isPending:oe}=Ge(n,{enabled:!!n}),{data:H,isPending:Q,isError:ie}=Me(n,1,{enabled:!!n,staleTime:6e4,refetchInterval:6e4}),{data:o,isPending:le,isError:ce}=Te(n,{enabled:!!n,staleTime:6e4,refetchInterval:6e4}),w=i.useMemo(()=>Ye($),[$]),D=i.useMemo(()=>H?.items||[],[H]),G=i.useMemo(()=>{if(!o)return[];const s=[],t=(c,S)=>{const I=o[`${c}_score`];I!=null&&s.push({key:c,label:S,score:I})};return t("chatgpt","ChatGPT"),t("perplexity","Perplexity"),t("claude","Claude"),t("gemini","Gemini"),t("copilot","Copilot"),t("meta","Meta AI"),t("grok","Grok"),t("googleai","Google AI"),s.filter(c=>c.score!=null)},[o]),C=i.useMemo(()=>{if(!E?.items?.length)return{totalPages:0,scannedPages:0,failedPages:0};const t=[...E.items].sort((fe,ye)=>new Date(ye.created_at)-new Date(fe.created_at))[0],c=t.total_pages??0,S=t.scanned_pages??0,I=t.blocked_pages??0;return{totalPages:c,scannedPages:S,failedPages:I,pagesNotScanned:Math.max(0,c-S)}},[E]),U=C.scannedPages,de=C.totalPages,ue=C.failedPages,me=C.pagesNotScanned??Math.max(0,de-U),q=i.useMemo(()=>(N&&Array.isArray(N)?N.filter(s=>["pending","started","generating"].includes(s.status)):[]).length,[N]),h=i.useMemo(()=>({draft:y?.draft??0,scheduled:y?.scheduled??0,published:y?.published??0,archived:y?.archived??0,generating:q}),[y,q]),ge=i.useMemo(()=>Le(V),[V]),z=(x?.url||m.find(s=>
6s.id===n)?.url||"").replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/$/,"")||"—",xe=A||se||ae||!!x?.last_seo_scan&&O,he=A||!!x?.last_seo_scan&&O,pe=o&&(o.geo_score!=null||o.aeo_score!=null||G.length>0),je=re||oe,be=async s=>{if(r)try{const t=await l({website_url:s.replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/$/,""),user_xid:r,target_location:"United States",search_engine:"Google",language:"English",business_description:"",business_address:""});f(!1),sessionStorage.setItem("selectedProjectId",String(t)),sessionStorage.setItem("showAutoProjectScanBars","true"),Ue(t),d.invalidateQueries({queryKey:["userProjects",r]}),window.dispatchEvent(new CustomEvent("projectsChanged",{detail:{newProjectId:t}}))}catch(t){b({title:"Creation Failed",description:t?.response?.data?.message||t?.message||"Failed to create project. Please try again.",variant:"error",position:"bottom-right"})}};return e.jsxs(qe,{children:[e.jsx(Je,{isOpen:B,initialUrl:"",onConfirm:be,onCancel:()=>f(!1),title:"Add your website"}),k&&e.jsx(g,{children:e.jsx(p,{})}),!k&&F&&e.jsx(g,{children:e.jsx(j,{children:"Couldn't load your projects. Check your connection and try again."})}),!k&&!F&&m.length===0&&e.jsxs("section",{className:"rounded-2xl bg-white p-6 text-center shadow-sm ring-1 ring-slate-200/70",children:[e.jsx("div",{className:"mx-auto mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-[rgb(var(--brand-primary-rgb)/0.12)]",children:e.jsx(M,{className:"h-8 w-8 text-[var(--brand-primary)]"})}),e.jsx("h3",{className:"mb-2 text-lg font-semibold text-slate-900",children:"Create your first project"}),e.jsx("p",{className:"mb-4 text-sm text-slate-600",children:"Add your website to get started with AI-powered SEO analysis."}),e.jsx(Be,{onClick:()=>f(!0),disabled:_,children:_?e.jsxs(e.Fragment,{children:[e.jsx(Ke,{className:"mr-2 h-4 w-4 animate-spin"}),"Creating..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Fe,{className:"mr-2 h-4 w-4"}),"Add your website"]})})]}),n&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 rounded-xl border border-slate-200/70 bg-white px-3 py-2.5 shadow-sm",children:[e.jsx(M,{className:"h-4 w-4 shrink-0 text-slate-400"}),A?e.jsx(Z,{size:"sm",variant:"secondary"}):e.jsx("span",{className:"truncate text-sm font-medium text-slate-700",title:z,children:z})]}),e.jsx(ze,{projectId:n,isCrawlingInProgress:P,className:"space-y-3",testIdPrefix:"mobile-dashboard",hideIdle:!0}),e.jsx(g,{title:"Overview",icon:T,children:xe?e.jsx(p,{}):R||te?e.jsx(j,{}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{label:$e,value:w?.rankAuthority??"—",icon:T,color:"text-[var(--brand-primary)]"}),e.jsx(u,{label:"Site Health",value:w?.siteHealth?`${w.siteHealth}%`:"—",icon:T,color:"text-green-600"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 border-t border-slate-200 pt-2",children:[e.jsx(u,{label:"Scanned Pages",value:U??"—",icon:X,color:"text-green-600"}),e.jsx(u,{label:"Failed Pages",value:ue??"—",icon:Oe,color:"text-red-600"}),e.jsx(u,{label:"Critical Errors",value:ge,icon:Y,color:"text-amber-600"}),e.jsx(u,{label:"Pages Not Scanned",value:me??"—",icon:X,color:"text-slate-500"})]})]})}),e.jsx(g,{title:"Top Keywords",icon:We,children:he?e.jsx(p,{}):R?e.jsx(j,{}):w?.topKeywords?.length>0?e.jsx("div",{className:"space-y-2",children:w.topKeywords.map(s=>e.jsxs("div",{className:"flex items-center justify-between rounded-xl bg-slate-50 px-3 py-2.5",children:[e.jsx("span",{className:"mr-2 flex-1 truncate text-sm text-slate-800",children:s.keyword}),e.jsxs("span",{className:"shrink-0 rounded-full bg-white px-2 py-0.5 text-xs font-semibold text-slate-600 shadow-sm",children:["#",s.position??"—"]})]},s.id))}):e.jsx(L,{children:"No keyword data yet. Run a scan or check back after data is collected."})}),e.jsx(g,{title:"AI Visibility (GEO)",icon:W,children:le?e.jsx(p,{}):ce?e.jsx(j,{}):pe?e.jsxs("div",{className:"space-y-4",children:[(o?.geo_score!=null||o?.aeo_score!=null)&&e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[o?.geo_score!=null&&e.jsx(u,{label:"GEO Score",value:o.geo_score,icon:J,color:"text-violet-600"}),o?.aeo_score!=null&&e.jsx(u,{label:"AEO Score",value:o.aeo_score,icon:W,color:"text-indigo-600"})]}),G.length>0&&e.jsxs("div",{className:o?.geo_score!=null||o?.aeo_score!=null?"border-t border-slate-200 pt-2":"",children:[e.jsx("p",{className:"mb-2 text-xs font-medium text-slate-500",children:"AI Platform Scores"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:G.map(s=>e.jsxs("span",{className:"inline-flex items-center rounded-full bg-slate-100 px-2.5 py-1 text-xs font-medium text-slate-700",children:[s.label,": ",s.score]},s.key))})]})]}):e.jsx(L,{children:"No AI visibility scores yet. Data will appear after AI Visibility is set up for this project."})}),e.jsx(g,{title:`Competitors${Q?"":` (${D.length})`}`,icon:J,children:Q?e.jsx(p,{}):ie?e.jsx(j,{}):D.length>0?e.jsx("div",{className:"space-y-2",children:D.slice(0,5).map(s=>{const t=(s.url||s.domain||s.competitor_url||s.name||"").replace(/^https?:\/\//,"").replace(/^www\./,"").replace(/\/$/,"")||"—";return e.jsxs("div",{className:"flex items-center gap-2 rounded-xl bg-slate-50 px-3 py-2.5",children:[e.jsx(M,{className:"h-4 w-4 shrink-0 text-slate-400"}),e.jsx("span",{className:"truncate text-sm text-slate-800",children:t})]}
6,s.id??s.competitors_xid??t)})}):e.jsx(L,{children:"No competitors tracked yet."})}),e.jsx(g,{title:"Blog Posts",icon:Re,children:je?e.jsx(p,{}):ne?e.jsx(j,{}):e.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3",children:[h.generating>0&&e.jsx(v,{label:"Generating",value:h.generating}),e.jsx(v,{label:"Draft",value:h.draft}),e.jsx(v,{label:"Scheduled",value:h.scheduled}),e.jsx(v,{label:"Published",value:h.published}),e.jsx(v,{label:"Archived",value:h.archived})]})})]}),e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl border border-slate-200/70 bg-white/60 px-3.5 py-3 text-sm text-slate-500",children:[e.jsx(Ve,{className:"h-4 w-4 shrink-0 text-slate-400"}),e.jsx("span",{children:"For full features, use desktop or laptop."})]})]})}function g({title:a,icon:r,children:d}){return e.jsxs("section",{className:"rounded-2xl bg-white p-4 shadow-sm ring-1 ring-slate-200/70",children:[a&&e.jsxs("h3",{className:"mb-3 flex items-center gap-2 font-semibold text-slate-900",children:[r&&e.jsx(r,{className:"h-4 w-4 text-slate-500"}),a]}),d]})}function p(){return e.jsx("div",{className:"flex justify-center py-8",children:e.jsx(Z,{size:"lg",variant:"secondary",center:!0})})}function j({children:a}){return e.jsxs("div",{className:"flex items-center gap-2 rounded-lg bg-red-50 px-3 py-3 text-sm text-red-600",children:[e.jsx(Y,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{children:a??"Couldn't load this data. Pull down or try again shortly."})]})}function L({children:a}){return e.jsx("p",{className:"py-6 text-center text-sm text-slate-500",children:a})}function u({label:a,value:r,icon:d,color:b}){return e.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl bg-slate-50 p-2.5",children:[e.jsx("div",{className:`flex h-9 w-9 items-center justify-center rounded-full bg-white shadow-sm ${b}`,children:e.jsx(d,{className:"h-4 w-4"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-xs text-slate-500",children:a}),e.jsx("p",{className:"truncate text-base font-semibold text-slate-900",children:r})]})]})}function v({label:a,value:r}){return e.jsxs("div",{className:"rounded-xl bg-slate-50 p-2.5 text-center",children:[e.jsx("p",{className:"text-xl font-bold text-slate-900",children:r}),e.jsx("p",{className:"text-xs text-slate-500",children:a})]})}export{ms as default};

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.