1import{t as e}from"./DmaT04Vf.js";import{$t as t,An as n,Nn as r,Qt as i,an as a,cn as o,dn as s,in as c,ir as l,it as u,or as d,ot as f,pn as p,sn as m,tr as h}from"./B-xOH4IK.js";var g={key:0,class:`flex jc:center`},_={class:`pagination mb-0`},v=[`onClick`],y=5,b=Object.assign(p({__name:`Pagination`,props:{pagination:{}},setup(p){let b=p,x=f(),S=c(()=>{let{page:e,totalPages:t}=b.pagination,n=Math.max(1,e-Math.floor(y/2)),r=n+y-1;return r>t&&(r=t,n=Math.max(1,r-y+1)),Array.from({length:r-n+1},(e,t)=>n+t)});function C(e){e<1||e>b.pagination.totalPages||e===b.pagination.page||u({path:x.path,query:{...x.query,page:e.toString()}})}return(c,u)=>{let f=e;return p.pagination.totalPages>1?(n(),o(`div`,g,[a(`ul`,_,[a(`li`,{class:l([`page-item`,{disabled:p.pagination.page<=1}])},[a(`a`,{class:l([`page-link`,{"pe-none":p.pagination.page<=1}]),href:`#`,onClick:u[0]||=i(e=>C(p.pagination.page-1),[`prevent`])},[s(f,{name:`fa:angle-left`,class:`icon`})],2)],2),(n(!0),o(t,null,r(h(S),e=>(n(),o(`li`,{key:e,class:l([`page-item`,{active:e===p.pagination.page}])},[a(`a`,{class:l([`page-link`,{"pe-none":e===p.pagination.page}]),href:`#`,onClick:i(t=>C(e),[`prevent`])},d(e),11,v)],2))),128)),a(`li`,{class:l([`page-item`,{disabled:p.pagination.page>=p.pagination.totalPages}])},[a(`a`,{class:l([`page-link`,{"pe-none":p.pagination.page>=p.pagination.totalPages}]),href:`#`,onClick:u[1]||=i(e=>C(p.pagination.page+1),[`prevent`])},[s(f,{name:`fa:angle-right`,class:`icon`})],2)],2)])])):m(``,!0)}}}),{__name:`Pagination`});export{b 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.