@ainyc/canonry 5.4.0 → 5.5.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.
Files changed (32) hide show
  1. package/assets/assets/{AuditHistoryPanel-DNSskBJN.js → AuditHistoryPanel-BMGGxHpw.js} +1 -1
  2. package/assets/assets/{BacklinksPage-COtLVzT8.js → BacklinksPage-CS3wJSWe.js} +1 -1
  3. package/assets/assets/{HistoryPage-D9e6cGrq.js → HistoryPage-Ba9ezeuP.js} +1 -1
  4. package/assets/assets/{MeasurementPropertyPage-BSs4ba4N.js → MeasurementPropertyPage-Y9eseEv0.js} +1 -1
  5. package/assets/assets/{ProjectPage-BbpGgwgd.js → ProjectPage-Cl1N9Dcw.js} +1 -1
  6. package/assets/assets/{RunRow-DRjXGgeI.js → RunRow-DbUtgNUI.js} +1 -1
  7. package/assets/assets/{RunsPage-BXyqLNMQ.js → RunsPage-BBuFIYuS.js} +1 -1
  8. package/assets/assets/{SettingsPage-DKmzGwx3.js → SettingsPage-DNnR33D-.js} +1 -1
  9. package/assets/assets/{SiteHealthSection-DuSY6jzY.js → SiteHealthSection-Cf4KHWp0.js} +3 -3
  10. package/assets/assets/TrafficPage-DSQjaZM9.js +40 -0
  11. package/assets/assets/{TrafficSourceDetailPage-Bw8PCVl9.js → TrafficSourceDetailPage-C-Pg69TW.js} +1 -1
  12. package/assets/assets/{extract-error-message-rTGTNN_D.js → extract-error-message-DNLmL0ID.js} +1 -1
  13. package/assets/assets/{index-CVK43vax.js → index-BCCrbno5.js} +10 -10
  14. package/assets/assets/{index-Hmnj0RO5.css → index-gQj7x9RX.css} +1 -1
  15. package/assets/assets/{react-sigma_core.esm.min-Xwhtf0bv.js → react-sigma_core.esm.min-DkItaBPY.js} +1 -1
  16. package/assets/assets/{v2-overview-adapter-BgGH6oLq.js → v2-overview-adapter-DKBMcYBh.js} +1 -1
  17. package/assets/assets/vendor-lucide-CneDbhOr.js +1 -0
  18. package/assets/index.html +3 -3
  19. package/dist/{chunk-SLOTTXIL.js → chunk-75ECQ77U.js} +6 -6
  20. package/dist/{chunk-2P52FD5B.js → chunk-BL3FMPSM.js} +1 -1
  21. package/dist/{chunk-L3FG66O7.js → chunk-DX4CZNNU.js} +2 -2
  22. package/dist/{chunk-67OM5KEH.js → chunk-KKDXJWDK.js} +1 -1
  23. package/dist/{chunk-P5YYRGFS.js → chunk-LQAOGFFK.js} +2 -2
  24. package/dist/cli.js +7 -7
  25. package/dist/{demo-server-6QU77ZMV.js → demo-server-BSH6SSWD.js} +3 -3
  26. package/dist/index.js +5 -5
  27. package/dist/{intelligence-service-PHCK6A35.js → intelligence-service-CU7W5AVC.js} +2 -2
  28. package/dist/mcp.js +3 -3
  29. package/package.json +9 -9
  30. package/assets/assets/TrafficPage-Bc9NGm4L.js +0 -1
  31. package/assets/assets/vendor-lucide-CBIL4Nkq.js +0 -1
  32. /package/dist/{chunk-Z6RA7LWY.js → chunk-REQEWYNF.js} +0 -0
@@ -1,4 +1,4 @@
1
- import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-DuSY6jzY.js";import"./index-CVK43vax.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-D-cUuLZo.js";import"./vendor-lucide-CBIL4Nkq.js";import"./vendor-markdown-B-Oq2NYq.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-Bxa_vFmq.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{g as Bt,t as S,r as C}from"./vendor-tanstack-ZXXkndVj.js";import{e as Ht,G as Wt}from"./SiteHealthSection-Cf4KHWp0.js";import"./index-BCCrbno5.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-D-cUuLZo.js";import"./vendor-lucide-CneDbhOr.js";import"./vendor-markdown-B-Oq2NYq.js";import"./vendor-yaml-GWJz5H2G.js";import"./ChartPrimitives-Bxa_vFmq.js";function Vt(r,n){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var e=i.call(r,n);if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(r)}function ae(r){var n=Vt(r,"string");return typeof n=="symbol"?n:n+""}function A(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")}function He(r,n){for(var i=0;i<n.length;i++){var e=n[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(r,ae(e.key),e)}}function L(r,n,i){return n&&He(r.prototype,n),i&&He(r,i),Object.defineProperty(r,"prototype",{writable:!1}),r}function Q(r){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(n){return n.__proto__||Object.getPrototypeOf(n)},Q(r)}function yt(){try{var r=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{}return(yt=function(){return!!r})()}function jt(r){if(r===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return r}function Zt(r,n){if(n&&(typeof n=="object"||typeof n=="function"))return n;if(n!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return jt(r)}function I(r,n,i){return n=Q(n),Zt(r,yt()?Reflect.construct(n,i||[],Q(r).constructor):n.apply(r,i))}function xe(r,n){return xe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,e){return i.__proto__=e,i},xe(r,n)}function G(r,n){if(typeof n!="function"&&n!==null)throw new TypeError("Super expression must either be null or a function");r.prototype=Object.create(n&&n.prototype,{constructor:{value:r,writable:!0,configurable:!0}}),Object.defineProperty(r,"prototype",{writable:!1}),n&&xe(r,n)}function qt(r){if(Array.isArray(r))return r}function Yt(r,n){var i=r==null?null:typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(i!=null){var e,t,a,o,s=[],l=!0,h=!1;try{if(a=(i=i.call(r)).next,n===0){if(Object(i)!==i)return;l=!1}else for(;!(l=(e=a.call(i)).done)&&(s.push(e.value),s.length!==n);l=!0);}catch(u){h=!0,t=u}finally{try{if(!l&&i.return!=null&&(o=i.return(),Object(o)!==o))return}finally{if(h)throw t}}return s}}function Se(r,n){(n==null||n>r.length)&&(n=r.length);for(var i=0,e=Array(n);i<n;i++)e[i]=r[i];return e}function Tt(r,n){if(r){if(typeof r=="string")return Se(r,n);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Se(r,n):void 0}}function Xt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ee(r,n){return qt(r)||Yt(r,n)||Tt(r,n)||Xt()}var pe={black:"#000000",silver:"#C0C0C0",gray:"#808080",grey:"#808080",white:"#FFFFFF",maroon:"#800000",red:"#FF0000",purple:"#800080",fuchsia:"#FF00FF",green:"#008000",lime:"#00FF00",olive:"#808000",yellow:"#FFFF00",navy:"#000080",blue:"#0000FF",teal:"#008080",aqua:"#00FFFF",darkblue:"#00008B",mediumblue:"#0000CD",darkgreen:"#006400",darkcyan:"#008B8B",deepskyblue:"#00BFFF",darkturquoise:"#00CED1",mediumspringgreen:"#00FA9A",springgreen:"#00FF7F",cyan:"#00FFFF",midnightblue:"#191970",dodgerblue:"#1E90FF",lightseagreen:"#20B2AA",forestgreen:"#228B22",seagreen:"#2E8B57",darkslategray:"#2F4F4F",darkslategrey:"#2F4F4F",limegreen:"#32CD32",mediumseagreen:"#3CB371",turquoise:"#40E0D0",royalblue:"#4169E1",steelblue:"#4682B4",darkslateblue:"#483D8B",mediumturquoise:"#48D1CC",indigo:"#4B0082",darkolivegreen:"#556B2F",cadetblue:"#5F9EA0",cornflowerblue:"#6495ED",rebeccapurple:"#663399",mediumaquamarine:"#66CDAA",dimgray:"#696969",dimgrey:"#696969",slateblue:"#6A5ACD",olivedrab:"#6B8E23",slategray:"#708090",slategrey:"#708090",lightslategray:"#778899",lightslategrey:"#778899",mediumslateblue:"#7B68EE",lawngreen:"#7CFC00",chartreuse:"#7FFF00",aquamarine:"#7FFFD4",skyblue:"#87CEEB",lightskyblue:"#87CEFA",blueviolet:"#8A2BE2",darkred:"#8B0000",darkmagenta:"#8B008B",saddlebrown:"#8B4513",darkseagreen:"#8FBC8F",lightgreen:"#90EE90",mediumpurple:"#9370DB",darkviolet:"#9400D3",palegreen:"#98FB98",darkorchid:"#9932CC",yellowgreen:"#9ACD32",sienna:"#A0522D",brown:"#A52A2A",darkgray:"#A9A9A9",darkgrey:"#A9A9A9",lightblue:"#ADD8E6",greenyellow:"#ADFF2F",paleturquoise:"#AFEEEE",lightsteelblue:"#B0C4DE",powderblue:"#B0E0E6",firebrick:"#B22222",darkgoldenrod:"#B8860B",mediumorchid:"#BA55D3",rosybrown:"#BC8F8F",darkkhaki:"#BDB76B",mediumvioletred:"#C71585",indianred:"#CD5C5C",peru:"#CD853F",chocolate:"#D2691E",tan:"#D2B48C",lightgray:"#D3D3D3",lightgrey:"#D3D3D3",thistle:"#D8BFD8",orchid:"#DA70D6",goldenrod:"#DAA520",palevioletred:"#DB7093",crimson:"#DC143C",gainsboro:"#DCDCDC",plum:"#DDA0DD",burlywood:"#DEB887",lightcyan:"#E0FFFF",lavender:"#E6E6FA",darksalmon:"#E9967A",violet:"#EE82EE",palegoldenrod:"#EEE8AA",lightcoral:"#F08080",khaki:"#F0E68C",aliceblue:"#F0F8FF",honeydew:"#F0FFF0",azure:"#F0FFFF",sandybrown:"#F4A460",wheat:"#F5DEB3",beige:"#F5F5DC",whitesmoke:"#F5F5F5",mintcream:"#F5FFFA",ghostwhite:"#F8F8FF",salmon:"#FA8072",antiquewhite:"#FAEBD7",linen:"#FAF0E6",lightgoldenrodyellow:"#FAFAD2",oldlace:"#FDF5E6",magenta:"#FF00FF",deeppink:"#FF1493",orangered:"#FF4500",tomato:"#FF6347",hotpink:"#FF69B4",coral:"#FF7F50",darkorange:"#FF8C00",lightsalmon:"#FFA07A",orange:"#FFA500",lightpink:"#FFB6C1",pink:"#FFC0CB",gold:"#FFD700",peachpuff:"#FFDAB9",navajowhite:"#FFDEAD",moccasin:"#FFE4B5",bisque:"#FFE4C4",mistyrose:"#FFE4E1",blanchedalmond:"#FFEBCD",papayawhip:"#FFEFD5",lavenderblush:"#FFF0F5",seashell:"#FFF5EE",cornsilk:"#FFF8DC",lemonchiffon:"#FFFACD",floralwhite:"#FFFAF0",snow:"#FFFAFA",lightyellow:"#FFFFE0",ivory:"#FFFFF0"},Ct=new Int8Array(4),be=new Int32Array(Ct.buffer,0,1),$t=new Float32Array(Ct.buffer,0,1),Kt=/^\s*rgba?\s*\(/,Jt=/^\s*rgba?\s*\(\s*([0-9]*)\s*,\s*([0-9]*)\s*,\s*([0-9]*)(?:\s*,\s*(.*)?)?\)\s*$/;function Qt(r){var n=0,i=0,e=0,t=1;if(r[0]==="#")r.length===4?(n=parseInt(r.charAt(1)+r.charAt(1),16),i=parseInt(r.charAt(2)+r.charAt(2),16),e=parseInt(r.charAt(3)+r.charAt(3),16)):(n=parseInt(r.charAt(1)+r.charAt(2),16),i=parseInt(r.charAt(3)+r.charAt(4),16),e=parseInt(r.charAt(5)+r.charAt(6),16)),r.length===9&&(t=parseInt(r.charAt(7)+r.charAt(8),16)/255);else if(Kt.test(r)){var a=r.match(Jt);a&&(n=+a[1],i=+a[2],e=+a[3],a[4]&&(t=+a[4]))}return{r:n,g:i,b:e,a:t}}var J={};for(var le in pe)J[le]=oe(pe[le]),J[pe[le]]=J[le];function Rt(r,n,i,e,t){return be[0]=e<<24|i<<16|n<<8|r,be[0]=be[0]&4278190079,$t[0]}function oe(r){if(r=r.toLowerCase(),typeof J[r]<"u")return J[r];var n=Qt(r),i=n.r,e=n.g,t=n.b,a=n.a;a=a*255|0;var o=Rt(i,e,t,a);return J[r]=o,o}var Ee={};function _t(r){if(typeof Ee[r]<"u")return Ee[r];var n=(r&16711680)>>>16,i=(r&65280)>>>8,e=r&255,t=255,a=Rt(n,i,e,t);return Ee[r]=a,a}function We(r,n,i,e){return i+(n<<8)+(r<<16)}function Ve(r,n,i,e,t,a){var o=Math.floor(i/a*t),s=Math.floor(r.drawingBufferHeight/a-e/a*t),l=new Uint8Array(4);r.bindFramebuffer(r.FRAMEBUFFER,n),r.readPixels(o,s,1,1,r.RGBA,r.UNSIGNED_BYTE,l);var h=ee(l,4),u=h[0],d=h[1],f=h[2],g=h[3];return[u,d,f,g]}function c(r,n,i){return(n=ae(n))in r?Object.defineProperty(r,n,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[n]=i,r}function je(r,n){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})),i.push.apply(i,e)}return i}function b(r){for(var n=1;n<arguments.length;n++){var i=arguments[n]!=null?arguments[n]:{};n%2?je(Object(i),!0).forEach(function(e){c(r,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):je(Object(i)).forEach(function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(i,e))})}return r}function ei(r,n){for(;!{}.hasOwnProperty.call(r,n)&&(r=Q(r))!==null;);return r}function Ae(){return Ae=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(r,n,i){var e=ei(r,n);if(e){var t=Object.getOwnPropertyDescriptor(e,n);return t.get?t.get.call(arguments.length<3?r:i):t.value}},Ae.apply(null,arguments)}function wt(r,n,i,e){var t=Ae(Q(r.prototype),n,i);return typeof t=="function"?function(a){return t.apply(i,a)}:t}function ti(r){return r.normalized?1:r.size}function ye(r){var n=0;return r.forEach(function(i){return n+=ti(i)}),n}function xt(r,n,i){var e=r==="VERTEX"?n.VERTEX_SHADER:n.FRAGMENT_SHADER,t=n.createShader(e);if(t===null)throw new Error("loadShader: error while creating the shader");n.shaderSource(t,i),n.compileShader(t);var a=n.getShaderParameter(t,n.COMPILE_STATUS);if(!a){var o=n.getShaderInfoLog(t);throw n.deleteShader(t),new Error(`loadShader: error while compiling the shader:
3
3
  `.concat(o,`
4
4
  `).concat(i))}return t}function ii(r,n){return xt("VERTEX",r,n)}function ri(r,n){return xt("FRAGMENT",r,n)}function ni(r,n){var i=r.createProgram();if(i===null)throw new Error("loadProgram: error while creating the program.");var e,t;for(e=0,t=n.length;e<t;e++)r.attachShader(i,n[e]);r.linkProgram(i);var a=r.getProgramParameter(i,r.LINK_STATUS);if(!a){var o=r.getProgramInfoLog(i);throw r.deleteProgram(i),new Error("loadProgram: error while linking the program: ".concat(o))}return i}function Ze(r){var n=r.gl,i=r.buffer,e=r.program,t=r.vertexShader,a=r.fragmentShader;n.deleteShader(t),n.deleteShader(a),n.deleteProgram(e),n.deleteBuffer(i)}var qe=`#define PICKING_MODE
@@ -1 +1 @@
1
- import{r as k,j as o}from"./vendor-tanstack-ZXXkndVj.js";import{C as oe,Y as le,f as Z}from"./vendor-lucide-CBIL4Nkq.js";import{z as ue,B as ce}from"./index-CVK43vax.js";import{M as de}from"./vendor-markdown-B-Oq2NYq.js";const U={queryClass:"all"},me=["all","non-brand","branded"];function ne(e){return typeof e=="string"&&me.includes(e)}function pe(e){const r=ne(e.class)?e.class:U.queryClass,s=e.scope;if(typeof s!="string"||s==="all"||s.length===0)return{scope:"all",queryClass:r};const n=s.startsWith("group:")?s.slice(6):"";return n?{scope:"group",groupKey:n,queryClass:r}:{scope:"all",queryClass:r}}function Ie(e,r){return r===null||e===null?!1:e!==r}function $e(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===U.queryClass?void 0:e.queryClass}}function ge(e,r){if(!(typeof e!="string"||e.length>16384||!r))try{const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return;const n=s,m=d=>typeof d=="string"&&d.trim().length>0,i=d=>d===null||m(d);return n.queryKey!==r||!m(n.provider)||n.queryClass!=="branded"&&n.queryClass!=="non-brand"&&n.queryClass!=="unknown"||!i(n.model)||!i(n.location)||!i(n.runId)||n.revision!==null&&(typeof n.revision!="number"||!Number.isSafeInteger(n.revision)||n.revision<=0)?void 0:{queryKey:r,queryClass:n.queryClass,provider:n.provider,model:n.model,location:n.location,runId:n.runId,revision:n.revision}}catch{return}}function Ae(e){const r=y=>typeof e[y]=="string"&&e[y]!==""?e[y]:void 0,s=pe({scope:r("scope"),class:r("class")}),n=r("measurementScope")??(s.scope==="group"?"group":"project"),m=r("measurementScopeKey")??(r("measurementScope")?void 0:s.groupKey),i=r("queryClass")??r("class"),d={measurementScope:m&&(n==="group"||n==="market"||n==="property")?n:"project",queryClass:i==="unknown"||ne(i)?i:U.queryClass};d.measurementScope!=="project"&&(d.measurementScopeKey=m);for(const[y,K]of[["measurementMarketKey","marketKey"],["measurementProvider","provider"],["measurementModel","model"],["measurementLocation","location"],["measurementFrom","from"],["measurementTo","to"],["measurementRunId","measurementRunId"],["measurementQueryKey","queryKey"]]){const b=r(y);b!==void 0&&(d[K]=b)}const l=Number(e.measurementRevision);Number.isSafeInteger(l)&&l>0&&(d.revision=l);const f=ge(e.measurementAnswer,d.queryKey);return f&&(d.answer=f),d}function Ee(e,r){const s={...e,...r};return["measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId"].some(n=>n in r)?(s.measurementQueryKey=r.measurementQueryKey,s.measurementAnswer=r.measurementAnswer):"measurementQueryKey"in r&&!("measurementAnswer"in r)&&(s.measurementAnswer=void 0),"measurementScope"in r&&(s.scope=void 0,"measurementMarketKey"in r||(s.measurementMarketKey=void 0),s.measurementQueryKey=void 0,r.measurementScope==="project"&&(s.measurementScopeKey=void 0)),"queryClass"in r&&(s.class=void 0),s}function we(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}const X="min-h-11 w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",Q="flex min-h-11 w-full items-center justify-between gap-3 rounded px-2 text-left text-sm text-primary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",A=e=>e.kind==="project"?"Whole site":e.label,E={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},fe=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,ee=e=>`${e} ${e===1?"property":"properties"}`;function Re({options:e,selected:r,onSelect:s,marketKey:n,label:m="Measurement scope",allowGroupSelect:i=!0}){const d=[...e].sort((t,c)=>t.label.localeCompare(c.label,void 0,{numeric:!0})||t.id.localeCompare(c.id)),[l,f]=k.useState(""),[y,K]=k.useState([]),[b,C]=k.useState(!1),x=k.useRef(null),v=k.useRef(null),q=k.useId(),a=d.filter(t=>t.kind==="group"),g=new Map(a.map(t=>[t.id,t])),u=g.get(y.at(-1)??""),S=g.get(y.at(-2)??""),h=l.trim().toLocaleLowerCase(),se=a.filter(t=>!t.parentGroupIds?.some(c=>g.has(c))),_=d.filter(t=>t.kind==="property"),L=t=>(t.parentGroupIds??[]).map(c=>g.get(c)?.label).filter(Boolean).join(" · "),w=t=>`${A(t)} ${L(t)}`.toLocaleLowerCase().includes(h),D=t=>{const c=[...t.parentGroupIds??[]],p=new Set;for(;c.length;){const j=c.pop();if(j===u?.id)return!0;p.has(j)||(p.add(j),c.push(...g.get(j)?.parentGroupIds??[]))}return!1},M=(b?[]:u?a.filter(t=>h?D(t):t.parentGroupIds?.includes(u.id)):h?a:se).filter(w),I=d.find(t=>t.kind==="market"&&t.id===(n??(r.kind==="market"?r.id:void 0))),F=u&&I&&(u.marketKeys?.includes(I.id)||I.parentGroupIds?.includes(u.id))?I.id:void 0,V=i?F??fe(u):void 0,O=(u?_.filter(t=>t.parentGroupIds?.includes(u.id)&&(!V||t.marketKeys?.includes(V))):h||b||a.length===0?_:[]).filter(w),W=d.filter(t=>t.kind!=="market"||b||!i&&!u&&!h&&a.length>0||i&&u?.marketKeys?.length===1&&!h?!1:(u?h?D(t):t.parentGroupIds?.includes(u.id):h||!t.parentGroupIds?.some(p=>g.has(p)))&&w(t)),H=u||b?[]:d.filter(t=>t.kind==="project"&&w(t));k.useEffect(()=>{const t=c=>{x.current?.open&&c.target instanceof Node&&!x.current.contains(c.target)&&(x.current.open=!1)};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[]);const ae=t=>{x.current&&(x.current.open=!1,x.current.querySelector("summary")?.focus());const c=i?t.kind==="property"?V:t.kind==="group"&&t.id===u?.id?F:void 0:void 0;c?s(t,c):s(t)},R=t=>{const c=[];let p=g.get(t.parentGroupIds?.[0]??"");for(;p&&!c.includes(p.id)&&p.id!==t.id;)c.unshift(p.id),p=g.get(p.parentGroupIds?.[0]??"");return[...c,t.id]},ie=()=>{const t=r.kind==="group"?g.get(r.id):void 0,c=g.get(I?.parentGroupIds?.[0]??""),p=(r.parentGroupIds??[]).flatMap($=>{const P=g.get($);return P?[R(P)]:[]}),j=p.find($=>$.at(-1)===u?.id)??p.sort(($,P)=>P.length-$.length)[0]??[],J=c?R(c):r.marketKeys?.length?[]:j;K(t?R(t):J),C(r.kind==="property"&&J.length===0&&a.length>0),f("")},z=t=>{K(R(t)),C(!1),f(""),v.current?.focus()},T=(t,c=A(t))=>o.jsxs("div",{className:"flex items-stretch",children:[o.jsxs("button",{type:"button",className:Q,"aria-label":t.kind==="group"&&!i?E.browse(A(t)):E.select(A(t)),"aria-current":r.kind===t.kind&&r.id===t.id?"true":void 0,onClick:()=>t.kind==="group"&&!i?z(t):ae(t),children:[o.jsxs("span",{className:"min-w-0 break-words",children:[c,h&&L(t)?o.jsx("span",{className:"block text-[13px] text-secondary",children:L(t)}):null]}),o.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:t.kind==="market"?i?"Query context":"Market":t.kind==="property"?"Property":ee(t.targetCount)})]}),i&&t.kind==="group"&&t.id!==u?.id&&d.some(p=>p.parentGroupIds?.includes(t.id))?o.jsx("button",{type:"button","aria-label":E.browse(t.label),title:`Browse ${t.label}`,className:"flex min-h-11 min-w-11 items-center justify-center rounded text-secondary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",onClick:()=>z(t),children:o.jsx(Z,{size:18,"aria-hidden":"true"})}):null]},`${t.kind}:${t.id}`),G=(t,c)=>c.length>0?o.jsxs("section",{"aria-label":t,className:"mt-2",children:[o.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:t}),c.map(p=>T(p))]}):null,Y=(t,c,p)=>c.length>0?o.jsxs("details",{open:p,className:"mt-2 border-y border-default",children:[o.jsxs("summary",{className:"min-h-11 cursor-pointer px-2 py-3 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[t," (",c.length,")"]}),c.map(j=>T(j))]},`${u?.id??"root"}:${t}`):null;return o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{id:`${q}-label`,className:"mb-1 block text-sm font-medium text-heading",children:m}),o.jsxs("details",{ref:x,className:"relative",onToggle:t=>{t.target===t.currentTarget&&t.currentTarget.open&&v.current?.focus()},onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.currentTarget.open=!1,t.currentTarget.querySelector("summary")?.focus())},children:[o.jsxs("summary",{id:`${q}-value`,"aria-labelledby":`${q}-label ${q}-value`,className:`${X} visibility-scope-trigger`,onClick:()=>{x.current?.open||ie()},children:[`${A(r)}${r.kind==="group"?` · ${ee(r.targetCount)}`:r.kind==="property"?` · ${d.find(t=>t.kind==="market"&&t.id===n)?.label??(r.marketKeys?.length?E.allMarkets:"Property")}`:r.kind==="market"?" · Market":""}`,o.jsx(oe,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),o.jsxs("div",{className:"visibility-scope-menu",children:[u||b?o.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[o.jsx("button",{type:"button",className:Q,"aria-label":`Back to ${S?.label??"all groups"}`,onClick:()=>{K(y.slice(0,-1)),C(!1),f(""),v.current?.focus()},children:o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(le,{size:16,"aria-hidden":"true"}),S?.label??"All groups"]})}),o.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:u?.label??"All properties"})]}):null,o.jsx("input",{ref:v,type:"search","aria-label":"Search scopes",className:X,placeholder:u?"Search within this group":b?"Search properties":"Search groups or properties",value:l,onChange:t=>f(t.target.value)}),o.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[i&&u&&!h?T(u,"All properties in this group"):null,H.map(t=>T(t)),u&&!h?Y("Subgroups",M,!0):G(u?"Subgroups":"Groups",M),h?G("Properties",O):Y(u&&M.length>0?"All properties":"Properties",O,!u||M.length===0),G("Markets",W),!u&&!b&&!h&&a.length>0&&_.length>0?o.jsxs("button",{type:"button",className:`${Q} mt-2 border-t border-default`,"aria-label":E.browseAll,onClick:()=>{C(!0),v.current?.focus()},children:[o.jsx("span",{children:"All properties"}),o.jsx(Z,{size:18,"aria-hidden":"true"})]}):null,h&&M.length+O.length+W.length+H.length===0?o.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}const Te="Sources",B={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function ye({headingLevel:e}){return r=>{const s=[],n=i=>{i.type==="heading"&&i.depth&&s.push(i),i.children?.forEach(n)};n(r);const m=s.reduce((i,d)=>Math.min(i,d.depth),6);for(const i of s){const d=i.depth-m;i.depth=Math.min(6,e+d),i.data={...i.data,hProperties:{...i.data?.hProperties,"data-answer-heading-level":d+1}}}}}function he({answer:e}){const[r,s]=k.useState("idle"),n=k.useRef(!1),m=async()=>{if(!n.current){n.current=!0,s("copying");try{await navigator.clipboard.writeText(e),s("copied")}catch{s("failed")}finally{n.current=!1}}};return o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[o.jsx(ce,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":r==="copying","aria-busy":r==="copying",onClick:()=>{m()},children:r==="copying"?B.copying:B.copy}),o.jsx("span",{role:"status",className:"text-sm text-secondary",children:r==="copied"?B.copied:r==="failed"?B.failed:""})]})}function Pe({children:e,headingLevel:r=4,copyable:s=!1}){return o.jsxs("div",{className:"answer-markdown",children:[o.jsx(de,{remarkPlugins:[[ye,{headingLevel:r}]],components:{p:({children:n})=>o.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:n}),ul:({children:n})=>o.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:n}),ol:({children:n,start:m})=>o.jsx("ol",{start:m,className:"mb-3 ml-5 list-decimal space-y-1",children:n}),pre:({children:n})=>o.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:n}),a:({children:n,href:m})=>{const i=ue(m);return i?o.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:n}):o.jsx("span",{children:n})},img:({alt:n})=>o.jsx("span",{children:n})},children:e}),s&&e.trim()?o.jsx(he,{answer:e},e):null]})}function Be(e){const r=e[0];return r?e.every(s=>s.mode===r.mode&&s.scope.kind===r.scope.kind&&s.scope.key===r.scope.key&&s.queryClass===r.queryClass&&s.measurement.displayedRunId===r.measurement.displayedRunId):!0}function N(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator}}function be(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function xe(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function ke(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function te(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function Ce(e,r,s){const n=new Map;if(!r)return n;const m=new Map(e.usageEdges.map(l=>[te(l),l.targetKey])),i=new Map(e.assignments.map(l=>[`${l.targetKey}:${l.queryId}`,l.queryClass])),d=new Map(e.usageEdges.map(l=>[te(l),i.get(`${l.targetKey}:${l.queryId}`)]));for(const l of r.evidence){if(s&&d.get(l.usageEdgeId)!==s)continue;const f=m.get(l.usageEdgeId);if(!f)continue;const y=n.get(f)??[];y.push({id:`${l.observationId}:${l.expectedSlotId}:${l.usageEdgeId}:${l.sourceUrl}`,kind:xe(l.classification),query:l.queryText,provider:l.provider,location:l.location,url:l.sourceUrl,tone:ke(l.classification),historical:l.historical||l.bridged}),n.set(f,y)}return n}function ve(e){if(e.flags>0)return{label:"Review",tone:"caution"};const r=[e.mentionCoverage,e.citationCoverage].filter(s=>s.state==="unavailable").map(s=>s.reason);return r.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:r.includes("plan_v1")?{label:"Update setup",tone:"caution"}:r.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:r.includes("no_population")?{label:"No queries",tone:"neutral"}:r.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function Se(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function je(e){if(!e)return"";const r=new Date(e);return Number.isFinite(r.getTime())?r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function re(e){const r=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${r} flagged ${r===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function _e({overview:e,activePlan:r,report:s,reportState:n=s?"ready":"loading",sort:m}){if(r.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const i=r.plan,d=new Map(i.targets.map(a=>[a.stableKey,a])),l=new Map(i.querySnapshots.map(a=>[a.queryId,a.queryText])),f=new Map;for(const a of i.assignments){if(e.queryClass!=="all"&&a.queryClass!==e.queryClass)continue;const g=l.get(a.queryId);if(!g)continue;const u=f.get(a.targetKey)??new Set;u.add(g),f.set(a.targetKey,u)}const y=s?.revision===r.revision&&s.run?.id===e.measurement.displayedRunId?s:null,K=e.measurement.displayedRunId===void 0||y?"ready":n==="error"||s!=null?"error":"loading",b=Ce(i,y,e.queryClass==="all"?void 0:e.queryClass),C=new Map;for(const a of i.groups)for(const g of a.targetKeys)C.has(g)||C.set(g,a.label);const x=e.properties.items.map(a=>{const g=d.get(a.targetKey),u=b.get(a.targetKey)??[];return{id:a.targetKey,name:a.label,mentionCoverage:N(a.mentionCoverage),citationCoverage:N(a.citationCoverage),status:ve(a),providers:a.providers?.map(S=>({provider:S.provider,mentionCoverage:N(S.mentionCoverage),citationCoverage:N(S.citationCoverage)})),market:C.get(a.targetKey),assignedQueries:[...f.get(a.targetKey)??[]],urls:g?.urlMatchers.map(be)??[],evidence:u,evidenceState:K,historical:u.some(S=>S.historical)}}),v=e.namedShareOfVoice?.entries.map(a=>({name:a.label,coverage:{numerator:a.credits,denominator:e.namedShareOfVoice.denominator}})),q=e.properties.items.flatMap(a=>a.flags>0?[{id:`property:${a.targetKey}`,property:a.label,summary:`${a.flags} ${a.flags===1?"result needs":"results need"} review.`,tone:"caution",count:a.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:Se(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:je(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:N(e.metrics.propertiesMentioned),mentionCoverage:N(e.metrics.mentionCoverage),citationCoverage:N(e.metrics.citationCoverage)},properties:x,...v?{shareOfVoice:v}:{}},propertyTotal:e.properties.totalEstimate??x.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...m?{sort:m}:{}},availableGroups:i.groups.map(a=>({id:a.stableKey,label:a.label})),...re(e)?{nextActionText:re(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:q}}export{Pe as A,E as M,Re as V,Te as a,Ee as b,pe as c,Be as d,_e as e,we as f,be as g,$e as m,Ae as p,Ie as s};
1
+ import{r as k,j as o}from"./vendor-tanstack-ZXXkndVj.js";import{C as oe,_ as le,f as Z}from"./vendor-lucide-CneDbhOr.js";import{z as ue,B as ce}from"./index-BCCrbno5.js";import{M as de}from"./vendor-markdown-B-Oq2NYq.js";const U={queryClass:"all"},me=["all","non-brand","branded"];function ne(e){return typeof e=="string"&&me.includes(e)}function pe(e){const r=ne(e.class)?e.class:U.queryClass,s=e.scope;if(typeof s!="string"||s==="all"||s.length===0)return{scope:"all",queryClass:r};const n=s.startsWith("group:")?s.slice(6):"";return n?{scope:"group",groupKey:n,queryClass:r}:{scope:"all",queryClass:r}}function Ie(e,r){return r===null||e===null?!1:e!==r}function $e(e){return{scope:e.scope==="group"&&e.groupKey?`group:${e.groupKey}`:void 0,class:e.queryClass===U.queryClass?void 0:e.queryClass}}function ge(e,r){if(!(typeof e!="string"||e.length>16384||!r))try{const s=JSON.parse(e);if(typeof s!="object"||s===null||Array.isArray(s))return;const n=s,m=d=>typeof d=="string"&&d.trim().length>0,i=d=>d===null||m(d);return n.queryKey!==r||!m(n.provider)||n.queryClass!=="branded"&&n.queryClass!=="non-brand"&&n.queryClass!=="unknown"||!i(n.model)||!i(n.location)||!i(n.runId)||n.revision!==null&&(typeof n.revision!="number"||!Number.isSafeInteger(n.revision)||n.revision<=0)?void 0:{queryKey:r,queryClass:n.queryClass,provider:n.provider,model:n.model,location:n.location,runId:n.runId,revision:n.revision}}catch{return}}function Ae(e){const r=y=>typeof e[y]=="string"&&e[y]!==""?e[y]:void 0,s=pe({scope:r("scope"),class:r("class")}),n=r("measurementScope")??(s.scope==="group"?"group":"project"),m=r("measurementScopeKey")??(r("measurementScope")?void 0:s.groupKey),i=r("queryClass")??r("class"),d={measurementScope:m&&(n==="group"||n==="market"||n==="property")?n:"project",queryClass:i==="unknown"||ne(i)?i:U.queryClass};d.measurementScope!=="project"&&(d.measurementScopeKey=m);for(const[y,K]of[["measurementMarketKey","marketKey"],["measurementProvider","provider"],["measurementModel","model"],["measurementLocation","location"],["measurementFrom","from"],["measurementTo","to"],["measurementRunId","measurementRunId"],["measurementQueryKey","queryKey"]]){const b=r(y);b!==void 0&&(d[K]=b)}const l=Number(e.measurementRevision);Number.isSafeInteger(l)&&l>0&&(d.revision=l);const f=ge(e.measurementAnswer,d.queryKey);return f&&(d.answer=f),d}function Ee(e,r){const s={...e,...r};return["measurementScope","measurementScopeKey","measurementMarketKey","queryClass","measurementProvider","measurementModel","measurementLocation","measurementFrom","measurementTo","measurementRevision","measurementRunId"].some(n=>n in r)?(s.measurementQueryKey=r.measurementQueryKey,s.measurementAnswer=r.measurementAnswer):"measurementQueryKey"in r&&!("measurementAnswer"in r)&&(s.measurementAnswer=void 0),"measurementScope"in r&&(s.scope=void 0,"measurementMarketKey"in r||(s.measurementMarketKey=void 0),s.measurementQueryKey=void 0,r.measurementScope==="project"&&(s.measurementScopeKey=void 0)),"queryClass"in r&&(s.class=void 0),s}function we(e){return{...e,onboarding:void 0,manageQueries:void 0,siteHealthRunId:void 0,siteScan:void 0,setupProject:void 0}}const X="min-h-11 w-full rounded-md border border-default bg-surface px-3 py-2 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",Q="flex min-h-11 w-full items-center justify-between gap-3 rounded px-2 text-left text-sm text-primary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",A=e=>e.kind==="project"?"Whole site":e.label,E={allMarkets:"All markets",browse:e=>`Browse ${e}`,select:e=>`Select ${e}`,browseAll:"Browse all properties"},fe=e=>e?.kind==="group"&&e.marketKeys?.length===1?e.marketKeys[0]:void 0,ee=e=>`${e} ${e===1?"property":"properties"}`;function Re({options:e,selected:r,onSelect:s,marketKey:n,label:m="Measurement scope",allowGroupSelect:i=!0}){const d=[...e].sort((t,c)=>t.label.localeCompare(c.label,void 0,{numeric:!0})||t.id.localeCompare(c.id)),[l,f]=k.useState(""),[y,K]=k.useState([]),[b,C]=k.useState(!1),x=k.useRef(null),v=k.useRef(null),q=k.useId(),a=d.filter(t=>t.kind==="group"),g=new Map(a.map(t=>[t.id,t])),u=g.get(y.at(-1)??""),S=g.get(y.at(-2)??""),h=l.trim().toLocaleLowerCase(),se=a.filter(t=>!t.parentGroupIds?.some(c=>g.has(c))),B=d.filter(t=>t.kind==="property"),L=t=>(t.parentGroupIds??[]).map(c=>g.get(c)?.label).filter(Boolean).join(" · "),w=t=>`${A(t)} ${L(t)}`.toLocaleLowerCase().includes(h),D=t=>{const c=[...t.parentGroupIds??[]],p=new Set;for(;c.length;){const j=c.pop();if(j===u?.id)return!0;p.has(j)||(p.add(j),c.push(...g.get(j)?.parentGroupIds??[]))}return!1},M=(b?[]:u?a.filter(t=>h?D(t):t.parentGroupIds?.includes(u.id)):h?a:se).filter(w),I=d.find(t=>t.kind==="market"&&t.id===(n??(r.kind==="market"?r.id:void 0))),F=u&&I&&(u.marketKeys?.includes(I.id)||I.parentGroupIds?.includes(u.id))?I.id:void 0,V=i?F??fe(u):void 0,O=(u?B.filter(t=>t.parentGroupIds?.includes(u.id)&&(!V||t.marketKeys?.includes(V))):h||b||a.length===0?B:[]).filter(w),W=d.filter(t=>t.kind!=="market"||b||!i&&!u&&!h&&a.length>0||i&&u?.marketKeys?.length===1&&!h?!1:(u?h?D(t):t.parentGroupIds?.includes(u.id):h||!t.parentGroupIds?.some(p=>g.has(p)))&&w(t)),H=u||b?[]:d.filter(t=>t.kind==="project"&&w(t));k.useEffect(()=>{const t=c=>{x.current?.open&&c.target instanceof Node&&!x.current.contains(c.target)&&(x.current.open=!1)};return document.addEventListener("pointerdown",t),()=>document.removeEventListener("pointerdown",t)},[]);const ae=t=>{x.current&&(x.current.open=!1,x.current.querySelector("summary")?.focus());const c=i?t.kind==="property"?V:t.kind==="group"&&t.id===u?.id?F:void 0:void 0;c?s(t,c):s(t)},R=t=>{const c=[];let p=g.get(t.parentGroupIds?.[0]??"");for(;p&&!c.includes(p.id)&&p.id!==t.id;)c.unshift(p.id),p=g.get(p.parentGroupIds?.[0]??"");return[...c,t.id]},ie=()=>{const t=r.kind==="group"?g.get(r.id):void 0,c=g.get(I?.parentGroupIds?.[0]??""),p=(r.parentGroupIds??[]).flatMap($=>{const P=g.get($);return P?[R(P)]:[]}),j=p.find($=>$.at(-1)===u?.id)??p.sort(($,P)=>P.length-$.length)[0]??[],J=c?R(c):r.marketKeys?.length?[]:j;K(t?R(t):J),C(r.kind==="property"&&J.length===0&&a.length>0),f("")},z=t=>{K(R(t)),C(!1),f(""),v.current?.focus()},T=(t,c=A(t))=>o.jsxs("div",{className:"flex items-stretch",children:[o.jsxs("button",{type:"button",className:Q,"aria-label":t.kind==="group"&&!i?E.browse(A(t)):E.select(A(t)),"aria-current":r.kind===t.kind&&r.id===t.id?"true":void 0,onClick:()=>t.kind==="group"&&!i?z(t):ae(t),children:[o.jsxs("span",{className:"min-w-0 break-words",children:[c,h&&L(t)?o.jsx("span",{className:"block text-[13px] text-secondary",children:L(t)}):null]}),o.jsx("span",{className:"shrink-0 text-right text-[13px] text-secondary",children:t.kind==="market"?i?"Query context":"Market":t.kind==="property"?"Property":ee(t.targetCount)})]}),i&&t.kind==="group"&&t.id!==u?.id&&d.some(p=>p.parentGroupIds?.includes(t.id))?o.jsx("button",{type:"button","aria-label":E.browse(t.label),title:`Browse ${t.label}`,className:"flex min-h-11 min-w-11 items-center justify-center rounded text-secondary hover:bg-surface-hover focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",onClick:()=>z(t),children:o.jsx(Z,{size:18,"aria-hidden":"true"})}):null]},`${t.kind}:${t.id}`),G=(t,c)=>c.length>0?o.jsxs("section",{"aria-label":t,className:"mt-2",children:[o.jsx("h3",{className:"px-2 py-2 text-[13px] font-medium text-secondary",children:t}),c.map(p=>T(p))]}):null,Y=(t,c,p)=>c.length>0?o.jsxs("details",{open:p,className:"mt-2 border-y border-default",children:[o.jsxs("summary",{className:"min-h-11 cursor-pointer px-2 py-3 text-sm text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[t," (",c.length,")"]}),c.map(j=>T(j))]},`${u?.id??"root"}:${t}`):null;return o.jsxs("div",{className:"min-w-0",children:[o.jsx("span",{id:`${q}-label`,className:"mb-1 block text-sm font-medium text-heading",children:m}),o.jsxs("details",{ref:x,className:"relative",onToggle:t=>{t.target===t.currentTarget&&t.currentTarget.open&&v.current?.focus()},onKeyDown:t=>{t.key==="Escape"&&(t.preventDefault(),t.currentTarget.open=!1,t.currentTarget.querySelector("summary")?.focus())},children:[o.jsxs("summary",{id:`${q}-value`,"aria-labelledby":`${q}-label ${q}-value`,className:`${X} visibility-scope-trigger`,onClick:()=>{x.current?.open||ie()},children:[`${A(r)}${r.kind==="group"?` · ${ee(r.targetCount)}`:r.kind==="property"?` · ${d.find(t=>t.kind==="market"&&t.id===n)?.label??(r.marketKeys?.length?E.allMarkets:"Property")}`:r.kind==="market"?" · Market":""}`,o.jsx(oe,{size:16,"aria-hidden":"true",className:"shrink-0 text-secondary"})]}),o.jsxs("div",{className:"visibility-scope-menu",children:[u||b?o.jsxs("div",{className:"mb-2 border-b border-default pb-2",children:[o.jsx("button",{type:"button",className:Q,"aria-label":`Back to ${S?.label??"all groups"}`,onClick:()=>{K(y.slice(0,-1)),C(!1),f(""),v.current?.focus()},children:o.jsxs("span",{className:"flex items-center gap-1",children:[o.jsx(le,{size:16,"aria-hidden":"true"}),S?.label??"All groups"]})}),o.jsx("p",{className:"px-2 py-1 text-sm font-medium text-heading","aria-live":"polite",children:u?.label??"All properties"})]}):null,o.jsx("input",{ref:v,type:"search","aria-label":"Search scopes",className:X,placeholder:u?"Search within this group":b?"Search properties":"Search groups or properties",value:l,onChange:t=>f(t.target.value)}),o.jsxs("div",{className:"mt-2 max-h-80 overflow-y-auto",children:[i&&u&&!h?T(u,"All properties in this group"):null,H.map(t=>T(t)),u&&!h?Y("Subgroups",M,!0):G(u?"Subgroups":"Groups",M),h?G("Properties",O):Y(u&&M.length>0?"All properties":"Properties",O,!u||M.length===0),G("Markets",W),!u&&!b&&!h&&a.length>0&&B.length>0?o.jsxs("button",{type:"button",className:`${Q} mt-2 border-t border-default`,"aria-label":E.browseAll,onClick:()=>{C(!0),v.current?.focus()},children:[o.jsx("span",{children:"All properties"}),o.jsx(Z,{size:18,"aria-hidden":"true"})]}):null,h&&M.length+O.length+W.length+H.length===0?o.jsx("p",{className:"py-3 text-sm text-secondary",children:"No matching scopes."}):null]})]})]})]})}const Te="Sources",_={copy:"Copy answer",copying:"Copying…",copied:"Copied",failed:"Could not copy. Select and copy the answer above."};function ye({headingLevel:e}){return r=>{const s=[],n=i=>{i.type==="heading"&&i.depth&&s.push(i),i.children?.forEach(n)};n(r);const m=s.reduce((i,d)=>Math.min(i,d.depth),6);for(const i of s){const d=i.depth-m;i.depth=Math.min(6,e+d),i.data={...i.data,hProperties:{...i.data?.hProperties,"data-answer-heading-level":d+1}}}}}function he({answer:e}){const[r,s]=k.useState("idle"),n=k.useRef(!1),m=async()=>{if(!n.current){n.current=!0,s("copying");try{await navigator.clipboard.writeText(e),s("copied")}catch{s("failed")}finally{n.current=!1}}};return o.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-x-3",children:[o.jsx(ce,{type:"button",variant:"ghost",className:"min-h-11 px-2","aria-disabled":r==="copying","aria-busy":r==="copying",onClick:()=>{m()},children:r==="copying"?_.copying:_.copy}),o.jsx("span",{role:"status",className:"text-sm text-secondary",children:r==="copied"?_.copied:r==="failed"?_.failed:""})]})}function Pe({children:e,headingLevel:r=4,copyable:s=!1}){return o.jsxs("div",{className:"answer-markdown",children:[o.jsx(de,{remarkPlugins:[[ye,{headingLevel:r}]],components:{p:({children:n})=>o.jsx("p",{className:"mb-3 whitespace-pre-wrap last:mb-0",children:n}),ul:({children:n})=>o.jsx("ul",{className:"mb-3 ml-5 list-disc space-y-1",children:n}),ol:({children:n,start:m})=>o.jsx("ol",{start:m,className:"mb-3 ml-5 list-decimal space-y-1",children:n}),pre:({children:n})=>o.jsx("pre",{className:"mb-3 overflow-x-auto whitespace-pre-wrap",children:n}),a:({children:n,href:m})=>{const i=ue(m);return i?o.jsx("a",{href:i,target:"_blank",rel:"noopener noreferrer",className:"text-link underline",children:n}):o.jsx("span",{children:n})},img:({alt:n})=>o.jsx("span",{children:n})},children:e}),s&&e.trim()?o.jsx(he,{answer:e},e):null]})}function _e(e){const r=e[0];return r?e.every(s=>s.mode===r.mode&&s.scope.kind===r.scope.kind&&s.scope.key===r.scope.key&&s.queryClass===r.queryClass&&s.measurement.displayedRunId===r.measurement.displayedRunId):!0}function N(e){return e.state==="unavailable"?{numerator:null,denominator:null,reason:e.reason}:e.numerator===void 0||e.denominator===void 0||e.denominator<=0?{numerator:null,denominator:null,reason:"not_applicable"}:{numerator:e.numerator,denominator:e.denominator}}function be(e){return e.kind==="exact"?e.url:e.kind==="prefix"?`https://${e.host}${e.pathPrefix}/*`:`https://${e.host}/*`}function xe(e){return e==="assigned"?"this-property":e==="sibling"?"another-property":e==="ownedUnmapped"?"owned-unassigned":e==="external"?"external":e==="ambiguous"?"multiple-properties":"invalid-url"}function ke(e){return e==="assigned"?"positive":e==="external"?"neutral":e==="invalid"?"negative":"caution"}function te(e){return`target:${e.targetKey}:${e.queryId}:${e.executionNodeKey}`}function Ce(e,r,s){const n=new Map;if(!r)return n;const m=new Map(e.usageEdges.map(l=>[te(l),l.targetKey])),i=new Map(e.assignments.map(l=>[`${l.targetKey}:${l.queryId}`,l.queryClass])),d=new Map(e.usageEdges.map(l=>[te(l),i.get(`${l.targetKey}:${l.queryId}`)]));for(const l of r.evidence){if(s&&d.get(l.usageEdgeId)!==s)continue;const f=m.get(l.usageEdgeId);if(!f)continue;const y=n.get(f)??[];y.push({id:`${l.observationId}:${l.expectedSlotId}:${l.usageEdgeId}:${l.sourceUrl}`,kind:xe(l.classification),query:l.queryText,provider:l.provider,location:l.location,url:l.sourceUrl,tone:ke(l.classification),historical:l.historical||l.bridged}),n.set(f,y)}return n}function ve(e){if(e.flags>0)return{label:"Review",tone:"caution"};const r=[e.mentionCoverage,e.citationCoverage].filter(s=>s.state==="unavailable").map(s=>s.reason);return r.includes("no_completed_run")?{label:"Not measured",tone:"neutral"}:r.includes("plan_v1")?{label:"Update setup",tone:"caution"}:r.includes("evidence_incomplete")?{label:"Evidence incomplete",tone:"caution"}:r.includes("no_population")?{label:"No queries",tone:"neutral"}:r.includes("not_applicable")?{label:"Not applicable",tone:"neutral"}:{label:"Complete",tone:"positive"}}function Se(e){return e==="complete"?{label:"Complete",tone:"positive"}:e==="partial"?{label:"Partial",tone:"caution"}:e==="queued"?{label:"Queued",tone:"neutral"}:e==="running"?{label:"Running",tone:"neutral"}:e==="failed"?{label:"Failed",tone:"negative"}:{label:"Not measured",tone:"neutral"}}function je(e){if(!e)return"";const r=new Date(e);return Number.isFinite(r.getTime())?r.toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric",timeZone:"UTC"}):""}function re(e){const r=e.nextAction.count??e.flags.total;if(e.nextAction.kind==="review_flags")return`${r} flagged ${r===1?"result needs":"results need"} review.`;if(e.nextAction.kind==="complete_setup")return"Finish setup.";if(e.nextAction.kind==="republish_setup")return"Setup update required.";if(e.nextAction.kind==="run_measurement")return"Ready to measure."}function Be({overview:e,activePlan:r,report:s,reportState:n=s?"ready":"loading",sort:m}){if(r.plan.schemaVersion!==2||e.mode!=="active-v2")throw new Error("The current overview requires an active version-two setup.");if(e.scope.kind!=="all"&&e.scope.kind!=="group")throw new Error("The current overview requires an All Properties or group scope.");const i=r.plan,d=new Map(i.targets.map(a=>[a.stableKey,a])),l=new Map(i.querySnapshots.map(a=>[a.queryId,a.queryText])),f=new Map;for(const a of i.assignments){if(e.queryClass!=="all"&&a.queryClass!==e.queryClass)continue;const g=l.get(a.queryId);if(!g)continue;const u=f.get(a.targetKey)??new Set;u.add(g),f.set(a.targetKey,u)}const y=s?.revision===r.revision&&s.run?.id===e.measurement.displayedRunId?s:null,K=e.measurement.displayedRunId===void 0||y?"ready":n==="error"||s!=null?"error":"loading",b=Ce(i,y,e.queryClass==="all"?void 0:e.queryClass),C=new Map;for(const a of i.groups)for(const g of a.targetKeys)C.has(g)||C.set(g,a.label);const x=e.properties.items.map(a=>{const g=d.get(a.targetKey),u=b.get(a.targetKey)??[];return{id:a.targetKey,name:a.label,mentionCoverage:N(a.mentionCoverage),citationCoverage:N(a.citationCoverage),status:ve(a),providers:a.providers?.map(S=>({provider:S.provider,mentionCoverage:N(S.mentionCoverage),citationCoverage:N(S.citationCoverage)})),market:C.get(a.targetKey),assignedQueries:[...f.get(a.targetKey)??[]],urls:g?.urlMatchers.map(be)??[],evidence:u,evidenceState:K,historical:u.some(S=>S.historical)}}),v=e.namedShareOfVoice?.entries.map(a=>({name:a.label,coverage:{numerator:a.credits,denominator:e.namedShareOfVoice.denominator}})),q=e.properties.items.flatMap(a=>a.flags>0?[{id:`property:${a.targetKey}`,property:a.label,summary:`${a.flags} ${a.flags===1?"result needs":"results need"} review.`,tone:"caution",count:a.flags}]:[]);return{classReporting:"available",latestMeasurement:{status:Se(e.measurement.state),completedSlots:e.measurement.completed,totalSlots:e.measurement.expected,date:je(e.measurement.completedAt),includesBridgedHistory:e.measurement.includesHistoricalData===!0},currentView:{scope:e.scope.kind==="group"?{kind:"group",...e.scope.key?{key:e.scope.key}:{}}:{kind:"all"},queryClass:e.queryClass,aggregate:{metrics:{propertiesMentioned:N(e.metrics.propertiesMentioned),mentionCoverage:N(e.metrics.mentionCoverage),citationCoverage:N(e.metrics.citationCoverage)},properties:x,...v?{shareOfVoice:v}:{}},propertyTotal:e.properties.totalEstimate??x.length,outcomes:e.outcomes,nextCursor:e.properties.nextCursor,...m?{sort:m}:{}},availableGroups:i.groups.map(a=>({id:a.stableKey,label:a.label})),...re(e)?{nextActionText:re(e)}:{},flaggedResultsTotal:e.flags.total,flaggedResults:q}}export{Pe as A,E as M,Re as V,Te as a,Ee as b,pe as c,_e as d,Be as e,we as f,be as g,$e as m,Ae as p,Ie as s};
@@ -0,0 +1 @@
1
+ import{r as n}from"./vendor-tanstack-ZXXkndVj.js";const _=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,c)=>c?c.toUpperCase():o.toLowerCase()),y=a=>{const t=M(a);return t.charAt(0).toUpperCase()+t.slice(1)},r=(...a)=>a.filter((t,o,c)=>!!t&&t.trim()!==""&&c.indexOf(t)===o).join(" ").trim(),m=a=>{for(const t in a)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var v={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const x=n.forwardRef(({color:a="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:s="",children:h,iconNode:i,...d},k)=>n.createElement("svg",{ref:k,...v,width:t,height:t,stroke:a,strokeWidth:c?Number(o)*24/Number(t):o,className:r("lucide",s),...!h&&!m(d)&&{"aria-hidden":"true"},...d},[...i.map(([p,l])=>n.createElement(p,l)),...Array.isArray(h)?h:[h]]));const e=(a,t)=>{const o=n.forwardRef(({className:c,...s},h)=>n.createElement(x,{ref:h,iconNode:t,className:r(`lucide-${_(y(a))}`,`lucide-${a}`,c),...s}));return o.displayName=y(a),o};const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$1=e("arrow-left",u);const g=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],N1=e("arrow-right",g);const $=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],w1=e("arrow-up-right",$);const N=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],f1=e("arrow-up",N);const w=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],z1=e("bell",w);const f=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],q1=e("book-open",f);const z=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],C1=e("bot",z);const q=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],b1=e("calendar-clock",q);const C=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],A1=e("chart-line",C);const b=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],j1=e("check",b);const A=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],L1=e("chevron-down",A);const j=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],H1=e("chevron-left",j);const L=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],V1=e("chevron-right",L);const H=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],R1=e("circle-check",H);const V=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],P1=e("circle-question-mark",V);const R=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],S1=e("cloud",R);const P=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Z1=e("copy",P);const S=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],B1=e("download",S);const Z=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],E1=e("external-link",Z);const B=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],U1=e("file-text",B);const E=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],T1=e("github",E);const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],D1=e("globe",U);const T=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],O1=e("history",T);const D=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],G1=e("layout-dashboard",D);const O=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],I1=e("link-2",O);const G=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],W1=e("loader-circle",G);const I=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],F1=e("map-pin",I);const W=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],K1=e("maximize-2",W);const F=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Q1=e("menu",F);const K=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],J1=e("minimize-2",K);const Q=[["path",{d:"M5 12h14",key:"1ays0h"}]],X1=e("minus",Q);const J=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Y1=e("panel-left-close",J);const X=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],e2=e("panel-left-open",X);const Y=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],t2=e("pencil",Y);const e1=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],a2=e("play",e1);const t1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],o2=e("plus",t1);const a1=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],c2=e("radar",a1);const o1=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],h2=e("radio",o1);const c1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],n2=e("refresh-cw",c1);const h1=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],s2=e("rocket",h1);const n1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],d2=e("rotate-ccw",n1);const s1=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],y2=e("scan-search",s1);const d1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],r2=e("search",d1);const y1=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],i2=e("server",y1);const r1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],k2=e("settings-2",r1);const i1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],p2=e("settings",i1);const k1=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],l2=e("shield",k1);const p1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],_2=e("terminal",p1);const l1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],M2=e("trash-2",l1);const _1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],m2=e("triangle-alert",_1);const M1=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],v2=e("triangle",M1);const m1=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],x2=e("unplug",m1);const v1=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],u2=e("upload",v1);const x1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],g2=e("wrench",x1);const u1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],$2=e("x",u1);export{y2 as $,N1 as A,q1 as B,L1 as C,B1 as D,E1 as E,U1 as F,T1 as G,O1 as H,P1 as I,X1 as J,t2 as K,W1 as L,J1 as M,M2 as N,l2 as O,a2 as P,v2 as Q,h2 as R,r2 as S,m2 as T,x2 as U,S1 as V,g2 as W,$2 as X,$1 as Y,C1 as Z,H1 as _,w1 as a,k2 as a0,d2 as b,K1 as c,f1 as d,j1 as e,V1 as f,Z1 as g,G1 as h,D1 as i,c2 as j,I1 as k,p2 as l,s2 as m,e2 as n,Y1 as o,Q1 as p,o2 as q,A1 as r,b1 as s,z1 as t,F1 as u,_2 as v,i2 as w,n2 as x,u2 as y,R1 as z};
package/assets/index.html CHANGED
@@ -12,14 +12,14 @@
12
12
  <link rel="icon" type="image/png" sizes="32x32" href="./favicon-32.png" />
13
13
  <link rel="apple-touch-icon" href="./apple-touch-icon.png" />
14
14
  <title>Canonry</title>
15
- <script type="module" crossorigin src="./assets/index-CVK43vax.js"></script>
15
+ <script type="module" crossorigin src="./assets/index-BCCrbno5.js"></script>
16
16
  <link rel="modulepreload" crossorigin href="./assets/vendor-tanstack-ZXXkndVj.js">
17
17
  <link rel="modulepreload" crossorigin href="./assets/vendor-radix-twS1M3FF.js">
18
18
  <link rel="modulepreload" crossorigin href="./assets/vendor-recharts-D-cUuLZo.js">
19
- <link rel="modulepreload" crossorigin href="./assets/vendor-lucide-CBIL4Nkq.js">
19
+ <link rel="modulepreload" crossorigin href="./assets/vendor-lucide-CneDbhOr.js">
20
20
  <link rel="modulepreload" crossorigin href="./assets/vendor-markdown-B-Oq2NYq.js">
21
21
  <link rel="modulepreload" crossorigin href="./assets/vendor-yaml-GWJz5H2G.js">
22
- <link rel="stylesheet" crossorigin href="./assets/index-Hmnj0RO5.css">
22
+ <link rel="stylesheet" crossorigin href="./assets/index-gQj7x9RX.css">
23
23
  </head>
24
24
  <body>
25
25
  <div id="root"></div>
@@ -16,12 +16,12 @@ import {
16
16
  resolveOperatorApiKeyIds,
17
17
  runWithUsageTags,
18
18
  saveConfigPatch
19
- } from "./chunk-67OM5KEH.js";
19
+ } from "./chunk-KKDXJWDK.js";
20
20
  import {
21
21
  deleteSiteCrawlGraphLayout,
22
22
  persistSiteCrawlGraphLayout,
23
23
  prepareSiteCrawlGraphLayout
24
- } from "./chunk-P5YYRGFS.js";
24
+ } from "./chunk-LQAOGFFK.js";
25
25
  import {
26
26
  PACKAGE_VERSION
27
27
  } from "./chunk-AOJU5LKX.js";
@@ -176,7 +176,7 @@ import {
176
176
  siteLivenessState,
177
177
  toAlertView,
178
178
  usageCounters
179
- } from "./chunk-2P52FD5B.js";
179
+ } from "./chunk-BL3FMPSM.js";
180
180
  import {
181
181
  AGENT_MEMORY_VALUE_MAX_BYTES,
182
182
  AGENT_NONE,
@@ -329,7 +329,7 @@ import {
329
329
  validationError,
330
330
  winnabilityClassLabel,
331
331
  withRetry
332
- } from "./chunk-Z6RA7LWY.js";
332
+ } from "./chunk-REQEWYNF.js";
333
333
 
334
334
  // src/runtime-context.ts
335
335
  function cliRuntimeContext(env = process.env, stdio = process) {
@@ -6468,7 +6468,7 @@ function nonBlank(value) {
6468
6468
  return trimmed ? trimmed : void 0;
6469
6469
  }
6470
6470
  function resolveBuildCommit(env = process.env) {
6471
- const embedded = true ? "68347cdf6d0e86bc163041eb8cb2adb3f3ced312" : void 0;
6471
+ const embedded = true ? "6545acf727b981bb820e18cd53d860ebd9b8be05" : void 0;
6472
6472
  return nonBlank(embedded) ?? nonBlank(env.CANONRY_COMMIT);
6473
6473
  }
6474
6474
  function resolveInstanceIdentity(env = process.env) {
@@ -11762,7 +11762,7 @@ function readStoredGroundingSources(rawResponse) {
11762
11762
  return result;
11763
11763
  }
11764
11764
  async function backfillInsightsCommand(project, opts) {
11765
- const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-PHCK6A35.js");
11765
+ const { IntelligenceService: IntelligenceService2 } = await import("./intelligence-service-CU7W5AVC.js");
11766
11766
  const config = loadConfig();
11767
11767
  const db = createClient(config.database);
11768
11768
  migrate(db);
@@ -709,7 +709,7 @@ import {
709
709
  wordpressSchemaDeployResultDtoSchema,
710
710
  wordpressSchemaStatusResultDtoSchema,
711
711
  wordpressStatusDtoSchema
712
- } from "./chunk-Z6RA7LWY.js";
712
+ } from "./chunk-REQEWYNF.js";
713
713
 
714
714
  // src/intelligence-service.ts
715
715
  import { eq as eq68, desc as desc30, asc as asc12, and as and58, ne as ne11, or as or16, inArray as inArray26, gte as gte18, lte as lte15, isNull as isNull12, sql as sql27, exists } from "drizzle-orm";
@@ -4,14 +4,14 @@ import {
4
4
  installSkills,
5
5
  loadConfigRaw,
6
6
  saveConfigPatch
7
- } from "./chunk-67OM5KEH.js";
7
+ } from "./chunk-KKDXJWDK.js";
8
8
  import {
9
9
  PACKAGE_VERSION
10
10
  } from "./chunk-AOJU5LKX.js";
11
11
  import {
12
12
  SKILL_MANIFEST_FILENAME,
13
13
  SkillsClients
14
- } from "./chunk-Z6RA7LWY.js";
14
+ } from "./chunk-REQEWYNF.js";
15
15
 
16
16
  // src/skills-autosync.ts
17
17
  import fs from "fs";
@@ -130,7 +130,7 @@ import {
130
130
  upgradeCaveatFor,
131
131
  upgradeCommandFor,
132
132
  visibilityReportRequestSchema
133
- } from "./chunk-Z6RA7LWY.js";
133
+ } from "./chunk-REQEWYNF.js";
134
134
 
135
135
  // src/cli-error.ts
136
136
  function isMachineFormat(format) {
@@ -5,12 +5,12 @@ import {
5
5
  siteCrawlGraphNodes,
6
6
  siteCrawlPages,
7
7
  siteCrawlSnapshots
8
- } from "./chunk-2P52FD5B.js";
8
+ } from "./chunk-BL3FMPSM.js";
9
9
  import {
10
10
  SITE_CRAWL_GRAPH_MAX_EDGES,
11
11
  SITE_CRAWL_GRAPH_MAX_NODES,
12
12
  TEMPLATE_LINK_RATIO_THRESHOLD
13
- } from "./chunk-Z6RA7LWY.js";
13
+ } from "./chunk-REQEWYNF.js";
14
14
 
15
15
  // src/site-crawl-graph-layout.ts
16
16
  import crypto from "crypto";
package/dist/cli.js CHANGED
@@ -35,11 +35,11 @@ import {
35
35
  trackCliCommandFinished,
36
36
  trackEvent,
37
37
  waitForServerRuntimeStartup
38
- } from "./chunk-SLOTTXIL.js";
38
+ } from "./chunk-75ECQ77U.js";
39
39
  import {
40
40
  autoSyncSkills,
41
41
  formatAutoSyncNotice
42
- } from "./chunk-L3FG66O7.js";
42
+ } from "./chunk-DX4CZNNU.js";
43
43
  import {
44
44
  CliError,
45
45
  EXIT_SYSTEM_ERROR,
@@ -66,13 +66,13 @@ import {
66
66
  shouldPrintServeSkillsNudge,
67
67
  systemError,
68
68
  usageError
69
- } from "./chunk-67OM5KEH.js";
69
+ } from "./chunk-KKDXJWDK.js";
70
70
  import {
71
71
  DEFAULT_DEMO_TRUSTED_PROXIES,
72
72
  trustedProxiesProblem,
73
73
  trustedProxyProblem
74
74
  } from "./chunk-RB2F4D3Z.js";
75
- import "./chunk-P5YYRGFS.js";
75
+ import "./chunk-LQAOGFFK.js";
76
76
  import "./chunk-AOJU5LKX.js";
77
77
  import {
78
78
  CLOUDFLARE_WORKER_BINDINGS,
@@ -88,7 +88,7 @@ import {
88
88
  queries,
89
89
  renderReportHtml,
90
90
  runs
91
- } from "./chunk-2P52FD5B.js";
91
+ } from "./chunk-BL3FMPSM.js";
92
92
  import {
93
93
  AdsDeliverySnapshotStatuses,
94
94
  AdsHistoricalCampaignRollupStatuses,
@@ -169,7 +169,7 @@ import {
169
169
  snapshotProviderModeSchema,
170
170
  visibilityReportRequestSchema,
171
171
  winnabilityClassSchema
172
- } from "./chunk-Z6RA7LWY.js";
172
+ } from "./chunk-REQEWYNF.js";
173
173
 
174
174
  // src/cli.ts
175
175
  import { pathToFileURL } from "url";
@@ -434,7 +434,7 @@ function parseDemoTrustedProxies(values) {
434
434
  async function demoCommand(options) {
435
435
  const { host, port } = parseDemoListenOptions(options);
436
436
  const trustProxy = parseDemoTrustedProxies(options.trustProxy);
437
- const { createDemoServer } = await import("./demo-server-6QU77ZMV.js");
437
+ const { createDemoServer } = await import("./demo-server-BSH6SSWD.js");
438
438
  const app = await createDemoServer({ trustProxy });
439
439
  let stopping = false;
440
440
  const stop = () => {
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  layoutSiteCrawlGraphInput,
6
6
  persistSiteCrawlGraphLayout
7
- } from "./chunk-P5YYRGFS.js";
7
+ } from "./chunk-LQAOGFFK.js";
8
8
  import {
9
9
  PACKAGE_VERSION
10
10
  } from "./chunk-AOJU5LKX.js";
@@ -83,7 +83,7 @@ import {
83
83
  siteCrawlPages,
84
84
  siteCrawlSnapshots,
85
85
  trafficSources
86
- } from "./chunk-2P52FD5B.js";
86
+ } from "./chunk-BL3FMPSM.js";
87
87
  import {
88
88
  RunKinds,
89
89
  SiteCrawlFetchStates,
@@ -104,7 +104,7 @@ import {
104
104
  measurementPlanV2Schema,
105
105
  placementLinkDecision,
106
106
  siteAuditPageFactorSchema
107
- } from "./chunk-Z6RA7LWY.js";
107
+ } from "./chunk-REQEWYNF.js";
108
108
 
109
109
  // src/demo-server.ts
110
110
  import { dirname, join as join2 } from "path";
package/dist/index.js CHANGED
@@ -3,14 +3,14 @@ import {
3
3
  createGoogleMarketingCredentialStore,
4
4
  createGoogleMarketingRuntime,
5
5
  createServer
6
- } from "./chunk-SLOTTXIL.js";
6
+ } from "./chunk-75ECQ77U.js";
7
7
  import {
8
8
  loadConfig
9
- } from "./chunk-67OM5KEH.js";
10
- import "./chunk-P5YYRGFS.js";
9
+ } from "./chunk-KKDXJWDK.js";
10
+ import "./chunk-LQAOGFFK.js";
11
11
  import "./chunk-AOJU5LKX.js";
12
- import "./chunk-2P52FD5B.js";
13
- import "./chunk-Z6RA7LWY.js";
12
+ import "./chunk-BL3FMPSM.js";
13
+ import "./chunk-REQEWYNF.js";
14
14
  export {
15
15
  GoogleMarketingRuntimeError,
16
16
  createGoogleMarketingCredentialStore,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  HISTORY_WINDOW_RUNS,
3
3
  IntelligenceService
4
- } from "./chunk-2P52FD5B.js";
5
- import "./chunk-Z6RA7LWY.js";
4
+ } from "./chunk-BL3FMPSM.js";
5
+ import "./chunk-REQEWYNF.js";
6
6
  export {
7
7
  HISTORY_WINDOW_RUNS,
8
8
  IntelligenceService
package/dist/mcp.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  autoSyncSkills
3
- } from "./chunk-L3FG66O7.js";
3
+ } from "./chunk-DX4CZNNU.js";
4
4
  import {
5
5
  createApiClient,
6
6
  createCanonryMcpServer
7
- } from "./chunk-67OM5KEH.js";
7
+ } from "./chunk-KKDXJWDK.js";
8
8
  import "./chunk-AOJU5LKX.js";
9
9
  import {
10
10
  isReadOnlyKey,
11
11
  updateCheckEnvOptOut
12
- } from "./chunk-Z6RA7LWY.js";
12
+ } from "./chunk-REQEWYNF.js";
13
13
 
14
14
  // src/mcp/cli.ts
15
15
  import { randomUUID } from "crypto";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ainyc/canonry",
3
- "version": "5.4.0",
3
+ "version": "5.5.0",
4
4
  "type": "module",
5
5
  "description": "Self-hosted AI visibility (AEO) platform: track how ChatGPT, Claude, Gemini, and Perplexity cite your domain, join it with Search Console, GA4, server-side traffic, and paid media, and fix what you find through agent tools (CLI, REST, MCP). Local SQLite.",
6
6
  "keywords": [
@@ -87,31 +87,31 @@
87
87
  "tsup": "^8.5.1",
88
88
  "tsx": "^4.19.0",
89
89
  "@ainyc/canonry-web": "0.0.0",
90
+ "@ainyc/canonry-api-client": "0.0.0",
91
+ "@ainyc/canonry-api-routes": "0.0.0",
90
92
  "@ainyc/canonry-config": "0.0.0",
91
93
  "@ainyc/canonry-contracts": "0.0.0",
92
- "@ainyc/canonry-api-routes": "0.0.0",
93
94
  "@ainyc/canonry-db": "0.0.0",
94
- "@ainyc/canonry-api-client": "0.0.0",
95
95
  "@ainyc/canonry-integration-cloud-run": "0.0.0",
96
96
  "@ainyc/canonry-integration-cloudflare-queue": "0.0.0",
97
97
  "@ainyc/canonry-integration-bing": "0.0.0",
98
- "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
99
98
  "@ainyc/canonry-integration-commoncrawl": "0.0.0",
99
+ "@ainyc/canonry-integration-cloudflare-worker": "0.0.0",
100
+ "@ainyc/canonry-integration-google": "0.0.0",
100
101
  "@ainyc/canonry-integration-google-ads": "0.0.0",
101
102
  "@ainyc/canonry-integration-google-business-profile": "0.0.0",
102
- "@ainyc/canonry-integration-google": "0.0.0",
103
103
  "@ainyc/canonry-integration-google-places": "0.0.0",
104
104
  "@ainyc/canonry-integration-google-tag-manager": "0.0.0",
105
105
  "@ainyc/canonry-integration-openai-ads": "0.0.0",
106
- "@ainyc/canonry-integration-wordpress": "0.0.0",
107
106
  "@ainyc/canonry-integration-traffic": "0.0.0",
108
107
  "@ainyc/canonry-intelligence": "0.0.0",
108
+ "@ainyc/canonry-integration-wordpress": "0.0.0",
109
109
  "@ainyc/canonry-provider-claude": "0.0.0",
110
- "@ainyc/canonry-provider-gemini": "0.0.0",
111
110
  "@ainyc/canonry-provider-cdp": "0.0.0",
112
- "@ainyc/canonry-provider-perplexity": "0.0.0",
111
+ "@ainyc/canonry-provider-gemini": "0.0.0",
112
+ "@ainyc/canonry-provider-openai": "0.0.0",
113
113
  "@ainyc/canonry-provider-local": "0.0.0",
114
- "@ainyc/canonry-provider-openai": "0.0.0"
114
+ "@ainyc/canonry-provider-perplexity": "0.0.0"
115
115
  },
116
116
  "scripts": {
117
117
  "build": "pnpm run build:cli && pnpm run build:web",
@@ -1 +0,0 @@
1
- import{r as d,j as e,k as F,u as L,f as $,L as I}from"./vendor-tanstack-ZXXkndVj.js";import{cq as E,cr as O,cs as A,ct as D,cu as R,B as C,m as U,dA as z,cl as H,i as V,j as w,f as S,dB as W,T as J,dC as M}from"./index-CVK43vax.js";import{d as Q,f as G,g as _,c as q,a as K,t as Y}from"./extract-error-message-rTGTNN_D.js";import{i as X,O as Z,Q as ee,V as te,q as T,A as re}from"./vendor-lucide-CBIL4Nkq.js";import"./vendor-radix-twS1M3FF.js";import"./vendor-recharts-D-cUuLZo.js";import"./vendor-markdown-B-Oq2NYq.js";import"./vendor-yaml-GWJz5H2G.js";function se({open:t,onOpenChange:a,projectName:n}){const[r,i]=d.useState("pick");d.useEffect(()=>{t&&i("pick")},[t]);const s=()=>{a(!1),i("pick")};return e.jsx(E,{open:t,onOpenChange:o=>{o?a(!0):s()},children:e.jsx(O,{children:r==="pick"?e.jsx(oe,{onPick:i}):r==="wordpress"?e.jsx(le,{projectName:n,onBack:()=>i("pick"),onClose:s}):r==="vercel"?e.jsx(de,{projectName:n,onBack:()=>i("pick"),onClose:s}):e.jsx(ce,{projectName:n,onBack:()=>i("pick"),onClose:s})})})}const ne=[{type:"wordpress",name:"WordPress",action:"Install the traffic plugin",icon:X},{type:"cloud-run",name:"Google Cloud Run",action:"Read request logs",icon:Z},{type:"vercel",name:"Vercel",action:"Read request logs",icon:ee}];function oe({onPick:t}){return e.jsxs(e.Fragment,{children:[e.jsxs(A,{children:[e.jsx(D,{children:"Connect a traffic source"}),e.jsx(R,{children:"Choose where Canonry should read traffic logs."})]}),e.jsx("div",{className:"mt-6 flex flex-col gap-3",children:ne.map(({type:a,name:n,action:r,icon:i})=>e.jsxs("button",{type:"button",onClick:()=>t(a),className:"group flex items-center gap-3 rounded-md border border-base bg-bg-elevated/30 px-3 py-3 text-left transition-colors hover:border-mono-600 hover:bg-bg-elevated/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[e.jsx("span",{className:"mt-0.5 inline-flex size-9 shrink-0 items-center justify-center rounded-md border border-base bg-bg text-neutral group-hover:text-heading",children:e.jsx(i,{className:"size-4"})}),e.jsxs("span",{className:"flex min-w-0 flex-1 items-baseline justify-between gap-3",children:[e.jsx("span",{className:"text-sm font-medium text-heading",children:n}),e.jsx("span",{className:"text-sm text-secondary",children:r})]})]},a))})]})}function ae({title:t,description:a,onBack:n}){return e.jsxs(A,{children:[e.jsxs("button",{type:"button",onClick:n,className:"mb-1 inline-flex w-fit items-center gap-1 rounded text-sm text-secondary transition-colors hover:text-strong focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-mono-400",children:[e.jsx(te,{className:"size-3"}),"Choose a different source"]}),e.jsx(D,{children:t}),e.jsx(R,{children:a})]})}function ie(t,a){const n=F();return async(r,i)=>{i.startInitialBackfill&&await z(t,r),i.afterConnected?.(),a(),n({to:"/traffic/$projectName/$sourceId",params:{projectName:t,sourceId:r}})}}function k(t,a){const[n,r]=d.useState(null),i=ie(t,a);return{error:n,runConnect:async o=>{r(null);const l=o.validate();if(l){r(l);return}let u;try{u=await o.mutate()}catch(c){r(q(c));return}try{await i(u.id,{startInitialBackfill:o.startInitialBackfill??!0,afterConnected:o.onConnected})}catch(c){r(`Source connected, but starting the initial backfill failed: ${q(c)}`)}}}}function P({title:t,description:a,projectName:n,onBack:r,onClose:i,onSubmit:s,isPending:o,error:l,children:u}){return e.jsxs(e.Fragment,{children:[e.jsx(ae,{title:t,description:a,onBack:r}),e.jsxs("form",{onSubmit:U(async c=>{c.preventDefault(),await s()}),className:"mt-6 flex flex-col gap-5 overflow-y-auto pr-1",children:[e.jsx(p,{label:"Project",description:"Canonry project this source attaches to.",children:e.jsx("input",{type:"text",value:n,disabled:!0,className:"w-full rounded border border-strong bg-bg-elevated/50 px-2 py-1.5 text-sm text-neutral"})}),u,l?e.jsx("p",{className:"rounded-md border border-negative-800/50 bg-negative-950/30 px-3 py-2 text-xs text-negative-200",children:l}):null,e.jsxs("div",{className:"mt-2 flex items-center justify-end gap-2 border-t border-default pt-4",children:[e.jsx(C,{type:"button",variant:"ghost",size:"sm",onClick:i,children:"Close"}),e.jsx(C,{type:"submit",disabled:o,size:"sm",children:o?"Connecting…":"Connect"})]})]})]})}function le({projectName:t,onBack:a,onClose:n}){const[r,i]=d.useState(""),[s,o]=d.useState(""),[l,u]=d.useState(""),[c,j]=d.useState(""),f=Q(t||null),{error:g,runConnect:b}=k(t,n),v=()=>b({validate:()=>r.trim()?s.trim()?l.trim()?null:"Application Password is required.":"Username is required.":"WordPress site URL is required.",mutate:()=>f.mutateAsync({baseUrl:r.trim(),username:s.trim(),applicationPassword:l.trim(),displayName:c.trim()||void 0}),onConnected:()=>u("")});return e.jsxs(P,{title:"Connect a WordPress site",description:e.jsxs(e.Fragment,{children:["Pulls request events from the Canonry Traffic Logger plugin. The Application Password is stored in ",e.jsx("code",{children:"~/.canonry/config.yaml"})," on the server and never echoed back to the dashboard."]}),projectName:t,onBack:a,onClose:n,onSubmit:v,isPending:f.isPending,error:g,children:[e.jsx(p,{label:"WordPress site URL",description:"Base URL of the site running the Canonry Traffic Logger plugin.",required:!0,children:e.jsx("input",{type:"url",value:r,onChange:x=>i(x.target.value),required:!0,autoComplete:"url",placeholder:"https://example.com",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Username",description:"WordPress user that owns the Application Password.",required:!0,children:e.jsx("input",{type:"text",value:s,onChange:x=>o(x.target.value),required:!0,autoComplete:"username",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Application Password",description:"Create one in wp-admin under Users -> Profile -> Application Passwords.",required:!0,children:e.jsx("input",{type:"password",value:l,onChange:x=>u(x.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Display name (optional)",description:"Friendly label shown in the dashboard. Defaults to the WordPress host.",children:e.jsx("input",{type:"text",value:c,onChange:x=>j(x.target.value),autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})})]})}function ce({projectName:t,onBack:a,onClose:n}){const[r,i]=d.useState(""),[s,o]=d.useState(""),[l,u]=d.useState(""),[c,j]=d.useState(""),[f,g]=d.useState(""),b=_(t||null),{error:v,runConnect:x}=k(t,n),N=()=>x({validate:()=>r.trim()?f.trim()?null:"Service-account JSON content is required.":"GCP project ID is required.",mutate:()=>b.mutateAsync({gcpProjectId:r.trim(),serviceName:s.trim()||void 0,location:l.trim()||void 0,displayName:c.trim()||void 0,keyJson:f.trim()}),onConnected:()=>g("")}),h=async m=>{if(!m)return;const B=await m.text();g(B)};return e.jsxs(P,{title:"Connect a Cloud Run service",description:e.jsxs(e.Fragment,{children:["v1 supports service-account JSON only. The private key is stored in"," ",e.jsx("code",{children:"~/.canonry/config.yaml"})," on the server and never echoed back to the dashboard."]}),projectName:t,onBack:a,onClose:n,onSubmit:N,isPending:b.isPending,error:v,children:[e.jsx(p,{label:"GCP project ID",description:"The Google Cloud project hosting the Cloud Run service (e.g. my-prod-foo).",required:!0,children:e.jsx("input",{type:"text",value:r,onChange:m=>i(m.target.value),required:!0,autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Service name (optional)",description:"Restrict log pulls to a specific Cloud Run service. Omit to pull all services in the project.",children:e.jsx("input",{type:"text",value:s,onChange:m=>o(m.target.value),autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Location (optional)",description:"Region of the Cloud Run service (e.g. us-central1). Helpful when multiple regions emit logs.",children:e.jsx("input",{type:"text",value:l,onChange:m=>u(m.target.value),autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Display name (optional)",description:"Friendly label shown in the dashboard. Defaults to the project + service combo.",children:e.jsx("input",{type:"text",value:c,onChange:m=>j(m.target.value),autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsxs(p,{label:"Service-account JSON",description:"Paste the contents of the SA key (JSON). The SA needs roles/logging.viewer (or any role granting logging.logEntries.list).",required:!0,children:[e.jsx("textarea",{value:f,onChange:m=>g(m.target.value),rows:6,spellCheck:!1,autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 font-mono text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none",placeholder:'{"type":"service_account","project_id":"…","private_key":"…"}',required:!0}),e.jsxs("label",{className:"mt-2 inline-flex cursor-pointer items-center gap-2 text-sm text-secondary hover:text-strong",children:[e.jsx("input",{type:"file",accept:"application/json,.json",className:"hidden",onChange:m=>{h(m.target.files?.[0]??null)}}),e.jsx("span",{className:"rounded-md border border-base px-2 py-1",children:"Or upload a key file"})]})]})]})}function de({projectName:t,onBack:a,onClose:n}){const[r,i]=d.useState(""),[s,o]=d.useState(""),[l,u]=d.useState(""),[c,j]=d.useState("production"),[f,g]=d.useState(""),b=G(t||null),{error:v,runConnect:x}=k(t,n),N=()=>x({validate:()=>r.trim()?s.trim()?l.trim()?null:"Vercel personal access token is required.":"Vercel team / account ID is required.":"Vercel project ID is required.",mutate:()=>b.mutateAsync({projectId:r.trim(),teamId:s.trim(),token:l.trim(),environment:c,displayName:f.trim()||void 0}),startInitialBackfill:!1,onConnected:()=>u("")});return e.jsxs(P,{title:"Connect a Vercel project",description:e.jsxs(e.Fragment,{children:["Pulls request logs straight from Vercel, no in-app instrumentation needed. The personal access token is stored in ",e.jsx("code",{children:"~/.canonry/config.yaml"})," on the server and never echoed back to the dashboard."]}),projectName:t,onBack:a,onClose:n,onSubmit:N,isPending:b.isPending,error:v,children:[e.jsx(p,{label:"Vercel project ID",description:"The prj_… id from the Vercel dashboard or .vercel/project.json.",required:!0,children:e.jsx("input",{type:"text",value:r,onChange:h=>i(h.target.value),required:!0,autoComplete:"off",placeholder:"prj_…",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Vercel team / account ID",description:"The Vercel team or personal account that owns the project. Find it as orgId in your .vercel/project.json.",required:!0,children:e.jsx("input",{type:"text",value:s,onChange:h=>o(h.target.value),required:!0,autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Personal access token",description:"Create a Vercel personal access token under Account Settings → Tokens. Tokens can expire, so use a long-lived one.",required:!0,children:e.jsx("input",{type:"password",value:l,onChange:h=>u(h.target.value),required:!0,autoComplete:"new-password",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})}),e.jsx(p,{label:"Environment",description:"Which deployment environment's request logs to pull.",children:e.jsxs("select",{value:c,onChange:h=>j(h.target.value),className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong focus:border-mono-500 focus:outline-none",children:[e.jsx("option",{value:"production",children:"production"}),e.jsx("option",{value:"preview",children:"preview"})]})}),e.jsx(p,{label:"Display name (optional)",description:"Friendly label shown in the dashboard. Defaults to the Vercel project ID.",children:e.jsx("input",{type:"text",value:f,onChange:h=>g(h.target.value),autoComplete:"off",className:"w-full rounded border border-strong bg-transparent px-2 py-1.5 text-sm text-strong placeholder-mono-600 focus:border-mono-500 focus:outline-none"})})]})}function p({label:t,description:a,required:n,children:r}){return e.jsxs("label",{className:"flex flex-col gap-1",children:[e.jsxs("span",{className:"text-sm font-medium text-strong",children:[t,n?e.jsx("span",{className:"ml-1 text-negative-400",children:"*"}):null]}),r,e.jsx("span",{className:"text-[13px] leading-5 text-secondary",children:a})]})}function ue(t){if(!t)return"never";const a=Date.now()-new Date(t).getTime(),n=Math.floor(a/6e4);if(n<1)return"just now";if(n<60)return`${n}m ago`;const r=Math.floor(n/60);return r<24?`${r}h ago`:`${Math.floor(r/24)}d ago`}function y(t){return t>=1e6?`${(t/1e6).toFixed(1)}M`:t>=1e3?`${(t/1e3).toFixed(1)}K`:t.toLocaleString()}function ye(){const[t,a]=d.useState(""),[n,r]=d.useState(!1),s=L(H({client:V})).data??[],o=d.useMemo(()=>t||(s[0]?.name??""),[t,s]),l=K(o||null),u=l.data?.sources??[];return e.jsxs("div",{className:"page-container",children:[e.jsxs("div",{className:"page-header",children:[e.jsxs("div",{className:"page-header-left",children:[e.jsx("h1",{className:"page-title",children:"Traffic sources"}),e.jsx("p",{className:"page-subtitle",children:"AI crawler hits and referral sessions from your server logs."})]}),!w()&&e.jsx("div",{className:"flex flex-wrap items-center justify-end gap-2",children:e.jsxs(C,{type:"button",variant:"outline",size:"sm",onClick:()=>r(!0),disabled:!o,children:[e.jsx(T,{className:"size-3.5"}),"Connect a source"]})})]}),e.jsxs("section",{children:[s.length>1&&e.jsxs("label",{className:"mb-4 flex w-fit items-center gap-2 text-sm font-medium text-secondary",htmlFor:"traffic-project",children:["Project",e.jsx("select",{id:"traffic-project",className:"h-8 min-w-44 rounded-md border border-base bg-bg px-2 text-sm text-heading outline-none transition focus:border-mono-500 focus:ring-1 focus:ring-mono-500",value:o,onChange:c=>a(c.target.value),children:s.map(c=>e.jsx("option",{value:c.name,children:c.displayName??c.name},c.id))})]}),o?l.isLoading?e.jsx(S,{className:"p-6 text-center text-sm text-muted",children:"Loading sources…"}):u.length===0?e.jsxs(S,{className:"p-8 text-center",children:[e.jsxs("p",{className:"text-sm text-neutral",children:["No traffic sources connected for ",o,"."]}),!w()&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mt-1 text-sm text-secondary",children:"Connect a source to start collecting traffic."}),e.jsx("div",{className:"mt-4 flex flex-wrap items-center justify-center gap-2",children:e.jsxs(C,{type:"button",variant:"outline",size:"sm",onClick:()=>r(!0),children:[e.jsx(T,{className:"size-3.5"}),"Connect a source"]})})]})]}):e.jsx(pe,{projectName:o,sources:u}):e.jsx(S,{className:"p-6 text-center text-sm text-muted",children:"No projects yet."})]}),!w()&&e.jsx(se,{open:n,onOpenChange:r,projectName:o})]})}function pe({projectName:t,sources:a}){const n=F(),r=$({queries:a.map(s=>({...W({client:V,path:{name:t,id:s.id}}),staleTime:3e4}))}),i=a.map((s,o)=>({source:s,detail:r[o]?.data,isLoading:r[o]?.isLoading??!1}));return e.jsx("div",{className:"rounded-xl border border-default bg-surface overflow-hidden",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-bg-elevated/50 text-[10px] font-semibold uppercase tracking-wider text-muted",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-2 text-left",children:"Source"}),e.jsx("th",{className:"px-4 py-2 text-left",children:"Status"}),e.jsx("th",{className:"px-4 py-2 text-left",children:"Last sync"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Content crawls"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"Infra crawls"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"AI fetches"}),e.jsx("th",{className:"px-4 py-2 text-right",children:"AI referrals"}),e.jsx("th",{className:"px-4 py-2 text-right"})]})}),e.jsx("tbody",{className:"divide-y divide-mono-800/60",children:i.map(({source:s,detail:o,isLoading:l})=>e.jsxs("tr",{className:"cursor-pointer transition-colors hover:bg-bg-elevated/40 focus-within:bg-bg-elevated/40",onClick:u=>{M(u)&&n({to:"/traffic/$projectName/$sourceId",params:{projectName:t,sourceId:s.id}})},children:[e.jsx("td",{className:"px-4 py-3",children:e.jsx(I,{to:"/traffic/$projectName/$sourceId",params:{projectName:t,sourceId:s.id},className:"font-medium text-heading hover:underline",children:s.displayName})}),e.jsxs("td",{className:"px-4 py-3",children:[e.jsx(J,{tone:Y(s.status),children:s.status}),s.lastError?e.jsx("p",{className:"mt-1 max-w-[18rem] truncate text-sm text-negative-400",title:s.lastError,children:s.lastError}):null]}),e.jsx("td",{className:"px-4 py-3 text-neutral",children:ue(s.lastSyncedAt)}),e.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-heading",title:o?`${o.totals24h.crawlerHits.toLocaleString("en-US")} total crawler hits`:void 0,children:l?"—":y(o?.totals24h.crawlerContentHits??0)}),e.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-muted",children:l?"—":y(o?.totals24h.crawlerInfraHits??0)}),e.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-heading",children:l?"—":y(o?.totals24h.aiUserFetchHits??0)}),e.jsx("td",{className:"px-4 py-3 text-right tabular-nums text-heading",children:l?"—":y(o?.totals24h.aiReferralLandedHits??0)}),e.jsx("td",{className:"px-4 py-3 text-right",children:e.jsxs(I,{to:"/traffic/$projectName/$sourceId",params:{projectName:t,sourceId:s.id},className:"inline-flex items-center gap-1 text-sm text-secondary hover:text-heading",children:["View",e.jsx(re,{className:"size-3.5"})]})})]},s.id))})]})})}export{ye as TrafficPage};
@@ -1 +0,0 @@
1
- import{r as h}from"./vendor-tanstack-ZXXkndVj.js";const _=a=>a.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),M=a=>a.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,o,c)=>c?c.toUpperCase():o.toLowerCase()),y=a=>{const t=M(a);return t.charAt(0).toUpperCase()+t.slice(1)},r=(...a)=>a.filter((t,o,c)=>!!t&&t.trim()!==""&&c.indexOf(t)===o).join(" ").trim(),m=a=>{for(const t in a)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};var v={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const x=h.forwardRef(({color:a="currentColor",size:t=24,strokeWidth:o=2,absoluteStrokeWidth:c,className:s="",children:n,iconNode:i,...d},k)=>h.createElement("svg",{ref:k,...v,width:t,height:t,stroke:a,strokeWidth:c?Number(o)*24/Number(t):o,className:r("lucide",s),...!n&&!m(d)&&{"aria-hidden":"true"},...d},[...i.map(([p,l])=>h.createElement(p,l)),...Array.isArray(n)?n:[n]]));const e=(a,t)=>{const o=h.forwardRef(({className:c,...s},n)=>h.createElement(x,{ref:n,iconNode:t,className:r(`lucide-${_(y(a))}`,`lucide-${a}`,c),...s}));return o.displayName=y(a),o};const u=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],u1=e("arrow-left",u);const g=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],g1=e("arrow-right",g);const w=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],w1=e("arrow-up-right",w);const N=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],N1=e("arrow-up",N);const $=[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]],$1=e("bell",$);const f=[["path",{d:"M12 7v14",key:"1akyts"}],["path",{d:"M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z",key:"ruj8y"}]],f1=e("book-open",f);const z=[["path",{d:"M16 14v2.2l1.6 1",key:"fo4ql5"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5",key:"1osxxc"}],["path",{d:"M3 10h5",key:"r794hk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["circle",{cx:"16",cy:"16",r:"6",key:"qoo3c4"}]],z1=e("calendar-clock",z);const q=[["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"m19 9-5 5-4-4-3 3",key:"2osh9i"}]],q1=e("chart-line",q);const C=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],C1=e("check",C);const b=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],b1=e("chevron-down",b);const A=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],A1=e("chevron-left",A);const j=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],j1=e("chevron-right",j);const L=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],L1=e("circle-check",L);const H=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],H1=e("circle-question-mark",H);const V=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],V1=e("cloud",V);const R=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],R1=e("copy",R);const P=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],P1=e("download",P);const Z=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],Z1=e("external-link",Z);const E=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],E1=e("file-text",E);const S=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],S1=e("github",S);const U=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],U1=e("globe",U);const B=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],B1=e("history",B);const T=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],T1=e("layout-dashboard",T);const D=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2",key:"8i5ue5"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2",key:"1b9ql8"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12",key:"1jonct"}]],D1=e("link-2",D);const O=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],O1=e("loader-circle",O);const G=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],G1=e("map-pin",G);const I=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],I1=e("maximize-2",I);const W=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],W1=e("menu",W);const F=[["path",{d:"m14 10 7-7",key:"oa77jy"}],["path",{d:"M20 10h-6V4",key:"mjg0md"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M4 14h6v6",key:"rmj7iw"}]],F1=e("minimize-2",F);const K=[["path",{d:"M5 12h14",key:"1ays0h"}]],K1=e("minus",K);const Q=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],Q1=e("panel-left-close",Q);const J=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],J1=e("panel-left-open",J);const X=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],X1=e("pencil",X);const Y=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Y1=e("play",Y);const e1=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],e2=e("plus",e1);const t1=[["path",{d:"M19.07 4.93A10 10 0 0 0 6.99 3.34",key:"z3du51"}],["path",{d:"M4 6h.01",key:"oypzma"}],["path",{d:"M2.29 9.62A10 10 0 1 0 21.31 8.35",key:"qzzz0"}],["path",{d:"M16.24 7.76A6 6 0 1 0 8.23 16.67",key:"1yjesh"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M17.99 11.66A6 6 0 0 1 15.77 16.67",key:"1u2y91"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}],["path",{d:"m13.41 10.59 5.66-5.66",key:"mhq4k0"}]],t2=e("radar",t1);const a1=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],a2=e("radio",a1);const o1=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],o2=e("refresh-cw",o1);const c1=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],c2=e("rocket",c1);const n1=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],n2=e("rotate-ccw",n1);const h1=[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"m16 16-1.9-1.9",key:"1dq9hf"}]],h2=e("scan-search",h1);const s1=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],s2=e("search",s1);const d1=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],d2=e("server",d1);const y1=[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]],y2=e("settings-2",y1);const r1=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],r2=e("settings",r1);const i1=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],i2=e("terminal",i1);const k1=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],k2=e("trash-2",k1);const p1=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],p2=e("triangle-alert",p1);const l1=[["path",{d:"M13.73 4a2 2 0 0 0-3.46 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3Z",key:"14u9p9"}]],l2=e("triangle",l1);const _1=[["path",{d:"m19 5 3-3",key:"yk6iyv"}],["path",{d:"m2 22 3-3",key:"19mgm9"}],["path",{d:"M6.3 20.3a2.4 2.4 0 0 0 3.4 0L12 18l-6-6-2.3 2.3a2.4 2.4 0 0 0 0 3.4Z",key:"goz73y"}],["path",{d:"M7.5 13.5 10 11",key:"7xgeeb"}],["path",{d:"M10.5 16.5 13 14",key:"10btkg"}],["path",{d:"m12 6 6 6 2.3-2.3a2.4 2.4 0 0 0 0-3.4l-2.6-2.6a2.4 2.4 0 0 0-3.4 0Z",key:"1snsnr"}]],_2=e("unplug",_1);const M1=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],M2=e("upload",M1);const m1=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],m2=e("wrench",m1);const v1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],v2=e("x",v1);export{g1 as A,f1 as B,b1 as C,P1 as D,Z1 as E,E1 as F,S1 as G,B1 as H,H1 as I,K1 as J,X1 as K,O1 as L,F1 as M,k2 as N,V1 as O,Y1 as P,l2 as Q,a2 as R,s2 as S,p2 as T,_2 as U,u1 as V,m2 as W,v2 as X,A1 as Y,h2 as Z,y2 as _,w1 as a,n2 as b,I1 as c,N1 as d,C1 as e,j1 as f,R1 as g,T1 as h,U1 as i,t2 as j,D1 as k,r2 as l,c2 as m,J1 as n,Q1 as o,W1 as p,e2 as q,q1 as r,z1 as s,$1 as t,G1 as u,i2 as v,d2 as w,o2 as x,M2 as y,L1 as z};
File without changes