1import{e as v}from"./regexCcuTG5WM.js";import{c as u}from"./chunkReloadRecoveryrjuMb-b8.js";import{c as k,U as I}from"./browserTabsCpW6SD42.js";import{i as M}from"./tourGateGu4icdk6.js";const o={loginPrefsSelf:["username","displayed name","email","password","pin","user type","google","apple","passkey","face id","touch id","windows hello","security key"],loginPrefs:["username","displayed name","email","password","pin","user type","google","apple"],familyManagement:["remove from family","remove child","remove user","delete user","delete child","leave family","leave this family","family members","membership","move a member","transfer user"],opening:["open with","open in kindredly","youtube","default search engine","open other apps","always open in app","external apps","phone links"],search:["search","search options","search targets","explore","web search","wikipedia","ask ai","settings in search","search sidekick","show library results","default search engine"],activity:["usage overview","time limit status","usage limit status","access controls","override","extra time"],history:["browsing history","activity history","activity logging","record my activity","turn off logging"],insights:["where time went","domains","topics","creators","sites","history insights","time by resource","time well spent"],filtering:["web filtering","library access only","library only","library mode","explore catalog","block site","block website","blocked sites","custom rules","content blocking","filter strictness","image censoring","temporary overrides","presets","assistant","assistant reviews requests","auto approve","guidelines","ai review","automatic approval","help improve image filtering","improve filter","share data"],usageLimits:["time limits","usage limits","screen time","schedule","daily limit","counting rules","category rules","app category","counts as","usage type"],blocked:["installed apps","blocked","block app","blocked apps","app blocking","app limits","turned off","social media","browsers","vpn","app stores","remote access","phone apps"],checkin:["check in","checkin","daily check-in","reminder","daily reminder","habit","routine"],websites:["youtube","reddit","google","ai overview","ai mode"],encryption:["end-to-end encryption","recovery key","reset password"],clients:["devices","sessions","clients","sign ins","logged in"],auditLog:["security events"],accessRequests:["approve","ask to add"]},S={title:"My Settings",type:"personal",sections:[{items:[{label:"Overview",icon:"grid-1x2",to:"/settings/home",description:"Who is in the family, and what is set right now",pathMatch:"/home",featureId:"personalSettings.dashboard"},{label:"Appearance",icon:"palette",to:"/settings/uiappearance",childrenInPage:!0,children:[{label:"Appearance",icon:"palette",to:"/settings/uiappearance",description:"Theme, and how pages look",keywords:["general","theme","dark mode","background","home shortcuts","pinned items","quickbar","menu style","mobile browser mode","internal browser","system browser","open links"],pathMatch:"/uiappearance",featureId:"personalSettings.appearance"}]}],divider:!0},{header:"Limits & filtering",items:[{label:"Usage",icon:"activity",to:"/settings/activity",childrenInPage:!0,children:[{label:"Usage Overview",icon:"activity",to:"/settings/activity",description:"Today's time, and the access controls",keywords:o.activity,pathMatch:["/activity","/usage"],featureId:"personalSettings.activityOverview"},{label:"History",icon:"clock-history",to:"/settings/history",description:"What was opened, and when",keywords:o.history,pathMatch:"/history",featureId:"personalSettings.history"},{label:"Insights",icon:"bar-chart",to:"/settings/insights",description:"Where the time went",keywords:o.insights,pathMatch:"/insights",featureId:"personalSettings.insights"},{label:"My Access Requests",icon:"key",to:"/settings/accessrequests",description:"Things you asked a parent to allow",keywords:o.accessRequests,pathMatch:"/accessrequests",showCondition:"nonAdmin",featureId:"personalSettings.accessRequests"}]},{label:"Time limits",icon:"hourglass-split",to:"/settings/usagelimits",description:"How long you can use sites and apps each day",keywords:[...o.usageLimits,...o.checkin],pathMatch:"/usagelimits",featureId:"personalSettings.usageLimits"},{label:"Web filtering",icon:"funnel",to:"/settings/filtering",childrenInPage:!0,children:[{label:"Filtering and blocking",icon:"funnel",pathMatch:"/settings/filtering",to:"/settings/filtering",description:"Library mode, blocked sites, strictness and image censoring",keywords:o.filtering,
1showCondition:"admin",featureId:"personalSettings.contentFiltering"},{label:"Website Settings",icon:"globe2",to:"/settings/websites",description:"Website view preferences",keywords:o.websites,pathMatch:"/websites",featureId:"personalSettings.websiteSettings"}]},{label:"App blocking",icon:"slash-circle",to:"/settings/blocked",description:"Apps installed on your phone or Mac",keywords:o.blocked,pathMatch:"/blocked"}]},{header:"Apps & content",items:[{label:"Apps",icon:"grid-3x3-gap-fill",to:"/settings/coreapps",childrenInPage:!0,children:[{label:"Default Apps",icon:"grid-3x3-gap",to:"/settings/coreapps",description:"Which app opens each kind of thing",keywords:["launchpad","taskbar buttons","show taskbar","default apps","core apps","email","browser","notes","audio player","app builder","app editor","built-in apps","podcast player"],pathMatch:"/coreapps",featureId:"personalSettings.taskbar"},{label:"Open With Settings",icon:"eye",to:"/settings/opening",description:"Where links open, other apps, and the search engine",keywords:o.opening,pathMatch:"/opening",featureId:"personalSettings.openWith"},{label:"Command Bar",icon:"terminal",to:"/settings/commandbar",description:"The slash commands in the search box",keywords:["command bar","slash","/","shortcut","hotkey","keyboard","commands","palette","spotlight","assistant button","remembered approvals","always allow"],pathMatch:"/commandbar",featureId:"personalSettings.commandBar"},{label:"Downloads",icon:"arrow-down-circle",to:"/settings/downloads",description:"Podcasts saved for offline",keywords:["podcast downloads","offline","audio cache","storage"],pathMatch:"/downloads",featureId:"personalSettings.audioDownloads"}]},{label:"Email",icon:"envelope",to:"/settings/email",description:"Connect Gmail and choose allowed senders",keywords:["gmail","allowed senders","connect email"],pathMatch:"/email",featureId:"personalSettings.email"},{label:"Tasks and Calendar",icon:"calendar3",to:"/settings/tasks",description:"Tasks, events and rewards",keywords:["tasks","calendar","events","event","month","due","rewards","appointment","schedule"],pathMatch:"/tasks",featureId:"personalSettings.tasks"},{label:"Search",icon:"search",to:"/settings/search",pathMatch:"/settings/search",keywords:o.search,featureId:"personalSettings.search"},{label:"AI",icon:"chat-dots",to:"/settings/aichat",childrenInPage:!0,children:[{label:"Kinbot",icon:"chat-dots",to:"/settings/aichat",description:"Turn Kinbot on",keywords:["kinbot","assistant","ai chat","chat","chatbot","who can use it","what it changed","undo"],pathMatch:"/aichat",featureId:"personalSettings.aiChat"},{label:"Voice",icon:"soundwave",to:"/settings/voice",description:"Speech, dictation and the wake word",keywords:["voice","voice mode","wake word","speech mode","dictation","text to speech","read aloud","microphone","whisper","kokoro"],pathMatch:"/voice",featureId:"personalSettings.aiVoice"},{label:"AI Usage",icon:"speedometer2",to:"/settings/aiusage",description:"How much AI your family has used",keywords:["tokens","usage window"],pathMatch:"/aiusage",featureId:"personalSettings.aiUsage"},{label:"Advanced",icon:"sliders",to:"/settings/aiadvanced",description:"Language model, image generation, and what Kinbot may do",keywords:["capabilities","acting without asking","ai provider","language model","ollama","built-in model","image generation","image provider","stable diffusion"],pathMatch:"/aiadvanced",featureId:"personalSettings.aiAdvanced"}]},{label:"Subscriptions",icon:"rss",to:"/settings/mysubscriptionlist",childrenInPage:!0,children:[{label:"Subscriptions",icon:"rss",to:"/settings/mysubscriptionlist",keywords:["feeds","subscription groups"],pathMatch:"/mysubscriptionlist",featureId:"personalSettings.subscriptions"}]},{label:"Today Page",description:"What appears on your Today page, and in what order",icon:"sun",to:"/settings/today",keywords:["today","today page","day view","widgets","reading","waiting for you","usage card","tasks widget"],pathMatch:"/today",featureId:"personalSettings.today"}]},{header:"Sign-in & privacy",items:[{label:"Login",icon:"person-square",to:"/settings/loginprefs",childrenInPage:!0,children:[{label:"Login",icon:"person-square",to:"/settings/loginprefs",description:"Username, email, password, PIN and passkeys",keywords:o.loginPrefsSelf,pathMatch:"/loginprefs",featureId:"personalSettings.loginSettings"},{label:"Public Profile",icon:"file-person-fill",to:"/settings/publicprofile",description:"Picture, a few words about you, and who can see them",ke
1ywords:["profile image","about","visibility","share profile"],pathMatch:"/publicprofile",showCondition:"admin",featureId:"menu.publicProfile"}]},{label:"Notifications",icon:"bell",to:"/settings/notifications",pathMatch:"/notifications",keywords:["email notifications","mobile notifications","delivery channels"],featureId:"personalSettings.notifications"},{label:"Devices",icon:"phone",to:"/settings/devices",childrenInPage:!0,children:[{label:"Devices",icon:"phone",to:"/settings/devices",description:"Every device in your family, and what each one is doing",keywords:["devices","phones","computers","linked","family devices"],pathMatch:"/settings/devices",featureId:"userManagement.deviceControls"},{label:"This device",icon:"phone",to:"/settings/device",description:"Protection and monitoring on this device",keywords:["kindredly guard","phone","android","app limits","uninstall protection","browser protection","browser setup","unlock settings","companion","protection"],pathMatch:"/device",featureId:"menu.deviceControls"},{label:"Admin code",icon:"key",to:"/settings/admincode",description:"The code that unlocks the Companion",keywords:["admin code","unlock","pin","companion","code","password","protection"],pathMatch:"/admincode",featureId:"menu.deviceControls"},{label:"Developer: Server",icon:"hdd-network",to:"/settings/box",description:"The server this app talks to",keywords:["box","server","official server","custom server","switch server","certificate","trust","kindredly.local","https","other devices","developer"],pathMatch:"/box",showCondition:"developer"},{label:"Your devices",icon:"phone",to:"/settings/mydevice",description:"Which of your devices are linked, and what is recorded on them",keywords:["protection","blocked","why","monitoring","recording","my device","my devices","phone","linked","kindredly guard"],pathMatch:"/mydevice",featureId:"menu.myDeviceStatus"}]},{label:"Privacy",icon:"lock-fill",to:"/settings/privacy",childrenInPage:!0,children:[{label:"Privacy",icon:"shield-lock",to:"/settings/privacy",description:"What is protected, and your way back in",keywords:["privacy","recovery key","who can see","encrypted"],pathMatch:"/privacy",featureId:"menu.privacy"},{label:"Encryption",icon:"lock-fill",to:"/settings/encryption",description:"Keys, recovery mode and unlock methods",keywords:o.encryption,pathMatch:"/encryption",featureId:"menu.encryption"},{label:"Signed-in sessions",icon:"hdd-stack",to:"/settings/clients",description:"Where you are signed in",keywords:o.clients,pathMatch:"/clients",featureId:"menu.clients"},{label:"Audit Log",icon:"journal-text",to:"/settings/auditlog",description:"Security events on your sign-in",keywords:o.auditLog,pathMatch:"/auditlog",featureId:"menu.auditLog"}]},{label:"Storage & backup",icon:"database-fill",to:"/settings/storage",description:"Backups, imports and the space you use",keywords:["storage","backup","restore","export library","import bookmarks","json import","files","attachments","space usage","clean up files","keep history for","history retention"],pathMatch:["/storage","/userfiles","/exportdata","/importdata","/importbookmarks"]},{label:"Features",icon:"puzzle",to:"/settings/extendedfeatures",childrenInPage:!0,featureId:"menu.optionalFeatures",children:[{label:"Manage Features",icon:"puzzle",to:"/settings/extendedfeatures",keywords:["extended features","experimental features","optional features","advanced mode"],pathMatch:"/extendedfeatures",featureId:"menu.extendedFeatures"}]}]},{header:"Help",items:[{label:"Help",icon:"question-circle",to:"/help",pathMatch:"/help",featureId:"personalSettings.help"},{label:"Security Guidance",icon:"shield-check",to:"/settings/security",keywords:["safe web setup","security guide"],pathMatch:"/security",featureId:"menu.securityGuidance"},{label:"Report a Bug",icon:"bug",to:"/settings/bugreport",pathMatch:"/settings/bugreport"},{label:"Take the tour",icon:"compass",to:"/?tour=start",pathMatch:"/?tour=start",keywords:["tutorial","guided tour","walkthrough","getting started","how to"],showCondition:"guidedTour"},{label:"Version",icon:"info-circle",modal:"version-status-modal"}]},{items:[{label:"Developer Options",icon:"braces",showCondition:"developer",to:"/developer/home",pathMatch:"/developer"}]}]},C={title:"Family & Account",type:"family",sections:[{items:[{label:"Dashboard",icon:"grid-1x2",to:"/family/home",pathMatch:"/home",showCondition:"admin"}],divider:!0}
1,{header:"Family",items:[{label:"Members",icon:"people",to:"/family/members",keywords:["family members","add user","switch user","children","users"],pathMatch:"/members",showCondition:"admin",featureId:"menu.friends"},{label:"Usage",icon:"clock-history",to:"/family/usage",keywords:["screen time","usage","limits","check-in","activity","kids"],pathMatch:"/usage",showCondition:"admin"},{label:"Requests",icon:"key",to:"/family/accessrequests",keywords:[...o.accessRequests,"access requests"],pathMatch:"/accessrequests",featureId:"menu.accessRequests",showCondition:"admin"},{label:"Family Downtime",icon:"moon-stars",to:"/family/downtime",keywords:["downtime","bedtime","screens off","quiet hours","family downtime","curfew"],pathMatch:"/downtime",showCondition:"admin"},{label:"AI",icon:"stars",to:"/family/ai",keywords:["ai","artificial intelligence","private ai","turn off ai","ollama","kindredly.ai"],pathMatch:"/family/ai",showCondition:"admin"}]},{header:"Account",items:[{label:"Plan",icon:"person-badge",to:"/family/accountdetails",keywords:["plan","seats","storage","account id","account details"],pathMatch:"/accountdetails",featureId:"menu.storage",showCondition:"admin"},{label:"Account",icon:"wrench",to:"/family/account",keywords:["delete account","change plan","account actions","account settings"],pathMatch:"/account",featureId:"personalSettings.accountSettings",showCondition:"admin"},{label:"Membership",icon:"people",to:"/family/management",keywords:[...o.familyManagement,"family management"],pathMatch:"/management",featureId:"menu.familyManagement",showCondition:"admin"}]}]},P={title:"Developer Options",type:"developer",sections:[{items:[{label:"Developer Home",icon:"house",to:"/developer/home",pathMatch:"/developer/home"}],divider:!0},{header:"Diagnostics & Logging",items:[{label:"Diagnostics / Reset",icon:"arrow-counterclockwise",to:"/developer/diagnostics",pathMatch:"/developer/diagnostics"},{label:"Offline Fallback",icon:"wifi-off",to:"/developer/offline",pathMatch:"/developer/offline"},{label:"Local Tracing",icon:"activity",to:"/developer/tracing",pathMatch:"/developer/tracing"},{label:"Feature state",icon:"toggles",to:"/developer/features",pathMatch:"/developer/features",keywords:["features","registry","on","off","blocked","lifecycle","which features are on"]},{label:"Debug Console",icon:"terminal",to:"/settings/debugconsole",pathMatch:"/settings/debugconsole"}],divider:!0},{header:"Classification",items:[{label:"Dataset Generator",icon:"database-add",to:"/developer/dataset-generator",pathMatch:"/developer/dataset-generator"},{label:"Experiment Lab",icon:"flask",to:"/developer/experiment-lab",pathMatch:"/developer/experiment-lab"},{label:"Content Classification Test",icon:"file-earmark-check",to:"/developer/tests/document-classification",pathMatch:"/developer/tests/document-classification"},{label:"Trans Classification Test",icon:"translate",to:"/developer/tests/document-classification-2",pathMatch:"/developer/tests/document-classification-2"},{label:"Pipeline Results",icon:"list-check",to:"/developer/tests/pipeline-results",pathMatch:"/developer/tests/pipeline-results"},{label:"Image Class Test Results",icon:"image",to:"/developer/tests/image-class",pathMatch:"/developer/tests/image-class"}],divider:!0},{header:"Testing & Utilities",items:[{label:"Client Tests",icon:"bug",to:"/developer/client-tests",pathMatch:"/developer/client-tests"},{label:"Remote Toast Test",icon:"broadcast-pin",to:"/developer/remote-toast-test",pathMatch:"/developer/remote-toast-test"},{label:"MetaData Test",icon:"journal-text",to:"/developer/tests/metadata",pathMatch:"/developer/tests/metadata"},{label:"Use Item List Builder",icon:"tools",to:"/developer/item-list-builder",pathMatch:"/developer/item-list-builder"}]}]},A={title:"User Management",type:"management",sections:[{items:[{label:"Overview",icon:"grid-1x2",to:"/manage/user/{userId}/home",pathMatch:"/home",description:"Who they are, and what is set right now"}],divider:!0},{header:"Limits & filtering",items:[{label:"Usage",icon:"activity",to:"/manage/user/{userId}/activity",childrenInPage:!0,children:[{label:"Usage Overview",icon:"activity",pathMatch:"/activity",to:"/manage/u
1ser/{userId}/activity",description:"Today's time, and the access controls",keywords:o.activity},{label:"History",icon:"clock-history",pathMatch:"/history",to:"/manage/user/{userId}/history",description:"What was opened, and when",keywords:o.history},{label:"Insights",icon:"bar-chart",pathMatch:"/insights",to:"/manage/user/{userId}/insights",description:"Where the time went",keywords:o.insights,featureId:"userManagement.insights"},{label:"Access Requests",icon:"key",pathMatch:"/accessrequests",to:"/manage/user/{userId}/accessrequests",description:"Things they asked you to allow",keywords:o.accessRequests,featureId:"userManagement.accessRequests"}]},{label:"Time limits",icon:"hourglass-split",pathMatch:"/usagelimits",to:"/manage/user/{userId}/usagelimits",description:"How long they can use sites and apps each day",keywords:o.usageLimits},{label:"Web filtering",icon:"funnel",to:"/manage/user/{userId}/filtering",childrenInPage:!0,children:[{label:"Filtering and blocking",icon:"funnel",pathMatch:"/filtering",to:"/manage/user/{userId}/filtering",description:"Library mode, blocked sites, strictness and image censoring",keywords:o.filtering},{label:"Website Settings",icon:"globe2",pathMatch:"/websites",to:"/manage/user/{userId}/websites",description:"Website view preferences",keywords:o.websites}]},{label:"App blocking",icon:"slash-circle",pathMatch:"/blocked",to:"/manage/user/{userId}/blocked",description:"Apps installed on their Android phone or Mac",keywords:o.blocked,featureId:"userManagement.deviceControls"}]},{header:"Apps & content",items:[{label:"Open With",icon:"eye",to:"/manage/user/{userId}/opening",childrenInPage:!0,children:[{label:"Open With Settings",icon:"eye",pathMatch:"/opening",to:"/manage/user/{userId}/opening",description:"Open in Kindredly or elsewhere",keywords:o.opening}]},{label:"AI",icon:"chat-dots",to:"/manage/user/{userId}/assistant",childrenInPage:!0,featureId:"personalSettings.aiChat",children:[{label:"AI",icon:"chat-dots",pathMatch:"/assistant",to:"/manage/user/{userId}/assistant",description:"AI tools and Kinbot, for them",keywords:["kinbot","ai tools","assistant","ai","ai chat","chat","speech mode","wake word","voice","capabilities"],featureId:"personalSettings.aiChat"}]},{label:"Library",customIcon:{name:"library",width:16},pathMatch:"/userLibrary/",to:"/userLibrary/{userId}",description:"Their collections and saved things"},{label:"Subscriptions",icon:"rss",pathMatch:"/subscriptionlist",to:"/manage/user/{userId}/subscriptionlist",description:"Feeds they follow",featureId:"userManagement.subscriptions"}]},{header:"People",items:[{label:"Friends",icon:"people",pathMatch:"/friends",to:"/manage/user/{userId}/friends",description:"Who they are connected to",featureId:"userManagement.friends"},{label:"Sharing Feed",icon:"chat-square-text",pathMatch:"/sharefeed",to:"/manage/user/{userId}/sharefeed",description:"What they have shared",featureId:"userManagement.sharingFeed"},{label:"Email contacts",icon:"envelope",pathMatch:"/emailcontacts",to:"/manage/user/{userId}/emailcontacts",description:"Who they can email",keywords:["email","contacts","allowed senders","who can email","email allowlist","email safety","penpal"],featureId:"personalSettings.email"}]},{header:"Sign-in & privacy",items:[{label:"Login",icon:"person-gear",to:"/manage/user/{userId}/loginprefs",childrenInPage:!0,children:[{label:"Login",icon:"person-gear",pathMatch:"/loginprefs",to:"/manage/user/{userId}/loginprefs",description:"Username, password and PIN",keywords:o.loginPrefs}]},{label:"Devices",icon:"phone",to:"/manage/user/{userId}/devices",childrenInPage:!0,children:[{label:"Devices",icon:"phone",pathMatch:"/devices",to:"/manage/user/{userId}/devices",keywords:["kindredly guard","phone","android","app time","app limits","uninstall protection"],featureId:"userManagement.deviceControls"}]},{label:"Privacy",icon:"lock-fill",to:"/manage/user/{userId}/encryption",childrenInPage:!0,children:[{label:"Encryption",icon:"lock-fill",pathMatch:"/encryption",to:"/manage/user/{userId}/encryption",description:"Their encryption and recovery",keywords:o.encryption,featureId:"menu.encryption"},{label:"Signed-in sessions",icon:"hdd-stack",pathMatch:"/clients",to:"/manage/u
1ser/{userId}/clients",description:"Where they are signed in",keywords:o.clients,featureId:"menu.clients"},{label:"Audit Log",icon:"journal-text",pathMatch:"/auditlog",to:"/manage/user/{userId}/auditlog",description:"Security events on their account",keywords:o.auditLog,featureId:"menu.auditLog"}]},{label:"Features",icon:"puzzle",to:"/manage/user/{userId}/features",childrenInPage:!0,featureId:"menu.optionalFeatures",children:[{label:"Manage Features",icon:"puzzle",pathMatch:"/features",to:"/manage/user/{userId}/features",description:"Optional features, and the ones you grant them",keywords:["features","extended features","optional features","experimental features","email","speech mode","wake word","community content","app builder"],featureId:"menu.extendedFeatures"}]}]}]};function H(e){return e==="personal"?S:e==="management"?A:e==="family"?C:P}function T(e){const t=[];function s(n,c="",i){var r;for(const a of n){const l=c?`${c} > ${a.label}`:a.label;if(a.to||a.modal){const d=[a.label.toLowerCase(),...i?[i.toLowerCase()]:[],...(a.keywords||[]).map(h=>h.toLowerCase()),...(a.to||"").toLowerCase().split("/").filter(h=>h)];t.push({label:a.label,type:"internal-page",fullPath:l,icon:a.icon,customIcon:a.customIcon,to:(r=a.children)!=null&&r.length?w(a):a.to,modal:a.modal,ke
1ywords:d,parentLabel:i,showCondition:a.showCondition,featureId:a.featureId})}a.children&&a.children.length&&s(a.children,l,a.label)}}for(const n of e.sections)n.items&&s(n.items);return t}function N(e,t){const s=T(e),n=t.toLowerCase(),c=n.split(" ").filter(i=>i.length>0);return s.filter(i=>c.some(r=>i.keywords.some(a=>a.includes(r)))).sort((i,r)=>{const a=i.label.toLowerCase()===n,l=r.label.toLowerCase()===n;return a&&!l?-1:!a&&l?1:i.label.localeCompare(r.label)})}function B(e,t){if(!t||e.type!=="management")return e;const s=JSON.parse(JSON.stringify(e));return s.sections.forEach(n=>{var c;(c=n.items)==null||c.forEach(i=>{i.to&&(i.to=i.to.replace("{userId}",t)),i.children&&i.children.length&&i.children.forEach(r=>{r.to&&(r.to=r.to.replace("{userId}",t))})})}),s}function p(e){return String(e||"").trim().replace(/\/+$/,"").toLowerCase()||"/"}function g(e,t){if(Array.isArray(t))return t.reduce((r,a)=>Math.max(r,g(e,a)),0);const s=p(e),n=p(t);if(n==="/")return s==="/"?1:0;if(s===n)return n.length+1;const c=v(n.replace(/^\//,""));return new RegExp(`(?:^|/)${c}(?:/|$)`).test(s)?n.length:0}function y(e,t){return!!e.to&&g(t,e.pathMatch)>0}function x(e,t){const s=n=>{var r;let c=null,i=0;for(const a of n||[]){const l=y(a,t)?g(t,a.pathMatch):0;if(l>i&&(c=a,i=l),(r=a.children)!=null&&r.length){const d=s(a.children);d.score>i&&(c=d.item,i=d.score)}}return{item:c,score:i}};for(const n of e.sections){const c=s(n.items||[]);if(c.item)return c.item}return null}const L=Object.freeze({userType:void 0,isDeveloperMode:!1,isAdvancedMode:!1,canAccess:e=>k(e,I)});let m=()=>L;function K(e){m=e}function W(e,t){return e?(Array.isArray(e)?e:[e]).every(n=>{switch(n){case"admin":return t.userType==="admin";case"nonAdmin":return t.userType!=="admin";case"developer":return t.isDeveloperMode;case"privatelyHosted":return!!u.privatelyHosted;case"mobileApp":return!!u.isMobileApp;case"guidedTour":return M(u.appType);case"mobile":return u.isMobileApp?!0:typeof navigator<"u"?/iphone|ipad|ipod|android|mobile/i.test(navigator.userAgent):!1;case"advanced":return t.isAdvancedMode;default:return!0}}):!0}function b(e,t){return!(!W(e.showCondition,t)||e.featureId&&!t.canAccess(e.featureId))}function q(e){return b(e,m())}function w(e,t=m()){const s=e.children||[];if(!s.length)return e.to;const n=s.find(c=>!!c.to&&b(c,t));return(n==null?void 0:n.to)??e.to}function V(e,t){const s=x(e,t);if(!s)return null;const n={label:s.label,icon:s.icon,customIcon:s.customIcon,description:s.description,siblings:[],siblingsInPage:!1,groupTo:s.to,isSubpage:!1},c=i=>({key:i.to||i.modal||i.label,label:i.label,icon:i.icon,customIcon:i.customIcon,to:i.to,active:i===s||y(i,t),description:i.description});for(const i of e.sections)for(const r of i.items||[]){if(r===s){const d=p(s.to);return s.to&&p(t).startsWith(`${d}/`)?{...n,sectionHeader:i.header,parentLabel:s.label,isSubpage:!0}:{...n,sectionHeader:i.header}}const a=r.children||[];if(!a.includes(s))continue;const l=w(r);return{...n,parentLabel:r.label,sectionHeader:i.header,siblings:a.filter(d=>q(d)&&d.to).map(c),siblingsInPage:!!r.childrenInPage,groupTo:l,isSubpage:p(t)!==p(l)}}return n}const D=new Set(["home","insights","loginprefs","activity","history","filtering","opening","websites","usagelimits","accessrequests","encryption","clients","auditlog"]),O=["history/","filtering/"];function E(e){const t=p(e).match(/^\/manage\/user\/[^/]+(?:\/(.*))?$/);return(t==null?void 0:t[1])||null}function F(e){const t=p(e).match(/^\/settings(?:\/(.*))?$/);return(t==null?void 0:t[1])||null}function f(e){return e?D.has(e)?!0:O.some(t=>e.startsWith(t)):!1}function j({currentPath:e,targetUserId:t,currentQuery:s,currentHash:n}){const c=p(e),i=E(c),r=F(c),a=l=>({path:l,...s&&Object.keys(s).length>0?{query:s}:{},...n?{hash:n}:{}});return t&&i!==null?a(`/manage/user/${t}${i?`/${i}`:""}`):t?f(r)?a(`/manage/user/${t}/${r}`):{path:`/manage/user/${t}`}:i!==null&&f(i)?a(`/settings/${i}`):r!==null?a(c):{path:"/settings"}}export{B as a,V as b,j as c,y as d,P as e,C as f,H as g,T as h,q as i,S as p,K as r,N as s};
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.