1import{E as e,J as t,Jt as n,O as r,Ot as i,Qt as a,Z as o,_ as s,b as c,u as l,v as u,x as d}from"./CUpSHvo9.js";import{t as f}from"./eM98wpt-.js";var p={class:`flex flex-col justify-center items-center w-full py-20 gap-4`,"aria-label":`Loading`},m={class:`text-fg-muted text-sm font-medium animate-pulse`},h=Object.assign(r({__name:`Loading`,props:{text:{default:`Loadingâ¦`}},setup(e){return(n,r)=>(t(),d(`div`,p,[r[0]||=u(`div`,{class:`relative w-12 h-12`},[u(`div`,{class:`absolute top-0 left-0 w-full h-full border-4 border-border-subtle rounded-full`}),u(`div`,{class:`absolute top-0 left-0 w-full h-full border-4 border-primary rounded-full border-t-transparent animate-spin`})],-1),u(`p`,m,a(e.text),1)]))}}),{__name:`MqLoading`}),g={key:0,class:`flex justify-center items-center gap-2 mt-12`,"aria-label":`Pagination`},_=[`disabled`],v={class:`flex items-center gap-1`},y=[`onClick`,`aria-current`],b={key:1,class:`w-10 h-10 flex items-center justify-center text-fg-muted`},x=[`disabled`],S=Object.assign(r({__name:`Pagination`,props:{totalCount:{},currentPage:{},limit:{}},emits:[`change`],setup(r,{emit:p}){let m=r,h=p,S=s(()=>Math.ceil(m.totalCount/m.limit)),C=s(()=>{let e=m.currentPage,t=S.value,n=[],r=[],i;if(n.push(1),t<=1)return[1];for(let r=e-2;r<=e+2;r++)r<t&&r>1&&n.push(r);n.push(t);for(let e of n)i&&(e-i===2?r.push(i+1):e-i!==1&&r.push(`...`)),r.push(e),i=e;return r}),w=e=>{typeof e==`number`&&e!==m.currentPage&&h(`change`,e)},T=()=>{m.currentPage>1&&h(`change`,m.currentPage-1)},E=()=>{m.currentPage<S.value&&h(`change`,m.currentPage+1)};return(s,p)=>{let m=f;return i(S)>1?(t(),d(`nav`,g,[u(`button`,{onClick:T,disabled:r.currentPage===1,class:`p-2 flex items-center justify-center border-none rounded-lg hover:bg-surface-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,"aria-label":`Previous page`},[e(m,{name:`material-symbols:chevron-left`,class:`w-6 h-6 text-fg-muted`})],8,_),u(`div`,v,[(t(!0),d(l,null,o(i(C),(e,i)=>(t(),d(l,{key:i},[typeof e==`number`?(t(),d(`button`,{key:0,onClick:t=>w(e),class:n([`flex items-center justify-center border-none w-10 h-10 rounded-lg text-sm font-medium transition-colors`,r.currentPage===e?`bg-primary text-white`:`text-fg-muted hover:bg-surface-muted`]),"aria-current":r.currentPage===e?`page`:void 0},a(e),11,y)):(t(),d(`span`,b,` ... `))],64))),128))]),u(`button`,{onClick:E,disabled:r.currentPage===i(S),class:`p-2 flex items-center justify-center border-none rounded-lg hover:bg-surface-muted disabled:opacity-50 disabled:cursor-not-allowed transition-colors`,"aria-label":`Next page`},[e(m,{name:`material-symbols:chevron-right`,class:`w-6 h-6 text-fg-muted`})],8,x)])):c(``,!0)}}}),{__name:`MqPagination`});export{h as n,S 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.