@awaitio/input-datetime 0.0.0-stage → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +94 -0
- package/README.md +38 -2
- package/dist/constants.d.ts +4 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +7 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/inputDatetime.d.ts +9 -0
- package/dist/inputDatetime.d.ts.map +1 -0
- package/dist/inputDatetime.js +47 -0
- package/dist/schemas/isoDatetimeSchema.d.ts +3 -0
- package/dist/schemas/isoDatetimeSchema.d.ts.map +1 -0
- package/dist/schemas/isoDatetimeSchema.js +17 -0
- package/dist/ui/ui.js +1 -0
- package/dist/utils/formatUtc.d.ts +5 -0
- package/dist/utils/formatUtc.d.ts.map +1 -0
- package/dist/utils/formatUtc.js +8 -0
- package/dist/utils/toLocalInputValue.d.ts +5 -0
- package/dist/utils/toLocalInputValue.d.ts.map +1 -0
- package/dist/utils/toLocalInputValue.js +10 -0
- package/package.json +37 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
# AwaitIO License
|
|
2
|
+
|
|
3
|
+
Copyright © 2026 Orukami s.r.o., Rybná 716/24, 110 00 Praha 1, Czech Republic, company ID 64049159, registered in the Commercial Register kept by the Municipal Court in Prague, section C, file 74046 (the "Licensor")
|
|
4
|
+
|
|
5
|
+
The source code of AwaitIO is public. Whether you can use it for free depends on how many people use it: small teams use AwaitIO for free, including commercially, while for-profit organizations with more users need a Company License. This keeps AwaitIO free for most people and funds its development.
|
|
6
|
+
|
|
7
|
+
This license covers everything in this repository, the package `awaitio` and every package published by the Licensor under the `@awaitio` scope on npm, now or in the future, such as `@awaitio/input-text`, `@awaitio/input-textarea` and `@awaitio/input-datetime` (together, "AwaitIO").
|
|
8
|
+
|
|
9
|
+
## Users
|
|
10
|
+
|
|
11
|
+
A "user" is a person who uses an application built with AwaitIO, whether it runs locally or is deployed: an employee, a contractor or anyone else who opens it, runs its actions or answers them. What counts is the number of real people, not the number of logins: several people sharing one login are several users. Count each person once across all of your organization's AwaitIO applications and environments.
|
|
12
|
+
|
|
13
|
+
## Organization
|
|
14
|
+
|
|
15
|
+
Your "organization" is you, if you are an individual, or the legal entity that uses AwaitIO, together with every entity that controls it, is controlled by it or is under common control with it. "Control" means owning more than 50% of the voting shares or other ownership interest, or having the power to direct the entity's management. Users are counted across the whole organization: entities in one group count their users together and cannot each use the Free License separately.
|
|
16
|
+
|
|
17
|
+
## Free License
|
|
18
|
+
|
|
19
|
+
### Who is eligible
|
|
20
|
+
|
|
21
|
+
You may use AwaitIO for free if you are:
|
|
22
|
+
|
|
23
|
+
- an individual, including a sole trader or a freelancer, or a for-profit organization, in each case with up to 3 users;
|
|
24
|
+
- a non-profit or not-for-profit organization, or an educational institution; or
|
|
25
|
+
- evaluating whether AwaitIO fits your needs, with any number of users, for 30 days from your organization's first use of AwaitIO. The evaluation period is counted once per organization and does not start again with a new application, environment or version. After it ends, an organization that is not eligible for the Free License otherwise needs a Company License or an Enterprise agreement to keep using AwaitIO.
|
|
26
|
+
|
|
27
|
+
### What you may do
|
|
28
|
+
|
|
29
|
+
If you are eligible, you are granted permission, free of charge, to:
|
|
30
|
+
|
|
31
|
+
- use AwaitIO, commercially or not, including in production;
|
|
32
|
+
- build applications and internal tools with AwaitIO, for yourself and for your clients; and
|
|
33
|
+
- modify AwaitIO for your own use, or to contribute fixes and improvements back to AwaitIO.
|
|
34
|
+
|
|
35
|
+
## Company License
|
|
36
|
+
|
|
37
|
+
An individual or a for-profit organization with more than 3 users needs a Company License to use AwaitIO. It allows the same use as the Free License, in any number of applications and environments. Its price depends on the number of users:
|
|
38
|
+
|
|
39
|
+
- 4 to 10 users: 50 USD per month per organization;
|
|
40
|
+
- 11 to 50 users: 250 USD per month per organization.
|
|
41
|
+
|
|
42
|
+
An individual or a for-profit organization with more than 50 users needs an Enterprise agreement instead of a Company License (see below).
|
|
43
|
+
|
|
44
|
+
To get one, sponsor AwaitIO on GitHub Sponsors (https://github.com/sponsors/awaitio) with the monthly Company License tier for your number of users, from your organization's GitHub account or on its behalf. The Company License is valid for as long as the monthly sponsorship is active; when it ends, so does the Company License. When your organization grows past 10 users, move to the higher tier; when it grows past 50 users, agree on an Enterprise agreement.
|
|
45
|
+
|
|
46
|
+
The Licensor issues an invoice for every payment on request: write to license@awaitio.com with your organization's billing details. For more than 50 users, a written contract, a service-level agreement, priority support or other custom terms, write to the same address to agree on an Enterprise agreement.
|
|
47
|
+
|
|
48
|
+
Eligibility is decided by the organization that runs the application. If you build tools with AwaitIO for a client and the client runs them, the client's users count and the client needs a Company License unless it is eligible for the Free License itself. People who only develop, test or demonstrate an application for a client, such as the developers of an agency or a freelancer, are not users of it and do not count towards their own organization either. Whoever runs the application for its users pays: if you run it for your client yourself, for example as a hosted back office, its users count as yours. An agency or a freelancer may get the client's Company License on the client's behalf, for example as part of its own price: the license then covers the client, in the tier for the client's number of users, for as long as the sponsorship for it is active.
|
|
49
|
+
|
|
50
|
+
## Same software, honor system
|
|
51
|
+
|
|
52
|
+
The Free License and the Company License cover exactly the same software. AwaitIO has no paid features, no license keys, no usage limits and no telemetry, and it never checks which license you have. The licensing works on trust: if your organization needs a Company License, get one.
|
|
53
|
+
|
|
54
|
+
## Sponsoring
|
|
55
|
+
|
|
56
|
+
Anyone may sponsor AwaitIO on GitHub Sponsors, once or monthly, with any amount, to support its development. A sponsorship other than a monthly Company License tier is a gift and does not grant a Company License.
|
|
57
|
+
|
|
58
|
+
## What nobody may do
|
|
59
|
+
|
|
60
|
+
Whatever your license, without a separate written agreement with the Licensor you may not:
|
|
61
|
+
|
|
62
|
+
1. copy or modify AwaitIO in order to sell, rent, license, relicense or sublicense AwaitIO itself or your own derivative or fork of it;
|
|
63
|
+
2. offer AwaitIO, or a derivative or fork of it, to third parties as a framework, builder or platform for making internal tools, admin panels or back offices, that is, a product whose main purpose is to let others build their own applications;
|
|
64
|
+
3. offer to third parties a commercial hosted or managed service built on AwaitIO, such as a dashboard, cloud, monitoring or management service for applications that use AwaitIO.
|
|
65
|
+
|
|
66
|
+
Building applications with AwaitIO, running them and handing them over to your clients is none of the above. An application with its own purpose, such as the back office of a particular business, or the same application delivered to many clients, is not a framework, builder or platform under point 2, even when it is built with AwaitIO. Neither is making your own components, plugins or extensions for AwaitIO and sharing, selling or licensing them, as long as they do not include AwaitIO itself or a modified copy of it.
|
|
67
|
+
|
|
68
|
+
## Changes to this license
|
|
69
|
+
|
|
70
|
+
The Licensor may change this license, including its prices and eligibility, at any time. A change applies to the versions of AwaitIO released after it; each version is governed by the license included with that version.
|
|
71
|
+
|
|
72
|
+
If you do not agree with the license of a newer version, you may keep using the versions you already have under the license they came with, but you may not upgrade to a version released under the license you do not agree with. Installing or using a newer version means you accept its license.
|
|
73
|
+
|
|
74
|
+
## Warranty
|
|
75
|
+
|
|
76
|
+
AwaitIO is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the Licensor or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with AwaitIO or the use of or other dealings in AwaitIO.
|
|
77
|
+
|
|
78
|
+
## Questions and license confirmation
|
|
79
|
+
|
|
80
|
+
If you are not sure whether or which license you need, for example how to count your users or whether your use is allowed, write to license@awaitio.com before you decide; the Licensor will answer in writing. If you need a confirmation that your organization holds a valid license, for example for an audit, a client or a procurement process, write to the same address and the Licensor will confirm in writing which license your organization holds and for how long it is valid.
|
|
81
|
+
|
|
82
|
+
## Governing law
|
|
83
|
+
|
|
84
|
+
This license and every dispute arising from it or in connection with AwaitIO are governed by the laws of the Czech Republic, excluding its conflict-of-laws rules and the United Nations Convention on Contracts for the International Sale of Goods. The courts of the Czech Republic with jurisdiction for Prague have exclusive jurisdiction, unless mandatory law gives a consumer the right to sue in the courts of their own country.
|
|
85
|
+
|
|
86
|
+
## Support
|
|
87
|
+
|
|
88
|
+
Support is provided through GitHub issues:
|
|
89
|
+
|
|
90
|
+
- under the Free License, on a best-effort basis;
|
|
91
|
+
- under a Company License, standard support with a first response within 3 working days;
|
|
92
|
+
- under an Enterprise agreement, priority support with a first response within 12 hours on working days, unless the agreement says otherwise.
|
|
93
|
+
|
|
94
|
+
Working days are business days in the Czech Republic. The response times are targets, not a service-level agreement; an Enterprise agreement may add one.
|
package/README.md
CHANGED
|
@@ -1,3 +1,39 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @awaitio/input-datetime
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Date and time input for [AwaitIO](https://awaitio.com): `io.input.datetime()`, returns a luxon DateTime.
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @awaitio/input-datetime
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Needs `awaitio` and `zod` in the app, see the [quickstart](https://docs.awaitio.com/quickstart).
|
|
14
|
+
|
|
15
|
+
## Setup
|
|
16
|
+
|
|
17
|
+
Register it under the key you want in `io`, see [Input components](https://docs.awaitio.com/core/input-components):
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import { inputDatetime } from '@awaitio/input-datetime';
|
|
21
|
+
|
|
22
|
+
export const app = new AwaitIO({
|
|
23
|
+
// name, actionsDirectory, theme, secret, users…
|
|
24
|
+
components: { input: { datetime: inputDatetime } },
|
|
25
|
+
});
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Usage
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { DateTime } from 'luxon';
|
|
32
|
+
|
|
33
|
+
const endsAt = await io.input.datetime('Trial ends at', {
|
|
34
|
+
defaultValue: DateTime.now().plus({ days: 14 }).startOf('day'),
|
|
35
|
+
min: DateTime.now(),
|
|
36
|
+
});
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Props, optional, returns, built-in validation and custom validation are on the [Input Datetime docs page](https://docs.awaitio.com/io/input-datetime).
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;IAEpB,kBAAkB;CACnB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputDatetime = void 0;
|
|
4
|
+
var inputDatetime_1 = require("./inputDatetime");
|
|
5
|
+
Object.defineProperty(exports, "inputDatetime", { enumerable: true, get: function () { return inputDatetime_1.inputDatetime; } });
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DateTime } from 'luxon';
|
|
2
|
+
import { z } from 'zod/v4';
|
|
3
|
+
export declare const inputDatetime: import("awaitio").ComponentDefinition<z.ZodObject<{
|
|
4
|
+
helpText: z.ZodOptional<z.ZodString>;
|
|
5
|
+
defaultValue: z.ZodOptional<z.ZodPipe<z.ZodTransform<any, unknown>, z.ZodISODateTime>>;
|
|
6
|
+
min: z.ZodOptional<z.ZodPipe<z.ZodTransform<any, unknown>, z.ZodISODateTime>>;
|
|
7
|
+
max: z.ZodOptional<z.ZodPipe<z.ZodTransform<any, unknown>, z.ZodISODateTime>>;
|
|
8
|
+
}, z.core.$strip>, z.ZodPipe<z.ZodISODateTime, z.ZodTransform<DateTime<true> | DateTime<false>, string>>>;
|
|
9
|
+
//# sourceMappingURL=inputDatetime.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inputDatetime.d.ts","sourceRoot":"","sources":["../src/inputDatetime.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAM3B,eAAO,MAAM,aAAa;;;;;yGAmDxB,CAAC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputDatetime = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const awaitio_1 = require("awaitio");
|
|
6
|
+
const ui_1 = require("awaitio/ui");
|
|
7
|
+
const luxon_1 = require("luxon");
|
|
8
|
+
const v4_1 = require("zod/v4");
|
|
9
|
+
const constants_1 = require("./constants");
|
|
10
|
+
const isoDatetimeSchema_1 = require("./schemas/isoDatetimeSchema");
|
|
11
|
+
const formatUtc_1 = require("./utils/formatUtc");
|
|
12
|
+
const toLocalInputValue_1 = require("./utils/toLocalInputValue");
|
|
13
|
+
exports.inputDatetime = (0, awaitio_1.defineComponent)({
|
|
14
|
+
props: v4_1.z.object({
|
|
15
|
+
helpText: v4_1.z.string().optional(),
|
|
16
|
+
defaultValue: isoDatetimeSchema_1.isoDatetimeSchema.optional(),
|
|
17
|
+
min: isoDatetimeSchema_1.isoDatetimeSchema.optional(),
|
|
18
|
+
max: isoDatetimeSchema_1.isoDatetimeSchema.optional(),
|
|
19
|
+
}),
|
|
20
|
+
// The browser sends an ISO string in UTC; the handler gets a luxon DateTime. zod refuses a date that does not exist
|
|
21
|
+
// (2026-02-30) too, not only a wrong shape.
|
|
22
|
+
returns: v4_1.z.iso
|
|
23
|
+
.datetime({ error: 'pick a date and time' })
|
|
24
|
+
.transform((value) => {
|
|
25
|
+
return luxon_1.DateTime.fromISO(value, { zone: 'utc' });
|
|
26
|
+
}),
|
|
27
|
+
initialValue: (props) => {
|
|
28
|
+
return props.defaultValue ?? '';
|
|
29
|
+
},
|
|
30
|
+
// The input works in whole minutes, so min and max are compared at minute precision: min: DateTime.now() must
|
|
31
|
+
// still accept the current minute that the browser lets the user pick.
|
|
32
|
+
validate: ({ label, props, value }) => {
|
|
33
|
+
if (props.min && value < luxon_1.DateTime.fromISO(props.min).startOf('minute')) {
|
|
34
|
+
return `${label} must not be earlier than ${(0, formatUtc_1.formatUtc)({ iso: props.min })}.`;
|
|
35
|
+
}
|
|
36
|
+
if (props.max && value > luxon_1.DateTime.fromISO(props.max).endOf('minute')) {
|
|
37
|
+
return `${label} must not be later than ${(0, formatUtc_1.formatUtc)({ iso: props.max })}.`;
|
|
38
|
+
}
|
|
39
|
+
return null;
|
|
40
|
+
},
|
|
41
|
+
component: ({ props, value, onChange, disabled, autoFocus, optional }) => {
|
|
42
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ui_1.Input, { type: "datetime-local", value: (0, toLocalInputValue_1.toLocalInputValue)({ iso: value }) ?? '', min: (0, toLocalInputValue_1.toLocalInputValue)({ iso: props.min }), max: (0, toLocalInputValue_1.toLocalInputValue)({ iso: props.max }), required: !optional, disabled: disabled, autoFocus: autoFocus, onChange: (local) => {
|
|
43
|
+
const parsed = luxon_1.DateTime.fromFormat(local, constants_1.constants.LOCAL_INPUT_FORMAT);
|
|
44
|
+
onChange(parsed.isValid ? parsed.toUTC().toISO() ?? '' : '');
|
|
45
|
+
} }), (0, jsx_runtime_1.jsxs)(ui_1.Hint, { children: ["Time zone: ", luxon_1.DateTime.local().zoneName] })] }));
|
|
46
|
+
},
|
|
47
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isoDatetimeSchema.d.ts","sourceRoot":"","sources":["../../src/schemas/isoDatetimeSchema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC;AAG3B,eAAO,MAAM,iBAAiB,2DAe7B,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isoDatetimeSchema = void 0;
|
|
4
|
+
const v4_1 = require("zod/v4");
|
|
5
|
+
// Times travel as ISO 8601 strings in UTC; a DateTime or Date from the handler is turned into one here.
|
|
6
|
+
exports.isoDatetimeSchema = v4_1.z.preprocess((value) => {
|
|
7
|
+
if (value instanceof Date) {
|
|
8
|
+
return value.toISOString();
|
|
9
|
+
}
|
|
10
|
+
// A luxon DateTime, recognized without instanceof so another copy of luxon in the app works too.
|
|
11
|
+
if (typeof value === 'object' && value !== null && 'toUTC' in value && typeof value.toUTC === 'function') {
|
|
12
|
+
return value.toUTC().toISO();
|
|
13
|
+
}
|
|
14
|
+
return value;
|
|
15
|
+
},
|
|
16
|
+
// Refuses a date that does not exist (2026-02-30) too, not only a wrong shape.
|
|
17
|
+
v4_1.z.iso.datetime());
|
package/dist/ui/ui.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var awaitioComponent=(function(Ue,ke,gt,ae){"use strict";const Xn=n=>({kind:"awaitio-component",...n,uiDirectory:null});class Y extends Error{}class er extends Y{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class tr extends Y{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class nr extends Y{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class J extends Y{}class wt extends Y{constructor(e){super(`Invalid unit ${e}`)}}class v extends Y{}class z extends Y{constructor(){super("Zone is an abstract class")}}const c="numeric",C="short",E="long",Se={year:c,month:c,day:c},pt={year:c,month:C,day:c},rr={year:c,month:C,day:c,weekday:C},Tt={year:c,month:E,day:c},kt={year:c,month:E,day:c,weekday:E},St={hour:c,minute:c},Ot={hour:c,minute:c,second:c},It={hour:c,minute:c,second:c,timeZoneName:C},vt={hour:c,minute:c,second:c,timeZoneName:E},Mt={hour:c,minute:c,hourCycle:"h23"},Nt={hour:c,minute:c,second:c,hourCycle:"h23"},Et={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:C},Dt={hour:c,minute:c,second:c,hourCycle:"h23",timeZoneName:E},xt={year:c,month:c,day:c,hour:c,minute:c},bt={year:c,month:c,day:c,hour:c,minute:c,second:c},Ft={year:c,month:C,day:c,hour:c,minute:c},Ct={year:c,month:C,day:c,hour:c,minute:c,second:c},sr={year:c,month:C,day:c,weekday:C,hour:c,minute:c},Vt={year:c,month:E,day:c,hour:c,minute:c,timeZoneName:C},Wt={year:c,month:E,day:c,hour:c,minute:c,second:c,timeZoneName:C},Lt={year:c,month:E,day:c,weekday:E,hour:c,minute:c,timeZoneName:E},$t={year:c,month:E,day:c,weekday:E,hour:c,minute:c,second:c,timeZoneName:E};class oe{get type(){throw new z}get name(){throw new z}get ianaName(){return this.name}get isUniversal(){throw new z}offsetName(e,t){throw new z}formatOffset(e,t){throw new z}offset(e){throw new z}equals(e){throw new z}get isValid(){throw new z}}let ze=null;class Oe extends oe{static get instance(){return ze===null&&(ze=new Oe),ze}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return ln(e,t,r)}formatOffset(e,t){return fe(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}}const Re=new Map;function ir(n){let e=Re.get(n);return e===void 0&&(e=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"}),Re.set(n,e)),e}const ar={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function or(n,e){const t=n.format(e).replace(/\u200E/g,""),r=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,i,a,o,u,l,d]=r;return[a,s,i,o,u,l,d]}function ur(n,e){const t=n.formatToParts(e),r=[];for(let s=0;s<t.length;s++){const{type:i,value:a}=t[s],o=ar[i];i==="era"?r[o]=a:m(o)||(r[o]=parseInt(a,10))}return r}const qe=new Map;class Z extends oe{static create(e){let t=qe.get(e);return t===void 0&&qe.set(e,t=new Z(e)),t}static resetCache(){qe.clear(),Re.clear()}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=Z.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return ln(e,t,r,this.name)}formatOffset(e,t){return fe(this.offset(e),t)}offset(e){if(!this.valid)return NaN;const t=new Date(e);if(isNaN(t))return NaN;const r=ir(this.name);let[s,i,a,o,u,l,d]=r.formatToParts?ur(r,t):or(r,t);o==="BC"&&(s=-Math.abs(s)+1);const T=Ee({year:s,month:i,day:a,hour:u===24?0:u,minute:l,second:d,millisecond:0});let h=+t;const I=h%1e3;return h-=I>=0?I:1e3+I,(T-h)/6e4}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}}let At={};function lr(n,e={}){const t=JSON.stringify([n,e]);let r=At[t];return r||(r=new Intl.ListFormat(n,e),At[t]=r),r}const He=new Map;function Ye(n,e={}){const t=JSON.stringify([n,e]);let r=He.get(t);return r===void 0&&(r=new Intl.DateTimeFormat(n,e),He.set(t,r)),r}const Pe=new Map;function cr(n,e={}){const t=JSON.stringify([n,e]);let r=Pe.get(t);return r===void 0&&(r=new Intl.NumberFormat(n,e),Pe.set(t,r)),r}const _e=new Map;function fr(n,e={}){const{base:t,...r}=e,s=JSON.stringify([n,r]);let i=_e.get(s);return i===void 0&&(i=new Intl.RelativeTimeFormat(n,e),_e.set(s,i)),i}let ue=null;function dr(){return ue||(ue=new Intl.DateTimeFormat().resolvedOptions().locale,ue)}const Ge=new Map;function Zt(n){let e=Ge.get(n);return e===void 0&&(e=new Intl.DateTimeFormat(n).resolvedOptions(),Ge.set(n,e)),e}const Je=new Map;function hr(n){let e=Je.get(n);if(!e){const t=new Intl.Locale(n);e="getWeekInfo"in t?t.getWeekInfo():t.weekInfo,"minimalDays"in e||(e={...Ut,...e}),Je.set(n,e)}return e}function mr(n){const e=n.indexOf("-x-");e!==-1&&(n=n.substring(0,e));const t=n.indexOf("-u-");if(t===-1)return[n];{let r,s;try{r=Ye(n).resolvedOptions(),s=n}catch{const u=n.substring(0,t);r=Ye(u).resolvedOptions(),s=u}const{numberingSystem:i,calendar:a}=r;return[s,i,a]}}function yr(n,e,t){return(t||e)&&(n.includes("-u-")||(n+="-u"),t&&(n+=`-ca-${t}`),e&&(n+=`-nu-${e}`)),n}function gr(n){const e=[];for(let t=1;t<=12;t++){const r=f.utc(2009,t,1);e.push(n(r))}return e}function wr(n){const e=[];for(let t=1;t<=7;t++){const r=f.utc(2016,11,13+t);e.push(n(r))}return e}function Ie(n,e,t,r){const s=n.listingMode();return s==="error"?null:s==="en"?t(e):r(e)}function pr(n){return n.numberingSystem&&n.numberingSystem!=="latn"?!1:n.numberingSystem==="latn"||!n.locale||n.locale.startsWith("en")||Zt(n.locale).numberingSystem==="latn"}class Tr{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:s,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const o={useGrouping:!1,...r};r.padTo>0&&(o.minimumIntegerDigits=r.padTo),this.inf=cr(e,o)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{const t=this.floor?Math.floor(e):rt(e,3);return O(t,this.padTo)}}}class kr{constructor(e,t,r){this.opts=r,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){const a=-1*(e.offset/60),o=a>=0?`Etc/GMT+${a}`:`Etc/GMT${a}`;e.offset!==0&&Z.create(o).valid?(s=o,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||s,this.dtf=Ye(t,i)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){const r=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:r}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class Sr{constructor(e,t,r){this.opts={style:"long",...r},!t&&sn()&&(this.rtf=fr(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):Hr(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}const Ut={firstDay:1,minimalDays:4,weekend:[6,7]};class p{static fromOpts(e){return p.create(e.locale,e.numberingSystem,e.outputCalendar,e.weekSettings,e.defaultToEN)}static create(e,t,r,s,i=!1){const a=e||k.defaultLocale,o=a||(i?"en-US":dr()),u=t||k.defaultNumberingSystem,l=r||k.defaultOutputCalendar,d=tt(s)||k.defaultWeekSettings;return new p(o,u,l,d,a)}static resetCache(){ue=null,He.clear(),Pe.clear(),_e.clear(),Ge.clear(),Je.clear()}static fromObject({locale:e,numberingSystem:t,outputCalendar:r,weekSettings:s}={}){return p.create(e,t,r,s)}constructor(e,t,r,s,i){const[a,o,u]=mr(e);this.locale=a,this.numberingSystem=t||o||null,this.outputCalendar=r||u||null,this.weekSettings=s,this.intl=yr(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=pr(this)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:p.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,tt(e.weekSettings)||this.weekSettings,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return Ie(this,e,dn,()=>{const r=this.intl==="ja"||this.intl.startsWith("ja-");t&=!r;const s=t?{month:e,day:"numeric"}:{month:e},i=t?"format":"standalone";if(!this.monthsCache[i][e]){const a=r?o=>this.dtFormatter(o,s).format():o=>this.extract(o,s,"month");this.monthsCache[i][e]=gr(a)}return this.monthsCache[i][e]})}weekdays(e,t=!1){return Ie(this,e,yn,()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=wr(i=>this.extract(i,r,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return Ie(this,void 0,()=>gn,()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[f.utc(2016,11,13,9),f.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return Ie(this,e,wn,()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[f.utc(-40,1,1),f.utc(2017,1,1)].map(r=>this.extract(r,t,"era"))),this.eraCache[e]})}extract(e,t,r){const s=this.dtFormatter(e,t),i=s.formatToParts(),a=i.find(o=>o.type.toLowerCase()===r);return a?a.value:null}numberFormatter(e={}){return new Tr(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new kr(e,this.intl,t)}relFormatter(e={}){return new Sr(this.intl,this.isEnglish(),e)}listFormatter(e={}){return lr(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||Zt(this.intl).locale.startsWith("en-us")}getWeekSettings(){return this.weekSettings?this.weekSettings:an()?hr(this.locale):Ut}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 je=null;class N extends oe{static get utcInstance(){return je===null&&(je=new N(0)),je}static instance(e){return e===0?N.utcInstance:new N(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new N(De(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${fe(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${fe(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return fe(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}}class Or extends oe{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 R(n,e){if(m(n)||n===null)return e;if(n instanceof oe)return n;if(Dr(n)){const t=n.toLowerCase();return t==="default"?e:t==="local"||t==="system"?Oe.instance:t==="utc"||t==="gmt"?N.utcInstance:N.parseSpecifier(t)||Z.create(n)}else return q(n)?N.instance(n):typeof n=="object"&&"offset"in n&&typeof n.offset=="function"?n:new Or(n)}const Be={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},zt={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]},Ir=Be.hanidec.replace(/[\[|\]]/g,"").split("");function vr(n){let e=parseInt(n,10);if(isNaN(e)){e="";for(let t=0;t<n.length;t++){const r=n.charCodeAt(t);if(n[t].search(Be.hanidec)!==-1)e+=Ir.indexOf(n[t]);else for(const s in zt){const[i,a]=zt[s];r>=i&&r<=a&&(e+=r-i)}}return parseInt(e,10)}else return e}const Qe=new Map;function Mr(){Qe.clear()}function V({numberingSystem:n},e=""){const t=n||"latn";let r=Qe.get(t);r===void 0&&(r=new Map,Qe.set(t,r));let s=r.get(e);return s===void 0&&(s=new RegExp(`${Be[t]}${e}`),r.set(e,s)),s}let Rt=()=>Date.now(),qt="system",Ht=null,Yt=null,Pt=null,_t=60,Gt,Jt=null;class k{static get now(){return Rt}static set now(e){Rt=e}static set defaultZone(e){qt=e}static get defaultZone(){return R(qt,Oe.instance)}static get defaultLocale(){return Ht}static set defaultLocale(e){Ht=e}static get defaultNumberingSystem(){return Yt}static set defaultNumberingSystem(e){Yt=e}static get defaultOutputCalendar(){return Pt}static set defaultOutputCalendar(e){Pt=e}static get defaultWeekSettings(){return Jt}static set defaultWeekSettings(e){Jt=tt(e)}static get twoDigitCutoffYear(){return _t}static set twoDigitCutoffYear(e){_t=e%100}static get throwOnInvalid(){return Gt}static set throwOnInvalid(e){Gt=e}static resetCaches(){p.resetCache(),Z.resetCache(),f.resetCache(),Mr()}}class W{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const jt=[0,31,59,90,120,151,181,212,243,273,304,334],Bt=[0,31,60,91,121,152,182,213,244,274,305,335];function D(n,e){return new W("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${n}, which is invalid`)}function Ke(n,e,t){const r=new Date(Date.UTC(n,e-1,t));n<100&&n>=0&&r.setUTCFullYear(r.getUTCFullYear()-1900);const s=r.getUTCDay();return s===0?7:s}function Qt(n,e,t){return t+(le(n)?Bt:jt)[e-1]}function Kt(n,e){const t=le(n)?Bt:jt,r=t.findIndex(i=>i<e),s=e-t[r];return{month:r+1,day:s}}function Xe(n,e){return(n-e+7)%7+1}function ve(n,e=4,t=1){const{year:r,month:s,day:i}=n,a=Qt(r,s,i),o=Xe(Ke(r,s,i),t);let u=Math.floor((a-o+14-e)/7),l;return u<1?(l=r-1,u=ce(l,e,t)):u>ce(r,e,t)?(l=r+1,u=1):l=r,{weekYear:l,weekNumber:u,weekday:o,...be(n)}}function Xt(n,e=4,t=1){const{weekYear:r,weekNumber:s,weekday:i}=n,a=Xe(Ke(r,1,e),t),o=B(r);let u=s*7+i-a-7+e,l;u<1?(l=r-1,u+=B(l)):u>o?(l=r+1,u-=B(r)):l=r;const{month:d,day:y}=Kt(l,u);return{year:l,month:d,day:y,...be(n)}}function et(n){const{year:e,month:t,day:r}=n,s=Qt(e,t,r);return{year:e,ordinal:s,...be(n)}}function en(n){const{year:e,ordinal:t}=n,{month:r,day:s}=Kt(e,t);return{year:e,month:r,day:s,...be(n)}}function tn(n,e){if(!m(n.localWeekday)||!m(n.localWeekNumber)||!m(n.localWeekYear)){if(!m(n.weekday)||!m(n.weekNumber)||!m(n.weekYear))throw new J("Cannot mix locale-based week fields with ISO-based week fields");return m(n.localWeekday)||(n.weekday=n.localWeekday),m(n.localWeekNumber)||(n.weekNumber=n.localWeekNumber),m(n.localWeekYear)||(n.weekYear=n.localWeekYear),delete n.localWeekday,delete n.localWeekNumber,delete n.localWeekYear,{minDaysInFirstWeek:e.getMinDaysInFirstWeek(),startOfWeek:e.getStartOfWeek()}}else return{minDaysInFirstWeek:4,startOfWeek:1}}function Nr(n,e=4,t=1){const r=Me(n.weekYear),s=x(n.weekNumber,1,ce(n.weekYear,e,t)),i=x(n.weekday,1,7);return r?s?i?!1:D("weekday",n.weekday):D("week",n.weekNumber):D("weekYear",n.weekYear)}function Er(n){const e=Me(n.year),t=x(n.ordinal,1,B(n.year));return e?t?!1:D("ordinal",n.ordinal):D("year",n.year)}function nn(n){const e=Me(n.year),t=x(n.month,1,12),r=x(n.day,1,Ne(n.year,n.month));return e?t?r?!1:D("day",n.day):D("month",n.month):D("year",n.year)}function rn(n){const{hour:e,minute:t,second:r,millisecond:s}=n,i=x(e,0,23)||e===24&&t===0&&r===0&&s===0,a=x(t,0,59),o=x(r,0,59),u=x(s,0,999);return i?a?o?u?!1:D("millisecond",s):D("second",r):D("minute",t):D("hour",e)}function m(n){return typeof n>"u"}function q(n){return typeof n=="number"}function Me(n){return typeof n=="number"&&n%1===0}function Dr(n){return typeof n=="string"}function xr(n){return Object.prototype.toString.call(n)==="[object Date]"}function sn(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function an(){try{return typeof Intl<"u"&&!!Intl.Locale&&("weekInfo"in Intl.Locale.prototype||"getWeekInfo"in Intl.Locale.prototype)}catch{return!1}}function br(n){return Array.isArray(n)?n:[n]}function on(n,e,t){if(n.length!==0)return n.reduce((r,s)=>{const i=[e(s),s];return r&&t(r[0],i[0])===r[0]?r:i},null)[1]}function Fr(n,e){return e.reduce((t,r)=>(t[r]=n[r],t),{})}function j(n,e){return Object.prototype.hasOwnProperty.call(n,e)}function tt(n){if(n==null)return null;if(typeof n!="object")throw new v("Week settings must be an object");if(!x(n.firstDay,1,7)||!x(n.minimalDays,1,7)||!Array.isArray(n.weekend)||n.weekend.some(e=>!x(e,1,7)))throw new v("Invalid week settings");return{firstDay:n.firstDay,minimalDays:n.minimalDays,weekend:Array.from(n.weekend)}}function x(n,e,t){return Me(n)&&n>=e&&n<=t}function Cr(n,e){return n-e*Math.floor(n/e)}function O(n,e=2){const t=n<0;let r;return t?r="-"+(""+-n).padStart(e,"0"):r=(""+n).padStart(e,"0"),r}function H(n){if(!(m(n)||n===null||n===""))return parseInt(n,10)}function P(n){if(!(m(n)||n===null||n===""))return parseFloat(n)}function nt(n){if(!(m(n)||n===null||n==="")){const e=parseFloat("0."+n)*1e3;return Math.floor(e)}}function rt(n,e,t="round"){const r=10**e;switch(t){case"expand":return n>0?Math.ceil(n*r)/r:Math.floor(n*r)/r;case"trunc":return Math.trunc(n*r)/r;case"round":return Math.round(n*r)/r;case"floor":return Math.floor(n*r)/r;case"ceil":return Math.ceil(n*r)/r;default:throw new RangeError(`Value rounding ${t} is out of range`)}}function le(n){return n%4===0&&(n%100!==0||n%400===0)}function B(n){return le(n)?366:365}function Ne(n,e){const t=Cr(e-1,12)+1,r=n+(e-t)/12;return t===2?le(r)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function Ee(n){let e=Date.UTC(n.year,n.month-1,n.day,n.hour,n.minute,n.second,n.millisecond);return n.year<100&&n.year>=0&&(e=new Date(e),e.setUTCFullYear(n.year,n.month-1,n.day)),+e}function un(n,e,t){return-Xe(Ke(n,1,e),t)+e-1}function ce(n,e=4,t=1){const r=un(n,e,t),s=un(n+1,e,t);return(B(n)-r+s)/7}function st(n){return n>99?n:n>k.twoDigitCutoffYear?1900+n:2e3+n}function ln(n,e,t,r=null){const s=new Date(n),i={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};r&&(i.timeZone=r);const a={timeZoneName:e,...i},o=new Intl.DateTimeFormat(t,a).formatToParts(s).find(u=>u.type.toLowerCase()==="timezonename");return o?o.value:null}function De(n,e){let t=parseInt(n,10);Number.isNaN(t)&&(t=0);const r=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-r:r;return t*60+s}function cn(n){const e=Number(n);if(typeof n=="boolean"||n===""||!Number.isFinite(e))throw new v(`Invalid unit value ${n}`);return e}function xe(n,e){const t={};for(const r in n)if(j(n,r)){const s=n[r];if(s==null)continue;t[e(r)]=cn(s)}return t}function fe(n,e){const t=Math.trunc(Math.abs(n/60)),r=Math.trunc(Math.abs(n%60)),s=n>=0?"+":"-";switch(e){case"short":return`${s}${O(t,2)}:${O(r,2)}`;case"narrow":return`${s}${t}${r>0?`:${r}`:""}`;case"techie":return`${s}${O(t,2)}${O(r,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function be(n){return Fr(n,["hour","minute","second","millisecond"])}const Vr=["January","February","March","April","May","June","July","August","September","October","November","December"],fn=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],Wr=["J","F","M","A","M","J","J","A","S","O","N","D"];function dn(n){switch(n){case"narrow":return[...Wr];case"short":return[...fn];case"long":return[...Vr];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 hn=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],mn=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],Lr=["M","T","W","T","F","S","S"];function yn(n){switch(n){case"narrow":return[...Lr];case"short":return[...mn];case"long":return[...hn];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const gn=["AM","PM"],$r=["Before Christ","Anno Domini"],Ar=["BC","AD"],Zr=["B","A"];function wn(n){switch(n){case"narrow":return[...Zr];case"short":return[...Ar];case"long":return[...$r];default:return null}}function Ur(n){return gn[n.hour<12?0:1]}function zr(n,e){return yn(e)[n.weekday-1]}function Rr(n,e){return dn(e)[n.month-1]}function qr(n,e){return wn(e)[n.year<0?0:1]}function Hr(n,e,t="always",r=!1){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=["hours","minutes","seconds"].indexOf(n)===-1;if(t==="auto"&&i){const y=n==="days";switch(e){case 1:return y?"tomorrow":`next ${s[n][0]}`;case-1:return y?"yesterday":`last ${s[n][0]}`;case 0:return y?"today":`this ${s[n][0]}`}}const a=Object.is(e,-0)||e<0,o=Math.abs(e),u=o===1,l=s[n],d=r?u?l[1]:l[2]||l[1]:u?s[n][0]:n;return a?`${o} ${d} ago`:`in ${o} ${d}`}function pn(n,e){let t="";for(const r of n)r.literal?t+=r.val:t+=e(r.val);return t}const Yr={D:Se,DD:pt,DDD:Tt,DDDD:kt,t:St,tt:Ot,ttt:It,tttt:vt,T:Mt,TT:Nt,TTT:Et,TTTT:Dt,f:xt,ff:Ft,fff:Vt,ffff:Lt,F:bt,FF:Ct,FFF:Wt,FFFF:$t};class M{static create(e,t={}){return new M(e,t)}static parseFormat(e){let t=null,r="",s=!1;const i=[];for(let a=0;a<e.length;a++){const o=e.charAt(a);o==="'"?((r.length>0||s)&&i.push({literal:s||/^\s+$/.test(r),val:r===""?"'":r}),t=null,r="",s=!s):s||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:s||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return Yr[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0,r=void 0){if(this.opts.forceSimple)return O(e,t);const s={...this.opts};return t>0&&(s.padTo=t),r&&(s.signDisplay=r),this.loc.numberFormatter(s).format(e)}formatDateTimeFromString(e,t){const r=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",i=(h,I)=>this.loc.extract(e,h,I),a=h=>e.isOffsetFixed&&e.offset===0&&h.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,h.format):"",o=()=>r?Ur(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),u=(h,I)=>r?Rr(e,h):i(I?{month:h}:{month:h,day:"numeric"},"month"),l=(h,I)=>r?zr(e,h):i(I?{weekday:h}:{weekday:h,month:"long",day:"numeric"},"weekday"),d=h=>{const I=M.macroTokenToFormatOpts(h);return I?this.formatWithSystemDefault(e,I):h},y=h=>r?qr(e,h):i({era:h},"era"),T=h=>{switch(h){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 a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({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 o();case"d":return s?i({day:"numeric"},"day"):this.num(e.day);case"dd":return s?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return s?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return u("short",!0);case"LLLL":return u("long",!0);case"LLLLL":return u("narrow",!0);case"M":return s?i({month:"numeric"},"month"):this.num(e.month);case"MM":return s?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return u("short",!1);case"MMMM":return u("long",!1);case"MMMMM":return u("narrow",!1);case"y":return s?i({year:"numeric"},"year"):this.num(e.year);case"yy":return s?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return y("short");case"GG":return y("long");case"GGGGG":return y("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 d(h)}};return pn(M.parseFormat(t),T)}formatDurationFromString(e,t){const r=this.opts.signMode==="negativeLargestOnly"?-1:1,s=d=>{switch(d[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}},i=(d,y)=>T=>{const h=s(T);if(h){const I=y.isNegativeDuration&&h!==y.largestUnit?r:1;let $;return this.opts.signMode==="negativeLargestOnly"&&h!==y.largestUnit?$="never":this.opts.signMode==="all"?$="always":$="auto",this.num(d.get(h)*I,T.length,$)}else return T},a=M.parseFormat(t),o=a.reduce((d,{literal:y,val:T})=>y?d:d.concat(T),[]),u=e.shiftTo(...o.map(s).filter(d=>d)),l={isNegativeDuration:u<0,largestUnit:Object.keys(u.values)[0]};return pn(a,i(u,l))}}const Tn=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function Q(...n){const e=n.reduce((t,r)=>t+r.source,"");return RegExp(`^${e}$`)}function K(...n){return e=>n.reduce(([t,r,s],i)=>{const[a,o,u]=i(e,s);return[{...t,...a},o||r,u]},[{},null,1]).slice(0,2)}function X(n,...e){if(n==null)return[null,null];for(const[t,r]of e){const s=t.exec(n);if(s)return r(s)}return[null,null]}function kn(...n){return(e,t)=>{const r={};let s;for(s=0;s<n.length;s++)r[n[s]]=H(e[t+s]);return[r,null,t+s]}}const Sn=/(?:([Zz])|([+-]\d\d)(?::?(\d\d))?)/,Pr=`(?:${Sn.source}?(?:\\[(${Tn.source})\\])?)?`,it=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,On=RegExp(`${it.source}${Pr}`),at=RegExp(`(?:[Tt]${On.source})?`),_r=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,Gr=/(\d{4})-?W(\d\d)(?:-?(\d))?/,Jr=/(\d{4})-?(\d{3})/,jr=kn("weekYear","weekNumber","weekDay"),Br=kn("year","ordinal"),Qr=/(\d{4})-(\d\d)-(\d\d)/,In=RegExp(`${it.source} ?(?:${Sn.source}|(${Tn.source}))?`),Kr=RegExp(`(?: ${In.source})?`);function ee(n,e,t){const r=n[e];return m(r)?t:H(r)}function Xr(n,e){return[{year:ee(n,e),month:ee(n,e+1,1),day:ee(n,e+2,1)},null,e+3]}function te(n,e){return[{hours:ee(n,e,0),minutes:ee(n,e+1,0),seconds:ee(n,e+2,0),milliseconds:nt(n[e+3])},null,e+4]}function de(n,e){const t=!n[e]&&!n[e+1],r=De(n[e+1],n[e+2]),s=t?null:N.instance(r);return[{},s,e+3]}function he(n,e){const t=n[e]?Z.create(n[e]):null;return[{},t,e+1]}const es=RegExp(`^T?${it.source}$`),ts=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function ns(n){const[e,t,r,s,i,a,o,u,l]=n,d=e[0]==="-",y=u&&u[0]==="-",T=(h,I=!1)=>h!==void 0&&(I||h&&d)?-h:h;return[{years:T(P(t)),months:T(P(r)),weeks:T(P(s)),days:T(P(i)),hours:T(P(a)),minutes:T(P(o)),seconds:T(P(u),u==="-0"),milliseconds:T(nt(l),y)}]}const rs={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ot(n,e,t,r,s,i,a){const o={year:e.length===2?st(H(e)):H(e),month:fn.indexOf(t)+1,day:H(r),hour:H(s),minute:H(i)};return a&&(o.second=H(a)),n&&(o.weekday=n.length>3?hn.indexOf(n)+1:mn.indexOf(n)+1),o}const ss=/^(?:(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 is(n){const[,e,t,r,s,i,a,o,u,l,d,y]=n,T=ot(e,s,r,t,i,a,o);let h;return u?h=rs[u]:l?h=0:h=De(d,y),[T,new N(h)]}function as(n){return n.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}const os=/^(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$/,us=/^(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$/,ls=/^(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 vn(n){const[,e,t,r,s,i,a,o]=n;return[ot(e,s,r,t,i,a,o),N.utcInstance]}function cs(n){const[,e,t,r,s,i,a,o]=n;return[ot(e,o,t,r,s,i,a),N.utcInstance]}const fs=Q(_r,at),ds=Q(Gr,at),hs=Q(Jr,at),ms=Q(On),Mn=K(Xr,te,de,he),ys=K(jr,te,de,he),gs=K(Br,te,de,he),ws=K(te,de,he);function ps(n){return X(n,[fs,Mn],[ds,ys],[hs,gs],[ms,ws])}function Ts(n){return X(as(n),[ss,is])}function ks(n){return X(n,[os,vn],[us,vn],[ls,cs])}function Ss(n){return X(n,[ts,ns])}const Os=K(te);function Is(n){return X(n,[es,Os])}const vs=Q(Qr,Kr),Ms=Q(In),Ns=K(te,de,he);function Es(n){return X(n,[vs,Mn],[Ms,Ns])}const Nn="Invalid Duration",En={weeks:{days:7,hours:168,minutes:10080,seconds:10080*60,milliseconds:10080*60*1e3},days:{hours:24,minutes:1440,seconds:1440*60,milliseconds:1440*60*1e3},hours:{minutes:60,seconds:3600,milliseconds:3600*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},Ds={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:2184*60,seconds:2184*60*60,milliseconds:2184*60*60*1e3},months:{weeks:4,days:30,hours:720,minutes:720*60,seconds:720*60*60,milliseconds:720*60*60*1e3},...En},b=146097/400,ne=146097/4800,xs={years:{quarters:4,months:12,weeks:b/7,days:b,hours:b*24,minutes:b*24*60,seconds:b*24*60*60,milliseconds:b*24*60*60*1e3},quarters:{months:3,weeks:b/28,days:b/4,hours:b*24/4,minutes:b*24*60/4,seconds:b*24*60*60/4,milliseconds:b*24*60*60*1e3/4},months:{weeks:ne/7,days:ne,hours:ne*24,minutes:ne*24*60,seconds:ne*24*60*60,milliseconds:ne*24*60*60*1e3},...En},_=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],bs=_.slice(0).reverse();function U(n,e,t=!1){const r={values:t?e.values:{...n.values,...e.values||{}},loc:n.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||n.conversionAccuracy,matrix:e.matrix||n.matrix};return new g(r)}function Dn(n,e){let t=e.milliseconds??0;for(const r of bs.slice(1))e[r]&&(t+=e[r]*n[r].milliseconds);return t}function xn(n,e){const t=Dn(n,e)<0?-1:1;_.reduceRight((r,s)=>{if(m(e[s]))return r;if(r){const i=e[r]*t,a=n[s][r],o=Math.floor(i/a);e[s]+=o*t,e[r]-=o*a*t}return s},null),_.reduce((r,s)=>{if(m(e[s]))return r;if(r){const i=e[r]%1;e[r]-=i,e[s]+=i*n[r][s]}return s},null)}function bn(n){const e={};for(const[t,r]of Object.entries(n))r!==0&&(e[t]=r);return e}class g{constructor(e){const t=e.conversionAccuracy==="longterm"||!1;let r=t?xs:Ds;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||p.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return g.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new v(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new g({values:xe(e,g.normalizeUnit),loc:p.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(q(e))return g.fromMillis(e);if(g.isDuration(e))return e;if(typeof e=="object")return g.fromObject(e);throw new v(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=Ss(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=Is(e);return r?g.fromObject(r,t):g.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new v("need to specify a reason the Duration is invalid");const r=e instanceof W?e:new W(e,t);if(k.throwOnInvalid)throw new nr(r);return new g({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new wt(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?M.create(this.loc,r).formatDurationFromString(this,e):Nn}toHuman(e={}){if(!this.isValid)return Nn;const t=e.showZeros!==!1,r=_.map(s=>{const i=this.values[s];return m(i)||i===0&&!t?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:s.slice(0,-1)}).format(i)}).filter(s=>s);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(r)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=rt(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},f.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?Dn(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e),r={};for(const s of _)(j(t.values,s)||j(this.values,s))&&(r[s]=t.get(s)+this.get(s));return U(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=cn(e(this.values[r],r));return U(this,{values:t},!0)}get(e){return this[g.normalizeUnit(e)]}set(e){if(!this.isValid)return this;const t={...this.values,...xe(e,g.normalizeUnit)};return U(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:s}={}){const a={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:r};return U(this,a)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return xn(this.matrix,e),U(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=bn(this.normalize().shiftToAll().toObject());return U(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(a=>g.normalizeUnit(a));const t={},r={},s=this.toObject();let i;for(const a of _)if(e.indexOf(a)>=0){i=a;let o=0;for(const l in r)o+=this.matrix[l][a]*r[l],r[l]=0;q(s[a])&&(o+=s[a]);const u=Math.trunc(o);t[a]=u,r[a]=(o*1e3-u*1e3)/1e3}else q(s[a])&&(r[a]=s[a]);for(const a in r)r[a]!==0&&(t[i]+=a===i?r[a]:r[a]/this.matrix[i][a]);return xn(this.matrix,t),U(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return U(this,{values:e},!0)}removeZeros(){if(!this.isValid)return this;const e=bn(this.values);return U(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(r,s){return r===void 0||r===0?s===void 0||s===0:r===s}for(const r of _)if(!t(this.values[r],e.values[r]))return!1;return!0}}const re="Invalid Interval";function Fs(n,e){return!n||!n.isValid?S.invalid("missing or invalid start"):!e||!e.isValid?S.invalid("missing or invalid end"):e<n?S.invalid("end before start",`The end of an interval must be after its start, but you had start=${n.toISO()} and end=${e.toISO()}`):null}class S{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new v("need to specify a reason the Interval is invalid");const r=e instanceof W?e:new W(e,t);if(k.throwOnInvalid)throw new tr(r);return new S({invalid:r})}static fromDateTimes(e,t){const r=ge(e),s=ge(t),i=Fs(r,s);return i??new S({start:r,end:s})}static after(e,t){const r=g.fromDurationLike(t),s=ge(e);return S.fromDateTimes(s,s.plus(r))}static before(e,t){const r=g.fromDurationLike(t),s=ge(e);return S.fromDateTimes(s.minus(r),s)}static fromISO(e,t){const[r,s]=(e||"").split("/",2);if(r&&s){let i,a;try{i=f.fromISO(r,t),a=i.isValid}catch{a=!1}let o,u;try{o=f.fromISO(s,t),u=o.isValid}catch{u=!1}if(a&&u)return S.fromDateTimes(i,o);if(a){const l=g.fromISO(s,t);if(l.isValid)return S.after(i,l)}else if(u){const l=g.fromISO(r,t);if(l.isValid)return S.before(o,l)}}return S.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get lastDateTime(){return this.isValid&&this.e?this.e.minus(1):null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds",t){if(!this.isValid)return NaN;const r=this.start.startOf(e,t);let s;return t?.useLocaleWeeks?s=this.end.reconfigure({locale:r.locale}):s=this.end,s=s.startOf(e,t),Math.floor(s.diff(r,e).get(e))+(s.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?S.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(ge).filter(a=>this.contains(a)).sort((a,o)=>a.toMillis()-o.toMillis()),r=[];let{s}=this,i=0;for(;s<this.e;){const a=t[i]||this.e,o=+a>+this.e?this.e:a;r.push(S.fromDateTimes(s,o)),s=o,i+=1}return r}splitBy(e){const t=g.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:r}=this,s=1,i;const a=[];for(;r<this.e;){const o=this.start.plus(t.mapUnits(u=>u*s));i=+o>+this.e?this.e:o,a.push(S.fromDateTimes(r,i)),r=i,s+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e<e.e?this.e:e.e;return t>=r?null:S.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.s<e.s?this.s:e.s,r=this.e>e.e?this.e:e.e;return S.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort((s,i)=>s.s-i.s).reduce(([s,i],a)=>i?i.overlaps(a)||i.abutsStart(a)?[s,i.union(a)]:[s.concat([i]),a]:[s,a],[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const s=[],i=e.map(u=>[{time:u.s,type:"s"},{time:u.e,type:"e"}]),a=Array.prototype.concat(...i),o=a.sort((u,l)=>u.time-l.time);for(const u of o)r+=u.type==="s"?1:-1,r===1?t=u.time:(t&&+t!=+u.time&&s.push(S.fromDateTimes(t,u.time)),t=null);return S.merge(s)}difference(...e){return S.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:re}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`:`Interval { Invalid, reason: ${this.invalidReason} }`}toLocaleString(e=Se,t={}){return this.isValid?M.create(this.s.loc.clone(t),e).formatInterval(this):re}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:re}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:re}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:re}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:re}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):g.invalid(this.invalidReason)}mapEndpoints(e){return S.fromDateTimes(e(this.s),e(this.e))}}class Fe{static hasDST(e=k.defaultZone){const t=f.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return Z.isValidZone(e)}static normalizeZone(e){return R(e,k.defaultZone)}static getStartOfWeek({locale:e=null,locObj:t=null}={}){return(t||p.create(e)).getStartOfWeek()}static getMinimumDaysInFirstWeek({locale:e=null,locObj:t=null}={}){return(t||p.create(e)).getMinDaysInFirstWeek()}static getWeekendWeekdays({locale:e=null,locObj:t=null}={}){return(t||p.create(e)).getWeekendDays().slice()}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||p.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null,outputCalendar:i="gregory"}={}){return(s||p.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||p.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:s=null}={}){return(s||p.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return p.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return p.create(t,null,"gregory").eras(e)}static features(){return{relative:sn(),localeWeek:an()}}}function Fn(n,e){const t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),r=t(e)-t(n);return Math.floor(g.fromMillis(r).as("days"))}function Cs(n,e,t){const r=[["years",(u,l)=>l.year-u.year],["quarters",(u,l)=>l.quarter-u.quarter+(l.year-u.year)*4],["months",(u,l)=>l.month-u.month+(l.year-u.year)*12],["weeks",(u,l)=>{const d=Fn(u,l);return(d-d%7)/7}],["days",Fn]],s={},i=n;let a,o;for(const[u,l]of r)t.indexOf(u)>=0&&(a=u,s[u]=l(n,e),o=i.plus(s),o>e?(s[u]--,n=i.plus(s),n>e&&(o=n,s[u]--,n=i.plus(s))):n=o);return[n,s,o,a]}function Vs(n,e,t,r){let[s,i,a,o]=Cs(n,e,t);const u=e-s,l=t.filter(y=>["hours","minutes","seconds","milliseconds"].indexOf(y)>=0);l.length===0&&(a<e&&(a=s.plus({[o]:1})),a!==s&&(i[o]=(i[o]||0)+u/(a-s)));const d=g.fromObject(i,r);return l.length>0?g.fromMillis(u,r).shiftTo(...l).plus(d):d}const Ws="missing Intl.DateTimeFormat.formatToParts support";function w(n,e=t=>t){return{regex:n,deser:([t])=>e(vr(t))}}const Cn="[ ]",Vn=new RegExp(Cn,"g");function Ls(n){return n.replace(/\./g,"\\.?").replace(Vn,Cn)}function Wn(n){return n.replace(/\./g,"").replace(Vn," ").toLowerCase()}function L(n,e){return n===null?null:{regex:RegExp(n.map(Ls).join("|")),deser:([t])=>n.findIndex(r=>Wn(t)===Wn(r))+e}}function Ln(n,e){return{regex:n,deser:([,t,r])=>De(t,r),groups:e}}function Ce(n){return{regex:n,deser:([e])=>e}}function $s(n){return n.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function As(n,e){const t=V(e),r=V(e,"{2}"),s=V(e,"{3}"),i=V(e,"{4}"),a=V(e,"{6}"),o=V(e,"{1,2}"),u=V(e,"{1,3}"),l=V(e,"{1,6}"),d=V(e,"{1,9}"),y=V(e,"{2,4}"),T=V(e,"{4,6}"),h=A=>({regex:RegExp($s(A.val)),deser:([ie])=>ie,literal:!0}),$=(A=>{if(n.literal)return h(A);switch(A.val){case"G":return L(e.eras("short"),0);case"GG":return L(e.eras("long"),0);case"y":return w(l);case"yy":return w(y,st);case"yyyy":return w(i);case"yyyyy":return w(T);case"yyyyyy":return w(a);case"M":return w(o);case"MM":return w(r);case"MMM":return L(e.months("short",!0),1);case"MMMM":return L(e.months("long",!0),1);case"L":return w(o);case"LL":return w(r);case"LLL":return L(e.months("short",!1),1);case"LLLL":return L(e.months("long",!1),1);case"d":return w(o);case"dd":return w(r);case"o":return w(u);case"ooo":return w(s);case"HH":return w(r);case"H":return w(o);case"hh":return w(r);case"h":return w(o);case"mm":return w(r);case"m":return w(o);case"q":return w(o);case"qq":return w(r);case"s":return w(o);case"ss":return w(r);case"S":return w(u);case"SSS":return w(s);case"u":return Ce(d);case"uu":return Ce(o);case"uuu":return w(t);case"a":return L(e.meridiems(),0);case"kkkk":return w(i);case"kk":return w(y,st);case"W":return w(o);case"WW":return w(r);case"E":case"c":return w(t);case"EEE":return L(e.weekdays("short",!1),1);case"EEEE":return L(e.weekdays("long",!1),1);case"ccc":return L(e.weekdays("short",!0),1);case"cccc":return L(e.weekdays("long",!0),1);case"Z":case"ZZ":return Ln(new RegExp(`([+-]${o.source})(?::(${r.source}))?`),2);case"ZZZ":return Ln(new RegExp(`([+-]${o.source})(${r.source})?`),2);case"z":return Ce(/[a-z_+-/]{1,256}?/i);case" ":return Ce(/[^\S\n\r]/);default:return h(A)}})(n)||{invalidReason:Ws};return $.token=n,$}const Zs={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function Us(n,e,t){const{type:r,value:s}=n;if(r==="literal"){const u=/^\s+$/.test(s);return{literal:!u,val:u?" ":s}}const i=e[r];let a=r;r==="hour"&&(e.hour12!=null?a=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?a="hour12":a="hour24":a=t.hour12?"hour12":"hour24");let o=Zs[a];if(typeof o=="object"&&(o=o[i]),o)return{literal:!1,val:o}}function zs(n){return[`^${n.map(t=>t.regex).reduce((t,r)=>`${t}(${r.source})`,"")}$`,n]}function Rs(n,e,t){const r=n.match(e);if(r){const s={};let i=1;for(const a in t)if(j(t,a)){const o=t[a],u=o.groups?o.groups+1:1;!o.literal&&o.token&&(s[o.token.val[0]]=o.deser(r.slice(i,i+u))),i+=u}return[r,s]}else return[r,{}]}function qs(n){const e=i=>{switch(i){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}};let t=null,r;return m(n.z)||(t=Z.create(n.z)),m(n.Z)||(t||(t=new N(n.Z)),r=n.Z),m(n.q)||(n.M=(n.q-1)*3+1),m(n.h)||(n.h<12&&n.a===1?n.h+=12:n.h===12&&n.a===0&&(n.h=0)),n.G===0&&n.y&&(n.y=-n.y),m(n.u)||(n.S=nt(n.u)),[Object.keys(n).reduce((i,a)=>{const o=e(a);return o&&(i[o]=n[a]),i},{}),t,r]}let ut=null;function Hs(){return ut||(ut=f.fromMillis(1555555555555)),ut}function Ys(n,e){if(n.literal)return n;const t=M.macroTokenToFormatOpts(n.val),r=Un(t,e);return r==null||r.includes(void 0)?n:r}function $n(n,e){return Array.prototype.concat(...n.map(t=>Ys(t,e)))}class An{constructor(e,t){if(this.locale=e,this.format=t,this.tokens=$n(M.parseFormat(t),e),this.units=this.tokens.map(r=>As(r,e)),this.disqualifyingUnit=this.units.find(r=>r.invalidReason),!this.disqualifyingUnit){const[r,s]=zs(this.units);this.regex=RegExp(r,"i"),this.handlers=s}}explainFromTokens(e){if(this.isValid){const[t,r]=Rs(e,this.regex,this.handlers),[s,i,a]=r?qs(r):[null,null,void 0];if(j(r,"a")&&j(r,"H"))throw new J("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:this.tokens,regex:this.regex,rawMatches:t,matches:r,result:s,zone:i,specificOffset:a}}else return{input:e,tokens:this.tokens,invalidReason:this.invalidReason}}get isValid(){return!this.disqualifyingUnit}get invalidReason(){return this.disqualifyingUnit?this.disqualifyingUnit.invalidReason:null}}function Zn(n,e,t){return new An(n,t).explainFromTokens(e)}function Ps(n,e,t){const{result:r,zone:s,specificOffset:i,invalidReason:a}=Zn(n,e,t);return[r,s,i,a]}function Un(n,e){if(!n)return null;const r=M.create(e,n).dtFormatter(Hs()),s=r.formatToParts(),i=r.resolvedOptions();return s.map(a=>Us(a,n,i))}const lt="Invalid DateTime",zn=864e13;function me(n){return new W("unsupported zone",`the zone "${n.name}" is not supported`)}function ct(n){return n.weekData===null&&(n.weekData=ve(n.c)),n.weekData}function ft(n){return n.localWeekData===null&&(n.localWeekData=ve(n.c,n.loc.getMinDaysInFirstWeek(),n.loc.getStartOfWeek())),n.localWeekData}function G(n,e){const t={ts:n.ts,zone:n.zone,c:n.c,o:n.o,loc:n.loc,invalid:n.invalid};return new f({...t,...e,old:t})}function Rn(n,e,t){let r=n-e*60*1e3;const s=t.offset(r);if(e===s)return[r,e];r-=(s-e)*60*1e3;const i=t.offset(r);return s===i?[r,s]:[n-Math.min(s,i)*60*1e3,Math.max(s,i)]}function Ve(n,e){n+=e*60*1e3;const t=new Date(n);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function We(n,e,t){return Rn(Ee(n),e,t)}function qn(n,e){const t=n.o,r=n.c.year+Math.trunc(e.years),s=n.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,i={...n.c,year:r,month:s,day:Math.min(n.c.day,Ne(r,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},a=g.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),o=Ee(i);let[u,l]=Rn(o,t,n.zone);return a!==0&&(u+=a,l=n.zone.offset(u)),{ts:u,o:l}}function se(n,e,t,r,s,i){const{setZone:a,zone:o}=t;if(n&&Object.keys(n).length!==0||e){const u=e||o,l=f.fromObject(n,{...t,zone:u,specificOffset:i});return a?l:l.setZone(o)}else return f.invalid(new W("unparsable",`the input "${s}" can't be parsed as ${r}`))}function Le(n,e,t=!0){return n.isValid?M.create(p.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(n,e):null}function dt(n,e,t){const r=n.c.year>9999||n.c.year<0;let s="";if(r&&n.c.year>=0&&(s+="+"),s+=O(n.c.year,r?6:4),t==="year")return s;if(e){if(s+="-",s+=O(n.c.month),t==="month")return s;s+="-"}else if(s+=O(n.c.month),t==="month")return s;return s+=O(n.c.day),s}function Hn(n,e,t,r,s,i,a){let o=!t||n.c.millisecond!==0||n.c.second!==0,u="";switch(a){case"day":case"month":case"year":break;default:if(u+=O(n.c.hour),a==="hour")break;if(e){if(u+=":",u+=O(n.c.minute),a==="minute")break;o&&(u+=":",u+=O(n.c.second))}else{if(u+=O(n.c.minute),a==="minute")break;o&&(u+=O(n.c.second))}if(a==="second")break;o&&(!r||n.c.millisecond!==0)&&(u+=".",u+=O(n.c.millisecond,3))}return s&&(n.isOffsetFixed&&n.offset===0&&!i?u+="Z":n.o<0?(u+="-",u+=O(Math.trunc(-n.o/60)),u+=":",u+=O(Math.trunc(-n.o%60))):(u+="+",u+=O(Math.trunc(n.o/60)),u+=":",u+=O(Math.trunc(n.o%60)))),i&&(u+="["+n.zone.ianaName+"]"),u}const Yn={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},_s={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Gs={ordinal:1,hour:0,minute:0,second:0,millisecond:0},$e=["year","month","day","hour","minute","second","millisecond"],Js=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],js=["year","ordinal","hour","minute","second","millisecond"];function Ae(n){const e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[n.toLowerCase()];if(!e)throw new wt(n);return e}function Pn(n){switch(n.toLowerCase()){case"localweekday":case"localweekdays":return"localWeekday";case"localweeknumber":case"localweeknumbers":return"localWeekNumber";case"localweekyear":case"localweekyears":return"localWeekYear";default:return Ae(n)}}function Bs(n){if(ye===void 0&&(ye=k.now()),n.type!=="iana")return n.offset(ye);const e=n.name;let t=ht.get(e);return t===void 0&&(t=n.offset(ye),ht.set(e,t)),t}function _n(n,e){const t=R(e.zone,k.defaultZone);if(!t.isValid)return f.invalid(me(t));const r=p.fromObject(e);let s,i;if(m(n.year))s=k.now();else{for(const u of $e)m(n[u])&&(n[u]=Yn[u]);const a=nn(n)||rn(n);if(a)return f.invalid(a);const o=Bs(t);[s,i]=We(n,o,t)}return new f({ts:s,zone:t,loc:r,o:i})}function Gn(n,e,t){const r=m(t.round)?!0:t.round,s=m(t.rounding)?"trunc":t.rounding,i=(o,u)=>(o=rt(o,r||t.calendary?0:2,t.calendary?"round":s),e.loc.clone(t).relFormatter(t).format(o,u)),a=o=>t.calendary?e.hasSame(n,o)?0:e.startOf(o).diff(n.startOf(o),o).get(o):e.diff(n,o).get(o);if(t.unit)return i(a(t.unit),t.unit);for(const o of t.units){const u=a(o);if(Math.abs(u)>=1)return i(u,o)}return i(n>e?-0:0,t.units[t.units.length-1])}function Jn(n){let e={},t;return n.length>0&&typeof n[n.length-1]=="object"?(e=n[n.length-1],t=Array.from(n).slice(0,n.length-1)):t=Array.from(n),[e,t]}let ye;const ht=new Map;class f{constructor(e){const t=e.zone||k.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new W("invalid input"):null)||(t.isValid?null:me(t));this.ts=m(e.ts)?k.now():e.ts;let s=null,i=null;if(!r)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,i]=[e.old.c,e.old.o];else{const o=q(e.o)&&!e.old?e.o:t.offset(this.ts);s=Ve(this.ts,o),r=Number.isNaN(s.year)?new W("invalid input"):null,s=r?null:s,i=r?null:o}this._zone=t,this.loc=e.loc||p.create(),this.invalid=r,this.weekData=null,this.localWeekData=null,this.c=s,this.o=i,this.isLuxonDateTime=!0}static now(){return new f({})}static local(){const[e,t]=Jn(arguments),[r,s,i,a,o,u,l]=t;return _n({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static utc(){const[e,t]=Jn(arguments),[r,s,i,a,o,u,l]=t;return e.zone=N.utcInstance,_n({year:r,month:s,day:i,hour:a,minute:o,second:u,millisecond:l},e)}static fromJSDate(e,t={}){const r=xr(e)?e.valueOf():NaN;if(Number.isNaN(r))return f.invalid("invalid input");const s=R(t.zone,k.defaultZone);return s.isValid?new f({ts:r,zone:s,loc:p.fromObject(t)}):f.invalid(me(s))}static fromMillis(e,t={}){if(q(e))return e<-zn||e>zn?f.invalid("Timestamp out of range"):new f({ts:e,zone:R(t.zone,k.defaultZone),loc:p.fromObject(t)});throw new v(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(q(e))return new f({ts:e*1e3,zone:R(t.zone,k.defaultZone),loc:p.fromObject(t)});throw new v("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=R(t.zone,k.defaultZone);if(!r.isValid)return f.invalid(me(r));const s=p.fromObject(t),i=xe(e,Pn),{minDaysInFirstWeek:a,startOfWeek:o}=tn(i,s),u=k.now(),l=m(t.specificOffset)?r.offset(u):t.specificOffset,d=!m(i.ordinal),y=!m(i.year),T=!m(i.month)||!m(i.day),h=y||T,I=i.weekYear||i.weekNumber;if((h||d)&&I)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(T&&d)throw new J("Can't mix ordinal dates with month/day");const $=I||i.weekday&&!h;let A,ie,we=Ve(u,l);$?(A=Js,ie=_s,we=ve(we,a,o)):d?(A=js,ie=Gs,we=et(we)):(A=$e,ie=Yn);let Qn=!1;for(const Te of A){const ii=i[Te];m(ii)?Qn?i[Te]=ie[Te]:i[Te]=we[Te]:Qn=!0}const ti=$?Nr(i,a,o):d?Er(i):nn(i),Kn=ti||rn(i);if(Kn)return f.invalid(Kn);const ni=$?Xt(i,a,o):d?en(i):i,[ri,si]=We(ni,l,r),pe=new f({ts:ri,zone:r,o:si,loc:s});return i.weekday&&h&&e.weekday!==pe.weekday?f.invalid("mismatched weekday",`you can't specify both a weekday of ${i.weekday} and a date of ${pe.toISO()}`):pe.isValid?pe:f.invalid(pe.invalid)}static fromISO(e,t={}){const[r,s]=ps(e);return se(r,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,s]=Ts(e);return se(r,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,s]=ks(e);return se(r,s,t,"HTTP",t)}static fromFormat(e,t,r={}){if(m(e)||m(t))throw new v("fromFormat requires an input string and a format");const{locale:s=null,numberingSystem:i=null}=r,a=p.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0}),[o,u,l,d]=Ps(a,e,t);return d?f.invalid(d):se(o,u,r,`format ${t}`,e,l)}static fromString(e,t,r={}){return f.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,s]=Es(e);return se(r,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new v("need to specify a reason the DateTime is invalid");const r=e instanceof W?e:new W(e,t);if(k.throwOnInvalid)throw new er(r);return new f({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=Un(e,p.fromObject(t));return r?r.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return $n(M.parseFormat(e),p.fromObject(t)).map(s=>s.val).join("")}static resetCache(){ye=void 0,ht.clear()}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?ct(this).weekYear:NaN}get weekNumber(){return this.isValid?ct(this).weekNumber:NaN}get weekday(){return this.isValid?ct(this).weekday:NaN}get isWeekend(){return this.isValid&&this.loc.getWeekendDays().includes(this.weekday)}get localWeekday(){return this.isValid?ft(this).weekday:NaN}get localWeekNumber(){return this.isValid?ft(this).weekNumber:NaN}get localWeekYear(){return this.isValid?ft(this).weekYear:NaN}get ordinal(){return this.isValid?et(this.c).ordinal:NaN}get monthShort(){return this.isValid?Fe.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Fe.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Fe.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Fe.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=Ee(this.c),s=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-s*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const u=r-a*t,l=r-o*t,d=Ve(u,a),y=Ve(l,o);return d.hour===y.hour&&d.minute===y.minute&&d.second===y.second&&d.millisecond===y.millisecond?[G(this,{ts:u}),G(this,{ts:l})]:[this]}get isInLeapYear(){return le(this.year)}get daysInMonth(){return Ne(this.year,this.month)}get daysInYear(){return this.isValid?B(this.year):NaN}get weeksInWeekYear(){return this.isValid?ce(this.weekYear):NaN}get weeksInLocalWeekYear(){return this.isValid?ce(this.localWeekYear,this.loc.getMinDaysInFirstWeek(),this.loc.getStartOfWeek()):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:s}=M.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(N.instance(e),t)}toLocal(){return this.setZone(k.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if(e=R(e,k.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||r){const i=e.offset(this.ts),a=this.toObject();[s]=We(a,i,e)}return G(this,{ts:s,zone:e})}else return f.invalid(me(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){const s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r});return G(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=xe(e,Pn),{minDaysInFirstWeek:r,startOfWeek:s}=tn(t,this.loc),i=!m(t.weekYear)||!m(t.weekNumber)||!m(t.weekday),a=!m(t.ordinal),o=!m(t.year),u=!m(t.month)||!m(t.day),l=o||u,d=t.weekYear||t.weekNumber;if((l||a)&&d)throw new J("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&a)throw new J("Can't mix ordinal dates with month/day");let y;i?y=Xt({...ve(this.c,r,s),...t},r,s):m(t.ordinal)?(y={...this.toObject(),...t},m(t.day)&&(y.day=Math.min(Ne(y.year,y.month),y.day))):y=en({...et(this.c),...t});const[T,h]=We(y,this.o,this.zone);return G(this,{ts:T,o:h})}plus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e);return G(this,qn(this,t))}minus(e){if(!this.isValid)return this;const t=g.fromDurationLike(e).negate();return G(this,qn(this,t))}startOf(e,{useLocaleWeeks:t=!1}={}){if(!this.isValid)return this;const r={},s=g.normalizeUnit(e);switch(s){case"years":r.month=1;case"quarters":case"months":r.day=1;case"weeks":case"days":r.hour=0;case"hours":r.minute=0;case"minutes":r.second=0;case"seconds":r.millisecond=0;break}if(s==="weeks")if(t){const i=this.loc.getStartOfWeek(),{weekday:a}=this;a<i&&(r.weekNumber=this.weekNumber-1),r.weekday=i}else r.weekday=1;if(s==="quarters"){const i=Math.ceil(this.month/3);r.month=(i-1)*3+1}return this.set(r)}endOf(e,t){return this.isValid?this.plus({[e]:1}).startOf(e,t).minus(1):this}toFormat(e,t={}){return this.isValid?M.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):lt}toLocaleString(e=Se,t={}){return this.isValid?M.create(this.loc.clone(t),e).formatDateTime(this):lt}toLocaleParts(e={}){return this.isValid?M.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:s=!0,extendedZone:i=!1,precision:a="milliseconds"}={}){if(!this.isValid)return null;a=Ae(a);const o=e==="extended";let u=dt(this,o,a);return $e.indexOf(a)>=3&&(u+="T"),u+=Hn(this,o,t,r,s,i,a),u}toISODate({format:e="extended",precision:t="day"}={}){return this.isValid?dt(this,e==="extended",Ae(t)):null}toISOWeekDate(){return Le(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:s=!1,extendedZone:i=!1,format:a="extended",precision:o="milliseconds"}={}){return this.isValid?(o=Ae(o),(s&&$e.indexOf(o)>=3?"T":"")+Hn(this,a==="extended",t,e,r,i,o)):null}toRFC2822(){return Le(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return Le(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?dt(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(r&&(s+=" "),t?s+="z":e&&(s+="ZZ")),Le(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():lt}[Symbol.for("nodejs.util.inspect.custom")](){return this.isValid?`DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`:`DateTime { Invalid, reason: ${this.invalidReason} }`}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return g.invalid("created by diffing an invalid DateTime");const s={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=br(t).map(g.normalizeUnit),a=e.valueOf()>this.valueOf(),o=a?this:e,u=a?e:this,l=Vs(o,u,i,s);return a?l.negate():l}diffNow(e="milliseconds",t={}){return this.diff(f.now(),e,t)}until(e){return this.isValid?S.fromDateTimes(this,e):this}hasSame(e,t,r){if(!this.isValid)return!1;const s=e.valueOf(),i=this.setZone(e.zone,{keepLocalTime:!0});return i.startOf(t,r)<=s&&s<=i.endOf(t,r)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||f.fromObject({},{zone:this.zone}),r=e.padding?this<t?-e.padding:e.padding:0;let s=["years","months","days","hours","minutes","seconds"],i=e.unit;return Array.isArray(e.unit)&&(s=e.unit,i=void 0),Gn(t,this.plus(r),{...e,numeric:"always",units:s,unit:i})}toRelativeCalendar(e={}){return this.isValid?Gn(e.base||f.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(f.isDateTime))throw new v("min requires all arguments be DateTimes");return on(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(f.isDateTime))throw new v("max requires all arguments be DateTimes");return on(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:s=null,numberingSystem:i=null}=r,a=p.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});return Zn(a,e,t)}static fromStringExplain(e,t,r={}){return f.fromFormatExplain(e,t,r)}static buildFormatParser(e,t={}){const{locale:r=null,numberingSystem:s=null}=t,i=p.fromOpts({locale:r,numberingSystem:s,defaultToEN:!0});return new An(i,e)}static fromFormatParser(e,t,r={}){if(m(e)||m(t))throw new v("fromFormatParser requires an input string and a format parser");const{locale:s=null,numberingSystem:i=null}=r,a=p.fromOpts({locale:s,numberingSystem:i,defaultToEN:!0});if(!a.equals(t.locale))throw new v(`fromFormatParser called with a locale of ${a}, but the format parser was created for ${t.locale}`);const{result:o,zone:u,specificOffset:l,invalidReason:d}=t.explainFromTokens(e);return d?f.invalid(d):se(o,u,r,`format ${t.format}`,e,l)}static get DATE_SHORT(){return Se}static get DATE_MED(){return pt}static get DATE_MED_WITH_WEEKDAY(){return rr}static get DATE_FULL(){return Tt}static get DATE_HUGE(){return kt}static get TIME_SIMPLE(){return St}static get TIME_WITH_SECONDS(){return Ot}static get TIME_WITH_SHORT_OFFSET(){return It}static get TIME_WITH_LONG_OFFSET(){return vt}static get TIME_24_SIMPLE(){return Mt}static get TIME_24_WITH_SECONDS(){return Nt}static get TIME_24_WITH_SHORT_OFFSET(){return Et}static get TIME_24_WITH_LONG_OFFSET(){return Dt}static get DATETIME_SHORT(){return xt}static get DATETIME_SHORT_WITH_SECONDS(){return bt}static get DATETIME_MED(){return Ft}static get DATETIME_MED_WITH_SECONDS(){return Ct}static get DATETIME_MED_WITH_WEEKDAY(){return sr}static get DATETIME_FULL(){return Vt}static get DATETIME_FULL_WITH_SECONDS(){return Wt}static get DATETIME_HUGE(){return Lt}static get DATETIME_HUGE_WITH_SECONDS(){return $t}}function ge(n){if(f.isDateTime(n))return n;if(n&&n.valueOf&&q(n.valueOf()))return f.fromJSDate(n);if(n&&typeof n=="object")return f.fromObject(n);throw new v(`Unknown datetime argument: ${n}, of type ${typeof n}`)}const jn={LOCAL_INPUT_FORMAT:"yyyy-MM-dd'T'HH:mm"},mt=ae.z.preprocess(n=>n instanceof Date?n.toISOString():typeof n=="object"&&n!==null&&"toUTC"in n&&typeof n.toUTC=="function"?n.toUTC().toISO():n,ae.z.iso.datetime()),Bn=({iso:n})=>`${f.fromISO(n,{zone:"utc"}).toFormat("yyyy-MM-dd HH:mm")} UTC`,yt=({iso:n})=>n?f.fromISO(n).toLocal().toFormat(jn.LOCAL_INPUT_FORMAT):void 0,Ze="__AWAITIO__",Qs=n=>{const e=window[Ze],t=document.currentScript,r=t instanceof HTMLScriptElement?t.dataset.type:void 0;if(!e||!r)throw new Error("A component UI script must be loaded by the AwaitIO UI.");e.registerComponent(r,n)},Ks=n=>{const e=window[Ze],t=document.currentScript,r=t instanceof HTMLScriptElement?t.dataset.type:void 0;if(!e||!r)throw new Error("A display component UI script must be loaded by the AwaitIO UI.");e.registerDisplay(r,n)},Xs=n=>{const e=window[Ze],t=document.currentScript,r=t instanceof HTMLScriptElement?t.dataset.type:void 0;if(!e||!r)throw new Error("A layout UI script must be loaded by the AwaitIO UI.");e.registerLayout(r,n)},ei=n=>{const e=window[Ze],t=document.currentScript,r=t instanceof HTMLScriptElement?t.dataset.type:void 0;if(!e||!r)throw new Error("A theme UI script must be loaded by the AwaitIO UI.");e.registerTheme(r,n)},F=Xn({props:ae.z.object({helpText:ae.z.string().optional(),defaultValue:mt.optional(),min:mt.optional(),max:mt.optional()}),returns:ae.z.iso.datetime({error:"pick a date and time"}).transform(n=>f.fromISO(n,{zone:"utc"})),initialValue:n=>n.defaultValue??"",validate:({label:n,props:e,value:t})=>e.min&&t<f.fromISO(e.min).startOf("minute")?`${n} must not be earlier than ${Bn({iso:e.min})}.`:e.max&&t>f.fromISO(e.max).endOf("minute")?`${n} must not be later than ${Bn({iso:e.max})}.`:null,component:({props:n,value:e,onChange:t,disabled:r,autoFocus:s,optional:i})=>ke.jsxs(ke.Fragment,{children:[ke.jsx(gt.Input,{type:"datetime-local",value:yt({iso:e})??"",min:yt({iso:n.min}),max:yt({iso:n.max}),required:!i,disabled:r,autoFocus:s,onChange:a=>{const o=f.fromFormat(a,jn.LOCAL_INPUT_FORMAT);t(o.isValid?o.toUTC().toISO()??"":"")}}),ke.jsxs(gt.Hint,{children:["Time zone: ",f.local().zoneName]})]})});return Object.values(F).every(n=>n&&n.kind==="awaitio-theme-block")?ei({blocks:Object.fromEntries(Object.entries(F).map(([n,e])=>[n,e.component]))}):F.kind==="awaitio-layout"?Xs({component:F.component}):F.kind==="awaitio-display"?Ks({component:F.component,wrap:F.wrap??!0}):Qs({component:F.component,initialValue:F.initialValue,wrap:F.wrap??!0,submitButton:F.submitButton??!0}),Ue.inputDatetime=F,Object.defineProperty(Ue,Symbol.toStringTag,{value:"Module"}),Ue})({},__AWAITIO__.jsxRuntime,__AWAITIO__.ui,__AWAITIO__.zod);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formatUtc.d.ts","sourceRoot":"","sources":["../../src/utils/formatUtc.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,aAAa,GAAG;IAC1B,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,SAAS,YAAa,aAAa,WAE/C,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.formatUtc = void 0;
|
|
4
|
+
const luxon_1 = require("luxon");
|
|
5
|
+
const formatUtc = ({ iso }) => {
|
|
6
|
+
return `${luxon_1.DateTime.fromISO(iso, { zone: 'utc' }).toFormat('yyyy-MM-dd HH:mm')} UTC`;
|
|
7
|
+
};
|
|
8
|
+
exports.formatUtc = formatUtc;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toLocalInputValue.d.ts","sourceRoot":"","sources":["../../src/utils/toLocalInputValue.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB,CAAC;AAGF,eAAO,MAAM,iBAAiB,YAAa,qBAAqB,uBAE/D,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.toLocalInputValue = void 0;
|
|
4
|
+
const luxon_1 = require("luxon");
|
|
5
|
+
const constants_1 = require("../constants");
|
|
6
|
+
// The value is an ISO string in UTC (what the server parses); the input shows and edits it in local time.
|
|
7
|
+
const toLocalInputValue = ({ iso }) => {
|
|
8
|
+
return iso ? luxon_1.DateTime.fromISO(iso).toLocal().toFormat(constants_1.constants.LOCAL_INPUT_FORMAT) : undefined;
|
|
9
|
+
};
|
|
10
|
+
exports.toLocalInputValue = toLocalInputValue;
|
package/package.json
CHANGED
|
@@ -1,6 +1,40 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@awaitio/input-datetime",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Date and time input for AwaitIO: io.input.datetime(), returns a luxon DateTime.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
6
|
+
"main": "dist/index.js",
|
|
7
|
+
"types": "dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"peerDependencies": {
|
|
12
|
+
"zod": "^3.25.0 || ^4.0.0",
|
|
13
|
+
"awaitio": "^1.0.0"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"luxon": "^3.7.2",
|
|
17
|
+
"react": "^19.1.0"
|
|
18
|
+
},
|
|
19
|
+
"devDependencies": {
|
|
20
|
+
"@types/luxon": "^3.7.1",
|
|
21
|
+
"@types/node": "^22.14.0",
|
|
22
|
+
"@types/react": "^19.1.0",
|
|
23
|
+
"@typescript/native": "npm:typescript@^7.0.2",
|
|
24
|
+
"@vitejs/plugin-react": "^5.0.0",
|
|
25
|
+
"typescript": "npm:@typescript/typescript6@^6.0.2",
|
|
26
|
+
"vite": "^7.1.0",
|
|
27
|
+
"vitest": "^3.2.0",
|
|
28
|
+
"zod": "^4.3.6",
|
|
29
|
+
"awaitio": "1.0.0"
|
|
30
|
+
},
|
|
31
|
+
"scripts": {
|
|
32
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json && vite build",
|
|
33
|
+
"dev": "tsc -p tsconfig.build.json --watch --preserveWatchOutput & vite build --watch",
|
|
34
|
+
"tsc": "tsc --noEmit",
|
|
35
|
+
"lint": "eslint .",
|
|
36
|
+
"lint:fix": "eslint . --fix",
|
|
37
|
+
"test": "vitest run",
|
|
38
|
+
"release": "pnpm build && pnpm publish --access public --no-git-checks"
|
|
39
|
+
}
|
|
6
40
|
}
|