UNPKG

@bngarren/ccsync

Version:

A file sync tool for developing software for CC: Tweaked (ComputerCraft) computers

1 lines 163 kB
import{createRequire as LP}from"node:module";var B=($,K)=>()=>(K||$((K={exports:{}}).exports,K),K.exports);var e=LP(import.meta.url);var GQ=B((ug,JK)=>{if(typeof SharedArrayBuffer!=="undefined"&&typeof Atomics!=="undefined"){let K=function(X){if((X>0&&X<1/0)===!1){if(typeof X!=="number"&&typeof X!=="bigint")throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}Atomics.wait($,0,0,Number(X))},$=new Int32Array(new SharedArrayBuffer(4));JK.exports=K}else{let $=function(K){if((K>0&&K<1/0)===!1){if(typeof K!=="number"&&typeof K!=="bigint")throw TypeError("sleep: ms must be a number");throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity")}let V=Date.now()+Number(K);while(V>Date.now());};JK.exports=$}});var zQ=B((kg,HQ)=>{var O=e("fs"),NP=e("events"),qP=e("util").inherits,JQ=e("path"),FK=GQ(),UP=e("assert"),f$=Buffer.allocUnsafe(0),[GP,JP]=(process.versions.node||"0.0").split(".").map(Number),PP=GP>=22&&JP>=7;function PQ($,K){K._opening=!0,K._writing=!0,K._asyncDrainScheduled=!1;function X(Q,L){if(Q){if(K._reopening=!1,K._writing=!1,K._opening=!1,K.sync)process.nextTick(()=>{if(K.listenerCount("error")>0)K.emit("error",Q)});else K.emit("error",Q);return}let N=K._reopening;if(K.fd=L,K.file=$,K._reopening=!1,K._opening=!1,K._writing=!1,K.sync)process.nextTick(()=>K.emit("ready"));else K.emit("ready");if(K.destroyed)return;if(!K._writing&&K._len>K.minLength||K._flushPending)K._actualWrite();else if(N)process.nextTick(()=>K.emit("drain"))}let V=K.append?"a":"w",E=K.mode;if(K.sync)try{if(K.mkdir)O.mkdirSync(JQ.dirname($),{recursive:!0});let Q=O.openSync($,V,E);X(null,Q)}catch(Q){throw X(Q),Q}else if(K.mkdir)O.mkdir(JQ.dirname($),{recursive:!0},(Q)=>{if(Q)return X(Q);O.open($,V,E,X)});else O.open($,V,E,X)}function g($){if(!(this instanceof g))return new g($);let{fd:K,dest:X,minLength:V,maxLength:E,maxWrite:Q,periodicFlush:L,sync:N,append:q=!0,mkdir:G,retryEAGAIN:J,fsync:P,contentMode:H,mode:A}=$||{};K=K||X,this._len=0,this.fd=-1,this._bufs=[],this._lens=[],this._writing=!1,this._ending=!1,this._reopening=!1,this._asyncDrainScheduled=!1,this._flushPending=!1,this._hwm=Math.max(V||0,16387),this.file=null,this.destroyed=!1,this.minLength=V||0,this.maxLength=E||0,this.maxWrite=Q||16384,this._periodicFlush=L||0,this._periodicFlushTimer=void 0,this.sync=N||!1,this.writable=!0,this._fsync=P||!1,this.append=q||!1,this.mode=A,this.retryEAGAIN=J||(()=>!0),this.mkdir=G||!1;let C,z;if(H==="buffer")this._writingBuf=f$,this.write=HP,this.flush=RP,this.flushSync=AP,this._actualWrite=WP,C=()=>O.writeSync(this.fd,this._writingBuf),z=()=>O.write(this.fd,this._writingBuf,this.release);else if(H===void 0||H==="utf8")this._writingBuf="",this.write=YP,this.flush=zP,this.flushSync=CP,this._actualWrite=MP,C=()=>O.writeSync(this.fd,this._writingBuf,"utf8"),z=()=>O.write(this.fd,this._writingBuf,"utf8",this.release);else throw new Error(`SonicBoom supports "utf8" and "buffer", but passed ${H}`);if(typeof K==="number")this.fd=K,process.nextTick(()=>this.emit("ready"));else if(typeof K==="string")PQ(K,this);else throw new Error("SonicBoom supports only file descriptors and files");if(this.minLength>=this.maxWrite)throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`);if(this.release=(F,W)=>{if(F){if((F.code==="EAGAIN"||F.code==="EBUSY")&&this.retryEAGAIN(F,this._writingBuf.length,this._len-this._writingBuf.length))if(this.sync)try{FK(100),this.release(void 0,0)}catch(l){this.release(l)}else setTimeout(z,100);else this._writing=!1,this.emit("error",F);return}this.emit("write",W);let w=PK(this._writingBuf,this._len,W);if(this._len=w.len,this._writingBuf=w.writingBuf,this._writingBuf.length){if(!this.sync){z();return}try{do{let l=C(),J$=PK(this._writingBuf,this._len,l);this._len=J$.len,this._writingBuf=J$.writingBuf}while(this._writingBuf.length)}catch(l){this.release(l);return}}if(this._fsync)O.fsyncSync(this.fd);let t=this._len;if(this._reopening)this._writing=!1,this._reopening=!1,this.reopen();else if(t>this.minLength)this._actualWrite();else if(this._ending)if(t>0)this._actualWrite();else this._writing=!1,h$(this);else if(this._writing=!1,this.sync){if(!this._asyncDrainScheduled)this._asyncDrainScheduled=!0,process.nextTick(FP,this)}else this.emit("drain")},this.on("newListener",function(F){if(F==="drain")this._asyncDrainScheduled=!1}),this._periodicFlush!==0)this._periodicFlushTimer=setInterval(()=>this.flush(null),this._periodicFlush),this._periodicFlushTimer.unref()}function PK($,K,X){if(typeof $==="string"&&Buffer.byteLength($)!==X)X=Buffer.from($).subarray(0,X).toString().length;return K=Math.max(K-X,0),$=$.slice(X),{writingBuf:$,len:K}}function FP($){if(!($.listenerCount("drain")>0))return;$._asyncDrainScheduled=!1,$.emit("drain")}qP(g,NP);function FQ($,K){if($.length===0)return f$;if($.length===1)return $[0];return Buffer.concat($,K)}function YP($){if(this.destroyed)throw new Error("SonicBoom destroyed");let K=this._len+$.length,X=this._bufs;if(this.maxLength&&K>this.maxLength)return this.emit("drop",$),this._len<this._hwm;if(X.length===0||X[X.length-1].length+$.length>this.maxWrite)X.push(""+$);else X[X.length-1]+=$;if(this._len=K,!this._writing&&this._len>=this.minLength)this._actualWrite();return this._len<this._hwm}function HP($){if(this.destroyed)throw new Error("SonicBoom destroyed");let K=this._len+$.length,X=this._bufs,V=this._lens;if(this.maxLength&&K>this.maxLength)return this.emit("drop",$),this._len<this._hwm;if(X.length===0||V[V.length-1]+$.length>this.maxWrite)X.push([$]),V.push($.length);else X[X.length-1].push($),V[V.length-1]+=$.length;if(this._len=K,!this._writing&&this._len>=this.minLength)this._actualWrite();return this._len<this._hwm}function YQ($){this._flushPending=!0;let K=()=>{if(!this._fsync)try{O.fsync(this.fd,(V)=>{this._flushPending=!1,$(V)})}catch(V){$(V)}else this._flushPending=!1,$();this.off("error",X)},X=(V)=>{this._flushPending=!1,$(V),this.off("drain",K)};this.once("drain",K),this.once("error",X)}function zP($){if($!=null&&typeof $!=="function")throw new Error("flush cb must be a function");if(this.destroyed){let K=new Error("SonicBoom destroyed");if($){$(K);return}throw K}if(this.minLength<=0){$?.();return}if($)YQ.call(this,$);if(this._writing)return;if(this._bufs.length===0)this._bufs.push("");this._actualWrite()}function RP($){if($!=null&&typeof $!=="function")throw new Error("flush cb must be a function");if(this.destroyed){let K=new Error("SonicBoom destroyed");if($){$(K);return}throw K}if(this.minLength<=0){$?.();return}if($)YQ.call(this,$);if(this._writing)return;if(this._bufs.length===0)this._bufs.push([]),this._lens.push(0);this._actualWrite()}g.prototype.reopen=function($){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.reopen($)});return}if(this._ending)return;if(!this.file)throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom");if($)this.file=$;if(this._reopening=!0,this._writing)return;let K=this.fd;this.once("ready",()=>{if(K!==this.fd)O.close(K,(X)=>{if(X)return this.emit("error",X)})}),PQ(this.file,this)};g.prototype.end=function(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this._opening){this.once("ready",()=>{this.end()});return}if(this._ending)return;if(this._ending=!0,this._writing)return;if(this._len>0&&this.fd>=0)this._actualWrite();else h$(this)};function CP(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");if(!this._writing&&this._writingBuf.length>0)this._bufs.unshift(this._writingBuf),this._writingBuf="";let $="";while(this._bufs.length||$){if($.length<=0)$=this._bufs[0];try{let K=O.writeSync(this.fd,$,"utf8"),X=PK($,this._len,K);if($=X.writingBuf,this._len=X.len,$.length<=0)this._bufs.shift()}catch(K){if((K.code==="EAGAIN"||K.code==="EBUSY")&&!this.retryEAGAIN(K,$.length,this._len-$.length))throw K;FK(100)}}try{O.fsyncSync(this.fd)}catch{}}function AP(){if(this.destroyed)throw new Error("SonicBoom destroyed");if(this.fd<0)throw new Error("sonic boom is not ready yet");if(!this._writing&&this._writingBuf.length>0)this._bufs.unshift([this._writingBuf]),this._writingBuf=f$;let $=f$;while(this._bufs.length||$.length){if($.length<=0)$=FQ(this._bufs[0],this._lens[0]);try{let K=O.writeSync(this.fd,$);if($=$.subarray(K),this._len=Math.max(this._len-K,0),$.length<=0)this._bufs.shift(),this._lens.shift()}catch(K){if((K.code==="EAGAIN"||K.code==="EBUSY")&&!this.retryEAGAIN(K,$.length,this._len-$.length))throw K;FK(100)}}}g.prototype.destroy=function(){if(this.destroyed)return;h$(this)};function MP(){let $=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf||this._bufs.shift()||"",this.sync)try{let K=O.writeSync(this.fd,this._writingBuf,"utf8");$(null,K)}catch(K){$(K)}else O.write(this.fd,this._writingBuf,"utf8",$)}function WP(){let $=this.release;if(this._writing=!0,this._writingBuf=this._writingBuf.length?this._writingBuf:FQ(this._bufs.shift(),this._lens.shift()),this.sync)try{let K=O.writeSync(this.fd,this._writingBuf);$(null,K)}catch(K){$(K)}else{if(PP)this._writingBuf=Buffer.from(this._writingBuf);O.write(this.fd,this._writingBuf,$)}}function h$($){if($.fd===-1){$.once("ready",h$.bind(null,$));return}if($._periodicFlushTimer!==void 0)clearInterval($._periodicFlushTimer);$.destroyed=!0,$._bufs=[],$._lens=[],UP(typeof $.fd==="number",`sonic.fd must be a number, got ${typeof $.fd}`);try{O.fsync($.fd,K)}catch{}function K(){if($.fd!==1&&$.fd!==2)O.close($.fd,X);else X()}function X(V){if(V){$.emit("error",V);return}if($._ending&&!$._writing)$.emit("finish");$.emit("close")}}g.SonicBoom=g;g.default=g;HQ.exports=g});var R=B((wP)=>{wP.secondsInYear=wP.secondsInWeek=wP.secondsInQuarter=wP.secondsInMonth=wP.secondsInMinute=wP.secondsInHour=wP.secondsInDay=wP.quartersInYear=wP.monthsInYear=wP.monthsInQuarter=wP.minutesInYear=wP.minutesInMonth=wP.minutesInHour=wP.minutesInDay=wP.minTime=wP.millisecondsInWeek=wP.millisecondsInSecond=wP.millisecondsInMinute=wP.millisecondsInHour=wP.millisecondsInDay=wP.maxTime=wP.daysInYear=wP.daysInWeek=wP.constructFromSymbol=void 0;var pg=wP.daysInWeek=7,IP=wP.daysInYear=365.2425,jP=wP.maxTime=Math.pow(10,8)*24*60*60*1000,yg=wP.minTime=-jP,dg=wP.millisecondsInWeek=604800000,ig=wP.millisecondsInDay=86400000,rg=wP.millisecondsInMinute=60000,og=wP.millisecondsInHour=3600000,sg=wP.millisecondsInSecond=1000,ng=wP.minutesInYear=525600,ag=wP.minutesInMonth=43200,tg=wP.minutesInDay=1440,eg=wP.minutesInHour=60,$2=wP.monthsInQuarter=3,K2=wP.monthsInYear=12,X2=wP.quartersInYear=4,OP=wP.secondsInHour=3600,Z2=wP.secondsInMinute=60,RQ=wP.secondsInDay=OP*24,V2=wP.secondsInWeek=RQ*7,vP=wP.secondsInYear=RQ*IP,SP=wP.secondsInMonth=vP/12,E2=wP.secondsInQuarter=SP*3,B2=wP.constructFromSymbol=Symbol.for("constructDateFrom")});var Y=B(($F)=>{$F.constructFrom=eP;var AQ=R();function eP($,K){if(typeof $==="function")return $(K);if($&&typeof $==="object"&&AQ.constructFromSymbol in $)return $[AQ.constructFromSymbol](K);if($ instanceof Date)return new $.constructor(K);return new Date(K)}});var U=B((VF)=>{VF.toDate=ZF;var XF=Y();function ZF($,K){return XF.constructFrom(K||$,$)}});var x=B((NF)=>{NF.addDays=LF;var BF=Y(),QF=U();function LF($,K,X){let V=QF.toDate($,X?.in);if(isNaN(K))return BF.constructFrom(X?.in||$,NaN);if(!K)return V;return V.setDate(V.getDate()+K),V}});var E$=B((JF)=>{JF.addMonths=GF;var MQ=Y(),UF=U();function GF($,K,X){let V=UF.toDate($,X?.in);if(isNaN(K))return MQ.constructFrom(X?.in||$,NaN);if(!K)return V;let E=V.getDate(),Q=MQ.constructFrom(X?.in||$,V.getTime());Q.setMonth(V.getMonth()+K+1,0);let L=Q.getDate();if(E>=L)return Q;else return V.setFullYear(Q.getFullYear(),Q.getMonth(),E),V}});var YK=B((CF)=>{CF.add=RF;var FF=x(),YF=E$(),HF=Y(),zF=U();function RF($,K,X){let{years:V=0,months:E=0,weeks:Q=0,days:L=0,hours:N=0,minutes:q=0,seconds:G=0}=K,J=zF.toDate($,X?.in),P=E||V?YF.addMonths(J,E+V*12):J,H=L||Q?FF.addDays(P,L+Q*7):P,A=q+N*60,z=(G+A*60)*1000;return HF.constructFrom(X?.in||$,+H+z)}});var HK=B((IF)=>{IF.isSaturday=WF;var MF=U();function WF($,K){return MF.toDate($,K?.in).getDay()===6}});var zK=B((SF)=>{SF.isSunday=vF;var OF=U();function vF($,K){return OF.toDate($,K?.in).getDay()===0}});var P$=B((DF)=>{DF.isWeekend=TF;var bF=U();function TF($,K){let X=bF.toDate($,K?.in).getDay();return X===0||X===6}});var CK=B((cF)=>{cF.addBusinessDays=lF;var _F=Y(),xF=HK(),fF=zK(),RK=P$(),hF=U();function lF($,K,X){let V=hF.toDate($,X?.in),E=RK.isWeekend(V,X);if(isNaN(K))return _F.constructFrom(X?.in,NaN);let Q=V.getHours(),L=K<0?-1:1,N=Math.trunc(K/5);V.setDate(V.getDate()+N*7);let q=Math.abs(K%5);while(q>0)if(V.setDate(V.getDate()+L),!RK.isWeekend(V,X))q-=1;if(E&&RK.isWeekend(V,X)&&K!==0){if(xF.isSaturday(V,X))V.setDate(V.getDate()+(L<0?2:-1));if(fF.isSunday(V,X))V.setDate(V.getDate()+(L<0?1:-2))}return V.setHours(Q),V}});var F$=B((yF)=>{yF.addMilliseconds=pF;var uF=Y(),kF=U();function pF($,K,X){return uF.constructFrom(X?.in||$,+kF.toDate($)+K)}});var AK=B((sF)=>{sF.addHours=oF;var iF=F$(),rF=R();function oF($,K,X){return iF.addMilliseconds($,K*rF.millisecondsInHour,X)}});var b=B((eF)=>{eF.getDefaultOptions=aF;eF.setDefaultOptions=tF;var WQ={};function aF(){return WQ}function tF($){WQ=$}});var _=B((EY)=>{EY.startOfWeek=VY;var XY=b(),ZY=U();function VY($,K){let X=XY.getDefaultOptions(),V=K?.weekStartsOn??K?.locale?.options?.weekStartsOn??X.weekStartsOn??X.locale?.options?.weekStartsOn??0,E=ZY.toDate($,K?.in),Q=E.getDay(),L=(Q<V?7:0)+Q-V;return E.setDate(E.getDate()-L),E.setHours(0,0,0,0),E}});var f=B((NY)=>{NY.startOfISOWeek=LY;var QY=_();function LY($,K){return QY.startOfWeek($,{...K,weekStartsOn:1})}});var i=B((JY)=>{JY.getISOWeekYear=GY;var IQ=Y(),jQ=f(),UY=U();function GY($,K){let X=UY.toDate($,K?.in),V=X.getFullYear(),E=IQ.constructFrom(X,0);E.setFullYear(V+1,0,4),E.setHours(0,0,0,0);let Q=jQ.startOfISOWeek(E),L=IQ.constructFrom(X,0);L.setFullYear(V,0,4),L.setHours(0,0,0,0);let N=jQ.startOfISOWeek(L);if(X.getTime()>=Q.getTime())return V+1;else if(X.getTime()>=N.getTime())return V;else return V-1}});var c=B((HY)=>{HY.getTimezoneOffsetInMilliseconds=YY;var FY=U();function YY($){let K=FY.toDate($),X=new Date(Date.UTC(K.getFullYear(),K.getMonth(),K.getDate(),K.getHours(),K.getMinutes(),K.getSeconds(),K.getMilliseconds()));return X.setUTCFullYear(K.getFullYear()),+$-+X}});var j=B((AY)=>{AY.normalizeDates=CY;var RY=Y();function CY($,...K){let X=RY.constructFrom.bind(null,$||K.find((V)=>typeof V==="object"));return K.map(X)}});var Y$=B((jY)=>{jY.startOfDay=IY;var WY=U();function IY($,K){let X=WY.toDate($,K?.in);return X.setHours(0,0,0,0),X}});var m=B((bY)=>{bY.differenceInCalendarDays=wY;var OQ=c(),vY=j(),SY=R(),vQ=Y$();function wY($,K,X){let[V,E]=vY.normalizeDates(X?.in,$,K),Q=vQ.startOfDay(V),L=vQ.startOfDay(E),N=+Q-OQ.getTimezoneOffsetInMilliseconds(Q),q=+L-OQ.getTimezoneOffsetInMilliseconds(L);return Math.round((N-q)/SY.millisecondsInDay)}});var B$=B((fY)=>{fY.startOfISOWeekYear=xY;var DY=Y(),gY=i(),_Y=f();function xY($,K){let X=gY.getISOWeekYear($,K),V=DY.constructFrom(K?.in||$,0);return V.setFullYear(X,0,4),V.setHours(0,0,0,0),_Y.startOfISOWeek(V)}});var MK=B((kY)=>{kY.setISOWeekYear=uY;var lY=Y(),cY=m(),SQ=B$(),mY=U();function uY($,K,X){let V=mY.toDate($,X?.in),E=cY.differenceInCalendarDays(V,SQ.startOfISOWeekYear(V,X)),Q=lY.constructFrom(X?.in||$,0);return Q.setFullYear(K,0,4),Q.setHours(0,0,0,0),V=SQ.startOfISOWeekYear(Q),V.setDate(V.getDate()+E),V}});var WK=B((rY)=>{rY.addISOWeekYears=iY;var yY=i(),dY=MK();function iY($,K,X){return dY.setISOWeekYear($,yY.getISOWeekYear($,X)+K,X)}});var l$=B((tY)=>{tY.addMinutes=aY;var sY=R(),nY=U();function aY($,K,X){let V=nY.toDate($,X?.in);return V.setTime(V.getTime()+K*sY.millisecondsInMinute),V}});var c$=B((X7)=>{X7.addQuarters=K7;var $7=E$();function K7($,K,X){return $7.addMonths($,K*3,X)}});var IK=B((B7)=>{B7.addSeconds=E7;var V7=F$();function E7($,K,X){return V7.addMilliseconds($,K*1000,X)}});var H$=B((q7)=>{q7.addWeeks=N7;var L7=x();function N7($,K,X){return L7.addDays($,K*7,X)}});var jK=B((P7)=>{P7.addYears=J7;var G7=E$();function J7($,K,X){return G7.addMonths($,K*12,X)}});var wQ=B((H7)=>{H7.areIntervalsOverlapping=Y7;var m$=U();function Y7($,K,X){let[V,E]=[+m$.toDate($.start,X?.in),+m$.toDate($.end,X?.in)].sort((N,q)=>N-q),[Q,L]=[+m$.toDate(K.start,X?.in),+m$.toDate(K.end,X?.in)].sort((N,q)=>N-q);if(X?.inclusive)return V<=L&&Q<=E;return V<L&&Q<E}});var OK=B((A7)=>{A7.max=C7;var bQ=Y(),R7=U();function C7($,K){let X,V=K?.in;return $.forEach((E)=>{if(!V&&typeof E==="object")V=bQ.constructFrom.bind(null,E);let Q=R7.toDate(E,V);if(!X||X<Q||isNaN(+Q))X=Q}),bQ.constructFrom(V,X||NaN)}});var vK=B((j7)=>{j7.min=I7;var TQ=Y(),W7=U();function I7($,K){let X,V=K?.in;return $.forEach((E)=>{if(!V&&typeof E==="object")V=TQ.constructFrom.bind(null,E);let Q=W7.toDate(E,V);if(!X||X>Q||isNaN(+Q))X=Q}),TQ.constructFrom(V,X||NaN)}});var DQ=B((T7)=>{T7.clamp=b7;var v7=j(),S7=OK(),w7=vK();function b7($,K,X){let[V,E,Q]=v7.normalizeDates(X?.in,$,K.start,K.end);return w7.min([S7.max([V,E],X),Q],X)}});var SK=B((_7)=>{_7.closestIndexTo=g7;var gQ=U();function g7($,K){let X=+gQ.toDate($);if(isNaN(X))return NaN;let V,E;return K.forEach((Q,L)=>{let N=gQ.toDate(Q);if(isNaN(+N)){V=NaN,E=NaN;return}let q=Math.abs(X-+N);if(V==null||q<E)V=L,E=q}),V}});var _Q=B((m7)=>{m7.closestTo=c7;var f7=j(),h7=SK(),l7=Y();function c7($,K,X){let[V,...E]=f7.normalizeDates(X?.in,$,...K),Q=h7.closestIndexTo(V,E);if(typeof Q==="number"&&isNaN(Q))return l7.constructFrom(V,NaN);if(Q!==void 0)return E[Q]}});var $$=B((p7)=>{p7.compareAsc=k7;var xQ=U();function k7($,K){let X=+xQ.toDate($)-+xQ.toDate(K);if(X<0)return-1;else if(X>0)return 1;return X}});var hQ=B((i7)=>{i7.compareDesc=d7;var fQ=U();function d7($,K){let X=+fQ.toDate($)-+fQ.toDate(K);if(X>0)return-1;else if(X<0)return 1;return X}});var S=B((n7)=>{n7.constructNow=s7;var o7=Y();function s7($){return o7.constructFrom($,Date.now())}});var lQ=B(($H)=>{$H.daysToWeeks=e7;var t7=R();function e7($){let K=Math.trunc($/t7.daysInWeek);return K===0?0:K}});var Q$=B((VH)=>{VH.isSameDay=ZH;var XH=j(),cQ=Y$();function ZH($,K,X){let[V,E]=XH.normalizeDates(X?.in,$,K);return+cQ.startOfDay(V)===+cQ.startOfDay(E)}});var wK=B((QH)=>{QH.isDate=BH;function BH($){return $ instanceof Date||typeof $==="object"&&Object.prototype.toString.call($)==="[object Date]"}});var u=B((GH)=>{GH.isValid=UH;var NH=wK(),qH=U();function UH($){return!(!NH.isDate($)&&typeof $!=="number"||isNaN(+qH.toDate($)))}});var kQ=B((RH)=>{RH.differenceInBusinessDays=zH;var PH=j(),mQ=x(),FH=m(),YH=Q$(),uQ=u(),HH=P$();function zH($,K,X){let[V,E]=PH.normalizeDates(X?.in,$,K);if(!uQ.isValid(V)||!uQ.isValid(E))return NaN;let Q=FH.differenceInCalendarDays(V,E),L=Q<0?-1:1,N=Math.trunc(Q/7),q=N*5,G=mQ.addDays(E,N*7);while(!YH.isSameDay(V,G))q+=HH.isWeekend(G,X)?0:L,G=mQ.addDays(G,L);return q===0?0:q}});var bK=B((WH)=>{WH.differenceInCalendarISOWeekYears=MH;var AH=j(),pQ=i();function MH($,K,X){let[V,E]=AH.normalizeDates(X?.in,$,K);return pQ.getISOWeekYear(V,X)-pQ.getISOWeekYear(E,X)}});var iQ=B((SH)=>{SH.differenceInCalendarISOWeeks=vH;var yQ=c(),jH=j(),OH=R(),dQ=f();function vH($,K,X){let[V,E]=jH.normalizeDates(X?.in,$,K),Q=dQ.startOfISOWeek(V),L=dQ.startOfISOWeek(E),N=+Q-yQ.getTimezoneOffsetInMilliseconds(Q),q=+L-yQ.getTimezoneOffsetInMilliseconds(L);return Math.round((N-q)/OH.millisecondsInWeek)}});var u$=B((DH)=>{DH.differenceInCalendarMonths=TH;var bH=j();function TH($,K,X){let[V,E]=bH.normalizeDates(X?.in,$,K),Q=V.getFullYear()-E.getFullYear(),L=V.getMonth()-E.getMonth();return Q*12+L}});var TK=B((fH)=>{fH.getQuarter=xH;var _H=U();function xH($,K){let X=_H.toDate($,K?.in);return Math.trunc(X.getMonth()/3)+1}});var DK=B((mH)=>{mH.differenceInCalendarQuarters=cH;var lH=j(),rQ=TK();function cH($,K,X){let[V,E]=lH.normalizeDates(X?.in,$,K),Q=V.getFullYear()-E.getFullYear(),L=rQ.getQuarter(V)-rQ.getQuarter(E);return Q*4+L}});var k$=B((dH)=>{dH.differenceInCalendarWeeks=yH;var oQ=c(),kH=j(),pH=R(),sQ=_();function yH($,K,X){let[V,E]=kH.normalizeDates(X?.in,$,K),Q=sQ.startOfWeek(V,X),L=sQ.startOfWeek(E,X),N=+Q-oQ.getTimezoneOffsetInMilliseconds(Q),q=+L-oQ.getTimezoneOffsetInMilliseconds(L);return Math.round((N-q)/pH.millisecondsInWeek)}});var p$=B((sH)=>{sH.differenceInCalendarYears=oH;var rH=j();function oH($,K,X){let[V,E]=rH.normalizeDates(X?.in,$,K);return V.getFullYear()-E.getFullYear()}});var y$=B(($z)=>{$z.differenceInDays=eH;var aH=j(),tH=m();function eH($,K,X){let[V,E]=aH.normalizeDates(X?.in,$,K),Q=nQ(V,E),L=Math.abs(tH.differenceInCalendarDays(V,E));V.setDate(V.getDate()-Q*L);let N=Number(nQ(V,E)===-Q),q=Q*(L-N);return q===0?0:q}function nQ($,K){let X=$.getFullYear()-K.getFullYear()||$.getMonth()-K.getMonth()||$.getDate()-K.getDate()||$.getHours()-K.getHours()||$.getMinutes()-K.getMinutes()||$.getSeconds()-K.getSeconds()||$.getMilliseconds()-K.getMilliseconds();if(X<0)return-1;if(X>0)return 1;return X}});var k=B((Zz)=>{Zz.getRoundingMethod=Xz;function Xz($){return(K)=>{let V=($?Math[$]:Math.trunc)(K);return V===0?0:V}}});var d$=B((Nz)=>{Nz.differenceInHours=Lz;var Ez=k(),Bz=j(),Qz=R();function Lz($,K,X){let[V,E]=Bz.normalizeDates(X?.in,$,K),Q=(+V-+E)/Qz.millisecondsInHour;return Ez.getRoundingMethod(X?.roundingMethod)(Q)}});var gK=B((Jz)=>{Jz.subISOWeekYears=Gz;var Uz=WK();function Gz($,K,X){return Uz.addISOWeekYears($,-K,X)}});var tQ=B((Rz)=>{Rz.differenceInISOWeekYears=zz;var Fz=j(),aQ=$$(),Yz=bK(),Hz=gK();function zz($,K,X){let[V,E]=Fz.normalizeDates(X?.in,$,K),Q=aQ.compareAsc(V,E),L=Math.abs(Yz.differenceInCalendarISOWeekYears(V,E,X)),N=Hz.subISOWeekYears(V,Q*L,X),q=Number(aQ.compareAsc(N,E)===-Q),G=Q*(L-q);return G===0?0:G}});var i$=B((Mz)=>{Mz.differenceInMilliseconds=Az;var eQ=U();function Az($,K){return+eQ.toDate($)-+eQ.toDate(K)}});var r$=B((Sz)=>{Sz.differenceInMinutes=vz;var Iz=k(),jz=R(),Oz=i$();function vz($,K,X){let V=Oz.differenceInMilliseconds($,K)/jz.millisecondsInMinute;return Iz.getRoundingMethod(X?.roundingMethod)(V)}});var o$=B((Dz)=>{Dz.endOfDay=Tz;var bz=U();function Tz($,K){let X=bz.toDate($,K?.in);return X.setHours(23,59,59,999),X}});var s$=B((fz)=>{fz.endOfMonth=xz;var _z=U();function xz($,K){let X=_z.toDate($,K?.in),V=X.getMonth();return X.setFullYear(X.getFullYear(),V+1,0),X.setHours(23,59,59,999),X}});var _K=B((kz)=>{kz.isLastDayOfMonth=uz;var lz=o$(),cz=s$(),mz=U();function uz($,K){let X=mz.toDate($,K?.in);return+lz.endOfDay(X,K)===+cz.endOfMonth(X,K)}});var z$=B((oz)=>{oz.differenceInMonths=rz;var yz=j(),xK=$$(),dz=u$(),iz=_K();function rz($,K,X){let[V,E,Q]=yz.normalizeDates(X?.in,$,$,K),L=xK.compareAsc(E,Q),N=Math.abs(dz.differenceInCalendarMonths(E,Q));if(N<1)return 0;if(E.getMonth()===1&&E.getDate()>27)E.setDate(30);E.setMonth(E.getMonth()-L*N);let q=xK.compareAsc(E,Q)===-L;if(iz.isLastDayOfMonth(V)&&N===1&&xK.compareAsc(V,Q)===1)q=!1;let G=L*(N-+q);return G===0?0:G}});var $L=B((ez)=>{ez.differenceInQuarters=tz;var nz=k(),az=z$();function tz($,K,X){let V=az.differenceInMonths($,K,X)/3;return nz.getRoundingMethod(X?.roundingMethod)(V)}});var R$=B((VR)=>{VR.differenceInSeconds=ZR;var KR=k(),XR=i$();function ZR($,K,X){let V=XR.differenceInMilliseconds($,K)/1000;return KR.getRoundingMethod(X?.roundingMethod)(V)}});var KL=B((NR)=>{NR.differenceInWeeks=LR;var BR=k(),QR=y$();function LR($,K,X){let V=QR.differenceInDays($,K,X)/7;return BR.getRoundingMethod(X?.roundingMethod)(V)}});var fK=B((PR)=>{PR.differenceInYears=JR;var UR=j(),XL=$$(),GR=p$();function JR($,K,X){let[V,E]=UR.normalizeDates(X?.in,$,K),Q=XL.compareAsc(V,E),L=Math.abs(GR.differenceInCalendarYears(V,E));V.setFullYear(1584),E.setFullYear(1584);let N=XL.compareAsc(V,E)===-Q,q=Q*(L-+N);return q===0?0:q}});var h=B((zR)=>{zR.normalizeInterval=HR;var YR=j();function HR($,K){let[X,V]=YR.normalizeDates($,K.start,K.end);return{start:X,end:V}}});var hK=B((WR)=>{WR.eachDayOfInterval=MR;var CR=h(),AR=Y();function MR($,K){let{start:X,end:V}=CR.normalizeInterval(K?.in,$),E=+X>+V,Q=E?+X:+V,L=E?V:X;L.setHours(0,0,0,0);let N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(AR.constructFrom(X,L)),L.setDate(L.getDate()+N),L.setHours(0,0,0,0);return E?q.reverse():q}});var ZL=B((SR)=>{SR.eachHourOfInterval=vR;var jR=h(),OR=Y();function vR($,K){let{start:X,end:V}=jR.normalizeInterval(K?.in,$),E=+X>+V,Q=E?+X:+V,L=E?V:X;L.setMinutes(0,0,0);let N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(OR.constructFrom(X,L)),L.setHours(L.getHours()+N);return E?q.reverse():q}});var VL=B((_R)=>{_R.eachMinuteOfInterval=gR;var bR=h(),TR=l$(),DR=Y();function gR($,K){let{start:X,end:V}=bR.normalizeInterval(K?.in,$);X.setSeconds(0,0);let E=+X>+V,Q=E?+X:+V,L=E?V:X,N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(DR.constructFrom(X,L)),L=TR.addMinutes(L,N);return E?q.reverse():q}});var EL=B((cR)=>{cR.eachMonthOfInterval=lR;var fR=h(),hR=Y();function lR($,K){let{start:X,end:V}=fR.normalizeInterval(K?.in,$),E=+X>+V,Q=E?+X:+V,L=E?V:X;L.setHours(0,0,0,0),L.setDate(1);let N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(hR.constructFrom(X,L)),L.setMonth(L.getMonth()+N);return E?q.reverse():q}});var n$=B((pR)=>{pR.startOfQuarter=kR;var uR=U();function kR($,K){let X=uR.toDate($,K?.in),V=X.getMonth(),E=V-V%3;return X.setMonth(E,1),X.setHours(0,0,0,0),X}});var BL=B((sR)=>{sR.eachQuarterOfInterval=oR;var dR=h(),iR=c$(),rR=Y(),a$=n$();function oR($,K){let{start:X,end:V}=dR.normalizeInterval(K?.in,$),E=+X>+V,Q=E?+a$.startOfQuarter(X):+a$.startOfQuarter(V),L=E?a$.startOfQuarter(V):a$.startOfQuarter(X),N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(rR.constructFrom(X,L)),L=iR.addQuarters(L,N);return E?q.reverse():q}});var QL=B((KC)=>{KC.eachWeekOfInterval=$C;var aR=h(),tR=H$(),eR=Y(),t$=_();function $C($,K){let{start:X,end:V}=aR.normalizeInterval(K?.in,$),E=+X>+V,Q=E?t$.startOfWeek(V,K):t$.startOfWeek(X,K),L=E?t$.startOfWeek(X,K):t$.startOfWeek(V,K);Q.setHours(15),L.setHours(15);let N=+L.getTime(),q=Q,G=K?.step??1;if(!G)return[];if(G<0)G=-G,E=!E;let J=[];while(+q<=N)q.setHours(0),J.push(eR.constructFrom(X,q)),q=tR.addWeeks(q,G),q.setHours(15);return E?J.reverse():J}});var e$=B((LC)=>{LC.eachWeekendOfInterval=QC;var ZC=h(),VC=Y(),EC=hK(),BC=P$();function QC($,K){let{start:X,end:V}=ZC.normalizeInterval(K?.in,$),E=EC.eachDayOfInterval({start:X,end:V},K),Q=[],L=0;while(L<E.length){let N=E[L++];if(BC.isWeekend(N))Q.push(VC.constructFrom(X,N))}return Q}});var C$=B((GC)=>{GC.startOfMonth=UC;var qC=U();function UC($,K){let X=qC.toDate($,K?.in);return X.setDate(1),X.setHours(0,0,0,0),X}});var LL=B((zC)=>{zC.eachWeekendOfMonth=HC;var PC=e$(),FC=s$(),YC=C$();function HC($,K){let X=YC.startOfMonth($,K),V=FC.endOfMonth($,K);return PC.eachWeekendOfInterval({start:X,end:V},K)}});var lK=B((MC)=>{MC.endOfYear=AC;var CC=U();function AC($,K){let X=CC.toDate($,K?.in),V=X.getFullYear();return X.setFullYear(V+1,0,0),X.setHours(23,59,59,999),X}});var $K=B((OC)=>{OC.startOfYear=jC;var IC=U();function jC($,K){let X=IC.toDate($,K?.in);return X.setFullYear(X.getFullYear(),0,1),X.setHours(0,0,0,0),X}});var NL=B((DC)=>{DC.eachWeekendOfYear=TC;var SC=e$(),wC=lK(),bC=$K();function TC($,K){let X=bC.startOfYear($,K),V=wC.endOfYear($,K);return SC.eachWeekendOfInterval({start:X,end:V},K)}});var qL=B((hC)=>{hC.eachYearOfInterval=fC;var _C=h(),xC=Y();function fC($,K){let{start:X,end:V}=_C.normalizeInterval(K?.in,$),E=+X>+V,Q=E?+X:+V,L=E?V:X;L.setHours(0,0,0,0),L.setMonth(0,1);let N=K?.step??1;if(!N)return[];if(N<0)N=-N,E=!E;let q=[];while(+L<=Q)q.push(xC.constructFrom(X,L)),L.setFullYear(L.getFullYear()+N);return E?q.reverse():q}});var UL=B((uC)=>{uC.endOfDecade=mC;var cC=U();function mC($,K){let X=cC.toDate($,K?.in),V=X.getFullYear(),E=9+Math.floor(V/10)*10;return X.setFullYear(E,11,31),X.setHours(23,59,59,999),X}});var GL=B((dC)=>{dC.endOfHour=yC;var pC=U();function yC($,K){let X=pC.toDate($,K?.in);return X.setMinutes(59,59,999),X}});var cK=B((nC)=>{nC.endOfWeek=sC;var rC=b(),oC=U();function sC($,K){let X=rC.getDefaultOptions(),V=K?.weekStartsOn??K?.locale?.options?.weekStartsOn??X.weekStartsOn??X.locale?.options?.weekStartsOn??0,E=oC.toDate($,K?.in),Q=E.getDay(),L=(Q<V?-7:0)+6-(Q-V);return E.setDate(E.getDate()+L),E.setHours(23,59,59,999),E}});var JL=B(($8)=>{$8.endOfISOWeek=eC;var tC=cK();function eC($,K){return tC.endOfWeek($,{...K,weekStartsOn:1})}});var PL=B((B8)=>{B8.endOfISOWeekYear=E8;var X8=Y(),Z8=i(),V8=f();function E8($,K){let X=Z8.getISOWeekYear($,K),V=X8.constructFrom(K?.in||$,0);V.setFullYear(X+1,0,4),V.setHours(0,0,0,0);let E=V8.startOfISOWeek(V,K);return E.setMilliseconds(E.getMilliseconds()-1),E}});var FL=B((q8)=>{q8.endOfMinute=N8;var L8=U();function N8($,K){let X=L8.toDate($,K?.in);return X.setSeconds(59,999),X}});var YL=B((P8)=>{P8.endOfQuarter=J8;var G8=U();function J8($,K){let X=G8.toDate($,K?.in),V=X.getMonth(),E=V-V%3+3;return X.setMonth(E,0),X.setHours(23,59,59,999),X}});var HL=B((z8)=>{z8.endOfSecond=H8;var Y8=U();function H8($,K){let X=Y8.toDate($,K?.in);return X.setMilliseconds(999),X}});var zL=B((M8)=>{M8.endOfToday=A8;var C8=o$();function A8($){return C8.endOfDay(Date.now(),$)}});var CL=B((j8)=>{j8.endOfTomorrow=I8;var RL=S();function I8($){let K=RL.constructNow($?.in),X=K.getFullYear(),V=K.getMonth(),E=K.getDate(),Q=RL.constructNow($?.in);return Q.setFullYear(X,V,E+1),Q.setHours(23,59,59,999),$?.in?$.in(Q):Q}});var AL=B((b8)=>{b8.endOfYesterday=w8;var v8=Y(),S8=S();function w8($){let K=S8.constructNow($?.in),X=v8.constructFrom($?.in,0);return X.setFullYear(K.getFullYear(),K.getMonth(),K.getDate()-1),X.setHours(23,59,59,999),X}});var WL=B((_8)=>{_8.formatDistance=void 0;var D8={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},g8=($,K,X)=>{let V,E=D8[$];if(typeof E==="string")V=E;else if(K===1)V=E.one;else V=E.other.replace("{{count}}",K.toString());if(X?.addSuffix)if(X.comparison&&X.comparison>0)return"in "+V;else return V+" ago";return V};_8.formatDistance=g8});var IL=B((f8)=>{f8.buildFormatLongFn=x8;function x8($){return(K={})=>{let X=K.width?String(K.width):$.defaultWidth;return $.formats[X]||$.formats[$.defaultWidth]}}});var OL=B((u8)=>{u8.formatLong=void 0;var mK=IL(),l8={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},c8={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},m8={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},d_=u8.formatLong={date:mK.buildFormatLongFn({formats:l8,defaultWidth:"full"}),time:mK.buildFormatLongFn({formats:c8,defaultWidth:"full"}),dateTime:mK.buildFormatLongFn({formats:m8,defaultWidth:"full"})}});var SL=B((y8)=>{y8.formatRelative=void 0;var k8={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},p8=($,K,X,V)=>k8[$];y8.formatRelative=p8});var wL=B((i8)=>{i8.buildLocalizeFn=d8;function d8($){return(K,X)=>{let V=X?.context?String(X.context):"standalone",E;if(V==="formatting"&&$.formattingValues){let L=$.defaultFormattingWidth||$.defaultWidth,N=X?.width?String(X.width):L;E=$.formattingValues[N]||$.formattingValues[L]}else{let L=$.defaultWidth,N=X?.width?String(X.width):$.defaultWidth;E=$.values[N]||$.values[L]}let Q=$.argumentCallback?$.argumentCallback(K):K;return E[Q]}}});var TL=B((KA)=>{KA.localize=void 0;var A$=wL(),o8={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},s8={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},n8={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},a8={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},t8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},e8={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},$A=($,K)=>{let X=Number($),V=X%100;if(V>20||V<10)switch(V%10){case 1:return X+"st";case 2:return X+"nd";case 3:return X+"rd"}return X+"th"},s_=KA.localize={ordinalNumber:$A,era:A$.buildLocalizeFn({values:o8,defaultWidth:"wide"}),quarter:A$.buildLocalizeFn({values:s8,defaultWidth:"wide",argumentCallback:($)=>$-1}),month:A$.buildLocalizeFn({values:n8,defaultWidth:"wide"}),day:A$.buildLocalizeFn({values:a8,defaultWidth:"wide"}),dayPeriod:A$.buildLocalizeFn({values:t8,defaultWidth:"wide",formattingValues:e8,defaultFormattingWidth:"wide"})}});var DL=B((EA)=>{EA.buildMatchFn=XA;function XA($){return(K,X={})=>{let V=X.width,E=V&&$.matchPatterns[V]||$.matchPatterns[$.defaultMatchWidth],Q=K.match(E);if(!Q)return null;let L=Q[0],N=V&&$.parsePatterns[V]||$.parsePatterns[$.defaultParseWidth],q=Array.isArray(N)?VA(N,(P)=>P.test(L)):ZA(N,(P)=>P.test(L)),G;G=$.valueCallback?$.valueCallback(q):q,G=X.valueCallback?X.valueCallback(G):G;let J=K.slice(L.length);return{value:G,rest:J}}}function ZA($,K){for(let X in $)if(Object.prototype.hasOwnProperty.call($,X)&&K($[X]))return X;return}function VA($,K){for(let X=0;X<$.length;X++)if(K($[X]))return X;return}});var gL=B((LA)=>{LA.buildMatchPatternFn=QA;function QA($){return(K,X={})=>{let V=K.match($.matchPattern);if(!V)return null;let E=V[0],Q=K.match($.parsePattern);if(!Q)return null;let L=$.valueCallback?$.valueCallback(Q[0]):Q[0];L=X.valueCallback?X.valueCallback(L):L;let N=K.slice(E.length);return{value:L,rest:N}}}});var xL=B((WA)=>{WA.match=void 0;var M$=DL(),qA=gL(),UA=/^(\d+)(th|st|nd|rd)?/i,GA=/\d+/i,JA={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},PA={any:[/^b/i,/^(a|c)/i]},FA={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},YA={any:[/1/i,/2/i,/3/i,/4/i]},HA={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},zA={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},RA={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},CA={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},AA={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},MA={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},e_=WA.match={ordinalNumber:qA.buildMatchPatternFn({matchPattern:UA,parsePattern:GA,valueCallback:($)=>parseInt($,10)}),era:M$.buildMatchFn({matchPatterns:JA,defaultMatchWidth:"wide",parsePatterns:PA,defaultParseWidth:"any"}),quarter:M$.buildMatchFn({matchPatterns:FA,defaultMatchWidth:"wide",parsePatterns:YA,defaultParseWidth:"any",valueCallback:($)=>$+1}),month:M$.buildMatchFn({matchPatterns:HA,defaultMatchWidth:"wide",parsePatterns:zA,defaultParseWidth:"any"}),day:M$.buildMatchFn({matchPatterns:RA,defaultMatchWidth:"wide",parsePatterns:CA,defaultParseWidth:"any"}),dayPeriod:M$.buildMatchFn({matchPatterns:AA,defaultMatchWidth:"any",parsePatterns:MA,defaultParseWidth:"any"})}});var hL=B((wA)=>{wA.enUS=void 0;var IA=WL(),jA=OL(),OA=SL(),vA=TL(),SA=xL(),K0=wA.enUS={code:"en-US",formatDistance:IA.formatDistance,formatLong:jA.formatLong,formatRelative:OA.formatRelative,localize:vA.localize,match:SA.match,options:{weekStartsOn:0,firstWeekContainsDate:1}}});var K$=B((lL)=>{Object.defineProperty(lL,"defaultLocale",{enumerable:!0,get:function(){return bA.enUS}});var bA=hL()});var uK=B((xA)=>{xA.getDayOfYear=_A;var TA=m(),DA=$K(),gA=U();function _A($,K){let X=gA.toDate($,K?.in);return TA.differenceInCalendarDays(X,DA.startOfYear(X))+1}});var KK=B((kA)=>{kA.getISOWeek=uA;var hA=R(),lA=f(),cA=B$(),mA=U();function uA($,K){let X=mA.toDate($,K?.in),V=+lA.startOfISOWeek(X)-+cA.startOfISOWeekYear(X);return Math.round(V/hA.millisecondsInWeek)+1}});var W$=B((rA)=>{rA.getWeekYear=iA;var yA=b(),cL=Y(),mL=_(),dA=U();function iA($,K){let X=dA.toDate($,K?.in),V=X.getFullYear(),E=yA.getDefaultOptions(),Q=K?.firstWeekContainsDate??K?.locale?.options?.firstWeekContainsDate??E.firstWeekContainsDate??E.locale?.options?.firstWeekContainsDate??1,L=cL.constructFrom(K?.in||$,0);L.setFullYear(V+1,0,Q),L.setHours(0,0,0,0);let N=mL.startOfWeek(L,K),q=cL.constructFrom(K?.in||$,0);q.setFullYear(V,0,Q),q.setHours(0,0,0,0);let G=mL.startOfWeek(q,K);if(+X>=+N)return V+1;else if(+X>=+G)return V;else return V-1}});var XK=B(($6)=>{$6.startOfWeekYear=eA;var sA=b(),nA=Y(),aA=W$(),tA=_();function eA($,K){let X=sA.getDefaultOptions(),V=K?.firstWeekContainsDate??K?.locale?.options?.firstWeekContainsDate??X.firstWeekContainsDate??X.locale?.options?.firstWeekContainsDate??1,E=aA.getWeekYear($,K),Q=nA.constructFrom(K?.in||$,0);return Q.setFullYear(E,0,V),Q.setHours(0,0,0,0),tA.startOfWeek(Q,K)}});var ZK=B((Q6)=>{Q6.getWeek=B6;var X6=R(),Z6=_(),V6=XK(),E6=U();function B6($,K){let X=E6.toDate($,K?.in),V=+Z6.startOfWeek(X,K)-+V6.startOfWeekYear(X,K);return Math.round(V/X6.millisecondsInWeek)+1}});var X$=B((q6)=>{q6.addLeadingZeros=N6;function N6($,K){let X=$<0?"-":"",V=Math.abs($).toString().padStart(K,"0");return X+V}});var kK=B((G6)=>{G6.lightFormatters=void 0;var r=X$(),q0=G6.lightFormatters={y($,K){let X=$.getFullYear(),V=X>0?X:1-X;return r.addLeadingZeros(K==="yy"?V%100:V,K.length)},M($,K){let X=$.getMonth();return K==="M"?String(X+1):r.addLeadingZeros(X+1,2)},d($,K){return r.addLeadingZeros($.getDate(),K.length)},a($,K){let X=$.getHours()/12>=1?"pm":"am";switch(K){case"a":case"aa":return X.toUpperCase();case"aaa":return X;case"aaaaa":return X[0];case"aaaa":default:return X==="am"?"a.m.":"p.m."}},h($,K){return r.addLeadingZeros($.getHours()%12||12,K.length)},H($,K){return r.addLeadingZeros($.getHours(),K.length)},m($,K){return r.addLeadingZeros($.getMinutes(),K.length)},s($,K){return r.addLeadingZeros($.getSeconds(),K.length)},S($,K){let X=K.length,V=$.getMilliseconds(),E=Math.trunc(V*Math.pow(10,X-3));return r.addLeadingZeros(E,K.length)}}});var dL=B((z6)=>{z6.formatters=void 0;var J6=uK(),P6=KK(),F6=i(),Y6=ZK(),H6=W$(),v=X$(),o=kK(),L$={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},G0=z6.formatters={G:function($,K,X){let V=$.getFullYear()>0?1:0;switch(K){case"G":case"GG":case"GGG":return X.era(V,{width:"abbreviated"});case"GGGGG":return X.era(V,{width:"narrow"});case"GGGG":default:return X.era(V,{width:"wide"})}},y:function($,K,X){if(K==="yo"){let V=$.getFullYear(),E=V>0?V:1-V;return X.ordinalNumber(E,{unit:"year"})}return o.lightFormatters.y($,K)},Y:function($,K,X,V){let E=H6.getWeekYear($,V),Q=E>0?E:1-E;if(K==="YY"){let L=Q%100;return v.addLeadingZeros(L,2)}if(K==="Yo")return X.ordinalNumber(Q,{unit:"year"});return v.addLeadingZeros(Q,K.length)},R:function($,K){let X=F6.getISOWeekYear($);return v.addLeadingZeros(X,K.length)},u:function($,K){let X=$.getFullYear();return v.addLeadingZeros(X,K.length)},Q:function($,K,X){let V=Math.ceil(($.getMonth()+1)/3);switch(K){case"Q":return String(V);case"QQ":return v.addLeadingZeros(V,2);case"Qo":return X.ordinalNumber(V,{unit:"quarter"});case"QQQ":return X.quarter(V,{width:"abbreviated",context:"formatting"});case"QQQQQ":return X.quarter(V,{width:"narrow",context:"formatting"});case"QQQQ":default:return X.quarter(V,{width:"wide",context:"formatting"})}},q:function($,K,X){let V=Math.ceil(($.getMonth()+1)/3);switch(K){case"q":return String(V);case"qq":return v.addLeadingZeros(V,2);case"qo":return X.ordinalNumber(V,{unit:"quarter"});case"qqq":return X.quarter(V,{width:"abbreviated",context:"standalone"});case"qqqqq":return X.quarter(V,{width:"narrow",context:"standalone"});case"qqqq":default:return X.quarter(V,{width:"wide",context:"standalone"})}},M:function($,K,X){let V=$.getMonth();switch(K){case"M":case"MM":return o.lightFormatters.M($,K);case"Mo":return X.ordinalNumber(V+1,{unit:"month"});case"MMM":return X.month(V,{width:"abbreviated",context:"formatting"});case"MMMMM":return X.month(V,{width:"narrow",context:"formatting"});case"MMMM":default:return X.month(V,{width:"wide",context:"formatting"})}},L:function($,K,X){let V=$.getMonth();switch(K){case"L":return String(V+1);case"LL":return v.addLeadingZeros(V+1,2);case"Lo":return X.ordinalNumber(V+1,{unit:"month"});case"LLL":return X.month(V,{width:"abbreviated",context:"standalone"});case"LLLLL":return X.month(V,{width:"narrow",context:"standalone"});case"LLLL":default:return X.month(V,{width:"wide",context:"standalone"})}},w:function($,K,X,V){let E=Y6.getWeek($,V);if(K==="wo")return X.ordinalNumber(E,{unit:"week"});return v.addLeadingZeros(E,K.length)},I:function($,K,X){let V=P6.getISOWeek($);if(K==="Io")return X.ordinalNumber(V,{unit:"week"});return v.addLeadingZeros(V,K.length)},d:function($,K,X){if(K==="do")return X.ordinalNumber($.getDate(),{unit:"date"});return o.lightFormatters.d($,K)},D:function($,K,X){let V=J6.getDayOfYear($);if(K==="Do")return X.ordinalNumber(V,{unit:"dayOfYear"});return v.addLeadingZeros(V,K.length)},E:function($,K,X){let V=$.getDay();switch(K){case"E":case"EE":case"EEE":return X.day(V,{width:"abbreviated",context:"formatting"});case"EEEEE":return X.day(V,{width:"narrow",context:"formatting"});case"EEEEEE":return X.day(V,{width:"short",context:"formatting"});case"EEEE":default:return X.day(V,{width:"wide",context:"formatting"})}},e:function($,K,X,V){let E=$.getDay(),Q=(E-V.weekStartsOn+8)%7||7;switch(K){case"e":return String(Q);case"ee":return v.addLeadingZeros(Q,2);case"eo":return X.ordinalNumber(Q,{unit:"day"});case"eee":return X.day(E,{width:"abbreviated",context:"formatting"});case"eeeee":return X.day(E,{width:"narrow",context:"formatting"});case"eeeeee":return X.day(E,{width:"short",context:"formatting"});case"eeee":default:return X.day(E,{width:"wide",context:"formatting"})}},c:function($,K,X,V){let E=$.getDay(),Q=(E-V.weekStartsOn+8)%7||7;switch(K){case"c":return String(Q);case"cc":return v.addLeadingZeros(Q,K.length);case"co":return X.ordinalNumber(Q,{unit:"day"});case"ccc":return X.day(E,{width:"abbreviated",context:"standalone"});case"ccccc":return X.day(E,{width:"narrow",context:"standalone"});case"cccccc":return X.day(E,{width:"short",context:"standalone"});case"cccc":default:return X.day(E,{width:"wide",context:"standalone"})}},i:function($,K,X){let V=$.getDay(),E=V===0?7:V;switch(K){case"i":return String(E);case"ii":return v.addLeadingZeros(E,K.length);case"io":return X.ordinalNumber(E,{unit:"day"});case"iii":return X.day(V,{width:"abbreviated",context:"formatting"});case"iiiii":return X.day(V,{width:"narrow",context:"formatting"});case"iiiiii":return X.day(V,{width:"short",context:"formatting"});case"iiii":default:return X.day(V,{width:"wide",context:"formatting"})}},a:function($,K,X){let E=$.getHours()/12>=1?"pm":"am";switch(K){case"a":case"aa":return X.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"aaa":return X.dayPeriod(E,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return X.dayPeriod(E,{width:"narrow",context:"formatting"});case"aaaa":default:return X.dayPeriod(E,{width:"wide",context:"formatting"})}},b:function($,K,X){let V=$.getHours(),E;if(V===12)E=L$.noon;else if(V===0)E=L$.midnight;else E=V/12>=1?"pm":"am";switch(K){case"b":case"bb":return X.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"bbb":return X.dayPeriod(E,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return X.dayPeriod(E,{width:"narrow",context:"formatting"});case"bbbb":default:return X.dayPeriod(E,{width:"wide",context:"formatting"})}},B:function($,K,X){let V=$.getHours(),E;if(V>=17)E=L$.evening;else if(V>=12)E=L$.afternoon;else if(V>=4)E=L$.morning;else E=L$.night;switch(K){case"B":case"BB":case"BBB":return X.dayPeriod(E,{width:"abbreviated",context:"formatting"});case"BBBBB":return X.dayPeriod(E,{width:"narrow",context:"formatting"});case"BBBB":default:return X.dayPeriod(E,{width:"wide",context:"formatting"})}},h:function($,K,X){if(K==="ho"){let V=$.getHours()%12;if(V===0)V=12;return X.ordinalNumber(V,{unit:"hour"})}return o.lightFormatters.h($,K)},H:function($,K,X){if(K==="Ho")return X.ordinalNumber($.getHours(),{unit:"hour"});return o.lightFormatters.H($,K)},K:function($,K,X){let V=$.getHours()%12;if(K==="Ko")return X.ordinalNumber(V,{unit:"hour"});return v.addLeadingZeros(V,K.length)},k:function($,K,X){let V=$.getHours();if(V===0)V=24;if(K==="ko")return X.ordinalNumber(V,{unit:"hour"});return v.addLeadingZeros(V,K.length)},m:function($,K,X){if(K==="mo")return X.ordinalNumber($.getMinutes(),{unit:"minute"});return o.lightFormatters.m($,K)},s:function($,K,X){if(K==="so")return X.ordinalNumber($.getSeconds(),{unit:"second"});return o.lightFormatters.s($,K)},S:function($,K){return o.lightFormatters.S($,K)},X:function($,K,X){let V=$.getTimezoneOffset();if(V===0)return"Z";switch(K){case"X":return pL(V);case"XXXX":case"XX":return Z$(V);case"XXXXX":case"XXX":default:return Z$(V,":")}},x:function($,K,X){let V=$.getTimezoneOffset();switch(K){case"x":return pL(V);case"xxxx":case"xx":return Z$(V);case"xxxxx":case"xxx":default:return Z$(V,":")}},O:function($,K,X){let V=$.getTimezoneOffset();switch(K){case"O":case"OO":case"OOO":return"GMT"+kL(V,":");case"OOOO":default:return"GMT"+Z$(V,":")}},z:function($,K,X){let V=$.getTimezoneOffset();switch(K){case"z":case"zz":case"zzz":return"GMT"+kL(V,":");case"zzzz":default:return"GMT"+Z$(V,":")}},t:function($,K,X){let V=Math.trunc(+$/1000);return v.addLeadingZeros(V,K.length)},T:function($,K,X){return v.addLeadingZeros(+$,K.length)}};function kL($,K=""){let X=$>0?"-":"+",V=Math.abs($),E=Math.trunc(V/60),Q=V%60;if(Q===0)return X+String(E);return X+String(E)+K+v.addLeadingZeros(Q,2)}function pL($,K){if($%60===0)return($>0?"-":"+")+v.addLeadingZeros(Math.abs($)/60,2);return Z$($,K)}function Z$($,K=""){let X=$>0?"-":"+",V=Math.abs($),E=v.addLeadingZeros(Math.trunc(V/60),2),Q=v.addLeadingZeros(V%60,2);return X+E+K+Q}});var pK=B((C6)=>{C6.longFormatters=void 0;var iL=($,K)=>{switch($){case"P":return K.date({width:"short"});case"PP":return K.date({width:"medium"});case"PPP":return K.date({width:"long"});case"PPPP":default:return K.date({width:"full"})}},rL=($,K)=>{switch($){case"p":return K.time({width:"short"});case"pp":return K.time({width:"medium"});case"ppp":return K.time({width:"long"});case"pppp":default:return K.time({width:"full"})}},R6=($,K)=>{let X=$.match(/(P+)(p+)?/)||[],V=X[1],E=X[2];if(!E)return iL($,K);let Q;switch(V){case"P":Q=K.dateTime({width:"short"});break;case"PP":Q=K.dateTime({width:"medium"});break;case"PPP":Q=K.dateTime({width:"long"});break;case"PPPP":default:Q=K.dateTime({width:"full"});break}return Q.replace("{{date}}",iL(V,K)).replace("{{time}}",rL(E,K))},P0=C6.longFormatters={p:rL,P:R6}});var yK=B((S6)=>{S6.isProtectedDayOfYearToken=I6;S6.isProtectedWeekYearToken=j6;S6.warnOrThrowProtectedError=O6;var A6=/^D+$/,M6=/^Y+$/,W6=["D","DD","YY","YYYY"];function I6($){return A6.test($)}function j6($){return M6.test($)}function O6($,K,X){let V=v6($,K,X);if(console.warn(V),W6.includes($))throw new RangeError(V)}function v6($,K,X){let V=$[0]==="Y"?"years":"days of the month";return`Use \`${$.toLowerCase()}\` instead of \`${$}\` (in \`${K}\`) for formatting ${V} to the input \`${X}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}});var oK=B((rK)=>{rK.format=rK.formatDate=u6;Object.defineProperty(rK,"formatters",{enumerable:!0,get:function(){return iK.formatters}});Object.defineProperty(rK,"longFormatters",{enumerable:!0,get:function(){return sL.longFormatters}});var D6=K$(),g6=b(),iK=dL(),sL=pK(),dK=yK(),_6=u(),x6=U(),f6=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,h6=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,l6=/^'([^]*?)'?$/,c6=/''/g,m6=/[a-zA-Z]/;function u6($,K,X){let V=g6.getDefaultOptions(),E=X?.locale??V.locale??D6.defaultLocale,Q=X?.firstWeekContainsDate??X?.locale?.options?.firstWeekContains