PageSourceSearch

https://vizuara.ai/assets/AdminComplaints-DFlMvIVs.js

js vizuara.ai collected 2026-10-05 13:15:21 UTC 19,525 bytes, 1 lines download raw bytes

1import{R as J,r,j as e}from"./vendor-react-hRGeXtCl.js";import{B as Z}from"./badge-PzEDaj62.js";import{aG as ye,dn as E,b as I,dp as Re,L as X,dq as z,bK as f,I as Se,a4 as Le,a as Te,B as Ae,dr as fe,ds as he,dt as pe,ae as ke,af as Ie,ah as Fe,K as Me,S as G,d as W,e as Q,f as Y,g as C,aS as Ke}from"./index-W8Ef7Ftb.js";import{M as Oe}from"./message-square-kzHm5WrF.js";import{S as je}from"./send-ZiivAhBj.js";import{C as ge,c as ve,a as Ue,b as ze,d as Ve}from"./card-TBF_aZ5z.js";import{T as Be,a as _e,b as Ne,c as O,d as $e,e as U}from"./table-WXkJVi7l.js";import{R as He,a as be,K as qe,b as Ge}from"./resizable-BYODwWKN.js";import{S as We}from"./switch-C_9fvHom.js";import{I as Qe}from"./info-B9a6svsW.js";import{C as Ye}from"./chevron-left-9SdBOGrp.js";import"./vendor-common-BosuxZz1.js";import"./grip-vertical-BBXgKYQt.js";const Je={SUBMITTED:"outline",UNDER_REVIEW:"secondary",RESOLVED:"default",ESCALATED:"destructive"},Xe={COMMENT:"secondary",STATUS_CHANGE:"default",ASSIGNED:"outline",ESCALATED:"destructive",RESOLVED:"default"},we=J.forwardRef(({complaint:t,onResolved:n},o)=>{const{user:D}=ye(),[x,h]=r.useState([]),[g,m]=r.useState(!1),N=J.useRef(null),d=async()=>{if(t.status===E.RESOLVED)return;if((await z.resolveComplaint(t.id,D.id)).success){f({title:"Complaint Resolved"}),n==null||n();return}f({title:"Failed to resolve complaint",variant:"destructive"})};r.useImperativeHandle(o,()=>({container:N.current,resolve:d})),r.useEffect(()=>{(async()=>{if(t!=null&&t.id){m(!0);try{const c=await z.getComplaintActions(t.id);console.log("Fetched actions:",c),c.success&&c.data&&h(c.data)}catch(c){console.error("Failed to fetch actions:",c)}finally{m(!1)}}})()},[t.id]);const p=i=>{try{return new URL(i),!0}catch{return!1}},u=i=>i instanceof Date?i.toLocaleString():i!=null&&i.toDate?i.toDate().toLocaleString():"—";return e.jsxs("div",{ref:N,tabIndex:-1,className:"flex flex-col border rounded-lg bg-card focus:outline-none h-full",children:[e.jsxs("div",{className:"px-4 py-2 border-b space-y-0.5",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-semibold text-sm",children:"Complaint Details"}),e.jsx(Z,{variant:Je[t.status],children:t.status})]}),t.status!==E.RESOLVED&&e.jsxs(I,{size:"sm",className:"gap-1.5 h-7 text-xs",onClick:d,children:[e.jsx(Re,{className:"h-3.5 w-3.5"}),"Resolve"]})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[t.userName," (",t.userEmail,") · #",t.id]})]}),e.jsxs("div",{className:"flex-1 grid grid-cols-2 divide-x min-h-0",children:[e.jsxs("div",{className:"px-4 py-3 overflow-auto space-y-3",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-sm",children:[e.jsx(k,{label:"Category",value:t.category}),e.jsx(k,{label:"Severity",value:t.severity}),t.relatedEntityId&&(p(t.relatedEntityId)?e.jsxs("div",{className:"col-span-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Related Entity"}),e.jsx("a",{href:t.relatedEntityId,target:"_blank",rel:"noopener noreferrer",className:"block text-primary underline underline-offset-2 hover:opacity-80 break-all text-sm",children:t.relatedEntityId})]}):e.jsx(k,{label:"Related Entity",value:t.relatedEntityId})),e.jsx(k,{label:"Created",value:u(t.createdAt)}),t.assignedTo&&e.jsx(k,{label:"Assigned To",value:t.assignedTo})]}),e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-semibold mb-1 text-muted-foreground uppercase tracking-wide",children:"Description"}),e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.description})]}),t.imageUrls&&t.imageUrls.length>0&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-semibold mb-1 text-muted-foreground uppercase tracking-wide",children:"Attachments"}),e.jsx("div",{className:"grid grid-cols-2 gap-2",children:t.imageUrls.map((i,c)=>e.jsx("a",{href:i,target:"_blank",rel:"noreferrer",className:"group",children:e.jsx("img",{src:i,alt:`Attachment ${c+1}`,className:"h-16 w-full object-cover rounded-md border group-hover:opacity-90 transition"})},c))})]}),t.resolutionSummary&&e.jsxs("div",{children:[e.jsx("h4",{className:"text-xs font-semibold mb-1 text-muted-foreground uppercase tracking-wide",children:"Resolution Summary"}),e.jsx("p",{className:"text-sm whitespace-pre-wrap",children:t.resolutionSummary})]})]}),e.jsxs("div",{className:"px-4 py-3 overflow-auto",children:[e.jsxs("h4",{className:"text-xs font-semibold mb-2 text-muted-foreground uppercase tracking-wide flex items-center gap-2",children:[e.jsx(Oe,{className:"h-3.5 w-3.5"}
1),"Activity Log (",x.length,")"]}),g?e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(X,{className:"h-4 w-4 animate-spin"})}):x.length===0?e.jsx("p",{className:"text-sm text-muted-foreground text-center py-4",children:"No activity yet"}):e.jsx("div",{className:"space-y-2",children:x.map(i=>e.jsx(Ze,{action:i},i.id))})]})]})]})});we.displayName="ComplaintDetailPanel";function k({label:t,value:n}){return e.jsxs("div",{className:"flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:t}),e.jsx("span",{className:"text-sm font-medium",children:n})]})}function Ze({action:t}){const n=o=>o instanceof Date?o.toLocaleString():o!=null&&o.toDate?o.toDate().toLocaleString():"—";return e.jsxs("div",{className:"border rounded-md p-2 bg-muted/30",children:[e.jsx(Z,{variant:Xe[t.actionType]||"outline",className:"text-[10px] h-5",children:t.actionType}),t.comment&&e.jsx("p",{className:"mt-1.5 text-base whitespace-pre-wrap",children:t.comment}),e.jsx("p",{className:"mt-1 text-[10px] text-muted-foreground",children:n(t.createdAt)})]})}const Ce=J.forwardRef(({complaint:t,userId:n,onSent:o},D)=>{const[x,h]=r.useState(`Update regarding complaint #${t.id}`),[g,m]=r.useState(""),[N,d]=r.useState(!1),p=r.useRef(null),u=r.useRef(null),i=r.useRef(null);r.useImperativeHandle(D,()=>({focusSubject:()=>{var l;return(l=u.current)==null?void 0:l.focus()},focusMessage:()=>{var l;return(l=i.current)==null?void 0:l.focus()},container:p.current})),r.useEffect(()=>{h(`Update regarding complaint #${t.id}`),m("")},[t.id]);const c=l=>{l.key==="Escape"&&l.currentTarget.blur(),l.key==="Enter"&&(l.ctrlKey||l.metaKey)&&(l.preventDefault(),F())},F=async()=>{if(!x.trim()||!g.trim()){f({title:"Missing fields",description:"Email subject and message are required.",variant:"destructive"});return}d(!0);try{const l=await Te.getToken(),b=await(await fetch(`${Ae}/sendComplaintRedressalMail`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${l}`},body:JSON.stringify({to:t.userEmail,subject:x,message:g,complaintId:t.id,status:t.status,isInternal:!1})})).json();if(b.success)h(""),m(""),(await z.resolveComplaint(t.id,n,g)).success?f({title:"Email sent & complaint resolved"}):f({title:"Email sent but failed to resolve complaint",variant:"destructive"}),o==null||o();else throw new Error(b.error)}catch(l){f({title:"Failed to send email",description:l.message||"Try again",variant:"destructive"})}finally{d(!1)}};return e.jsxs("div",{ref:p,tabIndex:-1,className:"flex flex-col border rounded-lg bg-card focus:outline-none",children:[e.jsxs("div",{className:"px-4 py-2 border-b",children:[e.jsxs("h3",{className:"text-sm font-semibold flex items-center gap-1.5",children:[e.jsx(je,{className:"h-3.5 w-3.5"}),"Send Redressal Email"]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["To: ",t.userEmail]})]}),e.jsxs("div",{className:"px-4 py-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Subject"}),e.jsx(Se,{ref:u,value:x,onChange:l=>h(l.target.value),onKeyDown:c,placeholder:"Email subject",className:"h-8 text-sm mt-1"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs font-medium text-muted-foreground",children:"Message"}),e.jsx(Le,{ref:i,value:g,onChange:l=>m(l.target.value),onKeyDown:c,placeholder:"Write your message to the user...",rows:3,className:"text-sm mt-1 resize-none"})]}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(I,{size:"sm",onClick:F,disabled:N,className:"gap-1.5",children:[e.jsx(je,{className:"h-3.5 w-3.5"}),N?"Sending...":"Send Email"]})})]})]})});Ce.displayName="ComplaintRedressalMailPanel";const ms=()=>{const{user:t}=ye(),[n,o]=r.useState({data:[],hasNextPage:!1,hasPreviousPage:!1,totalCount:0}),[D,x]=r.useState(!1),[h,g]=r.useState(""),[m,N]=r.useState(""),[d,p]=r.useState(null),[u,i]=r.useState(-1),[c,F]=r.useState("ALL"),[l,ee]=r.useState("ALL"),[b,se]=r.useState("ALL"),[te]=r.useState(10),[v,V]=r.useState({cursor:null,pageDirection:"next",currentPage:1}),[B,ae]=r.useState(null),[re,ne]=r.useState(!1);r.useEffect(()=>{fe.getCustomerSupportEnabled().then(ae)},[]);const Ee=async s=>{if(B!==null){ne(!0);try{await fe.setCustomerSupportEnabled(s),ae(s),f({title:`Customer Support ${s?"enabled":"disabled"} for users`})}catch{f({title:"Failed to update setting",variant:"destructive"})}finally{ne(!1)}}},_=r.useRef(null),le=r.useRef(null),$=r.useRef(null),M=r.useRef(null);r.useEffect(()=>{const s=setTimeout(()=>
1{N(h),V({cursor:null,pageDirection:"next",currentPage:1})},400);return()=>clearTimeout(s)},[h]);const K=r.useCallback(async()=>{x(!0);try{const s=[];c!=="ALL"&&s.push({field:"status",op:"==",value:c}),l!=="ALL"&&s.push({field:"severity",op:"==",value:he[l]}),b!=="ALL"&&s.push({field:"category",op:"==",value:pe[b]});const a=await z.getComplaints(s,{limit:te,orderBy:{field:"createdAt",direction:"desc"},cursor:v.cursor,pageDirection:v.pageDirection});if(!a.success||!a.data){f({title:"Error",description:"Failed to load complaints",variant:"destructive"});return}let j=a.data.data;if(m.trim()){const S=m.toLowerCase();j=j.filter(w=>{var R,L,T;return((R=w.userName)==null?void 0:R.toLowerCase().includes(S))||((L=w.userEmail)==null?void 0:L.toLowerCase().includes(S))||((T=w.description)==null?void 0:T.toLowerCase().includes(S))})}o({data:j,hasNextPage:a.data.hasNextPage,hasPreviousPage:a.data.hasPreviousPage,nextCursor:a.data.nextCursor,previousCursor:a.data.previousCursor,totalCount:a.data.totalCount})}catch(s){console.error(s),f({title:"Error",description:"Something went wrong",variant:"destructive"})}finally{x(!1)}},[m,c,l,b,v,te]);r.useEffect(()=>{K()},[K]);const P=r.useCallback(s=>{s<0||s>=n.data.length||(i(s),p(n.data[s]))},[n.data]),H=r.useCallback(()=>{n.hasNextPage&&V(s=>({cursor:n.nextCursor,pageDirection:"next",currentPage:s.currentPage+1}))},[n.hasNextPage,n.nextCursor]),q=r.useCallback(()=>{!n.hasPreviousPage||v.currentPage<=1||V(s=>({cursor:n.previousCursor,pageDirection:"previous",currentPage:s.currentPage-1}))},[n.hasPreviousPage,n.previousCursor,v.currentPage]);r.useEffect(()=>{const s=a=>{var w,R,L,T,ie,ce,oe,de,ue,xe,me;const j=(w=a.target)==null?void 0:w.tagName,S=j==="INPUT"||j==="TEXTAREA"||j==="SELECT";if((a.ctrlKey||a.metaKey)&&a.shiftKey&&a.key==="R"){a.preventDefault(),d&&((R=$.current)==null||R.resolve());return}if(a.key==="Escape"){S?a.target.blur():(p(null),i(-1));return}if(!S)switch(a.key){case"/":{a.preventDefault(),(L=le.current)==null||L.focus();break}case"ArrowDown":case"j":{a.preventDefault();const A=u<n.data.length-1?u+1:u;P(A);const y=(T=_.current)==null?void 0:T.querySelector(`[data-row-index="${A}"]`);y==null||y.scrollIntoView({block:"nearest"});break}case"ArrowUp":case"k":{a.preventDefault();const A=u>0?u-1:u;P(A);const y=(ie=_.current)==null?void 0:ie.querySelector(`[data-row-index="${A}"]`);y==null||y.scrollIntoView({block:"nearest"});break}case"n":{a.preventDefault(),H();break}case"p":{a.preventDefault(),q();break}case"d":{a.preventDefault(),(oe=(ce=$.current)==null?void 0:ce.container)==null||oe.focus();break}case"m":{a.preventDefault(),(ue=(de=M.current)==null?void 0:de.container)==null||ue.focus();break}case"s":{a.preventDefault(),(xe=M.current)==null||xe.focusSubject();break}case"e":{a.preventDefault(),(me=M.current)==null||me.focusMessage();break}}};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[u,n.data.length,P,H,q]),r.useEffect(()=>{if(d){const s=n.data.find(a=>a.id===d.id);if(s){p(s);const a=n.data.indexOf(s);i(a)}else p(null),i(-1)}},[n.data]);const De=s=>{switch(s){case E.RESOLVED:return"default";case E.UNDER_REVIEW:return"secondary";case E.ESCALATED:return"destructive";default:return"outline"}},Pe=(s,a=100)=>s?s.length>a?s.slice(0,a)+"...":s:"—";return D&&n.data.length===0?e.jsx(e.Fragment,{children:e.jsx(ge,{children:e.jsx(ve,{className:"py-10 flex justify-center",children:e.jsx(X,{className:"h-8 w-8 animate-spin"})})})}):e.jsx(e.Fragment,{children:e.jsxs(He,{direction:"horizontal",className:"h-full",children:[e.jsx(be,{defaultSize:d?40:100,minSize:25,children:e.jsxs(ge,{className:"h-full flex flex-col",children:[e.jsxs(Ue,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx(ze,{children:"Complaints"}),e.jsxs(Ve,{children:["Manage and resolve user complaints (Page ",v.currentPage,")"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[re&&e.jsx(X,{className:"h-3.5 w-3.5 animate-spin text-muted-foreground"}),e.jsx("label",{className:"text-sm font-medium text-muted-foreground cursor-pointer select-none",htmlFor:"customer-support-switch",children:"Customer Support"}),e.jsx(We,{id:"customer-support-switch",checked:B??!1,onCheckedChange:Ee,disabled:B===null||re,className:"cursor-pointer"})]}),e.jsxs(ke,{children:[e.jsx(Ie,{asChild:!0,children:e.jsx(I,{variant:"ghost",size:"icon",className:"h-8 w-8 shrink-0","aria-label":"Keyboard shortcuts",children:e.jsx(Qe,{className:"h-4 w-4"})})}),e.jsxs(Fe,{align:"end",className:"w-72 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 font-semibold",children:[e.jsx(qe,{className:"h-4 w-4"}),"Keyboard Shortcuts"]}),e.jsxs("ul",{className:"space-y-2 text-muted-foreground",children:[e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Search"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"/"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Navigate rows"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"↑ / ↓ or j / k"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Next page"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"N"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Previous page"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"P"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Focus detail panel"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"D"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Focus mail panel"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"M"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Focus subject field"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"S"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Focus message field"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"E"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Resolve complaint"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"Ctrl/Cmd + Shift + R"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Send mail"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"Ctrl/Cmd + Enter"})]}),e.jsxs("li",{className:"flex justify-between",children:[e.jsx("span",{children:"Deselect / Blur"}),e.jsx("span",{className:"font-mono text-xs bg-muted px-1.5 py-0.5 rounded",children:"Esc"})]})]}),e.jsx("p",{className:"mt-3 text-xs text-muted-foreground border-t pt-2",children:"Click any row or use arrow keys to select a complaint. Both detail and mail panels open automatically."})]})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-3 mt-3",children:[e.jsxs("div",{className:"relative max-w-sm w-full",children:[e.jsx(Me,{className:"absolute left-3 top-3 h-4 w-4 text-muted-foreground"}),e.jsx(Se,{ref:le,placeholder:"Search by user or description ( / )",value:h,onChange:s=>g(s.target.value),className:"pl-9"})]}),e.jsxs(G,{value:c,onValueChange:s=>F(s),children:[e.jsx(W,{className:"w-44",children:e.jsx(Q,{placeholder:"Status"})}),e.jsxs(Y,{children:[e.jsx(C,{value:"ALL",children:"All Status"}),Object.values(E).map(s=>e.jsx(C,{value:s,children:s},s))]})]}),e.jsxs(G,{value:l,onValueChange:s=>ee(s),children:[e.jsx(W,{className:"w-40",children:e.jsx(Q,{placeholder:"Severity"})}),e.jsxs(Y,{children:[e.jsx(C,{value:"ALL",children:"All Severity"}),Object.values(he).map(s=>e.jsx(C,{value:s,children:s},s))]})]}),e.jsxs(G,{value:b,onValueChange:s=>se(s),children:[e.jsx(W,{className:"w-40",children:e.jsx(Q,{placeholder:"Category"})}),e.jsxs(Y,{children:[e.jsx(C,{value:"ALL",children:"All Categories"}
1),Object.values(pe).map(s=>e.jsx(C,{value:s,children:s},s))]})]})]})]}),e.jsxs(ve,{className:"flex-1 overflow-auto",ref:_,children:[e.jsxs(Be,{children:[e.jsx(_e,{children:e.jsxs(Ne,{children:[e.jsx(O,{children:"User"}),e.jsx(O,{children:"Description"}),e.jsx(O,{children:"Status"}),e.jsx(O,{children:"Created"})]})}),e.jsx($e,{children:n.data.map((s,a)=>e.jsxs(Ne,{"data-row-index":a,className:`cursor-pointer transition-colors ${u===a?"bg-accent":"hover:bg-muted/50"}`,onClick:()=>P(a),tabIndex:0,onKeyDown:j=>{j.key==="Enter"&&P(a)},children:[e.jsx(U,{children:e.jsxs("div",{className:"text-sm",children:[e.jsx("div",{className:"font-medium",children:s.userName}),e.jsx("div",{className:"text-muted-foreground text-xs",children:s.userEmail}),e.jsxs("div",{className:"text-muted-foreground/60 text-[10px] font-mono mt-0.5",children:["#",s.id]})]})}),e.jsx(U,{children:e.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 max-w-xs",children:Pe(s.description,120)})}),e.jsx(U,{children:e.jsx(Z,{variant:De(s.status),children:s.status})}),e.jsx(U,{className:"text-sm whitespace-nowrap",children:s.createdAt instanceof Date?s.createdAt.toLocaleDateString():"—"})]},s.id))})]}),e.jsxs("div",{className:"flex justify-between items-center py-4",children:[e.jsxs("div",{className:"text-sm text-muted-foreground",children:["Page ",v.currentPage]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(I,{variant:"outline",size:"sm",disabled:!n.hasPreviousPage||v.currentPage<=1,onClick:q,children:[e.jsx(Ye,{className:"h-4 w-4"})," Previous"]}),e.jsxs(I,{variant:"outline",size:"sm",disabled:!n.hasNextPage,onClick:H,children:["Next ",e.jsx(Ke,{className:"h-4 w-4"})]})]})]})]})]})}),d&&e.jsxs(e.Fragment,{children:[e.jsx(Ge,{withHandle:!0}),e.jsx(be,{defaultSize:60,minSize:30,children:e.jsxs("div",{className:"flex flex-col gap-3 h-full overflow-hidden pl-2",children:[e.jsx("div",{className:"flex-1 min-h-0 overflow-auto",children:e.jsx(we,{ref:$,complaint:d,onResolved:K})}),e.jsx("div",{className:"shrink-0",children:e.jsx(Ce,{ref:M,complaint:d,userId:t.id,onSent:K})})]})})]})]})})};export{ms as default};

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.