@canonry/canonry 7.90.2 → 7.91.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/agent-workspace/skills/canonry/references/canonry-cli.md +4 -0
- package/assets/assets/{AgentSetupPage-FfxjZWI8.js → AgentSetupPage-DpBlChWi.js} +1 -1
- package/assets/assets/{AuditHistoryPanel-YrEggsyA.js → AuditHistoryPanel-DAotR_zD.js} +1 -1
- package/assets/assets/{BacklinksPage-vXUxxplH.js → BacklinksPage-CFoi9mrt.js} +1 -1
- package/assets/assets/{HistoryPage-VJ_JQ7R3.js → HistoryPage-DIGmY4wi.js} +1 -1
- package/assets/assets/{MeasurementPropertyPage-DVm7CHU8.js → MeasurementPropertyPage-C6o9U2R6.js} +1 -1
- package/assets/assets/{ProjectPage-D6mHRRSs.js → ProjectPage-00Vsnxv4.js} +1 -1
- package/assets/assets/{RunsPage-DwtYzU9w.js → RunsPage-ChSbIrF9.js} +1 -1
- package/assets/assets/{SettingsPage-DsmgLFb7.js → SettingsPage-CIrzXeP8.js} +1 -1
- package/assets/assets/{SiteHealthSection-CFu6JBTb.js → SiteHealthSection-HZXdeAOx.js} +2 -2
- package/assets/assets/ToneBadge-ht0n6RUH.js +60 -0
- package/assets/assets/{TrafficPage-DGPSaWTl.js → TrafficPage-ZYsFSEuq.js} +1 -1
- package/assets/assets/{TrafficSourceDetailPage-C79eQilP.js → TrafficSourceDetailPage-D5uJZpZ4.js} +1 -1
- package/assets/assets/{account-context-GstYbqpX.js → account-context-DMLbDVNZ.js} +1 -1
- package/assets/assets/{agent-trust-copy-Ca4ys8J2.js → agent-trust-copy-DbpAXPxc.js} +1 -1
- package/assets/assets/{card-CgdGerYK.js → card-Be_eN_-Q.js} +1 -1
- package/assets/assets/{format-helpers-ByAY4dv0.js → format-helpers-IKCsn-Iw.js} +1 -1
- package/assets/assets/{index-D1ox2bx5.js → index-3jdPlyTf.js} +4 -4
- package/assets/assets/{query-client-DjRrRIsq.js → query-client-CoKNm49W.js} +1 -1
- package/assets/assets/{react-query-B8JD_K7g.js → react-query-DIdeX4Dn.js} +1 -1
- package/assets/assets/{react-sigma_core.esm.min-BGXzc_-G.js → react-sigma_core.esm.min-De3OcL3T.js} +1 -1
- package/assets/assets/{server-traffic-Bt9bexaP.js → server-traffic-DvN44H1n.js} +1 -1
- package/assets/assets/{service-SgtD5EOS.js → service-RpR2yqfP.js} +1 -1
- package/assets/index.html +7 -7
- package/dist/{ads-6BAITIBY.js → ads-QS4QEBHX.js} +3 -3
- package/dist/{agent-BE3D65U4.js → agent-TTGLGLPD.js} +7 -7
- package/dist/{agent-ask-TT6BAV2T.js → agent-ask-EBYJSSGR.js} +3 -3
- package/dist/{agent-conversations-GJDAWU36.js → agent-conversations-LPBMYN4F.js} +3 -3
- package/dist/{agent-journeys-UEL27GNY.js → agent-journeys-EL27YZKQ.js} +3 -3
- package/dist/{agent-memory-PB74OP46.js → agent-memory-YNWTLZGS.js} +3 -3
- package/dist/{agent-providers-5WFMNRRK.js → agent-providers-T7HJEQYM.js} +3 -3
- package/dist/{agent-transcript-IAGB3JXG.js → agent-transcript-EY6KUYYG.js} +3 -3
- package/dist/{analytics-5BVE7KUN.js → analytics-NTO6DGQ2.js} +3 -3
- package/dist/{apply-YJJWQ4JX.js → apply-UGT7DZHG.js} +3 -3
- package/dist/{backfill-6OLGZIEV.js → backfill-5L4DWEWP.js} +10 -10
- package/dist/{backlinks-4JK26OIO.js → backlinks-JRG57JRJ.js} +3 -3
- package/dist/{bing-NZYYPB2M.js → bing-ZV6QDFTJ.js} +3 -3
- package/dist/{bootstrap-6KHK63W3.js → bootstrap-GJHNMV5P.js} +10 -10
- package/dist/{cdp-PTXWVX6T.js → cdp-ZN47QU5O.js} +7 -7
- package/dist/{chunk-N7LRPMWR.js → chunk-2N7BYEZO.js} +2 -2
- package/dist/{chunk-ZV6PMFF4.js → chunk-3HNHOS6O.js} +1 -1
- package/dist/{chunk-DF4B6OGX.js → chunk-4F6X52HV.js} +4 -4
- package/dist/{chunk-WYMBWCG5.js → chunk-4FFIIZB5.js} +1 -1
- package/dist/{chunk-AFYKUX2X.js → chunk-56EXMS52.js} +2 -2
- package/dist/{chunk-DZO6CATO.js → chunk-6DP2YPZY.js} +4 -4
- package/dist/{chunk-HUQDD26S.js → chunk-6Y4EVLV2.js} +7 -7
- package/dist/{chunk-7VJJXLRP.js → chunk-7KHSKOV6.js} +3 -3
- package/dist/{chunk-TA4L7U2M.js → chunk-AXWUCOYT.js} +1 -1
- package/dist/{chunk-USHY3SH6.js → chunk-C3BSCGUH.js} +15 -1
- package/dist/{chunk-QWNDNZJ3.js → chunk-EOIH5XHT.js} +2 -2
- package/dist/{chunk-NKGQCCUS.js → chunk-GDFU7FOR.js} +6 -6
- package/dist/{chunk-K2B64IEQ.js → chunk-HT7FQ45E.js} +30 -23
- package/dist/{chunk-WNDBACO7.js → chunk-IHMODTQ7.js} +4 -4
- package/dist/{chunk-7ASKZHS4.js → chunk-IQ5RKJKQ.js} +1 -1
- package/dist/{chunk-PID3C4B7.js → chunk-L5U7VT4A.js} +1 -1
- package/dist/{chunk-UG7TZJIG.js → chunk-LSIE5MHG.js} +1 -1
- package/dist/{chunk-I7DAEE3L.js → chunk-N7MHVCML.js} +5 -5
- package/dist/{chunk-NPX5SL54.js → chunk-NAPFULBT.js} +1 -1
- package/dist/{chunk-2UULABPI.js → chunk-OI6YQMSB.js} +3 -3
- package/dist/{chunk-GKX5F7NX.js → chunk-P4MNYMJJ.js} +1 -1
- package/dist/{chunk-MGBUQHQZ.js → chunk-PC27ODE3.js} +4 -4
- package/dist/{chunk-ETIIPSWL.js → chunk-PQNT2JUO.js} +25 -0
- package/dist/{chunk-LTZNUDSI.js → chunk-QUS7755A.js} +3 -3
- package/dist/{chunk-XCEA5OMI.js → chunk-SYOQULRL.js} +2 -2
- package/dist/{chunk-K34Y6HQZ.js → chunk-UJL5K3LB.js} +390 -362
- package/dist/{chunk-Q6EZEVXE.js → chunk-UQVUDSAV.js} +1 -1
- package/dist/{chunk-L2MDMZFT.js → chunk-W6H7WDHW.js} +3 -3
- package/dist/{chunk-SDXMG4VX.js → chunk-WEDOXGGI.js} +27 -7
- package/dist/{chunk-LQWMNDZR.js → chunk-WOEGZKXQ.js} +1 -1
- package/dist/{chunk-F6WNKKGG.js → chunk-WTKGSKCS.js} +2 -2
- package/dist/{chunk-QLVTMPFW.js → chunk-YCRSIOIN.js} +2 -2
- package/dist/{chunk-F442MSX2.js → chunk-YFOTI7LJ.js} +2 -2
- package/dist/{chunk-YB2GAK32.js → chunk-YPHRRCS3.js} +5 -5
- package/dist/{chunk-OOVWMWMT.js → chunk-YVY23HNW.js} +1 -1
- package/dist/{citations-WX4VO6ZI.js → citations-6723MJLH.js} +3 -3
- package/dist/{cli-catalog-BTRNR2UP.js → cli-catalog-RVBNEPWA.js} +3 -3
- package/dist/{cli-commands-TJBEUBBX.js → cli-commands-2Q6ETPXR.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-HZRZWCEN.js → competitor-ENYN5RAD.js} +3 -3
- package/dist/{content-NOZDHI3M.js → content-TT3PF4CR.js} +3 -3
- package/dist/{dashboard-TZLWHXP4.js → dashboard-K32TQKTC.js} +6 -6
- package/dist/{demo-2PYBQD47.js → demo-IMMMFC4N.js} +1 -1
- package/dist/{demo-server-JEQNGMMV.js → demo-server-TFEWWKQ3.js} +12 -12
- package/dist/{discover-A2XFXHOC.js → discover-HATQTTDG.js} +3 -3
- package/dist/{discover-eval-A6SBUYXF.js → discover-eval-64TWPB5Z.js} +3 -3
- package/dist/{doctor-GZACELPF.js → doctor-6C5TXOG3.js} +3 -3
- package/dist/{evidence-RVFMUWIL.js → evidence-K43NRSOT.js} +3 -3
- package/dist/{export-cmd-X2TFZGNJ.js → export-cmd-KU64GUQ5.js} +3 -3
- package/dist/{ga-TOT3V67A.js → ga-KXKLUQBQ.js} +3 -3
- package/dist/{gbp-KP4YZU6S.js → gbp-5CZTROVP.js} +3 -3
- package/dist/{google-GCFSTV5N.js → google-6TNU7SVF.js} +4 -4
- package/dist/{google-marketing-ANS65KQN.js → google-marketing-UCUIJBQG.js} +1 -1
- package/dist/{health-cmd-UKMNLU6D.js → health-cmd-ZFJ7ZOWI.js} +3 -3
- package/dist/{history-TWGYSAZZ.js → history-V664SORR.js} +3 -3
- package/dist/index.d.ts +53 -26
- package/dist/index.js +25 -25
- package/dist/{init-3GSNOIUH.js → init-ILS6UQCH.js} +12 -12
- package/dist/{insights-7IOC7WIR.js → insights-JFW7HBPR.js} +3 -3
- package/dist/intelligence-service-XDMZTN3T.js +16 -0
- package/dist/{journeys-NWKT45PT.js → journeys-QTZXBKBT.js} +3 -3
- package/dist/{keys-ZZYZUHUK.js → keys-KGI5S2IE.js} +3 -3
- package/dist/{keyword-F6EIX5KM.js → keyword-XU6Y4XVH.js} +3 -3
- package/dist/{logs-B45FXS6E.js → logs-E2DQXWQQ.js} +3 -3
- package/dist/{mcp-WPNCNWA5.js → mcp-PQE6WFED.js} +4 -4
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-QT5HJ3KC.js → measurement-plan-NBGLF7BI.js} +5 -5
- package/dist/{notify-Z3LIF3SO.js → notify-SHEAQNUJ.js} +3 -3
- package/dist/{organic-evidence-R5TM7XUB.js → organic-evidence-LMXCFABG.js} +3 -3
- package/dist/{overview-6TZHJLQN.js → overview-MXEBDUCA.js} +4 -4
- package/dist/{project-VMPVOQ2A.js → project-MWZGTK4S.js} +3 -3
- package/dist/{query-EXSH5QP7.js → query-EZQY45JT.js} +3 -3
- package/dist/{research-6R6BEL4X.js → research-PSPDLEQL.js} +3 -3
- package/dist/{results-export-ZJRL3ECU.js → results-export-7FLSFC7J.js} +3 -3
- package/dist/{run-C4VXAJE3.js → run-MASOXS63.js} +4 -4
- package/dist/{schedule-KC6ETWMO.js → schedule-V32G7TBR.js} +21 -5
- package/dist/{search-SUR6BEQD.js → search-R2S5CAVK.js} +3 -3
- package/dist/{serve-SEHH35PJ.js → serve-AEICU77K.js} +26 -26
- package/dist/{session-D42KUKCZ.js → session-TERRMJL7.js} +13 -13
- package/dist/{settings-LTCG3D5B.js → settings-KBY4766O.js} +3 -3
- package/dist/{sitemaps-YMTZLF5S.js → sitemaps-FLMA6DMY.js} +3 -3
- package/dist/{skills-THMG3L64.js → skills-WAHOLVYH.js} +2 -2
- package/dist/{snapshot-ZEVB3EE4.js → snapshot-VJYM7UX2.js} +3 -3
- package/dist/{src-HPVSTXVF.js → src-XVBKS6UX.js} +2 -2
- package/dist/{status-LPCPTWKO.js → status-YFAUBVEA.js} +4 -4
- package/dist/{technical-aeo-J6LNT45B.js → technical-aeo-656NEU3A.js} +3 -3
- package/dist/{telemetry-BPY34GDV.js → telemetry-CJ7ENZDY.js} +4 -4
- package/dist/{tools-K3G43ESI.js → tools-3A3I2TX2.js} +11 -11
- package/dist/{traffic-BOIFAPAR.js → traffic-NN6ECPRS.js} +5 -5
- package/dist/{trends-A2MDRSQQ.js → trends-HXZVTQ3I.js} +3 -3
- package/dist/{users-VJOQODJK.js → users-PELDCAXQ.js} +3 -3
- package/dist/{visibility-stats-YNMJYASA.js → visibility-stats-W3AELURT.js} +3 -3
- package/dist/{wordpress-BWG6D7VH.js → wordpress-TAVEI2XQ.js} +3 -3
- package/package.json +1 -1
- package/assets/assets/ToneBadge-B3rD6bDF.js +0 -60
- package/dist/intelligence-service-42Q3OVI5.js +0 -16
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-
|
|
2
|
-
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{$ as n,B as r,C as i,D as a,E as o,F as s,I as c,J as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,U as v,V as y,W as b,X as x,Z as S,_ as C,at as w,ct as T,d as E,h as D,it as O,j as ee,k,l as te,m as A,n as ne,nt as re,r as j,rt as ie,s as ae,tt as M,u as N,v as oe,w as se,x as ce,y as le}from"./vendor-lucide-Bo69m9KC.js";import{a as ue,c as de,i as P,n as fe,o as pe,r as F,s as I,t as me,u as he}from"./vendor-radix-PQeN8gOe.js";import{n as ge,r as L,t as _e}from"./vendor-markdown-BiRP51B0.js";import{E as ve,T as ye,_ as be,a as xe,b as R,c as Se,d as Ce,f as we,h as Te,i as Ee,l as z,m as De,n as Oe,o as ke,r as Ae,s as je,u as B,x as Me}from"./vendor-tanstack-tBjrfzKu.js";import{$ as Ne,$i as Pe,$r as Fe,$t as Ie,Ai as Le,At as Re,B as ze,Bi as Be,Bn as Ve,Bt as He,Ci as Ue,Cn as We,Ct as Ge,D as Ke,Di as V,Dn as qe,E as Je,Ei as Ye,En as Xe,Er as Ze,Et as Qe,Fi as $e,Fn as et,Gr as tt,Gt as nt,Hi as rt,Hn as it,Hr as at,In as ot,J as st,Ji as ct,Jt as lt,K as ut,Ki as dt,Ln as ft,Mn as pt,Mt as mt,N as ht,Nn as gt,O as _t,Oi as H,On as vt,Ot as yt,Pn as bt,Q as xt,Qr as St,Qs as Ct,Qt as wt,Rn as Tt,Si as Et,Sn as Dt,St as Ot,T as kt,Ti as At,Tn as jt,Tt as Mt,Ui as Nt,Ur as Pt,Vi as Ft,Vn as It,W as Lt,Wr as Rt,X as zt,Xi as Bt,Xt as Vt,Y as Ht,Yt as Ut,Z as Wt,Zi as Gt,Zt as Kt,a as qt,aa as Jt,at as Yt,bn as Xt,bt as Zt,ci as Qt,ct as $t,d as en,ea as tn,ei as nn,en as rn,et as an,fn as on,ft as sn,hn as cn,i as ln,ia as un,in as dn,jn as fn,k as pn,ki as mn,kt as hn,ln as gn,mt as U,n as _n,na as vn,nt as yn,oa as bn,ot as xn,pi as Sn,pt as Cn,qt as wn,r as W,ra as Tn,rn as En,rt as Dn,sa as On,st as kn,t as An,ta as jn,tn as Mn,tt as Nn,u as Pn,un as Fn,ur as In,vn as Ln,wn as Rn,wt as zn,xn as Bn,xt as Vn,y as Hn,yn as Un,zn as Wn}from"./ToneBadge-B3rD6bDF.js";import{_ as Gn,c as Kn,d as qn,l as Jn,o as Yn,u as Xn,v as Zn}from"./format-helpers-ByAY4dv0.js";import{n as Qn,r as $n,t as er}from"./account-context-GstYbqpX.js";import{t as tr}from"./async-handler-Bj3TnIRw.js";import{a as nr,c as rr,d as ir,f as ar,i as or,l as sr,m as cr,o as lr,p as ur,r as dr}from"./query-client-DjRrRIsq.js";import{Dt as fr,Et as pr,Rn as mr,_n as hr,_t as gr,a as _r,fn as vr,gn as yr,gt as br,hn as xr,mn as Sr,pn as Cr,r as wr,vn as Tr,vt as Er,yn as Dr,yt as Or}from"./react-query-B8JD_K7g.js";import{h as kr}from"./ChartPrimitives-Cs2iavxU.js";import{t as Ar}from"./InfoTooltip-CNLlIWeP.js";import{a as jr,i as Mr,n as Nr,r as Pr,t as Fr}from"./card-CgdGerYK.js";import{t as Ir}from"./vendor-yaml-Y43rmNgW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Lr=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Rr=t(((e,t)=>{t.exports=Lr()})),zr=t((e=>{var t=Rr(),n=T(),r=he();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),ee=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),A=Symbol.for(`react.consumer`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),j=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),N=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var P=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ee:return`Fragment`;case te:return`Profiler`;case k:return`StrictMode`;case j:return`Suspense`;case ie:return`SuspenseList`;case N:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case ne:return e.displayName||`Context`;case A:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ge=[],L=-1;function _e(e){return{current:e}}function ve(e){0>L||(e.current=ge[L],ge[L]=null,L--)}function ye(e,t){L++,ge[L]=e.current,e.current=t}var be=_e(null),xe=_e(null),R=_e(null),Se=_e(null);function Ce(e,t){switch(ye(R,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function we(){ve(be),ve(xe),ve(R)}function Te(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,ye(Se,e)),t=be.current;var n=dp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function Ee(e){xe.current===e&&(ve(be),ve(xe)),Se.current===e&&(ve(Se),sh._currentValue=me)}var z,De;function Oe(e){if(z===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||``,De=-1<e.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./SiteHealthSection-HZXdeAOx.js","./rolldown-runtime-XKyaHtl9.js","./vendor-lucide-Bo69m9KC.js","./vendor-markdown-BiRP51B0.js","./vendor-tanstack-tBjrfzKu.js","./vendor-recharts-CY6tH-r6.js","./vendor-radix-PQeN8gOe.js","./ToneBadge-ht0n6RUH.js","./account-context-DMLbDVNZ.js","./query-client-CoKNm49W.js","./react-query-DIdeX4Dn.js","./ChartPrimitives-Cs2iavxU.js","./InfoTooltip-CNLlIWeP.js","./card-Be_eN_-Q.js","./ProjectPage-00Vsnxv4.js","./format-helpers-IKCsn-Iw.js","./async-handler-Bj3TnIRw.js","./Hint-uoVNfr0U.js","./AuditHistoryPanel-DAotR_zD.js","./service-RpR2yqfP.js","./server-traffic-DvN44H1n.js","./agent-trust-copy-DbpAXPxc.js","./RunsPage-ChSbIrF9.js","./HistoryPage-DIGmY4wi.js","./SettingsPage-CIrzXeP8.js","./AgentSetupPage-DpBlChWi.js","./BacklinksPage-CFoi9mrt.js","./TrafficPage-ZYsFSEuq.js","./TrafficSourceDetailPage-D5uJZpZ4.js","./MeasurementPropertyPage-C6o9U2R6.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{r as e,t}from"./rolldown-runtime-XKyaHtl9.js";import{$ as n,B as r,C as i,D as a,E as o,F as s,I as c,J as l,L as u,M as d,N as f,O as p,P as m,Q as h,R as g,S as _,U as v,V as y,W as b,X as x,Z as S,_ as C,at as w,ct as T,d as E,h as D,it as O,j as ee,k,l as te,m as A,n as ne,nt as re,r as j,rt as ie,s as ae,tt as M,u as N,v as oe,w as se,x as ce,y as le}from"./vendor-lucide-Bo69m9KC.js";import{a as ue,c as de,i as P,n as fe,o as pe,r as F,s as I,t as me,u as he}from"./vendor-radix-PQeN8gOe.js";import{n as ge,r as L,t as _e}from"./vendor-markdown-BiRP51B0.js";import{E as ve,T as ye,_ as be,a as xe,b as R,c as Se,d as Ce,f as we,h as Te,i as Ee,l as z,m as De,n as Oe,o as ke,r as Ae,s as je,u as B,x as Me}from"./vendor-tanstack-tBjrfzKu.js";import{$ as Ne,$i as Pe,$r as Fe,$t as Ie,Ai as Le,At as Re,B as ze,Bi as Be,Bn as Ve,Bt as He,Ci as Ue,Cn as We,Ct as Ge,D as Ke,Di as V,Dn as qe,E as Je,Ei as Ye,En as Xe,Er as Ze,Et as Qe,Fi as $e,Fn as et,Gr as tt,Gt as nt,Hi as rt,Hn as it,Hr as at,In as ot,J as st,Ji as ct,Jt as lt,K as ut,Ki as dt,Ln as ft,Mn as pt,Mt as mt,N as ht,Nn as gt,O as _t,Oi as H,On as vt,Ot as yt,Pn as bt,Q as xt,Qr as St,Qs as Ct,Qt as wt,Rn as Tt,Si as Et,Sn as Dt,St as Ot,T as kt,Ti as At,Tn as jt,Tt as Mt,Ui as Nt,Ur as Pt,Vi as Ft,Vn as It,W as Lt,Wr as Rt,X as zt,Xi as Bt,Xt as Vt,Y as Ht,Yt as Ut,Z as Wt,Zi as Gt,Zt as Kt,a as qt,aa as Jt,at as Yt,bn as Xt,bt as Zt,ci as Qt,ct as $t,d as en,ea as tn,ei as nn,en as rn,et as an,fn as on,ft as sn,hn as cn,i as ln,ia as un,in as dn,jn as fn,k as pn,ki as mn,kt as hn,ln as gn,mt as U,n as _n,na as vn,nt as yn,oa as bn,ot as xn,pi as Sn,pt as Cn,qt as wn,r as W,ra as Tn,rn as En,rt as Dn,sa as On,st as kn,t as An,ta as jn,tn as Mn,tt as Nn,u as Pn,un as Fn,ur as In,vn as Ln,wn as Rn,wt as zn,xn as Bn,xt as Vn,y as Hn,yn as Un,zn as Wn}from"./ToneBadge-ht0n6RUH.js";import{_ as Gn,c as Kn,d as qn,l as Jn,o as Yn,u as Xn,v as Zn}from"./format-helpers-IKCsn-Iw.js";import{n as Qn,r as $n,t as er}from"./account-context-DMLbDVNZ.js";import{t as tr}from"./async-handler-Bj3TnIRw.js";import{a as nr,c as rr,d as ir,f as ar,i as or,l as sr,m as cr,o as lr,p as ur,r as dr}from"./query-client-CoKNm49W.js";import{Dt as fr,Et as pr,Rn as mr,_n as hr,_t as gr,a as _r,fn as vr,gn as yr,gt as br,hn as xr,mn as Sr,pn as Cr,r as wr,vn as Tr,vt as Er,yn as Dr,yt as Or}from"./react-query-DIdeX4Dn.js";import{h as kr}from"./ChartPrimitives-Cs2iavxU.js";import{t as Ar}from"./InfoTooltip-CNLlIWeP.js";import{a as jr,i as Mr,n as Nr,r as Pr,t as Fr}from"./card-Be_eN_-Q.js";import{t as Ir}from"./vendor-yaml-Y43rmNgW.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var Lr=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&te(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&te(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var ee=new MessageChannel,k=ee.port2;ee.port1.onmessage=D,O=function(){k.postMessage(null)}}else O=function(){_(D,0)};function te(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,te(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),Rr=t(((e,t)=>{t.exports=Lr()})),zr=t((e=>{var t=Rr(),n=T(),r=he();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function f(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&f(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function p(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function m(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function h(e){var t=[null,null],n=p(e);return n===null||g(t,e,n.child,{foundSelf:!1}),t}function g(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&g(e,t,n.child,r))return!0;n=n.sibling}return!1}function _(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var v=null,y=null;function b(e,t,n){return e===n||e===t&&(v=e,!0)}function x(e,t,n){return e===n?(y=e,!1):e===t&&(y!==null&&(v=e),!0)}function S(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function C(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var w=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),ee=Symbol.for(`react.fragment`),k=Symbol.for(`react.strict_mode`),te=Symbol.for(`react.profiler`),A=Symbol.for(`react.consumer`),ne=Symbol.for(`react.context`),re=Symbol.for(`react.forward_ref`),j=Symbol.for(`react.suspense`),ie=Symbol.for(`react.suspense_list`),ae=Symbol.for(`react.memo`),M=Symbol.for(`react.lazy`),N=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var P=Symbol.for(`react.client.reference`);function fe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===P?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ee:return`Fragment`;case te:return`Profiler`;case k:return`StrictMode`;case j:return`Suspense`;case ie:return`SuspenseList`;case N:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case ne:return e.displayName||`Context`;case A:return(e._context.displayName||`Context`)+`.Consumer`;case re:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ae:return t=e.displayName||null,t===null?fe(e.type)||`Memo`:t;case M:t=e._payload,e=e._init;try{return fe(e(t))}catch{}}return null}var pe=Array.isArray,F=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,I=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,me={pending:!1,data:null,method:null,action:null},ge=[],L=-1;function _e(e){return{current:e}}function ve(e){0>L||(e.current=ge[L],ge[L]=null,L--)}function ye(e,t){L++,ge[L]=e.current,e.current=t}var be=_e(null),xe=_e(null),R=_e(null),Se=_e(null);function Ce(e,t){switch(ye(R,t),ye(xe,e),ye(be,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?up(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=up(t),e=dp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ve(be),ye(be,e)}function we(){ve(be),ve(xe),ve(R)}function Te(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,ye(Se,e)),t=be.current;var n=dp(t,e.type);t!==n&&(ye(xe,e),ye(be,n))}function Ee(e){xe.current===e&&(ve(be),ve(xe)),Se.current===e&&(ve(Se),sh._currentValue=me)}var z,De;function Oe(e){if(z===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);z=t&&t[1]||``,De=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+z+e+De}var ke=!1;function Ae(e,t){if(!e||ke)return``;ke=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -41,7 +41,7 @@ spec:
|
|
|
41
41
|
`);ke(t),Re(!0)}}catch(e){Et(e instanceof Error?e.message:`Failed to generate queries`),y({flowVersion:1,onboardingSessionId:_,event:`onboarding.blocked`,step:`queries`,action:`generate_queries`,reasonCode:Wn(e,`unknown`)},`onboarding.blocked:queries:generate`)}finally{Ct(!1)}}},jn=async()=>{if(!L)return;let e=xn;if(e.length!==0){Zt(!0),Jt(null);try{await nt(L,e),Kt(!0),await r(),y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:`competitors`,method:`manual`,countBucket:In(e.length)},`onboarding.step_completed:competitors`),M(4)}catch(e){Jt(e instanceof Error?e.message:`Failed to save competitors`),y({flowVersion:1,onboardingSessionId:_,event:`onboarding.blocked`,step:`competitors`,action:`save`,reasonCode:`unknown`},`onboarding.blocked:competitors:save`)}finally{Zt(!1)}}},Mn=async()=>{let e=fn.trim();if(e){hn(!0),_n(null);try{await Un(`gemini`,{apiKey:e}),ir({title:`Gemini configured`,detail:`Provider is ready — continuing setup.`,tone:`positive`,dedupeKey:`setup:gemini:configured`,dedupeMode:`drop`}),pn(``),await r(),yt(c.providerStatuses.find(e=>e.name.toLowerCase()===`gemini`)?.name??`gemini`),y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:`system`,method:`inline`},`onboarding.step_completed:system`)}catch(e){_n(e instanceof Error?e.message:`Failed to save Gemini key`),y({flowVersion:1,onboardingSessionId:_,event:`onboarding.blocked`,step:`system`,action:`configure_provider`,reasonCode:`provider_save_failed`},`onboarding.blocked:system:provider_save_failed`)}finally{hn(!1)}}},Nn=async e=>{let t=ye?.name??L;if(!t)throw Error(`Create a project before choosing models.`);let n=await Ln(t,e);be(n),await r()},Pn=async()=>{if(!Ge()){if(!L||wn){sn(wn??`Complete setup before launching the first check.`);let e=Cn??(L?Sn===0?`no_queries`:`run_rejected`:`unknown`);Ze||y({flowVersion:1,onboardingSessionId:_,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,providerCountBucket:In(H),queryCountBucket:In(Sn),reasonCode:e})}else{an(!0),sn(null);try{let e=await un.mutateAsync({projectName:L,projectLabel:ue||ce||L,sourceAction:`setup-launch`});ln(e.id),nn(!0),Tt(L,e.id),en.current=e.id,Ze||y({flowVersion:1,onboardingSessionId:_,event:`run.requested`,origin:`dashboard_setup`,result:`queued`,providerCountBucket:In(H),queryCountBucket:In(Sn)}),await r()}catch(e){sn(e instanceof Error?e.message:`Failed to queue the AI Visibility check. Retry when the instance is ready.`),Ze||y({flowVersion:1,onboardingSessionId:_,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,providerCountBucket:In(H),queryCountBucket:In(Sn),reasonCode:Wn(e,`run_rejected`)})}finally{an(!1)}}}},Fn=()=>M(e=>m?2:Math.max(0,e-1)),Rn=(e,t,n)=>{y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:e,method:`existing`,...n===void 0?{}:{countBucket:In(n)}},`onboarding.step_completed:${e}`),M(t)},zn=()=>{y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:`queries`,method:`skipped`,countBucket:`0`},`onboarding.step_completed:queries`),m?De():M(3)},Bn=()=>{y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:`competitors`,method:`skipped`,countBucket:`0`},`onboarding.step_completed:competitors`),M(4)},Vn=m?`section`:Fr,Hn=ot!==!0||at===!0?(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,className:yf,onClick:()=>{r(),Xe&&rt.refetch(),dt&&ht.refetch()},children:`Check again`}):null,Kn=(ct||jt)&&!!zt,qn=m&&(ae===2||ae===4)?l?(0,K.jsxs)(`section`,{"aria-labelledby":`setup-provider-heading`,className:`space-y-3 border-b border-default pb-6 mb-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsx)(`h2`,{id:`setup-provider-heading`,className:`text-heading-20 text-heading`,children:`AI engines`}),(0,K.jsx)(An,{tone:ot===!0?`positive`:st?`caution`:`neutral`,children:ot===!0?`Ready`:st?`Choose models`:ct?`Not connected`:`Checking`}),(0,K.jsx)(Ar,{text:ot===!0?qe.length>0?`AI Visibility checks and Research use your provider account.`:`ChatGPT in Chrome runs AI Visibility checks. Query Research needs an API provider.`:st?`OpenRouter is connected. Choose the models your AI Visibility checks ask. You can save queries now.`:ct?`AI Visibility checks need an AI engine. You can save queries now and connect one later.`:`Checking connected AI engines. You can choose queries meanwhile.`})]}),ot===!0&&(qe.length>0||at===!0)?(0,K.jsxs)(`ul`,{"aria-label":`Connected AI engines`,className:`divide-y divide-default material-base`,children:[qe.map(e=>{let t=Gt(e.name),n=e.displayName??e.name;return(0,K.jsxs)(`li`,{className:`flex min-h-11 items-center justify-between gap-3 px-3.5 py-2 text-label-14`,title:t?Pe(e.name):void 0,children:[(0,K.jsx)(`span`,{className:`min-w-0 truncate text-heading`,children:t?n.replace(/ via OpenRouter$/,``):n}),(0,K.jsx)(`span`,{className:`shrink-0 text-secondary`,children:t?`OpenRouter`:e.model??``})]},e.name)}),qe.length===0?(0,K.jsx)(`li`,{className:`flex min-h-11 items-center px-3.5 py-2 text-label-14 text-heading`,children:`ChatGPT in Chrome`}):null]}):null,dt?_t?(0,K.jsx)(Ud,{inline:!0,catalog:_t,selected:ze,onAdd:e=>Nn({providers:e,providerModels:{}})}):ht.isPending?(0,K.jsx)(`p`,{role:`status`,className:`text-copy-14 text-secondary`,children:`Loading OpenRouter models…`}):(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,K.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Couldn't load OpenRouter's model list.`}),(0,K.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>{ht.refetch()},children:`Retry`})]}):null,ct||jt?zt?(0,K.jsx)(`div`,{children:(0,K.jsx)(Md,{compact:!0,leadingField:(0,K.jsxs)(`div`,{className:`min-w-0 space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-14-strong text-secondary`,htmlFor:`setup-provider`,children:`Provider to connect`}),(0,K.jsx)(`select`,{ref:At,id:`setup-provider`,className:`setup-input`,value:zt.name,onChange:e=>{e.target.value!==zt.name&&(kt.current=document.activeElement===e.currentTarget,Ot(e.target.value))},children:Rt.map(e=>(0,K.jsx)(`option`,{value:e.name,children:e.displayName??e.name},e.name))})]}),secondaryActions:Hn,offerFreeTier:ct,providerName:zt.name,keyUrl:zt.keyUrl,modelHint:zt.modelHint,onSaved:()=>{Mt(!1),r()}},zt.name)}):(0,K.jsx)(`p`,{className:`max-w-prose text-copy-14 text-secondary`,children:ze.length>0?`This project's provider selection is ${ze.join(`, `)}. Configure an allowed provider in Settings, or change the selection in project Settings.`:`Provider configuration is unavailable here. Open Settings to connect an answer engine, then check again.`}):null,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(ot===!0||st)&&!jt&&zt?(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,className:`-ml-3 text-button-14`,onClick:()=>Mt(!0),children:`Use a different provider`}):null,!zt||at===!0?(0,K.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,asChild:!0,children:(0,K.jsx)(B,{to:`/settings`,target:`_blank`,rel:`noopener noreferrer`,children:`Open provider settings`})}):null,!Kn&&!dt?Hn:null]})]}):(0,K.jsxs)(`section`,{"aria-labelledby":`setup-provider-heading`,className:`space-y-2 border-b border-default pb-6 mb-6`,children:[(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,K.jsx)(`h2`,{id:`setup-provider-heading`,className:`text-heading-20 text-heading`,children:`AI engines`}),tt?null:(0,K.jsxs)(`span`,{role:`status`,className:`flex items-center gap-2`,children:[(0,K.jsx)(An,{tone:ot===!0?`positive`:`neutral`,children:ot===!0?`Ready`:ot===!1?`Not connected`:`Checking`}),(0,K.jsx)(Ar,{text:ot===!0?`An AI engine is available for this project. An administrator manages provider settings.`:ot===!1?`Ask an administrator to connect an AI engine for this project. You can save queries now.`:`Checking for a connected AI engine. An administrator manages provider settings. You can save queries now.`})]})]}),tt?(0,K.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Provider readiness could not be checked. Try again.`}):null,(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,className:yf,disabled:Qe.isFetching,onClick:()=>{Qe.refetch()},children:tt?`Retry provider check`:`Check again`})]}):null,Jn=(()=>{switch(ae){case 0:return(0,K.jsxs)(Fr,{className:`surface-card step-card`,children:[(0,K.jsx)(`div`,{className:`section-head`,children:(0,K.jsx)(`div`,{children:(0,K.jsx)(`h2`,{children:`System check`})})}),(0,K.jsx)(`p`,{className:`supporting-copy`,children:`Checking that your Canonry instance is configured and reachable.`}),(0,K.jsx)(`div`,{className:`compact-stack`,children:d.healthChecks.map(e=>(0,K.jsxs)(`div`,{className:`health-check-row`,children:[(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`run-row-title`,children:e.label}),(0,K.jsx)(`p`,{className:`supporting-copy`,children:e.id===`provider`&&f?`OpenRouter connected. Choose models before your first check.`:e.detail}),e.id===`provider`&&e.state!==`ready`&&(0,K.jsxs)(`div`,{className:`mt-3 material-base p-3 space-y-2`,children:[(0,K.jsxs)(`p`,{className:`text-copy-13 text-secondary`,children:[`Paste a Gemini key to enable visibility checks (free at`,` `,(0,K.jsx)(`a`,{href:`https://aistudio.google.com/apikey`,target:`_blank`,rel:`noreferrer`,className:`text-positive-400 hover:text-positive underline underline-offset-2`,children:`aistudio.google.com`}),`).`]}),(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`input`,{type:`password`,value:fn,onChange:e=>pn(e.target.value),placeholder:`AI... (paste here)`,className:`flex-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-14-mono text-heading placeholder:text-faint focus:border-mono-600 focus:outline-none`,disabled:mn}),(0,K.jsx)(W,{type:`button`,size:`sm`,disabled:mn||!fn.trim(),onClick:tr(Mn),children:mn?`Saving...`:`Save`})]}),gn&&(0,K.jsxs)(`div`,{role:`alert`,className:`space-y-1 text-label-12 text-negative`,children:[(0,K.jsx)(`p`,{children:gn}),(0,K.jsx)(`p`,{children:`Check that the key is complete, then retry Save.`})]}),(0,K.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`Connect more answer engines later in`,` `,(0,K.jsx)(B,{to:`/settings`,className:`text-link hover:underline`,children:`Settings`}),`.`]}),c.providerStatuses.some(e=>e.name===`openrouter`)&&(0,K.jsxs)(`details`,{children:[(0,K.jsx)(`summary`,{className:`min-h-11 cursor-pointer py-3 text-label-14 text-link`,children:`Connect OpenRouter`}),(0,K.jsx)(Md,{providerName:`openrouter`,compact:!0,keyUrl:c.providerStatuses.find(e=>e.name===`openrouter`)?.keyUrl,onSaved:()=>{r()}})]})]})]}),(0,K.jsx)(An,{tone:e.state===`ready`?`positive`:`caution`,title:e.id===`api`?xi(u.apiStatus):e.id===`worker`?xi(u.workerStatus):e.detail,children:e.state===`ready`?`Ready`:`Attention`})]},e.id))}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[d.launchState.blockedReason?(0,K.jsx)(`p`,{role:`status`,className:`supporting-copy text-negative`,children:d.launchState.blockedReason}):(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,disabled:!p,title:d.launchState.blockedReason,onClick:()=>{y({flowVersion:1,onboardingSessionId:_,event:`onboarding.step_completed`,step:`system`,method:`automatic`},`onboarding.step_completed:system`),M(re)},children:`Continue`})]})]});case 1:return(0,K.jsxs)(Fr,{className:`surface-card step-card`,children:[(0,K.jsxs)(`div`,{className:`section-head`,children:[(0,K.jsx)(`div`,{children:(0,K.jsx)(`h2`,{children:`Create project`})}),L?(0,K.jsx)(An,{tone:`positive`,children:`Created`}):null]}),L?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-neutral`,children:[`Project `,(0,K.jsx)(`span`,{className:`text-heading text-label-14-strong`,children:L}),` created successfully.`]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,onClick:()=>Rn(`project`,2),children:`Continue`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`project-name`,children:`Project name`}),(0,K.jsx)(`input`,{id:`project-name`,className:`setup-input`,type:`text`,placeholder:`my-website`,value:ce,onChange:e=>le(e.target.value)}),vn&&vn!==ce?(0,K.jsxs)(`p`,{className:`supporting-copy`,children:[`Slug: `,vn]}):null]}),(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`display-name`,children:`Display name (optional)`}),(0,K.jsx)(`input`,{id:`display-name`,className:`setup-input`,type:`text`,placeholder:`My Website`,value:ue,onChange:e=>de(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`domain`,children:`Canonical domain`}),(0,K.jsx)(`input`,{id:`domain`,className:`setup-input`,type:`text`,placeholder:`example.com`,value:P,onChange:e=>fe(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`setup-field-row`,children:[(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`country`,children:`Country`}),(0,K.jsx)(`input`,{id:`country`,className:`setup-input`,type:`text`,placeholder:`US`,maxLength:2,value:pe,onChange:e=>F(e.target.value.toUpperCase())})]}),(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`language`,children:`Language`}),(0,K.jsx)(`input`,{id:`language`,className:`setup-input`,type:`text`,placeholder:`en`,maxLength:5,value:I,onChange:e=>me(e.target.value.toLowerCase())})]})]}),(0,K.jsxs)(`label`,{className:`flex items-start gap-3 rounded-md border border-default bg-surface p-3 cursor-pointer hover:border-strong`,children:[(0,K.jsx)(`input`,{type:`checkbox`,className:`mt-0.5 h-4 w-4 rounded border-strong bg-bg`,checked:he,onChange:e=>ge(e.target.checked)}),(0,K.jsxs)(`span`,{className:`flex-1`,children:[(0,K.jsx)(`span`,{className:`block text-label-14 text-heading`,children:`Auto-extract backlinks`}),(0,K.jsxs)(`span`,{className:`block text-label-12 text-muted mt-0.5`,children:[`When a new Common Crawl release syncs, automatically extract backlinks for this project.`,` `,(0,K.jsx)(B,{to:`/backlinks`,className:`text-positive-400 hover:text-positive underline underline-offset-2`,children:`Manage backlinks`})]})]})]}),xe?(0,K.jsx)(`p`,{className:`text-negative-400 text-copy-14`,children:xe}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,disabled:!vn||!P||we,onClick:tr(Dn),children:we?`Creating...`:`Create project`})]})]})]});case 2:return(0,K.jsxs)(Vn,{className:m?`visibility-setup-section step-card`:`surface-card step-card`,"aria-labelledby":`setup-queries-heading`,children:[(0,K.jsxs)(`div`,{className:`section-head`,children:[(0,K.jsx)(`div`,{children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`h2`,{id:`setup-queries-heading`,children:`Add queries`}),(0,K.jsx)(Ar,{text:`Queries your customers ask AI assistants, one per line. You can refine the list later.`})]})}),se?(0,K.jsx)(An,{tone:`neutral`,children:`Loading`}):E.isError?(0,K.jsx)(An,{tone:`negative`,children:`Load failed`}):Ae?(0,K.jsxs)(An,{tone:`positive`,children:[bn.length,` saved`]}):(0,K.jsxs)(An,{tone:`neutral`,children:[bn.length,` quer`,bn.length===1?`y`:`ies`]})]}),(0,K.jsxs)(`div`,{className:`space-y-2 border-b border-default pb-4`,children:[(0,K.jsxs)(`div`,{className:`flex flex-col gap-3 sm:flex-row sm:items-start sm:justify-between`,children:[(0,K.jsx)(`div`,{className:`min-w-0 space-y-1`,children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`h3`,{className:`text-heading-14 text-heading`,children:`Research queries with your agent`}),(0,K.jsx)(Ar,{text:`Ask your agent to compare answers and available sources with Canonry Research, then recommend queries. Research does not change your tracked queries.`})]})}),(0,K.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,className:`shrink-0 self-start ${yf}`,onClick:tr(Vt),children:Nt?`Research prompt copied`:`Copy research prompt`})]}),(0,K.jsxs)(`details`,{open:Ft||void 0,className:`text-label-14 text-secondary`,children:[(0,K.jsx)(`summary`,{className:`min-h-9 cursor-pointer py-2 text-link pointer-coarse:py-3 max-md:py-3 ${yf}`,children:`View agent prompt`}),(0,K.jsx)(`textarea`,{"aria-label":`Agent query research prompt`,readOnly:!0,className:`setup-textarea mt-2 w-full`,rows:8,value:Bt})]}),Ft?(0,K.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:`Could not copy. Select and copy the prompt above.`}):null]}),se?(0,K.jsx)(`div`,{className:`material-base p-4 text-label-14 text-secondary`,role:`status`,children:`Loading saved queries…`}):E.isError?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsx)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:`Saved queries could not be loaded. Retry before changing the query basket.`}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:m?Ee:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,onClick:()=>{E.refetch()},children:`Retry loading queries`})]})]}):Ae?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsx)(`ul`,{className:`detail-list`,children:bn.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:m?Ee:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:()=>je(!1),children:`Edit queries`}),(0,K.jsx)(W,{type:`button`,onClick:()=>Rn(`queries`,m?4:3,bn.length),children:`Continue`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[qe.length>0?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-muted text-label-12 normal-case`,children:[(0,K.jsx)(`span`,{className:`flex-1 border-t border-base`}),`auto-generate`,(0,K.jsx)(`span`,{className:`flex-1 border-t border-base`})]}),(0,K.jsxs)(`div`,{className:`flex items-end gap-2`,children:[(0,K.jsxs)(`div`,{className:`setup-field flex-1`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`gen-provider`,children:`Provider`}),(0,K.jsx)(`select`,{id:`gen-provider`,className:`setup-input`,value:vt,onChange:e=>yt(e.target.value),children:qe.map(e=>(0,K.jsxs)(`option`,{value:e.name,children:[e.displayName??e.name,e.model&&!Gt(e.name)?` (${e.model})`:``]},e.name))})]}),(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`gen-count`,children:`Count`}),(0,K.jsx)(`select`,{id:`gen-count`,className:`setup-input`,value:bt,onChange:e=>xt(Number(e.target.value)),children:[3,5,10,15,20].map(e=>(0,K.jsx)(`option`,{value:e,children:e},e))})]}),(0,K.jsx)(W,{type:`button`,variant:`outline`,disabled:St||!vt,onClick:tr(kn),children:St?`Analyzing site...`:`Generate`})]}),wt?(0,K.jsx)(`p`,{className:`text-negative-400 text-copy-14`,children:wt}):null]}):null,m?null:(0,K.jsxs)(`div`,{className:`flex items-center gap-2 text-muted text-label-12 normal-case`,children:[(0,K.jsx)(`span`,{className:`flex-1 border-t border-base`}),`or type manually`,(0,K.jsx)(`span`,{className:`flex-1 border-t border-base`})]}),(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`queries`,children:`Queries (one per line)`}),(0,K.jsx)(`textarea`,{id:`queries`,className:`setup-textarea`,rows:6,placeholder:`emergency dentist brooklyn
|
|
42
42
|
best invisalign downtown brooklyn
|
|
43
43
|
pediatric dentist brooklyn heights`,value:Oe,onChange:e=>ke(e.target.value)})]}),Me?(0,K.jsx)(`p`,{className:`text-negative-400 text-copy-14`,children:Me}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:m?Ee:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,onClick:zn,children:m?`Finish without AI Visibility`:`Skip for now`}),(0,K.jsx)(W,{type:`button`,disabled:bn.length===0||Fe,onClick:tr(On),children:Fe?`Saving...`:`Save ${bn.length} quer${bn.length===1?`y`:`ies`}`})]})]})]});case 3:return(0,K.jsxs)(Fr,{className:`surface-card step-card`,children:[(0,K.jsxs)(`div`,{className:`section-head`,children:[(0,K.jsx)(`div`,{children:(0,K.jsx)(`h2`,{children:`Add competitors`})}),Wt?(0,K.jsx)(An,{tone:`positive`,children:`Saved`}):null]}),(0,K.jsx)(`p`,{className:`supporting-copy`,children:`Optional. Domains that compete for the same queries, one per line. You can add them later from the project.`}),Wt?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsx)(`ul`,{className:`detail-list`,children:xn.map(e=>(0,K.jsx)(`li`,{children:e},e))}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,onClick:()=>Rn(`competitors`,4,xn.length),children:`Continue`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`div`,{className:`setup-field`,children:[(0,K.jsx)(`label`,{className:`setup-label`,htmlFor:`competitors`,children:`Competitor domains (one per line)`}),(0,K.jsx)(`textarea`,{id:`competitors`,className:`setup-textarea`,rows:4,placeholder:`competitor1.com
|
|
44
|
-
competitor2.com`,value:Ht,onChange:e=>Ut(e.target.value)})]}),qt?(0,K.jsx)(`p`,{className:`text-negative-400 text-copy-14`,children:qt}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:xn.length===0?(0,K.jsx)(W,{type:`button`,onClick:Bn,children:`Continue without competitors`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Bn,children:`Skip`}),(0,K.jsx)(W,{type:`button`,disabled:Xt,onClick:tr(jn),children:Xt?`Saving...`:`Save ${xn.length} competitor${xn.length===1?``:`s`}`})]})})]})]})]});case 4:{let e=dn.data,t=e?.status??(cn===k?.id?k.status:void 0),n=t===`completed`||t===`partial`||t===`failed`||t===`cancelled`,r=e?.snapshots??[],i=e?.queryCounts,a=t?Sf(t,r.length):!1,c=te&&!tn,u=on??(e?.error?Gn(e.error):t===`cancelled`?`The check was cancelled before it produced a baseline.`:(t===`completed`||t===`partial`)&&r.length===0?`The check finished without producing any snapshots.`:k?.statusDetail||`The check did not produce a baseline.`),d=null;return c||a?d=(0,K.jsx)(An,{tone:`positive`,children:`Complete`}):on&&!tn?d=(0,K.jsx)(An,{tone:`negative`,children:`Failed`}):n?d=(0,K.jsx)(An,{tone:`negative`,children:t===`cancelled`?`Cancelled`:`Failed`}):tn&&(d=(0,K.jsx)(An,{tone:`caution`,children:`Running`})),(0,K.jsxs)(Fr,{className:`surface-card step-card`,children:[(0,K.jsxs)(`div`,{className:`section-head`,children:[(0,K.jsx)(`div`,{children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`h2`,{children:Ge()?`AI Visibility`:`Run your first AI Visibility check`}),Ge()?null:(0,K.jsx)(Ar,{text:`Asks each AI engine your queries and records whether ${L??`your site`} is mentioned and cited. It uses your provider account. You can also finish now and run it later from the project.`})]})}),d]}),c?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-secondary`,children:[`Setup is complete. `,(0,K.jsx)(`span`,{className:`text-strong text-label-14-strong`,children:L}),` already has a successful answer-visibility baseline.`]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:()=>z(),children:o?`Finish setup`:`Open project dashboard →`})]})]}):!tn&&Ge()?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[L?(0,K.jsx)(rc,{projectName:L}):(0,K.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:Zs}),on&&(0,K.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:on}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:Ee,children:`Open project dashboard →`})]})]}):tn?n?a?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-neutral`,children:[`Check complete. Your first AI Visibility snapshot for`,` `,(0,K.jsx)(`span`,{className:`text-heading text-label-14-strong`,children:L}),`:`]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 mt-1`,children:[(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Mentioned`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:i?(0,K.jsxs)(K.Fragment,{children:[i.mentionedQueries,(0,K.jsxs)(`span`,{className:`text-faint text-label-18`,children:[` / `,i.totalQueries]})]}):`Unavailable`}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`queries naming your brand`})]}),(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Cited`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:i?(0,K.jsxs)(K.Fragment,{children:[i.citedQueries,(0,K.jsxs)(`span`,{className:`text-faint text-label-18`,children:[` / `,i.totalQueries]})]}):`Unavailable`}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`queries citing your site`})]}),(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Results`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:r.length}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`completed engine checks`})]})]}),!s&&L?(0,K.jsx)(jd,{projectName:L}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:()=>z(),children:o?`Finish setup`:`Open project dashboard →`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:[(0,K.jsx)(`p`,{children:u}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-13 text-secondary`,children:Ge()?Zs:l?`Fix provider or query configuration if needed, then retry without leaving setup.`:`Ask an administrator to review the provider and query configuration.`})]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[l&&!Ge()?(0,K.jsx)(W,{type:`button`,variant:`outline`,asChild:!0,children:(0,K.jsx)(B,{to:`/settings`,children:`Configure providers`})}):(0,K.jsx)(`span`,{}),Ge()||!l?(0,K.jsx)(W,{type:`button`,onClick:Ee,children:`Open project dashboard →`}):(0,K.jsx)(W,{type:`button`,disabled:rn||!!wn,onClick:tr(Pn),children:rn?`Retrying…`:`Retry check`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsx)(`p`,{className:`text-neutral`,children:`Check running. This usually takes 30 to 60 seconds.`}),(0,K.jsx)(`div`,{className:`material-base p-3 text-label-12 text-muted`,children:(0,K.jsxs)(`p`,{children:[`Status: `,(0,K.jsx)(`span`,{className:`text-neutral`,children:t??`queued`})]})}),dn.isError&&(0,K.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:[(0,K.jsx)(`p`,{children:dn.error instanceof Error?dn.error.message:`Could not refresh the check status.`}),(0,K.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2`,onClick:()=>{dn.refetch()},children:`Retry status check`})]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:o?()=>z():Ee,children:o?`Finish setup`:`Watch on project page`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[(0,K.jsx)(`span`,{className:`font-mono tabular-nums text-heading`,children:bn.length}),` `,bn.length===1?`query`:`queries`,H>0?(0,K.jsxs)(K.Fragment,{children:[` · `,(0,K.jsx)(`span`,{className:`font-mono tabular-nums text-heading`,children:H}),` `,H===1?`engine`:`engines`]}):null]}),(wn||on)&&(0,K.jsx)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:(0,K.jsx)(`p`,{children:on??wn})}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,onClick:De,children:`Finish without running`}),Cn===`no_provider`&&!m?(0,K.jsx)(W,{type:`button`,asChild:!0,children:(0,K.jsx)(B,{to:`/settings`,children:`Configure a provider`})}):(0,K.jsx)(W,{type:`button`,disabled:rn||!!wn,title:wn,onClick:tr(Pn),children:rn?`Starting…`:on?`Retry check`:`Run check`})]})]})]})}default:return null}})();return(0,K.jsxs)(`div`,{className:m?`page-container visibility-setup`:`page-container`,children:[o?(0,K.jsx)(kd,{current:`visibility`,outcomes:{site:T,fixes:T}}):null,(0,K.jsxs)(`div`,{className:`page-header`,children:[(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{ref:i?a:void 0,tabIndex:i?-1:void 0,className:`page-title outline-none`,children:i?`Set up AI Visibility`:`Setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:i?`Connect an AI engine, then choose queries for your first check.`:`Create a project and run its first visibility check.`})]}),o?(0,K.jsx)(`div`,{className:`page-header-right`,children:(0,K.jsx)(W,{type:`button`,variant:`outline`,className:yf,onClick:De,children:`Skip AI Visibility`})}):null]}),o?null:(0,K.jsx)(Ef,{current:m?+(ae===4):ae,labels:m?xf:bf}),(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2 text-label-13 text-secondary`,children:[(0,K.jsx)(`p`,{children:`Draft fields use tab storage when available. Credentials are excluded from drafts.`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,disabled:!!C&&!E.isSuccess||we||Fe||Xt||rn,onClick:Qt,children:`Reset unsaved fields`})]}),(0,K.jsxs)(`section`,{className:`setup-wizard`,children:[qn,ae===4&&!tn&&l&&f&&ye&&!dt&&(0,K.jsx)(Zd,{project:ye,onSave:Nn}),Jn]})]})}var Af=`modulepreload`,jf=function(e,t){return new URL(e,t).href},Mf={},Nf=function(e){return e.pathname.endsWith(`.css`)},Pf=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Ff=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=jf(t,n);let r=s(t),i=Nf(r);return Pf(Mf,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Af,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},If=(0,G.lazy)(async()=>({default:(await Ff(()=>import(`./SiteHealthSection-CFu6JBTb.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)).SiteHealthSection})),Lf=`Public pages only, crawled from this computer and stored locally. The first scan reads up to 100 pages, then stops.`,Rf=1800,zf=`https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent`,Bf=`Use the official Canonry docs:
|
|
44
|
+
competitor2.com`,value:Ht,onChange:e=>Ut(e.target.value)})]}),qt?(0,K.jsx)(`p`,{className:`text-negative-400 text-copy-14`,children:qt}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(`div`,{className:`flex gap-2`,children:xn.length===0?(0,K.jsx)(W,{type:`button`,onClick:Bn,children:`Continue without competitors`}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Bn,children:`Skip`}),(0,K.jsx)(W,{type:`button`,disabled:Xt,onClick:tr(jn),children:Xt?`Saving...`:`Save ${xn.length} competitor${xn.length===1?``:`s`}`})]})})]})]})]});case 4:{let e=dn.data,t=e?.status??(cn===k?.id?k.status:void 0),n=t===`completed`||t===`partial`||t===`failed`||t===`cancelled`,r=e?.snapshots??[],i=e?.queryCounts,a=t?Sf(t,r.length):!1,c=te&&!tn,u=on??(e?.error?Gn(e.error):t===`cancelled`?`The check was cancelled before it produced a baseline.`:(t===`completed`||t===`partial`)&&r.length===0?`The check finished without producing any snapshots.`:k?.statusDetail||`The check did not produce a baseline.`),d=null;return c||a?d=(0,K.jsx)(An,{tone:`positive`,children:`Complete`}):on&&!tn?d=(0,K.jsx)(An,{tone:`negative`,children:`Failed`}):n?d=(0,K.jsx)(An,{tone:`negative`,children:t===`cancelled`?`Cancelled`:`Failed`}):tn&&(d=(0,K.jsx)(An,{tone:`caution`,children:`Running`})),(0,K.jsxs)(Fr,{className:`surface-card step-card`,children:[(0,K.jsxs)(`div`,{className:`section-head`,children:[(0,K.jsx)(`div`,{children:(0,K.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(`h2`,{children:Ge()?`AI Visibility`:`Run your first AI Visibility check`}),Ge()?null:(0,K.jsx)(Ar,{text:`Asks each AI engine your queries and records whether ${L??`your site`} is mentioned and cited. It uses your provider account. You can also finish now and run it later from the project.`})]})}),d]}),c?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-secondary`,children:[`Setup is complete. `,(0,K.jsx)(`span`,{className:`text-strong text-label-14-strong`,children:L}),` already has a successful answer-visibility baseline.`]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:()=>z(),children:o?`Finish setup`:`Open project dashboard →`})]})]}):!tn&&Ge()?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[L?(0,K.jsx)(rc,{projectName:L}):(0,K.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:Zs}),on&&(0,K.jsx)(`p`,{role:`alert`,className:`text-copy-14 text-negative`,children:on}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:Ee,children:`Open project dashboard →`})]})]}):tn?n?a?(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-neutral`,children:[`Check complete. Your first AI Visibility snapshot for`,` `,(0,K.jsx)(`span`,{className:`text-heading text-label-14-strong`,children:L}),`:`]}),(0,K.jsxs)(`div`,{className:`grid grid-cols-3 gap-2 mt-1`,children:[(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Mentioned`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:i?(0,K.jsxs)(K.Fragment,{children:[i.mentionedQueries,(0,K.jsxs)(`span`,{className:`text-faint text-label-18`,children:[` / `,i.totalQueries]})]}):`Unavailable`}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`queries naming your brand`})]}),(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Cited`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:i?(0,K.jsxs)(K.Fragment,{children:[i.citedQueries,(0,K.jsxs)(`span`,{className:`text-faint text-label-18`,children:[` / `,i.totalQueries]})]}):`Unavailable`}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`queries citing your site`})]}),(0,K.jsxs)(`div`,{className:`material-base p-3`,children:[(0,K.jsx)(`p`,{className:`text-copy-13-strong text-secondary`,children:`Results`}),(0,K.jsx)(`p`,{className:`text-copy-24-strong tabular-nums text-primary mt-1`,children:r.length}),(0,K.jsx)(`p`,{className:`mt-0.5 text-copy-14 text-secondary`,children:`completed engine checks`})]})]}),!s&&L?(0,K.jsx)(jd,{projectName:L}):null,(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,onClick:()=>z(),children:o?`Finish setup`:`Open project dashboard →`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:[(0,K.jsx)(`p`,{children:u}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-13 text-secondary`,children:Ge()?Zs:l?`Fix provider or query configuration if needed, then retry without leaving setup.`:`Ask an administrator to review the provider and query configuration.`})]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[l&&!Ge()?(0,K.jsx)(W,{type:`button`,variant:`outline`,asChild:!0,children:(0,K.jsx)(B,{to:`/settings`,children:`Configure providers`})}):(0,K.jsx)(`span`,{}),Ge()||!l?(0,K.jsx)(W,{type:`button`,onClick:Ee,children:`Open project dashboard →`}):(0,K.jsx)(W,{type:`button`,disabled:rn||!!wn,onClick:tr(Pn),children:rn?`Retrying…`:`Retry check`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsx)(`p`,{className:`text-neutral`,children:`Check running. This usually takes 30 to 60 seconds.`}),(0,K.jsx)(`div`,{className:`material-base p-3 text-label-12 text-muted`,children:(0,K.jsxs)(`p`,{children:[`Status: `,(0,K.jsx)(`span`,{className:`text-neutral`,children:t??`queued`})]})}),dn.isError&&(0,K.jsxs)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:[(0,K.jsx)(`p`,{children:dn.error instanceof Error?dn.error.message:`Could not refresh the check status.`}),(0,K.jsx)(W,{type:`button`,variant:`outline`,size:`sm`,className:`mt-2`,onClick:()=>{dn.refetch()},children:`Retry status check`})]}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(`span`,{}),(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:o?()=>z():Ee,children:o?`Finish setup`:`Watch on project page`})]})]}):(0,K.jsxs)(`div`,{className:`compact-stack`,children:[(0,K.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[(0,K.jsx)(`span`,{className:`font-mono tabular-nums text-heading`,children:bn.length}),` `,bn.length===1?`query`:`queries`,H>0?(0,K.jsxs)(K.Fragment,{children:[` · `,(0,K.jsx)(`span`,{className:`font-mono tabular-nums text-heading`,children:H}),` `,H===1?`engine`:`engines`]}):null]}),(wn||on)&&(0,K.jsx)(`div`,{role:`alert`,className:`rounded-md border border-negative bg-negative-soft p-3 text-label-14 text-negative`,children:(0,K.jsx)(`p`,{children:on??wn})}),(0,K.jsxs)(`div`,{className:`setup-nav`,children:[(0,K.jsx)(W,{type:`button`,variant:`outline`,onClick:Fn,children:`Back`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,onClick:De,children:`Finish without running`}),Cn===`no_provider`&&!m?(0,K.jsx)(W,{type:`button`,asChild:!0,children:(0,K.jsx)(B,{to:`/settings`,children:`Configure a provider`})}):(0,K.jsx)(W,{type:`button`,disabled:rn||!!wn,title:wn,onClick:tr(Pn),children:rn?`Starting…`:on?`Retry check`:`Run check`})]})]})]})}default:return null}})();return(0,K.jsxs)(`div`,{className:m?`page-container visibility-setup`:`page-container`,children:[o?(0,K.jsx)(kd,{current:`visibility`,outcomes:{site:T,fixes:T}}):null,(0,K.jsxs)(`div`,{className:`page-header`,children:[(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{ref:i?a:void 0,tabIndex:i?-1:void 0,className:`page-title outline-none`,children:i?`Set up AI Visibility`:`Setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:i?`Connect an AI engine, then choose queries for your first check.`:`Create a project and run its first visibility check.`})]}),o?(0,K.jsx)(`div`,{className:`page-header-right`,children:(0,K.jsx)(W,{type:`button`,variant:`outline`,className:yf,onClick:De,children:`Skip AI Visibility`})}):null]}),o?null:(0,K.jsx)(Ef,{current:m?+(ae===4):ae,labels:m?xf:bf}),(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2 text-label-13 text-secondary`,children:[(0,K.jsx)(`p`,{children:`Draft fields use tab storage when available. Credentials are excluded from drafts.`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,disabled:!!C&&!E.isSuccess||we||Fe||Xt||rn,onClick:Qt,children:`Reset unsaved fields`})]}),(0,K.jsxs)(`section`,{className:`setup-wizard`,children:[qn,ae===4&&!tn&&l&&f&&ye&&!dt&&(0,K.jsx)(Zd,{project:ye,onSave:Nn}),Jn]})]})}var Af=`modulepreload`,jf=function(e,t){return new URL(e,t).href},Mf={},Nf=function(e){return e.pathname.endsWith(`.css`)},Pf=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},Ff=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=jf(t,n);let r=s(t),i=Nf(r);return Pf(Mf,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Af,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},If=(0,G.lazy)(async()=>({default:(await Ff(()=>import(`./SiteHealthSection-HZXdeAOx.js`).then(e=>e.n),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13]),import.meta.url)).SiteHealthSection})),Lf=`Public pages only, crawled from this computer and stored locally. The first scan reads up to 100 pages, then stops.`,Rf=1800,zf=`https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent`,Bf=`Use the official Canonry docs:
|
|
45
45
|
- Agent quickstart: https://github.com/Canonry/canonry#or-use-any-shell-capable-coding-agent
|
|
46
46
|
- CLI reference: https://github.com/Canonry/canonry/blob/main/skills/canonry/references/canonry-cli.md
|
|
47
47
|
- Plugin setup: https://github.com/Canonry/canonry/blob/main/docs/plugins.md
|
|
@@ -57,4 +57,4 @@ ${Bf}Pick one path and stay on it. Use connected Canonry tools (plugin or MCP) o
|
|
|
57
57
|
4. List projects with the connected project tool or \`cnry project list --format json\`, and reuse one whose domain matches. Confirm the proposed name is not already assigned to a different domain. To find out whether a project has already been scanned, run \`cnry technical-aeo score <project> --format json\` with no \`--run-id\`, which reports the latest run. Read the \`hasData\` field, not the score: this command exits 0 and reports \`aggregateScore: 0\` for a project that has never been scanned, so reading the score alone would have you tell me my site scored zero. If \`hasData\` is true and \`runStatus\` is \`completed\` or \`partial\`, read that scan instead of starting a new one. If no project matches, show the exact create operation and wait for approval.
|
|
58
58
|
5. Propose a bounded Site Health scan: \`--max-pages 100\` for a first look, plus whether dead-link checking is on (it is off unless you pass \`--check-dead-links\`). Show the connected operation or the exact \`cnry technical-aeo run <project> --max-pages 100 --wait --format json\` command with the project name filled in, and wait for separate approval before scanning. \`--wait\` polls for up to 15 minutes and returns only the run id and status. If the status it returns is still \`queued\` or \`running\`, the scan has not finished: do not rerun it or report results, poll \`cnry technical-aeo progress <project> --run-id <run-id> --format json\` until it is terminal. If \`--wait\` outruns your own tool timeout first, recover the run id with \`cnry technical-aeo score <project> --format json\` and poll the same way.
|
|
59
59
|
6. When the run is \`completed\` or \`partial\`, read \`cnry technical-aeo crawl <project> --run-id <run-id> --format json\` first. It is the only one of these commands that carries \`termination\` and \`complete\`; the score and pages commands do not. Then read \`cnry technical-aeo score <project> --run-id <run-id> --format json\` and \`cnry technical-aeo pages <project> --run-id <run-id> --sort score-asc --limit 10 --format jsonl\`. Tell me the termination reason in plain words and whether the scan covered the whole site or stopped at a page, link, depth, or time limit. A \`partial\` run scored the pages it reached and not my site, so never present it as a full-site result. If it stopped early, the fix depends on the reason, so say which: a page or depth limit needs a larger budget, a time limit needs a smaller scan (a lower \`--max-pages\` or \`--max-depth\`). If the run failed or was cancelled, inspect the run error and stop.
|
|
60
|
-
7. Summarize only completed evidence, then propose AI Visibility setup. Ask before you add queries, connect providers, start a provider-backed or quota-consuming run, edit files, or publish.`;function Vf(e,t){return e===`legacy`?`legacy`:e===`platform`?`platform`:t.state===`success`?t.projectCount===0?`platform`:`legacy`:t.state===`error`?`retry`:`loading`}var Hf=`pointer-coarse:min-h-11 max-md:min-h-11`,Uf=`2000-01-01T00:00:00.000Z`,Wf=5e3;function Gf(e,t){let n=new Set,r=new Map;for(let e of t)e.trigger!==mn.probe&&(r.has(e.projectId)||r.set(e.projectId,e.id),(e.status===H.completed||e.status===H.partial)&&n.add(e.projectId));let i=(e.every(e=>e.createdAt)?[...e].sort((e,t)=>(e.createdAt??``).localeCompare(t.createdAt??``)||e.name.localeCompare(t.name)):e).find(e=>!n.has(e.id));return i?{projectName:i.name,runId:r.get(i.id)}:null}var Kf=[{value:`US`,label:`United States`},{value:`CA`,label:`Canada`},{value:`GB`,label:`United Kingdom`},{value:`AU`,label:`Australia`},{value:`NZ`,label:`New Zealand`},{value:`IE`,label:`Ireland`},{value:`DE`,label:`Germany`},{value:`FR`,label:`France`},{value:`ES`,label:`Spain`},{value:`IT`,label:`Italy`},{value:`NL`,label:`Netherlands`},{value:`BR`,label:`Brazil`},{value:`MX`,label:`Mexico`},{value:`IN`,label:`India`},{value:`SG`,label:`Singapore`},{value:`JP`,label:`Japan`}],qf=[{value:`en`,label:`English`},{value:`es`,label:`Spanish`},{value:`fr`,label:`French`},{value:`de`,label:`German`},{value:`it`,label:`Italian`},{value:`pt`,label:`Portuguese`},{value:`nl`,label:`Dutch`},{value:`ja`,label:`Japanese`}];function Jf(e,t){try{let n=new Intl.DisplayNames([`en`],{type:`region`}),r=new Intl.DisplayNames([`en`],{type:`language`}),i=e.length===2?n.of(e.toUpperCase()):void 0,a=t?r.of(t.toLowerCase()):void 0;return`${i??(e||`Country`)} · ${a??(t||`Language`)}`}catch{return`${e||`Country`} · ${t||`Language`}`}}function Yf(e,t){let n=e.trim().toUpperCase(),r=t.trim().toLowerCase();return{countryValid:Kf.some(e=>e.value===n),languageValid:qf.some(e=>e.value===r)}}function Xf(e){let t=e.replace(/^\[|\]$/g,``);return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(t)||t.includes(`:`)}function Zf(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z\d+.-]*:\/\//i.test(t)?t:`https://${t}`,r;try{r=new URL(n)}catch{return null}if(r.protocol!==`http:`&&r.protocol!==`https:`)return null;let i=r.hostname.toLowerCase().replace(/^www\./,``);if(!i||i===`localhost`||Xf(i)||!i.includes(`.`))return null;let a=i.replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return a?{canonicalDomain:i,projectName:a,displayName:i}:null}async function Qf(e,t=Rf){let n,r=new Promise(e=>{n=setTimeout(()=>e({state:`timed-out`}),t)}),i=await Promise.race([e.then(e=>({state:`queued`,run:e})),r]);return n&&clearTimeout(n),i}function $f(e,t){e.catch(()=>{ir({title:`Site Health scan did not start`,detail:`The project is safe. Choose Run scan in Site Health to retry.`,tone:`negative`,dedupeKey:`site-health-dispatch:${t}`})})}function ep(e){let t=(0,G.useRef)(gt()).current,n=(0,G.useRef)(new Set);return{onboardingSessionId:t,emit:(0,G.useCallback)((t,r)=>{if(r){if(n.current.has(r))return;n.current.add(r)}mt({...t,surface:e,eventId:pt()})},[e])}}function tp(e,t){return e instanceof qt&&e.statusCode===409?`A project with this name already exists. Change the project name, or open the existing project.`:e instanceof Error&&e.message?e.message:t}function np(){return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Preparing setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Checking the projects already on this install.`})]})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3 material-base p-4 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading projects…`]})]})}function rp({onRetry:e}){return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Can’t load projects`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Canonry could not confirm whether this install already has a project.`})]})}),(0,K.jsxs)(`div`,{className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:`Setup is paused to protect existing projects.`}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:`Check the connection or sign in again, then retry.`}),(0,K.jsx)(W,{type:`button`,className:`mt-4`,variant:`secondary`,onClick:e,children:`Retry project check`})]})]})}function ip({projectName:e,initialRunId:t}){return(0,K.jsx)(Rl,{title:`Site Health setup`,children:(0,K.jsx)(ap,{projectName:e,initialRunId:t})})}function ap({projectName:e,initialRunId:t}){let n=Ce(),r=R({...vr({client:U}),enabled:!!e,retry:!1,refetchOnMount:`always`}),{onboardingSessionId:i,emit:a}=ep(`site_health`),[o]=(0,G.useState)(()=>bt(t));(0,G.useEffect)(()=>{o&&fn()},[o]),(0,G.useEffect)(()=>{e&&a({flowVersion:1,onboardingSessionId:i,event:`onboarding.started`,step:`run`,resumed:!!t&&!o},`onboarding.started`)},[a,o,t,i,e]),(0,G.useEffect)(()=>{e&&t&&it(e)?.runId!==t&&Tt(e,t)},[t,e]);let c=R({...Sr({client:U,path:{id:t??``}}),enabled:!!t,refetchInterval:({state:e})=>{let t=e.data?.status;return t===`completed`||t===`partial`||t===`failed`||t===`cancelled`?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if((0,G.useEffect)(()=>{if(!e||!t||!c)return;if(c===`completed`||c===`partial`){a({flowVersion:1,onboardingSessionId:i,event:`onboarding.step_completed`,step:`run`,method:`automatic`},`onboarding.step_completed:run`),ft(t);return}if(c!==`failed`&&c!==`cancelled`)return;let n=c===`cancelled`?`run_cancelled`:`run_failed`;a({flowVersion:1,onboardingSessionId:i,event:`onboarding.blocked`,step:`run`,action:`retry_run`,reasonCode:n},`onboarding.blocked:run:${n}`),ft(t)},[a,t,i,e,c]),!e)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project not found`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`This setup link does not identify a project.`})]})}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{n({to:`/projects`})},children:`View projects`})]});if(r.isPending)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`div`,{className:`mt-8 flex items-center gap-3 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading Site Health setup…`]})]});if(r.isError)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Can’t resume setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Canonry could not load the project for this Site Health scan.`})]})}),(0,K.jsxs)(`div`,{className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,children:[(0,K.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Check the connection or sign in again, then retry.`}),(0,K.jsx)(W,{type:`button`,className:`mt-4`,variant:`secondary`,onClick:()=>{r.refetch()},children:`Retry project check`})]})]});let l=r.data.find(t=>t.name===e);return l?(0,K.jsxs)(`div`,{className:`page-container max-w-7xl py-8 md:py-10`,children:[(0,K.jsx)(`h1`,{className:`sr-only`,children:`Set up Canonry`}),(0,K.jsx)(G.Suspense,{fallback:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`div`,{className:`flex min-h-72 items-center justify-center gap-3 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading Site Health…`]})]}),children:(0,K.jsx)(If,{projectName:l.name,projectId:l.id,initialRunId:t,onReleaseInitialRun:()=>{n({to:`/setup`,search:{onboarding:`site-health`,setupProject:l.name},replace:!0})},showOnboardingActions:!0,onContinueOnboarding:()=>{t||ud(l.name),n({to:`/setup`,search:{experience:`legacy`,onboarding:`site-health`,setupProject:l.name},replace:!0})},onSkipOnboarding:()=>{t||ud(l.name),a({flowVersion:1,onboardingSessionId:i,event:`onboarding.step_completed`,step:`run`,method:`skipped`},`onboarding.step_completed:run`),n({to:`/setup`,search:{onboarding:`complete`,setupProject:l.name,skipped:`visibility`},replace:!0})}})})]}):(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project not found`}),(0,K.jsxs)(`p`,{className:`page-subtitle`,children:[`Canonry could not find `,e,`. It will not open a different project.`]})]})}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{n({to:`/projects`})},children:`View projects`})]})}function op(){let e=we({from:`/setup`}),t=e.onboarding===`site-health`&&!e.setupProject,n=e.onboarding===`site-health`&&e.experience!==`legacy`,r=kn(),i=e.experience===`legacy`?`legacy`:e.experience===`platform`?`platform`:r,[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(void 0),l=R({...vr({client:U}),enabled:i===`auto`,retry:!1,refetchOnMount:`always`}),u=R({...xr({client:U,query:{kind:V[`site-audit`],since:Uf,limit:Wf}}),enabled:i===`auto`,retry:!1,refetchOnMount:`always`}),d=i===`auto`&&l.isSuccess&&l.isFetchedAfterMount&&l.data.length===0;(0,G.useEffect)(()=>{d&&o(!0)},[d]);let f=i===`auto`?l.isSuccess&&l.isFetchedAfterMount?{state:`success`,projectCount:l.data.length}:l.isError?{state:`error`}:{state:`loading`}:{state:`idle`},p=i===`legacy`?`legacy`:a||d?`platform`:Vf(i,f);if(e.onboarding===`complete`&&e.setupProject)return(0,K.jsx)(sf,{projectName:e.setupProject,skippedVisibility:e.skipped===`visibility`});if(t||n)return(0,K.jsx)(ip,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});let m=i===`auto`&&p===`legacy`&&!e.setupProject&&l.isSuccess;if(m&&s===void 0)return u.isError?c(null):u.isSuccess&&u.isFetchedAfterMount&&c(Gf(l.data,u.data)),(0,K.jsx)(np,{});let h=m?s:null;return h?(0,K.jsx)(sp,{projectName:h.projectName,runId:h.runId}):p===`legacy`?(0,K.jsx)(Df,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding===`site-health`,onboardingFinish:e.onboarding===`site-health`||e.onboarding===`first-run`}):p===`loading`?(0,K.jsx)(np,{}):p===`retry`?(0,K.jsx)(rp,{onRetry:()=>{l.refetch()}}):(0,K.jsx)(cp,{onActivationStarted:()=>o(!0),skipSiteScan:e.siteScan===`skip`})}function sp({projectName:e,runId:t}){let n=Ce();return(0,G.useEffect)(()=>{n({to:`/setup`,search:{onboarding:`site-health`,setupProject:e,...t?{siteHealthRunId:t}:{}},replace:!0})},[n,e,t]),(0,K.jsx)(np,{})}function cp({onActivationStarted:e,skipSiteScan:t}){return(0,K.jsx)(Rl,{title:`Site Health setup`,children:(0,K.jsx)(lp,{onActivationStarted:e,skipSiteScan:t})})}function lp({onActivationStarted:e,skipSiteScan:t}){let n=Ce(),r=ve(),i=Sd(),a=R({...Tr({client:U}),retry:!1}),o=be(mr()),[c]=(0,G.useState)(()=>sd(`platform`)),[l,u]=(0,G.useState)(c.domain??``),[d,f]=(0,G.useState)(c.projectName??``),[p,m]=(0,G.useState)(c.displayName??``),[h,g]=(0,G.useState)(c.country??`US`),[_,b]=(0,G.useState)(c.language??`en`),[C,w]=(0,G.useState)(!1),[T,E]=(0,G.useState)(`idle`),[D,O]=(0,G.useState)(null),[ee,k]=(0,G.useState)(null),[te,A]=(0,G.useState)(!1),[ne,re]=(0,G.useState)(null),[j,ie]=(0,G.useState)(!1),ae=Kt(),M=wt(),N=a.isError?void 0:a.data,oe=typeof N?.enabled==`boolean`?N.enabled:null,se=o.isPending?o.variables.body.enabled:oe,[ce,le]=(0,G.useState)(null),ue=(0,G.useRef)(null),{onboardingSessionId:de,emit:P}=ep(`platform`);(0,G.useEffect)(()=>{P({flowVersion:1,onboardingSessionId:de,event:`onboarding.started`,step:`project`,resumed:!1},`onboarding.started`)},[P,de]),(0,G.useEffect)(()=>{D||cd(`platform`,{domain:l,projectName:d,displayName:p,country:h,language:_})},[D,l,d,p,h,_]);let fe=()=>{ld(`platform`),u(``),f(``),m(``),g(`US`),b(`en`),w(!1),k(null),A(!1)},pe=Zf(l),F=d||pe?.projectName||``,I=p||pe?.displayName||``,me=T===`creating`||T===`dispatching`,he=ee??ne,ge=Jf(h,_),{countryValid:L,languageValid:_e}=Yf(h,_),ye=L&&_e;(0,G.useEffect)(()=>{he&&ue.current?.focus()},[he]);let xe=(e,t)=>n({to:`/setup`,search:{...t?{siteHealthRunId:t}:{},onboarding:`site-health`,setupProject:e.name},replace:!0}),Se=async e=>{E(`dispatching`),re(null);try{let t=i.mutateAsync({projectName:e.name,projectId:e.id,projectLabel:e.displayName||e.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:100}}),n=await Qf(t);if(n.state===`queued`){P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`queued`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`}),ot(n.run.runId),await xe(e,n.run.runId);return}t.then(()=>{P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`queued`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`})},e=>{P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`,reasonCode:Wn(e,`run_rejected`)})}),$f(t,e.id),await xe(e)}catch(e){E(`recovery`),re(tp(e,`The project was created, but the Site Health scan could not be started.`));let t=Wn(e,`run_rejected`);P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`,reasonCode:t}),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.blocked`,step:`run`,action:`retry_run`,reasonCode:t},`onboarding.blocked:run:${t}`)}},we=async i=>{if(i.preventDefault(),pe&&(t||C)&&ye&&!me){E(`creating`),k(null),A(!1),re(null);try{let i=await Je({name:F,displayName:I,canonicalDomain:pe.canonicalDomain,country:h,language:_});if(e(),O(i),ld(`platform`),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.step_completed`,step:`project`,method:`manual`},`onboarding.step_completed:project`),await r.invalidateQueries({queryKey:Cr({client:U})}),t){ud(i.name),await n({to:`/setup`,search:{experience:`legacy`,onboarding:`first-run`,setupProject:i.name},replace:!0});return}await Se(i)}catch(t){E(`idle`);let n=t instanceof qt&&t.statusCode===409;A(n),k(tp(t,`Could not create the project. Try again.`)),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.blocked`,step:`project`,action:`save`,reasonCode:Wn(t,`project_create_failed`)},`onboarding.blocked:project`),n&&(e(),r.invalidateQueries({queryKey:Cr({client:U})}))}}},Te=()=>{D&&!me&&Se(D)},Ee=()=>{me||n({to:`/projects`})},z=async()=>{try{await navigator.clipboard.writeText(M?$:$.replace(Bf,``)),ie(!0)}catch{ir({tone:`negative`,title:`Could not copy setup request`,detail:M?`Open the agent quickstart to continue with the CLI instead.`:`Check your browser’s clipboard permission and try again.`})}},De=async e=>{le(null);try{let t=await o.mutateAsync({client:U,body:{enabled:e}});r.setQueryData(Dr({client:U}),t),t.enabled!==e&&le(`The server kept telemetry ${t.enabled?`on`:`off`}. Check its telemetry settings.`)}catch{le(`Could not update telemetry. Try again.`)}};return D&&T===`recovery`?(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsx)(`div`,{className:`page-header mt-8`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project created`}),(0,K.jsxs)(`p`,{className:`page-subtitle`,children:[D.displayName||D.name,` is ready. The Site Health scan needs another try.`]})]})}),(0,K.jsxs)(`div`,{ref:ue,className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:ne}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:`You can retry the scan or continue setup and retry from Site Health.`}),(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-3`,children:[(0,K.jsx)(W,{type:`button`,onClick:Te,children:`Retry Site Health scan`}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{xe(D)},children:`Continue setup`})]})]})]}):(0,K.jsxs)(`div`,{className:`page-container max-w-xl py-8 md:py-12`,children:[t?null:(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`header`,{className:`mb-8 ${t?``:`mt-8`}`,children:[(0,K.jsx)(`h1`,{id:`site-map-setup-title`,className:`text-heading-24 text-heading`,children:t?`Create a project`:`Scan your site`}),(0,K.jsx)(`p`,{className:`mt-2 max-w-lg text-copy-14 text-secondary`,children:t?`Add a public domain, then choose the queries you want to track. No site scan will run.`:`Enter your public website to see its pages, structure, internal links, and Technical AEO scores.`})]}),(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2 text-label-13 text-secondary`,children:[(0,K.jsx)(`p`,{children:`Draft fields use tab storage when available. Scan permission resets on reload.`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,disabled:me,onClick:fe,children:`Reset draft`})]}),(0,K.jsxs)(`form`,{"aria-labelledby":`site-map-setup-title`,className:`space-y-6`,onSubmit:tr(we),noValidate:!0,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14-strong text-heading`,htmlFor:`launchpad-domain`,children:`Website URL`}),(0,K.jsx)(`input`,{id:`launchpad-domain`,className:`h-10 w-full rounded-md border border-strong bg-bg-elevated/50 px-3 text-label-16 text-heading outline-none transition placeholder:text-muted focus:border-mono-500 focus:ring-1 focus:ring-mono-500 md:h-9 md:text-label-14 ${Hf}`,type:`text`,inputMode:`url`,autoComplete:`url`,autoCapitalize:`none`,spellCheck:!1,required:!0,"aria-invalid":!(!l||pe),"aria-describedby":l&&!pe?`launchpad-domain-hint launchpad-domain-error`:`launchpad-domain-hint`,placeholder:`https://example.com`,value:l,onChange:e=>{u(e.target.value),k(null),A(!1)}}),(0,K.jsx)(`p`,{id:`launchpad-domain-hint`,className:`text-copy-14 text-secondary`,children:t?(0,K.jsxs)(K.Fragment,{children:[`A public domain is still required.`,` `,(0,K.jsx)(B,{to:`/setup`,search:{experience:`platform`},className:`text-copy-14-strong text-link underline-offset-4 hover:underline`,children:`Map with Site Health instead`})]}):(0,K.jsxs)(K.Fragment,{children:[`Only public pages are scanned.`,` `,(0,K.jsx)(B,{to:`/setup`,search:{experience:`platform`,onboarding:`first-run`,siteScan:`skip`},className:`text-copy-14-strong text-link underline-offset-4 hover:underline`,children:`Set up without a site scan`})]})}),l&&!pe?(0,K.jsx)(`p`,{id:`launchpad-domain-error`,className:`text-copy-14 text-negative`,role:`alert`,children:`Enter a public domain, such as example.com.`}):null]}),(0,K.jsxs)(`details`,{className:`group border-y border-default`,children:[(0,K.jsxs)(`summary`,{className:`flex min-h-9 cursor-pointer list-none items-center justify-between gap-4 py-2 text-label-14 [&::-webkit-details-marker]:hidden ${Hf}`,children:[(0,K.jsx)(`span`,{className:`text-label-14-strong text-heading`,children:`Project name and locale`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-2 text-secondary`,children:[ge,(0,K.jsx)(x,{className:`size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none`,"aria-hidden":`true`})]})]}),(0,K.jsxs)(`div`,{className:`space-y-5 border-t border-default py-4`,children:[pe?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`mb-3 text-copy-14-strong text-heading`,children:`Project`}),(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-project-name`,children:`Project name`}),(0,K.jsx)(`input`,{id:`launchpad-project-name`,className:`setup-input h-10`,type:`text`,value:F,onChange:e=>f(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-display-name`,children:`Display name`}),(0,K.jsx)(`input`,{id:`launchpad-display-name`,className:`setup-input h-10`,type:`text`,value:I,onChange:e=>m(e.target.value)})]})]})]}):null,(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`mb-3 text-copy-14-strong text-heading`,children:`Locale`}),(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-country`,children:`Country`}),(0,K.jsx)(`select`,{id:`launchpad-country`,className:`setup-input h-10`,value:h,onChange:e=>g(e.target.value),children:Kf.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-language`,children:`Language`}),(0,K.jsx)(`select`,{id:`launchpad-language`,className:`setup-input h-10`,value:_,onChange:e=>b(e.target.value),children:qf.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})]})]})]})]}),t?null:(0,K.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`First scan: up to `,100,` pages. A limited scan describes the pages reached, not the whole site.`]}),t?null:(0,K.jsxs)(`label`,{className:`flex min-h-11 cursor-pointer items-start gap-3 py-2`,children:[(0,K.jsx)(`input`,{className:`mt-0.5 size-4 shrink-0 rounded border-strong bg-bg`,type:`checkbox`,checked:C,onChange:e=>w(e.target.checked),"aria-label":`Allow Canonry to scan this public site.`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-label-14 text-heading`,children:`Allow Canonry to scan this public site.`}),(0,K.jsx)(Ar,{text:Lf})]})]}),he?(0,K.jsxs)(`div`,{ref:ue,className:`rounded-md border border-negative bg-negative-soft p-3`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:he}),te?(0,K.jsx)(W,{type:`button`,variant:`secondary`,size:`sm`,className:`mt-3`,onClick:Ee,children:`View projects`}):null]}):null,(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(W,{className:`w-full ${Hf}`,type:`submit`,disabled:!pe||!t&&!C||!ye||me,children:T===`creating`||T===`dispatching`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),` `,t?`Creating project…`:`Mapping site…`]}):t?`Create project`:`Scan site`}),T===`dispatching`?(0,K.jsx)(`span`,{className:`text-center text-label-14 text-secondary`,role:`status`,children:`Opening Site Health when the scan is ready.`}):null]})]}),(0,K.jsxs)(`section`,{className:`mt-8 border-t border-default pt-6`,"aria-labelledby":`agent-setup-title`,children:[(0,K.jsx)(`p`,{id:`agent-setup-title`,className:`text-copy-14-strong text-heading`,children:`Use your agent instead`}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:ae?`Connect your agent to this instance, or copy a request for a new local installation.`:`Connect ChatGPT or Claude Desktop to this instance.`}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1`,children:[(0,K.jsx)(W,{asChild:!0,variant:`secondary`,size:`sm`,children:(0,K.jsx)(B,{to:`/agent-setup`,children:`Agent setup`})}),ae?(0,K.jsxs)(W,{type:`button`,variant:`ghost`,size:`sm`,onClick:tr(z),children:[j?(0,K.jsx)(S,{className:`size-3.5`,"aria-hidden":`true`}):(0,K.jsx)(v,{className:`size-3.5`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{"aria-live":`polite`,children:j?`Copied new-install request`:`Copy new-install request`})]}):null,ae&&M?(0,K.jsx)(W,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,K.jsxs)(`a`,{href:zf,target:`_blank`,rel:`noopener noreferrer`,children:[`Agent quickstart`,(0,K.jsx)(y,{className:`size-3.5`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]})}):null]})]}),oe===null?null:(0,K.jsxs)(`section`,{className:`mt-6 border-t border-default pt-5`,"aria-labelledby":`telemetry-title`,children:[(0,K.jsxs)(`label`,{className:`flex min-h-11 items-start gap-3 py-2 ${o.isPending?`cursor-wait`:`cursor-pointer`}`,children:[(0,K.jsx)(`input`,{className:`mt-0.5 size-4 shrink-0 rounded border-strong bg-bg accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mono-500 disabled:cursor-wait`,type:`checkbox`,checked:se??!1,disabled:o.isPending,onChange:e=>{De(e.target.checked)},"aria-describedby":`telemetry-detail`}),(0,K.jsxs)(`span`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{id:`telemetry-title`,className:`text-label-14 text-heading`,children:`Share anonymous product telemetry`}),(0,K.jsx)(`span`,{id:`telemetry-detail`,className:`max-w-[70ch] text-label-14 text-secondary`,children:`Helps prioritize improvements. Canonry does not send raw domains, URLs, queries, answer content, or credentials.`})]})]}),o.isPending?(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,role:`status`,children:`Saving preference…`}):null,ce?(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-negative`,role:`alert`,children:ce}):null]})]})}function up(){return(0,K.jsx)(`div`,{className:`page-container`,children:(0,K.jsx)(`section`,{className:`page-section`,children:(0,K.jsxs)(Fr,{className:`surface-card empty-card`,children:[(0,K.jsx)(`h1`,{children:`Route not found`}),(0,K.jsx)(`p`,{children:`The current path does not map to a dashboard view.`}),(0,K.jsx)(W,{asChild:!0,children:(0,K.jsx)(B,{to:`/`,children:`Return to overview`})})]})})})}var dp=je(()=>Ff(()=>import(`./ProjectPage-D6mHRRSs.js`),__vite__mapDeps([14,1,2,3,4,5,6,7,15,8,16,9,10,11,12,13,0,17,18,19,20,21]),import.meta.url),`ProjectPage`),fp=je(()=>Ff(()=>import(`./RunsPage-DwtYzU9w.js`),__vite__mapDeps([22,1,2,3,4,5,6,7,15,9,10,13]),import.meta.url),`RunsPage`),pp=je(()=>Ff(()=>import(`./HistoryPage-VJ_JQ7R3.js`),__vite__mapDeps([23,3,1,2,18,4,5,6,7,10,13]),import.meta.url),`HistoryPage`),mp=je(()=>Ff(()=>import(`./SettingsPage-DsmgLFb7.js`),__vite__mapDeps([24,1,2,3,4,5,6,7,16,9,13]),import.meta.url),`SettingsPage`),hp=je(()=>Ff(()=>import(`./AgentSetupPage-FfxjZWI8.js`),__vite__mapDeps([25,1,2,3,7,6,5,8,16]),import.meta.url),`AgentSetupPage`),gp=je(()=>Ff(()=>import(`./BacklinksPage-vXUxxplH.js`),__vite__mapDeps([26,1,2,3,7,6,5,16,13,17]),import.meta.url),`BacklinksPage`),_p=je(()=>Ff(()=>import(`./TrafficPage-DGPSaWTl.js`),__vite__mapDeps([27,1,2,3,4,5,6,7,16,9,10,12,13,20]),import.meta.url),`TrafficPage`),vp=je(()=>Ff(()=>import(`./TrafficSourceDetailPage-C79eQilP.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,15,11,12,13,20,9,10,21]),import.meta.url),`TrafficSourceDetailPage`),yp=je(()=>Ff(()=>import(`./MeasurementPropertyPage-DVm7CHU8.js`),__vite__mapDeps([29,1,2,3,4,5,6,7,15,8,10,11,12,19]),import.meta.url),`MeasurementPropertyPage`);function bp(){return(0,K.jsx)(Il,{children:(0,K.jsx)(qr,{children:(0,K.jsx)(jl,{})})})}var xp=Se()({component:bp,validateSearch:e=>({manageQueries:e.manageQueries===!0||e.manageQueries===`true`||void 0,runId:typeof e.runId==`string`?e.runId:void 0,siteHealthRunId:typeof e.siteHealthRunId==`string`?e.siteHealthRunId:void 0,seoProfileId:typeof e.seoProfileId==`string`?e.seoProfileId:void 0,seoRunId:typeof e.seoRunId==`string`?e.seoRunId:void 0,seoRegion:typeof e.seoRegion==`string`&&e.seoRegion?e.seoRegion:void 0,seoMarket:typeof e.seoMarket==`string`&&e.seoMarket?e.seoMarket:void 0,seoShow:typeof e.seoShow==`string`&&e.seoShow?e.seoShow:void 0,seoSort:typeof e.seoSort==`string`&&e.seoSort?e.seoSort:void 0,seoQ:typeof e.seoQ==`string`&&e.seoQ?e.seoQ:void 0,evidenceId:typeof e.evidenceId==`string`?e.evidenceId:void 0,runStatus:typeof e.runStatus==`string`?e.runStatus:void 0,runKind:typeof e.runKind==`string`?e.runKind:void 0,runProject:typeof e.runProject==`string`?e.runProject:void 0,runWindow:typeof e.runWindow==`string`?e.runWindow:void 0,runQuery:typeof e.runQuery==`string`?e.runQuery:void 0,onboarding:e.onboarding===`site-health`||e.onboarding===`first-run`||e.onboarding===`complete`?e.onboarding:void 0,experience:e.experience===`legacy`||e.experience===`platform`?e.experience:void 0,siteScan:e.siteScan===`skip`?`skip`:void 0,skipped:e.skipped===`visibility`?`visibility`:void 0,setupProject:typeof e.setupProject==`string`?e.setupProject:void 0,scope:typeof e.scope==`string`?e.scope:void 0,class:typeof e.class==`string`?e.class:void 0,...Object.fromEntries([`queryWorkspace`,`researchMode`,`trackingQueryId`,`measurementScope`,`measurementScopeKey`,`measurementMarketKey`,`queryClass`,`measurementProvider`,`measurementModel`,`measurementLocation`,`measurementFrom`,`measurementTo`,`measurementRevision`,`measurementRunId`,`measurementQueryKey`,`measurementAnswer`,`journeyView`,`journeyDays`,`journeyVisitor`,`journeyEngine`,`journeyReturned`,`journeyOffset`,`agentHours`].map(t=>[t,typeof e[t]==`string`&&e[t]?e[t]:void 0]))})}),Sp=z({getParentRoute:()=>xp,path:`/`,component:ed,beforeLoad:async({context:e})=>{let t=e.queryClient.getQueryData(Cr({client:U}));if(t===void 0)try{t=await e.queryClient.ensureQueryData(vr({client:U}))}catch{return}if(t.length===0)throw Te({to:`/setup`})}}),Cp=z({getParentRoute:()=>xp,path:`/projects`,component:id}),wp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Tp=z({getParentRoute:()=>xp,path:`/projects/$projectName`,component:()=>(0,K.jsx)(ke,{}),beforeLoad:async({context:e,params:t,location:n})=>{let r=t.projectName;if(!wp.test(r))return;let i=e.queryClient.getQueryData(Cr({client:U}));if(!i)try{i=await e.queryClient.ensureQueryData(vr({client:U}))}catch{return}let a=i.find(e=>e.id===r);if(a)throw Te({to:n.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(a.name)}`),replace:!0})}}),Ep=z({getParentRoute:()=>Tp,path:`/`,component:()=>(0,K.jsx)(dp,{tab:`overview`})}),Dp=z({getParentRoute:()=>Tp,path:`/portfolio`,component:()=>(0,K.jsx)(dp,{tab:`portfolio`})}),Op=z({getParentRoute:()=>Tp,path:`/search-console`,component:()=>(0,K.jsx)(dp,{tab:`search-console`})}),kp=z({getParentRoute:()=>Tp,path:`/seo-data`,component:()=>(0,K.jsx)(dp,{tab:`seo-data`})}),Ap=z({getParentRoute:()=>Tp,path:`/journeys`,component:()=>(0,K.jsx)(dp,{tab:`journeys`})}),jp=z({getParentRoute:()=>Tp,path:`/conversions`,component:()=>(0,K.jsx)(dp,{tab:`conversions`})}),Mp=z({getParentRoute:()=>Tp,path:`/local`,component:()=>(0,K.jsx)(dp,{tab:`local`})}),Np=z({getParentRoute:()=>Tp,path:`/discovery`,component:()=>(0,K.jsx)(dp,{tab:`discovery`})}),Pp=z({getParentRoute:()=>Tp,path:`/queries`,component:()=>(0,K.jsx)(dp,{tab:`queries`})}),Fp=z({getParentRoute:()=>Tp,path:`/client-queries`,component:()=>(0,K.jsx)(dp,{tab:`client-queries`})}),Ip=z({getParentRoute:()=>Tp,path:`/properties/$targetKey`,component:()=>(0,K.jsx)(yp,{})}),Lp=z({getParentRoute:()=>Tp,path:`/report`,beforeLoad:({params:e})=>{throw Te({to:`/projects/$projectName`,params:e,replace:!0})}}),Rp=z({getParentRoute:()=>Tp,path:`/activity`,component:()=>(0,K.jsx)(dp,{tab:`activity`})}),zp=z({getParentRoute:()=>Tp,path:`/backlinks`,component:()=>(0,K.jsx)(dp,{tab:`backlinks`})}),Bp=z({getParentRoute:()=>Tp,path:`/technical-aeo`,component:()=>(0,K.jsx)(dp,{tab:`technical-aeo`})}),Vp=z({getParentRoute:()=>Tp,path:`/history`,component:()=>(0,K.jsx)(dp,{tab:`history`})}),Hp=z({getParentRoute:()=>Tp,path:`/settings`,component:()=>(0,K.jsx)(dp,{tab:`settings`})}),Up=z({getParentRoute:()=>xp,path:`/runs`,component:fp}),Wp=z({getParentRoute:()=>xp,path:`/history`,component:pp}),Gp=z({getParentRoute:()=>xp,path:`/settings`,component:mp,beforeLoad:({context:e})=>{}}),Kp=z({getParentRoute:()=>xp,path:`/setup`,component:op}),qp=z({getParentRoute:()=>xp,path:`/agent-setup`,component:hp}),Jp=z({getParentRoute:()=>xp,path:`/backlinks`,component:gp}),Yp=z({getParentRoute:()=>xp,path:`/traffic`,component:_p}),Xp=z({getParentRoute:()=>xp,path:`/traffic/$projectName/$sourceId`,component:vp}),Zp=z({getParentRoute:()=>xp,path:`*`,component:up}),Qp=xp.addChildren([Sp,Cp,Tp.addChildren([Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp]),Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp]);function $p(){return typeof window<`u`&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:`/`}var em=$p(),tm=em===`/`?``:em.replace(/\/$/,``);function nm(e,t){return xe({routeTree:Qp,basepath:tm||`/`,context:{queryClient:e},...t?.initialEntries&&{history:De({initialEntries:t.initialEntries})}})}var rm=!1;async function im(e){return(await Ct({client:U,body:e,keepalive:!0})).data}function am(){rm||typeof window>`u`||(rm=!0,!(zn()||Mt())&&(Dt({send:im}),U.interceptors.request.use((e,t)=>{let n=t.fetch??globalThis.fetch,r=typeof t.url==`string`?t.url:void 0;return t.fetch=async(t,i)=>{try{return await n(t,i)}catch(t){throw t instanceof DOMException&&t.name===`AbortError`||We({method:e.method,route:r,network:!0}),t}},e}),U.interceptors.response.use((e,t,n)=>(We({method:t.method,route:typeof n.url==`string`?n.url:void 0,path:sm(t.url),status:e.status}),e)),window.addEventListener(`error`,e=>{Rn({kind:`unhandled`,error:e.error})}),window.addEventListener(`unhandledrejection`,e=>{Rn({kind:`unhandled`,error:e.reason})}),fm()))}function om(e){let t=null,n=()=>{let n=e.state.matches.at(-1);if(!n)return;qe(n.fullPath);let r=e.state.location;if(!r)return;let i=r.search&&typeof r.search==`object`?r.search:{};t&&t.pathname===r.pathname&&jt(t.search,i),t={pathname:r.pathname,search:i}};return n(),e.subscribe(`onResolved`,n)}function sm(e){try{return new URL(e,window.location.origin).pathname}catch{return}}var cm={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function lm(e,t){let[n,r]=cm[e];return t<=n?`good`:t<=r?`needs-improvement`:`poor`}function um(){let e=0,t=0,n=-1/0,r=-1/0;return{add(i){i.hadRecentInput||(i.startTime-r<1e3&&i.startTime-n<5e3?t+=i.value:(t=i.value,n=i.startTime),r=i.startTime,e=Math.max(e,t))},value:()=>e}}function dm(){let e=0;return{add(t){t.interactionId&&(e=Math.max(e,t.duration))},value:()=>e}}function fm(){if(typeof PerformanceObserver>`u`)return;let e=new Set,t=(t,n)=>{!e.has(t)&&Number.isFinite(n)&&(e.add(t),Xe(t,lm(t,n)))},n=(e,t,n={})=>{try{new PerformanceObserver(e=>t(e.getEntries())).observe({type:e,buffered:!0,...n})}catch{}};try{let e=performance.getEntriesByType(`navigation`)[0];e&&e.responseStart>0&&t(`TTFB`,e.responseStart)}catch{}n(`paint`,e=>{let n=e.find(e=>e.name===`first-contentful-paint`);n&&t(`FCP`,n.startTime)});let r=0;n(`largest-contentful-paint`,e=>{let t=e.at(-1);t&&(r=t.startTime)});let i=um();n(`layout-shift`,e=>{for(let t of e)i.add({startTime:t.startTime,value:t.value??0,hadRecentInput:t.hadRecentInput===!0})});let a=dm();n(`event`,e=>{for(let t of e)a.add(t)},{durationThreshold:40});let o=()=>{r>0&&t(`LCP`,r),t(`CLS`,i.value()),a.value()>0&&t(`INP`,a.value())};document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&o()}),window.addEventListener(`pagehide`,o)}var pm=6e4,mm=`Anyone with this password can sign in to this dashboard.`,hm={label:`Root API key`,help:`To create the password from here, enter the root API key (apiKey in config.yaml). It is used once and not saved.`,missing:`Enter the root API key.`,rejected:`That is not the root API key for this install.`,show:`Show passwords and key`},gm={id:`embed`,scopes:[`read`,`embed`],projectId:`embed`,readOnly:!0};function _m(){let e=(0,G.useRef)(Cn()).current,[t,n]=(0,G.useState)(e?`ready`:`checking`),[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),[s,c]=(0,G.useState)(e),[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(``),[p,m]=(0,G.useState)(``),[h,g]=(0,G.useState)(``),[_,v]=(0,G.useState)(!1),[y,b]=(0,G.useState)(`password`),[x,S]=(0,G.useState)(!1),[C,w]=(0,G.useState)(``),[T,E]=(0,G.useState)(null),[D,O]=(0,G.useState)(!1),[ee,k]=(0,G.useState)(!1),te=(0,G.useRef)(null),A=(0,G.useRef)(null),ne=(0,G.useRef)(null),re=()=>{let t=r?`${r.name}:${r.role}`:e?`api-key:explicit`:a?`api-key:${a.id}`:`no-accounts`;if(!te.current||ne.current!==t){A.current?.clear();let e=rr();A.current=e,te.current=nm(e),om(te.current),ne.current=t}return{queryClient:A.current,router:te.current}},j=e=>e.authRequired?(u(!0),i(e.user),o(null),c(!1),n(e.user?`ready`:`account-login`),!0):!1;(0,G.useEffect)(()=>{let t=!1,r=async(e,r=!1)=>{try{let e=await ze();if(t)return;o(e),c(!1),n(`ready`)}catch(i){if(t)return;if(r&&i instanceof qt&&i.statusCode===401)return Hn().then(()=>{t||(E(null),o(null),c(!1),k(!0),n(`login`))}).catch(r=>{t||(E(r instanceof Error?r.message:`Could not clear the invalid session`),n(e))});E(i instanceof Error?i.message:`Could not verify API key access`),n(e)}};return e?(r(`api-key-error`),()=>{t=!0}):(Promise.allSettled([ht(),Nn()]).then(([e,i])=>{if(t||e.status===`fulfilled`&&j(e.value))return;if(i.status===`rejected`){let e=i.reason;E(e instanceof Error?e.message:`Failed to reach the Canonry API`),n(`login`);return}let a=i.value;a.authenticated&&zn()?(o(gm),c(!1),n(`ready`)):a.authenticated?(c(!0),r(`api-key-error`,!0)):(o(null),c(!1),n(a.setupRequired?`setup`:`login`))}),()=>{t=!0})},[]),(0,G.useEffect)(()=>{if(t!==`ready`||e)return;let r=setInterval(()=>{l?ht().then(e=>{e.authRequired&&!e.user&&(k(!0),i(null),o(null),n(`account-login`))}).catch(()=>{}):Nn().then(e=>{e.authenticated||(k(!0),o(null),n(e.setupRequired?`setup`:`login`))}).catch(()=>{})},pm);return wn(()=>{k(!0),i(null),o(null),c(!1),n(l?`account-login`:`login`)}),()=>{clearInterval(r),wn(null)}},[t,l,e]);let ie=async e=>{if(e.preventDefault(),!p.trim()||p.trim().length<8){E(`Password must be at least 8 characters`);return}if(p!==h){E(`Passwords do not match`);return}let t=C.trim();if(x&&!t)E(hm.missing);else{O(!0),E(null);try{if(!(await Ut(p.trim(),x?t:void 0)).authenticated){E(`Setup failed`);return}m(``),g(``),w(``),S(!1),v(!1),k(!1),o(null),c(!0),n(`checking`);try{let e=await ze();o(e),c(!1),n(`ready`)}catch(e){E(e instanceof Error?e.message:`Could not verify API key access`),n(`api-key-error`)}}catch(e){if(e instanceof qt&&e.statusCode===401&&e.code===`AUTH_REQUIRED`){E(x?hm.rejected:null),S(!0);return}E(e instanceof qt||e instanceof Error?e.message:`Setup failed`)}finally{O(!1)}}},ae=e=>{m(e),E(null)},M=e=>{w(e),E(null)},N=e=>{g(e),E(null)},oe=async e=>{if(e.preventDefault(),p.trim()){O(!0),E(null);try{if(!(y===`api-key`?await yt(p.trim()):await hn(p.trim())).authenticated){E(y===`api-key`?`Invalid API key`:`Incorrect password`);return}let e=await ze();o(e),c(!1),m(``),v(!1),k(!1),n(`ready`)}catch(e){E(e instanceof qt||e instanceof Error?e.message:`Authentication failed`)}finally{O(!1)}}},se=e=>{b(e),m(``),v(!1),E(null)},ce=async e=>{if(e.preventDefault(),d.trim()&&p){O(!0),E(null);try{let e=await rn(d.trim(),p);if(!e.user){E(`Incorrect name or password.`);return}m(``),k(!1),i(e.user),o(null),c(!1),n(`ready`)}catch(e){E(e instanceof qt?e.message:`Incorrect name or password.`)}finally{O(!1)}}};if(t===`ready`){let{queryClient:e,router:t}=re();return(0,K.jsx)(er,{account:r,apiKey:a,apiKeyPending:s,children:(0,K.jsx)(ye,{client:e,children:(0,K.jsx)(Ee,{router:t})})})}let le=p.trim(),ue=p.length>0&&le.length<8,de=h.length>0&&p!==h,P=le.length>=8&&p===h&&(!x||C.trim().length>0);return(0,K.jsx)(`div`,{className:`min-h-screen bg-bg px-4 py-8`,children:(0,K.jsxs)(`div`,{className:`mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5`,children:[(0,K.jsxs)(`div`,{"data-testid":`auth-brand`,className:`flex items-center gap-2.5`,children:[(0,K.jsx)(Ki,{className:`size-7`}),(0,K.jsx)(`span`,{className:`text-label-18-strong text-heading`,children:`Canonry`})]}),(0,K.jsx)(Fr,{className:`surface-card w-full`,children:t===`checking`?(0,K.jsx)(Nr,{className:`py-8`,children:(0,K.jsx)(`p`,{className:`supporting-copy text-center`,children:`Connecting to Canonry…`})}):t===`api-key-error`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Could not verify API key access`})]}),(0,K.jsxs)(Nr,{className:`space-y-4`,children:[(0,K.jsx)(`p`,{className:`supporting-copy`,children:T??`Canonry could not verify this session’s access, so the dashboard stayed locked.`}),(0,K.jsx)(W,{type:`button`,className:`w-full`,onClick:()=>{window.location.reload()},children:`Try again`})]})]}):t===`account-login`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Sign in to Canonry`})]}),(0,K.jsxs)(Nr,{children:[ee?(0,K.jsx)(`p`,{className:`mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-copy-14 text-caution`,children:`You were signed out — please sign in again.`}):null,(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(ce),children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`account-name`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:`Name`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`account-name`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:`text`,name:`username`,autoComplete:`username`,value:d,onChange:e=>{f(e.target.value),E(null)},"aria-invalid":!!T,"aria-describedby":T?`account-login-error`:void 0})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`account-password`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:`Password`}),(0,K.jsx)(`input`,{id:`account-password`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:`password`,name:`password`,autoComplete:`current-password`,value:p,onChange:e=>ae(e.target.value),"aria-invalid":!!T,"aria-describedby":T?`account-login-error`:void 0})]}),T?(0,K.jsx)(`p`,{id:`account-login-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!d.trim()||!p,children:D?`Signing in…`:`Sign in`})]})]})]}):t===`setup`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`First-time setup`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Create a dashboard password`}),(0,K.jsx)(Pr,{children:mm})]}),(0,K.jsx)(Nr,{children:(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(ie),children:[(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-password-new`,children:`Password`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-password-new`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`new-password`,autoComplete:`new-password`,minLength:8,required:!0,value:p,onChange:e=>ae(e.target.value),"aria-invalid":ue,"aria-describedby":`dashboard-password-new-help`}),(0,K.jsx)(`span`,{id:`dashboard-password-new-help`,"aria-live":`polite`,className:ue?`block text-label-14 text-negative-400`:`block text-label-14 text-secondary`,children:ue?`Enter at least 8 characters.`:`Use at least 8 characters.`})]}),(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-password-confirm`,children:`Confirm password`}),(0,K.jsx)(`input`,{id:`dashboard-password-confirm`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`confirm-password`,autoComplete:`new-password`,minLength:8,required:!0,value:h,onChange:e=>N(e.target.value),"aria-invalid":de,"aria-describedby":`dashboard-password-confirm-help`}),(0,K.jsx)(`span`,{id:`dashboard-password-confirm-help`,"aria-live":`polite`,className:de?`block text-label-14 text-negative-400`:`block text-label-14 text-secondary`,children:de?`Passwords do not match.`:`Enter the same password again.`})]}),x?(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-setup-root-key`,children:hm.label}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-setup-root-key`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`apiKey`,autoComplete:`off`,spellCheck:!1,required:!0,value:C,onChange:e=>M(e.target.value),"aria-invalid":T===hm.rejected,"aria-describedby":`dashboard-setup-root-key-help`}),(0,K.jsx)(`span`,{id:`dashboard-setup-root-key-help`,"aria-live":`polite`,className:`block text-label-14 text-secondary`,children:hm.help})]}):null,(0,K.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-2 text-label-14 text-secondary`,htmlFor:`dashboard-password-show`,children:[(0,K.jsx)(`input`,{id:`dashboard-password-show`,type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),x?hm.show:`Show passwords`]}),T?(0,K.jsx)(`p`,{id:`dashboard-password-setup-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!P,children:D?`Creating password…`:`Create password and continue`})]})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Sign in to Canonry`}),(0,K.jsx)(Pr,{children:y===`api-key`?`Enter an API key from this Canonry install. This opens the dashboard with that key’s access and does not change the password.`:`Enter your dashboard password to continue.`})]}),(0,K.jsxs)(Nr,{children:[ee?(0,K.jsx)(`p`,{className:`mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-copy-14 text-caution`,children:`Your session expired — please sign in again.`}):null,(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(oe),children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`dashboard-password-current`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:y===`api-key`?`Canonry API key`:`Password`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-password-current`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:y===`api-key`?`apiKey`:`password`,autoComplete:y===`api-key`?`off`:`current-password`,spellCheck:!1,required:!0,value:p,onChange:e=>ae(e.target.value),"aria-invalid":!!T,"aria-describedby":T?`dashboard-password-login-error`:void 0})]}),(0,K.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-2 text-label-14 text-secondary`,htmlFor:`dashboard-login-password-show`,children:[(0,K.jsx)(`input`,{id:`dashboard-login-password-show`,type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),y===`api-key`?`Show API key`:`Show password`]}),T?(0,K.jsx)(`p`,{id:`dashboard-password-login-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!p.trim(),children:D?`Signing in…`:`Open dashboard`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>se(y===`api-key`?`password`:`api-key`),children:y===`api-key`?`Use dashboard password instead`:`Forgot password? Use API key`})]})]})]})})]})})}var vm=document.getElementById(`root`);if(!vm)throw Error(`Expected #root element for web app bootstrap.`);am(),(0,Vr.createRoot)(vm).render((0,K.jsx)(G.StrictMode,{children:(0,K.jsx)(Za,{children:(0,K.jsx)(_m,{})})}));export{Ts as $,va as $t,Lu as A,Da as At,bl as B,ka as Bt,pd as C,na as Ct,zu as D,ha as Dt,Qu as E,Qi as Et,Gl as F,ta as Ft,nc as G,Zi as Gt,Qs as H,Ba as Ht,zl as I,_a as It,Bs as J,da as Jt,qs as K,la as Kt,Wl as L,xa as Lt,Ou as M,Ca as Mt,ju as N,Sa as Nt,Mu as O,ma as Ot,Kl as P,Ma as Pt,Gs as Q,Pa as Qt,Rl as R,Va as Rt,Sd as S,ba as St,nd as T,ea as Tt,Zs as U,Ta as Ut,hc as V,Ua as Vt,rc as W,ca as Wt,Ks as X,Wa as Xt,Ws as Y,ua as Yt,Vs as Z,Oa as Zt,Ed as _,Ka as _t,Zd as a,xi as an,Go as at,wd as b,Xi as bt,Wd as c,gi as cn,go as ct,Pd as d,ri as dn,lo as dt,Na as en,Cs as et,Ld as f,Zr as fn,po as ft,kd as g,$a as gt,Md as h,Gr as hn,no as ht,vf as i,Li as in,ms as it,ku as j,pa as jt,Iu as k,q as kt,Kd as l,mi as ln,ho as lt,zd as m,Jr as mn,fo as mt,gf as n,Vi as nn,vs as nt,af as o,_i as on,vo as ot,Bd as p,ii as pn,uo as pt,Hs as q,fa as qt,_f as r,Ii as rn,hs as rt,Jd as s,vi as sn,_o as st,Ff as t,Fi as tn,bs as tt,Gd as u,ti as un,ro as ut,xd as v,Ji as vt,dd as w,$i as wt,bd as x,Ea as xt,Cd as y,Yi as yt,Ll as z,ia as zt};
|
|
60
|
+
7. Summarize only completed evidence, then propose AI Visibility setup. Ask before you add queries, connect providers, start a provider-backed or quota-consuming run, edit files, or publish.`;function Vf(e,t){return e===`legacy`?`legacy`:e===`platform`?`platform`:t.state===`success`?t.projectCount===0?`platform`:`legacy`:t.state===`error`?`retry`:`loading`}var Hf=`pointer-coarse:min-h-11 max-md:min-h-11`,Uf=`2000-01-01T00:00:00.000Z`,Wf=5e3;function Gf(e,t){let n=new Set,r=new Map;for(let e of t)e.trigger!==mn.probe&&(r.has(e.projectId)||r.set(e.projectId,e.id),(e.status===H.completed||e.status===H.partial)&&n.add(e.projectId));let i=(e.every(e=>e.createdAt)?[...e].sort((e,t)=>(e.createdAt??``).localeCompare(t.createdAt??``)||e.name.localeCompare(t.name)):e).find(e=>!n.has(e.id));return i?{projectName:i.name,runId:r.get(i.id)}:null}var Kf=[{value:`US`,label:`United States`},{value:`CA`,label:`Canada`},{value:`GB`,label:`United Kingdom`},{value:`AU`,label:`Australia`},{value:`NZ`,label:`New Zealand`},{value:`IE`,label:`Ireland`},{value:`DE`,label:`Germany`},{value:`FR`,label:`France`},{value:`ES`,label:`Spain`},{value:`IT`,label:`Italy`},{value:`NL`,label:`Netherlands`},{value:`BR`,label:`Brazil`},{value:`MX`,label:`Mexico`},{value:`IN`,label:`India`},{value:`SG`,label:`Singapore`},{value:`JP`,label:`Japan`}],qf=[{value:`en`,label:`English`},{value:`es`,label:`Spanish`},{value:`fr`,label:`French`},{value:`de`,label:`German`},{value:`it`,label:`Italian`},{value:`pt`,label:`Portuguese`},{value:`nl`,label:`Dutch`},{value:`ja`,label:`Japanese`}];function Jf(e,t){try{let n=new Intl.DisplayNames([`en`],{type:`region`}),r=new Intl.DisplayNames([`en`],{type:`language`}),i=e.length===2?n.of(e.toUpperCase()):void 0,a=t?r.of(t.toLowerCase()):void 0;return`${i??(e||`Country`)} · ${a??(t||`Language`)}`}catch{return`${e||`Country`} · ${t||`Language`}`}}function Yf(e,t){let n=e.trim().toUpperCase(),r=t.trim().toLowerCase();return{countryValid:Kf.some(e=>e.value===n),languageValid:qf.some(e=>e.value===r)}}function Xf(e){let t=e.replace(/^\[|\]$/g,``);return/^(?:\d{1,3}\.){3}\d{1,3}$/.test(t)||t.includes(`:`)}function Zf(e){let t=e.trim();if(!t)return null;let n=/^[a-z][a-z\d+.-]*:\/\//i.test(t)?t:`https://${t}`,r;try{r=new URL(n)}catch{return null}if(r.protocol!==`http:`&&r.protocol!==`https:`)return null;let i=r.hostname.toLowerCase().replace(/^www\./,``);if(!i||i===`localhost`||Xf(i)||!i.includes(`.`))return null;let a=i.replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``);return a?{canonicalDomain:i,projectName:a,displayName:i}:null}async function Qf(e,t=Rf){let n,r=new Promise(e=>{n=setTimeout(()=>e({state:`timed-out`}),t)}),i=await Promise.race([e.then(e=>({state:`queued`,run:e})),r]);return n&&clearTimeout(n),i}function $f(e,t){e.catch(()=>{ir({title:`Site Health scan did not start`,detail:`The project is safe. Choose Run scan in Site Health to retry.`,tone:`negative`,dedupeKey:`site-health-dispatch:${t}`})})}function ep(e){let t=(0,G.useRef)(gt()).current,n=(0,G.useRef)(new Set);return{onboardingSessionId:t,emit:(0,G.useCallback)((t,r)=>{if(r){if(n.current.has(r))return;n.current.add(r)}mt({...t,surface:e,eventId:pt()})},[e])}}function tp(e,t){return e instanceof qt&&e.statusCode===409?`A project with this name already exists. Change the project name, or open the existing project.`:e instanceof Error&&e.message?e.message:t}function np(){return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Preparing setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Checking the projects already on this install.`})]})}),(0,K.jsxs)(`div`,{className:`flex items-center gap-3 material-base p-4 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading projects…`]})]})}function rp({onRetry:e}){return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Can’t load projects`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Canonry could not confirm whether this install already has a project.`})]})}),(0,K.jsxs)(`div`,{className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:`Setup is paused to protect existing projects.`}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:`Check the connection or sign in again, then retry.`}),(0,K.jsx)(W,{type:`button`,className:`mt-4`,variant:`secondary`,onClick:e,children:`Retry project check`})]})]})}function ip({projectName:e,initialRunId:t}){return(0,K.jsx)(Rl,{title:`Site Health setup`,children:(0,K.jsx)(ap,{projectName:e,initialRunId:t})})}function ap({projectName:e,initialRunId:t}){let n=Ce(),r=R({...vr({client:U}),enabled:!!e,retry:!1,refetchOnMount:`always`}),{onboardingSessionId:i,emit:a}=ep(`site_health`),[o]=(0,G.useState)(()=>bt(t));(0,G.useEffect)(()=>{o&&fn()},[o]),(0,G.useEffect)(()=>{e&&a({flowVersion:1,onboardingSessionId:i,event:`onboarding.started`,step:`run`,resumed:!!t&&!o},`onboarding.started`)},[a,o,t,i,e]),(0,G.useEffect)(()=>{e&&t&&it(e)?.runId!==t&&Tt(e,t)},[t,e]);let c=R({...Sr({client:U,path:{id:t??``}}),enabled:!!t,refetchInterval:({state:e})=>{let t=e.data?.status;return t===`completed`||t===`partial`||t===`failed`||t===`cancelled`?!1:2e3},refetchIntervalInBackground:!0}).data?.status;if((0,G.useEffect)(()=>{if(!e||!t||!c)return;if(c===`completed`||c===`partial`){a({flowVersion:1,onboardingSessionId:i,event:`onboarding.step_completed`,step:`run`,method:`automatic`},`onboarding.step_completed:run`),ft(t);return}if(c!==`failed`&&c!==`cancelled`)return;let n=c===`cancelled`?`run_cancelled`:`run_failed`;a({flowVersion:1,onboardingSessionId:i,event:`onboarding.blocked`,step:`run`,action:`retry_run`,reasonCode:n},`onboarding.blocked:run:${n}`),ft(t)},[a,t,i,e,c]),!e)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project not found`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`This setup link does not identify a project.`})]})}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{n({to:`/projects`})},children:`View projects`})]});if(r.isPending)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,"aria-busy":`true`,"aria-live":`polite`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`div`,{className:`mt-8 flex items-center gap-3 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading Site Health setup…`]})]});if(r.isError)return(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Can’t resume setup`}),(0,K.jsx)(`p`,{className:`page-subtitle`,children:`Canonry could not load the project for this Site Health scan.`})]})}),(0,K.jsxs)(`div`,{className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,children:[(0,K.jsx)(`p`,{className:`text-copy-14 text-secondary`,children:`Check the connection or sign in again, then retry.`}),(0,K.jsx)(W,{type:`button`,className:`mt-4`,variant:`secondary`,onClick:()=>{r.refetch()},children:`Retry project check`})]})]});let l=r.data.find(t=>t.name===e);return l?(0,K.jsxs)(`div`,{className:`page-container max-w-7xl py-8 md:py-10`,children:[(0,K.jsx)(`h1`,{className:`sr-only`,children:`Set up Canonry`}),(0,K.jsx)(G.Suspense,{fallback:(0,K.jsxs)(`div`,{className:`space-y-5`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`div`,{className:`flex min-h-72 items-center justify-center gap-3 text-label-14 text-secondary`,role:`status`,children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),`Loading Site Health…`]})]}),children:(0,K.jsx)(If,{projectName:l.name,projectId:l.id,initialRunId:t,onReleaseInitialRun:()=>{n({to:`/setup`,search:{onboarding:`site-health`,setupProject:l.name},replace:!0})},showOnboardingActions:!0,onContinueOnboarding:()=>{t||ud(l.name),n({to:`/setup`,search:{experience:`legacy`,onboarding:`site-health`,setupProject:l.name},replace:!0})},onSkipOnboarding:()=>{t||ud(l.name),a({flowVersion:1,onboardingSessionId:i,event:`onboarding.step_completed`,step:`run`,method:`skipped`},`onboarding.step_completed:run`),n({to:`/setup`,search:{onboarding:`complete`,setupProject:l.name,skipped:`visibility`},replace:!0})}})})]}):(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(`div`,{className:`page-header`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project not found`}),(0,K.jsxs)(`p`,{className:`page-subtitle`,children:[`Canonry could not find `,e,`. It will not open a different project.`]})]})}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{n({to:`/projects`})},children:`View projects`})]})}function op(){let e=we({from:`/setup`}),t=e.onboarding===`site-health`&&!e.setupProject,n=e.onboarding===`site-health`&&e.experience!==`legacy`,r=kn(),i=e.experience===`legacy`?`legacy`:e.experience===`platform`?`platform`:r,[a,o]=(0,G.useState)(!1),[s,c]=(0,G.useState)(void 0),l=R({...vr({client:U}),enabled:i===`auto`,retry:!1,refetchOnMount:`always`}),u=R({...xr({client:U,query:{kind:V[`site-audit`],since:Uf,limit:Wf}}),enabled:i===`auto`,retry:!1,refetchOnMount:`always`}),d=i===`auto`&&l.isSuccess&&l.isFetchedAfterMount&&l.data.length===0;(0,G.useEffect)(()=>{d&&o(!0)},[d]);let f=i===`auto`?l.isSuccess&&l.isFetchedAfterMount?{state:`success`,projectCount:l.data.length}:l.isError?{state:`error`}:{state:`loading`}:{state:`idle`},p=i===`legacy`?`legacy`:a||d?`platform`:Vf(i,f);if(e.onboarding===`complete`&&e.setupProject)return(0,K.jsx)(sf,{projectName:e.setupProject,skippedVisibility:e.skipped===`visibility`});if(t||n)return(0,K.jsx)(ip,{projectName:e.setupProject,initialRunId:e.siteHealthRunId});let m=i===`auto`&&p===`legacy`&&!e.setupProject&&l.isSuccess;if(m&&s===void 0)return u.isError?c(null):u.isSuccess&&u.isFetchedAfterMount&&c(Gf(l.data,u.data)),(0,K.jsx)(np,{});let h=m?s:null;return h?(0,K.jsx)(sp,{projectName:h.projectName,runId:h.runId}):p===`legacy`?(0,K.jsx)(Df,{visibilityProjectName:e.setupProject,siteHealthOnboarding:e.onboarding===`site-health`,onboardingFinish:e.onboarding===`site-health`||e.onboarding===`first-run`}):p===`loading`?(0,K.jsx)(np,{}):p===`retry`?(0,K.jsx)(rp,{onRetry:()=>{l.refetch()}}):(0,K.jsx)(cp,{onActivationStarted:()=>o(!0),skipSiteScan:e.siteScan===`skip`})}function sp({projectName:e,runId:t}){let n=Ce();return(0,G.useEffect)(()=>{n({to:`/setup`,search:{onboarding:`site-health`,setupProject:e,...t?{siteHealthRunId:t}:{}},replace:!0})},[n,e,t]),(0,K.jsx)(np,{})}function cp({onActivationStarted:e,skipSiteScan:t}){return(0,K.jsx)(Rl,{title:`Site Health setup`,children:(0,K.jsx)(lp,{onActivationStarted:e,skipSiteScan:t})})}function lp({onActivationStarted:e,skipSiteScan:t}){let n=Ce(),r=ve(),i=Sd(),a=R({...Tr({client:U}),retry:!1}),o=be(mr()),[c]=(0,G.useState)(()=>sd(`platform`)),[l,u]=(0,G.useState)(c.domain??``),[d,f]=(0,G.useState)(c.projectName??``),[p,m]=(0,G.useState)(c.displayName??``),[h,g]=(0,G.useState)(c.country??`US`),[_,b]=(0,G.useState)(c.language??`en`),[C,w]=(0,G.useState)(!1),[T,E]=(0,G.useState)(`idle`),[D,O]=(0,G.useState)(null),[ee,k]=(0,G.useState)(null),[te,A]=(0,G.useState)(!1),[ne,re]=(0,G.useState)(null),[j,ie]=(0,G.useState)(!1),ae=Kt(),M=wt(),N=a.isError?void 0:a.data,oe=typeof N?.enabled==`boolean`?N.enabled:null,se=o.isPending?o.variables.body.enabled:oe,[ce,le]=(0,G.useState)(null),ue=(0,G.useRef)(null),{onboardingSessionId:de,emit:P}=ep(`platform`);(0,G.useEffect)(()=>{P({flowVersion:1,onboardingSessionId:de,event:`onboarding.started`,step:`project`,resumed:!1},`onboarding.started`)},[P,de]),(0,G.useEffect)(()=>{D||cd(`platform`,{domain:l,projectName:d,displayName:p,country:h,language:_})},[D,l,d,p,h,_]);let fe=()=>{ld(`platform`),u(``),f(``),m(``),g(`US`),b(`en`),w(!1),k(null),A(!1)},pe=Zf(l),F=d||pe?.projectName||``,I=p||pe?.displayName||``,me=T===`creating`||T===`dispatching`,he=ee??ne,ge=Jf(h,_),{countryValid:L,languageValid:_e}=Yf(h,_),ye=L&&_e;(0,G.useEffect)(()=>{he&&ue.current?.focus()},[he]);let xe=(e,t)=>n({to:`/setup`,search:{...t?{siteHealthRunId:t}:{},onboarding:`site-health`,setupProject:e.name},replace:!0}),Se=async e=>{E(`dispatching`),re(null);try{let t=i.mutateAsync({projectName:e.name,projectId:e.id,projectLabel:e.displayName||e.name,suppressErrorToast:!0,body:{checkDeadLinks:!0,maxPages:100}}),n=await Qf(t);if(n.state===`queued`){P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`queued`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`}),ot(n.run.runId),await xe(e,n.run.runId);return}t.then(()=>{P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`queued`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`})},e=>{P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`,reasonCode:Wn(e,`run_rejected`)})}),$f(t,e.id),await xe(e)}catch(e){E(`recovery`),re(tp(e,`The project was created, but the Site Health scan could not be started.`));let t=Wn(e,`run_rejected`);P({flowVersion:1,onboardingSessionId:de,event:`run.requested`,origin:`dashboard_setup`,result:`rejected`,kind:`site_health`,providerCountBucket:`0`,queryCountBucket:`0`,reasonCode:t}),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.blocked`,step:`run`,action:`retry_run`,reasonCode:t},`onboarding.blocked:run:${t}`)}},we=async i=>{if(i.preventDefault(),pe&&(t||C)&&ye&&!me){E(`creating`),k(null),A(!1),re(null);try{let i=await Je({name:F,displayName:I,canonicalDomain:pe.canonicalDomain,country:h,language:_});if(e(),O(i),ld(`platform`),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.step_completed`,step:`project`,method:`manual`},`onboarding.step_completed:project`),await r.invalidateQueries({queryKey:Cr({client:U})}),t){ud(i.name),await n({to:`/setup`,search:{experience:`legacy`,onboarding:`first-run`,setupProject:i.name},replace:!0});return}await Se(i)}catch(t){E(`idle`);let n=t instanceof qt&&t.statusCode===409;A(n),k(tp(t,`Could not create the project. Try again.`)),P({flowVersion:1,onboardingSessionId:de,event:`onboarding.blocked`,step:`project`,action:`save`,reasonCode:Wn(t,`project_create_failed`)},`onboarding.blocked:project`),n&&(e(),r.invalidateQueries({queryKey:Cr({client:U})}))}}},Te=()=>{D&&!me&&Se(D)},Ee=()=>{me||n({to:`/projects`})},z=async()=>{try{await navigator.clipboard.writeText(M?$:$.replace(Bf,``)),ie(!0)}catch{ir({tone:`negative`,title:`Could not copy setup request`,detail:M?`Open the agent quickstart to continue with the CLI instead.`:`Check your browser’s clipboard permission and try again.`})}},De=async e=>{le(null);try{let t=await o.mutateAsync({client:U,body:{enabled:e}});r.setQueryData(Dr({client:U}),t),t.enabled!==e&&le(`The server kept telemetry ${t.enabled?`on`:`off`}. Check its telemetry settings.`)}catch{le(`Could not update telemetry. Try again.`)}};return D&&T===`recovery`?(0,K.jsxs)(`div`,{className:`page-container max-w-3xl`,children:[(0,K.jsx)(kd,{current:`site`}),(0,K.jsx)(`div`,{className:`page-header mt-8`,children:(0,K.jsxs)(`div`,{className:`page-header-left`,children:[(0,K.jsx)(`h1`,{className:`page-title`,children:`Project created`}),(0,K.jsxs)(`p`,{className:`page-subtitle`,children:[D.displayName||D.name,` is ready. The Site Health scan needs another try.`]})]})}),(0,K.jsxs)(`div`,{ref:ue,className:`rounded-md border border-negative bg-negative-soft p-4`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:ne}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:`You can retry the scan or continue setup and retry from Site Health.`}),(0,K.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-3`,children:[(0,K.jsx)(W,{type:`button`,onClick:Te,children:`Retry Site Health scan`}),(0,K.jsx)(W,{type:`button`,variant:`secondary`,onClick:()=>{xe(D)},children:`Continue setup`})]})]})]}):(0,K.jsxs)(`div`,{className:`page-container max-w-xl py-8 md:py-12`,children:[t?null:(0,K.jsx)(kd,{current:`site`}),(0,K.jsxs)(`header`,{className:`mb-8 ${t?``:`mt-8`}`,children:[(0,K.jsx)(`h1`,{id:`site-map-setup-title`,className:`text-heading-24 text-heading`,children:t?`Create a project`:`Scan your site`}),(0,K.jsx)(`p`,{className:`mt-2 max-w-lg text-copy-14 text-secondary`,children:t?`Add a public domain, then choose the queries you want to track. No site scan will run.`:`Enter your public website to see its pages, structure, internal links, and Technical AEO scores.`})]}),(0,K.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center justify-between gap-2 text-label-13 text-secondary`,children:[(0,K.jsx)(`p`,{children:`Draft fields use tab storage when available. Scan permission resets on reload.`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,size:`sm`,disabled:me,onClick:fe,children:`Reset draft`})]}),(0,K.jsxs)(`form`,{"aria-labelledby":`site-map-setup-title`,className:`space-y-6`,onSubmit:tr(we),noValidate:!0,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14-strong text-heading`,htmlFor:`launchpad-domain`,children:`Website URL`}),(0,K.jsx)(`input`,{id:`launchpad-domain`,className:`h-10 w-full rounded-md border border-strong bg-bg-elevated/50 px-3 text-label-16 text-heading outline-none transition placeholder:text-muted focus:border-mono-500 focus:ring-1 focus:ring-mono-500 md:h-9 md:text-label-14 ${Hf}`,type:`text`,inputMode:`url`,autoComplete:`url`,autoCapitalize:`none`,spellCheck:!1,required:!0,"aria-invalid":!(!l||pe),"aria-describedby":l&&!pe?`launchpad-domain-hint launchpad-domain-error`:`launchpad-domain-hint`,placeholder:`https://example.com`,value:l,onChange:e=>{u(e.target.value),k(null),A(!1)}}),(0,K.jsx)(`p`,{id:`launchpad-domain-hint`,className:`text-copy-14 text-secondary`,children:t?(0,K.jsxs)(K.Fragment,{children:[`A public domain is still required.`,` `,(0,K.jsx)(B,{to:`/setup`,search:{experience:`platform`},className:`text-copy-14-strong text-link underline-offset-4 hover:underline`,children:`Map with Site Health instead`})]}):(0,K.jsxs)(K.Fragment,{children:[`Only public pages are scanned.`,` `,(0,K.jsx)(B,{to:`/setup`,search:{experience:`platform`,onboarding:`first-run`,siteScan:`skip`},className:`text-copy-14-strong text-link underline-offset-4 hover:underline`,children:`Set up without a site scan`})]})}),l&&!pe?(0,K.jsx)(`p`,{id:`launchpad-domain-error`,className:`text-copy-14 text-negative`,role:`alert`,children:`Enter a public domain, such as example.com.`}):null]}),(0,K.jsxs)(`details`,{className:`group border-y border-default`,children:[(0,K.jsxs)(`summary`,{className:`flex min-h-9 cursor-pointer list-none items-center justify-between gap-4 py-2 text-label-14 [&::-webkit-details-marker]:hidden ${Hf}`,children:[(0,K.jsx)(`span`,{className:`text-label-14-strong text-heading`,children:`Project name and locale`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-2 text-secondary`,children:[ge,(0,K.jsx)(x,{className:`size-4 transition-transform group-open:rotate-180 motion-reduce:transition-none`,"aria-hidden":`true`})]})]}),(0,K.jsxs)(`div`,{className:`space-y-5 border-t border-default py-4`,children:[pe?(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`mb-3 text-copy-14-strong text-heading`,children:`Project`}),(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-project-name`,children:`Project name`}),(0,K.jsx)(`input`,{id:`launchpad-project-name`,className:`setup-input h-10`,type:`text`,value:F,onChange:e=>f(e.target.value)})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-display-name`,children:`Display name`}),(0,K.jsx)(`input`,{id:`launchpad-display-name`,className:`setup-input h-10`,type:`text`,value:I,onChange:e=>m(e.target.value)})]})]})]}):null,(0,K.jsxs)(`div`,{children:[(0,K.jsx)(`p`,{className:`mb-3 text-copy-14-strong text-heading`,children:`Locale`}),(0,K.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2`,children:[(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-country`,children:`Country`}),(0,K.jsx)(`select`,{id:`launchpad-country`,className:`setup-input h-10`,value:h,onChange:e=>g(e.target.value),children:Kf.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))})]}),(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(`label`,{className:`text-label-14 text-secondary`,htmlFor:`launchpad-language`,children:`Language`}),(0,K.jsx)(`select`,{id:`launchpad-language`,className:`setup-input h-10`,value:_,onChange:e=>b(e.target.value),children:qf.map(e=>(0,K.jsx)(`option`,{value:e.value,children:e.label},e.value))})]})]})]})]})]}),t?null:(0,K.jsxs)(`p`,{className:`text-copy-14 text-secondary`,children:[`First scan: up to `,100,` pages. A limited scan describes the pages reached, not the whole site.`]}),t?null:(0,K.jsxs)(`label`,{className:`flex min-h-11 cursor-pointer items-start gap-3 py-2`,children:[(0,K.jsx)(`input`,{className:`mt-0.5 size-4 shrink-0 rounded border-strong bg-bg`,type:`checkbox`,checked:C,onChange:e=>w(e.target.checked),"aria-label":`Allow Canonry to scan this public site.`}),(0,K.jsxs)(`span`,{className:`flex items-center gap-1.5`,children:[(0,K.jsx)(`span`,{className:`text-label-14 text-heading`,children:`Allow Canonry to scan this public site.`}),(0,K.jsx)(Ar,{text:Lf})]})]}),he?(0,K.jsxs)(`div`,{ref:ue,className:`rounded-md border border-negative bg-negative-soft p-3`,role:`alert`,tabIndex:-1,children:[(0,K.jsx)(`p`,{className:`text-copy-14-strong text-heading`,children:he}),te?(0,K.jsx)(W,{type:`button`,variant:`secondary`,size:`sm`,className:`mt-3`,onClick:Ee,children:`View projects`}):null]}):null,(0,K.jsxs)(`div`,{className:`grid gap-2`,children:[(0,K.jsx)(W,{className:`w-full ${Hf}`,type:`submit`,disabled:!pe||!t&&!C||!ye||me,children:T===`creating`||T===`dispatching`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(s,{className:`size-4 motion-safe:animate-spin`,"aria-hidden":`true`}),` `,t?`Creating project…`:`Mapping site…`]}):t?`Create project`:`Scan site`}),T===`dispatching`?(0,K.jsx)(`span`,{className:`text-center text-label-14 text-secondary`,role:`status`,children:`Opening Site Health when the scan is ready.`}):null]})]}),(0,K.jsxs)(`section`,{className:`mt-8 border-t border-default pt-6`,"aria-labelledby":`agent-setup-title`,children:[(0,K.jsx)(`p`,{id:`agent-setup-title`,className:`text-copy-14-strong text-heading`,children:`Use your agent instead`}),(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,children:ae?`Connect your agent to this instance, or copy a request for a new local installation.`:`Connect ChatGPT or Claude Desktop to this instance.`}),(0,K.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center gap-1`,children:[(0,K.jsx)(W,{asChild:!0,variant:`secondary`,size:`sm`,children:(0,K.jsx)(B,{to:`/agent-setup`,children:`Agent setup`})}),ae?(0,K.jsxs)(W,{type:`button`,variant:`ghost`,size:`sm`,onClick:tr(z),children:[j?(0,K.jsx)(S,{className:`size-3.5`,"aria-hidden":`true`}):(0,K.jsx)(v,{className:`size-3.5`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{"aria-live":`polite`,children:j?`Copied new-install request`:`Copy new-install request`})]}):null,ae&&M?(0,K.jsx)(W,{asChild:!0,variant:`ghost`,size:`sm`,children:(0,K.jsxs)(`a`,{href:zf,target:`_blank`,rel:`noopener noreferrer`,children:[`Agent quickstart`,(0,K.jsx)(y,{className:`size-3.5`,"aria-hidden":`true`}),(0,K.jsx)(`span`,{className:`sr-only`,children:` (opens in a new tab)`})]})}):null]})]}),oe===null?null:(0,K.jsxs)(`section`,{className:`mt-6 border-t border-default pt-5`,"aria-labelledby":`telemetry-title`,children:[(0,K.jsxs)(`label`,{className:`flex min-h-11 items-start gap-3 py-2 ${o.isPending?`cursor-wait`:`cursor-pointer`}`,children:[(0,K.jsx)(`input`,{className:`mt-0.5 size-4 shrink-0 rounded border-strong bg-bg accent-accent focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-mono-500 disabled:cursor-wait`,type:`checkbox`,checked:se??!1,disabled:o.isPending,onChange:e=>{De(e.target.checked)},"aria-describedby":`telemetry-detail`}),(0,K.jsxs)(`span`,{className:`grid gap-0.5`,children:[(0,K.jsx)(`span`,{id:`telemetry-title`,className:`text-label-14 text-heading`,children:`Share anonymous product telemetry`}),(0,K.jsx)(`span`,{id:`telemetry-detail`,className:`max-w-[70ch] text-label-14 text-secondary`,children:`Helps prioritize improvements. Canonry does not send raw domains, URLs, queries, answer content, or credentials.`})]})]}),o.isPending?(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-secondary`,role:`status`,children:`Saving preference…`}):null,ce?(0,K.jsx)(`p`,{className:`mt-1 text-copy-14 text-negative`,role:`alert`,children:ce}):null]})]})}function up(){return(0,K.jsx)(`div`,{className:`page-container`,children:(0,K.jsx)(`section`,{className:`page-section`,children:(0,K.jsxs)(Fr,{className:`surface-card empty-card`,children:[(0,K.jsx)(`h1`,{children:`Route not found`}),(0,K.jsx)(`p`,{children:`The current path does not map to a dashboard view.`}),(0,K.jsx)(W,{asChild:!0,children:(0,K.jsx)(B,{to:`/`,children:`Return to overview`})})]})})})}var dp=je(()=>Ff(()=>import(`./ProjectPage-00Vsnxv4.js`),__vite__mapDeps([14,1,2,3,4,5,6,7,15,8,16,9,10,11,12,13,0,17,18,19,20,21]),import.meta.url),`ProjectPage`),fp=je(()=>Ff(()=>import(`./RunsPage-ChSbIrF9.js`),__vite__mapDeps([22,1,2,3,4,5,6,7,15,9,10,13]),import.meta.url),`RunsPage`),pp=je(()=>Ff(()=>import(`./HistoryPage-DIGmY4wi.js`),__vite__mapDeps([23,3,1,2,18,4,5,6,7,10,13]),import.meta.url),`HistoryPage`),mp=je(()=>Ff(()=>import(`./SettingsPage-CIrzXeP8.js`),__vite__mapDeps([24,1,2,3,4,5,6,7,16,9,13]),import.meta.url),`SettingsPage`),hp=je(()=>Ff(()=>import(`./AgentSetupPage-DpBlChWi.js`),__vite__mapDeps([25,1,2,3,7,6,5,8,16]),import.meta.url),`AgentSetupPage`),gp=je(()=>Ff(()=>import(`./BacklinksPage-CFoi9mrt.js`),__vite__mapDeps([26,1,2,3,7,6,5,16,13,17]),import.meta.url),`BacklinksPage`),_p=je(()=>Ff(()=>import(`./TrafficPage-ZYsFSEuq.js`),__vite__mapDeps([27,1,2,3,4,5,6,7,16,9,10,12,13,20]),import.meta.url),`TrafficPage`),vp=je(()=>Ff(()=>import(`./TrafficSourceDetailPage-D5uJZpZ4.js`),__vite__mapDeps([28,1,2,3,4,5,6,7,15,11,12,13,20,9,10,21]),import.meta.url),`TrafficSourceDetailPage`),yp=je(()=>Ff(()=>import(`./MeasurementPropertyPage-C6o9U2R6.js`),__vite__mapDeps([29,1,2,3,4,5,6,7,15,8,10,11,12,19]),import.meta.url),`MeasurementPropertyPage`);function bp(){return(0,K.jsx)(Il,{children:(0,K.jsx)(qr,{children:(0,K.jsx)(jl,{})})})}var xp=Se()({component:bp,validateSearch:e=>({manageQueries:e.manageQueries===!0||e.manageQueries===`true`||void 0,runId:typeof e.runId==`string`?e.runId:void 0,siteHealthRunId:typeof e.siteHealthRunId==`string`?e.siteHealthRunId:void 0,seoProfileId:typeof e.seoProfileId==`string`?e.seoProfileId:void 0,seoRunId:typeof e.seoRunId==`string`?e.seoRunId:void 0,seoRegion:typeof e.seoRegion==`string`&&e.seoRegion?e.seoRegion:void 0,seoMarket:typeof e.seoMarket==`string`&&e.seoMarket?e.seoMarket:void 0,seoShow:typeof e.seoShow==`string`&&e.seoShow?e.seoShow:void 0,seoSort:typeof e.seoSort==`string`&&e.seoSort?e.seoSort:void 0,seoQ:typeof e.seoQ==`string`&&e.seoQ?e.seoQ:void 0,evidenceId:typeof e.evidenceId==`string`?e.evidenceId:void 0,runStatus:typeof e.runStatus==`string`?e.runStatus:void 0,runKind:typeof e.runKind==`string`?e.runKind:void 0,runProject:typeof e.runProject==`string`?e.runProject:void 0,runWindow:typeof e.runWindow==`string`?e.runWindow:void 0,runQuery:typeof e.runQuery==`string`?e.runQuery:void 0,onboarding:e.onboarding===`site-health`||e.onboarding===`first-run`||e.onboarding===`complete`?e.onboarding:void 0,experience:e.experience===`legacy`||e.experience===`platform`?e.experience:void 0,siteScan:e.siteScan===`skip`?`skip`:void 0,skipped:e.skipped===`visibility`?`visibility`:void 0,setupProject:typeof e.setupProject==`string`?e.setupProject:void 0,scope:typeof e.scope==`string`?e.scope:void 0,class:typeof e.class==`string`?e.class:void 0,...Object.fromEntries([`queryWorkspace`,`researchMode`,`trackingQueryId`,`measurementScope`,`measurementScopeKey`,`measurementMarketKey`,`queryClass`,`measurementProvider`,`measurementModel`,`measurementLocation`,`measurementFrom`,`measurementTo`,`measurementRevision`,`measurementRunId`,`measurementQueryKey`,`measurementAnswer`,`journeyView`,`journeyDays`,`journeyVisitor`,`journeyEngine`,`journeyReturned`,`journeyOffset`,`agentHours`].map(t=>[t,typeof e[t]==`string`&&e[t]?e[t]:void 0]))})}),Sp=z({getParentRoute:()=>xp,path:`/`,component:ed,beforeLoad:async({context:e})=>{let t=e.queryClient.getQueryData(Cr({client:U}));if(t===void 0)try{t=await e.queryClient.ensureQueryData(vr({client:U}))}catch{return}if(t.length===0)throw Te({to:`/setup`})}}),Cp=z({getParentRoute:()=>xp,path:`/projects`,component:id}),wp=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i,Tp=z({getParentRoute:()=>xp,path:`/projects/$projectName`,component:()=>(0,K.jsx)(ke,{}),beforeLoad:async({context:e,params:t,location:n})=>{let r=t.projectName;if(!wp.test(r))return;let i=e.queryClient.getQueryData(Cr({client:U}));if(!i)try{i=await e.queryClient.ensureQueryData(vr({client:U}))}catch{return}let a=i.find(e=>e.id===r);if(a)throw Te({to:n.pathname.replace(`/projects/${r}`,`/projects/${encodeURIComponent(a.name)}`),replace:!0})}}),Ep=z({getParentRoute:()=>Tp,path:`/`,component:()=>(0,K.jsx)(dp,{tab:`overview`})}),Dp=z({getParentRoute:()=>Tp,path:`/portfolio`,component:()=>(0,K.jsx)(dp,{tab:`portfolio`})}),Op=z({getParentRoute:()=>Tp,path:`/search-console`,component:()=>(0,K.jsx)(dp,{tab:`search-console`})}),kp=z({getParentRoute:()=>Tp,path:`/seo-data`,component:()=>(0,K.jsx)(dp,{tab:`seo-data`})}),Ap=z({getParentRoute:()=>Tp,path:`/journeys`,component:()=>(0,K.jsx)(dp,{tab:`journeys`})}),jp=z({getParentRoute:()=>Tp,path:`/conversions`,component:()=>(0,K.jsx)(dp,{tab:`conversions`})}),Mp=z({getParentRoute:()=>Tp,path:`/local`,component:()=>(0,K.jsx)(dp,{tab:`local`})}),Np=z({getParentRoute:()=>Tp,path:`/discovery`,component:()=>(0,K.jsx)(dp,{tab:`discovery`})}),Pp=z({getParentRoute:()=>Tp,path:`/queries`,component:()=>(0,K.jsx)(dp,{tab:`queries`})}),Fp=z({getParentRoute:()=>Tp,path:`/client-queries`,component:()=>(0,K.jsx)(dp,{tab:`client-queries`})}),Ip=z({getParentRoute:()=>Tp,path:`/properties/$targetKey`,component:()=>(0,K.jsx)(yp,{})}),Lp=z({getParentRoute:()=>Tp,path:`/report`,beforeLoad:({params:e})=>{throw Te({to:`/projects/$projectName`,params:e,replace:!0})}}),Rp=z({getParentRoute:()=>Tp,path:`/activity`,component:()=>(0,K.jsx)(dp,{tab:`activity`})}),zp=z({getParentRoute:()=>Tp,path:`/backlinks`,component:()=>(0,K.jsx)(dp,{tab:`backlinks`})}),Bp=z({getParentRoute:()=>Tp,path:`/technical-aeo`,component:()=>(0,K.jsx)(dp,{tab:`technical-aeo`})}),Vp=z({getParentRoute:()=>Tp,path:`/history`,component:()=>(0,K.jsx)(dp,{tab:`history`})}),Hp=z({getParentRoute:()=>Tp,path:`/settings`,component:()=>(0,K.jsx)(dp,{tab:`settings`})}),Up=z({getParentRoute:()=>xp,path:`/runs`,component:fp}),Wp=z({getParentRoute:()=>xp,path:`/history`,component:pp}),Gp=z({getParentRoute:()=>xp,path:`/settings`,component:mp,beforeLoad:({context:e})=>{}}),Kp=z({getParentRoute:()=>xp,path:`/setup`,component:op}),qp=z({getParentRoute:()=>xp,path:`/agent-setup`,component:hp}),Jp=z({getParentRoute:()=>xp,path:`/backlinks`,component:gp}),Yp=z({getParentRoute:()=>xp,path:`/traffic`,component:_p}),Xp=z({getParentRoute:()=>xp,path:`/traffic/$projectName/$sourceId`,component:vp}),Zp=z({getParentRoute:()=>xp,path:`*`,component:up}),Qp=xp.addChildren([Sp,Cp,Tp.addChildren([Ep,Dp,Op,kp,Ap,jp,Mp,Np,Pp,Fp,Ip,Lp,Rp,zp,Bp,Vp,Hp]),Up,Wp,Gp,Kp,qp,Jp,Yp,Xp,Zp]);function $p(){return typeof window<`u`&&window.__CANONRY_CONFIG__?.basePath?window.__CANONRY_CONFIG__.basePath:`/`}var em=$p(),tm=em===`/`?``:em.replace(/\/$/,``);function nm(e,t){return xe({routeTree:Qp,basepath:tm||`/`,context:{queryClient:e},...t?.initialEntries&&{history:De({initialEntries:t.initialEntries})}})}var rm=!1;async function im(e){return(await Ct({client:U,body:e,keepalive:!0})).data}function am(){rm||typeof window>`u`||(rm=!0,!(zn()||Mt())&&(Dt({send:im}),U.interceptors.request.use((e,t)=>{let n=t.fetch??globalThis.fetch,r=typeof t.url==`string`?t.url:void 0;return t.fetch=async(t,i)=>{try{return await n(t,i)}catch(t){throw t instanceof DOMException&&t.name===`AbortError`||We({method:e.method,route:r,network:!0}),t}},e}),U.interceptors.response.use((e,t,n)=>(We({method:t.method,route:typeof n.url==`string`?n.url:void 0,path:sm(t.url),status:e.status}),e)),window.addEventListener(`error`,e=>{Rn({kind:`unhandled`,error:e.error})}),window.addEventListener(`unhandledrejection`,e=>{Rn({kind:`unhandled`,error:e.reason})}),fm()))}function om(e){let t=null,n=()=>{let n=e.state.matches.at(-1);if(!n)return;qe(n.fullPath);let r=e.state.location;if(!r)return;let i=r.search&&typeof r.search==`object`?r.search:{};t&&t.pathname===r.pathname&&jt(t.search,i),t={pathname:r.pathname,search:i}};return n(),e.subscribe(`onResolved`,n)}function sm(e){try{return new URL(e,window.location.origin).pathname}catch{return}}var cm={LCP:[2500,4e3],INP:[200,500],CLS:[.1,.25],FCP:[1800,3e3],TTFB:[800,1800]};function lm(e,t){let[n,r]=cm[e];return t<=n?`good`:t<=r?`needs-improvement`:`poor`}function um(){let e=0,t=0,n=-1/0,r=-1/0;return{add(i){i.hadRecentInput||(i.startTime-r<1e3&&i.startTime-n<5e3?t+=i.value:(t=i.value,n=i.startTime),r=i.startTime,e=Math.max(e,t))},value:()=>e}}function dm(){let e=0;return{add(t){t.interactionId&&(e=Math.max(e,t.duration))},value:()=>e}}function fm(){if(typeof PerformanceObserver>`u`)return;let e=new Set,t=(t,n)=>{!e.has(t)&&Number.isFinite(n)&&(e.add(t),Xe(t,lm(t,n)))},n=(e,t,n={})=>{try{new PerformanceObserver(e=>t(e.getEntries())).observe({type:e,buffered:!0,...n})}catch{}};try{let e=performance.getEntriesByType(`navigation`)[0];e&&e.responseStart>0&&t(`TTFB`,e.responseStart)}catch{}n(`paint`,e=>{let n=e.find(e=>e.name===`first-contentful-paint`);n&&t(`FCP`,n.startTime)});let r=0;n(`largest-contentful-paint`,e=>{let t=e.at(-1);t&&(r=t.startTime)});let i=um();n(`layout-shift`,e=>{for(let t of e)i.add({startTime:t.startTime,value:t.value??0,hadRecentInput:t.hadRecentInput===!0})});let a=dm();n(`event`,e=>{for(let t of e)a.add(t)},{durationThreshold:40});let o=()=>{r>0&&t(`LCP`,r),t(`CLS`,i.value()),a.value()>0&&t(`INP`,a.value())};document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&o()}),window.addEventListener(`pagehide`,o)}var pm=6e4,mm=`Anyone with this password can sign in to this dashboard.`,hm={label:`Root API key`,help:`To create the password from here, enter the root API key (apiKey in config.yaml). It is used once and not saved.`,missing:`Enter the root API key.`,rejected:`That is not the root API key for this install.`,show:`Show passwords and key`},gm={id:`embed`,scopes:[`read`,`embed`],projectId:`embed`,readOnly:!0};function _m(){let e=(0,G.useRef)(Cn()).current,[t,n]=(0,G.useState)(e?`ready`:`checking`),[r,i]=(0,G.useState)(null),[a,o]=(0,G.useState)(null),[s,c]=(0,G.useState)(e),[l,u]=(0,G.useState)(!1),[d,f]=(0,G.useState)(``),[p,m]=(0,G.useState)(``),[h,g]=(0,G.useState)(``),[_,v]=(0,G.useState)(!1),[y,b]=(0,G.useState)(`password`),[x,S]=(0,G.useState)(!1),[C,w]=(0,G.useState)(``),[T,E]=(0,G.useState)(null),[D,O]=(0,G.useState)(!1),[ee,k]=(0,G.useState)(!1),te=(0,G.useRef)(null),A=(0,G.useRef)(null),ne=(0,G.useRef)(null),re=()=>{let t=r?`${r.name}:${r.role}`:e?`api-key:explicit`:a?`api-key:${a.id}`:`no-accounts`;if(!te.current||ne.current!==t){A.current?.clear();let e=rr();A.current=e,te.current=nm(e),om(te.current),ne.current=t}return{queryClient:A.current,router:te.current}},j=e=>e.authRequired?(u(!0),i(e.user),o(null),c(!1),n(e.user?`ready`:`account-login`),!0):!1;(0,G.useEffect)(()=>{let t=!1,r=async(e,r=!1)=>{try{let e=await ze();if(t)return;o(e),c(!1),n(`ready`)}catch(i){if(t)return;if(r&&i instanceof qt&&i.statusCode===401)return Hn().then(()=>{t||(E(null),o(null),c(!1),k(!0),n(`login`))}).catch(r=>{t||(E(r instanceof Error?r.message:`Could not clear the invalid session`),n(e))});E(i instanceof Error?i.message:`Could not verify API key access`),n(e)}};return e?(r(`api-key-error`),()=>{t=!0}):(Promise.allSettled([ht(),Nn()]).then(([e,i])=>{if(t||e.status===`fulfilled`&&j(e.value))return;if(i.status===`rejected`){let e=i.reason;E(e instanceof Error?e.message:`Failed to reach the Canonry API`),n(`login`);return}let a=i.value;a.authenticated&&zn()?(o(gm),c(!1),n(`ready`)):a.authenticated?(c(!0),r(`api-key-error`,!0)):(o(null),c(!1),n(a.setupRequired?`setup`:`login`))}),()=>{t=!0})},[]),(0,G.useEffect)(()=>{if(t!==`ready`||e)return;let r=setInterval(()=>{l?ht().then(e=>{e.authRequired&&!e.user&&(k(!0),i(null),o(null),n(`account-login`))}).catch(()=>{}):Nn().then(e=>{e.authenticated||(k(!0),o(null),n(e.setupRequired?`setup`:`login`))}).catch(()=>{})},pm);return wn(()=>{k(!0),i(null),o(null),c(!1),n(l?`account-login`:`login`)}),()=>{clearInterval(r),wn(null)}},[t,l,e]);let ie=async e=>{if(e.preventDefault(),!p.trim()||p.trim().length<8){E(`Password must be at least 8 characters`);return}if(p!==h){E(`Passwords do not match`);return}let t=C.trim();if(x&&!t)E(hm.missing);else{O(!0),E(null);try{if(!(await Ut(p.trim(),x?t:void 0)).authenticated){E(`Setup failed`);return}m(``),g(``),w(``),S(!1),v(!1),k(!1),o(null),c(!0),n(`checking`);try{let e=await ze();o(e),c(!1),n(`ready`)}catch(e){E(e instanceof Error?e.message:`Could not verify API key access`),n(`api-key-error`)}}catch(e){if(e instanceof qt&&e.statusCode===401&&e.code===`AUTH_REQUIRED`){E(x?hm.rejected:null),S(!0);return}E(e instanceof qt||e instanceof Error?e.message:`Setup failed`)}finally{O(!1)}}},ae=e=>{m(e),E(null)},M=e=>{w(e),E(null)},N=e=>{g(e),E(null)},oe=async e=>{if(e.preventDefault(),p.trim()){O(!0),E(null);try{if(!(y===`api-key`?await yt(p.trim()):await hn(p.trim())).authenticated){E(y===`api-key`?`Invalid API key`:`Incorrect password`);return}let e=await ze();o(e),c(!1),m(``),v(!1),k(!1),n(`ready`)}catch(e){E(e instanceof qt||e instanceof Error?e.message:`Authentication failed`)}finally{O(!1)}}},se=e=>{b(e),m(``),v(!1),E(null)},ce=async e=>{if(e.preventDefault(),d.trim()&&p){O(!0),E(null);try{let e=await rn(d.trim(),p);if(!e.user){E(`Incorrect name or password.`);return}m(``),k(!1),i(e.user),o(null),c(!1),n(`ready`)}catch(e){E(e instanceof qt?e.message:`Incorrect name or password.`)}finally{O(!1)}}};if(t===`ready`){let{queryClient:e,router:t}=re();return(0,K.jsx)(er,{account:r,apiKey:a,apiKeyPending:s,children:(0,K.jsx)(ye,{client:e,children:(0,K.jsx)(Ee,{router:t})})})}let le=p.trim(),ue=p.length>0&&le.length<8,de=h.length>0&&p!==h,P=le.length>=8&&p===h&&(!x||C.trim().length>0);return(0,K.jsx)(`div`,{className:`min-h-screen bg-bg px-4 py-8`,children:(0,K.jsxs)(`div`,{className:`mx-auto flex min-h-[calc(100vh-4rem)] max-w-md flex-col items-center justify-center gap-5`,children:[(0,K.jsxs)(`div`,{"data-testid":`auth-brand`,className:`flex items-center gap-2.5`,children:[(0,K.jsx)(Ki,{className:`size-7`}),(0,K.jsx)(`span`,{className:`text-label-18-strong text-heading`,children:`Canonry`})]}),(0,K.jsx)(Fr,{className:`surface-card w-full`,children:t===`checking`?(0,K.jsx)(Nr,{className:`py-8`,children:(0,K.jsx)(`p`,{className:`supporting-copy text-center`,children:`Connecting to Canonry…`})}):t===`api-key-error`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Could not verify API key access`})]}),(0,K.jsxs)(Nr,{className:`space-y-4`,children:[(0,K.jsx)(`p`,{className:`supporting-copy`,children:T??`Canonry could not verify this session’s access, so the dashboard stayed locked.`}),(0,K.jsx)(W,{type:`button`,className:`w-full`,onClick:()=>{window.location.reload()},children:`Try again`})]})]}):t===`account-login`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Sign in to Canonry`})]}),(0,K.jsxs)(Nr,{children:[ee?(0,K.jsx)(`p`,{className:`mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-copy-14 text-caution`,children:`You were signed out — please sign in again.`}):null,(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(ce),children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`account-name`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:`Name`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`account-name`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:`text`,name:`username`,autoComplete:`username`,value:d,onChange:e=>{f(e.target.value),E(null)},"aria-invalid":!!T,"aria-describedby":T?`account-login-error`:void 0})]}),(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`account-password`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:`Password`}),(0,K.jsx)(`input`,{id:`account-password`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:`password`,name:`password`,autoComplete:`current-password`,value:p,onChange:e=>ae(e.target.value),"aria-invalid":!!T,"aria-describedby":T?`account-login-error`:void 0})]}),T?(0,K.jsx)(`p`,{id:`account-login-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!d.trim()||!p,children:D?`Signing in…`:`Sign in`})]})]})]}):t===`setup`?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`First-time setup`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Create a dashboard password`}),(0,K.jsx)(Pr,{children:mm})]}),(0,K.jsx)(Nr,{children:(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(ie),children:[(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-password-new`,children:`Password`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-password-new`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`new-password`,autoComplete:`new-password`,minLength:8,required:!0,value:p,onChange:e=>ae(e.target.value),"aria-invalid":ue,"aria-describedby":`dashboard-password-new-help`}),(0,K.jsx)(`span`,{id:`dashboard-password-new-help`,"aria-live":`polite`,className:ue?`block text-label-14 text-negative-400`:`block text-label-14 text-secondary`,children:ue?`Enter at least 8 characters.`:`Use at least 8 characters.`})]}),(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-password-confirm`,children:`Confirm password`}),(0,K.jsx)(`input`,{id:`dashboard-password-confirm`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`confirm-password`,autoComplete:`new-password`,minLength:8,required:!0,value:h,onChange:e=>N(e.target.value),"aria-invalid":de,"aria-describedby":`dashboard-password-confirm-help`}),(0,K.jsx)(`span`,{id:`dashboard-password-confirm-help`,"aria-live":`polite`,className:de?`block text-label-14 text-negative-400`:`block text-label-14 text-secondary`,children:de?`Passwords do not match.`:`Enter the same password again.`})]}),x?(0,K.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,K.jsx)(`label`,{className:`block text-label-12-strong text-secondary`,htmlFor:`dashboard-setup-root-key`,children:hm.label}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-setup-root-key`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:`apiKey`,autoComplete:`off`,spellCheck:!1,required:!0,value:C,onChange:e=>M(e.target.value),"aria-invalid":T===hm.rejected,"aria-describedby":`dashboard-setup-root-key-help`}),(0,K.jsx)(`span`,{id:`dashboard-setup-root-key-help`,"aria-live":`polite`,className:`block text-label-14 text-secondary`,children:hm.help})]}):null,(0,K.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-2 text-label-14 text-secondary`,htmlFor:`dashboard-password-show`,children:[(0,K.jsx)(`input`,{id:`dashboard-password-show`,type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),x?hm.show:`Show passwords`]}),T?(0,K.jsx)(`p`,{id:`dashboard-password-setup-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!P,children:D?`Creating password…`:`Create password and continue`})]})})]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(Mr,{children:[(0,K.jsx)(`p`,{className:`eyebrow eyebrow-soft`,children:`Dashboard access`}),(0,K.jsx)(`h1`,{className:`text-heading-24 text-primary`,children:`Sign in to Canonry`}),(0,K.jsx)(Pr,{children:y===`api-key`?`Enter an API key from this Canonry install. This opens the dashboard with that key’s access and does not change the password.`:`Enter your dashboard password to continue.`})]}),(0,K.jsxs)(Nr,{children:[ee?(0,K.jsx)(`p`,{className:`mb-4 rounded-md border border-caution bg-caution-soft px-3 py-2 text-copy-14 text-caution`,children:`Your session expired — please sign in again.`}):null,(0,K.jsxs)(`form`,{className:`space-y-4`,onSubmit:tr(oe),children:[(0,K.jsxs)(`label`,{className:`block space-y-1.5`,htmlFor:`dashboard-password-current`,children:[(0,K.jsx)(`span`,{className:`text-label-12-strong text-secondary`,children:y===`api-key`?`Canonry API key`:`Password`}),(0,K.jsx)(`input`,{autoFocus:!0,id:`dashboard-password-current`,className:`w-full rounded-md border border-base bg-bg px-3 py-2 text-label-14 text-heading outline-none transition focus:border-mono-600`,type:_?`text`:`password`,name:y===`api-key`?`apiKey`:`password`,autoComplete:y===`api-key`?`off`:`current-password`,spellCheck:!1,required:!0,value:p,onChange:e=>ae(e.target.value),"aria-invalid":!!T,"aria-describedby":T?`dashboard-password-login-error`:void 0})]}),(0,K.jsxs)(`label`,{className:`flex min-h-10 cursor-pointer items-center gap-2 text-label-14 text-secondary`,htmlFor:`dashboard-login-password-show`,children:[(0,K.jsx)(`input`,{id:`dashboard-login-password-show`,type:`checkbox`,checked:_,onChange:e=>v(e.target.checked)}),y===`api-key`?`Show API key`:`Show password`]}),T?(0,K.jsx)(`p`,{id:`dashboard-password-login-error`,role:`alert`,className:`text-copy-14 text-negative-400`,children:T}):null,(0,K.jsx)(W,{type:`submit`,disabled:D||!p.trim(),children:D?`Signing in…`:`Open dashboard`}),(0,K.jsx)(W,{type:`button`,variant:`ghost`,onClick:()=>se(y===`api-key`?`password`:`api-key`),children:y===`api-key`?`Use dashboard password instead`:`Forgot password? Use API key`})]})]})]})})]})})}var vm=document.getElementById(`root`);if(!vm)throw Error(`Expected #root element for web app bootstrap.`);am(),(0,Vr.createRoot)(vm).render((0,K.jsx)(G.StrictMode,{children:(0,K.jsx)(Za,{children:(0,K.jsx)(_m,{})})}));export{Ts as $,va as $t,Lu as A,Da as At,bl as B,ka as Bt,pd as C,na as Ct,zu as D,ha as Dt,Qu as E,Qi as Et,Gl as F,ta as Ft,nc as G,Zi as Gt,Qs as H,Ba as Ht,zl as I,_a as It,Bs as J,da as Jt,qs as K,la as Kt,Wl as L,xa as Lt,Ou as M,Ca as Mt,ju as N,Sa as Nt,Mu as O,ma as Ot,Kl as P,Ma as Pt,Gs as Q,Pa as Qt,Rl as R,Va as Rt,Sd as S,ba as St,nd as T,ea as Tt,Zs as U,Ta as Ut,hc as V,Ua as Vt,rc as W,ca as Wt,Ks as X,Wa as Xt,Ws as Y,ua as Yt,Vs as Z,Oa as Zt,Ed as _,Ka as _t,Zd as a,xi as an,Go as at,wd as b,Xi as bt,Wd as c,gi as cn,go as ct,Pd as d,ri as dn,lo as dt,Na as en,Cs as et,Ld as f,Zr as fn,po as ft,kd as g,$a as gt,Md as h,Gr as hn,no as ht,vf as i,Li as in,ms as it,ku as j,pa as jt,Iu as k,q as kt,Kd as l,mi as ln,ho as lt,zd as m,Jr as mn,fo as mt,gf as n,Vi as nn,vs as nt,af as o,_i as on,vo as ot,Bd as p,ii as pn,uo as pt,Hs as q,fa as qt,_f as r,Ii as rn,hs as rt,Jd as s,vi as sn,_o as st,Ff as t,Fi as tn,bs as tt,Gd as u,ti as un,ro as ut,xd as v,Ji as vt,dd as w,$i as wt,bd as x,Ea as xt,Cd as y,Yi as yt,Ll as z,ia as zt};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,S as t}from"./vendor-tanstack-tBjrfzKu.js";import{mt as n}from"./ToneBadge-
|
|
1
|
+
import{C as e,S as t}from"./vendor-tanstack-tBjrfzKu.js";import{mt as n}from"./ToneBadge-ht0n6RUH.js";var r=6e3,i=5,a=180,o=[],s=0,c=new Set,l=new Map,u=new Map;function d(){let e=[...o];for(let t of c)t(e)}function f(e){let t=l.get(e);t&&(clearTimeout(t),l.delete(e));let n=u.get(e);n&&(clearTimeout(n),u.delete(e))}function p(e){f(e);let t=o.length;o=o.filter(t=>t.id!==e),o.length!==t&&d()}function m(e){f(e.id),l.set(e.id,setTimeout(()=>{_(e.id)},e.durationMs))}function h(e,t,n){return typeof e==`string`?{title:e,tone:t,durationMs:n}:e}function g(e,t=`negative`,n=r){let a=h(e,t,n),c={id:String(++s),title:a.title,detail:a.detail,tone:a.tone??t,durationMs:a.durationMs??n,dedupeKey:a.dedupeKey,cta:a.cta,state:`open`};if(a.dedupeKey){let e=o.find(e=>e.dedupeKey===a.dedupeKey);if(e){if((a.dedupeMode??`drop`)===`drop`)return e.id;let t={...e,title:c.title,detail:c.detail,tone:c.tone,durationMs:c.durationMs,cta:c.cta,state:`open`};return o=o.map(n=>n.id===e.id?t:n),d(),m(t),e.id}}return o.length>=i&&p(o[0].id),o=[...o,c],d(),m(c),c.id}function _(e){let t=o.find(t=>t.id===e);t&&t.state!==`closing`&&(f(e),o=o.map(t=>t.id===e?{...t,state:`closing`}:t),d(),u.set(e,setTimeout(()=>{p(e)},a)))}function v(e){return c.add(e),()=>{c.delete(e)}}function y(){return o}var b={project:`getApiV1ProjectsByName`,google:`getApiV1ProjectsByNameGoogle`,gsc:`getApiV1ProjectsByNameGoogleGsc`,bing:`getApiV1ProjectsByNameBing`,ga:`getApiV1ProjectsByNameGa`,gbp:`getApiV1ProjectsByNameGbp`,ads:`getApiV1ProjectsByNameAds`,googleAds:`getApiV1ProjectsByNameGoogleAds`,gtm:`getApiV1ProjectsByNameGtm`,conversionTracking:`getApiV1ProjectsByNameConversionTracking`,traffic:`getApiV1ProjectsByNameTraffic`,discovery:`getApiV1ProjectsByNameDiscover`,researchRuns:`getApiV1ProjectsByNameResearchRuns`,visibilityReport:`getApiV1ProjectsByNameVisibilityReport`,queryTracking:`getApiV1ProjectsByNameQueryTracking`,technicalAeo:`getApiV1ProjectsByNameTechnicalAeo`,seo:`getApiV1ProjectsByNameSeo`,trends:`getApiV1ProjectsByNameTrends`,sitemaps:`getApiV1ProjectsByNameSitemaps`,runs:`getApiV1ProjectsByNameRuns`,runAdmission:`getApiV1ProjectsByNameRunAdmission`};function x(e,t,n){let r=b[t];return e.invalidateQueries({predicate:e=>{let t=e.queryKey[0];return typeof t?._id==`string`&&t._id.startsWith(r)&&(!n||t.path?.name===n.projectName&&(n.profileId===void 0||t.query?.profileId===n.profileId))}})}function S(e,t){return e.invalidateQueries({predicate:e=>{let n=e.queryKey[0];return n?.path?.name!==t||typeof n._id!=`string`?!1:n._id.startsWith(`getApiV1ProjectsByNameMeasurement`)||n._id===b.queryTracking||n._id===b.visibilityReport||n._id===`getApiV1ProjectsByNameQueries`||n._id===`getApiV1ProjectsByName`}})}var C=new Set([`getApiV1Projects`,`getApiV1Runs`,`getApiV1History`,`getApiV1NotificationsEvents`]);function w(e,t,n){if(![`POST`,`PUT`,`PATCH`,`DELETE`].includes(t.method))return;let r=new URL(t.url).pathname.match(/\/api\/v1\/(.*)$/)?.[1];if(!r||/^(?:telemetry|feedback|auth|session)(?:\/|$)/.test(r))return;let i=r.match(/^projects\/([^/]+)(?:\/(.*))?$/),a=i?i[2]??``:r;if(t.method===`POST`&&a===`seo/refresh-intents`||t.method===`POST`&&/(?:^|\/)(?:[^/]*-preview|preview(?:-[^/]+)?|test|generate)$/.test(a))return;let o=n&&typeof n==`object`?n:null;if(o?.dryRun===!0||r.endsWith(`/results/clear`)&&o?.confirm!==!0)return;let s=i?decodeURIComponent(i[1]):null,c=i?.[2]?.startsWith(`agent/`)??!1,l=new Set(s?[s]:[]),u=new Set;if(s)for(let t of e.getQueryCache().getAll()){let e=t.queryKey[0],n=t.state.data,r=e?._id===`getApiV1Projects`&&Array.isArray(n)?n:n&&typeof n==`object`&&`project`in n?[n.project]:e?._id===`getApiV1ProjectsByName`?[n]:[];for(let e of r)e&&(e.name===s||e.id===s)&&(l.add(e.name),l.add(e.id),u.add(e.id))}let d=e=>{let t=e.queryKey[0];if(c)return t?.path?.name===s&&t._id?.startsWith(`getApiV1ProjectsByNameAgent`)===!0||e.queryKey[0]===`aero-preview`&&e.queryKey[1]===s;if(t?._id?.startsWith(`getApiV1ProjectsByName`)&&t.path?.name&&l.has(t.path.name))return!0;let n=e.queryKey[0];if([`projects`,`project-dashboard-full`,`project-overview-slim`].includes(n))return u.has(e.queryKey[1]);if([`sentiment`,`gbp-section-insights`,`analytics-metrics`,`aero-preview`].includes(n))return n===`analytics-metrics`&&i?.[2]?.startsWith(`competitors`)?!1:l.has(e.queryKey[1]);if(n===`setup`)return l.has(e.queryKey[2]);let r=e.state.data;return t?._id===`getApiV1RunsById`&&!!r?.projectId&&u.has(r.projectId)},f=e=>C.has(e.queryKey[0]?._id??``),p=t.method===`POST`&&/^(?:runs|technical-aeo\/runs|discover\/run|backlinks\/extract|seo\/sync|google\/gsc\/(?:sync|inspect-sitemap)|bing\/inspect-sitemap|(?:gbp|ads|google-ads|gtm)\/sync)$/.test(a),m=e=>{let t=e.queryKey[0];return f(e)||[`getApiV1ProjectsByName`,`getApiV1ProjectsByNameOverview`,`getApiV1ProjectsByNameRuns`,`getApiV1ProjectsByNameTechnicalAeoRuns`,`getApiV1ProjectsByNameTimeline`].includes(t?._id??``)||[`getApiV1ProjectsByNameSeoOverview`,`getApiV1ProjectsByNameSeoRuns`,`getApiV1ProjectsByNameSeoStatus`].includes(t?._id??``)||e.queryKey[0]===`project-dashboard-full`&&e.queryKey[3]===`overview`||e.queryKey[0]===`project-overview-slim`},h=s?e=>d(e)&&(!p||m(e))||!c&&f(e):e=>!p||m(e);e.cancelQueries({predicate:h,type:`active`}),i&&!i[2]&&t.method===`DELETE`?(e.removeQueries({predicate:d}),e.setQueriesData({predicate:e=>e.queryKey[0]?._id===`getApiV1Projects`},e=>e?.filter(e=>!l.has(e.name)&&!l.has(e.id))),e.setQueriesData({predicate:e=>e.queryKey[0]?._id===`getApiV1Runs`},e=>e?.filter(e=>!u.has(e.projectId))),e.invalidateQueries({predicate:f})):e.invalidateQueries({predicate:h})}var T=3e5,E=18e5,D=3e4,O=6e4,k=3e4,A=2e3,j=3e4,M;function N(){let r=new t({defaultOptions:{queries:{staleTime:T,retry:1,refetchOnWindowFocus:!1}},mutationCache:new e({onError:(e,t,n,r)=>{r.meta?.skipGlobalErrorToast||g({title:e instanceof Error?e.message:`An unexpected error occurred`,tone:`negative`})}})});M?.();let i=new WeakSet,a=n.interceptors.request.use(e=>(i.add(e),e)),o=n.interceptors.response.use((e,t,n)=>(e.ok&&i.has(t)&&w(r,t,n.body),e));return M=()=>{n.interceptors.request.eject(a),n.interceptors.response.eject(o)},r}export{k as a,N as c,g as d,_ as f,A as i,x as l,v as m,O as n,E as o,y as p,j as r,D as s,T as t,S as u};
|