@canonry/canonry 7.88.0 → 7.89.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 -4
- package/assets/assets/{AgentSetupPage-DV06oPTd.js → AgentSetupPage-BU1supL8.js} +6 -6
- package/assets/assets/AuditHistoryPanel-D7or_J3j.js +1 -0
- package/assets/assets/{BacklinksPage-Dw0wgYlg.js → BacklinksPage-SOls3ew4.js} +1 -1
- package/assets/assets/{ChartPrimitives-4D5wgAn5.js → ChartPrimitives-Cs2iavxU.js} +1 -1
- package/assets/assets/{Hint-CfeZmZig.js → Hint-uoVNfr0U.js} +1 -1
- package/assets/assets/{HistoryPage-DsDx15am.js → HistoryPage-LNKtQ6a8.js} +1 -1
- package/assets/assets/{InfoTooltip-DrBIPuSU.js → InfoTooltip-CNLlIWeP.js} +1 -1
- package/assets/assets/MeasurementPropertyPage-CTZzlHWE.js +4 -0
- package/assets/assets/ProjectPage-D79zuY-M.js +11 -0
- package/assets/assets/{RunsPage-BggqKbOG.js → RunsPage-B8zUD2gr.js} +1 -1
- package/assets/assets/{SettingsPage-B7ns_ECx.js → SettingsPage-BOQgT_7N.js} +1 -1
- package/assets/assets/SiteHealthSection-G3_MShnD.js +2 -0
- package/assets/assets/{ToneBadge-B8hKcr8p.js → ToneBadge-DawS8vMp.js} +6 -6
- package/assets/assets/TrafficPage-DJUqxtrQ.js +40 -0
- package/assets/assets/TrafficSourceDetailPage-OVY_L73m.js +1 -0
- package/assets/assets/{account-context-pzV-boTi.js → account-context-DoI9S9qY.js} +1 -1
- package/assets/assets/agent-trust-copy-CZpfPr4M.js +1 -0
- package/assets/assets/{card-Mu_5i5fM.js → card-ClURYmZN.js} +1 -1
- package/assets/assets/{format-helpers-C8QYorwm.js → format-helpers-CscAFAMJ.js} +2 -2
- package/assets/assets/{index-BOUrrC9J.css → index-Bhpq6fUo.css} +1 -1
- package/assets/assets/index-y0Wx0ZWq.js +60 -0
- package/assets/assets/{query-client-CdG4DC3B.js → query-client-Dm_GqsTu.js} +1 -1
- package/assets/assets/react-query-BwhgbuS1.js +1 -0
- package/assets/assets/{react-sigma_core.esm.min-BfnfPCis.js → react-sigma_core.esm.min-6J0MSvMJ.js} +1 -1
- package/assets/assets/server-traffic-C-_D6pdo.js +1 -0
- package/assets/assets/{service-B85wjZQP.js → service-C7qDx_qB.js} +1 -1
- package/assets/assets/{vendor-lucide-CoTHJwai.js → vendor-lucide-Bo69m9KC.js} +1 -1
- package/assets/assets/{vendor-markdown-cQgSk2i0.js → vendor-markdown-BiRP51B0.js} +1 -1
- package/assets/assets/{vendor-radix-wS8sWIWE.js → vendor-radix-PQeN8gOe.js} +1 -1
- package/assets/assets/{vendor-recharts-AnNqECZW.js → vendor-recharts-CY6tH-r6.js} +1 -1
- package/assets/assets/{vendor-tanstack-q5SvZtcv.js → vendor-tanstack-tBjrfzKu.js} +1 -1
- package/assets/index.html +15 -15
- package/dist/{ads-4TAIMWZC.js → ads-XEW2LBKV.js} +3 -3
- package/dist/{agent-C7NKP2TO.js → agent-VYADMMPT.js} +7 -7
- package/dist/{agent-ask-EPH5FDM6.js → agent-ask-4G57GM3S.js} +3 -3
- package/dist/{agent-conversations-LPBBVRKK.js → agent-conversations-MRKRCXQI.js} +3 -3
- package/dist/{agent-journeys-MBORINJA.js → agent-journeys-WEUEYRMK.js} +3 -3
- package/dist/{agent-memory-NJIZO75R.js → agent-memory-YLAOXQQ6.js} +3 -3
- package/dist/{agent-providers-ZQVUOCX6.js → agent-providers-AWKQRJDZ.js} +3 -3
- package/dist/{agent-transcript-67HFY5GT.js → agent-transcript-HXYFVCUD.js} +3 -3
- package/dist/{analytics-TUO6BVB6.js → analytics-5G5G5OJU.js} +3 -3
- package/dist/{apply-V7A5O7YS.js → apply-FCKZG7A2.js} +3 -3
- package/dist/{backfill-PGKYR6NA.js → backfill-3CTZHCJS.js} +10 -10
- package/dist/{backlinks-5GGPQNR4.js → backlinks-Q53JT63C.js} +3 -3
- package/dist/{bing-PQOLIW2X.js → bing-FOY2UVIM.js} +34 -8
- package/dist/{bootstrap-IH3XX6PI.js → bootstrap-FXIT7LDW.js} +10 -10
- package/dist/{cdp-B3PFQ5RB.js → cdp-WWQW3LIZ.js} +7 -7
- package/dist/{chunk-FLJVGHTQ.js → chunk-2BZJ4W27.js} +3 -3
- package/dist/{chunk-DILCH7RL.js → chunk-3H5VURTU.js} +1 -1
- package/dist/{chunk-CYQCO5NY.js → chunk-3IC7PRTW.js} +1 -1
- package/dist/{chunk-N6AWKBLY.js → chunk-4INNOSWU.js} +5 -5
- package/dist/{chunk-FNQFM3TK.js → chunk-5GQ2AGWS.js} +3 -3
- package/dist/{chunk-TAQHHXBC.js → chunk-7522CQ2E.js} +4 -4
- package/dist/{chunk-5KDJJO2N.js → chunk-A6DKZ4KQ.js} +1 -1
- package/dist/{chunk-TL52ELES.js → chunk-DPKA5CWK.js} +1 -1
- package/dist/{chunk-FL76YWYN.js → chunk-DX46HM7S.js} +1 -1
- package/dist/{chunk-PBOIN52J.js → chunk-EWR25OVQ.js} +2 -2
- package/dist/{chunk-2KL2XHS6.js → chunk-GDEYX6E3.js} +4 -4
- package/dist/{chunk-E4DUE2PW.js → chunk-GSNKBXGN.js} +6 -6
- package/dist/{chunk-4VMHN5LL.js → chunk-HSOZSLIZ.js} +99 -30
- package/dist/{chunk-DVWAA3ES.js → chunk-IK3PYAQU.js} +21 -21
- package/dist/{chunk-UVXQQZB5.js → chunk-J7V7TYX7.js} +2 -2
- package/dist/{chunk-PZLEKWYA.js → chunk-JLBJEQPV.js} +1 -1
- package/dist/{chunk-6DIDDYG6.js → chunk-KAGMYJYG.js} +5 -5
- package/dist/{chunk-4T2VZPDG.js → chunk-MNLQY5WG.js} +2 -2
- package/dist/{chunk-D354CQ6T.js → chunk-MXGME7NG.js} +1 -1
- package/dist/{chunk-OKLDBQYW.js → chunk-RE24YYIY.js} +4 -4
- package/dist/{chunk-R7K24KY7.js → chunk-S7D2ELTC.js} +3 -3
- package/dist/{chunk-EGUJNHAZ.js → chunk-TCANF22P.js} +2 -2
- package/dist/{chunk-5WWEZ26Y.js → chunk-UIULMWJX.js} +2 -2
- package/dist/{chunk-O7OZVZWR.js → chunk-VBM6T5ZP.js} +21 -13
- package/dist/{chunk-IR3MYKIA.js → chunk-VL4AZGUA.js} +1 -1
- package/dist/{chunk-MEN27RAJ.js → chunk-WE6FSG7J.js} +1 -1
- package/dist/{chunk-EYSQMZ6L.js → chunk-WHN4RF2Y.js} +373 -369
- package/dist/{chunk-4A4X7VXE.js → chunk-WPTCWNA6.js} +2 -2
- package/dist/{chunk-LBZYPZAA.js → chunk-X6XFWQCE.js} +7 -7
- package/dist/{chunk-BDLC3DFM.js → chunk-Y35D3ZCH.js} +2 -2
- package/dist/{chunk-Q2SJRZA3.js → chunk-YKLYWVLL.js} +46 -2
- package/dist/{chunk-IPOYH4WE.js → chunk-YW2IQEWS.js} +1 -1
- package/dist/{chunk-ZQGWB7VJ.js → chunk-ZEWOPHTA.js} +1 -1
- package/dist/{chunk-MCQK432C.js → chunk-ZX4TZNP4.js} +1 -1
- package/dist/{chunk-EL4HRIID.js → chunk-ZYEWB5BK.js} +3 -3
- package/dist/{citations-J3IGPX4L.js → citations-ZZ6ODCGZ.js} +3 -3
- package/dist/{cli-catalog-2PCRGKPH.js → cli-catalog-HEX47BKL.js} +3 -3
- package/dist/{cli-commands-4MUJZCZO.js → cli-commands-6OLN355M.js} +7 -7
- package/dist/cli.js +13 -13
- package/dist/{competitor-X7Q2AZGL.js → competitor-6MRHORU2.js} +3 -3
- package/dist/{content-HTR3PJPX.js → content-S2UOGTLN.js} +3 -3
- package/dist/{dashboard-LSO57ZEE.js → dashboard-J4H3FVKH.js} +6 -6
- package/dist/{demo-P25N4SKK.js → demo-7PJJQMLO.js} +1 -1
- package/dist/{demo-server-6Z5XSHFS.js → demo-server-55I5LNNS.js} +12 -12
- package/dist/{discover-KE6TQPOC.js → discover-O4NFDHGP.js} +3 -3
- package/dist/{discover-eval-XKOYGCRW.js → discover-eval-PE2MW42B.js} +3 -3
- package/dist/{doctor-RL2J54I3.js → doctor-GT4MMJQJ.js} +3 -3
- package/dist/{evidence-CYJ4AKUZ.js → evidence-Z344KVJX.js} +3 -3
- package/dist/{export-cmd-2YM3PXCW.js → export-cmd-Z6WWLI6H.js} +3 -3
- package/dist/{ga-XAB66MJO.js → ga-SXIGAF5F.js} +3 -3
- package/dist/{gbp-CDGBLRVV.js → gbp-CSLWSEKF.js} +3 -3
- package/dist/{google-XHCUKQ3J.js → google-EAQJ46AR.js} +4 -4
- package/dist/{google-marketing-ZR6NTWEY.js → google-marketing-NVKB4NLG.js} +1 -1
- package/dist/{health-cmd-VS3EIFJD.js → health-cmd-6IYRMZS3.js} +3 -3
- package/dist/{history-YIGYYNZJ.js → history-KLZI7IKJ.js} +3 -3
- package/dist/index.d.ts +14 -14
- package/dist/index.js +25 -25
- package/dist/{init-ST3BXHQF.js → init-LFLCM6KJ.js} +12 -12
- package/dist/{insights-KZS6TYYL.js → insights-C7NN64E2.js} +3 -3
- package/dist/intelligence-service-ENI35JFR.js +16 -0
- package/dist/{journeys-USOPWGW5.js → journeys-C34YDOM6.js} +3 -3
- package/dist/{keys-XY7LSM3S.js → keys-4RDLFHXO.js} +3 -3
- package/dist/{keyword-PKBFHHF5.js → keyword-BZEJEYAG.js} +3 -3
- package/dist/{logs-PROW5TQJ.js → logs-5FPZRSZM.js} +3 -3
- package/dist/{mcp-OQGC62QU.js → mcp-574UA5Y3.js} +4 -4
- package/dist/mcp.js +9 -9
- package/dist/{measurement-plan-AI4NNBTO.js → measurement-plan-2H4KHD2Y.js} +5 -5
- package/dist/{notify-6HRPNJZ5.js → notify-TFXL4CSH.js} +3 -3
- package/dist/{organic-evidence-IXCSUGGY.js → organic-evidence-R55KSYFN.js} +3 -3
- package/dist/{overview-2WS3CFHK.js → overview-NJTCLHAB.js} +4 -4
- package/dist/{project-ENUZG62V.js → project-PV36DZDG.js} +3 -3
- package/dist/{query-WE3ZWTIB.js → query-5SVITJ4K.js} +3 -3
- package/dist/{research-DZSD5UZ2.js → research-JSET5FNY.js} +3 -3
- package/dist/{results-export-JMUMYNUE.js → results-export-5EFMXTPG.js} +3 -3
- package/dist/{run-QXOO7CRK.js → run-NOSOG3YH.js} +4 -4
- package/dist/{schedule-3RJKGUDN.js → schedule-I3ACQC2C.js} +3 -3
- package/dist/{search-SGS4H7I4.js → search-EE53K7J5.js} +3 -3
- package/dist/{serve-T24QKEUY.js → serve-SDU77HVC.js} +26 -26
- package/dist/{session-HPH2A4AZ.js → session-FYZCUPVX.js} +13 -13
- package/dist/{settings-K44RK2TW.js → settings-CEI7EKPO.js} +3 -3
- package/dist/{skills-HGPPGBXG.js → skills-TRTFFZU3.js} +2 -2
- package/dist/{snapshot-FEHHQRY3.js → snapshot-2RXVTDTZ.js} +3 -3
- package/dist/{src-4PAYI7GE.js → src-DYJHW2HG.js} +2 -2
- package/dist/{status-L5HVFWTS.js → status-2VHBSIRY.js} +4 -4
- package/dist/{technical-aeo-Z43UCW6E.js → technical-aeo-3OMGT4ZT.js} +3 -3
- package/dist/{telemetry-D47SSSG7.js → telemetry-5F4EHGR2.js} +4 -4
- package/dist/{tools-WCWUY2ZJ.js → tools-C3IIMXBJ.js} +11 -11
- package/dist/{traffic-5KH62P43.js → traffic-S3VUYBG6.js} +5 -5
- package/dist/{trends-RMAXZKRO.js → trends-RQ4B2QWA.js} +3 -3
- package/dist/{users-WT54XNEI.js → users-T6OOG5YB.js} +3 -3
- package/dist/{visibility-stats-HU62U5MA.js → visibility-stats-2O24MQCV.js} +3 -3
- package/dist/{wordpress-BDAKQ4MU.js → wordpress-SDENOBFI.js} +3 -3
- package/package.json +1 -1
- package/assets/assets/AuditHistoryPanel-C1JnxBFK.js +0 -1
- package/assets/assets/MeasurementPropertyPage-Bkxt3QcY.js +0 -4
- package/assets/assets/ProjectPage-CzrD1lpf.js +0 -11
- package/assets/assets/SiteHealthSection-B2YibqCs.js +0 -2
- package/assets/assets/TrafficPage-DRTbgzKI.js +0 -40
- package/assets/assets/TrafficSourceDetailPage-sgLE2gdJ.js +0 -1
- package/assets/assets/agent-trust-copy-DBtiOpFu.js +0 -1
- package/assets/assets/extract-error-message-D_ptq0tW.js +0 -1
- package/assets/assets/index-fN5qDR8H.js +0 -60
- package/assets/assets/react-query-CxeygwoL.js +0 -1
- package/dist/intelligence-service-LCTP5BC7.js +0 -16
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{J as t,at as n,q as r,st as i,t as a,y as ee}from"./vendor-lucide-CoTHJwai.js";import{r as o}from"./vendor-markdown-cQgSk2i0.js";import{p as te,t as ne,u as re}from"./vendor-tanstack-q5SvZtcv.js";import{a as s,c as ie,d as c,f as ae,i as oe,m as se,n as ce,r as le}from"./vendor-recharts-AnNqECZW.js";import{Cr as l,r as ue,t as de,wt as fe,xr as u}from"./ToneBadge-B8hKcr8p.js";import{p as pe}from"./format-helpers-C8QYorwm.js";import{a as d,n as me,r as he,s as ge,t as _e}from"./ChartPrimitives-4D5wgAn5.js";import{t as f}from"./InfoTooltip-DrBIPuSU.js";import{t as p}from"./card-Mu_5i5fM.js";import{c as ve,d as ye,n as be,r as xe,s as Se}from"./extract-error-message-D_ptq0tW.js";import{r as Ce}from"./agent-trust-copy-DBtiOpFu.js";var m=e(i(),1),we=[{value:`all`,label:`All status`},{value:`2xx`,label:`2xx success`},{value:`3xx`,label:`3xx redirect`},{value:`4xx`,label:`4xx client error`},{value:`5xx`,label:`5xx server error`}],Te=[{value:`all`,label:`All claims`},{value:l.verified,label:`Verified`},{value:l.claimed_unverified,label:`Claimed unverified`},{value:l.unknown_ai_like,label:`Unknown AI-like`}];function h(e){return e===`all`?null:Number.parseInt(e[0],10)}function Ee(e){switch(e.kind){case u.crawler:case u[`ai-user-fetch`]:return e.botId;case u[`ai-referral`]:return e.product}}function g(e){switch(e.kind){case u.crawler:case u[`ai-user-fetch`]:return e.pathNormalized;case u[`ai-referral`]:return e.landingPathNormalized}}function _(e){switch(e.kind){case u.crawler:case u[`ai-user-fetch`]:return e.verificationStatus;case u[`ai-referral`]:return null}}function v(e,t){if(t===`hour`)return e;let n=new Date(e);return`${n.getFullYear()}-${String(n.getMonth()+1).padStart(2,`0`)}-${String(n.getDate()).padStart(2,`0`)}`}function De(e,t,n){let r=t.pathQuery.trim().toLowerCase(),i=h(t.statusClass);return e.filter(e=>!(t.selectedBucket&&v(e.tsHour,n)!==t.selectedBucket||t.identity&&Ee(e)!==t.identity||t.operator&&e.operator!==t.operator||r&&!g(e).toLowerCase().includes(r)||i!==null&&Math.floor(e.status/100)!==i||t.verification!==`all`&&_(e)!==t.verification))}function Oe(e,t){if(!e||typeof e!=`object`)return null;let n=e.activeTooltipIndex,r;if(typeof n==`number`)r=n;else if(typeof n==`string`&&n!==``)r=Number(n);else return null;return!Number.isInteger(r)||r<0||r>=t.length?null:t[r]?.bucket??null}var y=o(),b=[{value:60,label:`1h`,granularity:`hour`,fetchLimit:500},{value:360,label:`6h`,granularity:`hour`,fetchLimit:500},{value:1440,label:`24h`,granularity:`hour`,fetchLimit:500},{value:10080,label:`7d`,granularity:`hour`,fetchLimit:1e3},{value:43200,label:`30d`,granularity:`day`,fetchLimit:2e3},{value:129600,label:`90d`,granularity:`day`,fetchLimit:5e3}],x=b.find(e=>e.label===`24h`)??b[2],S=50,C=d[0],w=d[2],T=d[1],E=pe();function D(e){let t=new Date(e);return`${t.getMonth()+1}/${t.getDate()} ${String(t.getHours()).padStart(2,`0`)}:00`}function O(e){let t=new Date(`${e}T00:00:00`);return`${t.getMonth()+1}/${t.getDate()}`}function ke(e){if(!e)return`never`;let t=Date.now()-new Date(e).getTime(),n=Math.floor(t/6e4);if(n<1)return`just now`;if(n<60)return`${n}m ago`;let r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function k(e){return e.size===1?[...e][0]:`all`}function Ae({canGoBack:e,className:t}){let r=`inline-flex items-center gap-1`;return e?(0,y.jsxs)(`button`,{type:`button`,onClick:()=>{window.history.back()},className:`${r} ${t??``}`,children:[(0,y.jsx)(n,{className:`size-3`}),` Back`]}):(0,y.jsxs)(re,{to:`/traffic`,className:`${r} ${t??``}`,children:[(0,y.jsx)(n,{className:`size-3`}),` All sources`]})}function A(){let e=te({strict:!1}),n=e.projectName??``,i=ne(),a=e.sourceId??``,[o,re]=(0,m.useState)(x.value),[l,pe]=(0,m.useState)(()=>new Set([`crawler`,`ai-user-fetch`,`ai-referral`])),[d,h]=(0,m.useState)(null),[g,_]=(0,m.useState)(``),[v,D]=(0,m.useState)(``),[O,A]=(0,m.useState)(``),[P,F]=(0,m.useState)(`all`),[I,L]=(0,m.useState)(`all`),[Fe,R]=(0,m.useState)(1),[Ie,Le]=(0,m.useState)(null),[Re,ze]=(0,m.useState)(null),z=(0,m.useMemo)(()=>b.find(e=>e.value===o)??x,[o]),Be=(0,m.useMemo)(()=>k(l),[l]),B=ve(n||null,a||null),V=Se(n||null,{kind:Be,sourceId:a||void 0,sinceMinutes:o,limit:z.fetchLimit,granularity:z.granularity}),H=ye(n||null,a||null),U=B.data,W=V.data?.events??[],G=V.data?.totals,K=V.data?.eventRows,q=(0,m.useMemo)(()=>W.filter(e=>{switch(e.kind){case u.crawler:return l.has(`crawler`);case u[`ai-user-fetch`]:return l.has(`ai-user-fetch`);case u[`ai-referral`]:return l.has(`ai-referral`)}}),[W,l]),Ve=(0,m.useMemo)(()=>{let e=new Set;for(let t of W)e.add(Ee(t));return g&&e.add(g),[...e].sort((e,t)=>e.localeCompare(t))},[W,g]),He=(0,m.useMemo)(()=>{let e=new Set;for(let t of W)e.add(t.operator);return v&&e.add(v),[...e].sort((e,t)=>e.localeCompare(t))},[W,v]),J=(0,m.useMemo)(()=>De(q,{selectedBucket:d,identity:g,operator:v,pathQuery:O,statusClass:P,verification:I},z.granularity),[q,d,g,v,O,P,I,z.granularity]);(0,m.useEffect)(()=>{R(1)},[q,d,g,v,O,P,I]);let Y=Math.max(1,Math.ceil(J.length/S)),X=Math.min(Math.max(1,Fe),Y),Z=(X-1)*S,Ue=(0,m.useMemo)(()=>J.slice(Z,Z+S),[J,Z]),We=J.length>S,Ge=J.length===0?0:Z+1,Ke=Math.min(Z+S,J.length),qe=(0,m.useMemo)(()=>d?je(d,z.granularity):null,[d,z.granularity]),Q=(0,m.useMemo)(()=>Me(V.data?.series.points??[],z.granularity),[V.data?.series.points,z.granularity]),$=e=>{pe(t=>{let n=new Set(t);return n.has(e)?n.size>1&&n.delete(e):n.add(e),n})},Je=e=>{let t=Oe(e,Q);t&&h(e=>e===t?null:t)},Ye=()=>{h(null),_(``),D(``),A(``),F(`all`),L(`all`)},Xe=!!(d||g||v||O.trim()||P!==`all`||I!==`all`),Ze=async()=>{Le(null),ze(null);try{let e=await H.mutateAsync({sinceMinutes:60});ze(`Pulled ${e.pulledEvents} entries · ${e.crawlerHits} crawler · ${e.aiUserFetchHits} AI user fetch · ${e.aiUserFetchLikelyFakeHits} likely fake agent · ${e.aiReferralHits} AI referral · ${e.unknownHits} unknown`)}catch(e){Le(be(e))}};return!n||!a?(0,y.jsx)(`div`,{className:`page-container`,children:(0,y.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Missing project name or source id in URL.`})}):B.isLoading?(0,y.jsx)(`div`,{className:`page-container`,children:(0,y.jsx)(`p`,{className:`text-copy-14 text-muted`,children:`Loading source…`})}):B.isError||!U?(0,y.jsxs)(`div`,{className:`page-container`,children:[(0,y.jsx)(`p`,{className:`text-copy-14 text-negative`,children:`Could not load this source.`}),(0,y.jsx)(Ae,{canGoBack:i,className:`mt-2 text-label-12 text-secondary hover:text-strong`})]}):(0,y.jsxs)(`div`,{className:`page-container space-y-8`,children:[(0,y.jsxs)(`div`,{className:`page-header`,children:[(0,y.jsxs)(`div`,{className:`page-header-left`,children:[(0,y.jsx)(Ae,{canGoBack:i,className:`text-label-12 text-muted hover:text-strong`}),(0,y.jsx)(`h1`,{className:`page-title mt-2`,children:U.displayName}),(0,y.jsxs)(`p`,{className:`page-subtitle`,children:[U.sourceType,` source for `,n]})]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsx)(de,{tone:xe(U.status),children:U.status}),!fe()&&(0,y.jsxs)(ue,{type:`button`,variant:`outline`,size:`sm`,disabled:H.isPending,onClick:()=>void Ze(),children:[(0,y.jsx)(ee,{className:`size-3.5 ${H.isPending?`animate-spin`:``}`}),H.isPending?`Syncing…`:`Sync now`]})]})]}),Ie?(0,y.jsx)(`div`,{className:`rounded-md border border-negative-800/50 bg-negative-950/30 px-3 py-2 text-label-14 text-negative-200`,children:Ie}):null,Re?(0,y.jsx)(`div`,{className:`rounded-md border border-positive-800/50 bg-positive-950/30 px-3 py-2 text-label-14 text-positive-200`,children:Re}):null,(0,y.jsxs)(`section`,{"aria-labelledby":`traffic-24h-heading`,children:[(0,y.jsx)(`h2`,{id:`traffic-24h-heading`,className:`mb-3 text-heading-14 text-heading`,children:`Last 24 hours`}),(0,y.jsxs)(`div`,{className:`grid grid-cols-1 divide-y divide-default border-y border-default sm:grid-cols-3 sm:divide-x sm:divide-y-0`,children:[(0,y.jsx)(N,{label:`Content crawls`,value:U.totals24h.crawlerContentHits,tooltip:`Content and document paths only. Excludes sitemap ${U.totals24h.crawlerSegments.sitemap.toLocaleString(`en-US`)}, robots ${U.totals24h.crawlerSegments.robots.toLocaleString(`en-US`)}, assets ${U.totals24h.crawlerSegments.asset.toLocaleString(`en-US`)}, and ${U.totals24h.crawlerSegments.other.toLocaleString(`en-US`)} other requests such as feeds, API paths, or downloads. Total crawler hits: ${U.totals24h.crawlerHits.toLocaleString(`en-US`)}.`}),(0,y.jsx)(N,{label:`AI user fetches`,value:U.totals24h.aiUserFetchHits,tooltip:`Requests from AI assistants fetching a page for a person (ChatGPT-User, Claude-User, Perplexity-User and others). ${Ce(U.totals24h.aiUserFetchLikelyFakeHits)}`}),(0,y.jsx)(N,{label:`AI referral sessions`,value:U.totals24h.aiReferralLandedHits,tooltip:`Browser click-throughs from AI surfaces, identified by Referer or UTM evidence. Excludes ${U.totals24h.aiReferralRedirectedHits.toLocaleString(`en-US`)} request(s) answered with a redirect: a hop is not an arrival. Total including hops: ${U.totals24h.aiReferralHits.toLocaleString(`en-US`)}.`})]})]}),(0,y.jsxs)(`section`,{children:[(0,y.jsx)(`p`,{className:`eyebrow mb-4`,children:`Latest sync run`}),U.latestRun?(0,y.jsxs)(p,{className:`p-4 text-label-14`,children:[(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-6 gap-y-1.5`,children:[(0,y.jsxs)(`span`,{className:`text-heading`,children:[`Status: `,(0,y.jsx)(`span`,{className:`text-label-14-strong`,children:U.latestRun.status})]}),(0,y.jsxs)(`span`,{className:`text-muted`,children:[`Started: `,ke(U.latestRun.startedAt)]}),U.latestRun.finishedAt?(0,y.jsxs)(`span`,{className:`text-muted`,children:[`Finished: `,ke(U.latestRun.finishedAt)]}):null]}),(0,y.jsxs)(`details`,{className:`mt-3`,children:[(0,y.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`Run details`}),(0,y.jsx)(`code`,{className:`mt-2 block text-label-12 text-muted`,children:U.latestRun.runId})]}),U.latestRun.error?(0,y.jsx)(`p`,{className:`mt-2 rounded border border-negative-900/40 bg-negative-950/30 px-3 py-2 text-copy-13 text-negative`,children:U.latestRun.error}):null]}):(0,y.jsx)(p,{className:`px-4 py-3 text-label-14 text-muted`,children:fe()?`No traffic-sync runs recorded yet.`:`No traffic-sync runs recorded yet. Hit "Sync now" above to create one.`})]}),(0,y.jsxs)(`section`,{children:[(0,y.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-end justify-between gap-x-4 gap-y-3`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`p`,{className:`text-label-12-strong normal-case text-muted`,children:`Events`}),(0,y.jsx)(`h2`,{className:`mt-1 text-heading-16 text-primary`,children:z.granularity===`day`?`Daily rollups`:`Hourly rollups`}),G?(0,y.jsxs)(`p`,{className:`mt-1.5 text-copy-13 text-muted`,children:[G.crawlerContentHits.toLocaleString(`en-US`),` content crawls ·`,` `,G.crawlerInfraHits.toLocaleString(`en-US`),` infra (sitemap/robots/assets) ·`,` `,G.aiUserFetchHits.toLocaleString(`en-US`),` AI user fetches ·`,` `,G.aiReferralLandedHits.toLocaleString(`en-US`),` AI referral sessions · last `,z.label,` · `,E]}):null]}),(0,y.jsx)(`div`,{className:`inline-flex rounded-md border border-base p-0.5`,role:`toolbar`,"aria-label":`Window`,children:b.map(e=>(0,y.jsx)(`button`,{type:`button`,className:`rounded px-2.5 py-1 text-button-14 ${o===e.value?`bg-bg-elevated text-heading`:`text-secondary hover:text-strong`}`,"aria-pressed":o===e.value,onClick:()=>{re(e.value),h(null)},children:e.label},e.value))})]}),(0,y.jsxs)(p,{className:`p-4`,children:[(0,y.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,role:`toolbar`,"aria-label":`Series`,children:[(0,y.jsx)(M,{label:`Crawler`,color:C,count:G?.crawlerHits??0,active:l.has(`crawler`),onToggle:()=>$(`crawler`)}),(0,y.jsx)(M,{label:`AI user fetches`,color:w,count:G?.aiUserFetchHits??0,active:l.has(`ai-user-fetch`),onToggle:()=>$(`ai-user-fetch`)}),(0,y.jsx)(M,{label:`AI referral sessions`,color:T,count:G?.aiReferralLandedHits??0,active:l.has(`ai-referral`),onToggle:()=>$(`ai-referral`)})]}),V.isError?(0,y.jsxs)(`p`,{className:`py-12 text-center text-copy-13 text-negative-400`,children:[`Failed to load events: `,V.error instanceof Error?V.error.message:`Unknown error`]}):V.isLoading?(0,y.jsx)(`p`,{className:`py-12 text-center text-copy-13 text-muted`,children:`Loading events…`}):Q.length===0?(0,y.jsx)(`p`,{className:`py-12 text-center text-copy-13 text-muted`,children:`No events in this window.`}):(0,y.jsx)(`div`,{className:`h-72`,children:(0,y.jsx)(se,{children:(0,y.jsxs)(ce,{data:Q,margin:{top:4,right:4,bottom:0,left:0},onClick:Je,style:{cursor:`pointer`},children:[(0,y.jsx)(ie,{stroke:he,strokeDasharray:`3 3`}),(0,y.jsx)(oe,{dataKey:`label`,tick:me,stroke:_e,interval:`preserveStartEnd`,minTickGap:z.granularity===`day`?24:32}),(0,y.jsx)(le,{tick:me,stroke:_e,allowDecimals:!1}),(0,y.jsx)(ae,{...ge}),l.has(`crawler`)?(0,y.jsx)(s,{dataKey:`crawler`,name:`Crawler`,fill:C,stackId:`a`,children:Q.map(e=>(0,y.jsx)(c,{fillOpacity:d&&d!==e.bucket?.25:1},e.bucket))}):null,l.has(`ai-user-fetch`)?(0,y.jsx)(s,{dataKey:`aiUserFetch`,name:`AI user fetch`,fill:w,stackId:`a`,children:Q.map(e=>(0,y.jsx)(c,{fillOpacity:d&&d!==e.bucket?.25:1},e.bucket))}):null,l.has(`ai-referral`)?(0,y.jsx)(s,{dataKey:`aiReferral`,name:`AI referral`,fill:T,stackId:`a`,children:Q.map(e=>(0,y.jsx)(c,{fillOpacity:d&&d!==e.bucket?.25:1},e.bucket))}):null]})})})]})]}),(0,y.jsxs)(`section`,{children:[(0,y.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-end justify-between gap-x-4 gap-y-2`,children:[(0,y.jsxs)(`div`,{children:[(0,y.jsx)(`p`,{className:`text-label-12-strong normal-case text-muted`,children:`Event rows`}),(0,y.jsxs)(`p`,{className:`mt-1 text-copy-13 text-muted`,children:[`Showing `,(0,y.jsx)(`span`,{className:`tabular-nums text-neutral`,children:J.length.toLocaleString(`en-US`)}),` of`,` `,(0,y.jsx)(`span`,{className:`tabular-nums text-muted`,children:q.length.toLocaleString(`en-US`)}),` `,K?.truncated?`loaded events`:`events`,K?.truncated?(0,y.jsxs)(y.Fragment,{children:[` `,`· loaded `,(0,y.jsx)(`span`,{className:`tabular-nums text-neutral`,children:K.returned.toLocaleString(`en-US`)}),` of`,` `,(0,y.jsx)(`span`,{className:`tabular-nums text-muted`,children:K.total.toLocaleString(`en-US`)}),` rows`]}):null,` `,`· `,E]})]}),(0,y.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,y.jsxs)(`span`,{className:`inline-flex items-center text-secondary`,children:[(0,y.jsxs)(`select`,{"aria-label":`Filter by identity`,value:g,onChange:e=>_(e.target.value),className:`rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-12 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,y.jsx)(`option`,{value:``,children:`All identities`}),Ve.map(e=>(0,y.jsx)(`option`,{value:e,children:e},e))]}),(0,y.jsx)(f,{text:`The specific bot or AI product making the request (e.g., GPTBot, ChatGPT-User, Perplexity). One operator usually runs several identities.`})]}),(0,y.jsxs)(`span`,{className:`inline-flex items-center text-secondary`,children:[(0,y.jsxs)(`select`,{"aria-label":`Filter by operator`,value:v,onChange:e=>D(e.target.value),className:`rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-12 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:[(0,y.jsx)(`option`,{value:``,children:`All operators`}),He.map(e=>(0,y.jsx)(`option`,{value:e,children:e},e))]}),(0,y.jsx)(f,{text:`The company that runs the bot or product (e.g., OpenAI, Anthropic, Perplexity). Filtering by operator includes every identity under that company.`})]}),(0,y.jsx)(`select`,{"aria-label":`Filter by HTTP status class`,value:P,onChange:e=>F(e.target.value),className:`rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-12 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:we.map(e=>(0,y.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,y.jsx)(`select`,{"aria-label":`Filter by verification claim`,value:I,onChange:e=>L(e.target.value),className:`rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-12 text-strong focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`,children:Te.map(e=>(0,y.jsx)(`option`,{value:e.value,children:e.label},e.value))}),(0,y.jsx)(`input`,{type:`search`,"aria-label":`Filter by path`,placeholder:`path contains…`,value:O,onChange:e=>A(e.target.value),className:`w-44 rounded-md border border-base bg-bg px-2.5 py-1.5 text-label-12 text-strong placeholder:text-faint focus:outline-none focus-visible:ring-1 focus-visible:ring-mono-600`})]})]}),Xe?(0,y.jsxs)(`div`,{className:`mb-3 flex flex-wrap items-center gap-2`,children:[qe?(0,y.jsx)(j,{label:`Bucket: ${qe}`,onClear:()=>h(null)}):null,g?(0,y.jsx)(j,{label:`Identity: ${g}`,onClear:()=>_(``)}):null,v?(0,y.jsx)(j,{label:`Operator: ${v}`,onClear:()=>D(``)}):null,O.trim()?(0,y.jsx)(j,{label:`Path: ${O.trim()}`,onClear:()=>A(``)}):null,P===`all`?null:(0,y.jsx)(j,{label:`Status: ${P}`,onClear:()=>F(`all`)}),I===`all`?null:(0,y.jsx)(j,{label:`Claim: ${Ne(I)}`,onClear:()=>L(`all`)}),(0,y.jsx)(`button`,{type:`button`,onClick:Ye,className:`text-button-14 text-muted underline-offset-4 hover:text-strong hover:underline`,children:`Clear all`})]}):null,(0,y.jsx)(Pe,{events:Ue,truncated:K?.truncated??!1}),We?(0,y.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-x-4 gap-y-2 text-label-12 text-secondary`,children:[(0,y.jsxs)(`p`,{className:`tabular-nums`,children:[`Showing `,(0,y.jsx)(`span`,{className:`text-neutral`,children:Ge.toLocaleString(`en-US`)}),`–`,(0,y.jsx)(`span`,{className:`text-neutral`,children:Ke.toLocaleString(`en-US`)}),` of`,` `,(0,y.jsx)(`span`,{className:`text-neutral`,children:J.length.toLocaleString(`en-US`)}),` events`]}),(0,y.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,y.jsxs)(`button`,{type:`button`,onClick:()=>R(e=>Math.max(1,e-1)),disabled:X<=1,"aria-label":`Previous page`,className:`inline-flex items-center gap-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-strong transition hover:border-strong hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-base disabled:hover:text-strong`,children:[(0,y.jsx)(t,{className:`size-3.5`}),`Prev`]}),(0,y.jsxs)(`span`,{className:`tabular-nums`,children:[`Page `,(0,y.jsx)(`span`,{className:`text-strong`,children:X}),` of`,` `,(0,y.jsx)(`span`,{className:`text-strong`,children:Y})]}),(0,y.jsxs)(`button`,{type:`button`,onClick:()=>R(e=>Math.min(Y,e+1)),disabled:X>=Y,"aria-label":`Next page`,className:`inline-flex items-center gap-1 rounded-md border border-base bg-bg px-2.5 py-1.5 text-strong transition hover:border-strong hover:text-primary disabled:cursor-not-allowed disabled:opacity-40 disabled:hover:border-base disabled:hover:text-strong`,children:[`Next`,(0,y.jsx)(r,{className:`size-3.5`})]})]})]}):null]}),(0,y.jsxs)(`details`,{className:`border-t border-default pt-4`,children:[(0,y.jsx)(`summary`,{className:`cursor-pointer text-label-14 text-secondary hover:text-strong`,children:`How traffic is classified`}),(0,y.jsx)(`p`,{className:`mt-2 max-w-3xl text-copy-14 text-secondary`,children:`Crawler requests, AI user fetches, and referrals are recorded separately. Filters expose the underlying evidence.`})]})]})}function je(e,t){return t===`day`?O(e):D(e)}function Me(e,t){return e.map(e=>({bucket:e.bucket,label:je(e.bucket,t),crawler:e.crawlerHits,aiUserFetch:e.aiUserFetchHits,aiReferral:e.aiReferralLandedHits}))}function Ne(e){return Te.find(t=>t.value===e)?.label??e}function j({label:e,onClear:t}){return(0,y.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 rounded border border-strong bg-surface-inset px-2.5 py-1 text-label-14 text-strong`,children:[e,(0,y.jsx)(`button`,{type:`button`,onClick:t,"aria-label":`Clear ${e}`,className:`rounded p-0.5 text-secondary hover:bg-mono-700/60 hover:text-heading`,children:(0,y.jsx)(a,{className:`size-3`})})]})}function M({label:e,color:t,count:n,active:r,onToggle:i}){return(0,y.jsxs)(`button`,{type:`button`,onClick:i,"aria-pressed":r,className:`inline-flex items-center gap-2 rounded border px-3 py-1.5 text-button-14 transition ${r?`border-strong bg-surface-inset text-heading`:`border-base bg-transparent text-muted hover:text-neutral`}`,children:[(0,y.jsx)(`span`,{"aria-hidden":`true`,className:`flex size-3 items-center justify-center rounded-sm border transition-opacity ${r?`border-transparent opacity-100`:`border-strong opacity-60`}`,style:r?{backgroundColor:t}:void 0,children:r?`✓`:``}),(0,y.jsx)(`span`,{children:e}),(0,y.jsx)(`span`,{className:`tabular-nums ${r?`text-secondary`:`text-faint`}`,children:n.toLocaleString(`en-US`)})]})}function N({label:e,value:t,tooltip:n}){return(0,y.jsxs)(`div`,{className:`px-4 py-3`,children:[(0,y.jsxs)(`p`,{className:`flex items-center gap-1 text-copy-14 text-secondary`,children:[e,n?(0,y.jsx)(f,{text:n}):null]}),(0,y.jsx)(`p`,{className:`mt-1 text-copy-24-strong tabular-nums text-heading`,children:t.toLocaleString(`en-US`)})]})}function P(e){switch(e){case u.crawler:return`Crawler`;case u[`ai-user-fetch`]:return`AI hit`;case u[`ai-referral`]:return`AI referral`}}function F(e){switch(e.kind){case u.crawler:case u[`ai-user-fetch`]:return e.botId;case u[`ai-referral`]:return e.product}}function I(e){switch(e.kind){case u.crawler:case u[`ai-user-fetch`]:return`${e.verificationStatus} · HTTP ${e.status}`;case u[`ai-referral`]:return`${e.evidenceType} · ${e.sourceDomain}`}}function Pe({events:e,truncated:t=!1}){return e.length===0?(0,y.jsx)(p,{className:`p-6 text-center text-label-14 text-muted`,children:t?`No matches in the rows loaded so far. More rows exist beyond the load limit, so narrow the time window to search them.`:`No event rows match the current filters.`}):(0,y.jsx)(`div`,{className:`material-base overflow-hidden`,children:(0,y.jsxs)(`table`,{className:`w-full text-label-14`,children:[(0,y.jsx)(`thead`,{className:`bg-bg-elevated/50 text-label-12-strong normal-case text-muted`,children:(0,y.jsxs)(`tr`,{children:[(0,y.jsx)(`th`,{className:`px-4 py-2 text-left`,children:`Hour`}),(0,y.jsx)(`th`,{className:`px-4 py-2 text-left`,children:`Kind`}),(0,y.jsx)(`th`,{className:`px-4 py-2 text-left`,children:`Identity`}),(0,y.jsx)(`th`,{className:`px-4 py-2 text-left`,children:`Evidence / status`}),(0,y.jsx)(`th`,{className:`px-4 py-2 text-left`,children:`Path`}),(0,y.jsx)(`th`,{className:`px-4 py-2 text-right`,children:(0,y.jsxs)(`span`,{className:`inline-flex items-center`,children:[`Hits`,(0,y.jsx)(f,{text:`Each row is one hour-bucket, not one request. Hits is the number of requests in that hour that shared the same identity, path, HTTP status, and verification claim.`})]})})]})}),(0,y.jsx)(`tbody`,{className:`divide-y divide-mono-800/60`,children:e.map((e,t)=>(0,y.jsxs)(`tr`,{className:`hover:bg-bg-elevated/40 transition-colors`,children:[(0,y.jsx)(`td`,{className:`px-4 py-2 text-label-12-mono text-neutral`,children:D(e.tsHour)}),(0,y.jsx)(`td`,{className:`px-4 py-2 text-neutral`,children:P(e.kind)}),(0,y.jsxs)(`td`,{className:`px-4 py-2 text-heading`,children:[F(e),(0,y.jsx)(`span`,{className:`ml-2 text-label-12 text-muted`,children:e.operator})]}),(0,y.jsx)(`td`,{className:`px-4 py-2 text-neutral`,children:I(e)}),(0,y.jsx)(`td`,{className:`px-4 py-2 truncate text-label-12-mono text-neutral`,children:g(e)}),(0,y.jsx)(`td`,{className:`px-4 py-2 text-right tabular-nums text-heading`,children:e.hits})]},`${e.kind}:${e.tsHour}:${t}`))})]})})}export{Pe as EventsTable,N as TrafficKpi,A as TrafficSourceDetailPage,k as trafficFetchKind};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{br as e,yr as t}from"./ToneBadge-B8hKcr8p.js";var n={[t.verified]:`Verified`,[t.likely_real]:`Likely real`,[t.unknown]:`Unknown`};function r(t,n){switch(t){case e[`ip-in-published-list`]:return`IP on ${n}'s published list`;case e[`ip-outside-published-list`]:return`IP not on ${n}'s published list`;case e[`no-ip`]:return`Source gives no IP to check`;case e[`no-published-list`]:return`${n} publishes no IP list`;case e[`documented-user-agent`]:return`User agent matches ${n}'s published one`;case e[`unusual-user-agent`]:return`User agent differs from ${n}'s published one`;case e[`scanner-path`]:return`Asked for a secret or admin file`;case e[`scanner-burst`]:return`Same IP asked for secret files`}}var i=`Bots posing as an AI assistant, such as scanners looking for secret files.`;function a(e){return e===0?`No fake agent requests in this period.`:`Excludes ${e.toLocaleString(`en-US`)} fake ${e===1?`request`:`requests`} from bots posing as an AI assistant.`}export{r as i,n,a as r,i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{st as t}from"./vendor-lucide-CoTHJwai.js";import{E as n,_ as r,b as i}from"./vendor-tanstack-q5SvZtcv.js";import{C as a,S as o,Sr as s,mt as c,pn as l,x as u}from"./ToneBadge-B8hKcr8p.js";import{l as d,s as f}from"./query-client-CdG4DC3B.js";import{$t as p,Qt as m,cn as h,en as g,tn as _}from"./react-query-CxeygwoL.js";var v=e(t(),1);function y(e){switch(e){case s.connected:return`positive`;case s.paused:return`caution`;case s.error:return`negative`;case s.archived:return`neutral`}}function b(e){let t={};return e.kind&&e.kind!==`all`&&(t.kind=e.kind),e.sourceId&&(t.sourceId=e.sourceId),e.sinceMinutes!==void 0&&(t.since=new Date(Date.now()-e.sinceMinutes*6e4).toISOString()),e.limit!==void 0&&(t.limit=String(e.limit)),e.granularity!==void 0&&(t.granularity=e.granularity),t}function x(e){d(e,`traffic`)}function S(e){return i({...g({client:c,path:{name:e??``}}),enabled:!!e,staleTime:f})}function C(e){return i({..._({client:c,path:{name:e??``}}),enabled:!!e,staleTime:f})}function w(e,t){return i({...p({client:c,path:{name:e??``,id:t??``}}),enabled:!!(e&&t),staleTime:f})}function T(e,t){let n=(0,v.useMemo)(()=>b(t),[t.kind,t.sourceId,t.sinceMinutes,t.limit,t.granularity]);return i({...m({client:c,path:{name:e??``},query:n}),enabled:!!e,staleTime:f})}function E(e){let t=n();return r({mutationFn:t=>{if(!e)throw Error(`Project is required to connect a Cloud Run source`);return u(e,t)},onSuccess:()=>{e&&x(t)}})}function D(e){let t=n();return r({mutationFn:t=>{if(!e)throw Error(`Project is required to connect a WordPress source`);return a(e,t)},onSuccess:()=>{e&&x(t)}})}function O(e){let t=n();return r({mutationFn:t=>{if(!e)throw Error(`Project is required to connect a Vercel source`);return o(e,t)},onSuccess:()=>{e&&x(t)}})}function k(e,t){let i=n();return r({mutationFn:n=>{if(!e||!t)throw Error(`Project and sourceId are required to sync`);return l(e,t,n??void 0)},onSuccess:()=>{e&&(x(i),i.invalidateQueries({queryKey:h({client:c})}))}})}function A(e){return typeof e==`object`&&!!e}function j(e){if(e instanceof Error){let t=e;return{message:e.message,code:typeof t.code==`string`?t.code:void 0,details:A(t.details)?t.details:void 0}}if(A(e)){let t=e.error;if(A(t))return{message:typeof t.message==`string`?t.message:`Request failed`,code:typeof t.code==`string`?t.code:void 0,details:A(t.details)?t.details:void 0};if(typeof t==`string`)return{message:t};let n=e.message;if(typeof n==`string`)return{message:n}}return typeof e==`string`?{message:e}:{message:String(e)}}function M(e){return j(e).message}export{O as a,w as c,k as d,E as i,S as l,M as n,D as o,y as r,T as s,j as t,C as u};
|