PageSourceSearch

https://vizops360.ai/assets/orgTree-_S0Xal9w.js

js vizops360.ai collected 2026-10-05 13:51:56 UTC 2,293 bytes, 1 lines download raw bytes

1function u(e,t){return t.totalReports-e.totalReports||e.name.localeCompare(t.name)}function p(e){const t=new Map;for(const n of e)n.id&&t.set(n.id,{...n,children:[],depth:0,totalReports:0});const o=n=>{const d=new Set([n.id]);let i=n.managerId?t.get(n.managerId):void 0;for(;i;){if(d.has(i.id))return!1;d.add(i.id),i=i.managerId?t.get(i.managerId):void 0}return!0},a=[],s=[];for(const n of t.values()){const d=n.managerId??null;if(!d){a.push(n);continue}if(d===n.id){s.push(n);continue}const i=t.get(d);if(!i){s.push(n);continue}if(!o(n)){s.push(n);continue}i.children.push(n)}const r=n=>{const d=[n],i=[];for(n.depth=0;d.length;){const l=d.pop();i.push(l);for(const c of l.children)c.depth=l.depth+1,d.push(c)}for(let l=i.length-1;l>=0;l--){const c=i[l];c.totalReports=c.children.reduce((h,m)=>h+m.totalReports+1,0),c.children.sort(u)}};for(const n of[...a,...s])r(n);return a.sort(u),s.sort(u),{roots:a,byId:t,detached:s,isFlat:e.length>0&&a.length+s.length===e.length}}function I(e){const t=p(e).roots.filter(a=>!a.managerId);if(!t.length)return[];const o=Math.max(...t.map(a=>a.totalReports));return o===0?t.length===1?t:[]:t.filter(a=>a.totalReports===o)}function f(e,t){const o=e.byId.get(t);if(!o)return[];const a=[o],s=new Set([o.id]);let r=o.managerId?e.byId.get(o.managerId):void 0;for(;r&&!s.has(r.id);)a.unshift(r),s.add(r.id),r=r.managerId?e.byId.get(r.managerId):void 0;return a}function y(e,t){const o=t.trim().toLowerCase();if(!o)return[];const a=[];for(const s of e.byId.values())[s.name,s.empCode,s.designation,s.department].filter(
1Boolean).join(" ").toLowerCase().includes(o)&&a.push(s.id);return a}function v(e,t){const o=new Set;for(const a of t){const s=f(e,a);for(const r of s)r.id!==a&&o.add(r.id)}return o}function g(e){const t=e.avatar||e.photoUrl||e.photo||e.raw?.["Employee Photo"]||e.raw?.employeePhoto||e.rawData?.["Employee Photo"],o=String(t??"").trim();return!o||o==="-"?null:o}function R(e){return{id:e.id,name:[e.firstName,e.lastName].filter(Boolean).join(" ").trim()||e.name||e.empCode||"Employee",empCode:e.empCode??"-",designation:e.designation??null,department:e.departmentName??e.department??null,location:e.workLocation??null,status:e.status??null,avatar:g(e),managerId:e.lineManagerEmployeeId??null}}export{y as a,p as b,v as i,I as m,f as p,R as t};

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.