1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[52834],{2186:(e,r,n)=>{n.d(r,{A:()=>t});var t=(0,n(30313).A)("outline","x","IconX",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]])},5843:(e,r,n)=>{n.d(r,{A:()=>o});var t=n(95155),s=n(89761),a=n(24048),l=n(57102);let i=[{value:"1",label:"24h"},{value:"7",label:"7d"},{value:"30",label:"30d"}];function o(e){let{description:r}=e,[n,o]=(0,s.ZA)("askDays",l._D);return(0,t.jsxs)("div",{className:"flex flex-col gap-3 [container-type:inline-size] sm:flex-row sm:items-center sm:justify-between sm:gap-4",children:["string"==typeof r?(0,t.jsx)("p",{className:"h-8 min-w-0 truncate text-sm leading-8 text-foreground/75 sm:flex-1 [@container(max-width:640px)]:hidden",children:r}):r,(0,t.jsx)("div",{className:"ml-auto shrink-0",children:(0,t.jsx)(a.A,{size:"sm",ariaLabel:"Analytics window",options:i,value:n,onChange:e=>void o(e)})})]})}},15532:(e,r,n)=>{n.d(r,{A:()=>t});var t=(0,n(30313).A)("outline","chevron-left","IconChevronLeft",[["path",{d:"M15 6l-6 6l6 6",key:"svg-0"}]])},33789:(e,r,n)=>{n.d(r,{p:()=>l});var t=n(95155),s=n(12115),a=n(25016);let l=s.forwardRef((e,r)=>{let{className:n,type:s,...l}=e;return(0,t.jsx)("input",{type:s,className:(0,a.cn)("border-input flex h-10 w-full rounded-md border bg-background px-3 py-2 text-base ring-offset-background transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-0 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",n),ref:r,...l})});l.displayName="Input"},34357:(e,r,n)=>{n.d(r,{YQ:()=>s,d7:()=>l});var t=n(12115);function s(e,r,n,s){var a=this,l=(0,t.useRef)(null),i=(0,t.useRef)(0),o=(0,t.useRef)(0),c=(0,t.useRef)(null),d=(0,t.useRef)([]),u=(0,t.useRef)(),m=(0,t.useRef)(),x=(0,t.useRef)(e),h=(0,t.useRef)(!0);x.current=e;var f="undefined"!=typeof window,p=!r&&0!==r&&f;if("function"!=typeof e)throw TypeError("Expected a function");r=+r||0;var g=!!(n=n||{}).leading,v=!("trailing"in n)||!!n.trailing,b="maxWait"in n,j="debounceOnServer"in n&&!!n.debounceOnServer,w=b?Math.max(+n.maxWait||0,r):null;return(0,t.useEffect)(function(){return h.current=!0,function(){h.current=!1}},[]),(0,t.useMemo)(function(){var e=function(e){var r=d.current,n=u.current;return d.current=u.current=null,i.current=e,o.current=o.current||e,m.current=x.current.apply(n,r)},n=function(e,r){p&&cancelAnimationFrame(c.current),c.current=p?requestAnimationFrame(e):setTimeout(e,r)},t=function(e){if(!h.current)return!1;var n=e-l.current;return!l.current||n>=r||n<0||b&&e-i.current>=w},y=function(r){return c.current=null,v&&d.current?e(r):(d.current=u.current=null,m.current)},N=function e(){var s=Date.now();if(g&&o.current===i.current&&k(),t(s))return y(s);if(h.current){var a=r-(s-l.current);n(e,b?Math.min(a,w-(s-i.current)):a)}},k=function(){s&&s({})},A=function(){if(f||j){var s=Date.now(),o=t(s);if(d.current=[].slice.call(arguments),u.current=a,l.current=s,o){if(!c.current&&h.current)return i.current=l.current,n(N,r),g?e(l.current):m.current;if(b)return n(N,r),e(l.current)}return c.current||n(N,r),m.current}};return A.cancel=function(){var e=c.current;e&&(p?cancelAnimationFrame(c.current):clearTimeout(c.current)),i.current=0,d.current=l.current=u.current=c.current=null,e&&s&&s({})},A.isPending=function(){return!!c.current},A.flush=function(){return c.current?y(Date.now()):m.current},A},[g,b,r,w,v,p,f,j,s])}function a(e,r){return e===r}function l(e,r,n){var l=n&&n.equalityFn||a,i=(0,t.useRef)(e),o=(0,t.useState)({})[1],c=s((0,t.useCallback)(function(e){i.current=e,o({})},[o]),r,n,o),d=(0,t.useRef)(e);return l(d.current,e)||(c(e),d.current=e),[i.current,c]}},40674:(e,r,n)=>{n.d(r,{A:()=>l});var t=n(95155),s=n(99099),a=n(7220);function l(e){var r;let{value:n,options:l,onChange:i,align:o="start",className:c,ariaLabel:d,disabled:u=!1}=e,m=l.find(e=>e.value===n);return(0,t.jsxs)(a.rI,{modal:!1,children:[(0,t.jsxs)(a.ty,{type:"button",disabled:u,"aria-label":d,className:"flex items-center justify-between gap-2 rounded-lg border border-border bg-card px-3 py-2 text-sm text-foreground shadow-sm hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring disabled:cursor-not-allowed disabled:opacity-50 ".concat(null!=c?c:""),children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-2",children:[null==m?void 0:m.icon,(0,t.jsx)("span",{className:"truncate",children:null!=(r=null==m?void 0:m.label)?r:"Select..."})]}),(0,t.jsx)(s.A,{size:14,className:"shrink-0 text-muted-foreground"})]}),(0,t.jsx)(a.SQ,{align:o,className:"max-h-72 overflow-y-auto",children:(0,t.jsx)(a.Hr,{value:n,onValueChange:i,children:l.map(e=>(0,t.jsx)(a.Ht,{value:e.value,className:"cursor-pointer",children:e.icon?(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[e.icon,e.label]}):e.label},e.value))})})]})}},44542:(e,r,n)=>{n.d(r,{A:()=>t});var t=(0,n(30313).A)("outline","world","IconWorld",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M3.6 9h16.8",key:"svg-1"}],["path",{d:"M3.6 15h16.8",key:"svg-2"}],["path",{d:"M11.5 3a17 17 0 0 0 0 18",key:"svg-3"}],["path",{d:"M12.5 3a17 17 0 0 1 0 18",key:"svg-4"}]])},49045:(e,r,n)=>{n.d(r,{v9:()=>x,sJ:()=>m,fn:()=>u,QJ:()=>d});var t=n(95155),s=n(44542),a=(0,n(30313).A)("outline","question-mark","IconQuestionMark",[["path",{d:"M8 8a3.5 3 0 0 1 3.5 -3h1a3.5 3 0 0 1 3.5 3a3 3 0 0 1 -2 3a3 4 0 0 0 -2 4",key:"svg-0"}],["path",{d:"M12 19l0 .01",key:"svg-1"}]]),l=n(59442),i=n(66504);let o={browser:{label:"Browser",color:"#A8A29E",Logo:()=>(0,t.jsx)(s.A,{size:14,stroke:1.75,"aria-hidden":"true"})},unknown:{label:"Unknown",color:"#78716C",Logo:()=>(0,t.jsx)(a,{size:14,stroke:1.75,"aria-hidden":"true"})}};function c(e){let r=(0,l.sO)(e);return r?{label:r.name,color:r.chartColor,Logo:r.Logo}:o[e]}function d(e){var r,n;return null!=(n=null==(r=c(e))?void 0:r.label)?n:e}function u(e){var r,n;return null!=(n=null==(r=c(e))?void 0:r.color)?n:"hsl(var(--foreground))"}function m(e){var r;let{client:n}=e,s=null==(r=c(n))?void 0:r.Logo;return(0,t.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background text-muted-foreground",children:s?(0,t.jsx)(s,{}):(0,t.jsx)("span",{className:"text-[10px] font-medium uppercase",children:n.slice(0,1)})})}let x=i.yT.options},51467:(e,r,n)=>{n.d(r,{B:()=>t});let t="rounded-lg bg-card shadow-sm transition-colors hover:border-emerald-500 focus:border-ring focus-visible:ring-1 focus-visible:ring-ring"},52834:(e,r,n)=>{n.r(r),n.d(r,{AskLogPanel:()=>A});var t=n(95155),s=n(12115),a=n(89761),l=n(34357),i=n(77252),o=n(2186),c=(0,n(30313).A)("outline","message-circle-question","IconMessageCircleQuestion",[["path",{d:"M15.02 19.52c-2.341 .736 -5 .606 -7.32 -.52l-4.7 1l1.3 -3.9c-2.324 -3.437 -1.426 -7.872 2.1 -10.374c3.526 -2.501 8.59 -2.296 11.845 .48c1.649 1.407 2.575 3.253 2.742 5.152",key:"svg-0"}],["path",{d:"M19 22v.01",key:"svg-1"}],["path",{d:"M19 19a2.003 2.003 0 0 0 .914 -3.782a1.98 1.98 0 0 0 -2.414 .483",key:"svg-2"}]]),d=n(12746),u=n(40674),m=n(33789),x=n(51467),h=n(85114),f=n(38754),p=n(90643),g=n(57102),v=n(5843),b=n(49045),j=n(41318);let w=[{value:"all",label:"All agents"},...b.v9.map(e=>({value:e,label:(0,b.QJ)(e),icon:(0,t.jsx)(b.sJ,{client:e})}))],y=new Intl.DateTimeFormat("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",hour12:!1,timeZone:"UTC"});function N(e){let r=new Date(e);return Number.isNaN(r.getTime())?e:"".concat(y.format(r)," UTC")}let k={client:"all",search:""};function A(e){var r;let{teamspaceId:n,siteKey:b}
1=e,[y]=(0,a.ZA)("askDays",g._D),[N,A]=(0,s.useState)(k),[M,S]=(0,s.useState)({days:y,page:0}),q=M.days===y?M.page:0,z=e=>S({days:y,page:e}),[D,I]=(0,s.useState)(null),[R]=(0,l.d7)(N.search.trim(),300),T={client:"all"===N.client?void 0:N.client,search:R||void 0},E=(0,p.xw)({teamspaceId:n,siteKey:b,page:q,filters:{...T,days:y}}),L=e=>{A(r=>({...r,...e})),z(0),I(null)},Q=!!(T.client||T.search);if(E.isPending)return(0,t.jsx)(j.h,{});let P=null==(r=E.data)?void 0:r.data,F=P?Math.max(1,Math.ceil(P.total/P.pageSize)):1;return(0,t.jsxs)("div",{className:"flex flex-col gap-6",children:[(0,t.jsx)(v.A,{description:"Every question agents asked, newest first, with the answer each one received"}),(0,t.jsxs)(d.A,{padding:"compact",children:[(0,t.jsxs)("div",{className:"flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-center",children:[(0,t.jsxs)("label",{className:"relative min-w-0 flex-1 sm:min-w-[220px]",children:[(0,t.jsx)("span",{className:"sr-only",children:"Search questions"}),(0,t.jsx)(i.A,{size:16,stroke:1.75,"aria-hidden":"true",className:"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(m.p,{type:"search",value:N.search,onChange:e=>L({search:e.target.value}),maxLength:200,placeholder:"Search questions",className:"h-9 pl-9 ".concat(x.B)})]}),(0,t.jsx)(u.A,{ariaLabel:"Agent",value:N.client,options:w,onChange:e=>L({client:e}),className:"h-9 sm:w-44"}),Q?(0,t.jsxs)(f.$n,{variant:"secondary",size:"md",onClick:()=>L(k),children:[(0,t.jsx)(o.A,{size:16,stroke:1.75,"aria-hidden":"true"}),"Clear"]}):null]}),E.isError?(0,t.jsx)("div",{className:"mt-4",children:(0,t.jsx)(f.Fx,{children:"Unable to load the log."})}):P&&0!==P.total?(0,t.jsxs)("div",{"aria-busy":E.isPlaceholderData,className:"mt-4 flex flex-col transition-opacity motion-reduce:transition-none ".concat(E.isPlaceholderData?"opacity-60":""),children:[(0,t.jsx)("div",{className:"-mx-2 overflow-x-auto sm:-mx-4",children:(0,t.jsxs)("table",{className:"w-full text-left",children:[(0,t.jsx)("thead",{children:(0,t.jsxs)("tr",{className:"border-b border-border",children:[(0,t.jsx)("th",{scope:"col",className:"".concat(f.e4," w-[150px] whitespace-nowrap"),children:"Time"}),(0,t.jsx)("th",{scope:"col",className:"".concat(f.e4," w-[150px]"),children:"Agent"}),(0,t.jsx)("th",{scope:"col",className:f.e4,children:"Question"}),(0,t.jsx)("th",{scope:"col",className:"".concat(f.e4," w-[110px]"),children:"Answer"})]})}),(0,t.jsx)("tbody",{children:P.rows.map(e=>(0,t.jsx)(C,{row:e,open:D===e.id,onToggle:()=>I(r=>r===e.id?null:e.id),teamspaceId:n,siteKey:b},e.id))})]})}),(0,t.jsx)(h.A,{page:P.page,totalPages:F,canNext:P.page+1<F,onChange:e=>{z(e),I(null)}})]}):(0,t.jsx)("div",{className:"mt-2",children:(0,t.jsx)(f.Sv,{icon:(0,t.jsx)(c,{size:24,stroke:1.5}),title:Q?"No questions match these filters":"No questions in this period",size:"compact",action:Q?(0,t.jsx)(f.$n,{variant:"secondary",onClick:()=>L(k),children:"Clear filters"}):void 0,children:Q?"Pick a longer period or clear the filters.":"Questions appear here as agents ask them."})})]})]})}function C(e){let{row:r,open:n,onToggle:s,teamspaceId:a,siteKey:l}=e;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("tr",{role:"button",tabIndex:0,"aria-expanded":n,onClick:s,onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s())},className:"".concat(f.fZ," cursor-pointer border-b border-border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring ").concat(n?"bg-accent":""),children:[(0,t.jsx)("td",{className:"".concat(f.hC," whitespace-nowrap text-sm text-muted-foreground"),children:N(r.at)}),(0,t.jsx)("td",{className:f.hC,children:(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)(b.sJ,{client:r.client}),(0,t.jsx)("span",{className:"truncate text-sm text-foreground",children:(0,b.QJ)(r.client)})]})}),(0,t.jsx)("td",{className:"".concat(f.hC," max-w-0"),children:(0,t.jsx)("span",{className:"block truncate text-sm text-foreground",title:r.question,children:r.question})}),(0,t.jsx)("td",{className:f.hC,children:r.answered?(0,t.jsx)(f.vw,{tone:"emerald",children:"Answered"}):(0,t.jsx)(f.vw,{tone:"amber",children:"No match"})})]}),n?(0,t.jsx)("tr",{className:"border-b border-border",children:(0,t.jsx)("td",{colSpan:4,className:"px-2 py-5 sm:px-4",children:(0,t.jsx)(M,{row:r,teamspaceId:a,siteKey:l})})}):null]})}function M(e){var r;let n,{row:s,teamspaceId:a,siteKey:l}
1=e,i=(0,p.rE)({teamspaceId:a,siteKey:l,questionId:s.answered?s.id:null});return n=s.answered?i.isPending?(0,t.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading answerâ¦"}):i.isError?(0,t.jsxs)("div",{role:"alert",className:"space-y-3 text-sm",children:[(0,t.jsx)("p",{children:i.error.message}),(0,t.jsx)(f.$n,{variant:"secondary",onClick:()=>void i.refetch(),children:"Try again"})]}):(null==(r=i.data)?void 0:r.data.answer)?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("pre",{className:"max-h-[480px] overflow-auto whitespace-pre-wrap break-words font-mono text-xs leading-5 text-foreground [overflow-wrap:anywhere]",children:i.data.data.answer}),i.data.data.truncated?(0,t.jsx)("p",{className:"mt-3 text-xs text-muted-foreground",children:"Answer shortened by the storage limit."}):null]}):(0,t.jsx)("p",{className:"text-sm leading-6 text-muted-foreground",children:"The answer is no longer available. Answers are kept for 60 days."}):(0,t.jsx)("p",{className:"text-sm leading-6 text-muted-foreground",children:"Nothing on the site matched this question, so the agent was told so."}),(0,t.jsxs)("section",{"aria-label":"Question and answer",className:"mx-auto w-full max-w-2xl space-y-4",children:[(0,t.jsxs)("div",{className:"ms-auto w-fit min-w-0 max-w-[90%] rounded-xl rounded-tr-sm border border-border/40 bg-muted/60 px-4 py-3 sm:max-w-[85%]",children:[(0,t.jsxs)("div",{className:"mb-2 flex flex-wrap items-baseline justify-between gap-x-6 gap-y-1 text-xs",children:[(0,t.jsx)("span",{className:"font-medium",children:(0,b.QJ)(s.client)}),(0,t.jsx)("span",{className:"text-muted-foreground",children:N(s.at)})]}),(0,t.jsx)("p",{className:"whitespace-pre-wrap text-sm leading-6 [overflow-wrap:anywhere]",children:s.question})]}),(0,t.jsxs)("div",{className:"w-fit min-w-0 max-w-[95%] rounded-xl rounded-tl-sm border border-border/60 bg-card px-4 py-3",children:[(0,t.jsx)("p",{className:"mb-2 text-xs font-medium",children:"Context7 Ask"}),n]})]})}},77252:(e,r,n)=>{n.d(r,{A:()=>t});var t=(0,n(30313).A)("outline","search","IconSearch",[["path",{d:"M10 10m-7 0a7 7 0 1 0 14 0a7 7 0 1 0 -14 0",key:"svg-0"}],["path",{d:"M21 21l-6 -6",key:"svg-1"}]])},85114:(e,r,n)=>{n.d(r,{A:()=>i});var t=n(95155),s=n(15532),a=n(95585);let l="flex items-center gap-1 rounded-lg border border-border px-2.5 py-1 text-sm text-muted-foreground transition-colors hover:bg-muted focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-40";function i(e){let{page:r,totalPages:n,canNext:i,onChange:o}=e;return n<=1?null:(0,t.jsxs)("div",{className:"mt-auto flex items-center justify-between pt-3",children:[(0,t.jsxs)("span",{"aria-live":"polite",className:"text-xs text-muted-foreground",children:["Page ",r+1," of ",n]}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>o(Math.max(0,r-1)),disabled:0===r,className:l,children:[(0,t.jsx)(s.A,{"aria-hidden":"true",size:14}),"Prev"]}),(0,t.jsxs)("button",{type:"button",onClick:()=>o(r+1),disabled:!i,className:l,children:["Next",(0,t.jsx)(a.A,{"aria-hidden":"true",size:14})]})]})]})}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.