import{t as e,u as t}from"./format-DM2A6flZ.js";var n;(function(e){e[e.AM=0]=`AM`,e[e.PM=1]=`PM`})(n||={});var r;(function(e){e[e.SUNDAY=0]=`SUNDAY`,e[e.MONDAY=1]=`MONDAY`,e[e.TUESDAY=2]=`TUESDAY`,e[e.WEDNESDAY=3]=`WEDNESDAY`,e[e.THURSDAY=4]=`THURSDAY`,e[e.FRIDAY=5]=`FRIDAY`,e[e.SATURDAY=6]=`SATURDAY`})(r||={});var i;(function(e){e[e.JANUARY=1]=`JANUARY`,e[e.FEBRUARY=2]=`FEBRUARY`,e[e.MARCH=3]=`MARCH`,e[e.APRIL=4]=`APRIL`,e[e.MAY=5]=`MAY`,e[e.JUNE=6]=`JUNE`,e[e.JULY=7]=`JULY`,e[e.AUGUST=8]=`AUGUST`,e[e.SEPTEMBER=9]=`SEPTEMBER`,e[e.OCTOBER=10]=`OCTOBER`,e[e.NOVEMBER=11]=`NOVEMBER`,e[e.DECEMBER=12]=`DECEMBER`})(i||={});function a(e,t){e.assign(`day`,t.getDate()),e.assign(`month`,t.getMonth()+1),e.assign(`year`,t.getFullYear())}function o(e,t){e.assign(`hour`,t.getHours()),e.assign(`minute`,t.getMinutes()),e.assign(`second`,t.getSeconds()),e.assign(`millisecond`,t.getMilliseconds()),e.assign(`meridiem`,t.getHours()<12?n.AM:n.PM)}function s(e,t){e.imply(`day`,t.getDate()),e.imply(`month`,t.getMonth()+1),e.imply(`year`,t.getFullYear())}function c(e,t){e.imply(`hour`,t.getHours()),e.imply(`minute`,t.getMinutes()),e.imply(`second`,t.getSeconds()),e.imply(`millisecond`,t.getMilliseconds()),e.imply(`meridiem`,t.getHours()<12?n.AM:n.PM)}var l={ACDT:630,ACST:570,ADT:-180,AEDT:660,AEST:600,AFT:270,AKDT:-480,AKST:-540,ALMT:360,AMST:-180,AMT:-240,ANAST:720,ANAT:720,AQTT:300,ART:-180,AST:-240,AWDT:540,AWST:480,AZOST:0,AZOT:-60,AZST:300,AZT:240,BNT:480,BOT:-240,BRST:-120,BRT:-180,BST:60,BTT:360,CAST:480,CAT:120,CCT:390,CDT:-300,CEST:120,CET:{timezoneOffsetDuringDst:120,timezoneOffsetNonDst:60,dstStart:e=>d(e,i.MARCH,r.SUNDAY,2),dstEnd:e=>d(e,i.OCTOBER,r.SUNDAY,3)},CHADT:825,CHAST:765,CKT:-600,CLST:-180,CLT:-240,COT:-300,CST:-360,CT:{timezoneOffsetDuringDst:-300,timezoneOffsetNonDst:-360,dstStart:e=>u(e,i.MARCH,r.SUNDAY,2,2),dstEnd:e=>u(e,i.NOVEMBER,r.SUNDAY,1,2)},CVT:-60,CXT:420,ChST:600,DAVT:420,EASST:-300,EAST:-360,EAT:180,ECT:-300,EDT:-240,EEST:180,EET:120,EGST:0,EGT:-60,EST:-300,ET:{timezoneOffsetDuringDst:-240,timezoneOffsetNonDst:-300,dstStart:e=>u(e,i.MARCH,r.SUNDAY,2,2),dstEnd:e=>u(e,i.NOVEMBER,r.SUNDAY,1,2)},FJST:780,FJT:720,FKST:-180,FKT:-240,FNT:-120,GALT:-360,GAMT:-540,GET:240,GFT:-180,GILT:720,GMT:0,GST:240,GYT:-240,HAA:-180,HAC:-300,HADT:-540,HAE:-240,HAP:-420,HAR:-360,HAST:-600,HAT:-90,HAY:-480,HKT:480,HLV:-210,HNA:-240,HNC:-360,HNE:-300,HNP:-480,HNR:-420,HNT:-150,HNY:-540,HOVT:420,ICT:420,IDT:180,IOT:360,IRDT:270,IRKST:540,IRKT:540,IRST:210,IST:330,JST:540,KGT:360,KRAST:480,KRAT:480,KST:540,KUYT:240,LHDT:660,LHST:630,LINT:840,MAGST:720,MAGT:720,MART:-510,MAWT:300,MDT:-360,MESZ:120,MEZ:60,MHT:720,MMT:390,MSD:240,MSK:180,MST:-420,MT:{timezoneOffsetDuringDst:-360,timezoneOffsetNonDst:-420,dstStart:e=>u(e,i.MARCH,r.SUNDAY,2,2),dstEnd:e=>u(e,i.NOVEMBER,r.SUNDAY,1,2)},MUT:240,MVT:300,MYT:480,NCT:660,NDT:-90,NFT:690,NOVST:420,NOVT:360,NPT:345,NST:-150,NUT:-660,NZDT:780,NZST:720,OMSST:420,OMST:420,PDT:-420,PET:-300,PETST:720,PETT:720,PGT:600,PHOT:780,PHT:480,PKT:300,PMDT:-120,PMST:-180,PONT:660,PST:-480,PT:{timezoneOffsetDuringDst:-420,timezoneOffsetNonDst:-480,dstStart:e=>u(e,i.MARCH,r.SUNDAY,2,2),dstEnd:e=>u(e,i.NOVEMBER,r.SUNDAY,1,2)},PWT:540,PYST:-180,PYT:-240,RET:240,SAMT:240,SAST:120,SBT:660,SCT:240,SGT:480,SRT:-180,SST:-660,TAHT:-600,TFT:300,TJT:300,TKT:780,TLT:540,TMT:300,TVT:720,ULAT:480,UTC:0,UYST:-120,UYT:-180,UZT:300,VET:-210,VLAST:660,VLAT:660,VUT:660,WAST:120,WAT:60,WEST:60,WESZ:60,WET:0,WEZ:0,WFT:720,WGST:-120,WGT:-180,WIB:420,WIT:540,WITA:480,WST:780,WT:0,YAKST:600,YAKT:600,YAPT:600,YEKST:360,YEKT:360};function u(e,t,n,r,i=0){let a=0,o=0;for(;or.dstStart(t.getFullYear())&&!(t>r.dstEnd(t.getFullYear()))?r.timezoneOffsetDuringDst:r.timezoneOffsetNonDst}var te={day:0,second:0,millisecond:0};function f(e,t){let n=new Date(e);if(t.y&&(t.year=t.y,delete t.y),t.mo&&(t.month=t.mo,delete t.mo),t.M&&(t.month=t.M,delete t.M),t.w&&(t.week=t.w,delete t.w),t.d&&(t.day=t.d,delete t.d),t.h&&(t.hour=t.h,delete t.h),t.m&&(t.minute=t.m,delete t.m),t.s&&(t.second=t.s,delete t.s),t.ms&&(t.millisecond=t.ms,delete t.ms),`year`in t){let e=Math.floor(t.year);n.setFullYear(n.getFullYear()+e);let r=t.year-e;r>0&&(t.month=t?.month??0,t.month+=r*12)}if(`quarter`in t){let e=Math.floor(t.quarter);n.setMonth(n.getMonth()+e*3)}if(`month`in t){let e=Math.floor(t.month);n.setMonth(n.getMonth()+e);let r=t.month-e;r>0&&(t.week=t?.week??0,t.week+=r*4)}if(`week`in t){let e=Math.floor(t.week);n.setDate(n.getDate()+e*7);let r=t.week-e;r>0&&(t.day=t?.day??0,t.day+=Math.round(r*7))}if(`day`in t){let e=Math.floor(t.day);n.setDate(n.getDate()+e);let r=t.day-e;r>0&&(t.hour=t?.hour??0,t.hour+=Math.round(r*24))}if(`hour`in t){let e=Math.floor(t.hour);n.setHours(n.getHours()+e);let r=t.hour-e;r>0&&(t.minute=t?.minute??0,t.minute+=Math.round(r*60))}if(`minute`in t){let e=Math.floor(t.minute);n.setMinutes(n.getMinutes()+e);let r=t.minute-e;r>0&&(t.second=t?.second??0,t.second+=Math.round(r*60))}if(`second`in t){let e=Math.floor(t.second);n.setSeconds(n.getSeconds()+e);let r=t.second-e;r>0&&(t.millisecond=t?.millisecond??0,t.millisecond+=Math.round(r*1e3))}if(`millisecond`in t){let e=Math.floor(t.millisecond);n.setMilliseconds(n.getMilliseconds()+e)}return n}function p(e){let t={};for(let n in e)t[n]=-e[n];return t}var m=class e{instant;timezoneOffset;constructor(e,t){this.instant=e??new Date,this.timezoneOffset=t??null}static fromDate(t){return new e(t)}static fromInput(t,n){if(t instanceof Date)return e.fromDate(t);let r=t?.instant??new Date;return new e(r,ee(t?.timezone,r,n))}getDateWithAdjustedTimezone(){let e=new Date(this.instant);return this.timezoneOffset!==null&&e.setMinutes(e.getMinutes()-this.getSystemTimezoneAdjustmentMinute(this.instant)),e}getSystemTimezoneAdjustmentMinute(e,t){(!e||e.getTime()<0)&&(e=new Date);let n=-e.getTimezoneOffset();return n-(t??this.timezoneOffset??n)}getTimezoneOffset(){return this.timezoneOffset??-this.instant.getTimezoneOffset()}},h=class e{knownValues;impliedValues;reference;_tags=new Set;constructor(e,t){if(this.reference=e,this.knownValues={},this.impliedValues={},t)for(let e in t)this.knownValues[e]=t[e];let n=e.getDateWithAdjustedTimezone();this.imply(`day`,n.getDate()),this.imply(`month`,n.getMonth()+1),this.imply(`year`,n.getFullYear()),this.imply(`hour`,12),this.imply(`minute`,0),this.imply(`second`,0),this.imply(`millisecond`,0)}static createRelativeFromReference(t,n=te){let r=f(t.getDateWithAdjustedTimezone(),n),i=new e(t);return i.addTag(`result/relativeDate`),`hour`in n||`minute`in n||`second`in n||`millisecond`in n?(i.addTag(`result/relativeDateAndTime`),o(i,r),a(i,r),i.assign(`timezoneOffset`,t.getTimezoneOffset())):(c(i,r),i.imply(`timezoneOffset`,t.getTimezoneOffset()),`day`in n?(i.assign(`day`,r.getDate()),i.assign(`month`,r.getMonth()+1),i.assign(`year`,r.getFullYear()),i.assign(`weekday`,r.getDay())):`week`in n?(i.assign(`day`,r.getDate()),i.assign(`month`,r.getMonth()+1),i.assign(`year`,r.getFullYear()),i.imply(`weekday`,r.getDay())):(i.imply(`day`,r.getDate()),`month`in n?(i.assign(`month`,r.getMonth()+1),i.assign(`year`,r.getFullYear())):(i.imply(`month`,r.getMonth()+1),`year`in n?i.assign(`year`,r.getFullYear()):i.imply(`year`,r.getFullYear())))),i}get(e){return e in this.knownValues?this.knownValues[e]:e in this.impliedValues?this.impliedValues[e]:null}isCertain(e){return e in this.knownValues}getCertainComponents(){return Object.keys(this.knownValues)}imply(e,t){return e in this.knownValues||(this.impliedValues[e]=t),this}assign(e,t){return this.knownValues[e]=t,delete this.impliedValues[e],this}addDurationAsImplied(e){let t=f(this.dateWithoutTimezoneAdjustment(),e);return(`day`in e||`week`in e||`month`in e||`year`in e)&&(this.delete([`day`,`weekday`,`month`,`year`]),this.imply(`day`,t.getDate()),this.imply(`weekday`,t.getDay()),this.imply(`month`,t.getMonth()+1),this.imply(`year`,t.getFullYear())),(`second`in e||`minute`in e||`hour`in e)&&(this.delete([`second`,`minute`,`hour`]),this.imply(`second`,t.getSeconds()),this.imply(`minute`,t.getMinutes()),this.imply(`hour`,t.getHours())),this}delete(e){typeof e==`string`&&(e=[e]);for(let t of e)delete this.knownValues[t],delete this.impliedValues[t]}clone(){let t=new e(this.reference);t.knownValues={},t.impliedValues={};for(let e in this.knownValues)t.knownValues[e]=this.knownValues[e];for(let e in this.impliedValues)t.impliedValues[e]=this.impliedValues[e];return t}isOnlyDate(){return!this.isCertain(`hour`)&&!this.isCertain(`minute`)&&!this.isCertain(`second`)}isOnlyTime(){return!this.isCertain(`weekday`)&&!this.isCertain(`day`)&&!this.isCertain(`month`)&&!this.isCertain(`year`)}isOnlyWeekdayComponent(){return this.isCertain(`weekday`)&&!this.isCertain(`day`)&&!this.isCertain(`month`)}isDateWithUnknownYear(){return this.isCertain(`month`)&&!this.isCertain(`year`)}isValidDate(){let e=this.dateWithoutTimezoneAdjustment();return!(e.getFullYear()!==this.get(`year`)||e.getMonth()!==this.get(`month`)-1||e.getDate()!==this.get(`day`)||this.get(`hour`)!=null&&e.getHours()!=this.get(`hour`)||this.get(`minute`)!=null&&e.getMinutes()!=this.get(`minute`))}toString(){return`[ParsingComponents { tags: ${JSON.stringify(Array.from(this._tags).sort())}, knownValues: ${JSON.stringify(this.knownValues)}, impliedValues: ${JSON.stringify(this.impliedValues)}}, reference: ${JSON.stringify(this.reference)}]`}date(){let e=this.dateWithoutTimezoneAdjustment(),t=this.reference.getSystemTimezoneAdjustmentMinute(e,this.get(`timezoneOffset`));return new Date(e.getTime()+t*6e4)}addTag(e){return this._tags.add(e),this}addTags(e){for(let t of e)this._tags.add(t);return this}tags(){return new Set(this._tags)}dateWithoutTimezoneAdjustment(){let e=new Date(this.get(`year`),this.get(`month`)-1,this.get(`day`),this.get(`hour`),this.get(`minute`),this.get(`second`),this.get(`millisecond`));return e.setFullYear(this.get(`year`)),e}},g=class e{refDate;index;text;reference;start;end;constructor(e,t,n,r,i){this.reference=e,this.refDate=e.instant,this.index=t,this.text=n,this.start=r||new h(e),this.end=i}clone(){let t=new e(this.reference,this.index,this.text);return t.start=this.start?this.start.clone():null,t.end=this.end?this.end.clone():null,t}date(){return this.start.date()}addTag(e){return this.start.addTag(e),this.end&&this.end.addTag(e),this}addTags(e){return this.start.addTags(e),this.end&&this.end.addTags(e),this}tags(){let e=new Set(this.start.tags());if(this.end)for(let t of this.end.tags())e.add(t);return e}toString(){let e=Array.from(this.tags()).sort();return`[ParsingResult {index: ${this.index}, text: '${this.text}', tags: ${JSON.stringify(e)} ...}]`}};function ne(e,t,n=`\\s{0,5},?\\s{0,5}`){let r=t.replace(/\((?!\?)/g,`(?:`);return`${e}${r}(?:${n}${r}){0,10}`}function re(e){let t;return t=e instanceof Array?[...e]:e instanceof Map?Array.from(e.keys()):Object.keys(e),t}function _(e){return`(?:${re(e).sort((e,t)=>t.length-e.length).join(`|`).replace(/\./g,`\\.`)})`}function ie(e){return e<100&&(e>50?e+=1900:e+=2e3),e}function v(e,t,n){let r=new Date(e);r.setMonth(n-1),r.setDate(t);let i=f(r,{year:1}),a=f(r,{year:-1});return Math.abs(i.getTime()-e.getTime())31)return t.index+=t[me].length,null;if(n.start.assign(`month`,r),n.start.assign(`day`,i),t[_e]){let e=k(t[_e]);n.start.assign(`year`,e)}else{let t=v(e.refDate,i,r);n.start.imply(`year`,t)}if(t[he]){let e=D(t[he]);n.end=n.start.clone(),n.end.assign(`day`,e)}return n}},ye=RegExp(`(${_(x)})(?:-|/|\\s*,?\\s*)(${E})(?!\\s*(?:am|pm))\\s*(?:(?:to|\\-)\\s*(${E})\\s*)?(?:(?:-|/|\\s*,\\s*|\\s+)(${O}))?(?=\\W|\$)(?!\\:\\d)`,`i`),be=1,xe=2,L=3,R=4,Se=class extends I{shouldSkipYearLikeDate;constructor(e){super(),this.shouldSkipYearLikeDate=e}innerPattern(){return ye}innerExtract(e,t){let n=x[t[be].toLowerCase()],r=D(t[xe]);if(r>31||this.shouldSkipYearLikeDate&&!t[L]&&!t[R]&&t[xe].match(/^2[0-5]$/))return null;let i=e.createParsingComponents({day:r,month:n}).addTag(`parser/ENMonthNameMiddleEndianParser`);if(t[R]){let e=k(t[R]);i.assign(`year`,e)}else{let t=v(e.refDate,r,n);i.imply(`year`,t)}if(!t[L])return i;let a=D(t[L]),o=e.createParsingResult(t.index,t[0]);return o.start=i,o.end=i.clone(),o.end.assign(`day`,a),o}},Ce=RegExp(`((?:in)\\s*)?(${_(x)})\\s*(?:(?:,|-|of)?\\s*(${O})?)?(?=[^\\s\\w]|\\s+[^0-9]|\\s+\$|\$)`,`i`),we=1,Te=2,Ee=3,De=class extends I{innerPattern(){return Ce}innerExtract(e,t){let n=t[Te].toLowerCase();if(t[0].length<=3&&!b[n])return null;let r=e.createParsingResult(t.index+(t[we]||``).length,t.index+t[0].length);r.start.imply(`day`,1),r.start.addTag(`parser/ENMonthNameParser`);let i=x[n];if(r.start.assign(`month`,i),t[Ee]){let e=k(t[Ee]);r.start.assign(`year`,e)}else{let t=v(e.refDate,1,i);r.start.imply(`year`,t)}return r}},Oe=RegExp(`([0-9]{4})[-\\.\\/\\s](?:(${_(x)})|([0-9]{1,2}))[-\\.\\/\\s]([0-9]{1,2})(?=\\W|\$)`,`i`),ke=1,Ae=2,z=3,je=4,Me=class extends I{strictMonthDateOrder;constructor(e){super(),this.strictMonthDateOrder=e}innerPattern(){return Oe}innerExtract(e,t){let n=parseInt(t[ke]),r=parseInt(t[je]),i=t[z]?parseInt(t[z]):x[t[Ae].toLowerCase()];if(i<1||i>12){if(this.strictMonthDateOrder)return null;r>=1&&r<=12&&([i,r]=[r,i])}return r<1||r>31?null:{day:r,month:i,year:n}}},Ne=RegExp(`([0-9]|0[1-9]|1[012])/([0-9]{4})`,`i`),Pe=1,Fe=2,Ie=class extends I{innerPattern(){return Ne}innerExtract(e,t){let n=parseInt(t[Fe]),r=parseInt(t[Pe]);return e.createParsingComponents().imply(`day`,1).assign(`month`,r).assign(`year`,n)}};function Le(e,t,n,r){return RegExp(`${e}${t}(\\d{1,4})(?:(?:\\.|:|:)(\\d{1,2})(?:(?::|:)(\\d{2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${n}`,r)}function Re(e,t){return RegExp(`^(${e})(\\d{1,4})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:(?:\\.|\\:|\\:)(\\d{1,2})(?:\\.(\\d{1,6}))?)?)?(?:\\s*(a\\.m\\.|p\\.m\\.|am?|pm?))?${t}`,`i`)}var B=2,V=3,H=4,U=5,W=6,ze=class{strictMode;constructor(e=!1){this.strictMode=e}patternFlags(){return`i`}primaryPatternLeftBoundary(){return`(^|\\s|T|\\b)`}primarySuffix(){return`(?!/)(?=\\W|$)`}followingSuffix(){return`(?!/)(?=\\W|$)`}pattern(e){return this.getPrimaryTimePatternThroughCache()}extract(e,t){let n=this.extractPrimaryTimeComponents(e,t);if(!n)return t[0].match(/^\d{4}/)?(t.index+=4,null):(t.index+=t[0].length,null);let r=t.index+t[1].length,i=t[0].substring(t[1].length),a=e.createParsingResult(r,i,n);t.index+=t[0].length;let o=e.text.substring(t.index),s=this.getFollowingTimePatternThroughCache().exec(o);return i.match(/^\d{3,4}/)&&s&&(s[0].match(/^\s*([+-])\s*\d{2,4}$/)||s[0].match(/^\s*([+-])\s*\d{2}\W\d{2}/))?null:!s||s[0].match(/^\s*([+-])\s*\d{3,4}$/)?this.checkAndReturnWithoutFollowingPattern(a):(a.end=this.extractFollowingTimeComponents(e,s,a),a.end&&(a.text+=s[0]),this.checkAndReturnWithFollowingPattern(a))}extractPrimaryTimeComponents(e,t,r=!1){let i=e.createParsingComponents(),a=0,o=null,s=parseInt(t[B]);if(s>100){if(t[B].length==4&&t[V]==null&&!t[W]||this.strictMode||t[V]!=null)return null;a=s%100,s=Math.floor(s/100)}if(s>24)return null;if(t[V]!=null){if(t[V].length==1&&!t[W])return null;a=parseInt(t[V])}if(a>=60)return null;if(s>12&&(o=n.PM),t[W]!=null){if(s>12)return null;let e=t[W][0].toLowerCase();e==`a`&&(o=n.AM,s==12&&(s=0)),e==`p`&&(o=n.PM,s!=12&&(s+=12))}if(i.assign(`hour`,s),i.assign(`minute`,a),o===null?s<12?i.imply(`meridiem`,n.AM):i.imply(`meridiem`,n.PM):i.assign(`meridiem`,o),t[U]!=null){let e=parseInt(t[U].substring(0,3));if(e>=1e3)return null;i.assign(`millisecond`,e)}if(t[H]!=null){let e=parseInt(t[H]);if(e>=60)return null;i.assign(`second`,e)}return i}extractFollowingTimeComponents(e,t,r){let i=e.createParsingComponents();if(t[U]!=null){let e=parseInt(t[U].substring(0,3));if(e>=1e3)return null;i.assign(`millisecond`,e)}if(t[H]!=null){let e=parseInt(t[H]);if(e>=60)return null;i.assign(`second`,e)}let a=parseInt(t[B]),o=0,s=-1;if(t[V]==null?a>100&&(o=a%100,a=Math.floor(a/100)):o=parseInt(t[V]),o>=60||a>24)return null;if(a>=12&&(s=n.PM),t[W]!=null){if(a>12)return null;let e=t[W][0].toLowerCase();e==`a`&&(s=n.AM,a==12&&(a=0,i.isCertain(`day`)||i.imply(`day`,i.get(`day`)+1))),e==`p`&&(s=n.PM,a!=12&&(a+=12)),r.start.isCertain(`meridiem`)||(s==n.AM?(r.start.imply(`meridiem`,n.AM),r.start.get(`hour`)==12&&r.start.assign(`hour`,0)):(r.start.imply(`meridiem`,n.PM),r.start.get(`hour`)!=12&&r.start.assign(`hour`,r.start.get(`hour`)+12)))}return i.assign(`hour`,a),i.assign(`minute`,o),s>=0?i.assign(`meridiem`,s):r.start.isCertain(`meridiem`)&&r.start.get(`hour`)>12?r.start.get(`hour`)-12>a?i.imply(`meridiem`,n.AM):a<=12&&(i.assign(`hour`,a+12),i.assign(`meridiem`,n.PM)):a>12?i.imply(`meridiem`,n.PM):a<=12&&i.imply(`meridiem`,n.AM),i.date().getTime()24)return null}return e}checkAndReturnWithFollowingPattern(e){if(e.text.match(/^\d+-\d+$/))return null;let t=e.text.match(/[^\d:.](\d[\d.]+)\s*-\s*(\d[\d.]+)$/);if(t){if(this.strictMode)return null;let e=t[1],n=t[2];if(n.includes(`.`)&&!n.match(/\d(\.\d{2})+$/)||parseInt(n)>24||parseInt(e)>24)return null}return e}cachedPrimaryPrefix=null;cachedPrimarySuffix=null;cachedPrimaryTimePattern=null;getPrimaryTimePatternThroughCache(){let e=this.primaryPrefix(),t=this.primarySuffix();return this.cachedPrimaryPrefix===e&&this.cachedPrimarySuffix===t?this.cachedPrimaryTimePattern:(this.cachedPrimaryTimePattern=Le(this.primaryPatternLeftBoundary(),e,t,this.patternFlags()),this.cachedPrimaryPrefix=e,this.cachedPrimarySuffix=t,this.cachedPrimaryTimePattern)}cachedFollowingPhase=null;cachedFollowingSuffix=null;cachedFollowingTimePatten=null;getFollowingTimePatternThroughCache(){let e=this.followingPhase(),t=this.followingSuffix();return this.cachedFollowingPhase===e&&this.cachedFollowingSuffix===t?this.cachedFollowingTimePatten:(this.cachedFollowingTimePatten=Re(e,t),this.cachedFollowingPhase=e,this.cachedFollowingSuffix=t,this.cachedFollowingTimePatten)}},Be=class extends ze{constructor(e){super(e)}followingPhase(){return`\\s*(?:\\-|\\–|\\~|\\〜|to|until|through|till|\\?)\\s*`}primaryPrefix(){return`(?:(?:at|from)\\s*)??`}primarySuffix(){return`(?:\\s*(?:o\\W*clock|at\\s*night|in\\s*the\\s*(?:morning|afternoon)))?(?!/)(?=\\W|$)`}extractPrimaryTimeComponents(e,t){let r=super.extractPrimaryTimeComponents(e,t);if(!r)return r;if(t[0].endsWith(`night`)){let e=r.get(`hour`);e>=6&&e<12?(r.assign(`hour`,r.get(`hour`)+12),r.assign(`meridiem`,n.PM)):e<6&&r.assign(`meridiem`,n.AM)}if(t[0].endsWith(`afternoon`)){r.assign(`meridiem`,n.PM);let e=r.get(`hour`);e>=0&&e<=6&&r.assign(`hour`,r.get(`hour`)+12)}return t[0].endsWith(`morning`)&&(r.assign(`meridiem`,n.AM),r.get(`hour`)<12&&r.assign(`hour`,r.get(`hour`))),r.addTag(`parser/ENTimeExpressionParser`)}extractFollowingTimeComponents(e,t,n){let r=super.extractFollowingTimeComponents(e,t,n);return r&&r.addTag(`parser/ENTimeExpressionParser`),r}},Ve=RegExp(`(${N})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,`i`),He=RegExp(`(${P})\\s{0,5}(?:ago|before|earlier)(?=\\W|$)`,`i`),Ue=class extends I{strictMode;constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?He:Ve}innerExtract(e,t){let n=F(t[1]);return n?h.createRelativeFromReference(e.reference,p(n)):null}},We=RegExp(`(${N})\\s{0,5}(?:later|after|from now|henceforth|forward|out)(?=(?:\\W|\$))`,`i`),Ge=RegExp(`(${P})\\s{0,5}(later|after|from now)(?=\\W|$)`,`i`),Ke=1,qe=class extends I{strictMode;constructor(e){super(),this.strictMode=e}innerPattern(){return this.strictMode?Ge:We}innerExtract(e,t){let n=F(t[Ke]);return n?h.createRelativeFromReference(e.reference,n):null}},G=class{refine(e,t){return t.filter(t=>this.isValid(e,t))}},K=class{refine(e,t){if(t.length<2)return t;let n=[],r=t[0],i=null;for(let a=1;a{console.log(`${this.constructor.name} merged ${t} and ${n} into ${a}`)}),r=a}}return r!=null&&n.push(r),n}},Je=class extends K{shouldMergeResults(e,t,n){return!t.end&&!n.end&&e.match(this.patternBetween())!=null}mergeResults(e,t,n){if(!t.start.isOnlyWeekdayComponent()&&!n.start.isOnlyWeekdayComponent()&&(n.start.getCertainComponents().forEach(e=>{t.start.isCertain(e)||t.start.imply(e,n.start.get(e))}),t.start.getCertainComponents().forEach(e=>{n.start.isCertain(e)||n.start.imply(e,t.start.get(e))})),t.start.date()>n.start.date()){let e=t.start.date(),r=n.start.date();n.start.isOnlyWeekdayComponent()&&f(r,{day:7})>e?(r=f(r,{day:7}),n.start.imply(`day`,r.getDate()),n.start.imply(`month`,r.getMonth()+1),n.start.imply(`year`,r.getFullYear())):t.start.isOnlyWeekdayComponent()&&f(e,{day:-7})e?(r=f(r,{year:1}),n.start.imply(`year`,r.getFullYear())):t.start.isDateWithUnknownYear()&&f(e,{year:-1}){let r=e.text.substring(t.index+t.text.length),i=et.exec(r);if(!i)return;let a=i[1].toUpperCase(),o=ee(a,t.start.date()??t.refDate??new Date,{...this.timezoneOverrides,...n});if(o==null)return;e.debug(()=>{console.log(`Extracting timezone: '${a}' into: ${o} for: ${t.start}`)});let s=t.start.get(`timezoneOffset`);s!==null&&o!=s&&(t.start.isCertain(`timezoneOffset`)||a!=i[1])||t.start.isOnlyDate()&&a!=i[1]||(t.text+=i[0],t.start.isCertain(`timezoneOffset`)||t.start.assign(`timezoneOffset`,o),t.end!=null&&!t.end.isCertain(`timezoneOffset`)&&t.end.assign(`timezoneOffset`,o))}),t}},nt=RegExp(`^\\s*(?:\\(?(?:GMT|UTC)\\s?)?([+-])(\\d{1,2})(?::?(\\d{2}))?\\)?`,`i`),rt=1,it=2,at=3,ot=class{refine(e,t){return t.forEach(function(t){if(t.start.isCertain(`timezoneOffset`))return;let n=e.text.substring(t.index+t.text.length),r=nt.exec(n);if(!r)return;e.debug(()=>{console.log(`Extracting timezone: '${r[0]}' into : ${t}`)});let i=parseInt(r[it]),a=parseInt(r[at]||`0`),o=i*60+a;o>840||(r[rt]===`-`&&(o=-o),t.end!=null&&t.end.assign(`timezoneOffset`,o),t.start.assign(`timezoneOffset`,o),t.text+=r[0])}),t}},q=class{refine(e,t){if(t.length<2)return t;let n=[],r=t[0];for(let i=1;i=r.index+r.text.length){n.push(r),r=a;continue}let o=null,s=null;a.text.length>r.text.length?(o=a,s=r):(o=r,s=a),e.debug(()=>{console.log(`${this.constructor.name} remove ${s} by ${o}`)}),r=o}return r!=null&&n.push(r),n}},st=class{refine(e,t){return e.option.forwardDate&&t.forEach(t=>{let n=e.reference.getDateWithAdjustedTimezone();if(t.start.isOnlyTime()&&e.reference.instant>t.start.date()){let n=e.reference.getDateWithAdjustedTimezone(),r=new Date(n);r.setDate(r.getDate()+1),s(t.start,r),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} time from the ref date (${n}) to the following day (${r})`)}),t.end&&t.end.isOnlyTime()&&(s(t.end,r),t.start.date()>t.end.date()&&(r.setDate(r.getDate()+1),s(t.end,r)))}if(t.start.isOnlyWeekdayComponent()&&n>t.start.date()){let r=t.start.get(`weekday`)-n.getDay();if(r<=0&&(r+=7),n=f(n,{day:r}),s(t.start,n),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} weekday (${t.start})`)}),t.end&&t.end.isOnlyWeekdayComponent()){let r=t.end.get(`weekday`)-n.getDay();r<=0&&(r+=7),n=f(n,{day:r}),s(t.end,n),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} weekday (${t.end})`)})}}if(t.start.isDateWithUnknownYear()&&n>t.start.date())for(let r=0;r<3&&n>t.start.date();r++)t.start.imply(`year`,t.start.get(`year`)+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} year (${t.start})`)}),t.end&&!t.end.isCertain(`year`)&&(t.end.imply(`year`,t.end.get(`year`)+1),e.debug(()=>{console.log(`${this.constructor.name} adjusted ${t} month (${t.start})`)}))}),t}},ct=class extends G{strictMode;constructor(e){super(),this.strictMode=e}isValid(e,t){return t.text.replace(` `,``).match(/^\d*(\.\d*)?$/)?(e.debug(()=>{console.log(`Removing unlikely result '${t.text}'`)}),!1):t.start.isValidDate()?t.end&&!t.end.isValidDate()?(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.end})`)}),!1):this.strictMode?this.isStrictModeValid(e,t):!0:(e.debug(()=>{console.log(`Removing invalid result: ${t} (${t.start})`)}),!1)}isStrictModeValid(e,t){return t.start.isOnlyWeekdayComponent()?(e.debug(()=>{console.log(`(Strict) Removing weekday only component: ${t} (${t.end})`)}),!1):!0}},lt=RegExp(`([0-9]{4})\\-([0-9]{1,2})\\-([0-9]{1,2})(?:T([0-9]{1,2}):([0-9]{1,2})(?::([0-9]{1,2})(?:\\.(\\d{1,4}))?)?(Z|([+-]\\d{2}):?(\\d{2})?)?)?(?=\\W|$)`,`i`),ut=1,dt=2,ft=3,pt=4,mt=5,ht=6,gt=7,_t=8,vt=9,yt=10,bt=class extends I{innerPattern(){return lt}innerExtract(e,t){let n=e.createParsingComponents({year:parseInt(t[ut]),month:parseInt(t[dt]),day:parseInt(t[ft])});if(t[pt]!=null&&(n.assign(`hour`,parseInt(t[pt])),n.assign(`minute`,parseInt(t[mt])),t[ht]!=null&&n.assign(`second`,parseInt(t[ht])),t[gt]!=null&&n.assign(`millisecond`,parseInt(t[gt])),t[_t]!=null)){let e=0;if(t[vt]){let n=parseInt(t[vt]),r=0;t[yt]!=null&&(r=parseInt(t[yt])),e=n*60,e<0?e-=r:e+=r}n.assign(`timezoneOffset`,e)}return n.addTag(`parser/ISOFormatParser`)}},xt=class extends K{mergeResults(e,t,n){let r=n.clone();return r.index=t.index,r.text=t.text+e+r.text,r.start.assign(`weekday`,t.start.get(`weekday`)),r.end&&r.end.assign(`weekday`,t.start.get(`weekday`)),r}shouldMergeResults(e,t,n){return t.start.isOnlyWeekdayComponent()&&!t.start.isCertain(`hour`)&&n.start.isCertain(`day`)&&e.match(/^,?\s*$/)!=null}};function St(e,t=!1){return e.parsers.unshift(new bt),e.refiners.unshift(new xt),e.refiners.unshift(new ot),e.refiners.unshift(new q),e.refiners.push(new tt),e.refiners.push(new q),e.refiners.push(new st),e.refiners.push(new ct(t)),e}function Ct(e){let t=e.getDateWithAdjustedTimezone(),n=new h(e,{});return a(n,t),o(n,t),n.assign(`timezoneOffset`,e.getTimezoneOffset()),n.addTag(`casualReference/now`),n}function wt(e){let t=e.getDateWithAdjustedTimezone(),n=new h(e,{});return a(n,t),c(n,t),n.delete(`meridiem`),n.addTag(`casualReference/today`),n}function Tt(e){return Dt(e,1).addTag(`casualReference/yesterday`)}function Et(e){return J(e,1).addTag(`casualReference/tomorrow`)}function Dt(e,t){return J(e,-t)}function J(e,t){let n=e.getDateWithAdjustedTimezone(),r=new h(e,{}),i=new Date(n.getTime());return i.setDate(i.getDate()+t),a(r,i),c(r,i),r.delete(`meridiem`),r}function Ot(e,t=22){let r=e.getDateWithAdjustedTimezone(),i=new h(e,{});return a(i,r),i.imply(`hour`,t),i.imply(`meridiem`,n.PM),i.addTag(`casualReference/tonight`),i}function kt(e,t=20){let r=new h(e,{});return r.imply(`meridiem`,n.PM),r.imply(`hour`,t),r.addTag(`casualReference/evening`),r}function At(e){let t=new h(e,{});return e.getDateWithAdjustedTimezone().getHours()>2&&t.addDurationAsImplied({day:1}),t.assign(`hour`,0),t.imply(`minute`,0),t.imply(`second`,0),t.imply(`millisecond`,0),t.addTag(`casualReference/midnight`),t}function jt(e,t=6){let r=new h(e,{});return r.imply(`meridiem`,n.AM),r.imply(`hour`,t),r.imply(`minute`,0),r.imply(`second`,0),r.imply(`millisecond`,0),r.addTag(`casualReference/morning`),r}function Mt(e,t=15){let r=new h(e,{});return r.imply(`meridiem`,n.PM),r.imply(`hour`,t),r.imply(`minute`,0),r.imply(`second`,0),r.imply(`millisecond`,0),r.addTag(`casualReference/afternoon`),r}function Nt(e){let t=new h(e,{});return t.imply(`meridiem`,n.AM),t.assign(`hour`,12),t.imply(`minute`,0),t.imply(`second`,0),t.imply(`millisecond`,0),t.addTag(`casualReference/noon`),t}var Pt=/(now|today|tonight|tomorrow|overmorrow|tmr|tmrw|yesterday|last\s*night)(?=\W|$)/i,Ft=class extends I{innerPattern(e){return Pt}innerExtract(e,t){let n=e.refDate,r=t[0].toLowerCase(),i=e.createParsingComponents();switch(r){case`now`:i=Ct(e.reference);break;case`today`:i=wt(e.reference);break;case`yesterday`:i=Tt(e.reference);break;case`tomorrow`:case`tmr`:case`tmrw`:i=Et(e.reference);break;case`tonight`:i=Ot(e.reference);break;case`overmorrow`:i=J(e.reference,2);break;default:if(r.match(/last\s*night/)){if(n.getHours()>6){let e=new Date(n.getTime());e.setDate(e.getDate()-1),n=e}a(i,n),i.imply(`hour`,0)}break}return i.addTag(`parser/ENCasualDateParser`),i}},It=/(?:this)?\s{0,3}(morning|afternoon|evening|night|midnight|midday|noon)(?=\W|$)/i,Lt=class extends I{innerPattern(){return It}innerExtract(e,t){let n=null;switch(t[1].toLowerCase()){case`afternoon`:n=Mt(e.reference);break;case`evening`:case`night`:n=kt(e.reference);break;case`midnight`:n=At(e.reference);break;case`morning`:n=jt(e.reference);break;case`noon`:case`midday`:n=Nt(e.reference);break}return n&&n.addTag(`parser/ENCasualTimeParser`),n}};function Rt(e,t,n){let r=zt(e.getDateWithAdjustedTimezone(),t,n),i=new h(e);return i=i.addDurationAsImplied({day:r}),i.assign(`weekday`,t),i}function zt(e,t,n){let i=e.getDay();switch(n){case`this`:return Y(e,t);case`last`:return Vt(e,t);case`next`:return i==r.SUNDAY?t==r.SUNDAY?7:t:i==r.SATURDAY?t==r.SATURDAY?7:t==r.SUNDAY?8:1+t:t=0&&(n-=7),n}var Ht=RegExp(`(?:(?:\\,|\\(|\\()\\s*)?(?:on\\s*?)?(?:(this|last|past|next)\\s*)?(${_(y)}|weekend|weekday)(?:\\s*(?:\\,|\\)|\\)))?(?:\\s*(this|last|past|next)\\s*week)?(?=\\W|\$)`,`i`),Ut=1,Wt=2,Gt=3,Kt=class extends I{innerPattern(){return Ht}innerExtract(e,t){let n=t[Ut],i=t[Gt],a=n||i;a||=``,a=a.toLowerCase();let o=null;a==`last`||a==`past`?o=`last`:a==`next`?o=`next`:a==`this`&&(o=`this`);let s=t[Wt].toLowerCase(),c;if(y[s]!==void 0)c=y[s];else if(s==`weekend`)c=o==`last`?r.SUNDAY:r.SATURDAY;else if(s==`weekday`){let t=e.reference.getDateWithAdjustedTimezone().getDay();t==r.SUNDAY||t==r.SATURDAY?c=o==`last`?r.FRIDAY:r.MONDAY:(c=t-1,c=o==`last`?c-1:c+1,c=c%5+1)}else return null;return Rt(e.reference,c,o)}},qt=RegExp(`(this|last|past|next|after\\s*this)\\s*(${_(w)})(?=\\s*)(?=\\W|\$)`,`i`),Jt=1,Yt=2,Xt=class extends I{innerPattern(){return qt}innerExtract(e,t){let n=t[Jt].toLowerCase(),r=t[Yt].toLowerCase(),i=w[r];if(n==`next`||n.startsWith(`after`)){let t={};return t[i]=1,h.createRelativeFromReference(e.reference,t)}if(n==`last`||n==`past`){let t={};return t[i]=-1,h.createRelativeFromReference(e.reference,t)}let a=e.createParsingComponents(),o=new Date(e.reference.instant.getTime());return r.match(/week/i)?(o.setDate(o.getDate()-o.getDay()),a.imply(`day`,o.getDate()),a.imply(`month`,o.getMonth()+1),a.imply(`year`,o.getFullYear())):r.match(/month/i)?(o.setDate(1),a.imply(`day`,o.getDate()),a.assign(`year`,o.getFullYear()),a.assign(`month`,o.getMonth()+1)):r.match(/year/i)&&(o.setDate(1),o.setMonth(0),a.imply(`day`,o.getDate()),a.imply(`month`,o.getMonth()+1),a.assign(`year`,o.getFullYear())),a}},Zt=RegExp(`([^\\d]|^)([0-3]{0,1}[0-9]{1})[\\/\\.\\-]([0-3]{0,1}[0-9]{1})(?:[\\/\\.\\-]([0-9]{4}|[0-9]{2}))?(\\W|$)`,`i`),Qt=1,$t=5,X=2,en=3,Z=4,tn=class{groupNumberMonth;groupNumberDay;constructor(e){this.groupNumberMonth=e?en:X,this.groupNumberDay=e?X:en}pattern(){return Zt}extract(e,t){let n=t.index+t[Qt].length,r=t.index+t[0].length-t[$t].length;if(n>0&&e.text.substring(0,n).match(`\\d/?$`)||r12)&&o>12)if(s>=1&&s<=12&&o<=31)[s,o]=[o,s];else return null;if(s<1||s>31)return null;if(a.start.assign(`day`,s),a.start.assign(`month`,o),t[Z]){let e=ie(parseInt(t[Z]));a.start.assign(`year`,e)}else{let t=v(e.refDate,s,o);a.start.imply(`year`,t)}return a.addTag(`parser/SlashDateFormatParser`)}},nn=RegExp(`(this|last|past|next|after|\\+|-)\\s*(${N})(?=\\W|$)`,`i`),rn=RegExp(`(this|last|past|next|after|\\+|-)\\s*(${P})(?=\\W|$)`,`i`),an=class extends I{allowAbbreviations;constructor(e=!0){super(),this.allowAbbreviations=e}innerPattern(){return this.allowAbbreviations?nn:rn}innerExtract(e,t){let n=t[1].toLowerCase(),r=F(t[2]);if(!r)return null;switch(n){case`last`:case`past`:case`-`:r=p(r);break}return h.createRelativeFromReference(e.reference,r)}};function on(e){return e.text.match(/^[+-]/i)!=null}function sn(e){return e.text.match(/^-/i)!=null}var cn=class extends K{shouldMergeResults(e,t,n){return e.match(/^\s*$/i)?on(n)||sn(n):!1}mergeResults(e,t,n,r){let i=F(n.text);sn(n)&&(i=p(i));let a=h.createRelativeFromReference(m.fromDate(t.start.date()),i);return new g(t.reference,t.index,`${t.text}${e}${n.text}`,a)}};function ln(e){return e.text.match(/\s+(before|from)$/i)!=null}function un(e){return e.text.match(/\s+(after|since)$/i)!=null}var dn=class extends K{patternBetween(){return/^\s*$/i}shouldMergeResults(e,t,n){return!e.match(this.patternBetween())||!ln(t)&&!un(t)?!1:!!n.start.get(`day`)&&!!n.start.get(`month`)&&!!n.start.get(`year`)}mergeResults(e,t,n){let r=F(t.text);ln(t)&&(r=p(r));let i=h.createRelativeFromReference(m.fromDate(n.start.date()),r);return new g(n.reference,t.index,`${t.text}${e}${n.text}`,i)}},fn=RegExp(`^\\s*(${O})`,`i`),pn=1,mn=class{refine(e,t){return t.forEach(function(t){if(!t.start.isDateWithUnknownYear())return;let n=e.text.substring(t.index+t.text.length),r=fn.exec(n);if(!r||r[0].trim().length<=3)return;e.debug(()=>{console.log(`Extracting year: '${r[0]}' into : ${t}`)});let i=k(r[pn]);t.end!=null&&t.end.assign(`year`,i),t.start.assign(`year`,i),t.text+=r[0]}),t}},hn=class extends G{constructor(){super()}isValid(e,t){let n=t.text.trim();return n===e.text.trim()?!0:n.toLowerCase()===`may`&&!e.text.substring(0,t.index).trim().match(/\b(in)$/i)?(e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):n.toLowerCase().endsWith(`the second`)?(e.text.substring(t.index+t.text.length).trim().length>0&&e.debug(()=>{console.log(`Removing unlikely result: ${t}`)}),!1):!0}},gn=class{createCasualConfiguration(e=!1){let t=this.createConfiguration(!1,e);return t.parsers.push(new Ft),t.parsers.push(new Lt),t.parsers.push(new De),t.parsers.push(new Xt),t.parsers.push(new an),t.refiners.push(new hn),t}createConfiguration(e=!0,t=!1){let n=St({parsers:[new tn(t),new fe(e),new ve,new Se(t),new Kt,new Ie,new Be(e),new Ue(e),new qe(e)],refiners:[new $e]},e);return n.parsers.unshift(new Me(e)),n.refiners.unshift(new dn),n.refiners.unshift(new cn),n.refiners.unshift(new q),n.refiners.push(new $e),n.refiners.push(new mn),n.refiners.push(new Ye),n}},Q=class e{parsers;refiners;defaultConfig=new gn;constructor(e){e||=this.defaultConfig.createCasualConfiguration(),this.parsers=[...e.parsers],this.refiners=[...e.refiners]}clone(){return new e({parsers:[...this.parsers],refiners:[...this.refiners]})}parseDate(e,t,n){let r=this.parse(e,t,n);return r.length>0?r[0].start.date():null}parse(t,n,r){let i=new _n(t,n,r),a=[];return this.parsers.forEach(t=>{let n=e.executeParser(i,t);a=a.concat(n)}),a.sort((e,t)=>e.index-t.index),this.refiners.forEach(function(e){a=e.refine(i,a)}),a}static executeParser(e,t){let n=[],r=t.pattern(e),i=e.text,a=e.text,o=r.exec(a);for(;o;){let s=o.index+i.length-a.length;o.index=s;let c=t.extract(e,o);if(!c){a=i.substring(o.index+1),o=r.exec(a);continue}let l=null;c instanceof g?l=c:c instanceof h?(l=e.createParsingResult(o.index,o[0]),l.start=c):l=e.createParsingResult(o.index,o[0],c);let u=l.index,d=l.text;e.debug(()=>console.log(`${t.constructor.name} extracted (at index=${u}) '${d}'`)),n.push(l),a=i.substring(u+d.length),o=r.exec(a)}return n}},_n=class{text;option;reference;refDate;constructor(e,t,n){this.text=e,this.option=n??{},this.reference=m.fromInput(t,this.option.timezones),this.refDate=this.reference.instant}createParsingComponents(e){return e instanceof h?e:new h(this.reference,e)}createParsingResult(e,t,n,r){let i=typeof t==`string`?t:this.text.substring(e,t),a=n?this.createParsingComponents(n):null,o=r?this.createParsingComponents(r):null;return new g(this.reference,e,i,a,o)}debug(e){this.option.debug&&(this.option.debug instanceof Function?this.option.debug(e):this.option.debug.debug(e))}},$=new gn,vn=new Q($.createCasualConfiguration(!1));new Q($.createConfiguration(!0,!1)),new Q($.createCasualConfiguration(!0));var yn=vn;function bn(e,t,n){return yn.parse(e,t,n)}var xn={EST:`America/New_York`,EDT:`America/New_York`,CST:`America/Chicago`,CDT:`America/Chicago`,MST:`America/Denver`,MDT:`America/Denver`,PST:`America/Los_Angeles`,PDT:`America/Los_Angeles`,AKST:`America/Anchorage`,AKDT:`America/Anchorage`,HST:`Pacific/Honolulu`,ET:`America/New_York`,PT:`America/Los_Angeles`,MT:`America/Denver`,CT:`America/Chicago`,GMT:`UTC`,UTC:`UTC`,CET:`Europe/Paris`,CEST:`Europe/Paris`,EET:`Europe/Athens`,EEST:`Europe/Athens`,WET:`Europe/Lisbon`,WEST:`Europe/Lisbon`,BST:`Europe/London`,BRT:`America/Sao_Paulo`,BRST:`America/Sao_Paulo`,BRL:`America/Sao_Paulo`,JST:`Asia/Tokyo`,KST:`Asia/Seoul`,IST:`Asia/Kolkata`,SGT:`Asia/Singapore`,HKT:`Asia/Hong_Kong`,WIB:`Asia/Jakarta`,MSK:`Europe/Moscow`,AEST:`Australia/Sydney`,AEDT:`Australia/Sydney`,ACST:`Australia/Adelaide`,ACDT:`Australia/Adelaide`,AWST:`Australia/Perth`,NZST:`Pacific/Auckland`,NZDT:`Pacific/Auckland`},Sn={valid:t,isoDate:t=>e(t,`yyyy-MM-dd`),time:t=>e(t,`HH:mm`),yearMonthDay:t=>e(t,`yyyy-MM-dd`),evaluateTimezone:e=>{let t=e.match(/(.+)\s+to\s+([a-zA-Z/_]{2,})$/i);if(!t)return null;let n=t?.[1]?.trim(),r=t?.[2]?.trim().toUpperCase(),i=bn(n);if(i.length===0)return null;try{let e=i[0];if((e?.start).knownValues.hour===void 0)return null;let t=xn[r]||r,n=e?.start.date();return n?new Intl.DateTimeFormat(void 0,{timeZone:t,hour:`numeric`,minute:`2-digit`,hour12:!0,timeZoneName:`short`}).format(n):null}catch{return null}}};export{Sn as t}; //# sourceMappingURL=dates-CTijsTXm.js.map