import{en as e}from"./index-BKLG6eUi.js";var t=200;async function n(n,r,i,a){if(a!==-1){let t=await e.get(n,{...r,page:i,per_page:a});return{items:t.items||[],total:t.total??0}}let o=[],s=1,c=1,l=0;do{let i=await e.get(n,{...r,page:s,per_page:t});o.push(...i.items||[]),l=i.total??o.length,c=i.pages??1,s+=1}while(s<=c);return{items:o,total:l}}async function r(e,n,r){if(r!==-1)return e(r,(n-1)*r);let i=[],a=0,o=0;do{let n=await e(t,a);if(i.push(...n.items||[]),o=n.total??i.length,!n.items.length||i.length>=o)break;a+=t}while(!0);return{items:i,total:o}}export{n,r as t};