@powerhousedao/connect 3.3.0-dev.3 → 3.3.0-dev.4
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.
- package/dist/assets/{AddDriveModal.BWLDv9-A.js → AddDriveModal.CJPjKF1s.js} +2 -2
- package/dist/assets/{AddDriveModal.BWLDv9-A.js.map → AddDriveModal.CJPjKF1s.js.map} +1 -1
- package/dist/assets/{AddLocalDriveModal.BJL0ePdk.js → AddLocalDriveModal.BAkHn56-.js} +2 -2
- package/dist/assets/{AddLocalDriveModal.BJL0ePdk.js.map → AddLocalDriveModal.BAkHn56-.js.map} +1 -1
- package/dist/assets/{AddRemoteDriveModal.DLdo_wgd.js → AddRemoteDriveModal.BeBjr_Gc.js} +2 -2
- package/dist/assets/{AddRemoteDriveModal.DLdo_wgd.js.map → AddRemoteDriveModal.BeBjr_Gc.js.map} +1 -1
- package/dist/assets/{ConfirmationModal.BVWHyq8I.js → ConfirmationModal.C1UZuSFY.js} +2 -2
- package/dist/assets/{ConfirmationModal.BVWHyq8I.js.map → ConfirmationModal.C1UZuSFY.js.map} +1 -1
- package/dist/assets/{CookiesPolicyModal.DTMmXTXa.js → CookiesPolicyModal.B-ZxNrOu.js} +2 -2
- package/dist/assets/{CookiesPolicyModal.DTMmXTXa.js.map → CookiesPolicyModal.B-ZxNrOu.js.map} +1 -1
- package/dist/assets/{CreateDocumentModal.CKf9_npU.js → CreateDocumentModal.CpHnFnUJ.js} +2 -2
- package/dist/assets/{CreateDocumentModal.CKf9_npU.js.map → CreateDocumentModal.CpHnFnUJ.js.map} +1 -1
- package/dist/assets/{DebugSettingsModal.DXakhKUJ.js → DebugSettingsModal.D3A_JtOs.js} +2 -2
- package/dist/assets/{DebugSettingsModal.DXakhKUJ.js.map → DebugSettingsModal.D3A_JtOs.js.map} +1 -1
- package/dist/assets/{DeleteDriveModal.Bbpouoff.js → DeleteDriveModal.D8Ch4AyV.js} +2 -2
- package/dist/assets/{DeleteDriveModal.Bbpouoff.js.map → DeleteDriveModal.D8Ch4AyV.js.map} +1 -1
- package/dist/assets/{DeleteItemModal.De0DPxV8.js → DeleteItemModal.DqemXyAD.js} +2 -2
- package/dist/assets/{DeleteItemModal.De0DPxV8.js.map → DeleteItemModal.DqemXyAD.js.map} +1 -1
- package/dist/assets/{DisclaimerModal.BiQFbwZ6.js → DisclaimerModal.Cz1xkiPi.js} +2 -2
- package/dist/assets/{DisclaimerModal.BiQFbwZ6.js.map → DisclaimerModal.Cz1xkiPi.js.map} +1 -1
- package/dist/assets/{DriveSettingsModal.DF2Lz9YO.js → DriveSettingsModal.BS8aHEgW.js} +2 -2
- package/dist/assets/{DriveSettingsModal.DF2Lz9YO.js.map → DriveSettingsModal.BS8aHEgW.js.map} +1 -1
- package/dist/assets/{SettingsModal.0rI7lRqF.js → SettingsModal.Csoz4048.js} +2 -2
- package/dist/assets/{SettingsModal.0rI7lRqF.js.map → SettingsModal.Csoz4048.js.map} +1 -1
- package/dist/assets/{Trans.9WMVTRYl.js → Trans.LIVu639i.js} +2 -2
- package/dist/assets/{Trans.9WMVTRYl.js.map → Trans.LIVu639i.js.map} +1 -1
- package/dist/assets/{UpgradeDriveModal.Dglc4A67.js → UpgradeDriveModal.CNx8GF4J.js} +2 -2
- package/dist/assets/{UpgradeDriveModal.Dglc4A67.js.map → UpgradeDriveModal.CNx8GF4J.js.map} +1 -1
- package/dist/assets/app-skeleton.js +1 -1
- package/dist/assets/{app.Brcw_g_p.js → app.BdxMoAAL.js} +5 -5
- package/dist/assets/app.BdxMoAAL.js.map +1 -0
- package/dist/assets/{atlas-import.CjA9uDEt.js → atlas-import.BaW3Y7_S.js} +2 -2
- package/dist/assets/{atlas-import.CjA9uDEt.js.map → atlas-import.BaW3Y7_S.js.map} +1 -1
- package/dist/assets/{connect.config._A2guXhv.js → connect.config.CzMoERNI.js} +2 -2
- package/dist/assets/{connect.config._A2guXhv.js.map → connect.config.CzMoERNI.js.map} +1 -1
- package/dist/assets/{content.mtsZfVv6.js → content.BtkNuaBR.js} +3 -3
- package/dist/assets/{content.mtsZfVv6.js.map → content.BtkNuaBR.js.map} +1 -1
- package/dist/assets/{cookie-banner.7WqE8VdG.js → cookie-banner.CQakPLqU.js} +2 -2
- package/dist/assets/{cookie-banner.7WqE8VdG.js.map → cookie-banner.CQakPLqU.js.map} +1 -1
- package/dist/assets/{home.CHwcgR2d.js → home.CRGUjEn-.js} +2 -2
- package/dist/assets/{home.CHwcgR2d.js.map → home.CRGUjEn-.js.map} +1 -1
- package/dist/assets/{index.BGemDCBc.js → index.BcBVmRI8.js} +3 -3
- package/dist/assets/{index.BGemDCBc.js.map → index.BcBVmRI8.js.map} +1 -1
- package/dist/assets/{index.UWl3P2EU.js → index.C03E0kfk.js} +2 -2
- package/dist/assets/{index.UWl3P2EU.js.map → index.C03E0kfk.js.map} +1 -1
- package/dist/assets/{index.BvX7i3ya.js → index.CCtK4G2j.js} +2 -2
- package/dist/assets/{index.BvX7i3ya.js.map → index.CCtK4G2j.js.map} +1 -1
- package/dist/assets/{index.Dwexo_zk.js → index.CsZYy69M.js} +3 -3
- package/dist/assets/{index.Dwexo_zk.js.map → index.CsZYy69M.js.map} +1 -1
- package/dist/assets/{index.Q6GFaI_V.js → index.DQ6Y_BFS.js} +2 -2
- package/dist/assets/{index.Q6GFaI_V.js.map → index.DQ6Y_BFS.js.map} +1 -1
- package/dist/assets/{index.DE5r83gK.js → index.DUXGJnxw.js} +2 -2
- package/dist/assets/{index.DE5r83gK.js.map → index.DUXGJnxw.js.map} +1 -1
- package/dist/assets/{index.DWdwQnZG.js → index.DbzMt0Q8.js} +2 -2
- package/dist/assets/{index.DWdwQnZG.js.map → index.DbzMt0Q8.js.map} +1 -1
- package/dist/assets/{index.C_GzfUCS.js → index.IOLzgUZt.js} +2 -2
- package/dist/assets/{index.C_GzfUCS.js.map → index.IOLzgUZt.js.map} +1 -1
- package/dist/assets/{main.DaM0PlWx.js → main.Dmte0hti.js} +3 -3
- package/dist/assets/{main.DaM0PlWx.js.map → main.Dmte0hti.js.map} +1 -1
- package/dist/assets/{modal.BFkV0xND.js → modal.BbdrOfry.js} +3 -3
- package/dist/assets/{modal.BFkV0xND.js.map → modal.BbdrOfry.js.map} +1 -1
- package/dist/assets/{modals.B3lvHv29.js → modals.BuTWliYF.js} +2 -2
- package/dist/assets/{modals.B3lvHv29.js.map → modals.BuTWliYF.js.map} +1 -1
- package/dist/assets/{nodefs.DfCwvm03.js → nodefs.Dt53RQvO.js} +2 -2
- package/dist/assets/{nodefs.DfCwvm03.js.map → nodefs.Dt53RQvO.js.map} +1 -1
- package/dist/assets/{opfs-ahp.DhpsuWfZ.js → opfs-ahp.CO8kl4hl.js} +2 -2
- package/dist/assets/{opfs-ahp.DhpsuWfZ.js.map → opfs-ahp.CO8kl4hl.js.map} +1 -1
- package/dist/assets/{react-error-boundary.esm.BdKfLyaR.js → react-error-boundary.esm.DHp-mKwc.js} +2 -2
- package/dist/assets/{react-error-boundary.esm.BdKfLyaR.js.map → react-error-boundary.esm.DHp-mKwc.js.map} +1 -1
- package/dist/assets/{registerServiceWorker.w3jaNxQm.js → registerServiceWorker.C2QkuGt_.js} +2 -2
- package/dist/assets/{registerServiceWorker.w3jaNxQm.js.map → registerServiceWorker.C2QkuGt_.js.map} +1 -1
- package/dist/assets/{root.C9pGPT_U.js → root.OJGI0z2p.js} +2 -2
- package/dist/assets/{root.C9pGPT_U.js.map → root.OJGI0z2p.js.map} +1 -1
- package/dist/assets/{toast.CJBPfWGX.js → toast.BwLkWP-U.js} +2 -2
- package/dist/assets/{toast.CJBPfWGX.js.map → toast.BwLkWP-U.js.map} +1 -1
- package/dist/assets/{useAcceptedCookies.B2E2vhVo.js → useAcceptedCookies.Be0ZV09a.js} +2 -2
- package/dist/assets/{useAcceptedCookies.B2E2vhVo.js.map → useAcceptedCookies.Be0ZV09a.js.map} +1 -1
- package/dist/assets/useConnectConfig.DZ65pVmg.js +2 -0
- package/dist/assets/{useConnectConfig.CwkmyF48.js.map → useConnectConfig.DZ65pVmg.js.map} +1 -1
- package/dist/assets/useDefaultDocumentModelEditor.CdkEVA6g.js +2 -0
- package/dist/assets/{useDefaultDocumentModelEditor.DcbpTZSv.js.map → useDefaultDocumentModelEditor.CdkEVA6g.js.map} +1 -1
- package/dist/assets/{useDocumentDriveServer.ArDMFxnb.js → useDocumentDriveServer.6V2gzdbc.js} +2 -2
- package/dist/assets/{useDocumentDriveServer.ArDMFxnb.js.map → useDocumentDriveServer.6V2gzdbc.js.map} +1 -1
- package/dist/assets/{useFeatureFlags.BTVpX3W5.js → useFeatureFlags.Dk1vb5i-.js} +2 -2
- package/dist/assets/{useFeatureFlags.BTVpX3W5.js.map → useFeatureFlags.Dk1vb5i-.js.map} +1 -1
- package/dist/assets/{user.DBQJIPxu.js → user.zVDczLr_.js} +4 -4
- package/dist/assets/{user.DBQJIPxu.js.map → user.zVDczLr_.js.map} +1 -1
- package/dist/index.html +1 -1
- package/dist/vite-envs.sh +1 -1
- package/package.json +9 -9
- package/dist/assets/app.Brcw_g_p.js.map +0 -1
- package/dist/assets/useConnectConfig.CwkmyF48.js +0 -2
- package/dist/assets/useDefaultDocumentModelEditor.DcbpTZSv.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.
|
|
2
|
-
var rT=Object.defineProperty;var nT=(r,e,t)=>e in r?rT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ve=(r,e,t)=>nT(r,typeof e!="symbol"?e+"":e,t);import{jsxs as Ht,jsx as Re,Fragment as CC}from"react/jsx-runtime";import{r as $e,d as zt,p as we,g as iT,U as EC,e as sT,Q as oT,f as aT,h as uT,i as lT,j as SC,k as yn,l as cT,I as hT,_ as ht,m as Ur,R as fT,b as Ef,a as dT,n as pT,o as mT,W as gT,T as yT,q as bT}from"./index.BGemDCBc.js";import*as de from"react";import Or,{useMemo as uf,useEffect as st,useState as vd,createContext as wT,useContext as vT,useRef as Sf,Suspense as Cr}from"react";import{c as Fe}from"./connect.config._A2guXhv.js";import{e as _T,u as CT}from"./user.DBQJIPxu.js";import{u as ET,a as ST,d as _d,r as TC}from"./useFeatureFlags.BTVpX3W5.js";import{a as TT,u as qT,b as lf}from"./index.Dwexo_zk.js";import{u as qC}from"./useAcceptedCookies.B2E2vhVo.js";import{u as AT}from"./useConnectConfig.CwkmyF48.js";import*as OT from"react-dom";import{l as RT,D as NT,a as IT,R as xT,c as $T,b as PT,u as kT,E as LT,m as MT,d as AC,e as DT,f as jT,g as FT,h as BT}from"./index.CAUjMUXb.js";import{s as UT}from"./registerServiceWorker.w3jaNxQm.js";class OC{get prefix(){return""}push(e){}pop(){}popAndReturn(e){return e}async record(e,t){return await t()}recordSync(e,t){return t()}}var cn;(function(r){r[r.AnalyticsPath=0]="AnalyticsPath",r[r.AnalyticsPathSegment=1]="AnalyticsPathSegment",r[r.AnalyticsPeriod=2]="AnalyticsPeriod"})(cn||(cn={}));var Cd;(function(r){r[r.Year=0]="Year",r[r.Quarter=1]="Quarter",r[r.Month=2]="Month"})(Cd||(Cd={}));class it{constructor(e){ve(this,"_segments");this._segments=e}get segments(){return this._segments}static fromString(e){const t=un(e,"/").map(n=>Qe.fromString(n));return new it(t)}static fromStringArray(e){return new it(e.map(t=>Qe.fromString(t)))}static fromArray(e){return new it(e)}static fromJSON(e){const t=e._v.split("/").map(n=>Qe.fromString(n));return new it(t)}toJSON(){return{_t:cn.AnalyticsPath,_v:this.toString()}}toString(e=""){return this._segments.map(t=>t.toString()).join("/")+e}firstSegment(){return this._segments.length>0?this._segments[0]:new Qe}reduce(){const e=this._segments.slice(1);return e.length<1&&e.push(new Qe),new it(e)}applyLod(e){const t=[...this._segments];for(;t.length<e;)t.push(new Qe);return new it(t.slice(0,e))}}class Qe{constructor(e=null,t=[]){ve(this,"_filters",null);ve(this,"_groups",null);this._filters=e,this._groups=t}get filters(){return this._filters}get groups(){return this._groups}static fromString(e){const t=un(e,":");let n;t[0]==="*"?n=null:n=un(t[0],",").map(a=>Qe.unescape(a));let i;return t[1]===void 0||t[1].length<1?i=[]:t[1]==="*"?i=null:i=un(t[1],",").map(a=>Qe.unescape(a)),new Qe(n,i)}static escape(e){return e.replace(/(\\|:|\/|,)/gi,"\\$1")}static unescape(e){return e.replace(/\\(.)/gi,"$1")}toJSON(){return{_t:cn.AnalyticsPathSegment,_v:this.toString()}}toString(){let e="";return this._filters===null?e+="*":e+=this._filters.map(t=>Qe.escape(t)).join(","),this._groups===null?e+=":*":this._groups.length>0&&(e+=":"+this._groups.map(t=>Qe.escape(t)).join(",")),e}}const VT={":":new RegExp("(?<!\\\\):"),",":new RegExp("(?<!\\\\),"),"/":new RegExp("(?<!\\\\)\\/")};function un(r,e){let t="@@";for(;r.indexOf(t)>-1;)t+="@";return r.replaceAll("\\\\",t).split(VT[e]).map(n=>n.replaceAll(t,"\\\\"))}var Ed;(function(r){r[r.Budget=0]="Budget",r[r.Forecast=1]="Forecast",r[r.Actuals=2]="Actuals",r[r.PaymentsOnChain=3]="PaymentsOnChain",r[r.PaymentsOffChainIncluded=4]="PaymentsOffChainIncluded",r[r.FTEs=5]="FTEs"})(Ed||(Ed={}));var je;(function(r){r[r.VectorAdd=0]="VectorAdd",r[r.VectorSubtract=1]="VectorSubtract",r[r.ScalarMultiply=2]="ScalarMultiply",r[r.ScalarDivide=3]="ScalarDivide"})(je||(je={}));var nt;(function(r){r[r.Total=0]="Total",r[r.Annual=1]="Annual",r[r.SemiAnnual=2]="SemiAnnual",r[r.Quarterly=3]="Quarterly",r[r.Monthly=4]="Monthly",r[r.Weekly=5]="Weekly",r[r.Daily=6]="Daily",r[r.Hourly=7]="Hourly"})(nt||(nt={}));class At extends Error{}class QT extends At{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class WT extends At{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class HT extends At{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Gt extends At{}class RC extends At{constructor(e){super(`Invalid unit ${e}`)}}class Le extends At{}class gt extends At{constructor(){super("Zone is an abstract class")}}const ie="numeric",et="short",Be="long",hn={year:ie,month:ie,day:ie},NC={year:ie,month:et,day:ie},zT={year:ie,month:et,day:ie,weekday:et},IC={year:ie,month:Be,day:ie},xC={year:ie,month:Be,day:ie,weekday:Be},$C={hour:ie,minute:ie},PC={hour:ie,minute:ie,second:ie},kC={hour:ie,minute:ie,second:ie,timeZoneName:et},LC={hour:ie,minute:ie,second:ie,timeZoneName:Be},MC={hour:ie,minute:ie,hourCycle:"h23"},DC={hour:ie,minute:ie,second:ie,hourCycle:"h23"},jC={hour:ie,minute:ie,second:ie,hourCycle:"h23",timeZoneName:et},FC={hour:ie,minute:ie,second:ie,hourCycle:"h23",timeZoneName:Be},BC={year:ie,month:ie,day:ie,hour:ie,minute:ie},UC={year:ie,month:ie,day:ie,hour:ie,minute:ie,second:ie},VC={year:ie,month:et,day:ie,hour:ie,minute:ie},QC={year:ie,month:et,day:ie,hour:ie,minute:ie,second:ie},GT={year:ie,month:et,day:ie,weekday:et,hour:ie,minute:ie},WC={year:ie,month:Be,day:ie,hour:ie,minute:ie,timeZoneName:et},HC={year:ie,month:Be,day:ie,hour:ie,minute:ie,second:ie,timeZoneName:et},zC={year:ie,month:Be,day:ie,weekday:Be,hour:ie,minute:ie,timeZoneName:Be},GC={year:ie,month:Be,day:ie,weekday:Be,hour:ie,minute:ie,second:ie,timeZoneName:Be};class Rr{get type(){throw new gt}get name(){throw new gt}get ianaName(){return this.name}get isUniversal(){throw new gt}offsetName(e,t){throw new gt}formatOffset(e,t){throw new gt}offset(e){throw new gt}equals(e){throw new gt}get isValid(){throw new gt}}let Yn=null;class bn extends Rr{static get instance(){return Yn===null&&(Yn=new bn),Yn}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return sE(e,t,n)}formatOffset(e,t){return qr(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const cf=new Map;function JT(r){let e=cf.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),cf.set(r,e)),e}const KT={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function YT(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,a,o,s,l,u,h]=n;return[o,i,a,s,l,u,h]}function ZT(r,e){const t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){const{type:a,value:o}=t[i],s=KT[a];a==="era"?n[s]=o:ce(s)||(n[s]=parseInt(o,10))}return n}const Zn=new Map;class ft extends Rr{static create(e){let t=Zn.get(e);return t===void 0&&Zn.set(e,t=new ft(e)),t}static resetCache(){Zn.clear(),cf.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=ft.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return sE(e,t,n,this.name)}formatOffset(e,t){return qr(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=JT(this.name);let[i,a,o,s,l,u,h]=n.formatToParts?ZT(n,t):YT(n,t);s==="BC"&&(i=-Math.abs(i)+1);const f=vn({year:i,month:a,day:o,hour:l===24?0:l,minute:u,second:h,millisecond:0});let d=+t;const w=d%1e3;return d-=w>=0?w:1e3+w,(f-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Sd={};function XT(r,e={}){const t=JSON.stringify([r,e]);let n=Sd[t];return n||(n=new Intl.ListFormat(r,e),Sd[t]=n),n}const hf=new Map;function ff(r,e={}){const t=JSON.stringify([r,e]);let n=hf.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),hf.set(t,n)),n}const df=new Map;function eq(r,e={}){const t=JSON.stringify([r,e]);let n=df.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),df.set(t,n)),n}const pf=new Map;function tq(r,e={}){const{base:t,...n}=e,i=JSON.stringify([r,n]);let a=pf.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(r,e),pf.set(i,a)),a}let Er=null;function rq(){return Er||(Er=new Intl.DateTimeFormat().resolvedOptions().locale,Er)}const mf=new Map;function JC(r){let e=mf.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),mf.set(r,e)),e}const gf=new Map;function nq(r){let e=gf.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...KC,...e}),gf.set(r,e)}return e}function iq(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=ff(r).resolvedOptions(),i=r}catch{const l=r.substring(0,t);n=ff(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=n;return[i,a,o]}}function sq(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function oq(r){const e=[];for(let t=1;t<=12;t++){const n=ue.utc(2009,t,1);e.push(r(n))}return e}function aq(r){const e=[];for(let t=1;t<=7;t++){const n=ue.utc(2016,11,13+t);e.push(r(n))}return e}function Vr(r,e,t,n){const i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function uq(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||JC(r.locale).numberingSystem==="latn"}class lq{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:a,...o}=n;if(!t||Object.keys(o).length>0){const s={useGrouping:!1,...n};n.padTo>0&&(s.minimumIntegerDigits=n.padTo),this.inf=eq(e,s)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Rf(e,3);return xe(t,this.padTo)}}}class cq{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ft.create(s).valid?(i=s,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);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=ff(t,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class hq{constructor(e,t,n){this.opts={style:"long",...n},!t&&nE()&&(this.rtf=tq(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):$q(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const KC={firstDay:1,minimalDays:4,weekend:[6,7]};class _e{static fromOpts(e){return _e.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,a=!1){const o=e||Ne.defaultLocale,s=o||(a?"en-US":rq()),l=t||Ne.defaultNumberingSystem,u=n||Ne.defaultOutputCalendar,h=bf(i)||Ne.defaultWeekSettings;return new _e(s,l,u,h,o)}static resetCache(){Er=null,hf.clear(),df.clear(),pf.clear(),mf.clear(),gf.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return _e.create(e,t,n,i)}constructor(e,t,n,i,a){const[o,s,l]=iq(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||l||null,this.weekSettings=i,this.intl=sq(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=uq(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_e.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,bf(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Vr(this,e,uE,()=>{const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=oq(a=>this.extract(a,n,"month"))),this.monthsCache[i][e]})}weekdays(e,t=!1){return Vr(this,e,hE,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=aq(a=>this.extract(a,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Vr(this,void 0,()=>fE,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ue.utc(2016,11,13,9),ue.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Vr(this,e,dE,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[ue.utc(-40,1,1),ue.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const i=this.dtFormatter(e,t),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===n);return o?o.value:null}numberFormatter(e={}){return new lq(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new cq(e,this.intl,t)}relFormatter(e={}){return new hq(this.intl,this.isEnglish(),e)}listFormatter(e={}){return XT(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||JC(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:iE()?nq(this.locale):KC}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Xn=null;class De extends Rr{static get utcInstance(){return Xn===null&&(Xn=new De(0)),Xn}static instance(e){return e===0?De.utcInstance:new De(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new De(_n(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${qr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${qr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return qr(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class fq extends Rr{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 wt(r,e){if(ce(r)||r===null)return e;if(r instanceof Rr)return r;if(bq(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?bn.instance:t==="utc"||t==="gmt"?De.utcInstance:De.parseSpecifier(t)||ft.create(r)}else return vt(r)?De.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new fq(r)}const Tf={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Td={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]},dq=Tf.hanidec.replace(/[\[|\]]/g,"").split("");function pq(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Tf.hanidec)!==-1)e+=dq.indexOf(r[t]);else for(const i in Td){const[a,o]=Td[i];n>=a&&n<=o&&(e+=n-a)}}return parseInt(e,10)}else return e}const yf=new Map;function mq(){yf.clear()}function Ke({numberingSystem:r},e=""){const t=r||"latn";let n=yf.get(t);n===void 0&&(n=new Map,yf.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${Tf[t]}${e}`),n.set(e,i)),i}let qd=()=>Date.now(),Ad="system",Od=null,Rd=null,Nd=null,Id=60,xd,$d=null;class Ne{static get now(){return qd}static set now(e){qd=e}static set defaultZone(e){Ad=e}static get defaultZone(){return wt(Ad,bn.instance)}static get defaultLocale(){return Od}static set defaultLocale(e){Od=e}static get defaultNumberingSystem(){return Rd}static set defaultNumberingSystem(e){Rd=e}static get defaultOutputCalendar(){return Nd}static set defaultOutputCalendar(e){Nd=e}static get defaultWeekSettings(){return $d}static set defaultWeekSettings(e){$d=bf(e)}static get twoDigitCutoffYear(){return Id}static set twoDigitCutoffYear(e){Id=e%100}static get throwOnInvalid(){return xd}static set throwOnInvalid(e){xd=e}static resetCaches(){_e.resetCache(),ft.resetCache(),ue.resetCache(),mq()}}class Xe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const YC=[0,31,59,90,120,151,181,212,243,273,304,334],ZC=[0,31,60,91,121,152,182,213,244,274,305,335];function We(r,e){return new Xe("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function qf(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return i===0?7:i}function XC(r,e,t){return t+(Nr(r)?ZC:YC)[e-1]}function eE(r,e){const t=Nr(r)?ZC:YC,n=t.findIndex(a=>a<e),i=e-t[n];return{month:n+1,day:i}}function Af(r,e){return(r-e+7)%7+1}function fn(r,e=4,t=1){const{year:n,month:i,day:a}=r,o=XC(n,i,a),s=Af(qf(n,i,a),t);let l=Math.floor((o-s+14-e)/7),u;return l<1?(u=n-1,l=Ar(u,e,t)):l>Ar(n,e,t)?(u=n+1,l=1):u=n,{weekYear:u,weekNumber:l,weekday:s,...Cn(r)}}function Pd(r,e=4,t=1){const{weekYear:n,weekNumber:i,weekday:a}=r,o=Af(qf(n,1,e),t),s=Jt(n);let l=i*7+a-o-7+e,u;l<1?(u=n-1,l+=Jt(u)):l>s?(u=n+1,l-=Jt(n)):u=n;const{month:h,day:c}=eE(u,l);return{year:u,month:h,day:c,...Cn(r)}}function ei(r){const{year:e,month:t,day:n}=r,i=XC(e,t,n);return{year:e,ordinal:i,...Cn(r)}}function kd(r){const{year:e,ordinal:t}=r,{month:n,day:i}=eE(e,t);return{year:e,month:n,day:i,...Cn(r)}}function Ld(r,e){if(!ce(r.localWeekday)||!ce(r.localWeekNumber)||!ce(r.localWeekYear)){if(!ce(r.weekday)||!ce(r.weekNumber)||!ce(r.weekYear))throw new Gt("Cannot mix locale-based week fields with ISO-based week fields");return ce(r.localWeekday)||(r.weekday=r.localWeekday),ce(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),ce(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gq(r,e=4,t=1){const n=wn(r.weekYear),i=He(r.weekNumber,1,Ar(r.weekYear,e,t)),a=He(r.weekday,1,7);return n?i?a?!1:We("weekday",r.weekday):We("week",r.weekNumber):We("weekYear",r.weekYear)}function yq(r){const e=wn(r.year),t=He(r.ordinal,1,Jt(r.year));return e?t?!1:We("ordinal",r.ordinal):We("year",r.year)}function tE(r){const e=wn(r.year),t=He(r.month,1,12),n=He(r.day,1,dn(r.year,r.month));return e?t?n?!1:We("day",r.day):We("month",r.month):We("year",r.year)}function rE(r){const{hour:e,minute:t,second:n,millisecond:i}=r,a=He(e,0,23)||e===24&&t===0&&n===0&&i===0,o=He(t,0,59),s=He(n,0,59),l=He(i,0,999);return a?o?s?l?!1:We("millisecond",i):We("second",n):We("minute",t):We("hour",e)}function ce(r){return typeof r>"u"}function vt(r){return typeof r=="number"}function wn(r){return typeof r=="number"&&r%1===0}function bq(r){return typeof r=="string"}function wq(r){return Object.prototype.toString.call(r)==="[object Date]"}function nE(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function iE(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function vq(r){return Array.isArray(r)?r:[r]}function Md(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{const a=[e(i),i];return n&&t(n[0],a[0])===n[0]?n:a},null)[1]}function _q(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function Yt(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function bf(r){if(r==null)return null;if(typeof r!="object")throw new Le("Week settings must be an object");if(!He(r.firstDay,1,7)||!He(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!He(e,1,7)))throw new Le("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function He(r,e,t){return wn(r)&&r>=e&&r<=t}function Cq(r,e){return r-e*Math.floor(r/e)}function xe(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function bt(r){if(!(ce(r)||r===null||r===""))return parseInt(r,10)}function Et(r){if(!(ce(r)||r===null||r===""))return parseFloat(r)}function Of(r){if(!(ce(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function Rf(r,e,t=!1){const n=10**e;return(t?Math.trunc:Math.round)(r*n)/n}function Nr(r){return r%4===0&&(r%100!==0||r%400===0)}function Jt(r){return Nr(r)?366:365}function dn(r,e){const t=Cq(e-1,12)+1,n=r+(e-t)/12;return t===2?Nr(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function vn(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function Dd(r,e,t){return-Af(qf(r,1,e),t)+e-1}function Ar(r,e=4,t=1){const n=Dd(r,e,t),i=Dd(r+1,e,t);return(Jt(r)-n+i)/7}function wf(r){return r>99?r:r>Ne.twoDigitCutoffYear?1900+r:2e3+r}function sE(r,e,t,n=null){const i=new Date(r),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(a.timeZone=n);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(t,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function _n(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function oE(r){const e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new Le(`Invalid unit value ${r}`);return e}function pn(r,e){const t={};for(const n in r)if(Yt(r,n)){const i=r[n];if(i==null)continue;t[e(n)]=oE(i)}return t}function qr(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${xe(t,2)}:${xe(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${xe(t,2)}${xe(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Cn(r){return _q(r,["hour","minute","second","millisecond"])}const Eq=["January","February","March","April","May","June","July","August","September","October","November","December"],aE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Sq=["J","F","M","A","M","J","J","A","S","O","N","D"];function uE(r){switch(r){case"narrow":return[...Sq];case"short":return[...aE];case"long":return[...Eq];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}}const lE=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],cE=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tq=["M","T","W","T","F","S","S"];function hE(r){switch(r){case"narrow":return[...Tq];case"short":return[...cE];case"long":return[...lE];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const fE=["AM","PM"],qq=["Before Christ","Anno Domini"],Aq=["BC","AD"],Oq=["B","A"];function dE(r){switch(r){case"narrow":return[...Oq];case"short":return[...Aq];case"long":return[...qq];default:return null}}function Rq(r){return fE[r.hour<12?0:1]}function Nq(r,e){return hE(e)[r.weekday-1]}function Iq(r,e){return uE(e)[r.month-1]}function xq(r,e){return dE(e)[r.year<0?0:1]}function $q(r,e,t="always",n=!1){const 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."]},a=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&a){const c=r==="days";switch(e){case 1:return c?"tomorrow":`next ${i[r][0]}`;case-1:return c?"yesterday":`last ${i[r][0]}`;case 0:return c?"today":`this ${i[r][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,u=i[r],h=n?l?u[1]:u[2]||u[1]:l?i[r][0]:r;return o?`${s} ${h} ago`:`in ${s} ${h}`}function jd(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const Pq={D:hn,DD:NC,DDD:IC,DDDD:xC,t:$C,tt:PC,ttt:kC,tttt:LC,T:MC,TT:DC,TTT:jC,TTTT:FC,f:BC,ff:VC,fff:WC,ffff:zC,F:UC,FF:QC,FFF:HC,FFFF:GC};class Me{static create(e,t={}){return new Me(e,t)}static parseFormat(e){let t=null,n="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&a.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),a}static macroTokenToFormatOpts(e){return Pq[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return xe(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(d,w)=>this.loc.extract(e,d,w),o=d=>e.isOffsetFixed&&e.offset===0&&d.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,d.format):"",s=()=>n?Rq(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(d,w)=>n?Iq(e,d):a(w?{month:d}:{month:d,day:"numeric"},"month"),u=(d,w)=>n?Nq(e,d):a(w?{weekday:d}:{weekday:d,month:"long",day:"numeric"},"weekday"),h=d=>{const w=Me.macroTokenToFormatOpts(d);return w?this.formatWithSystemDefault(e,w):d},c=d=>n?xq(e,d):a({era:d},"era"),f=d=>{switch(d){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 s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({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?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("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 h(d)}};return jd(Me.parseFormat(t),f)}formatDurationFromString(e,t){const n=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>u=>{const h=n(u);return h?this.num(l.get(h),u.length):u},a=Me.parseFormat(t),o=a.reduce((l,{literal:u,val:h})=>u?l:l.concat(h),[]),s=e.shiftTo(...o.map(n).filter(l=>l));return jd(a,i(s))}}const pE=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function tr(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function rr(...r){return e=>r.reduce(([t,n,i],a)=>{const[o,s,l]=a(e,i);return[{...t,...o},s||n,l]},[{},null,1]).slice(0,2)}function nr(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const i=t.exec(r);if(i)return n(i)}return[null,null]}function mE(...r){return(e,t)=>{const n={};let i;for(i=0;i<r.length;i++)n[r[i]]=bt(e[t+i]);return[n,null,t+i]}}const gE=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,kq=`(?:${gE.source}?(?:\\[(${pE.source})\\])?)?`,Nf=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,yE=RegExp(`${Nf.source}${kq}`),If=RegExp(`(?:T${yE.source})?`),Lq=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Mq=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Dq=/(\d{4})-?(\d{3})/,jq=mE("weekYear","weekNumber","weekDay"),Fq=mE("year","ordinal"),Bq=/(\d{4})-(\d\d)-(\d\d)/,bE=RegExp(`${Nf.source} ?(?:${gE.source}|(${pE.source}))?`),Uq=RegExp(`(?: ${bE.source})?`);function Kt(r,e,t){const n=r[e];return ce(n)?t:bt(n)}function Vq(r,e){return[{year:Kt(r,e),month:Kt(r,e+1,1),day:Kt(r,e+2,1)},null,e+3]}function ir(r,e){return[{hours:Kt(r,e,0),minutes:Kt(r,e+1,0),seconds:Kt(r,e+2,0),milliseconds:Of(r[e+3])},null,e+4]}function Ir(r,e){const t=!r[e]&&!r[e+1],n=_n(r[e+1],r[e+2]),i=t?null:De.instance(n);return[{},i,e+3]}function xr(r,e){const t=r[e]?ft.create(r[e]):null;return[{},t,e+1]}const Qq=RegExp(`^T?${Nf.source}$`),Wq=/^-?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 Hq(r){const[e,t,n,i,a,o,s,l,u]=r,h=e[0]==="-",c=l&&l[0]==="-",f=(d,w=!1)=>d!==void 0&&(w||d&&h)?-d:d;return[{years:f(Et(t)),months:f(Et(n)),weeks:f(Et(i)),days:f(Et(a)),hours:f(Et(o)),minutes:f(Et(s)),seconds:f(Et(l),l==="-0"),milliseconds:f(Of(u),c)}]}const zq={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xf(r,e,t,n,i,a,o){const s={year:e.length===2?wf(bt(e)):bt(e),month:aE.indexOf(t)+1,day:bt(n),hour:bt(i),minute:bt(a)};return o&&(s.second=bt(o)),r&&(s.weekday=r.length>3?lE.indexOf(r)+1:cE.indexOf(r)+1),s}const Gq=/^(?:(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 Jq(r){const[,e,t,n,i,a,o,s,l,u,h,c]=r,f=xf(e,i,n,t,a,o,s);let d;return l?d=zq[l]:u?d=0:d=_n(h,c),[f,new De(d)]}function Kq(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Yq=/^(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$/,Zq=/^(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$/,Xq=/^(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 Fd(r){const[,e,t,n,i,a,o,s]=r;return[xf(e,i,n,t,a,o,s),De.utcInstance]}function eA(r){const[,e,t,n,i,a,o,s]=r;return[xf(e,s,t,n,i,a,o),De.utcInstance]}const tA=tr(Lq,If),rA=tr(Mq,If),nA=tr(Dq,If),iA=tr(yE),wE=rr(Vq,ir,Ir,xr),sA=rr(jq,ir,Ir,xr),oA=rr(Fq,ir,Ir,xr),aA=rr(ir,Ir,xr);function uA(r){return nr(r,[tA,wE],[rA,sA],[nA,oA],[iA,aA])}function lA(r){return nr(Kq(r),[Gq,Jq])}function cA(r){return nr(r,[Yq,Fd],[Zq,Fd],[Xq,eA])}function hA(r){return nr(r,[Wq,Hq])}const fA=rr(ir);function dA(r){return nr(r,[Qq,fA])}const pA=tr(Bq,Uq),mA=tr(bE),gA=rr(ir,Ir,xr);function yA(r){return nr(r,[pA,wE],[mA,gA])}const Bd="Invalid Duration",vE={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},bA={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:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...vE},Ve=146097/400,Ut=146097/4800,wA={years:{quarters:4,months:12,weeks:Ve/7,days:Ve,hours:Ve*24,minutes:Ve*24*60,seconds:Ve*24*60*60,milliseconds:Ve*24*60*60*1e3},quarters:{months:3,weeks:Ve/28,days:Ve/4,hours:Ve*24/4,minutes:Ve*24*60/4,seconds:Ve*24*60*60/4,milliseconds:Ve*24*60*60*1e3/4},months:{weeks:Ut/7,days:Ut,hours:Ut*24,minutes:Ut*24*60,seconds:Ut*24*60*60,milliseconds:Ut*24*60*60*1e3},...vE},Tt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vA=Tt.slice(0).reverse();function yt(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new ge(n)}function _E(r,e){let t=e.milliseconds??0;for(const n of vA.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function Ud(r,e){const t=_E(r,e)<0?-1:1;Tt.reduceRight((n,i)=>{if(ce(e[i]))return n;if(n){const a=e[n]*t,o=r[i][n],s=Math.floor(a/o);e[i]+=s*t,e[n]-=s*o*t}return i},null),Tt.reduce((n,i)=>{if(ce(e[i]))return n;if(n){const a=e[n]%1;e[n]-=a,e[i]+=a*r[n][i]}return i},null)}function _A(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class ge{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?wA:bA;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||_e.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return ge.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Le(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ge({values:pn(e,ge.normalizeUnit),loc:_e.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(vt(e))return ge.fromMillis(e);if(ge.isDuration(e))return e;if(typeof e=="object")return ge.fromObject(e);throw new Le(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=hA(e);return n?ge.fromObject(n,t):ge.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=dA(e);return n?ge.fromObject(n,t):ge.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the Duration is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new HT(n);return new ge({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new RC(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Me.create(this.loc,n).formatDurationFromString(this,e):Bd}toHuman(e={}){if(!this.isValid)return Bd;const t=Tt.map(n=>{const i=this.values[n];return ce(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}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+=Rf(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ue.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_E(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e),n={};for(const i of Tt)(Yt(t.values,i)||Yt(this.values,i))&&(n[i]=t.get(i)+this.get(i));return yt(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=oE(e(this.values[n],n));return yt(this,{values:t},!0)}get(e){return this[ge.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...pn(e,ge.normalizeUnit)};return yt(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return yt(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ud(this.matrix,e),yt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=_A(this.normalize().shiftToAll().toObject());return yt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ge.normalizeUnit(o));const t={},n={},i=this.toObject();let a;for(const o of Tt)if(e.indexOf(o)>=0){a=o;let s=0;for(const u in n)s+=this.matrix[u][o]*n[u],n[u]=0;vt(i[o])&&(s+=i[o]);const l=Math.trunc(s);t[o]=l,n[o]=(s*1e3-l*1e3)/1e3}else vt(i[o])&&(n[o]=i[o]);for(const o in n)n[o]!==0&&(t[a]+=o===a?n[o]:n[o]/this.matrix[a][o]);return Ud(this.matrix,t),yt(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return yt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(const n of Tt)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Vt="Invalid Interval";function CA(r,e){return!r||!r.isValid?Te.invalid("missing or invalid start"):!e||!e.isValid?Te.invalid("missing or invalid end"):e<r?Te.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class Te{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the Interval is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new WT(n);return new Te({invalid:n})}static fromDateTimes(e,t){const n=wr(e),i=wr(t),a=CA(n,i);return a??new Te({start:n,end:i})}static after(e,t){const n=ge.fromDurationLike(t),i=wr(e);return Te.fromDateTimes(i,i.plus(n))}static before(e,t){const n=ge.fromDurationLike(t),i=wr(e);return Te.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const[n,i]=(e||"").split("/",2);if(n&&i){let a,o;try{a=ue.fromISO(n,t),o=a.isValid}catch{o=!1}let s,l;try{s=ue.fromISO(i,t),l=s.isValid}catch{l=!1}if(o&&l)return Te.fromDateTimes(a,s);if(o){const u=ge.fromISO(i,t);if(u.isValid)return Te.after(a,u)}else if(l){const u=ge.fromISO(n,t);if(u.isValid)return Te.before(s,u)}}return Te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(n,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:t}={}){return this.isValid?Te.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(wr).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),n=[];let{s:i}=this,a=0;for(;i<this.e;){const o=t[a]||this.e,s=+o>+this.e?this.e:o;n.push(Te.fromDateTimes(i,s)),i=s,a+=1}return n}splitBy(e){const t=ge.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,a;const o=[];for(;n<this.e;){const s=this.start.plus(t.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(Te.fromDateTimes(n,a)),n=a,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;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Te.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Te.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,u)=>l.time-u.time);for(const l of s)n+=l.type==="s"?1:-1,n===1?t=l.time:(t&&+t!=+l.time&&i.push(Te.fromDateTimes(t,l.time)),t=null);return Te.merge(i)}difference(...e){return Te.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vt}[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=hn,t={}){return this.isValid?Me.create(this.s.loc.clone(t),e).formatInterval(this):Vt}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vt}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vt}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Vt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ge.invalid(this.invalidReason)}mapEndpoints(e){return Te.fromDateTimes(e(this.s),e(this.e))}}class Qr{static hasDST(e=Ne.defaultZone){const t=ue.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ft.isValidZone(e)}static normalizeZone(e){return wt(e,Ne.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||_e.create(t,n,a)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||_e.create(t,n,a)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||_e.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||_e.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _e.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _e.create(t,null,"gregory").eras(e)}static features(){return{relative:nE(),localeWeek:iE()}}}function Vd(r,e){const t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(ge.fromMillis(n).as("days"))}function EA(r,e,t){const n=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const h=Vd(l,u);return(h-h%7)/7}],["days",Vd]],i={},a=r;let o,s;for(const[l,u]of n)t.indexOf(l)>=0&&(o=l,i[l]=u(r,e),s=a.plus(i),s>e?(i[l]--,r=a.plus(i),r>e&&(s=r,i[l]--,r=a.plus(i))):r=s);return[r,i,s,o]}function SA(r,e,t,n){let[i,a,o,s]=EA(r,e,t);const l=e-i,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const h=ge.fromObject(a,n);return u.length>0?ge.fromMillis(l,n).shiftTo(...u).plus(h):h}const TA="missing Intl.DateTimeFormat.formatToParts support";function be(r,e=t=>t){return{regex:r,deser:([t])=>e(pq(t))}}const qA=" ",CE=`[ ${qA}]`,EE=new RegExp(CE,"g");function AA(r){return r.replace(/\./g,"\\.?").replace(EE,CE)}function Qd(r){return r.replace(/\./g,"").replace(EE," ").toLowerCase()}function Ye(r,e){return r===null?null:{regex:RegExp(r.map(AA).join("|")),deser:([t])=>r.findIndex(n=>Qd(t)===Qd(n))+e}}function Wd(r,e){return{regex:r,deser:([,t,n])=>_n(t,n),groups:e}}function Wr(r){return{regex:r,deser:([e])=>e}}function OA(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function RA(r,e){const t=Ke(e),n=Ke(e,"{2}"),i=Ke(e,"{3}"),a=Ke(e,"{4}"),o=Ke(e,"{6}"),s=Ke(e,"{1,2}"),l=Ke(e,"{1,3}"),u=Ke(e,"{1,6}"),h=Ke(e,"{1,9}"),c=Ke(e,"{2,4}"),f=Ke(e,"{4,6}"),d=m=>({regex:RegExp(OA(m.val)),deser:([g])=>g,literal:!0}),_=(m=>{if(r.literal)return d(m);switch(m.val){case"G":return Ye(e.eras("short"),0);case"GG":return Ye(e.eras("long"),0);case"y":return be(u);case"yy":return be(c,wf);case"yyyy":return be(a);case"yyyyy":return be(f);case"yyyyyy":return be(o);case"M":return be(s);case"MM":return be(n);case"MMM":return Ye(e.months("short",!0),1);case"MMMM":return Ye(e.months("long",!0),1);case"L":return be(s);case"LL":return be(n);case"LLL":return Ye(e.months("short",!1),1);case"LLLL":return Ye(e.months("long",!1),1);case"d":return be(s);case"dd":return be(n);case"o":return be(l);case"ooo":return be(i);case"HH":return be(n);case"H":return be(s);case"hh":return be(n);case"h":return be(s);case"mm":return be(n);case"m":return be(s);case"q":return be(s);case"qq":return be(n);case"s":return be(s);case"ss":return be(n);case"S":return be(l);case"SSS":return be(i);case"u":return Wr(h);case"uu":return Wr(s);case"uuu":return be(t);case"a":return Ye(e.meridiems(),0);case"kkkk":return be(a);case"kk":return be(c,wf);case"W":return be(s);case"WW":return be(n);case"E":case"c":return be(t);case"EEE":return Ye(e.weekdays("short",!1),1);case"EEEE":return Ye(e.weekdays("long",!1),1);case"ccc":return Ye(e.weekdays("short",!0),1);case"cccc":return Ye(e.weekdays("long",!0),1);case"Z":case"ZZ":return Wd(new RegExp(`([+-]${s.source})(?::(${n.source}))?`),2);case"ZZZ":return Wd(new RegExp(`([+-]${s.source})(${n.source})?`),2);case"z":return Wr(/[a-z_+-/]{1,256}?/i);case" ":return Wr(/[^\S\n\r]/);default:return d(m)}})(r)||{invalidReason:TA};return _.token=r,_}const NA={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 IA(r,e,t){const{type:n,value:i}=r;if(n==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[n];let o=n;n==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=t.hour12?"hour12":"hour24");let s=NA[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function xA(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function $A(r,e,t){const n=r.match(e);if(n){const i={};let a=1;for(const o in t)if(Yt(t,o)){const s=t[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(n.slice(a,a+l))),a+=l}return[n,i]}else return[n,{}]}function PA(r){const e=a=>{switch(a){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}};let t=null,n;return ce(r.z)||(t=ft.create(r.z)),ce(r.Z)||(t||(t=new De(r.Z)),n=r.Z),ce(r.q)||(r.M=(r.q-1)*3+1),ce(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),ce(r.u)||(r.S=Of(r.u)),[Object.keys(r).reduce((a,o)=>{const s=e(o);return s&&(a[s]=r[o]),a},{}),t,n]}let ti=null;function kA(){return ti||(ti=ue.fromMillis(1555555555555)),ti}function LA(r,e){if(r.literal)return r;const t=Me.macroTokenToFormatOpts(r.val),n=AE(t,e);return n==null||n.includes(void 0)?r:n}function SE(r,e){return Array.prototype.concat(...r.map(t=>LA(t,e)))}class TE{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=SE(Me.parseFormat(t),e),this.units=this.tokens.map(n=>RA(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,i]=xA(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[t,n]=$A(e,this.regex,this.handlers),[i,a,o]=n?PA(n):[null,null,void 0];if(Yt(n,"a")&&Yt(n,"H"))throw new Gt("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:a,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 qE(r,e,t){return new TE(r,t).explainFromTokens(e)}function MA(r,e,t){const{result:n,zone:i,specificOffset:a,invalidReason:o}=qE(r,e,t);return[n,i,a,o]}function AE(r,e){if(!r)return null;const n=Me.create(e,r).dtFormatter(kA()),i=n.formatToParts(),a=n.resolvedOptions();return i.map(o=>IA(o,r,a))}const ri="Invalid DateTime",Hd=864e13;function Sr(r){return new Xe("unsupported zone",`the zone "${r.name}" is not supported`)}function ni(r){return r.weekData===null&&(r.weekData=fn(r.c)),r.weekData}function ii(r){return r.localWeekData===null&&(r.localWeekData=fn(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function St(r,e){const t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new ue({...t,...e,old:t})}function OE(r,e,t){let n=r-e*60*1e3;const i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;const a=t.offset(n);return i===a?[n,i]:[r-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Hr(r,e){r+=e*60*1e3;const t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function ln(r,e,t){return OE(vn(r),e,t)}function zd(r,e){const t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...r.c,year:n,month:i,day:Math.min(r.c.day,dn(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=ge.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"),s=vn(a);let[l,u]=OE(s,t,r.zone);return o!==0&&(l+=o,u=r.zone.offset(l)),{ts:l,o:u}}function Qt(r,e,t,n,i,a){const{setZone:o,zone:s}=t;if(r&&Object.keys(r).length!==0||e){const l=e||s,u=ue.fromObject(r,{...t,zone:l,specificOffset:a});return o?u:u.setZone(s)}else return ue.invalid(new Xe("unparsable",`the input "${i}" can't be parsed as ${n}`))}function zr(r,e,t=!0){return r.isValid?Me.create(_e.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function si(r,e){const t=r.c.year>9999||r.c.year<0;let n="";return t&&r.c.year>=0&&(n+="+"),n+=xe(r.c.year,t?6:4),e?(n+="-",n+=xe(r.c.month),n+="-",n+=xe(r.c.day)):(n+=xe(r.c.month),n+=xe(r.c.day)),n}function Gd(r,e,t,n,i,a){let o=xe(r.c.hour);return e?(o+=":",o+=xe(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=":")):o+=xe(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=xe(r.c.second),(r.c.millisecond!==0||!n)&&(o+=".",o+=xe(r.c.millisecond,3))),i&&(r.isOffsetFixed&&r.offset===0&&!a?o+="Z":r.o<0?(o+="-",o+=xe(Math.trunc(-r.o/60)),o+=":",o+=xe(Math.trunc(-r.o%60))):(o+="+",o+=xe(Math.trunc(r.o/60)),o+=":",o+=xe(Math.trunc(r.o%60)))),a&&(o+="["+r.zone.ianaName+"]"),o}const RE={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},DA={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jA={ordinal:1,hour:0,minute:0,second:0,millisecond:0},NE=["year","month","day","hour","minute","second","millisecond"],FA=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],BA=["year","ordinal","hour","minute","second","millisecond"];function UA(r){const 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"}[r.toLowerCase()];if(!e)throw new RC(r);return e}function Jd(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return UA(r)}}function VA(r){if(Tr===void 0&&(Tr=Ne.now()),r.type!=="iana")return r.offset(Tr);const e=r.name;let t=vf.get(e);return t===void 0&&(t=r.offset(Tr),vf.set(e,t)),t}function Kd(r,e){const t=wt(e.zone,Ne.defaultZone);if(!t.isValid)return ue.invalid(Sr(t));const n=_e.fromObject(e);let i,a;if(ce(r.year))i=Ne.now();else{for(const l of NE)ce(r[l])&&(r[l]=RE[l]);const o=tE(r)||rE(r);if(o)return ue.invalid(o);const s=VA(t);[i,a]=ln(r,s,t)}return new ue({ts:i,zone:t,loc:n,o:a})}function Yd(r,e,t){const n=ce(t.round)?!0:t.round,i=(o,s)=>(o=Rf(o,n||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,s)),a=o=>t.calendary?e.hasSame(r,o)?0:e.startOf(o).diff(r.startOf(o),o).get(o):e.diff(r,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(r>e?-0:0,t.units[t.units.length-1])}function Zd(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}let Tr;const vf=new Map;class ue{constructor(e){const t=e.zone||Ne.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Xe("invalid input"):null)||(t.isValid?null:Sr(t));this.ts=ce(e.ts)?Ne.now():e.ts;let i=null,a=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,a]=[e.old.c,e.old.o];else{const s=vt(e.o)&&!e.old?e.o:t.offset(this.ts);i=Hr(this.ts,s),n=Number.isNaN(i.year)?new Xe("invalid input"):null,i=n?null:i,a=n?null:s}this._zone=t,this.loc=e.loc||_e.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new ue({})}static local(){const[e,t]=Zd(arguments),[n,i,a,o,s,l,u]=t;return Kd({year:n,month:i,day:a,hour:o,minute:s,second:l,millisecond:u},e)}static utc(){const[e,t]=Zd(arguments),[n,i,a,o,s,l,u]=t;return e.zone=De.utcInstance,Kd({year:n,month:i,day:a,hour:o,minute:s,second:l,millisecond:u},e)}static fromJSDate(e,t={}){const n=wq(e)?e.valueOf():NaN;if(Number.isNaN(n))return ue.invalid("invalid input");const i=wt(t.zone,Ne.defaultZone);return i.isValid?new ue({ts:n,zone:i,loc:_e.fromObject(t)}):ue.invalid(Sr(i))}static fromMillis(e,t={}){if(vt(e))return e<-Hd||e>Hd?ue.invalid("Timestamp out of range"):new ue({ts:e,zone:wt(t.zone,Ne.defaultZone),loc:_e.fromObject(t)});throw new Le(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(vt(e))return new ue({ts:e*1e3,zone:wt(t.zone,Ne.defaultZone),loc:_e.fromObject(t)});throw new Le("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=wt(t.zone,Ne.defaultZone);if(!n.isValid)return ue.invalid(Sr(n));const i=_e.fromObject(t),a=pn(e,Jd),{minDaysInFirstWeek:o,startOfWeek:s}=Ld(a,i),l=Ne.now(),u=ce(t.specificOffset)?n.offset(l):t.specificOffset,h=!ce(a.ordinal),c=!ce(a.year),f=!ce(a.month)||!ce(a.day),d=c||f,w=a.weekYear||a.weekNumber;if((d||h)&&w)throw new Gt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&h)throw new Gt("Can't mix ordinal dates with month/day");const _=w||a.weekday&&!d;let m,g,p=Hr(l,u);_?(m=FA,g=DA,p=fn(p,o,s)):h?(m=BA,g=jA,p=ei(p)):(m=NE,g=RE);let b=!1;for(const C of m){const q=a[C];ce(q)?b?a[C]=g[C]:a[C]=p[C]:b=!0}const v=_?gq(a,o,s):h?yq(a):tE(a),E=v||rE(a);if(E)return ue.invalid(E);const T=_?Pd(a,o,s):h?kd(a):a,[S,R]=ln(T,u,n),j=new ue({ts:S,zone:n,o:R,loc:i});return a.weekday&&d&&e.weekday!==j.weekday?ue.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${j.toISO()}`):j.isValid?j:ue.invalid(j.invalid)}static fromISO(e,t={}){const[n,i]=uA(e);return Qt(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=lA(e);return Qt(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=cA(e);return Qt(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(ce(e)||ce(t))throw new Le("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,u,h]=MA(o,e,t);return h?ue.invalid(h):Qt(s,l,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return ue.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=yA(e);return Qt(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the DateTime is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new QT(n);return new ue({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=AE(e,_e.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return SE(Me.parseFormat(e),_e.fromObject(t)).map(i=>i.val).join("")}static resetCache(){Tr=void 0,vf.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?ni(this).weekYear:NaN}get weekNumber(){return this.isValid?ni(this).weekNumber:NaN}get weekday(){return this.isValid?ni(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ii(this).weekday:NaN}get localWeekNumber(){return this.isValid?ii(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ii(this).weekYear:NaN}get ordinal(){return this.isValid?ei(this.c).ordinal:NaN}get monthShort(){return this.isValid?Qr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Qr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Qr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Qr.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];const e=864e5,t=6e4,n=vn(this.c),i=this.zone.offset(n-e),a=this.zone.offset(n+e),o=this.zone.offset(n-i*t),s=this.zone.offset(n-a*t);if(o===s)return[this];const l=n-o*t,u=n-s*t,h=Hr(l,o),c=Hr(u,s);return h.hour===c.hour&&h.minute===c.minute&&h.second===c.second&&h.millisecond===c.millisecond?[St(this,{ts:l}),St(this,{ts:u})]:[this]}get isInLeapYear(){return Nr(this.year)}get daysInMonth(){return dn(this.year,this.month)}get daysInYear(){return this.isValid?Jt(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ar(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ar(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=Me.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(De.instance(e),t)}toLocal(){return this.setZone(Ne.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=wt(e,Ne.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const a=e.offset(this.ts),o=this.toObject();[i]=ln(o,a,e)}return St(this,{ts:i,zone:e})}else return ue.invalid(Sr(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){const i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return St(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=pn(e,Jd),{minDaysInFirstWeek:n,startOfWeek:i}=Ld(t,this.loc),a=!ce(t.weekYear)||!ce(t.weekNumber)||!ce(t.weekday),o=!ce(t.ordinal),s=!ce(t.year),l=!ce(t.month)||!ce(t.day),u=s||l,h=t.weekYear||t.weekNumber;if((u||o)&&h)throw new Gt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Gt("Can't mix ordinal dates with month/day");let c;a?c=Pd({...fn(this.c,n,i),...t},n,i):ce(t.ordinal)?(c={...this.toObject(),...t},ce(t.day)&&(c.day=Math.min(dn(c.year,c.month),c.day))):c=kd({...ei(this.c),...t});const[f,d]=ln(c,this.o,this.zone);return St(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e);return St(this,zd(this,t))}minus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e).negate();return St(this,zd(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},i=ge.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(t){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(n.weekNumber=this.weekNumber-1),n.weekday=a}else n.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Me.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ri}toLocaleString(e=hn,t={}){return this.isValid?Me.create(this.loc.clone(t),e).formatDateTime(this):ri}toLocaleParts(e={}){return this.isValid?Me.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=si(this,o);return s+="T",s+=Gd(this,o,t,n,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?si(this,e==="extended"):null}toISOWeekDate(){return zr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Gd(this,o==="extended",t,e,n,a):null}toRFC2822(){return zr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return zr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?si(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),zr(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ri}[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{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return ge.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},a=vq(t).map(ge.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,u=SA(s,l,a,i);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(ue.now(),e,t)}until(e){return this.isValid?Te.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(t,n)<=i&&i<=a.endOf(t,n)}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;const t=e.base||ue.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Yd(t,this.plus(n),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Yd(e.base||ue.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(ue.isDateTime))throw new Le("min requires all arguments be DateTimes");return Md(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(ue.isDateTime))throw new Le("max requires all arguments be DateTimes");return Md(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return qE(o,e,t)}static fromStringExplain(e,t,n={}){return ue.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:i=null}=t,a=_e.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new TE(a,e)}static fromFormatParser(e,t,n={}){if(ce(e)||ce(t))throw new Le("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(t.locale))throw new Le(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:l,specificOffset:u,invalidReason:h}=t.explainFromTokens(e);return h?ue.invalid(h):Qt(s,l,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return hn}static get DATE_MED(){return NC}static get DATE_MED_WITH_WEEKDAY(){return zT}static get DATE_FULL(){return IC}static get DATE_HUGE(){return xC}static get TIME_SIMPLE(){return $C}static get TIME_WITH_SECONDS(){return PC}static get TIME_WITH_SHORT_OFFSET(){return kC}static get TIME_WITH_LONG_OFFSET(){return LC}static get TIME_24_SIMPLE(){return MC}static get TIME_24_WITH_SECONDS(){return DC}static get TIME_24_WITH_SHORT_OFFSET(){return jC}static get TIME_24_WITH_LONG_OFFSET(){return FC}static get DATETIME_SHORT(){return BC}static get DATETIME_SHORT_WITH_SECONDS(){return UC}static get DATETIME_MED(){return VC}static get DATETIME_MED_WITH_SECONDS(){return QC}static get DATETIME_MED_WITH_WEEKDAY(){return GT}static get DATETIME_FULL(){return WC}static get DATETIME_FULL_WITH_SECONDS(){return HC}static get DATETIME_HUGE(){return zC}static get DATETIME_HUGE_WITH_SECONDS(){return GC}}function wr(r){if(ue.isDateTime(r))return r;if(r&&r.valueOf&&vt(r.valueOf()))return ue.fromJSDate(r);if(r&&typeof r=="object")return ue.fromObject(r);throw new Le(`Unknown datetime argument: ${r}, of type ${typeof r}`)}const QA=r=>{const e=[],t=WA(r);let n=t.next();for(;n;)e.push(n),n=t.next();return e},WA=r=>({...r,next:HA(r)}),HA=r=>{let e=r.start;return()=>{if(e==null)return null;let t=null;switch(r.granularity){case nt.Total:t=zA(e,r.end);break;case nt.Annual:t=GA(e,r.end);break;case nt.SemiAnnual:t=JA(e,r.end);break;case nt.Quarterly:t=KA(e,r.end);break;case nt.Monthly:t=YA(e,r.end);break;case nt.Weekly:t=ZA(e,r.end);break;case nt.Daily:t=XA(e,r.end);break;case nt.Hourly:t=eO(e,r.end)}return t===null?e=null:e=t.end.plus({milliseconds:1}),t}},zA=(r,e)=>e<=r?null:{period:"total",start:r,end:e},GA=(r,e)=>{if(e<=r)return null;const t=r.toUTC(),n=ue.utc(t.year,t.month,t.day).plus({years:1});return{period:"annual",start:r,end:n}},JA=(r,e)=>{if(e<=r)return null;const t=ue.utc(r.year,7,1),n=ue.utc(r.year,12,31,23,59,59,999);let i;return t>r?i=t:i=n,i>e&&(i=e),{period:"semiAnnual",start:r,end:i}},KA=(r,e)=>{if(e<=r)return null;let t;const n=r.toUTC(),i=n.month;return i<3?t=ue.utc(n.year,4,1):i<6?t=ue.utc(n.year,7,1):i<9?t=ue.utc(n.year,10,1):t=ue.utc(n.year,12,31,23,59,59,999),t>e&&(t=e),{period:"quarterly",start:r,end:t}},YA=(r,e)=>{if(e<=r)return null;const t=r.toUTC();let n=ue.utc(t.year,t.month,t.day).plus({months:1}).startOf("month");return n>e&&(r.hasSame(e,"month")||(n=e)),{period:"monthly",start:r,end:n}},ZA=(r,e)=>{if(e<=r)return null;const t=r.toUTC(),n=ue.utc(t.year,t.month,t.day).plus({weeks:1}).startOf("week");return n>e&&!n.hasSame(e,"day")?{period:"weekly",start:r,end:e}:{period:"weekly",start:r,end:n}},XA=(r,e)=>{if(e<=r)return null;let n=r.toUTC().plus({days:1}).startOf("day");return(n>e||n.hasSame(e,"day"))&&(n=e),{period:"daily",start:r,end:n}},eO=(r,e)=>{if(e<=r)return null;let n=r.toUTC().plus({hours:1});return n>e&&r.hour!==e.hour&&(n=e.toUTC()),{period:"hourly",start:r,end:n}},tO=r=>Math.floor((r.month-1)/3)+1;class $f{static discretize(e,t,n,i,a){const o=this._buildIndex(e,t),s=QA(this._calculateRange(n,i,a,e)),l=this._discretizeNode(o,{},t,s);return this._groupResultsByPeriod(s,l)}static _calculateRange(e,t,n,i){let a=e||null,o=t||null;if(a==null||o==null)for(const s of i){a==null&&(a=s.start);const l=s.end||s.start;(o==null||o<l)&&(o=l)}if(a==null||o==null)throw new Error("Cannot determine query start and/or end.");return{start:a,end:o,granularity:n}}static _groupResultsByPeriod(e,t){const n={};for(const i of e){const a=i.start.toISO()+"-"+i.period,o=$f._getPeriodString(i);n[a]={period:o,start:i.start,end:i.end,rows:[]}}for(const i of t)for(const a of Object.keys(i.series))n[a].rows.push({dimensions:i.dimensions,metric:i.metric,unit:i.unit=="__NULL__"?null:i.unit,value:i.series[a].inc,sum:i.series[a].sum});return Object.values(n)}static _getPeriodString(e){switch(e.period){case"annual":return e.start.year.toString();case"semiAnnual":return`${e.start.year}/${e.start.month<7?"H1":"H2"}`;case"quarterly":return`${e.start.year}/Q${tO(e.start)}`;case"monthly":const t=e.start.toUTC().month,n=t<10?`0${t}`:`${t}`;return`${e.start.year}/${n}`;case"weekly":return`${e.start.weekYear}/W${e.start.weekNumber}`;case"daily":const i=e.start.month,a=e.start.day,o=i<10?`0${i}`:`${i}`,s=a<10?`0${a}`:`${a}`;return`${e.start.year}/${o}/${s}`;case"hourly":const l=e.start.month,u=e.start.day,h=e.start.hour,c=l<10?`0${l}`:`${l}`,f=u<10?`0${u}`:`${u}`,d=h<10?`0${h}`:`${h}`;return`${e.start.year}/${c}/${f}/${d}`;default:return e.period}}static _discretizeNode(e,t,n,i){const a=[];if(n.length>0){const o=n[0];Object.keys(e).forEach((s,l,u)=>{const h={...t};h[o]=s,a.push(...this._discretizeNode(e[s],h,n.slice(1),i))})}else Object.keys(e).forEach(o=>{a.push(...this._discretizeLeaf(e[o],i,o,t))});return a}static _discretizeLeaf(e,t,n,i){const a=[];return Object.keys(e).forEach(o=>{const s={};Object.keys(i).forEach(l=>{s[l]={path:e[o][0].dimensions[l],icon:e[o][0].dimensions.icon,label:e[o][0].dimensions.label,description:e[o][0].dimensions.description}}),a.push({unit:o,metric:n,dimensions:s,series:this._discretizeSeries(e[o],t)})}),a}static _discretizeSeries(e,t){const n={};for(const i of e){let a=this._getValue(i,t[0].start);for(const o of t){const s=this._getValue(i,o.end),l=`${o.start.toISO()}-${o.period}`;n[l]?(n[l].inc+=s-a,n[l].sum+=s):n[l]={inc:s-a,sum:s},a=s}}return n}static _getValue(e,t){switch(e.fn){case"Single":return this._getSingleValue(e,t);case"DssVest":return this._getVestValue(e,t);default:return 0}}static _getSingleValue(e,t){return t>=e.start?e.value:0}static _getVestValue(e,t){var u;const n=t,i=e.start,a=e.end,o=(u=e.params)!=null&&u.cliff?ue.fromISO(e.params.cliff):null;if(n<i||o&&n<o)return 0;if(a&&n>=a)return e.value;const s=Te.fromDateTimes(i,n),l=Te.fromDateTimes(i,a||n);return s.length()/l.length()*e.value}static _buildIndex(e,t){const n={},i={},a=t[0]||"";for(const o of e){const s=o.dimensions[a];i[s]===void 0&&(i[s]=[]),i[s].push(o)}if(t.length>1){const o=t.slice(1);Object.keys(i).forEach(s=>{n[s]=this._buildIndex(i[s],o)})}else Object.keys(i).forEach(o=>{n[o]=this._buildMetricsIndex(i[o])});return n}static _buildMetricsIndex(e){const t={},n={};for(const i of e){const a=i.metric;n[a]===void 0&&(n[a]=[]),n[a].push(i)}return Object.keys(n).forEach(i=>t[i]=this._buildUnitIndex(n[i])),t}static _buildUnitIndex(e){const t={};for(const n of e){const i=n.unit||"__NULL__";t[i]===void 0&&(t[i]=[]),t[i].push(n)}return t}}class rO{constructor(e,t){ve(this,"_analyticsStore");ve(this,"_profiler");this._analyticsStore=e,this._profiler=t??new OC}async executeCompound(e){let t;const n={start:e.start,end:e.end,granularity:e.granularity,lod:e.lod,select:e.select,metrics:e.expression.inputs.metrics,currency:e.expression.inputs.currency},i={start:e.start,end:e.end,granularity:e.granularity,lod:{priceData:1},select:{priceData:[it.fromString("atlas")]},metrics:[e.expression.operand.metric],currency:e.expression.operand.currency},a=await this.execute(n),o=await this.execute(i);return[je.VectorAdd,je.VectorSubtract].includes(e.expression.operator)?t=await this._profiler.record("ApplyVectorOperator",async()=>await this._applyVectorOperator(a,o,e.expression.operator,e.expression.resultCurrency)):t=await this._profiler.record("ApplyScalarOperator",async()=>await this._applyScalarOperator(a,o,e.expression.operator,e.expression.operand.useSum,e.expression.resultCurrency)),t}async execute(e){const t=await this._executeSeriesQuery(e),n=this._profiler.recordSync("ApplyLODs",()=>this._applyLods(t,e.lod)),i=Object.keys(e.select);return this._profiler.recordSync("Discretize",()=>n.length<1?[]:$f.discretize(n,i,e.start,e.end,e.granularity))}async executeMultiCurrency(e,t){const n={...e,currency:t.targetCurrency??e.currency};let i=await this.execute(n);for(const a of t.conversions){const o={start:e.start,end:e.end,granularity:e.granularity,lod:e.lod,select:e.select,expression:{inputs:{metrics:n.metrics,currency:a.currency},operator:je.ScalarMultiply,operand:{metric:a.metric,currency:t.targetCurrency,useSum:!0},resultCurrency:t.targetCurrency}},s=await this.executeCompound(o);i=await this._applyVectorOperator(i,s,je.VectorAdd,t.targetCurrency)}return i}async _applyVectorOperator(e,t,n,i){if([je.ScalarMultiply,je.ScalarDivide].includes(n))throw new Error("Invalid operator for vector operation");return t}async _applyScalarOperator(e,t,n,i,a){if([je.VectorAdd,je.VectorSubtract].includes(n))throw new Error("Invalid operator for scalar operation");const o=[],s={},l=i?"sum":"value";for(const u of t)u.rows.length>0&&(s[u.period]=u.rows[0][l]);for(const u of e){const h={period:u.period,start:u.start,end:u.end,rows:u.rows.map(c=>({dimensions:c.dimensions,metric:c.metric,unit:a?a.toString():c.unit,value:this._calculateOutputValue(c.value,n,s[u.period]),sum:-1}))};o.push(h)}return o}_calculateOutputValue(e,t,n){switch(t){case je.VectorAdd:return e+n;case je.VectorSubtract:return e-n;case je.ScalarMultiply:return e*n;case je.ScalarDivide:return e/n}}async _executeSeriesQuery(e){const t={start:e.start,end:e.end,select:e.select,metrics:e.metrics,currency:e.currency};return await this._analyticsStore.getMatchingSeries(t)}_applyLods(e,t){return e.map(n=>({...n,dimensions:this._applyDimensionsLods(n.dimensions,t)}))}_applyDimensionsLods(e,t){const n={};for(const[i,a]of Object.entries(t))a!==null&&e[i]&&(n[i]=e[i].path.applyLod(a).toString(),n.icon=e[i].icon.toString(),n.label=e[i].label.toString(),n.description=e[i].description.toString());return n}async getDimensions(){return await this._analyticsStore.getDimensions()}}class nO extends Error{constructor(t){super(t.map(n=>n.message).join(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index.CCtK4G2j.js","./user.zVDczLr_.js","./connect.config.CzMoERNI.js","./index.BcBVmRI8.js","./browser.BkwNmV2Z.js","./index.CsZYy69M.js","./app-skeleton.js","./index-B7k827uL.css","./index.DQ6Y_BFS.js","./useFeatureFlags.Dk1vb5i-.js","./useAcceptedCookies.Be0ZV09a.js","./useConnectConfig.DZ65pVmg.js","./index.CAUjMUXb.js","./registerServiceWorker.C2QkuGt_.js","./index.DbzMt0Q8.js","./home.CRGUjEn-.js","./modals.BuTWliYF.js","./i18next.CqOP20KE.js","./useDocumentDriveServer.6V2gzdbc.js","./slug.C6xW_7Wm.js","./modal.BbdrOfry.js","./content.BtkNuaBR.js","./react-error-boundary.esm.DHp-mKwc.js","./useDefaultDocumentModelEditor.CdkEVA6g.js","./useTranslation.BpVv6XIW.js","./toast.BwLkWP-U.js","./root.OJGI0z2p.js","./atlas-import.BaW3Y7_S.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var rT=Object.defineProperty;var nT=(r,e,t)=>e in r?rT(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var ve=(r,e,t)=>nT(r,typeof e!="symbol"?e+"":e,t);import{jsxs as Ht,jsx as Re,Fragment as CC}from"react/jsx-runtime";import{r as $e,d as zt,p as we,g as iT,U as EC,e as sT,Q as oT,f as aT,h as uT,i as lT,j as SC,k as yn,l as cT,I as hT,_ as ht,m as Ur,R as fT,b as Ef,a as dT,n as pT,o as mT,W as gT,T as yT,q as bT}from"./index.BcBVmRI8.js";import*as de from"react";import Or,{useMemo as uf,useEffect as st,useState as vd,createContext as wT,useContext as vT,useRef as Sf,Suspense as Cr}from"react";import{c as Fe}from"./connect.config.CzMoERNI.js";import{e as _T,u as CT}from"./user.zVDczLr_.js";import{u as ET,a as ST,d as _d,r as TC}from"./useFeatureFlags.Dk1vb5i-.js";import{a as TT,u as qT,b as lf}from"./index.CsZYy69M.js";import{u as qC}from"./useAcceptedCookies.Be0ZV09a.js";import{u as AT}from"./useConnectConfig.DZ65pVmg.js";import*as OT from"react-dom";import{l as RT,D as NT,a as IT,R as xT,c as $T,b as PT,u as kT,E as LT,m as MT,d as AC,e as DT,f as jT,g as FT,h as BT}from"./index.CAUjMUXb.js";import{s as UT}from"./registerServiceWorker.C2QkuGt_.js";class OC{get prefix(){return""}push(e){}pop(){}popAndReturn(e){return e}async record(e,t){return await t()}recordSync(e,t){return t()}}var cn;(function(r){r[r.AnalyticsPath=0]="AnalyticsPath",r[r.AnalyticsPathSegment=1]="AnalyticsPathSegment",r[r.AnalyticsPeriod=2]="AnalyticsPeriod"})(cn||(cn={}));var Cd;(function(r){r[r.Year=0]="Year",r[r.Quarter=1]="Quarter",r[r.Month=2]="Month"})(Cd||(Cd={}));class it{constructor(e){ve(this,"_segments");this._segments=e}get segments(){return this._segments}static fromString(e){const t=un(e,"/").map(n=>Qe.fromString(n));return new it(t)}static fromStringArray(e){return new it(e.map(t=>Qe.fromString(t)))}static fromArray(e){return new it(e)}static fromJSON(e){const t=e._v.split("/").map(n=>Qe.fromString(n));return new it(t)}toJSON(){return{_t:cn.AnalyticsPath,_v:this.toString()}}toString(e=""){return this._segments.map(t=>t.toString()).join("/")+e}firstSegment(){return this._segments.length>0?this._segments[0]:new Qe}reduce(){const e=this._segments.slice(1);return e.length<1&&e.push(new Qe),new it(e)}applyLod(e){const t=[...this._segments];for(;t.length<e;)t.push(new Qe);return new it(t.slice(0,e))}}class Qe{constructor(e=null,t=[]){ve(this,"_filters",null);ve(this,"_groups",null);this._filters=e,this._groups=t}get filters(){return this._filters}get groups(){return this._groups}static fromString(e){const t=un(e,":");let n;t[0]==="*"?n=null:n=un(t[0],",").map(a=>Qe.unescape(a));let i;return t[1]===void 0||t[1].length<1?i=[]:t[1]==="*"?i=null:i=un(t[1],",").map(a=>Qe.unescape(a)),new Qe(n,i)}static escape(e){return e.replace(/(\\|:|\/|,)/gi,"\\$1")}static unescape(e){return e.replace(/\\(.)/gi,"$1")}toJSON(){return{_t:cn.AnalyticsPathSegment,_v:this.toString()}}toString(){let e="";return this._filters===null?e+="*":e+=this._filters.map(t=>Qe.escape(t)).join(","),this._groups===null?e+=":*":this._groups.length>0&&(e+=":"+this._groups.map(t=>Qe.escape(t)).join(",")),e}}const VT={":":new RegExp("(?<!\\\\):"),",":new RegExp("(?<!\\\\),"),"/":new RegExp("(?<!\\\\)\\/")};function un(r,e){let t="@@";for(;r.indexOf(t)>-1;)t+="@";return r.replaceAll("\\\\",t).split(VT[e]).map(n=>n.replaceAll(t,"\\\\"))}var Ed;(function(r){r[r.Budget=0]="Budget",r[r.Forecast=1]="Forecast",r[r.Actuals=2]="Actuals",r[r.PaymentsOnChain=3]="PaymentsOnChain",r[r.PaymentsOffChainIncluded=4]="PaymentsOffChainIncluded",r[r.FTEs=5]="FTEs"})(Ed||(Ed={}));var je;(function(r){r[r.VectorAdd=0]="VectorAdd",r[r.VectorSubtract=1]="VectorSubtract",r[r.ScalarMultiply=2]="ScalarMultiply",r[r.ScalarDivide=3]="ScalarDivide"})(je||(je={}));var nt;(function(r){r[r.Total=0]="Total",r[r.Annual=1]="Annual",r[r.SemiAnnual=2]="SemiAnnual",r[r.Quarterly=3]="Quarterly",r[r.Monthly=4]="Monthly",r[r.Weekly=5]="Weekly",r[r.Daily=6]="Daily",r[r.Hourly=7]="Hourly"})(nt||(nt={}));class At extends Error{}class QT extends At{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class WT extends At{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class HT extends At{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class Gt extends At{}class RC extends At{constructor(e){super(`Invalid unit ${e}`)}}class Le extends At{}class gt extends At{constructor(){super("Zone is an abstract class")}}const ie="numeric",et="short",Be="long",hn={year:ie,month:ie,day:ie},NC={year:ie,month:et,day:ie},zT={year:ie,month:et,day:ie,weekday:et},IC={year:ie,month:Be,day:ie},xC={year:ie,month:Be,day:ie,weekday:Be},$C={hour:ie,minute:ie},PC={hour:ie,minute:ie,second:ie},kC={hour:ie,minute:ie,second:ie,timeZoneName:et},LC={hour:ie,minute:ie,second:ie,timeZoneName:Be},MC={hour:ie,minute:ie,hourCycle:"h23"},DC={hour:ie,minute:ie,second:ie,hourCycle:"h23"},jC={hour:ie,minute:ie,second:ie,hourCycle:"h23",timeZoneName:et},FC={hour:ie,minute:ie,second:ie,hourCycle:"h23",timeZoneName:Be},BC={year:ie,month:ie,day:ie,hour:ie,minute:ie},UC={year:ie,month:ie,day:ie,hour:ie,minute:ie,second:ie},VC={year:ie,month:et,day:ie,hour:ie,minute:ie},QC={year:ie,month:et,day:ie,hour:ie,minute:ie,second:ie},GT={year:ie,month:et,day:ie,weekday:et,hour:ie,minute:ie},WC={year:ie,month:Be,day:ie,hour:ie,minute:ie,timeZoneName:et},HC={year:ie,month:Be,day:ie,hour:ie,minute:ie,second:ie,timeZoneName:et},zC={year:ie,month:Be,day:ie,weekday:Be,hour:ie,minute:ie,timeZoneName:Be},GC={year:ie,month:Be,day:ie,weekday:Be,hour:ie,minute:ie,second:ie,timeZoneName:Be};class Rr{get type(){throw new gt}get name(){throw new gt}get ianaName(){return this.name}get isUniversal(){throw new gt}offsetName(e,t){throw new gt}formatOffset(e,t){throw new gt}offset(e){throw new gt}equals(e){throw new gt}get isValid(){throw new gt}}let Yn=null;class bn extends Rr{static get instance(){return Yn===null&&(Yn=new bn),Yn}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return sE(e,t,n)}formatOffset(e,t){return qr(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const cf=new Map;function JT(r){let e=cf.get(r);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),cf.set(r,e)),e}const KT={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function YT(r,e){const t=r.format(e).replace(/\u200E/g,""),n=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,i,a,o,s,l,u,h]=n;return[o,i,a,s,l,u,h]}function ZT(r,e){const t=r.formatToParts(e),n=[];for(let i=0;i<t.length;i++){const{type:a,value:o}=t[i],s=KT[a];a==="era"?n[s]=o:ce(s)||(n[s]=parseInt(o,10))}return n}const Zn=new Map;class ft extends Rr{static create(e){let t=Zn.get(e);return t===void 0&&Zn.set(e,t=new ft(e)),t}static resetCache(){Zn.clear(),cf.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=ft.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:n}){return sE(e,t,n,this.name)}formatOffset(e,t){return qr(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=JT(this.name);let[i,a,o,s,l,u,h]=n.formatToParts?ZT(n,t):YT(n,t);s==="BC"&&(i=-Math.abs(i)+1);const f=vn({year:i,month:a,day:o,hour:l===24?0:l,minute:u,second:h,millisecond:0});let d=+t;const w=d%1e3;return d-=w>=0?w:1e3+w,(f-d)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let Sd={};function XT(r,e={}){const t=JSON.stringify([r,e]);let n=Sd[t];return n||(n=new Intl.ListFormat(r,e),Sd[t]=n),n}const hf=new Map;function ff(r,e={}){const t=JSON.stringify([r,e]);let n=hf.get(t);return n===void 0&&(n=new Intl.DateTimeFormat(r,e),hf.set(t,n)),n}const df=new Map;function eq(r,e={}){const t=JSON.stringify([r,e]);let n=df.get(t);return n===void 0&&(n=new Intl.NumberFormat(r,e),df.set(t,n)),n}const pf=new Map;function tq(r,e={}){const{base:t,...n}=e,i=JSON.stringify([r,n]);let a=pf.get(i);return a===void 0&&(a=new Intl.RelativeTimeFormat(r,e),pf.set(i,a)),a}let Er=null;function rq(){return Er||(Er=new Intl.DateTimeFormat().resolvedOptions().locale,Er)}const mf=new Map;function JC(r){let e=mf.get(r);return e===void 0&&(e=new Intl.DateTimeFormat(r).resolvedOptions(),mf.set(r,e)),e}const gf=new Map;function nq(r){let e=gf.get(r);if(!e){const t=new Intl.Locale(r);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...KC,...e}),gf.set(r,e)}return e}function iq(r){const e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));const t=r.indexOf("-u-");if(t===-1)return[r];{let n,i;try{n=ff(r).resolvedOptions(),i=r}catch{const l=r.substring(0,t);n=ff(l).resolvedOptions(),i=l}const{numberingSystem:a,calendar:o}=n;return[i,a,o]}}function sq(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function oq(r){const e=[];for(let t=1;t<=12;t++){const n=ue.utc(2009,t,1);e.push(r(n))}return e}function aq(r){const e=[];for(let t=1;t<=7;t++){const n=ue.utc(2016,11,13+t);e.push(r(n))}return e}function Vr(r,e,t,n){const i=r.listingMode();return i==="error"?null:i==="en"?t(e):n(e)}function uq(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||JC(r.locale).numberingSystem==="latn"}class lq{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:i,floor:a,...o}=n;if(!t||Object.keys(o).length>0){const s={useGrouping:!1,...n};n.padTo>0&&(s.minimumIntegerDigits=n.padTo),this.inf=eq(e,s)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):Rf(e,3);return xe(t,this.padTo)}}}class cq{constructor(e,t,n){this.opts=n,this.originalZone=void 0;let i;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const o=-1*(e.offset/60),s=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&ft.create(s).valid?(i=s,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);const a={...this.opts};a.timeZone=a.timeZone||i,this.dtf=ff(t,a)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const n=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:n}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class hq{constructor(e,t,n){this.opts={style:"long",...n},!t&&nE()&&(this.rtf=tq(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):$q(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const KC={firstDay:1,minimalDays:4,weekend:[6,7]};class _e{static fromOpts(e){return _e.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,i,a=!1){const o=e||Ne.defaultLocale,s=o||(a?"en-US":rq()),l=t||Ne.defaultNumberingSystem,u=n||Ne.defaultOutputCalendar,h=bf(i)||Ne.defaultWeekSettings;return new _e(s,l,u,h,o)}static resetCache(){Er=null,hf.clear(),df.clear(),pf.clear(),mf.clear(),gf.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:n,weekSettings:i}={}){return _e.create(e,t,n,i)}constructor(e,t,n,i,a){const[o,s,l]=iq(e);this.locale=o,this.numberingSystem=t||s||null,this.outputCalendar=n||l||null,this.weekSettings=i,this.intl=sq(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=a,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=uq(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:_e.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,bf(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Vr(this,e,uE,()=>{const n=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";return this.monthsCache[i][e]||(this.monthsCache[i][e]=oq(a=>this.extract(a,n,"month"))),this.monthsCache[i][e]})}weekdays(e,t=!1){return Vr(this,e,hE,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},i=t?"format":"standalone";return this.weekdaysCache[i][e]||(this.weekdaysCache[i][e]=aq(a=>this.extract(a,n,"weekday"))),this.weekdaysCache[i][e]})}meridiems(){return Vr(this,void 0,()=>fE,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[ue.utc(2016,11,13,9),ue.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Vr(this,e,dE,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[ue.utc(-40,1,1),ue.utc(2017,1,1)].map(n=>this.extract(n,t,"era"))),this.eraCache[e]})}extract(e,t,n){const i=this.dtFormatter(e,t),a=i.formatToParts(),o=a.find(s=>s.type.toLowerCase()===n);return o?o.value:null}numberFormatter(e={}){return new lq(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new cq(e,this.intl,t)}relFormatter(e={}){return new hq(this.intl,this.isEnglish(),e)}listFormatter(e={}){return XT(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||JC(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:iE()?nq(this.locale):KC}getStartOfWeek(){return this.getWeekSettings().firstDay}getMinDaysInFirstWeek(){return this.getWeekSettings().minimalDays}getWeekendDays(){return this.getWeekSettings().weekend}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}toString(){return`Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`}}let Xn=null;class De extends Rr{static get utcInstance(){return Xn===null&&(Xn=new De(0)),Xn}static instance(e){return e===0?De.utcInstance:new De(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new De(_n(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${qr(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${qr(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return qr(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class fq extends Rr{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 wt(r,e){if(ce(r)||r===null)return e;if(r instanceof Rr)return r;if(bq(r)){const t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?bn.instance:t==="utc"||t==="gmt"?De.utcInstance:De.parseSpecifier(t)||ft.create(r)}else return vt(r)?De.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new fq(r)}const Tf={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Td={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]},dq=Tf.hanidec.replace(/[\[|\]]/g,"").split("");function pq(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){const n=r.charCodeAt(t);if(r[t].search(Tf.hanidec)!==-1)e+=dq.indexOf(r[t]);else for(const i in Td){const[a,o]=Td[i];n>=a&&n<=o&&(e+=n-a)}}return parseInt(e,10)}else return e}const yf=new Map;function mq(){yf.clear()}function Ke({numberingSystem:r},e=""){const t=r||"latn";let n=yf.get(t);n===void 0&&(n=new Map,yf.set(t,n));let i=n.get(e);return i===void 0&&(i=new RegExp(`${Tf[t]}${e}`),n.set(e,i)),i}let qd=()=>Date.now(),Ad="system",Od=null,Rd=null,Nd=null,Id=60,xd,$d=null;class Ne{static get now(){return qd}static set now(e){qd=e}static set defaultZone(e){Ad=e}static get defaultZone(){return wt(Ad,bn.instance)}static get defaultLocale(){return Od}static set defaultLocale(e){Od=e}static get defaultNumberingSystem(){return Rd}static set defaultNumberingSystem(e){Rd=e}static get defaultOutputCalendar(){return Nd}static set defaultOutputCalendar(e){Nd=e}static get defaultWeekSettings(){return $d}static set defaultWeekSettings(e){$d=bf(e)}static get twoDigitCutoffYear(){return Id}static set twoDigitCutoffYear(e){Id=e%100}static get throwOnInvalid(){return xd}static set throwOnInvalid(e){xd=e}static resetCaches(){_e.resetCache(),ft.resetCache(),ue.resetCache(),mq()}}class Xe{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const YC=[0,31,59,90,120,151,181,212,243,273,304,334],ZC=[0,31,60,91,121,152,182,213,244,274,305,335];function We(r,e){return new Xe("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function qf(r,e,t){const n=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return i===0?7:i}function XC(r,e,t){return t+(Nr(r)?ZC:YC)[e-1]}function eE(r,e){const t=Nr(r)?ZC:YC,n=t.findIndex(a=>a<e),i=e-t[n];return{month:n+1,day:i}}function Af(r,e){return(r-e+7)%7+1}function fn(r,e=4,t=1){const{year:n,month:i,day:a}=r,o=XC(n,i,a),s=Af(qf(n,i,a),t);let l=Math.floor((o-s+14-e)/7),u;return l<1?(u=n-1,l=Ar(u,e,t)):l>Ar(n,e,t)?(u=n+1,l=1):u=n,{weekYear:u,weekNumber:l,weekday:s,...Cn(r)}}function Pd(r,e=4,t=1){const{weekYear:n,weekNumber:i,weekday:a}=r,o=Af(qf(n,1,e),t),s=Jt(n);let l=i*7+a-o-7+e,u;l<1?(u=n-1,l+=Jt(u)):l>s?(u=n+1,l-=Jt(n)):u=n;const{month:h,day:c}=eE(u,l);return{year:u,month:h,day:c,...Cn(r)}}function ei(r){const{year:e,month:t,day:n}=r,i=XC(e,t,n);return{year:e,ordinal:i,...Cn(r)}}function kd(r){const{year:e,ordinal:t}=r,{month:n,day:i}=eE(e,t);return{year:e,month:n,day:i,...Cn(r)}}function Ld(r,e){if(!ce(r.localWeekday)||!ce(r.localWeekNumber)||!ce(r.localWeekYear)){if(!ce(r.weekday)||!ce(r.weekNumber)||!ce(r.weekYear))throw new Gt("Cannot mix locale-based week fields with ISO-based week fields");return ce(r.localWeekday)||(r.weekday=r.localWeekday),ce(r.localWeekNumber)||(r.weekNumber=r.localWeekNumber),ce(r.localWeekYear)||(r.weekYear=r.localWeekYear),delete r.localWeekday,delete r.localWeekNumber,delete r.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function gq(r,e=4,t=1){const n=wn(r.weekYear),i=He(r.weekNumber,1,Ar(r.weekYear,e,t)),a=He(r.weekday,1,7);return n?i?a?!1:We("weekday",r.weekday):We("week",r.weekNumber):We("weekYear",r.weekYear)}function yq(r){const e=wn(r.year),t=He(r.ordinal,1,Jt(r.year));return e?t?!1:We("ordinal",r.ordinal):We("year",r.year)}function tE(r){const e=wn(r.year),t=He(r.month,1,12),n=He(r.day,1,dn(r.year,r.month));return e?t?n?!1:We("day",r.day):We("month",r.month):We("year",r.year)}function rE(r){const{hour:e,minute:t,second:n,millisecond:i}=r,a=He(e,0,23)||e===24&&t===0&&n===0&&i===0,o=He(t,0,59),s=He(n,0,59),l=He(i,0,999);return a?o?s?l?!1:We("millisecond",i):We("second",n):We("minute",t):We("hour",e)}function ce(r){return typeof r>"u"}function vt(r){return typeof r=="number"}function wn(r){return typeof r=="number"&&r%1===0}function bq(r){return typeof r=="string"}function wq(r){return Object.prototype.toString.call(r)==="[object Date]"}function nE(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function iE(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function vq(r){return Array.isArray(r)?r:[r]}function Md(r,e,t){if(r.length!==0)return r.reduce((n,i)=>{const a=[e(i),i];return n&&t(n[0],a[0])===n[0]?n:a},null)[1]}function _q(r,e){return e.reduce((t,n)=>(t[n]=r[n],t),{})}function Yt(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function bf(r){if(r==null)return null;if(typeof r!="object")throw new Le("Week settings must be an object");if(!He(r.firstDay,1,7)||!He(r.minimalDays,1,7)||!Array.isArray(r.weekend)||r.weekend.some(e=>!He(e,1,7)))throw new Le("Invalid week settings");return{firstDay:r.firstDay,minimalDays:r.minimalDays,weekend:Array.from(r.weekend)}}function He(r,e,t){return wn(r)&&r>=e&&r<=t}function Cq(r,e){return r-e*Math.floor(r/e)}function xe(r,e=2){const t=r<0;let n;return t?n="-"+(""+-r).padStart(e,"0"):n=(""+r).padStart(e,"0"),n}function bt(r){if(!(ce(r)||r===null||r===""))return parseInt(r,10)}function Et(r){if(!(ce(r)||r===null||r===""))return parseFloat(r)}function Of(r){if(!(ce(r)||r===null||r==="")){const e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function Rf(r,e,t=!1){const n=10**e;return(t?Math.trunc:Math.round)(r*n)/n}function Nr(r){return r%4===0&&(r%100!==0||r%400===0)}function Jt(r){return Nr(r)?366:365}function dn(r,e){const t=Cq(e-1,12)+1,n=r+(e-t)/12;return t===2?Nr(n)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function vn(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function Dd(r,e,t){return-Af(qf(r,1,e),t)+e-1}function Ar(r,e=4,t=1){const n=Dd(r,e,t),i=Dd(r+1,e,t);return(Jt(r)-n+i)/7}function wf(r){return r>99?r:r>Ne.twoDigitCutoffYear?1900+r:2e3+r}function sE(r,e,t,n=null){const i=new Date(r),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(a.timeZone=n);const o={timeZoneName:e,...a},s=new Intl.DateTimeFormat(t,o).formatToParts(i).find(l=>l.type.toLowerCase()==="timezonename");return s?s.value:null}function _n(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);const n=parseInt(e,10)||0,i=t<0||Object.is(t,-0)?-n:n;return t*60+i}function oE(r){const e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new Le(`Invalid unit value ${r}`);return e}function pn(r,e){const t={};for(const n in r)if(Yt(r,n)){const i=r[n];if(i==null)continue;t[e(n)]=oE(i)}return t}function qr(r,e){const t=Math.trunc(Math.abs(r/60)),n=Math.trunc(Math.abs(r%60)),i=r>=0?"+":"-";switch(e){case"short":return`${i}${xe(t,2)}:${xe(n,2)}`;case"narrow":return`${i}${t}${n>0?`:${n}`:""}`;case"techie":return`${i}${xe(t,2)}${xe(n,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function Cn(r){return _q(r,["hour","minute","second","millisecond"])}const Eq=["January","February","March","April","May","June","July","August","September","October","November","December"],aE=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Sq=["J","F","M","A","M","J","J","A","S","O","N","D"];function uE(r){switch(r){case"narrow":return[...Sq];case"short":return[...aE];case"long":return[...Eq];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}}const lE=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],cE=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Tq=["M","T","W","T","F","S","S"];function hE(r){switch(r){case"narrow":return[...Tq];case"short":return[...cE];case"long":return[...lE];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const fE=["AM","PM"],qq=["Before Christ","Anno Domini"],Aq=["BC","AD"],Oq=["B","A"];function dE(r){switch(r){case"narrow":return[...Oq];case"short":return[...Aq];case"long":return[...qq];default:return null}}function Rq(r){return fE[r.hour<12?0:1]}function Nq(r,e){return hE(e)[r.weekday-1]}function Iq(r,e){return uE(e)[r.month-1]}function xq(r,e){return dE(e)[r.year<0?0:1]}function $q(r,e,t="always",n=!1){const 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."]},a=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&a){const c=r==="days";switch(e){case 1:return c?"tomorrow":`next ${i[r][0]}`;case-1:return c?"yesterday":`last ${i[r][0]}`;case 0:return c?"today":`this ${i[r][0]}`}}const o=Object.is(e,-0)||e<0,s=Math.abs(e),l=s===1,u=i[r],h=n?l?u[1]:u[2]||u[1]:l?i[r][0]:r;return o?`${s} ${h} ago`:`in ${s} ${h}`}function jd(r,e){let t="";for(const n of r)n.literal?t+=n.val:t+=e(n.val);return t}const Pq={D:hn,DD:NC,DDD:IC,DDDD:xC,t:$C,tt:PC,ttt:kC,tttt:LC,T:MC,TT:DC,TTT:jC,TTTT:FC,f:BC,ff:VC,fff:WC,ffff:zC,F:UC,FF:QC,FFF:HC,FFFF:GC};class Me{static create(e,t={}){return new Me(e,t)}static parseFormat(e){let t=null,n="",i=!1;const a=[];for(let o=0;o<e.length;o++){const s=e.charAt(o);s==="'"?(n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),t=null,n="",i=!i):i||s===t?n+=s:(n.length>0&&a.push({literal:/^\s+$/.test(n),val:n}),n=s,t=s)}return n.length>0&&a.push({literal:i||/^\s+$/.test(n),val:n}),a}static macroTokenToFormatOpts(e){return Pq[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return xe(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n=this.loc.listingMode()==="en",i=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",a=(d,w)=>this.loc.extract(e,d,w),o=d=>e.isOffsetFixed&&e.offset===0&&d.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,d.format):"",s=()=>n?Rq(e):a({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(d,w)=>n?Iq(e,d):a(w?{month:d}:{month:d,day:"numeric"},"month"),u=(d,w)=>n?Nq(e,d):a(w?{weekday:d}:{weekday:d,month:"long",day:"numeric"},"weekday"),h=d=>{const w=Me.macroTokenToFormatOpts(d);return w?this.formatWithSystemDefault(e,w):d},c=d=>n?xq(e,d):a({era:d},"era"),f=d=>{switch(d){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 s();case"d":return i?a({day:"numeric"},"day"):this.num(e.day);case"dd":return i?a({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?a({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return i?a({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return i?a({month:"numeric"},"month"):this.num(e.month);case"MM":return i?a({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return i?a({year:"numeric"},"year"):this.num(e.year);case"yy":return i?a({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return i?a({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return i?a({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("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 h(d)}};return jd(Me.parseFormat(t),f)}formatDurationFromString(e,t){const n=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},i=l=>u=>{const h=n(u);return h?this.num(l.get(h),u.length):u},a=Me.parseFormat(t),o=a.reduce((l,{literal:u,val:h})=>u?l:l.concat(h),[]),s=e.shiftTo(...o.map(n).filter(l=>l));return jd(a,i(s))}}const pE=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function tr(...r){const e=r.reduce((t,n)=>t+n.source,"");return RegExp(`^${e}$`)}function rr(...r){return e=>r.reduce(([t,n,i],a)=>{const[o,s,l]=a(e,i);return[{...t,...o},s||n,l]},[{},null,1]).slice(0,2)}function nr(r,...e){if(r==null)return[null,null];for(const[t,n]of e){const i=t.exec(r);if(i)return n(i)}return[null,null]}function mE(...r){return(e,t)=>{const n={};let i;for(i=0;i<r.length;i++)n[r[i]]=bt(e[t+i]);return[n,null,t+i]}}const gE=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,kq=`(?:${gE.source}?(?:\\[(${pE.source})\\])?)?`,Nf=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,yE=RegExp(`${Nf.source}${kq}`),If=RegExp(`(?:T${yE.source})?`),Lq=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Mq=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Dq=/(\d{4})-?(\d{3})/,jq=mE("weekYear","weekNumber","weekDay"),Fq=mE("year","ordinal"),Bq=/(\d{4})-(\d\d)-(\d\d)/,bE=RegExp(`${Nf.source} ?(?:${gE.source}|(${pE.source}))?`),Uq=RegExp(`(?: ${bE.source})?`);function Kt(r,e,t){const n=r[e];return ce(n)?t:bt(n)}function Vq(r,e){return[{year:Kt(r,e),month:Kt(r,e+1,1),day:Kt(r,e+2,1)},null,e+3]}function ir(r,e){return[{hours:Kt(r,e,0),minutes:Kt(r,e+1,0),seconds:Kt(r,e+2,0),milliseconds:Of(r[e+3])},null,e+4]}function Ir(r,e){const t=!r[e]&&!r[e+1],n=_n(r[e+1],r[e+2]),i=t?null:De.instance(n);return[{},i,e+3]}function xr(r,e){const t=r[e]?ft.create(r[e]):null;return[{},t,e+1]}const Qq=RegExp(`^T?${Nf.source}$`),Wq=/^-?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 Hq(r){const[e,t,n,i,a,o,s,l,u]=r,h=e[0]==="-",c=l&&l[0]==="-",f=(d,w=!1)=>d!==void 0&&(w||d&&h)?-d:d;return[{years:f(Et(t)),months:f(Et(n)),weeks:f(Et(i)),days:f(Et(a)),hours:f(Et(o)),minutes:f(Et(s)),seconds:f(Et(l),l==="-0"),milliseconds:f(Of(u),c)}]}const zq={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function xf(r,e,t,n,i,a,o){const s={year:e.length===2?wf(bt(e)):bt(e),month:aE.indexOf(t)+1,day:bt(n),hour:bt(i),minute:bt(a)};return o&&(s.second=bt(o)),r&&(s.weekday=r.length>3?lE.indexOf(r)+1:cE.indexOf(r)+1),s}const Gq=/^(?:(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 Jq(r){const[,e,t,n,i,a,o,s,l,u,h,c]=r,f=xf(e,i,n,t,a,o,s);let d;return l?d=zq[l]:u?d=0:d=_n(h,c),[f,new De(d)]}function Kq(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const Yq=/^(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$/,Zq=/^(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$/,Xq=/^(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 Fd(r){const[,e,t,n,i,a,o,s]=r;return[xf(e,i,n,t,a,o,s),De.utcInstance]}function eA(r){const[,e,t,n,i,a,o,s]=r;return[xf(e,s,t,n,i,a,o),De.utcInstance]}const tA=tr(Lq,If),rA=tr(Mq,If),nA=tr(Dq,If),iA=tr(yE),wE=rr(Vq,ir,Ir,xr),sA=rr(jq,ir,Ir,xr),oA=rr(Fq,ir,Ir,xr),aA=rr(ir,Ir,xr);function uA(r){return nr(r,[tA,wE],[rA,sA],[nA,oA],[iA,aA])}function lA(r){return nr(Kq(r),[Gq,Jq])}function cA(r){return nr(r,[Yq,Fd],[Zq,Fd],[Xq,eA])}function hA(r){return nr(r,[Wq,Hq])}const fA=rr(ir);function dA(r){return nr(r,[Qq,fA])}const pA=tr(Bq,Uq),mA=tr(bE),gA=rr(ir,Ir,xr);function yA(r){return nr(r,[pA,wE],[mA,gA])}const Bd="Invalid Duration",vE={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},bA={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:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...vE},Ve=146097/400,Ut=146097/4800,wA={years:{quarters:4,months:12,weeks:Ve/7,days:Ve,hours:Ve*24,minutes:Ve*24*60,seconds:Ve*24*60*60,milliseconds:Ve*24*60*60*1e3},quarters:{months:3,weeks:Ve/28,days:Ve/4,hours:Ve*24/4,minutes:Ve*24*60/4,seconds:Ve*24*60*60/4,milliseconds:Ve*24*60*60*1e3/4},months:{weeks:Ut/7,days:Ut,hours:Ut*24,minutes:Ut*24*60,seconds:Ut*24*60*60,milliseconds:Ut*24*60*60*1e3},...vE},Tt=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],vA=Tt.slice(0).reverse();function yt(r,e,t=!1){const n={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new ge(n)}function _E(r,e){let t=e.milliseconds??0;for(const n of vA.slice(1))e[n]&&(t+=e[n]*r[n].milliseconds);return t}function Ud(r,e){const t=_E(r,e)<0?-1:1;Tt.reduceRight((n,i)=>{if(ce(e[i]))return n;if(n){const a=e[n]*t,o=r[i][n],s=Math.floor(a/o);e[i]+=s*t,e[n]-=s*o*t}return i},null),Tt.reduce((n,i)=>{if(ce(e[i]))return n;if(n){const a=e[n]%1;e[n]-=a,e[i]+=a*r[n][i]}return i},null)}function _A(r){const e={};for(const[t,n]of Object.entries(r))n!==0&&(e[t]=n);return e}class ge{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let n=t?wA:bA;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||_e.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return ge.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new Le(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new ge({values:pn(e,ge.normalizeUnit),loc:_e.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(vt(e))return ge.fromMillis(e);if(ge.isDuration(e))return e;if(typeof e=="object")return ge.fromObject(e);throw new Le(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=hA(e);return n?ge.fromObject(n,t):ge.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=dA(e);return n?ge.fromObject(n,t):ge.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the Duration is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new HT(n);return new ge({invalid:n})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new RC(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const n={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Me.create(this.loc,n).formatDurationFromString(this,e):Bd}toHuman(e={}){if(!this.isValid)return Bd;const t=Tt.map(n=>{const i=this.values[n];return ce(i)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(i)}).filter(n=>n);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}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+=Rf(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},ue.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Duration { values: ${JSON.stringify(this.values)} }`:`Duration { Invalid, reason: ${this.invalidReason} }`}toMillis(){return this.isValid?_E(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e),n={};for(const i of Tt)(Yt(t.values,i)||Yt(this.values,i))&&(n[i]=t.get(i)+this.get(i));return yt(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const n of Object.keys(this.values))t[n]=oE(e(this.values[n],n));return yt(this,{values:t},!0)}get(e){return this[ge.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...pn(e,ge.normalizeUnit)};return yt(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:n,matrix:i}={}){const o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:i,conversionAccuracy:n};return yt(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Ud(this.matrix,e),yt(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=_A(this.normalize().shiftToAll().toObject());return yt(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>ge.normalizeUnit(o));const t={},n={},i=this.toObject();let a;for(const o of Tt)if(e.indexOf(o)>=0){a=o;let s=0;for(const u in n)s+=this.matrix[u][o]*n[u],n[u]=0;vt(i[o])&&(s+=i[o]);const l=Math.trunc(s);t[o]=l,n[o]=(s*1e3-l*1e3)/1e3}else vt(i[o])&&(n[o]=i[o]);for(const o in n)n[o]!==0&&(t[a]+=o===a?n[o]:n[o]/this.matrix[a][o]);return Ud(this.matrix,t),yt(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return yt(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(n,i){return n===void 0||n===0?i===void 0||i===0:n===i}for(const n of Tt)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Vt="Invalid Interval";function CA(r,e){return!r||!r.isValid?Te.invalid("missing or invalid start"):!e||!e.isValid?Te.invalid("missing or invalid end"):e<r?Te.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}class Te{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the Interval is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new WT(n);return new Te({invalid:n})}static fromDateTimes(e,t){const n=wr(e),i=wr(t),a=CA(n,i);return a??new Te({start:n,end:i})}static after(e,t){const n=ge.fromDurationLike(t),i=wr(e);return Te.fromDateTimes(i,i.plus(n))}static before(e,t){const n=ge.fromDurationLike(t),i=wr(e);return Te.fromDateTimes(i.minus(n),i)}static fromISO(e,t){const[n,i]=(e||"").split("/",2);if(n&&i){let a,o;try{a=ue.fromISO(n,t),o=a.isValid}catch{o=!1}let s,l;try{s=ue.fromISO(i,t),l=s.isValid}catch{l=!1}if(o&&l)return Te.fromDateTimes(a,s);if(o){const u=ge.fromISO(i,t);if(u.isValid)return Te.after(a,u)}else if(l){const u=ge.fromISO(n,t);if(u.isValid)return Te.before(s,u)}}return Te.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let i;return t!=null&&t.useLocaleWeeks?i=this.end.reconfigure({locale:n.locale}):i=this.end,i=i.startOf(e,t),Math.floor(i.diff(n,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:t}={}){return this.isValid?Te.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(wr).filter(o=>this.contains(o)).sort((o,s)=>o.toMillis()-s.toMillis()),n=[];let{s:i}=this,a=0;for(;i<this.e;){const o=t[a]||this.e,s=+o>+this.e?this.e:o;n.push(Te.fromDateTimes(i,s)),i=s,a+=1}return n}splitBy(e){const t=ge.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:n}=this,i=1,a;const o=[];for(;n<this.e;){const s=this.start.plus(t.mapUnits(l=>l*i));a=+s>+this.e?this.e:s,o.push(Te.fromDateTimes(n,a)),n=a,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;const t=this.s>e.s?this.s:e.s,n=this.e<e.e?this.e:e.e;return t>=n?null:Te.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,n=this.e>e.e?this.e:e.e;return Te.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((i,a)=>i.s-a.s).reduce(([i,a],o)=>a?a.overlaps(o)||a.abutsStart(o)?[i,a.union(o)]:[i.concat([a]),o]:[i,o],[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const i=[],a=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...a),s=o.sort((l,u)=>l.time-u.time);for(const l of s)n+=l.type==="s"?1:-1,n===1?t=l.time:(t&&+t!=+l.time&&i.push(Te.fromDateTimes(t,l.time)),t=null);return Te.merge(i)}difference(...e){return Te.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Vt}[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=hn,t={}){return this.isValid?Me.create(this.s.loc.clone(t),e).formatInterval(this):Vt}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Vt}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Vt}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Vt}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Vt}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):ge.invalid(this.invalidReason)}mapEndpoints(e){return Te.fromDateTimes(e(this.s),e(this.e))}}class Qr{static hasDST(e=Ne.defaultZone){const t=ue.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return ft.isValidZone(e)}static normalizeZone(e){return wt(e,Ne.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||_e.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||_e.create(t,n,a)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null,outputCalendar:a="gregory"}={}){return(i||_e.create(t,n,a)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||_e.create(t,n,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:n=null,locObj:i=null}={}){return(i||_e.create(t,n,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return _e.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return _e.create(t,null,"gregory").eras(e)}static features(){return{relative:nE(),localeWeek:iE()}}}function Vd(r,e){const t=i=>i.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=t(e)-t(r);return Math.floor(ge.fromMillis(n).as("days"))}function EA(r,e,t){const n=[["years",(l,u)=>u.year-l.year],["quarters",(l,u)=>u.quarter-l.quarter+(u.year-l.year)*4],["months",(l,u)=>u.month-l.month+(u.year-l.year)*12],["weeks",(l,u)=>{const h=Vd(l,u);return(h-h%7)/7}],["days",Vd]],i={},a=r;let o,s;for(const[l,u]of n)t.indexOf(l)>=0&&(o=l,i[l]=u(r,e),s=a.plus(i),s>e?(i[l]--,r=a.plus(i),r>e&&(s=r,i[l]--,r=a.plus(i))):r=s);return[r,i,s,o]}function SA(r,e,t,n){let[i,a,o,s]=EA(r,e,t);const l=e-i,u=t.filter(c=>["hours","minutes","seconds","milliseconds"].indexOf(c)>=0);u.length===0&&(o<e&&(o=i.plus({[s]:1})),o!==i&&(a[s]=(a[s]||0)+l/(o-i)));const h=ge.fromObject(a,n);return u.length>0?ge.fromMillis(l,n).shiftTo(...u).plus(h):h}const TA="missing Intl.DateTimeFormat.formatToParts support";function be(r,e=t=>t){return{regex:r,deser:([t])=>e(pq(t))}}const qA=" ",CE=`[ ${qA}]`,EE=new RegExp(CE,"g");function AA(r){return r.replace(/\./g,"\\.?").replace(EE,CE)}function Qd(r){return r.replace(/\./g,"").replace(EE," ").toLowerCase()}function Ye(r,e){return r===null?null:{regex:RegExp(r.map(AA).join("|")),deser:([t])=>r.findIndex(n=>Qd(t)===Qd(n))+e}}function Wd(r,e){return{regex:r,deser:([,t,n])=>_n(t,n),groups:e}}function Wr(r){return{regex:r,deser:([e])=>e}}function OA(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function RA(r,e){const t=Ke(e),n=Ke(e,"{2}"),i=Ke(e,"{3}"),a=Ke(e,"{4}"),o=Ke(e,"{6}"),s=Ke(e,"{1,2}"),l=Ke(e,"{1,3}"),u=Ke(e,"{1,6}"),h=Ke(e,"{1,9}"),c=Ke(e,"{2,4}"),f=Ke(e,"{4,6}"),d=m=>({regex:RegExp(OA(m.val)),deser:([g])=>g,literal:!0}),_=(m=>{if(r.literal)return d(m);switch(m.val){case"G":return Ye(e.eras("short"),0);case"GG":return Ye(e.eras("long"),0);case"y":return be(u);case"yy":return be(c,wf);case"yyyy":return be(a);case"yyyyy":return be(f);case"yyyyyy":return be(o);case"M":return be(s);case"MM":return be(n);case"MMM":return Ye(e.months("short",!0),1);case"MMMM":return Ye(e.months("long",!0),1);case"L":return be(s);case"LL":return be(n);case"LLL":return Ye(e.months("short",!1),1);case"LLLL":return Ye(e.months("long",!1),1);case"d":return be(s);case"dd":return be(n);case"o":return be(l);case"ooo":return be(i);case"HH":return be(n);case"H":return be(s);case"hh":return be(n);case"h":return be(s);case"mm":return be(n);case"m":return be(s);case"q":return be(s);case"qq":return be(n);case"s":return be(s);case"ss":return be(n);case"S":return be(l);case"SSS":return be(i);case"u":return Wr(h);case"uu":return Wr(s);case"uuu":return be(t);case"a":return Ye(e.meridiems(),0);case"kkkk":return be(a);case"kk":return be(c,wf);case"W":return be(s);case"WW":return be(n);case"E":case"c":return be(t);case"EEE":return Ye(e.weekdays("short",!1),1);case"EEEE":return Ye(e.weekdays("long",!1),1);case"ccc":return Ye(e.weekdays("short",!0),1);case"cccc":return Ye(e.weekdays("long",!0),1);case"Z":case"ZZ":return Wd(new RegExp(`([+-]${s.source})(?::(${n.source}))?`),2);case"ZZZ":return Wd(new RegExp(`([+-]${s.source})(${n.source})?`),2);case"z":return Wr(/[a-z_+-/]{1,256}?/i);case" ":return Wr(/[^\S\n\r]/);default:return d(m)}})(r)||{invalidReason:TA};return _.token=r,_}const NA={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 IA(r,e,t){const{type:n,value:i}=r;if(n==="literal"){const l=/^\s+$/.test(i);return{literal:!l,val:l?" ":i}}const a=e[n];let o=n;n==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=t.hour12?"hour12":"hour24");let s=NA[o];if(typeof s=="object"&&(s=s[a]),s)return{literal:!1,val:s}}function xA(r){return[`^${r.map(t=>t.regex).reduce((t,n)=>`${t}(${n.source})`,"")}$`,r]}function $A(r,e,t){const n=r.match(e);if(n){const i={};let a=1;for(const o in t)if(Yt(t,o)){const s=t[o],l=s.groups?s.groups+1:1;!s.literal&&s.token&&(i[s.token.val[0]]=s.deser(n.slice(a,a+l))),a+=l}return[n,i]}else return[n,{}]}function PA(r){const e=a=>{switch(a){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}};let t=null,n;return ce(r.z)||(t=ft.create(r.z)),ce(r.Z)||(t||(t=new De(r.Z)),n=r.Z),ce(r.q)||(r.M=(r.q-1)*3+1),ce(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),ce(r.u)||(r.S=Of(r.u)),[Object.keys(r).reduce((a,o)=>{const s=e(o);return s&&(a[s]=r[o]),a},{}),t,n]}let ti=null;function kA(){return ti||(ti=ue.fromMillis(1555555555555)),ti}function LA(r,e){if(r.literal)return r;const t=Me.macroTokenToFormatOpts(r.val),n=AE(t,e);return n==null||n.includes(void 0)?r:n}function SE(r,e){return Array.prototype.concat(...r.map(t=>LA(t,e)))}class TE{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=SE(Me.parseFormat(t),e),this.units=this.tokens.map(n=>RA(n,e)),this.disqualifyingUnit=this.units.find(n=>n.invalidReason),!this.disqualifyingUnit){const[n,i]=xA(this.units);this.regex=RegExp(n,"i"),this.handlers=i}}explainFromTokens(e){if(this.isValid){const[t,n]=$A(e,this.regex,this.handlers),[i,a,o]=n?PA(n):[null,null,void 0];if(Yt(n,"a")&&Yt(n,"H"))throw new Gt("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:i,zone:a,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 qE(r,e,t){return new TE(r,t).explainFromTokens(e)}function MA(r,e,t){const{result:n,zone:i,specificOffset:a,invalidReason:o}=qE(r,e,t);return[n,i,a,o]}function AE(r,e){if(!r)return null;const n=Me.create(e,r).dtFormatter(kA()),i=n.formatToParts(),a=n.resolvedOptions();return i.map(o=>IA(o,r,a))}const ri="Invalid DateTime",Hd=864e13;function Sr(r){return new Xe("unsupported zone",`the zone "${r.name}" is not supported`)}function ni(r){return r.weekData===null&&(r.weekData=fn(r.c)),r.weekData}function ii(r){return r.localWeekData===null&&(r.localWeekData=fn(r.c,r.loc.getMinDaysInFirstWeek(),r.loc.getStartOfWeek())),r.localWeekData}function St(r,e){const t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new ue({...t,...e,old:t})}function OE(r,e,t){let n=r-e*60*1e3;const i=t.offset(n);if(e===i)return[n,e];n-=(i-e)*60*1e3;const a=t.offset(n);return i===a?[n,i]:[r-Math.min(i,a)*60*1e3,Math.max(i,a)]}function Hr(r,e){r+=e*60*1e3;const t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function ln(r,e,t){return OE(vn(r),e,t)}function zd(r,e){const t=r.o,n=r.c.year+Math.trunc(e.years),i=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,a={...r.c,year:n,month:i,day:Math.min(r.c.day,dn(n,i))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=ge.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"),s=vn(a);let[l,u]=OE(s,t,r.zone);return o!==0&&(l+=o,u=r.zone.offset(l)),{ts:l,o:u}}function Qt(r,e,t,n,i,a){const{setZone:o,zone:s}=t;if(r&&Object.keys(r).length!==0||e){const l=e||s,u=ue.fromObject(r,{...t,zone:l,specificOffset:a});return o?u:u.setZone(s)}else return ue.invalid(new Xe("unparsable",`the input "${i}" can't be parsed as ${n}`))}function zr(r,e,t=!0){return r.isValid?Me.create(_e.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function si(r,e){const t=r.c.year>9999||r.c.year<0;let n="";return t&&r.c.year>=0&&(n+="+"),n+=xe(r.c.year,t?6:4),e?(n+="-",n+=xe(r.c.month),n+="-",n+=xe(r.c.day)):(n+=xe(r.c.month),n+=xe(r.c.day)),n}function Gd(r,e,t,n,i,a){let o=xe(r.c.hour);return e?(o+=":",o+=xe(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=":")):o+=xe(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=xe(r.c.second),(r.c.millisecond!==0||!n)&&(o+=".",o+=xe(r.c.millisecond,3))),i&&(r.isOffsetFixed&&r.offset===0&&!a?o+="Z":r.o<0?(o+="-",o+=xe(Math.trunc(-r.o/60)),o+=":",o+=xe(Math.trunc(-r.o%60))):(o+="+",o+=xe(Math.trunc(r.o/60)),o+=":",o+=xe(Math.trunc(r.o%60)))),a&&(o+="["+r.zone.ianaName+"]"),o}const RE={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},DA={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},jA={ordinal:1,hour:0,minute:0,second:0,millisecond:0},NE=["year","month","day","hour","minute","second","millisecond"],FA=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],BA=["year","ordinal","hour","minute","second","millisecond"];function UA(r){const 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"}[r.toLowerCase()];if(!e)throw new RC(r);return e}function Jd(r){switch(r.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return UA(r)}}function VA(r){if(Tr===void 0&&(Tr=Ne.now()),r.type!=="iana")return r.offset(Tr);const e=r.name;let t=vf.get(e);return t===void 0&&(t=r.offset(Tr),vf.set(e,t)),t}function Kd(r,e){const t=wt(e.zone,Ne.defaultZone);if(!t.isValid)return ue.invalid(Sr(t));const n=_e.fromObject(e);let i,a;if(ce(r.year))i=Ne.now();else{for(const l of NE)ce(r[l])&&(r[l]=RE[l]);const o=tE(r)||rE(r);if(o)return ue.invalid(o);const s=VA(t);[i,a]=ln(r,s,t)}return new ue({ts:i,zone:t,loc:n,o:a})}function Yd(r,e,t){const n=ce(t.round)?!0:t.round,i=(o,s)=>(o=Rf(o,n||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,s)),a=o=>t.calendary?e.hasSame(r,o)?0:e.startOf(o).diff(r.startOf(o),o).get(o):e.diff(r,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const s=a(o);if(Math.abs(s)>=1)return i(s,o)}return i(r>e?-0:0,t.units[t.units.length-1])}function Zd(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}let Tr;const vf=new Map;class ue{constructor(e){const t=e.zone||Ne.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Xe("invalid input"):null)||(t.isValid?null:Sr(t));this.ts=ce(e.ts)?Ne.now():e.ts;let i=null,a=null;if(!n)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[i,a]=[e.old.c,e.old.o];else{const s=vt(e.o)&&!e.old?e.o:t.offset(this.ts);i=Hr(this.ts,s),n=Number.isNaN(i.year)?new Xe("invalid input"):null,i=n?null:i,a=n?null:s}this._zone=t,this.loc=e.loc||_e.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=i,this.o=a,this.isLuxonDateTime=!0}static now(){return new ue({})}static local(){const[e,t]=Zd(arguments),[n,i,a,o,s,l,u]=t;return Kd({year:n,month:i,day:a,hour:o,minute:s,second:l,millisecond:u},e)}static utc(){const[e,t]=Zd(arguments),[n,i,a,o,s,l,u]=t;return e.zone=De.utcInstance,Kd({year:n,month:i,day:a,hour:o,minute:s,second:l,millisecond:u},e)}static fromJSDate(e,t={}){const n=wq(e)?e.valueOf():NaN;if(Number.isNaN(n))return ue.invalid("invalid input");const i=wt(t.zone,Ne.defaultZone);return i.isValid?new ue({ts:n,zone:i,loc:_e.fromObject(t)}):ue.invalid(Sr(i))}static fromMillis(e,t={}){if(vt(e))return e<-Hd||e>Hd?ue.invalid("Timestamp out of range"):new ue({ts:e,zone:wt(t.zone,Ne.defaultZone),loc:_e.fromObject(t)});throw new Le(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(vt(e))return new ue({ts:e*1e3,zone:wt(t.zone,Ne.defaultZone),loc:_e.fromObject(t)});throw new Le("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const n=wt(t.zone,Ne.defaultZone);if(!n.isValid)return ue.invalid(Sr(n));const i=_e.fromObject(t),a=pn(e,Jd),{minDaysInFirstWeek:o,startOfWeek:s}=Ld(a,i),l=Ne.now(),u=ce(t.specificOffset)?n.offset(l):t.specificOffset,h=!ce(a.ordinal),c=!ce(a.year),f=!ce(a.month)||!ce(a.day),d=c||f,w=a.weekYear||a.weekNumber;if((d||h)&&w)throw new Gt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(f&&h)throw new Gt("Can't mix ordinal dates with month/day");const _=w||a.weekday&&!d;let m,g,p=Hr(l,u);_?(m=FA,g=DA,p=fn(p,o,s)):h?(m=BA,g=jA,p=ei(p)):(m=NE,g=RE);let b=!1;for(const C of m){const q=a[C];ce(q)?b?a[C]=g[C]:a[C]=p[C]:b=!0}const v=_?gq(a,o,s):h?yq(a):tE(a),E=v||rE(a);if(E)return ue.invalid(E);const T=_?Pd(a,o,s):h?kd(a):a,[S,R]=ln(T,u,n),j=new ue({ts:S,zone:n,o:R,loc:i});return a.weekday&&d&&e.weekday!==j.weekday?ue.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${j.toISO()}`):j.isValid?j:ue.invalid(j.invalid)}static fromISO(e,t={}){const[n,i]=uA(e);return Qt(n,i,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[n,i]=lA(e);return Qt(n,i,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[n,i]=cA(e);return Qt(n,i,t,"HTTP",t)}static fromFormat(e,t,n={}){if(ce(e)||ce(t))throw new Le("fromFormat requires an input string and a format");const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0}),[s,l,u,h]=MA(o,e,t);return h?ue.invalid(h):Qt(s,l,n,`format ${t}`,e,u)}static fromString(e,t,n={}){return ue.fromFormat(e,t,n)}static fromSQL(e,t={}){const[n,i]=yA(e);return Qt(n,i,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new Le("need to specify a reason the DateTime is invalid");const n=e instanceof Xe?e:new Xe(e,t);if(Ne.throwOnInvalid)throw new QT(n);return new ue({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const n=AE(e,_e.fromObject(t));return n?n.map(i=>i?i.val:null).join(""):null}static expandFormat(e,t={}){return SE(Me.parseFormat(e),_e.fromObject(t)).map(i=>i.val).join("")}static resetCache(){Tr=void 0,vf.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?ni(this).weekYear:NaN}get weekNumber(){return this.isValid?ni(this).weekNumber:NaN}get weekday(){return this.isValid?ni(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ii(this).weekday:NaN}get localWeekNumber(){return this.isValid?ii(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ii(this).weekYear:NaN}get ordinal(){return this.isValid?ei(this.c).ordinal:NaN}get monthShort(){return this.isValid?Qr.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Qr.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Qr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Qr.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];const e=864e5,t=6e4,n=vn(this.c),i=this.zone.offset(n-e),a=this.zone.offset(n+e),o=this.zone.offset(n-i*t),s=this.zone.offset(n-a*t);if(o===s)return[this];const l=n-o*t,u=n-s*t,h=Hr(l,o),c=Hr(u,s);return h.hour===c.hour&&h.minute===c.minute&&h.second===c.second&&h.millisecond===c.millisecond?[St(this,{ts:l}),St(this,{ts:u})]:[this]}get isInLeapYear(){return Nr(this.year)}get daysInMonth(){return dn(this.year,this.month)}get daysInYear(){return this.isValid?Jt(this.year):NaN}get weeksInWeekYear(){return this.isValid?Ar(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?Ar(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:n,calendar:i}=Me.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:i}}toUTC(e=0,t={}){return this.setZone(De.instance(e),t)}toLocal(){return this.setZone(Ne.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:n=!1}={}){if(e=wt(e,Ne.defaultZone),e.equals(this.zone))return this;if(e.isValid){let i=this.ts;if(t||n){const a=e.offset(this.ts),o=this.toObject();[i]=ln(o,a,e)}return St(this,{ts:i,zone:e})}else return ue.invalid(Sr(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:n}={}){const i=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n});return St(this,{loc:i})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=pn(e,Jd),{minDaysInFirstWeek:n,startOfWeek:i}=Ld(t,this.loc),a=!ce(t.weekYear)||!ce(t.weekNumber)||!ce(t.weekday),o=!ce(t.ordinal),s=!ce(t.year),l=!ce(t.month)||!ce(t.day),u=s||l,h=t.weekYear||t.weekNumber;if((u||o)&&h)throw new Gt("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&o)throw new Gt("Can't mix ordinal dates with month/day");let c;a?c=Pd({...fn(this.c,n,i),...t},n,i):ce(t.ordinal)?(c={...this.toObject(),...t},ce(t.day)&&(c.day=Math.min(dn(c.year,c.month),c.day))):c=kd({...ei(this.c),...t});const[f,d]=ln(c,this.o,this.zone);return St(this,{ts:f,o:d})}plus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e);return St(this,zd(this,t))}minus(e){if(!this.isValid)return this;const t=ge.fromDurationLike(e).negate();return St(this,zd(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const n={},i=ge.normalizeUnit(e);switch(i){case"years":n.month=1;case"quarters":case"months":n.day=1;case"weeks":case"days":n.hour=0;case"hours":n.minute=0;case"minutes":n.second=0;case"seconds":n.millisecond=0;break}if(i==="weeks")if(t){const a=this.loc.getStartOfWeek(),{weekday:o}=this;o<a&&(n.weekNumber=this.weekNumber-1),n.weekday=a}else n.weekday=1;if(i==="quarters"){const a=Math.ceil(this.month/3);n.month=(a-1)*3+1}return this.set(n)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?Me.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):ri}toLocaleString(e=hn,t={}){return this.isValid?Me.create(this.loc.clone(t),e).formatDateTime(this):ri}toLocaleParts(e={}){return this.isValid?Me.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:i=!0,extendedZone:a=!1}={}){if(!this.isValid)return null;const o=e==="extended";let s=si(this,o);return s+="T",s+=Gd(this,o,t,n,i,a),s}toISODate({format:e="extended"}={}){return this.isValid?si(this,e==="extended"):null}toISOWeekDate(){return zr(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:i=!1,extendedZone:a=!1,format:o="extended"}={}){return this.isValid?(i?"T":"")+Gd(this,o==="extended",t,e,n,a):null}toRFC2822(){return zr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return zr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?si(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}={}){let i="HH:mm:ss.SSS";return(t||e)&&(n&&(i+=" "),t?i+="z":e&&(i+="ZZ")),zr(this,i,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():ri}[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{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",n={}){if(!this.isValid||!e.isValid)return ge.invalid("created by diffing an invalid DateTime");const i={locale:this.locale,numberingSystem:this.numberingSystem,...n},a=vq(t).map(ge.normalizeUnit),o=e.valueOf()>this.valueOf(),s=o?this:e,l=o?e:this,u=SA(s,l,a,i);return o?u.negate():u}diffNow(e="milliseconds",t={}){return this.diff(ue.now(),e,t)}until(e){return this.isValid?Te.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const i=e.valueOf(),a=this.setZone(e.zone,{keepLocalTime:!0});return a.startOf(t,n)<=i&&i<=a.endOf(t,n)}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;const t=e.base||ue.fromObject({},{zone:this.zone}),n=e.padding?this<t?-e.padding:e.padding:0;let i=["years","months","days","hours","minutes","seconds"],a=e.unit;return Array.isArray(e.unit)&&(i=e.unit,a=void 0),Yd(t,this.plus(n),{...e,numeric:"always",units:i,unit:a})}toRelativeCalendar(e={}){return this.isValid?Yd(e.base||ue.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(ue.isDateTime))throw new Le("min requires all arguments be DateTimes");return Md(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(ue.isDateTime))throw new Le("max requires all arguments be DateTimes");return Md(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,n={}){const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});return qE(o,e,t)}static fromStringExplain(e,t,n={}){return ue.fromFormatExplain(e,t,n)}static buildFormatParser(e,t={}){const{locale:n=null,numberingSystem:i=null}=t,a=_e.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0});return new TE(a,e)}static fromFormatParser(e,t,n={}){if(ce(e)||ce(t))throw new Le("fromFormatParser requires an input string and a format parser");const{locale:i=null,numberingSystem:a=null}=n,o=_e.fromOpts({locale:i,numberingSystem:a,defaultToEN:!0});if(!o.equals(t.locale))throw new Le(`fromFormatParser called with a locale of ${o}, but the format parser was created for ${t.locale}`);const{result:s,zone:l,specificOffset:u,invalidReason:h}=t.explainFromTokens(e);return h?ue.invalid(h):Qt(s,l,n,`format ${t.format}`,e,u)}static get DATE_SHORT(){return hn}static get DATE_MED(){return NC}static get DATE_MED_WITH_WEEKDAY(){return zT}static get DATE_FULL(){return IC}static get DATE_HUGE(){return xC}static get TIME_SIMPLE(){return $C}static get TIME_WITH_SECONDS(){return PC}static get TIME_WITH_SHORT_OFFSET(){return kC}static get TIME_WITH_LONG_OFFSET(){return LC}static get TIME_24_SIMPLE(){return MC}static get TIME_24_WITH_SECONDS(){return DC}static get TIME_24_WITH_SHORT_OFFSET(){return jC}static get TIME_24_WITH_LONG_OFFSET(){return FC}static get DATETIME_SHORT(){return BC}static get DATETIME_SHORT_WITH_SECONDS(){return UC}static get DATETIME_MED(){return VC}static get DATETIME_MED_WITH_SECONDS(){return QC}static get DATETIME_MED_WITH_WEEKDAY(){return GT}static get DATETIME_FULL(){return WC}static get DATETIME_FULL_WITH_SECONDS(){return HC}static get DATETIME_HUGE(){return zC}static get DATETIME_HUGE_WITH_SECONDS(){return GC}}function wr(r){if(ue.isDateTime(r))return r;if(r&&r.valueOf&&vt(r.valueOf()))return ue.fromJSDate(r);if(r&&typeof r=="object")return ue.fromObject(r);throw new Le(`Unknown datetime argument: ${r}, of type ${typeof r}`)}const QA=r=>{const e=[],t=WA(r);let n=t.next();for(;n;)e.push(n),n=t.next();return e},WA=r=>({...r,next:HA(r)}),HA=r=>{let e=r.start;return()=>{if(e==null)return null;let t=null;switch(r.granularity){case nt.Total:t=zA(e,r.end);break;case nt.Annual:t=GA(e,r.end);break;case nt.SemiAnnual:t=JA(e,r.end);break;case nt.Quarterly:t=KA(e,r.end);break;case nt.Monthly:t=YA(e,r.end);break;case nt.Weekly:t=ZA(e,r.end);break;case nt.Daily:t=XA(e,r.end);break;case nt.Hourly:t=eO(e,r.end)}return t===null?e=null:e=t.end.plus({milliseconds:1}),t}},zA=(r,e)=>e<=r?null:{period:"total",start:r,end:e},GA=(r,e)=>{if(e<=r)return null;const t=r.toUTC(),n=ue.utc(t.year,t.month,t.day).plus({years:1});return{period:"annual",start:r,end:n}},JA=(r,e)=>{if(e<=r)return null;const t=ue.utc(r.year,7,1),n=ue.utc(r.year,12,31,23,59,59,999);let i;return t>r?i=t:i=n,i>e&&(i=e),{period:"semiAnnual",start:r,end:i}},KA=(r,e)=>{if(e<=r)return null;let t;const n=r.toUTC(),i=n.month;return i<3?t=ue.utc(n.year,4,1):i<6?t=ue.utc(n.year,7,1):i<9?t=ue.utc(n.year,10,1):t=ue.utc(n.year,12,31,23,59,59,999),t>e&&(t=e),{period:"quarterly",start:r,end:t}},YA=(r,e)=>{if(e<=r)return null;const t=r.toUTC();let n=ue.utc(t.year,t.month,t.day).plus({months:1}).startOf("month");return n>e&&(r.hasSame(e,"month")||(n=e)),{period:"monthly",start:r,end:n}},ZA=(r,e)=>{if(e<=r)return null;const t=r.toUTC(),n=ue.utc(t.year,t.month,t.day).plus({weeks:1}).startOf("week");return n>e&&!n.hasSame(e,"day")?{period:"weekly",start:r,end:e}:{period:"weekly",start:r,end:n}},XA=(r,e)=>{if(e<=r)return null;let n=r.toUTC().plus({days:1}).startOf("day");return(n>e||n.hasSame(e,"day"))&&(n=e),{period:"daily",start:r,end:n}},eO=(r,e)=>{if(e<=r)return null;let n=r.toUTC().plus({hours:1});return n>e&&r.hour!==e.hour&&(n=e.toUTC()),{period:"hourly",start:r,end:n}},tO=r=>Math.floor((r.month-1)/3)+1;class $f{static discretize(e,t,n,i,a){const o=this._buildIndex(e,t),s=QA(this._calculateRange(n,i,a,e)),l=this._discretizeNode(o,{},t,s);return this._groupResultsByPeriod(s,l)}static _calculateRange(e,t,n,i){let a=e||null,o=t||null;if(a==null||o==null)for(const s of i){a==null&&(a=s.start);const l=s.end||s.start;(o==null||o<l)&&(o=l)}if(a==null||o==null)throw new Error("Cannot determine query start and/or end.");return{start:a,end:o,granularity:n}}static _groupResultsByPeriod(e,t){const n={};for(const i of e){const a=i.start.toISO()+"-"+i.period,o=$f._getPeriodString(i);n[a]={period:o,start:i.start,end:i.end,rows:[]}}for(const i of t)for(const a of Object.keys(i.series))n[a].rows.push({dimensions:i.dimensions,metric:i.metric,unit:i.unit=="__NULL__"?null:i.unit,value:i.series[a].inc,sum:i.series[a].sum});return Object.values(n)}static _getPeriodString(e){switch(e.period){case"annual":return e.start.year.toString();case"semiAnnual":return`${e.start.year}/${e.start.month<7?"H1":"H2"}`;case"quarterly":return`${e.start.year}/Q${tO(e.start)}`;case"monthly":const t=e.start.toUTC().month,n=t<10?`0${t}`:`${t}`;return`${e.start.year}/${n}`;case"weekly":return`${e.start.weekYear}/W${e.start.weekNumber}`;case"daily":const i=e.start.month,a=e.start.day,o=i<10?`0${i}`:`${i}`,s=a<10?`0${a}`:`${a}`;return`${e.start.year}/${o}/${s}`;case"hourly":const l=e.start.month,u=e.start.day,h=e.start.hour,c=l<10?`0${l}`:`${l}`,f=u<10?`0${u}`:`${u}`,d=h<10?`0${h}`:`${h}`;return`${e.start.year}/${c}/${f}/${d}`;default:return e.period}}static _discretizeNode(e,t,n,i){const a=[];if(n.length>0){const o=n[0];Object.keys(e).forEach((s,l,u)=>{const h={...t};h[o]=s,a.push(...this._discretizeNode(e[s],h,n.slice(1),i))})}else Object.keys(e).forEach(o=>{a.push(...this._discretizeLeaf(e[o],i,o,t))});return a}static _discretizeLeaf(e,t,n,i){const a=[];return Object.keys(e).forEach(o=>{const s={};Object.keys(i).forEach(l=>{s[l]={path:e[o][0].dimensions[l],icon:e[o][0].dimensions.icon,label:e[o][0].dimensions.label,description:e[o][0].dimensions.description}}),a.push({unit:o,metric:n,dimensions:s,series:this._discretizeSeries(e[o],t)})}),a}static _discretizeSeries(e,t){const n={};for(const i of e){let a=this._getValue(i,t[0].start);for(const o of t){const s=this._getValue(i,o.end),l=`${o.start.toISO()}-${o.period}`;n[l]?(n[l].inc+=s-a,n[l].sum+=s):n[l]={inc:s-a,sum:s},a=s}}return n}static _getValue(e,t){switch(e.fn){case"Single":return this._getSingleValue(e,t);case"DssVest":return this._getVestValue(e,t);default:return 0}}static _getSingleValue(e,t){return t>=e.start?e.value:0}static _getVestValue(e,t){var u;const n=t,i=e.start,a=e.end,o=(u=e.params)!=null&&u.cliff?ue.fromISO(e.params.cliff):null;if(n<i||o&&n<o)return 0;if(a&&n>=a)return e.value;const s=Te.fromDateTimes(i,n),l=Te.fromDateTimes(i,a||n);return s.length()/l.length()*e.value}static _buildIndex(e,t){const n={},i={},a=t[0]||"";for(const o of e){const s=o.dimensions[a];i[s]===void 0&&(i[s]=[]),i[s].push(o)}if(t.length>1){const o=t.slice(1);Object.keys(i).forEach(s=>{n[s]=this._buildIndex(i[s],o)})}else Object.keys(i).forEach(o=>{n[o]=this._buildMetricsIndex(i[o])});return n}static _buildMetricsIndex(e){const t={},n={};for(const i of e){const a=i.metric;n[a]===void 0&&(n[a]=[]),n[a].push(i)}return Object.keys(n).forEach(i=>t[i]=this._buildUnitIndex(n[i])),t}static _buildUnitIndex(e){const t={};for(const n of e){const i=n.unit||"__NULL__";t[i]===void 0&&(t[i]=[]),t[i].push(n)}return t}}class rO{constructor(e,t){ve(this,"_analyticsStore");ve(this,"_profiler");this._analyticsStore=e,this._profiler=t??new OC}async executeCompound(e){let t;const n={start:e.start,end:e.end,granularity:e.granularity,lod:e.lod,select:e.select,metrics:e.expression.inputs.metrics,currency:e.expression.inputs.currency},i={start:e.start,end:e.end,granularity:e.granularity,lod:{priceData:1},select:{priceData:[it.fromString("atlas")]},metrics:[e.expression.operand.metric],currency:e.expression.operand.currency},a=await this.execute(n),o=await this.execute(i);return[je.VectorAdd,je.VectorSubtract].includes(e.expression.operator)?t=await this._profiler.record("ApplyVectorOperator",async()=>await this._applyVectorOperator(a,o,e.expression.operator,e.expression.resultCurrency)):t=await this._profiler.record("ApplyScalarOperator",async()=>await this._applyScalarOperator(a,o,e.expression.operator,e.expression.operand.useSum,e.expression.resultCurrency)),t}async execute(e){const t=await this._executeSeriesQuery(e),n=this._profiler.recordSync("ApplyLODs",()=>this._applyLods(t,e.lod)),i=Object.keys(e.select);return this._profiler.recordSync("Discretize",()=>n.length<1?[]:$f.discretize(n,i,e.start,e.end,e.granularity))}async executeMultiCurrency(e,t){const n={...e,currency:t.targetCurrency??e.currency};let i=await this.execute(n);for(const a of t.conversions){const o={start:e.start,end:e.end,granularity:e.granularity,lod:e.lod,select:e.select,expression:{inputs:{metrics:n.metrics,currency:a.currency},operator:je.ScalarMultiply,operand:{metric:a.metric,currency:t.targetCurrency,useSum:!0},resultCurrency:t.targetCurrency}},s=await this.executeCompound(o);i=await this._applyVectorOperator(i,s,je.VectorAdd,t.targetCurrency)}return i}async _applyVectorOperator(e,t,n,i){if([je.ScalarMultiply,je.ScalarDivide].includes(n))throw new Error("Invalid operator for vector operation");return t}async _applyScalarOperator(e,t,n,i,a){if([je.VectorAdd,je.VectorSubtract].includes(n))throw new Error("Invalid operator for scalar operation");const o=[],s={},l=i?"sum":"value";for(const u of t)u.rows.length>0&&(s[u.period]=u.rows[0][l]);for(const u of e){const h={period:u.period,start:u.start,end:u.end,rows:u.rows.map(c=>({dimensions:c.dimensions,metric:c.metric,unit:a?a.toString():c.unit,value:this._calculateOutputValue(c.value,n,s[u.period]),sum:-1}))};o.push(h)}return o}_calculateOutputValue(e,t,n){switch(t){case je.VectorAdd:return e+n;case je.VectorSubtract:return e-n;case je.ScalarMultiply:return e*n;case je.ScalarDivide:return e/n}}async _executeSeriesQuery(e){const t={start:e.start,end:e.end,select:e.select,metrics:e.metrics,currency:e.currency};return await this._analyticsStore.getMatchingSeries(t)}_applyLods(e,t){return e.map(n=>({...n,dimensions:this._applyDimensionsLods(n.dimensions,t)}))}_applyDimensionsLods(e,t){const n={};for(const[i,a]of Object.entries(t))a!==null&&e[i]&&(n[i]=e[i].path.applyLod(a).toString(),n.icon=e[i].icon.toString(),n.label=e[i].label.toString(),n.description=e[i].description.toString());return n}async getDimensions(){return await this._analyticsStore.getDimensions()}}class nO extends Error{constructor(t){super(t.map(n=>n.message).join(`
|
|
3
3
|
`));ve(this,"innerErrors");this.name="NotificationError",this.innerErrors=t}}class iO{constructor(){ve(this,"_subscriptions",new Map)}subscribeToPath(e,t){const n=this.normalizePath(e.toString("/"));return this._subscriptions.has(n)||this._subscriptions.set(n,new Set),this._subscriptions.get(n).add(t),()=>{const i=this._subscriptions.get(n);i&&(i.delete(t),i.size===0&&this._subscriptions.delete(n))}}notifySubscribers(e){if(e.length===0||this._subscriptions.size===0)return;const t=[];for(const n of e){const i=this.normalizePath(n.toString("/")),a=this.getPathPrefixes(i),o=[];a.filter(s=>this._subscriptions.has(s)).forEach(s=>{o.push({prefix:s,callbacks:this._subscriptions.get(s)})});for(const[s,l]of this._subscriptions.entries())a.includes(s)||this.pathMatchesWildcardPattern(i,s)&&o.push({prefix:s,callbacks:l});if(o.length!==0)for(const{callbacks:s}of o)for(const l of s)try{l(n)}catch(u){t.push(u)}}if(t.length>0)throw new nO(t)}normalizePath(e){return"/"+e.split("/").filter(i=>i.length>0).join("/")}pathMatchesWildcardPattern(e,t){if(t.includes("*")){const n=e.split("/").filter(a=>a.length>0),i=t.split("/").filter(a=>a.length>0);if(i.length>n.length)return!1;for(let a=0;a<i.length;a++){const o=i[a],s=n[a];if(!(o==="*"||o.startsWith("*:"))&&o!==s)return!1}return!0}return e===t||e.startsWith(t+"/")}getPathPrefixes(e){const t=e.split("/").filter(a=>a.length>0),n=[];let i="";for(const a of t)i=i?`${i}/${a}`:`/${a}`,n.push(i);return n.length===0&&e==="/"&&n.push("/"),n}}function sO(r){return r.replace(/\w+/g,function(e){return e[0].toUpperCase()+e.slice(1)}).replace(/\s+/g,"")}class oO{constructor({executor:e,knex:t}){ve(this,"_executor");ve(this,"_knex");ve(this,"_subscriptionManager",new iO);this._executor=e,this._knex=t}destroy(){this._knex.destroy()}async clearSeriesBySource(e,t=!1){const n=this._knex("AnalyticsSeries").whereLike("source",e.toString("/%")).delete();let i=await this._executor.execute(n);return t&&(i+=await this.clearEmptyAnalyticsDimensions()),this._subscriptionManager.notifySubscribers([e]),i}async clearEmptyAnalyticsDimensions(){const e=this._knex("AnalyticsDimension AS AD").whereNotExists(t=>t.select("*").from("AnalyticsSeries_AnalyticsDimension AS ASAD").where("ASAD.dimensionId",this._knex.ref("AD.id"))).delete();return await this._executor.execute(e)}async getMatchingSeries(e){const t=e.currency?e.currency.firstSegment().filters:null,n=this._buildViewQuery("AV",Object.keys(e.select),e.metrics.map(o=>o),t,e.end),i=this._knex(this._knex.raw(n)).select("AV.*");for(const[o,s]of Object.entries(e.select))i.leftJoin(`AnalyticsDimension as ${o}`,l=>{l.on(`${o}.path`,`dim_${o}`)}),i.select(`${o}.icon as dim_icon`),i.select(`${o}.description as dim_description`),i.select(`${o}.label as dim_label`),s.length==1?i.andWhereLike(`dim_${o}`,s[0].toString("/%")):s.length>1&&i.andWhere(l=>(s.forEach(u=>l.orWhereLike(`dim_${o}`,u.toString("/%"))),l));i.orderBy("start");const a=await this._executor.execute(i);return this._formatQueryRecords(a,Object.keys(e.select))}async addSeriesValue(e){return this.addSeriesValues([e])}async addSeriesValues(e){const t={};for(let i=0;i<e.length;i++){const a=e[i],o=this._knex("AnalyticsSeries").insert({start:a.start.toJSDate(),end:a.end?a.end.toJSDate():null,source:a.source.toString("/"),metric:sO(a.metric),value:a.value,unit:a.unit||null,fn:a.fn||"Single",params:a.params||null},"id"),s=await this._executor.execute(o);for(const[l,u]of Object.entries(e[i].dimensions||{})){t[l]||(t[l]={});const h=u.toString("/");t[l][h]||(t[l][h]=[]),t[l][h].push(s[0].id)}}for(const[i,a]of Object.entries(t))await this._linkDimensions(i,a);for(let i=0;i<e.length;i++){const a=e[i].dimensionMetadata;a&&await this.addDimensionMetadata(a.path,a.icon,a.label,a.description)}const n=e.map(i=>i.source);this._subscriptionManager.notifySubscribers(n)}_formatQueryRecords(e,t){return e.map(i=>{const a={id:i.id,source:it.fromString(i.source.slice(0,-1)),start:ue.fromJSDate(i.start),end:i.end?ue.fromJSDate(i.end):null,metric:i.metric,value:i.value,unit:i.unit,fn:i.fn,params:i.params,dimensions:{}};return t.forEach(o=>a.dimensions[o]={path:it.fromString(i[`dim_${o}`]?i[`dim_${o}`].slice(0,-1):"?"),icon:i.dim_icon?i.dim_icon:"",label:i.dim_label?i.dim_label:"",description:i.dim_description?i.dim_description:""}),a}).sort((i,a)=>i.id-a.id)}_buildViewQuery(e,t,n,i,a){const o=this._knex("AnalyticsSeries as AS_inner").select("*").whereIn("metric",n);for(const s of t)o.select(this._buildDimensionQuery(s));return i&&i.length>0&&i[0]!==""&&o.whereIn("unit",i),a&&o.where("start","<",a.toISO()),`(${o.toString()}) AS "${e}"`}_buildDimensionQuery(e){const t=this._knex.ref("AS_inner.id");return this._knex("AnalyticsSeries_AnalyticsDimension as ASAD").leftJoin("AnalyticsDimension as AD","AD.id","ASAD.dimensionId").where("ASAD.seriesId",t).where("AD.dimension",e).select("path").as(`dim_${e}`)}async _linkDimensions(e,t){const n=this._knex("AnalyticsDimension").select("path","id").where("dimension",e).whereIn("path",Object.keys(t)),i=await this._executor.execute(n);for(const[a,o]of Object.entries(t)){const s=i.findIndex(u=>u.path==a),l=s<0?await this._createDimensionPath(e,a):i[s].id;for(let u=0;u<o.length;u++){const h=this._knex("AnalyticsSeries_AnalyticsDimension").insert({seriesId:o[u],dimensionId:l});await this._executor.execute(h)}}}async _createDimensionPath(e,t){const n=this._knex("AnalyticsDimension").insert({dimension:e,path:t},"id");return(await this._executor.execute(n))[0].id}async addDimensionMetadata(e,t,n,i){if(!t&&!n&&!i)return;const a=this._knex("AnalyticsDimension").where("path",`${e.toString()}/`).update({icon:t||"",label:n||"",description:i||""});await this._executor.execute(a)}async getDimensions(){const e=this._knex.select("dimension","path","icon","label","description").from("AnalyticsDimension").whereNotNull("path").whereNot("path","").whereNot("path","/"),n=(await this._executor.execute(e)).reduce((a,o)=>(a[o.dimension]||(a[o.dimension]={name:o.dimension,values:[]}),a[o.dimension].values.push({path:o.path,icon:o.icon,label:o.label,description:o.description}),a),{});return Object.values(n)}async getMetrics(){const e=this._knex("AnalyticsSeries").select("metric").distinct().whereNotNull("metric"),n=(await this._executor.execute(e)).map(a=>a.metric);return["Budget","Forecast","Actuals","PaymentsOnChain","PaymentsOffChainIncluded"].forEach(a=>{n.includes(a)||n.push(a)}),n}async getCurrencies(){const e=this._knex("AnalyticsSeries").select("unit").distinct().whereNotNull("unit");return(await this._executor.execute(e)).map(n=>n.unit)}subscribeToSource(e,t){return this._subscriptionManager.subscribeToPath(e,t)}}var Gr={exports:{}},Jr={},Kr={},Yr={},Xd;function IE(){if(Xd)return Yr;Xd=1,Object.defineProperty(Yr,"__esModule",{value:!0});let r=class extends Error{};return Yr.TimeoutError=r,Yr}var Ze={},Zr={},ep;function aO(){if(ep)return Zr;ep=1,Object.defineProperty(Zr,"__esModule",{value:!0});let r=class{constructor(t){this._value=t.value,this._error=t.error}value(){return this._value}reason(){return this._error}isRejected(){return!!this._error}isFulfilled(){return!!this._value}};return Zr.PromiseInspection=r,Zr}var tp;function Pf(){if(tp)return Ze;tp=1,Object.defineProperty(Ze,"__esModule",{value:!0});const r=aO();function e(){let u=null,h=null;return{promise:new Promise((f,d)=>{u=f,h=d}),resolve:u,reject:h}}Ze.defer=e;function t(){return Date.now()}Ze.now=t;function n(u,h){return Math.abs(h-u)}Ze.duration=n;function i(u){return typeof u>"u"?!0:a(u)}Ze.checkOptionalTime=i;function a(u){return typeof u=="number"&&u===Math.round(u)&&u>0}Ze.checkRequiredTime=a;function o(u){return new Promise(h=>setTimeout(h,u))}Ze.delay=o;function s(u){return u.then(h=>new r.PromiseInspection({value:h})).catch(h=>new r.PromiseInspection({error:h}))}Ze.reflect=s;function l(u){try{const h=u();return Promise.resolve(h)}catch(h){return Promise.reject(h)}}return Ze.tryPromise=l,Ze}var rp;function uO(){if(rp)return Kr;rp=1,Object.defineProperty(Kr,"__esModule",{value:!0});const r=IE(),e=Pf();let t=class{constructor(a){this.timeoutMillis=a,this.deferred=e.defer(),this.possibleTimeoutCause=null,this.isRejected=!1,this.promise=n(this.deferred.promise,a).catch(o=>(o instanceof r.TimeoutError&&(this.possibleTimeoutCause?o=new r.TimeoutError(this.possibleTimeoutCause.message):o=new r.TimeoutError("operation timed out for an unknown reason")),this.isRejected=!0,Promise.reject(o)))}abort(){this.reject(new Error("aborted"))}reject(a){this.deferred.reject(a)}resolve(a){this.deferred.resolve(a)}};Kr.PendingOperation=t;function n(i,a){return new Promise((o,s)=>{const l=setTimeout(()=>s(new r.TimeoutError),a);i.then(u=>{clearTimeout(l),o(u)}).catch(u=>{clearTimeout(l),s(u)})})}return Kr}var Xr={},np;function lO(){if(np)return Xr;np=1,Object.defineProperty(Xr,"__esModule",{value:!0});const r=Pf();let e=class xE{constructor(n){this.resource=n,this.resource=n,this.timestamp=r.now(),this.deferred=r.defer()}get promise(){return this.deferred.promise}resolve(){return this.deferred.resolve(void 0),new xE(this.resource)}};return Xr.Resource=e,Xr}var en={exports:{}},ip;function Ot(){if(ip)return en.exports;ip=1;var r=typeof Reflect=="object"?Reflect:null,e=r&&typeof r.apply=="function"?r.apply:function(E,T,S){return Function.prototype.apply.call(E,T,S)},t;r&&typeof r.ownKeys=="function"?t=r.ownKeys:Object.getOwnPropertySymbols?t=function(E){return Object.getOwnPropertyNames(E).concat(Object.getOwnPropertySymbols(E))}:t=function(E){return Object.getOwnPropertyNames(E)};function n(v){console&&console.warn&&console.warn(v)}var i=Number.isNaN||function(E){return E!==E};function a(){a.init.call(this)}en.exports=a,en.exports.once=g,a.EventEmitter=a,a.prototype._events=void 0,a.prototype._eventsCount=0,a.prototype._maxListeners=void 0;var o=10;function s(v){if(typeof v!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof v)}Object.defineProperty(a,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(v){if(typeof v!="number"||v<0||i(v))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+v+".");o=v}}),a.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},a.prototype.setMaxListeners=function(E){if(typeof E!="number"||E<0||i(E))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+E+".");return this._maxListeners=E,this};function l(v){return v._maxListeners===void 0?a.defaultMaxListeners:v._maxListeners}a.prototype.getMaxListeners=function(){return l(this)},a.prototype.emit=function(E){for(var T=[],S=1;S<arguments.length;S++)T.push(arguments[S]);var R=E==="error",j=this._events;if(j!==void 0)R=R&&j.error===void 0;else if(!R)return!1;if(R){var C;if(T.length>0&&(C=T[0]),C instanceof Error)throw C;var q=new Error("Unhandled error."+(C?" ("+C.message+")":""));throw q.context=C,q}var M=j[E];if(M===void 0)return!1;if(typeof M=="function")e(M,this,T);else for(var B=M.length,y=w(M,B),S=0;S<B;++S)e(y[S],this,T);return!0};function u(v,E,T,S){var R,j,C;if(s(T),j=v._events,j===void 0?(j=v._events=Object.create(null),v._eventsCount=0):(j.newListener!==void 0&&(v.emit("newListener",E,T.listener?T.listener:T),j=v._events),C=j[E]),C===void 0)C=j[E]=T,++v._eventsCount;else if(typeof C=="function"?C=j[E]=S?[T,C]:[C,T]:S?C.unshift(T):C.push(T),R=l(v),R>0&&C.length>R&&!C.warned){C.warned=!0;var q=new Error("Possible EventEmitter memory leak detected. "+C.length+" "+String(E)+" listeners added. Use emitter.setMaxListeners() to increase limit");q.name="MaxListenersExceededWarning",q.emitter=v,q.type=E,q.count=C.length,n(q)}return v}a.prototype.addListener=function(E,T){return u(this,E,T,!1)},a.prototype.on=a.prototype.addListener,a.prototype.prependListener=function(E,T){return u(this,E,T,!0)};function h(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(v,E,T){var S={fired:!1,wrapFn:void 0,target:v,type:E,listener:T},R=h.bind(S);return R.listener=T,S.wrapFn=R,R}a.prototype.once=function(E,T){return s(T),this.on(E,c(this,E,T)),this},a.prototype.prependOnceListener=function(E,T){return s(T),this.prependListener(E,c(this,E,T)),this},a.prototype.removeListener=function(E,T){var S,R,j,C,q;if(s(T),R=this._events,R===void 0)return this;if(S=R[E],S===void 0)return this;if(S===T||S.listener===T)--this._eventsCount===0?this._events=Object.create(null):(delete R[E],R.removeListener&&this.emit("removeListener",E,S.listener||T));else if(typeof S!="function"){for(j=-1,C=S.length-1;C>=0;C--)if(S[C]===T||S[C].listener===T){q=S[C].listener,j=C;break}if(j<0)return this;j===0?S.shift():_(S,j),S.length===1&&(R[E]=S[0]),R.removeListener!==void 0&&this.emit("removeListener",E,q||T)}return this},a.prototype.off=a.prototype.removeListener,a.prototype.removeAllListeners=function(E){var T,S,R;if(S=this._events,S===void 0)return this;if(S.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):S[E]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete S[E]),this;if(arguments.length===0){var j=Object.keys(S),C;for(R=0;R<j.length;++R)C=j[R],C!=="removeListener"&&this.removeAllListeners(C);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(T=S[E],typeof T=="function")this.removeListener(E,T);else if(T!==void 0)for(R=T.length-1;R>=0;R--)this.removeListener(E,T[R]);return this};function f(v,E,T){var S=v._events;if(S===void 0)return[];var R=S[E];return R===void 0?[]:typeof R=="function"?T?[R.listener||R]:[R]:T?m(R):w(R,R.length)}a.prototype.listeners=function(E){return f(this,E,!0)},a.prototype.rawListeners=function(E){return f(this,E,!1)},a.listenerCount=function(v,E){return typeof v.listenerCount=="function"?v.listenerCount(E):d.call(v,E)},a.prototype.listenerCount=d;function d(v){var E=this._events;if(E!==void 0){var T=E[v];if(typeof T=="function")return 1;if(T!==void 0)return T.length}return 0}a.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]};function w(v,E){for(var T=new Array(E),S=0;S<E;++S)T[S]=v[S];return T}function _(v,E){for(;E+1<v.length;E++)v[E]=v[E+1];v.pop()}function m(v){for(var E=new Array(v.length),T=0;T<E.length;++T)E[T]=v[T].listener||v[T];return E}function g(v,E){return new Promise(function(T,S){function R(C){v.removeListener(E,j),S(C)}function j(){typeof v.removeListener=="function"&&v.removeListener("error",R),T([].slice.call(arguments))}b(v,E,j,{once:!0}),E!=="error"&&p(v,R,{once:!0})})}function p(v,E,T){typeof v.on=="function"&&b(v,"error",E,T)}function b(v,E,T,S){if(typeof v.on=="function")S.once?v.once(E,T):v.on(E,T);else if(typeof v.addEventListener=="function")v.addEventListener(E,function R(j){S.once&&v.removeEventListener(E,R),T(j)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof v)}return en.exports}var sp;function cO(){if(sp)return Jr;sp=1,Object.defineProperty(Jr,"__esModule",{value:!0});const r=uO(),e=lO(),t=Pf(),n=Ot(),i=$e;let a=class{constructor(u){if(this.destroyed=!1,this.emitter=new n.EventEmitter,u=u||{},!u.create)throw new Error("Tarn: opt.create function most be provided");if(!u.destroy)throw new Error("Tarn: opt.destroy function most be provided");if(typeof u.min!="number"||u.min<0||u.min!==Math.round(u.min))throw new Error("Tarn: opt.min must be an integer >= 0");if(typeof u.max!="number"||u.max<=0||u.max!==Math.round(u.max))throw new Error("Tarn: opt.max must be an integer > 0");if(u.min>u.max)throw new Error("Tarn: opt.max is smaller than opt.min");if(!t.checkOptionalTime(u.acquireTimeoutMillis))throw new Error("Tarn: invalid opt.acquireTimeoutMillis "+JSON.stringify(u.acquireTimeoutMillis));if(!t.checkOptionalTime(u.createTimeoutMillis))throw new Error("Tarn: invalid opt.createTimeoutMillis "+JSON.stringify(u.createTimeoutMillis));if(!t.checkOptionalTime(u.destroyTimeoutMillis))throw new Error("Tarn: invalid opt.destroyTimeoutMillis "+JSON.stringify(u.destroyTimeoutMillis));if(!t.checkOptionalTime(u.idleTimeoutMillis))throw new Error("Tarn: invalid opt.idleTimeoutMillis "+JSON.stringify(u.idleTimeoutMillis));if(!t.checkOptionalTime(u.reapIntervalMillis))throw new Error("Tarn: invalid opt.reapIntervalMillis "+JSON.stringify(u.reapIntervalMillis));if(!t.checkOptionalTime(u.createRetryIntervalMillis))throw new Error("Tarn: invalid opt.createRetryIntervalMillis "+JSON.stringify(u.createRetryIntervalMillis));const h={create:!0,validate:!0,destroy:!0,log:!0,min:!0,max:!0,acquireTimeoutMillis:!0,createTimeoutMillis:!0,destroyTimeoutMillis:!0,idleTimeoutMillis:!0,reapIntervalMillis:!0,createRetryIntervalMillis:!0,propagateCreateError:!0};for(const c of Object.keys(u))if(!h[c])throw new Error(`Tarn: unsupported option opt.${c}`);this.creator=u.create,this.destroyer=u.destroy,this.validate=typeof u.validate=="function"?u.validate:()=>!0,this.log=u.log||(()=>{}),this.acquireTimeoutMillis=u.acquireTimeoutMillis||3e4,this.createTimeoutMillis=u.createTimeoutMillis||3e4,this.destroyTimeoutMillis=u.destroyTimeoutMillis||5e3,this.idleTimeoutMillis=u.idleTimeoutMillis||3e4,this.reapIntervalMillis=u.reapIntervalMillis||1e3,this.createRetryIntervalMillis=u.createRetryIntervalMillis||200,this.propagateCreateError=!!u.propagateCreateError,this.min=u.min,this.max=u.max,this.used=[],this.free=[],this.pendingCreates=[],this.pendingAcquires=[],this.pendingDestroys=[],this.pendingValidations=[],this.destroyed=!1,this.interval=null,this.eventId=1}numUsed(){return this.used.length}numFree(){return this.free.length}numPendingAcquires(){return this.pendingAcquires.length}numPendingValidations(){return this.pendingValidations.length}numPendingCreates(){return this.pendingCreates.length}acquire(){const u=this.eventId++;this._executeEventHandlers("acquireRequest",u);const h=new r.PendingOperation(this.acquireTimeoutMillis);return this.pendingAcquires.push(h),h.promise=h.promise.then(c=>(this._executeEventHandlers("acquireSuccess",u,c),c)).catch(c=>(this._executeEventHandlers("acquireFail",u,c),o(this.pendingAcquires,h),Promise.reject(c))),this._tryAcquireOrCreate(),h}release(u){this._executeEventHandlers("release",u);for(let h=0,c=this.used.length;h<c;++h){const f=this.used[h];if(f.resource===u)return this.used.splice(h,1),this.free.push(f.resolve()),this._tryAcquireOrCreate(),!0}return!1}isEmpty(){return[this.numFree(),this.numUsed(),this.numPendingAcquires(),this.numPendingValidations(),this.numPendingCreates()].reduce((u,h)=>u+h)===0}check(){const u=t.now(),h=[],c=this.min-this.used.length,f=this.free.length-c;let d=0;this.free.forEach(w=>{t.duration(u,w.timestamp)>=this.idleTimeoutMillis&&d<f?(d++,this._destroy(w.resource)):h.push(w)}),this.free=h,this.isEmpty()&&this._stopReaping()}destroy(){const u=this.eventId++;return this._executeEventHandlers("poolDestroyRequest",u),this._stopReaping(),this.destroyed=!0,t.reflect(Promise.all(this.pendingCreates.map(h=>t.reflect(h.promise))).then(()=>new Promise((h,c)=>{if(this.numPendingValidations()===0){h();return}const f=setInterval(()=>{this.numPendingValidations()===0&&(i.clearInterval(f),h())},100)})).then(()=>Promise.all(this.used.map(h=>t.reflect(h.promise)))).then(()=>Promise.all(this.pendingAcquires.map(h=>(h.abort(),t.reflect(h.promise))))).then(()=>Promise.all(this.free.map(h=>t.reflect(this._destroy(h.resource))))).then(()=>Promise.all(this.pendingDestroys.map(h=>h.promise))).then(()=>{this.free=[],this.pendingAcquires=[]})).then(h=>(this._executeEventHandlers("poolDestroySuccess",u),this.emitter.removeAllListeners(),h))}on(u,h){this.emitter.on(u,h)}removeListener(u,h){this.emitter.removeListener(u,h)}removeAllListeners(u){this.emitter.removeAllListeners(u)}_tryAcquireOrCreate(){this.destroyed||(this._hasFreeResources()?this._doAcquire():this._shouldCreateMoreResources()&&this._doCreate())}_hasFreeResources(){return this.free.length>0}_doAcquire(){for(;this._canAcquire();){const u=this.pendingAcquires.shift(),h=this.free.pop();if(h===void 0||u===void 0){const f="this.free was empty while trying to acquire resource";throw this.log(`Tarn: ${f}`,"warn"),new Error(`Internal error, should never happen. ${f}`)}this.pendingValidations.push(u),this.used.push(h);const c=new r.PendingOperation(this.acquireTimeoutMillis);u.promise.catch(f=>{c.abort()}),c.promise.catch(f=>(this.log("Tarn: resource validator threw an exception "+f.stack,"warn"),!1)).then(f=>{try{f&&!u.isRejected?(this._startReaping(),u.resolve(h.resource)):(o(this.used,h),f?this.free.push(h):(this._destroy(h.resource),setTimeout(()=>{this._tryAcquireOrCreate()},0)),u.isRejected||this.pendingAcquires.unshift(u))}finally{o(this.pendingValidations,u)}}),this._validateResource(h.resource).then(f=>{c.resolve(f)}).catch(f=>{c.reject(f)})}}_canAcquire(){return this.free.length>0&&this.pendingAcquires.length>0}_validateResource(u){try{return Promise.resolve(this.validate(u))}catch(h){return Promise.reject(h)}}_shouldCreateMoreResources(){return this.used.length+this.pendingCreates.length<this.max&&this.pendingCreates.length<this.pendingAcquires.length}_doCreate(){const u=this.pendingAcquires.slice();this._create().promise.then(()=>(this._tryAcquireOrCreate(),null)).catch(c=>{this.propagateCreateError&&this.pendingAcquires.length!==0&&this.pendingAcquires[0].reject(c),u.forEach(f=>{f.possibleTimeoutCause=c}),t.delay(this.createRetryIntervalMillis).then(()=>this._tryAcquireOrCreate())})}_create(){const u=this.eventId++;this._executeEventHandlers("createRequest",u);const h=new r.PendingOperation(this.createTimeoutMillis);return h.promise=h.promise.catch(c=>{throw o(this.pendingCreates,h)&&this._executeEventHandlers("createFail",u,c),c}),this.pendingCreates.push(h),s(this.creator).then(c=>h.isRejected?(this.destroyer(c),null):(o(this.pendingCreates,h),this.free.push(new e.Resource(c)),h.resolve(c),this._executeEventHandlers("createSuccess",u,c),null)).catch(c=>(h.isRejected||(o(this.pendingCreates,h)&&this._executeEventHandlers("createFail",u,c),h.reject(c)),null)),h}_destroy(u){const h=this.eventId++;this._executeEventHandlers("destroyRequest",h,u);const c=new r.PendingOperation(this.destroyTimeoutMillis);return Promise.resolve().then(()=>this.destroyer(u)).then(()=>{c.resolve(u)}).catch(d=>{c.reject(d)}),this.pendingDestroys.push(c),c.promise.then(d=>(this._executeEventHandlers("destroySuccess",h,u),d)).catch(d=>this._logDestroyerError(h,u,d)).then(d=>{const w=this.pendingDestroys.findIndex(_=>_===c);return this.pendingDestroys.splice(w,1),d})}_logDestroyerError(u,h,c){this._executeEventHandlers("destroyFail",u,h,c),this.log("Tarn: resource destroyer threw an exception "+c.stack,"warn")}_startReaping(){this.interval||(this._executeEventHandlers("startReaping"),this.interval=setInterval(()=>this.check(),this.reapIntervalMillis))}_stopReaping(){this.interval!==null&&(this._executeEventHandlers("stopReaping"),i.clearInterval(this.interval)),this.interval=null}_executeEventHandlers(u,...h){this.emitter.listeners(u).forEach(f=>{try{f(...h)}catch(d){this.log(`Tarn: event handler "${u}" threw an exception ${d.stack}`,"warn")}})}};Jr.Pool=a;function o(l,u){const h=l.indexOf(u);return h===-1?!1:(l.splice(h,1),!0)}function s(l){return new Promise((u,h)=>{const c=(f,d)=>{f?h(f):u(d)};t.tryPromise(()=>l(c)).then(f=>{f&&u(f)}).catch(f=>{h(f)})})}return Jr}var op;function hO(){return op||(op=1,function(r,e){Object.defineProperty(e,"__esModule",{value:!0});const t=cO();e.Pool=t.Pool;const n=IE();e.TimeoutError=n.TimeoutError,r.exports={Pool:t.Pool,TimeoutError:n.TimeoutError}}(Gr,Gr.exports)),Gr.exports}var oi={},ai={},ui,ap;function kf(){return ap||(ap=1,ui=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var i=42;e[t]=i;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var o=Object.getOwnPropertySymbols(e);if(o.length!==1||o[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(e,t);if(s.value!==i||s.enumerable!==!0)return!1}return!0}),ui}var li,up;function En(){if(up)return li;up=1;var r=kf();return li=function(){return r()&&!!Symbol.toStringTag},li}var ci,lp;function Lf(){return lp||(lp=1,ci=Object),ci}var hi,cp;function fO(){return cp||(cp=1,hi=Error),hi}var fi,hp;function dO(){return hp||(hp=1,fi=EvalError),fi}var di,fp;function pO(){return fp||(fp=1,di=RangeError),di}var pi,dp;function mO(){return dp||(dp=1,pi=ReferenceError),pi}var mi,pp;function $E(){return pp||(pp=1,mi=SyntaxError),mi}var gi,mp;function $r(){return mp||(mp=1,gi=TypeError),gi}var yi,gp;function gO(){return gp||(gp=1,yi=URIError),yi}var bi,yp;function yO(){return yp||(yp=1,bi=Math.abs),bi}var wi,bp;function bO(){return bp||(bp=1,wi=Math.floor),wi}var vi,wp;function wO(){return wp||(wp=1,vi=Math.max),vi}var _i,vp;function vO(){return vp||(vp=1,_i=Math.min),_i}var Ci,_p;function _O(){return _p||(_p=1,Ci=Math.pow),Ci}var Ei,Cp;function CO(){return Cp||(Cp=1,Ei=Math.round),Ei}var Si,Ep;function EO(){return Ep||(Ep=1,Si=Number.isNaN||function(e){return e!==e}),Si}var Ti,Sp;function SO(){if(Sp)return Ti;Sp=1;var r=EO();return Ti=function(t){return r(t)||t===0?t:t<0?-1:1},Ti}var qi,Tp;function TO(){return Tp||(Tp=1,qi=Object.getOwnPropertyDescriptor),qi}var Ai,qp;function sr(){if(qp)return Ai;qp=1;var r=TO();if(r)try{r([],"length")}catch{r=null}return Ai=r,Ai}var Oi,Ap;function Sn(){if(Ap)return Oi;Ap=1;var r=Object.defineProperty||!1;if(r)try{r({},"a",{value:1})}catch{r=!1}return Oi=r,Oi}var Ri,Op;function qO(){if(Op)return Ri;Op=1;var r=typeof Symbol<"u"&&Symbol,e=kf();return Ri=function(){return typeof r!="function"||typeof Symbol!="function"||typeof r("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:e()},Ri}var Ni,Rp;function PE(){return Rp||(Rp=1,Ni=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Ni}var Ii,Np;function kE(){if(Np)return Ii;Np=1;var r=Lf();return Ii=r.getPrototypeOf||null,Ii}var xi,Ip;function AO(){if(Ip)return xi;Ip=1;var r="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,t=Math.max,n="[object Function]",i=function(l,u){for(var h=[],c=0;c<l.length;c+=1)h[c]=l[c];for(var f=0;f<u.length;f+=1)h[f+l.length]=u[f];return h},a=function(l,u){for(var h=[],c=u,f=0;c<l.length;c+=1,f+=1)h[f]=l[c];return h},o=function(s,l){for(var u="",h=0;h<s.length;h+=1)u+=s[h],h+1<s.length&&(u+=l);return u};return xi=function(l){var u=this;if(typeof u!="function"||e.apply(u)!==n)throw new TypeError(r+u);for(var h=a(arguments,1),c,f=function(){if(this instanceof c){var g=u.apply(this,i(h,arguments));return Object(g)===g?g:this}return u.apply(l,i(h,arguments))},d=t(0,u.length-h.length),w=[],_=0;_<d;_++)w[_]="$"+_;if(c=Function("binder","return function ("+o(w,",")+"){ return binder.apply(this,arguments); }")(f),u.prototype){var m=function(){};m.prototype=u.prototype,c.prototype=new m,m.prototype=null}return c},xi}var $i,xp;function Pr(){if(xp)return $i;xp=1;var r=AO();return $i=Function.prototype.bind||r,$i}var Pi,$p;function Mf(){return $p||($p=1,Pi=Function.prototype.call),Pi}var ki,Pp;function Df(){return Pp||(Pp=1,ki=Function.prototype.apply),ki}var Li,kp;function OO(){return kp||(kp=1,Li=typeof Reflect<"u"&&Reflect&&Reflect.apply),Li}var Mi,Lp;function LE(){if(Lp)return Mi;Lp=1;var r=Pr(),e=Df(),t=Mf(),n=OO();return Mi=n||r.call(t,e),Mi}var Di,Mp;function jf(){if(Mp)return Di;Mp=1;var r=Pr(),e=$r(),t=Mf(),n=LE();return Di=function(a){if(a.length<1||typeof a[0]!="function")throw new e("a function is required");return n(r,t,a)},Di}var ji,Dp;function RO(){if(Dp)return ji;Dp=1;var r=jf(),e=sr(),t;try{t=[].__proto__===Array.prototype}catch(o){if(!o||typeof o!="object"||!("code"in o)||o.code!=="ERR_PROTO_ACCESS")throw o}var n=!!t&&e&&e(Object.prototype,"__proto__"),i=Object,a=i.getPrototypeOf;return ji=n&&typeof n.get=="function"?r([n.get]):typeof a=="function"?function(s){return a(s==null?s:i(s))}:!1,ji}var Fi,jp;function Ff(){if(jp)return Fi;jp=1;var r=PE(),e=kE(),t=RO();return Fi=r?function(i){return r(i)}:e?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return e(i)}:t?function(i){return t(i)}:null,Fi}var Bi,Fp;function ME(){if(Fp)return Bi;Fp=1;var r=Function.prototype.call,e=Object.prototype.hasOwnProperty,t=Pr();return Bi=t.call(r,e),Bi}var Ui,Bp;function Bf(){if(Bp)return Ui;Bp=1;var r,e=Lf(),t=fO(),n=dO(),i=pO(),a=mO(),o=$E(),s=$r(),l=gO(),u=yO(),h=bO(),c=wO(),f=vO(),d=_O(),w=CO(),_=SO(),m=Function,g=function(z){try{return m('"use strict"; return ('+z+").constructor;")()}catch{}},p=sr(),b=Sn(),v=function(){throw new s},E=p?function(){try{return v}catch{try{return p(arguments,"callee").get}catch{return v}}}():v,T=qO()(),S=Ff(),R=kE(),j=PE(),C=Df(),q=Mf(),M={},B=typeof Uint8Array>"u"||!S?r:S(Uint8Array),y={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?r:ArrayBuffer,"%ArrayIteratorPrototype%":T&&S?S([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":M,"%AsyncGenerator%":M,"%AsyncGeneratorFunction%":M,"%AsyncIteratorPrototype%":M,"%Atomics%":typeof Atomics>"u"?r:Atomics,"%BigInt%":typeof BigInt>"u"?r:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?r:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":t,"%eval%":eval,"%EvalError%":n,"%Float16Array%":typeof Float16Array>"u"?r:Float16Array,"%Float32Array%":typeof Float32Array>"u"?r:Float32Array,"%Float64Array%":typeof Float64Array>"u"?r:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?r:FinalizationRegistry,"%Function%":m,"%GeneratorFunction%":M,"%Int8Array%":typeof Int8Array>"u"?r:Int8Array,"%Int16Array%":typeof Int16Array>"u"?r:Int16Array,"%Int32Array%":typeof Int32Array>"u"?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&S?S(S([][Symbol.iterator]())):r,"%JSON%":typeof JSON=="object"?JSON:r,"%Map%":typeof Map>"u"?r:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!S?r:S(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":e,"%Object.getOwnPropertyDescriptor%":p,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?r:Promise,"%Proxy%":typeof Proxy>"u"?r:Proxy,"%RangeError%":i,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?r:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?r:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!S?r:S(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&S?S(""[Symbol.iterator]()):r,"%Symbol%":T?Symbol:r,"%SyntaxError%":o,"%ThrowTypeError%":E,"%TypedArray%":B,"%TypeError%":s,"%Uint8Array%":typeof Uint8Array>"u"?r:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?r:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?r:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?r:Uint32Array,"%URIError%":l,"%WeakMap%":typeof WeakMap>"u"?r:WeakMap,"%WeakRef%":typeof WeakRef>"u"?r:WeakRef,"%WeakSet%":typeof WeakSet>"u"?r:WeakSet,"%Function.prototype.call%":q,"%Function.prototype.apply%":C,"%Object.defineProperty%":b,"%Object.getPrototypeOf%":R,"%Math.abs%":u,"%Math.floor%":h,"%Math.max%":c,"%Math.min%":f,"%Math.pow%":d,"%Math.round%":w,"%Math.sign%":_,"%Reflect.getPrototypeOf%":j},A=function z(Q){var Z;if(Q==="%AsyncFunction%")Z=g("async function () {}");else if(Q==="%GeneratorFunction%")Z=g("function* () {}");else if(Q==="%AsyncGeneratorFunction%")Z=g("async function* () {}");else if(Q==="%AsyncGenerator%"){var te=z("%AsyncGeneratorFunction%");te&&(Z=te.prototype)}else if(Q==="%AsyncIteratorPrototype%"){var se=z("%AsyncGenerator%");se&&S&&(Z=S(se.prototype))}return y[Q]=Z,Z},$={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},K=Pr(),ee=ME(),W=K.call(q,Array.prototype.concat),I=K.call(C,Array.prototype.splice),H=K.call(q,String.prototype.replace),J=K.call(q,String.prototype.slice),P=K.call(q,RegExp.prototype.exec),O=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,x=/\\(\\)?/g,D=function(Q){var Z=J(Q,0,1),te=J(Q,-1);if(Z==="%"&&te!=="%")throw new o("invalid intrinsic syntax, expected closing `%`");if(te==="%"&&Z!=="%")throw new o("invalid intrinsic syntax, expected opening `%`");var se=[];return H(Q,O,function(ae,k,V,he){se[se.length]=V?H(he,x,"$1"):k||ae}),se},Y=function(Q,Z){var te=Q,se;if(ee($,te)&&(se=$[te],te="%"+se[0]+"%"),ee(y,te)){var ae=y[te];if(ae===M&&(ae=A(te)),typeof ae>"u"&&!Z)throw new s("intrinsic "+Q+" exists, but is not available. Please file an issue!");return{alias:se,name:te,value:ae}}throw new o("intrinsic "+Q+" does not exist!")};return Ui=function(Q,Z){if(typeof Q!="string"||Q.length===0)throw new s("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Z!="boolean")throw new s('"allowMissing" argument must be a boolean');if(P(/^%?[^%]*%?$/,Q)===null)throw new o("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var te=D(Q),se=te.length>0?te[0]:"",ae=Y("%"+se+"%",Z),k=ae.name,V=ae.value,he=!1,oe=ae.alias;oe&&(se=oe[0],I(te,W([0,1],oe)));for(var ye=1,G=!0;ye<te.length;ye+=1){var Ae=te[ye],Ce=J(Ae,0,1),Se=J(Ae,-1);if((Ce==='"'||Ce==="'"||Ce==="`"||Se==='"'||Se==="'"||Se==="`")&&Ce!==Se)throw new o("property names with quotes must have matching quotes");if((Ae==="constructor"||!G)&&(he=!0),se+="."+Ae,k="%"+se+"%",ee(y,k))V=y[k];else if(V!=null){if(!(Ae in V)){if(!Z)throw new s("base intrinsic for "+Q+" exists, but the property is not available.");return}if(p&&ye+1>=te.length){var fe=p(V,Ae);G=!!fe,G&&"get"in fe&&!("originalValue"in fe.get)?V=fe.get:V=V[Ae]}else G=ee(V,Ae),V=V[Ae];G&&!he&&(y[k]=V)}}return V},Ui}var Vi,Up;function or(){if(Up)return Vi;Up=1;var r=Bf(),e=jf(),t=e([r("%String.prototype.indexOf%")]);return Vi=function(i,a){var o=r(i,!!a);return typeof o=="function"&&t(i,".prototype.")>-1?e([o]):o},Vi}var Qi,Vp;function NO(){if(Vp)return Qi;Vp=1;var r=En()(),e=or(),t=e("Object.prototype.toString"),n=function(s){return r&&s&&typeof s=="object"&&Symbol.toStringTag in s?!1:t(s)==="[object Arguments]"},i=function(s){return n(s)?!0:s!==null&&typeof s=="object"&&"length"in s&&typeof s.length=="number"&&s.length>=0&&t(s)!=="[object Array]"&&"callee"in s&&t(s.callee)==="[object Function]"},a=function(){return n(arguments)}();return n.isLegacyArguments=i,Qi=a?n:i,Qi}var Wi,Qp;function IO(){if(Qp)return Wi;Qp=1;var r=or(),e=En()(),t=ME(),n=sr(),i;if(e){var a=r("RegExp.prototype.exec"),o={},s=function(){throw o},l={toString:s,valueOf:s};typeof Symbol.toPrimitive=="symbol"&&(l[Symbol.toPrimitive]=s),i=function(f){if(!f||typeof f!="object")return!1;var d=n(f,"lastIndex"),w=d&&t(d,"value");if(!w)return!1;try{a(f,l)}catch(_){return _===o}}}else{var u=r("Object.prototype.toString"),h="[object RegExp]";i=function(f){return!f||typeof f!="object"&&typeof f!="function"?!1:u(f)===h}}return Wi=i,Wi}var Hi,Wp;function xO(){if(Wp)return Hi;Wp=1;var r=or(),e=IO(),t=r("RegExp.prototype.exec"),n=$r();return Hi=function(a){if(!e(a))throw new n("`regex` must be a RegExp");return function(s){return t(a,s)!==null}},Hi}var zi,Hp;function $O(){if(Hp)return zi;Hp=1;var r=or(),e=xO(),t=e(/^\s*(?:function)?\*/),n=En()(),i=Ff(),a=r("Object.prototype.toString"),o=r("Function.prototype.toString"),s=function(){if(!n)return!1;try{return Function("return function*() {}")()}catch{}},l;return zi=function(h){if(typeof h!="function")return!1;if(t(o(h)))return!0;if(!n){var c=a(h);return c==="[object GeneratorFunction]"}if(!i)return!1;if(typeof l>"u"){var f=s();l=f?i(f):!1}return i(h)===l},zi}var Gi,zp;function PO(){if(zp)return Gi;zp=1;var r=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,t,n;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},e(function(){throw 42},null,t)}catch(p){p!==n&&(e=null)}else e=null;var i=/^\s*class\b/,a=function(b){try{var v=r.call(b);return i.test(v)}catch{return!1}},o=function(b){try{return a(b)?!1:(r.call(b),!0)}catch{return!1}},s=Object.prototype.toString,l="[object Object]",u="[object Function]",h="[object GeneratorFunction]",c="[object HTMLAllCollection]",f="[object HTML document.all class]",d="[object HTMLCollection]",w=typeof Symbol=="function"&&!!Symbol.toStringTag,_=!(0 in[,]),m=function(){return!1};if(typeof document=="object"){var g=document.all;s.call(g)===s.call(document.all)&&(m=function(b){if((_||!b)&&(typeof b>"u"||typeof b=="object"))try{var v=s.call(b);return(v===c||v===f||v===d||v===l)&&b("")==null}catch{}return!1})}return Gi=e?function(b){if(m(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;try{e(b,null,t)}catch(v){if(v!==n)return!1}return!a(b)&&o(b)}:function(b){if(m(b))return!0;if(!b||typeof b!="function"&&typeof b!="object")return!1;if(w)return o(b);if(a(b))return!1;var v=s.call(b);return v!==u&&v!==h&&!/^\[object HTML/.test(v)?!1:o(b)},Gi}var Ji,Gp;function kO(){if(Gp)return Ji;Gp=1;var r=PO(),e=Object.prototype.toString,t=Object.prototype.hasOwnProperty,n=function(l,u,h){for(var c=0,f=l.length;c<f;c++)t.call(l,c)&&(h==null?u(l[c],c,l):u.call(h,l[c],c,l))},i=function(l,u,h){for(var c=0,f=l.length;c<f;c++)h==null?u(l.charAt(c),c,l):u.call(h,l.charAt(c),c,l)},a=function(l,u,h){for(var c in l)t.call(l,c)&&(h==null?u(l[c],c,l):u.call(h,l[c],c,l))};function o(s){return e.call(s)==="[object Array]"}return Ji=function(l,u,h){if(!r(u))throw new TypeError("iterator must be a function");var c;arguments.length>=3&&(c=h),o(l)?n(l,u,c):typeof l=="string"?i(l,u,c):a(l,u,c)},Ji}var Ki,Jp;function LO(){return Jp||(Jp=1,Ki=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),Ki}var Yi,Kp;function MO(){if(Kp)return Yi;Kp=1;var r=LO(),e=typeof globalThis>"u"?zt:globalThis;return Yi=function(){for(var n=[],i=0;i<r.length;i++)typeof e[r[i]]=="function"&&(n[n.length]=r[i]);return n},Yi}var Zi={exports:{}},Xi,Yp;function DE(){if(Yp)return Xi;Yp=1;var r=Sn(),e=$E(),t=$r(),n=sr();return Xi=function(a,o,s){if(!a||typeof a!="object"&&typeof a!="function")throw new t("`obj` must be an object or a function`");if(typeof o!="string"&&typeof o!="symbol")throw new t("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new t("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new t("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new t("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new t("`loose`, if provided, must be a boolean");var l=arguments.length>3?arguments[3]:null,u=arguments.length>4?arguments[4]:null,h=arguments.length>5?arguments[5]:null,c=arguments.length>6?arguments[6]:!1,f=!!n&&n(a,o);if(r)r(a,o,{configurable:h===null&&f?f.configurable:!h,enumerable:l===null&&f?f.enumerable:!l,value:s,writable:u===null&&f?f.writable:!u});else if(c||!l&&!u&&!h)a[o]=s;else throw new e("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},Xi}var es,Zp;function jE(){if(Zp)return es;Zp=1;var r=Sn(),e=function(){return!!r};return e.hasArrayLengthDefineBug=function(){if(!r)return null;try{return r([],"length",{value:1}).length!==1}catch{return!0}},es=e,es}var ts,Xp;function DO(){if(Xp)return ts;Xp=1;var r=Bf(),e=DE(),t=jE()(),n=sr(),i=$r(),a=r("%Math.floor%");return ts=function(s,l){if(typeof s!="function")throw new i("`fn` is not a function");if(typeof l!="number"||l<0||l>4294967295||a(l)!==l)throw new i("`length` must be a positive 32-bit integer");var u=arguments.length>2&&!!arguments[2],h=!0,c=!0;if("length"in s&&n){var f=n(s,"length");f&&!f.configurable&&(h=!1),f&&!f.writable&&(c=!1)}return(h||c||!u)&&(t?e(s,"length",l,!0,!0):e(s,"length",l)),s},ts}var rs,em;function jO(){if(em)return rs;em=1;var r=Pr(),e=Df(),t=LE();return rs=function(){return t(r,e,arguments)},rs}var tm;function Tn(){return tm||(tm=1,function(r){var e=DO(),t=Sn(),n=jf(),i=jO();r.exports=function(o){var s=n(arguments),l=o.length-(arguments.length-1);return e(s,1+(l>0?l:0),!0)},t?t(r.exports,"apply",{value:i}):r.exports.apply=i}(Zi)),Zi.exports}var ns,rm;function FE(){if(rm)return ns;rm=1;var r=kO(),e=MO(),t=Tn(),n=or(),i=sr(),a=Ff(),o=n("Object.prototype.toString"),s=En()(),l=typeof globalThis>"u"?zt:globalThis,u=e(),h=n("String.prototype.slice"),c=n("Array.prototype.indexOf",!0)||function(m,g){for(var p=0;p<m.length;p+=1)if(m[p]===g)return p;return-1},f={__proto__:null};s&&i&&a?r(u,function(_){var m=new l[_];if(Symbol.toStringTag in m&&a){var g=a(m),p=i(g,Symbol.toStringTag);if(!p&&g){var b=a(g);p=i(b,Symbol.toStringTag)}f["$"+_]=t(p.get)}}):r(u,function(_){var m=new l[_],g=m.slice||m.set;g&&(f["$"+_]=t(g))});var d=function(m){var g=!1;return r(f,function(p,b){if(!g)try{"$"+p(m)===b&&(g=h(b,1))}catch{}}),g},w=function(m){var g=!1;return r(f,function(p,b){if(!g)try{p(m),g=h(b,1)}catch{}}),g};return ns=function(m){if(!m||typeof m!="object")return!1;if(!s){var g=h(o(m),8,-1);return c(u,g)>-1?g:g!=="Object"?!1:w(m)}return i?d(m):null},ns}var is,nm;function FO(){if(nm)return is;nm=1;var r=FE();return is=function(t){return!!r(t)},is}var im;function BO(){return im||(im=1,function(r){var e=NO(),t=$O(),n=FE(),i=FO();function a(G){return G.call.bind(G)}var o=typeof BigInt<"u",s=typeof Symbol<"u",l=a(Object.prototype.toString),u=a(Number.prototype.valueOf),h=a(String.prototype.valueOf),c=a(Boolean.prototype.valueOf);if(o)var f=a(BigInt.prototype.valueOf);if(s)var d=a(Symbol.prototype.valueOf);function w(G,Ae){if(typeof G!="object")return!1;try{return Ae(G),!0}catch{return!1}}r.isArgumentsObject=e,r.isGeneratorFunction=t,r.isTypedArray=i;function _(G){return typeof Promise<"u"&&G instanceof Promise||G!==null&&typeof G=="object"&&typeof G.then=="function"&&typeof G.catch=="function"}r.isPromise=_;function m(G){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(G):i(G)||P(G)}r.isArrayBufferView=m;function g(G){return n(G)==="Uint8Array"}r.isUint8Array=g;function p(G){return n(G)==="Uint8ClampedArray"}r.isUint8ClampedArray=p;function b(G){return n(G)==="Uint16Array"}r.isUint16Array=b;function v(G){return n(G)==="Uint32Array"}r.isUint32Array=v;function E(G){return n(G)==="Int8Array"}r.isInt8Array=E;function T(G){return n(G)==="Int16Array"}r.isInt16Array=T;function S(G){return n(G)==="Int32Array"}r.isInt32Array=S;function R(G){return n(G)==="Float32Array"}r.isFloat32Array=R;function j(G){return n(G)==="Float64Array"}r.isFloat64Array=j;function C(G){return n(G)==="BigInt64Array"}r.isBigInt64Array=C;function q(G){return n(G)==="BigUint64Array"}r.isBigUint64Array=q;function M(G){return l(G)==="[object Map]"}M.working=typeof Map<"u"&&M(new Map);function B(G){return typeof Map>"u"?!1:M.working?M(G):G instanceof Map}r.isMap=B;function y(G){return l(G)==="[object Set]"}y.working=typeof Set<"u"&&y(new Set);function A(G){return typeof Set>"u"?!1:y.working?y(G):G instanceof Set}r.isSet=A;function $(G){return l(G)==="[object WeakMap]"}$.working=typeof WeakMap<"u"&&$(new WeakMap);function K(G){return typeof WeakMap>"u"?!1:$.working?$(G):G instanceof WeakMap}r.isWeakMap=K;function ee(G){return l(G)==="[object WeakSet]"}ee.working=typeof WeakSet<"u"&&ee(new WeakSet);function W(G){return ee(G)}r.isWeakSet=W;function I(G){return l(G)==="[object ArrayBuffer]"}I.working=typeof ArrayBuffer<"u"&&I(new ArrayBuffer);function H(G){return typeof ArrayBuffer>"u"?!1:I.working?I(G):G instanceof ArrayBuffer}r.isArrayBuffer=H;function J(G){return l(G)==="[object DataView]"}J.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&J(new DataView(new ArrayBuffer(1),0,1));function P(G){return typeof DataView>"u"?!1:J.working?J(G):G instanceof DataView}r.isDataView=P;var O=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function x(G){return l(G)==="[object SharedArrayBuffer]"}function D(G){return typeof O>"u"?!1:(typeof x.working>"u"&&(x.working=x(new O)),x.working?x(G):G instanceof O)}r.isSharedArrayBuffer=D;function Y(G){return l(G)==="[object AsyncFunction]"}r.isAsyncFunction=Y;function z(G){return l(G)==="[object Map Iterator]"}r.isMapIterator=z;function Q(G){return l(G)==="[object Set Iterator]"}r.isSetIterator=Q;function Z(G){return l(G)==="[object Generator]"}r.isGeneratorObject=Z;function te(G){return l(G)==="[object WebAssembly.Module]"}r.isWebAssemblyCompiledModule=te;function se(G){return w(G,u)}r.isNumberObject=se;function ae(G){return w(G,h)}r.isStringObject=ae;function k(G){return w(G,c)}r.isBooleanObject=k;function V(G){return o&&w(G,f)}r.isBigIntObject=V;function he(G){return s&&w(G,d)}r.isSymbolObject=he;function oe(G){return se(G)||ae(G)||k(G)||V(G)||he(G)}r.isBoxedPrimitive=oe;function ye(G){return typeof Uint8Array<"u"&&(H(G)||D(G))}r.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(G){Object.defineProperty(r,G,{enumerable:!1,value:function(){throw new Error(G+" is not supported in userland")}})})}(ai)),ai}var ss,sm;function UO(){return sm||(sm=1,ss=function(e){return e&&typeof e=="object"&&typeof e.copy=="function"&&typeof e.fill=="function"&&typeof e.readUInt8=="function"}),ss}var tn={exports:{}},om;function VO(){return om||(om=1,typeof Object.create=="function"?tn.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:tn.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}),tn.exports}var am;function Ue(){return am||(am=1,function(r){var e={},t=Object.getOwnPropertyDescriptors||function(O){for(var x=Object.keys(O),D={},Y=0;Y<x.length;Y++)D[x[Y]]=Object.getOwnPropertyDescriptor(O,x[Y]);return D},n=/%[sdj%]/g;r.format=function(P){if(!T(P)){for(var O=[],x=0;x<arguments.length;x++)O.push(s(arguments[x]));return O.join(" ")}for(var x=1,D=arguments,Y=D.length,z=String(P).replace(n,function(Z){if(Z==="%%")return"%";if(x>=Y)return Z;switch(Z){case"%s":return String(D[x++]);case"%d":return Number(D[x++]);case"%j":try{return JSON.stringify(D[x++])}catch{return"[Circular]"}default:return Z}}),Q=D[x];x<Y;Q=D[++x])b(Q)||!C(Q)?z+=" "+Q:z+=" "+s(Q);return z},r.deprecate=function(P,O){if(typeof we<"u"&&we.noDeprecation===!0)return P;if(typeof we>"u")return function(){return r.deprecate(P,O).apply(this,arguments)};var x=!1;function D(){if(!x){if(we.throwDeprecation)throw new Error(O);we.traceDeprecation?console.trace(O):console.error(O),x=!0}return P.apply(this,arguments)}return D};var i={},a=/^$/;if(e.NODE_DEBUG){var o=e.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),a=new RegExp("^"+o+"$","i")}r.debuglog=function(P){if(P=P.toUpperCase(),!i[P])if(a.test(P)){var O=we.pid;i[P]=function(){var x=r.format.apply(r,arguments);console.error("%s %d: %s",P,O,x)}}else i[P]=function(){};return i[P]};function s(P,O){var x={seen:[],stylize:u};return arguments.length>=3&&(x.depth=arguments[2]),arguments.length>=4&&(x.colors=arguments[3]),p(O)?x.showHidden=O:O&&r._extend(x,O),R(x.showHidden)&&(x.showHidden=!1),R(x.depth)&&(x.depth=2),R(x.colors)&&(x.colors=!1),R(x.customInspect)&&(x.customInspect=!0),x.colors&&(x.stylize=l),c(x,P,x.depth)}r.inspect=s,s.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function l(P,O){var x=s.styles[O];return x?"\x1B["+s.colors[x][0]+"m"+P+"\x1B["+s.colors[x][1]+"m":P}function u(P,O){return P}function h(P){var O={};return P.forEach(function(x,D){O[x]=!0}),O}function c(P,O,x){if(P.customInspect&&O&&B(O.inspect)&&O.inspect!==r.inspect&&!(O.constructor&&O.constructor.prototype===O)){var D=O.inspect(x,P);return T(D)||(D=c(P,D,x)),D}var Y=f(P,O);if(Y)return Y;var z=Object.keys(O),Q=h(z);if(P.showHidden&&(z=Object.getOwnPropertyNames(O)),M(O)&&(z.indexOf("message")>=0||z.indexOf("description")>=0))return d(O);if(z.length===0){if(B(O)){var Z=O.name?": "+O.name:"";return P.stylize("[Function"+Z+"]","special")}if(j(O))return P.stylize(RegExp.prototype.toString.call(O),"regexp");if(q(O))return P.stylize(Date.prototype.toString.call(O),"date");if(M(O))return d(O)}var te="",se=!1,ae=["{","}"];if(g(O)&&(se=!0,ae=["[","]"]),B(O)){var k=O.name?": "+O.name:"";te=" [Function"+k+"]"}if(j(O)&&(te=" "+RegExp.prototype.toString.call(O)),q(O)&&(te=" "+Date.prototype.toUTCString.call(O)),M(O)&&(te=" "+d(O)),z.length===0&&(!se||O.length==0))return ae[0]+te+ae[1];if(x<0)return j(O)?P.stylize(RegExp.prototype.toString.call(O),"regexp"):P.stylize("[Object]","special");P.seen.push(O);var V;return se?V=w(P,O,x,Q,z):V=z.map(function(he){return _(P,O,x,Q,he,se)}),P.seen.pop(),m(V,te,ae)}function f(P,O){if(R(O))return P.stylize("undefined","undefined");if(T(O)){var x="'"+JSON.stringify(O).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return P.stylize(x,"string")}if(E(O))return P.stylize(""+O,"number");if(p(O))return P.stylize(""+O,"boolean");if(b(O))return P.stylize("null","null")}function d(P){return"["+Error.prototype.toString.call(P)+"]"}function w(P,O,x,D,Y){for(var z=[],Q=0,Z=O.length;Q<Z;++Q)W(O,String(Q))?z.push(_(P,O,x,D,String(Q),!0)):z.push("");return Y.forEach(function(te){te.match(/^\d+$/)||z.push(_(P,O,x,D,te,!0))}),z}function _(P,O,x,D,Y,z){var Q,Z,te;if(te=Object.getOwnPropertyDescriptor(O,Y)||{value:O[Y]},te.get?te.set?Z=P.stylize("[Getter/Setter]","special"):Z=P.stylize("[Getter]","special"):te.set&&(Z=P.stylize("[Setter]","special")),W(D,Y)||(Q="["+Y+"]"),Z||(P.seen.indexOf(te.value)<0?(b(x)?Z=c(P,te.value,null):Z=c(P,te.value,x-1),Z.indexOf(`
|
|
4
4
|
`)>-1&&(z?Z=Z.split(`
|
|
5
5
|
`).map(function(se){return" "+se}).join(`
|
|
@@ -202,7 +202,7 @@ ${i.message}`)}}validateConnection(i){return i&&!i._fatalError&&!i._protocolErro
|
|
|
202
202
|
create index if not exists analyticsseries_analyticsdimension_seriesid_index
|
|
203
203
|
on "AnalyticsSeries_AnalyticsDimension" ("seriesId");
|
|
204
204
|
|
|
205
|
-
`;class e1 extends oO{constructor({knex:t,pgLiteFactory:n,queryLogger:i,resultsLogger:a,profiler:o}={}){o||(o=new OC);const s=new ZI(o,i,a);super({executor:s,knex:t||YI({client:"pg",useNullAsDefault:!0})});ve(this,"_pgLiteFactory");ve(this,"_queryLogger");ve(this,"_resultsLogger");ve(this,"_pgExecutor");ve(this,"_profiler");ve(this,"_sql",null);this._pgLiteFactory=n||EC.create,this._queryLogger=i||(()=>{}),this._resultsLogger=a||(()=>{}),this._profiler=o,this._pgExecutor=s}async init(){this._sql=await this._pgLiteFactory(),this._pgExecutor.init(this._sql),await this._sql.exec(XI)}async raw(t){return this._queryLogger(-1,t),await this._profiler.record("QueryRaw",async()=>{var i;const n=await((i=this._sql)==null?void 0:i.exec(t));return this._resultsLogger(-1,n),JS(n||[])})}async destroy(){var t;super.destroy(),(t=this._sql)==null||t.close()}}class t1 extends e1{constructor(e={databaseName:"analytics"}){e.pgLiteFactory||(e.pgLiteFactory=async()=>EC.create({fs:new sT(e.databaseName),relaxedDurability:!0})),super(e)}}function KS(r){var e;if(!(typeof window>"u"))return(e=window.powerhouse)==null?void 0:e[r]}function r1(r,e){typeof window>"u"||(window.powerhouse=window.powerhouse||{},window.powerhouse[r]=e)}const mC=yn(["reactor-browser","analytics","provider"]),n1=new aT,i1=["analytics","options"],YS=["analytics","store"],s1=["analytics","store"];async function o1(r){const e=new t1(r);await e.init();const t=new rO(e);return{store:e,engine:t,options:r}}async function ZS(r){const e=KS("analytics");if(!r||!r.databaseName){if(e)return(await e).store;throw new Error("Analytics store options are required if no global analytics store is available")}return e&&r.databaseName===(await e).options.databaseName?(await e).store:null}async function a1(r){const e=await ZS(r);if(e)return e;if(!r)throw new Error("Analytics store options are required if no global analytics store is available");const t=o1(r);return r1("analytics",t),t.then(({store:n})=>{mC.verbose("Analytics store created",n)}).catch(n=>{mC.error("Analytics store creation failed",n)}),(await t).store}function u1(r){const e=uT();return st(()=>{e.setQueryDefaults(i1,{queryFn:()=>r,staleTime:1/0,gcTime:1/0})},[e,r]),lT({mutationFn:async()=>{const t=await a1(r);return e.setQueryDefaults(YS,{queryFn:()=>t,staleTime:1/0,gcTime:1/0}),t}})}function yd(r){return SC({queryKey:[YS,r],queryFn:()=>ZS(r),retry:!0,throwOnError:!1})}function l1(r){const e=uf(()=>"options"in r?r.options:"databaseName"in r&&r.databaseName?{databaseName:r.databaseName}:void 0,[r]),{mutate:t}=u1(e);return st(()=>{e!=null&&e.databaseName&&t()},[e]),null}function c1({children:r,queryClient:e=n1,...t}){return Ht(oT,{client:e,children:[Re(l1,{...t}),r]})}function Ix(){return SC({queryKey:s1,queryFn:async()=>{const r=KS("analytics");if(!r)throw new Error("No analytics store available");return(await r).engine},retry:!1})}class h1{constructor(e,t){ve(this,"listeners");ve(this,"drive");ve(this,"logger",yn(["document-drive","processor-manager"]));ve(this,"idToFactory",new Map);ve(this,"identifierToListeners",new Map);this.listeners=e,this.drive=t}async registerFactory(e,t){this.logger.debug(`Registering factory '${e}'.`),this.idToFactory.set(e,t);const n=await this.drive.getDrives();for(const i of n)await this.createProcessors(i,e,t)}async unregisterFactory(e){var n;const t=this.identifierToListeners.get(e)??[];for(const i of t)await this.listeners.removeListener(i.driveId,i.listenerId).catch(this.logger.error),(n=i.transmitter)!=null&&n.disconnect&&await i.transmitter.disconnect();this.identifierToListeners.set(e,[])}async registerDrive(e){this.logger.debug(`Registering drive '${e}'.`);for(const[t,n]of this.idToFactory)await this.createProcessors(e,t,n)}async createProcessors(e,t,n){let i=this.identifierToListeners.get(t);i||(i=[],this.identifierToListeners.set(t,i));let a=[];try{a=n(e)}catch(o){this.logger.error(`Error creating processors for drive ${e}:`,o);return}for(const{filter:o,processor:s}of a){const l=cT(),u={driveId:e,listenerId:l,block:!1,system:!1,filter:o,callInfo:void 0,transmitter:new hT(this.drive,s)};await this.listeners.setListener(e,u),i.push(u)}}}function gC(...r){var e;(e=window.dataLayer)==null||e.push(...r)}const f1=()=>{const[{gaTrackingId:r}]=AT(),[{analytics:e}]=qC(),t=r&&e;return st(()=>{if(t){const n=document.createElement("script");return n.src=`https://www.googletagmanager.com/gtag/js?id=${r}`,n.async=!0,document.head.appendChild(n),window.dataLayer=window.dataLayer||[],gC("js",new Date),gC("config",r),()=>{document.head.removeChild(n)}}},[t,r]),null};class d1{constructor(e){ve(this,"document");ve(this,"operations",[]);e&&(this.document=e)}operationsToTableObject(e){return e.map(t=>({...t,input:JSON.stringify(t.input)}))}setDocument(e){this.document=e}getDocument(){return this.document}getOperations(){return this.operations}pushOperation(e){this.operations.push(e)}operationsTable(){var t;this.document||console.warn("No document");const e=Object.values(((t=this.document)==null?void 0:t.operations)||{}).flatMap(n=>n).sort((n,i)=>n.index-i.index);console.table(this.operationsToTableObject(e))}scopeOperationsTable(e){var n;this.document||console.warn("No document");const t=((n=this.document)==null?void 0:n.operations[e])||[];console.table(this.operationsToTableObject(t))}operationsLog(){console.log(this.operations)}operationsLogTable(){console.table(this.operationsToTableObject(this.operations))}clear(){this.operations=[],this.document=void 0}}/**
|
|
205
|
+
`;class e1 extends oO{constructor({knex:t,pgLiteFactory:n,queryLogger:i,resultsLogger:a,profiler:o}={}){o||(o=new OC);const s=new ZI(o,i,a);super({executor:s,knex:t||YI({client:"pg",useNullAsDefault:!0})});ve(this,"_pgLiteFactory");ve(this,"_queryLogger");ve(this,"_resultsLogger");ve(this,"_pgExecutor");ve(this,"_profiler");ve(this,"_sql",null);this._pgLiteFactory=n||EC.create,this._queryLogger=i||(()=>{}),this._resultsLogger=a||(()=>{}),this._profiler=o,this._pgExecutor=s}async init(){this._sql=await this._pgLiteFactory(),this._pgExecutor.init(this._sql),await this._sql.exec(XI)}async raw(t){return this._queryLogger(-1,t),await this._profiler.record("QueryRaw",async()=>{var i;const n=await((i=this._sql)==null?void 0:i.exec(t));return this._resultsLogger(-1,n),JS(n||[])})}async destroy(){var t;super.destroy(),(t=this._sql)==null||t.close()}}class t1 extends e1{constructor(e={databaseName:"analytics"}){e.pgLiteFactory||(e.pgLiteFactory=async()=>EC.create({fs:new sT(e.databaseName),relaxedDurability:!0})),super(e)}}function KS(r){var e;if(!(typeof window>"u"))return(e=window.powerhouse)==null?void 0:e[r]}function r1(r,e){typeof window>"u"||(window.powerhouse=window.powerhouse||{},window.powerhouse[r]=e)}const mC=yn(["reactor-browser","analytics","provider"]),n1=new aT,i1=["analytics","options"],YS=["analytics","store"],s1=["analytics","store"];async function o1(r){const e=new t1(r);await e.init();const t=new rO(e);return{store:e,engine:t,options:r}}async function ZS(r){const e=KS("analytics");if(!r||!r.databaseName){if(e)return(await e).store;throw new Error("Analytics store options are required if no global analytics store is available")}return e&&r.databaseName===(await e).options.databaseName?(await e).store:null}async function a1(r){const e=await ZS(r);if(e)return e;if(!r)throw new Error("Analytics store options are required if no global analytics store is available");const t=o1(r);return r1("analytics",t),t.then(({store:n})=>{mC.verbose("Analytics store created",n)}).catch(n=>{mC.error("Analytics store creation failed",n)}),(await t).store}function u1(r){const e=uT();return st(()=>{e.setQueryDefaults(i1,{queryFn:()=>r,staleTime:1/0,gcTime:1/0})},[e,r]),lT({mutationFn:async()=>{const t=await a1(r);return e.setQueryDefaults(YS,{queryFn:()=>t,staleTime:1/0,gcTime:1/0}),t}})}function yd(r){return SC({queryKey:[YS,r],queryFn:()=>ZS(r),retry:!0,throwOnError:!1})}function l1(r){const e=uf(()=>"options"in r?r.options:"databaseName"in r&&r.databaseName?{databaseName:r.databaseName}:void 0,[r]),{mutate:t}=u1(e);return st(()=>{e!=null&&e.databaseName&&t()},[e]),null}function c1({children:r,queryClient:e=n1,...t}){return Ht(oT,{client:e,children:[Re(l1,{...t}),r]})}function Ix(){return SC({queryKey:s1,queryFn:async()=>{const r=KS("analytics");if(!r)throw new Error("No analytics store available");return(await r).engine},retry:!1})}class h1{constructor(e,t){ve(this,"listeners");ve(this,"drive");ve(this,"logger",yn(["document-drive","processor-manager"]));ve(this,"idToFactory",new Map);ve(this,"identifierToListeners",new Map);this.listeners=e,this.drive=t}async registerFactory(e,t){this.logger.debug(`Registering factory '${e}'.`),this.idToFactory.set(e,t);const n=await this.drive.getDrives();for(const i of n)await this.createProcessors(i,e,t)}async unregisterFactory(e){var n;const t=this.identifierToListeners.get(e)??[];for(const i of t)await this.listeners.removeListener(i.driveId,i.listenerId).catch(this.logger.error),(n=i.transmitter)!=null&&n.disconnect&&await i.transmitter.disconnect();this.identifierToListeners.set(e,[])}async registerDrive(e){this.logger.debug(`Registering drive '${e}'.`);for(const[t,n]of this.idToFactory)await this.createProcessors(e,t,n)}async createProcessors(e,t,n){let i=this.identifierToListeners.get(t);i||(i=[],this.identifierToListeners.set(t,i));let a=[];try{a=n(e)}catch(o){this.logger.error(`Error creating processors for drive ${e}:`,o);return}for(const{filter:o,processor:s}of a){"initAndUpgrade"in s&&await s.initAndUpgrade();const l=cT(),u={driveId:e,listenerId:l,block:!1,system:!1,filter:o,callInfo:void 0,transmitter:new hT(this.drive,s)};await this.listeners.setListener(e,u),i.push(u)}}}function gC(...r){var e;(e=window.dataLayer)==null||e.push(...r)}const f1=()=>{const[{gaTrackingId:r}]=AT(),[{analytics:e}]=qC(),t=r&&e;return st(()=>{if(t){const n=document.createElement("script");return n.src=`https://www.googletagmanager.com/gtag/js?id=${r}`,n.async=!0,document.head.appendChild(n),window.dataLayer=window.dataLayer||[],gC("js",new Date),gC("config",r),()=>{document.head.removeChild(n)}}},[t,r]),null};class d1{constructor(e){ve(this,"document");ve(this,"operations",[]);e&&(this.document=e)}operationsToTableObject(e){return e.map(t=>({...t,input:JSON.stringify(t.input)}))}setDocument(e){this.document=e}getDocument(){return this.document}getOperations(){return this.operations}pushOperation(e){this.operations.push(e)}operationsTable(){var t;this.document||console.warn("No document");const e=Object.values(((t=this.document)==null?void 0:t.operations)||{}).flatMap(n=>n).sort((n,i)=>n.index-i.index);console.table(this.operationsToTableObject(e))}scopeOperationsTable(e){var n;this.document||console.warn("No document");const t=((n=this.document)==null?void 0:n.operations[e])||[];console.table(this.operationsToTableObject(t))}operationsLog(){console.log(this.operations)}operationsLogTable(){console.table(this.operationsToTableObject(this.operations))}clear(){this.operations=[],this.document=void 0}}/**
|
|
206
206
|
* React Router DOM v6.30.1
|
|
207
207
|
*
|
|
208
208
|
* Copyright (c) Remix Software Inc.
|
|
@@ -211,5 +211,5 @@ ${i.message}`)}}validateConnection(i){return i&&!i._fatalError&&!i._protocolErro
|
|
|
211
211
|
* LICENSE.md file in the root directory of this source tree.
|
|
212
212
|
*
|
|
213
213
|
* @license MIT
|
|
214
|
-
*/function gn(){return gn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},gn.apply(this,arguments)}function Cf(r){return r===void 0&&(r=""),new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((e,t)=>{let n=r[t];return e.concat(Array.isArray(n)?n.map(i=>[t,i]):[[t,n]])},[]))}function p1(r,e){let t=Cf(r);return e&&e.forEach((n,i)=>{t.has(i)||e.getAll(i).forEach(a=>{t.append(i,a)})}),t}const m1="6";try{window.__reactRouterVersion=m1}catch{}function g1(r,e){return $T({basename:e==null?void 0:e.basename,future:gn({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:PT({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||y1(),routes:r,mapRouteProperties:MT,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function y1(){var r;let e=(r=window)==null?void 0:r.__staticRouterHydrationData;return e&&e.errors&&(e=gn({},e,{errors:b1(e.errors)})),e}function b1(r){if(!r)return null;let e=Object.entries(r),t={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")t[n]=new LT(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",t[n]=o}catch{}}if(t[n]==null){let a=new Error(i.message);a.stack="",t[n]=a}}else t[n]=i;return t}const w1=de.createContext({isTransitioning:!1}),v1=de.createContext(new Map),_1="startTransition",yC=de[_1],C1="flushSync",bC=OT[C1];function E1(r){yC?yC(r):r()}function _r(r){bC?bC(r):r()}class S1{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}}function T1(r){let{fallbackElement:e,router:t,future:n}=r,[i,a]=de.useState(t.state),[o,s]=de.useState(),[l,u]=de.useState({isTransitioning:!1}),[h,c]=de.useState(),[f,d]=de.useState(),[w,_]=de.useState(),m=de.useRef(new Map),{v7_startTransition:g}=n||{},p=de.useCallback(R=>{g?E1(R):R()},[g]),b=de.useCallback((R,j)=>{let{deletedFetchers:C,flushSync:q,viewTransitionOpts:M}=j;R.fetchers.forEach((y,A)=>{y.data!==void 0&&m.current.set(A,y.data)}),C.forEach(y=>m.current.delete(y));let B=t.window==null||t.window.document==null||typeof t.window.document.startViewTransition!="function";if(!M||B){q?_r(()=>a(R)):p(()=>a(R));return}if(q){_r(()=>{f&&(h&&h.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let y=t.window.document.startViewTransition(()=>{_r(()=>a(R))});y.finished.finally(()=>{_r(()=>{c(void 0),d(void 0),s(void 0),u({isTransitioning:!1})})}),_r(()=>d(y));return}f?(h&&h.resolve(),f.skipTransition(),_({state:R,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(s(R),u({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[t.window,f,h,m,p]);de.useLayoutEffect(()=>t.subscribe(b),[t,b]),de.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new S1)},[l]),de.useEffect(()=>{if(h&&o&&t.window){let R=o,j=h.promise,C=t.window.document.startViewTransition(async()=>{p(()=>a(R)),await j});C.finished.finally(()=>{c(void 0),d(void 0),s(void 0),u({isTransitioning:!1})}),d(C)}},[p,o,h,t.window]),de.useEffect(()=>{h&&o&&i.location.key===o.location.key&&h.resolve()},[h,f,i.location,o]),de.useEffect(()=>{!l.isTransitioning&&w&&(s(w.state),u({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),_(void 0))},[l.isTransitioning,w]),de.useEffect(()=>{},[]);let v=de.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:R=>t.navigate(R),push:(R,j,C)=>t.navigate(R,{state:j,preventScrollReset:C==null?void 0:C.preventScrollReset}),replace:(R,j,C)=>t.navigate(R,{replace:!0,state:j,preventScrollReset:C==null?void 0:C.preventScrollReset})}),[t]),E=t.basename||"/",T=de.useMemo(()=>({router:t,navigator:v,static:!1,basename:E}),[t,v,E]),S=de.useMemo(()=>({v7_relativeSplatPath:t.future.v7_relativeSplatPath}),[t.future.v7_relativeSplatPath]);return de.useEffect(()=>RT(),[n,t.future]),de.createElement(de.Fragment,null,de.createElement(NT.Provider,{value:T},de.createElement(IT.Provider,{value:i},de.createElement(v1.Provider,{value:m.current},de.createElement(w1.Provider,{value:l},de.createElement(xT,{basename:E,location:i.location,navigationType:i.historyAction,navigator:v,future:S},i.initialized||t.future.v7_partialHydration?de.createElement(q1,{routes:t.routes,future:t.future,state:i}):e))))),null)}const q1=de.memo(A1);function A1(r){let{routes:e,future:t,state:n}=r;return kT(e,void 0,n,t)}var wC;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(wC||(wC={}));var vC;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(vC||(vC={}));function xx(r){let e=de.useRef(Cf(r)),t=de.useRef(!1),n=AC(),i=de.useMemo(()=>p1(n.search,t.current?null:e.current),[n.search]),a=DT(),o=de.useCallback((s,l)=>{const u=Cf(typeof s=="function"?s(i):s);t.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const _C=yn(["sentry"]);let bd=!1;async function XS(){return await ht(()=>import("./index.BvX7i3ya.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)}async function O1(){const r=window.__VITE_ENVS.SENTRY_RELEASE,e=await XS(),t=[e.httpClientIntegration(),e.extraErrorDataIntegration({depth:5}),e.replayIntegration(),e.captureConsoleIntegration({levels:["error"]})];Fe.sentry.tracing&&t.push(e.reactRouterV6BrowserTracingIntegration({useEffect:Or.useEffect,useLocation:AC,useNavigationType:BT,createRoutesFromChildren:FT,matchRoutes:jT})),e.init({release:r,dsn:Fe.sentry.dsn,environment:Fe.sentry.env,integrations:t,ignoreErrors:["User is not allowed to create files","User is not allowed to move documents","The user aborted a request."],sendDefaultPii:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend(n,i){const a=i.originalException;return a instanceof TypeError&&a.message.includes("Failed to fetch")&&!navigator.onLine?null:n}}),bd=!0}async function R1(){if(!bd)return;const e=(await XS()).getClient();return e==null?void 0:e.close()}function N1(){const[r]=qC(),{analytics:e}=r;st(()=>{if(!e){R1().catch(t=>_C.error(t));return}bd||!Fe.sentry.dsn||Fe.sentry.dsn===""||O1().catch(t=>_C.error(t))},[e])}var I1=Object.defineProperty,x1=Object.getOwnPropertyDescriptor,ut=(r,e,t,n)=>{for(var i=x1(e,t),a=r.length-1,o;a>=0;a--)(o=r[a])&&(i=o(e,t,i)||i);return i&&I1(e,t,i),i};function lt(r,e,t){const n=t.value;t.value=function(...i){if(!this.server)throw new Error("Read mode document drive not initialized.");return n.apply(this,i)}}function $1(r){const e=Object.getPrototypeOf(r);Object.getOwnPropertyNames(e).forEach(n=>{const i=Object.getOwnPropertyDescriptor(e,n);i&&typeof i.value=="function"&&n!=="constructor"&&(r[n]=r[n].bind(r))})}class rt{constructor(e){ve(this,"server");$1(this),this.server=e}getServer(){return this.server}setDocumentDrive(e){this.server=e}migrateReadDrive(e,t){return this.server.migrateReadDrive(e,t)}addReadDrive(e,t){return this.server.addReadDrive(e,t)}getReadDrives(){return this.server.getReadDrives()}getReadDriveBySlug(e){return this.server.getReadDriveBySlug(e)}getReadDrive(e){return this.server.getReadDrive(e)}getReadDriveContext(e){return this.server.getReadDriveContext(e)}fetchDrive(e){return this.server.fetchDrive(e)}fetchDocument(e,t,n){return this.server.fetchDocument(e,t,n)}deleteReadDrive(e){return this.server.deleteReadDrive(e)}onReadDrivesUpdate(e){return this.server.onReadDrivesUpdate(e)}}ut([lt],rt.prototype,"migrateReadDrive");ut([lt],rt.prototype,"addReadDrive");ut([lt],rt.prototype,"getReadDrives");ut([lt],rt.prototype,"getReadDriveBySlug");ut([lt],rt.prototype,"getReadDrive");ut([lt],rt.prototype,"getReadDriveContext");ut([lt],rt.prototype,"fetchDrive");ut([lt],rt.prototype,"fetchDocument");ut([lt],rt.prototype,"deleteReadDrive");ut([lt],rt.prototype,"onReadDrivesUpdate");const Wt=new rt,eT=wT({...Wt,readDrives:[]});async function P1(r){const e=await r.getReadDrives();return(await Promise.all(e.map(n=>r.getReadDrive(n)))).filter(n=>!(n instanceof fT))}const k1=r=>{const e=ET(),[t,n]=vd([]),i=ST(),[a,o]=vd(!1);st(()=>{e&&(Wt.setDocumentDrive(e),o(!0))},[e]);const s=i===void 0?void 0:!(i.isAllowedToCreateDocuments||i.isAllowedToEditDocuments);uf(()=>{if(!a||s===void 0)return;const u=s?"READ":"WRITE",h=Wt.getServer();h&&typeof h.setAllDefaultDrivesAccessLevel=="function"&&h.setAllDefaultDrivesAccessLevel(u).catch(Ur.error)},[s,a]),st(()=>{if(!a)return;P1(Wt).then(h=>n(h)).catch(Ur.error);const u=Wt.onReadDrivesUpdate(h=>{n(c=>c.length!==h.length||_d(c)!==_d(h)?h:c)}).catch(Ur.error);return()=>{u.then(h=>h==null?void 0:h()).catch(Ur.error)}},[a]);const l=uf(()=>({...Wt,readDrives:t}),[t]);return Re(eT.Provider,{...r,value:l})},$x=()=>vT(eT),L1=({children:r})=>(N1(),r);function M1(r){return r.map(e=>({packageName:e.manifest.name,processors:e.processors})).reduce((e,t)=>(t.processors&&(e=[...e,{packageName:t.packageName,processors:t.processors}]),e),[])}const D1=dT(async r=>{const e=await r(_T);return M1(e)}),j1=()=>Ef(D1);async function F1(){const r=await lf.get(TC),e=new h1(r.listeners,r);return r.on("driveAdded",async t=>{await e.registerDrive(t.header.id)}),e}const Kn=TT(F1);Kn.debugLabel="processorManagerAtomInConnect";const B1=()=>Ef(Kn),tT=qT(Kn);tT.debugLabel="unwrappedProcessorManagerInConnect";const wd=()=>Ef(tT);lf.sub(TC,()=>lf.get(Kn));const er=yn(["reactor-analytics"]);function U1(r){return async()=>{const e=(await ht(async()=>{const{default:a}=await import("./pglite-worker.dssW4LQw.js");return{default:a}},[],import.meta.url)).default,{PGliteWorker:t}=await ht(async()=>{const{PGliteWorker:a}=await import("./index.BGemDCBc.js").then(o=>o.dd);return{PGliteWorker:a}},[],import.meta.url),n=new e({name:"pglite-worker"});n.onmessage=a=>{er.verbose(a.data)},n.onerror=a=>{throw er.error(a.message),a.error};const i=new t(n,{meta:{databaseName:r},extensions:{live:mT}});return await i.waitReady,i}}async function V1(r,e,t,n){return await r.registerFactory(t,n({analyticsStore:e}))}async function Q1(r,e){const{processorFactory:t}=await ht(async()=>{const{processorFactory:n}=await import("./index.Q6GFaI_V.js");return{processorFactory:n}},__vite__mapDeps([8,3,2,4,1,5,6,7,9,10,11,12,13]),import.meta.url);return await r.registerFactory("@powerhousedao/diff-analyzer",t({analyticsStore:e}))}async function W1(r,e){const{processorFactory:t}=await ht(async()=>{const{processorFactory:n}=await import("./index.DWdwQnZG.js");return{processorFactory:n}},__vite__mapDeps([14,3,2,4,1,5,6,7,9,10,11,12,13]),import.meta.url);return await r.registerFactory("@powerhousedao/common/drive-analytics",t({analyticsStore:e}))}function H1(){const r=yd(),e=wd(),t=Sf(!1);return st(()=>{!r.data||!e||t.current||(t.current=!0,Q1(e,r.data).catch(er.error))},[r.data,e]),null}function z1(){const r=yd(),e=wd(),t=Sf(!1);return st(()=>{!r.data||!e||t.current||(t.current=!0,W1(e,r.data).then(()=>{er.verbose("Drive analytics processor registered")}).catch(er.error))},[r.data,e]),null}function G1(){const r=j1(),e=yd(),t=wd(),n=Sf(!1);return st(()=>{if(!e.data||!t||n.current||r.length===0)return;n.current=!0;let i=0;for(const{packageName:a,processors:o}of r)V1(t,e.data,`${a}-${i}`,o).catch(er.error),i++},[e.data,t]),null}function J1({children:r}){const e=Fe.analytics.useWorker?U1(Fe.analytics.databaseName):void 0,t=pT();st(()=>{if(!e){t({db:null,isLoading:!1,error:null});return}e().then(i=>{t({db:i,isLoading:!1,error:null})}).catch(i=>{const a=i instanceof Error?i:new Error(String(i));t({db:null,isLoading:!1,error:a})})},[]);const n=Ht(CC,{children:[Fe.analytics.diffProcessorEnabled&&Re(H1,{}),Fe.analytics.driveAnalyticsEnabled&&Re(z1,{}),Fe.analytics.externalProcessorsEnabled&&Re(G1,{}),r]});return Re(c1,{options:{databaseName:Fe.analytics.databaseName,pgLiteFactory:e},children:n})}const K1=Or.lazy(()=>ht(()=>import("./home.CHwcgR2d.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18,9,19,20,11]),import.meta.url).then(r=>({default:r.Home}))),Y1=Or.lazy(()=>ht(()=>import("./content.mtsZfVv6.js"),__vite__mapDeps([21,3,22,9,1,2,4,5,6,7,23,18,12,20,24,25,10,11,13]),import.meta.url)),Z1=Or.lazy(()=>ht(()=>import("./root.C9pGPT_U.js"),__vite__mapDeps([26,22,3,12,16,17,18,1,2,4,5,6,7,9,19,20,11,25,24,10,13]),import.meta.url)),X1=Or.lazy(()=>ht(()=>import("./atlas-import.CjA9uDEt.js"),__vite__mapDeps([27,3,25,9,1,2,4,5,6,7,12,18]),import.meta.url).then(r=>({default:r.AtlasImport}))),ex=Fe.routerBasename.endsWith("/")?Fe.routerBasename.slice(0,-1):Fe.routerBasename;function tx(r){return g1(r,{basename:ex,future:{v7_fetcherPersist:!0,v7_relativeSplatPath:!0}})}function rx(){return[{element:Re(Cr,{name:"RouteRoot",children:Re(Z1,{})}),children:[{index:!0,element:Re(Cr,{name:"Home",children:Re(K1,{})})},{path:"d?/:driveId?/*?",element:Re(Cr,{name:"Drive",children:Re(Y1,{})})},{path:"import/:documentId",element:Re(Cr,{name:"AtlasImport",children:Re(X1,{})})}]}]}const nx=rx(),ix=tx(nx),sx=()=>Re(T1,{router:ix});window.__VITE_ENVS.MODE==="development"?window.documentEditorDebugTools=new d1:UT.registerServiceWorker(!1);const ox=()=>(CT(),null),ax=()=>(B1(),null),ux=()=>Ht(CC,{children:[Re(L1,{children:Re(gT,{children:Re(k1,{children:Ht(J1,{children:[Re(yT,{position:"bottom-right",containerId:"connect"}),Ht(bT,{children:[Re(sx,{}),Re(f1,{})]})]})})})}),Ht(Cr,{children:[Re(ax,{}),Re(ox,{})]})]}),Px=Object.freeze(Object.defineProperty({__proto__:null,default:ux},Symbol.toStringTag,{value:"Module"}));export{it as A,ue as D,Ix as a,nt as b,$x as c,xx as d,Px as e,yd as u};
|
|
215
|
-
//# sourceMappingURL=app.
|
|
214
|
+
*/function gn(){return gn=Object.assign?Object.assign.bind():function(r){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(r[n]=t[n])}return r},gn.apply(this,arguments)}function Cf(r){return r===void 0&&(r=""),new URLSearchParams(typeof r=="string"||Array.isArray(r)||r instanceof URLSearchParams?r:Object.keys(r).reduce((e,t)=>{let n=r[t];return e.concat(Array.isArray(n)?n.map(i=>[t,i]):[[t,n]])},[]))}function p1(r,e){let t=Cf(r);return e&&e.forEach((n,i)=>{t.has(i)||e.getAll(i).forEach(a=>{t.append(i,a)})}),t}const m1="6";try{window.__reactRouterVersion=m1}catch{}function g1(r,e){return $T({basename:e==null?void 0:e.basename,future:gn({},e==null?void 0:e.future,{v7_prependBasename:!0}),history:PT({window:e==null?void 0:e.window}),hydrationData:(e==null?void 0:e.hydrationData)||y1(),routes:r,mapRouteProperties:MT,dataStrategy:e==null?void 0:e.dataStrategy,patchRoutesOnNavigation:e==null?void 0:e.patchRoutesOnNavigation,window:e==null?void 0:e.window}).initialize()}function y1(){var r;let e=(r=window)==null?void 0:r.__staticRouterHydrationData;return e&&e.errors&&(e=gn({},e,{errors:b1(e.errors)})),e}function b1(r){if(!r)return null;let e=Object.entries(r),t={};for(let[n,i]of e)if(i&&i.__type==="RouteErrorResponse")t[n]=new LT(i.status,i.statusText,i.data,i.internal===!0);else if(i&&i.__type==="Error"){if(i.__subType){let a=window[i.__subType];if(typeof a=="function")try{let o=new a(i.message);o.stack="",t[n]=o}catch{}}if(t[n]==null){let a=new Error(i.message);a.stack="",t[n]=a}}else t[n]=i;return t}const w1=de.createContext({isTransitioning:!1}),v1=de.createContext(new Map),_1="startTransition",yC=de[_1],C1="flushSync",bC=OT[C1];function E1(r){yC?yC(r):r()}function _r(r){bC?bC(r):r()}class S1{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=n=>{this.status==="pending"&&(this.status="resolved",e(n))},this.reject=n=>{this.status==="pending"&&(this.status="rejected",t(n))}})}}function T1(r){let{fallbackElement:e,router:t,future:n}=r,[i,a]=de.useState(t.state),[o,s]=de.useState(),[l,u]=de.useState({isTransitioning:!1}),[h,c]=de.useState(),[f,d]=de.useState(),[w,_]=de.useState(),m=de.useRef(new Map),{v7_startTransition:g}=n||{},p=de.useCallback(R=>{g?E1(R):R()},[g]),b=de.useCallback((R,j)=>{let{deletedFetchers:C,flushSync:q,viewTransitionOpts:M}=j;R.fetchers.forEach((y,A)=>{y.data!==void 0&&m.current.set(A,y.data)}),C.forEach(y=>m.current.delete(y));let B=t.window==null||t.window.document==null||typeof t.window.document.startViewTransition!="function";if(!M||B){q?_r(()=>a(R)):p(()=>a(R));return}if(q){_r(()=>{f&&(h&&h.resolve(),f.skipTransition()),u({isTransitioning:!0,flushSync:!0,currentLocation:M.currentLocation,nextLocation:M.nextLocation})});let y=t.window.document.startViewTransition(()=>{_r(()=>a(R))});y.finished.finally(()=>{_r(()=>{c(void 0),d(void 0),s(void 0),u({isTransitioning:!1})})}),_r(()=>d(y));return}f?(h&&h.resolve(),f.skipTransition(),_({state:R,currentLocation:M.currentLocation,nextLocation:M.nextLocation})):(s(R),u({isTransitioning:!0,flushSync:!1,currentLocation:M.currentLocation,nextLocation:M.nextLocation}))},[t.window,f,h,m,p]);de.useLayoutEffect(()=>t.subscribe(b),[t,b]),de.useEffect(()=>{l.isTransitioning&&!l.flushSync&&c(new S1)},[l]),de.useEffect(()=>{if(h&&o&&t.window){let R=o,j=h.promise,C=t.window.document.startViewTransition(async()=>{p(()=>a(R)),await j});C.finished.finally(()=>{c(void 0),d(void 0),s(void 0),u({isTransitioning:!1})}),d(C)}},[p,o,h,t.window]),de.useEffect(()=>{h&&o&&i.location.key===o.location.key&&h.resolve()},[h,f,i.location,o]),de.useEffect(()=>{!l.isTransitioning&&w&&(s(w.state),u({isTransitioning:!0,flushSync:!1,currentLocation:w.currentLocation,nextLocation:w.nextLocation}),_(void 0))},[l.isTransitioning,w]),de.useEffect(()=>{},[]);let v=de.useMemo(()=>({createHref:t.createHref,encodeLocation:t.encodeLocation,go:R=>t.navigate(R),push:(R,j,C)=>t.navigate(R,{state:j,preventScrollReset:C==null?void 0:C.preventScrollReset}),replace:(R,j,C)=>t.navigate(R,{replace:!0,state:j,preventScrollReset:C==null?void 0:C.preventScrollReset})}),[t]),E=t.basename||"/",T=de.useMemo(()=>({router:t,navigator:v,static:!1,basename:E}),[t,v,E]),S=de.useMemo(()=>({v7_relativeSplatPath:t.future.v7_relativeSplatPath}),[t.future.v7_relativeSplatPath]);return de.useEffect(()=>RT(),[n,t.future]),de.createElement(de.Fragment,null,de.createElement(NT.Provider,{value:T},de.createElement(IT.Provider,{value:i},de.createElement(v1.Provider,{value:m.current},de.createElement(w1.Provider,{value:l},de.createElement(xT,{basename:E,location:i.location,navigationType:i.historyAction,navigator:v,future:S},i.initialized||t.future.v7_partialHydration?de.createElement(q1,{routes:t.routes,future:t.future,state:i}):e))))),null)}const q1=de.memo(A1);function A1(r){let{routes:e,future:t,state:n}=r;return kT(e,void 0,n,t)}var wC;(function(r){r.UseScrollRestoration="useScrollRestoration",r.UseSubmit="useSubmit",r.UseSubmitFetcher="useSubmitFetcher",r.UseFetcher="useFetcher",r.useViewTransitionState="useViewTransitionState"})(wC||(wC={}));var vC;(function(r){r.UseFetcher="useFetcher",r.UseFetchers="useFetchers",r.UseScrollRestoration="useScrollRestoration"})(vC||(vC={}));function xx(r){let e=de.useRef(Cf(r)),t=de.useRef(!1),n=AC(),i=de.useMemo(()=>p1(n.search,t.current?null:e.current),[n.search]),a=DT(),o=de.useCallback((s,l)=>{const u=Cf(typeof s=="function"?s(i):s);t.current=!0,a("?"+u,l)},[a,i]);return[i,o]}const _C=yn(["sentry"]);let bd=!1;async function XS(){return await ht(()=>import("./index.CCtK4G2j.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url)}async function O1(){const r=window.__VITE_ENVS.SENTRY_RELEASE,e=await XS(),t=[e.httpClientIntegration(),e.extraErrorDataIntegration({depth:5}),e.replayIntegration(),e.captureConsoleIntegration({levels:["error"]})];Fe.sentry.tracing&&t.push(e.reactRouterV6BrowserTracingIntegration({useEffect:Or.useEffect,useLocation:AC,useNavigationType:BT,createRoutesFromChildren:FT,matchRoutes:jT})),e.init({release:r,dsn:Fe.sentry.dsn,environment:Fe.sentry.env,integrations:t,ignoreErrors:["User is not allowed to create files","User is not allowed to move documents","The user aborted a request."],sendDefaultPii:!0,tracesSampleRate:1,replaysSessionSampleRate:.1,replaysOnErrorSampleRate:1,beforeSend(n,i){const a=i.originalException;return a instanceof TypeError&&a.message.includes("Failed to fetch")&&!navigator.onLine?null:n}}),bd=!0}async function R1(){if(!bd)return;const e=(await XS()).getClient();return e==null?void 0:e.close()}function N1(){const[r]=qC(),{analytics:e}=r;st(()=>{if(!e){R1().catch(t=>_C.error(t));return}bd||!Fe.sentry.dsn||Fe.sentry.dsn===""||O1().catch(t=>_C.error(t))},[e])}var I1=Object.defineProperty,x1=Object.getOwnPropertyDescriptor,ut=(r,e,t,n)=>{for(var i=x1(e,t),a=r.length-1,o;a>=0;a--)(o=r[a])&&(i=o(e,t,i)||i);return i&&I1(e,t,i),i};function lt(r,e,t){const n=t.value;t.value=function(...i){if(!this.server)throw new Error("Read mode document drive not initialized.");return n.apply(this,i)}}function $1(r){const e=Object.getPrototypeOf(r);Object.getOwnPropertyNames(e).forEach(n=>{const i=Object.getOwnPropertyDescriptor(e,n);i&&typeof i.value=="function"&&n!=="constructor"&&(r[n]=r[n].bind(r))})}class rt{constructor(e){ve(this,"server");$1(this),this.server=e}getServer(){return this.server}setDocumentDrive(e){this.server=e}migrateReadDrive(e,t){return this.server.migrateReadDrive(e,t)}addReadDrive(e,t){return this.server.addReadDrive(e,t)}getReadDrives(){return this.server.getReadDrives()}getReadDriveBySlug(e){return this.server.getReadDriveBySlug(e)}getReadDrive(e){return this.server.getReadDrive(e)}getReadDriveContext(e){return this.server.getReadDriveContext(e)}fetchDrive(e){return this.server.fetchDrive(e)}fetchDocument(e,t,n){return this.server.fetchDocument(e,t,n)}deleteReadDrive(e){return this.server.deleteReadDrive(e)}onReadDrivesUpdate(e){return this.server.onReadDrivesUpdate(e)}}ut([lt],rt.prototype,"migrateReadDrive");ut([lt],rt.prototype,"addReadDrive");ut([lt],rt.prototype,"getReadDrives");ut([lt],rt.prototype,"getReadDriveBySlug");ut([lt],rt.prototype,"getReadDrive");ut([lt],rt.prototype,"getReadDriveContext");ut([lt],rt.prototype,"fetchDrive");ut([lt],rt.prototype,"fetchDocument");ut([lt],rt.prototype,"deleteReadDrive");ut([lt],rt.prototype,"onReadDrivesUpdate");const Wt=new rt,eT=wT({...Wt,readDrives:[]});async function P1(r){const e=await r.getReadDrives();return(await Promise.all(e.map(n=>r.getReadDrive(n)))).filter(n=>!(n instanceof fT))}const k1=r=>{const e=ET(),[t,n]=vd([]),i=ST(),[a,o]=vd(!1);st(()=>{e&&(Wt.setDocumentDrive(e),o(!0))},[e]);const s=i===void 0?void 0:!(i.isAllowedToCreateDocuments||i.isAllowedToEditDocuments);uf(()=>{if(!a||s===void 0)return;const u=s?"READ":"WRITE",h=Wt.getServer();h&&typeof h.setAllDefaultDrivesAccessLevel=="function"&&h.setAllDefaultDrivesAccessLevel(u).catch(Ur.error)},[s,a]),st(()=>{if(!a)return;P1(Wt).then(h=>n(h)).catch(Ur.error);const u=Wt.onReadDrivesUpdate(h=>{n(c=>c.length!==h.length||_d(c)!==_d(h)?h:c)}).catch(Ur.error);return()=>{u.then(h=>h==null?void 0:h()).catch(Ur.error)}},[a]);const l=uf(()=>({...Wt,readDrives:t}),[t]);return Re(eT.Provider,{...r,value:l})},$x=()=>vT(eT),L1=({children:r})=>(N1(),r);function M1(r){return r.map(e=>({packageName:e.manifest.name,processors:e.processors})).reduce((e,t)=>(t.processors&&(e=[...e,{packageName:t.packageName,processors:t.processors}]),e),[])}const D1=dT(async r=>{const e=await r(_T);return M1(e)}),j1=()=>Ef(D1);async function F1(){const r=await lf.get(TC),e=new h1(r.listeners,r);return r.on("driveAdded",async t=>{await e.registerDrive(t.header.id)}),e}const Kn=TT(F1);Kn.debugLabel="processorManagerAtomInConnect";const B1=()=>Ef(Kn),tT=qT(Kn);tT.debugLabel="unwrappedProcessorManagerInConnect";const wd=()=>Ef(tT);lf.sub(TC,()=>lf.get(Kn));const er=yn(["reactor-analytics"]);function U1(r){return async()=>{const e=(await ht(async()=>{const{default:a}=await import("./pglite-worker.dssW4LQw.js");return{default:a}},[],import.meta.url)).default,{PGliteWorker:t}=await ht(async()=>{const{PGliteWorker:a}=await import("./index.BcBVmRI8.js").then(o=>o.dd);return{PGliteWorker:a}},[],import.meta.url),n=new e({name:"pglite-worker"});n.onmessage=a=>{er.verbose(a.data)},n.onerror=a=>{throw er.error(a.message),a.error};const i=new t(n,{meta:{databaseName:r},extensions:{live:mT}});return await i.waitReady,i}}async function V1(r,e,t,n){return await r.registerFactory(t,n({analyticsStore:e}))}async function Q1(r,e){const{processorFactory:t}=await ht(async()=>{const{processorFactory:n}=await import("./index.DQ6Y_BFS.js");return{processorFactory:n}},__vite__mapDeps([8,3,2,4,1,5,6,7,9,10,11,12,13]),import.meta.url);return await r.registerFactory("@powerhousedao/diff-analyzer",t({analyticsStore:e}))}async function W1(r,e){const{processorFactory:t}=await ht(async()=>{const{processorFactory:n}=await import("./index.DbzMt0Q8.js");return{processorFactory:n}},__vite__mapDeps([14,3,2,4,1,5,6,7,9,10,11,12,13]),import.meta.url);return await r.registerFactory("@powerhousedao/common/drive-analytics",t({analyticsStore:e}))}function H1(){const r=yd(),e=wd(),t=Sf(!1);return st(()=>{!r.data||!e||t.current||(t.current=!0,Q1(e,r.data).catch(er.error))},[r.data,e]),null}function z1(){const r=yd(),e=wd(),t=Sf(!1);return st(()=>{!r.data||!e||t.current||(t.current=!0,W1(e,r.data).then(()=>{er.verbose("Drive analytics processor registered")}).catch(er.error))},[r.data,e]),null}function G1(){const r=j1(),e=yd(),t=wd(),n=Sf(!1);return st(()=>{if(!e.data||!t||n.current||r.length===0)return;n.current=!0;let i=0;for(const{packageName:a,processors:o}of r)V1(t,e.data,`${a}-${i}`,o).catch(er.error),i++},[e.data,t]),null}function J1({children:r}){const e=Fe.analytics.useWorker?U1(Fe.analytics.databaseName):void 0,t=pT();st(()=>{if(!e){t({db:null,isLoading:!1,error:null});return}e().then(i=>{t({db:i,isLoading:!1,error:null})}).catch(i=>{const a=i instanceof Error?i:new Error(String(i));t({db:null,isLoading:!1,error:a})})},[]);const n=Ht(CC,{children:[Fe.analytics.diffProcessorEnabled&&Re(H1,{}),Fe.analytics.driveAnalyticsEnabled&&Re(z1,{}),Fe.analytics.externalProcessorsEnabled&&Re(G1,{}),r]});return Re(c1,{options:{databaseName:Fe.analytics.databaseName,pgLiteFactory:e},children:n})}const K1=Or.lazy(()=>ht(()=>import("./home.CRGUjEn-.js"),__vite__mapDeps([15,1,2,3,4,5,6,7,16,17,18,9,19,20,11]),import.meta.url).then(r=>({default:r.Home}))),Y1=Or.lazy(()=>ht(()=>import("./content.BtkNuaBR.js"),__vite__mapDeps([21,3,22,9,1,2,4,5,6,7,23,18,12,20,24,25,10,11,13]),import.meta.url)),Z1=Or.lazy(()=>ht(()=>import("./root.OJGI0z2p.js"),__vite__mapDeps([26,22,3,12,16,17,18,1,2,4,5,6,7,9,19,20,11,25,24,10,13]),import.meta.url)),X1=Or.lazy(()=>ht(()=>import("./atlas-import.BaW3Y7_S.js"),__vite__mapDeps([27,3,25,9,1,2,4,5,6,7,12,18]),import.meta.url).then(r=>({default:r.AtlasImport}))),ex=Fe.routerBasename.endsWith("/")?Fe.routerBasename.slice(0,-1):Fe.routerBasename;function tx(r){return g1(r,{basename:ex,future:{v7_fetcherPersist:!0,v7_relativeSplatPath:!0}})}function rx(){return[{element:Re(Cr,{name:"RouteRoot",children:Re(Z1,{})}),children:[{index:!0,element:Re(Cr,{name:"Home",children:Re(K1,{})})},{path:"d?/:driveId?/*?",element:Re(Cr,{name:"Drive",children:Re(Y1,{})})},{path:"import/:documentId",element:Re(Cr,{name:"AtlasImport",children:Re(X1,{})})}]}]}const nx=rx(),ix=tx(nx),sx=()=>Re(T1,{router:ix});window.__VITE_ENVS.MODE==="development"?window.documentEditorDebugTools=new d1:UT.registerServiceWorker(!1);const ox=()=>(CT(),null),ax=()=>(B1(),null),ux=()=>Ht(CC,{children:[Re(L1,{children:Re(gT,{children:Re(k1,{children:Ht(J1,{children:[Re(yT,{position:"bottom-right",containerId:"connect"}),Ht(bT,{children:[Re(sx,{}),Re(f1,{})]})]})})})}),Ht(Cr,{children:[Re(ax,{}),Re(ox,{})]})]}),Px=Object.freeze(Object.defineProperty({__proto__:null,default:ux},Symbol.toStringTag,{value:"Module"}));export{it as A,ue as D,Ix as a,nt as b,$x as c,xx as d,Px as e,yd as u};
|
|
215
|
+
//# sourceMappingURL=app.BdxMoAAL.js.map
|