1import{d as L,S as $,r as f,g as s,h as o,q as d,_ as h,l as c,m as r,E as m,i as v,F as w,n as V,Z as j,s as H}from"./D5FfVpSQ.js";import{_ as T}from"./DlAUqK2U.js";const B={class:"relative w-fit mx-auto"},F=["aria-label"],z={class:"flex items-center justify-center gap-2"},N=["aria-label"],E={key:0},I=["aria-label","onClick","innerHTML"],O={key:1},S=["aria-label","innerHTML"],q=["aria-label"],A=L({__name:"Pagination",props:j({pageSize:{},pageCount:{},visiblePages:{default:3}},{modelValue:{default:1},modelModifiers:{}}),emits:["update:modelValue"],setup(e){const l=$(e,"modelValue"),t=f(2),a=f(Math.min(e.pageCount-1,e.visiblePages+1)),C=H(()=>Array.from({length:a.value-t.value+1},(n,i)=>t.value+i));function g(n){if(l.value=n,n===1)return y();if(n===e.pageCount)return x();n>a.value&&a.value<e.pageCount-1?P():n<t.value&&t.value>2&&k(),M()}function y(){t.value=2,a.value=Math.min(e.pageCount-1,e.visiblePages+1)}function x(){a.value=e.pageCount-1,t.value=Math.max(2,e.pageCount-e.visiblePages)}function P(){t.value+=e.visiblePages,a.value=Math.min(e.pageCount-1,a.value+e.visiblePages)}function k(){t.value=Math.max(2,t.value-e.visiblePages),a.value=t.value+e.visiblePages-1}function M(){a.value===e.pageCount-1&&a.value-t.value+1<e.visiblePages&&(t.value=Math.max(2,e.pageCount-e.visiblePages),a.value=e.pageCount-1)}return(n,i)=>{const b=h;return s(),o("nav",B,[l.value>1?(s(),o("button",{key:0,type:"button",class:"absolute top-1/2 -left-3 -translate-y-1/2","aria-label":n.$t("pagination.ariaLabel",{page:l.value-1,total:e.pageCount}),onClick:i[0]||(i[0]=u=>g(l.value-1))},[d(b,{name:"chevron-up",class:"-rotate-90",width:10,height:13})],8,F)):c("",!0),r("ul",z,[r("li",null,[r("button",{type:"button",class:m(["w-9 h-9 flex justify-center items-center text-xs font-medium rounded-sm transition-all duration-300 ease-in-out",l.value===1?"bg-grey-900 text-grey-50":"bg-transparent text-grey-950"]),"aria-label":n.$t("pagination.ariaLabel",{page:1,total:e.pageCount}),onClick:i[1]||(i[1]=u=>g(1)),innerHTML:"1"},null,10,N)]),v(t)>2?(s(),o("li",E,"...")):c("",!0),(s(!0),o(w,null,V(v(C),u=>(s(),o("li",{key:u},[r("button",{type:"button",class:m(["w-9 h-9 flex justify-center items-center text-xs font-medium rounded-sm transition-all duration-300 ease-in-out",l.value===u?"bg-grey-900 text-grey-50":"bg-transparent text-grey-950"]),"aria-label":n.$t("pagination.ariaLabel",{page:u,total:e.pageCount}),onClick:G=>g(u),innerHTML:u},null,10,I)]))),128)),v(a)<e.pageCount-1?(s(),o("li",O,"...")):c("",!0),r("li",null,[r("button",{type:"button",class:m(["w-9 h-9 flex justify-center items-center text-xs font-medium rounded-sm transition-all duration-300 ease-in-out",l.value===e.pageCount?"bg-grey-900 text-grey-50":"bg-transparent text-grey-950"]),"aria-label":n.$t("pagination.ariaLabel",{page:e.pageCount,total:e.pageCount}),onClick:i[2]||(i[2]=u=>g(e.pageCount)),innerHTML:e.pageCount},null,10,S)])]),l.value<e.pageCount?(s(),o("button",{key:1,type:"button",class:"absolute top-1/2 -right-3 -translate-y-1/2","aria-label":n.$t("pagination.ariaLabel",{page:l.value+1,total:e.pageCount}),onClick:i[3]||(i[3]=u=>g(l.value+1))},[d(b,{name:"chevron-up",class:"rotate-90",width:10,height:13})],8,q)):c("",!0)])}}}),Q=Object.assign(A,{__name:"Pagination"}),R={},Z={class:"fixed top-0 left-0 flex justify-center items-center w-full h-svh lg:h-screen bg-grey-400/30 z-30"};function D(e,l){const t=h;return s(),o("div",Z,[d(t,{name:"spinner",width:30,height:30,class:"text-grey-900 animate-spin"})])}const U=Object.assign(T(R,[["render",D]]),{__name:"Loader"});export{Q as _,U as a};
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.