1import{Dn as j,Ht as k,On as A,g as K,pn as P,xn as B}from"./IKVlQCqm.js";function N(o,t,e){const s=new Array(o);return new Proxy(s,{get(i,n,l){if(typeof n=="string"){const r=n.charCodeAt(0);if(r>=48&&r<=57){const h=+n;if(Number.isInteger(h)&&h>=0&&h<o){let u=i[h];if(!u){const f=t[h*2];u=i[h]={index:h,key:e(h),start:f,size:t[h*2+1],end:f+t[h*2+1],lane:0}}return u}}if(n==="length")return o}return Reflect.get(i,n,l)}})}function I(o,t,e){let s=e.initialDeps??[],i,n=!0;function l(){const r=o();return(r.length!==s.length||r.some((h,u)=>s[u]!==h))&&(s=r,i=t(...r),e?.onChange&&!(n&&e.skipInitialOnChange)&&e.onChange(i),n=!1),i}return l.updateDeps=r=>{s=r},l}function W(o,t){if(o===void 0)throw new Error(`Unexpected undefined${t?`: ${t}`:""}`);return o}var H=(o,t)=>Math.abs(o-t)<1.01,J=(o,t,e)=>{let s;return function(...i){o.clearTimeout(s),s=o.setTimeout(()=>t.apply(this,i),e)}},y,F=()=>{if(y!==void 0)return y;if(typeof navigator>"u")return y=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return y=!0;const o=navigator.maxTouchPoints;return y=navigator.platform==="MacIntel"&&o!==void 0&&o>0},L=o=>{const{offsetWidth:t,offsetHeight:e}=o;return{width:t,height:e}},U=o=>o,q=o=>{const t=Math.max(o.startIndex-o.overscan,0),e=Math.min(o.endIndex+o.overscan,o.count-1)-t+1,s=new Array(e);for(let i=0;i<e;i++)s[i]=t+i;return s},$=(o,t)=>{const e=o.scrollElement;if(!e)return;const s=o.targetWindow;if(!s)return;const i=l=>{const{width:r,height:h}=l;t({width:Math.round(r),height:Math.round(h)})};if(i(L(e)),!s.ResizeObserver)return()=>{};const n=new s.ResizeObserver(l=>{const r=()=>{const h=l[0];if(h?.borderBoxSize){const u=h.borderBoxSize[0];if(u){i({width:u.inlineSize,height:u.blockSize});return}}i(L(e))};o.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(r):r()});return n.observe(e,{box:"border-box"}),()=>{n.unobserve(e)}},M={passive:!0},G=typeof window>"u"?!0:"onscrollend"in window,Q=(o,t,e)=>{const s=o.scrollElement;if(!s)return;const i=o.targetWindow;if(!i)return;const n=o.options.useScrollendEvent&&G;let l=0;const r=n?null:J(i,()=>t(l,!1),o.options.isScrollingResetDelay),h=a=>()=>{l=e(s),r?.(),t(l,a)},u=h(!0),f=h(!1);return s.addEventListener("scroll",u,M),n&&s.addEventListener("scrollend",f,M),()=>{s.removeEventListener("scroll",u),n&&s.removeEventListener("scrollend",f)}},X=(o,t)=>Q(o,t,e=>{const{horizontal:s,isRtl:i}=o.options;return s?e.scrollLeft*(i&&-1||1):e.scrollTop}),Y=(o,t,e)=>{if(e.options.useCachedMeasurements){const s=e.indexFromElement(o),i=e.options.getItemKey(s);return e.itemSizeCache.get(i)??e.options.estimateSize(s)}if(t?.borderBoxSize){const s=t.borderBoxSize[0];if(s)return Math.round(s[e.options.horizontal?"inlineSize":"blockSize"])}if(!t){const s=e.indexFromElement(o),i=e.options.getItemKey(s),n=e.itemSizeCache.get(i);if(n!==void 0)return n}return o[e.options.horizontal?"offsetWidth":"offsetHeight"]},Z=(o,{adjustments:t=0,behavior:e},s)=>{var i,n;(n=(i=s.scrollElement)==null?void 0:i.scrollTo)==null||n.call(i,{[s.options.horizontal?"left":"top"]:o+t,behavior:e})},tt=Z,et=class{constructor(o){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.scrollState=null,this.measurementsCache=[],this._flatMeasurements=null,this.itemSizeCache=new Map,this.itemSizeCacheVersion=0,this.laneAssignments=new Map,this.pendingMin=null,this.prevLanes=void 0,this.lanesChangedFlag=!1,this.lanesSettling=!1,this.pendingScrollAnchor=null,this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._intendedScrollOffset=null,this.elementsCache=new Map,this.now=()=>{var t,e,s;return((s=(e=(t=this.targetWindow)==null?void 0:t.performance)==null?void 0:e.now)==null?void 0:s.call(e))??Date.now()},this.observer=(()=>{let t=null;const e=()=>t||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:t=new this.targetWindow.ResizeObserver(s=>{s.forEach(i=>{const n=()=>{const l=i.target,r=this.indexFromElement(l);if(!l.isConnected){this.observer.unobserve(l);for(const[h,u]of this.elementsCache)if(u===l){this.elementsCache.delete(h);break}return}this.shouldMeasureDuringScroll(r)&&this.resizeItem(r,this.options.measureElement(l,i,this))};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(n):n()})}));return{disconnect:()=>{var s;
1(s=e())==null||s.disconnect(),t=null},observe:s=>{var i;return(i=e())==null?void 0:i.observe(s,{box:"border-box"})},unobserve:s=>{var i;return(i=e())==null?void 0:i.unobserve(s)}}})(),this.range=null,this.setOptions=t=>{var e,s;const i={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:U,rangeExtractor:q,onChange:()=>{},measureElement:Y,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,anchorTo:"start",followOnAppend:!1,scrollEndThreshold:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,laneAssignmentMode:"estimate",useCachedMeasurements:!1};for(const a in t){const m=t[a];m!==void 0&&(i[a]=m)}const n=this.options;let l=null,r=null,h=!1;if(n!==void 0&&n.enabled&&i.enabled&&i.anchorTo==="end"&&this.scrollElement!==null){const a=n.count,m=i.count,p=this.getMeasurements(),v=a>0?((e=p[0])==null?void 0:e.key)??n.getItemKey(0):null,E=a>0?((s=p[a-1])==null?void 0:s.key)??n.getItemKey(a-1):null;if(m!==a||a>0&&m>0&&(i.getItemKey(0)!==v||i.getItemKey(m-1)!==E)){h=!0;const c=a>0?this.getVirtualItemForOffset(this.getScrollOffset())??p[0]:null;c&&(l=[c.key,this.getScrollOffset()-c.start]);const d=i.followOnAppend===!0?"auto":i.followOnAppend||null;d&&m>a&&this.isAtEnd(n.scrollEndThreshold)&&(a===0||i.getItemKey(m-1)!==E)&&(r=d)}}this.options=i,h&&(this.pendingMin=0,this.itemSizeCacheVersion++);let u=!1,f=0;if(l&&this.scrollOffset!==null){const[a,m]=l,p=this.getMeasurements(),{count:v,getItemKey:E}=this.options;let c=0;for(;c<v&&E(c)!==a;)c++;if(c<v){const d=p[c];if(d){const b=Math.max(0,d.start+m);b!==this.scrollOffset&&(f=b-this.scrollOffset,this.scrollOffset=b,u=!0)}}}(u||r)&&(this.pendingScrollAnchor=[u?l[0]:null,u?l[1]:0,r,f])},this.notify=t=>{var e,s;(s=(e=this.options).onChange)==null||s.call(e,this,t)},this.maybeNotify=I(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),t=>{this.notify(t)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(t=>t()),this.unsubs=[],this.observer.disconnect(),this.rafId!=null&&this.targetWindow&&(this.targetWindow.cancelAnimationFrame(this.rafId),this.rafId=null),this.scrollState=null,this._iosDeferredAdjustment=0,this._iosTouching=!1,this._iosJustTouchEnded=!1,this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var t;const e=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==e){if(this.cleanup(),!e){this.maybeNotify();return}if(this.scrollElement=e,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((t=this.scrollElement)==null?void 0:t.window)??null,this.elementsCache.forEach(i=>{this.observer.observe(i)}),this.unsubs.push(this.options.observeElementRect(this,i=>{this.scrollRect=i,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(i,n)=>{if(n&&this._intendedScrollOffset===null&&i===this.scrollOffset)return;this._intendedScrollOffset!==null&&Math.abs(i-this._intendedScrollOffset)<1.5&&(i=this._intendedScrollOffset),this._intendedScrollOffset=null,this.scrollAdjustments=0;const l=this.getScrollOffset();this.scrollDirection=n?l===i?this.scrollDirection:l<i?"forward":"backward":null,this.scrollOffset=i,this.isScrolling=n,this._flushIosDeferredIfReady(),this.scrollState&&this.scheduleScrollReconcile(),this.maybeNotify()})),"addEventListener"in this.scrollElement){const i=this.scrollElement,n=()=>{this._iosTouching=!0,this._iosJustTouchEnded=!1,this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)},l=()=>{this._iosTouching=!1,!(!F()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",n,M),i.addEventListener("touchend",l,M),this.unsubs.push(()=>{i.removeEventListener("touchstart",n),i.removeEventListener("touchend",l),this._iosTouchEndTimerId!==null&&this.targetWindow!=null&&(this.targetWindow.clearTimeout(this._iosTouchEndTimerId),this._iosTouchEndTimerId=null)})}this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})}const s=this.pendingScrollAnchor;if(this.pendingScrollAnchor=null,s&&this.scrollElement&&this.options.enabled){const[i,n,l,r]=s;i!==null&&!l&&(F()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?r!==0&&(this._iosDeferredAdjustment+=r):this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0})),l&&this.scrollToEnd({behavior:l})}},this._flushIosDeferredIfReady=()=>
1{if(this._iosDeferredAdjustment===0||this.isScrolling||this._iosTouching||this._iosJustTouchEnded)return;const t=this.getScrollOffset(),e=this.getMaxScrollOffset();if(t<0||t>e)return;if(this._iosDeferredAdjustment<0&&t>=e-1){this._iosDeferredAdjustment=0;return}const s=this._iosDeferredAdjustment;this._iosDeferredAdjustment=0,this._scrollToOffset(t,{adjustments:this.scrollAdjustments+=s,behavior:void 0})},this.rafId=null,this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getMeasurementOptions=I(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled,this.options.lanes,this.options.laneAssignmentMode,this.options.gap],(t,e,s,i,n,l,r,h)=>(this.prevLanes!==void 0&&this.prevLanes!==l&&(this.lanesChangedFlag=!0),this.prevLanes=l,this.pendingMin=null,{count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:n,lanes:l,laneAssignmentMode:r,gap:h}),{key:!1}),this.getMeasurements=I(()=>[this.getMeasurementOptions(),this.itemSizeCacheVersion],({count:t,paddingStart:e,scrollMargin:s,getItemKey:i,enabled:n,lanes:l,laneAssignmentMode:r,gap:h},u)=>{const f=this.itemSizeCache;if(!n)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const c of this.laneAssignments.keys())c>=t&&this.laneAssignments.delete(c);this.lanesChangedFlag&&(this.lanesChangedFlag=!1,this.lanesSettling=!0,this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),this.pendingMin=null),this.measurementsCache.length===0&&!this.lanesSettling&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(c=>{this.itemSizeCache.set(c.key,c.size)}));const a=this.lanesSettling?0:this.pendingMin??0;if(this.pendingMin=null,this.lanesSettling&&this.measurementsCache.length===t&&(this.lanesSettling=!1),l===1){const c=t*2;let d=this._flatMeasurements;if(!d||d.length<c){const g=new Float64Array(c);d&&a>0&&g.set(d.subarray(0,a*2)),d=g,this._flatMeasurements=d}let b;if(a===0)b=e+s;else{const g=a-1;b=d[g*2]+d[g*2+1]+h}for(let g=a;g<t;g++){const T=i(g),x=f.get(T),w=typeof x=="number"?x:this.options.estimateSize(g);d[g*2]=b,d[g*2+1]=w,b+=w+h}const S=N(t,d,i);return this.measurementsCache=S,S}const m=this.measurementsCache.slice(0,a),p=new Array(l).fill(void 0),v=new Float64Array(l);let E=0;for(let c=0;c<a;c++){const d=m[c];d&&(p[d.lane]===void 0&&E++,p[d.lane]=c,v[d.lane]=d.end)}for(let c=a;c<t;c++){const d=i(c),b=this.laneAssignments.get(c);let S,g;const T=r==="estimate"||f.has(d);if(b!==void 0&&this.options.lanes>1){S=b;const z=p[S],O=z!==void 0?m[z]:void 0;g=O?O.end+h:e+s}else if(E===l){let z=0,O=v[0],D=p[0];for(let _=1;_<l;_++){const C=v[_];(C<O||C===O&&p[_]<D)&&(z=_,O=C,D=p[_])}S=z,g=O+h,T&&this.laneAssignments.set(c,S)}else S=c%this.options.lanes,g=e+s,T&&this.laneAssignments.set(c,S);const x=f.get(d),w=typeof x=="number"?x:this.options.estimateSize(c),R=g+w;m[c]={index:c,start:g,size:w,end:R,key:d,lane:S},p[S]===void 0&&E++,p[S]=c,v[S]=R}return this.measurementsCache=m,m},{key:!1,debug:()=>this.options.debug}),this.calculateRange=I(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,e,s,i)=>t.length===0||e===0?(this.range=null,null):(this.range=it(t,e,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}
1),this.getVirtualIndexes=I(()=>{let t=null,e=null;const s=this.calculateRange();return s&&(t=s.startIndex,e=s.endIndex),this.maybeNotify.updateDeps([this.isScrolling,t,e]),[this.options.rangeExtractor,this.options.overscan,this.options.count,t,e]},(t,e,s,i,n)=>i===null||n===null?[]:t({startIndex:i,endIndex:n,overscan:e,count:s}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=t=>{const e=this.options.indexAttribute,s=t.getAttribute(e);return s?parseInt(s,10):(console.warn(`Missing attribute name '${e}={index}' on measured element.`),-1)},this.shouldMeasureDuringScroll=t=>{var e;if(!this.scrollState||this.scrollState.behavior!=="smooth")return!0;const s=this.scrollState.index??((e=this.getVirtualItemForOffset(this.scrollState.lastTargetOffset))==null?void 0:e.index);if(s!==void 0&&this.range){const i=Math.max(this.options.overscan,Math.ceil((this.range.endIndex-this.range.startIndex)/2)),n=Math.max(0,s-i),l=Math.min(this.options.count-1,s+i);return t>=n&&t<=l}return!0},this.measureElement=t=>{if(!t){this.elementsCache.forEach((n,l)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(l))});return}const e=this.indexFromElement(t),s=this.options.getItemKey(e),i=this.elementsCache.get(s);i!==t&&(i&&this.observer.unobserve(i),this.observer.observe(t),this.elementsCache.set(s,t)),(!this.isScrolling||this.scrollState)&&this.shouldMeasureDuringScroll(e)&&this.resizeItem(e,this.options.measureElement(t,void 0,this))},this.resizeItem=(t,e)=>{var s,i;if(t<0||t>=this.options.count)return;let n,l,r;const h=this._flatMeasurements;if(this.options.lanes===1&&h!==null)r=this.options.getItemKey(t),l=h[t*2],n=h[t*2+1];else{const a=this.measurementsCache[t];if(!a)return;r=a.key,l=a.start,n=a.size}const u=this.itemSizeCache.get(r)??n,f=e-u;if(f!==0){const a=this.options.anchorTo==="end"&&((s=this.scrollState)==null?void 0:s.behavior)!=="smooth"&&this.getVirtualDistanceFromEnd()<=this.options.scrollEndThreshold,m=a?this.getTotalSize():0,p=this.getScrollOffset()+this.scrollAdjustments,v=this.itemSizeCache.has(r)?l+u<=p&&this.scrollDirection!=="backward":l<p,E=((i=this.scrollState)==null?void 0:i.behavior)!=="smooth"&&(this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(this.measurementsCache[t]??{index:t,key:r,start:l,size:n,end:l+n,lane:0},f,this):v);(this.pendingMin===null||t<this.pendingMin)&&(this.pendingMin=t),this.itemSizeCache.set(r,e),this.itemSizeCacheVersion++;let c=!1;a?c=this.applyScrollAdjustment(this.getTotalSize()-m):E&&(c=this.applyScrollAdjustment(f)),this.notify(c)}},this.getVirtualItems=I(()=>
1[this.getVirtualIndexes(),this.getMeasurements()],(t,e)=>{const s=[];for(let i=0,n=t.length;i<n;i++){const l=e[t[i]];s.push(l)}return s},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=t=>{const e=this.getMeasurements();if(e.length===0)return;const s=this._flatMeasurements,i=this.options.lanes===1&&s!=null;return W(e[V(0,e.length-1,i?n=>s[n*2]:n=>W(e[n]).start,t)])},this.getMaxScrollOffset=()=>{if(!this.scrollElement)return 0;if("scrollHeight"in this.scrollElement)return this.options.horizontal?this.scrollElement.scrollWidth-this.scrollElement.clientWidth:this.scrollElement.scrollHeight-this.scrollElement.clientHeight;{const t=this.scrollElement.document.documentElement;return this.options.horizontal?t.scrollWidth-this.scrollElement.innerWidth:t.scrollHeight-this.scrollElement.innerHeight}},this.getVirtualDistanceFromEnd=()=>Math.max(this.getTotalSize()-this.getSize()-this.getScrollOffset(),0),this.getDistanceFromEnd=()=>Math.max(this.getMaxScrollOffset()-this.getScrollOffset(),0),this.isAtEnd=(t=this.options.scrollEndThreshold)=>this.getDistanceFromEnd()<=t,this.getOffsetForAlignment=(t,e,s=0)=>{if(!this.scrollElement)return 0;const i=this.getSize(),n=this.getScrollOffset();e==="auto"&&(e=t>=n+i?"end":"start"),e==="center"?t+=(s-i)/2:e==="end"&&(t-=i);const l=this.getMaxScrollOffset();return Math.max(Math.min(l,t),0)},this.getOffsetForIndex=(t,e="auto")=>{t=Math.max(0,Math.min(t,this.options.count-1));const s=this.getSize(),i=this.getScrollOffset(),n=this.measurementsCache[t];if(!n)return;if(e==="auto")if(n.end>=i+s-this.options.scrollPaddingEnd)e="end";else if(n.start<=i+this.options.scrollPaddingStart)e="start";else return[i,e];if(e==="end"&&t===this.options.count-1)return[this.getMaxScrollOffset(),e];const l=e==="end"?n.end+this.options.scrollPaddingEnd:n.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,e,n.size),e]},this.scrollToOffset=(t,{align:e="start",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0;const i=this.getOffsetForAlignment(t,e),n=this.now();this.scrollState={index:null,align:e,behavior:s,startedAt:n,lastTargetOffset:i,stableFrames:0},this._scrollToOffset(i,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollToIndex=(t,{align:e="auto",behavior:s="auto"}={})=>{this._iosDeferredAdjustment=0,t=Math.max(0,Math.min(t,this.options.count-1));const i=this.getOffsetForIndex(t,e);if(!i)return;const[n,l]=i,r=this.now();this.scrollState={index:t,align:l,behavior:s,startedAt:r,lastTargetOffset:n,stableFrames:0},this._scrollToOffset(n,{adjustments:void 0,behavior:s}),this.scheduleScrollReconcile()},this.scrollBy=(t,{behavior:e="auto"}={})=>{const s=this.getScrollOffset()+t,i=this.now();this.scrollState={index:null,align:"start",behavior:e,startedAt:i,lastTargetOffset:s,stableFrames:0},this._scrollToOffset(s,{adjustments:void 0,behavior:e}),this.scheduleScrollReconcile()},this.scrollToEnd=({behavior:t="auto"}={})=>{if(this.options.count>0){this.scrollToIndex(this.options.count-1,{align:"end",behavior:t});return}this.scrollToOffset(Math.max(this.getTotalSize()-this.getSize(),0),{behavior:t})},this.getTotalSize=()=>{var t;const e=this.getMeasurements();let s;if(e.length===0)s=this.options.paddingStart;else if(this.options.lanes===1){const i=e.length-1,n=this._flatMeasurements;n!=null?s=n[i*2]+n[i*2+1]:s=((t=e[i])==null?void 0:t.end)??0}else{const i=Array(this.options.lanes).fill(null);let n=e.length-1;for(;n>=0&&i.some(l=>l===null);){const l=e[n];i[l.lane]===null&&(i[l.lane]=l.end),n--}s=Math.max(...i.filter(l=>l!==null))}return Math.max(s-this.options.scrollMargin+this.options.paddingEnd,0)},this.takeSnapshot=()=>{const t=[];if(this.itemSizeCache.size===0)return t;const e=this.getMeasurements();for(const s of e)s&&this.itemSizeCache.has(s.key)&&t.push({index:s.index,key:s.key,start:s.start,size:s.size,end:s.end,lane:s.lane});return t},this._scrollToOffset=(t,{adjustments:e,behavior:s})=>{this._intendedScrollOffset=t+(e??0),this.options.scrollToFn(t,{behavior:s,adjustments:e},this)},this.measure=()=>{this.pendingMin=null,this.itemSizeCache.clear(),this.laneAssignments.clear(),this.itemSizeCacheVersion++,this.notify(!1)},this.setOptions(o)}applyScrollAdjustment(o,t){return o===0?!1:F()&&(this.isScrolling||this._iosTouching||this._iosJustTouchEnded)?(this._iosDeferredAdjustment+=o,!1):(this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=o,behavior:t}),this.scrollOffset!==null&&(this.scrollOffset+=this.scrollAdjustments,this.scrollOffset<0&&(this.scrollOffset=0),this.scrollAdjustments=0),!0)}scheduleScrollReconcile(){if(!this.targetWindow){this.scrollState=null;return}this.rafId==null&&(this.rafId=this.targetWindow.requestAnimationFrame(()=>{this.rafId=null,this.reconcileScroll()}))}reconcileScroll(){if(!this.scrollState||!this.scrollElement)return;if(this.now()-this.scrollState.startedAt>5e3){this.scrollState=null;return}const o=this.scrollState.index!=null?this.getOffsetForIndex(this.scrollState.index,this.scrollState.align):void 0,t=o?o[0]:this.scrollState.lastTargetOffset,e=1,s=t!==this.scrollState.lastTargetOffset;
1if(!s&&H(t,this.getScrollOffset())){if(this.scrollState.stableFrames++,this.scrollState.stableFrames>=e){this.getScrollOffset()!==t&&this._scrollToOffset(t,{adjustments:void 0,behavior:"auto"}),this.scrollState=null;return}}else if(this.scrollState.stableFrames=0,s){const i=this.getSize()||600,n=Math.abs(t-this.getScrollOffset()),l=this.scrollState.behavior==="smooth"&&n>i;this.scrollState.lastTargetOffset=t,l||(this.scrollState.behavior="auto"),this._scrollToOffset(t,{adjustments:void 0,behavior:l?"smooth":"auto"})}this.scheduleScrollReconcile()}},V=(o,t,e,s)=>{for(;o<=t;){const i=(o+t)/2|0,n=e(i);if(n<s)o=i+1;else if(n>s)t=i-1;else return i}return o>0?o-1:0};function st(o,t,e){let s=0;for(;s<=t;){const i=(s+t)/2|0,n=o[i*2];if(n<e)s=i+1;else if(n>e)t=i-1;else return i}return s>0?s-1:0}function it(o,t,e,s,i){const n=o.length-1;if(o.length<=s)return{startIndex:0,endIndex:n};if(s===1&&i!==null){const u=st(i,n,e);let f=u;const a=e+t;for(;f<n&&i[f*2]+i[f*2+1]<a;)f++;return{startIndex:u,endIndex:f}}let r=V(0,n,u=>o[u].start,e),h=r;if(s===1)for(;h<n&&o[h].end<e+t;)h++;else if(s>1){const u=Array(s).fill(0);for(;h<n&&u.some(a=>a<e+t);){const a=o[h];u[a.lane]=a.end,h++}const f=Array(s).fill(e+t);for(;r>=0&&f.some(a=>a>=e);){const a=o[r];f[a.lane]=a.start,r--}r=Math.max(0,r-r%s),h=Math.min(n,h+(s-1-h%s))}return{startIndex:r,endIndex:h}}function nt(o){const t=new et(A(o)),e=B(t),s=t._didMount();return k(()=>A(o).getScrollElement(),i=>{i&&t._willUpdate()},{immediate:!0}),k(()=>A(o),i=>{t.setOptions({...i,onChange:(n,l)=>{var r;j(e),(r=i.onChange)==null||r.call(i,n,l)}}),t._willUpdate(),j(e)},{immediate:!0}),P(s),e}function ot(o){return nt(K(()=>({observeElementRect:$,observeElementOffset:X,scrollToFn:tt,...A(o)})))}export{ot 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.