1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8026],{40528:function(e,s,a){(window.__NEXT_P=window.__NEXT_P||[]).push(["/dashboard",function(){return a(59338)}])},6179:function(e,s,a){"use strict";a.d(s,{Z:function(){return t}});let t=(0,a(1).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]])},85438:function(e,s,a){"use strict";a.d(s,{Z:function(){return t}});let t=(0,a(1).Z)("Link",[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]])},81600:function(e,s,a){"use strict";a.d(s,{E:function(){return l}});var t=a(85893),r=a(67294),n=a(18078),i=a(91220);let l=r.forwardRef((e,s)=>{let{className:a,value:r,...l}=e;return(0,t.jsx)(n.fC,{ref:s,className:(0,i.cn)("relative h-4 w-full overflow-hidden rounded-full bg-secondary",a),...l,children:(0,t.jsx)(n.z$,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:"translateX(-".concat(100-(r||0),"%)")}})})});l.displayName=n.fC.displayName},59338:function(e,s,a){"use strict";a.r(s),a.d(s,{default:function(){return L}});var t=a(85893),r=a(25904),n=a(11163),i=a(33934),l=a(43579),c=a(67294),d=a(91220);function o(e){let{title:s,description:a,children:r,className:n,icon:i,action:l}=e;return(0,t.jsx)("div",{className:(0,d.cn)("",n),children:(0,t.jsxs)("div",{className:"bg-white shadow-sm border border-gray-200",children:[(0,t.jsx)("div",{className:"border-b border-gray-200 bg-gray-50 px-6 py-4",children:(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[i&&(0,t.jsx)("div",{className:"p-2 bg-white border border-gray-200 text-gray-600",children:i}),(0,t.jsxs)("div",{children:[(0,t.jsx)("h2",{className:"text-lg font-semibold text-gray-900",children:s}),a&&(0,t.jsx)("p",{className:"text-sm text-gray-600 mt-0.5",children:a})]})]}),l&&(0,t.jsx)("div",{children:l})]})}),(0,t.jsx)("div",{className:"p-6",children:r})]})})}var m=a(95364),u=a(14866),x=a(418),h=a(41664),p=a.n(h),g=a(89654),v=a(50947);function j(e){let{title:s,description:a,icon:r,iconBgColor:n="bg-blue-500",value:i,trend:l,children:c,className:o,headerClassName:m,contentClassName:u,action:x,noPadding:h=!1}=e;return(0,t.jsxs)(v.Zb,{className:(0,d.cn)("bg-transparent shadow-none hover:shadow-none transition-shadow duration-200 border-0",o),children:[(s||r||i)&&(0,t.jsx)(v.Ol,{className:(0,d.cn)("p-6",m),children:(0,t.jsx)("div",{className:"flex items-start justify-between",children:(0,t.jsxs)("div",{className:"flex items-center gap-4 w-full",children:[r&&(0,t.jsx)("div",{className:(0,d.cn)("p-3 text-white flex-shrink-0",n),children:r}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-baseline justify-between",children:[(0,t.jsxs)("div",{className:"flex-1",children:[s&&(0,t.jsx)(v.ll,{className:"text-sm font-medium text-gray-600 mb-1",children:s}),void 0!==i&&(0,t.jsxs)("div",{className:"flex items-baseline gap-2",children:[(0,t.jsx)("span",{className:"text-2xl font-semibold text-gray-900",children:i}),l&&(0,t.jsxs)("span",{className:(0,d.cn)("text-sm font-medium",l.isPositive?"text-green-600":"text-red-600"),children:[l.isPositive?"+":"",l.value,"%",l.label&&" ".concat(l.label)]})]})]}),x&&(0,t.jsx)("div",{className:"ml-4",children:x})]}),a&&(0,t.jsx)(v.SZ,{className:"text-xs text-gray-500 mt-1",children:a})]})]})})}),c&&(0,t.jsx)(v.aY,{className:(0,d.cn)(h?"p-0":"px-6 pb-6",s||r||i?"":"pt-6",u),children:c})]})}var f=a(85438),b=a(53487),y=a(28335),N=a(42392),w=a(18742),k=a(13427),Z=a(82346);function _(){let{data:e,isLoading:s}=(0,i.a)({queryKey:["recent-activity"],queryFn:async()=>{let e=[],s=r.O.getAccessToken();try{let a=await fetch("".concat("https://reviewmysitenow.com","/api/v1/link-checker/history/all?limit=5"),{headers:{Authorization:"Bearer ".concat(s)}});if(a.ok){let s=await a.json();Array.isArray(s)&&s.forEach(s=>{e.push({id:"link-".concat(s.job_id),type:"link-check",title:"Link Check - ".concat(s.domain_name),description:"completed"===s.status?"Found ".concat(s.broken_links_count," broken links out of ").concat(s.total_links," total"):"failed"===s.status?"Check failed":"In progress",timestamp:s.created_at,
1status:s.status,link:"/backlinks-detail?domain=".concat(s.domain_name,"&tab=link-checker"),icon:(0,t.jsx)(f.Z,{className:"h-4 w-4"}),metadata:{broken_links:s.broken_links_count,total_links:s.total_links}})})}}catch(e){console.error("Error fetching link check history:",e)}try{let r=await fetch("".concat("https://reviewmysitenow.com","/api/v1/backlinks/history?limit=5"),{headers:{Authorization:"Bearer ".concat(s)}});if(r.ok){var a;let s=await r.json(),n=(null===(a=s.data)||void 0===a?void 0:a.data)||s.data||s||[];Array.isArray(n)&&n.forEach(s=>{e.push({id:"backlink-".concat(s.id),type:"backlink",title:"Backlink Search - ".concat(s.domain),description:"Found ".concat(s.result_count," backlinks"),timestamp:s.created_at,status:"completed",link:"/backlinks-detail?domain=".concat(s.domain),icon:(0,t.jsx)(b.Z,{className:"h-4 w-4"}),metadata:{backlinks_found:s.result_count}})})}}catch(e){console.error("Error fetching backlink history:",e)}return e.sort((e,s)=>new Date(s.timestamp).getTime()-new Date(e.timestamp).getTime()),e.slice(0,10)},refetchInterval:3e4}),a=e=>{switch(e){case"completed":return(0,t.jsx)(y.Z,{className:"h-4 w-4 text-green-500"});case"failed":return(0,t.jsx)(N.Z,{className:"h-4 w-4 text-red-500"});case"pending":case"processing":return(0,t.jsx)(w.Z,{className:"h-4 w-4 text-yellow-500 animate-pulse"});default:return null}},n=e=>{switch(e){case"link-check":return"bg-blue-100 text-blue-800";case"sentiment":return"bg-purple-100 text-purple-800";case"backlink":return"bg-green-100 text-green-800";default:return"bg-gray-100 text-gray-800"}};return s?(0,t.jsx)(j,{title:"Recent Activity",description:"Your latest actions across all features",icon:(0,t.jsx)(w.Z,{className:"h-5 w-5"}),iconBgColor:"bg-purple-500",className:"border border-gray-200 bg-white",children:(0,t.jsx)("div",{className:"flex items-center justify-center py-8",children:(0,t.jsx)("div",{className:"animate-pulse text-gray-500",children:"Loading activities..."})})}):(0,t.jsx)(j,{title:"Recent Activity",description:"Your latest checks and searches",icon:(0,t.jsx)(w.Z,{className:"h-5 w-5"}),iconBgColor:"bg-purple-500",className:"border border-gray-200 bg-white",children:e&&e.length>0?(0,t.jsx)("div",{className:"space-y-3",children:e.map(e=>(0,t.jsxs)("div",{className:"flex items-start gap-3 p-3 border border-gray-200 hover:bg-gray-50 transition-colors",children:[(0,t.jsx)("div",{className:"p-2 ".concat(n(e.type)),children:e.icon}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h4",{className:"text-sm font-medium truncate",children:e.title}),a(e.status)]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:e.description}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:(0,Z.Z)(new Date(e.timestamp),{addSuffix:!0})})]}),(0,t.jsx)(p(),{href:e.link,children:(0,t.jsx)(m.z,{variant:"ghost",size:"sm",className:"shrink-0",children:(0,t.jsx)(k.Z,{className:"h-4 w-4"})})})]},e.id))}):(0,t.jsxs)("div",{className:"text-center py-8 text-gray-500",children:[(0,t.jsx)(w.Z,{className:"h-8 w-8 mx-auto mb-2 opacity-20"}),(0,t.jsx)("p",{children:"No activity yet"}),(0,t.jsx)("p",{className:"text-sm mt-1",children:"Add a website to start monitoring your online presence"})]})})}var A=a(10354),P=a(35131),S=a(6179);function F(){var e;let{data:s}=(0,i.a)({queryKey:["getting-started-domains"],queryFn:()=>x.trackedDomainsAPI.getAll()});return((null==s?void 0:null===(e=s.data)||void 0===e?void 0:e.domains)||[]).length>0?null:(0,t.jsxs)(v.Zb,{className:"border-2 border-dashed border-primary/30 bg-primary/5",children:[(0,t.jsxs)(v.Ol,{className:"pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(A.Z,{className:"h-5 w-5 text-primary"}),(0,t.jsx)(v.ll,{className:"text-lg",children:"Getting Started"})]}),(0,t.jsx)(v.SZ,{children:"Add your website to start monitoring your online presence"})]}),(0,t.jsx)(v.aY,{children:(0,t.jsxs)("div",{className:"flex items-center gap-4 p-4 rounded-lg border bg-white border-gray-200 hover:border-primary/50 transition-all",children:[(0,t.jsx)("div",{className:"flex items-center justify-center w-12 h-12 rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(P.Z,{className:"h-6 w-6"})}),(0,t.jsxs)("div",{className:"flex-1",children:[(0,t.jsx)("h4",{className:"font-medium text-gray-900",children:"Add your website"}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"Tell us your domain and we'll find who's talking about you, check your site health, and analyze sentiment"})]}),(0,t.jsx)(p(),{href:"/tracked-domains",children:(0,t.jsxs)(m.z,{className:"shrink-0",children:["Add Website",(0,t.jsx)(S.Z,{className:"ml-2 h-4 w-4"})]})})]})})]})}var q=a(30202),C=a(98029),z=a(81600),E=a(7494),R=a(11373),$=a(89726),M=a(27161),K=a(23897),D=a(86501);function I(){var e,s,a;let r=(0,q.NL)(),[n,l]=(0,c.useState)(null),[d,o]=(0,c.useState)(!1),[h,g]=(0,c.useState)(!1),{data:j}=(0,i.a)({queryKey:["user","me"],queryFn:()=>x.TV.getMe()}),f="FREE"===(null==j?void 0:null===(s=j.data)||void 0===s?void 0:null===(e=s.subscription_tier)||void 0===e?void 0:e.toUpperCase()),{data:N,isLoading:k}=(0,i.a)({queryKey:["free-brand-scan-status"],queryFn:()=>K.v.getFreeBrandScanStatus(),enabled:f}),{data:Z}=(0,i.a)({queryKey:["tracked-domains"],queryFn:()=>x.trackedDomainsAPI.getAll()}),_=(null==Z?void 0:null===(a=Z.data)||void 0===a?void 0:a.domains)||[],{data:P}=(0,i.a)({queryKey:["sentiment-progress",n],queryFn:()=>K.v.getAnalysisProgress(n),enabled:d&&!!n,refetchInterval:!!d&&2e3}),F=(0,C.D)({mutationFn:e=>K.v.triggerFreeBrandScan(e),onSuccess:e=>{e.queued>0?(D.ZP.success("Scanning ".concat(e.queued," high-value backlinks...")),o(!0)):(0,D.ZP)(e.message),r.invalidateQueries({queryKey:["free-brand-scan-status"]})},onError:e=>{var s,a,t;if((null===(s=e.response)||void 0===s?void 0:s.status)===429){let s=null===(t=e.response.data)||void 0===t?void 0:t.detail;(null==s?void 0:s.days_remaining)?D.ZP.error("Free scan resets in ".concat(s.days_remaining," days. Upgrade for unlimited!")):D.ZP.error("You already used your free scan this month.")}else(null===(a=e.response)||void 0===a?void 0:a.status)===403?D.ZP.error("Free brand scan is currently disabled."):D.ZP.error("Failed to start scan. Please try again.")}});if((0,c.useEffect)(()=>{P&&P.percentage>=100&&d&&(o(!1),g(!0),D.ZP.success("Brand scan complete!"),r.invalidateQueries({queryKey:["sentiment-summary"]}),r.invalidateQueries({queryKey:["free-brand-scan-status"]}))},[P,d,r]),!f||N&&!N.feature_enabled||0===_.length||k)return null;let I=e=>{l(e),F.mutate(e)};return(0,t.jsxs)(v.Zb,{className:"border-2 border-primary/30 bg-gradient-to-br from-primary/5 to-secondary/5",children:[(0,t.jsx)(v.Ol,{className:"pb-3",children:(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-violet-500 to-purple-600 flex items-center justify-center shadow-md",children:(0,t.jsx)(A.Z,{className:"h-5 w-5 text-white"})}),(0,t.jsxs)("div",{children:[(0,t.jsxs)(v.ll,{className:"text-lg flex items-center gap-2",children:["Free Monthly Brand Scan",(0,t.jsx)(u.C,{variant:"secondary",className:"text-xs",children:"FREE"})]}),(0,t.jsx)(v.SZ,{children:"See what people are saying about your brand"})]})]}),N&&(0,t.jsx)("div",{className:"text-right",children:N.eligible?(0,t.jsxs)(u.C,{className:"bg-green-100 text-green-700 hover:bg-green-100",children:[(0,t.jsx)(y.Z,{className:"h-3 w-3 mr-1"}),"Available Now"]}):(0,t.jsxs)(u.C,{variant:"secondary",className:"text-xs",children:[(0,t.jsx)(w.Z,{className:"h-3 w-3 mr-1"}),"Resets in ",N.days_remaining," days"]})})]})}),(0,t.jsxs)(v.aY,{className:"space-y-4",children:[h&&n&&(0,t.jsxs)("div",{className:"p-4 rounded-lg bg-green-50 border border-green-200",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-3",children:[(0,t.jsx)(y.Z,{className:"h-5 w-5 text-green-600"}),(0,t.jsx)("span",{className:"font-medium text-green-800",children:"Scan Complete!"})]}),(0,t.jsxs)("p",{className:"text-sm text-green-700 mb-4",children:["We analyzed your top backlinks for ",(0,t.jsx)("strong",{children:n}),". See what people are saying about your brand."]}),(0,t.jsx)(p(),{href:"/sentiment/".concat(n),children:(0,t.jsxs)(m.z,{className:"w-full bg-green-600 hover:bg-green-700",children:[(0,t.jsx)(E.Z,{className:"h-4 w-4 mr-2"}),"View Your Results",(0,t.jsx)(S.Z,{className:"h-4 w-4 ml-2"})]})})]}),d&&P&&(0,t.jsxs)("div",{className:"p-4 rounded-lg bg-white border border-primary/20",children:[(0,t.jsxs)("div",{className:"flex justify-between text-sm mb-2",children:[(0,t.jsxs)("span",{className:"font-medium flex items-center gap-2",children:[(0,t.jsx)(R.Z,{className:"h-4 w-4 animate-spin"}),"Analyzing your top backlinks..."]}),(0,t.jsxs)("span",{children:[P.percentage.toFixed(0),"%"]})]}),(0,t.jsx)(z.E,{value:P.percentage,className:"h-2"}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground mt-2",children:[P.analyzed," of ",P.total_backlinks," complete"]})]}),!d&&!h&&(null==N?void 0:N.eligible)&&(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Choose a domain to scan (we'll analyze your top ",N.scan_limit," backlinks by authority):"]}),(0,t.jsx)("div",{className:"grid gap-2",children:_.slice(0,3).map(e=>(0,t.jsxs)("div",{className:"flex items-center justify-between p-3 rounded-lg border bg-white hover:border-primary/50 transition-colors",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(b.Z,{className:"h-4 w-4 text-muted-foreground"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"font-medium",children:e.domain}),void 0!==e.backlinks_count&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:["(",e.backlinks_count," backlinks)"]})]})]}),(0,t.jsx)(m.z,{size:"sm",onClick:()=>I(e.domain),disabled:F.isPending,children:F.isPending&&n===e.domain?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(R.Z,{className:"h-4 w-4 mr-1 animate-spin"}),"Starting..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A.Z,{className:"h-4 w-4 mr-1"}),"Scan"]})})]},e.id))})]}),!d&&!h&&N&&!N.eligible&&(0,t.jsxs)("div",{className:"space-y-4",children:[(()=>{var e;let s=N.last_scanned_domain||(null===(e=_[0])||void 0===e?void 0:e.domain);return s?(0,t.jsxs)("div",{className:"p-3 rounded-lg bg-blue-50 border border-blue-200",children:[(0,t.jsxs)("p",{className:"text-sm text-blue-700 mb-2",children:["View your scan results for ",(0,t.jsx)("strong",{children:s}),":"]}),(0,t.jsx)(p(),{href:"/sentiment/".concat(s),children:(0,t.jsxs)(m.z,{variant:"outline",size:"sm",className:"w-full border-blue-300 text-blue-700 hover:bg-blue-100",children:[(0,t.jsx)(E.Z,{className:"h-4 w-4 mr-2"}),"View Results",(0,t.jsx)(S.Z,{className:"h-4 w-4 ml-2"})]})})]}):null})(),(0,t.jsxs)("div",{className:"text-center py-2",children:[(0,t.jsx)("p",{className:"text-sm text-muted-foreground mb-3",children:"Want to scan more? Upgrade for unlimited brand analysis!"}),(0,t.jsx)(p(),{href:"/pricing",children:(0,t.jsxs)(m.z,{className:"bg-gradient-to-r from-violet-600 to-purple-600 hover:from-violet-700 hover:to-purple-700",children:[(0,t.jsx)($.Z,{className:"h-4 w-4 mr-2"}),"Upgrade for Unlimited Scans",(0,t.jsx)(S.Z,{className:"h-4 w-4 ml-2"})]})})]})]}),(null==N?void 0:N.eligible)&&!d&&!h&&(0,t.jsxs)("div",{className:"grid grid-cols-3 gap-2 pt-2 border-t",children:[(0,t.jsxs)("div",{className:"text-center p-2",children:[(0,t.jsx)(E.Z,{className:"h-5 w-5 text-green-600 mx-auto mb-1"}),(0,t.jsx)("p",{className:"text-xs font-medium",children:"Find Fans"})]}),(0,t.jsxs)("div",{className:"text-center p-2",children:[(0,t.jsx)(M.Z,{className:"h-5 w-5 text-red-600 mx-auto mb-1"}),(0,t.jsx)("p",{className:"text-xs font-medium",children:"Catch Issues"})]}),(0,t.jsxs)("div",{className:"text-center p-2",children:[(0,t.jsx)($.Z,{className:"h-5 w-5 text-blue-600 mx-auto mb-1"}),(0,t.jsx)("p",{className:"text-xs font-medium",children:"Track Reputation"})]})]})]})]})}var T=a(35624),B=a(94279),O=a(83917),Y=a(44459);function L(){var e,s,a,d;let{user:h,isAuthenticated:v,isLoading:j}=(0,r.a)(),f=(0,n.useRouter)();(0,c.useEffect)(()=>
1{j||v||f.push("/auth/signin")},[j,v,f]);let{data:b}=(0,i.a)({queryKey:["user","me"],queryFn:()=>x.TV.getMe(),enabled:v}),{data:y}=(0,i.a)({queryKey:["tracked-domains-usage"],queryFn:async()=>(await x.trackedDomainsAPI.getAll()).data||{domains:[],limit:0,used:0},enabled:v}),N=y&&y.domains&&y.domains.length>0,w=(null==y?void 0:y.used)||0,k=(null==y?void 0:y.limit)||0;return j||!v?(0,t.jsx)(l.A,{children:(0,t.jsx)("div",{className:"container mx-auto p-8",children:(0,t.jsx)("div",{className:"flex items-center justify-center h-64",children:(0,t.jsx)("p",{children:"Loading..."})})})}):(0,t.jsx)(l.A,{children:(0,t.jsxs)("div",{className:"space-y-8",children:[(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsxs)("h1",{className:"text-3xl font-bold text-gray-900",children:["Welcome back, ",(null==b?void 0:null===(s=b.data)||void 0===s?void 0:null===(e=s.full_name)||void 0===e?void 0:e.split(" ")[0])||(null==b?void 0:null===(d=b.data)||void 0===d?void 0:null===(a=d.email)||void 0===a?void 0:a.split("@")[0])||"there","!"]}),(0,t.jsx)("p",{className:"text-gray-600 mt-2",children:"See who's talking about your business and what they're saying"})]}),(0,t.jsx)(F,{}),(0,t.jsx)(I,{}),N&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(o,{title:"My Websites",description:"Sites you're monitoring for mentions",icon:(0,t.jsx)(T.Z,{className:"h-5 w-5"}),action:(0,t.jsxs)(u.C,{variant:w>=k?"destructive":"secondary",children:[w," / ",k," sites"]}),children:(0,t.jsx)(g.D,{})}),(0,t.jsx)(o,{title:"Recent Activity",description:"What's been happening with your sites",icon:(0,t.jsx)(B.Z,{className:"h-5 w-5"}),children:(0,t.jsx)(_,{})}),(0,t.jsx)(o,{title:"More Options",description:"Reports, settings, and developer tools",icon:(0,t.jsx)(O.Z,{className:"h-5 w-5"}),children:(0,t.jsxs)("div",{className:"grid md:grid-cols-2 gap-4",children:[(0,t.jsx)(p(),{href:"/reports",children:(0,t.jsxs)(m.z,{variant:"outline",className:"w-full",children:[(0,t.jsx)(O.Z,{className:"mr-2 h-4 w-4"}),"View Reports"]})}),(0,t.jsx)(p(),{href:"/account",children:(0,t.jsxs)(m.z,{variant:"outline",className:"w-full",children:[(0,t.jsx)(Y.Z,{className:"mr-2 h-4 w-4"}),"Account Settings"]})})]})})]})]})})}},18078:function(e,s,a){"use strict";a.d(s,{z$:function(){return y},fC:function(){return b}});var t=a(67294),r=a(85893);a(73935);var n=a(88426),i=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"].reduce((e,s)=>{let a=(0,n.Z8)(`Primitive.${s}`),i=t.forwardRef((e,t)=>{let{asChild:n,...i}=e,l=n?a:s;return"undefined"!=typeof window&&(window[Symbol.for("radix-ui")]=!0),(0,r.jsx)(l,{...i,ref:t})});return i.displayName=`Primitive.${s}`,{...e,[s]:i}},{}),l="Progress",[c,d]=function(e,s=[]){let a=[],n=()=>{let s=a.map(e=>t.createContext(e));return function(a){let r=a?.[e]||s;return t.useMemo(()=>({[`__scope${e}`]:{...a,[e]:r}}),[a,r])}};return n.scopeName=e,[function(s,n){let i=t.createContext(n);i.displayName=s+"Context";let l=a.length;a=[...a,n];let c=s=>{let{scope:a,children:n,...c}=s,d=a?.[e]?.[l]||i,o=t.useMemo(()=>c,Object.values(c));return(0,r.jsx)(d.Provider,{value:o,children:n})};return c.displayName=s+"Provider",[c,function(a,r){let c=r?.[e]?.[l]||i,d=t.useContext(c);if(d)return d;if(void 0!==n)return n;throw Error(`\`${a}\` must be used within \`${s}\``)}]},function(...e){let s=e[0];if(1===e.length)return s;let a=()=>{let a=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return function(e){let r=a.reduce((s,{useScope:a,scopeName:t})=>{let r=a(e)[`__scope${t}`];return{...s,...r}},{});return t.useMemo(()=>({[`__scope${s.scopeName}`]:r}),[r])}};return a.scopeName=s.scopeName,a}(n,...s)]}(l),[o,m]=c(l),u=t.forwardRef((e,s)=>{var a,t;let{__scopeProgress:n,value:l=null,max:c,getValueLabel:d=p,...m}=e;(c||0===c)&&!j(c)&&console.error((a=`${c}`,`Invalid prop \`max\` of value \`${a}\` supplied to \`Progress\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`));let u=j(c)?c:100;null===l||f(l,u)||console.error((t=`${l}`,`Invalid prop \`value\` of value \`${t}\` supplied to \`Progress\`. The \`value\` prop must be: 2 - a positive number 3 - less than the value passed to \`max\` (or 100 if no \`max\` prop is set) 4 - \`null\` or \`undefined\` if the progress is indeterminate. 5 6Defaulting to \`null\`.`));let x=f(l,u)?l:null,h=v(x)?d(x,u):void 0;return(0,r.jsx)(o,{scope:n,value:x,max:u,children:(0,r.jsx)(i.div,{"aria-valuemax":u,"aria-valuemin":0,"aria-valuenow":v(x)?x:void 0,"aria-valuetext":h,role:"progressbar","data-state":g(x,u),"data-value":x??void 0,"data-max":u,...m,ref:s})})});u.displayName=l;var x="ProgressIndicator",h=t.forwardRef((e,s)=>{let{__scopeProgress:a,...t}=e,n=m(x,a);
6return(0,r.jsx)(i.div,{"data-state":g(n.value,n.max),"data-value":n.value??void 0,"data-max":n.max,...t,ref:s})});function p(e,s){return`${Math.round(e/s*100)}%`}function g(e,s){return null==e?"indeterminate":e===s?"complete":"loading"}function v(e){return"number"==typeof e}function j(e){return v(e)&&!isNaN(e)&&e>0}function f(e,s){return v(e)&&!isNaN(e)&&e<=s&&e>=0}h.displayName=x;var b=u,y=h}},function(e){e.O(0,[400,9580,3773,7520,5214,3579,9654,2888,9774,179],function(){return e(e.s=40528)}),_N_E=e.O()}]);
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.