1import{_ as p,o as a,c as l,b as _,w as o,f as v,e as s,g as b,q as r,a as u,d as i,t as g,P,bC as f}from"./Bv6rD22K.js";const m={name:"PaginationControls",props:{totalPages:{type:Number,required:!0},currentPage:{type:Number,required:!0},perPage:{type:Number,default:20}},data(){return{isDesktop:!1}},computed:{previousPage(){return this.currentPage-1},twoPagesPreviousToCurrentPage(){return this.currentPage-2},nextPage(){return this.currentPage+1},twoPagesAfterCurrentPage(){return this.currentPage+2},showPreviousPage(){return this.currentPage>1},showTwoPagesPreviousToCurrentPage(){return this.isDesktop?this.currentPage>2:this.currentPage===this.totalPages&&this.totalPages>3},showFirstPage(){return this.isDesktop?this.currentPage>3:this.currentPage>2},showPreviousDots(){return this.isDesktop?this.currentPage>4:this.currentPage>3},showNextPage(){return this.currentPage<this.totalPages},showTwoPagesAfterCurrentPage(){return this.isDesktop?this.nextPage<this.totalPages:this.currentPage===1&&this.totalPages>3},showLastPage(){return this.isDesktop?this.twoPagesAfterCurrentPage<this.totalPages:this.nextPage<this.totalPages},showNextDots(){return this.isDesktop?this.twoPagesAfterCurrentPage+1<this.totalPages:this.twoPagesAfterCurrentPage<this.totalPages}},mounted(){this.isDesktop=f()},methods:{buildLink(c){return(this._.provides[P]||this.$route).params.page?{...this._.provides[P]||this.$route,params:{...(this._.provides[P]||this.$route).params,page:c}}:{...this._.provides[P]||this.$route,query:{...(this._.provides[P]||this.$route).query,page:c}}}}},k={key:0,class:"pagination-controls","aria-label":"pagination"},w={key:0,class:"pagination-controls__nav-container"},y={key:2,class:"pagination-controls__dots"},x={class:"pagination-controls__current-page-number button-reset",disabled:"true","aria-current":"page","aria-disabled":"true"},C={key:7,class:"pagination-controls__dots"},D={key:9,class:"pagination-controls__nav-container"};function N(c,e,d,L,T,t){const h=v,n=b;return d.totalPages>1?(a(),l("nav",k,[t.showPreviousPage?(a(),l("div",w,[_(n,{ref:"prev-button",class:"pagination-controls__nav-button",to:t.buildLink(t.previousPage)},{default:o(()=>[_(h,{name:"caret",class:"pagination-controls__button-icon pagination-controls__button-icon--prev icon--smallest"}),e[0]||(e[0]=s("span",{class:"pagination-controls__button-text"}," Prev ",-1)),e[1]||(e[1]=s("span",{class:"visually-hidden"},"page",-1))]),_:1},8,["to"])])):r("",!0),t.showFirstPage?(a(),u(n,{key:1,class:"pagination-controls__number",to:t.buildLink(1)},{default:o(()=>[...e[2]||(e[2]=[s("span",{class:"visually-hidden"},"page",-1),i(" 1 ",-1)])]),_:1},8,["to"])):r("",!0),t.showPreviousDots?(a(),l("span",y,"...")):r("",!0),t.showTwoPagesPreviousToCurrentPage?(a(),u(n,{key:3,class:"pagination-controls__number",to:t.buildLink(t.twoPagesPreviousToCurrentPage)},{default:o(()=>[e[3]||(e[3]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(t.twoPagesPreviousToCurrentPage),1)]),_:1},8,["to"])):r("",!0),t.showPreviousPage?(a(),u(n,{key:4,class:"pagination-controls__number",to:t.buildLink(t.previousPage)},{default:o(()=>[e[4]||(e[4]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(t.previousPage),1)]),_:1},8,["to"])):r("",!0),s("button",x,[e[5]||(e[5]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(d.currentPage),1)]),t.showNextPage?(a(),u(n,{key:5,class:"pagination-controls__number",to:t.buildLink(t.nextPage)},{default:o(()=>[e[6]||(e[6]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(t.nextPage),1)]),_:1},8,["to"])):r("",!0),t.showTwoPagesAfterCurrentPage?(a(),u(n,{key:6,class:"pagination-controls__number",to:t.buildLink(t.twoPagesAfterCurrentPage)},{default:o(()=>[e[7]||(e[7]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(t.twoPagesAfterCurrentPage),1)]),_:1},8,["to"])):r("",!0),t.showNextDots?(a(),l("span",C,"...")):r("",!0),t.showLastPage?(a(),u(n,{key:8,class:"pagination-controls__number",to:t.buildLink(d.totalPages)},{default:o(()=>[e[8]||(e[8]=s("span",{class:"visually-hidden"},"page",-1)),i(" "+g(d.totalPages),1)]),_:1},8,["to"])):r("",!0),t.showNextPage?(a(),l("div",D,[_(n,{ref:"next-button",class:"pagination-controls__nav-button",to:t.buildLink(t.nextPage)},{default:o(()=>[e[9]||(e[9]=s("span",{class:"pagination-controls__button-text"}," Next ",-1)),_(h,{name:"caret",class:"pagination-controls__button-icon pagination-controls__button-icon--next icon--smallest"}),e[10]||(e[10]=s("span",{class:"visually-hidden"},"page",-1))]),_:1},8,["to"])])):r("",!0)])):r("",!0)}const q=Object.assign(p(m,[["render",N],["__scopeId","data-v-d8ec18c9"]]),{__name:"PaginationControls"});export{q as _};
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.