import{a as s,b as n,c as f,d as b,e as l,f as p,g as i,h as x,i as u,j as m,k as C,l as h,m as w,n as y,o as g,p as D,q as E,r as v,s as T,t as A,u as O,v as I,$ as j,w as M,x as S,y as U,z as k,A as q,B as L,C as _,D as B,E as R,F as Z,G as F,H as G,I as J,J as N}from"./simpleDatePicker-CE9I3GgK.js";import{h as z,I as H,r as P,aG as W}from"./app-DZcRemIr.js";const X=Object.freeze(Object.defineProperty({__proto__:null,BuddhistCalendar:n,CalendarDate:f,CalendarDateTime:b,CopticCalendar:l,DateFormatter:p,EthiopicAmeteAlemCalendar:i,EthiopicCalendar:x,GregorianCalendar:u,HebrewCalendar:m,IndianCalendar:C,IslamicCivilCalendar:h,IslamicTabularCalendar:w,IslamicUmalquraCalendar:y,JapaneseCalendar:g,PersianCalendar:D,TaiwanCalendar:E,ZonedDateTime:v,createCalendar:T,endOfMonth:A,fromAbsolute:O,getDayOfWeek:I,getLocalTimeZone:j,isEqualCalendar:M,isEqualDay:S,isEqualMonth:U,isSameDay:k,isSameMonth:q,isToday:L,now:_,parseDate:s,startOfMonth:B,toCalendar:R,toCalendarDate:Z,toCalendarDateTime:F,toTimeZone:G,toZoned:J,today:N},Symbol.toStringTag,{value:"Module"}));async function K(a){var d;if(W(a)&&((d=a.response)==null?void 0:d.data)instanceof Blob)try{const c=await a.response.data.text(),r=JSON.parse(c);return r.error||r.message||"No se pudo generar el archivo."}catch{}return"No se pudo generar el archivo. Intenta acotar el rango de fechas o los filtros."}function Y(){const a=P(!1);async function d(c,r,$){a.value=!0;try{const o=await z.get(`${c}?${r}`,{responseType:"blob",_suppressAlert:!0}),t=window.URL.createObjectURL(new Blob([o.data])),e=document.createElement("a");e.href=t,e.setAttribute("download",$),document.body.appendChild(e),e.click(),document.body.removeChild(e),window.URL.revokeObjectURL(t)}catch(o){console.error("Error al generar el archivo:",o),H().showError(await K(o))}finally{a.value=!1}}return{downloading:a,descargar:d}}export{X as i,Y as u};
