@christtrade/depth 0.12.22 → 0.12.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ var Pe=Object.defineProperty;var Sr=Object.getOwnPropertyDescriptor;var xr=Object.getOwnPropertyNames;var Or=Object.prototype.hasOwnProperty;var Nr=(t,e)=>{for(var n in e)Pe(t,n,{get:e[n],enumerable:!0})},Dr=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of xr(e))!Or.call(t,i)&&i!==n&&Pe(t,i,{get:()=>e[i],enumerable:!(r=Sr(e,i))||r.enumerable});return t};var Mr=t=>Dr(Pe({},"__esModule",{value:!0}),t);var yo={};Nr(yo,{DataLevel:()=>It,Layout:()=>Et,PluginType:()=>Ct,SCRIPT_DSL:()=>Ft,STDLIB:()=>Be,STDLIB_SIGNATURE:()=>ho,buildScriptScope:()=>gr,evalScriptInScope:()=>mo});module.exports=Mr(yo);var U=class extends Error{},nt=class extends U{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},rt=class extends U{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},it=class extends U{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},H=class extends U{},Ee=class extends U{constructor(e){super(`Invalid unit ${e}`)}},x=class extends U{},z=class extends U{constructor(){super("Zone is an abstract class")}},h="numeric",V="short",v="long",Fe={year:h,month:h,day:h},fn={year:h,month:V,day:h},vr={year:h,month:V,day:h,weekday:V},mn={year:h,month:v,day:h},hn={year:h,month:v,day:h,weekday:v},dn={hour:h,minute:h},yn={hour:h,minute:h,second:h},gn={hour:h,minute:h,second:h,timeZoneName:V},wn={hour:h,minute:h,second:h,timeZoneName:v},pn={hour:h,minute:h,hourCycle:"h23"},bn={hour:h,minute:h,second:h,hourCycle:"h23"},Tn={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:V},kn={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:v},Sn={year:h,month:h,day:h,hour:h,minute:h},xn={year:h,month:h,day:h,hour:h,minute:h,second:h},On={year:h,month:V,day:h,hour:h,minute:h},Nn={year:h,month:V,day:h,hour:h,minute:h,second:h},Cr={year:h,month:V,day:h,weekday:V,hour:h,minute:h},Dn={year:h,month:v,day:h,hour:h,minute:h,timeZoneName:V},Mn={year:h,month:v,day:h,hour:h,minute:h,second:h,timeZoneName:V},vn={year:h,month:v,day:h,weekday:v,hour:h,minute:h,timeZoneName:v},Cn={year:h,month:v,day:h,weekday:v,hour:h,minute:h,second:h,timeZoneName:v},J=class{get type(){throw new z}get name(){throw new z}get ianaName(){return this.name}get isUniversal(){throw new z}offsetName(e,n){throw new z}formatOffset(e,n){throw new z}offset(e){throw new z}equals(e){throw new z}get isValid(){throw new z}},_e=null,Ae=class t extends J{static get instance(){return _e===null&&(_e=new t),_e}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Zn(e,n,r)}formatOffset(e,n){return ge(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},st=new Map;function Ir(t){let e=st.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),st.set(t,e)),e}var Er={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Fr(t,e){let n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,o,l,a,u,c]=r;return[o,i,s,l,a,u,c]}function Ar(t,e){let n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){let{type:s,value:o}=n[i],l=Er[s];s==="era"?r[l]=o:y(l)||(r[l]=parseInt(o,10))}return r}var Ge=new Map,P=class t extends J{static create(e){let n=Ge.get(e);return n===void 0&&Ge.set(e,n=new t(e)),n}static resetCache(){Ge.clear(),st.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=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Zn(e,n,r,this.name)}formatOffset(e,n){return ge(this.offset(e),n)}offset(e){if(!this.valid)return NaN;let n=new Date(e);if(isNaN(n))return NaN;let r=Ir(this.name),[i,s,o,l,a,u,c]=r.formatToParts?Ar(r,n):Fr(r,n);l==="BC"&&(i=-Math.abs(i)+1);let d=ze({year:i,month:s,day:o,hour:a===24?0:a,minute:u,second:c,millisecond:0}),m=+n,g=m%1e3;return m-=g>=0?g:1e3+g,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Lt={};function Lr(t,e={}){let n=JSON.stringify([t,e]),r=Lt[n];return r||(r=new Intl.ListFormat(t,e),Lt[n]=r),r}var ot=new Map;function at(t,e={}){let n=JSON.stringify([t,e]),r=ot.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(t,e),ot.set(n,r)),r}var lt=new Map;function Wr(t,e={}){let n=JSON.stringify([t,e]),r=lt.get(n);return r===void 0&&(r=new Intl.NumberFormat(t,e),lt.set(n,r)),r}var ut=new Map;function Vr(t,e={}){let{base:n,...r}=e,i=JSON.stringify([t,r]),s=ut.get(i);return s===void 0&&(s=new Intl.RelativeTimeFormat(t,e),ut.set(i,s)),s}var he=null;function Rr(){return he||(he=new Intl.DateTimeFormat().resolvedOptions().locale,he)}var ct=new Map;function In(t){let e=ct.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),ct.set(t,e)),e}var ft=new Map;function $r(t){let e=ft.get(t);if(!e){let n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...En,...e}),ft.set(t,e)}return e}function zr(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=at(t).resolvedOptions(),i=t}catch{let a=t.substring(0,n);r=at(a).resolvedOptions(),i=a}let{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Zr(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Ur(t){let e=[];for(let n=1;n<=12;n++){let r=T.utc(2009,n,1);e.push(t(r))}return e}function Yr(t){let e=[];for(let n=1;n<=7;n++){let r=T.utc(2016,11,13+n);e.push(t(r))}return e}function Oe(t,e,n,r){let i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function qr(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||In(t.locale).numberingSystem==="latn"}var mt=class{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;let{padTo:i,floor:s,...o}=r;if(!n||Object.keys(o).length>0){let l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=Wr(e,l)}}format(e){if(this.inf){let n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{let n=this.floor?Math.floor(e):Ot(e,3);return S(n,this.padTo)}}},ht=class{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let o=-1*(e.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&P.create(l).valid?(i=l,this.dt=e):(i="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,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=at(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){let r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},dt=class{constructor(e,n,r){this.opts={style:"long",...r},!n&&$n()&&(this.rtf=Vr(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ci(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}},En={firstDay:1,minimalDays:4,weekend:[6,7]},b=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,s=!1){let o=e||k.defaultLocale,l=o||(s?"en-US":Rr()),a=n||k.defaultNumberingSystem,u=r||k.defaultOutputCalendar,c=wt(i)||k.defaultWeekSettings;return new t(l,a,u,c,o)}static resetCache(){he=null,ot.clear(),lt.clear(),ut.clear(),ct.clear(),ft.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return t.create(e,n,r,i)}constructor(e,n,r,i,s){let[o,l,a]=zr(e);this.locale=o,this.numberingSystem=n||l||null,this.outputCalendar=r||a||null,this.weekSettings=i,this.intl=Zr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=qr(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,wt(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,n=!1){return Oe(this,e,qn,()=>{let r=this.intl==="ja"||this.intl.startsWith("ja-");n&=!r;let i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";if(!this.monthsCache[s][e]){let o=r?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[s][e]=Ur(o)}return this.monthsCache[s][e]})}weekdays(e,n=!1){return Oe(this,e,Pn,()=>{let r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Yr(s=>this.extract(s,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Oe(this,void 0,()=>_n,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[T.utc(2016,11,13,9),T.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Oe(this,e,Gn,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[T.utc(-40,1,1),T.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){let i=this.dtFormatter(e,n),s=i.formatToParts(),o=s.find(l=>l.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new mt(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new ht(e,this.intl,n)}relFormatter(e={}){return new dt(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Lr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||In(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:zn()?$r(this.locale):En}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})`}},je=null,F=class t extends J{static get utcInstance(){return je===null&&(je=new t(0)),je}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(Ze(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ge(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ge(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return ge(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},yt=class extends J{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 q(t,e){if(y(t)||t===null)return e;if(t instanceof J)return t;if(jr(t)){let n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?Ae.instance:n==="utc"||n==="gmt"?F.utcInstance:F.parseSpecifier(n)||P.create(t)}else return B(t)?F.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new yt(t)}var Tt={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"},Wt={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]},Hr=Tt.hanidec.replace(/[\[|\]]/g,"").split("");function Br(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(t[n].search(Tt.hanidec)!==-1)e+=Hr.indexOf(t[n]);else for(let i in Wt){let[s,o]=Wt[i];r>=s&&r<=o&&(e+=r-s)}}return parseInt(e,10)}else return e}var gt=new Map;function Pr(){gt.clear()}function L({numberingSystem:t},e=""){let n=t||"latn",r=gt.get(n);r===void 0&&(r=new Map,gt.set(n,r));let i=r.get(e);return i===void 0&&(i=new RegExp(`${Tt[n]}${e}`),r.set(e,i)),i}var Vt=()=>Date.now(),Rt="system",$t=null,zt=null,Zt=null,Ut=60,Yt,qt=null,k=class{static get now(){return Vt}static set now(e){Vt=e}static set defaultZone(e){Rt=e}static get defaultZone(){return q(Rt,Ae.instance)}static get defaultLocale(){return $t}static set defaultLocale(e){$t=e}static get defaultNumberingSystem(){return zt}static set defaultNumberingSystem(e){zt=e}static get defaultOutputCalendar(){return Zt}static set defaultOutputCalendar(e){Zt=e}static get defaultWeekSettings(){return qt}static set defaultWeekSettings(e){qt=wt(e)}static get twoDigitCutoffYear(){return Ut}static set twoDigitCutoffYear(e){Ut=e%100}static get throwOnInvalid(){return Yt}static set throwOnInvalid(e){Yt=e}static resetCaches(){b.resetCache(),P.resetCache(),T.resetCache(),Pr()}},M=class{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Fn=[0,31,59,90,120,151,181,212,243,273,304,334],An=[0,31,60,91,121,152,182,213,244,274,305,335];function I(t,e){return new M("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function kt(t,e,n){let r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function Ln(t,e,n){return n+(pe(t)?An:Fn)[e-1]}function Wn(t,e){let n=pe(t)?An:Fn,r=n.findIndex(s=>s<e),i=e-n[r];return{month:r+1,day:i}}function St(t,e){return(t-e+7)%7+1}function Le(t,e=4,n=1){let{year:r,month:i,day:s}=t,o=Ln(r,i,s),l=St(kt(r,i,s),n),a=Math.floor((o-l+14-e)/7),u;return a<1?(u=r-1,a=we(u,e,n)):a>we(r,e,n)?(u=r+1,a=1):u=r,{weekYear:u,weekNumber:a,weekday:l,...Ue(t)}}function Ht(t,e=4,n=1){let{weekYear:r,weekNumber:i,weekday:s}=t,o=St(kt(r,1,e),n),l=ne(r),a=i*7+s-o-7+e,u;a<1?(u=r-1,a+=ne(u)):a>l?(u=r+1,a-=ne(r)):u=r;let{month:c,day:f}=Wn(u,a);return{year:u,month:c,day:f,...Ue(t)}}function Je(t){let{year:e,month:n,day:r}=t,i=Ln(e,n,r);return{year:e,ordinal:i,...Ue(t)}}function Bt(t){let{year:e,ordinal:n}=t,{month:r,day:i}=Wn(e,n);return{year:e,month:r,day:i,...Ue(t)}}function Pt(t,e){if(!y(t.localWeekday)||!y(t.localWeekNumber)||!y(t.localWeekYear)){if(!y(t.weekday)||!y(t.weekNumber)||!y(t.weekYear))throw new H("Cannot mix locale-based week fields with ISO-based week fields");return y(t.localWeekday)||(t.weekday=t.localWeekday),y(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),y(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function _r(t,e=4,n=1){let r=$e(t.weekYear),i=E(t.weekNumber,1,we(t.weekYear,e,n)),s=E(t.weekday,1,7);return r?i?s?!1:I("weekday",t.weekday):I("week",t.weekNumber):I("weekYear",t.weekYear)}function Gr(t){let e=$e(t.year),n=E(t.ordinal,1,ne(t.year));return e?n?!1:I("ordinal",t.ordinal):I("year",t.year)}function Vn(t){let e=$e(t.year),n=E(t.month,1,12),r=E(t.day,1,We(t.year,t.month));return e?n?r?!1:I("day",t.day):I("month",t.month):I("year",t.year)}function Rn(t){let{hour:e,minute:n,second:r,millisecond:i}=t,s=E(e,0,23)||e===24&&n===0&&r===0&&i===0,o=E(n,0,59),l=E(r,0,59),a=E(i,0,999);return s?o?l?a?!1:I("millisecond",i):I("second",r):I("minute",n):I("hour",e)}function y(t){return typeof t>"u"}function B(t){return typeof t=="number"}function $e(t){return typeof t=="number"&&t%1===0}function jr(t){return typeof t=="string"}function Jr(t){return Object.prototype.toString.call(t)==="[object Date]"}function $n(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function zn(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function Xr(t){return Array.isArray(t)?t:[t]}function _t(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{let s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function Qr(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function se(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function wt(t){if(t==null)return null;if(typeof t!="object")throw new x("Week settings must be an object");if(!E(t.firstDay,1,7)||!E(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!E(e,1,7)))throw new x("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function E(t,e,n){return $e(t)&&t>=e&&t<=n}function Kr(t,e){return t-e*Math.floor(t/e)}function S(t,e=2){let n=t<0,r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Y(t){if(!(y(t)||t===null||t===""))return parseInt(t,10)}function _(t){if(!(y(t)||t===null||t===""))return parseFloat(t)}function xt(t){if(!(y(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function Ot(t,e,n="round"){let r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function pe(t){return t%4===0&&(t%100!==0||t%400===0)}function ne(t){return pe(t)?366:365}function We(t,e){let n=Kr(e-1,12)+1,r=t+(e-n)/12;return n===2?pe(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ze(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function Gt(t,e,n){return-St(kt(t,1,e),n)+e-1}function we(t,e=4,n=1){let r=Gt(t,e,n),i=Gt(t+1,e,n);return(ne(t)-r+i)/7}function pt(t){return t>99?t:t>k.twoDigitCutoffYear?1900+t:2e3+t}function Zn(t,e,n,r=null){let i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);let o={timeZoneName:e,...s},l=new Intl.DateTimeFormat(n,o).formatToParts(i).find(a=>a.type.toLowerCase()==="timezonename");return l?l.value:null}function Ze(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);let r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Un(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new x(`Invalid unit value ${t}`);return e}function Ve(t,e){let n={};for(let r in t)if(se(t,r)){let i=t[r];if(i==null)continue;n[e(r)]=Un(i)}return n}function ge(t,e){let n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${S(n,2)}:${S(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${S(n,2)}${S(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ue(t){return Qr(t,["hour","minute","second","millisecond"])}var ei=["January","February","March","April","May","June","July","August","September","October","November","December"],Yn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ti=["J","F","M","A","M","J","J","A","S","O","N","D"];function qn(t){switch(t){case"narrow":return[...ti];case"short":return[...Yn];case"long":return[...ei];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}}var Hn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Bn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ni=["M","T","W","T","F","S","S"];function Pn(t){switch(t){case"narrow":return[...ni];case"short":return[...Bn];case"long":return[...Hn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var _n=["AM","PM"],ri=["Before Christ","Anno Domini"],ii=["BC","AD"],si=["B","A"];function Gn(t){switch(t){case"narrow":return[...si];case"short":return[...ii];case"long":return[...ri];default:return null}}function oi(t){return _n[t.hour<12?0:1]}function ai(t,e){return Pn(e)[t.weekday-1]}function li(t,e){return qn(e)[t.month-1]}function ui(t,e){return Gn(e)[t.year<0?0:1]}function ci(t,e,n="always",r=!1){let i={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."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){let f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${i[t][0]}`;case-1:return f?"yesterday":`last ${i[t][0]}`;case 0:return f?"today":`this ${i[t][0]}`}}let o=Object.is(e,-0)||e<0,l=Math.abs(e),a=l===1,u=i[t],c=r?a?u[1]:u[2]||u[1]:a?i[t][0]:t;return o?`${l} ${c} ago`:`in ${l} ${c}`}function jt(t,e){let n="";for(let r of t)r.literal?n+=r.val:n+=e(r.val);return n}var fi={D:Fe,DD:fn,DDD:mn,DDDD:hn,t:dn,tt:yn,ttt:gn,tttt:wn,T:pn,TT:bn,TTT:Tn,TTTT:kn,f:Sn,ff:On,fff:Dn,ffff:vn,F:xn,FF:Nn,FFF:Mn,FFFF:Cn},D=class t{static create(e,n={}){return new t(e,n)}static parseFormat(e){let n=null,r="",i=!1,s=[];for(let o=0;o<e.length;o++){let l=e.charAt(o);l==="'"?((r.length>0||i)&&s.push({literal:i||/^\s+$/.test(r),val:r===""?"'":r}),n=null,r="",i=!i):i||l===n?r+=l:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return fi[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,r=void 0){if(this.opts.forceSimple)return S(e,n);let i={...this.opts};return n>0&&(i.padTo=n),r&&(i.signDisplay=r),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){let r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(m,g)=>this.loc.extract(e,m,g),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",l=()=>r?oi(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,g)=>r?li(e,m):s(g?{month:m}:{month:m,day:"numeric"},"month"),u=(m,g)=>r?ai(e,m):s(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),c=m=>{let g=t.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(e,g):m},f=m=>r?ui(e,m):s({era:m},"era"),d=m=>{switch(m){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 o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({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 l();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("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 c(m)}};return jt(t.parseFormat(n),d)}formatDurationFromString(e,n){let r=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[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}},s=(c,f)=>d=>{let m=i(d);if(m){let g=f.isNegativeDuration&&m!==f.largestUnit?r:1,p;return this.opts.signMode==="negativeLargestOnly"&&m!==f.largestUnit?p="never":this.opts.signMode==="all"?p="always":p="auto",this.num(c.get(m)*g,d.length,p)}else return d},o=t.parseFormat(n),l=o.reduce((c,{literal:f,val:d})=>f?c:c.concat(d),[]),a=e.shiftTo(...l.map(i).filter(c=>c)),u={isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]};return jt(o,s(a,u))}},jn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function oe(...t){let e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function ae(...t){return e=>t.reduce(([n,r,i],s)=>{let[o,l,a]=s(e,i);return[{...n,...o},l||r,a]},[{},null,1]).slice(0,2)}function le(t,...e){if(t==null)return[null,null];for(let[n,r]of e){let i=n.exec(t);if(i)return r(i)}return[null,null]}function Jn(...t){return(e,n)=>{let r={},i;for(i=0;i<t.length;i++)r[t[i]]=Y(e[n+i]);return[r,null,n+i]}}var Xn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,mi=`(?:${Xn.source}?(?:\\[(${jn.source})\\])?)?`,Nt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Qn=RegExp(`${Nt.source}${mi}`),Dt=RegExp(`(?:[Tt]${Qn.source})?`),hi=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,di=/(\d{4})-?W(\d\d)(?:-?(\d))?/,yi=/(\d{4})-?(\d{3})/,gi=Jn("weekYear","weekNumber","weekDay"),wi=Jn("year","ordinal"),pi=/(\d{4})-(\d\d)-(\d\d)/,Kn=RegExp(`${Nt.source} ?(?:${Xn.source}|(${jn.source}))?`),bi=RegExp(`(?: ${Kn.source})?`);function re(t,e,n){let r=t[e];return y(r)?n:Y(r)}function Ti(t,e){return[{year:re(t,e),month:re(t,e+1,1),day:re(t,e+2,1)},null,e+3]}function ue(t,e){return[{hours:re(t,e,0),minutes:re(t,e+1,0),seconds:re(t,e+2,0),milliseconds:xt(t[e+3])},null,e+4]}function be(t,e){let n=!t[e]&&!t[e+1],r=Ze(t[e+1],t[e+2]),i=n?null:F.instance(r);return[{},i,e+3]}function Te(t,e){let n=t[e]?P.create(t[e]):null;return[{},n,e+1]}var ki=RegExp(`^T?${Nt.source}$`),Si=/^-?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 xi(t){let[e,n,r,i,s,o,l,a,u]=t,c=e[0]==="-",f=a&&a[0]==="-",d=(m,g=!1)=>m!==void 0&&(g||m&&c)?-m:m;return[{years:d(_(n)),months:d(_(r)),weeks:d(_(i)),days:d(_(s)),hours:d(_(o)),minutes:d(_(l)),seconds:d(_(a),a==="-0"),milliseconds:d(xt(u),f)}]}var Oi={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Mt(t,e,n,r,i,s,o){let l={year:e.length===2?pt(Y(e)):Y(e),month:Yn.indexOf(n)+1,day:Y(r),hour:Y(i),minute:Y(s)};return o&&(l.second=Y(o)),t&&(l.weekday=t.length>3?Hn.indexOf(t)+1:Bn.indexOf(t)+1),l}var Ni=/^(?:(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 Di(t){let[,e,n,r,i,s,o,l,a,u,c,f]=t,d=Mt(e,i,r,n,s,o,l),m;return a?m=Oi[a]:u?m=0:m=Ze(c,f),[d,new F(m)]}function Mi(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var vi=/^(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$/,Ci=/^(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$/,Ii=/^(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 Jt(t){let[,e,n,r,i,s,o,l]=t;return[Mt(e,i,r,n,s,o,l),F.utcInstance]}function Ei(t){let[,e,n,r,i,s,o,l]=t;return[Mt(e,l,n,r,i,s,o),F.utcInstance]}var Fi=oe(hi,Dt),Ai=oe(di,Dt),Li=oe(yi,Dt),Wi=oe(Qn),er=ae(Ti,ue,be,Te),Vi=ae(gi,ue,be,Te),Ri=ae(wi,ue,be,Te),$i=ae(ue,be,Te);function zi(t){return le(t,[Fi,er],[Ai,Vi],[Li,Ri],[Wi,$i])}function Zi(t){return le(Mi(t),[Ni,Di])}function Ui(t){return le(t,[vi,Jt],[Ci,Jt],[Ii,Ei])}function Yi(t){return le(t,[Si,xi])}var qi=ae(ue);function Hi(t){return le(t,[ki,qi])}var Bi=oe(pi,bi),Pi=oe(Kn),_i=ae(ue,be,Te);function Gi(t){return le(t,[Bi,er],[Pi,_i])}var Xt="Invalid Duration",tr={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}},ji={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},...tr},C=146097/400,Q=146097/4800,Ji={years:{quarters:4,months:12,weeks:C/7,days:C,hours:C*24,minutes:C*24*60,seconds:C*24*60*60,milliseconds:C*24*60*60*1e3},quarters:{months:3,weeks:C/28,days:C/4,hours:C*24/4,minutes:C*24*60/4,seconds:C*24*60*60/4,milliseconds:C*24*60*60*1e3/4},months:{weeks:Q/7,days:Q,hours:Q*24,minutes:Q*24*60,seconds:Q*24*60*60,milliseconds:Q*24*60*60*1e3},...tr},j=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Xi=j.slice(0).reverse();function Z(t,e,n=!1){let r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new O(r)}function nr(t,e){let n=e.milliseconds??0;for(let r of Xi.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function Qt(t,e){let n=nr(t,e)<0?-1:1;j.reduceRight((r,i)=>{if(y(e[i]))return r;if(r){let s=e[r]*n,o=t[i][r],l=Math.floor(s/o);e[i]+=l*n,e[r]-=l*o*n}return i},null),j.reduce((r,i)=>{if(y(e[i]))return r;if(r){let s=e[r]%1;e[r]-=s,e[i]+=s*t[r][i]}return i},null)}function Kt(t){let e={};for(let[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}var O=class t{constructor(e){let n=e.conversionAccuracy==="longterm"||!1,r=n?Ji:ji;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||b.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return t.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new x(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:Ve(e,t.normalizeUnit),loc:b.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(B(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new x(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){let[r]=Yi(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){let[r]=Hi(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the Duration is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new it(r);return new t({invalid:r})}static normalizeUnit(e){let n={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(!n)throw new Ee(e);return n}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,n={}){let r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?D.create(this.loc,r).formatDurationFromString(this,e):Xt}toHuman(e={}){if(!this.isValid)return Xt;let n=e.showZeros!==!1,r=j.map(i=>{let s=this.values[i];return y(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}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+=Ot(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},T.fromMillis(n,{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?nr(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e),r={};for(let i of j)(se(n.values,i)||se(this.values,i))&&(r[i]=n.get(i)+this.get(i));return Z(this,{values:r},!0)}minus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let n={};for(let r of Object.keys(this.values))n[r]=Un(e(this.values[r],r));return Z(this,{values:n},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let n={...this.values,...Ve(e,t.normalizeUnit)};return Z(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){let o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return Z(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return Qt(this.matrix,e),Z(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=Kt(this.normalize().shiftToAll().toObject());return Z(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>t.normalizeUnit(o));let n={},r={},i=this.toObject(),s;for(let o of j)if(e.indexOf(o)>=0){s=o;let l=0;for(let u in r)l+=this.matrix[u][o]*r[u],r[u]=0;B(i[o])&&(l+=i[o]);let a=Math.trunc(l);n[o]=a,r[o]=(l*1e3-a*1e3)/1e3}else B(i[o])&&(r[o]=i[o]);for(let o in r)r[o]!==0&&(n[s]+=o===s?r[o]:r[o]/this.matrix[s][o]);return Qt(this.matrix,n),Z(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Z(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=Kt(this.values);return Z(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 n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(let r of j)if(!n(this.values[r],e.values[r]))return!1;return!0}},K="Invalid Interval";function Qi(t,e){return!t||!t.isValid?ie.invalid("missing or invalid start"):!e||!e.isValid?ie.invalid("missing or invalid end"):e<t?ie.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var ie=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the Interval is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new rt(r);return new t({invalid:r})}static fromDateTimes(e,n){let r=me(e),i=me(n),s=Qi(r,i);return s??new t({start:r,end:i})}static after(e,n){let r=O.fromDurationLike(n),i=me(e);return t.fromDateTimes(i,i.plus(r))}static before(e,n){let r=O.fromDurationLike(n),i=me(e);return t.fromDateTimes(i.minus(r),i)}static fromISO(e,n){let[r,i]=(e||"").split("/",2);if(r&&i){let s,o;try{s=T.fromISO(r,n),o=s.isValid}catch{o=!1}let l,a;try{l=T.fromISO(i,n),a=l.isValid}catch{a=!1}if(o&&a)return t.fromDateTimes(s,l);if(o){let u=O.fromISO(i,n);if(u.isValid)return t.after(s,u)}else if(a){let u=O.fromISO(r,n);if(u.isValid)return t.before(l,u)}}return t.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",n){if(!this.isValid)return NaN;let r=this.start.startOf(e,n),i;return n?.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.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:n}={}){return this.isValid?t.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];let n=e.map(me).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),r=[],{s:i}=this,s=0;for(;i<this.e;){let o=n[s]||this.e,l=+o>+this.e?this.e:o;r.push(t.fromDateTimes(i,l)),i=l,s+=1}return r}splitBy(e){let n=O.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s,o=[];for(;r<this.e;){let l=this.start.plus(n.mapUnits(a=>a*i));s=+l>+this.e?this.e:l,o.push(t.fromDateTimes(r,s)),r=s,i+=1}return o}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;let n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;let n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)}static merge(e){let[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0,i=[],s=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...s),l=o.sort((a,u)=>a.time-u.time);for(let a of l)r+=a.type==="s"?1:-1,r===1?n=a.time:(n&&+n!=+a.time&&i.push(t.fromDateTimes(n,a.time)),n=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:K}[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=Fe,n={}){return this.isValid?D.create(this.s.loc.clone(n),e).formatInterval(this):K}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:K}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:K}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:K}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:K}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):O.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},te=class{static hasDST(e=k.defaultZone){let n=T.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return P.isValidZone(e)}static normalizeZone(e){return q(e,k.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||b.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||b.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||b.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||b.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return b.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return b.create(n,null,"gregory").eras(e)}static features(){return{relative:$n(),localeWeek:zn()}}};function en(t,e){let n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(O.fromMillis(r).as("days"))}function Ki(t,e,n){let r=[["years",(a,u)=>u.year-a.year],["quarters",(a,u)=>u.quarter-a.quarter+(u.year-a.year)*4],["months",(a,u)=>u.month-a.month+(u.year-a.year)*12],["weeks",(a,u)=>{let c=en(a,u);return(c-c%7)/7}],["days",en]],i={},s=t,o,l;for(let[a,u]of r)n.indexOf(a)>=0&&(o=a,i[a]=u(t,e),l=s.plus(i),l>e?(i[a]--,t=s.plus(i),t>e&&(l=t,i[a]--,t=s.plus(i))):t=l);return[t,i,l,o]}function es(t,e,n,r){let[i,s,o,l]=Ki(t,e,n),a=e-i,u=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);u.length===0&&(o<e&&(o=i.plus({[l]:1})),o!==i&&(s[l]=(s[l]||0)+a/(o-i)));let c=O.fromObject(s,r);return u.length>0?O.fromMillis(a,r).shiftTo(...u).plus(c):c}var ts="missing Intl.DateTimeFormat.formatToParts support";function w(t,e=n=>n){return{regex:t,deser:([n])=>e(Br(n))}}var ns="\xA0",rr=`[ ${ns}]`,ir=new RegExp(rr,"g");function rs(t){return t.replace(/\./g,"\\.?").replace(ir,rr)}function tn(t){return t.replace(/\./g,"").replace(ir," ").toLowerCase()}function W(t,e){return t===null?null:{regex:RegExp(t.map(rs).join("|")),deser:([n])=>t.findIndex(r=>tn(n)===tn(r))+e}}function nn(t,e){return{regex:t,deser:([,n,r])=>Ze(n,r),groups:e}}function Ne(t){return{regex:t,deser:([e])=>e}}function is(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function ss(t,e){let n=L(e),r=L(e,"{2}"),i=L(e,"{3}"),s=L(e,"{4}"),o=L(e,"{6}"),l=L(e,"{1,2}"),a=L(e,"{1,3}"),u=L(e,"{1,6}"),c=L(e,"{1,9}"),f=L(e,"{2,4}"),d=L(e,"{4,6}"),m=N=>({regex:RegExp(is(N.val)),deser:([A])=>A,literal:!0}),p=(N=>{if(t.literal)return m(N);switch(N.val){case"G":return W(e.eras("short"),0);case"GG":return W(e.eras("long"),0);case"y":return w(u);case"yy":return w(f,pt);case"yyyy":return w(s);case"yyyyy":return w(d);case"yyyyyy":return w(o);case"M":return w(l);case"MM":return w(r);case"MMM":return W(e.months("short",!0),1);case"MMMM":return W(e.months("long",!0),1);case"L":return w(l);case"LL":return w(r);case"LLL":return W(e.months("short",!1),1);case"LLLL":return W(e.months("long",!1),1);case"d":return w(l);case"dd":return w(r);case"o":return w(a);case"ooo":return w(i);case"HH":return w(r);case"H":return w(l);case"hh":return w(r);case"h":return w(l);case"mm":return w(r);case"m":return w(l);case"q":return w(l);case"qq":return w(r);case"s":return w(l);case"ss":return w(r);case"S":return w(a);case"SSS":return w(i);case"u":return Ne(c);case"uu":return Ne(l);case"uuu":return w(n);case"a":return W(e.meridiems(),0);case"kkkk":return w(s);case"kk":return w(f,pt);case"W":return w(l);case"WW":return w(r);case"E":case"c":return w(n);case"EEE":return W(e.weekdays("short",!1),1);case"EEEE":return W(e.weekdays("long",!1),1);case"ccc":return W(e.weekdays("short",!0),1);case"cccc":return W(e.weekdays("long",!0),1);case"Z":case"ZZ":return nn(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return nn(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Ne(/[a-z_+-/]{1,256}?/i);case" ":return Ne(/[^\S\n\r]/);default:return m(N)}})(t)||{invalidReason:ts};return p.token=t,p}var os={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function as(t,e,n){let{type:r,value:i}=t;if(r==="literal"){let a=/^\s+$/.test(i);return{literal:!a,val:a?" ":i}}let s=e[r],o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let l=os[o];if(typeof l=="object"&&(l=l[s]),l)return{literal:!1,val:l}}function ls(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function us(t,e,n){let r=t.match(e);if(r){let i={},s=1;for(let o in n)if(se(n,o)){let l=n[o],a=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(r.slice(s,s+a))),s+=a}return[r,i]}else return[r,{}]}function cs(t){let e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},n=null,r;return y(t.z)||(n=P.create(t.z)),y(t.Z)||(n||(n=new F(t.Z)),r=t.Z),y(t.q)||(t.M=(t.q-1)*3+1),y(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),y(t.u)||(t.S=xt(t.u)),[Object.keys(t).reduce((s,o)=>{let l=e(o);return l&&(s[l]=t[o]),s},{}),n,r]}var Xe=null;function fs(){return Xe||(Xe=T.fromMillis(1555555555555)),Xe}function ms(t,e){if(t.literal)return t;let n=D.macroTokenToFormatOpts(t.val),r=ar(n,e);return r==null||r.includes(void 0)?t:r}function sr(t,e){return Array.prototype.concat(...t.map(n=>ms(n,e)))}var Re=class{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=sr(D.parseFormat(n),e),this.units=this.tokens.map(r=>ss(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){let[r,i]=ls(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[n,r]=us(e,this.regex,this.handlers),[i,s,o]=r?cs(r):[null,null,void 0];if(se(r,"a")&&se(r,"H"))throw new H("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:s,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function or(t,e,n){return new Re(t,n).explainFromTokens(e)}function hs(t,e,n){let{result:r,zone:i,specificOffset:s,invalidReason:o}=or(t,e,n);return[r,i,s,o]}function ar(t,e){if(!t)return null;let r=D.create(e,t).dtFormatter(fs()),i=r.formatToParts(),s=r.resolvedOptions();return i.map(o=>as(o,t,s))}var Qe="Invalid DateTime",rn=864e13;function de(t){return new M("unsupported zone",`the zone "${t.name}" is not supported`)}function Ke(t){return t.weekData===null&&(t.weekData=Le(t.c)),t.weekData}function et(t){return t.localWeekData===null&&(t.localWeekData=Le(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function G(t,e){let n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new T({...n,...e,old:n})}function lr(t,e,n){let r=t-e*60*1e3,i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;let s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function De(t,e){t+=e*60*1e3;let n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ve(t,e,n){return lr(ze(t),e,n)}function sn(t,e){let n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,We(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=O.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=ze(s),[a,u]=lr(l,n,t.zone);return o!==0&&(a+=o,u=t.zone.offset(a)),{ts:a,o:u}}function ee(t,e,n,r,i,s){let{setZone:o,zone:l}=n;if(t&&Object.keys(t).length!==0||e){let a=e||l,u=T.fromObject(t,{...n,zone:a,specificOffset:s});return o?u:u.setZone(l)}else return T.invalid(new M("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Me(t,e,n=!0){return t.isValid?D.create(b.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function tt(t,e,n){let r=t.c.year>9999||t.c.year<0,i="";if(r&&t.c.year>=0&&(i+="+"),i+=S(t.c.year,r?6:4),n==="year")return i;if(e){if(i+="-",i+=S(t.c.month),n==="month")return i;i+="-"}else if(i+=S(t.c.month),n==="month")return i;return i+=S(t.c.day),i}function on(t,e,n,r,i,s,o){let l=!n||t.c.millisecond!==0||t.c.second!==0,a="";switch(o){case"day":case"month":case"year":break;default:if(a+=S(t.c.hour),o==="hour")break;if(e){if(a+=":",a+=S(t.c.minute),o==="minute")break;l&&(a+=":",a+=S(t.c.second))}else{if(a+=S(t.c.minute),o==="minute")break;l&&(a+=S(t.c.second))}if(o==="second")break;l&&(!r||t.c.millisecond!==0)&&(a+=".",a+=S(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!s?a+="Z":t.o<0?(a+="-",a+=S(Math.trunc(-t.o/60)),a+=":",a+=S(Math.trunc(-t.o%60))):(a+="+",a+=S(Math.trunc(t.o/60)),a+=":",a+=S(Math.trunc(t.o%60)))),s&&(a+="["+t.zone.ianaName+"]"),a}var ur={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ds={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ys={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ce=["year","month","day","hour","minute","second","millisecond"],gs=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ws=["year","ordinal","hour","minute","second","millisecond"];function Ie(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Ee(t);return e}function an(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ie(t)}}function ps(t){if(ye===void 0&&(ye=k.now()),t.type!=="iana")return t.offset(ye);let e=t.name,n=bt.get(e);return n===void 0&&(n=t.offset(ye),bt.set(e,n)),n}function ln(t,e){let n=q(e.zone,k.defaultZone);if(!n.isValid)return T.invalid(de(n));let r=b.fromObject(e),i,s;if(y(t.year))i=k.now();else{for(let a of Ce)y(t[a])&&(t[a]=ur[a]);let o=Vn(t)||Rn(t);if(o)return T.invalid(o);let l=ps(n);[i,s]=ve(t,l,n)}return new T({ts:i,zone:n,loc:r,o:s})}function un(t,e,n){let r=y(n.round)?!0:n.round,i=y(n.rounding)?"trunc":n.rounding,s=(l,a)=>(l=Ot(l,r||n.calendary?0:2,n.calendary?"round":i),e.loc.clone(n).relFormatter(n).format(l,a)),o=l=>n.calendary?e.hasSame(t,l)?0:e.startOf(l).diff(t.startOf(l),l).get(l):e.diff(t,l).get(l);if(n.unit)return s(o(n.unit),n.unit);for(let l of n.units){let a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(t>e?-0:0,n.units[n.units.length-1])}function cn(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}var ye,bt=new Map,T=class t{constructor(e){let n=e.zone||k.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new M("invalid input"):null)||(n.isValid?null:de(n));this.ts=y(e.ts)?k.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{let l=B(e.o)&&!e.old?e.o:n.offset(this.ts);i=De(this.ts,l),r=Number.isNaN(i.year)?new M("invalid input"):null,i=r?null:i,s=r?null:l}this._zone=n,this.loc=e.loc||b.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,n]=cn(arguments),[r,i,s,o,l,a,u]=n;return ln({year:r,month:i,day:s,hour:o,minute:l,second:a,millisecond:u},e)}static utc(){let[e,n]=cn(arguments),[r,i,s,o,l,a,u]=n;return e.zone=F.utcInstance,ln({year:r,month:i,day:s,hour:o,minute:l,second:a,millisecond:u},e)}static fromJSDate(e,n={}){let r=Jr(e)?e.valueOf():NaN;if(Number.isNaN(r))return t.invalid("invalid input");let i=q(n.zone,k.defaultZone);return i.isValid?new t({ts:r,zone:i,loc:b.fromObject(n)}):t.invalid(de(i))}static fromMillis(e,n={}){if(B(e))return e<-rn||e>rn?t.invalid("Timestamp out of range"):new t({ts:e,zone:q(n.zone,k.defaultZone),loc:b.fromObject(n)});throw new x(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(B(e))return new t({ts:e*1e3,zone:q(n.zone,k.defaultZone),loc:b.fromObject(n)});throw new x("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};let r=q(n.zone,k.defaultZone);if(!r.isValid)return t.invalid(de(r));let i=b.fromObject(n),s=Ve(e,an),{minDaysInFirstWeek:o,startOfWeek:l}=Pt(s,i),a=k.now(),u=y(n.specificOffset)?r.offset(a):n.specificOffset,c=!y(s.ordinal),f=!y(s.year),d=!y(s.month)||!y(s.day),m=f||d,g=s.weekYear||s.weekNumber;if((m||c)&&g)throw new H("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new H("Can't mix ordinal dates with month/day");let p=g||s.weekday&&!m,N,A,R=De(a,u);p?(N=gs,A=ds,R=Le(R,o,l)):c?(N=ws,A=ys,R=Je(R)):(N=Ce,A=ur);let $=!1;for(let fe of N){let kr=s[fe];y(kr)?$?s[fe]=A[fe]:s[fe]=R[fe]:$=!0}let wr=p?_r(s,o,l):c?Gr(s):Vn(s),At=wr||Rn(s);if(At)return t.invalid(At);let pr=p?Ht(s,o,l):c?Bt(s):s,[br,Tr]=ve(pr,u,r),ce=new t({ts:br,zone:r,o:Tr,loc:i});return s.weekday&&m&&e.weekday!==ce.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${ce.toISO()}`):ce.isValid?ce:t.invalid(ce.invalid)}static fromISO(e,n={}){let[r,i]=zi(e);return ee(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){let[r,i]=Zi(e);return ee(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){let[r,i]=Ui(e);return ee(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(y(e)||y(n))throw new x("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[l,a,u,c]=hs(o,e,n);return c?t.invalid(c):ee(l,a,r,`format ${n}`,e,u)}static fromString(e,n,r={}){return t.fromFormat(e,n,r)}static fromSQL(e,n={}){let[r,i]=Gi(e);return ee(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the DateTime is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new nt(r);return new t({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){let r=ar(e,b.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return sr(D.parseFormat(e),b.fromObject(n)).map(i=>i.val).join("")}static resetCache(){ye=void 0,bt.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Ke(this).weekYear:NaN}get weekNumber(){return this.isValid?Ke(this).weekNumber:NaN}get weekday(){return this.isValid?Ke(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?et(this).weekday:NaN}get localWeekNumber(){return this.isValid?et(this).weekNumber:NaN}get localWeekYear(){return this.isValid?et(this).weekYear:NaN}get ordinal(){return this.isValid?Je(this.c).ordinal:NaN}get monthShort(){return this.isValid?te.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?te.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?te.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?te.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,n=6e4,r=ze(this.c),i=this.zone.offset(r-e),s=this.zone.offset(r+e),o=this.zone.offset(r-i*n),l=this.zone.offset(r-s*n);if(o===l)return[this];let a=r-o*n,u=r-l*n,c=De(a,o),f=De(u,l);return c.hour===f.hour&&c.minute===f.minute&&c.second===f.second&&c.millisecond===f.millisecond?[G(this,{ts:a}),G(this,{ts:u})]:[this]}get isInLeapYear(){return pe(this.year)}get daysInMonth(){return We(this.year,this.month)}get daysInYear(){return this.isValid?ne(this.year):NaN}get weeksInWeekYear(){return this.isValid?we(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?we(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:n,numberingSystem:r,calendar:i}=D.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(F.instance(e),n)}toLocal(){return this.setZone(k.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=q(e,k.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){let s=e.offset(this.ts),o=this.toObject();[i]=ve(o,s,e)}return G(this,{ts:i,zone:e})}else return t.invalid(de(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){let i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return G(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let n=Ve(e,an),{minDaysInFirstWeek:r,startOfWeek:i}=Pt(n,this.loc),s=!y(n.weekYear)||!y(n.weekNumber)||!y(n.weekday),o=!y(n.ordinal),l=!y(n.year),a=!y(n.month)||!y(n.day),u=l||a,c=n.weekYear||n.weekNumber;if((u||o)&&c)throw new H("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&o)throw new H("Can't mix ordinal dates with month/day");let f;s?f=Ht({...Le(this.c,r,i),...n},r,i):y(n.ordinal)?(f={...this.toObject(),...n},y(n.day)&&(f.day=Math.min(We(f.year,f.month),f.day))):f=Bt({...Je(this.c),...n});let[d,m]=ve(f,this.o,this.zone);return G(this,{ts:d,o:m})}plus(e){if(!this.isValid)return this;let n=O.fromDurationLike(e);return G(this,sn(this,n))}minus(e){if(!this.isValid)return this;let n=O.fromDurationLike(e).negate();return G(this,sn(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;let r={},i=O.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){let s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if(i==="quarters"){let s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?D.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Qe}toLocaleString(e=Fe,n={}){return this.isValid?D.create(this.loc.clone(n),e).formatDateTime(this):Qe}toLocaleParts(e={}){return this.isValid?D.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1,precision:o="milliseconds"}={}){if(!this.isValid)return null;o=Ie(o);let l=e==="extended",a=tt(this,l,o);return Ce.indexOf(o)>=3&&(a+="T"),a+=on(this,l,n,r,i,s,o),a}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?tt(this,e==="extended",Ie(n)):null}toISOWeekDate(){return Me(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:o="extended",precision:l="milliseconds"}={}){return this.isValid?(l=Ie(l),(i&&Ce.indexOf(l)>=3?"T":"")+on(this,o==="extended",n,e,r,s,l)):null}toRFC2822(){return Me(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Me(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?tt(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),Me(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Qe}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return O.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=Xr(n).map(O.normalizeUnit),o=e.valueOf()>this.valueOf(),l=o?this:e,a=o?e:this,u=es(l,a,s,i);return o?u.negate():u}diffNow(e="milliseconds",n={}){return this.diff(t.now(),e,n)}until(e){return this.isValid?ie.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;let i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(n,r)<=i&&i<=s.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),un(n,this.plus(r),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?un(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new x("min requires all arguments be DateTimes");return _t(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new x("max requires all arguments be DateTimes");return _t(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return or(o,e,n)}static fromStringExplain(e,n,r={}){return t.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){let{locale:r=null,numberingSystem:i=null}=n,s=b.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Re(s,e)}static fromFormatParser(e,n,r={}){if(y(e)||y(n))throw new x("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new x(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:l,zone:a,specificOffset:u,invalidReason:c}=n.explainFromTokens(e);return c?t.invalid(c):ee(l,a,r,`format ${n.format}`,e,u)}static get DATE_SHORT(){return Fe}static get DATE_MED(){return fn}static get DATE_MED_WITH_WEEKDAY(){return vr}static get DATE_FULL(){return mn}static get DATE_HUGE(){return hn}static get TIME_SIMPLE(){return dn}static get TIME_WITH_SECONDS(){return yn}static get TIME_WITH_SHORT_OFFSET(){return gn}static get TIME_WITH_LONG_OFFSET(){return wn}static get TIME_24_SIMPLE(){return pn}static get TIME_24_WITH_SECONDS(){return bn}static get TIME_24_WITH_SHORT_OFFSET(){return Tn}static get TIME_24_WITH_LONG_OFFSET(){return kn}static get DATETIME_SHORT(){return Sn}static get DATETIME_SHORT_WITH_SECONDS(){return xn}static get DATETIME_MED(){return On}static get DATETIME_MED_WITH_SECONDS(){return Nn}static get DATETIME_MED_WITH_WEEKDAY(){return Cr}static get DATETIME_FULL(){return Dn}static get DATETIME_FULL_WITH_SECONDS(){return Mn}static get DATETIME_HUGE(){return vn}static get DATETIME_HUGE_WITH_SECONDS(){return Cn}};function me(t){if(T.isDateTime(t))return t;if(t&&t.valueOf&&B(t.valueOf()))return T.fromJSDate(t);if(t&&typeof t=="object")return T.fromObject(t);throw new x(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function X(t,e){return t.length?typeof t[0]=="number"?t:t.map(e??(n=>n.close)):[]}function Ye(t,e,n){let r=X(t,n),i=new Array(r.length),s=0,o=0;for(let l=0;l<r.length;l++){let a=r[l];if(isNaN(a)||(s+=a,o++),l>=e){let u=r[l-e];isNaN(u)||(s-=u,o--)}i[l]=o>=e?s/e:NaN}return i}function ke(t,e,n){let r=X(t,n),i=2/(e+1),s=new Array(r.length),o=NaN;for(let l=0;l<r.length;l++){let a=r[l];o=isNaN(o)?a:a*i+o*(1-i),s[l]=o}return s}function qe(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN),s=e*(e+1)/2;for(let o=e-1;o<r.length;o++){let l=0;for(let a=0;a<e;a++)l+=r[o-a]*(e-a);i[o]=l/s}return i}function bs(t,e,n){let r=X(t,n),i=Math.floor(e/2),s=Math.round(Math.sqrt(e)),o=qe(r,i),l=qe(r,e),a=r.map((u,c)=>2*o[c]-l[c]);return qe(a,s)}function He(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN),s=NaN;for(let o=0;o<r.length;o++){let l=r[o];if(isNaN(s)){if(o<e-1)continue;let a=0;for(let u=o-e+1;u<=o;u++)a+=r[u];s=a/e,i[o]=s}else s=(s*(e-1)+l)/e,i[o]=s}return i}function Ts(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN);for(let s=e-1;s<r.length;s++){let o=0,l=0,a=0,u=0;for(let d=0;d<e;d++){let m=d,g=r[s-(e-1-d)];o+=m,l+=g,a+=m*g,u+=m*m}let c=e,f=(c*a-o*l)/(c*u-o*o);i[s]=(l-f*o)/c+f*(e-1)}return i}function ks(t,e=14){let n=t.length;if(n===0)return[];let r=new Array(n),i=new Array(n);r[0]=0,i[0]=0;for(let a=1;a<n;a++){let u=t[a].close-t[a-1].close;r[a]=u>0?u:0,i[a]=u<0?-u:0}let s=He(r,e),o=He(i,e),l=new Array(n);for(let a=0;a<n;a++)l[a]=isNaN(s[a])?NaN:o[a]===0?100:100-100/(1+s[a]/o[a]);return l}function Ss(t,e=14,n=3,r=3){function i(c,f){let d=new Array(c.length).fill(NaN),m=0,g=0;for(let p=0;p<c.length;p++)isNaN(c[p])||(m+=c[p],g++),p>=f&&!isNaN(c[p-f])&&(m-=c[p-f],g--),d[p]=g>0?m/g:NaN;return d}let s=t.length,o=Se(t.map(c=>c.high),e),l=xe(t.map(c=>c.low),e),a=new Array(s).fill(NaN);for(let c=e-1;c<s;c++){let f=o[c],d=l[c];a[c]=f===d?50:(t[c].close-d)/(f-d)*100}let u=i(a,r);return{k:u,d:i(u,n)}}function xs(t,e=12,n=26,r=9){let i=ke(t,e),s=ke(t,n),o=t.length,l=new Array(o);for(let c=0;c<o;c++)l[c]=i[c]-s[c];let a=ke(l,r),u=new Array(o);for(let c=0;c<o;c++)u[c]=l[c]-a[c];return{macd:l,signal:a,histogram:u}}function vt(t,e=14){return He(cr(t),e)}function cr(t){let e=t.length,n=new Array(e);for(let r=0;r<e;r++){let i=t[r];if(r===0){n[r]=i.high-i.low;continue}let s=t[r-1].close;n[r]=Math.max(i.high-i.low,Math.abs(i.high-s),Math.abs(i.low-s))}return n}function fr(t,e){let n=Array.isArray(e)?e:new Array(t.length).fill(e);return t.map((r,i)=>i>0&&r>n[i]&&t[i-1]<=n[i-1])}function mr(t,e){let n=Array.isArray(e)?e:new Array(t.length).fill(e);return t.map((r,i)=>i>0&&r<n[i]&&t[i-1]>=n[i-1])}function Os(t,e){let n=fr(t,e),r=mr(t,e);return n.map((i,s)=>i||r[s])}function Ns(t,e=1){return t.map((n,r)=>{if(r<e)return!1;for(let i=1;i<=e;i++)if(t[r-i+1]<=t[r-i])return!1;return!0})}function Ds(t,e=1){return t.map((n,r)=>{if(r<e)return!1;for(let i=1;i<=e;i++)if(t[r-i+1]>=t[r-i])return!1;return!0})}function Ms(t,e=1){return t.map((n,r)=>r<e?NaN:n-t[r-e])}function vs(t){let e=NaN;return t.map((n,r)=>n?(e=r,0):isNaN(e)?NaN:r-e)}function Cs(t,e,n=0){let r=[];return t.map((i,s)=>{i&&r.push(s);let o=r.length-1-n;return o>=0?e[r[o]]:NaN})}function hr(t,e,n){let r=t.length,i=new Array(r).fill(NaN),s=new Array(r),o=0,l=0;for(let a=0;a<r;a++){let u=t[a];if(!isNaN(u)){for(;l>o;){let c=t[s[l-1]];if(n?c<=u:c>=u)l--;else break}s[l++]=a}for(;l>o&&s[o]<=a-e;)o++;a>=e-1&&(i[a]=l>o?t[s[o]]:n?-1/0:1/0)}return i}function Se(t,e){return hr(t,e,!0)}function xe(t,e){return hr(t,e,!1)}function Is(t,e=5,n=5){let r=t.length,i=new Array(r).fill(NaN);for(let s=e;s<r-n;s++){let o=t[s].high,l=!0;for(let a=s-e;a<=s+n;a++)if(a!==s&&t[a].high>=o){l=!1;break}l&&(i[s]=o)}return i}function Es(t,e=5,n=5){let r=t.length,i=new Array(r).fill(NaN);for(let s=e;s<r-n;s++){let o=t[s].low,l=!0;for(let a=s-e;a<=s+n;a++)if(a!==s&&t[a].low<=o){l=!1;break}l&&(i[s]=o)}return i}function dr(t,e=20,n=2,r=i=>i.close){let i=t.length,s=new Array(i).fill(NaN),o=new Array(i).fill(NaN),l=new Array(i).fill(NaN),a=new Array(i),u=0,c=0;for(let f=0;f<i;f++){let d=r(t[f]);if(a[f]=d,u+=d,c+=d*d,f>=e){let m=a[f-e];u-=m,c-=m*m}if(f>=e-1){let m=u/e,g=Math.sqrt(Math.max(0,c/e-m*m));s[f]=m,o[f]=m+n*g,l[f]=m-n*g}}return{upper:o,mid:s,lower:l}}function Fs(t,e=20,n=2){let{upper:r,mid:i,lower:s}=dr(t,e,n);return i.map((o,l)=>isNaN(o)||o===0?NaN:(r[l]-s[l])/o)}function As(t,e=20){let n=Se(t.map(i=>i.high),e),r=xe(t.map(i=>i.low),e);return{upper:n,mid:n.map((i,s)=>(i+r[s])/2),lower:r}}function Ls(t,e=20,n=10,r=1.5){let i=ke(t,e),s=vt(t,n);return{upper:i.map((o,l)=>o+r*s[l]),mid:i,lower:i.map((o,l)=>o-r*s[l])}}function Ws(t,e=0){let n=new Array(t.length).fill(NaN),r=864e5,i=0,s=0,o=NaN;for(let l=0;l<t.length;l++){let a=Number(t[l].ts/1000000n),u=Math.floor((a-e*36e5)/r);u!==o&&(i=0,s=0,o=u);let c=(t[l].high+t[l].low+t[l].close)/3;i+=c*t[l].volume,s+=t[l].volume,n[l]=s===0?NaN:i/s}return n}function Vs(t){let e=t.map(n=>(n.high+n.low)/2);return{jaw:Ye(e,13),teeth:Ye(e,8),lips:Ye(e,5)}}function yr(t,e,n){let r=X(t,n),i=r.length,s=new Array(i).fill(NaN),o=0,l=0;for(let a=0;a<i;a++)if(o+=r[a],l+=r[a]*r[a],a>=e&&(o-=r[a-e],l-=r[a-e]*r[a-e]),a>=e-1){let u=o/e;s[a]=Math.sqrt(Math.max(0,l/e-u*u))}return s}function Rs(t,e,n){return yr(t,e,n).map(r=>r*r)}function $s(t,e){function n(i,s){let o=new Array(i.length).fill(NaN),l=0,a=0;for(let u=0;u<i.length;u++)isNaN(i[u])||(l+=i[u],a++),u>=s&&!isNaN(i[u-s])&&(l-=i[u-s],a--),o[u]=a>0?l/a:NaN;return o}let r=n(t,e);return t.map((i,s)=>Math.abs(i-r[s]))}function zs(t,e,n){let r=new Array(t.length).fill(NaN),i=0,s=0;for(let o=0;o<t.length;o++){if(i+=t[o],s+=e[o],o>=n&&(i-=t[o-n],s-=e[o-n]),o<n-1)continue;let l=i/n,a=s/n,u=0,c=0,f=0;for(let m=o-n+1;m<=o;m++){let g=t[m]-l,p=e[m]-a;u+=g*p,c+=g*g,f+=p*p}let d=Math.sqrt(c*f);r[o]=d===0?0:u/d}return r}var Zs=Se,Us=xe;function Ys(t,e){let n=new Array(t.length).fill(NaN);for(let r=e-1;r<t.length;r++){let i=t.slice(r-e+1,r+1).sort((o,l)=>o-l),s=Math.floor(e/2);n[r]=e%2===0?(i[s-1]+i[s])/2:i[s]}return n}function qs(t,e){let n=[];for(let r=0;r<t.length&&r<e.length;r++)!isNaN(e[r])&&isFinite(e[r])&&n.push({t:t[r],price:e[r]});return n}function Hs(t){return t[t.length-1]}function Bs(t,e=0){return t==null||isNaN(t)?e:t}function Ps(t,e,n,r=[],i=!1){return{type:"line",pts:t,color:e,width:n,dash:r,connect:i}}function _s(t,e,n,r=[]){return{type:"hline",price:t,color:e,width:n,dash:r}}function Gs(t,e,n=0,r=.2){return{type:"histogram",pts:t,color:e,base:n,gap:r}}function js(t,e,n,r,i=12,s=!1,o="left",l="middle",a=!1,u=99999){return{type:"label",text:t,x:e,y:n,color:r,fontSize:i,bold:s,horzAlign:o,vertAlign:l,anchored:a,maxWidth:u}}function Js(t,e,n){return{type:"fill",pts1:t,pts2:e,opts:n}}function Xs(t,e,n,r,i={}){return{type:"rect",t1:t,t2:n,price1:e,price2:r,...i}}function Qs(t,e,n,r={}){return{type:"circle",t,price:e,radius:n,...r}}function Ks(t,e,n=1,r=[]){return{type:"vline",t,color:e,width:n,dash:r}}function eo(t,e,n,r,i=10,s="",o=""){return{type:"arrow",t,price:e,direction:n,color:r,size:i,label:s,labelColor:o||r}}function to(t,e,n,r,i,s=1,o=[],l="none"){return{type:"trendline",t1:t,price1:e,t2:n,price2:r,color:i,width:s,dash:o,extend:l}}function no(t,e,n,r="",i=1){return{type:"band",priceHigh:t,priceLow:e,fillColor:n,borderColor:r,borderWidth:i}}function ro(t,e={}){return{type:"polygon",pts:t,...e}}function io(t,e,n=3){return{type:"dots",pts:t,color:e,radius:n}}function so(t,e,n,r,i,s={}){return{type:"badge",t,price:e,text:n,textColor:r,bgColor:i,...s}}function oo(t){let e=new Array(t.length).fill(0);for(let n=1;n<t.length;n++){let r=t[n].close>t[n-1].close?t[n].volume:t[n].close<t[n-1].close?-t[n].volume:0;e[n]=e[n-1]+r}return e}function ao(t,e=14){let n=t.length,r=new Array(n).fill(NaN),i=t.map(u=>(u.high+u.low+u.close)/3),s=new Array(n).fill(0),o=new Array(n).fill(0);for(let u=1;u<n;u++){let c=i[u]*t[u].volume;i[u]>i[u-1]?s[u]=c:i[u]<i[u-1]&&(o[u]=c)}let l=0,a=0;for(let u=1;u<n;u++)l+=s[u],a+=o[u],u>e&&(l-=s[u-e],a-=o[u-e]),u>=e&&(r[u]=a===0?100:100-100/(1+l/a));return r}function lo(t,e=20){let n=t.length,r=new Array(n).fill(NaN),i=t.map(o=>(o.high+o.low+o.close)/3),s=0;for(let o=0;o<n;o++){if(s+=i[o],o>=e&&(s-=i[o-e]),o<e-1)continue;let l=s/e,a=0;for(let u=o-e+1;u<=o;u++)a+=Math.abs(i[u]-l);a/=e,r[o]=a===0?0:(i[o]-l)/(.015*a)}return r}function uo(t,e=14){let n=t.length,r=new Array(n).fill(NaN),i=Se(t.map(o=>o.high),e),s=xe(t.map(o=>o.low),e);for(let o=e-1;o<n;o++){let l=i[o],a=s[o];r[o]=l===a?-50:(l-t[o].close)/(l-a)*-100}return r}function co(t,e=10,n=3){let r=t.length,i=vt(t,e),s=new Array(r).fill(NaN),o=new Array(r).fill(NaN),l=new Array(r).fill(1),a=e;if(r<=a)return{trend:l,upper:s,lower:o};s[a]=(t[a].high+t[a].low)/2+n*i[a],o[a]=(t[a].high+t[a].low)/2-n*i[a];for(let u=a+1;u<r;u++){let c=(t[u].high+t[u].low)/2,f=c+n*i[u],d=c-n*i[u],m=t[u-1].close;s[u]=f<s[u-1]||m>s[u-1]?f:s[u-1],o[u]=d>o[u-1]||m<o[u-1]?d:o[u-1],l[u-1]===-1&&t[u].close>s[u-1]?l[u]=1:l[u-1]===1&&t[u].close<o[u-1]?l[u]=-1:l[u]=l[u-1]}return{trend:l,upper:s,lower:o}}function fo(t,e,n){if(t.length===0)return[];let r=[],i=new Array(t.length);for(let a=0;a<t.length;a++)i[a]=Number(t[a].ts/1000000n);let s=a=>{let u=0,c=i.length;for(;u<c;){let f=u+c>>>1;i[f]<a?u=f+1:c=f}return u},o=new Map,l=a=>{let u=o.get(a);if(u)return u;u=[];let c=-1/0;for(let f=0;f<i.length;f++){if(i[f]<c)continue;let d=T.fromMillis(i[f],{zone:a});u.push({year:d.year,month:d.month,day:d.day}),c=d.startOf("day").plus({days:1}).toMillis()}return o.set(a,u),u};for(let a of e){let u=a.tz??n?.tz??"UTC";for(let{year:c,month:f,day:d}of l(u)){let m=T.fromObject({year:c,month:f,day:d,hour:a.startHour,minute:a.startMinute,second:0,millisecond:0},{zone:u}),g=T.fromObject({year:c,month:f,day:d,hour:a.endHour,minute:a.endMinute,second:0,millisecond:0},{zone:u});g<=m&&(g=g.plus({days:1}));let p=m.toMillis(),N=g.toMillis(),A=-1/0,R=1/0;for(let $=s(p);$<i.length&&i[$]<N;$++)t[$].high>A&&(A=t[$].high),t[$].low<R&&(R=t[$].low);A===-1/0||R===1/0||r.push({startTs:BigInt(p)*1000000n,endTs:BigInt(N)*1000000n,high:A,low:R,label:a.label,color:a.color})}}return r.sort((a,u)=>a.startTs<u.startTs?-1:a.startTs>u.startTs?1:0),r}var Be={sma:Ye,ema:ke,wma:qe,hma:bs,rma:He,linreg:Ts,rsi:ks,stoch:Ss,macd:xs,atr:vt,tr:cr,crossover:fr,crossunder:mr,cross:Os,rising:Ns,falling:Ds,change:Ms,barssince:vs,valuewhen:Cs,highest:Se,lowest:xe,pivotHigh:Is,pivotLow:Es,bb:dr,bbw:Fs,donchian:As,keltner:Ls,vwap:Ws,alligator:Vs,stdev:yr,variance:Rs,dev:$s,correlation:zs,max:Zs,min:Us,median:Ys,toPoints:qs,last:Hs,nz:Bs,obv:oo,mfi:ao,cci:lo,williamsR:uo,supertrend:co,sessionBoundaries:fo,drawLine:Ps,drawHLine:_s,drawHistogram:Gs,drawLabel:js,fillBetween:Js,drawRect:Xs,drawCircle:Qs,drawVLine:Ks,drawArrow:eo,drawTrendLine:to,drawBand:no,drawPolygon:ro,drawDots:io,drawBadge:so};var Ct=Object.freeze({indicator:"indicator",drawing:"drawing",chartType:"chart-type",dataSource:"data-source",extension:"extension"}),It=Object.freeze({mbo:"l3",l3:"l3",l2:"l2",ohlcv:"ohlcv",tick:"tick"}),Et=Object.freeze({overlay:"overlay",pane:"pane"}),Ft={PluginType:Ct,DataLevel:It,Layout:Et};function gr(t){let e={...Ft,Math,console,plugin:t.plugin};for(let[n,r]of Object.entries(Be))e[n]=r;if(t.shadowNetwork&&(e.fetch=void 0,e.XMLHttpRequest=void 0,e.WebSocket=void 0,e.importScripts=void 0),t.extra)for(let[n,r]of Object.entries(t.extra))e[n]=r;return e}function mo(t,e){let n=gr(e),r=Object.keys(n);new Function(...r,`"use strict";
2
+ ${t}`)(...r.map(i=>n[i]))}var ho=(()=>{let t=Object.keys(Be).sort().join(","),e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(16).padStart(8,"0")})();0&&(module.exports={DataLevel,Layout,PluginType,SCRIPT_DSL,STDLIB,STDLIB_SIGNATURE,buildScriptScope,evalScriptInScope});
@@ -0,0 +1,2 @@
1
+ var U=class extends Error{},et=class extends U{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},tt=class extends U{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},nt=class extends U{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},H=class extends U{},Ee=class extends U{constructor(e){super(`Invalid unit ${e}`)}},x=class extends U{},z=class extends U{constructor(){super("Zone is an abstract class")}},h="numeric",V="short",v="long",Fe={year:h,month:h,day:h},on={year:h,month:V,day:h},Tr={year:h,month:V,day:h,weekday:V},an={year:h,month:v,day:h},ln={year:h,month:v,day:h,weekday:v},un={hour:h,minute:h},cn={hour:h,minute:h,second:h},fn={hour:h,minute:h,second:h,timeZoneName:V},mn={hour:h,minute:h,second:h,timeZoneName:v},hn={hour:h,minute:h,hourCycle:"h23"},dn={hour:h,minute:h,second:h,hourCycle:"h23"},yn={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:V},gn={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:v},wn={year:h,month:h,day:h,hour:h,minute:h},pn={year:h,month:h,day:h,hour:h,minute:h,second:h},bn={year:h,month:V,day:h,hour:h,minute:h},Tn={year:h,month:V,day:h,hour:h,minute:h,second:h},kr={year:h,month:V,day:h,weekday:V,hour:h,minute:h},kn={year:h,month:v,day:h,hour:h,minute:h,timeZoneName:V},Sn={year:h,month:v,day:h,hour:h,minute:h,second:h,timeZoneName:V},xn={year:h,month:v,day:h,weekday:v,hour:h,minute:h,timeZoneName:v},On={year:h,month:v,day:h,weekday:v,hour:h,minute:h,second:h,timeZoneName:v},J=class{get type(){throw new z}get name(){throw new z}get ianaName(){return this.name}get isUniversal(){throw new z}offsetName(e,n){throw new z}formatOffset(e,n){throw new z}offset(e){throw new z}equals(e){throw new z}get isValid(){throw new z}},Be=null,Ae=class t extends J{static get instance(){return Be===null&&(Be=new t),Be}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Wn(e,n,r)}formatOffset(e,n){return ge(this.offset(e),n)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},rt=new Map;function Sr(t){let e=rt.get(t);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:t,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),rt.set(t,e)),e}var xr={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Or(t,e){let n=t.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(n),[,i,s,o,l,a,u,c]=r;return[o,i,s,l,a,u,c]}function Nr(t,e){let n=t.formatToParts(e),r=[];for(let i=0;i<n.length;i++){let{type:s,value:o}=n[i],l=xr[s];s==="era"?r[l]=o:y(l)||(r[l]=parseInt(o,10))}return r}var Pe=new Map,P=class t extends J{static create(e){let n=Pe.get(e);return n===void 0&&Pe.set(e,n=new t(e)),n}static resetCache(){Pe.clear(),rt.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=t.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:n,locale:r}){return Wn(e,n,r,this.name)}formatOffset(e,n){return ge(this.offset(e),n)}offset(e){if(!this.valid)return NaN;let n=new Date(e);if(isNaN(n))return NaN;let r=Sr(this.name),[i,s,o,l,a,u,c]=r.formatToParts?Nr(r,n):Or(r,n);l==="BC"&&(i=-Math.abs(i)+1);let d=ze({year:i,month:s,day:o,hour:a===24?0:a,minute:u,second:c,millisecond:0}),m=+n,g=m%1e3;return m-=g>=0?g:1e3+g,(d-m)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Ct={};function Dr(t,e={}){let n=JSON.stringify([t,e]),r=Ct[n];return r||(r=new Intl.ListFormat(t,e),Ct[n]=r),r}var it=new Map;function st(t,e={}){let n=JSON.stringify([t,e]),r=it.get(n);return r===void 0&&(r=new Intl.DateTimeFormat(t,e),it.set(n,r)),r}var ot=new Map;function Mr(t,e={}){let n=JSON.stringify([t,e]),r=ot.get(n);return r===void 0&&(r=new Intl.NumberFormat(t,e),ot.set(n,r)),r}var at=new Map;function vr(t,e={}){let{base:n,...r}=e,i=JSON.stringify([t,r]),s=at.get(i);return s===void 0&&(s=new Intl.RelativeTimeFormat(t,e),at.set(i,s)),s}var he=null;function Cr(){return he||(he=new Intl.DateTimeFormat().resolvedOptions().locale,he)}var lt=new Map;function Nn(t){let e=lt.get(t);return e===void 0&&(e=new Intl.DateTimeFormat(t).resolvedOptions(),lt.set(t,e)),e}var ut=new Map;function Ir(t){let e=ut.get(t);if(!e){let n=new Intl.Locale(t);e="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in e||(e={...Dn,...e}),ut.set(t,e)}return e}function Er(t){let e=t.indexOf("-x-");e!==-1&&(t=t.substring(0,e));let n=t.indexOf("-u-");if(n===-1)return[t];{let r,i;try{r=st(t).resolvedOptions(),i=t}catch{let a=t.substring(0,n);r=st(a).resolvedOptions(),i=a}let{numberingSystem:s,calendar:o}=r;return[i,s,o]}}function Fr(t,e,n){return(n||e)&&(t.includes("-u-")||(t+="-u"),n&&(t+=`-ca-${n}`),e&&(t+=`-nu-${e}`)),t}function Ar(t){let e=[];for(let n=1;n<=12;n++){let r=T.utc(2009,n,1);e.push(t(r))}return e}function Lr(t){let e=[];for(let n=1;n<=7;n++){let r=T.utc(2016,11,13+n);e.push(t(r))}return e}function Oe(t,e,n,r){let i=t.listingMode();return i==="error"?null:i==="en"?n(e):r(e)}function Wr(t){return t.numberingSystem&&t.numberingSystem!=="latn"?!1:t.numberingSystem==="latn"||!t.locale||t.locale.startsWith("en")||Nn(t.locale).numberingSystem==="latn"}var ct=class{constructor(e,n,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;let{padTo:i,floor:s,...o}=r;if(!n||Object.keys(o).length>0){let l={useGrouping:!1,...r};r.padTo>0&&(l.minimumIntegerDigits=r.padTo),this.inf=Mr(e,l)}}format(e){if(this.inf){let n=this.floor?Math.floor(e):e;return this.inf.format(n)}else{let n=this.floor?Math.floor(e):St(e,3);return S(n,this.padTo)}}},ft=class{constructor(e,n,r){this.opts=r,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let o=-1*(e.offset/60),l=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&P.create(l).valid?(i=l,this.dt=e):(i="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,i=e.zone.name):(i="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let s={...this.opts};s.timeZone=s.timeZone||i,this.dtf=st(n,s)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(n=>{if(n.type==="timeZoneName"){let r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...n,value:r}}else return n}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},mt=class{constructor(e,n,r){this.opts={style:"long",...r},!n&&An()&&(this.rtf=vr(e,r))}format(e,n){return this.rtf?this.rtf.format(e,n):ni(n,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,n){return this.rtf?this.rtf.formatToParts(e,n):[]}},Dn={firstDay:1,minimalDays:4,weekend:[6,7]},b=class t{static fromOpts(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,n,r,i,s=!1){let o=e||k.defaultLocale,l=o||(s?"en-US":Cr()),a=n||k.defaultNumberingSystem,u=r||k.defaultOutputCalendar,c=yt(i)||k.defaultWeekSettings;return new t(l,a,u,c,o)}static resetCache(){he=null,it.clear(),ot.clear(),at.clear(),lt.clear(),ut.clear()}static fromObject({locale:e,numberingSystem:n,outputCalendar:r,weekSettings:i}={}){return t.create(e,n,r,i)}constructor(e,n,r,i,s){let[o,l,a]=Er(e);this.locale=o,this.numberingSystem=n||l||null,this.outputCalendar=r||a||null,this.weekSettings=i,this.intl=Fr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=Wr(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),n=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&n?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,yt(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,n=!1){return Oe(this,e,$n,()=>{let r=this.intl==="ja"||this.intl.startsWith("ja-");n&=!r;let i=n?{month:e,day:"numeric"}:{month:e},s=n?"format":"standalone";if(!this.monthsCache[s][e]){let o=r?l=>this.dtFormatter(l,i).format():l=>this.extract(l,i,"month");this.monthsCache[s][e]=Ar(o)}return this.monthsCache[s][e]})}weekdays(e,n=!1){return Oe(this,e,Un,()=>{let r=n?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=n?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=Lr(s=>this.extract(s,r,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Oe(this,void 0,()=>Yn,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[T.utc(2016,11,13,9),T.utc(2016,11,13,19)].map(n=>this.extract(n,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Oe(this,e,qn,()=>{let n={era:e};return this.eraCache[e]||(this.eraCache[e]=[T.utc(-40,1,1),T.utc(2017,1,1)].map(r=>this.extract(r,n,"era"))),this.eraCache[e]})}extract(e,n,r){let i=this.dtFormatter(e,n),s=i.formatToParts(),o=s.find(l=>l.type.toLowerCase()===r);return o?o.value:null}numberFormatter(e={}){return new ct(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,n={}){return new ft(e,this.intl,n)}relFormatter(e={}){return new mt(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Dr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Nn(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ln()?Ir(this.locale):Dn}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})`}},_e=null,F=class t extends J{static get utcInstance(){return _e===null&&(_e=new t(0)),_e}static instance(e){return e===0?t.utcInstance:new t(e)}static parseSpecifier(e){if(e){let n=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(n)return new t(Ze(n[1],n[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ge(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ge(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,n){return ge(this.fixed,n)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},ht=class extends J{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 q(t,e){if(y(t)||t===null)return e;if(t instanceof J)return t;if(Ur(t)){let n=t.toLowerCase();return n==="default"?e:n==="local"||n==="system"?Ae.instance:n==="utc"||n==="gmt"?F.utcInstance:F.parseSpecifier(n)||P.create(t)}else return B(t)?F.instance(t):typeof t=="object"&&"offset"in t&&typeof t.offset=="function"?t:new ht(t)}var pt={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"},It={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]},Vr=pt.hanidec.replace(/[\[|\]]/g,"").split("");function Rr(t){let e=parseInt(t,10);if(isNaN(e)){e="";for(let n=0;n<t.length;n++){let r=t.charCodeAt(n);if(t[n].search(pt.hanidec)!==-1)e+=Vr.indexOf(t[n]);else for(let i in It){let[s,o]=It[i];r>=s&&r<=o&&(e+=r-s)}}return parseInt(e,10)}else return e}var dt=new Map;function $r(){dt.clear()}function L({numberingSystem:t},e=""){let n=t||"latn",r=dt.get(n);r===void 0&&(r=new Map,dt.set(n,r));let i=r.get(e);return i===void 0&&(i=new RegExp(`${pt[n]}${e}`),r.set(e,i)),i}var Et=()=>Date.now(),Ft="system",At=null,Lt=null,Wt=null,Vt=60,Rt,$t=null,k=class{static get now(){return Et}static set now(e){Et=e}static set defaultZone(e){Ft=e}static get defaultZone(){return q(Ft,Ae.instance)}static get defaultLocale(){return At}static set defaultLocale(e){At=e}static get defaultNumberingSystem(){return Lt}static set defaultNumberingSystem(e){Lt=e}static get defaultOutputCalendar(){return Wt}static set defaultOutputCalendar(e){Wt=e}static get defaultWeekSettings(){return $t}static set defaultWeekSettings(e){$t=yt(e)}static get twoDigitCutoffYear(){return Vt}static set twoDigitCutoffYear(e){Vt=e%100}static get throwOnInvalid(){return Rt}static set throwOnInvalid(e){Rt=e}static resetCaches(){b.resetCache(),P.resetCache(),T.resetCache(),$r()}},M=class{constructor(e,n){this.reason=e,this.explanation=n}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Mn=[0,31,59,90,120,151,181,212,243,273,304,334],vn=[0,31,60,91,121,152,182,213,244,274,305,335];function I(t,e){return new M("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${t}, which is invalid`)}function bt(t,e,n){let r=new Date(Date.UTC(t,e-1,n));t<100&&t>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);let i=r.getUTCDay();return i===0?7:i}function Cn(t,e,n){return n+(pe(t)?vn:Mn)[e-1]}function In(t,e){let n=pe(t)?vn:Mn,r=n.findIndex(s=>s<e),i=e-n[r];return{month:r+1,day:i}}function Tt(t,e){return(t-e+7)%7+1}function Le(t,e=4,n=1){let{year:r,month:i,day:s}=t,o=Cn(r,i,s),l=Tt(bt(r,i,s),n),a=Math.floor((o-l+14-e)/7),u;return a<1?(u=r-1,a=we(u,e,n)):a>we(r,e,n)?(u=r+1,a=1):u=r,{weekYear:u,weekNumber:a,weekday:l,...Ue(t)}}function zt(t,e=4,n=1){let{weekYear:r,weekNumber:i,weekday:s}=t,o=Tt(bt(r,1,e),n),l=ne(r),a=i*7+s-o-7+e,u;a<1?(u=r-1,a+=ne(u)):a>l?(u=r+1,a-=ne(r)):u=r;let{month:c,day:f}=In(u,a);return{year:u,month:c,day:f,...Ue(t)}}function Ge(t){let{year:e,month:n,day:r}=t,i=Cn(e,n,r);return{year:e,ordinal:i,...Ue(t)}}function Zt(t){let{year:e,ordinal:n}=t,{month:r,day:i}=In(e,n);return{year:e,month:r,day:i,...Ue(t)}}function Ut(t,e){if(!y(t.localWeekday)||!y(t.localWeekNumber)||!y(t.localWeekYear)){if(!y(t.weekday)||!y(t.weekNumber)||!y(t.weekYear))throw new H("Cannot mix locale-based week fields with ISO-based week fields");return y(t.localWeekday)||(t.weekday=t.localWeekday),y(t.localWeekNumber)||(t.weekNumber=t.localWeekNumber),y(t.localWeekYear)||(t.weekYear=t.localWeekYear),delete t.localWeekday,delete t.localWeekNumber,delete t.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function zr(t,e=4,n=1){let r=$e(t.weekYear),i=E(t.weekNumber,1,we(t.weekYear,e,n)),s=E(t.weekday,1,7);return r?i?s?!1:I("weekday",t.weekday):I("week",t.weekNumber):I("weekYear",t.weekYear)}function Zr(t){let e=$e(t.year),n=E(t.ordinal,1,ne(t.year));return e?n?!1:I("ordinal",t.ordinal):I("year",t.year)}function En(t){let e=$e(t.year),n=E(t.month,1,12),r=E(t.day,1,We(t.year,t.month));return e?n?r?!1:I("day",t.day):I("month",t.month):I("year",t.year)}function Fn(t){let{hour:e,minute:n,second:r,millisecond:i}=t,s=E(e,0,23)||e===24&&n===0&&r===0&&i===0,o=E(n,0,59),l=E(r,0,59),a=E(i,0,999);return s?o?l?a?!1:I("millisecond",i):I("second",r):I("minute",n):I("hour",e)}function y(t){return typeof t>"u"}function B(t){return typeof t=="number"}function $e(t){return typeof t=="number"&&t%1===0}function Ur(t){return typeof t=="string"}function Yr(t){return Object.prototype.toString.call(t)==="[object Date]"}function An(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function Ln(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function qr(t){return Array.isArray(t)?t:[t]}function Yt(t,e,n){if(t.length!==0)return t.reduce((r,i)=>{let s=[e(i),i];return r&&n(r[0],s[0])===r[0]?r:s},null)[1]}function Hr(t,e){return e.reduce((n,r)=>(n[r]=t[r],n),{})}function se(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function yt(t){if(t==null)return null;if(typeof t!="object")throw new x("Week settings must be an object");if(!E(t.firstDay,1,7)||!E(t.minimalDays,1,7)||!Array.isArray(t.weekend)||t.weekend.some(e=>!E(e,1,7)))throw new x("Invalid week settings");return{firstDay:t.firstDay,minimalDays:t.minimalDays,weekend:Array.from(t.weekend)}}function E(t,e,n){return $e(t)&&t>=e&&t<=n}function Br(t,e){return t-e*Math.floor(t/e)}function S(t,e=2){let n=t<0,r;return n?r="-"+(""+-t).padStart(e,"0"):r=(""+t).padStart(e,"0"),r}function Y(t){if(!(y(t)||t===null||t===""))return parseInt(t,10)}function _(t){if(!(y(t)||t===null||t===""))return parseFloat(t)}function kt(t){if(!(y(t)||t===null||t==="")){let e=parseFloat("0."+t)*1e3;return Math.floor(e)}}function St(t,e,n="round"){let r=10**e;switch(n){case"expand":return t>0?Math.ceil(t*r)/r:Math.floor(t*r)/r;case"trunc":return Math.trunc(t*r)/r;case"round":return Math.round(t*r)/r;case"floor":return Math.floor(t*r)/r;case"ceil":return Math.ceil(t*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function pe(t){return t%4===0&&(t%100!==0||t%400===0)}function ne(t){return pe(t)?366:365}function We(t,e){let n=Br(e-1,12)+1,r=t+(e-n)/12;return n===2?pe(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function ze(t){let e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e),e.setUTCFullYear(t.year,t.month-1,t.day)),+e}function qt(t,e,n){return-Tt(bt(t,1,e),n)+e-1}function we(t,e=4,n=1){let r=qt(t,e,n),i=qt(t+1,e,n);return(ne(t)-r+i)/7}function gt(t){return t>99?t:t>k.twoDigitCutoffYear?1900+t:2e3+t}function Wn(t,e,n,r=null){let i=new Date(t),s={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(s.timeZone=r);let o={timeZoneName:e,...s},l=new Intl.DateTimeFormat(n,o).formatToParts(i).find(a=>a.type.toLowerCase()==="timezonename");return l?l.value:null}function Ze(t,e){let n=parseInt(t,10);Number.isNaN(n)&&(n=0);let r=parseInt(e,10)||0,i=n<0||Object.is(n,-0)?-r:r;return n*60+i}function Vn(t){let e=Number(t);if(typeof t=="boolean"||t===""||!Number.isFinite(e))throw new x(`Invalid unit value ${t}`);return e}function Ve(t,e){let n={};for(let r in t)if(se(t,r)){let i=t[r];if(i==null)continue;n[e(r)]=Vn(i)}return n}function ge(t,e){let n=Math.trunc(Math.abs(t/60)),r=Math.trunc(Math.abs(t%60)),i=t>=0?"+":"-";switch(e){case"short":return`${i}${S(n,2)}:${S(r,2)}`;case"narrow":return`${i}${n}${r>0?`:${r}`:""}`;case"techie":return`${i}${S(n,2)}${S(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Ue(t){return Hr(t,["hour","minute","second","millisecond"])}var Pr=["January","February","March","April","May","June","July","August","September","October","November","December"],Rn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],_r=["J","F","M","A","M","J","J","A","S","O","N","D"];function $n(t){switch(t){case"narrow":return[..._r];case"short":return[...Rn];case"long":return[...Pr];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}}var zn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Zn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Gr=["M","T","W","T","F","S","S"];function Un(t){switch(t){case"narrow":return[...Gr];case"short":return[...Zn];case"long":return[...zn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Yn=["AM","PM"],jr=["Before Christ","Anno Domini"],Jr=["BC","AD"],Xr=["B","A"];function qn(t){switch(t){case"narrow":return[...Xr];case"short":return[...Jr];case"long":return[...jr];default:return null}}function Qr(t){return Yn[t.hour<12?0:1]}function Kr(t,e){return Un(e)[t.weekday-1]}function ei(t,e){return $n(e)[t.month-1]}function ti(t,e){return qn(e)[t.year<0?0:1]}function ni(t,e,n="always",r=!1){let i={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."]},s=["hours","minutes","seconds"].indexOf(t)===-1;if(n==="auto"&&s){let f=t==="days";switch(e){case 1:return f?"tomorrow":`next ${i[t][0]}`;case-1:return f?"yesterday":`last ${i[t][0]}`;case 0:return f?"today":`this ${i[t][0]}`}}let o=Object.is(e,-0)||e<0,l=Math.abs(e),a=l===1,u=i[t],c=r?a?u[1]:u[2]||u[1]:a?i[t][0]:t;return o?`${l} ${c} ago`:`in ${l} ${c}`}function Ht(t,e){let n="";for(let r of t)r.literal?n+=r.val:n+=e(r.val);return n}var ri={D:Fe,DD:on,DDD:an,DDDD:ln,t:un,tt:cn,ttt:fn,tttt:mn,T:hn,TT:dn,TTT:yn,TTTT:gn,f:wn,ff:bn,fff:kn,ffff:xn,F:pn,FF:Tn,FFF:Sn,FFFF:On},D=class t{static create(e,n={}){return new t(e,n)}static parseFormat(e){let n=null,r="",i=!1,s=[];for(let o=0;o<e.length;o++){let l=e.charAt(o);l==="'"?((r.length>0||i)&&s.push({literal:i||/^\s+$/.test(r),val:r===""?"'":r}),n=null,r="",i=!i):i||l===n?r+=l:(r.length>0&&s.push({literal:/^\s+$/.test(r),val:r}),r=l,n=l)}return r.length>0&&s.push({literal:i||/^\s+$/.test(r),val:r}),s}static macroTokenToFormatOpts(e){return ri[e]}constructor(e,n){this.opts=n,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,n){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...n}).format()}dtFormatter(e,n={}){return this.loc.dtFormatter(e,{...this.opts,...n})}formatDateTime(e,n){return this.dtFormatter(e,n).format()}formatDateTimeParts(e,n){return this.dtFormatter(e,n).formatToParts()}formatInterval(e,n){return this.dtFormatter(e.start,n).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,n){return this.dtFormatter(e,n).resolvedOptions()}num(e,n=0,r=void 0){if(this.opts.forceSimple)return S(e,n);let i={...this.opts};return n>0&&(i.padTo=n),r&&(i.signDisplay=r),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,n){let r=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",s=(m,g)=>this.loc.extract(e,m,g),o=m=>e.isOffsetFixed&&e.offset===0&&m.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,m.format):"",l=()=>r?Qr(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),a=(m,g)=>r?ei(e,m):s(g?{month:m}:{month:m,day:"numeric"},"month"),u=(m,g)=>r?Kr(e,m):s(g?{weekday:m}:{weekday:m,month:"long",day:"numeric"},"weekday"),c=m=>{let g=t.macroTokenToFormatOpts(m);return g?this.formatWithSystemDefault(e,g):m},f=m=>r?ti(e,m):s({era:m},"era"),d=m=>{switch(m){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 o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({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 l();case"d":return i?s({day:"numeric"},"day"):this.num(e.day);case"dd":return i?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return i?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return i?s({month:"numeric"},"month"):this.num(e.month);case"MM":return i?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return i?s({year:"numeric"},"year"):this.num(e.year);case"yy":return i?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?s({year:"numeric"},"year"):this.num(e.year,6);case"G":return f("short");case"GG":return f("long");case"GGGGG":return f("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 c(m)}};return Ht(t.parseFormat(n),d)}formatDurationFromString(e,n){let r=this.opts.signMode==="negativeLargestOnly"?-1:1,i=c=>{switch(c[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}},s=(c,f)=>d=>{let m=i(d);if(m){let g=f.isNegativeDuration&&m!==f.largestUnit?r:1,p;return this.opts.signMode==="negativeLargestOnly"&&m!==f.largestUnit?p="never":this.opts.signMode==="all"?p="always":p="auto",this.num(c.get(m)*g,d.length,p)}else return d},o=t.parseFormat(n),l=o.reduce((c,{literal:f,val:d})=>f?c:c.concat(d),[]),a=e.shiftTo(...l.map(i).filter(c=>c)),u={isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]};return Ht(o,s(a,u))}},Hn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function oe(...t){let e=t.reduce((n,r)=>n+r.source,"");return RegExp(`^${e}$`)}function ae(...t){return e=>t.reduce(([n,r,i],s)=>{let[o,l,a]=s(e,i);return[{...n,...o},l||r,a]},[{},null,1]).slice(0,2)}function le(t,...e){if(t==null)return[null,null];for(let[n,r]of e){let i=n.exec(t);if(i)return r(i)}return[null,null]}function Bn(...t){return(e,n)=>{let r={},i;for(i=0;i<t.length;i++)r[t[i]]=Y(e[n+i]);return[r,null,n+i]}}var Pn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,ii=`(?:${Pn.source}?(?:\\[(${Hn.source})\\])?)?`,xt=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,_n=RegExp(`${xt.source}${ii}`),Ot=RegExp(`(?:[Tt]${_n.source})?`),si=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,oi=/(\d{4})-?W(\d\d)(?:-?(\d))?/,ai=/(\d{4})-?(\d{3})/,li=Bn("weekYear","weekNumber","weekDay"),ui=Bn("year","ordinal"),ci=/(\d{4})-(\d\d)-(\d\d)/,Gn=RegExp(`${xt.source} ?(?:${Pn.source}|(${Hn.source}))?`),fi=RegExp(`(?: ${Gn.source})?`);function re(t,e,n){let r=t[e];return y(r)?n:Y(r)}function mi(t,e){return[{year:re(t,e),month:re(t,e+1,1),day:re(t,e+2,1)},null,e+3]}function ue(t,e){return[{hours:re(t,e,0),minutes:re(t,e+1,0),seconds:re(t,e+2,0),milliseconds:kt(t[e+3])},null,e+4]}function be(t,e){let n=!t[e]&&!t[e+1],r=Ze(t[e+1],t[e+2]),i=n?null:F.instance(r);return[{},i,e+3]}function Te(t,e){let n=t[e]?P.create(t[e]):null;return[{},n,e+1]}var hi=RegExp(`^T?${xt.source}$`),di=/^-?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 yi(t){let[e,n,r,i,s,o,l,a,u]=t,c=e[0]==="-",f=a&&a[0]==="-",d=(m,g=!1)=>m!==void 0&&(g||m&&c)?-m:m;return[{years:d(_(n)),months:d(_(r)),weeks:d(_(i)),days:d(_(s)),hours:d(_(o)),minutes:d(_(l)),seconds:d(_(a),a==="-0"),milliseconds:d(kt(u),f)}]}var gi={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Nt(t,e,n,r,i,s,o){let l={year:e.length===2?gt(Y(e)):Y(e),month:Rn.indexOf(n)+1,day:Y(r),hour:Y(i),minute:Y(s)};return o&&(l.second=Y(o)),t&&(l.weekday=t.length>3?zn.indexOf(t)+1:Zn.indexOf(t)+1),l}var wi=/^(?:(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 pi(t){let[,e,n,r,i,s,o,l,a,u,c,f]=t,d=Nt(e,i,r,n,s,o,l),m;return a?m=gi[a]:u?m=0:m=Ze(c,f),[d,new F(m)]}function bi(t){return t.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var Ti=/^(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$/,ki=/^(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$/,Si=/^(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 Bt(t){let[,e,n,r,i,s,o,l]=t;return[Nt(e,i,r,n,s,o,l),F.utcInstance]}function xi(t){let[,e,n,r,i,s,o,l]=t;return[Nt(e,l,n,r,i,s,o),F.utcInstance]}var Oi=oe(si,Ot),Ni=oe(oi,Ot),Di=oe(ai,Ot),Mi=oe(_n),jn=ae(mi,ue,be,Te),vi=ae(li,ue,be,Te),Ci=ae(ui,ue,be,Te),Ii=ae(ue,be,Te);function Ei(t){return le(t,[Oi,jn],[Ni,vi],[Di,Ci],[Mi,Ii])}function Fi(t){return le(bi(t),[wi,pi])}function Ai(t){return le(t,[Ti,Bt],[ki,Bt],[Si,xi])}function Li(t){return le(t,[di,yi])}var Wi=ae(ue);function Vi(t){return le(t,[hi,Wi])}var Ri=oe(ci,fi),$i=oe(Gn),zi=ae(ue,be,Te);function Zi(t){return le(t,[Ri,jn],[$i,zi])}var Pt="Invalid Duration",Jn={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}},Ui={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},...Jn},C=146097/400,Q=146097/4800,Yi={years:{quarters:4,months:12,weeks:C/7,days:C,hours:C*24,minutes:C*24*60,seconds:C*24*60*60,milliseconds:C*24*60*60*1e3},quarters:{months:3,weeks:C/28,days:C/4,hours:C*24/4,minutes:C*24*60/4,seconds:C*24*60*60/4,milliseconds:C*24*60*60*1e3/4},months:{weeks:Q/7,days:Q,hours:Q*24,minutes:Q*24*60,seconds:Q*24*60*60,milliseconds:Q*24*60*60*1e3},...Jn},j=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],qi=j.slice(0).reverse();function Z(t,e,n=!1){let r={values:n?e.values:{...t.values,...e.values||{}},loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy,matrix:e.matrix||t.matrix};return new O(r)}function Xn(t,e){let n=e.milliseconds??0;for(let r of qi.slice(1))e[r]&&(n+=e[r]*t[r].milliseconds);return n}function _t(t,e){let n=Xn(t,e)<0?-1:1;j.reduceRight((r,i)=>{if(y(e[i]))return r;if(r){let s=e[r]*n,o=t[i][r],l=Math.floor(s/o);e[i]+=l*n,e[r]-=l*o*n}return i},null),j.reduce((r,i)=>{if(y(e[i]))return r;if(r){let s=e[r]%1;e[r]-=s,e[i]+=s*t[r][i]}return i},null)}function Gt(t){let e={};for(let[n,r]of Object.entries(t))r!==0&&(e[n]=r);return e}var O=class t{constructor(e){let n=e.conversionAccuracy==="longterm"||!1,r=n?Yi:Ui;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||b.create(),this.conversionAccuracy=n?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,n){return t.fromObject({milliseconds:e},n)}static fromObject(e,n={}){if(e==null||typeof e!="object")throw new x(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new t({values:Ve(e,t.normalizeUnit),loc:b.fromObject(n),conversionAccuracy:n.conversionAccuracy,matrix:n.matrix})}static fromDurationLike(e){if(B(e))return t.fromMillis(e);if(t.isDuration(e))return e;if(typeof e=="object")return t.fromObject(e);throw new x(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,n){let[r]=Li(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,n){let[r]=Vi(e);return r?t.fromObject(r,n):t.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the Duration is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new nt(r);return new t({invalid:r})}static normalizeUnit(e){let n={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(!n)throw new Ee(e);return n}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,n={}){let r={...n,floor:n.round!==!1&&n.floor!==!1};return this.isValid?D.create(this.loc,r).formatDurationFromString(this,e):Pt}toHuman(e={}){if(!this.isValid)return Pt;let n=e.showZeros!==!1,r=j.map(i=>{let s=this.values[i];return y(s)||s===0&&!n?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}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+=St(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let n=this.toMillis();return n<0||n>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},T.fromMillis(n,{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?Xn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e),r={};for(let i of j)(se(n.values,i)||se(this.values,i))&&(r[i]=n.get(i)+this.get(i));return Z(this,{values:r},!0)}minus(e){if(!this.isValid)return this;let n=t.fromDurationLike(e);return this.plus(n.negate())}mapUnits(e){if(!this.isValid)return this;let n={};for(let r of Object.keys(this.values))n[r]=Vn(e(this.values[r],r));return Z(this,{values:n},!0)}get(e){return this[t.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let n={...this.values,...Ve(e,t.normalizeUnit)};return Z(this,{values:n})}reconfigure({locale:e,numberingSystem:n,conversionAccuracy:r,matrix:i}={}){let o={loc:this.loc.clone({locale:e,numberingSystem:n}),matrix:i,conversionAccuracy:r};return Z(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return _t(this.matrix,e),Z(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=Gt(this.normalize().shiftToAll().toObject());return Z(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>t.normalizeUnit(o));let n={},r={},i=this.toObject(),s;for(let o of j)if(e.indexOf(o)>=0){s=o;let l=0;for(let u in r)l+=this.matrix[u][o]*r[u],r[u]=0;B(i[o])&&(l+=i[o]);let a=Math.trunc(l);n[o]=a,r[o]=(l*1e3-a*1e3)/1e3}else B(i[o])&&(r[o]=i[o]);for(let o in r)r[o]!==0&&(n[s]+=o===s?r[o]:r[o]/this.matrix[s][o]);return _t(this.matrix,n),Z(this,{values:n},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let n of Object.keys(this.values))e[n]=this.values[n]===0?0:-this.values[n];return Z(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;let e=Gt(this.values);return Z(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 n(r,i){return r===void 0||r===0?i===void 0||i===0:r===i}for(let r of j)if(!n(this.values[r],e.values[r]))return!1;return!0}},K="Invalid Interval";function Hi(t,e){return!t||!t.isValid?ie.invalid("missing or invalid start"):!e||!e.isValid?ie.invalid("missing or invalid end"):e<t?ie.invalid("end before start",`The end of an interval must be after its start, but you had start=${t.toISO()} and end=${e.toISO()}`):null}var ie=class t{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the Interval is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new tt(r);return new t({invalid:r})}static fromDateTimes(e,n){let r=me(e),i=me(n),s=Hi(r,i);return s??new t({start:r,end:i})}static after(e,n){let r=O.fromDurationLike(n),i=me(e);return t.fromDateTimes(i,i.plus(r))}static before(e,n){let r=O.fromDurationLike(n),i=me(e);return t.fromDateTimes(i.minus(r),i)}static fromISO(e,n){let[r,i]=(e||"").split("/",2);if(r&&i){let s,o;try{s=T.fromISO(r,n),o=s.isValid}catch{o=!1}let l,a;try{l=T.fromISO(i,n),a=l.isValid}catch{a=!1}if(o&&a)return t.fromDateTimes(s,l);if(o){let u=O.fromISO(i,n);if(u.isValid)return t.after(s,u)}else if(a){let u=O.fromISO(r,n);if(u.isValid)return t.before(l,u)}}return t.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",n){if(!this.isValid)return NaN;let r=this.start.startOf(e,n),i;return n?.useLocaleWeeks?i=this.end.reconfigure({locale:r.locale}):i=this.end,i=i.startOf(e,n),Math.floor(i.diff(r,e).get(e))+(i.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:n}={}){return this.isValid?t.fromDateTimes(e||this.s,n||this.e):this}splitAt(...e){if(!this.isValid)return[];let n=e.map(me).filter(o=>this.contains(o)).sort((o,l)=>o.toMillis()-l.toMillis()),r=[],{s:i}=this,s=0;for(;i<this.e;){let o=n[s]||this.e,l=+o>+this.e?this.e:o;r.push(t.fromDateTimes(i,l)),i=l,s+=1}return r}splitBy(e){let n=O.fromDurationLike(e);if(!this.isValid||!n.isValid||n.as("milliseconds")===0)return[];let{s:r}=this,i=1,s,o=[];for(;r<this.e;){let l=this.start.plus(n.mapUnits(a=>a*i));s=+l>+this.e?this.e:l,o.push(t.fromDateTimes(r,s)),r=s,i+=1}return o}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;let n=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return n>=r?null:t.fromDateTimes(n,r)}union(e){if(!this.isValid)return this;let n=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return t.fromDateTimes(n,r)}static merge(e){let[n,r]=e.sort((i,s)=>i.s-s.s).reduce(([i,s],o)=>s?s.overlaps(o)||s.abutsStart(o)?[i,s.union(o)]:[i.concat([s]),o]:[i,o],[[],null]);return r&&n.push(r),n}static xor(e){let n=null,r=0,i=[],s=e.map(a=>[{time:a.s,type:"s"},{time:a.e,type:"e"}]),o=Array.prototype.concat(...s),l=o.sort((a,u)=>a.time-u.time);for(let a of l)r+=a.type==="s"?1:-1,r===1?n=a.time:(n&&+n!=+a.time&&i.push(t.fromDateTimes(n,a.time)),n=null);return t.merge(i)}difference(...e){return t.xor([this].concat(e)).map(n=>this.intersection(n)).filter(n=>n&&!n.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:K}[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=Fe,n={}){return this.isValid?D.create(this.s.loc.clone(n),e).formatInterval(this):K}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:K}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:K}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:K}toFormat(e,{separator:n=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${n}${this.e.toFormat(e)}`:K}toDuration(e,n){return this.isValid?this.e.diff(this.s,e,n):O.invalid(this.invalidReason)}mapEndpoints(e){return t.fromDateTimes(e(this.s),e(this.e))}},te=class{static hasDST(e=k.defaultZone){let n=T.now().setZone(e).set({month:12});return!e.isUniversal&&n.offset!==n.set({month:6}).offset}static isValidIANAZone(e){return P.isValidZone(e)}static normalizeZone(e){return q(e,k.defaultZone)}static getStartOfWeek({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:n=null}={}){return(n||b.create(e)).getWeekendDays().slice()}static months(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||b.create(n,r,s)).months(e)}static monthsFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null,outputCalendar:s="gregory"}={}){return(i||b.create(n,r,s)).months(e,!0)}static weekdays(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||b.create(n,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:n=null,numberingSystem:r=null,locObj:i=null}={}){return(i||b.create(n,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return b.create(e).meridiems()}static eras(e="short",{locale:n=null}={}){return b.create(n,null,"gregory").eras(e)}static features(){return{relative:An(),localeWeek:Ln()}}};function jt(t,e){let n=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(e)-n(t);return Math.floor(O.fromMillis(r).as("days"))}function Bi(t,e,n){let r=[["years",(a,u)=>u.year-a.year],["quarters",(a,u)=>u.quarter-a.quarter+(u.year-a.year)*4],["months",(a,u)=>u.month-a.month+(u.year-a.year)*12],["weeks",(a,u)=>{let c=jt(a,u);return(c-c%7)/7}],["days",jt]],i={},s=t,o,l;for(let[a,u]of r)n.indexOf(a)>=0&&(o=a,i[a]=u(t,e),l=s.plus(i),l>e?(i[a]--,t=s.plus(i),t>e&&(l=t,i[a]--,t=s.plus(i))):t=l);return[t,i,l,o]}function Pi(t,e,n,r){let[i,s,o,l]=Bi(t,e,n),a=e-i,u=n.filter(f=>["hours","minutes","seconds","milliseconds"].indexOf(f)>=0);u.length===0&&(o<e&&(o=i.plus({[l]:1})),o!==i&&(s[l]=(s[l]||0)+a/(o-i)));let c=O.fromObject(s,r);return u.length>0?O.fromMillis(a,r).shiftTo(...u).plus(c):c}var _i="missing Intl.DateTimeFormat.formatToParts support";function w(t,e=n=>n){return{regex:t,deser:([n])=>e(Rr(n))}}var Gi="\xA0",Qn=`[ ${Gi}]`,Kn=new RegExp(Qn,"g");function ji(t){return t.replace(/\./g,"\\.?").replace(Kn,Qn)}function Jt(t){return t.replace(/\./g,"").replace(Kn," ").toLowerCase()}function W(t,e){return t===null?null:{regex:RegExp(t.map(ji).join("|")),deser:([n])=>t.findIndex(r=>Jt(n)===Jt(r))+e}}function Xt(t,e){return{regex:t,deser:([,n,r])=>Ze(n,r),groups:e}}function Ne(t){return{regex:t,deser:([e])=>e}}function Ji(t){return t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function Xi(t,e){let n=L(e),r=L(e,"{2}"),i=L(e,"{3}"),s=L(e,"{4}"),o=L(e,"{6}"),l=L(e,"{1,2}"),a=L(e,"{1,3}"),u=L(e,"{1,6}"),c=L(e,"{1,9}"),f=L(e,"{2,4}"),d=L(e,"{4,6}"),m=N=>({regex:RegExp(Ji(N.val)),deser:([A])=>A,literal:!0}),p=(N=>{if(t.literal)return m(N);switch(N.val){case"G":return W(e.eras("short"),0);case"GG":return W(e.eras("long"),0);case"y":return w(u);case"yy":return w(f,gt);case"yyyy":return w(s);case"yyyyy":return w(d);case"yyyyyy":return w(o);case"M":return w(l);case"MM":return w(r);case"MMM":return W(e.months("short",!0),1);case"MMMM":return W(e.months("long",!0),1);case"L":return w(l);case"LL":return w(r);case"LLL":return W(e.months("short",!1),1);case"LLLL":return W(e.months("long",!1),1);case"d":return w(l);case"dd":return w(r);case"o":return w(a);case"ooo":return w(i);case"HH":return w(r);case"H":return w(l);case"hh":return w(r);case"h":return w(l);case"mm":return w(r);case"m":return w(l);case"q":return w(l);case"qq":return w(r);case"s":return w(l);case"ss":return w(r);case"S":return w(a);case"SSS":return w(i);case"u":return Ne(c);case"uu":return Ne(l);case"uuu":return w(n);case"a":return W(e.meridiems(),0);case"kkkk":return w(s);case"kk":return w(f,gt);case"W":return w(l);case"WW":return w(r);case"E":case"c":return w(n);case"EEE":return W(e.weekdays("short",!1),1);case"EEEE":return W(e.weekdays("long",!1),1);case"ccc":return W(e.weekdays("short",!0),1);case"cccc":return W(e.weekdays("long",!0),1);case"Z":case"ZZ":return Xt(new RegExp(`([+-]${l.source})(?::(${r.source}))?`),2);case"ZZZ":return Xt(new RegExp(`([+-]${l.source})(${r.source})?`),2);case"z":return Ne(/[a-z_+-/]{1,256}?/i);case" ":return Ne(/[^\S\n\r]/);default:return m(N)}})(t)||{invalidReason:_i};return p.token=t,p}var Qi={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Ki(t,e,n){let{type:r,value:i}=t;if(r==="literal"){let a=/^\s+$/.test(i);return{literal:!a,val:a?" ":i}}let s=e[r],o=r;r==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=n.hour12?"hour12":"hour24");let l=Qi[o];if(typeof l=="object"&&(l=l[s]),l)return{literal:!1,val:l}}function es(t){return[`^${t.map(n=>n.regex).reduce((n,r)=>`${n}(${r.source})`,"")}$`,t]}function ts(t,e,n){let r=t.match(e);if(r){let i={},s=1;for(let o in n)if(se(n,o)){let l=n[o],a=l.groups?l.groups+1:1;!l.literal&&l.token&&(i[l.token.val[0]]=l.deser(r.slice(s,s+a))),s+=a}return[r,i]}else return[r,{}]}function ns(t){let e=s=>{switch(s){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},n=null,r;return y(t.z)||(n=P.create(t.z)),y(t.Z)||(n||(n=new F(t.Z)),r=t.Z),y(t.q)||(t.M=(t.q-1)*3+1),y(t.h)||(t.h<12&&t.a===1?t.h+=12:t.h===12&&t.a===0&&(t.h=0)),t.G===0&&t.y&&(t.y=-t.y),y(t.u)||(t.S=kt(t.u)),[Object.keys(t).reduce((s,o)=>{let l=e(o);return l&&(s[l]=t[o]),s},{}),n,r]}var je=null;function rs(){return je||(je=T.fromMillis(1555555555555)),je}function is(t,e){if(t.literal)return t;let n=D.macroTokenToFormatOpts(t.val),r=nr(n,e);return r==null||r.includes(void 0)?t:r}function er(t,e){return Array.prototype.concat(...t.map(n=>is(n,e)))}var Re=class{constructor(e,n){if(this.locale=e,this.format=n,this.tokens=er(D.parseFormat(n),e),this.units=this.tokens.map(r=>Xi(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){let[r,i]=es(this.units);this.regex=RegExp(r,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){let[n,r]=ts(e,this.regex,this.handlers),[i,s,o]=r?ns(r):[null,null,void 0];if(se(r,"a")&&se(r,"H"))throw new H("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:n,matches:r,result:i,zone:s,specificOffset:o}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}};function tr(t,e,n){return new Re(t,n).explainFromTokens(e)}function ss(t,e,n){let{result:r,zone:i,specificOffset:s,invalidReason:o}=tr(t,e,n);return[r,i,s,o]}function nr(t,e){if(!t)return null;let r=D.create(e,t).dtFormatter(rs()),i=r.formatToParts(),s=r.resolvedOptions();return i.map(o=>Ki(o,t,s))}var Je="Invalid DateTime",Qt=864e13;function de(t){return new M("unsupported zone",`the zone "${t.name}" is not supported`)}function Xe(t){return t.weekData===null&&(t.weekData=Le(t.c)),t.weekData}function Qe(t){return t.localWeekData===null&&(t.localWeekData=Le(t.c,t.loc.getMinDaysInFirstWeek(),t.loc.getStartOfWeek())),t.localWeekData}function G(t,e){let n={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new T({...n,...e,old:n})}function rr(t,e,n){let r=t-e*60*1e3,i=n.offset(r);if(e===i)return[r,e];r-=(i-e)*60*1e3;let s=n.offset(r);return i===s?[r,i]:[t-Math.min(i,s)*60*1e3,Math.max(i,s)]}function De(t,e){t+=e*60*1e3;let n=new Date(t);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function ve(t,e,n){return rr(ze(t),e,n)}function Kt(t,e){let n=t.o,r=t.c.year+Math.trunc(e.years),i=t.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,s={...t.c,year:r,month:i,day:Math.min(t.c.day,We(r,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=O.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),l=ze(s),[a,u]=rr(l,n,t.zone);return o!==0&&(a+=o,u=t.zone.offset(a)),{ts:a,o:u}}function ee(t,e,n,r,i,s){let{setZone:o,zone:l}=n;if(t&&Object.keys(t).length!==0||e){let a=e||l,u=T.fromObject(t,{...n,zone:a,specificOffset:s});return o?u:u.setZone(l)}else return T.invalid(new M("unparsable",`the input "${i}" can't be parsed as ${r}`))}function Me(t,e,n=!0){return t.isValid?D.create(b.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Ke(t,e,n){let r=t.c.year>9999||t.c.year<0,i="";if(r&&t.c.year>=0&&(i+="+"),i+=S(t.c.year,r?6:4),n==="year")return i;if(e){if(i+="-",i+=S(t.c.month),n==="month")return i;i+="-"}else if(i+=S(t.c.month),n==="month")return i;return i+=S(t.c.day),i}function en(t,e,n,r,i,s,o){let l=!n||t.c.millisecond!==0||t.c.second!==0,a="";switch(o){case"day":case"month":case"year":break;default:if(a+=S(t.c.hour),o==="hour")break;if(e){if(a+=":",a+=S(t.c.minute),o==="minute")break;l&&(a+=":",a+=S(t.c.second))}else{if(a+=S(t.c.minute),o==="minute")break;l&&(a+=S(t.c.second))}if(o==="second")break;l&&(!r||t.c.millisecond!==0)&&(a+=".",a+=S(t.c.millisecond,3))}return i&&(t.isOffsetFixed&&t.offset===0&&!s?a+="Z":t.o<0?(a+="-",a+=S(Math.trunc(-t.o/60)),a+=":",a+=S(Math.trunc(-t.o%60))):(a+="+",a+=S(Math.trunc(t.o/60)),a+=":",a+=S(Math.trunc(t.o%60)))),s&&(a+="["+t.zone.ianaName+"]"),a}var ir={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},os={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},as={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Ce=["year","month","day","hour","minute","second","millisecond"],ls=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],us=["year","ordinal","hour","minute","second","millisecond"];function Ie(t){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new Ee(t);return e}function tn(t){switch(t.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ie(t)}}function cs(t){if(ye===void 0&&(ye=k.now()),t.type!=="iana")return t.offset(ye);let e=t.name,n=wt.get(e);return n===void 0&&(n=t.offset(ye),wt.set(e,n)),n}function nn(t,e){let n=q(e.zone,k.defaultZone);if(!n.isValid)return T.invalid(de(n));let r=b.fromObject(e),i,s;if(y(t.year))i=k.now();else{for(let a of Ce)y(t[a])&&(t[a]=ir[a]);let o=En(t)||Fn(t);if(o)return T.invalid(o);let l=cs(n);[i,s]=ve(t,l,n)}return new T({ts:i,zone:n,loc:r,o:s})}function rn(t,e,n){let r=y(n.round)?!0:n.round,i=y(n.rounding)?"trunc":n.rounding,s=(l,a)=>(l=St(l,r||n.calendary?0:2,n.calendary?"round":i),e.loc.clone(n).relFormatter(n).format(l,a)),o=l=>n.calendary?e.hasSame(t,l)?0:e.startOf(l).diff(t.startOf(l),l).get(l):e.diff(t,l).get(l);if(n.unit)return s(o(n.unit),n.unit);for(let l of n.units){let a=o(l);if(Math.abs(a)>=1)return s(a,l)}return s(t>e?-0:0,n.units[n.units.length-1])}function sn(t){let e={},n;return t.length>0&&typeof t[t.length-1]=="object"?(e=t[t.length-1],n=Array.from(t).slice(0,t.length-1)):n=Array.from(t),[e,n]}var ye,wt=new Map,T=class t{constructor(e){let n=e.zone||k.defaultZone,r=e.invalid||(Number.isNaN(e.ts)?new M("invalid input"):null)||(n.isValid?null:de(n));this.ts=y(e.ts)?k.now():e.ts;let i=null,s=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(n))[i,s]=[e.old.c,e.old.o];else{let l=B(e.o)&&!e.old?e.o:n.offset(this.ts);i=De(this.ts,l),r=Number.isNaN(i.year)?new M("invalid input"):null,i=r?null:i,s=r?null:l}this._zone=n,this.loc=e.loc||b.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=i,this.o=s,this.isLuxonDateTime=!0}static now(){return new t({})}static local(){let[e,n]=sn(arguments),[r,i,s,o,l,a,u]=n;return nn({year:r,month:i,day:s,hour:o,minute:l,second:a,millisecond:u},e)}static utc(){let[e,n]=sn(arguments),[r,i,s,o,l,a,u]=n;return e.zone=F.utcInstance,nn({year:r,month:i,day:s,hour:o,minute:l,second:a,millisecond:u},e)}static fromJSDate(e,n={}){let r=Yr(e)?e.valueOf():NaN;if(Number.isNaN(r))return t.invalid("invalid input");let i=q(n.zone,k.defaultZone);return i.isValid?new t({ts:r,zone:i,loc:b.fromObject(n)}):t.invalid(de(i))}static fromMillis(e,n={}){if(B(e))return e<-Qt||e>Qt?t.invalid("Timestamp out of range"):new t({ts:e,zone:q(n.zone,k.defaultZone),loc:b.fromObject(n)});throw new x(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,n={}){if(B(e))return new t({ts:e*1e3,zone:q(n.zone,k.defaultZone),loc:b.fromObject(n)});throw new x("fromSeconds requires a numerical input")}static fromObject(e,n={}){e=e||{};let r=q(n.zone,k.defaultZone);if(!r.isValid)return t.invalid(de(r));let i=b.fromObject(n),s=Ve(e,tn),{minDaysInFirstWeek:o,startOfWeek:l}=Ut(s,i),a=k.now(),u=y(n.specificOffset)?r.offset(a):n.specificOffset,c=!y(s.ordinal),f=!y(s.year),d=!y(s.month)||!y(s.day),m=f||d,g=s.weekYear||s.weekNumber;if((m||c)&&g)throw new H("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new H("Can't mix ordinal dates with month/day");let p=g||s.weekday&&!m,N,A,R=De(a,u);p?(N=ls,A=os,R=Le(R,o,l)):c?(N=us,A=as,R=Ge(R)):(N=Ce,A=ir);let $=!1;for(let fe of N){let br=s[fe];y(br)?$?s[fe]=A[fe]:s[fe]=R[fe]:$=!0}let yr=p?zr(s,o,l):c?Zr(s):En(s),vt=yr||Fn(s);if(vt)return t.invalid(vt);let gr=p?zt(s,o,l):c?Zt(s):s,[wr,pr]=ve(gr,u,r),ce=new t({ts:wr,zone:r,o:pr,loc:i});return s.weekday&&m&&e.weekday!==ce.weekday?t.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${ce.toISO()}`):ce.isValid?ce:t.invalid(ce.invalid)}static fromISO(e,n={}){let[r,i]=Ei(e);return ee(r,i,n,"ISO 8601",e)}static fromRFC2822(e,n={}){let[r,i]=Fi(e);return ee(r,i,n,"RFC 2822",e)}static fromHTTP(e,n={}){let[r,i]=Ai(e);return ee(r,i,n,"HTTP",n)}static fromFormat(e,n,r={}){if(y(e)||y(n))throw new x("fromFormat requires an input string and a format");let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0}),[l,a,u,c]=ss(o,e,n);return c?t.invalid(c):ee(l,a,r,`format ${n}`,e,u)}static fromString(e,n,r={}){return t.fromFormat(e,n,r)}static fromSQL(e,n={}){let[r,i]=Zi(e);return ee(r,i,n,"SQL",e)}static invalid(e,n=null){if(!e)throw new x("need to specify a reason the DateTime is invalid");let r=e instanceof M?e:new M(e,n);if(k.throwOnInvalid)throw new et(r);return new t({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,n={}){let r=nr(e,b.fromObject(n));return r?r.map(i=>i?i.val:null).join(""):null}static expandFormat(e,n={}){return er(D.parseFormat(e),b.fromObject(n)).map(i=>i.val).join("")}static resetCache(){ye=void 0,wt.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?Xe(this).weekYear:NaN}get weekNumber(){return this.isValid?Xe(this).weekNumber:NaN}get weekday(){return this.isValid?Xe(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Qe(this).weekday:NaN}get localWeekNumber(){return this.isValid?Qe(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Qe(this).weekYear:NaN}get ordinal(){return this.isValid?Ge(this.c).ordinal:NaN}get monthShort(){return this.isValid?te.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?te.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?te.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?te.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,n=6e4,r=ze(this.c),i=this.zone.offset(r-e),s=this.zone.offset(r+e),o=this.zone.offset(r-i*n),l=this.zone.offset(r-s*n);if(o===l)return[this];let a=r-o*n,u=r-l*n,c=De(a,o),f=De(u,l);return c.hour===f.hour&&c.minute===f.minute&&c.second===f.second&&c.millisecond===f.millisecond?[G(this,{ts:a}),G(this,{ts:u})]:[this]}get isInLeapYear(){return pe(this.year)}get daysInMonth(){return We(this.year,this.month)}get daysInYear(){return this.isValid?ne(this.year):NaN}get weeksInWeekYear(){return this.isValid?we(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?we(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){let{locale:n,numberingSystem:r,calendar:i}=D.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:n,numberingSystem:r,outputCalendar:i}}toUTC(e=0,n={}){return this.setZone(F.instance(e),n)}toLocal(){return this.setZone(k.defaultZone)}setZone(e,{keepLocalTime:n=!1,keepCalendarTime:r=!1}={}){if(e=q(e,k.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(n||r){let s=e.offset(this.ts),o=this.toObject();[i]=ve(o,s,e)}return G(this,{ts:i,zone:e})}else return t.invalid(de(e))}reconfigure({locale:e,numberingSystem:n,outputCalendar:r}={}){let i=this.loc.clone({locale:e,numberingSystem:n,outputCalendar:r});return G(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let n=Ve(e,tn),{minDaysInFirstWeek:r,startOfWeek:i}=Ut(n,this.loc),s=!y(n.weekYear)||!y(n.weekNumber)||!y(n.weekday),o=!y(n.ordinal),l=!y(n.year),a=!y(n.month)||!y(n.day),u=l||a,c=n.weekYear||n.weekNumber;if((u||o)&&c)throw new H("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&o)throw new H("Can't mix ordinal dates with month/day");let f;s?f=zt({...Le(this.c,r,i),...n},r,i):y(n.ordinal)?(f={...this.toObject(),...n},y(n.day)&&(f.day=Math.min(We(f.year,f.month),f.day))):f=Zt({...Ge(this.c),...n});let[d,m]=ve(f,this.o,this.zone);return G(this,{ts:d,o:m})}plus(e){if(!this.isValid)return this;let n=O.fromDurationLike(e);return G(this,Kt(this,n))}minus(e){if(!this.isValid)return this;let n=O.fromDurationLike(e).negate();return G(this,Kt(this,n))}startOf(e,{useLocaleWeeks:n=!1}={}){if(!this.isValid)return this;let r={},i=O.normalizeUnit(e);switch(i){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(i==="weeks")if(n){let s=this.loc.getStartOfWeek(),{weekday:o}=this;o<s&&(r.weekNumber=this.weekNumber-1),r.weekday=s}else r.weekday=1;if(i==="quarters"){let s=Math.ceil(this.month/3);r.month=(s-1)*3+1}return this.set(r)}endOf(e,n){return this.isValid?this.plus({[e]:1}).startOf(e,n).minus(1):this}toFormat(e,n={}){return this.isValid?D.create(this.loc.redefaultToEN(n)).formatDateTimeFromString(this,e):Je}toLocaleString(e=Fe,n={}){return this.isValid?D.create(this.loc.clone(n),e).formatDateTime(this):Je}toLocaleParts(e={}){return this.isValid?D.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:n=!1,suppressMilliseconds:r=!1,includeOffset:i=!0,extendedZone:s=!1,precision:o="milliseconds"}={}){if(!this.isValid)return null;o=Ie(o);let l=e==="extended",a=Ke(this,l,o);return Ce.indexOf(o)>=3&&(a+="T"),a+=en(this,l,n,r,i,s,o),a}toISODate({format:e="extended",precision:n="day"}={}){return this.isValid?Ke(this,e==="extended",Ie(n)):null}toISOWeekDate(){return Me(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:n=!1,includeOffset:r=!0,includePrefix:i=!1,extendedZone:s=!1,format:o="extended",precision:l="milliseconds"}={}){return this.isValid?(l=Ie(l),(i&&Ce.indexOf(l)>=3?"T":"")+en(this,o==="extended",n,e,r,s,l)):null}toRFC2822(){return Me(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Me(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?Ke(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:n=!1,includeOffsetSpace:r=!0}={}){let i="HH:mm:ss.SSS";return(n||e)&&(r&&(i+=" "),n?i+="z":e&&(i+="ZZ")),Me(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Je}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let n={...this.c};return e.includeConfig&&(n.outputCalendar=this.outputCalendar,n.numberingSystem=this.loc.numberingSystem,n.locale=this.loc.locale),n}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,n="milliseconds",r={}){if(!this.isValid||!e.isValid)return O.invalid("created by diffing an invalid DateTime");let i={locale:this.locale,numberingSystem:this.numberingSystem,...r},s=qr(n).map(O.normalizeUnit),o=e.valueOf()>this.valueOf(),l=o?this:e,a=o?e:this,u=Pi(l,a,s,i);return o?u.negate():u}diffNow(e="milliseconds",n={}){return this.diff(t.now(),e,n)}until(e){return this.isValid?ie.fromDateTimes(this,e):this}hasSame(e,n,r){if(!this.isValid)return!1;let i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(n,r)<=i&&i<=s.endOf(n,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let n=e.base||t.fromObject({},{zone:this.zone}),r=e.padding?this<n?-e.padding:e.padding:0,i=["years","months","days","hours","minutes","seconds"],s=e.unit;return Array.isArray(e.unit)&&(i=e.unit,s=void 0),rn(n,this.plus(r),{...e,numeric:"always",units:i,unit:s})}toRelativeCalendar(e={}){return this.isValid?rn(e.base||t.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(t.isDateTime))throw new x("min requires all arguments be DateTimes");return Yt(e,n=>n.valueOf(),Math.min)}static max(...e){if(!e.every(t.isDateTime))throw new x("max requires all arguments be DateTimes");return Yt(e,n=>n.valueOf(),Math.max)}static fromFormatExplain(e,n,r={}){let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});return tr(o,e,n)}static fromStringExplain(e,n,r={}){return t.fromFormatExplain(e,n,r)}static buildFormatParser(e,n={}){let{locale:r=null,numberingSystem:i=null}=n,s=b.fromOpts({locale:r,numberingSystem:i,defaultToEN:!0});return new Re(s,e)}static fromFormatParser(e,n,r={}){if(y(e)||y(n))throw new x("fromFormatParser requires an input string and a format parser");let{locale:i=null,numberingSystem:s=null}=r,o=b.fromOpts({locale:i,numberingSystem:s,defaultToEN:!0});if(!o.equals(n.locale))throw new x(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${n.locale}`);let{result:l,zone:a,specificOffset:u,invalidReason:c}=n.explainFromTokens(e);return c?t.invalid(c):ee(l,a,r,`format ${n.format}`,e,u)}static get DATE_SHORT(){return Fe}static get DATE_MED(){return on}static get DATE_MED_WITH_WEEKDAY(){return Tr}static get DATE_FULL(){return an}static get DATE_HUGE(){return ln}static get TIME_SIMPLE(){return un}static get TIME_WITH_SECONDS(){return cn}static get TIME_WITH_SHORT_OFFSET(){return fn}static get TIME_WITH_LONG_OFFSET(){return mn}static get TIME_24_SIMPLE(){return hn}static get TIME_24_WITH_SECONDS(){return dn}static get TIME_24_WITH_SHORT_OFFSET(){return yn}static get TIME_24_WITH_LONG_OFFSET(){return gn}static get DATETIME_SHORT(){return wn}static get DATETIME_SHORT_WITH_SECONDS(){return pn}static get DATETIME_MED(){return bn}static get DATETIME_MED_WITH_SECONDS(){return Tn}static get DATETIME_MED_WITH_WEEKDAY(){return kr}static get DATETIME_FULL(){return kn}static get DATETIME_FULL_WITH_SECONDS(){return Sn}static get DATETIME_HUGE(){return xn}static get DATETIME_HUGE_WITH_SECONDS(){return On}};function me(t){if(T.isDateTime(t))return t;if(t&&t.valueOf&&B(t.valueOf()))return T.fromJSDate(t);if(t&&typeof t=="object")return T.fromObject(t);throw new x(`Unknown datetime argument: ${t}, of type ${typeof t}`)}function X(t,e){return t.length?typeof t[0]=="number"?t:t.map(e??(n=>n.close)):[]}function Ye(t,e,n){let r=X(t,n),i=new Array(r.length),s=0,o=0;for(let l=0;l<r.length;l++){let a=r[l];if(isNaN(a)||(s+=a,o++),l>=e){let u=r[l-e];isNaN(u)||(s-=u,o--)}i[l]=o>=e?s/e:NaN}return i}function ke(t,e,n){let r=X(t,n),i=2/(e+1),s=new Array(r.length),o=NaN;for(let l=0;l<r.length;l++){let a=r[l];o=isNaN(o)?a:a*i+o*(1-i),s[l]=o}return s}function qe(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN),s=e*(e+1)/2;for(let o=e-1;o<r.length;o++){let l=0;for(let a=0;a<e;a++)l+=r[o-a]*(e-a);i[o]=l/s}return i}function fs(t,e,n){let r=X(t,n),i=Math.floor(e/2),s=Math.round(Math.sqrt(e)),o=qe(r,i),l=qe(r,e),a=r.map((u,c)=>2*o[c]-l[c]);return qe(a,s)}function He(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN),s=NaN;for(let o=0;o<r.length;o++){let l=r[o];if(isNaN(s)){if(o<e-1)continue;let a=0;for(let u=o-e+1;u<=o;u++)a+=r[u];s=a/e,i[o]=s}else s=(s*(e-1)+l)/e,i[o]=s}return i}function ms(t,e,n){let r=X(t,n),i=new Array(r.length).fill(NaN);for(let s=e-1;s<r.length;s++){let o=0,l=0,a=0,u=0;for(let d=0;d<e;d++){let m=d,g=r[s-(e-1-d)];o+=m,l+=g,a+=m*g,u+=m*m}let c=e,f=(c*a-o*l)/(c*u-o*o);i[s]=(l-f*o)/c+f*(e-1)}return i}function hs(t,e=14){let n=t.length;if(n===0)return[];let r=new Array(n),i=new Array(n);r[0]=0,i[0]=0;for(let a=1;a<n;a++){let u=t[a].close-t[a-1].close;r[a]=u>0?u:0,i[a]=u<0?-u:0}let s=He(r,e),o=He(i,e),l=new Array(n);for(let a=0;a<n;a++)l[a]=isNaN(s[a])?NaN:o[a]===0?100:100-100/(1+s[a]/o[a]);return l}function ds(t,e=14,n=3,r=3){function i(c,f){let d=new Array(c.length).fill(NaN),m=0,g=0;for(let p=0;p<c.length;p++)isNaN(c[p])||(m+=c[p],g++),p>=f&&!isNaN(c[p-f])&&(m-=c[p-f],g--),d[p]=g>0?m/g:NaN;return d}let s=t.length,o=Se(t.map(c=>c.high),e),l=xe(t.map(c=>c.low),e),a=new Array(s).fill(NaN);for(let c=e-1;c<s;c++){let f=o[c],d=l[c];a[c]=f===d?50:(t[c].close-d)/(f-d)*100}let u=i(a,r);return{k:u,d:i(u,n)}}function ys(t,e=12,n=26,r=9){let i=ke(t,e),s=ke(t,n),o=t.length,l=new Array(o);for(let c=0;c<o;c++)l[c]=i[c]-s[c];let a=ke(l,r),u=new Array(o);for(let c=0;c<o;c++)u[c]=l[c]-a[c];return{macd:l,signal:a,histogram:u}}function Dt(t,e=14){return He(sr(t),e)}function sr(t){let e=t.length,n=new Array(e);for(let r=0;r<e;r++){let i=t[r];if(r===0){n[r]=i.high-i.low;continue}let s=t[r-1].close;n[r]=Math.max(i.high-i.low,Math.abs(i.high-s),Math.abs(i.low-s))}return n}function or(t,e){let n=Array.isArray(e)?e:new Array(t.length).fill(e);return t.map((r,i)=>i>0&&r>n[i]&&t[i-1]<=n[i-1])}function ar(t,e){let n=Array.isArray(e)?e:new Array(t.length).fill(e);return t.map((r,i)=>i>0&&r<n[i]&&t[i-1]>=n[i-1])}function gs(t,e){let n=or(t,e),r=ar(t,e);return n.map((i,s)=>i||r[s])}function ws(t,e=1){return t.map((n,r)=>{if(r<e)return!1;for(let i=1;i<=e;i++)if(t[r-i+1]<=t[r-i])return!1;return!0})}function ps(t,e=1){return t.map((n,r)=>{if(r<e)return!1;for(let i=1;i<=e;i++)if(t[r-i+1]>=t[r-i])return!1;return!0})}function bs(t,e=1){return t.map((n,r)=>r<e?NaN:n-t[r-e])}function Ts(t){let e=NaN;return t.map((n,r)=>n?(e=r,0):isNaN(e)?NaN:r-e)}function ks(t,e,n=0){let r=[];return t.map((i,s)=>{i&&r.push(s);let o=r.length-1-n;return o>=0?e[r[o]]:NaN})}function lr(t,e,n){let r=t.length,i=new Array(r).fill(NaN),s=new Array(r),o=0,l=0;for(let a=0;a<r;a++){let u=t[a];if(!isNaN(u)){for(;l>o;){let c=t[s[l-1]];if(n?c<=u:c>=u)l--;else break}s[l++]=a}for(;l>o&&s[o]<=a-e;)o++;a>=e-1&&(i[a]=l>o?t[s[o]]:n?-1/0:1/0)}return i}function Se(t,e){return lr(t,e,!0)}function xe(t,e){return lr(t,e,!1)}function Ss(t,e=5,n=5){let r=t.length,i=new Array(r).fill(NaN);for(let s=e;s<r-n;s++){let o=t[s].high,l=!0;for(let a=s-e;a<=s+n;a++)if(a!==s&&t[a].high>=o){l=!1;break}l&&(i[s]=o)}return i}function xs(t,e=5,n=5){let r=t.length,i=new Array(r).fill(NaN);for(let s=e;s<r-n;s++){let o=t[s].low,l=!0;for(let a=s-e;a<=s+n;a++)if(a!==s&&t[a].low<=o){l=!1;break}l&&(i[s]=o)}return i}function ur(t,e=20,n=2,r=i=>i.close){let i=t.length,s=new Array(i).fill(NaN),o=new Array(i).fill(NaN),l=new Array(i).fill(NaN),a=new Array(i),u=0,c=0;for(let f=0;f<i;f++){let d=r(t[f]);if(a[f]=d,u+=d,c+=d*d,f>=e){let m=a[f-e];u-=m,c-=m*m}if(f>=e-1){let m=u/e,g=Math.sqrt(Math.max(0,c/e-m*m));s[f]=m,o[f]=m+n*g,l[f]=m-n*g}}return{upper:o,mid:s,lower:l}}function Os(t,e=20,n=2){let{upper:r,mid:i,lower:s}=ur(t,e,n);return i.map((o,l)=>isNaN(o)||o===0?NaN:(r[l]-s[l])/o)}function Ns(t,e=20){let n=Se(t.map(i=>i.high),e),r=xe(t.map(i=>i.low),e);return{upper:n,mid:n.map((i,s)=>(i+r[s])/2),lower:r}}function Ds(t,e=20,n=10,r=1.5){let i=ke(t,e),s=Dt(t,n);return{upper:i.map((o,l)=>o+r*s[l]),mid:i,lower:i.map((o,l)=>o-r*s[l])}}function Ms(t,e=0){let n=new Array(t.length).fill(NaN),r=864e5,i=0,s=0,o=NaN;for(let l=0;l<t.length;l++){let a=Number(t[l].ts/1000000n),u=Math.floor((a-e*36e5)/r);u!==o&&(i=0,s=0,o=u);let c=(t[l].high+t[l].low+t[l].close)/3;i+=c*t[l].volume,s+=t[l].volume,n[l]=s===0?NaN:i/s}return n}function vs(t){let e=t.map(n=>(n.high+n.low)/2);return{jaw:Ye(e,13),teeth:Ye(e,8),lips:Ye(e,5)}}function cr(t,e,n){let r=X(t,n),i=r.length,s=new Array(i).fill(NaN),o=0,l=0;for(let a=0;a<i;a++)if(o+=r[a],l+=r[a]*r[a],a>=e&&(o-=r[a-e],l-=r[a-e]*r[a-e]),a>=e-1){let u=o/e;s[a]=Math.sqrt(Math.max(0,l/e-u*u))}return s}function Cs(t,e,n){return cr(t,e,n).map(r=>r*r)}function Is(t,e){function n(i,s){let o=new Array(i.length).fill(NaN),l=0,a=0;for(let u=0;u<i.length;u++)isNaN(i[u])||(l+=i[u],a++),u>=s&&!isNaN(i[u-s])&&(l-=i[u-s],a--),o[u]=a>0?l/a:NaN;return o}let r=n(t,e);return t.map((i,s)=>Math.abs(i-r[s]))}function Es(t,e,n){let r=new Array(t.length).fill(NaN),i=0,s=0;for(let o=0;o<t.length;o++){if(i+=t[o],s+=e[o],o>=n&&(i-=t[o-n],s-=e[o-n]),o<n-1)continue;let l=i/n,a=s/n,u=0,c=0,f=0;for(let m=o-n+1;m<=o;m++){let g=t[m]-l,p=e[m]-a;u+=g*p,c+=g*g,f+=p*p}let d=Math.sqrt(c*f);r[o]=d===0?0:u/d}return r}var Fs=Se,As=xe;function Ls(t,e){let n=new Array(t.length).fill(NaN);for(let r=e-1;r<t.length;r++){let i=t.slice(r-e+1,r+1).sort((o,l)=>o-l),s=Math.floor(e/2);n[r]=e%2===0?(i[s-1]+i[s])/2:i[s]}return n}function Ws(t,e){let n=[];for(let r=0;r<t.length&&r<e.length;r++)!isNaN(e[r])&&isFinite(e[r])&&n.push({t:t[r],price:e[r]});return n}function Vs(t){return t[t.length-1]}function Rs(t,e=0){return t==null||isNaN(t)?e:t}function $s(t,e,n,r=[],i=!1){return{type:"line",pts:t,color:e,width:n,dash:r,connect:i}}function zs(t,e,n,r=[]){return{type:"hline",price:t,color:e,width:n,dash:r}}function Zs(t,e,n=0,r=.2){return{type:"histogram",pts:t,color:e,base:n,gap:r}}function Us(t,e,n,r,i=12,s=!1,o="left",l="middle",a=!1,u=99999){return{type:"label",text:t,x:e,y:n,color:r,fontSize:i,bold:s,horzAlign:o,vertAlign:l,anchored:a,maxWidth:u}}function Ys(t,e,n){return{type:"fill",pts1:t,pts2:e,opts:n}}function qs(t,e,n,r,i={}){return{type:"rect",t1:t,t2:n,price1:e,price2:r,...i}}function Hs(t,e,n,r={}){return{type:"circle",t,price:e,radius:n,...r}}function Bs(t,e,n=1,r=[]){return{type:"vline",t,color:e,width:n,dash:r}}function Ps(t,e,n,r,i=10,s="",o=""){return{type:"arrow",t,price:e,direction:n,color:r,size:i,label:s,labelColor:o||r}}function _s(t,e,n,r,i,s=1,o=[],l="none"){return{type:"trendline",t1:t,price1:e,t2:n,price2:r,color:i,width:s,dash:o,extend:l}}function Gs(t,e,n,r="",i=1){return{type:"band",priceHigh:t,priceLow:e,fillColor:n,borderColor:r,borderWidth:i}}function js(t,e={}){return{type:"polygon",pts:t,...e}}function Js(t,e,n=3){return{type:"dots",pts:t,color:e,radius:n}}function Xs(t,e,n,r,i,s={}){return{type:"badge",t,price:e,text:n,textColor:r,bgColor:i,...s}}function Qs(t){let e=new Array(t.length).fill(0);for(let n=1;n<t.length;n++){let r=t[n].close>t[n-1].close?t[n].volume:t[n].close<t[n-1].close?-t[n].volume:0;e[n]=e[n-1]+r}return e}function Ks(t,e=14){let n=t.length,r=new Array(n).fill(NaN),i=t.map(u=>(u.high+u.low+u.close)/3),s=new Array(n).fill(0),o=new Array(n).fill(0);for(let u=1;u<n;u++){let c=i[u]*t[u].volume;i[u]>i[u-1]?s[u]=c:i[u]<i[u-1]&&(o[u]=c)}let l=0,a=0;for(let u=1;u<n;u++)l+=s[u],a+=o[u],u>e&&(l-=s[u-e],a-=o[u-e]),u>=e&&(r[u]=a===0?100:100-100/(1+l/a));return r}function eo(t,e=20){let n=t.length,r=new Array(n).fill(NaN),i=t.map(o=>(o.high+o.low+o.close)/3),s=0;for(let o=0;o<n;o++){if(s+=i[o],o>=e&&(s-=i[o-e]),o<e-1)continue;let l=s/e,a=0;for(let u=o-e+1;u<=o;u++)a+=Math.abs(i[u]-l);a/=e,r[o]=a===0?0:(i[o]-l)/(.015*a)}return r}function to(t,e=14){let n=t.length,r=new Array(n).fill(NaN),i=Se(t.map(o=>o.high),e),s=xe(t.map(o=>o.low),e);for(let o=e-1;o<n;o++){let l=i[o],a=s[o];r[o]=l===a?-50:(l-t[o].close)/(l-a)*-100}return r}function no(t,e=10,n=3){let r=t.length,i=Dt(t,e),s=new Array(r).fill(NaN),o=new Array(r).fill(NaN),l=new Array(r).fill(1),a=e;if(r<=a)return{trend:l,upper:s,lower:o};s[a]=(t[a].high+t[a].low)/2+n*i[a],o[a]=(t[a].high+t[a].low)/2-n*i[a];for(let u=a+1;u<r;u++){let c=(t[u].high+t[u].low)/2,f=c+n*i[u],d=c-n*i[u],m=t[u-1].close;s[u]=f<s[u-1]||m>s[u-1]?f:s[u-1],o[u]=d>o[u-1]||m<o[u-1]?d:o[u-1],l[u-1]===-1&&t[u].close>s[u-1]?l[u]=1:l[u-1]===1&&t[u].close<o[u-1]?l[u]=-1:l[u]=l[u-1]}return{trend:l,upper:s,lower:o}}function ro(t,e,n){if(t.length===0)return[];let r=[],i=new Array(t.length);for(let a=0;a<t.length;a++)i[a]=Number(t[a].ts/1000000n);let s=a=>{let u=0,c=i.length;for(;u<c;){let f=u+c>>>1;i[f]<a?u=f+1:c=f}return u},o=new Map,l=a=>{let u=o.get(a);if(u)return u;u=[];let c=-1/0;for(let f=0;f<i.length;f++){if(i[f]<c)continue;let d=T.fromMillis(i[f],{zone:a});u.push({year:d.year,month:d.month,day:d.day}),c=d.startOf("day").plus({days:1}).toMillis()}return o.set(a,u),u};for(let a of e){let u=a.tz??n?.tz??"UTC";for(let{year:c,month:f,day:d}of l(u)){let m=T.fromObject({year:c,month:f,day:d,hour:a.startHour,minute:a.startMinute,second:0,millisecond:0},{zone:u}),g=T.fromObject({year:c,month:f,day:d,hour:a.endHour,minute:a.endMinute,second:0,millisecond:0},{zone:u});g<=m&&(g=g.plus({days:1}));let p=m.toMillis(),N=g.toMillis(),A=-1/0,R=1/0;for(let $=s(p);$<i.length&&i[$]<N;$++)t[$].high>A&&(A=t[$].high),t[$].low<R&&(R=t[$].low);A===-1/0||R===1/0||r.push({startTs:BigInt(p)*1000000n,endTs:BigInt(N)*1000000n,high:A,low:R,label:a.label,color:a.color})}}return r.sort((a,u)=>a.startTs<u.startTs?-1:a.startTs>u.startTs?1:0),r}var Mt={sma:Ye,ema:ke,wma:qe,hma:fs,rma:He,linreg:ms,rsi:hs,stoch:ds,macd:ys,atr:Dt,tr:sr,crossover:or,crossunder:ar,cross:gs,rising:ws,falling:ps,change:bs,barssince:Ts,valuewhen:ks,highest:Se,lowest:xe,pivotHigh:Ss,pivotLow:xs,bb:ur,bbw:Os,donchian:Ns,keltner:Ds,vwap:Ms,alligator:vs,stdev:cr,variance:Cs,dev:Is,correlation:Es,max:Fs,min:As,median:Ls,toPoints:Ws,last:Vs,nz:Rs,obv:Qs,mfi:Ks,cci:eo,williamsR:to,supertrend:no,sessionBoundaries:ro,drawLine:$s,drawHLine:zs,drawHistogram:Zs,drawLabel:Us,fillBetween:Ys,drawRect:qs,drawCircle:Hs,drawVLine:Bs,drawArrow:Ps,drawTrendLine:_s,drawBand:Gs,drawPolygon:js,drawDots:Js,drawBadge:Xs};var fr=Object.freeze({indicator:"indicator",drawing:"drawing",chartType:"chart-type",dataSource:"data-source",extension:"extension"}),mr=Object.freeze({mbo:"l3",l3:"l3",l2:"l2",ohlcv:"ohlcv",tick:"tick"}),hr=Object.freeze({overlay:"overlay",pane:"pane"}),dr={PluginType:fr,DataLevel:mr,Layout:hr};function io(t){let e={...dr,Math,console,plugin:t.plugin};for(let[n,r]of Object.entries(Mt))e[n]=r;if(t.shadowNetwork&&(e.fetch=void 0,e.XMLHttpRequest=void 0,e.WebSocket=void 0,e.importScripts=void 0),t.extra)for(let[n,r]of Object.entries(t.extra))e[n]=r;return e}function fo(t,e){let n=io(e),r=Object.keys(n);new Function(...r,`"use strict";
2
+ ${t}`)(...r.map(i=>n[i]))}var mo=(()=>{let t=Object.keys(Mt).sort().join(","),e=2166136261;for(let n=0;n<t.length;n++)e^=t.charCodeAt(n),e=Math.imul(e,16777619);return(e>>>0).toString(16).padStart(8,"0")})();export{mr as DataLevel,hr as Layout,fr as PluginType,dr as SCRIPT_DSL,Mt as STDLIB,mo as STDLIB_SIGNATURE,io as buildScriptScope,fo as evalScriptInScope};
@@ -1,4 +1,4 @@
1
- import type { SymbolIcon as SymbolIconSpec } from '../../interfaces/IDataAdapter';
1
+ import type { SymbolIconSpec } from '../../interfaces/IDataAdapter';
2
2
  interface SymbolIconProps {
3
3
  icon?: SymbolIconSpec;
4
4
  size?: number;
@@ -63,6 +63,7 @@ export type { SessionWindow, SessionStatus } from './SessionUtils';
63
63
  export type { SymbolInfo, SymbolType, SymbolSearchMode, SymbolSearchRequest, SymbolSearchResponse, AdapterCapabilities, TradingSession, TradingSubsession, DayOfWeek, SessionCorrection, PriceFormat, FractionalFormat, ContractSpec, } from '../interfaces/IDataAdapter';
64
64
  /** The built-in matcher, so server-side adapters can rank like the picker does. */
65
65
  export { searchSymbolsLocally, normalizeSymbolSearchResponse } from '../lib/symbol-search';
66
+ export { toTransferableSymbolInfo } from '../lib/symbol-info';
66
67
  export { SessionMapper, createSessionMapper } from './SessionMapper';
67
68
  export type { SessionSegment } from './SessionMapper';
68
69
  export { walkBackMarketNs } from './SessionUtils';
@@ -72,7 +73,12 @@ export { importTradingViewSettings, hasTradingViewSettings, readTradingViewChart
72
73
  export type { TradingViewImportResult } from '../lib/tradingview-import';
73
74
  export { DataAdapterError, makeTimeRange, nsToIso } from '../interfaces/IDataAdapter';
74
75
  export { isoToNs } from '../lib/sampler';
75
- export type { BarPreviewResponse, BarResponse, DataAdapterErrorCode, FetchRequest, PreProcessedPayload, SupplementalBarSet, SymbolIcon, TimeRange, } from '../interfaces/IDataAdapter';
76
+ export { createBook, applyEvent, getBestBid, getBestAsk } from '../lib/book';
77
+ export type { BookState } from '../lib/types';
78
+ export { buildFootprint } from '../lib/types/footprint';
79
+ export type { FootprintLevel, FootprintMode, PriceRange } from '../lib/types/footprint';
80
+ export type { BarPreviewResponse, BarResponse, DataAdapterErrorCode, FetchRequest, PreProcessedPayload, SupplementalBarSet, SymbolIconSpec, TimeRange, } from '../interfaces/IDataAdapter';
81
+ export { SymbolIcon } from '../components/chart/symbol-icon';
76
82
  export type { BottomBarHandle, BottomBarItem, ContextMenuItem, FloatingPanelOpts, NotifyLevel, NotifyOptions, PaneOptions, PluginExecutionSurface, PluginLifecycle, PluginServices, PluginStorage, ServiceApi, ServiceObserver, SettingSchema, SettingSchemaType, ThemeDef, ToolbarItem, } from '../interfaces/plugins/IChartPlugin';
77
83
  export type { ChartTypeActiveContext, ChartTypeKeyEvent, ChartTypePointerEvent, } from '../interfaces/plugins/IChartTypePlugin';
78
84
  export type { AnchorConfig, Point } from '../interfaces/plugins/IDrawingPlugin';
@@ -0,0 +1,53 @@
1
+ import { STDLIB } from '../lib/indicator-stdlib';
2
+ import { PluginType, DataLevel, Layout, SCRIPT_DSL } from './script-dsl';
3
+ export { STDLIB, SCRIPT_DSL, PluginType, DataLevel, Layout };
4
+ export type { OhlcvBar, DrawCommand } from '../lib/indicator-stdlib';
5
+ export interface ScriptScopeOptions {
6
+ /** What the script's `plugin({...})` call resolves to. */
7
+ plugin: (decl: unknown) => unknown;
8
+ /**
9
+ * Shadow fetch/XMLHttpRequest/WebSocket/importScripts to undefined.
10
+ *
11
+ * True for the worker and the server, where script code has no business
12
+ * reaching the network - it goes through ctx.fetch on the main thread, which
13
+ * is gated on the manifest's declared origins. False on the main thread,
14
+ * where those globals are the page's own and blanking them would break the
15
+ * handlers that legitimately hold a ctx.
16
+ *
17
+ * This is a guardrail, not a sandbox: shadowing a scope variable does not
18
+ * stop `globalThis.fetch` or `Function("return this")()`. The security
19
+ * boundary is the isolate the script runs in - a dedicated worker in the
20
+ * browser, and a dedicated isolate (or container) on the server. Never rely
21
+ * on this flag to contain code you do not trust.
22
+ */
23
+ shadowNetwork?: boolean;
24
+ /** Extra bindings for the calling host, e.g. a strategy runner's `broker`. */
25
+ extra?: Record<string, unknown>;
26
+ }
27
+ /**
28
+ * The globals a user script sees, as a plain object. Callers turn it into a
29
+ * scope by splatting the keys into a `new Function(...keys, src)(...values)`.
30
+ */
31
+ export declare function buildScriptScope(opts: ScriptScopeOptions): Record<string, unknown>;
32
+ /**
33
+ * Evaluates a user script against a scope built from `opts`.
34
+ *
35
+ * The whole script goes into one function body, so its top-level consts and
36
+ * helper declarations stay visible to init/update/draw the way they would in a
37
+ * module. Registration happens as a side effect of the `plugin()` calls the
38
+ * script makes while evaluating.
39
+ */
40
+ export declare function evalScriptInScope(src: string, opts: ScriptScopeOptions): void;
41
+ /**
42
+ * Identifies the stdlib surface this build exposes, for a client and a server
43
+ * runner to agree they are talking about the same one.
44
+ *
45
+ * It hashes the sorted helper *names*, which survive minification (esbuild does
46
+ * not rename object literal keys), so a minified client and an unminified server
47
+ * built from the same version agree. It therefore catches the failure that
48
+ * actually bites - a server missing a helper the client's editor offered,
49
+ * surfacing as a ReferenceError from inside user code - and does not catch a
50
+ * changed implementation of a helper that kept its name. Pin the package version
51
+ * for that; this is a guard against deploy skew, not a substitute for the pin.
52
+ */
53
+ export declare const STDLIB_SIGNATURE: string;
@@ -85,7 +85,7 @@ export interface ContractSpec {
85
85
  /** True for continuous/front-month contracts (/NQ1 etc.) */
86
86
  continuous?: boolean;
87
87
  }
88
- export type SymbolIcon =
88
+ export type SymbolIconSpec =
89
89
  /** Shorthand for { src }. */
90
90
  string
91
91
  /** Image URL, data: URI, or imported SVG path. */
@@ -117,8 +117,8 @@ export interface SymbolInfo {
117
117
  /** Data level this adapter produces. */
118
118
  dataLevel: DataLevel;
119
119
  /** Icon for this symbol. */
120
- icon?: SymbolIcon;
121
- legendIcon?: SymbolIcon;
120
+ icon?: SymbolIconSpec;
121
+ legendIcon?: SymbolIconSpec;
122
122
  /**
123
123
  * Price formatting. When omitted, tickSize is used as a fallback for
124
124
  * minTick and precision is inferred from it.
@@ -2,7 +2,7 @@ import type { SymbolInfo } from '../interfaces/IDataAdapter';
2
2
  /**
3
3
  * A structured-clone-safe copy of a SymbolInfo, with `icon` stripped.
4
4
  *
5
- * `SymbolIcon` may carry a `render` callback, and functions cannot cross a
5
+ * `SymbolIconSpec` may carry a `render` callback, and functions cannot cross a
6
6
  * `postMessage` boundary - the clone throws before the worker ever sees it.
7
7
  * Icons are a presentation concern, so nothing off the main thread needs them.
8
8
  *