PageSourceSearch

https://dokodemo.world/_nuxt/DPV_hxoy.js

js dokodemo.world collected 2026-09-24 11:14:17 UTC 4,592 bytes, 1 lines download raw bytes

1import{bg as L,bh as H,cF as W,a4 as A,bu as G,i as p,F as X,b2 as re,bk as Y,cE as se,bp as U,bn as y,r as q,dD as Z,dE as oe,C as M,cZ as B,c0 as ue,bY as ce,dF as ie,dG as ve,bH as _,ca as de,ci as fe,bI as me,o as he,dH as ge}from"./CCFi5x9s.js";const pe=H({renderless:Boolean,...Y()},"VVirtualScrollItem"),Se=L()({name:"VVirtualScrollItem",inheritAttrs:!1,props:pe(),emits:{"update:height":t=>!0},setup(t,l){let{attrs:c,emit:s,slots:r}=l;const{resizeRef:a,contentRect:i}=W(void 0,"border");A(()=>i.value?.height,f=>{f!=null&&s("update:height",f)}),G(()=>t.renderless?p(X,null,[r.default?.({itemRef:a})]):p("div",re({ref:a,class:["v-virtual-scroll__item",t.class],style:t.style},c),[r.default?.()]))}}),Ve=-1,be=1,D=100,ye=H({itemHeight:{type:[Number,String],default:null},height:[Number,String]},"virtual");function Te(t,l){const c=se(),s=y(0);U(()=>{s.value=parseFloat(t.itemHeight||0)});const r=y(0),a=y(Math.ceil((parseInt(t.height)||c.height.value)/(s.value||16))||1),i=y(0),f=y(0),u=q(),h=q();let T=0;const{resizeRef:w,contentRect:F}=W();U(()=>{w.value=u.value});const V=M(()=>u.value===document.documentElement?c.height.value:F.value?.height||parseInt(t.height)||0),S=M(()=>!!(u.value&&h.value&&V.value&&s.value));let v=Array.from({length:l.value.length}),o=Array.from({length:l.value.length});const O=y(0);let P=-1;function j(e){return v[e]||s.value}const k=oe(()=>{const e=performance.now();o[0]=0;const n=l.value.length;for(let d=1;d<=n-1;d++)o[d]=(o[d-1]||0)+j(d-1);O.value=Math.max(O.value,performance.now()-e)},O),J=A(S,e=>{e&&(J(),T=h.value.offsetTop,k.immediate(),b(),~P&&ue(()=>{ce&&window.requestAnimationFrame(()=>{N(P),P=-1})}))});Z(()=>{k.clear()});function K(e,n){const d=v[e],m=s.value;s.value=m?Math.min(s.value,n):n,(d!==n||m!==s.value)&&(v[e]=n,k())}function g(e){return e=B(e,0,l.value.length-1),o[e]||0}function z(e){return Ie(o,e)}let x=0,I=0,E=0;A(V,(e,n)=>{n&&(b(),e<n&&requestAnimationFrame(()=>{I=0,b()}))});function Q(){if(!u.value||!h.value)return;const e=u.value.scrollTop,n=performance.now();n-E>500?(I=Math.sign(e-x),T=h.value.offsetTop):I=e-x,x=e,E=n,b()}function $(){!u.value||!h.value||(I=0,E=0,b())}let C=-1;function b(){cancelAnimationFrame(C),C=requestAnimationFrame(ee)}function ee(){if(!u.value||!V.value)return;const e=x-T,n=Math.sign(I),d=Math.max(0,e-D),m=B(z(d),0,l.value.length),le=e+V.value+D,R=B(z(le)+1,m+1,l.value.length);if((n!==Ve||m<r.value)&&(n!==be||R>a.value)){const ae=g(r.value)-g(m),ne=g(R)-g(a.value);Math.max(ae,ne)>D?(r.value=m,a.value=R):(m<=0&&(r.value=m),R>=l.value.length&&(a.value=R))}i.value=g(r.value),f.value=g(l.value.length)-g(a.value)}function N(e){const n=g(e);!u.value||e&&!n?P=e:u.value.scrollTop=n}const te=M(()=>l.value.slice(r.value,a.value).map((e,n)=>({raw:e,index:n+r.value})));return A(l,()=>{v=Array.from({length:l.value.length}),o=Array.from({length:l.value.length}),k.immediate(),b()},{deep:!0}),{containerRef:u,markerRef:h,computedItems:te,paddingTop:i,paddingBottom:f,scrollToIndex:N,handleScroll:Q,handleScrollend:$,handleItemResize:K}}function Ie(t,l){let c=t.length-1,s=0,r=0,a=null,i=-1;if(t[c]<l)return c;for(;s<=c;)if(r=s+c>>1,a=t[r],a>l)c=r-1;else if(a<l)i=r,s=r+1;else return a===l?r:s;return i}const Re=H({items:{type:Array,default:()=>[]},renderless:Boolean,...ye(),...Y(),...fe()},"VVirtualScroll"),Pe=L()({name:"VVirtualScroll",props:Re(),setup(t,l){let{slots:c}=l;const s=ie("VVirtualScroll"),{dimensionStyles:r}=de(t),{containerRef:a,markerRef:i,handleScroll:f,handleScrollend:u,handleItemResize:h,scrollToIndex:T,paddingTop:w,paddingBottom:F,computedItems:V}=Te(t,me(t,"items"));return ve(()=>t.renderless,()=>{function S(){const o=(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1)?"addEventListener":"removeEventListener";a.value===document.documentElement?(document[o]("scroll",f,{passive:!0}),document[o]("scrollend",u)):(a.value?.[o]("scroll",f,{passive:!0}),a.value?.[o]("scrollend",u))}he(()=>{a.value=ge(s.vnode.el,!0),S(!0)}),Z(S)}),G(()=>{const S=V.value.map(v=>p(Se,{key:v.index,renderless:t.renderless,"onUpdate:height":o=>h(v.index,o)},{default:o=>c.default?.({item:v.raw,index:v.index,...o})}));return t.renderless?p(X,null,[p("div",{ref:i,class:"v-virtual-scroll__spacer",style:{paddingTop:_(w.value)}},null),S,p("div",{class:"v-virtual-scroll__spacer",style:{paddingBottom:_(F.value)}},null)]):p("div",{ref:a,class:["v-virtual-scroll",t.class],onScrollPassive:f,onScrollend:u,style:[r.value,t.style]},[p("div",{ref:i,class:"v-virtual-scroll__container",style:{paddingTop:_(w.value),paddingBottom:_(F.value)}},[S])])}),{scrollToIndex:T}}});export{Pe as V};

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.