PageSourceSearch

https://tuzlovschool.ru/kubcms-front/v5/master/s/c-el-virtual-list-uNff9pdM.js

js tuzlovschool.ru collected 2026-10-08 00:06:23 UTC 11,950 bytes, 6 lines download raw bytes

1import{aO as lt,aQ as V,ba as Vt,h8 as $,b7 as xt,bc as v,h9 as Ut,aR as Lt,aT as st,bm as Nt,bn as jt,bo as k,ck as Kt,a_ as P,bl as Yt,aY as i,eH as Zt,eJ as Jt,ha as Qt,b4 as wt,bt as Xt,bp as at,bD as te,bd as Z,eV as ee,aU as ne,fa as le,cY as re,hb as oe,gf as se,f7 as Et,by as Tt,eW as ae,bk as ie}from"./c-index-D0PNHfG-.js";import{u as ce}from"./c-el-form-item-DpapBxAI.js";const Mt="itemRendered",Ot="scroll",ot="end-reached",Ct="forward",ue="backward",it="auto",de="start",zt="center",fe="horizontal",It="vertical",ct="negative",At="positive-ascending",_t="positive-descending",he={[fe]:"left",[It]:"top"},ut=$({type:V([Number,Function]),required:!0}),dt=$({type:Number}),ft=$({type:Number,default:2}),me=$({type:String,values:["ltr","rtl"],default:"ltr"}),ht=$({type:Number,default:0}),nt=$({type:Number,required:!0}),Dt=$({type:String,values:["horizontal","vertical"],default:It}),Ft=lt({className:{type:String,default:""},containerElement:{type:V([String,Object]),default:"div"},data:{type:V(Array),default:()=>Vt([])},direction:me,height:{type:[String,Number],required:!0},innerElement:{type:[String,Object],default:"div"},innerProps:{type:V(Object),default:()=>({})},style:{type:V([Object,String,Array,Boolean]),default:void 0},useIsScrolling:Boolean,width:{type:[Number,String],required:!1},innerWidth:{type:[Number,String],required:!1},perfMode:{type:Boolean,default:!0},scrollbarAlwaysOn:Boolean}),ve=lt({cache:ft,estimatedItemSize:dt,layout:Dt,initScrollOffset:ht,total:nt,itemSize:ut,...Ft}),mt={type:Number,default:6},kt={type:Number,default:0},Pt={type:Number,default:2},pe=lt({columnCache:ft,columnWidth:ut,estimatedColumnWidth:dt,estimatedRowHeight:dt,initScrollLeft:ht,initScrollTop:ht,itemKey:{type:V(Function),default:({columnIndex:e,rowIndex:l})=>`${l}:${e}`},rowCache:ft,rowHeight:ut,totalColumn:nt,totalRow:nt,hScrollbarSize:mt,vScrollbarSize:mt,scrollbarStartGap:kt,scrollbarEndGap:Pt,role:String,...Ft}),ge=lt({alwaysOn:Boolean,class:String,layout:Dt,total:nt,ratio:{type:Number,required:!0},clientSize:{type:Number,required:!0},scrollFrom:{type:Number,required:!0},scrollbarSize:mt,startGap:kt,endGap:Pt,visible:Boolean}),Se=(e,l)=>e<l?Ct:ue,vt=e=>e==="ltr"||e==="rtl"||e==="horizontal";let H=null;function Rt(e=!1){if(H===null||e){const l=document.createElement("div"),s=l.style;s.width="50px",s.height="50px",s.overflow="scroll",s.direction="rtl";const E=document.createElement("div"),u=E.style;return u.width="100px",u.height="100px",l.appendChild(E),document.body.appendChild(l),l.scrollLeft>0?H=_t:(l.scrollLeft=1,l.scrollLeft===0?H=ct:H=At),document.body.removeChild(l),H}return H}function be({move:e,size:l,bar:s},E){const u={},g=`translate${s.axis}(${e}px)`;return u[s.size]=l,u.transform=g,E==="horizontal"?u.height="100%":u.width="100%",u}var pt=Number.isNaN||function(l){return typeof l=="number"&&l!==l};function ye(e,l){return!!(e===l||pt(e)&&pt(l))}function we(e,l){if(e.length!==l.length)return!1;for(var s=0;s<e.length;s++)if(!ye(e[s],l[s]))return!1;return!0}function Ee(e,l){l===void 0&&(l=we);var s=null;function E(){for(var u=[],g=0;g<arguments.length;g++)u[g]=arguments[g];if(s&&s.lastThis===this&&l(u,s.lastArgs))return s.lastResult;var S=e.apply(this,u);return s={lastResult:S,lastArgs:u,lastThis:this},S}return E.clear=function(){s=null},E}const Te=()=>{const e=xt().proxy.$props;return v(()=>{const l=(s,E,u)=>({});return e.perfMode?Ut(l):Ee(l)})},Me=Lt({name:"ElVirtualScrollBar",props:ge,emits:["scroll","start-move","stop-move"],setup(e,{emit:l}){const s=v(()=>e.startGap+e.endGap),E=st("virtual-scrollbar"),u=st("scrollbar"),g=P(),S=P();let M=null,y=null;const h=Yt({isDragging:!1,traveled:0}),t=v(()=>Qt[e.layout]),f=v(()=>e.clientSize-i(s)),z=v(()=>({position:"absolute",width:`${e.layout==="horizontal"?f.value:e.scrollbarSize}px`,height:`${e.layout==="horizontal"?e.scrollbarSize:f.value}px`,[he[e.layout]]:"2px",right:"2px",bottom:"2px",borderRadius:"4px"})),R=v(()=>{const o=e.ratio;if(o>=100)return Number.POSITIVE_INFINITY;if(o>=50)return o*f.value/100;const w=f.value/3;return Math.floor(Math.min(Math.max(o*f.value/100,20),w))}),U=v(()=>{if(!Number.isFinite(R.value))return{display:"none"};const o=`${R.value}px`;return be({bar:t.value,size:o,move:h.traveled},e.layout)}),T=v(()=>Math.ceil(e.clientSize-R.value-i(s))),C=()=>{window.addEventListener("mousemove",d),window.addEventListener("mouseup",p);const o=i(S);o&&(y=document.onselectstart,document.onselectstart=()=>!1,o.addEventListener("touchmove",d,{passive:!0}),o.addEventListener("touchend",p))},O=()=>{window.removeEventListener("mousemove",d),window.removeEventListener("mouseup",p),document.onselectstart=y,y=null;const o=i(S);o&&(o.removeEventListener("touchmove",d),o.removeEventListener("touchend",p))},I=o=>{o.stopImmediatePropagation(),!(o.ctrlKey||[1,2].includes(o.button))&&(h.isDragging=!0,h[t.value.axis]=o.currentTarget[t.value.offset]-(o[t.value.client]-o.currentTarget.getBoundingClientRect()[t.value.direction]),l("start-move"),C())},p=()=>{h.isDragging=!1,h[t.value.axis]=0,l("stop-move"),O()},d=o=>{const{isDragging:w}=h;if(!w||!S.value||!g.value)return;const B=h[t.value.axis];if(!B)return;Zt(M);const _=(g.value.getBoundingClientRect()[t.value.direction]-o[t.value.client])*-1-(S.value[t.value.offset]-B);M=Jt(()=>{h.traveled=Math.max(0,Math.min(_,T.value)),l("scroll",_,T.value)})},A=o=>{const w=Math.abs(o.target.getBoundingClientRect()[t.value.direction]-o[t.value.client])-S.value[t.value.offset]/2;h.traveled=Math.max(0,Math.min(w,T.value)),l("scroll",w,T.value)};return Nt(()=>e.scrollFrom,o=>{h.isDragging||(h.traveled=Math.ceil(o*T.value))}),jt(()=>{O()}),()=>k("div",{role:"presentation",ref:g,class:[E.b(),e.class,(e.alwaysOn||h.isDragging)&&"always-on"],style:z.value,onMousedown:Kt(A,["stop","prevent"]),onTouchstartPrevent:I},k("div",{ref:S,class:u.e("thumb"),style:U.value,onMousedown:I},[]))}}),Oe=({name:e,getOffset:l,getItemSize:s,getItemOffset:E,getEstimatedTotalSize:u,getStartIndexForOffset:g,getStopIndexForStartIndex:S,initCache:M,clearCache:y,validateProps:h})=>Lt({name:e??"ElVirtualList",props:ve,emits:[Mt,Ot,ot],setup(t,{emit:f,expose:z}){h(t);const R=xt(),U=st("vl"),T=P(M(t,R)),C=Te(),O=P(),I=P(),p=P(),d=P({isScrolling:!1,scrollDir:Ct,scrollOffset:Z(t.initScrollOffset)?t.initScrollOffset:0,updateRequested:!1,isScrollbarDragging:!1}),A=v(()=>{const{total:n,cache:a}=t,{isScrolling:r,scrollDir:m,scrollOffset:c}=i(d);if(n===0)return[0,0,0,0];const b=g(t,c,i(T)),x=S(t,b,c,i(T)),q=!r||m==="backward"?Math.max(1,a):1,G=!r||m==="forward"?Math.max(1,a):1;return[Math.max(0,b-q),Math.max(0,Math.min(n-1,x+G)),b,x]}),o=v(()=>u(t,i(T))),w=v(()=>vt(t.layout)),B=v(()=>[{position:"relative",[`overflow-${w.value?"x":"y"}`]:"scroll",WebkitOverflowScrolling:"touch",willChange:"transform"},{direction:t.direction,height:Z(t.height)?`${t.height}px`:t.height,width:Z(t.width)?`${t.width}px`:t.width},t.style]),_=v(()=>{const n=i(o),a=i(w),r=t.innerWidth;return{height:a?"100%":`${n}px`,pointerEvents:i(d).isScrolling?"none":void 0,width:a?`${n}px`:r!==void 0?Z(r)?`${r}px`:r:"100%",margin:0,boxSizing:"border-box"}}),J=v(()=>w.value?t.width:t.height),L=v(()=>Math.max(0,o.value-J.value)),j=n=>ae(n,0,L.value),Q=1,X=n=>
1({start:!Et(n,0,Q),end:!Et(L.value,n,Q)}),tt=v(()=>j(d.value.scrollOffset)),D=v(()=>X(tt.value));let N=D.value;const{onWheel:K}=ce({atStartEdge:v(()=>D.value.start),atEndEdge:v(()=>D.value.end),layout:v(()=>t.layout)},n=>{var a,r;(r=(a=p.value).onMouseUp)==null||r.call(a),Y(Math.min(d.value.scrollOffset+n,L.value))});ee(O,"wheel",K,{passive:!1});const et=()=>{const{total:n}=t;if(n>0){const[c,b,x,q]=i(A);f(Mt,c,b,x,q)}const{scrollDir:a,scrollOffset:r,updateRequested:m}=i(d);f(Ot,a,r,m)},rt=(n,a)=>{const r=X(a),m=t.direction==="rtl"?"left":"right",c=t.direction==="rtl"?"right":"left";n==="forward"&&r.end&&!N.end&&f(ot,w.value?m:"bottom"),n==="backward"&&r.start&&!N.start&&f(ot,w.value?c:"top"),N=r},W=(n,{isScrolling:a,updateRequested:r})=>{const m=i(d),c=Math.max(n,0);if(c===m.scrollOffset)return;const b=Se(m.scrollOffset,c);d.value={...m,isScrolling:a,scrollDir:b,scrollOffset:c,updateRequested:r},rt(b,j(c)),Tt(Gt)},F=n=>{const{clientHeight:a,scrollHeight:r,scrollTop:m}=n.currentTarget;i(d).scrollOffset!==m&&W(Math.min(m,r-a),{isScrolling:!0,updateRequested:!1})},$t=n=>{const{clientWidth:a,scrollLeft:r,scrollWidth:m}=n.currentTarget;if(i(d).scrollOffset===r)return;const{direction:c}=t;let b=r;if(c==="rtl")switch(Rt()){case ct:b=-r;break;case _t:b=m-a-r;break}W(Math.min(b,m-a),{isScrolling:!0,updateRequested:!1})},Bt=n=>{i(w)?$t(n):F(n),et()},Wt=(n,a)=>{const r=L.value/a*n;Y(Math.min(L.value,r))},Y=n=>{W(n,{isScrolling:i(d).isScrolling,updateRequested:!0})},gt=(n,a=it)=>{const{scrollOffset:r}=i(d);n=Math.max(0,Math.min(n,t.total-1)),Y(l(t,n,a,r,i(T)))},qt=n=>{const{direction:a,itemSize:r,layout:m}=t,c=C.value(y&&r,y&&m,y&&a);let b;if(se(c,String(n)))b=c[n];else{const x=E(t,n,i(T)),q=s(t,n,i(T)),G=i(w),bt=a==="rtl",yt=G?x:0;c[n]=b={position:"absolute",left:bt?void 0:`${yt}px`,right:bt?`${yt}px`:void 0,top:G?0:`${x}px`,height:G?"100%":`${q}px`,width:G?`${q}px`:"100%"}}return b},Gt=()=>{d.value.isScrolling=!1,Tt(()=>{C.value(-1,null,null)})},St=()=>{const n=O.value;n&&(n.scrollTop=0)};ne(()=>{if(!le)return;const{initScrollOffset:n}=t,a=i(O);Z(n)&&a&&(i(w)?a.scrollLeft=n:a.scrollTop=n),et()}),re(()=>{const{direction:n,layout:a}=t,{scrollOffset:r,updateRequested:m}=i(d),c=i(O);if(m&&c)if(a==="horizontal")if(n==="rtl")switch(Rt()){case ct:c.scrollLeft=-r;break;case At:c.scrollLeft=r;break;default:{const{clientWidth:b,scrollWidth:x}=c;c.scrollLeft=x-b-r;break}}else c.scrollLeft=r;else c.scrollTop=r}),oe(()=>{i(O).scrollTop=i(d).scrollOffset}),Nt(L,()=>{N=D.value});const Ht={ns:U,clientSize:J,estimatedTotalSize:o,windowStyle:B,windowRef:O,innerRef:I,innerStyle:_,itemsToRender:A,scrollbarRef:p,states:d,getItemStyle:qt,onScroll:Bt,onScrollbarScroll:Wt,onWheel:K,scrollTo:Y,scrollToItem:gt,resetScrollTop:St};return z({windowRef:O,innerRef:I,getItemStyleCache:C,scrollTo:Y,scrollToItem:gt,resetScrollTop:St,states:d}),Ht},render(t){var W;const{$slots:f,className:z,clientSize:R,containerElement:U,data:T,getItemStyle:C,innerElement:O,itemsToRender:I,innerStyle:p,layout:d,scrollbarAlwaysOn:A,total:o,onScroll:w,onScrollbarScroll:B,states:_,useIsScrolling:J,windowStyle:L,ns:j}=t,[Q,X]=I,tt=wt(U),D=wt(O),N=[];if(o>0)for(let F=Q;F<=X;F++)N.push(k(Xt,{key:F},(W=f.default)==null?void 0:W.call(f,{data:T,index:F,isScrolling:J?_.isScrolling:void 0,style:C(F)})));const K=[k(D,te(t.innerProps,{style:p,ref:"innerRef"}),at(D)?N:{default:()=>N})],et=k(Me,{ref:"scrollbarRef",clientSize:R,layout:d,onScroll:B,ratio:R*100/this.estimatedTotalSize,scrollFrom:_.scrollOffset/(this.estimatedTotalSize-R),total:o,alwaysOn:A}),rt=k(tt,{class:[j.e("window"),z],style:L,onScroll:w,ref:"windowRef",key:0},at(tt)?[K]:{default:()=>[K]});return k("div",{key:0,class:[j.e("wrapper"),A?"always-on":""]},[rt,et])}}),xe=Oe({name:"ElFixedSizeList",getItemOffset:({itemSize:e},l)=>l*e,getItemSize:({itemSize:e})=>e,getEstimatedTotalSize:({total:e,itemSize:l})=>l*e,getOffset:({height:e,total:l,itemSize:s,layout:E,width:u},g,S,M)=>{const y=vt(E)?u:e;at(y)&&ie("[ElVirtualList]",`
2        You should set
3          width/height
4        to number when your layout is
5          horizontal/vertical
6      `);const h=Math.max(0,l*s-y),t=Math.min(h,g*s),f=Math.max(0,(g+1)*s-y);switch(S==="smart"&&(M>=f-y&&M<=t+y?S=it:S=zt),S){case de:return t;case"end":return f;case zt:{const z=Math.round(f+(t-f)/2);return z<Math.ceil(y/2)?0:z>h+Math.floor(y/2)?h:z}case it:default:return M>=f&&M<=t?M:M<f?f:t}},getStartIndexForOffset:({total:e,itemSize:l},s)=>Math.max(0,Math.min(e-1,Math.floor(s/l))),getStopIndexForStartIndex:({height:e,total:l,itemSize:s,layout:E,width:u},g,S)=>{const M=g*s,y=vt(E)?u:e,h=Math.ceil((y+S-M)/s);return Math.max(0,Math.min(l-1,g+h-1))}
6,initCache(){},clearCache:!0,validateProps(){}});export{it as A,zt as C,xe as F,de as S,Oe as c,vt as i};

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.