PageSourceSearch

https://kalpintelligence.com/_next/static/chunks/114-0564012dcf3a2f81.js

js kalpintelligence.com collected 2026-10-09 22:50:30 UTC 20,554 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[114],{7235:(e,a,s)=>{s.d(a,{d:()=>o});var t=s(95155),r=s(12115),n=s(22017),i=s(25016);let o=r.forwardRef((e,a)=>{let{className:s,...r}=e;return(0,t.jsx)(n.bL,{className:(0,i.cn)("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",s),...r,ref:a,children:(0,t.jsx)(n.zi,{className:(0,i.cn)("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})})});o.displayName=n.bL.displayName},32667:(e,a,s)=>{s.d(a,{Jc:()=>r,PG:()=>i,iL:()=>t,oA:()=>n,qO:()=>o});let t={todo:{parent:"todo",children:["todo_tasks","todo_goals","todo_routines","todo_reports"]},cms:{parent:"cms",children:["cms_pages","cms_posts","cms_categories","website"]}};function r(e,a){for(let s of Object.values(t))if(s.children.includes(a))return s.children.some(a=>e.includes(a))?e.includes(a):e.includes(s.parent);return e.includes(a)}let n=[{key:"dashboard",label:"Overview",description:"Main dashboard overview",group:"Main",alwaysOn:!0},{key:"todo",label:"Work",description:"Tasks, goals, routines, and reports navigation",group:"Main"},{key:"todo_tasks",label:"Work \xb7 Tasks",description:"Tasks option inside the Work navigation",group:"Work navigation"},{key:"todo_goals",label:"Work \xb7 Goals & KPIs",description:"Goals & KPIs option inside the Work navigation",group:"Work navigation"},{key:"todo_routines",label:"Work \xb7 Routines",description:"Routines option inside the Work navigation",group:"Work navigation"},{key:"todo_reports",label:"Work \xb7 Reports",description:"Reports & Analytics option inside the Work navigation",group:"Work navigation"},{key:"monitor",label:"Monitor",description:"Service monitoring dashboard",group:"Main"},{key:"deployments",label:"Deployments",description:"Deployment management and tracking",group:"Main"},{key:"leads",label:"Leads",description:"Lead management and tracking",group:"CRM"},{key:"clients",label:"Clients",description:"Client management",group:"CRM"},{key:"products",label:"Businesses",description:"Business and product management",group:"CRM"},{key:"projects",label:"Projects",description:"Project management and tracking",group:"Work"},{key:"plans",label:"Documents",description:"Document and plan creation and management",group:"Work"},{key:"drive",label:"Drive",description:"File storage, folders, and sharing",group:"Work"},{key:"invoices",label:"Invoices",description:"Invoice creation and management",group:"Finance"},{key:"expenses",label:"Expenses",description:"Monthly recurring expenses and breakdown",group:"Finance"},{key:"proposals",label:"Proposals",description:"Proposal creation and sending",group:"Finance"},{key:"khatabook",label:"Gram Books",description:"Daily revenue and expense ledger",group:"Finance"},{key:"debts",label:"Debts",description:"Debt tracking and management",group:"Finance"},{key:"team",label:"Team Members",description:"View team members and directory",group:"Team & HR"},{key:"attendance",label:"Attendance",description:"Attendance tracking and logs",group:"Team & HR"},{key:"assets",label:"Assets",description:"Company asset management",group:"Team & HR"},{key:"reimbursements",label:"Reimbursements",description:"Submit and track reimbursements",group:"Personal"},{key:"payslips",label:"Payslips",description:"View salary payslips",group:"Personal"},{key:"roadmap",label:"Roadmap",description:"Product roadmap and planning board",group:"Content"},{key:"movies",label:"Movie Party",description:"Movie party feature and events",group:"Content"},{key:"cms",label:"CMS",description:"Content management ~ Pages, Posts, Categories",group:"Content"},{key:"cms_pages",label:"CMS \xb7 Pages",description:"Pages option inside CMS navigation",group:"Content navigation"},{key:"cms_posts",label:"CMS \xb7 Posts",description:"Posts option inside CMS navigation",group:"Content navigation"},{key:"cms_categories",label:"CMS \xb7 Categories",description:"Categories option inside CMS navigation",group:"Content navigation"},{key:"website",label:"Website",description:"Website content and settings navigation",group:"Content navigation"}],i=["dashboard","todo","todo_tasks","todo_goals","todo_routines","todo_reports","roadmap","projects","plans","drive","expenses","khatabook","debts","attendance","reimbursements","payslips","team","cms","cms_pages","cms_posts","cms_categories","website"];function o(){let e={};for(let a of n)e[a.group]||(e[a.group]=[]),e[a.group].push(a);return e}},97733:(e,a,s)=>{s.r(a),s.d(a,{default:()=>A});var t=s(95155),r=s(12115),n=s(18720),i=s(919),o=s(17910),l=s(86651),d=s(18514),c=s(65229),u=s(20508),m=s(24033),p=s(27937),g=s(5917),h=s(97003),f=s(33789),x=s(7235),y=s(90235),v=s(47507),b=s(83209),j=s(33884),k=s(67812),w=s(70071),N=s(32667);function A(){let[e,a]=(0,r.useState)([]),[s,A]=(0,r.useState)(!0),[C,_]=(0,r.useState)(null),[F,R]=(0,r.useState)(""),[S,O]=(0,r.useState)(null),[P,M]=(0,r.useState)(null),[W,E]=(0,r.useState)([]),[T,G]=(0,r.useState)(!0),[L,D]=(0,r.useState)(!1),[I,U]=(0,r.useState)(""),[z,B]=(0,r.useState)("specific"),[$,q]=(0,r.useState)(["dashboard"]),[J,V]=(0,r.useState)(null),[Z,H]=(0,r.useState)([]),K=(0,N.qO)();async function Q(){try{let e=await fetch("/api/users/access");if(!e.ok)throw Error("Failed to fetch");let s=await e.json();a(s.employees||[])}catch(e){n.oR.error("Failed to load employees")}finally{A(!1)}}async function X(){G(!0);try{let e=await fetch("/api/users/access-groups");
1if(!e.ok)throw Error("Failed to fetch groups");let a=await e.json();E(a.groups||[])}catch(e){n.oR.error("Failed to load access groups")}finally{G(!1)}}async function Y(s,t){var r,i;let o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,l=arguments.length>3?arguments[3]:void 0,d=[...new Set([...t,"dashboard"])],c=e.find(e=>e._id===s),u=(null==l?void 0:l.featureAdminFor)!==void 0?l.featureAdminFor:null!=(r=null==c?void 0:c.featureAdminFor)?r:[],m=(null==l?void 0:l.featureReadOnlyFor)!==void 0?l.featureReadOnlyFor:null!=(i=null==c?void 0:c.featureReadOnlyFor)?i:[];a(e=>e.map(e=>e._id===s?{...e,featureAccess:d,accessGroupId:o,featureAdminFor:u,featureReadOnlyFor:m}:e)),_(s);try{let e=await fetch("/api/users/access",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({userId:s,featureAccess:d,accessGroupId:o,featureAdminFor:u,featureReadOnlyFor:m})});if(!e.ok){let a=await e.json().catch(()=>({}));throw Error(a.message||"Failed to save")}n.oR.success("Access updated")}catch(e){n.oR.error(e.message||"Failed to update access"),Q()}finally{_(null)}}async function ee(){if(!I.trim())return void n.oR.error("Group name is required");if("specific"===z&&0===$.length)return void n.oR.error("Select at least one feature");D(!0);try{let e=!!J,a=await fetch("/api/users/access-groups",{method:e?"PUT":"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({...e?{id:J}:{},name:I.trim(),type:z,featureAccess:"all"===z?N.oA.map(e=>e.key):$})}),s=await a.json().catch(()=>({}));if(!a.ok)throw Error(s.message||(e?"Failed to update group":"Failed to create group"));U(""),B("specific"),q(["dashboard"]),V(null),n.oR.success(e?"Access group updated":"Access group created"),X()}catch(e){n.oR.error(e.message||(J?"Failed to update group":"Failed to create group"))}finally{D(!1)}}async function ea(e){try{if(!(await fetch("/api/users/access-groups?id=".concat(e),{method:"DELETE"})).ok)throw Error();E(a=>a.filter(a=>a._id!==e)),n.oR.success("Group removed")}catch(e){n.oR.error("Failed to remove group")}}(0,r.useEffect)(()=>{Q(),X()},[]);let es=e.filter(e=>!e.isDismissed&&(e.name.toLowerCase().includes(F.toLowerCase())||e.email.toLowerCase().includes(F.toLowerCase())||e.title.toLowerCase().includes(F.toLowerCase())));return s?(0,t.jsx)("div",{className:"flex items-center justify-center h-96",children:(0,t.jsx)(i.A,{className:"w-8 h-8 animate-spin text-muted-foreground"})}):(0,t.jsxs)("div",{className:"space-y-6 w-full pb-20",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 mb-1",children:[(0,t.jsx)(o.A,{className:"w-6 h-6 text-primary"}),(0,t.jsx)("h2",{className:"text-3xl font-bold tracking-tight",children:"Roles & Access"})]}),(0,t.jsxs)("p",{className:"text-muted-foreground",children:["Control which dashboard areas each employee can open. Under ",(0,t.jsx)("strong",{children:"User & access"})," you can also mark"," ",(0,t.jsx)("strong",{children:"feature admin"})," (full manage for that module only) or ",(0,t.jsx)("strong",{children:"read only"})," (view without creating or editing, where enforced). Admins always have full access."]})]}),(0,t.jsxs)("div",{className:"relative max-w-sm",children:[(0,t.jsx)(l.A,{className:"absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground"}),(0,t.jsx)(f.p,{placeholder:"Search employees...",value:F,onChange:e=>R(e.target.value),className:"pl-9"})]}),(0,t.jsxs)(b.Zp,{children:[(0,t.jsxs)(b.aR,{children:[(0,t.jsx)(b.ZB,{children:"Access Groups"}),(0,t.jsx)(b.BT,{children:"Create named templates like all-access or specific-feature groups, then assign them to employees."})]}),(0,t.jsxs)(b.Wu,{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"grid gap-3 md:grid-cols-[1fr_180px_auto]",children:[(0,t.jsx)(f.p,{placeholder:"Group name (e.g. Sales, Operations)",value:I,onChange:e=>U(e.target.value)}),(0,t.jsxs)(v.l6,{value:z,onValueChange:e=>B(e),children:[(0,t.jsx)(v.bq,{children:(0,t.jsx)(v.yv,{})}),(0,t.jsxs)(v.gC,{children:[(0,t.jsx)(v.eb,{value:"all",children:"All features"}),(0,t.jsx)(v.eb,{value:"specific",children:"Specific features"})]})]}),(0,t.jsxs)(h.$,{onClick:ee,disabled:L||!I.trim(),children:[L?(0,t.jsx)(i.A,{className:"h-4 w-4 animate-spin mr-1"}):null,J?"Save changes":"Create group"]})]}),J&&(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(h.$,{variant:"ghost",size:"sm",onClick:function(){V(null),U(""),B("specific"),q(["dashboard"])},children:"Cancel edit"})}),"specific"===z&&(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-2 border rounded-lg p-3",children:N.oA.map(e=>
1{let a=$.includes(e.key);return(0,t.jsxs)("label",{className:"flex items-start gap-2 text-sm",children:[(0,t.jsx)(x.d,{checked:a,disabled:e.alwaysOn,onCheckedChange:()=>{var a;return a=e.key,void q(e=>{let s=new Set(e);return"dashboard"===a||(s.has(a)?s.delete(a):s.add(a),s.add("dashboard")),Array.from(s)})}}),(0,t.jsx)("span",{children:e.label})]},e.key)})}),T?(0,t.jsxs)("div",{className:"text-sm text-muted-foreground flex items-center gap-2",children:[(0,t.jsx)(i.A,{className:"h-4 w-4 animate-spin"}),"Loading groups..."]}):0===W.length?(0,t.jsx)("p",{className:"text-sm text-muted-foreground",children:"No access groups yet."}):(0,t.jsx)("div",{className:"space-y-2",children:W.map(e=>(0,t.jsxs)("div",{className:"border rounded-lg p-3 flex items-center justify-between gap-3",children:[(0,t.jsxs)("div",{className:"min-w-0",children:[(0,t.jsx)("p",{className:"font-medium truncate",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"all"===e.type?"All features":"".concat(e.featureAccess.length," specific features")})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsxs)(h.$,{variant:"ghost",size:"sm",onClick:()=>{V(e._id),U(e.name),B(e.type),q("all"===e.type?N.oA.map(e=>e.key):[...new Set(["dashboard",...e.featureAccess])])},children:[(0,t.jsx)(d.A,{className:"h-4 w-4 mr-1"}),"Edit"]}),(0,t.jsxs)(h.$,{variant:"ghost",size:"sm",className:"text-destructive",onClick:()=>ea(e._id),children:[(0,t.jsx)(c.A,{className:"h-4 w-4 mr-1"}),"Remove"]})]})]},e._id))})]})]}),0===es.length&&!s&&(0,t.jsx)(b.Zp,{children:(0,t.jsxs)(b.Wu,{className:"py-12 text-center text-muted-foreground",children:[(0,t.jsx)(u.A,{className:"w-12 h-12 mx-auto mb-4 opacity-30"}),(0,t.jsx)("p",{className:"font-medium",children:"No employees found"}),(0,t.jsx)("p",{className:"text-sm mt-1",children:F?"Try a different search term":"Add employees from the Team page first"})]})}),es.map(a=>{var s;let r=S===a._id,n=a.featureAccess.filter(e=>{var a;return!(null==(a=N.oA.find(a=>a.key===e))?void 0:a.alwaysOn)}).length,o=N.oA.filter(e=>!e.alwaysOn).length;return(0,t.jsxs)(b.Zp,{className:"overflow-hidden",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 px-6 py-4 cursor-pointer hover:bg-muted/30 transition-colors",onClick:()=>O(r?null:a._id),children:[(0,t.jsx)(j.Avatar,{className:"h-10 w-10 border",children:a.avatarUrl?(0,t.jsx)(j.AvatarImage,{src:a.avatarUrl,alt:a.name}):(0,t.jsx)(j.AvatarFallback,{className:"text-sm font-medium",children:a.name?a.name.split(" ").map(e=>e[0]).join("").slice(0,2).toUpperCase():a.email[0].toUpperCase()})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("h3",{className:"font-semibold truncate",children:a.name||a.email}),a.isLoginDisabled&&(0,t.jsx)(k.E,{variant:"destructive",className:"text-[10px] px-1.5",children:"Disabled"})]}),(0,t.jsx)("p",{className:"text-sm text-muted-foreground truncate",children:[a.title,a.department].filter(
1Boolean).join(" \xb7 ")||a.email}),a.accessGroupId&&(0,t.jsxs)("p",{className:"text-[11px] text-muted-foreground mt-0.5",children:["Group: ",(null==(s=W.find(e=>e._id===a.accessGroupId))?void 0:s.name)||"Assigned"]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsxs)(v.l6,{value:a.accessGroupId||"none",onValueChange:e=>(function(e,a){if("none"===a)return void Y(e._id,e.featureAccess,null);let s=W.find(e=>e._id===a);s&&Y(e._id,s.featureAccess,s._id,{featureAdminFor:[],featureReadOnlyFor:[]})})(a,e),children:[(0,t.jsx)(v.bq,{className:"h-8 w-[190px]",onClick:e=>e.stopPropagation(),children:(0,t.jsx)(v.yv,{placeholder:"Assign group"})}),(0,t.jsxs)(v.gC,{children:[(0,t.jsx)(v.eb,{value:"none",children:"No group"}),W.map(e=>(0,t.jsx)(v.eb,{value:e._id,children:e.name},e._id))]})]}),(0,t.jsxs)(k.E,{variant:"secondary",className:"text-xs",children:[n,"/",o," features"]}),C===a._id?(0,t.jsx)(i.A,{className:"w-4 h-4 animate-spin text-muted-foreground"}):r?(0,t.jsx)(m.A,{className:"w-4 h-4 text-muted-foreground"}):(0,t.jsx)(p.A,{className:"w-4 h-4 text-muted-foreground"})]})]}),r&&(0,t.jsxs)("div",{className:"border-t",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-6 py-3 bg-muted/20 border-b",children:[(0,t.jsx)("span",{className:"text-xs text-muted-foreground font-medium mr-auto",children:"Quick actions:"}),(0,t.jsxs)(h.$,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:e=>{e.stopPropagation(),H([]),M({type:"grant-all",employee:a})},children:[(0,t.jsx)(g.A,{className:"w-3 h-3 mr-1"}),"Grant All"]}),(0,t.jsx)(h.$,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:e=>{e.stopPropagation(),M({type:"reset-default",employee:a})},children:"Reset to Default"})]}),(0,t.jsx)("div",{className:"px-6 py-4 space-y-6",children:(0,t.jsxs)("div",{className:"rounded-lg border bg-muted/15 p-4 space-y-4",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-sm font-semibold",children:"User & access ~ all features"}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1",children:"Access opens the area in the app. Feature admin grants manage actions like a global admin for that module only (for example creating clients when Clients is on). Read only blocks create/edit where the API supports it."})]}),Object.entries(K).map(s=>{let[r,n]=s;return(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"text-xs font-semibold uppercase tracking-wider text-muted-foreground mb-3",children:r}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:n.map(s=>{let r=(0,N.Jc)(a.featureAccess,s.key),n=s.alwaysOn,i=(a.featureAdminFor||[]).includes(s.key),o=(a.featureReadOnlyFor||[]).includes(s.key);return(0,t.jsxs)("div",{className:"flex items-start gap-3 p-3 rounded-lg border transition-colors ".concat(r?"bg-primary/5 border-primary/20":"bg-muted/20 border-transparent"," ").concat(n?"opacity-60":""),children:[(0,t.jsx)(x.d,{checked:r,disabled:n||C===a._id,onCheckedChange:()=>(function(a,s){let t=N.oA.find(e=>e.key===s);if(null==t?void 0:t.alwaysOn)return;let r=e.find(e=>e._id===a._id);if(!r)return;let n=new Set(r.featureAccess),i=Object.values(N.iL).find(e=>e.children.includes(s));i&&!i.children.some(e=>n.has(e))&&n.has(i.parent)&&i.children.forEach(e=>n.add(e)),n.has(s)?n.delete(s):n.add(s);let o=Array.from(n),l=(r.featureAdminFor||[]).filter(e=>o.includes(e)),d=(r.featureReadOnlyFor||[]).filter(e=>o.includes(e));Y(r._id,o,null,{featureAdminFor:l,featureReadOnlyFor:d})})(a,s.key),className:"mt-0.5"}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(y.J,{className:"text-sm font-medium cursor-pointer",children:s.label}),n&&(0,t.jsx)(k.E,{variant:"secondary",className:"text-[10px] px-1",children:"Always on"}),r&&i&&(0,t.jsx)(k.E,{variant:"outline",className:"text-[10px] px-1",children:"Admin"}),r&&o&&(0,t.jsx)(k.E,{variant:"secondary",className:"text-[10px] px-1",children:"Read only"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed",children:s.description}),r&&!n&&(0,t.jsxs)("div",{className:"mt-3 flex flex-wrap gap-x-4 gap-y-2 border-t border-border/60 pt-2",children:[(0,t.jsxs)("label",{className:"inline-flex items-center gap-2 text-[11px] text-muted-foreground cursor-pointer",children:[(0,t.jsx)(x.d,{checked:i,disabled:C===a._id||o,onCheckedChange:()=>(function(a,s){var t;let r=e.find(e=>e._id===a._id);if(!r||!r.featureAccess.includes(s))return;
1let n=new Set(r.featureAdminFor||[]),i=new Set(r.featureReadOnlyFor||[]);n.has(s)?n.delete(s):(n.add(s),i.delete(s)),Y(r._id,r.featureAccess,null!=(t=r.accessGroupId)?t:null,{featureAdminFor:Array.from(n),featureReadOnlyFor:Array.from(i)})})(a,s.key)}),"Feature admin"]}),(0,t.jsxs)("label",{className:"inline-flex items-center gap-2 text-[11px] text-muted-foreground cursor-pointer",children:[(0,t.jsx)(x.d,{checked:o,disabled:C===a._id||i,onCheckedChange:()=>(function(a,s){var t;let r=e.find(e=>e._id===a._id);if(!r||!r.featureAccess.includes(s))return;let n=new Set(r.featureAdminFor||[]),i=new Set(r.featureReadOnlyFor||[]);n.has(s)||(i.has(s)?i.delete(s):i.add(s),Y(r._id,r.featureAccess,null!=(t=r.accessGroupId)?t:null,{featureAdminFor:Array.from(n),featureReadOnlyFor:Array.from(i)}))})(a,s.key)}),"Read only"]})]})]})]},s.key)})})]},r)})]})})]})]},a._id)}),(0,t.jsx)(w.T,{open:!!P,onOpenChange:e=>{e||(M(null),H([]))},title:(null==P?void 0:P.type)==="grant-all"?"Grant All Access":"Reset to Default",description:(null==P?void 0:P.type)==="grant-all"?"This will give ".concat(P.employee.name||P.employee.email," access to every dashboard feature (").concat(N.oA.length," keys). Use the list below to optionally grant feature-level admin (full manage for that module only)."):"This will reset ".concat((null==P?void 0:P.employee.name)||(null==P?void 0:P.employee.email)||"this employee","'s access back to the default set of features. Any custom permissions will be lost."),confirmLabel:(null==P?void 0:P.type)==="grant-all"?"Grant All":"Reset",variant:(null==P?void 0:P.type)==="reset-default"?"destructive":"default",isLoading:!!C,onConfirm:()=>{if(P){if("grant-all"===P.type){var e=P.employee;let a=N.oA.map(e=>e.key);Y(e._id,a,null,{featureAdminFor:Z,featureReadOnlyFor:[]})}else Y(P.employee._id,[...N.PG],null,{featureAdminFor:[],featureReadOnlyFor:[]});H([]),M(null)}},children:(null==P?void 0:P.type)==="grant-all"?(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-foreground",children:"Optional: feature-level admin"}),(0,t.jsx)("div",{className:"max-h-[44vh] overflow-y-auto rounded-lg border p-2 space-y-1",children:N.oA.filter(e=>!e.alwaysOn).map(e=>(0,t.jsxs)("label",{className:"flex items-center gap-2 rounded-md px-2 py-1.5 text-xs hover:bg-muted/50 cursor-pointer",children:[(0,t.jsx)(x.d,{checked:Z.includes(e.key),onCheckedChange:a=>H(s=>{let t=new Set(s);return a?t.add(e.key):t.delete(e.key),Array.from(t)})}),(0,t.jsx)("span",{children:e.label})]},e.key))})]}):void 0})]})}}}]);

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.