\ No newline at end of file
diff --git a/web-app/build/static/js/104.422e3d9a.chunk.js b/web-app/build/static/js/104.422e3d9a.chunk.js
new file mode 100644
index 00000000000..93b3267c222
--- /dev/null
+++ b/web-app/build/static/js/104.422e3d9a.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[104],{104(e,t,a){a.r(t),a.d(t,{default:()=>x});var s=a(5043),r=a(3216),i=a(9923),n=a(4574),p=a(9161),c=a(579);const o=n.Ay.iframe(()=>({border:"0px",flex:"1 1 auto",minHeight:"800px",width:"100%"})),x=()=>{const{tenantName:e,tenantNamespace:t}=(0,r.g)(),[a,n]=(0,s.useState)(!0);return(0,c.jsxs)(s.Fragment,{children:[(0,c.jsx)(i._xt,{separator:!0,sx:{marginBottom:15},children:"Metrics"}),a&&(0,c.jsx)("div",{style:{marginTop:"80px"},children:(0,c.jsx)(i.z21,{})}),(0,c.jsx)(o,{title:"metrics",src:`/api/proxy/${t||""}/${e||""}${p.zZ.TOOLS_TRACE}?cp=y`,onLoad:()=>{n(!1)}})]})}}}]);
+//# sourceMappingURL=104.422e3d9a.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/104.422e3d9a.chunk.js.map b/web-app/build/static/js/104.422e3d9a.chunk.js.map
new file mode 100644
index 00000000000..bbb28321ee9
--- /dev/null
+++ b/web-app/build/static/js/104.422e3d9a.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/104.422e3d9a.chunk.js","mappings":"sMAsBA,MAAMA,EAAkBC,EAAAA,GAAOC,OAAO,MACpCC,OAAQ,MACRC,KAAM,WACNC,UAAW,QACXC,MAAO,UA+BT,EA5BoBC,KAClB,MAAM,WAAEC,EAAU,gBAAEC,IAAoBC,EAAAA,EAAAA,MAEjCC,EAASC,IAAcC,EAAAA,EAAAA,WAAkB,GAEhD,OACEC,EAAAA,EAAAA,MAACC,EAAAA,SAAQ,CAAAC,SAAA,EACPC,EAAAA,EAAAA,KAACC,EAAAA,IAAY,CAACC,WAAS,EAACC,GAAI,CAAEC,aAAc,IAAKL,SAAC,YAGjDL,IACCM,EAAAA,EAAAA,KAAA,OAAKK,MAAO,CAAEC,UAAW,QAASP,UAChCC,EAAAA,EAAAA,KAACO,EAAAA,IAAW,OAGhBP,EAAAA,EAAAA,KAACjB,EAAe,CACdyB,MAAO,UACPC,IAAK,cAAcjB,GAAmB,MAAMD,GAAc,KACxDmB,EAAAA,GAAUC,mBAEZC,OAAQA,KACNjB,GAAW,S","sources":["screens/Console/Tenants/TenantDetails/TenantTrace.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState, Fragment } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport { ProgressBar, SectionTitle } from \"mds\";\nimport styled from \"styled-components\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\n\nconst IFrameContainer = styled.iframe(() => ({\n border: \"0px\",\n flex: \"1 1 auto\",\n minHeight: \"800px\",\n width: \"100%\",\n}));\n\nconst TenantTrace = () => {\n const { tenantName, tenantNamespace } = useParams();\n\n const [loading, setLoading] = useState(true);\n\n return (\n \n \n Metrics\n \n {loading && (\n
\n \n
\n )}\n {\n setLoading(false);\n }}\n />\n \n );\n};\n\nexport default TenantTrace;\n"],"names":["IFrameContainer","styled","iframe","border","flex","minHeight","width","TenantTrace","tenantName","tenantNamespace","useParams","loading","setLoading","useState","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","style","marginTop","ProgressBar","title","src","IAM_PAGES","TOOLS_TRACE","onLoad"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/104.61610e29.chunk.js b/web-app/build/static/js/104.61610e29.chunk.js
deleted file mode 100644
index c3e7f94e565..00000000000
--- a/web-app/build/static/js/104.61610e29.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[104],{104:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var s=a(5043),r=a(3216),n=a(9923),p=a(4574),i=a(9161),c=a(579);const x=p.Ay.iframe((()=>({border:"0px",flex:"1 1 auto",minHeight:"800px",width:"100%"}))),o=()=>{const{tenantName:e,tenantNamespace:t}=(0,r.g)(),[a,p]=(0,s.useState)(!0);return(0,c.jsxs)(s.Fragment,{children:[(0,c.jsx)(n._xt,{separator:!0,sx:{marginBottom:15},children:"Metrics"}),a&&(0,c.jsx)("div",{style:{marginTop:"80px"},children:(0,c.jsx)(n.z21,{})}),(0,c.jsx)(x,{title:"metrics",src:`/api/proxy/${t||""}/${e||""}${i.zZ.TOOLS_TRACE}?cp=y`,onLoad:()=>{p(!1)}})]})}}}]);
-//# sourceMappingURL=104.61610e29.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/104.61610e29.chunk.js.map b/web-app/build/static/js/104.61610e29.chunk.js.map
deleted file mode 100644
index f33cac0fe2f..00000000000
--- a/web-app/build/static/js/104.61610e29.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/104.61610e29.chunk.js","mappings":"6LAsBA,MAAMA,EAAkBC,EAAAA,GAAOC,QAAO,MACpCC,OAAQ,MACRC,KAAM,WACNC,UAAW,QACXC,MAAO,WA+BT,EA5BoBC,KAClB,MAAM,WAAEC,EAAU,gBAAEC,IAAoBC,EAAAA,EAAAA,MAEjCC,EAASC,IAAcC,EAAAA,EAAAA,WAAkB,GAEhD,OACEC,EAAAA,EAAAA,MAACC,EAAAA,SAAQ,CAAAC,SAAA,EACPC,EAAAA,EAAAA,KAACC,EAAAA,IAAY,CAACC,WAAS,EAACC,GAAI,CAAEC,aAAc,IAAKL,SAAC,YAGjDL,IACCM,EAAAA,EAAAA,KAAA,OAAKK,MAAO,CAAEC,UAAW,QAASP,UAChCC,EAAAA,EAAAA,KAACO,EAAAA,IAAW,OAGhBP,EAAAA,EAAAA,KAACjB,EAAe,CACdyB,MAAO,UACPC,IAAK,cAAcjB,GAAmB,MAAMD,GAAc,KACxDmB,EAAAA,GAAUC,mBAEZC,OAAQA,KACNjB,GAAW,EAAM,MAGZ,C","sources":["screens/Console/Tenants/TenantDetails/TenantTrace.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useState, Fragment } from \"react\";\nimport { useParams } from \"react-router-dom\";\nimport { ProgressBar, SectionTitle } from \"mds\";\nimport styled from \"styled-components\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\n\nconst IFrameContainer = styled.iframe(() => ({\n border: \"0px\",\n flex: \"1 1 auto\",\n minHeight: \"800px\",\n width: \"100%\",\n}));\n\nconst TenantTrace = () => {\n const { tenantName, tenantNamespace } = useParams();\n\n const [loading, setLoading] = useState(true);\n\n return (\n \n \n Metrics\n \n {loading && (\n
\n \n
\n )}\n {\n setLoading(false);\n }}\n />\n \n );\n};\n\nexport default TenantTrace;\n"],"names":["IFrameContainer","styled","iframe","border","flex","minHeight","width","TenantTrace","tenantName","tenantNamespace","useParams","loading","setLoading","useState","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","style","marginTop","ProgressBar","title","src","IAM_PAGES","TOOLS_TRACE","onLoad"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/112.0df977a2.chunk.js b/web-app/build/static/js/112.0df977a2.chunk.js
deleted file mode 100644
index 0fd51e662d6..00000000000
--- a/web-app/build/static/js/112.0df977a2.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[112],{112:(e,n,s)=>{s.r(n),s.d(n,{default:()=>h});var t=s(5043),r=s(9456),a=s(9923),o=s(3216),l=s(6483),c=s(2961),d=s(4159),i=s(649),x=s(6746),j=s(579);const h=()=>{const e=(0,c.jL)(),n=(0,o.g)(),s=(0,r.d4)((e=>e.tenants.loadingTenant)),[h,g]=(0,t.useState)([]),[p,m]=(0,t.useState)(!0),u=n.tenantName||"",A=n.tenantNamespace||"";return(0,t.useEffect)((()=>{s&&m(!0)}),[s]),(0,t.useEffect)((()=>{p&&i.A.invoke("GET",`/api/v1/namespaces/${A}/tenants/${u}/events`).then((e=>{for(let n=0;n{e((0,d.C9)(n)),m(!1)}))}),[p,A,u,e]),(0,j.jsxs)(t.Fragment,{children:[(0,j.jsx)(a._xt,{separator:!0,sx:{marginBottom:15},children:"Events"}),(0,j.jsx)(a.xA9,{item:!0,xs:12,children:(0,j.jsx)(x.A,{events:h,loading:p})})]})}},6746:(e,n,s)=>{s.d(n,{A:()=>l});var t=s(5043),r=s(9923),a=s(579);const o=e=>{const{event:n}=e,[s,o]=t.useState(!1);return(0,a.jsxs)(t.Fragment,{children:[(0,a.jsxs)(r.Hjg,{sx:{cursor:"pointer"},children:[(0,a.jsx)(r.TlP,{scope:"row",onClick:()=>o(!s),sx:{borderBottom:0},children:n.event_type}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.reason}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.seen}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.message.length>=30?`${n.message.slice(0,30)}...`:n.message}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:s?(0,a.jsx)(r.FUY,{}):(0,a.jsx)(r.QpL,{})})]}),(0,a.jsx)(r.Hjg,{children:(0,a.jsx)(r.nA6,{style:{paddingBottom:0,paddingTop:0},colSpan:5,children:s&&(0,a.jsx)(r.azJ,{useBackground:!0,sx:{padding:10,marginBottom:10},children:n.message})})})]})},l=e=>{let{events:n,loading:s}=e;return s?(0,a.jsx)(r.z21,{}):(0,a.jsx)(r.azJ,{withBorders:!0,customBorderPadding:"0px",children:(0,a.jsxs)(r.XIK,{"aria-label":"collapsible table",children:[(0,a.jsx)(r.ndF,{children:(0,a.jsxs)(r.Hjg,{children:[(0,a.jsx)(r.nA6,{children:"Type"}),(0,a.jsx)(r.nA6,{children:"Reason"}),(0,a.jsx)(r.nA6,{children:"Age"}),(0,a.jsx)(r.nA6,{children:"Message"}),(0,a.jsx)(r.nA6,{})]})}),(0,a.jsx)(r.BFY,{children:n.map((e=>(0,a.jsx)(o,{event:e},`${e.event_type}-${e.seen}`)))})]})})}}}]);
-//# sourceMappingURL=112.0df977a2.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/112.0df977a2.chunk.js.map b/web-app/build/static/js/112.0df977a2.chunk.js.map
deleted file mode 100644
index 6f83a2c0b71..00000000000
--- a/web-app/build/static/js/112.0df977a2.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/112.0df977a2.chunk.js","mappings":"oOA4BA,MAsDA,EAtDqBA,KACnB,MAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAASC,EAAAA,EAAAA,KAETC,GAAgBC,EAAAA,EAAAA,KACnBC,GAAoBA,EAAMC,QAAQH,iBAG9BI,EAAQC,IAAaC,EAAAA,EAAAA,UA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AA,EACnCC,EAAAA,EAAAA,KAACwC,EAAAA,IAAS,CAAAzC,UACRF,EAAAA,EAAAA,MAACkB,EAAAA,IAAQ,CAAAhB,SAAA,EACPC,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,CAAAvB,SAAC,UACXC,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,CAAAvB,SAAC,YACXC,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,CAAAvB,SAAC,SACXC,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,CAAAvB,SAAC,aACXC,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,UAGdtB,EAAAA,EAAAA,KAACyC,EAAAA,IAAS,CAAA1C,SACP1B,EAAOqE,KAAK/B,IACXX,EAAAA,EAAAA,KAACS,EAAK,CAA2CE,MAAOA,GAA5C,GAAGA,EAAMU,cAAcV,EAAMrB,gBAI3C,C","sources":["screens/Console/Tenants/TenantDetails/TenantEvents.tsx","screens/Console/Tenants/TenantDetails/events/EventsList.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { Grid, SectionTitle } from \"mds\";\nimport { useParams } from \"react-router-dom\";\nimport { IEvent } from \"../ListTenants/types\";\nimport { niceDays } from \"../../../../common/utils\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setErrorSnackMessage } from \"../../../../systemSlice\";\nimport api from \"../../../../common/api\";\nimport EventsList from \"./events/EventsList\";\n\nconst TenantEvents = () => {\n const dispatch = useAppDispatch();\n const params = useParams();\n\n const loadingTenant = useSelector(\n (state: AppState) => state.tenants.loadingTenant,\n );\n\n const [events, setEvents] = useState([]);\n const [loading, setLoading] = useState(true);\n const tenantName = params.tenantName || \"\";\n const tenantNamespace = params.tenantNamespace || \"\";\n\n useEffect(() => {\n if (loadingTenant) {\n setLoading(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/events`,\n )\n .then((res: IEvent[]) => {\n for (let i = 0; i < res.length; i++) {\n let currentTime = (Date.now() / 1000) | 0;\n\n res[i].seen = niceDays((currentTime - res[i].last_seen).toString());\n }\n setEvents(res);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n }\n }, [loading, tenantNamespace, tenantName, dispatch]);\n\n return (\n \n \n Events\n \n \n \n \n \n );\n};\n\nexport default TenantEvents;\n","// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport {\n ProgressBar,\n Table,\n TableBody,\n TableHeadCell,\n TableCell,\n TableHead,\n TableRow,\n Box,\n ExpandCaret,\n CollapseCaret,\n} from \"mds\";\nimport { IEvent } from \"../../ListTenants/types\";\n\ninterface IEventsListProps {\n events: IEvent[];\n loading: boolean;\n}\n\nconst Event = (props: { event: IEvent }) => {\n const { event } = props;\n const [open, setOpen] = React.useState(false);\n\n return (\n \n \n setOpen(!open)}\n sx={{ borderBottom: 0 }}\n >\n {event.event_type}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.reason}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.seen}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.message.length >= 30\n ? `${event.message.slice(0, 30)}...`\n : event.message}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {open ? : }\n \n \n \n \n {open && (\n \n {event.message}\n \n )}\n \n \n \n );\n};\n\nconst EventsList = ({ events, loading }: IEventsListProps) => {\n if (loading) {\n return ;\n }\n return (\n \n
\n \n );\n};\n\nexport default EventsList;\n"],"names":["TenantEvents","dispatch","useAppDispatch","params","useParams","loadingTenant","useSelector","state","tenants","events","setEvents","useState","loading","setLoading","tenantName","tenantNamespace","useEffect","api","invoke","then","res","i","length","currentTime","Date","now","seen","niceDays","last_seen","toString","catch","err","setErrorSnackMessage","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","Grid","item","xs","EventsList","Event","props","event","open","setOpen","React","TableRow","cursor","TableHeadCell","scope","onClick","borderBottom","event_type","TableCell","reason","message","slice","CollapseCaret","ExpandCaret","style","paddingBottom","paddingTop","colSpan","Box","useBackground","padding","_ref","ProgressBar","withBorders","customBorderPadding","Table","TableHead","TableBody","map"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/112.ab8bc91d.chunk.js b/web-app/build/static/js/112.ab8bc91d.chunk.js
new file mode 100644
index 00000000000..d1485f761c3
--- /dev/null
+++ b/web-app/build/static/js/112.ab8bc91d.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[112],{112(e,n,s){s.r(n),s.d(n,{default:()=>j});var t=s(5043),r=s(9456),a=s(9923),o=s(3216),l=s(6483),i=s(2961),c=s(4159),d=s(649),x=s(6746),h=s(579);const j=()=>{const e=(0,i.jL)(),n=(0,o.g)(),s=(0,r.d4)(e=>e.tenants.loadingTenant),[j,g]=(0,t.useState)([]),[p,m]=(0,t.useState)(!0),u=n.tenantName||"",A=n.tenantNamespace||"";return(0,t.useEffect)(()=>{s&&m(!0)},[s]),(0,t.useEffect)(()=>{p&&d.A.invoke("GET",`/api/v1/namespaces/${A}/tenants/${u}/events`).then(e=>{for(let n=0;n{e((0,c.C9)(n)),m(!1)})},[p,A,u,e]),(0,h.jsxs)(t.Fragment,{children:[(0,h.jsx)(a._xt,{separator:!0,sx:{marginBottom:15},children:"Events"}),(0,h.jsx)(a.xA9,{item:!0,xs:12,children:(0,h.jsx)(x.A,{events:j,loading:p})})]})}},6746(e,n,s){s.d(n,{A:()=>l});var t=s(5043),r=s(9923),a=s(579);const o=e=>{const{event:n}=e,[s,o]=t.useState(!1);return(0,a.jsxs)(t.Fragment,{children:[(0,a.jsxs)(r.Hjg,{sx:{cursor:"pointer"},children:[(0,a.jsx)(r.TlP,{scope:"row",onClick:()=>o(!s),sx:{borderBottom:0},children:n.event_type}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.reason}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.seen}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:n.message.length>=30?`${n.message.slice(0,30)}...`:n.message}),(0,a.jsx)(r.nA6,{onClick:()=>o(!s),sx:{borderBottom:0},children:s?(0,a.jsx)(r.FUY,{}):(0,a.jsx)(r.QpL,{})})]}),(0,a.jsx)(r.Hjg,{children:(0,a.jsx)(r.nA6,{style:{paddingBottom:0,paddingTop:0},colSpan:5,children:s&&(0,a.jsx)(r.azJ,{useBackground:!0,sx:{padding:10,marginBottom:10},children:n.message})})})]})},l=e=>{let{events:n,loading:s}=e;return s?(0,a.jsx)(r.z21,{}):(0,a.jsx)(r.azJ,{withBorders:!0,customBorderPadding:"0px",children:(0,a.jsxs)(r.XIK,{"aria-label":"collapsible table",children:[(0,a.jsx)(r.ndF,{children:(0,a.jsxs)(r.Hjg,{children:[(0,a.jsx)(r.nA6,{children:"Type"}),(0,a.jsx)(r.nA6,{children:"Reason"}),(0,a.jsx)(r.nA6,{children:"Age"}),(0,a.jsx)(r.nA6,{children:"Message"}),(0,a.jsx)(r.nA6,{})]})}),(0,a.jsx)(r.BFY,{children:n.map(e=>(0,a.jsx)(o,{event:e},`${e.event_type}-${e.seen}`))})]})})}}}]);
+//# sourceMappingURL=112.ab8bc91d.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/112.ab8bc91d.chunk.js.map b/web-app/build/static/js/112.ab8bc91d.chunk.js.map
new file mode 100644
index 00000000000..8eba28e4110
--- /dev/null
+++ b/web-app/build/static/js/112.ab8bc91d.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/112.ab8bc91d.chunk.js","mappings":"6OA4BA,MAsDA,EAtDqBA,KACnB,MAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAASC,EAAAA,EAAAA,KAETC,GAAgBC,EAAAA,EAAAA,IACnBC,GAAoBA,EAAMC,QAAQH,gBAG9BI,EAAQC,IAAaC,EAAAA,EAAAA,UAAmB,KACxCC,EAASC,IAAcF,EAAAA,EAAAA,WAAkB,GAC1CG,EAAaX,EAAOW,YAAc,GAClCC,EAAkBZ,EAAOY,iBAAmB,GA+BlD,OA7BAC,EAAAA,EAAAA,WAAU,KACJX,GACFQ,GAAW,IAEZ,CAACR,KAEJW,EAAAA,EAAAA,WAAU,KACJJ,GACFK,EAAAA,EACGC,OACC,MACA,sBAAsBH,aAA2BD,YAElDK,KAAMC,IACL,IAAK,IAAIC,EAAI,EAAGA,EAAID,EAAIE,OAAQD,IAAK,CACnC,IAAIE,EAAeC,KAAKC,MAAQ,IAAQ,EAExCL,EAAIC,GAAGK,MAAOC,EAAAA,EAAAA,KAAUJ,EAAcH,EAAIC,GAAGO,WAAWC,WAC1D,CACAnB,EAAUU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A,EAAMU,cAAcV,EAAMrB,gB","sources":["screens/Console/Tenants/TenantDetails/TenantEvents.tsx","screens/Console/Tenants/TenantDetails/events/EventsList.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { Grid, SectionTitle } from \"mds\";\nimport { useParams } from \"react-router-dom\";\nimport { IEvent } from \"../ListTenants/types\";\nimport { niceDays } from \"../../../../common/utils\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setErrorSnackMessage } from \"../../../../systemSlice\";\nimport api from \"../../../../common/api\";\nimport EventsList from \"./events/EventsList\";\n\nconst TenantEvents = () => {\n const dispatch = useAppDispatch();\n const params = useParams();\n\n const loadingTenant = useSelector(\n (state: AppState) => state.tenants.loadingTenant,\n );\n\n const [events, setEvents] = useState([]);\n const [loading, setLoading] = useState(true);\n const tenantName = params.tenantName || \"\";\n const tenantNamespace = params.tenantNamespace || \"\";\n\n useEffect(() => {\n if (loadingTenant) {\n setLoading(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${tenantNamespace}/tenants/${tenantName}/events`,\n )\n .then((res: IEvent[]) => {\n for (let i = 0; i < res.length; i++) {\n let currentTime = (Date.now() / 1000) | 0;\n\n res[i].seen = niceDays((currentTime - res[i].last_seen).toString());\n }\n setEvents(res);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n }\n }, [loading, tenantNamespace, tenantName, dispatch]);\n\n return (\n \n \n Events\n \n \n \n \n \n );\n};\n\nexport default TenantEvents;\n","// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport {\n ProgressBar,\n Table,\n TableBody,\n TableHeadCell,\n TableCell,\n TableHead,\n TableRow,\n Box,\n ExpandCaret,\n CollapseCaret,\n} from \"mds\";\nimport { IEvent } from \"../../ListTenants/types\";\n\ninterface IEventsListProps {\n events: IEvent[];\n loading: boolean;\n}\n\nconst Event = (props: { event: IEvent }) => {\n const { event } = props;\n const [open, setOpen] = React.useState(false);\n\n return (\n \n \n setOpen(!open)}\n sx={{ borderBottom: 0 }}\n >\n {event.event_type}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.reason}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.seen}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.message.length >= 30\n ? `${event.message.slice(0, 30)}...`\n : event.message}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {open ? : }\n \n \n \n \n {open && (\n \n {event.message}\n \n )}\n \n \n \n );\n};\n\nconst EventsList = ({ events, loading }: IEventsListProps) => {\n if (loading) {\n return ;\n }\n return (\n \n
\n \n );\n};\n\nexport default EventsList;\n"],"names":["TenantEvents","dispatch","useAppDispatch","params","useParams","loadingTenant","useSelector","state","tenants","events","setEvents","useState","loading","setLoading","tenantName","tenantNamespace","useEffect","api","invoke","then","res","i","length","currentTime","Date","now","seen","niceDays","last_seen","toString","catch","err","setErrorSnackMessage","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","Grid","item","xs","EventsList","Event","props","event","open","setOpen","React","TableRow","cursor","TableHeadCell","scope","onClick","borderBottom","event_type","TableCell","reason","message","slice","CollapseCaret","ExpandCaret","style","paddingBottom","paddingTop","colSpan","Box","useBackground","padding","_ref","ProgressBar","withBorders","customBorderPadding","Table","TableHead","TableBody","map"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/122.16d686be.chunk.js b/web-app/build/static/js/122.16d686be.chunk.js
deleted file mode 100644
index d18a70eee33..00000000000
--- a/web-app/build/static/js/122.16d686be.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[122],{8122:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var n=a(5043),s=a(9456),i=a(3216),l=a(9923),r=a(649),c=a(4159),m=a(2961),d=a(8296),x=a(579);const o=()=>{const e=(0,m.jL)(),t=(0,i.Zp)(),a=(0,s.d4)((e=>e.tenants.currentTenant)),o=(0,s.d4)((e=>e.tenants.currentNamespace)),[u,p]=(0,n.useState)(!1),[h,f]=(0,n.useState)(!1),[j,y]=(0,n.useState)(""),[v,b]=(0,n.useState)("");(0,n.useEffect)((()=>{o&&a&&r.A.invoke("GET",`/api/v1/namespaces/${o}/tenants/${a}/yaml`).then((e=>{f(!1),y(e.yaml)})).catch((t=>{f(!1),e((0,c.Dy)(t))}))}),[a,o,e]),(0,n.useEffect)((()=>{}),[]);const $=""!==j.trim();return(0,x.jsxs)(n.Fragment,{children:[u||h&&(0,x.jsx)(l.xA9,{item:!0,xs:12,children:(0,x.jsx)(l.z21,{})}),!h&&(0,x.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:n=>{n.preventDefault(),n.preventDefault(),u||(p(!0),b(""),r.A.invoke("PUT",`/api/v1/namespaces/${o}/tenants/${a}/yaml`,{yaml:j}).then((()=>{p(!1),e((0,d.X)()),b(""),t(`/namespaces/${o}/tenants/${a}/summary`)})).catch((e=>{p(!1);const t=(null===e||void 0===e?void 0:e.message)||e.errorMessage;b(t)})))},children:(0,x.jsxs)(l.xA9,{container:!0,children:[(0,x.jsx)(l.xA9,{item:!0,xs:12,children:(0,x.jsx)(l._xt,{children:"Tenant Specification"})}),v?(0,x.jsx)(l.xA9,{item:!0,xs:12,children:(0,x.jsx)(l.Wei,{title:"Error",message:v,variant:"error"})}):null,(0,x.jsx)(l.xA9,{item:!0,xs:12,children:(0,x.jsx)(l.BYM,{value:j,mode:"yaml",onChange:e=>{y(e)},editorHeight:"550px"})}),(0,x.jsxs)(l.xA9,{item:!0,xs:12,style:{display:"flex",justifyContent:"flex-end",paddingTop:16},children:[(0,x.jsx)(l.$nd,{id:"cancel-tenant-yaml",type:"button",variant:"regular",disabled:u,onClick:()=>{t(`/namespaces/${o}/tenants/${a}/summary`)},label:"Cancel"}),(0,x.jsx)(l.$nd,{id:"save-tenant-yaml",type:"submit",variant:"callAction",disabled:u||!$,style:{marginLeft:8},label:"Save"})]})]})})]})}}}]);
-//# sourceMappingURL=122.16d686be.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/122.16d686be.chunk.js.map b/web-app/build/static/js/122.16d686be.chunk.js.map
deleted file mode 100644
index 0f330657cd6..00000000000
--- a/web-app/build/static/js/122.16d686be.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/122.16d686be.chunk.js","mappings":"2NAqCA,MAuIA,EAvImBA,KACjB,MAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAEXC,GAASC,EAAAA,EAAAA,KAAaC,GAAoBA,EAAMC,QAAQC,gBACxDC,GAAYJ,EAAAA,EAAAA,KACfC,GAAoBA,EAAMC,QAAQG,oBAG9BC,EAAYC,I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AACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACc,EAAAA,IAAY,CAAAf,SAAC,2BAEff,GACCgB,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACe,EAAAA,IAAkB,CACjBC,MAAO,QACPJ,QAAS5B,EACTiC,QAAS,YAGX,MACJjB,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACkB,EAAAA,IAAU,CACTC,MAAOrC,EACPsC,KAAM,OACNC,SAAWF,IACTpC,EAAcoC,EAAM,EAEtBG,aAAc,aAGlBzB,EAAAA,EAAAA,MAACI,EAAAA,IAAI,CACHC,MAAI,EACJC,GAAI,GACJoB,MAAO,CACLC,QAAS,OACTC,eAAgB,WAChBC,WAAY,IACZ3B,SAAA,EAEFC,EAAAA,EAAAA,KAAC2B,EAAAA,IAAM,CACLC,GAAI,qBACJC,KAAK,SACLZ,QAAQ,UACRa,SAAUrD,EACVsD,QAASA,KACP/D,EACE,eAAeO,aAAqBL,YACrC,EAEH8D,MAAO,YAEThC,EAAAA,EAAAA,KAAC2B,EAAAA,IAAM,CACLC,GAAI,mBACJC,KAAK,SACLZ,QAAQ,aACRa,SAAUrD,IAAekB,EACzB4B,MAAO,CAAEU,WAAY,GACrBD,MAAO,mBAMR,C","sources":["screens/Console/Tenants/TenantDetails/TenantYAML.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n Button,\n CodeEditor,\n Grid,\n InformativeMessage,\n ProgressBar,\n SectionTitle,\n} from \"mds\";\nimport api from \"../../../../common/api\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport { setModalErrorSnackMessage } from \"../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { getTenantAsync } from \"../thunks/tenantDetailsAsync\";\n\ninterface ITenantYAML {\n yaml: string;\n}\n\nconst TenantYAML = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n\n const tenant = useSelector((state: AppState) => state.tenants.currentTenant);\n const namespace = useSelector(\n (state: AppState) => state.tenants.currentNamespace,\n );\n\n const [addLoading, setAddLoading] = useState(false);\n const [loading, setLoading] = useState(false);\n const [tenantYaml, setTenantYaml] = useState(\"\");\n const [errorMessage, setErrorMessage] = useState(\"\");\n\n const updateTenant = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n setErrorMessage(\"\");\n api\n .invoke(\"PUT\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`, {\n yaml: tenantYaml,\n })\n .then(() => {\n setAddLoading(false);\n dispatch(getTenantAsync());\n setErrorMessage(\"\");\n navigate(`/namespaces/${namespace}/tenants/${tenant}/summary`);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddLoading(false);\n const errMessage = err?.message || \"\" || err.errorMessage;\n setErrorMessage(errMessage);\n });\n };\n\n useEffect(() => {\n if (namespace && tenant) {\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`)\n .then((res: ITenantYAML) => {\n setLoading(false);\n setTenantYaml(res.yaml);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }\n }, [tenant, namespace, dispatch]);\n\n useEffect(() => {}, []);\n\n const validSave = tenantYaml.trim() !== \"\";\n\n return (\n \n {addLoading ||\n (loading && (\n \n \n \n ))}\n\n {!loading && (\n \n )}\n \n );\n};\n\nexport default TenantYAML;\n"],"names":["TenantYAML","dispatch","useAppDispatch","navigate","useNavigate","tenant","useSelector","state","tenants","currentTenant","namespace","currentNamespace","addLoading","setAddLoading","useState","loading","setLoading","tenantYaml","setTenantYaml","errorMessage","setErrorMessage","useEffect","api","invoke","then","res","yaml","catch","err","setModalErrorSnackMessage","validSave","trim","_jsxs","Fragment","children","_jsx","Grid","item","xs","ProgressBar","noValidate","autoComplete","onSubmit","e","preventDefault","getTenantAsync","errMessage","message","container","SectionTitle","InformativeMessage","title","variant","CodeEditor","value","mode","onChange","editorHeight","style","display","justifyContent","paddingTop","Button","id","type","disabled","onClick","label","marginLeft"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/122.5b48d73a.chunk.js b/web-app/build/static/js/122.5b48d73a.chunk.js
new file mode 100644
index 00000000000..6a9d3c7a83e
--- /dev/null
+++ b/web-app/build/static/js/122.5b48d73a.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[122],{8122(e,t,a){a.r(t),a.d(t,{default:()=>x});var n=a(5043),s=a(9456),i=a(3216),l=a(9923),r=a(649),c=a(4159),m=a(2961),d=a(8296),o=a(579);const x=()=>{const e=(0,m.jL)(),t=(0,i.Zp)(),a=(0,s.d4)(e=>e.tenants.currentTenant),x=(0,s.d4)(e=>e.tenants.currentNamespace),[u,p]=(0,n.useState)(!1),[h,j]=(0,n.useState)(!1),[y,f]=(0,n.useState)(""),[v,b]=(0,n.useState)("");(0,n.useEffect)(()=>{x&&a&&r.A.invoke("GET",`/api/v1/namespaces/${x}/tenants/${a}/yaml`).then(e=>{j(!1),f(e.yaml)}).catch(t=>{j(!1),e((0,c.Dy)(t))})},[a,x,e]),(0,n.useEffect)(()=>{},[]);const g=""!==y.trim();return(0,o.jsxs)(n.Fragment,{children:[u||h&&(0,o.jsx)(l.xA9,{item:!0,xs:12,children:(0,o.jsx)(l.z21,{})}),!h&&(0,o.jsx)("form",{noValidate:!0,autoComplete:"off",onSubmit:n=>{n.preventDefault(),n.preventDefault(),u||(p(!0),b(""),r.A.invoke("PUT",`/api/v1/namespaces/${x}/tenants/${a}/yaml`,{yaml:y}).then(()=>{p(!1),e((0,d.X)()),b(""),t(`/namespaces/${x}/tenants/${a}/summary`)}).catch(e=>{p(!1);const t=(null===e||void 0===e?void 0:e.message)||e.errorMessage;b(t)}))},children:(0,o.jsxs)(l.xA9,{container:!0,children:[(0,o.jsx)(l.xA9,{item:!0,xs:12,children:(0,o.jsx)(l._xt,{children:"Tenant Specification"})}),v?(0,o.jsx)(l.xA9,{item:!0,xs:12,children:(0,o.jsx)(l.Wei,{title:"Error",message:v,variant:"error"})}):null,(0,o.jsx)(l.xA9,{item:!0,xs:12,children:(0,o.jsx)(l.BYM,{value:y,mode:"yaml",onChange:e=>{f(e)},editorHeight:"550px"})}),(0,o.jsxs)(l.xA9,{item:!0,xs:12,style:{display:"flex",justifyContent:"flex-end",paddingTop:16},children:[(0,o.jsx)(l.$nd,{id:"cancel-tenant-yaml",type:"button",variant:"regular",disabled:u,onClick:()=>{t(`/namespaces/${x}/tenants/${a}/summary`)},label:"Cancel"}),(0,o.jsx)(l.$nd,{id:"save-tenant-yaml",type:"submit",variant:"callAction",disabled:u||!g,style:{marginLeft:8},label:"Save"})]})]})})]})}}}]);
+//# sourceMappingURL=122.5b48d73a.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/122.5b48d73a.chunk.js.map b/web-app/build/static/js/122.5b48d73a.chunk.js.map
new file mode 100644
index 00000000000..2a14552d3cb
--- /dev/null
+++ b/web-app/build/static/js/122.5b48d73a.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/122.5b48d73a.chun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c,GACd,MAAMiC,GAAgB,OAAHlB,QAAG,IAAHA,OAAG,EAAHA,EAAKmB,UAAiBnB,EAAIT,aAC7CC,EAAgB0B,OAuCZZ,UAEFF,EAAAA,EAAAA,MAACI,EAAAA,IAAI,CAACY,WAAS,EAAAd,SAAA,EACbC,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACc,EAAAA,IAAY,CAAAf,SAAC,2BAEff,GACCgB,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACe,EAAAA,IAAkB,CACjBC,MAAO,QACPJ,QAAS5B,EACTiC,QAAS,YAGX,MACJjB,EAAAA,EAAAA,KAACC,EAAAA,IAAI,CAACC,MAAI,EAACC,GAAI,GAAGJ,UAChBC,EAAAA,EAAAA,KAACkB,EAAAA,IAAU,CACTC,MAAOrC,EACPsC,KAAM,OACNC,SAAWF,IACTpC,EAAcoC,IAEhBG,aAAc,aAGlBzB,EAAAA,EAAAA,MAACI,EAAAA,IAAI,CACHC,MAAI,EACJC,GAAI,GACJoB,MAAO,CACLC,QAAS,OACTC,eAAgB,WAChBC,WAAY,IACZ3B,SAAA,EAEFC,EAAAA,EAAAA,KAAC2B,EAAAA,IAAM,CACLC,GAAI,qBACJC,KAAK,SACLZ,QAAQ,UACRa,SAAUrD,EACVsD,QAASA,KACP/D,EACE,eAAeO,aAAqBL,cAGxC8D,MAAO,YAEThC,EAAAA,EAAAA,KAAC2B,EAAAA,IAAM,CACLC,GAAI,mBACJC,KAAK,SACLZ,QAAQ,aACRa,SAAUrD,IAAekB,EACzB4B,MAAO,CAAEU,WAAY,GACrBD,MAAO,oB","sources":["screens/Console/Tenants/TenantDetails/TenantYAML.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { useNavigate } from \"react-router-dom\";\nimport {\n Button,\n CodeEditor,\n Grid,\n InformativeMessage,\n ProgressBar,\n SectionTitle,\n} from \"mds\";\nimport api from \"../../../../common/api\";\nimport { ErrorResponseHandler } from \"../../../../common/types\";\nimport { setModalErrorSnackMessage } from \"../../../../systemSlice\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { getTenantAsync } from \"../thunks/tenantDetailsAsync\";\n\ninterface ITenantYAML {\n yaml: string;\n}\n\nconst TenantYAML = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n\n const tenant = useSelector((state: AppState) => state.tenants.currentTenant);\n const namespace = useSelector(\n (state: AppState) => state.tenants.currentNamespace,\n );\n\n const [addLoading, setAddLoading] = useState(false);\n const [loading, setLoading] = useState(false);\n const [tenantYaml, setTenantYaml] = useState(\"\");\n const [errorMessage, setErrorMessage] = useState(\"\");\n\n const updateTenant = (event: React.FormEvent) => {\n event.preventDefault();\n if (addLoading) {\n return;\n }\n setAddLoading(true);\n setErrorMessage(\"\");\n api\n .invoke(\"PUT\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`, {\n yaml: tenantYaml,\n })\n .then(() => {\n setAddLoading(false);\n dispatch(getTenantAsync());\n setErrorMessage(\"\");\n navigate(`/namespaces/${namespace}/tenants/${tenant}/summary`);\n })\n .catch((err: ErrorResponseHandler) => {\n setAddLoading(false);\n const errMessage = err?.message || \"\" || err.errorMessage;\n setErrorMessage(errMessage);\n });\n };\n\n useEffect(() => {\n if (namespace && tenant) {\n api\n .invoke(\"GET\", `/api/v1/namespaces/${namespace}/tenants/${tenant}/yaml`)\n .then((res: ITenantYAML) => {\n setLoading(false);\n setTenantYaml(res.yaml);\n })\n .catch((err: ErrorResponseHandler) => {\n setLoading(false);\n dispatch(setModalErrorSnackMessage(err));\n });\n }\n }, [tenant, namespace, dispatch]);\n\n useEffect(() => {}, []);\n\n const validSave = tenantYaml.trim() !== \"\";\n\n return (\n \n {addLoading ||\n (loading && (\n \n \n \n ))}\n\n {!loading && (\n \n )}\n \n );\n};\n\nexport default TenantYAML;\n"],"names":["TenantYAML","dispatch","useAppDispatch","navigate","useNavigate","tenant","useSelector","state","tenants","currentTenant","namespace","currentNamespace","addLoading","setAddLoading","useState","loading","setLoading","tenantYaml","setTenantYaml","errorMessage","setErrorMessage","useEffect","api","invoke","then","res","yaml","catch","err","setModalErrorSnackMessage","validSave","trim","_jsxs","Fragment","children","_jsx","Grid","item","xs","ProgressBar","noValidate","autoComplete","onSubmit","e","preventDefault","getTenantAsync","errMessage","message","container","SectionTitle","InformativeMessage","title","variant","CodeEditor","value","mode","onChange","editorHeight","style","display","justifyContent","paddingTop","Button","id","type","disabled","onClick","label","marginLeft"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/187.d34961a6.chunk.js b/web-app/build/static/js/187.d34961a6.chunk.js
deleted file mode 100644
index 9b962538fe9..00000000000
--- a/web-app/build/static/js/187.d34961a6.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[187],{3461:(e,t,n)=>{n.d(t,{A:()=>l});var r=n(5043);var o=function(){function e(e,t){for(var n=0;n0&&void 0!==arguments[0]&&arguments[0];this._memoizedUnloadedRanges=[],e&&this._ensureRowsLoaded(this._lastRenderedStartIndex,this._lastRenderedStopIndex)}},{key:"componentDidMount",value:function(){0}},{key:"render",value:function(){return(0,this.props.children)({onItemsRendered:this._onItemsRendered,ref:this._setRef})}},{key:"_ensureRowsLoaded",value:function(e,t){var n=this.props,r=n.isItemLoaded,o=n.itemCount,i=n.minimumBatchSize,l=void 0===i?10:i,s=n.threshold,a=void 0===s?15:s,c=function(e){for(var t=e.isItemLoaded,n=e.itemCount,r=e.minimumBatchSize,o=e.startIndex,i=e.stopIndex,l=[],s=null,a=null,c=o;c<=i;c++)t(c)?null!==a&&(l.push(s,a),s=a=null):(a=c,null===s&&(s=c));if(null!==a){for(var u=Math.min(Math.max(a,s+r-1),n-1),d=a+1;d<=u&&!t(d);d++)a=d;l.push(s,a)}if(l.length)for(;l[1]-l[0]+10;){var f=l[0]-1;if(t(f))break;l[0]=f}return l}({isItemLoaded:r,itemCount:o,minimumBatchSize:l,startIndex:Math.max(0,e-a),stopIndex:Math.min(o-1,t+a)});(this._memoizedUnloadedRanges.length!==c.length||this._memoizedUnloadedRanges.some((function(e,t){return c[t]!==e})))&&(this._memoizedUnloadedRanges=c,this._loadUnloadedRanges(c))}},{key:"_loadUnloadedRanges",value:function(e){for(var t=this,n=this.props.loadMoreItems||this.props.loadMoreRows,r=function(r){var o=e[r],i=e[r+1],l=n(o,i);null!=l&&l.then((function(){if(function(e){var t=e.lastRenderedStartIndex,n=e.lastRenderedStopIndex,r=e.startIndex,o=e.stopIndex;return!(r>n||o{n.d(t,{Y1:()=>I});var r=n(8168),o=n(1798),i=n(7387),l=Number.isNaN||function(e){return"number"===typeof e&&e!==e};function s(e,t){if(e.length!==t.length)return!1;for(var n=0;n=t?e.call(null):r.id=requestAnimationFrame(o)}))};return r}var h=-1;function p(e){if(void 0===e&&(e=!1),-1===h||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",document.body.appendChild(t),h=t.offsetWidth-t.clientWidth,document.body.removeChild(t)}return h}var m=null;function v(e){if(void 0===e&&(e=!1),null===m||e){var t=document.createElement("div"),n=t.style;n.width="50px",n.height="50px",n.overflow="scroll",n.direction="rtl";var r=document.createElement("div"),o=r.style;return o.width="100px",o.height="100px",t.appendChild(r),document.body.appendChild(t),t.scrollLeft>0?m="positive-descending":(t.scrollLeft=1,m=0===t.scrollLeft?"negative":"positive-ascending"),document.body.removeChild(t),m}return m}var g=function(e,t){return e};function S(e){var t,n=e.getItemOffset,l=e.getEstimatedTotalSize,s=e.getItemSize,u=e.getOffsetForIndexAndAlignment,h=e.getStartIndexForOffset,m=e.getStopIndexForStartIndex,S=e.initInstanceProps,I=e.shouldResetStyleCacheOnItemSizeChange,y=e.validateProps;return t=function(e){function t(t){var r;return(r=e.call(this,t)||this)._instanceProps=S(r.props,(0,o.A)(r)),r._outerRef=void 0,r._resetIsScrollingTimeoutId=null,r.state={instance:(0,o.A)(r),isScrolling:!1,scrollDirection:"forward",scrollOffset:"number"===typeof r.props.initialScrollOffset?r.props.initialScrollOffset:0,scrollUpdateWasRequested:!1},r._callOnItemsRendered=void 0,r._callOnItemsRendered=a((function(e,t,n,o){return r.props.onItemsRendered({overscanStartIndex:e,overscanStopIndex:t,visibleStartIndex:n,visibleStopIndex:o})})),r._callOnScroll=void 0,r._callOnScroll=a((function(e,t,n){return r.props.onScroll({scrollDirection:e,scrollOffset:t,scrollUpdateWasRequested:n})})),r._getItemStyle=void 0,r._getItemStyle=function(e){var t,o=r.props,i=o.direction,l=o.itemSize,a=o.layout,c=r._getItemStyleCache(I&&l,I&&a,I&&i);if(c.hasOwnProperty(e))t=c[e];else{var u=n(r.props,e,r._instanceProps),d=s(r.props,e,r._instanceProps),f="horizontal"===i||"horizontal"===a,h="rtl"===i,p=f?u:0;c[e]=t={position:"absolute",left:h?void 0:p,right:h?p:void 0,top:f?0:u,height:f?"100%":d,width:f?d:"100%"}}return t},r._getItemStyleCache=void 0,r._getItemStyleCache=a((function(e,t,n){return{}})),r._onScrollHorizontal=function(e){var t=e.currentTarget,n=t.clientWidth,o=t.scrollLeft,i=t.scrollWidth;r.setState((function(e){if(e.scrollOffset===o)return null;var t=r.props.direction,l=o;if("rtl"===t)switch(v()){case"negative":l=-o;break;case"positive-descending":l=i-n-o}return l=Math.max(0,Math.min(l,i-n)),{isScrolling:!0,scrollDirection:e.scrollOffsets.clientWidth?p():0:s.scrollHeight>s.clientHeight?p():0}this.scrollTo(u(this.props,e,t,i,this._instanceProps,l))},R.componentDidMount=function(){var e=this.props,t=e.direction,n=e.initialScrollOffset,r=e.layout;if("number"===typeof n&&null!=this._outerRef){var o=this._outerRef;"horizontal"===t||"horizontal"===r?o.scrollLeft=n:o.scrollTop=n}this._callPropsCallbacks()},R.componentDidUpdate=function(){var e=this.props,t=e.direction,n=e.layout,r=this.state,o=r.scrollOffset;if(r.scrollUpdateWasRequested&&null!=this._outerRef){var i=this._outerRef;if("horizontal"===t||"horizontal"===n)if("rtl"===t)switch(v()){case"negative":i.scrollLeft=-o;break;case"positive-ascending":i.scrollLeft=o;break;default:var l=i.clientWidth,s=i.scrollWidth;i.scrollLeft=s-l-o}else i.scrollLeft=o;else i.scrollTop=o}this._callPropsCallbacks()},R.componentWillUnmount=function(){null!==this._resetIsScrollingTimeoutId&&d(this._resetIsScrollingTimeoutId)},R.render=function(){var e=this.props,t=e.children,n=e.className,o=e.direction,i=e.height,s=e.innerRef,a=e.innerElementType,u=e.innerTagName,d=e.itemCount,f=e.itemData,h=e.itemKey,p=void 0===h?g:h,m=e.layout,v=e.outerElementType,S=e.outerTagName,_=e.style,I=e.useIsScrolling,y=e.width,R=this.state.isScrolling,x="horizontal"===o||"horizontal"===m,b=x?this._onScrollHorizontal:this._onScrollVertical,w=this._getRangeToRender(),O=w[0],C=w[1],z=[];if(d>0)for(var M=O;M<=C;M++)z.push((0,c.createElement)(t,{data:f,key:p(M,f),index:M,isScrolling:I?R:void 0,style:this._getItemStyle(M)}));var T=l(this.props,this._instanceProps);return(0,c.createElement)(v||S||"div",{className:n,onScroll:b,ref:this._outerRefSetter,style:(0,r.A)({position:"relative",height:i,width:y,overflow:"auto",WebkitOverflowScrolling:"touch",willChange:"transform",direction:o},_)},(0,c.createElement)(a||u||"div",{children:z,ref:s,style:{height:x?"100%":T,pointerEvents:R?"none":void 0,width:x?T:"100%"}}))},R._callPropsCallbacks=function(){if("function"===typeof this.props.onItemsRendered&&this.props.itemCount>0){var e=this._getRangeToRender(),t=e[0],n=e[1],r=e[2],o=e[3];this._callOnItemsRendered(t,n,r,o)}if("function"===typeof this.props.onScroll){var i=this.state,l=i.scrollDirection,s=i.scrollOffset,a=i.scrollUpdateWasRequested;this._callOnScroll(l,s,a)}},R._getRangeToRender=function(){var e=this.props,t=e.itemCount,n=e.overscanCount,r=this.state,o=r.isScrolling,i=r.scrollDirection,l=r.scrollOffset;if(0===t)return[0,0,0,0];var s=h(this.props,l,this._instanceProps),a=m(this.props,s,l,this._instanceProps),c=o&&"backward"!==i?1:Math.max(1,n),u=o&&"forward"!==i?1:Math.max(1,n);return[Math.max(0,s-c),Math.max(0,Math.min(t-1,a+u)),s,a]},t}(c.PureComponent),t.defaultProps={direction:"ltr",itemData:void 0,layout:"vertical",overscanCount:2,useIsScrolling:!1},t}var _=function(e,t){e.children,e.direction,e.height,e.layout,e.innerTagName,e.outerTagName,e.width,t.instance},I=S({getItemOffset:function(e,t){return t*e.itemSize},getItemSize:function(e,t){return e.itemSize},getEstimatedTotalSize:function(e){var t=e.itemCount;return e.itemSize*t},getOffsetForIndexAndAlignment:function(e,t,n,r,o,i){var l=e.direction,s=e.height,a=e.itemCount,c=e.itemSize,u=e.layout,d=e.width,f="horizontal"===l||"horizontal"===u?d:s,h=Math.max(0,a*c-f),p=Math.min(h,t*c),m=Math.max(0,t*c-f+c+i);switch("smart"===n&&(n=r>=m-f&&r<=p+f?"auto":"center"),n){case"start":return p;case"end":return m;case"center":var v=Math.round(m+(p-m)/2);return vh+Math.floor(f/2)?h:v;default:return r>=m&&r<=p?r:r lastRenderedStopIndex || stopIndex < lastRenderedStartIndex);\n}\n\nfunction scanForUnloadedRanges(_ref) {\n var isItemLoaded = _ref.isItemLoaded,\n itemCount = _ref.itemCount,\n minimumBatchSize = _ref.minimumBatchSize,\n startIndex = _ref.startIndex,\n stopIndex = _ref.stopIndex;\n\n var unloadedRanges = [];\n\n var rangeStartIndex = null;\n var rangeStopIndex = null;\n\n for (var _index = startIndex; _index <= stopIndex; _index++) {\n var loaded = isItemLoaded(_index);\n\n if (!loaded) {\n rangeStopIndex = _index;\n if (rangeStartIndex === null) {\n rangeStartIndex = _index;\n }\n } else if (rangeStopIndex !== null) {\n unloadedRanges.push(rangeStartIndex, rangeStopIndex);\n\n rangeStartIndex = rangeStopIndex = null;\n }\n }\n\n // If :rangeStopIndex is not null it means we haven't ran out of unloaded rows.\n // Scan forward to try filling our :minimumBatchSize.\n if (rangeStopIndex !== null) {\n var potentialStopIndex = Math.min(Math.max(rangeStopIndex, rangeStartIndex + minimumBatchSize - 1), itemCount - 1);\n\n for (var _index2 = rangeStopIndex + 1; _index2 <= potentialStopIndex; _index2++) {\n if (!isItemLoaded(_index2)) {\n rangeStopIndex = _index2;\n } else {\n break;\n }\n }\n\n unloadedRanges.push(rangeStartIndex, rangeStopIndex);\n }\n\n // Check to see if our first range ended prematurely.\n // In this case we should scan backwards to try filling our :minimumBatchSize.\n if (unloadedRanges.length) {\n while (unloadedRanges[1] - unloadedRanges[0] + 1 < minimumBatchSize && unloadedRanges[0] > 0) {\n var _index3 = unloadedRanges[0] - 1;\n\n if (!isItemLoaded(_index3)) {\n unloadedRanges[0] = _index3;\n } else {\n break;\n }\n }\n }\n\n return unloadedRanges;\n}\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\nvar InfiniteLoader = function (_PureComponent) {\n inherits(InfiniteLoader, _PureComponent);\n\n function InfiniteLoader() {\n var _ref;\n\n var _temp, _this, _ret;\n\n classCallCheck(this, InfiniteLoader);\n\n for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return _ret = (_temp = (_this = possibleConstructorReturn(this, (_ref = InfiniteLoader.__proto__ || Object.getPrototypeOf(InfiniteLoader)).call.apply(_ref, [this].concat(args))), _this), _this._lastRenderedStartIndex = -1, _this._lastRenderedStopIndex = -1, _this._memoizedUnloadedRanges = [], _this._onItemsRendered = function (_ref2) {\n var visibleStartIndex = _ref2.visibleStartIndex,\n visibleStopIndex = _ref2.visibleStopIndex;\n\n if (process.env.NODE_ENV !== 'production') {\n if (!isInteger(visibleStartIndex) || !isInteger(visibleStopIndex)) {\n console.warn('Invalid onItemsRendered signature; please refer to InfiniteLoader documentation.');\n }\n\n if (typeof _this.props.loadMoreRows === 'function') {\n console.warn('InfiniteLoader \"loadMoreRows\" prop has been renamed to \"loadMoreItems\".');\n }\n }\n\n _this._lastRenderedStartIndex = visibleStartIndex;\n _this._lastRenderedStopIndex = visibleStopIndex;\n\n _this._ensureRowsLoaded(visibleStartIndex, visibleStopIndex);\n }, _this._setRef = function (listRef) {\n _this._listRef = listRef;\n }, _temp), possibleConstructorReturn(_this, _ret);\n }\n\n createClass(InfiniteLoader, [{\n key: 'resetloadMoreItemsCache',\n value: function resetloadMoreItemsCache() {\n var autoReload = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;\n\n this._memoizedUnloadedRanges = [];\n\n if (autoReload) {\n this._ensureRowsLoaded(this._lastRenderedStartIndex, this._lastRenderedStopIndex);\n }\n }\n }, {\n key: 'componentDidMount',\n value: function componentDidMount() {\n if (process.env.NODE_ENV !== 'production') {\n if (this._listRef == null) {\n console.warn('Invalid list ref; please refer to InfiniteLoader documentation.');\n }\n }\n }\n }, {\n key: 'render',\n value: function render() {\n var children = this.props.children;\n\n\n return children({\n onItemsRendered: this._onItemsRendered,\n ref: this._setRef\n });\n }\n }, {\n key: '_ensureRowsLoaded',\n value: function _ensureRowsLoaded(startIndex, stopIndex) {\n var _props = this.props,\n isItemLoaded = _props.isItemLoaded,\n itemCount = _props.itemCount,\n _props$minimumBatchSi = _props.minimumBatchSize,\n minimumBatchSize = _props$minimumBatchSi === undefined ? 10 : _props$minimumBatchSi,\n _props$threshold = _props.threshold,\n threshold = _props$threshold === undefined ? 15 : _props$threshold;\n\n\n var unloadedRanges = scanForUnloadedRanges({\n isItemLoaded: isItemLoaded,\n itemCount: itemCount,\n minimumBatchSize: minimumBatchSize,\n startIndex: Math.max(0, startIndex - threshold),\n stopIndex: Math.min(itemCount - 1, stopIndex + threshold)\n });\n\n // Avoid calling load-rows unless range has changed.\n // This shouldn't be strictly necessary, but is maybe nice to do.\n if (this._memoizedUnloadedRanges.length !== unloadedRanges.length || this._memoizedUnloadedRanges.some(function (startOrStop, index) {\n return unloadedRanges[index] !== startOrStop;\n })) {\n this._memoizedUnloadedRanges = unloadedRanges;\n this._loadUnloadedRanges(unloadedRanges);\n }\n }\n }, {\n key: '_loadUnloadedRanges',\n value: function _loadUnloadedRanges(unloadedRanges) {\n var _this2 = this;\n\n // loadMoreRows was renamed to loadMoreItems in v1.0.3; will be removed in v2.0\n var loadMoreItems = this.props.loadMoreItems || this.props.loadMoreRows;\n\n var _loop = function _loop(i) {\n var startIndex = unloadedRanges[i];\n var stopIndex = unloadedRanges[i + 1];\n var promise = loadMoreItems(startIndex, stopIndex);\n if (promise != null) {\n promise.then(function () {\n // Refresh the visible rows if any of them have just been loaded.\n // Otherwise they will remain in their unloaded visual state.\n if (isRangeVisible({\n lastRenderedStartIndex: _this2._lastRenderedStartIndex,\n lastRenderedStopIndex: _this2._lastRenderedStopIndex,\n startIndex: startIndex,\n stopIndex: stopIndex\n })) {\n // Handle an unmount while promises are still in flight.\n if (_this2._listRef == null) {\n return;\n }\n\n // Resize cached row sizes for VariableSizeList,\n // otherwise just re-render the list.\n if (typeof _this2._listRef.resetAfterIndex === 'function') {\n _this2._listRef.resetAfterIndex(startIndex, true);\n } else {\n // HACK reset temporarily cached item styles to force PureComponent to re-render.\n // This is pretty gross, but I'm okay with it for now.\n // Don't judge me.\n if (typeof _this2._listRef._getItemStyleCache === 'function') {\n _this2._listRef._getItemStyleCache(-1);\n }\n _this2._listRef.forceUpdate();\n }\n }\n });\n }\n };\n\n for (var i = 0; i < unloadedRanges.length; i += 2) {\n _loop(i);\n }\n }\n }]);\n return InfiniteLoader;\n}(PureComponent);\n\nexport default InfiniteLoader;\n","var safeIsNaN = Number.isNaN ||\n function ponyfill(value) {\n return typeof value === 'number' && value !== value;\n };\nfunction isEqual(first, second) {\n if (first === second) {\n return true;\n }\n if (safeIsNaN(first) && safeIsNaN(second)) {\n return true;\n }\n return false;\n}\nfunction areInputsEqual(newInputs, lastInputs) {\n if (newInputs.length !== lastInputs.length) {\n return false;\n }\n for (var i = 0; i < newInputs.length; i++) {\n if (!isEqual(newInputs[i], lastInputs[i])) {\n return false;\n }\n }\n return true;\n}\n\nfunction memoizeOne(resultFn, isEqual) {\n if (isEqual === void 0) { isEqual = areInputsEqual; }\n var lastThis;\n var lastArgs = [];\n var lastResult;\n var calledOnce = false;\n function memoized() {\n var newArgs = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n newArgs[_i] = arguments[_i];\n }\n if (calledOnce && lastThis === this && isEqual(newArgs, lastArgs)) {\n return lastResult;\n }\n lastResult = resultFn.apply(this, newArgs);\n calledOnce = true;\n lastThis = this;\n lastArgs = newArgs;\n return lastResult;\n }\n return memoized;\n}\n\nexport default memoizeOne;\n","// @flow\n\n// Animation frame based implementation of setTimeout.\n// Inspired by Joe Lambert, https://gist.github.com/joelambert/1002116#file-requesttimeout-js\n\nconst hasNativePerformanceNow =\n typeof performance === 'object' && typeof performance.now === 'function';\n\nconst now = hasNativePerformanceNow\n ? () => performance.now()\n : () => Date.now();\n\nexport type TimeoutID = {|\n id: AnimationFrameID,\n|};\n\nexport function cancelTimeout(timeoutID: TimeoutID) {\n cancelAnimationFrame(timeoutID.id);\n}\n\nexport function requestTimeout(callback: Function, delay: number): TimeoutID {\n const start = now();\n\n function tick() {\n if (now() - start >= delay) {\n callback.call(null);\n } else {\n timeoutID.id = requestAnimationFrame(tick);\n }\n }\n\n const timeoutID: TimeoutID = {\n id: requestAnimationFrame(tick),\n };\n\n return timeoutID;\n}\n","// @flow\n\nlet size: number = -1;\n\n// This utility copied from \"dom-helpers\" package.\nexport function getScrollbarSize(recalculate?: boolean = false): number {\n if (size === -1 || recalculate) {\n const div = document.createElement('div');\n const style = div.style;\n style.width = '50px';\n style.height = '50px';\n style.overflow = 'scroll';\n\n ((document.body: any): HTMLBodyElement).appendChild(div);\n\n size = div.offsetWidth - div.clientWidth;\n\n ((document.body: any): HTMLBodyElement).removeChild(div);\n }\n\n return size;\n}\n\nexport type RTLOffsetType =\n | 'negative'\n | 'positive-descending'\n | 'positive-ascending';\n\nlet cachedRTLResult: RTLOffsetType | null = null;\n\n// TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n// Chrome does not seem to adhere; its scrollLeft values are positive (measured relative to the left).\n// Safari's elastic bounce makes detecting this even more complicated wrt potential false positives.\n// The safest way to check this is to intentionally set a negative offset,\n// and then verify that the subsequent \"scroll\" event matches the negative offset.\n// If it does not match, then we can assume a non-standard RTL scroll implementation.\nexport function getRTLOffsetType(recalculate?: boolean = false): RTLOffsetType {\n if (cachedRTLResult === null || recalculate) {\n const outerDiv = document.createElement('div');\n const outerStyle = outerDiv.style;\n outerStyle.width = '50px';\n outerStyle.height = '50px';\n outerStyle.overflow = 'scroll';\n outerStyle.direction = 'rtl';\n\n const innerDiv = document.createElement('div');\n const innerStyle = innerDiv.style;\n innerStyle.width = '100px';\n innerStyle.height = '100px';\n\n outerDiv.appendChild(innerDiv);\n\n ((document.body: any): HTMLBodyElement).appendChild(outerDiv);\n\n if (outerDiv.scrollLeft > 0) {\n cachedRTLResult = 'positive-descending';\n } else {\n outerDiv.scrollLeft = 1;\n if (outerDiv.scrollLeft === 0) {\n cachedRTLResult = 'negative';\n } else {\n cachedRTLResult = 'positive-ascending';\n }\n }\n\n ((document.body: any): HTMLBodyElement).removeChild(outerDiv);\n\n return cachedRTLResult;\n }\n\n return cachedRTLResult;\n}\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\ntype Direction = 'ltr' | 'rtl';\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n\ntype RenderComponentProps = {|\n columnIndex: number,\n data: T,\n isScrolling?: boolean,\n rowIndex: number,\n style: Object,\n|};\nexport type RenderComponent = React$ComponentType<\n $Shape>\n>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype OnItemsRenderedCallback = ({\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number,\n}) => void;\ntype OnScrollCallback = ({\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent;\ntype ItemStyleCache = { [key: string]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props = {|\n children: RenderComponent,\n className?: string,\n columnCount: number,\n columnWidth: itemSize,\n direction: Direction,\n height: number,\n initialScrollLeft?: number,\n initialScrollTop?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent,\n innerTagName?: string, // deprecated\n itemData: T,\n itemKey?: (params: {|\n columnIndex: number,\n data: T,\n rowIndex: number,\n |}) => any,\n onItemsRendered?: OnItemsRenderedCallback,\n onScroll?: OnScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent,\n outerTagName?: string, // deprecated\n overscanColumnCount?: number,\n overscanColumnsCount?: number, // deprecated\n overscanCount?: number, // deprecated\n overscanRowCount?: number,\n overscanRowsCount?: number, // deprecated\n rowCount: number,\n rowHeight: itemSize,\n style?: Object,\n useIsScrolling: boolean,\n width: number,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n horizontalScrollDirection: ScrollDirection,\n scrollLeft: number,\n scrollTop: number,\n scrollUpdateWasRequested: boolean,\n verticalScrollDirection: ScrollDirection,\n|};\n\ntype getItemOffset = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype getItemSize = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype getEstimatedTotalSize = (props: Props, instanceProps: any) => number;\ntype GetOffsetForItemAndAlignment = (\n props: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any,\n scrollbarSize: number\n) => number;\ntype GetStartIndexForOffset = (\n props: Props,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props, instance: any) => any;\ntype ValidateProps = (props: Props) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = ({ columnIndex, data, rowIndex }) =>\n `${rowIndex}:${columnIndex}`;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsOverscanCount = null;\nlet devWarningsOverscanRowsColumnsCount = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsOverscanCount = new WeakSet();\n devWarningsOverscanRowsColumnsCount = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createGridComponent({\n getColumnOffset,\n getColumnStartIndexForOffset,\n getColumnStopIndexForStartIndex,\n getColumnWidth,\n getEstimatedTotalHeight,\n getEstimatedTotalWidth,\n getOffsetForColumnAndAlignment,\n getOffsetForRowAndAlignment,\n getRowHeight,\n getRowOffset,\n getRowStartIndexForOffset,\n getRowStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getColumnOffset: getItemOffset,\n getColumnStartIndexForOffset: GetStartIndexForOffset,\n getColumnStopIndexForStartIndex: GetStopIndexForStartIndex,\n getColumnWidth: getItemSize,\n getEstimatedTotalHeight: getEstimatedTotalSize,\n getEstimatedTotalWidth: getEstimatedTotalSize,\n getOffsetForColumnAndAlignment: GetOffsetForItemAndAlignment,\n getOffsetForRowAndAlignment: GetOffsetForItemAndAlignment,\n getRowOffset: getItemOffset,\n getRowHeight: getItemSize,\n getRowStartIndexForOffset: GetStartIndexForOffset,\n getRowStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class Grid extends PureComponent, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n _outerRef: ?HTMLDivElement;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n horizontalScrollDirection: 'forward',\n scrollLeft:\n typeof this.props.initialScrollLeft === 'number'\n ? this.props.initialScrollLeft\n : 0,\n scrollTop:\n typeof this.props.initialScrollTop === 'number'\n ? this.props.initialScrollTop\n : 0,\n scrollUpdateWasRequested: false,\n verticalScrollDirection: 'forward',\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props,\n prevState: State\n ): $Shape | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo({\n scrollLeft,\n scrollTop,\n }: {\n scrollLeft: number,\n scrollTop: number,\n }): void {\n if (scrollLeft !== undefined) {\n scrollLeft = Math.max(0, scrollLeft);\n }\n if (scrollTop !== undefined) {\n scrollTop = Math.max(0, scrollTop);\n }\n\n this.setState(prevState => {\n if (scrollLeft === undefined) {\n scrollLeft = prevState.scrollLeft;\n }\n if (scrollTop === undefined) {\n scrollTop = prevState.scrollTop;\n }\n\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n return null;\n }\n\n return {\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: scrollLeft,\n scrollTop: scrollTop,\n scrollUpdateWasRequested: true,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem({\n align = 'auto',\n columnIndex,\n rowIndex,\n }: {\n align: ScrollToAlign,\n columnIndex?: number,\n rowIndex?: number,\n }): void {\n const { columnCount, height, rowCount, width } = this.props;\n const { scrollLeft, scrollTop } = this.state;\n const scrollbarSize = getScrollbarSize();\n\n if (columnIndex !== undefined) {\n columnIndex = Math.max(0, Math.min(columnIndex, columnCount - 1));\n }\n if (rowIndex !== undefined) {\n rowIndex = Math.max(0, Math.min(rowIndex, rowCount - 1));\n }\n\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n // The scrollbar size should be considered when scrolling an item into view,\n // to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n const horizontalScrollbarSize =\n estimatedTotalWidth > width ? scrollbarSize : 0;\n const verticalScrollbarSize =\n estimatedTotalHeight > height ? scrollbarSize : 0;\n\n this.scrollTo({\n scrollLeft:\n columnIndex !== undefined\n ? getOffsetForColumnAndAlignment(\n this.props,\n columnIndex,\n align,\n scrollLeft,\n this._instanceProps,\n verticalScrollbarSize\n )\n : scrollLeft,\n scrollTop:\n rowIndex !== undefined\n ? getOffsetForRowAndAlignment(\n this.props,\n rowIndex,\n align,\n scrollTop,\n this._instanceProps,\n horizontalScrollbarSize\n )\n : scrollTop,\n });\n }\n\n componentDidMount() {\n const { initialScrollLeft, initialScrollTop } = this.props;\n\n if (this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (typeof initialScrollLeft === 'number') {\n outerRef.scrollLeft = initialScrollLeft;\n }\n if (typeof initialScrollTop === 'number') {\n outerRef.scrollTop = initialScrollTop;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction } = this.props;\n const { scrollLeft, scrollTop, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollLeft;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollLeft;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n } else {\n outerRef.scrollLeft = Math.max(0, scrollLeft);\n }\n\n outerRef.scrollTop = Math.max(0, scrollTop);\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n columnCount,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemData,\n itemKey = defaultItemKey,\n outerElementType,\n outerTagName,\n rowCount,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n const [\n columnStartIndex,\n columnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [rowStartIndex, rowStopIndex] = this._getVerticalRangeToRender();\n\n const items = [];\n if (columnCount > 0 && rowCount) {\n for (\n let rowIndex = rowStartIndex;\n rowIndex <= rowStopIndex;\n rowIndex++\n ) {\n for (\n let columnIndex = columnStartIndex;\n columnIndex <= columnStopIndex;\n columnIndex++\n ) {\n items.push(\n createElement(children, {\n columnIndex,\n data: itemData,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n key: itemKey({ columnIndex, data: itemData, rowIndex }),\n rowIndex,\n style: this._getItemStyle(rowIndex, columnIndex),\n })\n );\n }\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalHeight = getEstimatedTotalHeight(\n this.props,\n this._instanceProps\n );\n const estimatedTotalWidth = getEstimatedTotalWidth(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll: this._onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: estimatedTotalHeight,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: estimatedTotalWidth,\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanColumnStartIndex: number,\n overscanColumnStopIndex: number,\n overscanRowStartIndex: number,\n overscanRowStopIndex: number,\n visibleColumnStartIndex: number,\n visibleColumnStopIndex: number,\n visibleRowStartIndex: number,\n visibleRowStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): OnItemsRenderedCallback)({\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollLeft: number,\n scrollTop: number,\n horizontalScrollDirection: ScrollDirection,\n verticalScrollDirection: ScrollDirection,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): OnScrollCallback)({\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n verticalScrollDirection,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n const { columnCount, onItemsRendered, onScroll, rowCount } = this.props;\n\n if (typeof onItemsRendered === 'function') {\n if (columnCount > 0 && rowCount > 0) {\n const [\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n ] = this._getHorizontalRangeToRender();\n const [\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex,\n ] = this._getVerticalRangeToRender();\n this._callOnItemsRendered(\n overscanColumnStartIndex,\n overscanColumnStopIndex,\n overscanRowStartIndex,\n overscanRowStopIndex,\n visibleColumnStartIndex,\n visibleColumnStopIndex,\n visibleRowStartIndex,\n visibleRowStopIndex\n );\n }\n }\n\n if (typeof onScroll === 'function') {\n const {\n horizontalScrollDirection,\n scrollLeft,\n scrollTop,\n scrollUpdateWasRequested,\n verticalScrollDirection,\n } = this.state;\n this._callOnScroll(\n scrollLeft,\n scrollTop,\n horizontalScrollDirection,\n verticalScrollDirection,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (rowIndex: number, columnIndex: number) => Object;\n _getItemStyle = (rowIndex: number, columnIndex: number): Object => {\n const { columnWidth, direction, rowHeight } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && columnWidth,\n shouldResetStyleCacheOnItemSizeChange && direction,\n shouldResetStyleCacheOnItemSizeChange && rowHeight\n );\n\n const key = `${rowIndex}:${columnIndex}`;\n\n let style;\n if (itemStyleCache.hasOwnProperty(key)) {\n style = itemStyleCache[key];\n } else {\n const offset = getColumnOffset(\n this.props,\n columnIndex,\n this._instanceProps\n );\n const isRtl = direction === 'rtl';\n itemStyleCache[key] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offset,\n right: isRtl ? offset : undefined,\n top: getRowOffset(this.props, rowIndex, this._instanceProps),\n height: getRowHeight(this.props, rowIndex, this._instanceProps),\n width: getColumnWidth(this.props, columnIndex, this._instanceProps),\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getHorizontalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanColumnCount,\n overscanColumnsCount,\n overscanCount,\n rowCount,\n } = this.props;\n const { horizontalScrollDirection, isScrolling, scrollLeft } = this.state;\n\n const overscanCountResolved: number =\n overscanColumnCount || overscanColumnsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getColumnStartIndexForOffset(\n this.props,\n scrollLeft,\n this._instanceProps\n );\n const stopIndex = getColumnStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollLeft,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || horizontalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || horizontalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(columnCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _getVerticalRangeToRender(): [number, number, number, number] {\n const {\n columnCount,\n overscanCount,\n overscanRowCount,\n overscanRowsCount,\n rowCount,\n } = this.props;\n const { isScrolling, verticalScrollDirection, scrollTop } = this.state;\n\n const overscanCountResolved: number =\n overscanRowCount || overscanRowsCount || overscanCount || 1;\n\n if (columnCount === 0 || rowCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getRowStartIndexForOffset(\n this.props,\n scrollTop,\n this._instanceProps\n );\n const stopIndex = getRowStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollTop,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || verticalScrollDirection === 'backward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n const overscanForward =\n !isScrolling || verticalScrollDirection === 'forward'\n ? Math.max(1, overscanCountResolved)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(rowCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScroll = (event: ScrollEvent): void => {\n const {\n clientHeight,\n clientWidth,\n scrollLeft,\n scrollTop,\n scrollHeight,\n scrollWidth,\n } = event.currentTarget;\n this.setState(prevState => {\n if (\n prevState.scrollLeft === scrollLeft &&\n prevState.scrollTop === scrollTop\n ) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n let calculatedScrollLeft = scrollLeft;\n if (direction === 'rtl') {\n switch (getRTLOffsetType()) {\n case 'negative':\n calculatedScrollLeft = -scrollLeft;\n break;\n case 'positive-descending':\n calculatedScrollLeft = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n calculatedScrollLeft = Math.max(\n 0,\n Math.min(calculatedScrollLeft, scrollWidth - clientWidth)\n );\n const calculatedScrollTop = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n horizontalScrollDirection:\n prevState.scrollLeft < scrollLeft ? 'forward' : 'backward',\n scrollLeft: calculatedScrollLeft,\n scrollTop: calculatedScrollTop,\n verticalScrollDirection:\n prevState.scrollTop < scrollTop ? 'forward' : 'backward',\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1);\n });\n };\n };\n}\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n innerTagName,\n outerTagName,\n overscanColumnsCount,\n overscanCount,\n overscanRowsCount,\n width,\n }: Props,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof overscanCount === 'number') {\n if (devWarningsOverscanCount && !devWarningsOverscanCount.has(instance)) {\n devWarningsOverscanCount.add(instance);\n console.warn(\n 'The overscanCount prop has been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (\n typeof overscanColumnsCount === 'number' ||\n typeof overscanRowsCount === 'number'\n ) {\n if (\n devWarningsOverscanRowsColumnsCount &&\n !devWarningsOverscanRowsColumnsCount.has(instance)\n ) {\n devWarningsOverscanRowsColumnsCount.add(instance);\n console.warn(\n 'The overscanColumnsCount and overscanRowsCount props have been deprecated. ' +\n 'Please use the overscanColumnCount and overscanRowCount props instead.'\n );\n }\n }\n\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n switch (direction) {\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n if (typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Grids must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n }\n\n if (typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Grids must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport memoizeOne from 'memoize-one';\nimport { createElement, PureComponent } from 'react';\nimport { cancelTimeout, requestTimeout } from './timer';\nimport { getScrollbarSize, getRTLOffsetType } from './domHelpers';\n\nimport type { TimeoutID } from './timer';\n\nexport type ScrollToAlign = 'auto' | 'smart' | 'center' | 'start' | 'end';\n\ntype itemSize = number | ((index: number) => number);\n// TODO Deprecate directions \"horizontal\" and \"vertical\"\ntype Direction = 'ltr' | 'rtl' | 'horizontal' | 'vertical';\ntype Layout = 'horizontal' | 'vertical';\n\ntype RenderComponentProps = {|\n data: T,\n index: number,\n isScrolling?: boolean,\n style: Object,\n|};\ntype RenderComponent = React$ComponentType<$Shape>>;\n\ntype ScrollDirection = 'forward' | 'backward';\n\ntype onItemsRenderedCallback = ({\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number,\n}) => void;\ntype onScrollCallback = ({\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n}) => void;\n\ntype ScrollEvent = SyntheticEvent;\ntype ItemStyleCache = { [index: number]: Object };\n\ntype OuterProps = {|\n children: React$Node,\n className: string | void,\n onScroll: ScrollEvent => void,\n style: {\n [string]: mixed,\n },\n|};\n\ntype InnerProps = {|\n children: React$Node,\n style: {\n [string]: mixed,\n },\n|};\n\nexport type Props = {|\n children: RenderComponent,\n className?: string,\n direction: Direction,\n height: number | string,\n initialScrollOffset?: number,\n innerRef?: any,\n innerElementType?: string | React$AbstractComponent,\n innerTagName?: string, // deprecated\n itemCount: number,\n itemData: T,\n itemKey?: (index: number, data: T) => any,\n itemSize: itemSize,\n layout: Layout,\n onItemsRendered?: onItemsRenderedCallback,\n onScroll?: onScrollCallback,\n outerRef?: any,\n outerElementType?: string | React$AbstractComponent,\n outerTagName?: string, // deprecated\n overscanCount: number,\n style?: Object,\n useIsScrolling: boolean,\n width: number | string,\n|};\n\ntype State = {|\n instance: any,\n isScrolling: boolean,\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean,\n|};\n\ntype GetItemOffset = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype GetItemSize = (\n props: Props,\n index: number,\n instanceProps: any\n) => number;\ntype GetEstimatedTotalSize = (props: Props, instanceProps: any) => number;\ntype GetOffsetForIndexAndAlignment = (\n props: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype GetStartIndexForOffset = (\n props: Props,\n offset: number,\n instanceProps: any\n) => number;\ntype GetStopIndexForStartIndex = (\n props: Props,\n startIndex: number,\n scrollOffset: number,\n instanceProps: any\n) => number;\ntype InitInstanceProps = (props: Props, instance: any) => any;\ntype ValidateProps = (props: Props) => void;\n\nconst IS_SCROLLING_DEBOUNCE_INTERVAL = 150;\n\nconst defaultItemKey = (index: number, data: any) => index;\n\n// In DEV mode, this Set helps us only log a warning once per component instance.\n// This avoids spamming the console every time a render happens.\nlet devWarningsDirection = null;\nlet devWarningsTagName = null;\nif (process.env.NODE_ENV !== 'production') {\n if (typeof window !== 'undefined' && typeof window.WeakSet !== 'undefined') {\n devWarningsDirection = new WeakSet();\n devWarningsTagName = new WeakSet();\n }\n}\n\nexport default function createListComponent({\n getItemOffset,\n getEstimatedTotalSize,\n getItemSize,\n getOffsetForIndexAndAlignment,\n getStartIndexForOffset,\n getStopIndexForStartIndex,\n initInstanceProps,\n shouldResetStyleCacheOnItemSizeChange,\n validateProps,\n}: {|\n getItemOffset: GetItemOffset,\n getEstimatedTotalSize: GetEstimatedTotalSize,\n getItemSize: GetItemSize,\n getOffsetForIndexAndAlignment: GetOffsetForIndexAndAlignment,\n getStartIndexForOffset: GetStartIndexForOffset,\n getStopIndexForStartIndex: GetStopIndexForStartIndex,\n initInstanceProps: InitInstanceProps,\n shouldResetStyleCacheOnItemSizeChange: boolean,\n validateProps: ValidateProps,\n|}) {\n return class List extends PureComponent, State> {\n _instanceProps: any = initInstanceProps(this.props, this);\n _outerRef: ?HTMLDivElement;\n _resetIsScrollingTimeoutId: TimeoutID | null = null;\n\n static defaultProps = {\n direction: 'ltr',\n itemData: undefined,\n layout: 'vertical',\n overscanCount: 2,\n useIsScrolling: false,\n };\n\n state: State = {\n instance: this,\n isScrolling: false,\n scrollDirection: 'forward',\n scrollOffset:\n typeof this.props.initialScrollOffset === 'number'\n ? this.props.initialScrollOffset\n : 0,\n scrollUpdateWasRequested: false,\n };\n\n // Always use explicit constructor for React components.\n // It produces less code after transpilation. (#26)\n // eslint-disable-next-line no-useless-constructor\n constructor(props: Props) {\n super(props);\n }\n\n static getDerivedStateFromProps(\n nextProps: Props,\n prevState: State\n ): $Shape | null {\n validateSharedProps(nextProps, prevState);\n validateProps(nextProps);\n return null;\n }\n\n scrollTo(scrollOffset: number): void {\n scrollOffset = Math.max(0, scrollOffset);\n\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollOffset) {\n return null;\n }\n return {\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset: scrollOffset,\n scrollUpdateWasRequested: true,\n };\n }, this._resetIsScrollingDebounced);\n }\n\n scrollToItem(index: number, align: ScrollToAlign = 'auto'): void {\n const { itemCount, layout } = this.props;\n const { scrollOffset } = this.state;\n\n index = Math.max(0, Math.min(index, itemCount - 1));\n\n // The scrollbar size should be considered when scrolling an item into view, to ensure it's fully visible.\n // But we only need to account for its size when it's actually visible.\n // This is an edge case for lists; normally they only scroll in the dominant direction.\n let scrollbarSize = 0;\n if (this._outerRef) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n if (layout === 'vertical') {\n scrollbarSize =\n outerRef.scrollWidth > outerRef.clientWidth\n ? getScrollbarSize()\n : 0;\n } else {\n scrollbarSize =\n outerRef.scrollHeight > outerRef.clientHeight\n ? getScrollbarSize()\n : 0;\n }\n }\n\n this.scrollTo(\n getOffsetForIndexAndAlignment(\n this.props,\n index,\n align,\n scrollOffset,\n this._instanceProps,\n scrollbarSize\n )\n );\n }\n\n componentDidMount() {\n const { direction, initialScrollOffset, layout } = this.props;\n\n if (typeof initialScrollOffset === 'number' && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n outerRef.scrollLeft = initialScrollOffset;\n } else {\n outerRef.scrollTop = initialScrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentDidUpdate() {\n const { direction, layout } = this.props;\n const { scrollOffset, scrollUpdateWasRequested } = this.state;\n\n if (scrollUpdateWasRequested && this._outerRef != null) {\n const outerRef = ((this._outerRef: any): HTMLElement);\n\n // TODO Deprecate direction \"horizontal\"\n if (direction === 'horizontal' || layout === 'horizontal') {\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // So we need to determine which browser behavior we're dealing with, and mimic it.\n switch (getRTLOffsetType()) {\n case 'negative':\n outerRef.scrollLeft = -scrollOffset;\n break;\n case 'positive-ascending':\n outerRef.scrollLeft = scrollOffset;\n break;\n default:\n const { clientWidth, scrollWidth } = outerRef;\n outerRef.scrollLeft = scrollWidth - clientWidth - scrollOffset;\n break;\n }\n } else {\n outerRef.scrollLeft = scrollOffset;\n }\n } else {\n outerRef.scrollTop = scrollOffset;\n }\n }\n\n this._callPropsCallbacks();\n }\n\n componentWillUnmount() {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n }\n\n render() {\n const {\n children,\n className,\n direction,\n height,\n innerRef,\n innerElementType,\n innerTagName,\n itemCount,\n itemData,\n itemKey = defaultItemKey,\n layout,\n outerElementType,\n outerTagName,\n style,\n useIsScrolling,\n width,\n } = this.props;\n const { isScrolling } = this.state;\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const onScroll = isHorizontal\n ? this._onScrollHorizontal\n : this._onScrollVertical;\n\n const [startIndex, stopIndex] = this._getRangeToRender();\n\n const items = [];\n if (itemCount > 0) {\n for (let index = startIndex; index <= stopIndex; index++) {\n items.push(\n createElement(children, {\n data: itemData,\n key: itemKey(index, itemData),\n index,\n isScrolling: useIsScrolling ? isScrolling : undefined,\n style: this._getItemStyle(index),\n })\n );\n }\n }\n\n // Read this value AFTER items have been created,\n // So their actual sizes (if variable) are taken into consideration.\n const estimatedTotalSize = getEstimatedTotalSize(\n this.props,\n this._instanceProps\n );\n\n return createElement(\n outerElementType || outerTagName || 'div',\n {\n className,\n onScroll,\n ref: this._outerRefSetter,\n style: {\n position: 'relative',\n height,\n width,\n overflow: 'auto',\n WebkitOverflowScrolling: 'touch',\n willChange: 'transform',\n direction,\n ...style,\n },\n },\n createElement(innerElementType || innerTagName || 'div', {\n children: items,\n ref: innerRef,\n style: {\n height: isHorizontal ? '100%' : estimatedTotalSize,\n pointerEvents: isScrolling ? 'none' : undefined,\n width: isHorizontal ? estimatedTotalSize : '100%',\n },\n })\n );\n }\n\n _callOnItemsRendered: (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) => void;\n _callOnItemsRendered = memoizeOne(\n (\n overscanStartIndex: number,\n overscanStopIndex: number,\n visibleStartIndex: number,\n visibleStopIndex: number\n ) =>\n ((this.props.onItemsRendered: any): onItemsRenderedCallback)({\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n })\n );\n\n _callOnScroll: (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) => void;\n _callOnScroll = memoizeOne(\n (\n scrollDirection: ScrollDirection,\n scrollOffset: number,\n scrollUpdateWasRequested: boolean\n ) =>\n ((this.props.onScroll: any): onScrollCallback)({\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n })\n );\n\n _callPropsCallbacks() {\n if (typeof this.props.onItemsRendered === 'function') {\n const { itemCount } = this.props;\n if (itemCount > 0) {\n const [\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex,\n ] = this._getRangeToRender();\n this._callOnItemsRendered(\n overscanStartIndex,\n overscanStopIndex,\n visibleStartIndex,\n visibleStopIndex\n );\n }\n }\n\n if (typeof this.props.onScroll === 'function') {\n const {\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested,\n } = this.state;\n this._callOnScroll(\n scrollDirection,\n scrollOffset,\n scrollUpdateWasRequested\n );\n }\n }\n\n // Lazily create and cache item styles while scrolling,\n // So that pure component sCU will prevent re-renders.\n // We maintain this cache, and pass a style prop rather than index,\n // So that List can clear cached styles and force item re-render if necessary.\n _getItemStyle: (index: number) => Object;\n _getItemStyle = (index: number): Object => {\n const { direction, itemSize, layout } = this.props;\n\n const itemStyleCache = this._getItemStyleCache(\n shouldResetStyleCacheOnItemSizeChange && itemSize,\n shouldResetStyleCacheOnItemSizeChange && layout,\n shouldResetStyleCacheOnItemSizeChange && direction\n );\n\n let style;\n if (itemStyleCache.hasOwnProperty(index)) {\n style = itemStyleCache[index];\n } else {\n const offset = getItemOffset(this.props, index, this._instanceProps);\n const size = getItemSize(this.props, index, this._instanceProps);\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal =\n direction === 'horizontal' || layout === 'horizontal';\n\n const isRtl = direction === 'rtl';\n const offsetHorizontal = isHorizontal ? offset : 0;\n itemStyleCache[index] = style = {\n position: 'absolute',\n left: isRtl ? undefined : offsetHorizontal,\n right: isRtl ? offsetHorizontal : undefined,\n top: !isHorizontal ? offset : 0,\n height: !isHorizontal ? size : '100%',\n width: isHorizontal ? size : '100%',\n };\n }\n\n return style;\n };\n\n _getItemStyleCache: (_: any, __: any, ___: any) => ItemStyleCache;\n _getItemStyleCache = memoizeOne((_: any, __: any, ___: any) => ({}));\n\n _getRangeToRender(): [number, number, number, number] {\n const { itemCount, overscanCount } = this.props;\n const { isScrolling, scrollDirection, scrollOffset } = this.state;\n\n if (itemCount === 0) {\n return [0, 0, 0, 0];\n }\n\n const startIndex = getStartIndexForOffset(\n this.props,\n scrollOffset,\n this._instanceProps\n );\n const stopIndex = getStopIndexForStartIndex(\n this.props,\n startIndex,\n scrollOffset,\n this._instanceProps\n );\n\n // Overscan by one item in each direction so that tab/focus works.\n // If there isn't at least one extra item, tab loops back around.\n const overscanBackward =\n !isScrolling || scrollDirection === 'backward'\n ? Math.max(1, overscanCount)\n : 1;\n const overscanForward =\n !isScrolling || scrollDirection === 'forward'\n ? Math.max(1, overscanCount)\n : 1;\n\n return [\n Math.max(0, startIndex - overscanBackward),\n Math.max(0, Math.min(itemCount - 1, stopIndex + overscanForward)),\n startIndex,\n stopIndex,\n ];\n }\n\n _onScrollHorizontal = (event: ScrollEvent): void => {\n const { clientWidth, scrollLeft, scrollWidth } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollLeft) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n const { direction } = this.props;\n\n let scrollOffset = scrollLeft;\n if (direction === 'rtl') {\n // TRICKY According to the spec, scrollLeft should be negative for RTL aligned elements.\n // This is not the case for all browsers though (e.g. Chrome reports values as positive, measured relative to the left).\n // It's also easier for this component if we convert offsets to the same format as they would be in for ltr.\n // So the simplest solution is to determine which browser behavior we're dealing with, and convert based on it.\n switch (getRTLOffsetType()) {\n case 'negative':\n scrollOffset = -scrollLeft;\n break;\n case 'positive-descending':\n scrollOffset = scrollWidth - clientWidth - scrollLeft;\n break;\n }\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n scrollOffset = Math.max(\n 0,\n Math.min(scrollOffset, scrollWidth - clientWidth)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _onScrollVertical = (event: ScrollEvent): void => {\n const { clientHeight, scrollHeight, scrollTop } = event.currentTarget;\n this.setState(prevState => {\n if (prevState.scrollOffset === scrollTop) {\n // Scroll position may have been updated by cDM/cDU,\n // In which case we don't need to trigger another render,\n // And we don't want to update state.isScrolling.\n return null;\n }\n\n // Prevent Safari's elastic scrolling from causing visual shaking when scrolling past bounds.\n const scrollOffset = Math.max(\n 0,\n Math.min(scrollTop, scrollHeight - clientHeight)\n );\n\n return {\n isScrolling: true,\n scrollDirection:\n prevState.scrollOffset < scrollOffset ? 'forward' : 'backward',\n scrollOffset,\n scrollUpdateWasRequested: false,\n };\n }, this._resetIsScrollingDebounced);\n };\n\n _outerRefSetter = (ref: any): void => {\n const { outerRef } = this.props;\n\n this._outerRef = ((ref: any): HTMLDivElement);\n\n if (typeof outerRef === 'function') {\n outerRef(ref);\n } else if (\n outerRef != null &&\n typeof outerRef === 'object' &&\n outerRef.hasOwnProperty('current')\n ) {\n outerRef.current = ref;\n }\n };\n\n _resetIsScrollingDebounced = () => {\n if (this._resetIsScrollingTimeoutId !== null) {\n cancelTimeout(this._resetIsScrollingTimeoutId);\n }\n\n this._resetIsScrollingTimeoutId = requestTimeout(\n this._resetIsScrolling,\n IS_SCROLLING_DEBOUNCE_INTERVAL\n );\n };\n\n _resetIsScrolling = () => {\n this._resetIsScrollingTimeoutId = null;\n\n this.setState({ isScrolling: false }, () => {\n // Clear style cache after state update has been committed.\n // This way we don't break pure sCU for items that don't use isScrolling param.\n this._getItemStyleCache(-1, null);\n });\n };\n };\n}\n\n// NOTE: I considered further wrapping individual items with a pure ListItem component.\n// This would avoid ever calling the render function for the same index more than once,\n// But it would also add the overhead of a lot of components/fibers.\n// I assume people already do this (render function returning a class component),\n// So my doing it would just unnecessarily double the wrappers.\n\nconst validateSharedProps = (\n {\n children,\n direction,\n height,\n layout,\n innerTagName,\n outerTagName,\n width,\n }: Props,\n { instance }: State\n): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (innerTagName != null || outerTagName != null) {\n if (devWarningsTagName && !devWarningsTagName.has(instance)) {\n devWarningsTagName.add(instance);\n console.warn(\n 'The innerTagName and outerTagName props have been deprecated. ' +\n 'Please use the innerElementType and outerElementType props instead.'\n );\n }\n }\n\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n\n switch (direction) {\n case 'horizontal':\n case 'vertical':\n if (devWarningsDirection && !devWarningsDirection.has(instance)) {\n devWarningsDirection.add(instance);\n console.warn(\n 'The direction prop should be either \"ltr\" (default) or \"rtl\". ' +\n 'Please use the layout prop to specify \"vertical\" (default) or \"horizontal\" orientation.'\n );\n }\n break;\n case 'ltr':\n case 'rtl':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"direction\" prop has been specified. ' +\n 'Value should be either \"ltr\" or \"rtl\". ' +\n `\"${direction}\" was specified.`\n );\n }\n\n switch (layout) {\n case 'horizontal':\n case 'vertical':\n // Valid values\n break;\n default:\n throw Error(\n 'An invalid \"layout\" prop has been specified. ' +\n 'Value should be either \"horizontal\" or \"vertical\". ' +\n `\"${layout}\" was specified.`\n );\n }\n\n if (children == null) {\n throw Error(\n 'An invalid \"children\" prop has been specified. ' +\n 'Value should be a React component. ' +\n `\"${children === null ? 'null' : typeof children}\" was specified.`\n );\n }\n\n if (isHorizontal && typeof width !== 'number') {\n throw Error(\n 'An invalid \"width\" prop has been specified. ' +\n 'Horizontal lists must specify a number for width. ' +\n `\"${width === null ? 'null' : typeof width}\" was specified.`\n );\n } else if (!isHorizontal && typeof height !== 'number') {\n throw Error(\n 'An invalid \"height\" prop has been specified. ' +\n 'Vertical lists must specify a number for height. ' +\n `\"${height === null ? 'null' : typeof height}\" was specified.`\n );\n }\n }\n};\n","// @flow\n\nimport createListComponent from './createListComponent';\n\nimport type { Props, ScrollToAlign } from './createListComponent';\n\ntype InstanceProps = any;\n\nconst FixedSizeList = createListComponent({\n getItemOffset: ({ itemSize }: Props, index: number): number =>\n index * ((itemSize: any): number),\n\n getItemSize: ({ itemSize }: Props, index: number): number =>\n ((itemSize: any): number),\n\n getEstimatedTotalSize: ({ itemCount, itemSize }: Props) =>\n ((itemSize: any): number) * itemCount,\n\n getOffsetForIndexAndAlignment: (\n { direction, height, itemCount, itemSize, layout, width }: Props,\n index: number,\n align: ScrollToAlign,\n scrollOffset: number,\n instanceProps: InstanceProps,\n scrollbarSize: number\n ): number => {\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const size = (((isHorizontal ? width : height): any): number);\n const lastItemOffset = Math.max(\n 0,\n itemCount * ((itemSize: any): number) - size\n );\n const maxOffset = Math.min(\n lastItemOffset,\n index * ((itemSize: any): number)\n );\n const minOffset = Math.max(\n 0,\n index * ((itemSize: any): number) -\n size +\n ((itemSize: any): number) +\n scrollbarSize\n );\n\n if (align === 'smart') {\n if (\n scrollOffset >= minOffset - size &&\n scrollOffset <= maxOffset + size\n ) {\n align = 'auto';\n } else {\n align = 'center';\n }\n }\n\n switch (align) {\n case 'start':\n return maxOffset;\n case 'end':\n return minOffset;\n case 'center': {\n // \"Centered\" offset is usually the average of the min and max.\n // But near the edges of the list, this doesn't hold true.\n const middleOffset = Math.round(\n minOffset + (maxOffset - minOffset) / 2\n );\n if (middleOffset < Math.ceil(size / 2)) {\n return 0; // near the beginning\n } else if (middleOffset > lastItemOffset + Math.floor(size / 2)) {\n return lastItemOffset; // near the end\n } else {\n return middleOffset;\n }\n }\n case 'auto':\n default:\n if (scrollOffset >= minOffset && scrollOffset <= maxOffset) {\n return scrollOffset;\n } else if (scrollOffset < minOffset) {\n return minOffset;\n } else {\n return maxOffset;\n }\n }\n },\n\n getStartIndexForOffset: (\n { itemCount, itemSize }: Props,\n offset: number\n ): number =>\n Math.max(\n 0,\n Math.min(itemCount - 1, Math.floor(offset / ((itemSize: any): number)))\n ),\n\n getStopIndexForStartIndex: (\n { direction, height, itemCount, itemSize, layout, width }: Props,\n startIndex: number,\n scrollOffset: number\n ): number => {\n // TODO Deprecate direction \"horizontal\"\n const isHorizontal = direction === 'horizontal' || layout === 'horizontal';\n const offset = startIndex * ((itemSize: any): number);\n const size = (((isHorizontal ? width : height): any): number);\n const numVisibleItems = Math.ceil(\n (size + scrollOffset - offset) / ((itemSize: any): number)\n );\n return Math.max(\n 0,\n Math.min(\n itemCount - 1,\n startIndex + numVisibleItems - 1 // -1 is because stop index is inclusive\n )\n );\n },\n\n initInstanceProps(props: Props): any {\n // Noop\n },\n\n shouldResetStyleCacheOnItemSizeChange: true,\n\n validateProps: ({ itemSize }: Props): void => {\n if (process.env.NODE_ENV !== 'production') {\n if (typeof itemSize !== 'number') {\n throw Error(\n 'An invalid \"itemSize\" prop has been specified. ' +\n 'Value should be a number. ' +\n `\"${itemSize === null ? 'null' : typeof itemSize}\" was specified.`\n );\n }\n }\n },\n});\n\nexport default FixedSizeList;\n"],"names":["createClass","defineProperties","target","props","i","length","descriptor","enumerable","configurable","writable","Object","defineProperty","key","Constructor","protoProps","staticProps","prototype","possibleConstructorReturn","self","call","ReferenceError","_PureComponent","InfiniteLoader","_ref","_temp","_this","instance","TypeError","classCallCheck","this","_len","arguments","args","Array","_key","__proto__","getPrototypeOf","apply","concat","_lastRenderedStartIndex","_lastRenderedStopIndex","_memoizedUnloadedRanges","_onItemsRendered","_ref2","visibleStartIndex","visibleStopIndex","_ensureRowsLoaded","_setRef","listRef","_listRef","subClass","superClass","create","constructor","value","setPrototypeOf","inherits","autoReload","undefined","process","children","onItemsRendered","ref","startIndex","stopIndex","_props","isItemLoaded","itemCount","_props$minimumBatchSi","minimumBatchSize","_props$threshold","threshold","unloadedRanges","rangeStartIndex","rangeStopIndex","_index","push","potentialStopIndex","Math","min","max","_index2","_index3","scanForUnloadedRanges","some","startOrStop","index","_loadUnloadedRanges","_this2","loadMoreItems","loadMoreRows","_loop","promise","then","lastRenderedStartIndex","lastRenderedStopIndex","isRangeVisible","resetAfterIndex","_getItemStyleCache","forceUpdate","PureComponent","safeIsNaN","Number","isNaN","areInputsEqual","newInputs","lastInputs","first","second","resultFn","isEqual","lastThis","lastResult","lastArgs","calledOnce","newArgs","_i","now","performance","Date","cancelTimeout","timeoutID","cancelAnimationFrame","id","requestTimeout","callback","delay","start","requestAnimationFrame","tick","size","getScrollbarSize","recalculate","div","document","createElement","style","width","height","overflow","body","appendChild","offsetWidth","clientWidth","removeChild","cachedRTLResult","getRTLOffsetType","outerDiv","outerStyle","direction","innerDiv","innerStyle","scrollLeft","defaultItemKey$1","data","createListComponent","_class","getItemOffset","getEstimatedTotalSize","getItemSize","getOffsetForIndexAndAlignment","getStartIndexForOffset","getStopIndexForStartIndex","initInstanceProps","shouldResetStyleCacheOnItemSizeChange","validateProps","List","_instanceProps","_assertThisInitialized","_outerRef","_resetIsScrollingTimeoutId","state","isScrolling","scrollDirection","scrollOffset","initialScrollOffset","scrollUpdateWasRequested","_callOnItemsRendered","memoizeOne","overscanStartIndex","overscanStopIndex","_callOnScroll","onScroll","_getItemStyle","_this$props","itemSize","layout","itemStyleCache","hasOwnProperty","_offset","isHorizontal","isRtl","offsetHorizontal","position","left","right","top","_","__","___","_onScrollHorizontal","event","_event$currentTarget","currentTarget","scrollWidth","setState","prevState","_resetIsScrollingDebounced","_onScrollVertical","_event$currentTarget2","clientHeight","scrollHeight","scrollTop","_outerRefSetter","outerRef","current","_resetIsScrolling","_inheritsLoose","getDerivedStateFromProps","nextProps","validateSharedProps$1","_proto","scrollTo","scrollToItem","align","_this$props2","scrollbarSize","componentDidMount","_this$props3","_callPropsCallbacks","componentDidUpdate","_this$props4","_this$state","componentWillUnmount","render","_this$props5","className","innerRef","innerElementType","innerTagName","itemData","_this$props5$itemKey","itemKey","outerElementType","outerTagName","useIsScrolling","_this$_getRangeToRend","_getRangeToRender","items","estimatedTotalSize","_extends","WebkitOverflowScrolling","willChange","pointerEvents","_this$_getRangeToRend2","_overscanStartIndex","_overscanStopIndex","_visibleStartIndex","_visibleStopIndex","_this$state2","_scrollDirection","_scrollOffset","_scrollUpdateWasRequested","_this$props6","overscanCount","_this$state3","overscanBackward","overscanForward","defaultProps","_ref3","FixedSizeList","_ref4","instanceProps","lastItemOffset","maxOffset","minOffset","middleOffset","round","ceil","floor","_ref5","offset","_ref6","numVisibleItems","_ref7"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/204.25fc4165.chunk.js b/web-app/build/static/js/204.25fc4165.chunk.js
deleted file mode 100644
index bb9eda49dfa..00000000000
--- a/web-app/build/static/js/204.25fc4165.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[204],{2204:(e,t,a)=>{a.r(t),a.d(t,{default:()=>o});var s=a(5043),r=a(9923),n=a(4574),p=a(3216),i=a(9161),c=a(579);const x=n.Ay.iframe((()=>({border:"0px",flex:"1 1 auto",minHeight:"800px",width:"100%"}))),o=()=>{const{tenantName:e,tenantNamespace:t}=(0,p.g)(),[a,n]=(0,s.useState)(!0);return(0,c.jsxs)(s.Fragment,{children:[(0,c.jsx)(r._xt,{separator:!0,sx:{marginBottom:15},children:"Metrics"}),a&&(0,c.jsx)("div",{style:{marginTop:"80px"},children:(0,c.jsx)(r.z21,{})}),(0,c.jsx)(x,{title:"metrics",src:`/api/proxy/${t||""}/${e||""}${i.zZ.DASHBOARD}?cp=y`,onLoad:()=>{n(!1)}})]})}}}]);
-//# sourceMappingURL=204.25fc4165.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/204.25fc4165.chunk.js.map b/web-app/build/static/js/204.25fc4165.chunk.js.map
deleted file mode 100644
index 24fbaff33ec..00000000000
--- a/web-app/build/static/js/204.25fc4165.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/204.25fc4165.chunk.js","mappings":"8LAsBA,MAAMA,EAAkBC,EAAAA,GAAOC,QAAO,MACpCC,OAAQ,MACRC,KAAM,WACNC,UAAW,QACXC,MAAO,WA+BT,EA5BsBC,KACpB,MAAM,WAAEC,EAAU,gBAAEC,IAAoBC,EAAAA,EAAAA,MAEjCC,EAASC,IAAcC,EAAAA,EAAAA,WAAkB,GAEhD,OACEC,EAAAA,EAAAA,MAACC,EAAAA,SAAQ,CAAAC,SAAA,EACPC,EAAAA,EAAAA,KAACC,EAAAA,IAAY,CAACC,WAAS,EAACC,GAAI,CAAEC,aAAc,IAAKL,SAAC,YAGjDL,IACCM,EAAAA,EAAAA,KAAA,OAAKK,MAAO,CAAEC,UAAW,QAASP,UAChCC,EAAAA,EAAAA,KAACO,EAAAA,IAAW,OAGhBP,EAAAA,EAAAA,KAACjB,EAAe,CACdyB,MAAO,UACPC,IAAK,cAAcjB,GAAmB,MAAMD,GAAc,KACxDmB,EAAAA,GAAUC,iBAEZC,OAAQA,KACNjB,GAAW,EAAM,MAGZ,C","sources":["screens/Console/Tenants/TenantDetails/TenantMetrics.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { SectionTitle, ProgressBar } from \"mds\";\nimport styled from \"styled-components\";\nimport { useParams } from \"react-router-dom\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\n\nconst IFrameContainer = styled.iframe(() => ({\n border: \"0px\",\n flex: \"1 1 auto\",\n minHeight: \"800px\",\n width: \"100%\",\n}));\n\nconst TenantMetrics = () => {\n const { tenantName, tenantNamespace } = useParams();\n\n const [loading, setLoading] = useState(true);\n\n return (\n \n \n Metrics\n \n {loading && (\n
\n \n
\n )}\n {\n setLoading(false);\n }}\n />\n \n );\n};\n\nexport default TenantMetrics;\n"],"names":["IFrameContainer","styled","iframe","border","flex","minHeight","width","TenantMetrics","tenantName","tenantNamespace","useParams","loading","setLoading","useState","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","style","marginTop","ProgressBar","title","src","IAM_PAGES","DASHBOARD","onLoad"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/204.f10db4e8.chunk.js b/web-app/build/static/js/204.f10db4e8.chunk.js
new file mode 100644
index 00000000000..f8b7c1db5bc
--- /dev/null
+++ b/web-app/build/static/js/204.f10db4e8.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[204],{2204(e,t,a){a.r(t),a.d(t,{default:()=>x});var s=a(5043),r=a(9923),i=a(4574),n=a(3216),p=a(9161),c=a(579);const o=i.Ay.iframe(()=>({border:"0px",flex:"1 1 auto",minHeight:"800px",width:"100%"})),x=()=>{const{tenantName:e,tenantNamespace:t}=(0,n.g)(),[a,i]=(0,s.useState)(!0);return(0,c.jsxs)(s.Fragment,{children:[(0,c.jsx)(r._xt,{separator:!0,sx:{marginBottom:15},children:"Metrics"}),a&&(0,c.jsx)("div",{style:{marginTop:"80px"},children:(0,c.jsx)(r.z21,{})}),(0,c.jsx)(o,{title:"metrics",src:`/api/proxy/${t||""}/${e||""}${p.zZ.DASHBOARD}?cp=y`,onLoad:()=>{i(!1)}})]})}}}]);
+//# sourceMappingURL=204.f10db4e8.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/204.f10db4e8.chunk.js.map b/web-app/build/static/js/204.f10db4e8.chunk.js.map
new file mode 100644
index 00000000000..7fef201c495
--- /dev/null
+++ b/web-app/build/static/js/204.f10db4e8.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/204.f10db4e8.chunk.js","mappings":"uMAsBA,MAAMA,EAAkBC,EAAAA,GAAOC,OAAO,MACpCC,OAAQ,MACRC,KAAM,WACNC,UAAW,QACXC,MAAO,UA+BT,EA5BsBC,KACpB,MAAM,WAAEC,EAAU,gBAAEC,IAAoBC,EAAAA,EAAAA,MAEjCC,EAASC,IAAcC,EAAAA,EAAAA,WAAkB,GAEhD,OACEC,EAAAA,EAAAA,MAACC,EAAAA,SAAQ,CAAAC,SAAA,EACPC,EAAAA,EAAAA,KAACC,EAAAA,IAAY,CAACC,WAAS,EAACC,GAAI,CAAEC,aAAc,IAAKL,SAAC,YAGjDL,IACCM,EAAAA,EAAAA,KAAA,OAAKK,MAAO,CAAEC,UAAW,QAASP,UAChCC,EAAAA,EAAAA,KAACO,EAAAA,IAAW,OAGhBP,EAAAA,EAAAA,KAACjB,EAAe,CACdyB,MAAO,UACPC,IAAK,cAAcjB,GAAmB,MAAMD,GAAc,KACxDmB,EAAAA,GAAUC,iBAEZC,OAAQA,KACNjB,GAAW,S","sources":["screens/Console/Tenants/TenantDetails/TenantMetrics.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useState } from \"react\";\nimport { SectionTitle, ProgressBar } from \"mds\";\nimport styled from \"styled-components\";\nimport { useParams } from \"react-router-dom\";\nimport { IAM_PAGES } from \"../../../../common/SecureComponent/permissions\";\n\nconst IFrameContainer = styled.iframe(() => ({\n border: \"0px\",\n flex: \"1 1 auto\",\n minHeight: \"800px\",\n width: \"100%\",\n}));\n\nconst TenantMetrics = () => {\n const { tenantName, tenantNamespace } = useParams();\n\n const [loading, setLoading] = useState(true);\n\n return (\n \n \n Metrics\n \n {loading && (\n
\n \n
\n )}\n {\n setLoading(false);\n }}\n />\n \n );\n};\n\nexport default TenantMetrics;\n"],"names":["IFrameContainer","styled","iframe","border","flex","minHeight","width","TenantMetrics","tenantName","tenantNamespace","useParams","loading","setLoading","useState","_jsxs","Fragment","children","_jsx","SectionTitle","separator","sx","marginBottom","style","marginTop","ProgressBar","title","src","IAM_PAGES","DASHBOARD","onLoad"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/241.9da577b1.chunk.js b/web-app/build/static/js/241.9da577b1.chunk.js
deleted file mode 100644
index 4742aa82330..00000000000
--- a/web-app/build/static/js/241.9da577b1.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[241],{4241:(e,t,n)=>{n.d(t,{c9:()=>yr,dw:()=>bn});class r extends Error{}class s extends r{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends r{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class a extends r{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends r{}class l extends r{constructor(e){super(`Invalid unit ${e}`)}}class u extends r{}class c extends r{constructor(){super("Zone is an abstract class")}}const h="numeric",d="short",m="long",f={year:h,month:h,day:h},y={year:h,month:d,day:h},g={year:h,month:d,day:h,weekday:d},w={year:h,month:m,day:h},v={year:h,month:m,day:h,weekday:m},p={hour:h,minute:h},k={hour:h,minute:h,second:h},S={hour:h,minute:h,second:h,timeZoneName:d},T={hour:h,minute:h,second:h,timeZoneName:m},b={hour:h,minute:h,hourCycle:"h23"},O={hour:h,minute:h,second:h,hourCycle:"h23"},N={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},D={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},M={year:h,month:h,day:h,hour:h,minute:h},I={year:h,month:h,day:h,hour:h,minute:h,second:h},V={year:h,month:d,day:h,hour:h,minute:h},x={year:h,month:d,day:h,hour:h,minute:h,second:h},E={year:h,month:d,day:h,weekday:d,hour:h,minute:h},C={year:h,month:m,day:h,hour:h,minute:h,timeZoneName:d},F={year:h,month:m,day:h,hour:h,minute:h,second:h,timeZoneName:d},$={year:h,month:m,day:h,weekday:m,hour:h,minute:h,timeZoneName:m},W={year:h,month:m,day:h,weekday:m,hour:h,minute:h,second:h,timeZoneName:m};class Z{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let L=null;class z extends Z{static get instance(){return null===L&&(L=new z),L}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return nt(e,n,r)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let A={};const j={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let q={};class U extends Z{static create(e){return q[e]||(q[e]=new U(e)),q[e]}static resetCache(){q={},A={}}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(t){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return nt(e,n,r,this.name)}formatOffset(e,t){return at(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const n=(r=this.name,A[r]||(A[r]=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"})),A[r]);var r;let[s,i,a,o,l,u,c]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let s=0;s=0?d:1e3+d,(Ke({year:s,month:i,day:a,hour:24===l?0:l,minute:u,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _={};let Y={};function H(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=Y[n];return r||(r=new Intl.DateTimeFormat(e,t),Y[n]=r),r}let R={};let P={};let J=null;let G={};function B(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class Q{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=R[n];return r||(r=new Intl.NumberFormat(e,t),R[n]=r),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return Ye(this.floor?Math.floor(e):Je(e,3),this.padTo)}}class K{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=H(t,s)}format(){return this.originalZone?this.formatToParts().map((e=>{let{value:t}=e;return t})).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class X{constructor(e,t,n){this.opts={style:"long",...n},!t&&ze()&&(this.rtf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=P[s];return i||(i=new Intl.RelativeTimeFormat(e,t),P[s]=i),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"always",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=s[e],c=r?l?u[1]:u[2]||u[1]:l?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ee={firstDay:1,minimalDays:4,weekend:[6,7]};class te{static fromOpts(e){return te.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=e||pe.defaultLocale,a=i||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),o=t||pe.defaultNumberingSystem,l=n||pe.defaultOutputCalendar,u=Ue(r)||pe.defaultWeekSettings;return new te(a,o,l,u,i)}static resetCache(){J=null,Y={},R={},P={}}static fromObject(){let{locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return te.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,s;try{t=H(e).resolvedOptions(),s=e}catch(r){const i=e.substring(0,n);t=H(i).resolvedOptions(),s=i}const{numberingSystem:i,calendar:a}=t;return[s,i,a]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?te.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ue(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!0})}redefaultToSystem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!1})}months(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return B(this,e,ht,(()=>{const n=t?{month:e,day:"numeric"}:{month:e},r=t?"format":"standalone";return this.monthsCache[r][e]||(this.monthsCache[r][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=yr.utc(2009,n,1);t.push(e(r))}return t}((e=>this.extract(e,n,"month")))),this.monthsCache[r][e]}))}weekdays(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return B(this,e,yt,(()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=yr.utc(2016,11,13+n);t.push(e(r))}return t}((e=>this.extract(e,n,"weekday")))),this.weekdaysCache[r][e]}))}meridiems(){return B(this,void 0,(()=>gt),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[yr.utc(2016,11,13,9),yr.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return B(this,e,kt,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[yr.utc(-40,1,1),yr.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===n));return r?r.value:null}numberFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new Q(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new K(e,this.intl,t)}relFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new X(this.intl,this.isEnglish(),e)}listFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=_[n];return r||(r=new Intl.ListFormat(e,t),_[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:Ae()?function(e){let t=G[e];if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,G[e]=t}return t}(this.locale):ee}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 ne=null;class re extends Z{static get utcInstance(){return null===ne&&(ne=new re(0)),ne}static instance(e){return 0===e?re.utcInstance:new re(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new re(rt(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${at(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${at(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return at(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class se extends Z{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 ie(e,t){if(We(e)||null===e)return t;if(e instanceof Z)return e;if("string"===typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?z.instance:"utc"===n||"gmt"===n?re.utcInstance:re.parseSpecifier(n)||U.create(e)}return Ze(e)?re.instance(e):"object"===typeof e&&"offset"in e&&"function"===typeof e.offset?e:new se(e)}const ae={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"},oe={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]},le=ae.hanidec.replace(/[\[|\]]/g,"").split("");let ue={};function ce(e){let{numberingSystem:t}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=t||"latn";return ue[r]||(ue[r]={}),ue[r][n]||(ue[r][n]=new RegExp(`${ae[r]}${n}`)),ue[r][n]}let he,de=()=>Date.now(),me="system",fe=null,ye=null,ge=null,we=60,ve=null;class pe{static get now(){return de}static set now(e){de=e}static set defaultZone(e){me=e}static get defaultZone(){return ie(me,z.instance)}static get defaultLocale(){return fe}static set defaultLocale(e){fe=e}static get defaultNumberingSystem(){return ye}static set defaultNumberingSystem(e){ye=e}static get defaultOutputCalendar(){return ge}static set defaultOutputCalendar(e){ge=e}static get defaultWeekSettings(){return ve}static set defaultWeekSettings(e){ve=Ue(e)}static get twoDigitCutoffYear(){return we}static set twoDigitCutoffYear(e){we=e%100}static get throwOnInvalid(){return he}static set throwOnInvalid(e){he=e}static resetCaches(){te.resetCache(),U.resetCache(),yr.resetCache(),ue={}}}class ke{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const Se=[0,31,59,90,120,151,181,212,243,273,304,334],Te=[0,31,60,91,121,152,182,213,244,274,305,335];function be(e,t){return new ke("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Oe(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function Ne(e,t,n){return n+(Ge(e)?Te:Se)[t-1]}function De(e,t){const n=Ge(e)?Te:Se,r=n.findIndex((e=>e1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{year:r,month:s,day:i}=e,a=Ne(r,s,i),o=Me(Oe(r,s,i),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=r-1,u=et(l,t,n)):u>et(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...ot(e)}}function Ve(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{weekYear:r,weekNumber:s,weekday:i}=e,a=Me(Oe(r,1,t),n),o=Be(r);let l,u=7*s+i-a-7+t;u<1?(l=r-1,u+=Be(l)):u>o?(l=r+1,u-=Be(r)):l=r;const{month:c,day:h}=De(l,u);return{year:l,month:c,day:h,...ot(e)}}function xe(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:Ne(t,n,r),...ot(e)}}function Ee(e){const{year:t,ordinal:n}=e,{month:r,day:s}=De(t,n);return{year:t,month:r,day:s,...ot(e)}}function Ce(e,t){if(!We(e.localWeekday)||!We(e.localWeekNumber)||!We(e.localWeekYear)){if(!We(e.weekday)||!We(e.weekNumber)||!We(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return We(e.localWeekday)||(e.weekday=e.localWeekday),We(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),We(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function Fe(e){const t=Le(e.year),n=_e(e.month,1,12),r=_e(e.day,1,Qe(e.year,e.month));return t?n?!r&&be("day",e.day):be("month",e.month):be("year",e.year)}function $e(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=_e(t,0,23)||24===t&&0===n&&0===r&&0===s,a=_e(n,0,59),o=_e(r,0,59),l=_e(s,0,999);return i?a?o?!l&&be("millisecond",s):be("second",r):be("minute",n):be("hour",t)}function We(e){return"undefined"===typeof e}function Ze(e){return"number"===typeof e}function Le(e){return"number"===typeof e&&e%1===0}function ze(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function Ae(){try{return"undefined"!==typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function je(e,t,n){if(0!==e.length)return e.reduce(((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s}),null)[1]}function qe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ue(e){if(null==e)return null;if("object"!==typeof e)throw new u("Week settings must be an object");if(!_e(e.firstDay,1,7)||!_e(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some((e=>!_e(e,1,7))))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function _e(e,t,n){return Le(e)&&e>=t&&e<=n}function Ye(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function He(e){return We(e)||null===e||""===e?void 0:parseInt(e,10)}function Re(e){return We(e)||null===e||""===e?void 0:parseFloat(e)}function Pe(e){if(!We(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Je(e,t){const n=10**t;return(arguments.length>2&&void 0!==arguments[2]&&arguments[2]?Math.trunc:Math.round)(e*n)/n}function Ge(e){return e%4===0&&(e%100!==0||e%400===0)}function Be(e){return Ge(e)?366:365}function Qe(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Ge(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function Ke(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function Xe(e,t,n){return-Me(Oe(e,1,t),n)+t-1}function et(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=Xe(e,t,n),s=Xe(e+1,t,n);return(Be(e)-r+s)/7}function tt(e){return e>99?e:e>pe.twoDigitCutoffYear?1900+e:2e3+e}function nt(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find((e=>"timezonename"===e.type.toLowerCase()));return o?o.value:null}function rt(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function st(e){const t=Number(e);if("boolean"===typeof e||""===e||Number.isNaN(t))throw new u(`Invalid unit value ${e}`);return t}function it(e,t){const n={};for(const r in e)if(qe(e,r)){const s=e[r];if(void 0===s||null===s)continue;n[t(r)]=st(s)}return n}function at(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${Ye(n,2)}:${Ye(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${Ye(n,2)}${Ye(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ot(e){return function(e,t){return t.reduce(((t,n)=>(t[n]=e[n],t)),{})}(e,["hour","minute","second","millisecond"])}const lt=["January","February","March","April","May","June","July","August","September","October","November","December"],ut=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],ct=["J","F","M","A","M","J","J","A","S","O","N","D"];function ht(e){switch(e){case"narrow":return[...ct];case"short":return[...ut];case"long":return[...lt];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 dt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],mt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],ft=["M","T","W","T","F","S","S"];function yt(e){switch(e){case"narrow":return[...ft];case"short":return[...mt];case"long":return[...dt];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gt=["AM","PM"],wt=["Before Christ","Anno Domini"],vt=["BC","AD"],pt=["B","A"];function kt(e){switch(e){case"narrow":return[...pt];case"short":return[...vt];case"long":return[...wt];default:return null}}function St(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Tt={D:f,DD:y,DDD:w,DDDD:v,t:p,tt:k,ttt:S,tttt:T,T:b,TT:O,TTT:N,TTTT:D,f:M,ff:V,fff:C,ffff:$,F:I,FF:x,FFF:F,FFFF:W};class bt{static create(e){return new bt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i0&&s.push({literal:r||/^\s+$/.test(n),val:n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Tt[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;if(this.opts.forceSimple)return Ye(e,t);const n={...this.opts};return t>0&&(n.padTo=t),this.loc.numberFormatter(n).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return gt[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,r)=>n?function(e,t){return ht(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return yt(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=bt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return kt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return St(bt.parseFormat(t),(t=>{switch(t){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 i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({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 a();case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({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 u(t)}}))}formatDurationFromString(e,t){const n=e=>{switch(e[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}},r=bt.parseFormat(t),s=r.reduce(((e,t)=>{let{literal:n,val:r}=t;return n?e:e.concat(r)}),[]);return St(r,(e=>t=>{const r=n(t);return r?this.num(e.get(r),t.length):t})(e.shiftTo(...s.map(n).filter((e=>e)))))}}const Ot=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Nt(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.source),"");return RegExp(`^${r}$`)}function Dt(){for(var e=arguments.length,t=new Array(e),n=0;nt.reduce(((t,n)=>{let[r,s,i]=t;const[a,o,l]=n(e,i);return[{...r,...a},o||s,l]}),[{},null,1]).slice(0,2)}function Mt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r={};let s;for(s=0;s1&&void 0!==arguments[1]&&arguments[1]||e&&c)?-e:e};return[{years:d(Re(n)),months:d(Re(r)),weeks:d(Re(s)),days:d(Re(i)),hours:d(Re(a)),minutes:d(Re(o)),seconds:d(Re(l),"-0"===l),milliseconds:d(Pe(u),h)}]}const Yt={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Ht(e,t,n,r,s,i,a){const o={year:2===t.length?tt(He(t)):He(t),month:ut.indexOf(n)+1,day:He(r),hour:He(s),minute:He(i)};return a&&(o.second=He(a)),e&&(o.weekday=e.length>3?dt.indexOf(e)+1:mt.indexOf(e)+1),o}const Rt=/^(?:(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 Pt(e){const[,t,n,r,s,i,a,o,l,u,c,h]=e,d=Ht(t,s,r,n,i,a,o);let m;return m=l?Yt[l]:u?0:rt(c,h),[d,new re(m)]}const Jt=/^(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$/,Gt=/^(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$/,Bt=/^(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 Qt(e){const[,t,n,r,s,i,a,o]=e;return[Ht(t,s,r,n,i,a,o),re.utcInstance]}function Kt(e){const[,t,n,r,s,i,a,o]=e;return[Ht(t,o,n,r,s,i,a),re.utcInstance]}const Xt=Nt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Ct),en=Nt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,Ct),tn=Nt(/(\d{4})-?(\d{3})/,Ct),nn=Nt(Et),rn=Dt((function(e,t){return[{year:Lt(e,t),month:Lt(e,t+1,1),day:Lt(e,t+2,1)},null,t+3]}),zt,At,jt),sn=Dt(Ft,zt,At,jt),an=Dt($t,zt,At,jt),on=Dt(zt,At,jt);const ln=Dt(zt);const un=Nt(/(\d{4})-(\d\d)-(\d\d)/,Zt),cn=Nt(Wt),hn=Dt(zt,At,jt);const dn="Invalid Duration",mn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},fn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...mn},yn=365.2425,gn=30.436875,wn={years:{quarters:4,months:12,weeks:52.1775,days:yn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:gn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...mn},vn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],pn=vn.slice(0).reverse();function kn(e,t){const n={values:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new bn(n)}function Sn(e,t){let n=t.milliseconds??0;for(const r of pn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function Tn(e,t){const n=Sn(e,t)<0?-1:1;vn.reduceRight(((r,s)=>{if(We(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s}),null),vn.reduce(((n,r)=>{if(We(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r}),null)}class bn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?wn:fn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||te.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return bn.fromObject({milliseconds:e},t)}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"!==typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new bn({values:it(e,bn.normalizeUnit),loc:te.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(Ze(e))return bn.fromMillis(e);if(bn.isDuration(e))return e;if("object"===typeof e)return bn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Mt(e,[Ut,_t])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Mt(e,[qt,ln])}(e);return n?bn.fromObject(n,t):bn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof ke?e:new ke(e,t);if(pe.throwOnInvalid)throw new a(n);return new bn({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():e];if(!t)throw new l(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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?bt.create(this.loc,n).formatDurationFromString(this,e):dn}toHuman(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return dn;const t=vn.map((t=>{const n=this.values[t];return We(n)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(n)})).filter((e=>e));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 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Je(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return yr.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?Sn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=bn.fromDurationLike(e),n={};for(const r of vn)(qe(t.values,r)||qe(this.values,r))&&(n[r]=t.get(r)+this.get(r));return kn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=bn.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]=st(e(this.values[n],n));return kn(this,{values:t},!0)}get(e){return this[bn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return kn(this,{values:{...this.values,...it(e,bn.normalizeUnit)}})}reconfigure(){let{locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return kn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return Tn(this.matrix,e),kn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return kn(this,{values:function(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}(this.normalize().shiftToAll().toObject())},!0)}shiftTo(){for(var e=arguments.length,t=new Array(e),n=0;nbn.normalizeUnit(e)));const r={},s={},i=this.toObject();let a;for(const o of vn)if(t.indexOf(o)>=0){a=o;let e=0;for(const n in s)e+=this.matrix[n][o]*s[n],s[n]=0;Ze(i[o])&&(e+=i[o]);const t=Math.trunc(e);r[o]=t,s[o]=(1e3*e-1e3*t)/1e3}else Ze(i[o])&&(s[o]=i[o]);for(const o in s)0!==s[o]&&(r[a]+=o===a?s[o]:s[o]/this.matrix[a][o]);return Tn(this.matrix,r),kn(this,{values:r},!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]=0===this.values[t]?0:-this.values[t];return kn(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 null===this.invalid}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)return!1;if(!this.loc.equals(e.loc))return!1;for(const r of vn)if(t=this.values[r],n=e.values[r],!(void 0===t||0===t?void 0===n||0===n:t===n))return!1;var t,n;return!0}}const On="Invalid Interval";class Nn{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof ke?e:new ke(e,t);if(pe.throwOnInvalid)throw new i(n);return new Nn({invalid:n})}static fromDateTimes(e,t){const n=gr(e),r=gr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t0&&void 0!==arguments[0]?arguments[0]:"milliseconds";return this.isValid?this.toDuration(e).get(e):NaN}count(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1?arguments[1]:void 0;if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set(){let{start:e,end:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?Nn.fromDateTimes(e||this.s,t||this.e):this}splitAt(){if(!this.isValid)return[];for(var e=arguments.length,t=new Array(e),n=0;nthis.contains(e))).sort(((e,t)=>e.toMillis()-t.toMillis())),s=[];let{s:i}=this,a=0;for(;i+this.e?this.e:e;s.push(Nn.fromDateTimes(i,t)),i=t,a+=1}return s}splitBy(e){const t=bn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;re*s)));n=+e>+this.e?this.e:e,i.push(Nn.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(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=n?null:Nn.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Nn.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort(((e,t)=>e.s-t.s)).reduce(((e,t)=>{let[n,r]=e;return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]}),[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),i=Array.prototype.concat(...s).sort(((e,t)=>e.time-t.time));for(const a of i)n+="s"===a.type?1:-1,1===n?t=a.time:(t&&+t!==+a.time&&r.push(Nn.fromDateTimes(t,a.time)),t=null);return Nn.merge(r)}difference(){for(var e=arguments.length,t=new Array(e),n=0;nthis.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:On}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?bt.create(this.s.loc.clone(t),e).formatInterval(this):On}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:On}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:On}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:On}toFormat(e){let{separator:t=" \u2013 "}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:On}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):bn.invalid(this.invalidReason)}mapEndpoints(e){return Nn.fromDateTimes(e(this.s),e(this.e))}}class Dn{static hasDST(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pe.defaultZone;const t=yr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return ie(e,pe.defaultZone)}static getStartOfWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||te.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||te.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||te.create(e)).getWeekendDays().slice()}static months(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||te.create(t,n,s)).months(e)}static monthsFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||te.create(t,n,s)).months(e,!0)}static weekdays(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||te.create(t,n,null)).weekdays(e)}static weekdaysFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||te.create(t,n,null)).weekdays(e,!0)}static meridiems(){let{locale:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return te.create(e).meridiems()}static eras(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",{locale:t=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return te.create(t,null,"gregory").eras(e)}static features(){return{relative:ze(),localeWeek:Ae()}}}function Mn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(bn.fromMillis(r).as("days"))}function In(e,t,n,r){let[s,i,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=Mn(e,t);return(n-n%7)/7}],["days",Mn]],s={},i=e;let a,o;for(const[l,u]of r)n.indexOf(l)>=0&&(a=l,s[l]=u(e,t),o=i.plus(s),o>t?(s[l]--,(e=i.plus(s))>t&&(o=e,s[l]--,e=i.plus(s))):e=o);return[e,s,o,a]}(e,t,n);const l=t-s,u=n.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===u.length&&(a0?bn.fromMillis(l,r).shiftTo(...u).plus(c):c}function Vn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return{regex:e,deser:e=>{let[n]=e;return t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(n))}}}const xn=`[ ${String.fromCharCode(160)}]`,En=new RegExp(xn,"g");function Cn(e){return e.replace(/\./g,"\\.?").replace(En,xn)}function Fn(e){return e.replace(/\./g,"").replace(En," ").toLowerCase()}function $n(e,t){return null===e?null:{regex:RegExp(e.map(Cn).join("|")),deser:n=>{let[r]=n;return e.findIndex((e=>Fn(r)===Fn(e)))+t}}}function Wn(e,t){return{regex:e,deser:e=>{let[,t,n]=e;return rt(t,n)},groups:t}}function Zn(e){return{regex:e,deser:e=>{let[t]=e;return t}}}const Ln={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"}};let zn=null;function An(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const n=Un(bt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t))))}class jn{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=An(bt.parseFormat(t),e),this.units=this.tokens.map((t=>function(e,t){const n=ce(t),r=ce(t,"{2}"),s=ce(t,"{3}"),i=ce(t,"{4}"),a=ce(t,"{6}"),o=ce(t,"{1,2}"),l=ce(t,"{1,3}"),u=ce(t,"{1,6}"),c=ce(t,"{1,9}"),h=ce(t,"{2,4}"),d=ce(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:e=>{let[t]=e;return t},literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return $n(t.eras("short"),0);case"GG":return $n(t.eras("long"),0);case"y":return Vn(u);case"yy":case"kk":return Vn(h,tt);case"yyyy":case"kkkk":return Vn(i);case"yyyyy":return Vn(d);case"yyyyyy":return Vn(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Vn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Vn(r);case"MMM":return $n(t.months("short",!0),1);case"MMMM":return $n(t.months("long",!0),1);case"LLL":return $n(t.months("short",!1),1);case"LLLL":return $n(t.months("long",!1),1);case"o":case"S":return Vn(l);case"ooo":case"SSS":return Vn(s);case"u":return Zn(c);case"uu":return Zn(o);case"uuu":case"E":case"c":return Vn(n);case"a":return $n(t.meridiems(),0);case"EEE":return $n(t.weekdays("short",!1),1);case"EEEE":return $n(t.weekdays("long",!1),1);case"ccc":return $n(t.weekdays("short",!0),1);case"cccc":return $n(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Wn(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Zn(/[a-z_+-/]{1,256}?/i);case" ":return Zn(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e))),this.disqualifyingUnit=this.units.find((e=>e.invalidReason)),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(qe(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return We(e.z)||(n=U.create(e.z)),We(e.Z)||(n||(n=new re(e.Z)),t=e.Z),We(e.q)||(e.M=3*(e.q-1)+1),We(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),We(e.u)||(e.S=Pe(e.u)),[Object.keys(e).reduce(((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t}),{}),n,t]}(n):[null,null,void 0];if(qe(n,"a")&&qe(n,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function qn(e,t,n){return new jn(e,n).explainFromTokens(t)}function Un(e,t){if(!e)return null;const n=bt.create(t,e).dtFormatter((zn||(zn=yr.fromMillis(1555555555555)),zn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map((t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=Ln[a];if("object"===typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s)))}const _n="Invalid DateTime",Yn=864e13;function Hn(e){return new ke("unsupported zone",`the zone "${e.name}" is not supported`)}function Rn(e){return null===e.weekData&&(e.weekData=Ie(e.c)),e.weekData}function Pn(e){return null===e.localWeekData&&(e.localWeekData=Ie(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Jn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new yr({...n,...t,old:n})}function Gn(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function Bn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function Qn(e,t,n){return Gn(Ke(e),t,n)}function Kn(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,Qe(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=bn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=Ke(i);let[l,u]=Gn(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function Xn(e,t,n,r,s,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,s=yr.fromObject(e,{...n,zone:r,specificOffset:i});return a?s:s.setZone(o)}return yr.invalid(new ke("unparsable",`the input "${s}" can't be parsed as ${r}`))}function er(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.isValid?bt.create(te.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function tr(e,t){const n=e.c.year>9999||e.c.year<0;let r="";return n&&e.c.year>=0&&(r+="+"),r+=Ye(e.c.year,n?6:4),t?(r+="-",r+=Ye(e.c.month),r+="-",r+=Ye(e.c.day)):(r+=Ye(e.c.month),r+=Ye(e.c.day)),r}function nr(e,t,n,r,s,i){let a=Ye(e.c.hour);return t?(a+=":",a+=Ye(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=":")):a+=Ye(e.c.minute),0===e.c.millisecond&&0===e.c.second&&n||(a+=Ye(e.c.second),0===e.c.millisecond&&r||(a+=".",a+=Ye(e.c.millisecond,3))),s&&(e.isOffsetFixed&&0===e.offset&&!i?a+="Z":e.o<0?(a+="-",a+=Ye(Math.trunc(-e.o/60)),a+=":",a+=Ye(Math.trunc(-e.o%60))):(a+="+",a+=Ye(Math.trunc(e.o/60)),a+=":",a+=Ye(Math.trunc(e.o%60)))),i&&(a+="["+e.zone.ianaName+"]"),a}const rr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},sr={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ir={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ar=["year","month","day","hour","minute","second","millisecond"],or=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],lr=["year","ordinal","hour","minute","second","millisecond"];function ur(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return function(e){const t={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"}[e.toLowerCase()];if(!t)throw new l(e);return t}(e)}}function cr(e,t){const n=ie(t.zone,pe.defaultZone);if(!n.isValid)return yr.invalid(Hn(n));const r=te.fromObject(t);let s,i;if(We(e.year))s=pe.now();else{for(const n of ar)We(e[n])&&(e[n]=rr[n]);const t=Fe(e)||$e(e);if(t)return yr.invalid(t);const r=function(e){return fr[e]||(void 0===mr&&(mr=pe.now()),fr[e]=e.offset(mr)),fr[e]}(n);[s,i]=Qn(e,r,n)}return new yr({ts:s,zone:n,loc:r,o:i})}function hr(e,t,n){const r=!!We(n.round)||n.round,s=(e,s)=>{e=Je(e,r||n.calendary?0:2,!0);return t.loc.clone(n).relFormatter(n).format(e,s)},i=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return s(i(n.unit),n.unit);for(const a of n.units){const e=i(a);if(Math.abs(e)>=1)return s(e,a)}return s(e>t?-0:0,n.units[n.units.length-1])}function dr(e){let t,n={};return e.length>0&&"object"===typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let mr,fr={};class yr{constructor(e){const t=e.zone||pe.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new ke("invalid input"):null)||(t.isValid?null:Hn(t));this.ts=We(e.ts)?pe.now():e.ts;let r=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=Ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Bn(this.ts,i),n=Number.isNaN(r.year)?new ke("invalid input"):null,r=n?null:r,s=n?null:i}}this._zone=t,this.loc=e.loc||te.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new yr({})}static local(){const[e,t]=dr(arguments),[n,r,s,i,a,o,l]=t;return cr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=dr(arguments),[n,r,s,i,a,o,l]=t;return e.zone=re.utcInstance,cr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:l},e)}static fromJSDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return yr.invalid("invalid input");const s=ie(t.zone,pe.defaultZone);return s.isValid?new yr({ts:n,zone:s,loc:te.fromObject(t)}):yr.invalid(Hn(s))}static fromMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ze(e))return e<-Yn||e>Yn?yr.invalid("Timestamp out of range"):new yr({ts:e,zone:ie(t.zone,pe.defaultZone),loc:te.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(Ze(e))return new yr({ts:1e3*e,zone:ie(t.zone,pe.defaultZone),loc:te.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=e||{};const n=ie(t.zone,pe.defaultZone);if(!n.isValid)return yr.invalid(Hn(n));const r=te.fromObject(t),s=it(e,ur),{minDaysInFirstWeek:i,startOfWeek:a}=Ce(s,r),l=pe.now(),u=We(t.specificOffset)?n.offset(l):t.specificOffset,c=!We(s.ordinal),h=!We(s.year),d=!We(s.month)||!We(s.day),m=h||d,f=s.weekYear||s.weekNumber;if((m||c)&&f)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new o("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,w,v=Bn(l,u);y?(g=or,w=sr,v=Ie(v,i,a)):c?(g=lr,w=ir,v=xe(v)):(g=ar,w=rr);let p=!1;for(const o of g){We(s[o])?s[o]=p?w[o]:v[o]:p=!0}const k=y?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=Le(e.weekYear),s=_e(e.weekNumber,1,et(e.weekYear,t,n)),i=_e(e.weekday,1,7);return r?s?!i&&be("weekday",e.weekday):be("week",e.weekNumber):be("weekYear",e.weekYear)}(s,i,a):c?function(e){const t=Le(e.year),n=_e(e.ordinal,1,Be(e.year));return t?!n&&be("ordinal",e.ordinal):be("year",e.year)}(s):Fe(s),S=k||$e(s);if(S)return yr.invalid(S);const T=y?Ve(s,i,a):c?Ee(s):s,[b,O]=Qn(T,u,n),N=new yr({ts:b,zone:n,o:O,loc:r});return s.weekday&&m&&e.weekday!==N.weekday?yr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${N.toISO()}`):N.isValid?N:yr.invalid(N.invalid)}static fromISO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Mt(e,[Xt,rn],[en,sn],[tn,an],[nn,on])}(e);return Xn(n,r,t,"ISO 8601",e)}static fromRFC2822(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Mt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Rt,Pt])}(e);return Xn(n,r,t,"RFC 2822",e)}static fromHTTP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Mt(e,[Jt,Qt],[Gt,Qt],[Bt,Kt])}(e);return Xn(n,r,t,"HTTP",t)}static fromFormat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(We(e)||We(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=te.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[a,o,l,c]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:a}=qn(e,t,n);return[r,s,i,a]}(i,e,t);return c?yr.invalid(c):Xn(a,o,n,`format ${t}`,e,l)}static fromString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return yr.fromFormat(e,t,n)}static fromSQL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Mt(e,[un,rn],[cn,hn])}(e);return Xn(n,r,t,"SQL",e)}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof ke?e:new ke(e,t);if(pe.throwOnInvalid)throw new s(n);return new yr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Un(e,te.fromObject(t));return n?n.map((e=>e?e.val:null)).join(""):null}static expandFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return An(bt.parseFormat(e),te.fromObject(t)).map((e=>e.val)).join("")}static resetCache(){mr=void 0,fr={}}get(e){return this[e]}get isValid(){return null===this.invalid}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?Rn(this).weekYear:NaN}get weekNumber(){return this.isValid?Rn(this).weekNumber:NaN}get weekday(){return this.isValid?Rn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Pn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Pn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Pn(this).weekYear:NaN}get ordinal(){return this.isValid?xe(this.c).ordinal:NaN}get monthShort(){return this.isValid?Dn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Dn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Dn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Dn.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&&(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=Ke(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),a=this.zone.offset(n-s*t);if(i===a)return[this];const o=n-i*t,l=n-a*t,u=Bn(o,i),c=Bn(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Jn(this,{ts:o}),Jn(this,{ts:l})]:[this]}get isInLeapYear(){return Ge(this.year)}get daysInMonth(){return Qe(this.year,this.month)}get daysInYear(){return this.isValid?Be(this.year):NaN}get weeksInWeekYear(){return this.isValid?et(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?et(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{locale:t,numberingSystem:n,calendar:r}=bt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setZone(re.instance(e),t)}toLocal(){return this.setZone(pe.defaultZone)}setZone(e){let{keepLocalTime:t=!1,keepCalendarTime:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=ie(e,pe.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=Qn(n,t,e)}return Jn(this,{ts:r,zone:e})}return yr.invalid(Hn(e))}reconfigure(){let{locale:e,numberingSystem:t,outputCalendar:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Jn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=it(e,ur),{minDaysInFirstWeek:n,startOfWeek:r}=Ce(t,this.loc),s=!We(t.weekYear)||!We(t.weekNumber)||!We(t.weekday),i=!We(t.ordinal),a=!We(t.year),l=!We(t.month)||!We(t.day),u=a||l,c=t.weekYear||t.weekNumber;if((u||i)&&c)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&i)throw new o("Can't mix ordinal dates with month/day");let h;s?h=Ve({...Ie(this.c,n,r),...t},n,r):We(t.ordinal)?(h={...this.toObject(),...t},We(t.day)&&(h.day=Math.min(Qe(h.year,h.month),h.day))):h=Ee({...xe(this.c),...t});const[d,m]=Qn(h,this.o,this.zone);return Jn(this,{ts:d,o:m})}plus(e){if(!this.isValid)return this;return Jn(this,Kn(this,bn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Jn(this,Kn(this,bn.fromDurationLike(e).negate()))}startOf(e){let{useLocaleWeeks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isValid)return this;const n={},r=bn.normalizeUnit(e);switch(r){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}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?bt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):_n}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?bt.create(this.loc.clone(t),e).formatDateTime(this):_n}toLocaleParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?bt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO(){let{format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const i="extended"===e;let a=tr(this,i);return a+="T",a+=nr(this,i,t,n,r,s),a}toISODate(){let{format:e="extended"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?tr(this,"extended"===e):null}toISOWeekDate(){return er(this,"kkkk-'W'WW-c")}toISOTime(){let{suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?(r?"T":"")+nr(this,"extended"===i,t,e,n,s):null}toRFC2822(){return er(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return er(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?tr(this,!0):null}toSQLTime(){let{includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),er(this,r,!0)}toSQL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():_n}[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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"milliseconds",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isValid||!e.isValid)return bn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(o=t,Array.isArray(o)?o:[o]).map(bn.normalizeUnit),i=e.valueOf()>this.valueOf(),a=In(i?this:e,i?e:this,s,r);var o;return i?a.negate():a}diffNow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.diff(yr.now(),e,t)}until(e){return this.isValid?Nn.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=e.base||yr.fromObject({},{zone:this.zone}),n=e.padding?this0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?hr(e.base||yr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf()),Math.min)}static max(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf()),Math.max)}static fromFormatExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{locale:r=null,numberingSystem:s=null}=n;return qn(te.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return yr.fromFormatExplain(e,t,n)}static buildFormatParser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{locale:n=null,numberingSystem:r=null}=t,s=te.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new jn(s,e)}static fromFormatParser(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(We(e)||We(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=te.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?yr.invalid(c):Xn(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return f}static get DATE_MED(){return y}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return w}static get DATE_HUGE(){return v}static get TIME_SIMPLE(){return p}static get TIME_WITH_SECONDS(){return k}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return b}static get TIME_24_WITH_SECONDS(){return O}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return D}static get DATETIME_SHORT(){return M}static get DATETIME_SHORT_WITH_SECONDS(){return I}static get DATETIME_MED(){return V}static get DATETIME_MED_WITH_SECONDS(){return x}static get DATETIME_MED_WITH_WEEKDAY(){return E}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return F}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return W}}function gr(e){if(yr.isDateTime(e))return e;if(e&&e.valueOf&&Ze(e.valueOf()))return yr.fromJSDate(e);if(e&&"object"===typeof e)return yr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}}]);
-//# sourceMappingURL=241.9da577b1.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/241.9da577b1.chunk.js.map b/web-app/build/static/js/241.9da577b1.chunk.js.map
deleted file mode 100644
index afb6870065f..00000000000
--- a/web-app/build/static/js/241.9da577b1.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/241.9da577b1.chunk.js","mappings":"8HAKA,MAAMA,UAAmBC,OAKlB,MAAMC,UAA6B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,GAAI9uB,GAAS0qB,WAAWoE,GACtB,OAAOA,EACF,GAAIA,GAAeA,EAAY/U,SAAWrX,GAASosB,EAAY/U,WACpE,OAAO/Z,GAASuoB,WAAWuG,GACtB,GAAIA,GAAsC,kBAAhBA,EAC/B,OAAO9uB,GAASlC,WAAWgxB,GAE3B,MAAM,IAAIl+B,EACR,8BAA8Bk+B,qBAA+BA,IAGnE,C","sources":["../node_modules/luxon/src/errors.js","../node_modules/luxon/src/impl/formats.js","../node_modules/luxon/src/zone.js","../node_modules/luxon/src/zones/systemZone.js","../node_modules/luxon/src/zones/IANAZone.js","../node_modules/luxon/src/impl/locale.js","../node_modules/luxon/src/impl/english.js","../node_modules/luxon/src/zones/fixedOffsetZone.js","../node_modules/luxon/src/zones/invalidZone.js","../node_modules/luxon/src/impl/zoneUtil.js","../node_modules/luxon/src/impl/util.js","../node_modules/luxon/src/impl/digits.js","../node_modules/luxon/src/settings.js","../node_modules/luxon/src/impl/invalid.js","../node_modules/luxon/src/impl/conversions.js","../node_modules/luxon/src/impl/formatter.js","../node_modules/luxon/src/impl/regexParser.js","../node_modules/luxon/src/duration.js","../node_modules/luxon/src/interval.js","../node_modules/luxon/src/info.js","../node_modules/luxon/src/impl/diff.js","../node_modules/luxon/src/impl/tokenParser.js","../node_modules/luxon/src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The IANA name of this zone.\n * Defaults to `name` if not overwritten by a subclass.\n * @abstract\n * @type {string}\n */\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet dtfCache = {};\nfunction makeDTF(zone) {\n if (!dtfCache[zone]) {\n dtfCache[zone] = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zone,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n }\n return dtfCache[zone];\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nlet ianaZoneCache = {};\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n if (!ianaZoneCache[name]) {\n ianaZoneCache[name] = new IANAZone(name);\n }\n return ianaZoneCache[name];\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache = {};\n dtfCache = {};\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /**\n * The type of zone. `iana` for all instances of `IANAZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"iana\";\n }\n\n /**\n * The name of this zone (i.e. the IANA zone name).\n * @override\n * @type {string}\n */\n get name() {\n return this.zoneName;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns false for all IANA zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return false;\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @override\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /**\n * Return whether this Zone is valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return this.valid;\n }\n}\n","import { hasLocaleWeekInfo, hasRelative, padStart, roundTo, validateWeekSettings } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlDTCache = {};\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache[key];\n if (!dtf) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache[key] = dtf;\n }\n return dtf;\n}\n\nlet intlNumCache = {};\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache[key];\n if (!inf) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache[key] = inf;\n }\n return inf;\n}\n\nlet intlRelCache = {};\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache[key];\n if (!inf) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache[key] = inf;\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nlet weekInfoCache = {};\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache[locString];\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n weekInfoCache[locString] = data;\n }\n return data;\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n\n const { numberingSystem, calendar } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n\n const intlOpts = { ...this.opts };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts()\n .map(({ value }) => value)\n .join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map((part) => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName,\n });\n return {\n ...part,\n value: offsetName,\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7],\n};\n\n/**\n * @private\n */\n\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(\n opts.locale,\n opts.numberingSystem,\n opts.outputCalendar,\n opts.weekSettings,\n opts.defaultToEN\n );\n }\n\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache = {};\n intlNumCache = {};\n intlRelCache = {};\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n validateWeekSettings(alts.weekSettings) || this.weekSettings,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false) {\n return listStuff(this, length, English.months, () => {\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, \"month\"));\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false) {\n return listStuff(this, length, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems() {\n return listStuff(\n this,\n undefined,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length) {\n return listStuff(this, length, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith(\"en-us\")\n );\n }\n\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n\n toString() {\n return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n }\n}\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /**\n * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"fixed\";\n }\n\n /**\n * The name of this zone.\n * All fixed zones' names always start with \"UTC\" (plus optional offset)\n * @override\n * @type {string}\n */\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /**\n * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n *\n * @override\n * @type {string}\n */\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /**\n * Returns the offset's common name at the specified timestamp.\n *\n * For fixed offset zones this equals to the zone name.\n * @override\n */\n offsetName() {\n return this.name;\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns true for all fixed offset zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return true;\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n *\n * For fixed offset zones, this is constant and does not depend on a timestamp.\n * @override\n * @return {number}\n */\n offset() {\n return this.fixed;\n }\n\n /**\n * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /**\n * Return whether this Zone is valid:\n * All fixed offset zones are valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\nimport SystemZone from \"../zones/systemZone.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\nimport Settings from \"../settings.js\";\nimport { dayOfWeek, isoWeekdayToLocal } from \"./conversions.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasLocaleWeekInfo() {\n try {\n return (\n typeof Intl !== \"undefined\" &&\n !!Intl.Locale &&\n (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype)\n );\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (\n !integerBetween(settings.firstDay, 1, 7) ||\n !integerBetween(settings.minimalDays, 1, 7) ||\n !Array.isArray(settings.weekend) ||\n settings.weekend.some((v) => !integerBetween(v, 1, 7))\n ) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend),\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, towardZero = false) {\n const factor = 10 ** digits,\n rounder = towardZero ? Math.trunc : Math.round;\n return rounder(number * factor) / factor;\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\n\nexport function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || Number.isNaN(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\n// cache of {numberingSystem: {append: regex}}\nlet digitRegexCache = {};\nexport function resetDigitRegexCache() {\n digitRegexCache = {};\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n const ns = numberingSystem || \"latn\";\n\n if (!digitRegexCache[ns]) {\n digitRegexCache[ns] = {};\n }\n if (!digitRegexCache[ns][append]) {\n digitRegexCache[ns][append] = new RegExp(`${numberingSystems[ns]}${append}`);\n }\n\n return digitRegexCache[ns][append];\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport DateTime from \"./datetime.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport { validateWeekSettings } from \"./impl/util.js\";\nimport { resetDigitRegexCache } from \"./impl/digits.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n DateTime.resetCache();\n resetDigitRegexCache();\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n isUndefined,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nexport function dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\nexport function isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return ((isoWeekday - startOfWeek + 7) % 7) + 1;\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nexport function usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData =\n !isUndefined(obj.localWeekday) ||\n !isUndefined(obj.localWeekNumber) ||\n !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData =\n !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\n \"Cannot mix locale-based week fields with ISO-based week fields\"\n );\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek(),\n };\n } else {\n return { minDaysInFirstWeek: 4, startOfWeek: 1 };\n }\n}\n\nexport function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(\n obj.weekNumber,\n 1,\n weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)\n ),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: /^\\s+$/.test(currentFull), val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n }\n\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n\n num(n, p = 0) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"w\":\n return \"week\";\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n default:\n return null;\n }\n },\n tokenToString = (lildur) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n return this.num(lildur.get(mapped), token.length);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));\n return stringifyTokens(tokens, tokenToString(collapsed));\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n isUndefined,\n parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return (m) =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:(Z)|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1),\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3]),\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n /^-?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)?)?)$/;\n\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n },\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr),\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n /^(?:(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)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr,\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 =\n /^(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$/,\n rfc850 =\n /^(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$/,\n ascii =\n /^(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})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\nimport DateTime from \"./datetime.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix,\n };\n return new Duration(conf);\n}\n\nfunction durationToMillis(matrix, vals) {\n let sum = vals.milliseconds ?? 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n\n orderedUnits.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @example\n * ```js\n * var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 day, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 day, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 day, 5 hr, 6 min'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID;\n\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false,\n };\n\n const dateTime = DateTime.fromMillis(millis, { zone: \"UTC\" });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem });\n const opts = { loc, matrix, conversionAccuracy };\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n normalizeValues(this.matrix, built);\n return clone(this, { values: built }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\n \"years\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n );\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport * as Formats from \"./impl/formats.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts?.useLocaleWeeks) {\n end = this.end.reconfigure({ locale: start.locale });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into a equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this)\n : INVALID;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasLocaleWeekInfo, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({ locale = null, locObj = null } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\",\n },\n};\n\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value,\n };\n }\n\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nexport function expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport class TokenParser {\n constructor(locale, format) {\n this.locale = locale;\n this.format = format;\n this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n this.units = this.tokens.map((t) => unitForToken(t, locale));\n this.disqualifyingUnit = this.units.find((t) => t.invalidReason);\n\n if (!this.disqualifyingUnit) {\n const [regexString, handlers] = buildRegex(this.units);\n this.regex = RegExp(regexString, \"i\");\n this.handlers = handlers;\n }\n }\n\n explainFromTokens(input) {\n if (!this.isValid) {\n return { input, tokens: this.tokens, invalidReason: this.invalidReason };\n } else {\n const [rawMatches, matches] = match(input, this.regex, this.handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return {\n input,\n tokens: this.tokens,\n regex: this.regex,\n rawMatches,\n matches,\n result,\n zone,\n specificOffset,\n };\n }\n }\n\n get isValid() {\n return !this.disqualifyingUnit;\n }\n\n get invalidReason() {\n return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n }\n}\n\nexport function explainFromTokens(locale, input, format) {\n const parser = new TokenParser(locale, format);\n return parser.explainFromTokens(input);\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n\nexport function formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport {\n parseFromTokens,\n explainFromTokens,\n formatOptsToTokens,\n expandMacroTokens,\n TokenParser,\n} from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n usesLocalWeekValues,\n isoWeekdayToLocal,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(\n dt.c,\n dt.loc.getMinDaysInFirstWeek(),\n dt.loc.getStartOfWeek()\n );\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if ((parsed && Object.keys(parsed).length !== 0) || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n c += \"-\";\n c += padStart(o.c.day);\n } else {\n c += padStart(o.c.month);\n c += padStart(o.c.day);\n }\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n) {\n let c = padStart(o.c.hour);\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += \":\";\n }\n } else {\n c += padStart(o.c.minute);\n }\n\n if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {\n c += padStart(o.c.second);\n\n if (o.c.millisecond !== 0 || !suppressMilliseconds) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\nfunction guessOffsetForZone(zone) {\n if (!zoneOffsetGuessCache[zone]) {\n if (zoneOffsetTs === undefined) {\n zoneOffsetTs = Settings.now();\n }\n\n zoneOffsetGuessCache[zone] = zone.offset(zoneOffsetTs);\n }\n return zoneOffsetGuessCache[zone];\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n }\n\n const loc = Locale.fromObject(opts);\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = guessOffsetForZone(zone);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = Settings.now();\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, true);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nlet zoneOffsetGuessCache = {};\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n // If an offset has been passed and we have not been called from\n // clone(), we can trust it and avoid the offset calculation.\n const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n if (!inst.isValid) {\n return DateTime.invalid(inst.invalid);\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map((t) => (t ? t.val : null)).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map((t) => t.val).join(\"\");\n }\n\n static resetCache() {\n zoneOffsetTs = undefined;\n zoneOffsetGuessCache = {};\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (\n c1.hour === c2.hour &&\n c1.minute === c2.minute &&\n c1.second === c2.second &&\n c1.millisecond === c2.millisecond\n ) {\n return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid\n ? weeksInWeekYear(\n this.localWeekYear,\n this.loc.getMinDaysInFirstWeek(),\n this.loc.getStartOfWeek()\n )\n : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);\n\n const settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(\n { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },\n minDaysInFirstWeek,\n startOfWeek\n );\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, { useLocaleWeeks = false } = {}) {\n if (!this.isValid) return this;\n\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const { weekday } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit, opts)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @return {string}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext);\n c += \"T\";\n c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @return {string}\n */\n toISODate({ format = \"extended\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return toISODate(this, format === \"extended\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n let c = includePrefix ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return (\n adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts)\n );\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds down by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n /**\n * Build a parser for `fmt` using the given locale. This parser can be passed\n * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n * can be used to optimize cases where many dates need to be parsed in a\n * specific format.\n *\n * @param {String} fmt - the format the string is expected to be in (see\n * description)\n * @param {Object} options - options used to set locale and numberingSystem\n * for parser\n * @returns {TokenParser} - opaque object to be used\n */\n static buildFormatParser(fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return new TokenParser(localeToUse, fmt);\n }\n\n /**\n * Create a DateTime from an input string and format parser.\n *\n * The format parser must have been created with the same locale as this call.\n *\n * @param {String} text - the string to parse\n * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n * @param {Object} opts - options taken by fromFormat()\n * @returns {DateTime}\n */\n static fromFormatParser(text, formatParser, opts = {}) {\n if (isUndefined(text) || isUndefined(formatParser)) {\n throw new InvalidArgumentError(\n \"fromFormatParser requires an input string and a format parser\"\n );\n }\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n\n if (!localeToUse.equals(formatParser.locale)) {\n throw new InvalidArgumentError(\n `fromFormatParser called with a locale of ${localeToUse}, ` +\n `but the format parser was created for ${formatParser.locale}`\n );\n }\n\n const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);\n\n if (invalidReason) {\n return DateTime.invalid(invalidReason);\n } else {\n return parseDataToDateTime(\n result,\n zone,\n opts,\n `format ${formatParser.format}`,\n text,\n specificOffset\n );\n }\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","constructor","reason","super","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hourCycle","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","Zone","type","name","ianaName","this","isUniversal","offsetName","ts","opts","formatOffset","format","offset","equals","otherZone","isValid","singleton","SystemZone","instance","Intl","DateTimeFormat","resolvedOptions","timeZone","_ref","locale","parseZoneInfo","Date","getTimezoneOffset","dtfCache","typeToPos","era","ianaZoneCache","IANAZone","create","resetCache","isValidSpecifier","isValidZone","zone","e","zoneName","valid","date","isNaN","NaN","dtf","hour12","adOrBc","formatToParts","formatted","filled","i","length","value","pos","isUndefined","parseInt","partsOffset","replace","parsed","exec","fMonth","fDay","fYear","fadOrBc","fHour","fMinute","fSecond","hackyOffset","Math","abs","asTS","over","objToLocalTS","millisecond","intlLFCache","intlDTCache","getCachedDTF","locString","arguments","undefined","key","JSON","stringify","intlNumCache","intlRelCache","sysLocaleCache","weekInfoCache","listStuff","loc","englishFn","intlFn","mode","listingMode","PolyNumberFormatter","intl","forceSimple","padTo","floor","otherOpts","Object","keys","intlOpts","useGrouping","minimumIntegerDigits","inf","NumberFormat","getCachedINF","fixed","padStart","roundTo","PolyDateFormatter","dt","z","originalZone","gmtOffset","offsetZ","setZone","plus","minutes","map","join","toJSDate","parts","part","PolyRelFormatter","isEnglish","style","hasRelative","rtf","base","cacheKeyOpts","RelativeTimeFormat","getCachedRTF","count","numeric","narrow","units","years","quarters","months","weeks","days","hours","seconds","lastable","indexOf","isDay","isInPast","is","fmtValue","singular","lilUnits","fmtUnit","English","fallbackWeekSettings","firstDay","minimalDays","weekend","Locale","fromOpts","numberingSystem","outputCalendar","weekSettings","defaultToEN","specifiedLocale","Settings","defaultLocale","localeR","numberingSystemR","defaultNumberingSystem","outputCalendarR","defaultOutputCalendar","weekSettingsR","validateWeekSettings","defaultWeekSettings","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","localeStr","xIndex","substring","uIndex","options","selectedStr","smaller","calendar","parseLocaleString","includes","intlConfigString","weekdaysCache","standalone","monthsCache","meridiemCache","eraCache","fastNumbersCached","fastNumbers","startsWith","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","redefaultToSystem","formatStr","f","ms","DateTime","utc","push","mapMonths","extract","weekdays","mapWeekdays","meridiems","eras","field","matching","dtFormatter","find","m","toLowerCase","numberFormatter","relFormatter","listFormatter","ListFormat","getCachedLF","getWeekSettings","hasLocaleWeekInfo","data","getWeekInfo","weekInfo","getCachedWeekInfo","getStartOfWeek","getMinDaysInFirstWeek","getWeekendDays","other","toString","FixedOffsetZone","utcInstance","parseSpecifier","r","match","signedOffset","InvalidZone","normalizeZone","input","defaultZone","lowered","isNumber","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","split","digitRegexCache","digitRegex","append","ns","RegExp","throwOnInvalid","now","twoDigitCutoffYear","cutoffYear","t","resetCaches","Invalid","explanation","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","d","UTC","setUTCFullYear","getUTCFullYear","js","getUTCDay","computeOrdinal","isLeapYear","uncomputeOrdinal","ordinal","table","month0","findIndex","isoWeekdayToLocal","isoWeekday","startOfWeek","gregorianToWeek","gregObj","minDaysInFirstWeek","weekYear","weekNumber","weeksInWeekYear","timeObject","weekToGregorian","weekData","weekdayOfJan4","yearInDays","daysInYear","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","usesLocalWeekValues","obj","localWeekday","localWeekNumber","localWeekYear","hasInvalidGregorianData","validYear","isInteger","validMonth","integerBetween","validDay","daysInMonth","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","o","prototype","bestBy","arr","by","compare","reduce","best","next","pair","hasOwnProperty","prop","call","settings","Array","isArray","some","v","from","thing","bottom","top","padded","parseInteger","string","parseFloating","parseFloat","parseMillis","fraction","number","digits","factor","trunc","round","modMonth","x","floorMod","firstWeekOffset","weekOffset","weekOffsetNext","untruncateYear","offsetFormat","modified","offHourStr","offMinuteStr","offHour","Number","offMin","asNumber","numericValue","normalizeObject","normalizer","normalized","u","sign","RangeError","a","k","pick","monthsLong","monthsShort","monthsNarrow","weekdaysLong","weekdaysShort","weekdaysNarrow","erasLong","erasShort","erasNarrow","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","Formats","DD","DDD","DDDD","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","parseFormat","fmt","current","currentFull","bracketed","c","charAt","test","formatOpts","systemLoc","formatWithSystemDefault","formatDateTime","formatDateTimeParts","formatInterval","interval","start","formatRange","end","num","p","formatDateTimeFromString","knownEnglish","useDateTimeFormatter","isOffsetFixed","allowZ","meridiem","maybeMacro","slice","quarter","formatDurationFromString","dur","tokenToField","tokens","realTokens","found","concat","lildur","mapped","get","shiftTo","filter","ianaRegex","combineRegexes","_len","regexes","_key","full","source","combineExtractors","_len2","extractors","_key2","ex","mergedVals","mergedZone","cursor","parse","_len3","patterns","_key3","regex","extractor","simpleParse","_len4","_key4","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","extractISOWeekData","extractISOOrdinalData","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOTime","milliseconds","extractISOOffset","local","fullOffset","extractIANAZone","isoTimeOnly","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","extractISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","INVALID","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits","reverseUnits","reverse","conf","values","conversionAccuracy","matrix","Duration","durationToMillis","vals","sum","normalizeValues","reduceRight","previous","previousVal","conv","rollUp","config","accurate","invalid","isLuxonDuration","fromMillis","normalizeUnit","fromDurationLike","durationLike","isDuration","fromISO","text","parseISODuration","fromISOTime","parseISOTimeOnly","week","toFormat","fmtOpts","toHuman","unitDisplay","listStyle","toObject","toISO","toISOTime","millis","toMillis","suppressMilliseconds","suppressSeconds","includePrefix","includeOffset","toJSON","Symbol","for","invalidReason","valueOf","duration","minus","negate","mapUnits","fn","set","reconfigure","as","normalize","rescale","newVals","entries","removeZeroes","shiftToAll","built","accumulated","lastUnit","own","ak","negated","invalidExplanation","v1","v2","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","validateStartEnd","after","before","startIsValid","endIsValid","isInterval","toDuration","startOf","useLocaleWeeks","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","dateTimes","sorted","sort","b","results","added","splitBy","idx","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","final","item","sofar","xor","currentCount","ends","time","difference","toLocaleString","toISODate","dateFormat","separator","mapEndpoints","mapFn","Info","hasDST","proto","isValidIANAZone","locObj","getMinimumDaysInFirstWeek","getWeekendWeekdays","monthsFormat","weekdaysFormat","features","relative","localeWeek","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highWater","lowestOrder","differs","differ","highOrderDiffs","remainingMillis","lowerOrderUnits","intUnit","post","deser","str","code","charCodeAt","search","min","max","parseDigits","spaceOrNBSP","String","fromCharCode","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","_ref2","groups","_ref3","h","simple","_ref4","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","hour24","dummyDateTimeCache","expandMacroTokens","formatOptsToTokens","maybeExpandMacroToken","TokenParser","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","_ref5","unitate","unitForToken","disqualifyingUnit","regexString","handlers","explainFromTokens","rawMatches","matches","all","matchIndex","specificOffset","Z","q","M","G","y","S","toField","dateTimeFromMatches","df","resolvedOpts","isSpace","actualType","tokenForPart","MAX_DATE","unsupportedZone","possiblyCachedWeekData","possiblyCachedLocalWeekData","localWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","extended","longFormat","extendedZone","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedWeekUnits","orderedOrdinalUnits","normalizeUnitWithLocalWeeks","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","quickDT","offsetProvis","zoneOffsetGuessCache","zoneOffsetTs","guessOffsetForZone","diffRelative","calendary","lastOpts","argList","args","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","tsNow","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","validWeek","validWeekday","hasInvalidWeekData","validOrdinal","hasInvalidOrdinalData","gregorian","tsFinal","offsetFinal","parseISODate","fromRFC2822","trim","preprocessRFC2822","parseRFC2822Date","fromHTTP","parseHTTPDate","fromFormat","localeToUse","parseFromTokens","fromString","fromSQL","parseSQL","isDateTime","parseFormatForOpts","localeOpts","tokenList","expandFormat","ceil","isWeekend","monthShort","monthLong","weekdayShort","weekdayLong","offsetNameShort","offsetNameLong","isInDST","getPossibleOffsets","dayMs","minuteMs","oEarlier","oLater","o1","ts1","ts2","c1","c2","isInLeapYear","weeksInLocalWeekYear","resolvedLocaleOptions","toLocal","keepCalendarTime","newTS","offsetGuess","asObj","setLocale","settingWeekStuff","mixed","normalizedUnit","endOf","toLocaleParts","ext","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","includeZone","includeOffsetSpace","toSQL","toSeconds","toUnixInteger","toBSON","includeConfig","otherDateTime","durOpts","otherIsLater","diffed","diffNow","until","inputMs","adjustedToZone","toRelative","padding","toRelativeCalendar","every","fromFormatExplain","fromStringExplain","buildFormatParser","fromFormatParser","formatParser","dateTimeish"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/28.433aeaa6.chunk.js b/web-app/build/static/js/28.433aeaa6.chunk.js
new file mode 100644
index 00000000000..5d2a21e0912
--- /dev/null
+++ b/web-app/build/static/js/28.433aeaa6.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[28],{28(e,t,n){n.d(t,{c9:()=>pr,dw:()=>Mn});class r extends Error{}class s extends r{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class i extends r{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class a extends r{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class o extends r{}class l extends r{constructor(e){super(`Invalid unit ${e}`)}}class u extends r{}class c extends r{constructor(){super("Zone is an abstract class")}}const h="numeric",d="short",m="long",f={year:h,month:h,day:h},y={year:h,month:d,day:h},g={year:h,month:d,day:h,weekday:d},w={year:h,month:m,day:h},v={year:h,month:m,day:h,weekday:m},p={hour:h,minute:h},k={hour:h,minute:h,second:h},S={hour:h,minute:h,second:h,timeZoneName:d},T={hour:h,minute:h,second:h,timeZoneName:m},b={hour:h,minute:h,hourCycle:"h23"},O={hour:h,minute:h,second:h,hourCycle:"h23"},N={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:d},M={hour:h,minute:h,second:h,hourCycle:"h23",timeZoneName:m},D={year:h,month:h,day:h,hour:h,minute:h},I={year:h,month:h,day:h,hour:h,minute:h,second:h},V={year:h,month:d,day:h,hour:h,minute:h},x={year:h,month:d,day:h,hour:h,minute:h,second:h},E={year:h,month:d,day:h,weekday:d,hour:h,minute:h},C={year:h,month:m,day:h,hour:h,minute:h,timeZoneName:d},F={year:h,month:m,day:h,hour:h,minute:h,second:h,timeZoneName:d},$={year:h,month:m,day:h,weekday:m,hour:h,minute:h,timeZoneName:m},W={year:h,month:m,day:h,weekday:m,hour:h,minute:h,second:h,timeZoneName:m};class Z{get type(){throw new c}get name(){throw new c}get ianaName(){return this.name}get isUniversal(){throw new c}offsetName(e,t){throw new c}formatOffset(e,t){throw new c}offset(e){throw new c}equals(e){throw new c}get isValid(){throw new c}}let L=null;class z extends Z{static get instance(){return null===L&&(L=new z),L}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return st(e,n,r)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}const A=new Map;const j={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};const q=new Map;class U extends Z{static create(e){let t=q.get(e);return void 0===t&&q.set(e,t=new U(e)),t}static resetCache(){q.clear(),A.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(t){return!1}}constructor(e){super(),this.zoneName=e,this.valid=U.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,t){let{format:n,locale:r}=t;return st(e,n,r,this.name)}formatOffset(e,t){return lt(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const n=function(e){let t=A.get(e);return void 0===t&&(t=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:e,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),A.set(e,t)),t}(this.name);let[r,s,i,a,o,l,u]=n.formatToParts?function(e,t){const n=e.formatToParts(t),r=[];for(let s=0;s=0?h:1e3+h,(et({year:r,month:s,day:i,hour:24===o?0:o,minute:l,second:u,millisecond:0})-c)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let _={};const Y=new Map;function R(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=Y.get(n);return void 0===r&&(r=new Intl.DateTimeFormat(e,t),Y.set(n,r)),r}const H=new Map;const P=new Map;let J=null;const G=new Map;function B(e){let t=G.get(e);return void 0===t&&(t=new Intl.DateTimeFormat(e).resolvedOptions(),G.set(e,t)),t}const Q=new Map;function K(e,t,n,r){const s=e.listingMode();return"error"===s?null:"en"===s?n(t):r(t)}class X{constructor(e,t,n){this.padTo=n.padTo||0,this.floor=n.floor||!1;const{padTo:r,floor:s,...i}=n;if(!t||Object.keys(i).length>0){const t={useGrouping:!1,...n};n.padTo>0&&(t.minimumIntegerDigits=n.padTo),this.inf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=H.get(n);return void 0===r&&(r=new Intl.NumberFormat(e,t),H.set(n,r)),r}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return He(this.floor?Math.floor(e):Be(e,3),this.padTo)}}class ee{constructor(e,t,n){let r;if(this.opts=n,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,n=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&U.create(n).valid?(r=n,this.dt=e):(r="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,r=e.zone.name):(r="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const s={...this.opts};s.timeZone=s.timeZone||r,this.dtf=R(t,s)}format(){return this.originalZone?this.formatToParts().map(e=>{let{value:t}=e;return t}).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class te{constructor(e,t,n){this.opts={style:"long",...n},!t&&je()&&(this.rtf=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{base:n,...r}=t,s=JSON.stringify([e,r]);let i=P.get(s);return void 0===i&&(i=new Intl.RelativeTimeFormat(e,t),P.set(s,i)),i}(e,n))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"always",r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},i=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===n&&i){const n="days"===e;switch(t){case 1:return n?"tomorrow":`next ${s[e][0]}`;case-1:return n?"yesterday":`last ${s[e][0]}`;case 0:return n?"today":`this ${s[e][0]}`}}const a=Object.is(t,-0)||t<0,o=Math.abs(t),l=1===o,u=s[e],c=r?l?u[1]:u[2]||u[1]:l?s[e][0]:e;return a?`${o} ${c} ago`:`in ${o} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const ne={firstDay:1,minimalDays:4,weekend:[6,7]};class re{static fromOpts(e){return re.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,n,r){let s=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const i=e||Se.defaultLocale,a=i||(s?"en-US":J||(J=(new Intl.DateTimeFormat).resolvedOptions().locale,J)),o=t||Se.defaultNumberingSystem,l=n||Se.defaultOutputCalendar,u=Ye(r)||Se.defaultWeekSettings;return new re(a,o,l,u,i)}static resetCache(){J=null,Y.clear(),H.clear(),P.clear(),G.clear(),Q.clear()}static fromObject(){let{locale:e,numberingSystem:t,outputCalendar:n,weekSettings:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return re.create(e,t,n,r)}constructor(e,t,n,r,s){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const n=e.indexOf("-u-");if(-1===n)return[e];{let t,s;try{t=R(e).resolvedOptions(),s=e}catch(r){const i=e.substring(0,n);t=R(i).resolvedOptions(),s=i}const{numberingSystem:i,calendar:a}=t;return[s,i,a]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=n||o||null,this.weekSettings=r,this.intl=function(e,t,n){return n||t?(e.includes("-u-")||(e+="-u"),n&&(e+=`-ca-${n}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===B(e.locale).numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(null===this.numberingSystem||"latn"===this.numberingSystem)&&(null===this.outputCalendar||"gregory"===this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?re.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,Ye(e.weekSettings)||this.weekSettings,e.defaultToEN||!1):this}redefaultToEN(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!0})}redefaultToSystem(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.clone({...e,defaultToEN:!1})}months(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return K(this,e,mt,()=>{const n="ja"===this.intl||this.intl.startsWith("ja-");t&=!n;const r=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";if(!this.monthsCache[s][e]){const t=n?e=>this.dtFormatter(e,r).format():e=>this.extract(e,r,"month");this.monthsCache[s][e]=function(e){const t=[];for(let n=1;n<=12;n++){const r=pr.utc(2009,n,1);t.push(e(r))}return t}(t)}return this.monthsCache[s][e]})}weekdays(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return K(this,e,wt,()=>{const n=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},r=t?"format":"standalone";return this.weekdaysCache[r][e]||(this.weekdaysCache[r][e]=function(e){const t=[];for(let n=1;n<=7;n++){const r=pr.utc(2016,11,13+n);t.push(e(r))}return t}(e=>this.extract(e,n,"weekday"))),this.weekdaysCache[r][e]})}meridiems(){return K(this,void 0,()=>vt,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[pr.utc(2016,11,13,9),pr.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return K(this,e,Tt,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[pr.utc(-40,1,1),pr.utc(2017,1,1)].map(e=>this.extract(e,t,"era"))),this.eraCache[e]})}extract(e,t,n){const r=this.dtFormatter(e,t).formatToParts().find(e=>e.type.toLowerCase()===n);return r?r.value:null}numberFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new X(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new ee(e,this.intl,t)}relFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new te(this.intl,this.isEnglish(),e)}listFormatter(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=JSON.stringify([e,t]);let r=_[n];return r||(r=new Intl.ListFormat(e,t),_[n]=r),r}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||B(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:qe()?function(e){let t=Q.get(e);if(!t){const n=new Intl.Locale(e);t="getWeekInfo"in n?n.getWeekInfo():n.weekInfo,"minimalDays"in t||(t={...ne,...t}),Q.set(e,t)}return t}(this.locale):ne}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 se=null;class ie extends Z{static get utcInstance(){return null===se&&(se=new ie(0)),se}static instance(e){return 0===e?ie.utcInstance:new ie(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new ie(it(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${lt(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${lt(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return lt(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class ae extends Z{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 oe(e,t){if(Le(e)||null===e)return t;if(e instanceof Z)return e;if("string"===typeof e){const n=e.toLowerCase();return"default"===n?t:"local"===n||"system"===n?z.instance:"utc"===n||"gmt"===n?ie.utcInstance:ie.parseSpecifier(n)||U.create(e)}return ze(e)?ie.instance(e):"object"===typeof e&&"offset"in e&&"function"===typeof e.offset?e:new ae(e)}const le={arab:"[\u0660-\u0669]",arabext:"[\u06f0-\u06f9]",bali:"[\u1b50-\u1b59]",beng:"[\u09e6-\u09ef]",deva:"[\u0966-\u096f]",fullwide:"[\uff10-\uff19]",gujr:"[\u0ae6-\u0aef]",hanidec:"[\u3007|\u4e00|\u4e8c|\u4e09|\u56db|\u4e94|\u516d|\u4e03|\u516b|\u4e5d]",khmr:"[\u17e0-\u17e9]",knda:"[\u0ce6-\u0cef]",laoo:"[\u0ed0-\u0ed9]",limb:"[\u1946-\u194f]",mlym:"[\u0d66-\u0d6f]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0b66-\u0b6f]",tamldec:"[\u0be6-\u0bef]",telu:"[\u0c66-\u0c6f]",thai:"[\u0e50-\u0e59]",tibt:"[\u0f20-\u0f29]",latn:"\\d"},ue={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]},ce=le.hanidec.replace(/[\[|\]]/g,"").split("");const he=new Map;function de(e){let{numberingSystem:t}=e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=t||"latn";let s=he.get(r);void 0===s&&(s=new Map,he.set(r,s));let i=s.get(n);return void 0===i&&(i=new RegExp(`${le[r]}${n}`),s.set(n,i)),i}let me,fe=()=>Date.now(),ye="system",ge=null,we=null,ve=null,pe=60,ke=null;class Se{static get now(){return fe}static set now(e){fe=e}static set defaultZone(e){ye=e}static get defaultZone(){return oe(ye,z.instance)}static get defaultLocale(){return ge}static set defaultLocale(e){ge=e}static get defaultNumberingSystem(){return we}static set defaultNumberingSystem(e){we=e}static get defaultOutputCalendar(){return ve}static set defaultOutputCalendar(e){ve=e}static get defaultWeekSettings(){return ke}static set defaultWeekSettings(e){ke=Ye(e)}static get twoDigitCutoffYear(){return pe}static set twoDigitCutoffYear(e){pe=e%100}static get throwOnInvalid(){return me}static set throwOnInvalid(e){me=e}static resetCaches(){re.resetCache(),U.resetCache(),pr.resetCache(),he.clear()}}class Te{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const be=[0,31,59,90,120,151,181,212,243,273,304,334],Oe=[0,31,60,91,121,152,182,213,244,274,305,335];function Ne(e,t){return new Te("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function Me(e,t,n){const r=new Date(Date.UTC(e,t-1,n));e<100&&e>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return 0===s?7:s}function De(e,t,n){return n+(Qe(e)?Oe:be)[t-1]}function Ie(e,t){const n=Qe(e)?Oe:be,r=n.findIndex(e=>e1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{year:r,month:s,day:i}=e,a=De(r,s,i),o=Ve(Me(r,s,i),n);let l,u=Math.floor((a-o+14-t)/7);return u<1?(l=r-1,u=nt(l,t,n)):u>nt(r,t,n)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...ut(e)}}function Ee(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const{weekYear:r,weekNumber:s,weekday:i}=e,a=Ve(Me(r,1,t),n),o=Ke(r);let l,u=7*s+i-a-7+t;u<1?(l=r-1,u+=Ke(l)):u>o?(l=r+1,u-=Ke(r)):l=r;const{month:c,day:h}=Ie(l,u);return{year:l,month:c,day:h,...ut(e)}}function Ce(e){const{year:t,month:n,day:r}=e;return{year:t,ordinal:De(t,n,r),...ut(e)}}function Fe(e){const{year:t,ordinal:n}=e,{month:r,day:s}=Ie(t,n);return{year:t,month:r,day:s,...ut(e)}}function $e(e,t){if(!Le(e.localWeekday)||!Le(e.localWeekNumber)||!Le(e.localWeekYear)){if(!Le(e.weekday)||!Le(e.weekNumber)||!Le(e.weekYear))throw new o("Cannot mix locale-based week fields with ISO-based week fields");return Le(e.localWeekday)||(e.weekday=e.localWeekday),Le(e.localWeekNumber)||(e.weekNumber=e.localWeekNumber),Le(e.localWeekYear)||(e.weekYear=e.localWeekYear),delete e.localWeekday,delete e.localWeekNumber,delete e.localWeekYear,{minDaysInFirstWeek:t.getMinDaysInFirstWeek(),startOfWeek:t.getStartOfWeek()}}return{minDaysInFirstWeek:4,startOfWeek:1}}function We(e){const t=Ae(e.year),n=Re(e.month,1,12),r=Re(e.day,1,Xe(e.year,e.month));return t?n?!r&&Ne("day",e.day):Ne("month",e.month):Ne("year",e.year)}function Ze(e){const{hour:t,minute:n,second:r,millisecond:s}=e,i=Re(t,0,23)||24===t&&0===n&&0===r&&0===s,a=Re(n,0,59),o=Re(r,0,59),l=Re(s,0,999);return i?a?o?!l&&Ne("millisecond",s):Ne("second",r):Ne("minute",n):Ne("hour",t)}function Le(e){return"undefined"===typeof e}function ze(e){return"number"===typeof e}function Ae(e){return"number"===typeof e&&e%1===0}function je(){try{return"undefined"!==typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function qe(){try{return"undefined"!==typeof Intl&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch(e){return!1}}function Ue(e,t,n){if(0!==e.length)return e.reduce((e,r)=>{const s=[t(r),r];return e&&n(e[0],s[0])===e[0]?e:s},null)[1]}function _e(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function Ye(e){if(null==e)return null;if("object"!==typeof e)throw new u("Week settings must be an object");if(!Re(e.firstDay,1,7)||!Re(e.minimalDays,1,7)||!Array.isArray(e.weekend)||e.weekend.some(e=>!Re(e,1,7)))throw new u("Invalid week settings");return{firstDay:e.firstDay,minimalDays:e.minimalDays,weekend:Array.from(e.weekend)}}function Re(e,t,n){return Ae(e)&&e>=t&&e<=n}function He(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;let n;return n=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),n}function Pe(e){return Le(e)||null===e||""===e?void 0:parseInt(e,10)}function Je(e){return Le(e)||null===e||""===e?void 0:parseFloat(e)}function Ge(e){if(!Le(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function Be(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"round";const r=10**t;switch(n){case"expand":return e>0?Math.ceil(e*r)/r:Math.floor(e*r)/r;case"trunc":return Math.trunc(e*r)/r;case"round":return Math.round(e*r)/r;case"floor":return Math.floor(e*r)/r;case"ceil":return Math.ceil(e*r)/r;default:throw new RangeError(`Value rounding ${n} is out of range`)}}function Qe(e){return e%4===0&&(e%100!==0||e%400===0)}function Ke(e){return Qe(e)?366:365}function Xe(e,t){const n=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===n?Qe(e+(t-n)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][n-1]}function et(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function tt(e,t,n){return-Ve(Me(e,1,t),n)+t-1}function nt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=tt(e,t,n),s=tt(e+1,t,n);return(Ke(e)-r+s)/7}function rt(e){return e>99?e:e>Se.twoDigitCutoffYear?1900+e:2e3+e}function st(e,t,n){let r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;const s=new Date(e),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:t,...i},o=new Intl.DateTimeFormat(n,a).formatToParts(s).find(e=>"timezonename"===e.type.toLowerCase());return o?o.value:null}function it(e,t){let n=parseInt(e,10);Number.isNaN(n)&&(n=0);const r=parseInt(t,10)||0;return 60*n+(n<0||Object.is(n,-0)?-r:r)}function at(e){const t=Number(e);if("boolean"===typeof e||""===e||!Number.isFinite(t))throw new u(`Invalid unit value ${e}`);return t}function ot(e,t){const n={};for(const r in e)if(_e(e,r)){const s=e[r];if(void 0===s||null===s)continue;n[t(r)]=at(s)}return n}function lt(e,t){const n=Math.trunc(Math.abs(e/60)),r=Math.trunc(Math.abs(e%60)),s=e>=0?"+":"-";switch(t){case"short":return`${s}${He(n,2)}:${He(r,2)}`;case"narrow":return`${s}${n}${r>0?`:${r}`:""}`;case"techie":return`${s}${He(n,2)}${He(r,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function ut(e){return function(e,t){return t.reduce((t,n)=>(t[n]=e[n],t),{})}(e,["hour","minute","second","millisecond"])}const ct=["January","February","March","April","May","June","July","August","September","October","November","December"],ht=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dt=["J","F","M","A","M","J","J","A","S","O","N","D"];function mt(e){switch(e){case"narrow":return[...dt];case"short":return[...ht];case"long":return[...ct];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 ft=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],yt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],gt=["M","T","W","T","F","S","S"];function wt(e){switch(e){case"narrow":return[...gt];case"short":return[...yt];case"long":return[...ft];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const vt=["AM","PM"],pt=["Before Christ","Anno Domini"],kt=["BC","AD"],St=["B","A"];function Tt(e){switch(e){case"narrow":return[...St];case"short":return[...kt];case"long":return[...pt];default:return null}}function bt(e,t){let n="";for(const r of e)r.literal?n+=r.val:n+=t(r.val);return n}const Ot={D:f,DD:y,DDD:w,DDDD:v,t:p,tt:k,ttt:S,tttt:T,T:b,TT:O,TTT:N,TTTT:M,f:D,ff:V,fff:C,ffff:$,F:I,FF:x,FFF:F,FFFF:W};class Nt{static create(e){return new Nt(e,arguments.length>1&&void 0!==arguments[1]?arguments[1]:{})}static parseFormat(e){let t=null,n="",r=!1;const s=[];for(let i=0;i0||r)&&s.push({literal:r||/^\s+$/.test(n),val:""===n?"'":n}),t=null,n="",r=!r):r||a===t?n+=a:(n.length>0&&s.push({literal:/^\s+$/.test(n),val:n}),n=a,t=a)}return n.length>0&&s.push({literal:r||/^\s+$/.test(n),val:n}),s}static macroTokenToFormatOpts(e){return Ot[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0;if(this.opts.forceSimple)return He(e,t);const r={...this.opts};return t>0&&(r.padTo=t),n&&(r.signDisplay=n),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const n="en"===this.loc.listingMode(),r=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,s=(t,n)=>this.loc.extract(e,t,n),i=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",a=()=>n?function(e){return vt[e.hour<12?0:1]}(e):s({hour:"numeric",hourCycle:"h12"},"dayperiod"),o=(t,r)=>n?function(e,t){return mt(t)[e.month-1]}(e,t):s(r?{month:t}:{month:t,day:"numeric"},"month"),l=(t,r)=>n?function(e,t){return wt(t)[e.weekday-1]}(e,t):s(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),u=t=>{const n=Nt.macroTokenToFormatOpts(t);return n?this.formatWithSystemDefault(e,n):t},c=t=>n?function(e,t){return Tt(t)[e.year<0?0:1]}(e,t):s({era:t},"era");return bt(Nt.parseFormat(t),t=>{switch(t){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 i({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return i({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return i({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 a();case"d":return r?s({day:"numeric"},"day"):this.num(e.day);case"dd":return r?s({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return r?s({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return r?s({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return o("short",!0);case"LLLL":return o("long",!0);case"LLLLL":return o("narrow",!0);case"M":return r?s({month:"numeric"},"month"):this.num(e.month);case"MM":return r?s({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return o("short",!1);case"MMMM":return o("long",!1);case"MMMMM":return o("narrow",!1);case"y":return r?s({year:"numeric"},"year"):this.num(e.year);case"yy":return r?s({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return r?s({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return r?s({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 u(t)}})}formatDurationFromString(e,t){const n="negativeLargestOnly"===this.opts.signMode?-1:1,r=e=>{switch(e[0]){case"S":return"milliseconds";case"s":return"seconds";case"m":return"minutes";case"h":return"hours";case"d":return"days";case"w":return"weeks";case"M":return"months";case"y":return"years";default:return null}},s=Nt.parseFormat(t),i=s.reduce((e,t)=>{let{literal:n,val:r}=t;return n?e:e.concat(r)},[]),a=e.shiftTo(...i.map(r).filter(e=>e));return bt(s,((e,t)=>s=>{const i=r(s);if(i){const r=t.isNegativeDuration&&i!==t.largestUnit?n:1;let a;return a="negativeLargestOnly"===this.opts.signMode&&i!==t.largestUnit?"never":"all"===this.opts.signMode?"always":"auto",this.num(e.get(i)*r,s.length,a)}return s})(a,{isNegativeDuration:a<0,largestUnit:Object.keys(a.values)[0]}))}}const Mt=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Dt(){for(var e=arguments.length,t=new Array(e),n=0;ne+t.source,"");return RegExp(`^${r}$`)}function It(){for(var e=arguments.length,t=new Array(e),n=0;nt.reduce((t,n)=>{let[r,s,i]=t;const[a,o,l]=n(e,i);return[{...r,...a},o||s,l]},[{},null,1]).slice(0,2)}function Vt(e){if(null==e)return[null,null];for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r{const r={};let s;for(s=0;s1&&void 0!==arguments[1]&&arguments[1]||e&&c)?-e:e};return[{years:d(Je(n)),months:d(Je(r)),weeks:d(Je(s)),days:d(Je(i)),hours:d(Je(a)),minutes:d(Je(o)),seconds:d(Je(l),"-0"===l),milliseconds:d(Ge(u),h)}]}const Ht={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Pt(e,t,n,r,s,i,a){const o={year:2===t.length?rt(Pe(t)):Pe(t),month:ht.indexOf(n)+1,day:Pe(r),hour:Pe(s),minute:Pe(i)};return a&&(o.second=Pe(a)),e&&(o.weekday=e.length>3?ft.indexOf(e)+1:yt.indexOf(e)+1),o}const Jt=/^(?:(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 Gt(e){const[,t,n,r,s,i,a,o,l,u,c,h]=e,d=Pt(t,s,r,n,i,a,o);let m;return m=l?Ht[l]:u?0:it(c,h),[d,new ie(m)]}const Bt=/^(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$/,Qt=/^(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$/,Kt=/^(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 Xt(e){const[,t,n,r,s,i,a,o]=e;return[Pt(t,s,r,n,i,a,o),ie.utcInstance]}function en(e){const[,t,n,r,s,i,a,o]=e;return[Pt(t,o,n,r,s,i,a),ie.utcInstance]}const tn=Dt(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,$t),nn=Dt(/(\d{4})-?W(\d\d)(?:-?(\d))?/,$t),rn=Dt(/(\d{4})-?(\d{3})/,$t),sn=Dt(Ft),an=It(function(e,t){return[{year:At(e,t),month:At(e,t+1,1),day:At(e,t+2,1)},null,t+3]},jt,qt,Ut),on=It(Wt,jt,qt,Ut),ln=It(Zt,jt,qt,Ut),un=It(jt,qt,Ut);const cn=It(jt);const hn=Dt(/(\d{4})-(\d\d)-(\d\d)/,zt),dn=Dt(Lt),mn=It(jt,qt,Ut);const fn="Invalid Duration",yn={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},gn={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...yn},wn=365.2425,vn=30.436875,pn={years:{quarters:4,months:12,weeks:52.1775,days:wn,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:vn,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...yn},kn=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Sn=kn.slice(0).reverse();function Tn(e,t){const n={values:arguments.length>2&&void 0!==arguments[2]&&arguments[2]?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new Mn(n)}function bn(e,t){let n=t.milliseconds??0;for(const r of Sn.slice(1))t[r]&&(n+=t[r]*e[r].milliseconds);return n}function On(e,t){const n=bn(e,t)<0?-1:1;kn.reduceRight((r,s)=>{if(Le(t[s]))return r;if(r){const i=t[r]*n,a=e[s][r],o=Math.floor(i/a);t[s]+=o*n,t[r]-=o*a*n}return s},null),kn.reduce((n,r)=>{if(Le(t[r]))return n;if(n){const s=t[n]%1;t[n]-=s,t[r]+=s*e[n][r]}return r},null)}function Nn(e){const t={};for(const[n,r]of Object.entries(e))0!==r&&(t[n]=r);return t}class Mn{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let n=t?pn:gn;e.matrix&&(n=e.matrix),this.values=e.values,this.loc=e.loc||re.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=n,this.isLuxonDuration=!0}static fromMillis(e,t){return Mn.fromObject({milliseconds:e},t)}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null==e||"object"!==typeof e)throw new u("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new Mn({values:ot(e,Mn.normalizeUnit),loc:re.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(ze(e))return Mn.fromMillis(e);if(Mn.isDuration(e))return e;if("object"===typeof e)return Mn.fromObject(e);throw new u(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[n]=function(e){return Vt(e,[Yt,Rt])}(e);return n?Mn.fromObject(n,t):Mn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[n]=function(e){return Vt(e,[_t,cn])}(e);return n?Mn.fromObject(n,t):Mn.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the Duration is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new a(n);return new Mn({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():e];if(!t)throw new l(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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?Nt.create(this.loc,n).formatDurationFromString(this,e):fn}toHuman(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return fn;const t=!1!==e.showZeros,n=kn.map(n=>{const r=this.values[n];return Le(r)||0===r&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:n.slice(0,-1)}).format(r)}).filter(e=>e);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(n)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=Be(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return pr.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?bn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=Mn.fromDurationLike(e),n={};for(const r of kn)(_e(t.values,r)||_e(this.values,r))&&(n[r]=t.get(r)+this.get(r));return Tn(this,{values:n},!0)}minus(e){if(!this.isValid)return this;const t=Mn.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]=at(e(this.values[n],n));return Tn(this,{values:t},!0)}get(e){return this[Mn.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Tn(this,{values:{...this.values,...ot(e,Mn.normalizeUnit)}})}reconfigure(){let{locale:e,numberingSystem:t,conversionAccuracy:n,matrix:r}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Tn(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:r,conversionAccuracy:n})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return On(this.matrix,e),Tn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;return Tn(this,{values:Nn(this.normalize().shiftToAll().toObject())},!0)}shiftTo(){for(var e=arguments.length,t=new Array(e),n=0;nMn.normalizeUnit(e));const r={},s={},i=this.toObject();let a;for(const o of kn)if(t.indexOf(o)>=0){a=o;let e=0;for(const n in s)e+=this.matrix[n][o]*s[n],s[n]=0;ze(i[o])&&(e+=i[o]);const t=Math.trunc(e);r[o]=t,s[o]=(1e3*e-1e3*t)/1e3}else ze(i[o])&&(s[o]=i[o]);for(const o in s)0!==s[o]&&(r[a]+=o===a?s[o]:s[o]/this.matrix[a][o]);return On(this.matrix,r),Tn(this,{values:r},!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]=0===this.values[t]?0:-this.values[t];return Tn(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;return Tn(this,{values:Nn(this.values)},!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 null===this.invalid}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)return!1;if(!this.loc.equals(e.loc))return!1;function t(e,t){return void 0===e||0===e?void 0===t||0===t:e===t}for(const n of kn)if(!t(this.values[n],e.values[n]))return!1;return!0}}const Dn="Invalid Interval";class In{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the Interval is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new i(n);return new In({invalid:n})}static fromDateTimes(e,t){const n=kr(e),r=kr(t),s=function(e,t){return e&&e.isValid?t&&t.isValid?t0&&void 0!==arguments[0]?arguments[0]:"milliseconds";return this.isValid?this.toDuration(e).get(e):NaN}count(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1?arguments[1]:void 0;if(!this.isValid)return NaN;const n=this.start.startOf(e,t);let r;return r=t?.useLocaleWeeks?this.end.reconfigure({locale:n.locale}):this.end,r=r.startOf(e,t),Math.floor(r.diff(n,e).get(e))+(r.valueOf()!==this.end.valueOf())}hasSame(e){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,e))}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return!!this.isValid&&this.s>e}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set(){let{start:e,end:t}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?In.fromDateTimes(e||this.s,t||this.e):this}splitAt(){if(!this.isValid)return[];for(var e=arguments.length,t=new Array(e),n=0;nthis.contains(e)).sort((e,t)=>e.toMillis()-t.toMillis()),s=[];let{s:i}=this,a=0;for(;i+this.e?this.e:e;s.push(In.fromDateTimes(i,t)),i=t,a+=1}return s}splitBy(e){const t=Mn.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let n,{s:r}=this,s=1;const i=[];for(;re*s));n=+e>+this.e?this.e:e,i.push(In.fromDateTimes(r,n)),r=n,s+=1}return i}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(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=n?null:In.fromDateTimes(t,n)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return In.fromDateTimes(t,n)}static merge(e){const[t,n]=e.sort((e,t)=>e.s-t.s).reduce((e,t)=>{let[n,r]=e;return r?r.overlaps(t)||r.abutsStart(t)?[n,r.union(t)]:[n.concat([r]),t]:[n,t]},[[],null]);return n&&t.push(n),t}static xor(e){let t=null,n=0;const r=[],s=e.map(e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}]),i=Array.prototype.concat(...s).sort((e,t)=>e.time-t.time);for(const a of i)n+="s"===a.type?1:-1,1===n?t=a.time:(t&&+t!==+a.time&&r.push(In.fromDateTimes(t,a.time)),t=null);return In.merge(r)}difference(){for(var e=arguments.length,t=new Array(e),n=0;nthis.intersection(e)).filter(e=>e&&!e.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:Dn}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Nt.create(this.s.loc.clone(t),e).formatInterval(this):Dn}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Dn}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Dn}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Dn}toFormat(e){let{separator:t=" \u2013 "}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Dn}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Mn.invalid(this.invalidReason)}mapEndpoints(e){return In.fromDateTimes(e(this.s),e(this.e))}}class Vn{static hasDST(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Se.defaultZone;const t=pr.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return U.isValidZone(e)}static normalizeZone(e){return oe(e,Se.defaultZone)}static getStartOfWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||re.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||re.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays(){let{locale:e=null,locObj:t=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(t||re.create(e)).getWeekendDays().slice()}static months(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||re.create(t,n,s)).months(e)}static monthsFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null,outputCalendar:s="gregory"}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||re.create(t,n,s)).months(e,!0)}static weekdays(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||re.create(t,n,null)).weekdays(e)}static weekdaysFormat(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"long",{locale:t=null,numberingSystem:n=null,locObj:r=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(r||re.create(t,n,null)).weekdays(e,!0)}static meridiems(){let{locale:e=null}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return re.create(e).meridiems()}static eras(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"short",{locale:t=null}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return re.create(t,null,"gregory").eras(e)}static features(){return{relative:je(),localeWeek:qe()}}}function xn(e,t){const n=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=n(t)-n(e);return Math.floor(Mn.fromMillis(r).as("days"))}function En(e,t,n,r){let[s,i,a,o]=function(e,t,n){const r=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const n=xn(e,t);return(n-n%7)/7}],["days",xn]],s={},i=e;let a,o;for(const[l,u]of r)n.indexOf(l)>=0&&(a=l,s[l]=u(e,t),o=i.plus(s),o>t?(s[l]--,(e=i.plus(s))>t&&(o=e,s[l]--,e=i.plus(s))):e=o);return[e,s,o,a]}(e,t,n);const l=t-s,u=n.filter(e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0);0===u.length&&(a0?Mn.fromMillis(l,r).shiftTo(...u).plus(c):c}function Cn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return{regex:e,deser:e=>{let[n]=e;return t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let n=0;n=n&&r<=s&&(t+=r-n)}}return parseInt(t,10)}return t}(n))}}}const Fn=`[ ${String.fromCharCode(160)}]`,$n=new RegExp(Fn,"g");function Wn(e){return e.replace(/\./g,"\\.?").replace($n,Fn)}function Zn(e){return e.replace(/\./g,"").replace($n," ").toLowerCase()}function Ln(e,t){return null===e?null:{regex:RegExp(e.map(Wn).join("|")),deser:n=>{let[r]=n;return e.findIndex(e=>Zn(r)===Zn(e))+t}}}function zn(e,t){return{regex:e,deser:e=>{let[,t,n]=e;return it(t,n)},groups:t}}function An(e){return{regex:e,deser:e=>{let[t]=e;return t}}}const jn={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"}};let qn=null;function Un(e,t){return Array.prototype.concat(...e.map(e=>function(e,t){if(e.literal)return e;const n=Rn(Nt.macroTokenToFormatOpts(e.val),t);return null==n||n.includes(void 0)?e:n}(e,t)))}class _n{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=Un(Nt.parseFormat(t),e),this.units=this.tokens.map(t=>function(e,t){const n=de(t),r=de(t,"{2}"),s=de(t,"{3}"),i=de(t,"{4}"),a=de(t,"{6}"),o=de(t,"{1,2}"),l=de(t,"{1,3}"),u=de(t,"{1,6}"),c=de(t,"{1,9}"),h=de(t,"{2,4}"),d=de(t,"{4,6}"),m=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:e=>{let[t]=e;return t},literal:!0};var t},f=(f=>{if(e.literal)return m(f);switch(f.val){case"G":return Ln(t.eras("short"),0);case"GG":return Ln(t.eras("long"),0);case"y":return Cn(u);case"yy":case"kk":return Cn(h,rt);case"yyyy":case"kkkk":return Cn(i);case"yyyyy":return Cn(d);case"yyyyyy":return Cn(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return Cn(o);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return Cn(r);case"MMM":return Ln(t.months("short",!0),1);case"MMMM":return Ln(t.months("long",!0),1);case"LLL":return Ln(t.months("short",!1),1);case"LLLL":return Ln(t.months("long",!1),1);case"o":case"S":return Cn(l);case"ooo":case"SSS":return Cn(s);case"u":return An(c);case"uu":return An(o);case"uuu":case"E":case"c":return Cn(n);case"a":return Ln(t.meridiems(),0);case"EEE":return Ln(t.weekdays("short",!1),1);case"EEEE":return Ln(t.weekdays("long",!1),1);case"ccc":return Ln(t.weekdays("short",!0),1);case"cccc":return Ln(t.weekdays("long",!0),1);case"Z":case"ZZ":return zn(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return zn(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return An(/[a-z_+-/]{1,256}?/i);case" ":return An(/[^\S\n\r]/);default:return m(f)}})(e)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"};return f.token=e,f}(t,e)),this.disqualifyingUnit=this.units.find(e=>e.invalidReason),!this.disqualifyingUnit){const[e,t]=[`^${(n=this.units).map(e=>e.regex).reduce((e,t)=>`${e}(${t.source})`,"")}$`,n];this.regex=RegExp(e,"i"),this.handlers=t}var n}explainFromTokens(e){if(this.isValid){const[t,n]=function(e,t,n){const r=e.match(t);if(r){const e={};let t=1;for(const s in n)if(_e(n,s)){const i=n[s],a=i.groups?i.groups+1:1;!i.literal&&i.token&&(e[i.token.val[0]]=i.deser(r.slice(t,t+a))),t+=a}return[r,e]}return[r,{}]}(e,this.regex,this.handlers),[r,s,i]=n?function(e){let t,n=null;return Le(e.z)||(n=U.create(e.z)),Le(e.Z)||(n||(n=new ie(e.Z)),t=e.Z),Le(e.q)||(e.M=3*(e.q-1)+1),Le(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),Le(e.u)||(e.S=Ge(e.u)),[Object.keys(e).reduce((t,n)=>{const r=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(n);return r&&(t[r]=e[n]),t},{}),n,t]}(n):[null,null,void 0];if(_e(n,"a")&&_e(n,"H"))throw new o("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:n,result:r,zone:s,specificOffset:i}}return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Yn(e,t,n){return new _n(e,n).explainFromTokens(t)}function Rn(e,t){if(!e)return null;const n=Nt.create(t,e).dtFormatter((qn||(qn=pr.fromMillis(1555555555555)),qn)),r=n.formatToParts(),s=n.resolvedOptions();return r.map(t=>function(e,t,n){const{type:r,value:s}=e;if("literal"===r){const e=/^\s+$/.test(s);return{literal:!e,val:e?" ":s}}const i=t[r];let a=r;"hour"===r&&(a=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":n.hour12?"hour12":"hour24");let o=jn[a];if("object"===typeof o&&(o=o[i]),o)return{literal:!1,val:o}}(t,e,s))}const Hn="Invalid DateTime",Pn=864e13;function Jn(e){return new Te("unsupported zone",`the zone "${e.name}" is not supported`)}function Gn(e){return null===e.weekData&&(e.weekData=xe(e.c)),e.weekData}function Bn(e){return null===e.localWeekData&&(e.localWeekData=xe(e.c,e.loc.getMinDaysInFirstWeek(),e.loc.getStartOfWeek())),e.localWeekData}function Qn(e,t){const n={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new pr({...n,...t,old:n})}function Kn(e,t,n){let r=e-60*t*1e3;const s=n.offset(r);if(t===s)return[r,t];r-=60*(s-t)*1e3;const i=n.offset(r);return s===i?[r,s]:[e-60*Math.min(s,i)*1e3,Math.max(s,i)]}function Xn(e,t){const n=new Date(e+=60*t*1e3);return{year:n.getUTCFullYear(),month:n.getUTCMonth()+1,day:n.getUTCDate(),hour:n.getUTCHours(),minute:n.getUTCMinutes(),second:n.getUTCSeconds(),millisecond:n.getUTCMilliseconds()}}function er(e,t,n){return Kn(et(e),t,n)}function tr(e,t){const n=e.o,r=e.c.year+Math.trunc(t.years),s=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),i={...e.c,year:r,month:s,day:Math.min(e.c.day,Xe(r,s))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},a=Mn.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),o=et(i);let[l,u]=Kn(o,n,e.zone);return 0!==a&&(l+=a,u=e.zone.offset(l)),{ts:l,o:u}}function nr(e,t,n,r,s,i){const{setZone:a,zone:o}=n;if(e&&0!==Object.keys(e).length||t){const r=t||o,s=pr.fromObject(e,{...n,zone:r,specificOffset:i});return a?s:s.setZone(o)}return pr.invalid(new Te("unparsable",`the input "${s}" can't be parsed as ${r}`))}function rr(e,t){let n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return e.isValid?Nt.create(re.create("en-US"),{allowZ:n,forceSimple:!0}).formatDateTimeFromString(e,t):null}function sr(e,t,n){const r=e.c.year>9999||e.c.year<0;let s="";if(r&&e.c.year>=0&&(s+="+"),s+=He(e.c.year,r?6:4),"year"===n)return s;if(t){if(s+="-",s+=He(e.c.month),"month"===n)return s;s+="-"}else if(s+=He(e.c.month),"month"===n)return s;return s+=He(e.c.day),s}function ir(e,t,n,r,s,i,a){let o=!n||0!==e.c.millisecond||0!==e.c.second,l="";switch(a){case"day":case"month":case"year":break;default:if(l+=He(e.c.hour),"hour"===a)break;if(t){if(l+=":",l+=He(e.c.minute),"minute"===a)break;o&&(l+=":",l+=He(e.c.second))}else{if(l+=He(e.c.minute),"minute"===a)break;o&&(l+=He(e.c.second))}if("second"===a)break;!o||r&&0===e.c.millisecond||(l+=".",l+=He(e.c.millisecond,3))}return s&&(e.isOffsetFixed&&0===e.offset&&!i?l+="Z":e.o<0?(l+="-",l+=He(Math.trunc(-e.o/60)),l+=":",l+=He(Math.trunc(-e.o%60))):(l+="+",l+=He(Math.trunc(e.o/60)),l+=":",l+=He(Math.trunc(e.o%60)))),i&&(l+="["+e.zone.ianaName+"]"),l}const ar={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},or={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},lr={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ur=["year","month","day","hour","minute","second","millisecond"],cr=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],hr=["year","ordinal","hour","minute","second","millisecond"];function dr(e){const t={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"}[e.toLowerCase()];if(!t)throw new l(e);return t}function mr(e){switch(e.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return dr(e)}}function fr(e,t){const n=oe(t.zone,Se.defaultZone);if(!n.isValid)return pr.invalid(Jn(n));const r=re.fromObject(t);let s,i;if(Le(e.year))s=Se.now();else{for(const n of ur)Le(e[n])&&(e[n]=ar[n]);const t=We(e)||Ze(e);if(t)return pr.invalid(t);const r=function(e){if(void 0===wr&&(wr=Se.now()),"iana"!==e.type)return e.offset(wr);const t=e.name;let n=vr.get(t);return void 0===n&&(n=e.offset(wr),vr.set(t,n)),n}(n);[s,i]=er(e,r,n)}return new pr({ts:s,zone:n,loc:r,o:i})}function yr(e,t,n){const r=!!Le(n.round)||n.round,s=Le(n.rounding)?"trunc":n.rounding,i=(e,i)=>{e=Be(e,r||n.calendary?0:2,n.calendary?"round":s);return t.loc.clone(n).relFormatter(n).format(e,i)},a=r=>n.calendary?t.hasSame(e,r)?0:t.startOf(r).diff(e.startOf(r),r).get(r):t.diff(e,r).get(r);if(n.unit)return i(a(n.unit),n.unit);for(const o of n.units){const e=a(o);if(Math.abs(e)>=1)return i(e,o)}return i(e>t?-0:0,n.units[n.units.length-1])}function gr(e){let t,n={};return e.length>0&&"object"===typeof e[e.length-1]?(n=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[n,t]}let wr;const vr=new Map;class pr{constructor(e){const t=e.zone||Se.defaultZone;let n=e.invalid||(Number.isNaN(e.ts)?new Te("invalid input"):null)||(t.isValid?null:Jn(t));this.ts=Le(e.ts)?Se.now():e.ts;let r=null,s=null;if(!n){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[r,s]=[e.old.c,e.old.o];else{const i=ze(e.o)&&!e.old?e.o:t.offset(this.ts);r=Xn(this.ts,i),n=Number.isNaN(r.year)?new Te("invalid input"):null,r=n?null:r,s=n?null:i}}this._zone=t,this.loc=e.loc||re.create(),this.invalid=n,this.weekData=null,this.localWeekData=null,this.c=r,this.o=s,this.isLuxonDateTime=!0}static now(){return new pr({})}static local(){const[e,t]=gr(arguments),[n,r,s,i,a,o,l]=t;return fr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:l},e)}static utc(){const[e,t]=gr(arguments),[n,r,s,i,a,o,l]=t;return e.zone=ie.utcInstance,fr({year:n,month:r,day:s,hour:i,minute:a,second:o,millisecond:l},e)}static fromJSDate(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=(r=e,"[object Date]"===Object.prototype.toString.call(r)?e.valueOf():NaN);var r;if(Number.isNaN(n))return pr.invalid("invalid input");const s=oe(t.zone,Se.defaultZone);return s.isValid?new pr({ts:n,zone:s,loc:re.fromObject(t)}):pr.invalid(Jn(s))}static fromMillis(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ze(e))return e<-Pn||e>Pn?pr.invalid("Timestamp out of range"):new pr({ts:e,zone:oe(t.zone,Se.defaultZone),loc:re.fromObject(t)});throw new u(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(ze(e))return new pr({ts:1e3*e,zone:oe(t.zone,Se.defaultZone),loc:re.fromObject(t)});throw new u("fromSeconds requires a numerical input")}static fromObject(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e=e||{};const n=oe(t.zone,Se.defaultZone);if(!n.isValid)return pr.invalid(Jn(n));const r=re.fromObject(t),s=ot(e,mr),{minDaysInFirstWeek:i,startOfWeek:a}=$e(s,r),l=Se.now(),u=Le(t.specificOffset)?n.offset(l):t.specificOffset,c=!Le(s.ordinal),h=!Le(s.year),d=!Le(s.month)||!Le(s.day),m=h||d,f=s.weekYear||s.weekNumber;if((m||c)&&f)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(d&&c)throw new o("Can't mix ordinal dates with month/day");const y=f||s.weekday&&!m;let g,w,v=Xn(l,u);y?(g=cr,w=or,v=xe(v,i,a)):c?(g=hr,w=lr,v=Ce(v)):(g=ur,w=ar);let p=!1;for(const o of g){Le(s[o])?s[o]=p?w[o]:v[o]:p=!0}const k=y?function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:4,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;const r=Ae(e.weekYear),s=Re(e.weekNumber,1,nt(e.weekYear,t,n)),i=Re(e.weekday,1,7);return r?s?!i&&Ne("weekday",e.weekday):Ne("week",e.weekNumber):Ne("weekYear",e.weekYear)}(s,i,a):c?function(e){const t=Ae(e.year),n=Re(e.ordinal,1,Ke(e.year));return t?!n&&Ne("ordinal",e.ordinal):Ne("year",e.year)}(s):We(s),S=k||Ze(s);if(S)return pr.invalid(S);const T=y?Ee(s,i,a):c?Fe(s):s,[b,O]=er(T,u,n),N=new pr({ts:b,zone:n,o:O,loc:r});return s.weekday&&m&&e.weekday!==N.weekday?pr.invalid("mismatched weekday",`you can't specify both a weekday of ${s.weekday} and a date of ${N.toISO()}`):N.isValid?N:pr.invalid(N.invalid)}static fromISO(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Vt(e,[tn,an],[nn,on],[rn,ln],[sn,un])}(e);return nr(n,r,t,"ISO 8601",e)}static fromRFC2822(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Vt(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[Jt,Gt])}(e);return nr(n,r,t,"RFC 2822",e)}static fromHTTP(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Vt(e,[Bt,Xt],[Qt,Xt],[Kt,en])}(e);return nr(n,r,t,"HTTP",t)}static fromFormat(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Le(e)||Le(t))throw new u("fromFormat requires an input string and a format");const{locale:r=null,numberingSystem:s=null}=n,i=re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),[a,o,l,c]=function(e,t,n){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Yn(e,t,n);return[r,s,i,a]}(i,e,t);return c?pr.invalid(c):nr(a,o,n,`format ${t}`,e,l)}static fromString(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return pr.fromFormat(e,t,n)}static fromSQL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const[n,r]=function(e){return Vt(e,[hn,an],[dn,mn])}(e);return nr(n,r,t,"SQL",e)}static invalid(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!e)throw new u("need to specify a reason the DateTime is invalid");const n=e instanceof Te?e:new Te(e,t);if(Se.throwOnInvalid)throw new s(n);return new pr({invalid:n})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const n=Rn(e,re.fromObject(t));return n?n.map(e=>e?e.val:null).join(""):null}static expandFormat(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return Un(Nt.parseFormat(e),re.fromObject(t)).map(e=>e.val).join("")}static resetCache(){wr=void 0,vr.clear()}get(e){return this[e]}get isValid(){return null===this.invalid}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?Gn(this).weekYear:NaN}get weekNumber(){return this.isValid?Gn(this).weekNumber:NaN}get weekday(){return this.isValid?Gn(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?Bn(this).weekday:NaN}get localWeekNumber(){return this.isValid?Bn(this).weekNumber:NaN}get localWeekYear(){return this.isValid?Bn(this).weekYear:NaN}get ordinal(){return this.isValid?Ce(this.c).ordinal:NaN}get monthShort(){return this.isValid?Vn.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Vn.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Vn.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Vn.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&&(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=et(this.c),r=this.zone.offset(n-e),s=this.zone.offset(n+e),i=this.zone.offset(n-r*t),a=this.zone.offset(n-s*t);if(i===a)return[this];const o=n-i*t,l=n-a*t,u=Xn(o,i),c=Xn(l,a);return u.hour===c.hour&&u.minute===c.minute&&u.second===c.second&&u.millisecond===c.millisecond?[Qn(this,{ts:o}),Qn(this,{ts:l})]:[this]}get isInLeapYear(){return Qe(this.year)}get daysInMonth(){return Xe(this.year,this.month)}get daysInYear(){return this.isValid?Ke(this.year):NaN}get weeksInWeekYear(){return this.isValid?nt(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?nt(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{locale:t,numberingSystem:n,calendar:r}=Nt.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:n,outputCalendar:r}}toUTC(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setZone(ie.instance(e),t)}toLocal(){return this.setZone(Se.defaultZone)}setZone(e){let{keepLocalTime:t=!1,keepCalendarTime:n=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if((e=oe(e,Se.defaultZone)).equals(this.zone))return this;if(e.isValid){let r=this.ts;if(t||n){const t=e.offset(this.ts),n=this.toObject();[r]=er(n,t,e)}return Qn(this,{ts:r,zone:e})}return pr.invalid(Jn(e))}reconfigure(){let{locale:e,numberingSystem:t,outputCalendar:n}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Qn(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:n})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=ot(e,mr),{minDaysInFirstWeek:n,startOfWeek:r}=$e(t,this.loc),s=!Le(t.weekYear)||!Le(t.weekNumber)||!Le(t.weekday),i=!Le(t.ordinal),a=!Le(t.year),l=!Le(t.month)||!Le(t.day),u=a||l,c=t.weekYear||t.weekNumber;if((u||i)&&c)throw new o("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&i)throw new o("Can't mix ordinal dates with month/day");let h;s?h=Ee({...xe(this.c,n,r),...t},n,r):Le(t.ordinal)?(h={...this.toObject(),...t},Le(t.day)&&(h.day=Math.min(Xe(h.year,h.month),h.day))):h=Fe({...Ce(this.c),...t});const[d,m]=er(h,this.o,this.zone);return Qn(this,{ts:d,o:m})}plus(e){if(!this.isValid)return this;return Qn(this,tr(this,Mn.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return Qn(this,tr(this,Mn.fromDurationLike(e).negate()))}startOf(e){let{useLocaleWeeks:t=!1}=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.isValid)return this;const n={},r=Mn.normalizeUnit(e);switch(r){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}if("weeks"===r)if(t){const e=this.loc.getStartOfWeek(),{weekday:t}=this;t1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Nt.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):Hn}toLocaleString(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:f,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.isValid?Nt.create(this.loc.clone(t),e).formatDateTime(this):Hn}toLocaleParts(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?Nt.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO(){let{format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:n=!1,includeOffset:r=!0,extendedZone:s=!1,precision:i="milliseconds"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;i=dr(i);const a="extended"===e;let o=sr(this,a,i);return ur.indexOf(i)>=3&&(o+="T"),o+=ir(this,a,t,n,r,s,i),o}toISODate(){let{format:e="extended",precision:t="day"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?sr(this,"extended"===e,dr(t)):null}toISOWeekDate(){return rr(this,"kkkk-'W'WW-c")}toISOTime(){let{suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:n=!0,includePrefix:r=!1,extendedZone:s=!1,format:i="extended",precision:a="milliseconds"}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?(a=dr(a),(r&&ur.indexOf(a)>=3?"T":"")+ir(this,"extended"===i,t,e,n,s,a)):null}toRFC2822(){return rr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return rr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?sr(this,!0):null}toSQLTime(){let{includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:n=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r="HH:mm:ss.SSS";return(t||e)&&(n&&(r+=" "),t?r+="z":e&&(r+="ZZ")),rr(this,r,!0)}toSQL(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():Hn}[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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};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){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"milliseconds",n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!this.isValid||!e.isValid)return Mn.invalid("created by diffing an invalid DateTime");const r={locale:this.locale,numberingSystem:this.numberingSystem,...n},s=(o=t,Array.isArray(o)?o:[o]).map(Mn.normalizeUnit),i=e.valueOf()>this.valueOf(),a=En(i?this:e,i?e:this,s,r);var o;return i?a.negate():a}diffNow(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"milliseconds",t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.diff(pr.now(),e,t)}until(e){return this.isValid?In.fromDateTimes(this,e):this}hasSame(e,t,n){if(!this.isValid)return!1;const r=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t,n)<=r&&r<=s.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(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.isValid)return null;const t=e.base||pr.fromObject({},{zone:this.zone}),n=e.padding?this0&&void 0!==arguments[0]?arguments[0]:{};return this.isValid?yr(e.base||pr.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf(),Math.min)}static max(){for(var e=arguments.length,t=new Array(e),n=0;ne.valueOf(),Math.max)}static fromFormatExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{locale:r=null,numberingSystem:s=null}=n;return Yn(re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0}),e,t)}static fromStringExplain(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return pr.fromFormatExplain(e,t,n)}static buildFormatParser(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const{locale:n=null,numberingSystem:r=null}=t,s=re.fromOpts({locale:n,numberingSystem:r,defaultToEN:!0});return new _n(s,e)}static fromFormatParser(e,t){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Le(e)||Le(t))throw new u("fromFormatParser requires an input string and a format parser");const{locale:r=null,numberingSystem:s=null}=n,i=re.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});if(!i.equals(t.locale))throw new u(`fromFormatParser called with a locale of ${i}, but the format parser was created for ${t.locale}`);const{result:a,zone:o,specificOffset:l,invalidReason:c}=t.explainFromTokens(e);return c?pr.invalid(c):nr(a,o,n,`format ${t.format}`,e,l)}static get DATE_SHORT(){return f}static get DATE_MED(){return y}static get DATE_MED_WITH_WEEKDAY(){return g}static get DATE_FULL(){return w}static get DATE_HUGE(){return v}static get TIME_SIMPLE(){return p}static get TIME_WITH_SECONDS(){return k}static get TIME_WITH_SHORT_OFFSET(){return S}static get TIME_WITH_LONG_OFFSET(){return T}static get TIME_24_SIMPLE(){return b}static get TIME_24_WITH_SECONDS(){return O}static get TIME_24_WITH_SHORT_OFFSET(){return N}static get TIME_24_WITH_LONG_OFFSET(){return M}static get DATETIME_SHORT(){return D}static get DATETIME_SHORT_WITH_SECONDS(){return I}static get DATETIME_MED(){return V}static get DATETIME_MED_WITH_SECONDS(){return x}static get DATETIME_MED_WITH_WEEKDAY(){return E}static get DATETIME_FULL(){return C}static get DATETIME_FULL_WITH_SECONDS(){return F}static get DATETIME_HUGE(){return $}static get DATETIME_HUGE_WITH_SECONDS(){return W}}function kr(e){if(pr.isDateTime(e))return e;if(e&&e.valueOf&&ze(e.valueOf()))return pr.fromJSDate(e);if(e&&"object"===typeof e)return pr.fromObject(e);throw new u(`Unknown datetime argument: ${e}, of type ${typeof e}`)}}}]);
+//# sourceMappingURL=28.433aeaa6.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/28.433aeaa6.chunk.js.map b/web-app/build/static/js/28.433aeaa6.chunk.js.map
new file mode 100644
index 00000000000..1d095262c93
--- /dev/null
+++ b/web-app/build/static/js/28.433aeaa6.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/28.433aeaa6.ch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,CACX,CAME,oCAAWC,GACT,OAAOA,CACX,CAME,wBAAWC,GACT,OAAOA,CACX,CAME,qCAAWC,GACT,OAAOA,CACX,CAME,wBAAWC,GACT,OAAOA,CACX,CAME,qCAAWC,GACT,OAAOA,CACX,EAMO,SAAS+qB,GAAiBiU,GAC/B,GAAIlxB,GAAS4sB,WAAWsE,GACtB,OAAOA,EACF,GAAIA,GAAeA,EAAY9V,SAAW3Y,GAASyuB,EAAY9V,WACpE,OAAOpb,GAASyqB,WAAWyG,GACtB,GAAIA,GAAsC,kBAAhBA,EAC/B,OAAOlxB,GAAStC,WAAWwzB,GAE3B,MAAM,IAAInhC,EACR,8BAA8BmhC,qBAA+BA,IAGnE,C","sources":["../node_modules/luxon/src/errors.js","../node_modules/luxon/src/impl/formats.js","../node_modules/luxon/src/zone.js","../node_modules/luxon/src/zones/systemZone.js","../node_modules/luxon/src/zones/IANAZone.js","../node_modules/luxon/src/impl/locale.js","../node_modules/luxon/src/impl/english.js","../node_modules/luxon/src/zones/fixedOffsetZone.js","../node_modules/luxon/src/zones/invalidZone.js","../node_modules/luxon/src/impl/zoneUtil.js","../node_modules/luxon/src/impl/util.js","../node_modules/luxon/src/impl/digits.js","../node_modules/luxon/src/settings.js","../node_modules/luxon/src/impl/invalid.js","../node_modules/luxon/src/impl/conversions.js","../node_modules/luxon/src/impl/formatter.js","../node_modules/luxon/src/impl/regexParser.js","../node_modules/luxon/src/duration.js","../node_modules/luxon/src/interval.js","../node_modules/luxon/src/info.js","../node_modules/luxon/src/impl/diff.js","../node_modules/luxon/src/impl/tokenParser.js","../node_modules/luxon/src/datetime.js"],"sourcesContent":["// these aren't really private, but nor are they really useful to document\n\n/**\n * @private\n */\nclass LuxonError extends Error {}\n\n/**\n * @private\n */\nexport class InvalidDateTimeError extends LuxonError {\n constructor(reason) {\n super(`Invalid DateTime: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidIntervalError extends LuxonError {\n constructor(reason) {\n super(`Invalid Interval: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidDurationError extends LuxonError {\n constructor(reason) {\n super(`Invalid Duration: ${reason.toMessage()}`);\n }\n}\n\n/**\n * @private\n */\nexport class ConflictingSpecificationError extends LuxonError {}\n\n/**\n * @private\n */\nexport class InvalidUnitError extends LuxonError {\n constructor(unit) {\n super(`Invalid unit ${unit}`);\n }\n}\n\n/**\n * @private\n */\nexport class InvalidArgumentError extends LuxonError {}\n\n/**\n * @private\n */\nexport class ZoneIsAbstractError extends LuxonError {\n constructor() {\n super(\"Zone is an abstract class\");\n }\n}\n","/**\n * @private\n */\n\nconst n = \"numeric\",\n s = \"short\",\n l = \"long\";\n\nexport const DATE_SHORT = {\n year: n,\n month: n,\n day: n,\n};\n\nexport const DATE_MED = {\n year: n,\n month: s,\n day: n,\n};\n\nexport const DATE_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n};\n\nexport const DATE_FULL = {\n year: n,\n month: l,\n day: n,\n};\n\nexport const DATE_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n};\n\nexport const TIME_SIMPLE = {\n hour: n,\n minute: n,\n};\n\nexport const TIME_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const TIME_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const TIME_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n\nexport const TIME_24_SIMPLE = {\n hour: n,\n minute: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SECONDS = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n};\n\nexport const TIME_24_WITH_SHORT_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: s,\n};\n\nexport const TIME_24_WITH_LONG_OFFSET = {\n hour: n,\n minute: n,\n second: n,\n hourCycle: \"h23\",\n timeZoneName: l,\n};\n\nexport const DATETIME_SHORT = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_SHORT_WITH_SECONDS = {\n year: n,\n month: n,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_MED_WITH_SECONDS = {\n year: n,\n month: s,\n day: n,\n hour: n,\n minute: n,\n second: n,\n};\n\nexport const DATETIME_MED_WITH_WEEKDAY = {\n year: n,\n month: s,\n day: n,\n weekday: s,\n hour: n,\n minute: n,\n};\n\nexport const DATETIME_FULL = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_FULL_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: s,\n};\n\nexport const DATETIME_HUGE = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n timeZoneName: l,\n};\n\nexport const DATETIME_HUGE_WITH_SECONDS = {\n year: n,\n month: l,\n day: n,\n weekday: l,\n hour: n,\n minute: n,\n second: n,\n timeZoneName: l,\n};\n","import { ZoneIsAbstractError } from \"./errors.js\";\n\n/**\n * @interface\n */\nexport default class Zone {\n /**\n * The type of zone\n * @abstract\n * @type {string}\n */\n get type() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The name of this zone.\n * @abstract\n * @type {string}\n */\n get name() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * The IANA name of this zone.\n * Defaults to `name` if not overwritten by a subclass.\n * @abstract\n * @type {string}\n */\n get ianaName() {\n return this.name;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year.\n * @abstract\n * @type {boolean}\n */\n get isUniversal() {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, opts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Returns the offset's value as a string\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @abstract\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @abstract\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n throw new ZoneIsAbstractError();\n }\n\n /**\n * Return whether this Zone is valid.\n * @abstract\n * @type {boolean}\n */\n get isValid() {\n throw new ZoneIsAbstractError();\n }\n}\n","import { formatOffset, parseZoneInfo } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * Represents the local zone for this JavaScript environment.\n * @implements {Zone}\n */\nexport default class SystemZone extends Zone {\n /**\n * Get a singleton instance of the local zone\n * @return {SystemZone}\n */\n static get instance() {\n if (singleton === null) {\n singleton = new SystemZone();\n }\n return singleton;\n }\n\n /** @override **/\n get type() {\n return \"system\";\n }\n\n /** @override **/\n get name() {\n return new Intl.DateTimeFormat().resolvedOptions().timeZone;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale);\n }\n\n /** @override **/\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /** @override **/\n offset(ts) {\n return -new Date(ts).getTimezoneOffset();\n }\n\n /** @override **/\n equals(otherZone) {\n return otherZone.type === \"system\";\n }\n\n /** @override **/\n get isValid() {\n return true;\n }\n}\n","import { formatOffset, parseZoneInfo, isUndefined, objToLocalTS } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nconst dtfCache = new Map();\nfunction makeDTF(zoneName) {\n let dtf = dtfCache.get(zoneName);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(\"en-US\", {\n hour12: false,\n timeZone: zoneName,\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n era: \"short\",\n });\n dtfCache.set(zoneName, dtf);\n }\n return dtf;\n}\n\nconst typeToPos = {\n year: 0,\n month: 1,\n day: 2,\n era: 3,\n hour: 4,\n minute: 5,\n second: 6,\n};\n\nfunction hackyOffset(dtf, date) {\n const formatted = dtf.format(date).replace(/\\u200E/g, \"\"),\n parsed = /(\\d+)\\/(\\d+)\\/(\\d+) (AD|BC),? (\\d+):(\\d+):(\\d+)/.exec(formatted),\n [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;\n return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];\n}\n\nfunction partsOffset(dtf, date) {\n const formatted = dtf.formatToParts(date);\n const filled = [];\n for (let i = 0; i < formatted.length; i++) {\n const { type, value } = formatted[i];\n const pos = typeToPos[type];\n\n if (type === \"era\") {\n filled[pos] = value;\n } else if (!isUndefined(pos)) {\n filled[pos] = parseInt(value, 10);\n }\n }\n return filled;\n}\n\nconst ianaZoneCache = new Map();\n/**\n * A zone identified by an IANA identifier, like America/New_York\n * @implements {Zone}\n */\nexport default class IANAZone extends Zone {\n /**\n * @param {string} name - Zone name\n * @return {IANAZone}\n */\n static create(name) {\n let zone = ianaZoneCache.get(name);\n if (zone === undefined) {\n ianaZoneCache.set(name, (zone = new IANAZone(name)));\n }\n return zone;\n }\n\n /**\n * Reset local caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCache() {\n ianaZoneCache.clear();\n dtfCache.clear();\n }\n\n /**\n * Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.\n * @param {string} s - The string to check validity on\n * @example IANAZone.isValidSpecifier(\"America/New_York\") //=> true\n * @example IANAZone.isValidSpecifier(\"Sport~~blorp\") //=> false\n * @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.\n * @return {boolean}\n */\n static isValidSpecifier(s) {\n return this.isValidZone(s);\n }\n\n /**\n * Returns whether the provided string identifies a real zone\n * @param {string} zone - The string to check\n * @example IANAZone.isValidZone(\"America/New_York\") //=> true\n * @example IANAZone.isValidZone(\"Fantasia/Castle\") //=> false\n * @example IANAZone.isValidZone(\"Sport~~blorp\") //=> false\n * @return {boolean}\n */\n static isValidZone(zone) {\n if (!zone) {\n return false;\n }\n try {\n new Intl.DateTimeFormat(\"en-US\", { timeZone: zone }).format();\n return true;\n } catch (e) {\n return false;\n }\n }\n\n constructor(name) {\n super();\n /** @private **/\n this.zoneName = name;\n /** @private **/\n this.valid = IANAZone.isValidZone(name);\n }\n\n /**\n * The type of zone. `iana` for all instances of `IANAZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"iana\";\n }\n\n /**\n * The name of this zone (i.e. the IANA zone name).\n * @override\n * @type {string}\n */\n get name() {\n return this.zoneName;\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns false for all IANA zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return false;\n }\n\n /**\n * Returns the offset's common name (such as EST) at the specified timestamp\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the name\n * @param {Object} opts - Options to affect the format\n * @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.\n * @param {string} opts.locale - What locale to return the offset name in.\n * @return {string}\n */\n offsetName(ts, { format, locale }) {\n return parseZoneInfo(ts, format, locale, this.name);\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.offset(ts), format);\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n * @override\n * @param {number} ts - Epoch milliseconds for which to compute the offset\n * @return {number}\n */\n offset(ts) {\n if (!this.valid) return NaN;\n const date = new Date(ts);\n\n if (isNaN(date)) return NaN;\n\n const dtf = makeDTF(this.name);\n let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts\n ? partsOffset(dtf, date)\n : hackyOffset(dtf, date);\n\n if (adOrBc === \"BC\") {\n year = -Math.abs(year) + 1;\n }\n\n // because we're using hour12 and https://bugs.chromium.org/p/chromium/issues/detail?id=1025564&can=2&q=%2224%3A00%22%20datetimeformat\n const adjustedHour = hour === 24 ? 0 : hour;\n\n const asUTC = objToLocalTS({\n year,\n month,\n day,\n hour: adjustedHour,\n minute,\n second,\n millisecond: 0,\n });\n\n let asTS = +date;\n const over = asTS % 1000;\n asTS -= over >= 0 ? over : 1000 + over;\n return (asUTC - asTS) / (60 * 1000);\n }\n\n /**\n * Return whether this Zone is equal to another zone\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"iana\" && otherZone.name === this.name;\n }\n\n /**\n * Return whether this Zone is valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return this.valid;\n }\n}\n","import { hasLocaleWeekInfo, hasRelative, padStart, roundTo, validateWeekSettings } from \"./util.js\";\nimport * as English from \"./english.js\";\nimport Settings from \"../settings.js\";\nimport DateTime from \"../datetime.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n// todo - remap caching\n\nlet intlLFCache = {};\nfunction getCachedLF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlLFCache[key];\n if (!dtf) {\n dtf = new Intl.ListFormat(locString, opts);\n intlLFCache[key] = dtf;\n }\n return dtf;\n}\n\nconst intlDTCache = new Map();\nfunction getCachedDTF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let dtf = intlDTCache.get(key);\n if (dtf === undefined) {\n dtf = new Intl.DateTimeFormat(locString, opts);\n intlDTCache.set(key, dtf);\n }\n return dtf;\n}\n\nconst intlNumCache = new Map();\nfunction getCachedINF(locString, opts = {}) {\n const key = JSON.stringify([locString, opts]);\n let inf = intlNumCache.get(key);\n if (inf === undefined) {\n inf = new Intl.NumberFormat(locString, opts);\n intlNumCache.set(key, inf);\n }\n return inf;\n}\n\nconst intlRelCache = new Map();\nfunction getCachedRTF(locString, opts = {}) {\n const { base, ...cacheKeyOpts } = opts; // exclude `base` from the options\n const key = JSON.stringify([locString, cacheKeyOpts]);\n let inf = intlRelCache.get(key);\n if (inf === undefined) {\n inf = new Intl.RelativeTimeFormat(locString, opts);\n intlRelCache.set(key, inf);\n }\n return inf;\n}\n\nlet sysLocaleCache = null;\nfunction systemLocale() {\n if (sysLocaleCache) {\n return sysLocaleCache;\n } else {\n sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;\n return sysLocaleCache;\n }\n}\n\nconst intlResolvedOptionsCache = new Map();\nfunction getCachedIntResolvedOptions(locString) {\n let opts = intlResolvedOptionsCache.get(locString);\n if (opts === undefined) {\n opts = new Intl.DateTimeFormat(locString).resolvedOptions();\n intlResolvedOptionsCache.set(locString, opts);\n }\n return opts;\n}\n\nconst weekInfoCache = new Map();\nfunction getCachedWeekInfo(locString) {\n let data = weekInfoCache.get(locString);\n if (!data) {\n const locale = new Intl.Locale(locString);\n // browsers currently implement this as a property, but spec says it should be a getter function\n data = \"getWeekInfo\" in locale ? locale.getWeekInfo() : locale.weekInfo;\n // minimalDays was removed from WeekInfo: https://github.com/tc39/proposal-intl-locale-info/issues/86\n if (!(\"minimalDays\" in data)) {\n data = { ...fallbackWeekSettings, ...data };\n }\n weekInfoCache.set(locString, data);\n }\n return data;\n}\n\nfunction parseLocaleString(localeStr) {\n // I really want to avoid writing a BCP 47 parser\n // see, e.g. https://github.com/wooorm/bcp-47\n // Instead, we'll do this:\n\n // a) if the string has no -u extensions, just leave it alone\n // b) if it does, use Intl to resolve everything\n // c) if Intl fails, try again without the -u\n\n // private subtags and unicode subtags have ordering requirements,\n // and we're not properly parsing this, so just strip out the\n // private ones if they exist.\n const xIndex = localeStr.indexOf(\"-x-\");\n if (xIndex !== -1) {\n localeStr = localeStr.substring(0, xIndex);\n }\n\n const uIndex = localeStr.indexOf(\"-u-\");\n if (uIndex === -1) {\n return [localeStr];\n } else {\n let options;\n let selectedStr;\n try {\n options = getCachedDTF(localeStr).resolvedOptions();\n selectedStr = localeStr;\n } catch (e) {\n const smaller = localeStr.substring(0, uIndex);\n options = getCachedDTF(smaller).resolvedOptions();\n selectedStr = smaller;\n }\n\n const { numberingSystem, calendar } = options;\n return [selectedStr, numberingSystem, calendar];\n }\n}\n\nfunction intlConfigString(localeStr, numberingSystem, outputCalendar) {\n if (outputCalendar || numberingSystem) {\n if (!localeStr.includes(\"-u-\")) {\n localeStr += \"-u\";\n }\n\n if (outputCalendar) {\n localeStr += `-ca-${outputCalendar}`;\n }\n\n if (numberingSystem) {\n localeStr += `-nu-${numberingSystem}`;\n }\n return localeStr;\n } else {\n return localeStr;\n }\n}\n\nfunction mapMonths(f) {\n const ms = [];\n for (let i = 1; i <= 12; i++) {\n const dt = DateTime.utc(2009, i, 1);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction mapWeekdays(f) {\n const ms = [];\n for (let i = 1; i <= 7; i++) {\n const dt = DateTime.utc(2016, 11, 13 + i);\n ms.push(f(dt));\n }\n return ms;\n}\n\nfunction listStuff(loc, length, englishFn, intlFn) {\n const mode = loc.listingMode();\n\n if (mode === \"error\") {\n return null;\n } else if (mode === \"en\") {\n return englishFn(length);\n } else {\n return intlFn(length);\n }\n}\n\nfunction supportsFastNumbers(loc) {\n if (loc.numberingSystem && loc.numberingSystem !== \"latn\") {\n return false;\n } else {\n return (\n loc.numberingSystem === \"latn\" ||\n !loc.locale ||\n loc.locale.startsWith(\"en\") ||\n getCachedIntResolvedOptions(loc.locale).numberingSystem === \"latn\"\n );\n }\n}\n\n/**\n * @private\n */\n\nclass PolyNumberFormatter {\n constructor(intl, forceSimple, opts) {\n this.padTo = opts.padTo || 0;\n this.floor = opts.floor || false;\n\n const { padTo, floor, ...otherOpts } = opts;\n\n if (!forceSimple || Object.keys(otherOpts).length > 0) {\n const intlOpts = { useGrouping: false, ...opts };\n if (opts.padTo > 0) intlOpts.minimumIntegerDigits = opts.padTo;\n this.inf = getCachedINF(intl, intlOpts);\n }\n }\n\n format(i) {\n if (this.inf) {\n const fixed = this.floor ? Math.floor(i) : i;\n return this.inf.format(fixed);\n } else {\n // to match the browser's numberformatter defaults\n const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);\n return padStart(fixed, this.padTo);\n }\n }\n}\n\n/**\n * @private\n */\n\nclass PolyDateFormatter {\n constructor(dt, intl, opts) {\n this.opts = opts;\n this.originalZone = undefined;\n\n let z = undefined;\n if (this.opts.timeZone) {\n // Don't apply any workarounds if a timeZone is explicitly provided in opts\n this.dt = dt;\n } else if (dt.zone.type === \"fixed\") {\n // UTC-8 or Etc/UTC-8 are not part of tzdata, only Etc/GMT+8 and the like.\n // That is why fixed-offset TZ is set to that unless it is:\n // 1. Representing offset 0 when UTC is used to maintain previous behavior and does not become GMT.\n // 2. Unsupported by the browser:\n // - some do not support Etc/\n // - < Etc/GMT-14, > Etc/GMT+12, and 30-minute or 45-minute offsets are not part of tzdata\n const gmtOffset = -1 * (dt.offset / 60);\n const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;\n if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {\n z = offsetZ;\n this.dt = dt;\n } else {\n // Not all fixed-offset zones like Etc/+4:30 are present in tzdata so\n // we manually apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.offset === 0 ? dt : dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n } else if (dt.zone.type === \"system\") {\n this.dt = dt;\n } else if (dt.zone.type === \"iana\") {\n this.dt = dt;\n z = dt.zone.name;\n } else {\n // Custom zones can have any offset / offsetName so we just manually\n // apply the offset and substitute the zone as needed.\n z = \"UTC\";\n this.dt = dt.setZone(\"UTC\").plus({ minutes: dt.offset });\n this.originalZone = dt.zone;\n }\n\n const intlOpts = { ...this.opts };\n intlOpts.timeZone = intlOpts.timeZone || z;\n this.dtf = getCachedDTF(intl, intlOpts);\n }\n\n format() {\n if (this.originalZone) {\n // If we have to substitute in the actual zone name, we have to use\n // formatToParts so that the timezone can be replaced.\n return this.formatToParts()\n .map(({ value }) => value)\n .join(\"\");\n }\n return this.dtf.format(this.dt.toJSDate());\n }\n\n formatToParts() {\n const parts = this.dtf.formatToParts(this.dt.toJSDate());\n if (this.originalZone) {\n return parts.map((part) => {\n if (part.type === \"timeZoneName\") {\n const offsetName = this.originalZone.offsetName(this.dt.ts, {\n locale: this.dt.locale,\n format: this.opts.timeZoneName,\n });\n return {\n ...part,\n value: offsetName,\n };\n } else {\n return part;\n }\n });\n }\n return parts;\n }\n\n resolvedOptions() {\n return this.dtf.resolvedOptions();\n }\n}\n\n/**\n * @private\n */\nclass PolyRelFormatter {\n constructor(intl, isEnglish, opts) {\n this.opts = { style: \"long\", ...opts };\n if (!isEnglish && hasRelative()) {\n this.rtf = getCachedRTF(intl, opts);\n }\n }\n\n format(count, unit) {\n if (this.rtf) {\n return this.rtf.format(count, unit);\n } else {\n return English.formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== \"long\");\n }\n }\n\n formatToParts(count, unit) {\n if (this.rtf) {\n return this.rtf.formatToParts(count, unit);\n } else {\n return [];\n }\n }\n}\n\nconst fallbackWeekSettings = {\n firstDay: 1,\n minimalDays: 4,\n weekend: [6, 7],\n};\n\n/**\n * @private\n */\nexport default class Locale {\n static fromOpts(opts) {\n return Locale.create(\n opts.locale,\n opts.numberingSystem,\n opts.outputCalendar,\n opts.weekSettings,\n opts.defaultToEN\n );\n }\n\n static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {\n const specifiedLocale = locale || Settings.defaultLocale;\n // the system locale is useful for human-readable strings but annoying for parsing/formatting known formats\n const localeR = specifiedLocale || (defaultToEN ? \"en-US\" : systemLocale());\n const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;\n const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;\n const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;\n return new Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);\n }\n\n static resetCache() {\n sysLocaleCache = null;\n intlDTCache.clear();\n intlNumCache.clear();\n intlRelCache.clear();\n intlResolvedOptionsCache.clear();\n weekInfoCache.clear();\n }\n\n static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {\n return Locale.create(locale, numberingSystem, outputCalendar, weekSettings);\n }\n\n constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {\n const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);\n\n this.locale = parsedLocale;\n this.numberingSystem = numbering || parsedNumberingSystem || null;\n this.outputCalendar = outputCalendar || parsedOutputCalendar || null;\n this.weekSettings = weekSettings;\n this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);\n\n this.weekdaysCache = { format: {}, standalone: {} };\n this.monthsCache = { format: {}, standalone: {} };\n this.meridiemCache = null;\n this.eraCache = {};\n\n this.specifiedLocale = specifiedLocale;\n this.fastNumbersCached = null;\n }\n\n get fastNumbers() {\n if (this.fastNumbersCached == null) {\n this.fastNumbersCached = supportsFastNumbers(this);\n }\n\n return this.fastNumbersCached;\n }\n\n listingMode() {\n const isActuallyEn = this.isEnglish();\n const hasNoWeirdness =\n (this.numberingSystem === null || this.numberingSystem === \"latn\") &&\n (this.outputCalendar === null || this.outputCalendar === \"gregory\");\n return isActuallyEn && hasNoWeirdness ? \"en\" : \"intl\";\n }\n\n clone(alts) {\n if (!alts || Object.getOwnPropertyNames(alts).length === 0) {\n return this;\n } else {\n return Locale.create(\n alts.locale || this.specifiedLocale,\n alts.numberingSystem || this.numberingSystem,\n alts.outputCalendar || this.outputCalendar,\n validateWeekSettings(alts.weekSettings) || this.weekSettings,\n alts.defaultToEN || false\n );\n }\n }\n\n redefaultToEN(alts = {}) {\n return this.clone({ ...alts, defaultToEN: true });\n }\n\n redefaultToSystem(alts = {}) {\n return this.clone({ ...alts, defaultToEN: false });\n }\n\n months(length, format = false) {\n return listStuff(this, length, English.months, () => {\n // Workaround for \"ja\" locale: formatToParts does not label all parts of the month\n // as \"month\" and for this locale there is no difference between \"format\" and \"non-format\".\n // As such, just use format() instead of formatToParts() and take the whole string\n const monthSpecialCase = this.intl === \"ja\" || this.intl.startsWith(\"ja-\");\n format &= !monthSpecialCase;\n const intl = format ? { month: length, day: \"numeric\" } : { month: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.monthsCache[formatStr][length]) {\n const mapper = !monthSpecialCase\n ? (dt) => this.extract(dt, intl, \"month\")\n : (dt) => this.dtFormatter(dt, intl).format();\n this.monthsCache[formatStr][length] = mapMonths(mapper);\n }\n return this.monthsCache[formatStr][length];\n });\n }\n\n weekdays(length, format = false) {\n return listStuff(this, length, English.weekdays, () => {\n const intl = format\n ? { weekday: length, year: \"numeric\", month: \"long\", day: \"numeric\" }\n : { weekday: length },\n formatStr = format ? \"format\" : \"standalone\";\n if (!this.weekdaysCache[formatStr][length]) {\n this.weekdaysCache[formatStr][length] = mapWeekdays((dt) =>\n this.extract(dt, intl, \"weekday\")\n );\n }\n return this.weekdaysCache[formatStr][length];\n });\n }\n\n meridiems() {\n return listStuff(\n this,\n undefined,\n () => English.meridiems,\n () => {\n // In theory there could be aribitrary day periods. We're gonna assume there are exactly two\n // for AM and PM. This is probably wrong, but it's makes parsing way easier.\n if (!this.meridiemCache) {\n const intl = { hour: \"numeric\", hourCycle: \"h12\" };\n this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(\n (dt) => this.extract(dt, intl, \"dayperiod\")\n );\n }\n\n return this.meridiemCache;\n }\n );\n }\n\n eras(length) {\n return listStuff(this, length, English.eras, () => {\n const intl = { era: length };\n\n // This is problematic. Different calendars are going to define eras totally differently. What I need is the minimum set of dates\n // to definitely enumerate them.\n if (!this.eraCache[length]) {\n this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map((dt) =>\n this.extract(dt, intl, \"era\")\n );\n }\n\n return this.eraCache[length];\n });\n }\n\n extract(dt, intlOpts, field) {\n const df = this.dtFormatter(dt, intlOpts),\n results = df.formatToParts(),\n matching = results.find((m) => m.type.toLowerCase() === field);\n return matching ? matching.value : null;\n }\n\n numberFormatter(opts = {}) {\n // this forcesimple option is never used (the only caller short-circuits on it, but it seems safer to leave)\n // (in contrast, the rest of the condition is used heavily)\n return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);\n }\n\n dtFormatter(dt, intlOpts = {}) {\n return new PolyDateFormatter(dt, this.intl, intlOpts);\n }\n\n relFormatter(opts = {}) {\n return new PolyRelFormatter(this.intl, this.isEnglish(), opts);\n }\n\n listFormatter(opts = {}) {\n return getCachedLF(this.intl, opts);\n }\n\n isEnglish() {\n return (\n this.locale === \"en\" ||\n this.locale.toLowerCase() === \"en-us\" ||\n getCachedIntResolvedOptions(this.intl).locale.startsWith(\"en-us\")\n );\n }\n\n getWeekSettings() {\n if (this.weekSettings) {\n return this.weekSettings;\n } else if (!hasLocaleWeekInfo()) {\n return fallbackWeekSettings;\n } else {\n return getCachedWeekInfo(this.locale);\n }\n }\n\n getStartOfWeek() {\n return this.getWeekSettings().firstDay;\n }\n\n getMinDaysInFirstWeek() {\n return this.getWeekSettings().minimalDays;\n }\n\n getWeekendDays() {\n return this.getWeekSettings().weekend;\n }\n\n equals(other) {\n return (\n this.locale === other.locale &&\n this.numberingSystem === other.numberingSystem &&\n this.outputCalendar === other.outputCalendar\n );\n }\n\n toString() {\n return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;\n }\n}\n","import * as Formats from \"./formats.js\";\nimport { pick } from \"./util.js\";\n\nfunction stringify(obj) {\n return JSON.stringify(obj, Object.keys(obj).sort());\n}\n\n/**\n * @private\n */\n\nexport const monthsLong = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nexport const monthsShort = [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n];\n\nexport const monthsNarrow = [\"J\", \"F\", \"M\", \"A\", \"M\", \"J\", \"J\", \"A\", \"S\", \"O\", \"N\", \"D\"];\n\nexport function months(length) {\n switch (length) {\n case \"narrow\":\n return [...monthsNarrow];\n case \"short\":\n return [...monthsShort];\n case \"long\":\n return [...monthsLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\", \"8\", \"9\", \"10\", \"11\", \"12\"];\n case \"2-digit\":\n return [\"01\", \"02\", \"03\", \"04\", \"05\", \"06\", \"07\", \"08\", \"09\", \"10\", \"11\", \"12\"];\n default:\n return null;\n }\n}\n\nexport const weekdaysLong = [\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n \"Sunday\",\n];\n\nexport const weekdaysShort = [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"];\n\nexport const weekdaysNarrow = [\"M\", \"T\", \"W\", \"T\", \"F\", \"S\", \"S\"];\n\nexport function weekdays(length) {\n switch (length) {\n case \"narrow\":\n return [...weekdaysNarrow];\n case \"short\":\n return [...weekdaysShort];\n case \"long\":\n return [...weekdaysLong];\n case \"numeric\":\n return [\"1\", \"2\", \"3\", \"4\", \"5\", \"6\", \"7\"];\n default:\n return null;\n }\n}\n\nexport const meridiems = [\"AM\", \"PM\"];\n\nexport const erasLong = [\"Before Christ\", \"Anno Domini\"];\n\nexport const erasShort = [\"BC\", \"AD\"];\n\nexport const erasNarrow = [\"B\", \"A\"];\n\nexport function eras(length) {\n switch (length) {\n case \"narrow\":\n return [...erasNarrow];\n case \"short\":\n return [...erasShort];\n case \"long\":\n return [...erasLong];\n default:\n return null;\n }\n}\n\nexport function meridiemForDateTime(dt) {\n return meridiems[dt.hour < 12 ? 0 : 1];\n}\n\nexport function weekdayForDateTime(dt, length) {\n return weekdays(length)[dt.weekday - 1];\n}\n\nexport function monthForDateTime(dt, length) {\n return months(length)[dt.month - 1];\n}\n\nexport function eraForDateTime(dt, length) {\n return eras(length)[dt.year < 0 ? 0 : 1];\n}\n\nexport function formatRelativeTime(unit, count, numeric = \"always\", narrow = false) {\n const units = {\n years: [\"year\", \"yr.\"],\n quarters: [\"quarter\", \"qtr.\"],\n months: [\"month\", \"mo.\"],\n weeks: [\"week\", \"wk.\"],\n days: [\"day\", \"day\", \"days\"],\n hours: [\"hour\", \"hr.\"],\n minutes: [\"minute\", \"min.\"],\n seconds: [\"second\", \"sec.\"],\n };\n\n const lastable = [\"hours\", \"minutes\", \"seconds\"].indexOf(unit) === -1;\n\n if (numeric === \"auto\" && lastable) {\n const isDay = unit === \"days\";\n switch (count) {\n case 1:\n return isDay ? \"tomorrow\" : `next ${units[unit][0]}`;\n case -1:\n return isDay ? \"yesterday\" : `last ${units[unit][0]}`;\n case 0:\n return isDay ? \"today\" : `this ${units[unit][0]}`;\n default: // fall through\n }\n }\n\n const isInPast = Object.is(count, -0) || count < 0,\n fmtValue = Math.abs(count),\n singular = fmtValue === 1,\n lilUnits = units[unit],\n fmtUnit = narrow\n ? singular\n ? lilUnits[1]\n : lilUnits[2] || lilUnits[1]\n : singular\n ? units[unit][0]\n : unit;\n return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;\n}\n\nexport function formatString(knownFormat) {\n // these all have the offsets removed because we don't have access to them\n // without all the intl stuff this is backfilling\n const filtered = pick(knownFormat, [\n \"weekday\",\n \"era\",\n \"year\",\n \"month\",\n \"day\",\n \"hour\",\n \"minute\",\n \"second\",\n \"timeZoneName\",\n \"hourCycle\",\n ]),\n key = stringify(filtered),\n dateTimeHuge = \"EEEE, LLLL d, yyyy, h:mm a\";\n switch (key) {\n case stringify(Formats.DATE_SHORT):\n return \"M/d/yyyy\";\n case stringify(Formats.DATE_MED):\n return \"LLL d, yyyy\";\n case stringify(Formats.DATE_MED_WITH_WEEKDAY):\n return \"EEE, LLL d, yyyy\";\n case stringify(Formats.DATE_FULL):\n return \"LLLL d, yyyy\";\n case stringify(Formats.DATE_HUGE):\n return \"EEEE, LLLL d, yyyy\";\n case stringify(Formats.TIME_SIMPLE):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_SECONDS):\n return \"h:mm:ss a\";\n case stringify(Formats.TIME_WITH_SHORT_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_WITH_LONG_OFFSET):\n return \"h:mm a\";\n case stringify(Formats.TIME_24_SIMPLE):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_SECONDS):\n return \"HH:mm:ss\";\n case stringify(Formats.TIME_24_WITH_SHORT_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.TIME_24_WITH_LONG_OFFSET):\n return \"HH:mm\";\n case stringify(Formats.DATETIME_SHORT):\n return \"M/d/yyyy, h:mm a\";\n case stringify(Formats.DATETIME_MED):\n return \"LLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL):\n return \"LLLL d, yyyy, h:mm a\";\n case stringify(Formats.DATETIME_HUGE):\n return dateTimeHuge;\n case stringify(Formats.DATETIME_SHORT_WITH_SECONDS):\n return \"M/d/yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_SECONDS):\n return \"LLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_MED_WITH_WEEKDAY):\n return \"EEE, d LLL yyyy, h:mm a\";\n case stringify(Formats.DATETIME_FULL_WITH_SECONDS):\n return \"LLLL d, yyyy, h:mm:ss a\";\n case stringify(Formats.DATETIME_HUGE_WITH_SECONDS):\n return \"EEEE, LLLL d, yyyy, h:mm:ss a\";\n default:\n return dateTimeHuge;\n }\n}\n","import { formatOffset, signedOffset } from \"../impl/util.js\";\nimport Zone from \"../zone.js\";\n\nlet singleton = null;\n\n/**\n * A zone with a fixed offset (meaning no DST)\n * @implements {Zone}\n */\nexport default class FixedOffsetZone extends Zone {\n /**\n * Get a singleton instance of UTC\n * @return {FixedOffsetZone}\n */\n static get utcInstance() {\n if (singleton === null) {\n singleton = new FixedOffsetZone(0);\n }\n return singleton;\n }\n\n /**\n * Get an instance with a specified offset\n * @param {number} offset - The offset in minutes\n * @return {FixedOffsetZone}\n */\n static instance(offset) {\n return offset === 0 ? FixedOffsetZone.utcInstance : new FixedOffsetZone(offset);\n }\n\n /**\n * Get an instance of FixedOffsetZone from a UTC offset string, like \"UTC+6\"\n * @param {string} s - The offset string to parse\n * @example FixedOffsetZone.parseSpecifier(\"UTC+6\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC+06\")\n * @example FixedOffsetZone.parseSpecifier(\"UTC-6:00\")\n * @return {FixedOffsetZone}\n */\n static parseSpecifier(s) {\n if (s) {\n const r = s.match(/^utc(?:([+-]\\d{1,2})(?::(\\d{2}))?)?$/i);\n if (r) {\n return new FixedOffsetZone(signedOffset(r[1], r[2]));\n }\n }\n return null;\n }\n\n constructor(offset) {\n super();\n /** @private **/\n this.fixed = offset;\n }\n\n /**\n * The type of zone. `fixed` for all instances of `FixedOffsetZone`.\n * @override\n * @type {string}\n */\n get type() {\n return \"fixed\";\n }\n\n /**\n * The name of this zone.\n * All fixed zones' names always start with \"UTC\" (plus optional offset)\n * @override\n * @type {string}\n */\n get name() {\n return this.fixed === 0 ? \"UTC\" : `UTC${formatOffset(this.fixed, \"narrow\")}`;\n }\n\n /**\n * The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`\n *\n * @override\n * @type {string}\n */\n get ianaName() {\n if (this.fixed === 0) {\n return \"Etc/UTC\";\n } else {\n return `Etc/GMT${formatOffset(-this.fixed, \"narrow\")}`;\n }\n }\n\n /**\n * Returns the offset's common name at the specified timestamp.\n *\n * For fixed offset zones this equals to the zone name.\n * @override\n */\n offsetName() {\n return this.name;\n }\n\n /**\n * Returns the offset's value as a string\n * @override\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\n formatOffset(ts, format) {\n return formatOffset(this.fixed, format);\n }\n\n /**\n * Returns whether the offset is known to be fixed for the whole year:\n * Always returns true for all fixed offset zones.\n * @override\n * @type {boolean}\n */\n get isUniversal() {\n return true;\n }\n\n /**\n * Return the offset in minutes for this zone at the specified timestamp.\n *\n * For fixed offset zones, this is constant and does not depend on a timestamp.\n * @override\n * @return {number}\n */\n offset() {\n return this.fixed;\n }\n\n /**\n * Return whether this Zone is equal to another zone (i.e. also fixed and same offset)\n * @override\n * @param {Zone} otherZone - the zone to compare\n * @return {boolean}\n */\n equals(otherZone) {\n return otherZone.type === \"fixed\" && otherZone.fixed === this.fixed;\n }\n\n /**\n * Return whether this Zone is valid:\n * All fixed offset zones are valid.\n * @override\n * @type {boolean}\n */\n get isValid() {\n return true;\n }\n}\n","import Zone from \"../zone.js\";\n\n/**\n * A zone that failed to parse. You should never need to instantiate this.\n * @implements {Zone}\n */\nexport default class InvalidZone extends Zone {\n constructor(zoneName) {\n super();\n /** @private */\n this.zoneName = zoneName;\n }\n\n /** @override **/\n get type() {\n return \"invalid\";\n }\n\n /** @override **/\n get name() {\n return this.zoneName;\n }\n\n /** @override **/\n get isUniversal() {\n return false;\n }\n\n /** @override **/\n offsetName() {\n return null;\n }\n\n /** @override **/\n formatOffset() {\n return \"\";\n }\n\n /** @override **/\n offset() {\n return NaN;\n }\n\n /** @override **/\n equals() {\n return false;\n }\n\n /** @override **/\n get isValid() {\n return false;\n }\n}\n","/**\n * @private\n */\n\nimport Zone from \"../zone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport InvalidZone from \"../zones/invalidZone.js\";\n\nimport { isUndefined, isString, isNumber } from \"./util.js\";\nimport SystemZone from \"../zones/systemZone.js\";\n\nexport function normalizeZone(input, defaultZone) {\n let offset;\n if (isUndefined(input) || input === null) {\n return defaultZone;\n } else if (input instanceof Zone) {\n return input;\n } else if (isString(input)) {\n const lowered = input.toLowerCase();\n if (lowered === \"default\") return defaultZone;\n else if (lowered === \"local\" || lowered === \"system\") return SystemZone.instance;\n else if (lowered === \"utc\" || lowered === \"gmt\") return FixedOffsetZone.utcInstance;\n else return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);\n } else if (isNumber(input)) {\n return FixedOffsetZone.instance(input);\n } else if (typeof input === \"object\" && \"offset\" in input && typeof input.offset === \"function\") {\n // This is dumb, but the instanceof check above doesn't seem to really work\n // so we're duck checking it\n return input;\n } else {\n return new InvalidZone(input);\n }\n}\n","/*\n This is just a junk drawer, containing anything used across multiple classes.\n Because Luxon is small(ish), this should stay small and we won't worry about splitting\n it up into, say, parsingUtil.js and basicUtil.js and so on. But they are divided up by feature area.\n*/\n\nimport { InvalidArgumentError } from \"../errors.js\";\nimport Settings from \"../settings.js\";\nimport { dayOfWeek, isoWeekdayToLocal } from \"./conversions.js\";\n\n/**\n * @private\n */\n\n// TYPES\n\nexport function isUndefined(o) {\n return typeof o === \"undefined\";\n}\n\nexport function isNumber(o) {\n return typeof o === \"number\";\n}\n\nexport function isInteger(o) {\n return typeof o === \"number\" && o % 1 === 0;\n}\n\nexport function isString(o) {\n return typeof o === \"string\";\n}\n\nexport function isDate(o) {\n return Object.prototype.toString.call(o) === \"[object Date]\";\n}\n\n// CAPABILITIES\n\nexport function hasRelative() {\n try {\n return typeof Intl !== \"undefined\" && !!Intl.RelativeTimeFormat;\n } catch (e) {\n return false;\n }\n}\n\nexport function hasLocaleWeekInfo() {\n try {\n return (\n typeof Intl !== \"undefined\" &&\n !!Intl.Locale &&\n (\"weekInfo\" in Intl.Locale.prototype || \"getWeekInfo\" in Intl.Locale.prototype)\n );\n } catch (e) {\n return false;\n }\n}\n\n// OBJECTS AND ARRAYS\n\nexport function maybeArray(thing) {\n return Array.isArray(thing) ? thing : [thing];\n}\n\nexport function bestBy(arr, by, compare) {\n if (arr.length === 0) {\n return undefined;\n }\n return arr.reduce((best, next) => {\n const pair = [by(next), next];\n if (!best) {\n return pair;\n } else if (compare(best[0], pair[0]) === best[0]) {\n return best;\n } else {\n return pair;\n }\n }, null)[1];\n}\n\nexport function pick(obj, keys) {\n return keys.reduce((a, k) => {\n a[k] = obj[k];\n return a;\n }, {});\n}\n\nexport function hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n\nexport function validateWeekSettings(settings) {\n if (settings == null) {\n return null;\n } else if (typeof settings !== \"object\") {\n throw new InvalidArgumentError(\"Week settings must be an object\");\n } else {\n if (\n !integerBetween(settings.firstDay, 1, 7) ||\n !integerBetween(settings.minimalDays, 1, 7) ||\n !Array.isArray(settings.weekend) ||\n settings.weekend.some((v) => !integerBetween(v, 1, 7))\n ) {\n throw new InvalidArgumentError(\"Invalid week settings\");\n }\n return {\n firstDay: settings.firstDay,\n minimalDays: settings.minimalDays,\n weekend: Array.from(settings.weekend),\n };\n }\n}\n\n// NUMBERS AND STRINGS\n\nexport function integerBetween(thing, bottom, top) {\n return isInteger(thing) && thing >= bottom && thing <= top;\n}\n\n// x % n but takes the sign of n instead of x\nexport function floorMod(x, n) {\n return x - n * Math.floor(x / n);\n}\n\nexport function padStart(input, n = 2) {\n const isNeg = input < 0;\n let padded;\n if (isNeg) {\n padded = \"-\" + (\"\" + -input).padStart(n, \"0\");\n } else {\n padded = (\"\" + input).padStart(n, \"0\");\n }\n return padded;\n}\n\nexport function parseInteger(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseInt(string, 10);\n }\n}\n\nexport function parseFloating(string) {\n if (isUndefined(string) || string === null || string === \"\") {\n return undefined;\n } else {\n return parseFloat(string);\n }\n}\n\nexport function parseMillis(fraction) {\n // Return undefined (instead of 0) in these cases, where fraction is not set\n if (isUndefined(fraction) || fraction === null || fraction === \"\") {\n return undefined;\n } else {\n const f = parseFloat(\"0.\" + fraction) * 1000;\n return Math.floor(f);\n }\n}\n\nexport function roundTo(number, digits, rounding = \"round\") {\n const factor = 10 ** digits;\n switch (rounding) {\n case \"expand\":\n return number > 0\n ? Math.ceil(number * factor) / factor\n : Math.floor(number * factor) / factor;\n case \"trunc\":\n return Math.trunc(number * factor) / factor;\n case \"round\":\n return Math.round(number * factor) / factor;\n case \"floor\":\n return Math.floor(number * factor) / factor;\n case \"ceil\":\n return Math.ceil(number * factor) / factor;\n default:\n throw new RangeError(`Value rounding ${rounding} is out of range`);\n }\n}\n\n// DATE BASICS\n\nexport function isLeapYear(year) {\n return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);\n}\n\nexport function daysInYear(year) {\n return isLeapYear(year) ? 366 : 365;\n}\n\nexport function daysInMonth(year, month) {\n const modMonth = floorMod(month - 1, 12) + 1,\n modYear = year + (month - modMonth) / 12;\n\n if (modMonth === 2) {\n return isLeapYear(modYear) ? 29 : 28;\n } else {\n return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];\n }\n}\n\n// convert a calendar object to a local timestamp (epoch, but with the offset baked in)\nexport function objToLocalTS(obj) {\n let d = Date.UTC(\n obj.year,\n obj.month - 1,\n obj.day,\n obj.hour,\n obj.minute,\n obj.second,\n obj.millisecond\n );\n\n // for legacy reasons, years between 0 and 99 are interpreted as 19XX; revert that\n if (obj.year < 100 && obj.year >= 0) {\n d = new Date(d);\n // set the month and day again, this is necessary because year 2000 is a leap year, but year 100 is not\n // so if obj.year is in 99, but obj.day makes it roll over into year 100,\n // the calculations done by Date.UTC are using year 2000 - which is incorrect\n d.setUTCFullYear(obj.year, obj.month - 1, obj.day);\n }\n return +d;\n}\n\n// adapted from moment.js: https://github.com/moment/moment/blob/000ac1800e620f770f4eb31b5ae908f6167b0ab2/src/lib/units/week-calendar-utils.js\nfunction firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {\n const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);\n return -fwdlw + minDaysInFirstWeek - 1;\n}\n\nexport function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);\n const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);\n return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;\n}\n\nexport function untruncateYear(year) {\n if (year > 99) {\n return year;\n } else return year > Settings.twoDigitCutoffYear ? 1900 + year : 2000 + year;\n}\n\n// PARSING\n\nexport function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {\n const date = new Date(ts),\n intlOpts = {\n hourCycle: \"h23\",\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n };\n\n if (timeZone) {\n intlOpts.timeZone = timeZone;\n }\n\n const modified = { timeZoneName: offsetFormat, ...intlOpts };\n\n const parsed = new Intl.DateTimeFormat(locale, modified)\n .formatToParts(date)\n .find((m) => m.type.toLowerCase() === \"timezonename\");\n return parsed ? parsed.value : null;\n}\n\n// signedOffset('-5', '30') -> -330\nexport function signedOffset(offHourStr, offMinuteStr) {\n let offHour = parseInt(offHourStr, 10);\n\n // don't || this because we want to preserve -0\n if (Number.isNaN(offHour)) {\n offHour = 0;\n }\n\n const offMin = parseInt(offMinuteStr, 10) || 0,\n offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;\n return offHour * 60 + offMinSigned;\n}\n\n// COERCION\n\nexport function asNumber(value) {\n const numericValue = Number(value);\n if (typeof value === \"boolean\" || value === \"\" || !Number.isFinite(numericValue))\n throw new InvalidArgumentError(`Invalid unit value ${value}`);\n return numericValue;\n}\n\nexport function normalizeObject(obj, normalizer) {\n const normalized = {};\n for (const u in obj) {\n if (hasOwnProperty(obj, u)) {\n const v = obj[u];\n if (v === undefined || v === null) continue;\n normalized[normalizer(u)] = asNumber(v);\n }\n }\n return normalized;\n}\n\n/**\n * Returns the offset's value as a string\n * @param {number} ts - Epoch milliseconds for which to get the offset\n * @param {string} format - What style of offset to return.\n * Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively\n * @return {string}\n */\nexport function formatOffset(offset, format) {\n const hours = Math.trunc(Math.abs(offset / 60)),\n minutes = Math.trunc(Math.abs(offset % 60)),\n sign = offset >= 0 ? \"+\" : \"-\";\n\n switch (format) {\n case \"short\":\n return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;\n case \"narrow\":\n return `${sign}${hours}${minutes > 0 ? `:${minutes}` : \"\"}`;\n case \"techie\":\n return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;\n default:\n throw new RangeError(`Value format ${format} is out of range for property format`);\n }\n}\n\nexport function timeObject(obj) {\n return pick(obj, [\"hour\", \"minute\", \"second\", \"millisecond\"]);\n}\n","const numberingSystems = {\n arab: \"[\\u0660-\\u0669]\",\n arabext: \"[\\u06F0-\\u06F9]\",\n bali: \"[\\u1B50-\\u1B59]\",\n beng: \"[\\u09E6-\\u09EF]\",\n deva: \"[\\u0966-\\u096F]\",\n fullwide: \"[\\uFF10-\\uFF19]\",\n gujr: \"[\\u0AE6-\\u0AEF]\",\n hanidec: \"[〇|一|二|三|四|五|六|七|八|九]\",\n khmr: \"[\\u17E0-\\u17E9]\",\n knda: \"[\\u0CE6-\\u0CEF]\",\n laoo: \"[\\u0ED0-\\u0ED9]\",\n limb: \"[\\u1946-\\u194F]\",\n mlym: \"[\\u0D66-\\u0D6F]\",\n mong: \"[\\u1810-\\u1819]\",\n mymr: \"[\\u1040-\\u1049]\",\n orya: \"[\\u0B66-\\u0B6F]\",\n tamldec: \"[\\u0BE6-\\u0BEF]\",\n telu: \"[\\u0C66-\\u0C6F]\",\n thai: \"[\\u0E50-\\u0E59]\",\n tibt: \"[\\u0F20-\\u0F29]\",\n latn: \"\\\\d\",\n};\n\nconst numberingSystemsUTF16 = {\n arab: [1632, 1641],\n arabext: [1776, 1785],\n bali: [6992, 7001],\n beng: [2534, 2543],\n deva: [2406, 2415],\n fullwide: [65296, 65303],\n gujr: [2790, 2799],\n khmr: [6112, 6121],\n knda: [3302, 3311],\n laoo: [3792, 3801],\n limb: [6470, 6479],\n mlym: [3430, 3439],\n mong: [6160, 6169],\n mymr: [4160, 4169],\n orya: [2918, 2927],\n tamldec: [3046, 3055],\n telu: [3174, 3183],\n thai: [3664, 3673],\n tibt: [3872, 3881],\n};\n\nconst hanidecChars = numberingSystems.hanidec.replace(/[\\[|\\]]/g, \"\").split(\"\");\n\nexport function parseDigits(str) {\n let value = parseInt(str, 10);\n if (isNaN(value)) {\n value = \"\";\n for (let i = 0; i < str.length; i++) {\n const code = str.charCodeAt(i);\n\n if (str[i].search(numberingSystems.hanidec) !== -1) {\n value += hanidecChars.indexOf(str[i]);\n } else {\n for (const key in numberingSystemsUTF16) {\n const [min, max] = numberingSystemsUTF16[key];\n if (code >= min && code <= max) {\n value += code - min;\n }\n }\n }\n }\n return parseInt(value, 10);\n } else {\n return value;\n }\n}\n\n// cache of {numberingSystem: {append: regex}}\nconst digitRegexCache = new Map();\nexport function resetDigitRegexCache() {\n digitRegexCache.clear();\n}\n\nexport function digitRegex({ numberingSystem }, append = \"\") {\n const ns = numberingSystem || \"latn\";\n\n let appendCache = digitRegexCache.get(ns);\n if (appendCache === undefined) {\n appendCache = new Map();\n digitRegexCache.set(ns, appendCache);\n }\n let regex = appendCache.get(append);\n if (regex === undefined) {\n regex = new RegExp(`${numberingSystems[ns]}${append}`);\n appendCache.set(append, regex);\n }\n\n return regex;\n}\n","import SystemZone from \"./zones/systemZone.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport DateTime from \"./datetime.js\";\n\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport { validateWeekSettings } from \"./impl/util.js\";\nimport { resetDigitRegexCache } from \"./impl/digits.js\";\n\nlet now = () => Date.now(),\n defaultZone = \"system\",\n defaultLocale = null,\n defaultNumberingSystem = null,\n defaultOutputCalendar = null,\n twoDigitCutoffYear = 60,\n throwOnInvalid,\n defaultWeekSettings = null;\n\n/**\n * Settings contains static getters and setters that control Luxon's overall behavior. Luxon is a simple library with few options, but the ones it does have live here.\n */\nexport default class Settings {\n /**\n * Get the callback for returning the current timestamp.\n * @type {function}\n */\n static get now() {\n return now;\n }\n\n /**\n * Set the callback for returning the current timestamp.\n * The function should return a number, which will be interpreted as an Epoch millisecond count\n * @type {function}\n * @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future\n * @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time\n */\n static set now(n) {\n now = n;\n }\n\n /**\n * Set the default time zone to create DateTimes in. Does not affect existing instances.\n * Use the value \"system\" to reset this value to the system's time zone.\n * @type {string}\n */\n static set defaultZone(zone) {\n defaultZone = zone;\n }\n\n /**\n * Get the default time zone object currently used to create DateTimes. Does not affect existing instances.\n * The default value is the system's time zone (the one set on the machine that runs this code).\n * @type {Zone}\n */\n static get defaultZone() {\n return normalizeZone(defaultZone, SystemZone.instance);\n }\n\n /**\n * Get the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultLocale() {\n return defaultLocale;\n }\n\n /**\n * Set the default locale to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultLocale(locale) {\n defaultLocale = locale;\n }\n\n /**\n * Get the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultNumberingSystem() {\n return defaultNumberingSystem;\n }\n\n /**\n * Set the default numbering system to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultNumberingSystem(numberingSystem) {\n defaultNumberingSystem = numberingSystem;\n }\n\n /**\n * Get the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static get defaultOutputCalendar() {\n return defaultOutputCalendar;\n }\n\n /**\n * Set the default output calendar to create DateTimes with. Does not affect existing instances.\n * @type {string}\n */\n static set defaultOutputCalendar(outputCalendar) {\n defaultOutputCalendar = outputCalendar;\n }\n\n /**\n * @typedef {Object} WeekSettings\n * @property {number} firstDay\n * @property {number} minimalDays\n * @property {number[]} weekend\n */\n\n /**\n * @return {WeekSettings|null}\n */\n static get defaultWeekSettings() {\n return defaultWeekSettings;\n }\n\n /**\n * Allows overriding the default locale week settings, i.e. the start of the week, the weekend and\n * how many days are required in the first week of a year.\n * Does not affect existing instances.\n *\n * @param {WeekSettings|null} weekSettings\n */\n static set defaultWeekSettings(weekSettings) {\n defaultWeekSettings = validateWeekSettings(weekSettings);\n }\n\n /**\n * Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n */\n static get twoDigitCutoffYear() {\n return twoDigitCutoffYear;\n }\n\n /**\n * Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.\n * @type {number}\n * @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century\n * @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century\n * @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950\n * @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50\n * @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50\n */\n static set twoDigitCutoffYear(cutoffYear) {\n twoDigitCutoffYear = cutoffYear % 100;\n }\n\n /**\n * Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static get throwOnInvalid() {\n return throwOnInvalid;\n }\n\n /**\n * Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals\n * @type {boolean}\n */\n static set throwOnInvalid(t) {\n throwOnInvalid = t;\n }\n\n /**\n * Reset Luxon's global caches. Should only be necessary in testing scenarios.\n * @return {void}\n */\n static resetCaches() {\n Locale.resetCache();\n IANAZone.resetCache();\n DateTime.resetCache();\n resetDigitRegexCache();\n }\n}\n","export default class Invalid {\n constructor(reason, explanation) {\n this.reason = reason;\n this.explanation = explanation;\n }\n\n toMessage() {\n if (this.explanation) {\n return `${this.reason}: ${this.explanation}`;\n } else {\n return this.reason;\n }\n }\n}\n","import {\n integerBetween,\n isLeapYear,\n timeObject,\n daysInYear,\n daysInMonth,\n weeksInWeekYear,\n isInteger,\n isUndefined,\n} from \"./util.js\";\nimport Invalid from \"./invalid.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334],\n leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];\n\nfunction unitOutOfRange(unit, value) {\n return new Invalid(\n \"unit out of range\",\n `you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`\n );\n}\n\nexport function dayOfWeek(year, month, day) {\n const d = new Date(Date.UTC(year, month - 1, day));\n\n if (year < 100 && year >= 0) {\n d.setUTCFullYear(d.getUTCFullYear() - 1900);\n }\n\n const js = d.getUTCDay();\n\n return js === 0 ? 7 : js;\n}\n\nfunction computeOrdinal(year, month, day) {\n return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];\n}\n\nfunction uncomputeOrdinal(year, ordinal) {\n const table = isLeapYear(year) ? leapLadder : nonLeapLadder,\n month0 = table.findIndex((i) => i < ordinal),\n day = ordinal - table[month0];\n return { month: month0 + 1, day };\n}\n\nexport function isoWeekdayToLocal(isoWeekday, startOfWeek) {\n return ((isoWeekday - startOfWeek + 7) % 7) + 1;\n}\n\n/**\n * @private\n */\n\nexport function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { year, month, day } = gregObj,\n ordinal = computeOrdinal(year, month, day),\n weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);\n\n let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7),\n weekYear;\n\n if (weekNumber < 1) {\n weekYear = year - 1;\n weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);\n } else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {\n weekYear = year + 1;\n weekNumber = 1;\n } else {\n weekYear = year;\n }\n\n return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };\n}\n\nexport function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const { weekYear, weekNumber, weekday } = weekData,\n weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek),\n yearInDays = daysInYear(weekYear);\n\n let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek,\n year;\n\n if (ordinal < 1) {\n year = weekYear - 1;\n ordinal += daysInYear(year);\n } else if (ordinal > yearInDays) {\n year = weekYear + 1;\n ordinal -= daysInYear(weekYear);\n } else {\n year = weekYear;\n }\n\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(weekData) };\n}\n\nexport function gregorianToOrdinal(gregData) {\n const { year, month, day } = gregData;\n const ordinal = computeOrdinal(year, month, day);\n return { year, ordinal, ...timeObject(gregData) };\n}\n\nexport function ordinalToGregorian(ordinalData) {\n const { year, ordinal } = ordinalData;\n const { month, day } = uncomputeOrdinal(year, ordinal);\n return { year, month, day, ...timeObject(ordinalData) };\n}\n\n/**\n * Check if local week units like localWeekday are used in obj.\n * If so, validates that they are not mixed with ISO week units and then copies them to the normal week unit properties.\n * Modifies obj in-place!\n * @param obj the object values\n */\nexport function usesLocalWeekValues(obj, loc) {\n const hasLocaleWeekData =\n !isUndefined(obj.localWeekday) ||\n !isUndefined(obj.localWeekNumber) ||\n !isUndefined(obj.localWeekYear);\n if (hasLocaleWeekData) {\n const hasIsoWeekData =\n !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);\n\n if (hasIsoWeekData) {\n throw new ConflictingSpecificationError(\n \"Cannot mix locale-based week fields with ISO-based week fields\"\n );\n }\n if (!isUndefined(obj.localWeekday)) obj.weekday = obj.localWeekday;\n if (!isUndefined(obj.localWeekNumber)) obj.weekNumber = obj.localWeekNumber;\n if (!isUndefined(obj.localWeekYear)) obj.weekYear = obj.localWeekYear;\n delete obj.localWeekday;\n delete obj.localWeekNumber;\n delete obj.localWeekYear;\n return {\n minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),\n startOfWeek: loc.getStartOfWeek(),\n };\n } else {\n return { minDaysInFirstWeek: 4, startOfWeek: 1 };\n }\n}\n\nexport function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {\n const validYear = isInteger(obj.weekYear),\n validWeek = integerBetween(\n obj.weekNumber,\n 1,\n weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)\n ),\n validWeekday = integerBetween(obj.weekday, 1, 7);\n\n if (!validYear) {\n return unitOutOfRange(\"weekYear\", obj.weekYear);\n } else if (!validWeek) {\n return unitOutOfRange(\"week\", obj.weekNumber);\n } else if (!validWeekday) {\n return unitOutOfRange(\"weekday\", obj.weekday);\n } else return false;\n}\n\nexport function hasInvalidOrdinalData(obj) {\n const validYear = isInteger(obj.year),\n validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validOrdinal) {\n return unitOutOfRange(\"ordinal\", obj.ordinal);\n } else return false;\n}\n\nexport function hasInvalidGregorianData(obj) {\n const validYear = isInteger(obj.year),\n validMonth = integerBetween(obj.month, 1, 12),\n validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));\n\n if (!validYear) {\n return unitOutOfRange(\"year\", obj.year);\n } else if (!validMonth) {\n return unitOutOfRange(\"month\", obj.month);\n } else if (!validDay) {\n return unitOutOfRange(\"day\", obj.day);\n } else return false;\n}\n\nexport function hasInvalidTimeData(obj) {\n const { hour, minute, second, millisecond } = obj;\n const validHour =\n integerBetween(hour, 0, 23) ||\n (hour === 24 && minute === 0 && second === 0 && millisecond === 0),\n validMinute = integerBetween(minute, 0, 59),\n validSecond = integerBetween(second, 0, 59),\n validMillisecond = integerBetween(millisecond, 0, 999);\n\n if (!validHour) {\n return unitOutOfRange(\"hour\", hour);\n } else if (!validMinute) {\n return unitOutOfRange(\"minute\", minute);\n } else if (!validSecond) {\n return unitOutOfRange(\"second\", second);\n } else if (!validMillisecond) {\n return unitOutOfRange(\"millisecond\", millisecond);\n } else return false;\n}\n","import * as English from \"./english.js\";\nimport * as Formats from \"./formats.js\";\nimport { padStart } from \"./util.js\";\n\nfunction stringifyTokens(splits, tokenToString) {\n let s = \"\";\n for (const token of splits) {\n if (token.literal) {\n s += token.val;\n } else {\n s += tokenToString(token.val);\n }\n }\n return s;\n}\n\nconst macroTokenToFormatOpts = {\n D: Formats.DATE_SHORT,\n DD: Formats.DATE_MED,\n DDD: Formats.DATE_FULL,\n DDDD: Formats.DATE_HUGE,\n t: Formats.TIME_SIMPLE,\n tt: Formats.TIME_WITH_SECONDS,\n ttt: Formats.TIME_WITH_SHORT_OFFSET,\n tttt: Formats.TIME_WITH_LONG_OFFSET,\n T: Formats.TIME_24_SIMPLE,\n TT: Formats.TIME_24_WITH_SECONDS,\n TTT: Formats.TIME_24_WITH_SHORT_OFFSET,\n TTTT: Formats.TIME_24_WITH_LONG_OFFSET,\n f: Formats.DATETIME_SHORT,\n ff: Formats.DATETIME_MED,\n fff: Formats.DATETIME_FULL,\n ffff: Formats.DATETIME_HUGE,\n F: Formats.DATETIME_SHORT_WITH_SECONDS,\n FF: Formats.DATETIME_MED_WITH_SECONDS,\n FFF: Formats.DATETIME_FULL_WITH_SECONDS,\n FFFF: Formats.DATETIME_HUGE_WITH_SECONDS,\n};\n\n/**\n * @private\n */\n\nexport default class Formatter {\n static create(locale, opts = {}) {\n return new Formatter(locale, opts);\n }\n\n static parseFormat(fmt) {\n // white-space is always considered a literal in user-provided formats\n // the \" \" token has a special meaning (see unitForToken)\n\n let current = null,\n currentFull = \"\",\n bracketed = false;\n const splits = [];\n for (let i = 0; i < fmt.length; i++) {\n const c = fmt.charAt(i);\n if (c === \"'\") {\n // turn '' into a literal signal quote instead of just skipping the empty literal\n if (currentFull.length > 0 || bracketed) {\n splits.push({\n literal: bracketed || /^\\s+$/.test(currentFull),\n val: currentFull === \"\" ? \"'\" : currentFull,\n });\n }\n current = null;\n currentFull = \"\";\n bracketed = !bracketed;\n } else if (bracketed) {\n currentFull += c;\n } else if (c === current) {\n currentFull += c;\n } else {\n if (currentFull.length > 0) {\n splits.push({ literal: /^\\s+$/.test(currentFull), val: currentFull });\n }\n currentFull = c;\n current = c;\n }\n }\n\n if (currentFull.length > 0) {\n splits.push({ literal: bracketed || /^\\s+$/.test(currentFull), val: currentFull });\n }\n\n return splits;\n }\n\n static macroTokenToFormatOpts(token) {\n return macroTokenToFormatOpts[token];\n }\n\n constructor(locale, formatOpts) {\n this.opts = formatOpts;\n this.loc = locale;\n this.systemLoc = null;\n }\n\n formatWithSystemDefault(dt, opts) {\n if (this.systemLoc === null) {\n this.systemLoc = this.loc.redefaultToSystem();\n }\n const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });\n return df.format();\n }\n\n dtFormatter(dt, opts = {}) {\n return this.loc.dtFormatter(dt, { ...this.opts, ...opts });\n }\n\n formatDateTime(dt, opts) {\n return this.dtFormatter(dt, opts).format();\n }\n\n formatDateTimeParts(dt, opts) {\n return this.dtFormatter(dt, opts).formatToParts();\n }\n\n formatInterval(interval, opts) {\n const df = this.dtFormatter(interval.start, opts);\n return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());\n }\n\n resolvedOptions(dt, opts) {\n return this.dtFormatter(dt, opts).resolvedOptions();\n }\n\n num(n, p = 0, signDisplay = undefined) {\n // we get some perf out of doing this here, annoyingly\n if (this.opts.forceSimple) {\n return padStart(n, p);\n }\n\n const opts = { ...this.opts };\n\n if (p > 0) {\n opts.padTo = p;\n }\n if (signDisplay) {\n opts.signDisplay = signDisplay;\n }\n\n return this.loc.numberFormatter(opts).format(n);\n }\n\n formatDateTimeFromString(dt, fmt) {\n const knownEnglish = this.loc.listingMode() === \"en\",\n useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== \"gregory\",\n string = (opts, extract) => this.loc.extract(dt, opts, extract),\n formatOffset = (opts) => {\n if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {\n return \"Z\";\n }\n\n return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : \"\";\n },\n meridiem = () =>\n knownEnglish\n ? English.meridiemForDateTime(dt)\n : string({ hour: \"numeric\", hourCycle: \"h12\" }, \"dayperiod\"),\n month = (length, standalone) =>\n knownEnglish\n ? English.monthForDateTime(dt, length)\n : string(standalone ? { month: length } : { month: length, day: \"numeric\" }, \"month\"),\n weekday = (length, standalone) =>\n knownEnglish\n ? English.weekdayForDateTime(dt, length)\n : string(\n standalone ? { weekday: length } : { weekday: length, month: \"long\", day: \"numeric\" },\n \"weekday\"\n ),\n maybeMacro = (token) => {\n const formatOpts = Formatter.macroTokenToFormatOpts(token);\n if (formatOpts) {\n return this.formatWithSystemDefault(dt, formatOpts);\n } else {\n return token;\n }\n },\n era = (length) =>\n knownEnglish ? English.eraForDateTime(dt, length) : string({ era: length }, \"era\"),\n tokenToString = (token) => {\n // Where possible: https://cldr.unicode.org/translation/date-time/date-time-symbols\n switch (token) {\n // ms\n case \"S\":\n return this.num(dt.millisecond);\n case \"u\":\n // falls through\n case \"SSS\":\n return this.num(dt.millisecond, 3);\n // seconds\n case \"s\":\n return this.num(dt.second);\n case \"ss\":\n return this.num(dt.second, 2);\n // fractional seconds\n case \"uu\":\n return this.num(Math.floor(dt.millisecond / 10), 2);\n case \"uuu\":\n return this.num(Math.floor(dt.millisecond / 100));\n // minutes\n case \"m\":\n return this.num(dt.minute);\n case \"mm\":\n return this.num(dt.minute, 2);\n // hours\n case \"h\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);\n case \"hh\":\n return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);\n case \"H\":\n return this.num(dt.hour);\n case \"HH\":\n return this.num(dt.hour, 2);\n // offset\n case \"Z\":\n // like +6\n return formatOffset({ format: \"narrow\", allowZ: this.opts.allowZ });\n case \"ZZ\":\n // like +06:00\n return formatOffset({ format: \"short\", allowZ: this.opts.allowZ });\n case \"ZZZ\":\n // like +0600\n return formatOffset({ format: \"techie\", allowZ: this.opts.allowZ });\n case \"ZZZZ\":\n // like EST\n return dt.zone.offsetName(dt.ts, { format: \"short\", locale: this.loc.locale });\n case \"ZZZZZ\":\n // like Eastern Standard Time\n return dt.zone.offsetName(dt.ts, { format: \"long\", locale: this.loc.locale });\n // zone\n case \"z\":\n // like America/New_York\n return dt.zoneName;\n // meridiems\n case \"a\":\n return meridiem();\n // dates\n case \"d\":\n return useDateTimeFormatter ? string({ day: \"numeric\" }, \"day\") : this.num(dt.day);\n case \"dd\":\n return useDateTimeFormatter ? string({ day: \"2-digit\" }, \"day\") : this.num(dt.day, 2);\n // weekdays - standalone\n case \"c\":\n // like 1\n return this.num(dt.weekday);\n case \"ccc\":\n // like 'Tues'\n return weekday(\"short\", true);\n case \"cccc\":\n // like 'Tuesday'\n return weekday(\"long\", true);\n case \"ccccc\":\n // like 'T'\n return weekday(\"narrow\", true);\n // weekdays - format\n case \"E\":\n // like 1\n return this.num(dt.weekday);\n case \"EEE\":\n // like 'Tues'\n return weekday(\"short\", false);\n case \"EEEE\":\n // like 'Tuesday'\n return weekday(\"long\", false);\n case \"EEEEE\":\n // like 'T'\n return weekday(\"narrow\", false);\n // months - standalone\n case \"L\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\", day: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"LL\":\n // like 01, doesn't seem to work\n return useDateTimeFormatter\n ? string({ month: \"2-digit\", day: \"numeric\" }, \"month\")\n : this.num(dt.month, 2);\n case \"LLL\":\n // like Jan\n return month(\"short\", true);\n case \"LLLL\":\n // like January\n return month(\"long\", true);\n case \"LLLLL\":\n // like J\n return month(\"narrow\", true);\n // months - format\n case \"M\":\n // like 1\n return useDateTimeFormatter\n ? string({ month: \"numeric\" }, \"month\")\n : this.num(dt.month);\n case \"MM\":\n // like 01\n return useDateTimeFormatter\n ? string({ month: \"2-digit\" }, \"month\")\n : this.num(dt.month, 2);\n case \"MMM\":\n // like Jan\n return month(\"short\", false);\n case \"MMMM\":\n // like January\n return month(\"long\", false);\n case \"MMMMM\":\n // like J\n return month(\"narrow\", false);\n // years\n case \"y\":\n // like 2014\n return useDateTimeFormatter ? string({ year: \"numeric\" }, \"year\") : this.num(dt.year);\n case \"yy\":\n // like 14\n return useDateTimeFormatter\n ? string({ year: \"2-digit\" }, \"year\")\n : this.num(dt.year.toString().slice(-2), 2);\n case \"yyyy\":\n // like 0012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 4);\n case \"yyyyyy\":\n // like 000012\n return useDateTimeFormatter\n ? string({ year: \"numeric\" }, \"year\")\n : this.num(dt.year, 6);\n // eras\n case \"G\":\n // like AD\n return era(\"short\");\n case \"GG\":\n // like Anno Domini\n return era(\"long\");\n case \"GGGGG\":\n return era(\"narrow\");\n case \"kk\":\n return this.num(dt.weekYear.toString().slice(-2), 2);\n case \"kkkk\":\n return this.num(dt.weekYear, 4);\n case \"W\":\n return this.num(dt.weekNumber);\n case \"WW\":\n return this.num(dt.weekNumber, 2);\n case \"n\":\n return this.num(dt.localWeekNumber);\n case \"nn\":\n return this.num(dt.localWeekNumber, 2);\n case \"ii\":\n return this.num(dt.localWeekYear.toString().slice(-2), 2);\n case \"iiii\":\n return this.num(dt.localWeekYear, 4);\n case \"o\":\n return this.num(dt.ordinal);\n case \"ooo\":\n return this.num(dt.ordinal, 3);\n case \"q\":\n // like 1\n return this.num(dt.quarter);\n case \"qq\":\n // like 01\n return this.num(dt.quarter, 2);\n case \"X\":\n return this.num(Math.floor(dt.ts / 1000));\n case \"x\":\n return this.num(dt.ts);\n default:\n return maybeMacro(token);\n }\n };\n\n return stringifyTokens(Formatter.parseFormat(fmt), tokenToString);\n }\n\n formatDurationFromString(dur, fmt) {\n const invertLargest = this.opts.signMode === \"negativeLargestOnly\" ? -1 : 1;\n const tokenToField = (token) => {\n switch (token[0]) {\n case \"S\":\n return \"milliseconds\";\n case \"s\":\n return \"seconds\";\n case \"m\":\n return \"minutes\";\n case \"h\":\n return \"hours\";\n case \"d\":\n return \"days\";\n case \"w\":\n return \"weeks\";\n case \"M\":\n return \"months\";\n case \"y\":\n return \"years\";\n default:\n return null;\n }\n },\n tokenToString = (lildur, info) => (token) => {\n const mapped = tokenToField(token);\n if (mapped) {\n const inversionFactor =\n info.isNegativeDuration && mapped !== info.largestUnit ? invertLargest : 1;\n let signDisplay;\n if (this.opts.signMode === \"negativeLargestOnly\" && mapped !== info.largestUnit) {\n signDisplay = \"never\";\n } else if (this.opts.signMode === \"all\") {\n signDisplay = \"always\";\n } else {\n // \"auto\" and \"negative\" are the same, but \"auto\" has better support\n signDisplay = \"auto\";\n }\n return this.num(lildur.get(mapped) * inversionFactor, token.length, signDisplay);\n } else {\n return token;\n }\n },\n tokens = Formatter.parseFormat(fmt),\n realTokens = tokens.reduce(\n (found, { literal, val }) => (literal ? found : found.concat(val)),\n []\n ),\n collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t)),\n durationInfo = {\n isNegativeDuration: collapsed < 0,\n // this relies on \"collapsed\" being based on \"shiftTo\", which builds up the object\n // in order\n largestUnit: Object.keys(collapsed.values)[0],\n };\n return stringifyTokens(tokens, tokenToString(collapsed, durationInfo));\n }\n}\n","import {\n untruncateYear,\n signedOffset,\n parseInteger,\n parseMillis,\n isUndefined,\n parseFloating,\n} from \"./util.js\";\nimport * as English from \"./english.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\n\n/*\n * This file handles parsing for well-specified formats. Here's how it works:\n * Two things go into parsing: a regex to match with and an extractor to take apart the groups in the match.\n * An extractor is just a function that takes a regex match array and returns a { year: ..., month: ... } object\n * parse() does the work of executing the regex and applying the extractor. It takes multiple regex/extractor pairs to try in sequence.\n * Extractors can take a \"cursor\" representing the offset in the match to look at. This makes it easy to combine extractors.\n * combineExtractors() does the work of combining them, keeping track of the cursor through multiple extractions.\n * Some extractions are super dumb and simpleParse and fromStrings help DRY them.\n */\n\nconst ianaRegex = /[A-Za-z_+-]{1,256}(?::?\\/[A-Za-z0-9_+-]{1,256}(?:\\/[A-Za-z0-9_+-]{1,256})?)?/;\n\nfunction combineRegexes(...regexes) {\n const full = regexes.reduce((f, r) => f + r.source, \"\");\n return RegExp(`^${full}$`);\n}\n\nfunction combineExtractors(...extractors) {\n return (m) =>\n extractors\n .reduce(\n ([mergedVals, mergedZone, cursor], ex) => {\n const [val, zone, next] = ex(m, cursor);\n return [{ ...mergedVals, ...val }, zone || mergedZone, next];\n },\n [{}, null, 1]\n )\n .slice(0, 2);\n}\n\nfunction parse(s, ...patterns) {\n if (s == null) {\n return [null, null];\n }\n\n for (const [regex, extractor] of patterns) {\n const m = regex.exec(s);\n if (m) {\n return extractor(m);\n }\n }\n return [null, null];\n}\n\nfunction simpleParse(...keys) {\n return (match, cursor) => {\n const ret = {};\n let i;\n\n for (i = 0; i < keys.length; i++) {\n ret[keys[i]] = parseInteger(match[cursor + i]);\n }\n return [ret, null, cursor + i];\n };\n}\n\n// ISO and SQL parsing\nconst offsetRegex = /(?:([Zz])|([+-]\\d\\d)(?::?(\\d\\d))?)/;\nconst isoExtendedZone = `(?:${offsetRegex.source}?(?:\\\\[(${ianaRegex.source})\\\\])?)?`;\nconst isoTimeBaseRegex = /(\\d\\d)(?::?(\\d\\d)(?::?(\\d\\d)(?:[.,](\\d{1,30}))?)?)?/;\nconst isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);\nconst isoTimeExtensionRegex = RegExp(`(?:[Tt]${isoTimeRegex.source})?`);\nconst isoYmdRegex = /([+-]\\d{6}|\\d{4})(?:-?(\\d\\d)(?:-?(\\d\\d))?)?/;\nconst isoWeekRegex = /(\\d{4})-?W(\\d\\d)(?:-?(\\d))?/;\nconst isoOrdinalRegex = /(\\d{4})-?(\\d{3})/;\nconst extractISOWeekData = simpleParse(\"weekYear\", \"weekNumber\", \"weekDay\");\nconst extractISOOrdinalData = simpleParse(\"year\", \"ordinal\");\nconst sqlYmdRegex = /(\\d{4})-(\\d\\d)-(\\d\\d)/; // dumbed-down version of the ISO one\nconst sqlTimeRegex = RegExp(\n `${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`\n);\nconst sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);\n\nfunction int(match, pos, fallback) {\n const m = match[pos];\n return isUndefined(m) ? fallback : parseInteger(m);\n}\n\nfunction extractISOYmd(match, cursor) {\n const item = {\n year: int(match, cursor),\n month: int(match, cursor + 1, 1),\n day: int(match, cursor + 2, 1),\n };\n\n return [item, null, cursor + 3];\n}\n\nfunction extractISOTime(match, cursor) {\n const item = {\n hours: int(match, cursor, 0),\n minutes: int(match, cursor + 1, 0),\n seconds: int(match, cursor + 2, 0),\n milliseconds: parseMillis(match[cursor + 3]),\n };\n\n return [item, null, cursor + 4];\n}\n\nfunction extractISOOffset(match, cursor) {\n const local = !match[cursor] && !match[cursor + 1],\n fullOffset = signedOffset(match[cursor + 1], match[cursor + 2]),\n zone = local ? null : FixedOffsetZone.instance(fullOffset);\n return [{}, zone, cursor + 3];\n}\n\nfunction extractIANAZone(match, cursor) {\n const zone = match[cursor] ? IANAZone.create(match[cursor]) : null;\n return [{}, zone, cursor + 1];\n}\n\n// ISO time parsing\n\nconst isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);\n\n// ISO duration parsing\n\nconst isoDuration =\n /^-?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)?)?)$/;\n\nfunction extractISODuration(match) {\n const [s, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] =\n match;\n\n const hasNegativePrefix = s[0] === \"-\";\n const negativeSeconds = secondStr && secondStr[0] === \"-\";\n\n const maybeNegate = (num, force = false) =>\n num !== undefined && (force || (num && hasNegativePrefix)) ? -num : num;\n\n return [\n {\n years: maybeNegate(parseFloating(yearStr)),\n months: maybeNegate(parseFloating(monthStr)),\n weeks: maybeNegate(parseFloating(weekStr)),\n days: maybeNegate(parseFloating(dayStr)),\n hours: maybeNegate(parseFloating(hourStr)),\n minutes: maybeNegate(parseFloating(minuteStr)),\n seconds: maybeNegate(parseFloating(secondStr), secondStr === \"-0\"),\n milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds),\n },\n ];\n}\n\n// These are a little braindead. EDT *should* tell us that we're in, say, America/New_York\n// and not just that we're in -240 *right now*. But since I don't think these are used that often\n// I'm just going to ignore that\nconst obsOffsets = {\n GMT: 0,\n EDT: -4 * 60,\n EST: -5 * 60,\n CDT: -5 * 60,\n CST: -6 * 60,\n MDT: -6 * 60,\n MST: -7 * 60,\n PDT: -7 * 60,\n PST: -8 * 60,\n};\n\nfunction fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {\n const result = {\n year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),\n month: English.monthsShort.indexOf(monthStr) + 1,\n day: parseInteger(dayStr),\n hour: parseInteger(hourStr),\n minute: parseInteger(minuteStr),\n };\n\n if (secondStr) result.second = parseInteger(secondStr);\n if (weekdayStr) {\n result.weekday =\n weekdayStr.length > 3\n ? English.weekdaysLong.indexOf(weekdayStr) + 1\n : English.weekdaysShort.indexOf(weekdayStr) + 1;\n }\n\n return result;\n}\n\n// RFC 2822/5322\nconst rfc2822 =\n /^(?:(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)))$/;\n\nfunction extractRFC2822(match) {\n const [\n ,\n weekdayStr,\n dayStr,\n monthStr,\n yearStr,\n hourStr,\n minuteStr,\n secondStr,\n obsOffset,\n milOffset,\n offHourStr,\n offMinuteStr,\n ] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n\n let offset;\n if (obsOffset) {\n offset = obsOffsets[obsOffset];\n } else if (milOffset) {\n offset = 0;\n } else {\n offset = signedOffset(offHourStr, offMinuteStr);\n }\n\n return [result, new FixedOffsetZone(offset)];\n}\n\nfunction preprocessRFC2822(s) {\n // Remove comments and folding whitespace and replace multiple-spaces with a single space\n return s\n .replace(/\\([^()]*\\)|[\\n\\t]/g, \" \")\n .replace(/(\\s\\s+)/g, \" \")\n .trim();\n}\n\n// http date\n\nconst rfc1123 =\n /^(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$/,\n rfc850 =\n /^(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$/,\n ascii =\n /^(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})$/;\n\nfunction extractRFC1123Or850(match) {\n const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nfunction extractASCII(match) {\n const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match,\n result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);\n return [result, FixedOffsetZone.utcInstance];\n}\n\nconst isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);\nconst isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);\nconst isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);\nconst isoTimeCombinedRegex = combineRegexes(isoTimeRegex);\n\nconst extractISOYmdTimeAndOffset = combineExtractors(\n extractISOYmd,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOWeekTimeAndOffset = combineExtractors(\n extractISOWeekData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOOrdinalDateAndTime = combineExtractors(\n extractISOOrdinalData,\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\nconst extractISOTimeAndOffset = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\n/*\n * @private\n */\n\nexport function parseISODate(s) {\n return parse(\n s,\n [isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],\n [isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],\n [isoTimeCombinedRegex, extractISOTimeAndOffset]\n );\n}\n\nexport function parseRFC2822Date(s) {\n return parse(preprocessRFC2822(s), [rfc2822, extractRFC2822]);\n}\n\nexport function parseHTTPDate(s) {\n return parse(\n s,\n [rfc1123, extractRFC1123Or850],\n [rfc850, extractRFC1123Or850],\n [ascii, extractASCII]\n );\n}\n\nexport function parseISODuration(s) {\n return parse(s, [isoDuration, extractISODuration]);\n}\n\nconst extractISOTimeOnly = combineExtractors(extractISOTime);\n\nexport function parseISOTimeOnly(s) {\n return parse(s, [isoTimeOnly, extractISOTimeOnly]);\n}\n\nconst sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);\nconst sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);\n\nconst extractISOTimeOffsetAndIANAZone = combineExtractors(\n extractISOTime,\n extractISOOffset,\n extractIANAZone\n);\n\nexport function parseSQL(s) {\n return parse(\n s,\n [sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],\n [sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]\n );\n}\n","import { InvalidArgumentError, InvalidDurationError, InvalidUnitError } from \"./errors.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Locale from \"./impl/locale.js\";\nimport { parseISODuration, parseISOTimeOnly } from \"./impl/regexParser.js\";\nimport {\n asNumber,\n hasOwnProperty,\n isNumber,\n isUndefined,\n normalizeObject,\n roundTo,\n} from \"./impl/util.js\";\nimport Settings from \"./settings.js\";\nimport DateTime from \"./datetime.js\";\n\nconst INVALID = \"Invalid Duration\";\n\n// unit conversion constants\nexport const lowOrderMatrix = {\n weeks: {\n days: 7,\n hours: 7 * 24,\n minutes: 7 * 24 * 60,\n seconds: 7 * 24 * 60 * 60,\n milliseconds: 7 * 24 * 60 * 60 * 1000,\n },\n days: {\n hours: 24,\n minutes: 24 * 60,\n seconds: 24 * 60 * 60,\n milliseconds: 24 * 60 * 60 * 1000,\n },\n hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1000 },\n minutes: { seconds: 60, milliseconds: 60 * 1000 },\n seconds: { milliseconds: 1000 },\n },\n casualMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: 52,\n days: 365,\n hours: 365 * 24,\n minutes: 365 * 24 * 60,\n seconds: 365 * 24 * 60 * 60,\n milliseconds: 365 * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: 13,\n days: 91,\n hours: 91 * 24,\n minutes: 91 * 24 * 60,\n seconds: 91 * 24 * 60 * 60,\n milliseconds: 91 * 24 * 60 * 60 * 1000,\n },\n months: {\n weeks: 4,\n days: 30,\n hours: 30 * 24,\n minutes: 30 * 24 * 60,\n seconds: 30 * 24 * 60 * 60,\n milliseconds: 30 * 24 * 60 * 60 * 1000,\n },\n\n ...lowOrderMatrix,\n },\n daysInYearAccurate = 146097.0 / 400,\n daysInMonthAccurate = 146097.0 / 4800,\n accurateMatrix = {\n years: {\n quarters: 4,\n months: 12,\n weeks: daysInYearAccurate / 7,\n days: daysInYearAccurate,\n hours: daysInYearAccurate * 24,\n minutes: daysInYearAccurate * 24 * 60,\n seconds: daysInYearAccurate * 24 * 60 * 60,\n milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1000,\n },\n quarters: {\n months: 3,\n weeks: daysInYearAccurate / 28,\n days: daysInYearAccurate / 4,\n hours: (daysInYearAccurate * 24) / 4,\n minutes: (daysInYearAccurate * 24 * 60) / 4,\n seconds: (daysInYearAccurate * 24 * 60 * 60) / 4,\n milliseconds: (daysInYearAccurate * 24 * 60 * 60 * 1000) / 4,\n },\n months: {\n weeks: daysInMonthAccurate / 7,\n days: daysInMonthAccurate,\n hours: daysInMonthAccurate * 24,\n minutes: daysInMonthAccurate * 24 * 60,\n seconds: daysInMonthAccurate * 24 * 60 * 60,\n milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1000,\n },\n ...lowOrderMatrix,\n };\n\n// units ordered by size\nconst orderedUnits = [\n \"years\",\n \"quarters\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\",\n];\n\nconst reverseUnits = orderedUnits.slice(0).reverse();\n\n// clone really means \"create another instance just like this one, but with these changes\"\nfunction clone(dur, alts, clear = false) {\n // deep merge for vals\n const conf = {\n values: clear ? alts.values : { ...dur.values, ...(alts.values || {}) },\n loc: dur.loc.clone(alts.loc),\n conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,\n matrix: alts.matrix || dur.matrix,\n };\n return new Duration(conf);\n}\n\nfunction durationToMillis(matrix, vals) {\n let sum = vals.milliseconds ?? 0;\n for (const unit of reverseUnits.slice(1)) {\n if (vals[unit]) {\n sum += vals[unit] * matrix[unit][\"milliseconds\"];\n }\n }\n return sum;\n}\n\n// NB: mutates parameters\nfunction normalizeValues(matrix, vals) {\n // the logic below assumes the overall value of the duration is positive\n // if this is not the case, factor is used to make it so\n const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;\n\n orderedUnits.reduceRight((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const previousVal = vals[previous] * factor;\n const conv = matrix[current][previous];\n\n // if (previousVal < 0):\n // lower order unit is negative (e.g. { years: 2, days: -2 })\n // normalize this by reducing the higher order unit by the appropriate amount\n // and increasing the lower order unit\n // this can never make the higher order unit negative, because this function only operates\n // on positive durations, so the amount of time represented by the lower order unit cannot\n // be larger than the higher order unit\n // else:\n // lower order unit is positive (e.g. { years: 2, days: 450 } or { years: -2, days: 450 })\n // in this case we attempt to convert as much as possible from the lower order unit into\n // the higher order one\n //\n // Math.floor takes care of both of these cases, rounding away from 0\n // if previousVal < 0 it makes the absolute value larger\n // if previousVal >= it makes the absolute value smaller\n const rollUp = Math.floor(previousVal / conv);\n vals[current] += rollUp * factor;\n vals[previous] -= rollUp * conv * factor;\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n\n // try to convert any decimals into smaller units if possible\n // for example for { years: 2.5, days: 0, seconds: 0 } we want to get { years: 2, days: 182, hours: 12 }\n orderedUnits.reduce((previous, current) => {\n if (!isUndefined(vals[current])) {\n if (previous) {\n const fraction = vals[previous] % 1;\n vals[previous] -= fraction;\n vals[current] += fraction * matrix[previous][current];\n }\n return current;\n } else {\n return previous;\n }\n }, null);\n}\n\n// Remove all properties with a value of 0 from an object\nfunction removeZeroes(vals) {\n const newVals = {};\n for (const [key, value] of Object.entries(vals)) {\n if (value !== 0) {\n newVals[key] = value;\n }\n }\n return newVals;\n}\n\n/**\n * A Duration object represents a period of time, like \"2 months\" or \"1 day, 1 hour\". Conceptually, it's just a map of units to their quantities, accompanied by some additional configuration and methods for creating, parsing, interrogating, transforming, and formatting them. They can be used on their own or in conjunction with other Luxon types; for example, you can use {@link DateTime#plus} to add a Duration object to a DateTime, producing another DateTime.\n *\n * Here is a brief overview of commonly used methods and getters in Duration:\n *\n * * **Creation** To create a Duration, use {@link Duration.fromMillis}, {@link Duration.fromObject}, or {@link Duration.fromISO}.\n * * **Unit values** See the {@link Duration#years}, {@link Duration#months}, {@link Duration#weeks}, {@link Duration#days}, {@link Duration#hours}, {@link Duration#minutes}, {@link Duration#seconds}, {@link Duration#milliseconds} accessors.\n * * **Configuration** See {@link Duration#locale} and {@link Duration#numberingSystem} accessors.\n * * **Transformation** To create new Durations out of old ones use {@link Duration#plus}, {@link Duration#minus}, {@link Duration#normalize}, {@link Duration#set}, {@link Duration#reconfigure}, {@link Duration#shiftTo}, and {@link Duration#negate}.\n * * **Output** To convert the Duration into other representations, see {@link Duration#as}, {@link Duration#toISO}, {@link Duration#toFormat}, and {@link Duration#toJSON}\n *\n * There's are more methods documented below. In addition, for more information on subtler topics like internationalization and validity, see the external documentation.\n */\nexport default class Duration {\n /**\n * @private\n */\n constructor(config) {\n const accurate = config.conversionAccuracy === \"longterm\" || false;\n let matrix = accurate ? accurateMatrix : casualMatrix;\n\n if (config.matrix) {\n matrix = config.matrix;\n }\n\n /**\n * @access private\n */\n this.values = config.values;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.conversionAccuracy = accurate ? \"longterm\" : \"casual\";\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.matrix = matrix;\n /**\n * @access private\n */\n this.isLuxonDuration = true;\n }\n\n /**\n * Create Duration from a number of milliseconds.\n * @param {number} count of milliseconds\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n static fromMillis(count, opts) {\n return Duration.fromObject({ milliseconds: count }, opts);\n }\n\n /**\n * Create a Duration from a JavaScript object with keys like 'years' and 'hours'.\n * If this object is empty then a zero milliseconds duration is returned.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.years\n * @param {number} obj.quarters\n * @param {number} obj.months\n * @param {number} obj.weeks\n * @param {number} obj.days\n * @param {number} obj.hours\n * @param {number} obj.minutes\n * @param {number} obj.seconds\n * @param {number} obj.milliseconds\n * @param {Object} [opts=[]] - options for creating this Duration\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the custom conversion system to use\n * @return {Duration}\n */\n static fromObject(obj, opts = {}) {\n if (obj == null || typeof obj !== \"object\") {\n throw new InvalidArgumentError(\n `Duration.fromObject: argument expected to be an object, got ${\n obj === null ? \"null\" : typeof obj\n }`\n );\n }\n\n return new Duration({\n values: normalizeObject(obj, Duration.normalizeUnit),\n loc: Locale.fromObject(opts),\n conversionAccuracy: opts.conversionAccuracy,\n matrix: opts.matrix,\n });\n }\n\n /**\n * Create a Duration from DurationLike.\n *\n * @param {Object | number | Duration} durationLike\n * One of:\n * - object with keys like 'years' and 'hours'.\n * - number representing milliseconds\n * - Duration instance\n * @return {Duration}\n */\n static fromDurationLike(durationLike) {\n if (isNumber(durationLike)) {\n return Duration.fromMillis(durationLike);\n } else if (Duration.isDuration(durationLike)) {\n return durationLike;\n } else if (typeof durationLike === \"object\") {\n return Duration.fromObject(durationLike);\n } else {\n throw new InvalidArgumentError(\n `Unknown duration argument ${durationLike} of type ${typeof durationLike}`\n );\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 duration string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the preset conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }\n * @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }\n * @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }\n * @return {Duration}\n */\n static fromISO(text, opts) {\n const [parsed] = parseISODuration(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create a Duration from an ISO 8601 time string.\n * @param {string} text - text to parse\n * @param {Object} opts - options for parsing\n * @param {string} [opts.locale='en-US'] - the locale to use\n * @param {string} opts.numberingSystem - the numbering system to use\n * @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use\n * @param {string} [opts.matrix=Object] - the conversion system to use\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }\n * @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }\n * @return {Duration}\n */\n static fromISOTime(text, opts) {\n const [parsed] = parseISOTimeOnly(text);\n if (parsed) {\n return Duration.fromObject(parsed, opts);\n } else {\n return Duration.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n }\n\n /**\n * Create an invalid Duration.\n * @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Duration}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Duration is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDurationError(invalid);\n } else {\n return new Duration({ invalid });\n }\n }\n\n /**\n * @private\n */\n static normalizeUnit(unit) {\n const normalized = {\n year: \"years\",\n years: \"years\",\n quarter: \"quarters\",\n quarters: \"quarters\",\n month: \"months\",\n months: \"months\",\n week: \"weeks\",\n weeks: \"weeks\",\n day: \"days\",\n days: \"days\",\n hour: \"hours\",\n hours: \"hours\",\n minute: \"minutes\",\n minutes: \"minutes\",\n second: \"seconds\",\n seconds: \"seconds\",\n millisecond: \"milliseconds\",\n milliseconds: \"milliseconds\",\n }[unit ? unit.toLowerCase() : unit];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n }\n\n /**\n * Check if an object is a Duration. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDuration(o) {\n return (o && o.isLuxonDuration) || false;\n }\n\n /**\n * Get the locale of a Duration, such 'en-GB'\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:\n * * `S` for milliseconds\n * * `s` for seconds\n * * `m` for minutes\n * * `h` for hours\n * * `d` for days\n * * `w` for weeks\n * * `M` for months\n * * `y` for years\n * Notes:\n * * Add padding by repeating the token, e.g. \"yy\" pads the years to two digits, \"hhhh\" pads the hours out to four digits\n * * Tokens can be escaped by wrapping with single quotes.\n * * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.\n * @param {string} fmt - the format string\n * @param {Object} opts - options\n * @param {boolean} [opts.floor=true] - floor numerical values\n * @param {'negative'|'all'|'negativeLargestOnly'} [opts.signMode=negative] - How to handle signs\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"y d s\") //=> \"1 6 2\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"yy dd sss\") //=> \"01 06 002\"\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat(\"M S\") //=> \"12 518402000\"\n * @example Duration.fromObject({ days: 6, seconds: 2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"+6 +2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"all\" }) //=> \"-6 -2\"\n * @example Duration.fromObject({ days: -6, seconds: -2 }).toFormat(\"d s\", { signMode: \"negativeLargestOnly\" }) //=> \"-6 2\"\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n // reverse-compat since 1.2; we always round down now, never up, and we do it by default\n const fmtOpts = {\n ...opts,\n floor: opts.round !== false && opts.floor !== false,\n };\n return this.isValid\n ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a string representation of a Duration with all units included.\n * To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options\n * @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.\n * @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.\n * @param {boolean} [opts.showZeros=true] - Show all units previously used by the duration even if they are zero\n * @example\n * ```js\n * var dur = Duration.fromObject({ months: 1, weeks: 0, hours: 5, minutes: 6 })\n * dur.toHuman() //=> '1 month, 0 weeks, 5 hours, 6 minutes'\n * dur.toHuman({ listStyle: \"long\" }) //=> '1 month, 0 weeks, 5 hours, and 6 minutes'\n * dur.toHuman({ unitDisplay: \"short\" }) //=> '1 mth, 0 wks, 5 hr, 6 min'\n * dur.toHuman({ showZeros: false }) //=> '1 month, 5 hours, 6 minutes'\n * ```\n */\n toHuman(opts = {}) {\n if (!this.isValid) return INVALID;\n\n const showZeros = opts.showZeros !== false;\n\n const l = orderedUnits\n .map((unit) => {\n const val = this.values[unit];\n if (isUndefined(val) || (val === 0 && !showZeros)) {\n return null;\n }\n return this.loc\n .numberFormatter({ style: \"unit\", unitDisplay: \"long\", ...opts, unit: unit.slice(0, -1) })\n .format(val);\n })\n .filter((n) => n);\n\n return this.loc\n .listFormatter({ type: \"conjunction\", style: opts.listStyle || \"narrow\", ...opts })\n .format(l);\n }\n\n /**\n * Returns a JavaScript object with this Duration's values.\n * @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }\n * @return {Object}\n */\n toObject() {\n if (!this.isValid) return {};\n return { ...this.values };\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Durations\n * @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'\n * @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'\n * @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'\n * @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'\n * @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'\n * @return {string}\n */\n toISO() {\n // we could use the formatter, but this is an easier way to get the minimum string\n if (!this.isValid) return null;\n\n let s = \"P\";\n if (this.years !== 0) s += this.years + \"Y\";\n if (this.months !== 0 || this.quarters !== 0) s += this.months + this.quarters * 3 + \"M\";\n if (this.weeks !== 0) s += this.weeks + \"W\";\n if (this.days !== 0) s += this.days + \"D\";\n if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)\n s += \"T\";\n if (this.hours !== 0) s += this.hours + \"H\";\n if (this.minutes !== 0) s += this.minutes + \"M\";\n if (this.seconds !== 0 || this.milliseconds !== 0)\n // this will handle \"floating point madness\" by removing extra decimal places\n // https://stackoverflow.com/questions/588004/is-floating-point-math-broken\n s += roundTo(this.seconds + this.milliseconds / 1000, 3) + \"S\";\n if (s === \"P\") s += \"T0S\";\n return s;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.\n * Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Times\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'\n * @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'\n * @return {string}\n */\n toISOTime(opts = {}) {\n if (!this.isValid) return null;\n\n const millis = this.toMillis();\n if (millis < 0 || millis >= 86400000) return null;\n\n opts = {\n suppressMilliseconds: false,\n suppressSeconds: false,\n includePrefix: false,\n format: \"extended\",\n ...opts,\n includeOffset: false,\n };\n\n const dateTime = DateTime.fromMillis(millis, { zone: \"UTC\" });\n return dateTime.toISOTime(opts);\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns an ISO 8601 representation of this Duration appropriate for use in debugging.\n * @return {string}\n */\n toString() {\n return this.toISO();\n }\n\n /**\n * Returns a string representation of this Duration appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Duration { values: ${JSON.stringify(this.values)} }`;\n } else {\n return `Duration { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns an milliseconds value of this Duration.\n * @return {number}\n */\n toMillis() {\n if (!this.isValid) return NaN;\n\n return durationToMillis(this.matrix, this.values);\n }\n\n /**\n * Returns an milliseconds value of this Duration. Alias of {@link toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Make this Duration longer by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n plus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration),\n result = {};\n\n for (const k of orderedUnits) {\n if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {\n result[k] = dur.get(k) + this.get(k);\n }\n }\n\n return clone(this, { values: result }, true);\n }\n\n /**\n * Make this Duration shorter by the specified amount. Return a newly-constructed Duration.\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @return {Duration}\n */\n minus(duration) {\n if (!this.isValid) return this;\n\n const dur = Duration.fromDurationLike(duration);\n return this.plus(dur.negate());\n }\n\n /**\n * Scale this Duration by the specified amount. Return a newly-constructed Duration.\n * @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }\n * @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === \"hours\" ? x * 2 : x) //=> { hours: 2, minutes: 30 }\n * @return {Duration}\n */\n mapUnits(fn) {\n if (!this.isValid) return this;\n const result = {};\n for (const k of Object.keys(this.values)) {\n result[k] = asNumber(fn(this.values[k], k));\n }\n return clone(this, { values: result }, true);\n }\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2\n * @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0\n * @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3\n * @return {number}\n */\n get(unit) {\n return this[Duration.normalizeUnit(unit)];\n }\n\n /**\n * \"Set\" the values of specified units. Return a newly-constructed Duration.\n * @param {Object} values - a mapping of units to numbers\n * @example dur.set({ years: 2017 })\n * @example dur.set({ hours: 8, minutes: 30 })\n * @return {Duration}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const mixed = { ...this.values, ...normalizeObject(values, Duration.normalizeUnit) };\n return clone(this, { values: mixed });\n }\n\n /**\n * \"Set\" the locale and/or numberingSystem. Returns a newly-constructed Duration.\n * @example dur.reconfigure({ locale: 'en-GB' })\n * @return {Duration}\n */\n reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem });\n const opts = { loc, matrix, conversionAccuracy };\n return clone(this, opts);\n }\n\n /**\n * Return the length of the duration in the specified unit.\n * @param {string} unit - a unit such as 'minutes' or 'days'\n * @example Duration.fromObject({years: 1}).as('days') //=> 365\n * @example Duration.fromObject({years: 1}).as('months') //=> 12\n * @example Duration.fromObject({hours: 60}).as('days') //=> 2.5\n * @return {number}\n */\n as(unit) {\n return this.isValid ? this.shiftTo(unit).get(unit) : NaN;\n }\n\n /**\n * Reduce this Duration to its canonical representation in its current units.\n * Assuming the overall value of the Duration is positive, this means:\n * - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)\n * - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise\n * the overall value would be negative, see third example)\n * - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)\n *\n * If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.\n * @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }\n * @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }\n * @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }\n * @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }\n * @return {Duration}\n */\n normalize() {\n if (!this.isValid) return this;\n const vals = this.toObject();\n normalizeValues(this.matrix, vals);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Rescale units to its largest representation\n * @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }\n * @return {Duration}\n */\n rescale() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.normalize().shiftToAll().toObject());\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Convert this Duration into its representation in a different set of units.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }\n * @return {Duration}\n */\n shiftTo(...units) {\n if (!this.isValid) return this;\n\n if (units.length === 0) {\n return this;\n }\n\n units = units.map((u) => Duration.normalizeUnit(u));\n\n const built = {},\n accumulated = {},\n vals = this.toObject();\n let lastUnit;\n\n for (const k of orderedUnits) {\n if (units.indexOf(k) >= 0) {\n lastUnit = k;\n\n let own = 0;\n\n // anything we haven't boiled down yet should get boiled to this unit\n for (const ak in accumulated) {\n own += this.matrix[ak][k] * accumulated[ak];\n accumulated[ak] = 0;\n }\n\n // plus anything that's already in this unit\n if (isNumber(vals[k])) {\n own += vals[k];\n }\n\n // only keep the integer part for now in the hopes of putting any decimal part\n // into a smaller unit later\n const i = Math.trunc(own);\n built[k] = i;\n accumulated[k] = (own * 1000 - i * 1000) / 1000;\n\n // otherwise, keep it in the wings to boil it later\n } else if (isNumber(vals[k])) {\n accumulated[k] = vals[k];\n }\n }\n\n // anything leftover becomes the decimal for the last unit\n // lastUnit must be defined since units is not empty\n for (const key in accumulated) {\n if (accumulated[key] !== 0) {\n built[lastUnit] +=\n key === lastUnit ? accumulated[key] : accumulated[key] / this.matrix[lastUnit][key];\n }\n }\n\n normalizeValues(this.matrix, built);\n return clone(this, { values: built }, true);\n }\n\n /**\n * Shift this Duration to all available units.\n * Same as shiftTo(\"years\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", \"seconds\", \"milliseconds\")\n * @return {Duration}\n */\n shiftToAll() {\n if (!this.isValid) return this;\n return this.shiftTo(\n \"years\",\n \"months\",\n \"weeks\",\n \"days\",\n \"hours\",\n \"minutes\",\n \"seconds\",\n \"milliseconds\"\n );\n }\n\n /**\n * Return the negative of this Duration.\n * @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }\n * @return {Duration}\n */\n negate() {\n if (!this.isValid) return this;\n const negated = {};\n for (const k of Object.keys(this.values)) {\n negated[k] = this.values[k] === 0 ? 0 : -this.values[k];\n }\n return clone(this, { values: negated }, true);\n }\n\n /**\n * Removes all units with values equal to 0 from this Duration.\n * @example Duration.fromObject({ years: 2, days: 0, hours: 0, minutes: 0 }).removeZeros().toObject() //=> { years: 2 }\n * @return {Duration}\n */\n removeZeros() {\n if (!this.isValid) return this;\n const vals = removeZeroes(this.values);\n return clone(this, { values: vals }, true);\n }\n\n /**\n * Get the years.\n * @type {number}\n */\n get years() {\n return this.isValid ? this.values.years || 0 : NaN;\n }\n\n /**\n * Get the quarters.\n * @type {number}\n */\n get quarters() {\n return this.isValid ? this.values.quarters || 0 : NaN;\n }\n\n /**\n * Get the months.\n * @type {number}\n */\n get months() {\n return this.isValid ? this.values.months || 0 : NaN;\n }\n\n /**\n * Get the weeks\n * @type {number}\n */\n get weeks() {\n return this.isValid ? this.values.weeks || 0 : NaN;\n }\n\n /**\n * Get the days.\n * @type {number}\n */\n get days() {\n return this.isValid ? this.values.days || 0 : NaN;\n }\n\n /**\n * Get the hours.\n * @type {number}\n */\n get hours() {\n return this.isValid ? this.values.hours || 0 : NaN;\n }\n\n /**\n * Get the minutes.\n * @type {number}\n */\n get minutes() {\n return this.isValid ? this.values.minutes || 0 : NaN;\n }\n\n /**\n * Get the seconds.\n * @return {number}\n */\n get seconds() {\n return this.isValid ? this.values.seconds || 0 : NaN;\n }\n\n /**\n * Get the milliseconds.\n * @return {number}\n */\n get milliseconds() {\n return this.isValid ? this.values.milliseconds || 0 : NaN;\n }\n\n /**\n * Returns whether the Duration is invalid. Invalid durations are returned by diff operations\n * on invalid DateTimes or Intervals.\n * @return {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this Duration became invalid, or null if the Duration is valid\n * @return {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Duration became invalid, or null if the Duration is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Equality check\n * Two Durations are equal iff they have the same units and the same values for each unit.\n * @param {Duration} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n if (!this.loc.equals(other.loc)) {\n return false;\n }\n\n function eq(v1, v2) {\n // Consider 0 and undefined as equal\n if (v1 === undefined || v1 === 0) return v2 === undefined || v2 === 0;\n return v1 === v2;\n }\n\n for (const u of orderedUnits) {\n if (!eq(this.values[u], other.values[u])) {\n return false;\n }\n }\n return true;\n }\n}\n","import DateTime, { friendlyDateTime } from \"./datetime.js\";\nimport Duration from \"./duration.js\";\nimport Settings from \"./settings.js\";\nimport { InvalidArgumentError, InvalidIntervalError } from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport * as Formats from \"./impl/formats.js\";\n\nconst INVALID = \"Invalid Interval\";\n\n// checks if the start is equal to or before the end\nfunction validateStartEnd(start, end) {\n if (!start || !start.isValid) {\n return Interval.invalid(\"missing or invalid start\");\n } else if (!end || !end.isValid) {\n return Interval.invalid(\"missing or invalid end\");\n } else if (end < start) {\n return Interval.invalid(\n \"end before start\",\n `The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`\n );\n } else {\n return null;\n }\n}\n\n/**\n * An Interval object represents a half-open interval of time, where each endpoint is a {@link DateTime}. Conceptually, it's a container for those two endpoints, accompanied by methods for creating, parsing, interrogating, comparing, transforming, and formatting them.\n *\n * Here is a brief overview of the most commonly used methods and getters in Interval:\n *\n * * **Creation** To create an Interval, use {@link Interval.fromDateTimes}, {@link Interval.after}, {@link Interval.before}, or {@link Interval.fromISO}.\n * * **Accessors** Use {@link Interval#start} and {@link Interval#end} to get the start and end.\n * * **Interrogation** To analyze the Interval, use {@link Interval#count}, {@link Interval#length}, {@link Interval#hasSame}, {@link Interval#contains}, {@link Interval#isAfter}, or {@link Interval#isBefore}.\n * * **Transformation** To create other Intervals out of this one, use {@link Interval#set}, {@link Interval#splitAt}, {@link Interval#splitBy}, {@link Interval#divideEqually}, {@link Interval.merge}, {@link Interval.xor}, {@link Interval#union}, {@link Interval#intersection}, or {@link Interval#difference}.\n * * **Comparison** To compare this Interval to another one, use {@link Interval#equals}, {@link Interval#overlaps}, {@link Interval#abutsStart}, {@link Interval#abutsEnd}, {@link Interval#engulfs}\n * * **Output** To convert the Interval into other representations, see {@link Interval#toString}, {@link Interval#toLocaleString}, {@link Interval#toISO}, {@link Interval#toISODate}, {@link Interval#toISOTime}, {@link Interval#toFormat}, and {@link Interval#toDuration}.\n */\nexport default class Interval {\n /**\n * @private\n */\n constructor(config) {\n /**\n * @access private\n */\n this.s = config.start;\n /**\n * @access private\n */\n this.e = config.end;\n /**\n * @access private\n */\n this.invalid = config.invalid || null;\n /**\n * @access private\n */\n this.isLuxonInterval = true;\n }\n\n /**\n * Create an invalid Interval.\n * @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {Interval}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the Interval is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidIntervalError(invalid);\n } else {\n return new Interval({ invalid });\n }\n }\n\n /**\n * Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.\n * @param {DateTime|Date|Object} start\n * @param {DateTime|Date|Object} end\n * @return {Interval}\n */\n static fromDateTimes(start, end) {\n const builtStart = friendlyDateTime(start),\n builtEnd = friendlyDateTime(end);\n\n const validateError = validateStartEnd(builtStart, builtEnd);\n\n if (validateError == null) {\n return new Interval({\n start: builtStart,\n end: builtEnd,\n });\n } else {\n return validateError;\n }\n }\n\n /**\n * Create an Interval from a start DateTime and a Duration to extend to.\n * @param {DateTime|Date|Object} start\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static after(start, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(start);\n return Interval.fromDateTimes(dt, dt.plus(dur));\n }\n\n /**\n * Create an Interval from an end DateTime and a Duration to extend backwards to.\n * @param {DateTime|Date|Object} end\n * @param {Duration|Object|number} duration - the length of the Interval.\n * @return {Interval}\n */\n static before(end, duration) {\n const dur = Duration.fromDurationLike(duration),\n dt = friendlyDateTime(end);\n return Interval.fromDateTimes(dt.minus(dur), dt);\n }\n\n /**\n * Create an Interval from an ISO 8601 string.\n * Accepts `/`, `/`, and `/` formats.\n * @param {string} text - the ISO string to parse\n * @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {Interval}\n */\n static fromISO(text, opts) {\n const [s, e] = (text || \"\").split(\"/\", 2);\n if (s && e) {\n let start, startIsValid;\n try {\n start = DateTime.fromISO(s, opts);\n startIsValid = start.isValid;\n } catch (e) {\n startIsValid = false;\n }\n\n let end, endIsValid;\n try {\n end = DateTime.fromISO(e, opts);\n endIsValid = end.isValid;\n } catch (e) {\n endIsValid = false;\n }\n\n if (startIsValid && endIsValid) {\n return Interval.fromDateTimes(start, end);\n }\n\n if (startIsValid) {\n const dur = Duration.fromISO(e, opts);\n if (dur.isValid) {\n return Interval.after(start, dur);\n }\n } else if (endIsValid) {\n const dur = Duration.fromISO(s, opts);\n if (dur.isValid) {\n return Interval.before(end, dur);\n }\n }\n }\n return Interval.invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ISO 8601`);\n }\n\n /**\n * Check if an object is an Interval. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isInterval(o) {\n return (o && o.isLuxonInterval) || false;\n }\n\n /**\n * Returns the start of the Interval\n * @type {DateTime}\n */\n get start() {\n return this.isValid ? this.s : null;\n }\n\n /**\n * Returns the end of the Interval. This is the first instant which is not part of the interval\n * (Interval is half-open).\n * @type {DateTime}\n */\n get end() {\n return this.isValid ? this.e : null;\n }\n\n /**\n * Returns the last DateTime included in the interval (since end is not part of the interval)\n * @type {DateTime}\n */\n get lastDateTime() {\n return this.isValid ? (this.e ? this.e.minus(1) : null) : null;\n }\n\n /**\n * Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.\n * @type {boolean}\n */\n get isValid() {\n return this.invalidReason === null;\n }\n\n /**\n * Returns an error code if this Interval is invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this Interval became invalid, or null if the Interval is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Returns the length of the Interval in the specified unit.\n * @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.\n * @return {number}\n */\n length(unit = \"milliseconds\") {\n return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;\n }\n\n /**\n * Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.\n * Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'\n * asks 'what dates are included in this interval?', not 'how many days long is this interval?'\n * @param {string} [unit='milliseconds'] - the unit of time to count.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime\n * @return {number}\n */\n count(unit = \"milliseconds\", opts) {\n if (!this.isValid) return NaN;\n const start = this.start.startOf(unit, opts);\n let end;\n if (opts?.useLocaleWeeks) {\n end = this.end.reconfigure({ locale: start.locale });\n } else {\n end = this.end;\n }\n end = end.startOf(unit, opts);\n return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());\n }\n\n /**\n * Returns whether this Interval's start and end are both in the same unit of time\n * @param {string} unit - the unit of time to check sameness on\n * @return {boolean}\n */\n hasSame(unit) {\n return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;\n }\n\n /**\n * Return whether this Interval has the same start and end DateTimes.\n * @return {boolean}\n */\n isEmpty() {\n return this.s.valueOf() === this.e.valueOf();\n }\n\n /**\n * Return whether this Interval's start is after the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isAfter(dateTime) {\n if (!this.isValid) return false;\n return this.s > dateTime;\n }\n\n /**\n * Return whether this Interval's end is before the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n isBefore(dateTime) {\n if (!this.isValid) return false;\n return this.e <= dateTime;\n }\n\n /**\n * Return whether this Interval contains the specified DateTime.\n * @param {DateTime} dateTime\n * @return {boolean}\n */\n contains(dateTime) {\n if (!this.isValid) return false;\n return this.s <= dateTime && this.e > dateTime;\n }\n\n /**\n * \"Sets\" the start and/or end dates. Returns a newly-constructed Interval.\n * @param {Object} values - the values to set\n * @param {DateTime} values.start - the starting DateTime\n * @param {DateTime} values.end - the ending DateTime\n * @return {Interval}\n */\n set({ start, end } = {}) {\n if (!this.isValid) return this;\n return Interval.fromDateTimes(start || this.s, end || this.e);\n }\n\n /**\n * Split this Interval at each of the specified DateTimes\n * @param {...DateTime} dateTimes - the unit of time to count.\n * @return {Array}\n */\n splitAt(...dateTimes) {\n if (!this.isValid) return [];\n const sorted = dateTimes\n .map(friendlyDateTime)\n .filter((d) => this.contains(d))\n .sort((a, b) => a.toMillis() - b.toMillis()),\n results = [];\n let { s } = this,\n i = 0;\n\n while (s < this.e) {\n const added = sorted[i] || this.e,\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n i += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into smaller Intervals, each of the specified length.\n * Left over time is grouped into a smaller interval\n * @param {Duration|Object|number} duration - The length of each resulting interval.\n * @return {Array}\n */\n splitBy(duration) {\n const dur = Duration.fromDurationLike(duration);\n\n if (!this.isValid || !dur.isValid || dur.as(\"milliseconds\") === 0) {\n return [];\n }\n\n let { s } = this,\n idx = 1,\n next;\n\n const results = [];\n while (s < this.e) {\n const added = this.start.plus(dur.mapUnits((x) => x * idx));\n next = +added > +this.e ? this.e : added;\n results.push(Interval.fromDateTimes(s, next));\n s = next;\n idx += 1;\n }\n\n return results;\n }\n\n /**\n * Split this Interval into the specified number of smaller intervals.\n * @param {number} numberOfParts - The number of Intervals to divide the Interval into.\n * @return {Array}\n */\n divideEqually(numberOfParts) {\n if (!this.isValid) return [];\n return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);\n }\n\n /**\n * Return whether this Interval overlaps with the specified Interval\n * @param {Interval} other\n * @return {boolean}\n */\n overlaps(other) {\n return this.e > other.s && this.s < other.e;\n }\n\n /**\n * Return whether this Interval's end is adjacent to the specified Interval's start.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsStart(other) {\n if (!this.isValid) return false;\n return +this.e === +other.s;\n }\n\n /**\n * Return whether this Interval's start is adjacent to the specified Interval's end.\n * @param {Interval} other\n * @return {boolean}\n */\n abutsEnd(other) {\n if (!this.isValid) return false;\n return +other.e === +this.s;\n }\n\n /**\n * Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.\n * @param {Interval} other\n * @return {boolean}\n */\n engulfs(other) {\n if (!this.isValid) return false;\n return this.s <= other.s && this.e >= other.e;\n }\n\n /**\n * Return whether this Interval has the same start and end as the specified Interval.\n * @param {Interval} other\n * @return {boolean}\n */\n equals(other) {\n if (!this.isValid || !other.isValid) {\n return false;\n }\n\n return this.s.equals(other.s) && this.e.equals(other.e);\n }\n\n /**\n * Return an Interval representing the intersection of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.\n * Returns null if the intersection is empty, meaning, the intervals don't intersect.\n * @param {Interval} other\n * @return {Interval}\n */\n intersection(other) {\n if (!this.isValid) return this;\n const s = this.s > other.s ? this.s : other.s,\n e = this.e < other.e ? this.e : other.e;\n\n if (s >= e) {\n return null;\n } else {\n return Interval.fromDateTimes(s, e);\n }\n }\n\n /**\n * Return an Interval representing the union of this Interval and the specified Interval.\n * Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.\n * @param {Interval} other\n * @return {Interval}\n */\n union(other) {\n if (!this.isValid) return this;\n const s = this.s < other.s ? this.s : other.s,\n e = this.e > other.e ? this.e : other.e;\n return Interval.fromDateTimes(s, e);\n }\n\n /**\n * Merge an array of Intervals into an equivalent minimal set of Intervals.\n * Combines overlapping and adjacent Intervals.\n * The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval\n * and ending with the latest.\n *\n * @param {Array} intervals\n * @return {Array}\n */\n static merge(intervals) {\n const [found, final] = intervals\n .sort((a, b) => a.s - b.s)\n .reduce(\n ([sofar, current], item) => {\n if (!current) {\n return [sofar, item];\n } else if (current.overlaps(item) || current.abutsStart(item)) {\n return [sofar, current.union(item)];\n } else {\n return [sofar.concat([current]), item];\n }\n },\n [[], null]\n );\n if (final) {\n found.push(final);\n }\n return found;\n }\n\n /**\n * Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.\n * @param {Array} intervals\n * @return {Array}\n */\n static xor(intervals) {\n let start = null,\n currentCount = 0;\n const results = [],\n ends = intervals.map((i) => [\n { time: i.s, type: \"s\" },\n { time: i.e, type: \"e\" },\n ]),\n flattened = Array.prototype.concat(...ends),\n arr = flattened.sort((a, b) => a.time - b.time);\n\n for (const i of arr) {\n currentCount += i.type === \"s\" ? 1 : -1;\n\n if (currentCount === 1) {\n start = i.time;\n } else {\n if (start && +start !== +i.time) {\n results.push(Interval.fromDateTimes(start, i.time));\n }\n\n start = null;\n }\n }\n\n return Interval.merge(results);\n }\n\n /**\n * Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.\n * @param {...Interval} intervals\n * @return {Array}\n */\n difference(...intervals) {\n return Interval.xor([this].concat(intervals))\n .map((i) => this.intersection(i))\n .filter((i) => i && !i.isEmpty());\n }\n\n /**\n * Returns a string representation of this Interval appropriate for debugging.\n * @return {string}\n */\n toString() {\n if (!this.isValid) return INVALID;\n return `[${this.s.toISO()} – ${this.e.toISO()})`;\n }\n\n /**\n * Returns a string representation of this Interval appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;\n } else {\n return `Interval { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns a localized string representing this Interval. Accepts the same options as the\n * Intl.DateTimeFormat constructor and any presets defined by Luxon, such as\n * {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method\n * is browser-specific, but in general it will return an appropriate representation of the\n * Interval in the assigned locale. Defaults to the system's locale if no locale has been\n * specified.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or\n * Intl.DateTimeFormat constructor options.\n * @param {Object} opts - Options to override the configuration of the start DateTime.\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 – 11/8/2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 – 8, 2022\n * @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 7–8 novembre 2022\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 – 8:00 PM\n * @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 – 8:00 p\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this)\n : INVALID;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this Interval.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISO(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of date of this Interval.\n * The time components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @return {string}\n */\n toISODate() {\n if (!this.isValid) return INVALID;\n return `${this.s.toISODate()}/${this.e.toISODate()}`;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of time of this Interval.\n * The date components are ignored.\n * @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals\n * @param {Object} opts - The same options as {@link DateTime#toISO}\n * @return {string}\n */\n toISOTime(opts) {\n if (!this.isValid) return INVALID;\n return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this Interval formatted according to the specified format\n * string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible\n * formatting tool.\n * @param {string} dateFormat - The format string. This string formats the start and end time.\n * See {@link DateTime#toFormat} for details.\n * @param {Object} opts - Options.\n * @param {string} [opts.separator = ' – '] - A separator to place between the start and end\n * representations.\n * @return {string}\n */\n toFormat(dateFormat, { separator = \" – \" } = {}) {\n if (!this.isValid) return INVALID;\n return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;\n }\n\n /**\n * Return a Duration representing the time spanned by this interval.\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }\n * @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }\n * @return {Duration}\n */\n toDuration(unit, opts) {\n if (!this.isValid) {\n return Duration.invalid(this.invalidReason);\n }\n return this.e.diff(this.s, unit, opts);\n }\n\n /**\n * Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes\n * @param {function} mapFn\n * @return {Interval}\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())\n * @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))\n */\n mapEndpoints(mapFn) {\n return Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));\n }\n}\n","import DateTime from \"./datetime.js\";\nimport Settings from \"./settings.js\";\nimport Locale from \"./impl/locale.js\";\nimport IANAZone from \"./zones/IANAZone.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\n\nimport { hasLocaleWeekInfo, hasRelative } from \"./impl/util.js\";\n\n/**\n * The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.\n */\nexport default class Info {\n /**\n * Return whether the specified zone contains a DST.\n * @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.\n * @return {boolean}\n */\n static hasDST(zone = Settings.defaultZone) {\n const proto = DateTime.now().setZone(zone).set({ month: 12 });\n\n return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;\n }\n\n /**\n * Return whether the specified zone is a valid IANA specifier.\n * @param {string} zone - Zone to check\n * @return {boolean}\n */\n static isValidIANAZone(zone) {\n return IANAZone.isValidZone(zone);\n }\n\n /**\n * Converts the input into a {@link Zone} instance.\n *\n * * If `input` is already a Zone instance, it is returned unchanged.\n * * If `input` is a string containing a valid time zone name, a Zone instance\n * with that name is returned.\n * * If `input` is a string that doesn't refer to a known time zone, a Zone\n * instance with {@link Zone#isValid} == false is returned.\n * * If `input is a number, a Zone instance with the specified fixed offset\n * in minutes is returned.\n * * If `input` is `null` or `undefined`, the default zone is returned.\n * @param {string|Zone|number} [input] - the value to be converted\n * @return {Zone}\n */\n static normalizeZone(input) {\n return normalizeZone(input, Settings.defaultZone);\n }\n\n /**\n * Get the weekday on which the week starts according to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number} the start of the week, 1 for Monday through 7 for Sunday\n */\n static getStartOfWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getStartOfWeek();\n }\n\n /**\n * Get the minimum number of days necessary in a week before it is considered part of the next year according\n * to the given locale.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number}\n */\n static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();\n }\n\n /**\n * Get the weekdays, which are considered the weekend according to the given locale\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday\n */\n static getWeekendWeekdays({ locale = null, locObj = null } = {}) {\n // copy the array, because we cache it internally\n return (locObj || Locale.create(locale)).getWeekendDays().slice();\n }\n\n /**\n * Return an array of standalone month names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @example Info.months()[0] //=> 'January'\n * @example Info.months('short')[0] //=> 'Jan'\n * @example Info.months('numeric')[0] //=> '1'\n * @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'\n * @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'\n * @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'\n * @return {Array}\n */\n static months(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);\n }\n\n /**\n * Return an array of format month names.\n * Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that\n * changes the string.\n * See {@link Info#months}\n * @param {string} [length='long'] - the length of the month representation, such as \"numeric\", \"2-digit\", \"narrow\", \"short\", \"long\"\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @param {string} [opts.outputCalendar='gregory'] - the calendar\n * @return {Array}\n */\n static monthsFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null, outputCalendar = \"gregory\" } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);\n }\n\n /**\n * Return an array of standalone week names.\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param {string} [length='long'] - the length of the weekday representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @example Info.weekdays()[0] //=> 'Monday'\n * @example Info.weekdays('short')[0] //=> 'Mon'\n * @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'\n * @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'\n * @return {Array}\n */\n static weekdays(length = \"long\", { locale = null, numberingSystem = null, locObj = null } = {}) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);\n }\n\n /**\n * Return an array of format week names.\n * Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that\n * changes the string.\n * See {@link Info#weekdays}\n * @param {string} [length='long'] - the length of the month representation, such as \"narrow\", \"short\", \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale=null] - the locale code\n * @param {string} [opts.numberingSystem=null] - the numbering system\n * @param {string} [opts.locObj=null] - an existing locale object to use\n * @return {Array}\n */\n static weekdaysFormat(\n length = \"long\",\n { locale = null, numberingSystem = null, locObj = null } = {}\n ) {\n return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);\n }\n\n /**\n * Return an array of meridiems.\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.meridiems() //=> [ 'AM', 'PM' ]\n * @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]\n * @return {Array}\n */\n static meridiems({ locale = null } = {}) {\n return Locale.create(locale).meridiems();\n }\n\n /**\n * Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.\n * @param {string} [length='short'] - the length of the era representation, such as \"short\" or \"long\".\n * @param {Object} opts - options\n * @param {string} [opts.locale] - the locale code\n * @example Info.eras() //=> [ 'BC', 'AD' ]\n * @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]\n * @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]\n * @return {Array}\n */\n static eras(length = \"short\", { locale = null } = {}) {\n return Locale.create(locale, null, \"gregory\").eras(length);\n }\n\n /**\n * Return the set of available features in this environment.\n * Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.\n * Keys:\n * * `relative`: whether this environment supports relative time formatting\n * * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale\n * @example Info.features() //=> { relative: false, localeWeek: true }\n * @return {Object}\n */\n static features() {\n return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };\n }\n}\n","import Duration from \"../duration.js\";\n\nfunction dayDiff(earlier, later) {\n const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf(\"day\").valueOf(),\n ms = utcDayStart(later) - utcDayStart(earlier);\n return Math.floor(Duration.fromMillis(ms).as(\"days\"));\n}\n\nfunction highOrderDiffs(cursor, later, units) {\n const differs = [\n [\"years\", (a, b) => b.year - a.year],\n [\"quarters\", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],\n [\"months\", (a, b) => b.month - a.month + (b.year - a.year) * 12],\n [\n \"weeks\",\n (a, b) => {\n const days = dayDiff(a, b);\n return (days - (days % 7)) / 7;\n },\n ],\n [\"days\", dayDiff],\n ];\n\n const results = {};\n const earlier = cursor;\n let lowestOrder, highWater;\n\n /* This loop tries to diff using larger units first.\n If we overshoot, we backtrack and try the next smaller unit.\n \"cursor\" starts out at the earlier timestamp and moves closer and closer to \"later\"\n as we use smaller and smaller units.\n highWater keeps track of where we would be if we added one more of the smallest unit,\n this is used later to potentially convert any difference smaller than the smallest higher order unit\n into a fraction of that smallest higher order unit\n */\n for (const [unit, differ] of differs) {\n if (units.indexOf(unit) >= 0) {\n lowestOrder = unit;\n\n results[unit] = differ(cursor, later);\n highWater = earlier.plus(results);\n\n if (highWater > later) {\n // we overshot the end point, backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n\n // if we are still overshooting now, we need to backtrack again\n // this happens in certain situations when diffing times in different zones,\n // because this calculation ignores time zones\n if (cursor > later) {\n // keep the \"overshot by 1\" around as highWater\n highWater = cursor;\n // backtrack cursor by 1\n results[unit]--;\n cursor = earlier.plus(results);\n }\n } else {\n cursor = highWater;\n }\n }\n }\n\n return [cursor, results, highWater, lowestOrder];\n}\n\nexport default function (earlier, later, units, opts) {\n let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);\n\n const remainingMillis = later - cursor;\n\n const lowerOrderUnits = units.filter(\n (u) => [\"hours\", \"minutes\", \"seconds\", \"milliseconds\"].indexOf(u) >= 0\n );\n\n if (lowerOrderUnits.length === 0) {\n if (highWater < later) {\n highWater = cursor.plus({ [lowestOrder]: 1 });\n }\n\n if (highWater !== cursor) {\n results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);\n }\n }\n\n const duration = Duration.fromObject(results, opts);\n\n if (lowerOrderUnits.length > 0) {\n return Duration.fromMillis(remainingMillis, opts)\n .shiftTo(...lowerOrderUnits)\n .plus(duration);\n } else {\n return duration;\n }\n}\n","import { parseMillis, isUndefined, untruncateYear, signedOffset, hasOwnProperty } from \"./util.js\";\nimport Formatter from \"./formatter.js\";\nimport FixedOffsetZone from \"../zones/fixedOffsetZone.js\";\nimport IANAZone from \"../zones/IANAZone.js\";\nimport DateTime from \"../datetime.js\";\nimport { digitRegex, parseDigits } from \"./digits.js\";\nimport { ConflictingSpecificationError } from \"../errors.js\";\n\nconst MISSING_FTP = \"missing Intl.DateTimeFormat.formatToParts support\";\n\nfunction intUnit(regex, post = (i) => i) {\n return { regex, deser: ([s]) => post(parseDigits(s)) };\n}\n\nconst NBSP = String.fromCharCode(160);\nconst spaceOrNBSP = `[ ${NBSP}]`;\nconst spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, \"g\");\n\nfunction fixListRegex(s) {\n // make dots optional and also make them literal\n // make space and non breakable space characters interchangeable\n return s.replace(/\\./g, \"\\\\.?\").replace(spaceOrNBSPRegExp, spaceOrNBSP);\n}\n\nfunction stripInsensitivities(s) {\n return s\n .replace(/\\./g, \"\") // ignore dots that were made optional\n .replace(spaceOrNBSPRegExp, \" \") // interchange space and nbsp\n .toLowerCase();\n}\n\nfunction oneOf(strings, startIndex) {\n if (strings === null) {\n return null;\n } else {\n return {\n regex: RegExp(strings.map(fixListRegex).join(\"|\")),\n deser: ([s]) =>\n strings.findIndex((i) => stripInsensitivities(s) === stripInsensitivities(i)) + startIndex,\n };\n }\n}\n\nfunction offset(regex, groups) {\n return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };\n}\n\nfunction simple(regex) {\n return { regex, deser: ([s]) => s };\n}\n\nfunction escapeToken(value) {\n return value.replace(/[\\-\\[\\]{}()*+?.,\\\\\\^$|#\\s]/g, \"\\\\$&\");\n}\n\n/**\n * @param token\n * @param {Locale} loc\n */\nfunction unitForToken(token, loc) {\n const one = digitRegex(loc),\n two = digitRegex(loc, \"{2}\"),\n three = digitRegex(loc, \"{3}\"),\n four = digitRegex(loc, \"{4}\"),\n six = digitRegex(loc, \"{6}\"),\n oneOrTwo = digitRegex(loc, \"{1,2}\"),\n oneToThree = digitRegex(loc, \"{1,3}\"),\n oneToSix = digitRegex(loc, \"{1,6}\"),\n oneToNine = digitRegex(loc, \"{1,9}\"),\n twoToFour = digitRegex(loc, \"{2,4}\"),\n fourToSix = digitRegex(loc, \"{4,6}\"),\n literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s]) => s, literal: true }),\n unitate = (t) => {\n if (token.literal) {\n return literal(t);\n }\n switch (t.val) {\n // era\n case \"G\":\n return oneOf(loc.eras(\"short\"), 0);\n case \"GG\":\n return oneOf(loc.eras(\"long\"), 0);\n // years\n case \"y\":\n return intUnit(oneToSix);\n case \"yy\":\n return intUnit(twoToFour, untruncateYear);\n case \"yyyy\":\n return intUnit(four);\n case \"yyyyy\":\n return intUnit(fourToSix);\n case \"yyyyyy\":\n return intUnit(six);\n // months\n case \"M\":\n return intUnit(oneOrTwo);\n case \"MM\":\n return intUnit(two);\n case \"MMM\":\n return oneOf(loc.months(\"short\", true), 1);\n case \"MMMM\":\n return oneOf(loc.months(\"long\", true), 1);\n case \"L\":\n return intUnit(oneOrTwo);\n case \"LL\":\n return intUnit(two);\n case \"LLL\":\n return oneOf(loc.months(\"short\", false), 1);\n case \"LLLL\":\n return oneOf(loc.months(\"long\", false), 1);\n // dates\n case \"d\":\n return intUnit(oneOrTwo);\n case \"dd\":\n return intUnit(two);\n // ordinals\n case \"o\":\n return intUnit(oneToThree);\n case \"ooo\":\n return intUnit(three);\n // time\n case \"HH\":\n return intUnit(two);\n case \"H\":\n return intUnit(oneOrTwo);\n case \"hh\":\n return intUnit(two);\n case \"h\":\n return intUnit(oneOrTwo);\n case \"mm\":\n return intUnit(two);\n case \"m\":\n return intUnit(oneOrTwo);\n case \"q\":\n return intUnit(oneOrTwo);\n case \"qq\":\n return intUnit(two);\n case \"s\":\n return intUnit(oneOrTwo);\n case \"ss\":\n return intUnit(two);\n case \"S\":\n return intUnit(oneToThree);\n case \"SSS\":\n return intUnit(three);\n case \"u\":\n return simple(oneToNine);\n case \"uu\":\n return simple(oneOrTwo);\n case \"uuu\":\n return intUnit(one);\n // meridiem\n case \"a\":\n return oneOf(loc.meridiems(), 0);\n // weekYear (k)\n case \"kkkk\":\n return intUnit(four);\n case \"kk\":\n return intUnit(twoToFour, untruncateYear);\n // weekNumber (W)\n case \"W\":\n return intUnit(oneOrTwo);\n case \"WW\":\n return intUnit(two);\n // weekdays\n case \"E\":\n case \"c\":\n return intUnit(one);\n case \"EEE\":\n return oneOf(loc.weekdays(\"short\", false), 1);\n case \"EEEE\":\n return oneOf(loc.weekdays(\"long\", false), 1);\n case \"ccc\":\n return oneOf(loc.weekdays(\"short\", true), 1);\n case \"cccc\":\n return oneOf(loc.weekdays(\"long\", true), 1);\n // offset/zone\n case \"Z\":\n case \"ZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);\n case \"ZZZ\":\n return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);\n // we don't support ZZZZ (PST) or ZZZZZ (Pacific Standard Time) in parsing\n // because we don't have any way to figure out what they are\n case \"z\":\n return simple(/[a-z_+-/]{1,256}?/i);\n // this special-case \"token\" represents a place where a macro-token expanded into a white-space literal\n // in this case we accept any non-newline white-space\n case \" \":\n return simple(/[^\\S\\n\\r]/);\n default:\n return literal(t);\n }\n };\n\n const unit = unitate(token) || {\n invalidReason: MISSING_FTP,\n };\n\n unit.token = token;\n\n return unit;\n}\n\nconst partTypeStyleToTokenVal = {\n year: {\n \"2-digit\": \"yy\",\n numeric: \"yyyyy\",\n },\n month: {\n numeric: \"M\",\n \"2-digit\": \"MM\",\n short: \"MMM\",\n long: \"MMMM\",\n },\n day: {\n numeric: \"d\",\n \"2-digit\": \"dd\",\n },\n weekday: {\n short: \"EEE\",\n long: \"EEEE\",\n },\n dayperiod: \"a\",\n dayPeriod: \"a\",\n hour12: {\n numeric: \"h\",\n \"2-digit\": \"hh\",\n },\n hour24: {\n numeric: \"H\",\n \"2-digit\": \"HH\",\n },\n minute: {\n numeric: \"m\",\n \"2-digit\": \"mm\",\n },\n second: {\n numeric: \"s\",\n \"2-digit\": \"ss\",\n },\n timeZoneName: {\n long: \"ZZZZZ\",\n short: \"ZZZ\",\n },\n};\n\nfunction tokenForPart(part, formatOpts, resolvedOpts) {\n const { type, value } = part;\n\n if (type === \"literal\") {\n const isSpace = /^\\s+$/.test(value);\n return {\n literal: !isSpace,\n val: isSpace ? \" \" : value,\n };\n }\n\n const style = formatOpts[type];\n\n // The user might have explicitly specified hour12 or hourCycle\n // if so, respect their decision\n // if not, refer back to the resolvedOpts, which are based on the locale\n let actualType = type;\n if (type === \"hour\") {\n if (formatOpts.hour12 != null) {\n actualType = formatOpts.hour12 ? \"hour12\" : \"hour24\";\n } else if (formatOpts.hourCycle != null) {\n if (formatOpts.hourCycle === \"h11\" || formatOpts.hourCycle === \"h12\") {\n actualType = \"hour12\";\n } else {\n actualType = \"hour24\";\n }\n } else {\n // tokens only differentiate between 24 hours or not,\n // so we do not need to check hourCycle here, which is less supported anyways\n actualType = resolvedOpts.hour12 ? \"hour12\" : \"hour24\";\n }\n }\n let val = partTypeStyleToTokenVal[actualType];\n if (typeof val === \"object\") {\n val = val[style];\n }\n\n if (val) {\n return {\n literal: false,\n val,\n };\n }\n\n return undefined;\n}\n\nfunction buildRegex(units) {\n const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, \"\");\n return [`^${re}$`, units];\n}\n\nfunction match(input, regex, handlers) {\n const matches = input.match(regex);\n\n if (matches) {\n const all = {};\n let matchIndex = 1;\n for (const i in handlers) {\n if (hasOwnProperty(handlers, i)) {\n const h = handlers[i],\n groups = h.groups ? h.groups + 1 : 1;\n if (!h.literal && h.token) {\n all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));\n }\n matchIndex += groups;\n }\n }\n return [matches, all];\n } else {\n return [matches, {}];\n }\n}\n\nfunction dateTimeFromMatches(matches) {\n const toField = (token) => {\n switch (token) {\n case \"S\":\n return \"millisecond\";\n case \"s\":\n return \"second\";\n case \"m\":\n return \"minute\";\n case \"h\":\n case \"H\":\n return \"hour\";\n case \"d\":\n return \"day\";\n case \"o\":\n return \"ordinal\";\n case \"L\":\n case \"M\":\n return \"month\";\n case \"y\":\n return \"year\";\n case \"E\":\n case \"c\":\n return \"weekday\";\n case \"W\":\n return \"weekNumber\";\n case \"k\":\n return \"weekYear\";\n case \"q\":\n return \"quarter\";\n default:\n return null;\n }\n };\n\n let zone = null;\n let specificOffset;\n if (!isUndefined(matches.z)) {\n zone = IANAZone.create(matches.z);\n }\n\n if (!isUndefined(matches.Z)) {\n if (!zone) {\n zone = new FixedOffsetZone(matches.Z);\n }\n specificOffset = matches.Z;\n }\n\n if (!isUndefined(matches.q)) {\n matches.M = (matches.q - 1) * 3 + 1;\n }\n\n if (!isUndefined(matches.h)) {\n if (matches.h < 12 && matches.a === 1) {\n matches.h += 12;\n } else if (matches.h === 12 && matches.a === 0) {\n matches.h = 0;\n }\n }\n\n if (matches.G === 0 && matches.y) {\n matches.y = -matches.y;\n }\n\n if (!isUndefined(matches.u)) {\n matches.S = parseMillis(matches.u);\n }\n\n const vals = Object.keys(matches).reduce((r, k) => {\n const f = toField(k);\n if (f) {\n r[f] = matches[k];\n }\n\n return r;\n }, {});\n\n return [vals, zone, specificOffset];\n}\n\nlet dummyDateTimeCache = null;\n\nfunction getDummyDateTime() {\n if (!dummyDateTimeCache) {\n dummyDateTimeCache = DateTime.fromMillis(1555555555555);\n }\n\n return dummyDateTimeCache;\n}\n\nfunction maybeExpandMacroToken(token, locale) {\n if (token.literal) {\n return token;\n }\n\n const formatOpts = Formatter.macroTokenToFormatOpts(token.val);\n const tokens = formatOptsToTokens(formatOpts, locale);\n\n if (tokens == null || tokens.includes(undefined)) {\n return token;\n }\n\n return tokens;\n}\n\nexport function expandMacroTokens(tokens, locale) {\n return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));\n}\n\n/**\n * @private\n */\n\nexport class TokenParser {\n constructor(locale, format) {\n this.locale = locale;\n this.format = format;\n this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);\n this.units = this.tokens.map((t) => unitForToken(t, locale));\n this.disqualifyingUnit = this.units.find((t) => t.invalidReason);\n\n if (!this.disqualifyingUnit) {\n const [regexString, handlers] = buildRegex(this.units);\n this.regex = RegExp(regexString, \"i\");\n this.handlers = handlers;\n }\n }\n\n explainFromTokens(input) {\n if (!this.isValid) {\n return { input, tokens: this.tokens, invalidReason: this.invalidReason };\n } else {\n const [rawMatches, matches] = match(input, this.regex, this.handlers),\n [result, zone, specificOffset] = matches\n ? dateTimeFromMatches(matches)\n : [null, null, undefined];\n if (hasOwnProperty(matches, \"a\") && hasOwnProperty(matches, \"H\")) {\n throw new ConflictingSpecificationError(\n \"Can't include meridiem when specifying 24-hour format\"\n );\n }\n return {\n input,\n tokens: this.tokens,\n regex: this.regex,\n rawMatches,\n matches,\n result,\n zone,\n specificOffset,\n };\n }\n }\n\n get isValid() {\n return !this.disqualifyingUnit;\n }\n\n get invalidReason() {\n return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;\n }\n}\n\nexport function explainFromTokens(locale, input, format) {\n const parser = new TokenParser(locale, format);\n return parser.explainFromTokens(input);\n}\n\nexport function parseFromTokens(locale, input, format) {\n const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);\n return [result, zone, specificOffset, invalidReason];\n}\n\nexport function formatOptsToTokens(formatOpts, locale) {\n if (!formatOpts) {\n return null;\n }\n\n const formatter = Formatter.create(locale, formatOpts);\n const df = formatter.dtFormatter(getDummyDateTime());\n const parts = df.formatToParts();\n const resolvedOpts = df.resolvedOptions();\n return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));\n}\n","import Duration from \"./duration.js\";\nimport Interval from \"./interval.js\";\nimport Settings from \"./settings.js\";\nimport Info from \"./info.js\";\nimport Formatter from \"./impl/formatter.js\";\nimport FixedOffsetZone from \"./zones/fixedOffsetZone.js\";\nimport Locale from \"./impl/locale.js\";\nimport {\n isUndefined,\n maybeArray,\n isDate,\n isNumber,\n bestBy,\n daysInMonth,\n daysInYear,\n isLeapYear,\n weeksInWeekYear,\n normalizeObject,\n roundTo,\n objToLocalTS,\n padStart,\n} from \"./impl/util.js\";\nimport { normalizeZone } from \"./impl/zoneUtil.js\";\nimport diff from \"./impl/diff.js\";\nimport { parseRFC2822Date, parseISODate, parseHTTPDate, parseSQL } from \"./impl/regexParser.js\";\nimport {\n parseFromTokens,\n explainFromTokens,\n formatOptsToTokens,\n expandMacroTokens,\n TokenParser,\n} from \"./impl/tokenParser.js\";\nimport {\n gregorianToWeek,\n weekToGregorian,\n gregorianToOrdinal,\n ordinalToGregorian,\n hasInvalidGregorianData,\n hasInvalidWeekData,\n hasInvalidOrdinalData,\n hasInvalidTimeData,\n usesLocalWeekValues,\n isoWeekdayToLocal,\n} from \"./impl/conversions.js\";\nimport * as Formats from \"./impl/formats.js\";\nimport {\n InvalidArgumentError,\n ConflictingSpecificationError,\n InvalidUnitError,\n InvalidDateTimeError,\n} from \"./errors.js\";\nimport Invalid from \"./impl/invalid.js\";\n\nconst INVALID = \"Invalid DateTime\";\nconst MAX_DATE = 8.64e15;\n\nfunction unsupportedZone(zone) {\n return new Invalid(\"unsupported zone\", `the zone \"${zone.name}\" is not supported`);\n}\n\n// we cache week data on the DT object and this intermediates the cache\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedWeekData(dt) {\n if (dt.weekData === null) {\n dt.weekData = gregorianToWeek(dt.c);\n }\n return dt.weekData;\n}\n\n/**\n * @param {DateTime} dt\n */\nfunction possiblyCachedLocalWeekData(dt) {\n if (dt.localWeekData === null) {\n dt.localWeekData = gregorianToWeek(\n dt.c,\n dt.loc.getMinDaysInFirstWeek(),\n dt.loc.getStartOfWeek()\n );\n }\n return dt.localWeekData;\n}\n\n// clone really means, \"make a new object with these modifications\". all \"setters\" really use this\n// to create a new object while only changing some of the properties\nfunction clone(inst, alts) {\n const current = {\n ts: inst.ts,\n zone: inst.zone,\n c: inst.c,\n o: inst.o,\n loc: inst.loc,\n invalid: inst.invalid,\n };\n return new DateTime({ ...current, ...alts, old: current });\n}\n\n// find the right offset a given local time. The o input is our guess, which determines which\n// offset we'll pick in ambiguous cases (e.g. there are two 3 AMs b/c Fallback DST)\nfunction fixOffset(localTS, o, tz) {\n // Our UTC time is just a guess because our offset is just a guess\n let utcGuess = localTS - o * 60 * 1000;\n\n // Test whether the zone matches the offset for this ts\n const o2 = tz.offset(utcGuess);\n\n // If so, offset didn't change and we're done\n if (o === o2) {\n return [utcGuess, o];\n }\n\n // If not, change the ts by the difference in the offset\n utcGuess -= (o2 - o) * 60 * 1000;\n\n // If that gives us the local time we want, we're done\n const o3 = tz.offset(utcGuess);\n if (o2 === o3) {\n return [utcGuess, o2];\n }\n\n // If it's different, we're in a hole time. The offset has changed, but the we don't adjust the time\n return [localTS - Math.min(o2, o3) * 60 * 1000, Math.max(o2, o3)];\n}\n\n// convert an epoch timestamp into a calendar object with the given offset\nfunction tsToObj(ts, offset) {\n ts += offset * 60 * 1000;\n\n const d = new Date(ts);\n\n return {\n year: d.getUTCFullYear(),\n month: d.getUTCMonth() + 1,\n day: d.getUTCDate(),\n hour: d.getUTCHours(),\n minute: d.getUTCMinutes(),\n second: d.getUTCSeconds(),\n millisecond: d.getUTCMilliseconds(),\n };\n}\n\n// convert a calendar object to a epoch timestamp\nfunction objToTS(obj, offset, zone) {\n return fixOffset(objToLocalTS(obj), offset, zone);\n}\n\n// create a new DT instance by adding a duration, adjusting for DSTs\nfunction adjustTime(inst, dur) {\n const oPre = inst.o,\n year = inst.c.year + Math.trunc(dur.years),\n month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3,\n c = {\n ...inst.c,\n year,\n month,\n day:\n Math.min(inst.c.day, daysInMonth(year, month)) +\n Math.trunc(dur.days) +\n Math.trunc(dur.weeks) * 7,\n },\n millisToAdd = Duration.fromObject({\n years: dur.years - Math.trunc(dur.years),\n quarters: dur.quarters - Math.trunc(dur.quarters),\n months: dur.months - Math.trunc(dur.months),\n weeks: dur.weeks - Math.trunc(dur.weeks),\n days: dur.days - Math.trunc(dur.days),\n hours: dur.hours,\n minutes: dur.minutes,\n seconds: dur.seconds,\n milliseconds: dur.milliseconds,\n }).as(\"milliseconds\"),\n localTS = objToLocalTS(c);\n\n let [ts, o] = fixOffset(localTS, oPre, inst.zone);\n\n if (millisToAdd !== 0) {\n ts += millisToAdd;\n // that could have changed the offset by going over a DST, but we want to keep the ts the same\n o = inst.zone.offset(ts);\n }\n\n return { ts, o };\n}\n\n// helper useful in turning the results of parsing into real dates\n// by handling the zone options\nfunction parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {\n const { setZone, zone } = opts;\n if ((parsed && Object.keys(parsed).length !== 0) || parsedZone) {\n const interpretationZone = parsedZone || zone,\n inst = DateTime.fromObject(parsed, {\n ...opts,\n zone: interpretationZone,\n specificOffset,\n });\n return setZone ? inst : inst.setZone(zone);\n } else {\n return DateTime.invalid(\n new Invalid(\"unparsable\", `the input \"${text}\" can't be parsed as ${format}`)\n );\n }\n}\n\n// if you want to output a technical format (e.g. RFC 2822), this helper\n// helps handle the details\nfunction toTechFormat(dt, format, allowZ = true) {\n return dt.isValid\n ? Formatter.create(Locale.create(\"en-US\"), {\n allowZ,\n forceSimple: true,\n }).formatDateTimeFromString(dt, format)\n : null;\n}\n\nfunction toISODate(o, extended, precision) {\n const longFormat = o.c.year > 9999 || o.c.year < 0;\n let c = \"\";\n if (longFormat && o.c.year >= 0) c += \"+\";\n c += padStart(o.c.year, longFormat ? 6 : 4);\n if (precision === \"year\") return c;\n if (extended) {\n c += \"-\";\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n c += \"-\";\n } else {\n c += padStart(o.c.month);\n if (precision === \"month\") return c;\n }\n c += padStart(o.c.day);\n return c;\n}\n\nfunction toISOTime(\n o,\n extended,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n) {\n let showSeconds = !suppressSeconds || o.c.millisecond !== 0 || o.c.second !== 0,\n c = \"\";\n switch (precision) {\n case \"day\":\n case \"month\":\n case \"year\":\n break;\n default:\n c += padStart(o.c.hour);\n if (precision === \"hour\") break;\n if (extended) {\n c += \":\";\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += \":\";\n c += padStart(o.c.second);\n }\n } else {\n c += padStart(o.c.minute);\n if (precision === \"minute\") break;\n if (showSeconds) {\n c += padStart(o.c.second);\n }\n }\n if (precision === \"second\") break;\n if (showSeconds && (!suppressMilliseconds || o.c.millisecond !== 0)) {\n c += \".\";\n c += padStart(o.c.millisecond, 3);\n }\n }\n\n if (includeOffset) {\n if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {\n c += \"Z\";\n } else if (o.o < 0) {\n c += \"-\";\n c += padStart(Math.trunc(-o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(-o.o % 60));\n } else {\n c += \"+\";\n c += padStart(Math.trunc(o.o / 60));\n c += \":\";\n c += padStart(Math.trunc(o.o % 60));\n }\n }\n\n if (extendedZone) {\n c += \"[\" + o.zone.ianaName + \"]\";\n }\n return c;\n}\n\n// defaults for unspecified units in the supported calendars\nconst defaultUnitValues = {\n month: 1,\n day: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultWeekUnitValues = {\n weekNumber: 1,\n weekday: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n },\n defaultOrdinalUnitValues = {\n ordinal: 1,\n hour: 0,\n minute: 0,\n second: 0,\n millisecond: 0,\n };\n\n// Units in the supported calendars, sorted by bigness\nconst orderedUnits = [\"year\", \"month\", \"day\", \"hour\", \"minute\", \"second\", \"millisecond\"],\n orderedWeekUnits = [\n \"weekYear\",\n \"weekNumber\",\n \"weekday\",\n \"hour\",\n \"minute\",\n \"second\",\n \"millisecond\",\n ],\n orderedOrdinalUnits = [\"year\", \"ordinal\", \"hour\", \"minute\", \"second\", \"millisecond\"];\n\n// standardize case and plurality in units\nfunction normalizeUnit(unit) {\n const normalized = {\n year: \"year\",\n years: \"year\",\n month: \"month\",\n months: \"month\",\n day: \"day\",\n days: \"day\",\n hour: \"hour\",\n hours: \"hour\",\n minute: \"minute\",\n minutes: \"minute\",\n quarter: \"quarter\",\n quarters: \"quarter\",\n second: \"second\",\n seconds: \"second\",\n millisecond: \"millisecond\",\n milliseconds: \"millisecond\",\n weekday: \"weekday\",\n weekdays: \"weekday\",\n weeknumber: \"weekNumber\",\n weeksnumber: \"weekNumber\",\n weeknumbers: \"weekNumber\",\n weekyear: \"weekYear\",\n weekyears: \"weekYear\",\n ordinal: \"ordinal\",\n }[unit.toLowerCase()];\n\n if (!normalized) throw new InvalidUnitError(unit);\n\n return normalized;\n}\n\nfunction normalizeUnitWithLocalWeeks(unit) {\n switch (unit.toLowerCase()) {\n case \"localweekday\":\n case \"localweekdays\":\n return \"localWeekday\";\n case \"localweeknumber\":\n case \"localweeknumbers\":\n return \"localWeekNumber\";\n case \"localweekyear\":\n case \"localweekyears\":\n return \"localWeekYear\";\n default:\n return normalizeUnit(unit);\n }\n}\n\n// cache offsets for zones based on the current timestamp when this function is\n// first called. When we are handling a datetime from components like (year,\n// month, day, hour) in a time zone, we need a guess about what the timezone\n// offset is so that we can convert into a UTC timestamp. One way is to find the\n// offset of now in the zone. The actual date may have a different offset (for\n// example, if we handle a date in June while we're in December in a zone that\n// observes DST), but we can check and adjust that.\n//\n// When handling many dates, calculating the offset for now every time is\n// expensive. It's just a guess, so we can cache the offset to use even if we\n// are right on a time change boundary (we'll just correct in the other\n// direction). Using a timestamp from first read is a slight optimization for\n// handling dates close to the current date, since those dates will usually be\n// in the same offset (we could set the timestamp statically, instead). We use a\n// single timestamp for all zones to make things a bit more predictable.\n//\n// This is safe for quickDT (used by local() and utc()) because we don't fill in\n// higher-order units from tsNow (as we do in fromObject, this requires that\n// offset is calculated from tsNow).\n/**\n * @param {Zone} zone\n * @return {number}\n */\nfunction guessOffsetForZone(zone) {\n if (zoneOffsetTs === undefined) {\n zoneOffsetTs = Settings.now();\n }\n\n // Do not cache anything but IANA zones, because it is not safe to do so.\n // Guessing an offset which is not present in the zone can cause wrong results from fixOffset\n if (zone.type !== \"iana\") {\n return zone.offset(zoneOffsetTs);\n }\n const zoneName = zone.name;\n let offsetGuess = zoneOffsetGuessCache.get(zoneName);\n if (offsetGuess === undefined) {\n offsetGuess = zone.offset(zoneOffsetTs);\n zoneOffsetGuessCache.set(zoneName, offsetGuess);\n }\n return offsetGuess;\n}\n\n// this is a dumbed down version of fromObject() that runs about 60% faster\n// but doesn't do any validation, makes a bunch of assumptions about what units\n// are present, and so on.\nfunction quickDT(obj, opts) {\n const zone = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n }\n\n const loc = Locale.fromObject(opts);\n\n let ts, o;\n\n // assume we have the higher-order units\n if (!isUndefined(obj.year)) {\n for (const u of orderedUnits) {\n if (isUndefined(obj[u])) {\n obj[u] = defaultUnitValues[u];\n }\n }\n\n const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n const offsetProvis = guessOffsetForZone(zone);\n [ts, o] = objToTS(obj, offsetProvis, zone);\n } else {\n ts = Settings.now();\n }\n\n return new DateTime({ ts, zone, loc, o });\n}\n\nfunction diffRelative(start, end, opts) {\n const round = isUndefined(opts.round) ? true : opts.round,\n rounding = isUndefined(opts.rounding) ? \"trunc\" : opts.rounding,\n format = (c, unit) => {\n c = roundTo(c, round || opts.calendary ? 0 : 2, opts.calendary ? \"round\" : rounding);\n const formatter = end.loc.clone(opts).relFormatter(opts);\n return formatter.format(c, unit);\n },\n differ = (unit) => {\n if (opts.calendary) {\n if (!end.hasSame(start, unit)) {\n return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);\n } else return 0;\n } else {\n return end.diff(start, unit).get(unit);\n }\n };\n\n if (opts.unit) {\n return format(differ(opts.unit), opts.unit);\n }\n\n for (const unit of opts.units) {\n const count = differ(unit);\n if (Math.abs(count) >= 1) {\n return format(count, unit);\n }\n }\n return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);\n}\n\nfunction lastOpts(argList) {\n let opts = {},\n args;\n if (argList.length > 0 && typeof argList[argList.length - 1] === \"object\") {\n opts = argList[argList.length - 1];\n args = Array.from(argList).slice(0, argList.length - 1);\n } else {\n args = Array.from(argList);\n }\n return [opts, args];\n}\n\n/**\n * Timestamp to use for cached zone offset guesses (exposed for test)\n */\nlet zoneOffsetTs;\n/**\n * Cache for zone offset guesses (exposed for test).\n *\n * This optimizes quickDT via guessOffsetForZone to avoid repeated calls of\n * zone.offset().\n */\nconst zoneOffsetGuessCache = new Map();\n\n/**\n * A DateTime is an immutable data structure representing a specific date and time and accompanying methods. It contains class and instance methods for creating, parsing, interrogating, transforming, and formatting them.\n *\n * A DateTime comprises of:\n * * A timestamp. Each DateTime instance refers to a specific millisecond of the Unix epoch.\n * * A time zone. Each instance is considered in the context of a specific zone (by default the local system's zone).\n * * Configuration properties that effect how output strings are formatted, such as `locale`, `numberingSystem`, and `outputCalendar`.\n *\n * Here is a brief overview of the most commonly used functionality it provides:\n *\n * * **Creation**: To create a DateTime from its components, use one of its factory class methods: {@link DateTime.local}, {@link DateTime.utc}, and (most flexibly) {@link DateTime.fromObject}. To create one from a standard string format, use {@link DateTime.fromISO}, {@link DateTime.fromHTTP}, and {@link DateTime.fromRFC2822}. To create one from a custom string format, use {@link DateTime.fromFormat}. To create one from a native JS date, use {@link DateTime.fromJSDate}.\n * * **Gregorian calendar and time**: To examine the Gregorian properties of a DateTime individually (i.e as opposed to collectively through {@link DateTime#toObject}), use the {@link DateTime#year}, {@link DateTime#month},\n * {@link DateTime#day}, {@link DateTime#hour}, {@link DateTime#minute}, {@link DateTime#second}, {@link DateTime#millisecond} accessors.\n * * **Week calendar**: For ISO week calendar attributes, see the {@link DateTime#weekYear}, {@link DateTime#weekNumber}, and {@link DateTime#weekday} accessors.\n * * **Configuration** See the {@link DateTime#locale} and {@link DateTime#numberingSystem} accessors.\n * * **Transformation**: To transform the DateTime into other DateTimes, use {@link DateTime#set}, {@link DateTime#reconfigure}, {@link DateTime#setZone}, {@link DateTime#setLocale}, {@link DateTime.plus}, {@link DateTime#minus}, {@link DateTime#endOf}, {@link DateTime#startOf}, {@link DateTime#toUTC}, and {@link DateTime#toLocal}.\n * * **Output**: To convert the DateTime to other representations, use the {@link DateTime#toRelative}, {@link DateTime#toRelativeCalendar}, {@link DateTime#toJSON}, {@link DateTime#toISO}, {@link DateTime#toHTTP}, {@link DateTime#toObject}, {@link DateTime#toRFC2822}, {@link DateTime#toString}, {@link DateTime#toLocaleString}, {@link DateTime#toFormat}, {@link DateTime#toMillis} and {@link DateTime#toJSDate}.\n *\n * There's plenty others documented below. In addition, for more information on subtler topics like internationalization, time zones, alternative calendars, validity, and so on, see the external documentation.\n */\nexport default class DateTime {\n /**\n * @access private\n */\n constructor(config) {\n const zone = config.zone || Settings.defaultZone;\n\n let invalid =\n config.invalid ||\n (Number.isNaN(config.ts) ? new Invalid(\"invalid input\") : null) ||\n (!zone.isValid ? unsupportedZone(zone) : null);\n /**\n * @access private\n */\n this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;\n\n let c = null,\n o = null;\n if (!invalid) {\n const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);\n\n if (unchanged) {\n [c, o] = [config.old.c, config.old.o];\n } else {\n // If an offset has been passed and we have not been called from\n // clone(), we can trust it and avoid the offset calculation.\n const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);\n c = tsToObj(this.ts, ot);\n invalid = Number.isNaN(c.year) ? new Invalid(\"invalid input\") : null;\n c = invalid ? null : c;\n o = invalid ? null : ot;\n }\n }\n\n /**\n * @access private\n */\n this._zone = zone;\n /**\n * @access private\n */\n this.loc = config.loc || Locale.create();\n /**\n * @access private\n */\n this.invalid = invalid;\n /**\n * @access private\n */\n this.weekData = null;\n /**\n * @access private\n */\n this.localWeekData = null;\n /**\n * @access private\n */\n this.c = c;\n /**\n * @access private\n */\n this.o = o;\n /**\n * @access private\n */\n this.isLuxonDateTime = true;\n }\n\n // CONSTRUCT\n\n /**\n * Create a DateTime for the current instant, in the system's time zone.\n *\n * Use Settings to override these default values if needed.\n * @example DateTime.now().toISO() //~> now in the ISO format\n * @return {DateTime}\n */\n static now() {\n return new DateTime({});\n }\n\n /**\n * Create a local DateTime\n * @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month, 1-indexed\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @example DateTime.local() //~> now\n * @example DateTime.local({ zone: \"America/New_York\" }) //~> now, in US east coast time\n * @example DateTime.local(2017) //~> 2017-01-01T00:00:00\n * @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00\n * @example DateTime.local(2017, 3, 12, { locale: \"fr\" }) //~> 2017-03-12T00:00:00, with a French locale\n * @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00\n * @example DateTime.local(2017, 3, 12, 5, { zone: \"utc\" }) //~> 2017-03-12T05:00:00, in UTC\n * @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00\n * @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10\n * @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765\n * @return {DateTime}\n */\n static local() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime in UTC\n * @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used\n * @param {number} [month=1] - The month, 1-indexed\n * @param {number} [day=1] - The day of the month\n * @param {number} [hour=0] - The hour of the day, in 24-hour time\n * @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59\n * @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59\n * @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999\n * @param {Object} options - configuration options for the DateTime\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.utc() //~> now\n * @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z\n * @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z\n * @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, { locale: \"fr\" }) //~> 2017-03-12T05:45:00Z with a French locale\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z\n * @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: \"fr\" }) //~> 2017-03-12T05:45:10.765Z with a French locale\n * @return {DateTime}\n */\n static utc() {\n const [opts, args] = lastOpts(arguments),\n [year, month, day, hour, minute, second, millisecond] = args;\n\n opts.zone = FixedOffsetZone.utcInstance;\n return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);\n }\n\n /**\n * Create a DateTime from a JavaScript Date object. Uses the default zone.\n * @param {Date} date - a JavaScript Date object\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @return {DateTime}\n */\n static fromJSDate(date, options = {}) {\n const ts = isDate(date) ? date.valueOf() : NaN;\n if (Number.isNaN(ts)) {\n return DateTime.invalid(\"invalid input\");\n }\n\n const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n return new DateTime({\n ts: ts,\n zone: zoneToUse,\n loc: Locale.fromObject(options),\n });\n }\n\n /**\n * Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} milliseconds - a number of milliseconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromMillis(milliseconds, options = {}) {\n if (!isNumber(milliseconds)) {\n throw new InvalidArgumentError(\n `fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`\n );\n } else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {\n // this isn't perfect because we can still end up out of range because of additional shifting, but it's a start\n return DateTime.invalid(\"Timestamp out of range\");\n } else {\n return new DateTime({\n ts: milliseconds,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.\n * @param {number} seconds - a number of seconds since 1970 UTC\n * @param {Object} options - configuration options for the DateTime\n * @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into\n * @param {string} [options.locale] - a locale to set on the resulting DateTime instance\n * @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromSeconds(seconds, options = {}) {\n if (!isNumber(seconds)) {\n throw new InvalidArgumentError(\"fromSeconds requires a numerical input\");\n } else {\n return new DateTime({\n ts: seconds * 1000,\n zone: normalizeZone(options.zone, Settings.defaultZone),\n loc: Locale.fromObject(options),\n });\n }\n }\n\n /**\n * Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.\n * @param {Object} obj - the object to create the DateTime from\n * @param {number} obj.year - a year, such as 1987\n * @param {number} obj.month - a month, 1-12\n * @param {number} obj.day - a day of the month, 1-31, depending on the month\n * @param {number} obj.ordinal - day of the year, 1-365 or 366\n * @param {number} obj.weekYear - an ISO week year\n * @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year\n * @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday\n * @param {number} obj.localWeekYear - a week year, according to the locale\n * @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale\n * @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale\n * @param {number} obj.hour - hour of the day, 0-23\n * @param {number} obj.minute - minute of the hour, 0-59\n * @param {number} obj.second - second of the minute, 0-59\n * @param {number} obj.millisecond - millisecond of the second, 0-999\n * @param {Object} opts - options for creating this DateTime\n * @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()\n * @param {string} [opts.locale='system\\'s locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'\n * @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })\n * @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })\n * @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'\n * @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: \"en-US\" }).toISODate() //=> '2021-12-26'\n * @return {DateTime}\n */\n static fromObject(obj, opts = {}) {\n obj = obj || {};\n const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);\n if (!zoneToUse.isValid) {\n return DateTime.invalid(unsupportedZone(zoneToUse));\n }\n\n const loc = Locale.fromObject(opts);\n const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);\n\n const tsNow = Settings.now(),\n offsetProvis = !isUndefined(opts.specificOffset)\n ? opts.specificOffset\n : zoneToUse.offset(tsNow),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n // cases:\n // just a weekday -> this week's instance of that weekday, no worries\n // (gregorian data or ordinal) + (weekYear or weekNumber) -> error\n // (gregorian month or day) + ordinal -> error\n // otherwise just use weeks or ordinals or gregorian, depending on what's specified\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n const useWeekData = definiteWeekDef || (normalized.weekday && !containsGregor);\n\n // configure ourselves to deal with gregorian dates or week stuff\n let units,\n defaultValues,\n objNow = tsToObj(tsNow, offsetProvis);\n if (useWeekData) {\n units = orderedWeekUnits;\n defaultValues = defaultWeekUnitValues;\n objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);\n } else if (containsOrdinal) {\n units = orderedOrdinalUnits;\n defaultValues = defaultOrdinalUnitValues;\n objNow = gregorianToOrdinal(objNow);\n } else {\n units = orderedUnits;\n defaultValues = defaultUnitValues;\n }\n\n // set default values for missing stuff\n let foundFirst = false;\n for (const u of units) {\n const v = normalized[u];\n if (!isUndefined(v)) {\n foundFirst = true;\n } else if (foundFirst) {\n normalized[u] = defaultValues[u];\n } else {\n normalized[u] = objNow[u];\n }\n }\n\n // make sure the values we have are in range\n const higherOrderInvalid = useWeekData\n ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? hasInvalidOrdinalData(normalized)\n : hasInvalidGregorianData(normalized),\n invalid = higherOrderInvalid || hasInvalidTimeData(normalized);\n\n if (invalid) {\n return DateTime.invalid(invalid);\n }\n\n // compute the actual time\n const gregorian = useWeekData\n ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek)\n : containsOrdinal\n ? ordinalToGregorian(normalized)\n : normalized,\n [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse),\n inst = new DateTime({\n ts: tsFinal,\n zone: zoneToUse,\n o: offsetFinal,\n loc,\n });\n\n // gregorian data + weekday serves only to validate\n if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {\n return DateTime.invalid(\n \"mismatched weekday\",\n `you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`\n );\n }\n\n if (!inst.isValid) {\n return DateTime.invalid(inst.invalid);\n }\n\n return inst;\n }\n\n /**\n * Create a DateTime from an ISO 8601 string\n * @param {string} text - the ISO string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance\n * @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance\n * @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromISO('2016-05-25T09:08:34.123')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')\n * @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})\n * @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})\n * @example DateTime.fromISO('2016-W05-4')\n * @return {DateTime}\n */\n static fromISO(text, opts = {}) {\n const [vals, parsedZone] = parseISODate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"ISO 8601\", text);\n }\n\n /**\n * Create a DateTime from an RFC 2822 string\n * @param {string} text - the RFC 2822 string\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')\n * @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')\n * @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')\n * @return {DateTime}\n */\n static fromRFC2822(text, opts = {}) {\n const [vals, parsedZone] = parseRFC2822Date(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"RFC 2822\", text);\n }\n\n /**\n * Create a DateTime from an HTTP header date\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @param {string} text - the HTTP header date\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.\n * @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.\n * @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')\n * @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')\n * @return {DateTime}\n */\n static fromHTTP(text, opts = {}) {\n const [vals, parsedZone] = parseHTTPDate(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"HTTP\", opts);\n }\n\n /**\n * Create a DateTime from an input string and format string.\n * Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see the link below for the formats)\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @return {DateTime}\n */\n static fromFormat(text, fmt, opts = {}) {\n if (isUndefined(text) || isUndefined(fmt)) {\n throw new InvalidArgumentError(\"fromFormat requires an input string and a format\");\n }\n\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n }),\n [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);\n if (invalid) {\n return DateTime.invalid(invalid);\n } else {\n return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);\n }\n }\n\n /**\n * @deprecated use fromFormat instead\n */\n static fromString(text, fmt, opts = {}) {\n return DateTime.fromFormat(text, fmt, opts);\n }\n\n /**\n * Create a DateTime from a SQL date, time, or datetime\n * Defaults to en-US if no locale has been specified, regardless of the system's locale\n * @param {string} text - the string to parse\n * @param {Object} opts - options to affect the creation\n * @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone\n * @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one\n * @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale\n * @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system\n * @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance\n * @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance\n * @example DateTime.fromSQL('2017-05-15')\n * @example DateTime.fromSQL('2017-05-15 09:12:34')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })\n * @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })\n * @example DateTime.fromSQL('09:12:34.342')\n * @return {DateTime}\n */\n static fromSQL(text, opts = {}) {\n const [vals, parsedZone] = parseSQL(text);\n return parseDataToDateTime(vals, parsedZone, opts, \"SQL\", text);\n }\n\n /**\n * Create an invalid DateTime.\n * @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.\n * @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information\n * @return {DateTime}\n */\n static invalid(reason, explanation = null) {\n if (!reason) {\n throw new InvalidArgumentError(\"need to specify a reason the DateTime is invalid\");\n }\n\n const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);\n\n if (Settings.throwOnInvalid) {\n throw new InvalidDateTimeError(invalid);\n } else {\n return new DateTime({ invalid });\n }\n }\n\n /**\n * Check if an object is an instance of DateTime. Works across context boundaries\n * @param {object} o\n * @return {boolean}\n */\n static isDateTime(o) {\n return (o && o.isLuxonDateTime) || false;\n }\n\n /**\n * Produce the format string for a set of options\n * @param formatOpts\n * @param localeOpts\n * @returns {string}\n */\n static parseFormatForOpts(formatOpts, localeOpts = {}) {\n const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));\n return !tokenList ? null : tokenList.map((t) => (t ? t.val : null)).join(\"\");\n }\n\n /**\n * Produce the the fully expanded format token for the locale\n * Does NOT quote characters, so quoted tokens will not round trip correctly\n * @param fmt\n * @param localeOpts\n * @returns {string}\n */\n static expandFormat(fmt, localeOpts = {}) {\n const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));\n return expanded.map((t) => t.val).join(\"\");\n }\n\n static resetCache() {\n zoneOffsetTs = undefined;\n zoneOffsetGuessCache.clear();\n }\n\n // INFO\n\n /**\n * Get the value of unit.\n * @param {string} unit - a unit such as 'minute' or 'day'\n * @example DateTime.local(2017, 7, 4).get('month'); //=> 7\n * @example DateTime.local(2017, 7, 4).get('day'); //=> 4\n * @return {number}\n */\n get(unit) {\n return this[unit];\n }\n\n /**\n * Returns whether the DateTime is valid. Invalid DateTimes occur when:\n * * The DateTime was created from invalid calendar information, such as the 13th month or February 30\n * * The DateTime was created by an operation on another invalid date\n * @type {boolean}\n */\n get isValid() {\n return this.invalid === null;\n }\n\n /**\n * Returns an error code if this DateTime is invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidReason() {\n return this.invalid ? this.invalid.reason : null;\n }\n\n /**\n * Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid\n * @type {string}\n */\n get invalidExplanation() {\n return this.invalid ? this.invalid.explanation : null;\n }\n\n /**\n * Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime\n *\n * @type {string}\n */\n get locale() {\n return this.isValid ? this.loc.locale : null;\n }\n\n /**\n * Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime\n *\n * @type {string}\n */\n get numberingSystem() {\n return this.isValid ? this.loc.numberingSystem : null;\n }\n\n /**\n * Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime\n *\n * @type {string}\n */\n get outputCalendar() {\n return this.isValid ? this.loc.outputCalendar : null;\n }\n\n /**\n * Get the time zone associated with this DateTime.\n * @type {Zone}\n */\n get zone() {\n return this._zone;\n }\n\n /**\n * Get the name of the time zone.\n * @type {string}\n */\n get zoneName() {\n return this.isValid ? this.zone.name : null;\n }\n\n /**\n * Get the year\n * @example DateTime.local(2017, 5, 25).year //=> 2017\n * @type {number}\n */\n get year() {\n return this.isValid ? this.c.year : NaN;\n }\n\n /**\n * Get the quarter\n * @example DateTime.local(2017, 5, 25).quarter //=> 2\n * @type {number}\n */\n get quarter() {\n return this.isValid ? Math.ceil(this.c.month / 3) : NaN;\n }\n\n /**\n * Get the month (1-12).\n * @example DateTime.local(2017, 5, 25).month //=> 5\n * @type {number}\n */\n get month() {\n return this.isValid ? this.c.month : NaN;\n }\n\n /**\n * Get the day of the month (1-30ish).\n * @example DateTime.local(2017, 5, 25).day //=> 25\n * @type {number}\n */\n get day() {\n return this.isValid ? this.c.day : NaN;\n }\n\n /**\n * Get the hour of the day (0-23).\n * @example DateTime.local(2017, 5, 25, 9).hour //=> 9\n * @type {number}\n */\n get hour() {\n return this.isValid ? this.c.hour : NaN;\n }\n\n /**\n * Get the minute of the hour (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30\n * @type {number}\n */\n get minute() {\n return this.isValid ? this.c.minute : NaN;\n }\n\n /**\n * Get the second of the minute (0-59).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52\n * @type {number}\n */\n get second() {\n return this.isValid ? this.c.second : NaN;\n }\n\n /**\n * Get the millisecond of the second (0-999).\n * @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654\n * @type {number}\n */\n get millisecond() {\n return this.isValid ? this.c.millisecond : NaN;\n }\n\n /**\n * Get the week year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 12, 31).weekYear //=> 2015\n * @type {number}\n */\n get weekYear() {\n return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the week number of the week year (1-52ish).\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2017, 5, 25).weekNumber //=> 21\n * @type {number}\n */\n get weekNumber() {\n return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the day of the week.\n * 1 is Monday and 7 is Sunday\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2014, 11, 31).weekday //=> 4\n * @type {number}\n */\n get weekday() {\n return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;\n }\n\n /**\n * Returns true if this date is on a weekend according to the locale, false otherwise\n * @returns {boolean}\n */\n get isWeekend() {\n return this.isValid && this.loc.getWeekendDays().includes(this.weekday);\n }\n\n /**\n * Get the day of the week according to the locale.\n * 1 is the first day of the week and 7 is the last day of the week.\n * If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,\n * @returns {number}\n */\n get localWeekday() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;\n }\n\n /**\n * Get the week number of the week year according to the locale. Different locales assign week numbers differently,\n * because the week can start on different days of the week (see localWeekday) and because a different number of days\n * is required for a week to count as the first week of a year.\n * @returns {number}\n */\n get localWeekNumber() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;\n }\n\n /**\n * Get the week year according to the locale. Different locales assign week numbers (and therefor week years)\n * differently, see localWeekNumber.\n * @returns {number}\n */\n get localWeekYear() {\n return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;\n }\n\n /**\n * Get the ordinal (meaning the day of the year)\n * @example DateTime.local(2017, 5, 25).ordinal //=> 145\n * @type {number|DateTime}\n */\n get ordinal() {\n return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;\n }\n\n /**\n * Get the human readable short month name, such as 'Oct'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthShort //=> Oct\n * @type {string}\n */\n get monthShort() {\n return this.isValid ? Info.months(\"short\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable long month name, such as 'October'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).monthLong //=> October\n * @type {string}\n */\n get monthLong() {\n return this.isValid ? Info.months(\"long\", { locObj: this.loc })[this.month - 1] : null;\n }\n\n /**\n * Get the human readable short weekday, such as 'Mon'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon\n * @type {string}\n */\n get weekdayShort() {\n return this.isValid ? Info.weekdays(\"short\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the human readable long weekday, such as 'Monday'.\n * Defaults to the system's locale if no locale has been specified\n * @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday\n * @type {string}\n */\n get weekdayLong() {\n return this.isValid ? Info.weekdays(\"long\", { locObj: this.loc })[this.weekday - 1] : null;\n }\n\n /**\n * Get the UTC offset of this DateTime in minutes\n * @example DateTime.now().offset //=> -240\n * @example DateTime.utc().offset //=> 0\n * @type {number}\n */\n get offset() {\n return this.isValid ? +this.o : NaN;\n }\n\n /**\n * Get the short human name for the zone's current offset, for example \"EST\" or \"EDT\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameShort() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"short\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get the long human name for the zone's current offset, for example \"Eastern Standard Time\" or \"Eastern Daylight Time\".\n * Defaults to the system's locale if no locale has been specified\n * @type {string}\n */\n get offsetNameLong() {\n if (this.isValid) {\n return this.zone.offsetName(this.ts, {\n format: \"long\",\n locale: this.locale,\n });\n } else {\n return null;\n }\n }\n\n /**\n * Get whether this zone's offset ever changes, as in a DST.\n * @type {boolean}\n */\n get isOffsetFixed() {\n return this.isValid ? this.zone.isUniversal : null;\n }\n\n /**\n * Get whether the DateTime is in a DST.\n * @type {boolean}\n */\n get isInDST() {\n if (this.isOffsetFixed) {\n return false;\n } else {\n return (\n this.offset > this.set({ month: 1, day: 1 }).offset ||\n this.offset > this.set({ month: 5 }).offset\n );\n }\n }\n\n /**\n * Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC\n * in this DateTime's zone. During DST changes local time can be ambiguous, for example\n * `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.\n * This method will return both possible DateTimes if this DateTime's local time is ambiguous.\n * @returns {DateTime[]}\n */\n getPossibleOffsets() {\n if (!this.isValid || this.isOffsetFixed) {\n return [this];\n }\n const dayMs = 86400000;\n const minuteMs = 60000;\n const localTS = objToLocalTS(this.c);\n const oEarlier = this.zone.offset(localTS - dayMs);\n const oLater = this.zone.offset(localTS + dayMs);\n\n const o1 = this.zone.offset(localTS - oEarlier * minuteMs);\n const o2 = this.zone.offset(localTS - oLater * minuteMs);\n if (o1 === o2) {\n return [this];\n }\n const ts1 = localTS - o1 * minuteMs;\n const ts2 = localTS - o2 * minuteMs;\n const c1 = tsToObj(ts1, o1);\n const c2 = tsToObj(ts2, o2);\n if (\n c1.hour === c2.hour &&\n c1.minute === c2.minute &&\n c1.second === c2.second &&\n c1.millisecond === c2.millisecond\n ) {\n return [clone(this, { ts: ts1 }), clone(this, { ts: ts2 })];\n }\n return [this];\n }\n\n /**\n * Returns true if this DateTime is in a leap year, false otherwise\n * @example DateTime.local(2016).isInLeapYear //=> true\n * @example DateTime.local(2013).isInLeapYear //=> false\n * @type {boolean}\n */\n get isInLeapYear() {\n return isLeapYear(this.year);\n }\n\n /**\n * Returns the number of days in this DateTime's month\n * @example DateTime.local(2016, 2).daysInMonth //=> 29\n * @example DateTime.local(2016, 3).daysInMonth //=> 31\n * @type {number}\n */\n get daysInMonth() {\n return daysInMonth(this.year, this.month);\n }\n\n /**\n * Returns the number of days in this DateTime's year\n * @example DateTime.local(2016).daysInYear //=> 366\n * @example DateTime.local(2013).daysInYear //=> 365\n * @type {number}\n */\n get daysInYear() {\n return this.isValid ? daysInYear(this.year) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's year\n * @see https://en.wikipedia.org/wiki/ISO_week_date\n * @example DateTime.local(2004).weeksInWeekYear //=> 53\n * @example DateTime.local(2013).weeksInWeekYear //=> 52\n * @type {number}\n */\n get weeksInWeekYear() {\n return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;\n }\n\n /**\n * Returns the number of weeks in this DateTime's local week year\n * @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52\n * @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53\n * @type {number}\n */\n get weeksInLocalWeekYear() {\n return this.isValid\n ? weeksInWeekYear(\n this.localWeekYear,\n this.loc.getMinDaysInFirstWeek(),\n this.loc.getStartOfWeek()\n )\n : NaN;\n }\n\n /**\n * Returns the resolved Intl options for this DateTime.\n * This is useful in understanding the behavior of formatting methods\n * @param {Object} opts - the same options as toLocaleString\n * @return {Object}\n */\n resolvedLocaleOptions(opts = {}) {\n const { locale, numberingSystem, calendar } = Formatter.create(\n this.loc.clone(opts),\n opts\n ).resolvedOptions(this);\n return { locale, numberingSystem, outputCalendar: calendar };\n }\n\n // TRANSFORM\n\n /**\n * \"Set\" the DateTime's zone to UTC. Returns a newly-constructed DateTime.\n *\n * Equivalent to {@link DateTime#setZone}('utc')\n * @param {number} [offset=0] - optionally, an offset from UTC in minutes\n * @param {Object} [opts={}] - options to pass to `setZone()`\n * @return {DateTime}\n */\n toUTC(offset = 0, opts = {}) {\n return this.setZone(FixedOffsetZone.instance(offset), opts);\n }\n\n /**\n * \"Set\" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.\n *\n * Equivalent to `setZone('local')`\n * @return {DateTime}\n */\n toLocal() {\n return this.setZone(Settings.defaultZone);\n }\n\n /**\n * \"Set\" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.\n *\n * By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.\n * @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.\n * @param {Object} opts - options\n * @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.\n * @return {DateTime}\n */\n setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {\n zone = normalizeZone(zone, Settings.defaultZone);\n if (zone.equals(this.zone)) {\n return this;\n } else if (!zone.isValid) {\n return DateTime.invalid(unsupportedZone(zone));\n } else {\n let newTS = this.ts;\n if (keepLocalTime || keepCalendarTime) {\n const offsetGuess = zone.offset(this.ts);\n const asObj = this.toObject();\n [newTS] = objToTS(asObj, offsetGuess, zone);\n }\n return clone(this, { ts: newTS, zone });\n }\n }\n\n /**\n * \"Set\" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.\n * @param {Object} properties - the properties to set\n * @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })\n * @return {DateTime}\n */\n reconfigure({ locale, numberingSystem, outputCalendar } = {}) {\n const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });\n return clone(this, { loc });\n }\n\n /**\n * \"Set\" the locale. Returns a newly-constructed DateTime.\n * Just a convenient alias for reconfigure({ locale })\n * @example DateTime.local(2017, 5, 25).setLocale('en-GB')\n * @return {DateTime}\n */\n setLocale(locale) {\n return this.reconfigure({ locale });\n }\n\n /**\n * \"Set\" the values of specified units. Returns a newly-constructed DateTime.\n * You can only set units with this method; for \"setting\" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.\n *\n * This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.\n * They cannot be mixed with ISO-week units like `weekday`.\n * @param {Object} values - a mapping of units to numbers\n * @example dt.set({ year: 2017 })\n * @example dt.set({ hour: 8, minute: 30 })\n * @example dt.set({ weekday: 5 })\n * @example dt.set({ year: 2005, ordinal: 234 })\n * @return {DateTime}\n */\n set(values) {\n if (!this.isValid) return this;\n\n const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);\n const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);\n\n const settingWeekStuff =\n !isUndefined(normalized.weekYear) ||\n !isUndefined(normalized.weekNumber) ||\n !isUndefined(normalized.weekday),\n containsOrdinal = !isUndefined(normalized.ordinal),\n containsGregorYear = !isUndefined(normalized.year),\n containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day),\n containsGregor = containsGregorYear || containsGregorMD,\n definiteWeekDef = normalized.weekYear || normalized.weekNumber;\n\n if ((containsGregor || containsOrdinal) && definiteWeekDef) {\n throw new ConflictingSpecificationError(\n \"Can't mix weekYear/weekNumber units with year/month/day or ordinals\"\n );\n }\n\n if (containsGregorMD && containsOrdinal) {\n throw new ConflictingSpecificationError(\"Can't mix ordinal dates with month/day\");\n }\n\n let mixed;\n if (settingWeekStuff) {\n mixed = weekToGregorian(\n { ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },\n minDaysInFirstWeek,\n startOfWeek\n );\n } else if (!isUndefined(normalized.ordinal)) {\n mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });\n } else {\n mixed = { ...this.toObject(), ...normalized };\n\n // if we didn't set the day but we ended up on an overflow date,\n // use the last day of the right month\n if (isUndefined(normalized.day)) {\n mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);\n }\n }\n\n const [ts, o] = objToTS(mixed, this.o, this.zone);\n return clone(this, { ts, o });\n }\n\n /**\n * Add a period of time to this DateTime and return the resulting DateTime\n *\n * Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.\n * @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n * @example DateTime.now().plus(123) //~> in 123 milliseconds\n * @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes\n * @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow\n * @example DateTime.now().plus({ days: -1 }) //~> this time yesterday\n * @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min\n * @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min\n * @return {DateTime}\n */\n plus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration);\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * Subtract a period of time to this DateTime and return the resulting DateTime\n * See {@link DateTime#plus}\n * @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()\n @return {DateTime}\n */\n minus(duration) {\n if (!this.isValid) return this;\n const dur = Duration.fromDurationLike(duration).negate();\n return clone(this, adjustTime(this, dur));\n }\n\n /**\n * \"Set\" this DateTime to the beginning of a unit of time.\n * @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'\n * @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'\n * @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'\n * @return {DateTime}\n */\n startOf(unit, { useLocaleWeeks = false } = {}) {\n if (!this.isValid) return this;\n\n const o = {},\n normalizedUnit = Duration.normalizeUnit(unit);\n switch (normalizedUnit) {\n case \"years\":\n o.month = 1;\n // falls through\n case \"quarters\":\n case \"months\":\n o.day = 1;\n // falls through\n case \"weeks\":\n case \"days\":\n o.hour = 0;\n // falls through\n case \"hours\":\n o.minute = 0;\n // falls through\n case \"minutes\":\n o.second = 0;\n // falls through\n case \"seconds\":\n o.millisecond = 0;\n break;\n case \"milliseconds\":\n break;\n // no default, invalid units throw in normalizeUnit()\n }\n\n if (normalizedUnit === \"weeks\") {\n if (useLocaleWeeks) {\n const startOfWeek = this.loc.getStartOfWeek();\n const { weekday } = this;\n if (weekday < startOfWeek) {\n o.weekNumber = this.weekNumber - 1;\n }\n o.weekday = startOfWeek;\n } else {\n o.weekday = 1;\n }\n }\n\n if (normalizedUnit === \"quarters\") {\n const q = Math.ceil(this.month / 3);\n o.month = (q - 1) * 3 + 1;\n }\n\n return this.set(o);\n }\n\n /**\n * \"Set\" this DateTime to the end (meaning the last millisecond) of a unit of time\n * @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week\n * @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'\n * @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'\n * @return {DateTime}\n */\n endOf(unit, opts) {\n return this.isValid\n ? this.plus({ [unit]: 1 })\n .startOf(unit, opts)\n .minus(1)\n : this;\n }\n\n // OUTPUT\n\n /**\n * Returns a string representation of this DateTime formatted according to the specified format string.\n * **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).\n * Defaults to en-US if no locale has been specified, regardless of the system's locale.\n * @param {string} fmt - the format string\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'\n * @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'\n * @example DateTime.now().toFormat('yyyy LLL dd', { locale: \"fr\" }) //=> '2017 avr. 22'\n * @example DateTime.now().toFormat(\"HH 'hours and' mm 'minutes'\") //=> '20 hours and 55 minutes'\n * @return {string}\n */\n toFormat(fmt, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt)\n : INVALID;\n }\n\n /**\n * Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.\n * The exact behavior of this method is browser-specific, but in general it will return an appropriate representation\n * of the DateTime in the assigned locale.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat\n * @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options\n * @param {Object} opts - opts to override the configuration options on this DateTime\n * @example DateTime.now().toLocaleString(); //=> 4/20/2017\n * @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'\n * @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'\n * @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'\n * @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'\n * @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'\n * @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'\n * @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'\n * @return {string}\n */\n toLocaleString(formatOpts = Formats.DATE_SHORT, opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this)\n : INVALID;\n }\n\n /**\n * Returns an array of format \"parts\", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.\n * Defaults to the system's locale if no locale has been specified\n * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts\n * @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.\n * @example DateTime.now().toLocaleParts(); //=> [\n * //=> { type: 'day', value: '25' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'month', value: '05' },\n * //=> { type: 'literal', value: '/' },\n * //=> { type: 'year', value: '1982' }\n * //=> ]\n */\n toLocaleParts(opts = {}) {\n return this.isValid\n ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this)\n : [];\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=false] - add the time zone format extension\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'years', 'months', 'days', 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'\n * @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'\n * @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'\n * @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'\n * @example DateTime.now().toISO({ precision: 'day' }) //=> '2017-04-22Z'\n * @example DateTime.now().toISO({ precision: 'minute' }) //=> '2017-04-22T20:47Z'\n * @return {string|null}\n */\n toISO({\n format = \"extended\",\n suppressSeconds = false,\n suppressMilliseconds = false,\n includeOffset = true,\n extendedZone = false,\n precision = \"milliseconds\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n precision = normalizeUnit(precision);\n const ext = format === \"extended\";\n\n let c = toISODate(this, ext, precision);\n if (orderedUnits.indexOf(precision) >= 3) c += \"T\";\n c += toISOTime(\n this,\n ext,\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n );\n return c;\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's date component\n * @param {Object} opts - options\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='day'] - truncate output to desired precision: 'years', 'months', or 'days'.\n * @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'\n * @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'\n * @example DateTime.utc(1982, 5, 25).toISODate({ precision: 'month' }) //=> '1982-05'\n * @return {string|null}\n */\n toISODate({ format = \"extended\", precision = \"day\" } = {}) {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, format === \"extended\", normalizeUnit(precision));\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's week date\n * @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'\n * @return {string}\n */\n toISOWeekDate() {\n return toTechFormat(this, \"kkkk-'W'WW-c\");\n }\n\n /**\n * Returns an ISO 8601-compliant string representation of this DateTime's time component\n * @param {Object} opts - options\n * @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0\n * @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.extendedZone=true] - add the time zone format extension\n * @param {boolean} [opts.includePrefix=false] - include the `T` prefix\n * @param {string} [opts.format='extended'] - choose between the basic and extended format\n * @param {string} [opts.precision='milliseconds'] - truncate output to desired presicion: 'hours', 'minutes', 'seconds' or 'milliseconds'. When precision and suppressSeconds or suppressMilliseconds are used together, precision sets the maximum unit shown in the output, however seconds or milliseconds will still be suppressed if they are 0.\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'\n * @example DateTime.utc().set({ hour: 7, minute: 34, second: 56 }).toISOTime({ precision: 'minute' }) //=> '07:34Z'\n * @return {string}\n */\n toISOTime({\n suppressMilliseconds = false,\n suppressSeconds = false,\n includeOffset = true,\n includePrefix = false,\n extendedZone = false,\n format = \"extended\",\n precision = \"milliseconds\",\n } = {}) {\n if (!this.isValid) {\n return null;\n }\n\n precision = normalizeUnit(precision);\n let c = includePrefix && orderedUnits.indexOf(precision) >= 3 ? \"T\" : \"\";\n return (\n c +\n toISOTime(\n this,\n format === \"extended\",\n suppressSeconds,\n suppressMilliseconds,\n includeOffset,\n extendedZone,\n precision\n )\n );\n }\n\n /**\n * Returns an RFC 2822-compatible string representation of this DateTime\n * @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'\n * @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'\n * @return {string}\n */\n toRFC2822() {\n return toTechFormat(this, \"EEE, dd LLL yyyy HH:mm:ss ZZZ\", false);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.\n * Specifically, the string conforms to RFC 1123.\n * @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1\n * @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'\n * @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'\n * @return {string}\n */\n toHTTP() {\n return toTechFormat(this.toUTC(), \"EEE, dd LLL yyyy HH:mm:ss 'GMT'\");\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Date\n * @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'\n * @return {string|null}\n */\n toSQLDate() {\n if (!this.isValid) {\n return null;\n }\n return toISODate(this, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL Time\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc().toSQL() //=> '05:15:16.345'\n * @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'\n * @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'\n * @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'\n * @return {string}\n */\n toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {\n let fmt = \"HH:mm:ss.SSS\";\n\n if (includeZone || includeOffset) {\n if (includeOffsetSpace) {\n fmt += \" \";\n }\n if (includeZone) {\n fmt += \"z\";\n } else if (includeOffset) {\n fmt += \"ZZ\";\n }\n }\n\n return toTechFormat(this, fmt, true);\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for use in SQL DateTime\n * @param {Object} opts - options\n * @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.\n * @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'\n * @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'\n * @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'\n * @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'\n * @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'\n * @return {string}\n */\n toSQL(opts = {}) {\n if (!this.isValid) {\n return null;\n }\n\n return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for debugging\n * @return {string}\n */\n toString() {\n return this.isValid ? this.toISO() : INVALID;\n }\n\n /**\n * Returns a string representation of this DateTime appropriate for the REPL.\n * @return {string}\n */\n [Symbol.for(\"nodejs.util.inspect.custom\")]() {\n if (this.isValid) {\n return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;\n } else {\n return `DateTime { Invalid, reason: ${this.invalidReason} }`;\n }\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}\n * @return {number}\n */\n valueOf() {\n return this.toMillis();\n }\n\n /**\n * Returns the epoch milliseconds of this DateTime.\n * @return {number}\n */\n toMillis() {\n return this.isValid ? this.ts : NaN;\n }\n\n /**\n * Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.\n * @return {number}\n */\n toSeconds() {\n return this.isValid ? this.ts / 1000 : NaN;\n }\n\n /**\n * Returns the epoch seconds (as a whole number) of this DateTime.\n * @return {number}\n */\n toUnixInteger() {\n return this.isValid ? Math.floor(this.ts / 1000) : NaN;\n }\n\n /**\n * Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.\n * @return {string}\n */\n toJSON() {\n return this.toISO();\n }\n\n /**\n * Returns a BSON serializable equivalent to this DateTime.\n * @return {Date}\n */\n toBSON() {\n return this.toJSDate();\n }\n\n /**\n * Returns a JavaScript object with this DateTime's year, month, day, and so on.\n * @param opts - options for generating the object\n * @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output\n * @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }\n * @return {Object}\n */\n toObject(opts = {}) {\n if (!this.isValid) return {};\n\n const base = { ...this.c };\n\n if (opts.includeConfig) {\n base.outputCalendar = this.outputCalendar;\n base.numberingSystem = this.loc.numberingSystem;\n base.locale = this.loc.locale;\n }\n return base;\n }\n\n /**\n * Returns a JavaScript Date equivalent to this DateTime.\n * @return {Date}\n */\n toJSDate() {\n return new Date(this.isValid ? this.ts : NaN);\n }\n\n // COMPARE\n\n /**\n * Return the difference between two DateTimes as a Duration.\n * @param {DateTime} otherDateTime - the DateTime to compare this one to\n * @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @example\n * var i1 = DateTime.fromISO('1982-05-25T09:45'),\n * i2 = DateTime.fromISO('1983-10-14T10:30');\n * i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }\n * i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }\n * i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }\n * i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }\n * @return {Duration}\n */\n diff(otherDateTime, unit = \"milliseconds\", opts = {}) {\n if (!this.isValid || !otherDateTime.isValid) {\n return Duration.invalid(\"created by diffing an invalid DateTime\");\n }\n\n const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };\n\n const units = maybeArray(unit).map(Duration.normalizeUnit),\n otherIsLater = otherDateTime.valueOf() > this.valueOf(),\n earlier = otherIsLater ? this : otherDateTime,\n later = otherIsLater ? otherDateTime : this,\n diffed = diff(earlier, later, units, durOpts);\n\n return otherIsLater ? diffed.negate() : diffed;\n }\n\n /**\n * Return the difference between this DateTime and right now.\n * See {@link DateTime#diff}\n * @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration\n * @param {Object} opts - options that affect the creation of the Duration\n * @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use\n * @return {Duration}\n */\n diffNow(unit = \"milliseconds\", opts = {}) {\n return this.diff(DateTime.now(), unit, opts);\n }\n\n /**\n * Return an Interval spanning between this DateTime and another DateTime\n * @param {DateTime} otherDateTime - the other end point of the Interval\n * @return {Interval|DateTime}\n */\n until(otherDateTime) {\n return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;\n }\n\n /**\n * Return whether this DateTime is in the same unit of time as another DateTime.\n * Higher-order units must also be identical for this function to return `true`.\n * Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.\n * @param {DateTime} otherDateTime - the other DateTime\n * @param {string} unit - the unit of time to check sameness on\n * @param {Object} opts - options\n * @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used\n * @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day\n * @return {boolean}\n */\n hasSame(otherDateTime, unit, opts) {\n if (!this.isValid) return false;\n\n const inputMs = otherDateTime.valueOf();\n const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });\n return (\n adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts)\n );\n }\n\n /**\n * Equality check\n * Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.\n * To compare just the millisecond values, use `+dt1 === +dt2`.\n * @param {DateTime} other - the other DateTime\n * @return {boolean}\n */\n equals(other) {\n return (\n this.isValid &&\n other.isValid &&\n this.valueOf() === other.valueOf() &&\n this.zone.equals(other.zone) &&\n this.loc.equals(other.loc)\n );\n }\n\n /**\n * Returns a string representation of a this time relative to now, such as \"in two days\". Can only internationalize if your\n * platform supports Intl.RelativeTimeFormat. Rounds towards zero by default.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} [options.style=\"long\"] - the style of units, must be \"long\", \"short\", or \"narrow\"\n * @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of \"years\", \"quarters\", \"months\", \"weeks\", \"days\", \"hours\", \"minutes\", or \"seconds\"\n * @param {boolean} [options.round=true] - whether to round the numbers in the output.\n * @param {string} [options.rounding=\"trunc\"] - rounding method to use when rounding the numbers in the output. Can be \"trunc\" (toward zero), \"expand\" (away from zero), \"round\", \"floor\", or \"ceil\".\n * @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelative() //=> \"in 1 day\"\n * @example DateTime.now().setLocale(\"es\").toRelative({ days: 1 }) //=> \"dentro de 1 día\"\n * @example DateTime.now().plus({ days: 1 }).toRelative({ locale: \"fr\" }) //=> \"dans 23 heures\"\n * @example DateTime.now().minus({ days: 2 }).toRelative() //=> \"2 days ago\"\n * @example DateTime.now().minus({ days: 2 }).toRelative({ unit: \"hours\" }) //=> \"48 hours ago\"\n * @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> \"1.5 days ago\"\n */\n toRelative(options = {}) {\n if (!this.isValid) return null;\n const base = options.base || DateTime.fromObject({}, { zone: this.zone }),\n padding = options.padding ? (this < base ? -options.padding : options.padding) : 0;\n let units = [\"years\", \"months\", \"days\", \"hours\", \"minutes\", \"seconds\"];\n let unit = options.unit;\n if (Array.isArray(options.unit)) {\n units = options.unit;\n unit = undefined;\n }\n return diffRelative(base, this.plus(padding), {\n ...options,\n numeric: \"always\",\n units,\n unit,\n });\n }\n\n /**\n * Returns a string representation of this date relative to today, such as \"yesterday\" or \"next month\".\n * Only internationalizes on platforms that supports Intl.RelativeTimeFormat.\n * @param {Object} options - options that affect the output\n * @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.\n * @param {string} options.locale - override the locale of this DateTime\n * @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of \"years\", \"quarters\", \"months\", \"weeks\", or \"days\"\n * @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> \"tomorrow\"\n * @example DateTime.now().setLocale(\"es\").plus({ days: 1 }).toRelative() //=> \"\"mañana\"\n * @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: \"fr\" }) //=> \"demain\"\n * @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> \"2 days ago\"\n */\n toRelativeCalendar(options = {}) {\n if (!this.isValid) return null;\n\n return diffRelative(options.base || DateTime.fromObject({}, { zone: this.zone }), this, {\n ...options,\n numeric: \"auto\",\n units: [\"years\", \"months\", \"days\"],\n calendary: true,\n });\n }\n\n /**\n * Return the min of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum\n * @return {DateTime} the min DateTime, or undefined if called with no argument\n */\n static min(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"min requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.min);\n }\n\n /**\n * Return the max of several date times\n * @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum\n * @return {DateTime} the max DateTime, or undefined if called with no argument\n */\n static max(...dateTimes) {\n if (!dateTimes.every(DateTime.isDateTime)) {\n throw new InvalidArgumentError(\"max requires all arguments be DateTimes\");\n }\n return bestBy(dateTimes, (i) => i.valueOf(), Math.max);\n }\n\n // MISC\n\n /**\n * Explain how a string would be parsed by fromFormat()\n * @param {string} text - the string to parse\n * @param {string} fmt - the format the string is expected to be in (see description)\n * @param {Object} options - options taken by fromFormat()\n * @return {Object}\n */\n static fromFormatExplain(text, fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return explainFromTokens(localeToUse, text, fmt);\n }\n\n /**\n * @deprecated use fromFormatExplain instead\n */\n static fromStringExplain(text, fmt, options = {}) {\n return DateTime.fromFormatExplain(text, fmt, options);\n }\n\n /**\n * Build a parser for `fmt` using the given locale. This parser can be passed\n * to {@link DateTime.fromFormatParser} to a parse a date in this format. This\n * can be used to optimize cases where many dates need to be parsed in a\n * specific format.\n *\n * @param {String} fmt - the format the string is expected to be in (see\n * description)\n * @param {Object} options - options used to set locale and numberingSystem\n * for parser\n * @returns {TokenParser} - opaque object to be used\n */\n static buildFormatParser(fmt, options = {}) {\n const { locale = null, numberingSystem = null } = options,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n return new TokenParser(localeToUse, fmt);\n }\n\n /**\n * Create a DateTime from an input string and format parser.\n *\n * The format parser must have been created with the same locale as this call.\n *\n * @param {String} text - the string to parse\n * @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}\n * @param {Object} opts - options taken by fromFormat()\n * @returns {DateTime}\n */\n static fromFormatParser(text, formatParser, opts = {}) {\n if (isUndefined(text) || isUndefined(formatParser)) {\n throw new InvalidArgumentError(\n \"fromFormatParser requires an input string and a format parser\"\n );\n }\n const { locale = null, numberingSystem = null } = opts,\n localeToUse = Locale.fromOpts({\n locale,\n numberingSystem,\n defaultToEN: true,\n });\n\n if (!localeToUse.equals(formatParser.locale)) {\n throw new InvalidArgumentError(\n `fromFormatParser called with a locale of ${localeToUse}, ` +\n `but the format parser was created for ${formatParser.locale}`\n );\n }\n\n const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);\n\n if (invalidReason) {\n return DateTime.invalid(invalidReason);\n } else {\n return parseDataToDateTime(\n result,\n zone,\n opts,\n `format ${formatParser.format}`,\n text,\n specificOffset\n );\n }\n }\n\n // FORMAT PRESETS\n\n /**\n * {@link DateTime#toLocaleString} format like 10/14/1983\n * @type {Object}\n */\n static get DATE_SHORT() {\n return Formats.DATE_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED() {\n return Formats.DATE_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'\n * @type {Object}\n */\n static get DATE_MED_WITH_WEEKDAY() {\n return Formats.DATE_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983'\n * @type {Object}\n */\n static get DATE_FULL() {\n return Formats.DATE_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'\n * @type {Object}\n */\n static get DATE_HUGE() {\n return Formats.DATE_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_SIMPLE() {\n return Formats.TIME_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SECONDS() {\n return Formats.TIME_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_SHORT_OFFSET() {\n return Formats.TIME_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get TIME_WITH_LONG_OFFSET() {\n return Formats.TIME_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_SIMPLE() {\n return Formats.TIME_24_SIMPLE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SECONDS() {\n return Formats.TIME_24_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_SHORT_OFFSET() {\n return Formats.TIME_24_WITH_SHORT_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.\n * @type {Object}\n */\n static get TIME_24_WITH_LONG_OFFSET() {\n return Formats.TIME_24_WITH_LONG_OFFSET;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT() {\n return Formats.DATETIME_SHORT;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_SHORT_WITH_SECONDS() {\n return Formats.DATETIME_SHORT_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED() {\n return Formats.DATETIME_MED;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_SECONDS() {\n return Formats.DATETIME_MED_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_MED_WITH_WEEKDAY() {\n return Formats.DATETIME_MED_WITH_WEEKDAY;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL() {\n return Formats.DATETIME_FULL;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_FULL_WITH_SECONDS() {\n return Formats.DATETIME_FULL_WITH_SECONDS;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE() {\n return Formats.DATETIME_HUGE;\n }\n\n /**\n * {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.\n * @type {Object}\n */\n static get DATETIME_HUGE_WITH_SECONDS() {\n return Formats.DATETIME_HUGE_WITH_SECONDS;\n }\n}\n\n/**\n * @private\n */\nexport function friendlyDateTime(dateTimeish) {\n if (DateTime.isDateTime(dateTimeish)) {\n return dateTimeish;\n } else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {\n return DateTime.fromJSDate(dateTimeish);\n } else if (dateTimeish && typeof dateTimeish === \"object\") {\n return DateTime.fromObject(dateTimeish);\n } else {\n throw new InvalidArgumentError(\n `Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`\n );\n }\n}\n"],"names":["LuxonError","Error","InvalidDateTimeError","constructor","reason","super","toMessage","InvalidIntervalError","InvalidDurationError","ConflictingSpecificationError","InvalidUnitError","unit","InvalidArgumentError","ZoneIsAbstractError","n","s","l","DATE_SHORT","year","month","day","DATE_MED","DATE_MED_WITH_WEEKDAY","weekday","DATE_FULL","DATE_HUGE","TIME_SIMPLE","hour","minute","TIME_WITH_SECONDS","second","TIME_WITH_SHORT_OFFSET","timeZoneName","TIME_WITH_LONG_OFFSET","TIME_24_SIMPLE","hourCycle","TIME_24_WITH_SECONDS","TIME_24_WITH_SHORT_OFFSET","TIME_24_WITH_LONG_OFFSET","DATETIME_SHORT","DATETIME_SHORT_WITH_SECONDS","DATETIME_MED","DATETIME_MED_WITH_SECONDS","DATETIME_MED_WITH_WEEKDAY","DATETIME_FULL","DATETIME_FULL_WITH_SECONDS","DATETIME_HUGE","DATETIME_HUGE_WITH_SECONDS","Zone","type","name","ianaName","this","isUniversal","offsetName","ts","opts","formatOffset","format","offset","equals","otherZone","isValid","singleton$1","SystemZone","instance","Intl","DateTimeFormat","resolvedOptions","timeZone","_ref","locale","parseZoneInfo","Date","getTimezoneOffset","dtfCache","Map","typeToPos","era","ianaZoneCache","IANAZone","create","zone","get","undefined","set","resetCache","clear","isValidSpecifier","isValidZone","e","zoneName","valid","_ref2","NaN","date","isNaN","dtf","hour12","makeDTF","adOrBc","formatToParts","formatted","filled","i","length","value","pos","isUndefined","parseInt","partsOffset","replace","parsed","exec","fMonth","fDay","fYear","fadOrBc","fHour","fMinute","fSecond","hackyOffset","Math","abs","asTS","over","objToLocalTS","millisecond","intlLFCache","intlDTCache","getCachedDTF","locString","arguments","key","JSON","stringify","intlNumCache","intlRelCache","sysLocaleCache","intlResolvedOptionsCache","getCachedIntResolvedOptions","weekInfoCache","listStuff","loc","englishFn","intlFn","mode","listingMode","PolyNumberFormatter","intl","forceSimple","padTo","floor","otherOpts","Object","keys","intlOpts","useGrouping","minimumIntegerDigits","inf","NumberFormat","getCachedINF","fixed","padStart","roundTo","PolyDateFormatter","dt","z","originalZone","gmtOffset","offsetZ","setZone","plus","minutes","map","_ref3","join","toJSDate","parts","part","PolyRelFormatter","isEnglish","style","hasRelative","rtf","base","cacheKeyOpts","RelativeTimeFormat","getCachedRTF","count","numeric","narrow","units","years","quarters","months","weeks","days","hours","seconds","lastable","indexOf","isDay","isInPast","is","fmtValue","singular","lilUnits","fmtUnit","formatRelativeTime","fallbackWeekSettings","firstDay","minimalDays","weekend","Locale","fromOpts","numberingSystem","outputCalendar","weekSettings","defaultToEN","specifiedLocale","Settings","defaultLocale","localeR","numberingSystemR","defaultNumberingSystem","outputCalendarR","defaultOutputCalendar","weekSettingsR","validateWeekSettings","defaultWeekSettings","fromObject","numbering","parsedLocale","parsedNumberingSystem","parsedOutputCalendar","localeStr","xIndex","substring","uIndex","options","selectedStr","smaller","calendar","parseLocaleString","includes","intlConfigString","weekdaysCache","standalone","monthsCache","meridiemCache","eraCache","fastNumbersCached","fastNumbers","startsWith","isActuallyEn","hasNoWeirdness","clone","alts","getOwnPropertyNames","redefaultToEN","redefaultToSystem","monthSpecialCase","formatStr","mapper","dtFormatter","extract","f","ms","DateTime","utc","push","mapMonths","weekdays","mapWeekdays","meridiems","eras","field","matching","find","m","toLowerCase","numberFormatter","relFormatter","listFormatter","ListFormat","getCachedLF","getWeekSettings","hasLocaleWeekInfo","data","getWeekInfo","weekInfo","getCachedWeekInfo","getStartOfWeek","getMinDaysInFirstWeek","getWeekendDays","other","toString","singleton","FixedOffsetZone","utcInstance","parseSpecifier","r","match","signedOffset","InvalidZone","normalizeZone","input","defaultZone","lowered","isNumber","numberingSystems","arab","arabext","bali","beng","deva","fullwide","gujr","hanidec","khmr","knda","laoo","limb","mlym","mong","mymr","orya","tamldec","telu","thai","tibt","latn","numberingSystemsUTF16","hanidecChars","split","digitRegexCache","digitRegex","_ref4","append","ns","appendCache","regex","RegExp","throwOnInvalid","now","twoDigitCutoffYear","cutoffYear","t","resetCaches","Invalid","explanation","nonLeapLadder","leapLadder","unitOutOfRange","dayOfWeek","d","UTC","setUTCFullYear","getUTCFullYear","js","getUTCDay","computeOrdinal","isLeapYear","uncomputeOrdinal","ordinal","table","month0","findIndex","isoWeekdayToLocal","isoWeekday","startOfWeek","gregorianToWeek","gregObj","minDaysInFirstWeek","weekYear","weekNumber","weeksInWeekYear","timeObject","weekToGregorian","weekData","weekdayOfJan4","yearInDays","daysInYear","gregorianToOrdinal","gregData","ordinalToGregorian","ordinalData","usesLocalWeekValues","obj","localWeekday","localWeekNumber","localWeekYear","hasInvalidGregorianData","validYear","isInteger","validMonth","integerBetween","validDay","daysInMonth","hasInvalidTimeData","validHour","validMinute","validSecond","validMillisecond","o","prototype","bestBy","arr","by","compare","reduce","best","next","pair","hasOwnProperty","prop","call","settings","Array","isArray","some","v","from","thing","bottom","top","padded","parseInteger","string","parseFloating","parseFloat","parseMillis","fraction","number","digits","rounding","factor","ceil","trunc","round","RangeError","modMonth","x","floorMod","firstWeekOffset","weekOffset","weekOffsetNext","untruncateYear","offsetFormat","modified","offHourStr","offMinuteStr","offHour","Number","offMin","asNumber","numericValue","isFinite","normalizeObject","normalizer","normalized","u","sign","a","k","pick","monthsLong","monthsShort","monthsNarrow","weekdaysLong","weekdaysShort","weekdaysNarrow","erasLong","erasShort","erasNarrow","stringifyTokens","splits","tokenToString","token","literal","val","macroTokenToFormatOpts","D","DD","DDD","DDDD","tt","ttt","tttt","T","TT","TTT","TTTT","ff","fff","ffff","F","FF","FFF","FFFF","Formatter","parseFormat","fmt","current","currentFull","bracketed","c","charAt","test","formatOpts","systemLoc","formatWithSystemDefault","formatDateTime","formatDateTimeParts","formatInterval","interval","start","formatRange","end","num","p","signDisplay","formatDateTimeFromString","knownEnglish","useDateTimeFormatter","isOffsetFixed","allowZ","meridiem","meridiemForDateTime","monthForDateTime","weekdayForDateTime","maybeMacro","eraForDateTime","slice","quarter","formatDurationFromString","dur","invertLargest","signMode","tokenToField","tokens","realTokens","found","_ref5","concat","collapsed","shiftTo","filter","lildur","info","mapped","inversionFactor","isNegativeDuration","largestUnit","values","ianaRegex","combineRegexes","_len","regexes","_key","full","source","combineExtractors","_len2","extractors","_key2","_ref6","ex","mergedVals","mergedZone","cursor","parse","_len3","patterns","_key3","extractor","simpleParse","_len4","_key4","ret","offsetRegex","isoTimeBaseRegex","isoTimeRegex","isoTimeExtensionRegex","extractISOWeekData","extractISOOrdinalData","sqlTimeRegex","sqlTimeExtensionRegex","int","fallback","extractISOTime","milliseconds","extractISOOffset","local","fullOffset","extractIANAZone","isoTimeOnly","isoDuration","extractISODuration","yearStr","monthStr","weekStr","dayStr","hourStr","minuteStr","secondStr","millisecondsStr","hasNegativePrefix","negativeSeconds","maybeNegate","obsOffsets","GMT","EDT","EST","CDT","CST","MDT","MST","PDT","PST","fromStrings","weekdayStr","result","rfc2822","extractRFC2822","obsOffset","milOffset","rfc1123","rfc850","ascii","extractRFC1123Or850","extractASCII","isoYmdWithTimeExtensionRegex","isoWeekWithTimeExtensionRegex","isoOrdinalWithTimeExtensionRegex","isoTimeCombinedRegex","extractISOYmdTimeAndOffset","extractISOWeekTimeAndOffset","extractISOOrdinalDateAndTime","extractISOTimeAndOffset","extractISOTimeOnly","sqlYmdWithTimeExtensionRegex","sqlTimeCombinedRegex","extractISOTimeOffsetAndIANAZone","INVALID$2","lowOrderMatrix","casualMatrix","daysInYearAccurate","daysInMonthAccurate","accurateMatrix","orderedUnits$1","reverseUnits","reverse","clone$1","conf","conversionAccuracy","matrix","Duration","durationToMillis","vals","sum","normalizeValues","reduceRight","previous","previousVal","conv","rollUp","removeZeroes","newVals","entries","config","accurate","invalid","isLuxonDuration","fromMillis","normalizeUnit","fromDurationLike","durationLike","isDuration","fromISO","text","parseISODuration","fromISOTime","parseISOTimeOnly","week","toFormat","fmtOpts","toHuman","showZeros","unitDisplay","listStyle","toObject","toISO","toISOTime","millis","toMillis","suppressMilliseconds","suppressSeconds","includePrefix","includeOffset","toJSON","Symbol","for","invalidReason","valueOf","duration","minus","negate","mapUnits","fn","reconfigure","as","normalize","rescale","shiftToAll","_len5","_key5","built","accumulated","lastUnit","own","ak","negated","removeZeros","invalidExplanation","eq","v1","v2","INVALID$1","Interval","isLuxonInterval","fromDateTimes","builtStart","friendlyDateTime","builtEnd","validateError","validateStartEnd","after","before","startIsValid","endIsValid","isInterval","lastDateTime","toDuration","startOf","useLocaleWeeks","diff","hasSame","isEmpty","isAfter","dateTime","isBefore","contains","splitAt","_len6","dateTimes","_key6","sorted","sort","b","results","added","splitBy","idx","divideEqually","numberOfParts","overlaps","abutsStart","abutsEnd","engulfs","intersection","union","merge","intervals","final","_ref7","item","sofar","xor","currentCount","ends","time","difference","_len7","_key7","toLocaleString","toISODate","dateFormat","separator","mapEndpoints","mapFn","Info","hasDST","proto","isValidIANAZone","locObj","getMinimumDaysInFirstWeek","getWeekendWeekdays","monthsFormat","weekdaysFormat","features","relative","localeWeek","dayDiff","earlier","later","utcDayStart","toUTC","keepLocalTime","highWater","lowestOrder","differs","differ","highOrderDiffs","remainingMillis","lowerOrderUnits","intUnit","post","deser","_ref8","str","code","charCodeAt","search","min","max","parseDigits","spaceOrNBSP","String","fromCharCode","spaceOrNBSPRegExp","fixListRegex","stripInsensitivities","oneOf","strings","startIndex","_ref9","groups","_ref0","h","simple","_ref1","partTypeStyleToTokenVal","short","long","dayperiod","dayPeriod","hour24","dummyDateTimeCache","expandMacroTokens","formatOptsToTokens","maybeExpandMacroToken","TokenParser","one","two","three","four","six","oneOrTwo","oneToThree","oneToSix","oneToNine","twoToFour","fourToSix","_ref10","unitate","unitForToken","disqualifyingUnit","regexString","handlers","explainFromTokens","rawMatches","matches","all","matchIndex","specificOffset","Z","q","M","G","y","S","toField","dateTimeFromMatches","df","resolvedOpts","isSpace","actualType","tokenForPart","INVALID","MAX_DATE","unsupportedZone","possiblyCachedWeekData","possiblyCachedLocalWeekData","localWeekData","inst","old","fixOffset","localTS","tz","utcGuess","o2","o3","tsToObj","getUTCMonth","getUTCDate","getUTCHours","getUTCMinutes","getUTCSeconds","getUTCMilliseconds","objToTS","adjustTime","oPre","millisToAdd","parseDataToDateTime","parsedZone","interpretationZone","toTechFormat","extended","precision","longFormat","extendedZone","showSeconds","defaultUnitValues","defaultWeekUnitValues","defaultOrdinalUnitValues","orderedUnits","orderedWeekUnits","orderedOrdinalUnits","weeknumber","weeksnumber","weeknumbers","weekyear","weekyears","normalizeUnitWithLocalWeeks","quickDT","offsetProvis","zoneOffsetTs","offsetGuess","zoneOffsetGuessCache","guessOffsetForZone","diffRelative","calendary","lastOpts","argList","args","ot","_zone","isLuxonDateTime","fromJSDate","zoneToUse","fromSeconds","tsNow","containsOrdinal","containsGregorYear","containsGregorMD","containsGregor","definiteWeekDef","useWeekData","defaultValues","objNow","foundFirst","higherOrderInvalid","validWeek","validWeekday","hasInvalidWeekData","validOrdinal","hasInvalidOrdinalData","gregorian","tsFinal","offsetFinal","parseISODate","fromRFC2822","trim","preprocessRFC2822","parseRFC2822Date","fromHTTP","parseHTTPDate","fromFormat","localeToUse","parseFromTokens","fromString","fromSQL","parseSQL","isDateTime","parseFormatForOpts","localeOpts","tokenList","expandFormat","isWeekend","monthShort","monthLong","weekdayShort","weekdayLong","offsetNameShort","offsetNameLong","isInDST","getPossibleOffsets","dayMs","minuteMs","oEarlier","oLater","o1","ts1","ts2","c1","c2","isInLeapYear","weeksInLocalWeekYear","resolvedLocaleOptions","toLocal","keepCalendarTime","newTS","asObj","setLocale","settingWeekStuff","mixed","normalizedUnit","endOf","toLocaleParts","ext","toISOWeekDate","toRFC2822","toHTTP","toSQLDate","toSQLTime","includeZone","includeOffsetSpace","toSQL","toSeconds","toUnixInteger","toBSON","includeConfig","otherDateTime","durOpts","otherIsLater","diffed","diffNow","until","inputMs","adjustedToZone","toRelative","padding","toRelativeCalendar","_len8","_key8","every","_len9","_key9","fromFormatExplain","fromStringExplain","buildFormatParser","fromFormatParser","formatParser","dateTimeish"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/301.61ebdcde.chunk.js b/web-app/build/static/js/301.61ebdcde.chunk.js
new file mode 100644
index 00000000000..89fe967dad2
--- /dev/null
+++ b/web-app/build/static/js/301.61ebdcde.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[301],{5301(e,t,a){a.r(t),a.d(t,{default:()=>h});var o=a(5043),s=a(3216),l=a(2961),c=a(6483),g=a(4159),n=a(6537),r=a(649),p=a(685),u=a(579);const h=()=>{const e=(0,l.jL)(),t=(0,s.Zp)();return(0,o.useEffect)(()=>{(()=>{const a=()=>{(0,c.q7)(),e((0,g.WQ)(!1)),localStorage.setItem("userLoggedIn",""),localStorage.setItem("redirect-path",""),e((0,n.wD)()),t("/login")},o=localStorage.getItem("auth-state");r.A.invoke("POST","/api/v1/logout",{state:o}).then(()=>{a()}).catch(e=>{console.log(e),a()})})()},[e,t]),(0,u.jsx)(p.A,{})}}}]);
+//# sourceMappingURL=301.61ebdcde.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/301.61ebdcde.chunk.js.map b/web-app/build/static/js/301.61ebdcde.chunk.js.map
new file mode 100644
index 00000000000..37ab44ee6fb
--- /dev/null
+++ b/web-app/build/static/js/301.61ebdcde.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/301.61ebdcde.chunk.js","mappings":"mOA0BA,MA6BA,EA7BmBA,KACjB,MAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAwBjB,OAvBAC,EAAAA,EAAAA,WAAU,KACOC,MACb,MAAMC,EAAgBA,MACpBC,EAAAA,EAAAA,MACAP,GAASQ,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCV,GAASW,EAAAA,EAAAA,OACTT,EAAS,WAELU,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EACGC,OAAO,OAAQ,iBAAkB,CAAEH,UACnCI,KAAK,KACJV,MAEDW,MAAOC,IACNC,QAAQC,IAAIF,GACZZ,OAGND,IACC,CAACL,EAAUE,KACPmB,EAAAA,EAAAA,KAACC,EAAAA,EAAgB,I","sources":["screens/LogoutPage/LogoutPage.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\nimport api from \"../../common/api\";\nimport LoadingComponent from \"../../common/LoadingComponent\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n useEffect(() => {\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`/login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n }, [dispatch, navigate]);\n return ;\n};\n\nexport default LogoutPage;\n"],"names":["LogoutPage","dispatch","useAppDispatch","navigate","useNavigate","useEffect","logout","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","invoke","then","catch","err","console","log","_jsx","LoadingComponent"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/301.d424161c.chunk.js b/web-app/build/static/js/301.d424161c.chunk.js
deleted file mode 100644
index 571f09702ba..00000000000
--- a/web-app/build/static/js/301.d424161c.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[301],{5301:(e,t,a)=>{a.r(t),a.d(t,{default:()=>h});var o=a(5043),s=a(3216),c=a(2961),l=a(6483),n=a(4159),r=a(6537),p=a(649),u=a(685),g=a(579);const h=()=>{const e=(0,c.jL)(),t=(0,s.Zp)();return(0,o.useEffect)((()=>{(()=>{const a=()=>{(0,l.q7)(),e((0,n.WQ)(!1)),localStorage.setItem("userLoggedIn",""),localStorage.setItem("redirect-path",""),e((0,r.wD)()),t("/login")},o=localStorage.getItem("auth-state");p.A.invoke("POST","/api/v1/logout",{state:o}).then((()=>{a()})).catch((e=>{console.log(e),a()}))})()}),[e,t]),(0,g.jsx)(u.A,{})}}}]);
-//# sourceMappingURL=301.d424161c.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/301.d424161c.chunk.js.map b/web-app/build/static/js/301.d424161c.chunk.js.map
deleted file mode 100644
index 2ea1e122dc7..00000000000
--- a/web-app/build/static/js/301.d424161c.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/301.d424161c.chunk.js","mappings":"0NA0BA,MA6BA,EA7BmBA,KACjB,MAAMC,GAAWC,EAAAA,EAAAA,MACXC,GAAWC,EAAAA,EAAAA,MAwBjB,OAvBAC,EAAAA,EAAAA,YAAU,KACOC,MACb,MAAMC,EAAgBA,MACpBC,EAAAA,EAAAA,MACAP,GAASQ,EAAAA,EAAAA,KAAW,IACpBC,aAAaC,QAAQ,eAAgB,IACrCD,aAAaC,QAAQ,gBAAiB,IACtCV,GAASW,EAAAA,EAAAA,OACTT,EAAS,SAAS,EAEdU,EAAQH,aAAaI,QAAQ,cACnCC,EAAAA,EACGC,OAAO,OAAQ,iBAAkB,CAAEH,UACnCI,MAAK,KACJV,GAAe,IAEhBW,OAAOC,IACNC,QAAQC,IAAIF,GACZZ,GAAe,GACf,EAEND,EAAQ,GACP,CAACL,EAAUE,KACPmB,EAAAA,EAAAA,KAACC,EAAAA,EAAgB,GAAG,C","sources":["screens/LogoutPage/LogoutPage.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect } from \"react\";\nimport { useNavigate } from \"react-router-dom\";\nimport { useAppDispatch } from \"../../store\";\nimport { ErrorResponseHandler } from \"../../common/types\";\nimport { clearSession } from \"../../common/utils\";\nimport { userLogged } from \"../../systemSlice\";\nimport { resetSession } from \"../Console/consoleSlice\";\nimport api from \"../../common/api\";\nimport LoadingComponent from \"../../common/LoadingComponent\";\n\nconst LogoutPage = () => {\n const dispatch = useAppDispatch();\n const navigate = useNavigate();\n useEffect(() => {\n const logout = () => {\n const deleteSession = () => {\n clearSession();\n dispatch(userLogged(false));\n localStorage.setItem(\"userLoggedIn\", \"\");\n localStorage.setItem(\"redirect-path\", \"\");\n dispatch(resetSession());\n navigate(`/login`);\n };\n const state = localStorage.getItem(\"auth-state\");\n api\n .invoke(\"POST\", `/api/v1/logout`, { state })\n .then(() => {\n deleteSession();\n })\n .catch((err: ErrorResponseHandler) => {\n console.log(err);\n deleteSession();\n });\n };\n logout();\n }, [dispatch, navigate]);\n return ;\n};\n\nexport default LogoutPage;\n"],"names":["LogoutPage","dispatch","useAppDispatch","navigate","useNavigate","useEffect","logout","deleteSession","clearSession","userLogged","localStorage","setItem","resetSession","state","getItem","api","invoke","then","catch","err","console","log","_jsx","LoadingComponent"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/361.679d3b95.chunk.js b/web-app/build/static/js/361.679d3b95.chunk.js
new file mode 100644
index 00000000000..40910b3ea4e
--- /dev/null
+++ b/web-app/build/static/js/361.679d3b95.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[361],{9361(e,r,t){t.r(r),t.d(r,{default:()=>m});var o=t(5043),a=t(9923),i=t(4574),n=t(3097),l=t.n(n),s=t(3216),c=t(649),d=t(4710),p=t(4558),g=t(579);const h=i.Ay.div(e=>{let{theme:r}=e;return{"& .errorDescription":{fontStyle:"italic",transition:"all .2s ease-in-out",padding:"0 15px",marginTop:5,overflow:"auto"},"& .errorLabel":{color:l()(r,"fontColor","#000"),fontSize:18,fontWeight:"bold",marginLeft:5},"& .simpleError":{marginTop:5,padding:"2px 5px",fontSize:16,color:l()(r,"fontColor","#000")},"& .messageIcon":{color:l()(r,"signalColors.danger","#C72C48"),display:"flex","& svg":{width:32,height:32}},"& .errorTitle":{display:"flex",alignItems:"center",borderBottom:15}}}),m=()=>{const e=(0,s.Zp)(),[r,t]=(0,o.useState)(""),[i,n]=(0,o.useState)(""),[l,m]=(0,o.useState)(!0);return(0,o.useEffect)(()=>{if(l){const r=window.location.search,o=new URLSearchParams(r),a=o.get("code"),i=o.get("state"),l=o.get("error"),s=o.get("errorDescription");l||s?(t(l||""),n(s||""),m(!1)):c.A.invoke("POST","/api/v1/login/oauth2/auth",{code:a,state:i}).then(()=>{let r="/";localStorage.getItem("redirect-path")&&""!==localStorage.getItem("redirect-path")&&(r=`${localStorage.getItem("redirect-path")}`,localStorage.setItem("redirect-path","")),i&&localStorage.setItem("auth-state",i),m(!1),e(r)}).catch(e=>{t(e.errorMessage),n(e.detailedError),m(!1)})}},[l,e]),""!==r||""!==i?(0,g.jsx)(o.Fragment,{children:(0,g.jsx)(a.ndn,{logoProps:{applicationName:"operator",subVariant:(0,p.v)()},form:(0,g.jsxs)(h,{children:[(0,g.jsxs)("div",{className:"errorTitle",children:[(0,g.jsx)("span",{className:"messageIcon",children:(0,g.jsx)(a.cJw,{})}),(0,g.jsx)("span",{className:"errorLabel",children:"Error from IDP"})]}),(0,g.jsx)("div",{className:"simpleError",children:r}),(0,g.jsx)(a.azJ,{className:"errorDescription",children:i}),(0,g.jsx)(a.$nd,{id:"back-to-login",onClick:()=>{window.location.href=`${d.p}login`},type:"submit",variant:"callAction",fullWidth:!0,children:"Back to Login"})]}),promoHeader:(0,g.jsx)(o.Fragment,{children:"Multi-Cloud Object\xa0Store"}),promoInfo:(0,g.jsxs)(o.Fragment,{children:["MinIO's high-performance, Kubernetes-native object store is licensed under GNU AGPL v3 and is available on every cloud - public, private and edge. For more information on the terms of the license or to learn more about commercial licensing options visit the"," ",(0,g.jsx)("a",{href:"https://min.io/pricing",children:"pricing page"}),"."]}),backgroundAnimation:!1})}):null}}}]);
+//# sourceMappingURL=361.679d3b95.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/361.679d3b95.chunk.js.map b/web-app/build/static/js/361.679d3b95.chunk.js.map
new file mode 100644
index 00000000000..5541aab2d82
--- /dev/null
+++ b/web-app/build/static/js/361.679d3b95.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/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,QAAQ,aAAcP,GAErCT,GAAW,GACXR,EAASqB,KAEVI,MAAOvB,IACNC,EAASD,EAAMwB,cACfpB,EAAoBJ,EAAMyB,eAC1BnB,GAAW,IAGnB,GACC,CAACD,EAASP,IACI,KAAVE,GAAqC,KAArBG,GACrBuB,EAAAA,EAAAA,KAACC,EAAAA,SAAQ,CAAAC,UACPF,EAAAA,EAAAA,KAACG,EAAAA,IAAY,CACXC,UAAW,CAAEC,gBAAiB,WAAYC,YAAYC,EAAAA,EAAAA,MACtDC,MACEC,EAAAA,EAAAA,MAAC1D,EAAiB,CAAAmD,SAAA,EAChBO,EAAAA,EAAAA,MAAA,OAAKC,UAAW,aAAaR,SAAA,EAC3BF,EAAAA,EAAAA,KAAA,QAAMU,UAAW,cAAcR,UAC7BF,EAAAA,EAAAA,KAACW,EAAAA,IAAQ,OAEXX,EAAAA,EAAAA,KAAA,QAAMU,UAAW,aAAaR,SAAC,uBAEjCF,EAAAA,EAAAA,KAAA,OAAKU,UAAW,cAAcR,SAAE5B,KAChC0B,EAAAA,EAAAA,KAACY,EAAAA,IAAG,CAACF,UAAW,mBAAmBR,SAAEzB,KACrCuB,EAAAA,EAAAA,KAACa,EAAAA,IAAM,CACLC,GAAI,gBACJC,QAASA,KACPhC,OAAOC,SAASgC,KAAO,GAAGC,EAAAA,UAE5BC,KAAK,SACLC,QAAQ,aACRC,WAAS,EAAAlB,SACV,qBAKLmB,aAAarB,EAAAA,EAAAA,KAACC,EAAAA,SAAQ,CAAAC,SAAC,gCACvBoB,WACEb,EAAAA,EAAAA,MAACR,EAAAA,SAAQ,CAAAC,SAAA,CAAC,oQAIgD,KACxDF,EAAAA,EAAAA,KAAA,KAAGgB,KAAM,yBAAyBd,SAAC,iBAAgB,OAGvDqB,qBAAqB,MAGvB,K","sources":["screens/LoginPage/LoginCallback.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { Box, Button, LoginWrapper, WarnIcon } from \"mds\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { useNavigate } from \"react-router-dom\";\nimport api from \"../../common/api\";\nimport { baseUrl } from \"../../history\";\nimport { getLogoVar } from \"../../config\";\n\nconst CallBackContainer = styled.div(({ theme }) => ({\n \"& .errorDescription\": {\n fontStyle: \"italic\",\n transition: \"all .2s ease-in-out\",\n padding: \"0 15px\",\n marginTop: 5,\n overflow: \"auto\",\n },\n \"& .errorLabel\": {\n color: get(theme, \"fontColor\", \"#000\"),\n fontSize: 18,\n fontWeight: \"bold\",\n marginLeft: 5,\n },\n \"& .simpleError\": {\n marginTop: 5,\n padding: \"2px 5px\",\n fontSize: 16,\n color: get(theme, \"fontColor\", \"#000\"),\n },\n \"& .messageIcon\": {\n color: get(theme, \"signalColors.danger\", \"#C72C48\"),\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n \"& .errorTitle\": {\n display: \"flex\",\n alignItems: \"center\",\n borderBottom: 15,\n },\n}));\n\nconst LoginCallback = () => {\n const navigate = useNavigate();\n\n const [error, setError] = useState(\"\");\n const [errorDescription, setErrorDescription] = useState(\"\");\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (loading) {\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n const code = urlParams.get(\"code\");\n const state = urlParams.get(\"state\");\n const error = urlParams.get(\"error\");\n const errorDescription = urlParams.get(\"errorDescription\");\n if (error || errorDescription) {\n setError(error || \"\");\n setErrorDescription(errorDescription || \"\");\n setLoading(false);\n } else {\n api\n .invoke(\"POST\", \"/api/v1/login/oauth2/auth\", { code, state })\n .then(() => {\n // We push to history the new URL.\n let targetPath = \"/\";\n if (\n localStorage.getItem(\"redirect-path\") &&\n localStorage.getItem(\"redirect-path\") !== \"\"\n ) {\n targetPath = `${localStorage.getItem(\"redirect-path\")}`;\n localStorage.setItem(\"redirect-path\", \"\");\n }\n if (state) {\n localStorage.setItem(\"auth-state\", state);\n }\n setLoading(false);\n navigate(targetPath);\n })\n .catch((error) => {\n setError(error.errorMessage);\n setErrorDescription(error.detailedError);\n setLoading(false);\n });\n }\n }\n }, [loading, navigate]);\n return error !== \"\" || errorDescription !== \"\" ? (\n \n \n
\n \n \n \n Error from IDP\n
\n
{error}
\n {errorDescription}\n \n \n }\n promoHeader={Multi-Cloud Object Store}\n promoInfo={\n \n MinIO's high-performance, Kubernetes-native object store is licensed\n under GNU AGPL v3 and is available on every cloud - public, private\n and edge. For more information on the terms of the license or to\n learn more about commercial licensing options visit the{\" \"}\n pricing page.\n \n }\n backgroundAnimation={false}\n />\n \n ) : null;\n};\n\nexport default LoginCallback;\n"],"names":["CallBackContainer","styled","div","_ref","theme","fontStyle","transition","padding","marginTop","overflow","color","get","fontSize","fontWeight","marginLeft","display","width","height","alignItems","borderBottom","LoginCallback","navigate","useNavigate","error","setError","useState","errorDescription","setErrorDescription","loading","setLoading","useEffect","queryString","window","location","search","urlParams","URLSearchParams","code","state","api","invoke","then","targetPath","localStorage","getItem","setItem","catch","errorMessage","detailedError","_jsx","Fragment","children","LoginWrapper","logoProps","applicationName","subVariant","getLogoVar","form","_jsxs","className","WarnIcon","Box","Button","id","onClick","href","baseUrl","type","variant","fullWidth","promoHeader","promoInfo","backgroundAnimation"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/361.d332fe4a.chunk.js b/web-app/build/static/js/361.d332fe4a.chunk.js
deleted file mode 100644
index e11ba5e9f7b..00000000000
--- a/web-app/build/static/js/361.d332fe4a.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[361],{9361:(e,r,t)=>{t.r(r),t.d(r,{default:()=>m});var o=t(5043),a=t(9923),i=t(4574),n=t(3097),s=t.n(n),l=t(3216),c=t(649),d=t(4710),p=t(4558),g=t(579);const h=i.Ay.div((e=>{let{theme:r}=e;return{"& .errorDescription":{fontStyle:"italic",transition:"all .2s ease-in-out",padding:"0 15px",marginTop:5,overflow:"auto"},"& .errorLabel":{color:s()(r,"fontColor","#000"),fontSize:18,fontWeight:"bold",marginLeft:5},"& .simpleError":{marginTop:5,padding:"2px 5px",fontSize:16,color:s()(r,"fontColor","#000")},"& .messageIcon":{color:s()(r,"signalColors.danger","#C72C48"),display:"flex","& svg":{width:32,height:32}},"& .errorTitle":{display:"flex",alignItems:"center",borderBottom:15}}})),m=()=>{const e=(0,l.Zp)(),[r,t]=(0,o.useState)(""),[i,n]=(0,o.useState)(""),[s,m]=(0,o.useState)(!0);return(0,o.useEffect)((()=>{if(s){const r=window.location.search,o=new URLSearchParams(r),a=o.get("code"),i=o.get("state"),s=o.get("error"),l=o.get("errorDescription");s||l?(t(s||""),n(l||""),m(!1)):c.A.invoke("POST","/api/v1/login/oauth2/auth",{code:a,state:i}).then((()=>{let r="/";localStorage.getItem("redirect-path")&&""!==localStorage.getItem("redirect-path")&&(r=`${localStorage.getItem("redirect-path")}`,localStorage.setItem("redirect-path","")),i&&localStorage.setItem("auth-state",i),m(!1),e(r)})).catch((e=>{t(e.errorMessage),n(e.detailedError),m(!1)}))}}),[s,e]),""!==r||""!==i?(0,g.jsx)(o.Fragment,{children:(0,g.jsx)(a.ndn,{logoProps:{applicationName:"operator",subVariant:(0,p.v)()},form:(0,g.jsxs)(h,{children:[(0,g.jsxs)("div",{className:"errorTitle",children:[(0,g.jsx)("span",{className:"messageIcon",children:(0,g.jsx)(a.cJw,{})}),(0,g.jsx)("span",{className:"errorLabel",children:"Error from IDP"})]}),(0,g.jsx)("div",{className:"simpleError",children:r}),(0,g.jsx)(a.azJ,{className:"errorDescription",children:i}),(0,g.jsx)(a.$nd,{id:"back-to-login",onClick:()=>{window.location.href=`${d.p}login`},type:"submit",variant:"callAction",fullWidth:!0,children:"Back to Login"})]}),promoHeader:(0,g.jsx)(o.Fragment,{children:"Multi-Cloud Object\xa0Store"}),promoInfo:(0,g.jsxs)(o.Fragment,{children:["MinIO's high-performance, Kubernetes-native object store is licensed under GNU AGPL v3 and is available on every cloud - public, private and edge. For more information on the terms of the license or to learn more about commercial licensing options visit the"," ",(0,g.jsx)("a",{href:"https://min.io/pricing",children:"pricing page"}),"."]}),backgroundAnimation:!1})}):null}}}]);
-//# sourceMappingURL=361.d332fe4a.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/361.d332fe4a.chunk.js.map b/web-app/build/static/js/361.d332fe4a.chunk.js.map
deleted file mode 100644
index 1b8ce09f67b..00000000000
--- a/web-app/build/static/js/361.d332fe4a.chunk.js.map
+++ /dev/null
@@ -1 +0,0 @@
-{"version":3,"file":"static/js/361.d332fe4a.chunk.js","mappings":"oOAyBA,MAAMA,EAAoBC,EAAAA,GAAOC,KAAIC,IAAA,IAAC,MAAEC,GAAOD,EAAA,MAAM,CACnD,sBAAuB,CACrBE,UAAW,SACXC,WAAY,sBACZC,QAAS,SACTC,UAAW,EACXC,SAAU,QAEZ,gBAAiB,CACfC,MAAOC,IAAIP,EAAO,YAAa,QAC/BQ,SAAU,GACVC,WAAY,OACZC,WAAY,GAEd,iBAAkB,CAChBN,UAAW,EACXD,QAAS,UACTK,SAAU,GACVF,MAAOC,IAAIP,EAAO,YAAa,SAEjC,iBAAkB,CAChBM,MAAOC,IAAIP,EAAO,sBAAuB,WACzCW,QAAS,OACT,QAAS,CACPC,MAAO,GACPC,OAAQ,KAGZ,gBAAiB,CACfF,QAAS,OACTG,WAAY,SACZC,aAAc,IAEjB,IA2FD,EAzFsBC,KACpB,MAAMC,GAAWC,EAAAA,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AA,QAAMU,UAAW,aAAaR,SAAC,uBAEjCF,EAAAA,EAAAA,KAAA,OAAKU,UAAW,cAAcR,SAAE5B,KAChC0B,EAAAA,EAAAA,KAACY,EAAAA,IAAG,CAACF,UAAW,mBAAmBR,SAAEzB,KACrCuB,EAAAA,EAAAA,KAACa,EAAAA,IAAM,CACLC,GAAI,gBACJC,QAASA,KACPhC,OAAOC,SAASgC,KAAO,GAAGC,EAAAA,QAAc,EAE1CC,KAAK,SACLC,QAAQ,aACRC,WAAS,EAAAlB,SACV,qBAKLmB,aAAarB,EAAAA,EAAAA,KAACC,EAAAA,SAAQ,CAAAC,SAAC,gCACvBoB,WACEb,EAAAA,EAAAA,MAACR,EAAAA,SAAQ,CAAAC,SAAA,CAAC,oQAIgD,KACxDF,EAAAA,EAAAA,KAAA,KAAGgB,KAAM,yBAAyBd,SAAC,iBAAgB,OAGvDqB,qBAAqB,MAGvB,IAAI,C","sources":["screens/LoginPage/LoginCallback.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { Box, Button, LoginWrapper, WarnIcon } from \"mds\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { useNavigate } from \"react-router-dom\";\nimport api from \"../../common/api\";\nimport { baseUrl } from \"../../history\";\nimport { getLogoVar } from \"../../config\";\n\nconst CallBackContainer = styled.div(({ theme }) => ({\n \"& .errorDescription\": {\n fontStyle: \"italic\",\n transition: \"all .2s ease-in-out\",\n padding: \"0 15px\",\n marginTop: 5,\n overflow: \"auto\",\n },\n \"& .errorLabel\": {\n color: get(theme, \"fontColor\", \"#000\"),\n fontSize: 18,\n fontWeight: \"bold\",\n marginLeft: 5,\n },\n \"& .simpleError\": {\n marginTop: 5,\n padding: \"2px 5px\",\n fontSize: 16,\n color: get(theme, \"fontColor\", \"#000\"),\n },\n \"& .messageIcon\": {\n color: get(theme, \"signalColors.danger\", \"#C72C48\"),\n display: \"flex\",\n \"& svg\": {\n width: 32,\n height: 32,\n },\n },\n \"& .errorTitle\": {\n display: \"flex\",\n alignItems: \"center\",\n borderBottom: 15,\n },\n}));\n\nconst LoginCallback = () => {\n const navigate = useNavigate();\n\n const [error, setError] = useState(\"\");\n const [errorDescription, setErrorDescription] = useState(\"\");\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (loading) {\n const queryString = window.location.search;\n const urlParams = new URLSearchParams(queryString);\n const code = urlParams.get(\"code\");\n const state = urlParams.get(\"state\");\n const error = urlParams.get(\"error\");\n const errorDescription = urlParams.get(\"errorDescription\");\n if (error || errorDescription) {\n setError(error || \"\");\n setErrorDescription(errorDescription || \"\");\n setLoading(false);\n } else {\n api\n .invoke(\"POST\", \"/api/v1/login/oauth2/auth\", { code, state })\n .then(() => {\n // We push to history the new URL.\n let targetPath = \"/\";\n if (\n localStorage.getItem(\"redirect-path\") &&\n localStorage.getItem(\"redirect-path\") !== \"\"\n ) {\n targetPath = `${localStorage.getItem(\"redirect-path\")}`;\n localStorage.setItem(\"redirect-path\", \"\");\n }\n if (state) {\n localStorage.setItem(\"auth-state\", state);\n }\n setLoading(false);\n navigate(targetPath);\n })\n .catch((error) => {\n setError(error.errorMessage);\n setErrorDescription(error.detailedError);\n setLoading(false);\n });\n }\n }\n }, [loading, navigate]);\n return error !== \"\" || errorDescription !== \"\" ? (\n \n \n
\n \n \n \n Error from IDP\n
\n
{error}
\n {errorDescription}\n \n \n }\n promoHeader={Multi-Cloud Object Store}\n promoInfo={\n \n MinIO's high-performance, Kubernetes-native object store is licensed\n under GNU AGPL v3 and is available on every cloud - public, private\n and edge. For more information on the terms of the license or to\n learn more about commercial licensing options visit the{\" \"}\n pricing page.\n \n }\n backgroundAnimation={false}\n />\n \n ) : null;\n};\n\nexport default LoginCallback;\n"],"names":["CallBackContainer","styled","div","_ref","theme","fontStyle","transition","padding","marginTop","overflow","color","get","fontSize","fontWeight","marginLeft","display","width","height","alignItems","borderBottom","LoginCallback","navigate","useNavigate","error","setError","useState","errorDescription","setErrorDescription","loading","setLoading","useEffect","queryString","window","location","search","urlParams","URLSearchParams","code","state","api","invoke","then","targetPath","localStorage","getItem","setItem","catch","errorMessage","detailedError","_jsx","Fragment","children","LoginWrapper","logoProps","applicationName","subVariant","getLogoVar","form","_jsxs","className","WarnIcon","Box","Button","id","onClick","href","baseUrl","type","variant","fullWidth","promoHeader","promoInfo","backgroundAnimation"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/367.acedd08e.chunk.js b/web-app/build/static/js/367.acedd08e.chunk.js
new file mode 100644
index 00000000000..e3280be65a8
--- /dev/null
+++ b/web-app/build/static/js/367.acedd08e.chunk.js
@@ -0,0 +1,2 @@
+"use strict";(globalThis.webpackChunkweb_app=globalThis.webpackChunkweb_app||[]).push([[367],{4681(e,n,t){t.d(n,{A:()=>l});t(5043);var s=t(9923),a=t(579);const l=e=>{let{placeholder:n="",onChange:t,overrideClass:l,value:i,id:o="search-resource",label:r="",sx:d}=e;return(0,a.jsx)(s.cl_,{placeholder:n,className:l||"",id:o,label:r,onChange:e=>{t(e.target.value)},value:i,startIcon:(0,a.jsx)(s.WIv,{}),sx:d})}},6746(e,n,t){t.d(n,{A:()=>o});var s=t(5043),a=t(9923),l=t(579);const i=e=>{const{event:n}=e,[t,i]=s.useState(!1);return(0,l.jsxs)(s.Fragment,{children:[(0,l.jsxs)(a.Hjg,{sx:{cursor:"pointer"},children:[(0,l.jsx)(a.TlP,{scope:"row",onClick:()=>i(!t),sx:{borderBottom:0},children:n.event_type}),(0,l.jsx)(a.nA6,{onClick:()=>i(!t),sx:{borderBottom:0},children:n.reason}),(0,l.jsx)(a.nA6,{onClick:()=>i(!t),sx:{borderBottom:0},children:n.seen}),(0,l.jsx)(a.nA6,{onClick:()=>i(!t),sx:{borderBottom:0},children:n.message.length>=30?`${n.message.slice(0,30)}...`:n.message}),(0,l.jsx)(a.nA6,{onClick:()=>i(!t),sx:{borderBottom:0},children:t?(0,l.jsx)(a.FUY,{}):(0,l.jsx)(a.QpL,{})})]}),(0,l.jsx)(a.Hjg,{children:(0,l.jsx)(a.nA6,{style:{paddingBottom:0,paddingTop:0},colSpan:5,children:t&&(0,l.jsx)(a.azJ,{useBackground:!0,sx:{padding:10,marginBottom:10},children:n.message})})})]})},o=e=>{let{events:n,loading:t}=e;return t?(0,l.jsx)(a.z21,{}):(0,l.jsx)(a.azJ,{withBorders:!0,customBorderPadding:"0px",children:(0,l.jsxs)(a.XIK,{"aria-label":"collapsible table",children:[(0,l.jsx)(a.ndF,{children:(0,l.jsxs)(a.Hjg,{children:[(0,l.jsx)(a.nA6,{children:"Type"}),(0,l.jsx)(a.nA6,{children:"Reason"}),(0,l.jsx)(a.nA6,{children:"Age"}),(0,l.jsx)(a.nA6,{children:"Message"}),(0,l.jsx)(a.nA6,{})]})}),(0,l.jsx)(a.BFY,{children:n.map(e=>(0,l.jsx)(i,{event:e},`${e.event_type}-${e.seen}`))})]})})}},5367(e,n,t){t.r(n),t.d(n,{default:()=>B});var s=t(5043),a=t(9923),l=t(3216),i=t(5475),o=t(9456),r=t(635),d=t(4574),c=t(3097),m=t.n(c),x=t(2961),j=t(4159),u=t(4681),h=t(649),p=t(579);const b=d.Ay.div(e=>{let{theme:n}=e;return{"&.highlighted":{"& span":{backgroundColor:m()(n,"signalColors.warning","#FFBD62")}},"& .ansidefault":{color:m()(n,"fontColor","#000"),lineHeight:"16px"}}}),g=e=>{let{tenant:n,namespace:t,podName:l,propLoading:i}=e;const d=(0,x.jL)(),c=(0,o.d4)(e=>e.tenants.loadingTenant),[m,g]=(0,s.useState)(""),[v,f]=(0,s.useState)([]),[C,y]=(0,s.useState)(!0),w=new r.jS({minWidth:5,fixedHeight:!1});(0,s.useEffect)(()=>{i&&y(!0)},[i]),(0,s.useEffect)(()=>{c&&y(!0)},[c]);const A=(e,n)=>{if(!e)return null;let t=(e=e.replace(/([^\x20-\x7F])/g,"")).replace(/((\[[0-9;]+m))/g,""),s=""!==m&&e.toLowerCase().includes(m.toLowerCase());return t.startsWith(" ")?(0,p.jsx)(b,{className:""+(s?"highlighted":""),children:(0,p.jsx)("span",{className:"tab",children:t})},n):(0,p.jsx)(b,{className:""+(s?"highlighted":""),children:(0,p.jsx)("span",{className:"ansidefault",children:t})},n)};function k(e){let{columnIndex:n,key:t,parent:s,index:a,style:l}=e;return(0,p.jsx)(r.dl,{cache:w,columnIndex:n,parent:s,rowIndex:a,children:(0,p.jsx)("div",{style:{...l},children:A(v[a],a)})},t)}return(0,s.useEffect)(()=>{C&&h.A.invoke("GET",`/api/v1/namespaces/${t}/tenants/${n}/pods/${l}`).then(e=>{f(e.split("\n")),y(!1)}).catch(e=>{d((0,j.C9)(e)),y(!1)})},[C,l,t,n,d]),(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(a.xA9,{item:!0,xs:12,sx:{display:"flex",justifyContent:"space-between",marginBottom:"1rem",alignItems:"center",gap:10,"& button":{flexGrow:0,marginLeft:8}},children:(0,p.jsx)(u.A,{value:m,placeholder:"Highlight Line",onChange:e=>{g(e)}})}),(0,p.jsx)(a.xA9,{item:!0,xs:12,children:(0,p.jsx)(a.azJ,{sx:{minHeight:400,height:"calc(100vh - 310px)",overflow:"hidden",fontSize:13,padding:"25px 45px 0"},useBackground:!0,withBorders:!0,children:v.length>=1&&(0,p.jsx)(r.t$,{children:e=>{let{width:n,height:t}=e;return(0,p.jsx)(r.B8,{rowHeight:e=>w.rowHeight(e),overscanRowCount:15,rowCount:v.length,rowRenderer:k,width:n,height:t})}})})})]})};var v=t(6483),f=t(6746);const C=e=>{let{tenant:n,namespace:t,podName:l,propLoading:i}=e;const r=(0,x.jL)(),d=(0,o.d4)(e=>e.tenants.loadingTenant),[c,m]=(0,s.useState)([]),[u,b]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{i&&b(!0)},[i]),(0,s.useEffect)(()=>{d&&b(!0)},[d]),(0,s.useEffect)(()=>{u&&h.A.invoke("GET",`/api/v1/namespaces/${t}/tenants/${n}/pods/${l}/events`).then(e=>{for(let n=0;n{r((0,j.C9)(e)),b(!1)})},[u,l,t,n,r]),(0,p.jsx)(s.Fragment,{children:(0,p.jsx)(a.xA9,{item:!0,xs:12,children:(0,p.jsx)(f.A,{events:c,loading:u})})})},y={display:"grid",gridTemplateColumns:"2fr 1fr",gridAutoFlow:"row",gap:2,padding:"15px",[`@media (max-width: ${a.nmC.sm}px)`]:{gridTemplateColumns:"1fr",gridAutoFlow:"dense"}},w=e=>{let{title:n}=e;return(0,p.jsx)(a._xt,{separator:!0,sx:{marginBottom:5},children:n})},A=e=>{let{describeInfo:n}=e;return(0,p.jsx)(s.Fragment,{children:(0,p.jsxs)("div",{id:"pod-describe-summary-content",children:[(0,p.jsx)(w,{title:"Summary"}),(0,p.jsxs)(a.azJ,{sx:{...y},children:[(0,p.jsx)(a.mZW,{label:"Name",value:n.name}),(0,p.jsx)(a.mZW,{label:"Namespace",value:n.namespace}),(0,p.jsx)(a.mZW,{label:"Node",value:n.nodeName}),(0,p.jsx)(a.mZW,{label:"Start time",value:n.startTime}),(0,p.jsx)(a.mZW,{label:"Status",value:n.phase}),(0,p.jsx)(a.mZW,{label:"QoS Class",value:n.qosClass}),(0,p.jsx)(a.mZW,{label:"IP",value:n.podIP})]})]})})},k=e=>{let{annotations:n}=e;return(0,p.jsx)(s.Fragment,{children:(0,p.jsxs)("div",{id:"pod-describe-annotations-content",children:[(0,p.jsx)(w,{title:"Annotations"}),(0,p.jsx)(a.azJ,{children:n.map((e,n)=>(0,p.jsx)(a.vwO,{id:`${e.key}-${e.value}`,sx:{margin:"0.5%"},label:`${e.key}: ${e.value}`},n))})]})})},$=e=>{let{labels:n}=e;return(0,p.jsx)(s.Fragment,{children:(0,p.jsxs)("div",{id:"pod-describe-labels-content",children:[(0,p.jsx)(w,{title:"Labels"}),(0,p.jsx)(a.azJ,{children:n.map((e,n)=>(0,p.jsx)(a.vwO,{id:`${e.key}-${e.value}`,sx:{margin:"0.5%"},label:`${e.key}: ${e.value}`},n))})]})})},S=e=>{let{conditions:n}=e;return(0,p.jsx)("div",{id:"pod-describe-conditions-content",children:(0,p.jsx)(L,{title:"Conditions",columns:["type","status"],columnsLabels:["Type","Status"],items:n})})},F=e=>{let{tolerations:n}=e;return(0,p.jsx)("div",{id:"pod-describe-tolerations-content",children:(0,p.jsx)(L,{title:"Tolerations",columns:["effect","key","operator","tolerationSeconds"],columnsLabels:["Effect","Key","Operator","Seconds of toleration"],items:n})})},T=e=>{let{volumes:n}=e;return(0,p.jsx)(s.Fragment,{children:(0,p.jsx)("div",{id:"pod-describe-volumes-content",children:n.map((e,n)=>(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(w,{title:`Volume ${e.name}`}),(0,p.jsxs)(a.azJ,{sx:{...y},children:[e.pvc&&(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(a.mZW,{label:"Type",value:"Persistant Volume Claim"}),(0,p.jsx)(a.mZW,{label:"Claim Name",value:e.pvc.claimName})]}),e.projected&&(0,p.jsx)(a.mZW,{label:"Type",value:"Projected"})]})]},n))})})},L=e=>{let{title:n,items:t,columns:l,columnsLabels:i}=e;return(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(w,{title:n}),(0,p.jsx)(a.azJ,{children:(0,p.jsxs)(a.XIK,{"aria-label":"collapsible table",children:[(0,p.jsx)(a.ndF,{children:(0,p.jsx)(a.Hjg,{children:i.map((e,n)=>(0,p.jsx)(a.nA6,{children:e},n))})}),(0,p.jsx)(a.BFY,{children:t.map((e,n)=>(0,p.jsx)(a.Hjg,{children:l.map((n,t)=>(0,p.jsx)(a.nA6,{children:e[n]},t))},n))})]})})]})},N=e=>{let{containers:n}=e;return(0,p.jsx)(s.Fragment,{children:(0,p.jsx)("div",{id:"pod-describe-containers-content",children:n.map((e,n)=>{var t,l;return(0,p.jsxs)(s.Fragment,{children:[(0,p.jsx)(w,{title:`Container ${e.name}`}),(0,p.jsxs)(a.azJ,{style:{wordBreak:"break-all"},sx:{...y},children:[(0,p.jsx)(a.mZW,{label:"Image",value:e.image}),(0,p.jsx)(a.mZW,{label:"Ready",value:`${e.ready}`}),(0,p.jsx)(a.mZW,{label:"Ports",value:e.ports.join(", ")}),(0,p.jsx)(a.mZW,{label:"Host Ports",value:e.hostPorts.join(", ")}),(0,p.jsx)(a.mZW,{label:"Arguments",value:e.args.join(", ")}),(0,p.jsx)(a.mZW,{label:"Started",value:null===(t=e.state)||void 0===t?void 0:t.started}),(0,p.jsx)(a.mZW,{label:"State",value:null===(l=e.state)||void 0===l?void 0:l.state})]}),(0,p.jsxs)(a.azJ,{style:{wordBreak:"break-all"},sx:{...y},children:[(0,p.jsx)(a.mZW,{label:"Image ID",value:e.imageID}),(0,p.jsx)(a.mZW,{label:"Container ID",value:e.containerID})]}),(0,p.jsx)(L,{title:"Mounts",columns:["name","mountPath"],columnsLabels:["Name","Mount Path"],items:e.mounts}),(0,p.jsx)(L,{title:"Environment Variables",columns:["key","value"],columnsLabels:["Key","Value"],items:e.environmentVariables})]},n)})})})},W=e=>{let{tenant:n,namespace:t,podName:l,propLoading:i}=e;const r=(0,x.jL)(),d=(0,o.d4)(e=>e.tenants.loadingTenant),[c,m]=(0,s.useState)(),[u,b]=(0,s.useState)(!0),[g,v]=(0,s.useState)("pod-describe-summary");(0,s.useEffect)(()=>{i&&b(!0)},[i]),(0,s.useEffect)(()=>{d&&b(!0)},[d]),(0,s.useEffect)(()=>{u&&h.A.invoke("GET",`/api/v1/namespaces/${t}/tenants/${n}/pods/${l}/describe`).then(e=>{const n=f(e);m(n),b(!1)}).catch(e=>{r((0,j.C9)(e)),b(!1)})},[u,l,t,n,r]);const f=e=>(e.containers=e.containers.map(e=>(e.environmentVariables=e.environmentVariables.filter(e=>null!==e),e)),e);return(0,p.jsx)(s.Fragment,{children:c&&(0,p.jsx)(a.xA9,{item:!0,xs:12,children:(0,p.jsx)(a.tUM,{currentTabOrPath:g,onTabClick:e=>{v(e)},horizontal:!0,options:[{tabConfig:{id:"pod-describe-summary",label:"Summary"},content:(0,p.jsx)(A,{describeInfo:c})},{tabConfig:{id:"pod-describe-annotations",label:"Annotations"},content:(0,p.jsx)(k,{annotations:c.annotations})},{tabConfig:{id:"pod-describe-labels",label:"Labels"},content:(0,p.jsx)($,{labels:c.labels})},{tabConfig:{id:"pod-describe-conditions",label:"Conditions"},content:(0,p.jsx)(S,{conditions:c.conditions})},{tabConfig:{id:"pod-describe-tolerations",label:"Tolerations"},content:(0,p.jsx)(F,{tolerations:c.tolerations})},{tabConfig:{id:"pod-describe-volumes",label:"Volumes"},content:(0,p.jsx)(T,{volumes:c.volumes})},{tabConfig:{id:"pod-describe-containers",label:"Containers"},content:(0,p.jsx)(N,{containers:c.containers})}]})})})},B=()=>{const{tenantNamespace:e,tenantName:n,podName:t}=(0,l.g)(),[o,r]=(0,s.useState)("simple-tab-0"),[d,c]=(0,s.useState)(!0);return(0,s.useEffect)(()=>{d&&c(!1)},[d]),(0,p.jsxs)(s.Fragment,{children:[(0,p.jsxs)(a._xt,{separator:!0,sx:{marginBottom:15},children:[(0,p.jsx)(i.N_,{to:`/namespaces/${e||""}/tenants/${n||""}/pods`,children:"Pods"})," ","> ",t]}),(0,p.jsx)(a.tUM,{options:[{tabConfig:{id:"simple-tab-0",label:"Events"},content:(0,p.jsx)(C,{tenant:n||"",namespace:e||"",podName:t||"",propLoading:d})},{tabConfig:{id:"simple-tab-1",label:"Describe"},content:(0,p.jsx)(W,{tenant:n||"",namespace:e||"",podName:t||"",propLoading:d})},{tabConfig:{id:"simple-tab-2",label:"Logs"},content:(0,p.jsx)(g,{tenant:n||"",namespace:e||"",podName:t||"",propLoading:d})}],currentTabOrPath:o,onTabClick:e=>{r(e)},horizontal:!0})]})}}}]);
+//# sourceMappingURL=367.acedd08e.chunk.js.map
\ No newline at end of file
diff --git a/web-app/build/static/js/367.acedd08e.chunk.js.map b/web-app/build/static/js/367.acedd08e.chunk.js.map
new file mode 100644
index 00000000000..83977b9adcc
--- /dev/null
+++ b/web-app/build/static/js/367.acedd08e.chunk.js.map
@@ -0,0 +1 @@
+{"version":3,"file":"static/js/367.acedd08e.chunk.js","mappings":"0JA8BA,MAyBA,EAzBkBA,IAQK,IARJ,YACjBC,EAAc,GAAE,SAChBC,EAAQ,cACRC,EAAa,MACbC,EAAK,GACLC,EAAK,kBAAiB,MACtBC,EAAQ,GAAE,GACVC,GACeP,EACf,OACEQ,EAAAA,EAAAA,KAACC,EAAAA,IAAQ,CACPR,YAAaA,EACbS,UAAWP,GAAgC,GAC3CE,GAAIA,EACJC,MAAOA,EACPJ,SAAWS,IACTT,EAASS,EAAEC,OAAOR,QAEpBA,MAAOA,EACPS,WAAWL,EAAAA,EAAAA,KAACM,EAAAA,IAAU,IACtBP,GAAIA,I,gECdV,MAAMQ,EAASC,IACb,MAAM,MAAEC,GAAUD,GACXE,EAAMC,GAAWC,EAAAA,UAAe,GAEvC,OACEC,EAAAA,EAAAA,MAACD,EAAAA,SAAc,CAAAE,SAAA,EACbD,EAAAA,EAAAA,MAACE,EAAAA,IAAQ,CAAChB,GAAI,CAAEiB,OAAQ,WAAYF,SAAA,EAClCd,EAAAA,EAAAA,KAACiB,EAAAA,IAAa,CACZC,MAAM,MACNC,QAASA,IAAMR,GAASD,GACxBX,GAAI,CAAEqB,aAAc,GAAIN,SAEvBL,EAAMY,cAETrB,EAAAA,EAAAA,KAACsB,EAAAA,IAAS,CAACH,QAASA,IAAMR,GAASD,GAAOX,GAAI,CAAEqB,aAAc,GAAIN,SAC/DL,EAAMc,UAETvB,EAAAA,EAAAA,KA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AI,KACN4C,MAER1D,EAAAA,EAAAA,KAAC4M,EAAAA,IAAI,CACHK,QAAS,CACP,CACEC,UAAW,CAAErN,GAAI,eAAgBC,MAAO,UACxCqN,SACEnN,EAAAA,EAAAA,KAAC0N,EAAS,CACRlK,OAAQ8J,GAAc,GACtB7J,UAAW4J,GAAmB,GAC9B3J,QAASA,GAAW,GACpBC,YAAapB,KAInB,CACE2K,UAAW,CAAErN,GAAI,eAAgBC,MAAO,YACxCqN,SACEnN,EAAAA,EAAAA,KAAC2N,EAAW,CACVnK,OAAQ8J,GAAc,GACtB7J,UAAW4J,GAAmB,GAC9B3J,QAASA,GAAW,GACpBC,YAAapB,KAInB,CACE2K,UAAW,CAAErN,GAAI,eAAgBC,MAAO,QACxCqN,SACEnN,EAAAA,EAAAA,KAAC4N,EAAO,CACNpK,OAAQ8J,GAAc,GACtB7J,UAAW4J,GAAmB,GAC9B3J,QAASA,GAAW,GACpBC,YAAapB,MAKrBsK,iBAAkBP,EAClBQ,WAAae,IACXtB,EAAUsB,IAEZb,YAAU,O","sources":["screens/Console/Common/SearchBox.tsx","screens/Console/Tenants/TenantDetails/events/EventsList.tsx","screens/Console/Tenants/TenantDetails/pods/PodLogs.tsx","screens/Console/Tenants/TenantDetails/pods/PodEvents.tsx","screens/Console/Tenants/TenantDetails/pods/PodDescribe.tsx","screens/Console/Tenants/TenantDetails/pods/PodDetails.tsx"],"sourcesContent":["// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport { InputBox, SearchIcon } from \"mds\";\nimport { CSSObject } from \"styled-components\";\n\ntype SearchBoxProps = {\n placeholder?: string;\n value: string;\n onChange: (value: string) => void;\n overrideClass?: any;\n id?: string;\n label?: string;\n sx?: CSSObject;\n};\n\nconst SearchBox = ({\n placeholder = \"\",\n onChange,\n overrideClass,\n value,\n id = \"search-resource\",\n label = \"\",\n sx,\n}: SearchBoxProps) => {\n return (\n {\n onChange(e.target.value);\n }}\n value={value}\n startIcon={}\n sx={sx}\n />\n );\n};\n\nexport default SearchBox;\n","// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React from \"react\";\nimport {\n ProgressBar,\n Table,\n TableBody,\n TableHeadCell,\n TableCell,\n TableHead,\n TableRow,\n Box,\n ExpandCaret,\n CollapseCaret,\n} from \"mds\";\nimport { IEvent } from \"../../ListTenants/types\";\n\ninterface IEventsListProps {\n events: IEvent[];\n loading: boolean;\n}\n\nconst Event = (props: { event: IEvent }) => {\n const { event } = props;\n const [open, setOpen] = React.useState(false);\n\n return (\n \n \n setOpen(!open)}\n sx={{ borderBottom: 0 }}\n >\n {event.event_type}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.reason}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.seen}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {event.message.length >= 30\n ? `${event.message.slice(0, 30)}...`\n : event.message}\n \n setOpen(!open)} sx={{ borderBottom: 0 }}>\n {open ? : }\n \n \n \n \n {open && (\n \n {event.message}\n \n )}\n \n \n \n );\n};\n\nconst EventsList = ({ events, loading }: IEventsListProps) => {\n if (loading) {\n return ;\n }\n return (\n \n
\n \n );\n};\n\nexport default EventsList;\n","// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { Box, Grid } from \"mds\";\nimport { useSelector } from \"react-redux\";\nimport {\n AutoSizer,\n CellMeasurer,\n CellMeasurerCache,\n List,\n} from \"react-virtualized\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport { AppState, useAppDispatch } from \"../../../../../store\";\nimport { setErrorSnackMessage } from \"../../../../../systemSlice\";\nimport SearchBox from \"../../../Common/SearchBox\";\nimport api from \"../../../../../common/api\";\n\ninterface IPodLogsProps {\n tenant: string;\n namespace: string;\n podName: string;\n propLoading: boolean;\n}\n\nconst LogsItem = styled.div(({ theme }) => ({\n \"&.highlighted\": {\n \"& span\": {\n backgroundColor: get(theme, \"signalColors.warning\", \"#FFBD62\"),\n },\n },\n \"& .ansidefault\": {\n color: get(theme, \"fontColor\", \"#000\"),\n lineHeight: \"16px\",\n },\n}));\n\nconst PodLogs = ({\n tenant,\n namespace,\n podName,\n propLoading,\n}: IPodLogsProps) => {\n const dispatch = useAppDispatch();\n const loadingTenant = useSelector(\n (state: AppState) => state.tenants.loadingTenant,\n );\n const [highlight, setHighlight] = useState(\"\");\n const [logLines, setLogLines] = useState([]);\n const [loading, setLoading] = useState(true);\n\n const cache = new CellMeasurerCache({\n minWidth: 5,\n fixedHeight: false,\n });\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loadingTenant) {\n setLoading(true);\n }\n }, [loadingTenant]);\n\n const renderLog = (logMessage: string, index: number) => {\n if (!logMessage) {\n return null;\n }\n // remove any non ascii characters, exclude any control codes\n logMessage = logMessage.replace(/([^\\x20-\\x7F])/g, \"\");\n\n // regex for terminal colors like e.g. `[31;4m `\n const tColorRegex = /((\\[[0-9;]+m))/g;\n\n // get substring if there was a match for to split what\n // is going to be colored and what not, here we add color\n // only to the first match.\n let substr = logMessage.replace(tColorRegex, \"\");\n\n // in case highlight is set, we select the line that contains the requested string\n let highlightedLine =\n highlight !== \"\"\n ? logMessage.toLowerCase().includes(highlight.toLowerCase())\n : false;\n\n // if starts with multiple spaces add padding\n if (substr.startsWith(\" \")) {\n return (\n \n {substr}\n \n );\n } else {\n // for all remaining set default class\n return (\n \n {substr}\n \n );\n }\n };\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/tenants/${tenant}/pods/${podName}`,\n )\n .then((res: string) => {\n setLogLines(res.split(\"\\n\"));\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n }\n }, [loading, podName, namespace, tenant, dispatch]);\n\n function cellRenderer({ columnIndex, key, parent, index, style }: any) {\n return (\n // @ts-ignore\n \n
\n {renderLog(logLines[index], index)}\n
\n \n );\n }\n\n return (\n \n \n {\n setHighlight(value);\n }}\n />\n \n \n \n {logLines.length >= 1 && (\n // @ts-ignore\n \n {({ width, height }) => (\n // @ts-ignore\n cache.rowHeight(item)}\n overscanRowCount={15}\n rowCount={logLines.length}\n rowRenderer={cellRenderer}\n width={width}\n height={height}\n />\n )}\n \n )}\n \n \n \n );\n};\n\nexport default PodLogs;\n","// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { useEffect, useState } from \"react\";\nimport { Grid } from \"mds\";\nimport { useSelector } from \"react-redux\";\nimport { IEvent } from \"../../ListTenants/types\";\nimport { niceDays } from \"../../../../../common/utils\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport { AppState, useAppDispatch } from \"../../../../../store\";\nimport { setErrorSnackMessage } from \"../../../../../systemSlice\";\nimport api from \"../../../../../common/api\";\nimport EventsList from \"../events/EventsList\";\n\ninterface IPodEventsProps {\n tenant: string;\n namespace: string;\n podName: string;\n propLoading: boolean;\n}\n\nconst PodEvents = ({\n tenant,\n namespace,\n podName,\n propLoading,\n}: IPodEventsProps) => {\n const dispatch = useAppDispatch();\n const loadingTenant = useSelector(\n (state: AppState) => state.tenants.loadingTenant,\n );\n const [events, setEvents] = useState([]);\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loadingTenant) {\n setLoading(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/tenants/${tenant}/pods/${podName}/events`,\n )\n .then((res: IEvent[]) => {\n for (let i = 0; i < res.length; i++) {\n let currentTime = (Date.now() / 1000) | 0;\n\n res[i].seen = niceDays((currentTime - res[i].last_seen).toString());\n }\n setEvents(res);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n }\n }, [loading, podName, namespace, tenant, dispatch]);\n\n return (\n \n \n \n \n \n );\n};\n\nexport default PodEvents;\n","// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport {\n Box,\n breakPoints,\n Grid,\n SectionTitle,\n Table,\n TableBody,\n TableCell,\n TableHead,\n TableRow,\n Tabs,\n Tag,\n ValuePair,\n} from \"mds\";\nimport { ErrorResponseHandler } from \"../../../../../common/types\";\nimport api from \"../../../../../common/api\";\nimport { useSelector } from \"react-redux\";\nimport { AppState, useAppDispatch } from \"../../../../../store\";\nimport { setErrorSnackMessage } from \"../../../../../systemSlice\";\n\ninterface IPodEventsProps {\n tenant: string;\n namespace: string;\n podName: string;\n propLoading: boolean;\n}\n\ninterface Annotation {\n key: string;\n value: string;\n}\n\ninterface Condition {\n status: string;\n type: string;\n}\n\ninterface EnvVar {\n key: string;\n value: string;\n}\n\ninterface Mount {\n mountPath: string;\n name: string;\n}\n\ninterface State {\n started: string;\n state: string;\n}\n\ninterface Container {\n args: string[];\n containerID: string;\n environmentVariables: EnvVar[];\n hostPorts: string[];\n image: string;\n imageID: string;\n lastState: any;\n mounts: Mount[];\n name: string;\n ports: string[];\n ready: boolean;\n state: State;\n}\n\ninterface Label {\n key: string;\n value: string;\n}\n\ninterface Toleration {\n effect: string;\n key: string;\n operator: string;\n tolerationSeconds: number;\n}\n\ninterface VolumePVC {\n claimName: string;\n}\n\ninterface Volume {\n name: string;\n pvc?: VolumePVC;\n projected?: any;\n}\n\ninterface DescribeResponse {\n annotations: Annotation[];\n conditions: Condition[];\n containers: Container[];\n controllerRef: string;\n labels: Label[];\n name: string;\n namespace: string;\n nodeName: string;\n nodeSelector: string[];\n phase: string;\n podIP: string;\n qosClass: string;\n startTime: string;\n tolerations: Toleration[];\n volumes: Volume[];\n}\n\ninterface IPodDescribeSummaryProps {\n describeInfo: DescribeResponse;\n}\n\ninterface IPodDescribeAnnotationsProps {\n annotations: Annotation[];\n}\n\ninterface IPodDescribeLabelsProps {\n labels: Label[];\n}\n\ninterface IPodDescribeConditionsProps {\n conditions: Condition[];\n}\n\ninterface IPodDescribeTolerationsProps {\n tolerations: Toleration[];\n}\n\ninterface IPodDescribeVolumesProps {\n volumes: Volume[];\n}\n\ninterface IPodDescribeContainersProps {\n containers: Container[];\n}\n\ninterface IPodDescribeTableProps {\n title: string;\n columns: string[];\n columnsLabels: string[];\n items: any[];\n}\n\nconst twoColCssGridLayoutConfig = {\n display: \"grid\",\n gridTemplateColumns: \"2fr 1fr\",\n gridAutoFlow: \"row\",\n gap: 2,\n padding: \"15px\",\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n gridTemplateColumns: \"1fr\",\n gridAutoFlow: \"dense\",\n },\n};\n\nconst HeaderSection = ({ title }: { title: string }) => {\n return (\n \n {title}\n \n );\n};\n\nconst PodDescribeSummary = ({ describeInfo }: IPodDescribeSummaryProps) => {\n return (\n \n
\n \n );\n};\n\nconst PodDescribe = ({\n tenant,\n namespace,\n podName,\n propLoading,\n}: IPodEventsProps) => {\n const dispatch = useAppDispatch();\n const loadingTenant = useSelector(\n (state: AppState) => state.tenants.loadingTenant,\n );\n\n const [describeInfo, setDescribeInfo] = useState();\n const [loading, setLoading] = useState(true);\n const [curTab, setCurTab] = useState(\"pod-describe-summary\");\n\n useEffect(() => {\n if (propLoading) {\n setLoading(true);\n }\n }, [propLoading]);\n\n useEffect(() => {\n if (loadingTenant) {\n setLoading(true);\n }\n }, [loadingTenant]);\n\n useEffect(() => {\n if (loading) {\n api\n .invoke(\n \"GET\",\n `/api/v1/namespaces/${namespace}/tenants/${tenant}/pods/${podName}/describe`,\n )\n .then((res: DescribeResponse) => {\n const cleanRes = cleanDescribeResponseEnvVariables(res);\n setDescribeInfo(cleanRes);\n setLoading(false);\n })\n .catch((err: ErrorResponseHandler) => {\n dispatch(setErrorSnackMessage(err));\n setLoading(false);\n });\n }\n }, [loading, podName, namespace, tenant, dispatch]);\n\n const cleanDescribeResponseEnvVariables = (\n res: DescribeResponse,\n ): DescribeResponse => {\n res.containers = res.containers.map((c) => {\n c.environmentVariables = c.environmentVariables.filter(\n (item) => item !== null,\n );\n return c;\n });\n return res;\n };\n\n return (\n \n {describeInfo && (\n \n {\n setCurTab(newValue);\n }}\n horizontal\n options={[\n {\n tabConfig: { id: \"pod-describe-summary\", label: \"Summary\" },\n content: ,\n },\n {\n tabConfig: {\n id: \"pod-describe-annotations\",\n label: \"Annotations\",\n },\n content: (\n \n ),\n },\n {\n tabConfig: { id: \"pod-describe-labels\", label: \"Labels\" },\n content: ,\n },\n {\n tabConfig: {\n id: \"pod-describe-conditions\",\n label: \"Conditions\",\n },\n content: (\n \n ),\n },\n {\n tabConfig: {\n id: \"pod-describe-tolerations\",\n label: \"Tolerations\",\n },\n content: (\n \n ),\n },\n {\n tabConfig: { id: \"pod-describe-volumes\", label: \"Volumes\" },\n content: ,\n },\n {\n tabConfig: {\n id: \"pod-describe-containers\",\n label: \"Containers\",\n },\n content: (\n \n ),\n },\n ]}\n />\n \n )}\n \n );\n};\n\nexport default PodDescribe;\n","// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport { SectionTitle, Tabs } from \"mds\";\nimport { Link, useParams } from \"react-router-dom\";\n\nimport PodLogs from \"./PodLogs\";\nimport PodEvents from \"./PodEvents\";\nimport PodDescribe from \"./PodDescribe\";\n\nconst PodDetails = () => {\n const { tenantNamespace, tenantName, podName } = useParams();\n\n const [curTab, setCurTab] = useState(\"simple-tab-0\");\n const [loading, setLoading] = useState(true);\n\n useEffect(() => {\n if (loading) {\n setLoading(false);\n }\n }, [loading]);\n\n return (\n \n \n \n Pods\n {\" \"}\n > {podName}\n \n \n ),\n },\n {\n tabConfig: { id: \"simple-tab-1\", label: \"Describe\" },\n content: (\n \n ),\n },\n {\n tabConfig: { id: \"simple-tab-2\", label: \"Logs\" },\n content: (\n \n ),\n },\n ]}\n currentTabOrPath={curTab}\n onTabClick={(tab) => {\n setCurTab(tab);\n }}\n horizontal\n />\n \n );\n};\n\nexport default PodDetails;\n"],"names":["_ref","placeholder","onChange","overrideClass","value","id","label","sx","_jsx","InputBox","className","e","target","startIcon","SearchIcon","Event","props","event","open","setOpen","React","_jsxs","children","TableRow","cursor","TableHeadCell","scope","onClick","borderBottom","event_type","TableCell","reason","seen","message","length","slice","CollapseCaret","ExpandCaret","style","paddingBottom","paddingTop","colSpan","Box","useBackground","padding","marginBottom","events","loading","ProgressBar","withBorders","customBorderPadding","Table","TableHead","TableBody","map","LogsItem","styled","div","theme","backgroundColor","get","color","lineHeight","_ref2","tenant","namespace","podName","propLoading","dispatch","useAppDispatch","loadingTenant","useSelector","state","tenants","highlight","setHighlight","useState","logLines","setLogLines","setLoading","cache","CellMeasurerCache","minWidth","fixedHeight","useEffect","renderLog","logMessage","index","substr","replace","highlightedLine","toLowerCase","includes","startsWith","cellRenderer","_ref3","columnIndex","key","parent","CellMeasurer","rowIndex","api","invoke","then","res","split","catch","err","setErrorSnackMessage","Fragment","Grid","item","xs","display","justifyContent","alignItems","gap","flexGrow","marginLeft","SearchBox","minHeight","height","overflow","fontSize","AutoSizer","_ref4","width","List","rowHeight","overscanRowCount","rowCount","rowRenderer","setEvents","i","currentTime","Date","now","niceDays","last_seen","toString","EventsList","twoColCssGridLayoutConfig","gridTemplateColumns","gridAutoFlow","breakPoints","sm","HeaderSection","title","SectionTitle","separator","PodDescribeSummary","describeInfo","ValuePair","name","nodeName","startTime","phase","qosClass","podIP","PodDescribeAnnotations","annotations","annotation","Tag","margin","PodDescribeLabels","labels","PodDescribeConditions","_ref5","conditions","PodDescribeTable","columns","columnsLabels","items","PodDescribeTolerations","_ref6","tolerations","PodDescribeVolumes","_ref7","volumes","volume","pvc","claimName","projected","_ref8","column","j","PodDescribeContainers","_ref9","containers","container","_container$state","_container$state2","wordBreak","image","ready","ports","join","hostPorts","args","started","imageID","containerID","mounts","environmentVariables","_ref0","setDescribeInfo","curTab","setCurTab","cleanRes","cleanDescribeResponseEnvVariables","c","filter","Tabs","currentTabOrPath","onTabClick","newValue","horizontal","options","tabConfig","content","PodDetails","tenantNamespace","tenantName","useParams","Link","to","PodEvents","PodDescribe","PodLogs","tab"],"sourceRoot":""}
\ No newline at end of file
diff --git a/web-app/build/static/js/381.3c8ff930.chunk.js b/web-app/build/static/js/381.3c8ff930.chunk.js
deleted file mode 100644
index 285ad212c25..00000000000
--- a/web-app/build/static/js/381.3c8ff930.chunk.js
+++ /dev/null
@@ -1,2 +0,0 @@
-"use strict";(self.webpackChunkweb_app=self.webpackChunkweb_app||[]).push([[381],{2237:(e,t,i)=>{i.d(t,{A:()=>a});var n=i(5043),s=i(579);const a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(i){return(0,s.jsx)(n.Suspense,{fallback:t,children:(0,s.jsx)(e,{...i})})}}},4141:(e,t,i)=>{i.d(t,{A:()=>d});var n=i(5043),s=i(9456),a=i(9923),l=i(2961),r=i(4159),o=i(9555),c=i(579);const d=e=>{let{onClose:t,modalOpen:i,title:d,children:x,wideLimit:p=!0,titleIcon:m=null,iconColor:h="default",sx:f}=e;const u=(0,l.jL)(),[b,g]=(0,n.useState)(!1),y=(0,s.d4)((e=>e.system.modalSnackBar));(0,n.useEffect)((()=>{u((0,r.h0)(""))}),[u]),(0,n.useEffect)((()=>{if(y){if(""===y.message)return void g(!1);"error"!==y.type&&g(!0)}}),[y]);let j="";return y&&(j=y.detailedErrorMsg,(""===y.detailedErrorMsg||y.detailedErrorMsg.length<5)&&(j=y.message)),(0,c.jsxs)(a.ngX,{onClose:t,open:i,title:d,titleIcon:m,widthLimit:p,sx:f,iconColor:h,children:[(0,c.jsx)(o.A,{isModal:!0}),(0,c.jsx)(a.qb_,{onClose:()=>{g(!1),u((0,r.h0)(""))},open:b,message:j,mode:"inline",variant:"error"===y.type?"error":"default",autoHideDuration:"error"===y.type?10:5,condensed:!0}),x]})}},7381:(e,t,i)=>{i.r(t),i.d(t,{default:()=>C});var n=i(5043),s=i(9923),a=i(3216),l=i(9161),r=i(3047),o=i(8387),c=i(4574),d=i(3097),x=i.n(d),p=i(579);const m=c.Ay.div((e=>{let{theme:t}=e;return{display:"grid",margin:"0 1.5rem 0 1.5rem",gridTemplateColumns:"1fr 1fr 1fr 1fr",[`@media (max-width: ${s.nmC.sm}px)`]:{gridTemplateColumns:"1fr 1fr 1fr"},"&.paid-plans-only":{display:"grid",gridTemplateColumns:"1fr 1fr 1fr"},"& .features-col":{flex:1,minWidth:"260px","@media (max-width: 600px)":{display:"none"}},"& .xs-only":{display:"none"},"& .button-box":{display:"flex",alignItems:"center",justifyContent:"center",padding:"5px 0px 25px 0px",borderLeft:`1px solid ${x()(t,"borderColor","#EAEAEA")}`},"& .plan-header":{height:"99px",borderBottom:`1px solid ${x()(t,"borderColor","#EAEAEA")}`},"& .feature-title":{height:"25px",paddingLeft:"26px",fontSize:"14px",background:x()(t,"signalColors.disabled","#E5E5E5"),color:x()(t,"signalColors.main","#07193E"),"@media (max-width: 600px)":{"& .feature-title-info .xs-only":{display:"block"}}},"& .feature-name":{minHeight:"60px",padding:"5px",borderBottom:`1px solid ${x()(t,"borderColor","#EAEAEA")}`,display:"flex",alignItems:"center",paddingLeft:"26px",fontSize:"14px"},"& .feature-item":{display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"center",minHeight:"60px",padding:"0 15px 0 15px",borderBottom:`1px solid ${x()(t,"borderColor","#EAEAEA")}`,borderLeft:`1px solid ${x()(t,"borderColor","#EAEAEA")}`,fontSize:"14px","& .link-text":{color:"#2781B0",cursor:"pointer",textDecoration:"underline"},"&.icon-yes":{width:"15px",height:"15px"}},"& .feature-item-info":{flex:1,display:"flex",flexFlow:"column",alignItems:"center",justifyContent:"space-around",textAlign:"center","@media (max-width: 600px)":{justifyContent:"space-evenly",width:"100%","& .xs-only":{display:"block"},"& .plan-feature":{textAlign:"center",paddingRight:"10px"}}},"& .plan-col":{minWidth:"260px",flex:1},"& .active-plan-col":{background:`${x()(t,"boxBackground","#FDFDFD")} 0% 0% no-repeat padding-box`,boxShadow:" 0px 3px 20px #00000038","& .plan-header":{backgroundColor:x()(t,"signalColors.info","#2781B0")},"& .feature-title":{background:x()(t,"signalColors.disabled","#E5E5E5"),color:x()(t,"fontColor","#000")}}}})),h=c.Ay.div((e=>{let{theme:t}=e;return{display:"flex",alignItems:"flex-start",justifyContent:"center",flexFlow:"column",borderLeft:`1px solid ${x()(t,"borderColor","#EAEAEA")}`,borderBottom:"0px !important","& .plan-header":{display:"flex",alignItems:"center",justifyContent:"center",flexFlow:"column"},"& .title-block":{display:"flex",alignItems:"center",flexFlow:"column",width:"100%","& .title-main":{display:"flex",alignItems:"center",justifyContent:"center",flex:1},"& .iconContainer":{"& .min-icon":{minWidth:140,width:"100%",maxHeight:55,height:"100%"}}},"& .open-source":{fontSize:"14px",display:"flex",marginBottom:"5px",alignItems:"center","& .min-icon":{marginRight:"8px",height:"12px",width:"12px"}},"& .cur-plan-text":{fontSize:"12px",textTransform:"uppercase"},"@media (max-width: 600px)":{cursor:"pointer","& .title-block":{"& .title":{fontSize:"14px",fontWeight:600}}},"&.active, &.active.xs-active":{color:"#ffffff",position:"relative","& .min-icon":{fill:"#ffffff"},"&:before":{content:"' '",position:"absolute",width:"100%",height:"18px",backgroundColor:x()(t,"signalColors.info","#2781B0"),display:"block",top:-16},"& .iconContainer":{"& .min-icon":{marginTop:"-12px"}}},"&.active":{backgroundColor:x()(t,"signalColors.info","#2781B0"),color:"#ffffff"},"&.xs-active":{background:"#eaeaea"}}})),f=c.Ay.div((e=>{let{theme:t}=e;return{border:`1px solid ${x()(t,"borderColor","#EAEAEA")}`,borderTop:"0px",marginBottom:"45px","&::-webkit-scrollbar":{width:"5px",height:"5px"},"&::-webkit-scrollbar-track":{background:"#F0F0F0",borderRadius:0,boxShadow:"inset 0px 0px 0px 0px #F0F0F0"},"&::-webkit-scrollbar-thumb":{background:"#777474",borderRadius:0},"&::-webkit-scrollbar-thumb:hover":{background:"#5A6375"}}})),u=e=>{let{isActive:t,isXsViewActive:i,title:n,onClick:s,children:a}=e;const l=n.toLowerCase();return(0,p.jsx)(h,{className:(0,o.A)({"plan-header":!0,active:t,"xs-active":i}),onClick:()=>{s&&s(l)},children:a})},b=e=>(0,p.jsx)(s.azJ,{className:"feature-title",children:(0,p.jsx)(s.azJ,{className:"feature-title-info",children:(0,p.jsxs)("div",{className:"xs-only",children:[e.featureLabel," "]})})}),g=e=>(0,p.jsx)(s.azJ,{className:"feature-item",style:e.style,children:(0,p.jsxs)(s.azJ,{className:"feature-item-info",children:[(0,p.jsx)("div",{className:"xs-only",children:(0,r.CA)(e.featureLabel||"")}),(0,p.jsxs)(s.azJ,{className:"plan-feature",children:[(0,p.jsx)("div",{children:(0,r.CA)(e.label||"")}),(0,r.CA)(e.detail),(0,p.jsxs)("div",{className:"xs-only",children:[e.xsLabel," "]})]})]})}),y=e=>{var t;let{licenseInfo:i}=e;const[a,l]=(0,n.useState)(window.innerWidth>=s.nmC.sm);(0,n.useEffect)((()=>{const e=()=>{let e=!1;window.innerWidth>=s.nmC.sm&&(e=!0),l(e)};return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[]);let o=i?null===i||void 0===i||null===(t=i.plan)||void 0===t?void 0:t.toLowerCase():"community";const c=o===r.Bx.COMMUNITY,d=o===r.Bx.STANDARD,x=o===r.Bx.ENTERPRISE,h=r.M7.includes(o),[y,j]=(0,n.useState)("");let A=y===r.Bx.COMMUNITY,v=y===r.Bx.STANDARD,w=y===r.Bx.ENTERPRISE;const N=(e,t,i,n)=>{let a="community"!==o?"https://subnet.min.io":e;return(0,p.jsx)(s.$nd,{id:`license-action-${e}`,variant:i,style:{marginTop:"12px",width:"80%"},disabled:o!==r.Bx.COMMUNITY&&o!==n,onClick:e=>{e.preventDefault(),window.open(`${a}?ref=op`,"_blank")},label:t})},C=e=>{j(e)};(0,n.useEffect)((()=>{j(a?o||"community":"")}),[a,o]);const k=r.c_;return(0,p.jsx)(n.Fragment,{children:(0,p.jsxs)(f,{children:[(0,p.jsx)(s.azJ,{className:"title-blue-bar",sx:{height:"8px",borderBottom:"8px solid rgb(6 48 83)"}}),(0,p.jsxs)(m,{className:h?"paid-plans-only":"",children:[(0,p.jsx)(s.azJ,{className:"features-col",children:k.map((e=>{const t=e.featureTitleRow;return e.isHeader?h?(0,p.jsxs)(s.azJ,{className:"plan-header",sx:{fontSize:"14px",paddingLeft:"26px",display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"0px !important","& .link-text":{color:"#2781B0",cursor:"pointer",textDecoration:"underline"},"& .min-icon":{marginRight:"10px",color:"#2781B0",fill:"#2781B0"}},children:[(0,p.jsx)(s.xLb,{}),(0,p.jsxs)("a",{href:`https://subnet.min.io/terms-and-conditions/${o}`,rel:"noopener",className:"link-text",children:["View License agreement ",(0,p.jsx)("br",{}),"for the registered plan."]})]},`plan-header-${e.desc}`):(0,p.jsx)(s.azJ,{className:"plan-header",sx:{fontSize:"14px",paddingLeft:"26px",display:"flex",alignItems:"center",justifyContent:"flex-start",borderBottom:"0px !important"},children:e.label},`plan-header-label-${e.desc}`):t?(0,p.jsx)(s.azJ,{className:"feature-title",sx:{fontSize:"14px",fontWeight:600,textTransform:"uppercase"},children:(0,p.jsxs)("div",{children:[(0,r.CA)(e.desc)," "]})},`plan-descript-${e.desc}`):(0,p.jsx)(s.azJ,{className:"feature-name",style:e.style,children:(0,p.jsxs)("div",{children:[(0,r.CA)(e.desc)," "]})},`plan-feature-name-${e.desc}`)}))}),h?null:(0,p.jsxs)(s.azJ,{className:"plan-col "+(c?"active-plan-col":"non-active-plan-col"),children:[r._T.map(((e,t)=>{const i=k[t].desc,{featureTitleRow:n,isHeader:l}=e;return l?(0,p.jsx)(u,{isActive:c,isXsViewActive:A,title:"community",onClick:a?C:null,children:(0,p.jsx)(s.azJ,{className:"title-block",children:(0,p.jsx)(s.azJ,{className:"title-main",children:(0,p.jsx)("div",{className:"iconContainer",children:(0,p.jsx)(s.ROG,{style:{width:117}})})})})},"community-header"):n?(0,p.jsx)(b,{featureLabel:i},`title-row-${e.id}`):(0,p.jsx)(g,{featureLabel:i,label:e.label,detail:e.detail,xsLabel:e.xsLabel,style:e.style},`pricing-feature-${e.id}`)})),(0,p.jsx)(s.azJ,{className:"button-box",children:N("https://slack.min.io","Join Slack","regular",r.Bx.COMMUNITY)})]}),(0,p.jsxs)(s.azJ,{className:"plan-col "+(d?"active-plan-col":"non-active-plan-col"),children:[r._2.map(((e,t)=>{const i=k[t].desc,n=e.featureTitleRow;return e.isHeader?(0,p.jsx)(u,{isActive:d,isXsViewActive:v,title:"Standard",onClick:a?C:null,children:(0,p.jsx)(s.azJ,{className:"title-block",children:(0,p.jsx)(s.azJ,{className:"title-main",children:(0,p.jsx)("div",{className:"iconContainer",children:(0,p.jsx)(s.bWx,{})})})})},"standard-header"):n?(0,p.jsx)(b,{featureLabel:i},`feature-title-row-${e.id}`):(0,p.jsx)(g,{featureLabel:i,label:e.label,detail:e.detail,xsLabel:e.xsLabel,style:e.style},`feature-item-${e.id}`)})),(0,p.jsx)(s.azJ,{className:"button-box",children:N("https://min.io/signup",r.M7.includes(o)?"Login to SUBNET":"Subscribe","callAction",r.Bx.STANDARD)})]}),(0,p.jsxs)(s.azJ,{className:"plan-col "+(x?"active-plan-col":"non-active-plan-col"),children:[r.yf.map(((e,t)=>{const i=k[t].desc,{featureTitleRow:n,isHeader:l,yesIcon:r}=e;return l?(0,p.jsx)(u,{isActive:x,isXsViewActive:w,title:"Enterprise",onClick:a?C:null,children:(0,p.jsx)(s.azJ,{className:"title-block",children:(0,p.jsx)(s.azJ,{className:"title-main",children:(0,p.jsx)("div",{className:"iconContainer",children:(0,p.jsx)(s.r3Q,{})})})})},"enterprise-header"):n?(0,p.jsx)(b,{featureLabel:i},`feature-title-row2-${e.id}`):r?(0,p.jsx)(s.azJ,{className:"feature-item",children:(0,p.jsxs)(s.azJ,{className:"feature-item-info",children:[(0,p.jsx)("div",{className:"xs-only"}),(0,p.jsx)(s.azJ,{className:"plan-feature",children:(0,p.jsx)(s.C1y,{})})]})},`ent-feature-yes${e.id}`):(0,p.jsx)(g,{featureLabel:i,label:e.label,detail:e.detail,style:e.style},`pricing-feature-item-${e.id}`)})),(0,p.jsx)(s.azJ,{className:"button-box",children:N("https://min.io/signup",r.M7.includes(o)?"Login to SUBNET":"Subscribe","callAction",r.Bx.ENTERPRISE)})]})]})]})})};var j=i(9827),A=i(2237),v=i(4770),w=i(649);const N=(0,A.A)(n.lazy((()=>i.e(654).then(i.bind(i,3654))))),C=()=>{const e=(0,a.Zp)(),[t,i]=(0,n.useState)(!1),[o,c]=(0,n.useState)(),[d,x]=(0,n.useState)(0),[m,h]=(0,n.useState)(!1),[f,u]=(0,n.useState)(!0);(0,n.useState)(!1);const[b,g]=(0,n.useState)(!1),[A,C]=(0,n.useState)(!1),k=o&&b,S=(0,r.Gy)();(0,n.useEffect)((()=>{!k&&!S&&!f&&!m&&C(!0)}),[k,S,f,m]);const L=(0,n.useCallback)((()=>{m||(h(!0),w.A.invoke("GET","/api/v1/subnet/info").then((e=>{e&&("STANDARD"===e.plan?x(1):"ENTERPRISE"===e.plan?x(2):x(1),c(e)),g(!0),h(!1)})).catch((()=>{g(!1),h(!1)})))}),[m]);return(0,n.useEffect)((()=>{f&&(L(),u(!1))}),[L,f,u]),m?(0,p.jsx)(s.xA9,{item:!0,xs:12,children:(0,p.jsx)(s.z21,{})}):(0,p.jsxs)(n.Fragment,{children:[(0,p.jsx)(v.A,{label:"MinIO License and Support plans",actions:(0,p.jsx)(n.Fragment,{children:!k&&(0,p.jsx)(s.$nd,{id:"login-with-subnet",onClick:()=>e(l.zZ.REGISTER_SUPPORT),style:{fontSize:"14px",display:"flex",alignItems:"center",textDecoration:"none"},icon:(0,p.jsx)(s.HKb,{}),variant:"callAction",children:"Register your cluster"})})}),(0,p.jsxs)(s.Mxu,{children:[(0,p.jsx)(s.xA9,{item:!0,xs:12,children:k&&(0,p.jsx)(j.A,{email:null===o||void 0===o?void 0:o.email})}),(0,p.jsx)(y,{activateProductModal:t,closeModalAndFetchLicenseInfo:()=>{i(!1),L()},licenseInfo:o,currentPlanID:d,setActivateProductModal:i}),(0,p.jsx)(N,{isOpen:A,onClose:()=>{C(!1)}})]})]})}},5731:(e,t,i)=>{i.d(t,{A:()=>c});var n=i(5043),s=i(4574),a=i(3097),l=i.n(a),r=i(579);const o=s.Ay.a((e=>{let{theme:t}=e;return{color:l()(t,"linkColor","#2781B0"),fontWeight:600}})),c=()=>(0,r.jsxs)(n.Fragment,{children:[(0,r.jsx)("h2",{children:"What is the GNU AGPL v3?"}),(0,r.jsxs)("p",{children:['The GNU AGPL v3 is short for the "GNU Affero General Public License v3." It is a common open source license certified by the Free Software Foundation and the Open Source Initiative. You can get a copy of the GNU AGPL v3 license with MinIO source code or at\xa0',(0,r.jsx)(o,{href:"https://min.io/compliance?ref=op",target:"_blank",children:"https://www.gnu.org/licenses/agpl-3.0.en.html"}),"."]}),(0,r.jsx)("h2",{children:"What does it mean for me to comply with the GNU AGPL v3?"}),(0,r.jsx)("p",{children:"When you host or distribute MinIO over a network, the AGPL v3 applies to you. Any distribution or copying of MinIO software modified or not has to comply with the obligations specified in the AGPL v3. Otherwise, you may risk infringing MinIO\u2019s copyrights."}),(0,r.jsx)("h2",{children:"Making combined or derivative works of MinIO"}),(0,r.jsx)("p",{children:"Combining MinIO software as part of a larger software stack triggers your GNU AGPL v3 obligations."}),(0,r.jsx)("p",{children:"The method of combining does not matter. When MinIO is linked to a larger software stack in any form, including statically, dynamically, pipes, or containerized and invoked remotely, the AGPL v3 applies to your use. What triggers the AGPL v3 obligations is the exchanging data between the larger stack and MinIO."}),(0,r.jsx)("h2",{children:"Talking to your Legal Counsel"}),(0,r.jsx)("p",{children:"If you have questions, we recommend that you talk to your own attorney for legal advice. Purchasing a commercial license from MinIO removes the AGPL v3 obligations from MinIO software."})]})},7195:(e,t,i)=>{i.d(t,{A:()=>l});i(5043);var n=i(9456),s=i(4159),a=i(579);const l=()=>{const e=(0,n.d4)(s.JJ)?"op":"con";return(0,a.jsx)("a",{className:"link-text",href:`https://min.io/compliance?ref=${e}`,children:"GNU AGPL v3"})}},3047:(e,t,i)=>{i.d(t,{_T:()=>f,yf:()=>b,c_:()=>h,Bx:()=>p,M7:()=>g,_2:()=>u,Gy:()=>v,CA:()=>y,YN:()=>A});var n=i(9923),s=i(7195),a=i(2811),l=i(2961),r=(i(5043),i(4141)),o=i(5731),c=i(9456),d=i(579);const x=()=>{const e=(0,l.jL)(),t=(0,c.d4)((e=>e.license.faqModalOpen));return(0,d.jsx)(r.A,{modalOpen:t,title:"License FAQ",onClose:()=>{e((0,a.s2)())},children:(0,d.jsx)(o.A,{})})},p={COMMUNITY:"community",STANDARD:"standard",ENTERPRISE:"enterprise"},m=e=>{let{text:t,anchor:i}=e;return(0,d.jsx)("a",{href:`https://min.io/product/subnet?ref=op#${i}`,className:"link-text",target:"_blank",rel:"noopener ",style:{color:"#2781B0"},children:t})},h=[{label:"License ",isHeader:!0},{label:"",isHeader:!1,style:{height:"400px",verticalAlign:"top",alignItems:"start"}},{desc:"Features",featureTitleRow:!0},{desc:"Unit Price"},{desc:()=>(0,d.jsx)(m,{anchor:"sa-long-term-support",text:"Software Release"})},{desc:"SLA"},{desc:"Support"},{desc:"Critical Security and Bug Detection"},{desc:()=>(0,d.jsx)(m,{anchor:"sa-panic-button",text:"Panic Button"})},{desc:()=>(0,d.jsx)(m,{anchor:"sa-healthcheck",text:"Health Diagnostics"})},{desc:"Annual Architecture Review"},{desc:"Annual Performance Review"},{desc:"Indemnification"},{desc:"Security and Policy Review"}],f=[{label:"Community",isHeader:!0,style:{borderBottom:0}},{label:()=>(0,d.jsx)(n.azJ,{sx:{textAlign:"left"},children:(0,d.jsxs)("span",{children:["Designed for developers who are building open source applications in compliance with the ",(0,d.jsx)(s.A,{})," license, MinIO Trademarks and are able to self support themselves. It is fully featured. If you distribute, host or create derivative works of the MinIO software over the network, the ",(0,d.jsx)(s.A,{})," license requires that you also distribute the complete, corresponding source code of the combined work under the same ",(0,d.jsx)(s.A,{})," license. This requirement applies whether or not you modified MinIO.",(0,d.jsx)("br",{}),(0,d.jsx)("br",{}),(0,d.jsx)("span",{className:"link-text",onClick:()=>{l.Ay.dispatch((0,a.y)())},children:"Compliance FAQ"}),(0,d.jsx)(x,{})]})}),isHeader:!1,style:{height:"400px",borderBottom:0}},{id:"com_feat_title",featureTitleRow:!0},{id:"com_license_cost"},{id:"com_release",label:"Upstream"},{id:"com_sla",label:"No SLA"},{id:"com_support",label:"Community:",detail:"Slack + Github"},{id:"com_security",label:"Self"},{id:"com_panic",xsLabel:"N/A"},{id:"com_diag",xsLabel:"N/A"},{id:"com_arch",xsLabel:"N/A"},{id:"com_perf",xsLabel:"N/A"},{id:"com_indemnity",xsLabel:"N/A"},{id:"com_sec_policy",xsLabel:"N/A"}],u=[{label:"Standard",isHeader:!0,style:{borderBottom:0}},{isHeader:!1,label:()=>(0,d.jsxs)(n.azJ,{sx:{marginTop:"-85px",textAlign:"left"},children:[(0,d.jsxs)("span",{children:["Designed for customers who require a commercial license and can mostly self-support but want the peace of mind that comes with the MinIO Subscription Network\u2019s suite of operational capabilities and direct-to-engineer interaction. The Standard version is fully featured but with SLA limitations. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{})," To learn more about the MinIO Subscription Network"]})," ",(0,d.jsx)("a",{href:"https://min.io/product/subnet?ref=op",className:"link-text",target:"_blank",rel:"noopener",children:"click here"}),"."]}),style:{height:"400px",borderBottom:0}},{id:"std_feat_title",featureTitleRow:!0},{id:"std_license_cost",label:()=>(0,d.jsx)(n.azJ,{sx:{fontSize:"16px",fontWeight:600},children:"$10 per TiB per month"}),detail:()=>(0,d.jsx)(n.azJ,{sx:{fontSize:"14px",fontWeight:400,marginBottom:"5px"},children:"(Minimum of 200TiB)"})},{id:"std_release",label:"1 Year Long Term Support"},{id:"std_sla",label:"<48 Hours",detail:"(Local Business Hours)"},{id:"std_support",label:"L4 Direct Engineering",detail:"support via SUBNET"},{id:"std_security",label:"Continuous Scan and Alert"},{id:"std_panic",label:"1 Per year"},{id:"std_diag",label:"24/7/365"},{id:"std_arch",xsLabel:"N/A"},{id:"std_perf",xsLabel:"N/A"},{id:"std_indemnity",xsLabel:"N/A"},{id:"std_sec_policy",xsLabel:"N/A"}],b=[{label:"Enterprise",isHeader:!0,style:{borderBottom:0}},{isHeader:!1,label:()=>(0,d.jsxs)(n.azJ,{sx:{marginTop:"-135px",textAlign:"left"},children:[(0,d.jsxs)("span",{children:["Designed for mission critical environments where both a license and strict SLAs are required. The Enterprise version is fully featured but comes with additional capabilities. ",(0,d.jsx)("br",{})," ",(0,d.jsx)("br",{})," To learn more about the MinIO Subscription Network"]})," ",(0,d.jsx)("a",{href:"https://min.io/product/subnet?ref=op",className:"link-text",target:"_blank",rel:"noopener",children:"click here"}),"."]}),style:{height:"400px",borderBottom:0}},{id:"end_feat_title",featureTitleRow:!0},{id:"ent_license_cost",label:()=>(0,d.jsx)(n.azJ,{sx:{fontSize:"16px",fontWeight:600},children:"$20 per TiB per month"}),detail:()=>(0,d.jsx)(n.azJ,{sx:{fontSize:"14px",fontWeight:400,marginBottom:"5px"},children:"(Minimum of 100TiB)"})},{id:"ent_release",label:"5 Years Long Term Support"},{id:"ent_sla",label:"<1 hour"},{id:"ent_support",label:"L4 Direct Engineering support via",detail:"SUBNET, Phone, Web Conference"},{id:"ent_security",label:"Continuous Scan and Alert"},{id:"ent_panic",label:"Unlimited"},{id:"ent_diag",label:"24/7/365"},{id:"ent_arch",yesIcon:!0},{id:"ent_perf",yesIcon:!0},{id:"ent_indemnity",yesIcon:!0},{id:"ent_sec_policy",yesIcon:!0}],g=[p.STANDARD,p.ENTERPRISE],y=e=>"function"===typeof e?e():e,j="agpl_minio_license_consent",A=()=>{localStorage.setItem(j,"true")},v=()=>"true"===localStorage.getItem(j)},9827:(e,t,i)=>{i.d(t,{A:()=>a});i(5043);var n=i(9923),s=i(579);const a=e=>{let{email:t=""}=e;return(0,s.jsxs)(n.azJ,{sx:{height:"67px",color:"#ffffff",display:"flex",position:"relative",top:"-30px",left:"-32px",width:"calc(100% + 64px)",alignItems:"center",justifyContent:"space-between",backgroundColor:"#2781B0",padding:"0 25px 0 25px","& .registered-box, .reg-badge-box":{display:"flex",alignItems:"center",justifyContent:"flex-start"},"& .reg-badge-box":{marginLeft:"20px","& .min-icon":{fill:"#2781B0"}}},children:[(0,s.jsxs)(n.azJ,{className:"registered-box",children:[(0,s.jsx)(n.azJ,{sx:{fontSize:"16px",fontWeight:400},children:"Register status:"}),(0,s.jsxs)(n.azJ,{className:"reg-badge-box",children:[(0,s.jsx)(n.M3H,{}),(0,s.jsx)(n.azJ,{sx:{fontWeight:600},children:"Registered"})]})]}),(0,s.jsxs)(n.azJ,{className:"registered-acc-box",sx:{alignItems:"center",justifyContent:"flex-start",display:"flex",[`@media (max-width: ${n.nmC.sm}px)`]:{display:"none"}},children:[(0,s.jsx)(n.azJ,{sx:{fontSize:"16px",fontWeight:400},children:"Registered to:"}),(0,s.jsx)(n.azJ,{sx:{marginLeft:"8px",fontWeight:600},children:t})]})]})}},8387:(e,t,i)=>{function n(e){var t,i,s="";if("string"==typeof e||"number"==typeof e)s+=e;else if("object"==typeof e)if(Array.isArray(e)){var a=e.length;for(t=0;ts});const s=function(){for(var e,t,i=0,s="",a=arguments.length;i.\n\nimport React, { ComponentType, Suspense, SuspenseProps } from \"react\";\n\nfunction withSuspense
(\n WrappedComponent: ComponentType
,\n fallback: SuspenseProps[\"fallback\"] = null,\n) {\n function ComponentWithSuspense(props: P) {\n return (\n \n \n \n );\n }\n\n return ComponentWithSuspense;\n}\n\nexport default withSuspense;\n","// This file is part of MinIO Operator\n// Copyright (c) 2021 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\nimport React, { useEffect, useState } from \"react\";\nimport { useSelector } from \"react-redux\";\nimport { ModalBox, Snackbar } from \"mds\";\nimport { CSSObject } from \"styled-components\";\nimport { AppState, useAppDispatch } from \"../../../../store\";\nimport { setModalSnackMessage } from \"../../../../systemSlice\";\nimport MainError from \"../MainError/MainError\";\n\ninterface IModalProps {\n onClose: () => void;\n modalOpen: boolean;\n title: string | React.ReactNode;\n children: any;\n wideLimit?: boolean;\n titleIcon?: React.ReactNode;\n iconColor?: \"default\" | \"delete\" | \"accept\";\n sx?: CSSObject;\n}\n\nconst ModalWrapper = ({\n onClose,\n modalOpen,\n title,\n children,\n wideLimit = true,\n titleIcon = null,\n iconColor = \"default\",\n sx,\n}: IModalProps) => {\n const dispatch = useAppDispatch();\n const [openSnackbar, setOpenSnackbar] = useState(false);\n\n const modalSnackMessage = useSelector(\n (state: AppState) => state.system.modalSnackBar,\n );\n\n useEffect(() => {\n dispatch(setModalSnackMessage(\"\"));\n }, [dispatch]);\n\n useEffect(() => {\n if (modalSnackMessage) {\n if (modalSnackMessage.message === \"\") {\n setOpenSnackbar(false);\n return;\n }\n // Open SnackBar\n if (modalSnackMessage.type !== \"error\") {\n setOpenSnackbar(true);\n }\n }\n }, [modalSnackMessage]);\n\n const closeSnackBar = () => {\n setOpenSnackbar(false);\n dispatch(setModalSnackMessage(\"\"));\n };\n\n let message = \"\";\n\n if (modalSnackMessage) {\n message = modalSnackMessage.detailedErrorMsg;\n if (\n modalSnackMessage.detailedErrorMsg === \"\" ||\n modalSnackMessage.detailedErrorMsg.length < 5\n ) {\n message = modalSnackMessage.message;\n }\n }\n\n return (\n \n \n \n {children}\n \n );\n};\n\nexport default ModalWrapper;\n","// This file is part of MinIO Operator\n// Copyright (c) 2022 MinIO, Inc.\n//\n// This program is free software: you can redistribute it and/or modify\n// it under the terms of the GNU Affero General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// This program is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n// GNU Affero General Public License for more details.\n//\n// You should have received a copy of the GNU Affero General Public License\n// along with this program. If not, see .\n\nimport React, { Fragment, useEffect, useState } from \"react\";\nimport clsx from \"clsx\";\nimport {\n AGPLV3Logo,\n Box,\n breakPoints,\n Button,\n CheckCircleIcon,\n ConsoleEnterprise,\n ConsoleStandard,\n LicenseDocIcon,\n} from \"mds\";\nimport { SubnetInfo } from \"./types\";\nimport {\n COMMUNITY_PLAN_FEATURES,\n ENTERPRISE_PLAN_FEATURES,\n FEATURE_ITEMS,\n getRenderValue,\n LICENSE_PLANS,\n PAID_PLANS,\n STANDARD_PLAN_FEATURES,\n} from \"./utils\";\nimport styled from \"styled-components\";\nimport get from \"lodash/get\";\n\ninterface IRegisterStatus {\n activateProductModal: any;\n closeModalAndFetchLicenseInfo: any;\n licenseInfo: SubnetInfo | undefined;\n currentPlanID: number;\n setActivateProductModal: any;\n}\n\nconst PlanListContainer = styled.div(({ theme }) => ({\n display: \"grid\",\n\n margin: \"0 1.5rem 0 1.5rem\",\n\n gridTemplateColumns: \"1fr 1fr 1fr 1fr\",\n\n [`@media (max-width: ${breakPoints.sm}px)`]: {\n gridTemplateColumns: \"1fr 1fr 1fr\",\n },\n\n \"&.paid-plans-only\": {\n display: \"grid\",\n gridTemplateColumns: \"1fr 1fr 1fr\",\n },\n\n \"& .features-col\": {\n flex: 1,\n minWidth: \"260px\",\n\n \"@media (max-width: 600px)\": {\n display: \"none\",\n },\n },\n\n \"& .xs-only\": {\n display: \"none\",\n },\n\n \"& .button-box\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: \"5px 0px 25px 0px\",\n borderLeft: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n },\n \"& .plan-header\": {\n height: \"99px\",\n borderBottom: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n },\n \"& .feature-title\": {\n height: \"25px\",\n paddingLeft: \"26px\",\n fontSize: \"14px\",\n\n background: get(theme, \"signalColors.disabled\", \"#E5E5E5\"),\n color: get(theme, \"signalColors.main\", \"#07193E\"),\n\n \"@media (max-width: 600px)\": {\n \"& .feature-title-info .xs-only\": {\n display: \"block\",\n },\n },\n },\n \"& .feature-name\": {\n minHeight: \"60px\",\n padding: \"5px\",\n borderBottom: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n display: \"flex\",\n alignItems: \"center\",\n paddingLeft: \"26px\",\n fontSize: \"14px\",\n },\n \"& .feature-item\": {\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"center\",\n justifyContent: \"center\",\n minHeight: \"60px\",\n padding: \"0 15px 0 15px\",\n borderBottom: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n borderLeft: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n fontSize: \"14px\",\n \"& .link-text\": {\n color: \"#2781B0\",\n cursor: \"pointer\",\n textDecoration: \"underline\",\n },\n\n \"&.icon-yes\": {\n width: \"15px\",\n height: \"15px\",\n },\n },\n\n \"& .feature-item-info\": {\n flex: 1,\n display: \"flex\",\n flexFlow: \"column\",\n alignItems: \"center\",\n justifyContent: \"space-around\",\n textAlign: \"center\",\n\n \"@media (max-width: 600px)\": {\n justifyContent: \"space-evenly\",\n width: \"100%\",\n \"& .xs-only\": {\n display: \"block\",\n },\n \"& .plan-feature\": {\n textAlign: \"center\",\n paddingRight: \"10px\",\n },\n },\n },\n\n \"& .plan-col\": {\n minWidth: \"260px\",\n flex: 1,\n },\n\n \"& .active-plan-col\": {\n background: `${get(\n theme,\n \"boxBackground\",\n \"#FDFDFD\",\n )} 0% 0% no-repeat padding-box`,\n boxShadow: \" 0px 3px 20px #00000038\",\n\n \"& .plan-header\": {\n backgroundColor: get(theme, \"signalColors.info\", \"#2781B0\"),\n },\n\n \"& .feature-title\": {\n background: get(theme, \"signalColors.disabled\", \"#E5E5E5\"),\n color: get(theme, \"fontColor\", \"#000\"),\n },\n },\n}));\n\nconst PlanHeaderContainer = styled.div(({ theme }) => ({\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"center\",\n flexFlow: \"column\",\n borderLeft: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n borderBottom: \"0px !important\",\n \"& .plan-header\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flexFlow: \"column\",\n },\n\n \"& .title-block\": {\n display: \"flex\",\n alignItems: \"center\",\n flexFlow: \"column\",\n width: \"100%\",\n \"& .title-main\": {\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n flex: 1,\n },\n \"& .iconContainer\": {\n \"& .min-icon\": {\n minWidth: 140,\n width: \"100%\",\n maxHeight: 55,\n height: \"100%\",\n },\n },\n },\n\n \"& .open-source\": {\n fontSize: \"14px\",\n display: \"flex\",\n marginBottom: \"5px\",\n alignItems: \"center\",\n \"& .min-icon\": {\n marginRight: \"8px\",\n height: \"12px\",\n width: \"12px\",\n },\n },\n\n \"& .cur-plan-text\": {\n fontSize: \"12px\",\n textTransform: \"uppercase\",\n },\n\n \"@media (max-width: 600px)\": {\n cursor: \"pointer\",\n \"& .title-block\": {\n \"& .title\": {\n fontSize: \"14px\",\n fontWeight: 600,\n },\n },\n },\n\n \"&.active, &.active.xs-active\": {\n color: \"#ffffff\",\n position: \"relative\",\n\n \"& .min-icon\": {\n fill: \"#ffffff\",\n },\n\n \"&:before\": {\n content: \"' '\",\n position: \"absolute\",\n width: \"100%\",\n height: \"18px\",\n backgroundColor: get(theme, \"signalColors.info\", \"#2781B0\"),\n display: \"block\",\n top: -16,\n },\n \"& .iconContainer\": {\n \"& .min-icon\": {\n marginTop: \"-12px\",\n },\n },\n },\n \"&.active\": {\n backgroundColor: get(theme, \"signalColors.info\", \"#2781B0\"),\n color: \"#ffffff\",\n },\n \"&.xs-active\": {\n background: \"#eaeaea\",\n },\n}));\n\nconst ListContainer = styled.div(({ theme }) => ({\n border: `1px solid ${get(theme, \"borderColor\", \"#EAEAEA\")}`,\n borderTop: \"0px\",\n marginBottom: \"45px\",\n \"&::-webkit-scrollbar\": {\n width: \"5px\",\n height: \"5px\",\n },\n \"&::-webkit-scrollbar-track\": {\n background: \"#F0F0F0\",\n borderRadius: 0,\n boxShadow: \"inset 0px 0px 0px 0px #F0F0F0\",\n },\n \"&::-webkit-scrollbar-thumb\": {\n background: \"#777474\",\n borderRadius: 0,\n },\n \"&::-webkit-scrollbar-thumb:hover\": {\n background: \"#5A6375\",\n },\n}));\n\nconst PlanHeader = ({\n isActive,\n isXsViewActive,\n title,\n onClick,\n children,\n}: {\n isActive: boolean;\n isXsViewActive: boolean;\n title: string;\n price?: string;\n onClick: any;\n children: any;\n}) => {\n const plan = title.toLowerCase();\n return (\n {\n onClick && onClick(plan);\n }}\n >\n {children}\n \n );\n};\n\nconst FeatureTitleRowCmp = (props: { featureLabel: any }) => {\n return (\n \n \n