1function e(e){return!!e&&typeof e==`object`&&!Array.isArray(e)}function t(e){return Array.isArray(e.children)?e.children:void 0}function n(r,i,a){let o=!1,s=r.map(r=>{if(!e(r))return r;if(r.id===i)return o=!0,a(r);let s=t(r);if(!s)return r;let c=n(s,i,a);return c===s?r:(o=!0,{...r,children:c})});return o?s:r}function r(e,t,r){return n(e,t,e=>({...e,children:r}))}function i(e,r,i){return n(e,r,e=>({...e,children:[...t(e)??[],i]}))}function a(n,r,i={}){let{dissolveChildren:o=!1,shouldRemove:s=e=>e.id===r}=i,c=!1,l=[],u=[];for(let d of n){if(!e(d)){u.push(d);continue}if(s(d)){c=!0;let e=t(d);o&&e&&l.push(...e);continue}let n=t(d);if(!n){u.push(d);continue}let f=a(n,r,i);if(f===n){u.push(d);continue}c=!0,u.push({...d,children:f})}return c?[...u,...l]:n}function o(n,r,i,a={}){let{dissolveChildren:s=!1}=a,c=!1,l=[],u=[];for(let d of n){if(!e(d)){u.push(d);continue}if(d.id===r){c=!0,u.push(i(d));let e=t(d);s&&e&&l.push(...e);continue}let n=t(d);if(!n){u.push(d);continue}let f=o(n,r,i,a);if(f===n){u.push(d);continue}c=!0,u.push({...d,children:f})}return c?[...u,...l]:n}function s(n,r,i){let a=!1,o=[];for(let c of n){if(!e(c)){o.push(c);continue}if(r.shouldRemove(c,i)){a=!0;continue}let n=t(c);if(!n){o.push(c);continue}let l=s(n,r,c);if(l.length===0&&r.shouldRemoveEmptyParent?.(c)){a=!0;continue}if(l!==n){a=!0,o.push({...c,children:l});continue}o.push(c)}return a?o:n}var c=new Set([`selected`,`chosen`,`filtered`]);function l(e){return Object.keys(e).filter(e=>!c.has(e))}function u(e,t){if(Object.is(e,t))return!0;if(!e||!t||typeof e!=`object`||typeof t!=`object`)return!1;if(Array.isArray(e)||Array.isArray(t)){if(!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(!u(e[n],t[n]))return!1;return!0}let n=l(e),r=l(t);if(n.length!==r.length)return!1;for(let r of n)if(!Object.hasOwn(t,r)||!u(e[r],t[r]))return!1;return!0}function d(e){if(!e||typeof e!=`object`)return e;if(Array.isArray(e))return e.map(d);let t={};return Object.keys(e).forEach(n=>{c.has(n)||(t[n]=e[n])}),t}function f(e=[]){return Array.isArray(e)?e.map(d):[]}var p=(e,t,r)=>n(t,e,()=>({...r})),m=(e,t,n)=>r(t,e,n);function h(e,t,n){return i(e,t,n)}function g(e,t,n=!1){return a(e,t,{dissolveChildren:n})}function _(e,t,n=!1){return o(e,t,e=>({id:e.id,size:e.size,type:`blank`}),{dissolveChildren:n})}function v(e,t){return s(e,{shouldRemove:e=>e.type===`link`&&e.link===t,shouldRemoveEmptyParent:e=>Array.isArray(e.children)})}function y(e,t,n=`id`){if(e){for(let r of e)if(!(!r||typeof r!=`object`)){if(r[n]===t)return r;if(r.children){let e=y(r.children,t,n);if(e)return e}}}}function b(e,t,n=1){let r=document.getElementById(e);if(!r){console.error(`æ°ç¶çº§èç¹ (ID: ${e}) æªæ¾å°`);return}try{let e=r.children,i=Math.max(e.length-n,0);e.length>i?r.insertBefore(t,e[i]):r.appendChild(t)}catch(e){console.error(`æå
¥èç¹æ¶åçé误: ${e}`)}}function x(e){return Array.isArray(e)?e.reduce((e,t)=>{if(!t||typeof t!=`object`)return e;if(t.type===`folder`&&Array.isArray(t.children)){if(t.children.length===1)e.push(...x(t.children));else if(t.children.length>0){let n=x(t.children);e.push(n===t.children?t:{...t,children:n})}}else e.push(t);return e},[]):[]}export{v as a,m as c,u as d,g as i,x as l,h as n,y as o,_ as r,f as s,b as t,p as u};
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.