PageSourceSearch

https://cdn.mamfach.pl/web-assets/20260923135103-1a1dccaa1/assets/useCompositeListItem-DnuZxrOQ.js

js mamfach.pl collected 2026-09-24 13:43:30 UTC 3,632 bytes, 1 lines download raw bytes

1(function(){try{var e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`cac47566-0ffb-429f-b92e-47f73c59855a`,e._sentryDebugIdIdentifier=`sentry-dbid-cac47566-0ffb-429f-b92e-47f73c59855a`)}catch{}})();import{i as e,t}from"./react-JrI-CK6j.js";import{t as n}from"./jsx-runtime-C6t-Q00B.js";import{B as r,H as i,V as a}from"./useBaseUiId-DG0N470s.js";var o=e(t(),1),s=o.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function c(){return o.useContext(s)}var l=n();function u(e){let{children:t,elementsRef:n,labelsRef:c,onMapChange:u}=e,_=a(u),[,v]=o.useState(!1),y=i(f).current,b=i(d).current,x=o.useRef(0),S=o.useRef(!0),C=o.useRef(null),w=o.useRef(null),T=a(()=>{S.current||(S.current=!0,v(e=>!e))}),E=a((e,t)=>{b.set(e,t),T()}),D=a(e=>{b.delete(e),T()}),O=a(e=>{let t=new Map;return n.current.length=0,c&&(c.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,c&&(c.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),x.current=n.current.length,t});function k(e){if(w.current?.disconnect(),w.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!h(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&g(r,n)>0){t.disconnect(),T();return}r=n}});w.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=m(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let A=a(()=>{let[e,t]=p(b),n=O(e),r=C.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});k(t),C.current=e,S.current=!1,i&&(y.forEach(e=>e(n)),_(n))});r(()=>(!S.current&&C.current&&O(C.current),()=>{n.current=[],c&&(c.current=[])}),[n,c,O]),r(()=>{S.current&&A()}),r(()=>()=>{w.current?.disconnect(),S.current=!0},[]);let j=a(e=>(y.add(e),()=>{y.delete(e)})),M=o.useMemo(()=>({register:E,unregister:D,subscribeMapChange:j,nextIndexRef:x}),[E,D,j,x]);return(0,l.jsx)(s.Provider,{value:M,children:t})}function d(){return new Map}function f(){return new Set}function p(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>g(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function m(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function h(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function g(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function _(e={}){let{guess:t,label:n,metadata:i,textRef:a,index:s}=e,{register:l,unregister:u,subscribeMapChange:d,nextIndexRef:f}=c(),p=o.useRef(-1),[m,h]=o.useState(s==null&&t?()=>{if(p.current===-1){let e=f.current;f.current+=1,p.current=e}return p.current}:-1),g=s??m,_=o.useRef(null),v=o.useCallback(e=>{let t=_.current;t&&u(t),_.current=e,e&&l(e,{metadata:i??null,index:s??null,label:n,textRef:a})},[s,l,u,i,n,a]);return r(()=>{if(s==null)return d(e=>{let t=_.current?e.get(_.current)?.index:null;t!=null&&h(t)})},[s,d]),{ref:v,index:g}}export{u as n,_ 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.