UNPKG

@bitrix24/b24jssdk

Version:

Bitrix24 REST API JavaScript SDK

8 lines 416 kB
var Yy=Object.defineProperty;var a=(A,z)=>Yy(A,"name",{value:z,configurable:!0});/** * @package @bitrix24/b24jssdk * @version 1.2.0 * @copyright (c) 2026 Bitrix24 * @license MIT * @see https://github.com/bitrix24/b24jssdk * @see https://bitrix24.github.io/b24jssdk/ */(function(A,z){typeof exports=="object"&&typeof module<"u"?z(exports):typeof define=="function"&&define.amd?define(["exports"],z):(A=typeof globalThis<"u"?globalThis:A||self,z(A.B24Js={}))})(this,(function(A){"use strict";var z=(r=>(r[r.DEBUG=0]="DEBUG",r[r.INFO=1]="INFO",r[r.NOTICE=2]="NOTICE",r[r.WARNING=3]="WARNING",r[r.ERROR=4]="ERROR",r[r.CRITICAL=5]="CRITICAL",r[r.ALERT=6]="ALERT",r[r.EMERGENCY=7]="EMERGENCY",r))(z||{});class Et extends Error{static{a(this,"LuxonError")}}class Fc extends Et{static{a(this,"InvalidDateTimeError")}constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class xc extends Et{static{a(this,"InvalidIntervalError")}constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class $c extends Et{static{a(this,"InvalidDurationError")}constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Mt extends Et{static{a(this,"ConflictingSpecificationError")}}class zn extends Et{static{a(this,"InvalidUnitError")}constructor(e){super(`Invalid unit ${e}`)}}class Ce extends Et{static{a(this,"InvalidArgumentError")}}class pt extends Et{static{a(this,"ZoneIsAbstractError")}constructor(){super("Zone is an abstract class")}}const L="numeric",Ye="short",Ue="long",kr={year:L,month:L,day:L},Jn={year:L,month:Ye,day:L},Bc={year:L,month:Ye,day:L,weekday:Ye},Gn={year:L,month:Ue,day:L},Yn={year:L,month:Ue,day:L,weekday:Ue},Zn={hour:L,minute:L},Kn={hour:L,minute:L,second:L},Xn={hour:L,minute:L,second:L,timeZoneName:Ye},Qn={hour:L,minute:L,second:L,timeZoneName:Ue},ei={hour:L,minute:L,hourCycle:"h23"},ti={hour:L,minute:L,second:L,hourCycle:"h23"},ri={hour:L,minute:L,second:L,hourCycle:"h23",timeZoneName:Ye},si={hour:L,minute:L,second:L,hourCycle:"h23",timeZoneName:Ue},ni={year:L,month:L,day:L,hour:L,minute:L},ii={year:L,month:L,day:L,hour:L,minute:L,second:L},oi={year:L,month:Ye,day:L,hour:L,minute:L},ai={year:L,month:Ye,day:L,hour:L,minute:L,second:L},jc={year:L,month:Ye,day:L,weekday:Ye,hour:L,minute:L},ci={year:L,month:Ue,day:L,hour:L,minute:L,timeZoneName:Ye},li={year:L,month:Ue,day:L,hour:L,minute:L,second:L,timeZoneName:Ye},ui={year:L,month:Ue,day:L,weekday:Ue,hour:L,minute:L,timeZoneName:Ue},hi={year:L,month:Ue,day:L,weekday:Ue,hour:L,minute:L,second:L,timeZoneName:Ue};class er{static{a(this,"Zone")}get type(){throw new pt}get name(){throw new pt}get ianaName(){return this.name}get isUniversal(){throw new pt}offsetName(e,t){throw new pt}formatOffset(e,t){throw new pt}offset(e){throw new pt}equals(e){throw new pt}get isValid(){throw new pt}}let _s=null;class Ir extends er{static{a(this,"SystemZone")}static get instance(){return _s===null&&(_s=new Ir),_s}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:s}){return xi(e,t,s)}formatOffset(e,t){return nr(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const ws=new Map;function Uc(r){let e=ws.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),ws.set(r,e)),e}a(Uc,"makeDTF");const Vc={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function qc(r,e){const t=r.format(e).replace(/\u200E/g,""),s=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,n,i,c,o,l,h,u]=s;return[c,n,i,o,l,h,u]}a(qc,"hackyOffset");function Hc(r,e){const t=r.formatToParts(e),s=[];for(let n=0;n<t.length;n++){const{type:i,value:c}=t[n],o=Vc[i];i==="era"?s[o]=c:G(o)||(s[o]=parseInt(c,10))}return s}a(Hc,"partsOffset");const Ss=new Map;class at extends er{static{a(this,"IANAZone")}static create(e){let t=Ss.get(e);return t===void 0&&Ss.set(e,t=new at(e)),t}static resetCache(){Ss.clear(),ws.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=at.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:s}){return xi(e,t,s,this.name)}formatOffset(e,t){return nr(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const s=Uc(this.name);let[n,i,c,o,l,h,u]=s.formatToParts?Hc(s,t):qc(s,t);o==="BC"&&(n=-Math.abs(n)+1);const p=Dr({year:n,month:i,day:c,hour:l===24?0:l,minute:h,second:u,millisecond:0});let f=+t;const d=f%1e3;return f-=d>=0?d:1e3+d,(p-f)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let di={};function Wc(r,e={}){const t=JSON.stringify([r,e]);let s=di[t];return s||(s=new Intl.ListFormat(r,e),di[t]=s),s}a(Wc,"getCachedLF");const vs=new Map;function Es(r,e={}){const t=JSON.stringify([r,e]);let s=vs.get(t);return s===void 0&&(s=new Intl.DateTimeFormat(r,e),vs.set(t,s)),s}a(Es,"getCachedDTF");const Os=new Map;function zc(r,e={}){const t=JSON.stringify([r,e]);let s=Os.get(t);return s===void 0&&(s=new Intl.NumberFormat(r,e),Os.set(t,s)),s}a(zc,"getCachedINF");const Ts=new Map;function Jc(r,e={}){const{base:t,...s}=e,n=JSON.stringify([r,s]);let i=Ts.get(n);return i===void 0&&(i=new Intl.RelativeTimeFormat(r,e),Ts.set(n,i)),i}a(Jc,"getCachedRTF");let tr=null;function Gc(){return tr||(tr=new Intl.DateTimeFormat().resolvedOptions().locale,tr)}a(Gc,"systemLocale");const ks=new Map;function fi(r){let e=ks.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),ks.set(r,e)),e}a(fi,"getCachedIntResolvedOptions");const Is=new Map;function Yc(r){let e=Is.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...pi,...e}),Is.set(r,e)}return e}a(Yc,"getCachedWeekInfo");function Zc(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let s,n;try{s=Es(r).resolvedOptions(),n=r}catch{const l=r.substring(0,t);s=Es(l).resolvedOptions(),n=l}const{numberingSystem:i,calendar:c}=s;return[n,i,c]}}a(Zc,"parseLocaleString");function Kc(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}a(Kc,"intlConfigString");function Xc(r){const e=[];for(let t=1;t<=12;t++){const s=q.utc(2009,t,1);e.push(r(s))}return e}a(Xc,"mapMonths");function Qc(r){const e=[];for(let t=1;t<=7;t++){const s=q.utc(2016,11,13+t);e.push(r(s))}return e}a(Qc,"mapWeekdays");function Ar(r,e,t,s){const n=r.listingMode();return n==="error"?null:n==="en"?t(e):s(e)}a(Ar,"listStuff");function el(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||fi(r.locale).numberingSystem==="latn"}a(el,"supportsFastNumbers");class tl{static{a(this,"PolyNumberFormatter")}constructor(e,t,s){this.padTo=s.padTo||0,this.floor=s.floor||!1;const{padTo:n,floor:i,...c}=s;if(!t||Object.keys(c).length>0){const o={useGrouping:!1,...s};s.padTo>0&&(o.minimumIntegerDigits=s.padTo),this.inf=zc(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Fs(e,3);return ve(t,this.padTo)}}}class rl{static{a(this,"PolyDateFormatter")}constructor(e,t,s){this.opts=s,this.originalZone=void 0;let n;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const c=-1*(e.offset/60),o=c>=0?`Etc/GMT+${c}`:`Etc/GMT${c}`;e.offset!==0&&at.create(o).valid?(n=o,this.dt=e):(n="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||n,this.dtf=Es(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const s=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:s}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class sl{static{a(this,"PolyRelFormatter")}constructor(e,t,s){this.opts={style:"long",...s},!t&&Li()&&(this.rtf=Jc(e,s))}format(e,t){return this.rtf?this.rtf.format(e,t):Tl(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const pi={firstDay:1,minimalDays:4,weekend:[6,7]};class oe{static{a(this,"Locale")}static fromOpts(e){return oe.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,s,n,i=!1){const c=e||me.defaultLocale,o=c||(i?"en-US":Gc()),l=t||me.defaultNumberingSystem,h=s||me.defaultOutputCalendar,u=Ps(n)||me.defaultWeekSettings;return new oe(o,l,h,u,c)}static resetCache(){tr=null,vs.clear(),Os.clear(),Ts.clear(),ks.clear(),Is.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:s,weekSettings:n}={}){return oe.create(e,t,s,n)}constructor(e,t,s,n,i){const[c,o,l]=Zc(e);this.locale=c,this.numberingSystem=t||o||null,this.outputCalendar=s||l||null,this.weekSettings=n,this.intl=Kc(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=el(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:oe.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ps(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Ar(this,e,ji,()=>{const s=this.intl==="ja"||this.intl.startsWith("ja-");t&=!s;const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const c=s?o=>this.dtFormatter(o,n).format():o=>this.extract(o,n,"month");this.monthsCache[i][e]=Xc(c)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Ar(this,e,qi,()=>{const s=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=Qc(i=>this.extract(i,s,"weekday"))),this.weekdaysCache[n][e]})}meridiems(){return Ar(this,void 0,()=>Hi,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[q.utc(2016,11,13,9),q.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Ar(this,e,Wi,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[q.utc(-40,1,1),q.utc(2017,1,1)].map(s=>this.extract(s,t,"era"))),this.eraCache[e]})}extract(e,t,s){const n=this.dtFormatter(e,t),i=n.formatToParts(),c=i.find(o=>o.type.toLowerCase()===s);return c?c.value:null}numberFormatter(e={}){return new tl(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new rl(e,this.intl,t)}relFormatter(e={}){return new sl(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Wc(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||fi(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Pi()?Yc(this.locale):pi}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let As=null;class Me extends er{static{a(this,"FixedOffsetZone")}static get utcInstance(){return As===null&&(As=new Me(0)),As}static instance(e){return e===0?Me.utcInstance:new Me(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new Me(Lr(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${nr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${nr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return nr(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class nl extends er{static{a(this,"InvalidZone")}constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function gt(r,e){if(G(r)||r===null)return e;if(r instanceof er)return r;if(ul(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Ir.instance:t==="utc"||t==="gmt"?Me.utcInstance:Me.parseSpecifier(t)||at.create(r)}else return mt(r)?Me.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new nl(r)}a(gt,"normalizeZone");const Rs={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},gi={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},il=Rs.hanidec.replace(/[\[|\]]/g,"").split("");function ol(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const s=r.charCodeAt(t);if(r[t].search(Rs.hanidec)!==-1)e+=il.indexOf(r[t]);else for(const n in gi){const[i,c]=gi[n];s>=i&&s<=c&&(e+=s-i)}}return parseInt(e,10)}else return e}a(ol,"parseDigits");const Cs=new Map;function al(){Cs.clear()}a(al,"resetDigitRegexCache");function Ze({numberingSystem:r},e=""){const t=r||"latn";let s=Cs.get(t);s===void 0&&(s=new Map,Cs.set(t,s));let n=s.get(e);return n===void 0&&(n=new RegExp(`${Rs[t]}${e}`),s.set(e,n)),n}a(Ze,"digitRegex");let mi=a(()=>Date.now(),"now"),yi="system",bi=null,_i=null,wi=null,Si=60,vi,Ei=null;class me{static{a(this,"Settings")}static get now(){return mi}static set now(e){mi=e}static set defaultZone(e){yi=e}static get defaultZone(){return gt(yi,Ir.instance)}static get defaultLocale(){return bi}static set defaultLocale(e){bi=e}static get defaultNumberingSystem(){return _i}static set defaultNumberingSystem(e){_i=e}static get defaultOutputCalendar(){return wi}static set defaultOutputCalendar(e){wi=e}static get defaultWeekSettings(){return Ei}static set defaultWeekSettings(e){Ei=Ps(e)}static get twoDigitCutoffYear(){return Si}static set twoDigitCutoffYear(e){Si=e%100}static get throwOnInvalid(){return vi}static set throwOnInvalid(e){vi=e}static resetCaches(){oe.resetCache(),at.resetCache(),q.resetCache(),al()}}class Ke{static{a(this,"Invalid")}constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Oi=[0,31,59,90,120,151,181,212,243,273,304,334],Ti=[0,31,60,91,121,152,182,213,244,274,305,335];function We(r,e){return new Ke("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}a(We,"unitOutOfRange");function Ns(r,e,t){const s=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&s.setUTCFullYear(s.getUTCFullYear()-1900);const n=s.getUTCDay();return n===0?7:n}a(Ns,"dayOfWeek");function ki(r,e,t){return t+(rr(r)?Ti:Oi)[e-1]}a(ki,"computeOrdinal");function Ii(r,e){const t=rr(r)?Ti:Oi,s=t.findIndex(i=>i<e),n=e-t[s];return{month:s+1,day:n}}a(Ii,"uncomputeOrdinal");function Ds(r,e){return(r-e+7)%7+1}a(Ds,"isoWeekdayToLocal");function Rr(r,e=4,t=1){const{year:s,month:n,day:i}=r,c=ki(s,n,i),o=Ds(Ns(s,n,i),t);let l=Math.floor((c-o+14-e)/7),h;return l<1?(h=s-1,l=sr(h,e,t)):l>sr(s,e,t)?(h=s+1,l=1):h=s,{weekYear:h,weekNumber:l,weekday:o,...Mr(r)}}a(Rr,"gregorianToWeek");function Ai(r,e=4,t=1){const{weekYear:s,weekNumber:n,weekday:i}=r,c=Ds(Ns(s,1,e),t),o=xt(s);let l=n*7+i-c-7+e,h;l<1?(h=s-1,l+=xt(h)):l>o?(h=s+1,l-=xt(s)):h=s;const{month:u,day:g}=Ii(h,l);return{year:h,month:u,day:g,...Mr(r)}}a(Ai,"weekToGregorian");function Ls(r){const{year:e,month:t,day:s}=r,n=ki(e,t,s);return{year:e,ordinal:n,...Mr(r)}}a(Ls,"gregorianToOrdinal");function Ri(r){const{year:e,ordinal:t}=r,{month:s,day:n}=Ii(e,t);return{year:e,month:s,day:n,...Mr(r)}}a(Ri,"ordinalToGregorian");function Ci(r,e){if(!G(r.localWeekday)||!G(r.localWeekNumber)||!G(r.localWeekYear)){if(!G(r.weekday)||!G(r.weekNumber)||!G(r.weekYear))throw new Mt("Cannot mix locale-based week fields with ISO-based week fields");return G(r.localWeekday)||(r.weekday=r.localWeekday),G(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),G(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}a(Ci,"usesLocalWeekValues");function cl(r,e=4,t=1){const s=Cr(r.weekYear),n=ze(r.weekNumber,1,sr(r.weekYear,e,t)),i=ze(r.weekday,1,7);return s?n?i?!1:We("weekday",r.weekday):We("week",r.weekNumber):We("weekYear",r.weekYear)}a(cl,"hasInvalidWeekData");function ll(r){const e=Cr(r.year),t=ze(r.ordinal,1,xt(r.year));return e?t?!1:We("ordinal",r.ordinal):We("year",r.year)}a(ll,"hasInvalidOrdinalData");function Ni(r){const e=Cr(r.year),t=ze(r.month,1,12),s=ze(r.day,1,Nr(r.year,r.month));return e?t?s?!1:We("day",r.day):We("month",r.month):We("year",r.year)}a(Ni,"hasInvalidGregorianData");function Di(r){const{hour:e,minute:t,second:s,millisecond:n}=r,i=ze(e,0,23)||e===24&&t===0&&s===0&&n===0,c=ze(t,0,59),o=ze(s,0,59),l=ze(n,0,999);return i?c?o?l?!1:We("millisecond",n):We("second",s):We("minute",t):We("hour",e)}a(Di,"hasInvalidTimeData");function G(r){return typeof r>"u"}a(G,"isUndefined$1");function mt(r){return typeof r=="number"}a(mt,"isNumber$1");function Cr(r){return typeof r=="number"&&r%1===0}a(Cr,"isInteger");function ul(r){return typeof r=="string"}a(ul,"isString$1");function hl(r){return Object.prototype.toString.call(r)==="[object Date]"}a(hl,"isDate$1");function Li(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}a(Li,"hasRelative");function Pi(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}a(Pi,"hasLocaleWeekInfo");function dl(r){return Array.isArray(r)?r:[r]}a(dl,"maybeArray");function Mi(r,e,t){if(r.length!==0)return r.reduce((s,n)=>{const i=[e(n),n];return s&&t(s[0],i[0])===s[0]?s:i},null)[1]}a(Mi,"bestBy");function fl(r,e){return e.reduce((t,s)=>(t[s]=r[s],t),{})}a(fl,"pick$1");function Ft(r,e){return Object.prototype.hasOwnProperty.call(r,e)}a(Ft,"hasOwnProperty$1");function Ps(r){if(r==null)return null;if(typeof r!="object")throw new Ce("Week settings must be an object");if(!ze(r.firstDay,1,7)||!ze(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!ze(e,1,7)))throw new Ce("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}a(Ps,"validateWeekSettings");function ze(r,e,t){return Cr(r)&&r>=e&&r<=t}a(ze,"integerBetween");function pl(r,e){return r-e*Math.floor(r/e)}a(pl,"floorMod");function ve(r,e=2){const t=r<0;let s;return t?s="-"+(""+-r).padStart(e,"0"):s=(""+r).padStart(e,"0"),s}a(ve,"padStart");function yt(r){if(!(G(r)||r===null||r===""))return parseInt(r,10)}a(yt,"parseInteger");function Ot(r){if(!(G(r)||r===null||r===""))return parseFloat(r)}a(Ot,"parseFloating");function Ms(r){if(!(G(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}a(Ms,"parseMillis");function Fs(r,e,t="round"){const s=10**e;switch(t){case"expand":return r>0?Math.ceil(r*s)/s:Math.floor(r*s)/s;case"trunc":return Math.trunc(r*s)/s;case"round":return Math.round(r*s)/s;case"floor":return Math.floor(r*s)/s;case"ceil":return Math.ceil(r*s)/s;default:throw new RangeError(`Value rounding ${t} is out of range`)}}a(Fs,"roundTo");function rr(r){return r%4===0&&(r%100!==0||r%400===0)}a(rr,"isLeapYear");function xt(r){return rr(r)?366:365}a(xt,"daysInYear");function Nr(r,e){const t=pl(e-1,12)+1,s=r+(e-t)/12;return t===2?rr(s)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}a(Nr,"daysInMonth");function Dr(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}a(Dr,"objToLocalTS");function Fi(r,e,t){return-Ds(Ns(r,1,e),t)+e-1}a(Fi,"firstWeekOffset");function sr(r,e=4,t=1){const s=Fi(r,e,t),n=Fi(r+1,e,t);return(xt(r)-s+n)/7}a(sr,"weeksInWeekYear");function xs(r){return r>99?r:r>me.twoDigitCutoffYear?1900+r:2e3+r}a(xs,"untruncateYear");function xi(r,e,t,s=null){const n=new Date(r),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};s&&(i.timeZone=s);const c={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,c).formatToParts(n).find(l=>l.type.toLowerCase()==="timezonename");return o?o.value:null}a(xi,"parseZoneInfo");function Lr(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const s=parseInt(e,10)||0,n=t<0||Object.is(t,-0)?-s:s;return t*60+n}a(Lr,"signedOffset");function $i(r){const e=Number(r);if(typeof r=="boolean"||r===""||!Number.isFinite(e))throw new Ce(`Invalid unit value ${r}`);return e}a($i,"asNumber");function Pr(r,e){const t={};for(const s in r)if(Ft(r,s)){const n=r[s];if(n==null)continue;t[e(s)]=$i(n)}return t}a(Pr,"normalizeObject");function nr(r,e){const t=Math.trunc(Math.abs(r/60)),s=Math.trunc(Math.abs(r%60)),n=r>=0?"+":"-";switch(e){case"short":return`${n}${ve(t,2)}:${ve(s,2)}`;case"narrow":return`${n}${t}${s>0?`:${s}`:""}`;case"techie":return`${n}${ve(t,2)}${ve(s,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}a(nr,"formatOffset");function Mr(r){return fl(r,["hour","minute","second","millisecond"])}a(Mr,"timeObject");const gl=["January","February","March","April","May","June","July","August","September","October","November","December"],Bi=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ml=["J","F","M","A","M","J","J","A","S","O","N","D"];function ji(r){switch(r){case"narrow":return[...ml];case"short":return[...Bi];case"long":return[...gl];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}a(ji,"months");const Ui=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Vi=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],yl=["M","T","W","T","F","S","S"];function qi(r){switch(r){case"narrow":return[...yl];case"short":return[...Vi];case"long":return[...Ui];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}a(qi,"weekdays");const Hi=["AM","PM"],bl=["Before Christ","Anno Domini"],_l=["BC","AD"],wl=["B","A"];function Wi(r){switch(r){case"narrow":return[...wl];case"short":return[..._l];case"long":return[...bl];default:return null}}a(Wi,"eras");function Sl(r){return Hi[r.hour<12?0:1]}a(Sl,"meridiemForDateTime");function vl(r,e){return qi(e)[r.weekday-1]}a(vl,"weekdayForDateTime");function El(r,e){return ji(e)[r.month-1]}a(El,"monthForDateTime");function Ol(r,e){return Wi(e)[r.year<0?0:1]}a(Ol,"eraForDateTime");function Tl(r,e,t="always",s=!1){const n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&i){const g=r==="days";switch(e){case 1:return g?"tomorrow":`next ${n[r][0]}`;case-1:return g?"yesterday":`last ${n[r][0]}`;case 0:return g?"today":`this ${n[r][0]}`}}const c=Object.is(e,-0)||e<0,o=Math.abs(e),l=o===1,h=n[r],u=s?l?h[1]:h[2]||h[1]:l?n[r][0]:r;return c?`${o} ${u} ago`:`in ${o} ${u}`}a(Tl,"formatRelativeTime");function zi(r,e){let t="";for(const s of r)s.literal?t+=s.val:t+=e(s.val);return t}a(zi,"stringifyTokens");const kl={D:kr,DD:Jn,DDD:Gn,DDDD:Yn,t:Zn,tt:Kn,ttt:Xn,tttt:Qn,T:ei,TT:ti,TTT:ri,TTTT:si,f:ni,ff:oi,fff:ci,ffff:ui,F:ii,FF:ai,FFF:li,FFFF:hi};class Ne{static{a(this,"Formatter")}static create(e,t={}){return new Ne(e,t)}static parseFormat(e){let t=null,s="",n=!1;const i=[];for(let c=0;c<e.length;c++){const o=e.charAt(c);o==="'"?((s.length>0||n)&&i.push({literal:n||/^\s+$/.test(s),val:s===""?"'":s}),t=null,s="",n=!n):n||o===t?s+=o:(s.length>0&&i.push({literal:/^\s+$/.test(s),val:s}),s=o,t=o)}return s.length>0&&i.push({literal:n||/^\s+$/.test(s),val:s}),i}static macroTokenToFormatOpts(e){return kl[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,s=void 0){if(this.opts.forceSimple)return ve(e,t);const n={...this.opts};return t>0&&(n.padTo=t),s&&(n.signDisplay=s),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const s=this.loc.listingMode()==="en",n=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=a((f,d)=>this.loc.extract(e,f,d),"string"),c=a(f=>e.isOffsetFixed&&e.offset===0&&f.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,f.format):"","formatOffset"),o=a(()=>s?Sl(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),"meridiem"),l=a((f,d)=>s?El(e,f):i(d?{month:f}:{month:f,day:"numeric"},"month"),"month"),h=a((f,d)=>s?vl(e,f):i(d?{weekday:f}:{weekday:f,month:"long",day:"numeric"},"weekday"),"weekday"),u=a(f=>{const d=Ne.macroTokenToFormatOpts(f);return d?this.formatWithSystemDefault(e,d):f},"maybeMacro"),g=a(f=>s?Ol(e,f):i({era:f},"era"),"era"),p=a(f=>{switch(f){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return c({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return c({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return c({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return n?i({day:"numeric"},"day"):this.num(e.day);case"dd":return n?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return h("short",!0);case"cccc":return h("long",!0);case"ccccc":return h("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return h("short",!1);case"EEEE":return h("long",!1);case"EEEEE":return h("narrow",!1);case"L":return n?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return n?i({month:"numeric"},"month"):this.num(e.month);case"MM":return n?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return n?i({year:"numeric"},"year"):this.num(e.year);case"yy":return n?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return g("short");case"GG":return g("long");case"GGGGG":return g("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"n":return this.num(e.localWeekNumber);case"nn":return this.num(e.localWeekNumber,2);case"ii":return this.num(e.localWeekYear.toString().slice(-2),2);case"iiii":return this.num(e.localWeekYear,4);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return u(f)}},"tokenToString");return zi(Ne.parseFormat(t),p)}formatDurationFromString(e,t){const s=this.opts.signMode==="negativeLargestOnly"?-1:1,n=a(u=>{switch(u[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},"tokenToField"),i=a((u,g)=>p=>{const f=n(p);if(f){const d=g.isNegativeDuration&&f!==g.largestUnit?s:1;let m;return this.opts.signMode==="negativeLargestOnly"&&f!==g.largestUnit?m="never":this.opts.signMode==="all"?m="always":m="auto",this.num(u.get(f)*d,p.length,m)}else return p},"tokenToString"),c=Ne.parseFormat(t),o=c.reduce((u,{literal:g,val:p})=>g?u:u.concat(p),[]),l=e.shiftTo(...o.map(n).filter(u=>u)),h={isNegativeDuration:l<0,largestUnit:Object.keys(l.values)[0]};return zi(c,i(l,h))}}const Ji=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function $t(...r){const e=r.reduce((t,s)=>t+s.source,"");return RegExp(`^${e}$`)}a($t,"combineRegexes");function Bt(...r){return e=>r.reduce(([t,s,n],i)=>{const[c,o,l]=i(e,n);return[{...t,...c},o||s,l]},[{},null,1]).slice(0,2)}a(Bt,"combineExtractors");function jt(r,...e){if(r==null)return[null,null];for(const[t,s]of e){const n=t.exec(r);if(n)return s(n)}return[null,null]}a(jt,"parse");function Gi(...r){return(e,t)=>{const s={};let n;for(n=0;n<r.length;n++)s[r[n]]=yt(e[t+n]);return[s,null,t+n]}}a(Gi,"simpleParse");const Yi=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Il=`(?:${Yi.source}?(?:\\[(${Ji.source})\\])?)?`,$s=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Zi=RegExp(`${$s.source}${Il}`),Bs=RegExp(`(?:[Tt]${Zi.source})?`),Al=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Rl=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Cl=/(\d{4})-?(\d{3})/,Nl=Gi("weekYear","weekNumber","weekDay"),Dl=Gi("year","ordinal"),Ll=/(\d{4})-(\d\d)-(\d\d)/,Ki=RegExp(`${$s.source} ?(?:${Yi.source}|(${Ji.source}))?`),Pl=RegExp(`(?: ${Ki.source})?`);function Ut(r,e,t){const s=r[e];return G(s)?t:yt(s)}a(Ut,"int");function Ml(r,e){return[{year:Ut(r,e),month:Ut(r,e+1,1),day:Ut(r,e+2,1)},null,e+3]}a(Ml,"extractISOYmd");function Vt(r,e){return[{hours:Ut(r,e,0),minutes:Ut(r,e+1,0),seconds:Ut(r,e+2,0),milliseconds:Ms(r[e+3])},null,e+4]}a(Vt,"extractISOTime");function ir(r,e){const t=!r[e]&&!r[e+1],s=Lr(r[e+1],r[e+2]),n=t?null:Me.instance(s);return[{},n,e+3]}a(ir,"extractISOOffset");function or(r,e){const t=r[e]?at.create(r[e]):null;return[{},t,e+1]}a(or,"extractIANAZone");const Fl=RegExp(`^T?${$s.source}$`),xl=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function $l(r){const[e,t,s,n,i,c,o,l,h]=r,u=e[0]==="-",g=l&&l[0]==="-",p=a((f,d=!1)=>f!==void 0&&(d||f&&u)?-f:f,"maybeNegate");return[{years:p(Ot(t)),months:p(Ot(s)),weeks:p(Ot(n)),days:p(Ot(i)),hours:p(Ot(c)),minutes:p(Ot(o)),seconds:p(Ot(l),l==="-0"),milliseconds:p(Ms(h),g)}]}a($l,"extractISODuration");const Bl={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function js(r,e,t,s,n,i,c){const o={year:e.length===2?xs(yt(e)):yt(e),month:Bi.indexOf(t)+1,day:yt(s),hour:yt(n),minute:yt(i)};return c&&(o.second=yt(c)),r&&(o.weekday=r.length>3?Ui.indexOf(r)+1:Vi.indexOf(r)+1),o}a(js,"fromStrings");const jl=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Ul(r){const[,e,t,s,n,i,c,o,l,h,u,g]=r,p=js(e,n,s,t,i,c,o);let f;return l?f=Bl[l]:h?f=0:f=Lr(u,g),[p,new Me(f)]}a(Ul,"extractRFC2822");function Vl(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}a(Vl,"preprocessRFC2822");const ql=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Hl=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Wl=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Xi(r){const[,e,t,s,n,i,c,o]=r;return[js(e,n,s,t,i,c,o),Me.utcInstance]}a(Xi,"extractRFC1123Or850");function zl(r){const[,e,t,s,n,i,c,o]=r;return[js(e,o,t,s,n,i,c),Me.utcInstance]}a(zl,"extractASCII");const Jl=$t(Al,Bs),Gl=$t(Rl,Bs),Yl=$t(Cl,Bs),Zl=$t(Zi),Qi=Bt(Ml,Vt,ir,or),Kl=Bt(Nl,Vt,ir,or),Xl=Bt(Dl,Vt,ir,or),Ql=Bt(Vt,ir,or);function eu(r){return jt(r,[Jl,Qi],[Gl,Kl],[Yl,Xl],[Zl,Ql])}a(eu,"parseISODate");function tu(r){return jt(Vl(r),[jl,Ul])}a(tu,"parseRFC2822Date");function ru(r){return jt(r,[ql,Xi],[Hl,Xi],[Wl,zl])}a(ru,"parseHTTPDate");function su(r){return jt(r,[xl,$l])}a(su,"parseISODuration");const nu=Bt(Vt);function iu(r){return jt(r,[Fl,nu])}a(iu,"parseISOTimeOnly");const ou=$t(Ll,Pl),au=$t(Ki),cu=Bt(Vt,ir,or);function lu(r){return jt(r,[ou,Qi],[au,cu])}a(lu,"parseSQL");const eo="Invalid Duration",to={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},uu={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...to},Je=146097/400,qt=146097/4800,hu={years:{quarters:4,months:12,weeks:Je/7,days:Je,hours:Je*24,minutes:Je*24*60,seconds:Je*24*60*60,milliseconds:Je*24*60*60*1e3},quarters:{months:3,weeks:Je/28,days:Je/4,hours:Je*24/4,minutes:Je*24*60/4,seconds:Je*24*60*60/4,milliseconds:Je*24*60*60*1e3/4},months:{weeks:qt/7,days:qt,hours:qt*24,minutes:qt*24*60,seconds:qt*24*60*60,milliseconds:qt*24*60*60*1e3},...to},Tt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],du=Tt.slice(0).reverse();function ct(r,e,t=!1){const s={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new ee(s)}a(ct,"clone$1");function ro(r,e){let t=e.milliseconds??0;for(const s of du.slice(1))e[s]&&(t+=e[s]*r[s].milliseconds);return t}a(ro,"durationToMillis");function so(r,e){const t=ro(r,e)<0?-1:1;Tt.reduceRight((s,n)=>{if(G(e[n]))return s;if(s){const i=e[s]*t,c=r[n][s],o=Math.floor(i/c);e[n]+=o*t,e[s]-=o*c*t}return n},null),Tt.reduce((s,n)=>{if(G(e[n]))return s;if(s){const i=e[s]%1;e[s]-=i,e[n]+=i*r[s][n]}return n},null)}a(so,"normalizeValues");function no(r){const e={};for(const[t,s]of Object.entries(r))s!==0&&(e[t]=s);return e}a(no,"removeZeroes");class ee{static{a(this,"Duration")}constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let s=t?hu:uu;e.matrix&&(s=e.matrix),this.values=e.values,this.loc=e.loc||oe.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=s,this.isLuxonDuration=!0}static fromMillis(e,t){return ee.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Ce(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ee({values:Pr(e,ee.normalizeUnit),loc:oe.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(mt(e))return ee.fromMillis(e);if(ee.isDuration(e))return e;if(typeof e=="object")return ee.fromObject(e);throw new Ce(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[s]=su(e);return s?ee.fromObject(s,t):ee.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[s]=iu(e);return s?ee.fromObject(s,t):ee.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Ce("need to specify a reason the Duration is invalid");const s=e instanceof Ke?e:new Ke(e,t);if(me.throwOnInvalid)throw new $c(s);return new ee({invalid:s})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new zn(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const s={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Ne.create(this.loc,s).formatDurationFromString(this,e):eo}toHuman(e={}){if(!this.isValid)return eo;const t=e.showZeros!==!1,s=Tt.map(n=>{const i=this.values[n];return G(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(s)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=Fs(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},q.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?ro(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ee.fromDurationLike(e),s={};for(const n of Tt)(Ft(t.values,n)||Ft(this.values,n))&&(s[n]=t.get(n)+this.get(n));return ct(this,{values:s},!0)}minus(e){if(!this.isValid)return this;const t=ee.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const s of Object.keys(this.values))t[s]=$i(e(this.values[s],s));return ct(this,{values:t},!0)}get(e){return this[ee.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...Pr(e,ee.normalizeUnit)};return ct(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:s,matrix:n}={}){const c={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:s};return ct(this,c)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return so(this.matrix,e),ct(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=no(this.normalize().shiftToAll().toObject());return ct(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(c=>ee.normalizeUnit(c));const t={},s={},n=this.toObject();let i;for(const c of Tt)if(e.indexOf(c)>=0){i=c;let o=0;for(const h in s)o+=this.matrix[h][c]*s[h],s[h]=0;mt(n[c])&&(o+=n[c]);const l=Math.trunc(o);t[c]=l,s[c]=(o*1e3-l*1e3)/1e3}else mt(n[c])&&(s[c]=n[c]);for(const c in s)s[c]!==0&&(t[i]+=c===i?s[c]:s[c]/this.matrix[i][c]);return so(this.matrix,t),ct(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return ct(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=no(this.values);return ct(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(s,n){return s===void 0||s===0?n===void 0||n===0:s===n}a(t,"eq");for(const s of Tt)if(!t(this.values[s],e.values[s]))return!1;return!0}}const Ht="Invalid Interval";function fu(r,e){return!r||!r.isValid?ye.invalid("missing or invalid start"):!e||!e.isValid?ye.invalid("missing or invalid end"):e<r?ye.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}a(fu,"validateStartEnd");class ye{static{a(this,"Interval")}constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Ce("need to specify a reason the Interval is invalid");const s=e instanceof Ke?e:new Ke(e,t);if(me.throwOnInvalid)throw new xc(s);return new ye({invalid:s})}static fromDateTimes(e,t){const s=lr(e),n=lr(t),i=fu(s,n);return i??new ye({start:s,end:n})}static after(e,t){const s=ee.fromDurationLike(t),n=lr(e);return ye.fromDateTimes(n,n.plus(s))}static before(e,t){const s=ee.fromDurationLike(t),n=lr(e);return ye.fromDateTimes(n.minus(s),n)}static fromISO(e,t){const[s,n]=(e||"").split("/",2);if(s&&n){let i,c;try{i=q.fromISO(s,t),c=i.isValid}catch{c=!1}let o,l;try{o=q.fromISO(n,t),l=o.isValid}catch{l=!1}if(c&&l)return ye.fromDateTimes(i,o);if(c){const h=ee.fromISO(n,t);if(h.isValid)return ye.after(i,h)}else if(l){const h=ee.fromISO(s,t);if(h.isValid)return ye.before(o,h)}}return ye.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const s=this.start.startOf(e,t);let n;return t?.useLocaleWeeks?n=this.end.reconfigure({locale:s.locale}):n=this.end,n=n.startOf(e,t),Math.floor(n.diff(s,e).get(e))+(n.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?ye.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(lr).filter(c=>this.contains(c)).sort((c,o)=>c.toMillis()-o.toMillis()),s=[];let{s:n}=this,i=0;for(;n<this.e;){const c=t[i]||this.e,o=+c>+this.e?this.e:c;s.push(ye.fromDateTimes(n,o)),n=o,i+=1}return s}splitBy(e){const t=ee.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s}=this,n=1,i;const c=[];for(;s<this.e;){const o=this.start.plus(t.mapUnits(l=>l*n));i=+o>+this.e?this.e:o,c.push(ye.fromDateTimes(s,i)),s=i,n+=1}return c}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,s=this.e<e.e?this.e:e.e;return t>=s?null:ye.fromDateTimes(t,s)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,s=this.e>e.e?this.e:e.e;return ye.fromDateTimes(t,s)}static merge(e){const[t,s]=e.sort((n,i)=>n.s-i.s).reduce(([n,i],c)=>i?i.overlaps(c)||i.abutsStart(c)?[n,i.union(c)]:[n.concat([i]),c]:[n,c],[[],null]);return s&&t.push(s),t}static xor(e){let t=null,s=0;const n=[],i=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),c=Array.prototype.concat(...i),o=c.sort((l,h)=>l.time-h.time);for(const l of o)s+=l.type==="s"?1:-1,s===1?t=l.time:(t&&+t!=+l.time&&n.push(ye.fromDateTimes(t,l.time)),t=null);return ye.merge(n)}difference(...e){return ye.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Ht}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=kr,t={}){return this.isValid?Ne.create(this.s.loc.clone(t),e).formatInterval(this):Ht}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Ht}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Ht}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Ht}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Ht}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ee.invalid(this.invalidReason)}mapEndpoints(e){return ye.fromDateTimes(e(this.s),e(this.e))}}class Fr{static{a(this,"Info")}static hasDST(e=me.defaultZone){const t=q.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return at.isValidZone(e)}static normalizeZone(e){return gt(e,me.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||oe.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:s=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||oe.create(t,s,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:s=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||oe.create(t,s,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:s=null,locObj:n=null}={}){return(n||oe.create(t,s,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:s=null,locObj:n=null}={}){return(n||oe.create(t,s,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return oe.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return oe.create(t,null,"gregory").eras(e)}static features(){return{relative:Li(),localeWeek:Pi()}}}function io(r,e){cons