Files
cours/.obsidian/plugins/time-ruler/main.js

73485 lines
2.9 MiB
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
if you want to view the source, please visit the github repository of this plugin
*/
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
var __commonJS = (cb, mod) => function __require() {
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from, except, desc) => {
if (from && typeof from === "object" || typeof from === "function") {
for (let key2 of __getOwnPropNames(from))
if (!__hasOwnProp.call(to, key2) && key2 !== except)
__defProp(to, key2, { get: () => from[key2], enumerable: !(desc = __getOwnPropDesc(from, key2)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __publicField = (obj, key2, value) => {
__defNormalProp(obj, typeof key2 !== "symbol" ? key2 + "" : key2, value);
return value;
};
// node_modules/.pnpm/obsidian-dataview@0.5.68/node_modules/obsidian-dataview/lib/index.js
var require_lib = __commonJS({
"node_modules/.pnpm/obsidian-dataview@0.5.68/node_modules/obsidian-dataview/lib/index.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
require("obsidian");
var LuxonError2 = class extends Error {
};
var InvalidDateTimeError2 = class extends LuxonError2 {
constructor(reason) {
super(`Invalid DateTime: ${reason.toMessage()}`);
}
};
var InvalidIntervalError2 = class extends LuxonError2 {
constructor(reason) {
super(`Invalid Interval: ${reason.toMessage()}`);
}
};
var InvalidDurationError2 = class extends LuxonError2 {
constructor(reason) {
super(`Invalid Duration: ${reason.toMessage()}`);
}
};
var ConflictingSpecificationError2 = class extends LuxonError2 {
};
var InvalidUnitError2 = class extends LuxonError2 {
constructor(unit) {
super(`Invalid unit ${unit}`);
}
};
var InvalidArgumentError2 = class extends LuxonError2 {
};
var ZoneIsAbstractError2 = class extends LuxonError2 {
constructor() {
super("Zone is an abstract class");
}
};
var n2 = "numeric";
var s2 = "short";
var l2 = "long";
var DATE_SHORT2 = {
year: n2,
month: n2,
day: n2
};
var DATE_MED2 = {
year: n2,
month: s2,
day: n2
};
var DATE_MED_WITH_WEEKDAY2 = {
year: n2,
month: s2,
day: n2,
weekday: s2
};
var DATE_FULL2 = {
year: n2,
month: l2,
day: n2
};
var DATE_HUGE2 = {
year: n2,
month: l2,
day: n2,
weekday: l2
};
var TIME_SIMPLE2 = {
hour: n2,
minute: n2
};
var TIME_WITH_SECONDS2 = {
hour: n2,
minute: n2,
second: n2
};
var TIME_WITH_SHORT_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
timeZoneName: s2
};
var TIME_WITH_LONG_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
timeZoneName: l2
};
var TIME_24_SIMPLE2 = {
hour: n2,
minute: n2,
hourCycle: "h23"
};
var TIME_24_WITH_SECONDS2 = {
hour: n2,
minute: n2,
second: n2,
hourCycle: "h23"
};
var TIME_24_WITH_SHORT_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
hourCycle: "h23",
timeZoneName: s2
};
var TIME_24_WITH_LONG_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
hourCycle: "h23",
timeZoneName: l2
};
var DATETIME_SHORT2 = {
year: n2,
month: n2,
day: n2,
hour: n2,
minute: n2
};
var DATETIME_SHORT_WITH_SECONDS2 = {
year: n2,
month: n2,
day: n2,
hour: n2,
minute: n2,
second: n2
};
var DATETIME_MED2 = {
year: n2,
month: s2,
day: n2,
hour: n2,
minute: n2
};
var DATETIME_MED_WITH_SECONDS2 = {
year: n2,
month: s2,
day: n2,
hour: n2,
minute: n2,
second: n2
};
var DATETIME_MED_WITH_WEEKDAY2 = {
year: n2,
month: s2,
day: n2,
weekday: s2,
hour: n2,
minute: n2
};
var DATETIME_FULL2 = {
year: n2,
month: l2,
day: n2,
hour: n2,
minute: n2,
timeZoneName: s2
};
var DATETIME_FULL_WITH_SECONDS2 = {
year: n2,
month: l2,
day: n2,
hour: n2,
minute: n2,
second: n2,
timeZoneName: s2
};
var DATETIME_HUGE2 = {
year: n2,
month: l2,
day: n2,
weekday: l2,
hour: n2,
minute: n2,
timeZoneName: l2
};
var DATETIME_HUGE_WITH_SECONDS2 = {
year: n2,
month: l2,
day: n2,
weekday: l2,
hour: n2,
minute: n2,
second: n2,
timeZoneName: l2
};
var Zone2 = class {
/**
* The type of zone
* @abstract
* @type {string}
*/
get type() {
throw new ZoneIsAbstractError2();
}
/**
* The name of this zone.
* @abstract
* @type {string}
*/
get name() {
throw new ZoneIsAbstractError2();
}
get ianaName() {
return this.name;
}
/**
* Returns whether the offset is known to be fixed for the whole year.
* @abstract
* @type {boolean}
*/
get isUniversal() {
throw new ZoneIsAbstractError2();
}
/**
* Returns the offset's common name (such as EST) at the specified timestamp
* @abstract
* @param {number} ts - Epoch milliseconds for which to get the name
* @param {Object} opts - Options to affect the format
* @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
* @param {string} opts.locale - What locale to return the offset name in.
* @return {string}
*/
offsetName(ts, opts) {
throw new ZoneIsAbstractError2();
}
/**
* Returns the offset's value as a string
* @abstract
* @param {number} ts - Epoch milliseconds for which to get the offset
* @param {string} format - What style of offset to return.
* Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
* @return {string}
*/
formatOffset(ts, format) {
throw new ZoneIsAbstractError2();
}
/**
* Return the offset in minutes for this zone at the specified timestamp.
* @abstract
* @param {number} ts - Epoch milliseconds for which to compute the offset
* @return {number}
*/
offset(ts) {
throw new ZoneIsAbstractError2();
}
/**
* Return whether this Zone is equal to another zone
* @abstract
* @param {Zone} otherZone - the zone to compare
* @return {boolean}
*/
equals(otherZone) {
throw new ZoneIsAbstractError2();
}
/**
* Return whether this Zone is valid.
* @abstract
* @type {boolean}
*/
get isValid() {
throw new ZoneIsAbstractError2();
}
};
var singleton$1 = null;
var SystemZone2 = class _SystemZone extends Zone2 {
/**
* Get a singleton instance of the local zone
* @return {SystemZone}
*/
static get instance() {
if (singleton$1 === null) {
singleton$1 = new _SystemZone();
}
return singleton$1;
}
/** @override **/
get type() {
return "system";
}
/** @override **/
get name() {
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
}
/** @override **/
get isUniversal() {
return false;
}
/** @override **/
offsetName(ts, { format, locale }) {
return parseZoneInfo2(ts, format, locale);
}
/** @override **/
formatOffset(ts, format) {
return formatOffset2(this.offset(ts), format);
}
/** @override **/
offset(ts) {
return -new Date(ts).getTimezoneOffset();
}
/** @override **/
equals(otherZone) {
return otherZone.type === "system";
}
/** @override **/
get isValid() {
return true;
}
};
var dtfCache2 = {};
function makeDTF2(zone) {
if (!dtfCache2[zone]) {
dtfCache2[zone] = new Intl.DateTimeFormat("en-US", {
hour12: false,
timeZone: zone,
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
era: "short"
});
}
return dtfCache2[zone];
}
var typeToPos2 = {
year: 0,
month: 1,
day: 2,
era: 3,
hour: 4,
minute: 5,
second: 6
};
function hackyOffset2(dtf, date) {
const formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;
return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];
}
function partsOffset2(dtf, date) {
const formatted = dtf.formatToParts(date);
const filled = [];
for (let i = 0; i < formatted.length; i++) {
const { type, value } = formatted[i];
const pos = typeToPos2[type];
if (type === "era") {
filled[pos] = value;
} else if (!isUndefined2(pos)) {
filled[pos] = parseInt(value, 10);
}
}
return filled;
}
var ianaZoneCache2 = {};
var IANAZone2 = class _IANAZone extends Zone2 {
/**
* @param {string} name - Zone name
* @return {IANAZone}
*/
static create(name) {
if (!ianaZoneCache2[name]) {
ianaZoneCache2[name] = new _IANAZone(name);
}
return ianaZoneCache2[name];
}
/**
* Reset local caches. Should only be necessary in testing scenarios.
* @return {void}
*/
static resetCache() {
ianaZoneCache2 = {};
dtfCache2 = {};
}
/**
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
* @param {string} s - The string to check validity on
* @example IANAZone.isValidSpecifier("America/New_York") //=> true
* @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
* @deprecated This method returns false for some valid IANA names. Use isValidZone instead.
* @return {boolean}
*/
static isValidSpecifier(s3) {
return this.isValidZone(s3);
}
/**
* Returns whether the provided string identifies a real zone
* @param {string} zone - The string to check
* @example IANAZone.isValidZone("America/New_York") //=> true
* @example IANAZone.isValidZone("Fantasia/Castle") //=> false
* @example IANAZone.isValidZone("Sport~~blorp") //=> false
* @return {boolean}
*/
static isValidZone(zone) {
if (!zone) {
return false;
}
try {
new Intl.DateTimeFormat("en-US", { timeZone: zone }).format();
return true;
} catch (e) {
return false;
}
}
constructor(name) {
super();
this.zoneName = name;
this.valid = _IANAZone.isValidZone(name);
}
/** @override **/
get type() {
return "iana";
}
/** @override **/
get name() {
return this.zoneName;
}
/** @override **/
get isUniversal() {
return false;
}
/** @override **/
offsetName(ts, { format, locale }) {
return parseZoneInfo2(ts, format, locale, this.name);
}
/** @override **/
formatOffset(ts, format) {
return formatOffset2(this.offset(ts), format);
}
/** @override **/
offset(ts) {
const date = new Date(ts);
if (isNaN(date))
return NaN;
const dtf = makeDTF2(this.name);
let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset2(dtf, date) : hackyOffset2(dtf, date);
if (adOrBc === "BC") {
year = -Math.abs(year) + 1;
}
const adjustedHour = hour === 24 ? 0 : hour;
const asUTC = objToLocalTS2({
year,
month,
day,
hour: adjustedHour,
minute,
second,
millisecond: 0
});
let asTS = +date;
const over = asTS % 1e3;
asTS -= over >= 0 ? over : 1e3 + over;
return (asUTC - asTS) / (60 * 1e3);
}
/** @override **/
equals(otherZone) {
return otherZone.type === "iana" && otherZone.name === this.name;
}
/** @override **/
get isValid() {
return this.valid;
}
};
var intlLFCache2 = {};
function getCachedLF2(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let dtf = intlLFCache2[key2];
if (!dtf) {
dtf = new Intl.ListFormat(locString, opts);
intlLFCache2[key2] = dtf;
}
return dtf;
}
var intlDTCache2 = {};
function getCachedDTF2(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let dtf = intlDTCache2[key2];
if (!dtf) {
dtf = new Intl.DateTimeFormat(locString, opts);
intlDTCache2[key2] = dtf;
}
return dtf;
}
var intlNumCache2 = {};
function getCachedINF2(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let inf = intlNumCache2[key2];
if (!inf) {
inf = new Intl.NumberFormat(locString, opts);
intlNumCache2[key2] = inf;
}
return inf;
}
var intlRelCache2 = {};
function getCachedRTF2(locString, opts = {}) {
const { base, ...cacheKeyOpts } = opts;
const key2 = JSON.stringify([locString, cacheKeyOpts]);
let inf = intlRelCache2[key2];
if (!inf) {
inf = new Intl.RelativeTimeFormat(locString, opts);
intlRelCache2[key2] = inf;
}
return inf;
}
var sysLocaleCache2 = null;
function systemLocale2() {
if (sysLocaleCache2) {
return sysLocaleCache2;
} else {
sysLocaleCache2 = new Intl.DateTimeFormat().resolvedOptions().locale;
return sysLocaleCache2;
}
}
function parseLocaleString2(localeStr) {
const xIndex = localeStr.indexOf("-x-");
if (xIndex !== -1) {
localeStr = localeStr.substring(0, xIndex);
}
const uIndex = localeStr.indexOf("-u-");
if (uIndex === -1) {
return [localeStr];
} else {
let options;
let selectedStr;
try {
options = getCachedDTF2(localeStr).resolvedOptions();
selectedStr = localeStr;
} catch (e) {
const smaller = localeStr.substring(0, uIndex);
options = getCachedDTF2(smaller).resolvedOptions();
selectedStr = smaller;
}
const { numberingSystem, calendar } = options;
return [selectedStr, numberingSystem, calendar];
}
}
function intlConfigString2(localeStr, numberingSystem, outputCalendar) {
if (outputCalendar || numberingSystem) {
if (!localeStr.includes("-u-")) {
localeStr += "-u";
}
if (outputCalendar) {
localeStr += `-ca-${outputCalendar}`;
}
if (numberingSystem) {
localeStr += `-nu-${numberingSystem}`;
}
return localeStr;
} else {
return localeStr;
}
}
function mapMonths2(f) {
const ms = [];
for (let i = 1; i <= 12; i++) {
const dt = DateTime2.utc(2009, i, 1);
ms.push(f(dt));
}
return ms;
}
function mapWeekdays2(f) {
const ms = [];
for (let i = 1; i <= 7; i++) {
const dt = DateTime2.utc(2016, 11, 13 + i);
ms.push(f(dt));
}
return ms;
}
function listStuff2(loc, length, englishFn, intlFn) {
const mode = loc.listingMode();
if (mode === "error") {
return null;
} else if (mode === "en") {
return englishFn(length);
} else {
return intlFn(length);
}
}
function supportsFastNumbers2(loc) {
if (loc.numberingSystem && loc.numberingSystem !== "latn") {
return false;
} else {
return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn";
}
}
var PolyNumberFormatter2 = class {
constructor(intl, forceSimple, opts) {
this.padTo = opts.padTo || 0;
this.floor = opts.floor || false;
const { padTo, floor, ...otherOpts } = opts;
if (!forceSimple || Object.keys(otherOpts).length > 0) {
const intlOpts = { useGrouping: false, ...opts };
if (opts.padTo > 0)
intlOpts.minimumIntegerDigits = opts.padTo;
this.inf = getCachedINF2(intl, intlOpts);
}
}
format(i) {
if (this.inf) {
const fixed = this.floor ? Math.floor(i) : i;
return this.inf.format(fixed);
} else {
const fixed = this.floor ? Math.floor(i) : roundTo2(i, 3);
return padStart2(fixed, this.padTo);
}
}
};
var PolyDateFormatter2 = class {
constructor(dt, intl, opts) {
this.opts = opts;
this.originalZone = void 0;
let z = void 0;
if (this.opts.timeZone) {
this.dt = dt;
} else if (dt.zone.type === "fixed") {
const gmtOffset = -1 * (dt.offset / 60);
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
if (dt.offset !== 0 && IANAZone2.create(offsetZ).valid) {
z = offsetZ;
this.dt = dt;
} else {
z = "UTC";
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
this.originalZone = dt.zone;
}
} else if (dt.zone.type === "system") {
this.dt = dt;
} else if (dt.zone.type === "iana") {
this.dt = dt;
z = dt.zone.name;
} else {
z = "UTC";
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
this.originalZone = dt.zone;
}
const intlOpts = { ...this.opts };
intlOpts.timeZone = intlOpts.timeZone || z;
this.dtf = getCachedDTF2(intl, intlOpts);
}
format() {
if (this.originalZone) {
return this.formatToParts().map(({ value }) => value).join("");
}
return this.dtf.format(this.dt.toJSDate());
}
formatToParts() {
const parts = this.dtf.formatToParts(this.dt.toJSDate());
if (this.originalZone) {
return parts.map((part) => {
if (part.type === "timeZoneName") {
const offsetName = this.originalZone.offsetName(this.dt.ts, {
locale: this.dt.locale,
format: this.opts.timeZoneName
});
return {
...part,
value: offsetName
};
} else {
return part;
}
});
}
return parts;
}
resolvedOptions() {
return this.dtf.resolvedOptions();
}
};
var PolyRelFormatter2 = class {
constructor(intl, isEnglish, opts) {
this.opts = { style: "long", ...opts };
if (!isEnglish && hasRelative2()) {
this.rtf = getCachedRTF2(intl, opts);
}
}
format(count, unit) {
if (this.rtf) {
return this.rtf.format(count, unit);
} else {
return formatRelativeTime2(unit, count, this.opts.numeric, this.opts.style !== "long");
}
}
formatToParts(count, unit) {
if (this.rtf) {
return this.rtf.formatToParts(count, unit);
} else {
return [];
}
}
};
var Locale2 = class _Locale {
static fromOpts(opts) {
return _Locale.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);
}
static create(locale, numberingSystem, outputCalendar, defaultToEN = false) {
const specifiedLocale = locale || Settings2.defaultLocale;
const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale2());
const numberingSystemR = numberingSystem || Settings2.defaultNumberingSystem;
const outputCalendarR = outputCalendar || Settings2.defaultOutputCalendar;
return new _Locale(localeR, numberingSystemR, outputCalendarR, specifiedLocale);
}
static resetCache() {
sysLocaleCache2 = null;
intlDTCache2 = {};
intlNumCache2 = {};
intlRelCache2 = {};
}
static fromObject({ locale, numberingSystem, outputCalendar } = {}) {
return _Locale.create(locale, numberingSystem, outputCalendar);
}
constructor(locale, numbering, outputCalendar, specifiedLocale) {
const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString2(locale);
this.locale = parsedLocale;
this.numberingSystem = numbering || parsedNumberingSystem || null;
this.outputCalendar = outputCalendar || parsedOutputCalendar || null;
this.intl = intlConfigString2(this.locale, this.numberingSystem, this.outputCalendar);
this.weekdaysCache = { format: {}, standalone: {} };
this.monthsCache = { format: {}, standalone: {} };
this.meridiemCache = null;
this.eraCache = {};
this.specifiedLocale = specifiedLocale;
this.fastNumbersCached = null;
}
get fastNumbers() {
if (this.fastNumbersCached == null) {
this.fastNumbersCached = supportsFastNumbers2(this);
}
return this.fastNumbersCached;
}
listingMode() {
const isActuallyEn = this.isEnglish();
const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
return isActuallyEn && hasNoWeirdness ? "en" : "intl";
}
clone(alts) {
if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
return this;
} else {
return _Locale.create(
alts.locale || this.specifiedLocale,
alts.numberingSystem || this.numberingSystem,
alts.outputCalendar || this.outputCalendar,
alts.defaultToEN || false
);
}
}
redefaultToEN(alts = {}) {
return this.clone({ ...alts, defaultToEN: true });
}
redefaultToSystem(alts = {}) {
return this.clone({ ...alts, defaultToEN: false });
}
months(length, format = false) {
return listStuff2(this, length, months2, () => {
const intl = format ? { month: length, day: "numeric" } : { month: length }, formatStr = format ? "format" : "standalone";
if (!this.monthsCache[formatStr][length]) {
this.monthsCache[formatStr][length] = mapMonths2((dt) => this.extract(dt, intl, "month"));
}
return this.monthsCache[formatStr][length];
});
}
weekdays(length, format = false) {
return listStuff2(this, length, weekdays2, () => {
const intl = format ? { weekday: length, year: "numeric", month: "long", day: "numeric" } : { weekday: length }, formatStr = format ? "format" : "standalone";
if (!this.weekdaysCache[formatStr][length]) {
this.weekdaysCache[formatStr][length] = mapWeekdays2(
(dt) => this.extract(dt, intl, "weekday")
);
}
return this.weekdaysCache[formatStr][length];
});
}
meridiems() {
return listStuff2(
this,
void 0,
() => meridiems2,
() => {
if (!this.meridiemCache) {
const intl = { hour: "numeric", hourCycle: "h12" };
this.meridiemCache = [DateTime2.utc(2016, 11, 13, 9), DateTime2.utc(2016, 11, 13, 19)].map(
(dt) => this.extract(dt, intl, "dayperiod")
);
}
return this.meridiemCache;
}
);
}
eras(length) {
return listStuff2(this, length, eras2, () => {
const intl = { era: length };
if (!this.eraCache[length]) {
this.eraCache[length] = [DateTime2.utc(-40, 1, 1), DateTime2.utc(2017, 1, 1)].map(
(dt) => this.extract(dt, intl, "era")
);
}
return this.eraCache[length];
});
}
extract(dt, intlOpts, field) {
const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field);
return matching ? matching.value : null;
}
numberFormatter(opts = {}) {
return new PolyNumberFormatter2(this.intl, opts.forceSimple || this.fastNumbers, opts);
}
dtFormatter(dt, intlOpts = {}) {
return new PolyDateFormatter2(dt, this.intl, intlOpts);
}
relFormatter(opts = {}) {
return new PolyRelFormatter2(this.intl, this.isEnglish(), opts);
}
listFormatter(opts = {}) {
return getCachedLF2(this.intl, opts);
}
isEnglish() {
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
}
equals(other) {
return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
}
};
var singleton3 = null;
var FixedOffsetZone2 = class _FixedOffsetZone extends Zone2 {
/**
* Get a singleton instance of UTC
* @return {FixedOffsetZone}
*/
static get utcInstance() {
if (singleton3 === null) {
singleton3 = new _FixedOffsetZone(0);
}
return singleton3;
}
/**
* Get an instance with a specified offset
* @param {number} offset - The offset in minutes
* @return {FixedOffsetZone}
*/
static instance(offset3) {
return offset3 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset3);
}
/**
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
* @param {string} s - The offset string to parse
* @example FixedOffsetZone.parseSpecifier("UTC+6")
* @example FixedOffsetZone.parseSpecifier("UTC+06")
* @example FixedOffsetZone.parseSpecifier("UTC-6:00")
* @return {FixedOffsetZone}
*/
static parseSpecifier(s3) {
if (s3) {
const r = s3.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
if (r) {
return new _FixedOffsetZone(signedOffset2(r[1], r[2]));
}
}
return null;
}
constructor(offset3) {
super();
this.fixed = offset3;
}
/** @override **/
get type() {
return "fixed";
}
/** @override **/
get name() {
return this.fixed === 0 ? "UTC" : `UTC${formatOffset2(this.fixed, "narrow")}`;
}
get ianaName() {
if (this.fixed === 0) {
return "Etc/UTC";
} else {
return `Etc/GMT${formatOffset2(-this.fixed, "narrow")}`;
}
}
/** @override **/
offsetName() {
return this.name;
}
/** @override **/
formatOffset(ts, format) {
return formatOffset2(this.fixed, format);
}
/** @override **/
get isUniversal() {
return true;
}
/** @override **/
offset() {
return this.fixed;
}
/** @override **/
equals(otherZone) {
return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
}
/** @override **/
get isValid() {
return true;
}
};
var InvalidZone2 = class extends Zone2 {
constructor(zoneName) {
super();
this.zoneName = zoneName;
}
/** @override **/
get type() {
return "invalid";
}
/** @override **/
get name() {
return this.zoneName;
}
/** @override **/
get isUniversal() {
return false;
}
/** @override **/
offsetName() {
return null;
}
/** @override **/
formatOffset() {
return "";
}
/** @override **/
offset() {
return NaN;
}
/** @override **/
equals() {
return false;
}
/** @override **/
get isValid() {
return false;
}
};
function normalizeZone2(input, defaultZone3) {
if (isUndefined2(input) || input === null) {
return defaultZone3;
} else if (input instanceof Zone2) {
return input;
} else if (isString2(input)) {
const lowered = input.toLowerCase();
if (lowered === "default")
return defaultZone3;
else if (lowered === "local" || lowered === "system")
return SystemZone2.instance;
else if (lowered === "utc" || lowered === "gmt")
return FixedOffsetZone2.utcInstance;
else
return FixedOffsetZone2.parseSpecifier(lowered) || IANAZone2.create(input);
} else if (isNumber2(input)) {
return FixedOffsetZone2.instance(input);
} else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
return input;
} else {
return new InvalidZone2(input);
}
}
var now3 = () => Date.now();
var defaultZone2 = "system";
var defaultLocale2 = null;
var defaultNumberingSystem2 = null;
var defaultOutputCalendar2 = null;
var twoDigitCutoffYear2 = 60;
var throwOnInvalid2;
var Settings2 = class {
/**
* Get the callback for returning the current timestamp.
* @type {function}
*/
static get now() {
return now3;
}
/**
* Set the callback for returning the current timestamp.
* The function should return a number, which will be interpreted as an Epoch millisecond count
* @type {function}
* @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
*/
static set now(n3) {
now3 = n3;
}
/**
* Set the default time zone to create DateTimes in. Does not affect existing instances.
* Use the value "system" to reset this value to the system's time zone.
* @type {string}
*/
static set defaultZone(zone) {
defaultZone2 = zone;
}
/**
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
* The default value is the system's time zone (the one set on the machine that runs this code).
* @type {Zone}
*/
static get defaultZone() {
return normalizeZone2(defaultZone2, SystemZone2.instance);
}
/**
* Get the default locale to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultLocale() {
return defaultLocale2;
}
/**
* Set the default locale to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultLocale(locale) {
defaultLocale2 = locale;
}
/**
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultNumberingSystem() {
return defaultNumberingSystem2;
}
/**
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultNumberingSystem(numberingSystem) {
defaultNumberingSystem2 = numberingSystem;
}
/**
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultOutputCalendar() {
return defaultOutputCalendar2;
}
/**
* Set the default output calendar to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultOutputCalendar(outputCalendar) {
defaultOutputCalendar2 = outputCalendar;
}
/**
* Get the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
* @type {number}
*/
static get twoDigitCutoffYear() {
return twoDigitCutoffYear2;
}
/**
* Set the cutoff year after which a string encoding a year as two digits is interpreted to occur in the current century.
* @type {number}
* @example Settings.twoDigitCutoffYear = 0 // cut-off year is 0, so all 'yy' are interpreted as current century
* @example Settings.twoDigitCutoffYear = 50 // '49' -> 1949; '50' -> 2050
* @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
*/
static set twoDigitCutoffYear(cutoffYear) {
twoDigitCutoffYear2 = cutoffYear % 100;
}
/**
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
* @type {boolean}
*/
static get throwOnInvalid() {
return throwOnInvalid2;
}
/**
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
* @type {boolean}
*/
static set throwOnInvalid(t) {
throwOnInvalid2 = t;
}
/**
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
* @return {void}
*/
static resetCaches() {
Locale2.resetCache();
IANAZone2.resetCache();
}
};
function isUndefined2(o) {
return typeof o === "undefined";
}
function isNumber2(o) {
return typeof o === "number";
}
function isInteger2(o) {
return typeof o === "number" && o % 1 === 0;
}
function isString2(o) {
return typeof o === "string";
}
function isDate2(o) {
return Object.prototype.toString.call(o) === "[object Date]";
}
function hasRelative2() {
try {
return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat;
} catch (e) {
return false;
}
}
function maybeArray2(thing) {
return Array.isArray(thing) ? thing : [thing];
}
function bestBy2(arr, by, compare) {
if (arr.length === 0) {
return void 0;
}
return arr.reduce((best, next) => {
const pair = [by(next), next];
if (!best) {
return pair;
} else if (compare(best[0], pair[0]) === best[0]) {
return best;
} else {
return pair;
}
}, null)[1];
}
function pick2(obj, keys) {
return keys.reduce((a, k) => {
a[k] = obj[k];
return a;
}, {});
}
function hasOwnProperty2(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
function integerBetween2(thing, bottom, top) {
return isInteger2(thing) && thing >= bottom && thing <= top;
}
function floorMod2(x, n3) {
return x - n3 * Math.floor(x / n3);
}
function padStart2(input, n3 = 2) {
const isNeg = input < 0;
let padded;
if (isNeg) {
padded = "-" + ("" + -input).padStart(n3, "0");
} else {
padded = ("" + input).padStart(n3, "0");
}
return padded;
}
function parseInteger2(string) {
if (isUndefined2(string) || string === null || string === "") {
return void 0;
} else {
return parseInt(string, 10);
}
}
function parseFloating2(string) {
if (isUndefined2(string) || string === null || string === "") {
return void 0;
} else {
return parseFloat(string);
}
}
function parseMillis2(fraction) {
if (isUndefined2(fraction) || fraction === null || fraction === "") {
return void 0;
} else {
const f = parseFloat("0." + fraction) * 1e3;
return Math.floor(f);
}
}
function roundTo2(number, digits, towardZero = false) {
const factor = 10 ** digits, rounder = towardZero ? Math.trunc : Math.round;
return rounder(number * factor) / factor;
}
function isLeapYear2(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function daysInYear2(year) {
return isLeapYear2(year) ? 366 : 365;
}
function daysInMonth2(year, month) {
const modMonth = floorMod2(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12;
if (modMonth === 2) {
return isLeapYear2(modYear) ? 29 : 28;
} else {
return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];
}
}
function objToLocalTS2(obj) {
let d = Date.UTC(
obj.year,
obj.month - 1,
obj.day,
obj.hour,
obj.minute,
obj.second,
obj.millisecond
);
if (obj.year < 100 && obj.year >= 0) {
d = new Date(d);
d.setUTCFullYear(obj.year, obj.month - 1, obj.day);
}
return +d;
}
function weeksInWeekYear2(weekYear) {
const p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, last = weekYear - 1, p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;
return p1 === 4 || p2 === 3 ? 53 : 52;
}
function untruncateYear2(year) {
if (year > 99) {
return year;
} else
return year > Settings2.twoDigitCutoffYear ? 1900 + year : 2e3 + year;
}
function parseZoneInfo2(ts, offsetFormat, locale, timeZone = null) {
const date = new Date(ts), intlOpts = {
hourCycle: "h23",
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit"
};
if (timeZone) {
intlOpts.timeZone = timeZone;
}
const modified = { timeZoneName: offsetFormat, ...intlOpts };
const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename");
return parsed ? parsed.value : null;
}
function signedOffset2(offHourStr, offMinuteStr) {
let offHour = parseInt(offHourStr, 10);
if (Number.isNaN(offHour)) {
offHour = 0;
}
const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;
return offHour * 60 + offMinSigned;
}
function asNumber2(value) {
const numericValue = Number(value);
if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue))
throw new InvalidArgumentError2(`Invalid unit value ${value}`);
return numericValue;
}
function normalizeObject2(obj, normalizer) {
const normalized = {};
for (const u in obj) {
if (hasOwnProperty2(obj, u)) {
const v = obj[u];
if (v === void 0 || v === null)
continue;
normalized[normalizer(u)] = asNumber2(v);
}
}
return normalized;
}
function formatOffset2(offset3, format) {
const hours = Math.trunc(Math.abs(offset3 / 60)), minutes = Math.trunc(Math.abs(offset3 % 60)), sign = offset3 >= 0 ? "+" : "-";
switch (format) {
case "short":
return `${sign}${padStart2(hours, 2)}:${padStart2(minutes, 2)}`;
case "narrow":
return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`;
case "techie":
return `${sign}${padStart2(hours, 2)}${padStart2(minutes, 2)}`;
default:
throw new RangeError(`Value format ${format} is out of range for property format`);
}
}
function timeObject2(obj) {
return pick2(obj, ["hour", "minute", "second", "millisecond"]);
}
var monthsLong2 = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
var monthsShort2 = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
var monthsNarrow2 = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function months2(length) {
switch (length) {
case "narrow":
return [...monthsNarrow2];
case "short":
return [...monthsShort2];
case "long":
return [...monthsLong2];
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
case "2-digit":
return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
default:
return null;
}
}
var weekdaysLong2 = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
];
var weekdaysShort2 = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
var weekdaysNarrow2 = ["M", "T", "W", "T", "F", "S", "S"];
function weekdays2(length) {
switch (length) {
case "narrow":
return [...weekdaysNarrow2];
case "short":
return [...weekdaysShort2];
case "long":
return [...weekdaysLong2];
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7"];
default:
return null;
}
}
var meridiems2 = ["AM", "PM"];
var erasLong2 = ["Before Christ", "Anno Domini"];
var erasShort2 = ["BC", "AD"];
var erasNarrow2 = ["B", "A"];
function eras2(length) {
switch (length) {
case "narrow":
return [...erasNarrow2];
case "short":
return [...erasShort2];
case "long":
return [...erasLong2];
default:
return null;
}
}
function meridiemForDateTime2(dt) {
return meridiems2[dt.hour < 12 ? 0 : 1];
}
function weekdayForDateTime2(dt, length) {
return weekdays2(length)[dt.weekday - 1];
}
function monthForDateTime2(dt, length) {
return months2(length)[dt.month - 1];
}
function eraForDateTime2(dt, length) {
return eras2(length)[dt.year < 0 ? 0 : 1];
}
function formatRelativeTime2(unit, count, numeric = "always", narrow = false) {
const units = {
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."]
};
const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1;
if (numeric === "auto" && lastable) {
const isDay = unit === "days";
switch (count) {
case 1:
return isDay ? "tomorrow" : `next ${units[unit][0]}`;
case -1:
return isDay ? "yesterday" : `last ${units[unit][0]}`;
case 0:
return isDay ? "today" : `this ${units[unit][0]}`;
}
}
const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;
return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;
}
function stringifyTokens2(splits, tokenToString) {
let s3 = "";
for (const token of splits) {
if (token.literal) {
s3 += token.val;
} else {
s3 += tokenToString(token.val);
}
}
return s3;
}
var macroTokenToFormatOpts2 = {
D: DATE_SHORT2,
DD: DATE_MED2,
DDD: DATE_FULL2,
DDDD: DATE_HUGE2,
t: TIME_SIMPLE2,
tt: TIME_WITH_SECONDS2,
ttt: TIME_WITH_SHORT_OFFSET2,
tttt: TIME_WITH_LONG_OFFSET2,
T: TIME_24_SIMPLE2,
TT: TIME_24_WITH_SECONDS2,
TTT: TIME_24_WITH_SHORT_OFFSET2,
TTTT: TIME_24_WITH_LONG_OFFSET2,
f: DATETIME_SHORT2,
ff: DATETIME_MED2,
fff: DATETIME_FULL2,
ffff: DATETIME_HUGE2,
F: DATETIME_SHORT_WITH_SECONDS2,
FF: DATETIME_MED_WITH_SECONDS2,
FFF: DATETIME_FULL_WITH_SECONDS2,
FFFF: DATETIME_HUGE_WITH_SECONDS2
};
var Formatter2 = class _Formatter {
static create(locale, opts = {}) {
return new _Formatter(locale, opts);
}
static parseFormat(fmt) {
let current2 = null, currentFull = "", bracketed = false;
const splits = [];
for (let i = 0; i < fmt.length; i++) {
const c = fmt.charAt(i);
if (c === "'") {
if (currentFull.length > 0) {
splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
}
current2 = null;
currentFull = "";
bracketed = !bracketed;
} else if (bracketed) {
currentFull += c;
} else if (c === current2) {
currentFull += c;
} else {
if (currentFull.length > 0) {
splits.push({ literal: /^\s+$/.test(currentFull), val: currentFull });
}
currentFull = c;
current2 = c;
}
}
if (currentFull.length > 0) {
splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
}
return splits;
}
static macroTokenToFormatOpts(token) {
return macroTokenToFormatOpts2[token];
}
constructor(locale, formatOpts) {
this.opts = formatOpts;
this.loc = locale;
this.systemLoc = null;
}
formatWithSystemDefault(dt, opts) {
if (this.systemLoc === null) {
this.systemLoc = this.loc.redefaultToSystem();
}
const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });
return df.format();
}
dtFormatter(dt, opts = {}) {
return this.loc.dtFormatter(dt, { ...this.opts, ...opts });
}
formatDateTime(dt, opts) {
return this.dtFormatter(dt, opts).format();
}
formatDateTimeParts(dt, opts) {
return this.dtFormatter(dt, opts).formatToParts();
}
formatInterval(interval, opts) {
const df = this.dtFormatter(interval.start, opts);
return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());
}
resolvedOptions(dt, opts) {
return this.dtFormatter(dt, opts).resolvedOptions();
}
num(n3, p = 0) {
if (this.opts.forceSimple) {
return padStart2(n3, p);
}
const opts = { ...this.opts };
if (p > 0) {
opts.padTo = p;
}
return this.loc.numberFormatter(opts).format(n3);
}
formatDateTimeFromString(dt, fmt) {
const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset3 = (opts) => {
if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {
return "Z";
}
return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : "";
}, meridiem = () => knownEnglish ? meridiemForDateTime2(dt) : string({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime2(dt, length) : string(standalone ? { month: length } : { month: length, day: "numeric" }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime2(dt, length) : string(
standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" },
"weekday"
), maybeMacro = (token) => {
const formatOpts = _Formatter.macroTokenToFormatOpts(token);
if (formatOpts) {
return this.formatWithSystemDefault(dt, formatOpts);
} else {
return token;
}
}, era = (length) => knownEnglish ? eraForDateTime2(dt, length) : string({ era: length }, "era"), tokenToString = (token) => {
switch (token) {
case "S":
return this.num(dt.millisecond);
case "u":
case "SSS":
return this.num(dt.millisecond, 3);
case "s":
return this.num(dt.second);
case "ss":
return this.num(dt.second, 2);
case "uu":
return this.num(Math.floor(dt.millisecond / 10), 2);
case "uuu":
return this.num(Math.floor(dt.millisecond / 100));
case "m":
return this.num(dt.minute);
case "mm":
return this.num(dt.minute, 2);
case "h":
return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);
case "hh":
return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);
case "H":
return this.num(dt.hour);
case "HH":
return this.num(dt.hour, 2);
case "Z":
return formatOffset3({ format: "narrow", allowZ: this.opts.allowZ });
case "ZZ":
return formatOffset3({ format: "short", allowZ: this.opts.allowZ });
case "ZZZ":
return formatOffset3({ format: "techie", allowZ: this.opts.allowZ });
case "ZZZZ":
return dt.zone.offsetName(dt.ts, { format: "short", locale: this.loc.locale });
case "ZZZZZ":
return dt.zone.offsetName(dt.ts, { format: "long", locale: this.loc.locale });
case "z":
return dt.zoneName;
case "a":
return meridiem();
case "d":
return useDateTimeFormatter ? string({ day: "numeric" }, "day") : this.num(dt.day);
case "dd":
return useDateTimeFormatter ? string({ day: "2-digit" }, "day") : this.num(dt.day, 2);
case "c":
return this.num(dt.weekday);
case "ccc":
return weekday("short", true);
case "cccc":
return weekday("long", true);
case "ccccc":
return weekday("narrow", true);
case "E":
return this.num(dt.weekday);
case "EEE":
return weekday("short", false);
case "EEEE":
return weekday("long", false);
case "EEEEE":
return weekday("narrow", false);
case "L":
return useDateTimeFormatter ? string({ month: "numeric", day: "numeric" }, "month") : this.num(dt.month);
case "LL":
return useDateTimeFormatter ? string({ month: "2-digit", day: "numeric" }, "month") : this.num(dt.month, 2);
case "LLL":
return month("short", true);
case "LLLL":
return month("long", true);
case "LLLLL":
return month("narrow", true);
case "M":
return useDateTimeFormatter ? string({ month: "numeric" }, "month") : this.num(dt.month);
case "MM":
return useDateTimeFormatter ? string({ month: "2-digit" }, "month") : this.num(dt.month, 2);
case "MMM":
return month("short", false);
case "MMMM":
return month("long", false);
case "MMMMM":
return month("narrow", false);
case "y":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year);
case "yy":
return useDateTimeFormatter ? string({ year: "2-digit" }, "year") : this.num(dt.year.toString().slice(-2), 2);
case "yyyy":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 4);
case "yyyyyy":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 6);
case "G":
return era("short");
case "GG":
return era("long");
case "GGGGG":
return era("narrow");
case "kk":
return this.num(dt.weekYear.toString().slice(-2), 2);
case "kkkk":
return this.num(dt.weekYear, 4);
case "W":
return this.num(dt.weekNumber);
case "WW":
return this.num(dt.weekNumber, 2);
case "o":
return this.num(dt.ordinal);
case "ooo":
return this.num(dt.ordinal, 3);
case "q":
return this.num(dt.quarter);
case "qq":
return this.num(dt.quarter, 2);
case "X":
return this.num(Math.floor(dt.ts / 1e3));
case "x":
return this.num(dt.ts);
default:
return maybeMacro(token);
}
};
return stringifyTokens2(_Formatter.parseFormat(fmt), tokenToString);
}
formatDurationFromString(dur, fmt) {
const tokenToField = (token) => {
switch (token[0]) {
case "S":
return "millisecond";
case "s":
return "second";
case "m":
return "minute";
case "h":
return "hour";
case "d":
return "day";
case "w":
return "week";
case "M":
return "month";
case "y":
return "year";
default:
return null;
}
}, tokenToString = (lildur) => (token) => {
const mapped = tokenToField(token);
if (mapped) {
return this.num(lildur.get(mapped), token.length);
} else {
return token;
}
}, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce(
(found, { literal, val }) => literal ? found : found.concat(val),
[]
), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));
return stringifyTokens2(tokens, tokenToString(collapsed));
}
};
var Invalid2 = class {
constructor(reason, explanation) {
this.reason = reason;
this.explanation = explanation;
}
toMessage() {
if (this.explanation) {
return `${this.reason}: ${this.explanation}`;
} else {
return this.reason;
}
}
};
var ianaRegex2 = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
function combineRegexes2(...regexes) {
const full = regexes.reduce((f, r) => f + r.source, "");
return RegExp(`^${full}$`);
}
function combineExtractors2(...extractors) {
return (m) => extractors.reduce(
([mergedVals, mergedZone, cursor], ex) => {
const [val, zone, next] = ex(m, cursor);
return [{ ...mergedVals, ...val }, zone || mergedZone, next];
},
[{}, null, 1]
).slice(0, 2);
}
function parse2(s3, ...patterns) {
if (s3 == null) {
return [null, null];
}
for (const [regex, extractor] of patterns) {
const m = regex.exec(s3);
if (m) {
return extractor(m);
}
}
return [null, null];
}
function simpleParse2(...keys) {
return (match3, cursor) => {
const ret = {};
let i;
for (i = 0; i < keys.length; i++) {
ret[keys[i]] = parseInteger2(match3[cursor + i]);
}
return [ret, null, cursor + i];
};
}
var offsetRegex2 = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;
var isoExtendedZone2 = `(?:${offsetRegex2.source}?(?:\\[(${ianaRegex2.source})\\])?)?`;
var isoTimeBaseRegex2 = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
var isoTimeRegex2 = RegExp(`${isoTimeBaseRegex2.source}${isoExtendedZone2}`);
var isoTimeExtensionRegex2 = RegExp(`(?:T${isoTimeRegex2.source})?`);
var isoYmdRegex2 = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
var isoWeekRegex2 = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
var isoOrdinalRegex2 = /(\d{4})-?(\d{3})/;
var extractISOWeekData2 = simpleParse2("weekYear", "weekNumber", "weekDay");
var extractISOOrdinalData2 = simpleParse2("year", "ordinal");
var sqlYmdRegex2 = /(\d{4})-(\d\d)-(\d\d)/;
var sqlTimeRegex2 = RegExp(
`${isoTimeBaseRegex2.source} ?(?:${offsetRegex2.source}|(${ianaRegex2.source}))?`
);
var sqlTimeExtensionRegex2 = RegExp(`(?: ${sqlTimeRegex2.source})?`);
function int2(match3, pos, fallback) {
const m = match3[pos];
return isUndefined2(m) ? fallback : parseInteger2(m);
}
function extractISOYmd2(match3, cursor) {
const item = {
year: int2(match3, cursor),
month: int2(match3, cursor + 1, 1),
day: int2(match3, cursor + 2, 1)
};
return [item, null, cursor + 3];
}
function extractISOTime2(match3, cursor) {
const item = {
hours: int2(match3, cursor, 0),
minutes: int2(match3, cursor + 1, 0),
seconds: int2(match3, cursor + 2, 0),
milliseconds: parseMillis2(match3[cursor + 3])
};
return [item, null, cursor + 4];
}
function extractISOOffset2(match3, cursor) {
const local = !match3[cursor] && !match3[cursor + 1], fullOffset = signedOffset2(match3[cursor + 1], match3[cursor + 2]), zone = local ? null : FixedOffsetZone2.instance(fullOffset);
return [{}, zone, cursor + 3];
}
function extractIANAZone2(match3, cursor) {
const zone = match3[cursor] ? IANAZone2.create(match3[cursor]) : null;
return [{}, zone, cursor + 1];
}
var isoTimeOnly2 = RegExp(`^T?${isoTimeBaseRegex2.source}$`);
var isoDuration2 = /^-?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 extractISODuration2(match3) {
const [s3, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match3;
const hasNegativePrefix = s3[0] === "-";
const negativeSeconds = secondStr && secondStr[0] === "-";
const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num;
return [
{
years: maybeNegate(parseFloating2(yearStr)),
months: maybeNegate(parseFloating2(monthStr)),
weeks: maybeNegate(parseFloating2(weekStr)),
days: maybeNegate(parseFloating2(dayStr)),
hours: maybeNegate(parseFloating2(hourStr)),
minutes: maybeNegate(parseFloating2(minuteStr)),
seconds: maybeNegate(parseFloating2(secondStr), secondStr === "-0"),
milliseconds: maybeNegate(parseMillis2(millisecondsStr), negativeSeconds)
}
];
}
var obsOffsets2 = {
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60
};
function fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
const result = {
year: yearStr.length === 2 ? untruncateYear2(parseInteger2(yearStr)) : parseInteger2(yearStr),
month: monthsShort2.indexOf(monthStr) + 1,
day: parseInteger2(dayStr),
hour: parseInteger2(hourStr),
minute: parseInteger2(minuteStr)
};
if (secondStr)
result.second = parseInteger2(secondStr);
if (weekdayStr) {
result.weekday = weekdayStr.length > 3 ? weekdaysLong2.indexOf(weekdayStr) + 1 : weekdaysShort2.indexOf(weekdayStr) + 1;
}
return result;
}
var rfc28222 = /^(?:(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 extractRFC28222(match3) {
const [
,
weekdayStr,
dayStr,
monthStr,
yearStr,
hourStr,
minuteStr,
secondStr,
obsOffset,
milOffset,
offHourStr,
offMinuteStr
] = match3, result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
let offset3;
if (obsOffset) {
offset3 = obsOffsets2[obsOffset];
} else if (milOffset) {
offset3 = 0;
} else {
offset3 = signedOffset2(offHourStr, offMinuteStr);
}
return [result, new FixedOffsetZone2(offset3)];
}
function preprocessRFC28222(s3) {
return s3.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
var rfc11232 = /^(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$/;
var rfc8502 = /^(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$/;
var ascii2 = /^(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 extractRFC1123Or8502(match3) {
const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match3, result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone2.utcInstance];
}
function extractASCII2(match3) {
const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match3, result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone2.utcInstance];
}
var isoYmdWithTimeExtensionRegex2 = combineRegexes2(isoYmdRegex2, isoTimeExtensionRegex2);
var isoWeekWithTimeExtensionRegex2 = combineRegexes2(isoWeekRegex2, isoTimeExtensionRegex2);
var isoOrdinalWithTimeExtensionRegex2 = combineRegexes2(isoOrdinalRegex2, isoTimeExtensionRegex2);
var isoTimeCombinedRegex2 = combineRegexes2(isoTimeRegex2);
var extractISOYmdTimeAndOffset2 = combineExtractors2(
extractISOYmd2,
extractISOTime2,
extractISOOffset2,
extractIANAZone2
);
var extractISOWeekTimeAndOffset2 = combineExtractors2(
extractISOWeekData2,
extractISOTime2,
extractISOOffset2,
extractIANAZone2
);
var extractISOOrdinalDateAndTime2 = combineExtractors2(
extractISOOrdinalData2,
extractISOTime2,
extractISOOffset2,
extractIANAZone2
);
var extractISOTimeAndOffset2 = combineExtractors2(
extractISOTime2,
extractISOOffset2,
extractIANAZone2
);
function parseISODate2(s3) {
return parse2(
s3,
[isoYmdWithTimeExtensionRegex2, extractISOYmdTimeAndOffset2],
[isoWeekWithTimeExtensionRegex2, extractISOWeekTimeAndOffset2],
[isoOrdinalWithTimeExtensionRegex2, extractISOOrdinalDateAndTime2],
[isoTimeCombinedRegex2, extractISOTimeAndOffset2]
);
}
function parseRFC2822Date2(s3) {
return parse2(preprocessRFC28222(s3), [rfc28222, extractRFC28222]);
}
function parseHTTPDate2(s3) {
return parse2(
s3,
[rfc11232, extractRFC1123Or8502],
[rfc8502, extractRFC1123Or8502],
[ascii2, extractASCII2]
);
}
function parseISODuration2(s3) {
return parse2(s3, [isoDuration2, extractISODuration2]);
}
var extractISOTimeOnly2 = combineExtractors2(extractISOTime2);
function parseISOTimeOnly2(s3) {
return parse2(s3, [isoTimeOnly2, extractISOTimeOnly2]);
}
var sqlYmdWithTimeExtensionRegex2 = combineRegexes2(sqlYmdRegex2, sqlTimeExtensionRegex2);
var sqlTimeCombinedRegex2 = combineRegexes2(sqlTimeRegex2);
var extractISOTimeOffsetAndIANAZone2 = combineExtractors2(
extractISOTime2,
extractISOOffset2,
extractIANAZone2
);
function parseSQL2(s3) {
return parse2(
s3,
[sqlYmdWithTimeExtensionRegex2, extractISOYmdTimeAndOffset2],
[sqlTimeCombinedRegex2, extractISOTimeOffsetAndIANAZone2]
);
}
var INVALID$2 = "Invalid Duration";
var lowOrderMatrix2 = {
weeks: {
days: 7,
hours: 7 * 24,
minutes: 7 * 24 * 60,
seconds: 7 * 24 * 60 * 60,
milliseconds: 7 * 24 * 60 * 60 * 1e3
},
days: {
hours: 24,
minutes: 24 * 60,
seconds: 24 * 60 * 60,
milliseconds: 24 * 60 * 60 * 1e3
},
hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 },
minutes: { seconds: 60, milliseconds: 60 * 1e3 },
seconds: { milliseconds: 1e3 }
};
var casualMatrix2 = {
years: {
quarters: 4,
months: 12,
weeks: 52,
days: 365,
hours: 365 * 24,
minutes: 365 * 24 * 60,
seconds: 365 * 24 * 60 * 60,
milliseconds: 365 * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: 13,
days: 91,
hours: 91 * 24,
minutes: 91 * 24 * 60,
seconds: 91 * 24 * 60 * 60,
milliseconds: 91 * 24 * 60 * 60 * 1e3
},
months: {
weeks: 4,
days: 30,
hours: 30 * 24,
minutes: 30 * 24 * 60,
seconds: 30 * 24 * 60 * 60,
milliseconds: 30 * 24 * 60 * 60 * 1e3
},
...lowOrderMatrix2
};
var daysInYearAccurate2 = 146097 / 400;
var daysInMonthAccurate2 = 146097 / 4800;
var accurateMatrix2 = {
years: {
quarters: 4,
months: 12,
weeks: daysInYearAccurate2 / 7,
days: daysInYearAccurate2,
hours: daysInYearAccurate2 * 24,
minutes: daysInYearAccurate2 * 24 * 60,
seconds: daysInYearAccurate2 * 24 * 60 * 60,
milliseconds: daysInYearAccurate2 * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: daysInYearAccurate2 / 28,
days: daysInYearAccurate2 / 4,
hours: daysInYearAccurate2 * 24 / 4,
minutes: daysInYearAccurate2 * 24 * 60 / 4,
seconds: daysInYearAccurate2 * 24 * 60 * 60 / 4,
milliseconds: daysInYearAccurate2 * 24 * 60 * 60 * 1e3 / 4
},
months: {
weeks: daysInMonthAccurate2 / 7,
days: daysInMonthAccurate2,
hours: daysInMonthAccurate2 * 24,
minutes: daysInMonthAccurate2 * 24 * 60,
seconds: daysInMonthAccurate2 * 24 * 60 * 60,
milliseconds: daysInMonthAccurate2 * 24 * 60 * 60 * 1e3
},
...lowOrderMatrix2
};
var orderedUnits$1 = [
"years",
"quarters",
"months",
"weeks",
"days",
"hours",
"minutes",
"seconds",
"milliseconds"
];
var reverseUnits2 = orderedUnits$1.slice(0).reverse();
function clone$1(dur, alts, clear = false) {
const conf = {
values: clear ? alts.values : { ...dur.values, ...alts.values || {} },
loc: dur.loc.clone(alts.loc),
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
matrix: alts.matrix || dur.matrix
};
return new Duration3(conf);
}
function durationToMillis2(matrix, vals) {
var _a;
let sum = (_a = vals.milliseconds) != null ? _a : 0;
for (const unit of reverseUnits2.slice(1)) {
if (vals[unit]) {
sum += vals[unit] * matrix[unit]["milliseconds"];
}
}
return sum;
}
function normalizeValues2(matrix, vals) {
const factor = durationToMillis2(matrix, vals) < 0 ? -1 : 1;
orderedUnits$1.reduceRight((previous, current2) => {
if (!isUndefined2(vals[current2])) {
if (previous) {
const previousVal = vals[previous] * factor;
const conv = matrix[current2][previous];
const rollUp = Math.floor(previousVal / conv);
vals[current2] += rollUp * factor;
vals[previous] -= rollUp * conv * factor;
}
return current2;
} else {
return previous;
}
}, null);
orderedUnits$1.reduce((previous, current2) => {
if (!isUndefined2(vals[current2])) {
if (previous) {
const fraction = vals[previous] % 1;
vals[previous] -= fraction;
vals[current2] += fraction * matrix[previous][current2];
}
return current2;
} else {
return previous;
}
}, null);
}
function removeZeroes2(vals) {
const newVals = {};
for (const [key2, value] of Object.entries(vals)) {
if (value !== 0) {
newVals[key2] = value;
}
}
return newVals;
}
var Duration3 = class _Duration {
/**
* @private
*/
constructor(config) {
const accurate = config.conversionAccuracy === "longterm" || false;
let matrix = accurate ? accurateMatrix2 : casualMatrix2;
if (config.matrix) {
matrix = config.matrix;
}
this.values = config.values;
this.loc = config.loc || Locale2.create();
this.conversionAccuracy = accurate ? "longterm" : "casual";
this.invalid = config.invalid || null;
this.matrix = matrix;
this.isLuxonDuration = true;
}
/**
* Create Duration from a number of milliseconds.
* @param {number} count of milliseconds
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @return {Duration}
*/
static fromMillis(count, opts) {
return _Duration.fromObject({ milliseconds: count }, opts);
}
/**
* Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
* If this object is empty then a zero milliseconds duration is returned.
* @param {Object} obj - the object to create the DateTime from
* @param {number} obj.years
* @param {number} obj.quarters
* @param {number} obj.months
* @param {number} obj.weeks
* @param {number} obj.days
* @param {number} obj.hours
* @param {number} obj.minutes
* @param {number} obj.seconds
* @param {number} obj.milliseconds
* @param {Object} [opts=[]] - options for creating this Duration
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the custom conversion system to use
* @return {Duration}
*/
static fromObject(obj, opts = {}) {
if (obj == null || typeof obj !== "object") {
throw new InvalidArgumentError2(
`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`
);
}
return new _Duration({
values: normalizeObject2(obj, _Duration.normalizeUnit),
loc: Locale2.fromObject(opts),
conversionAccuracy: opts.conversionAccuracy,
matrix: opts.matrix
});
}
/**
* Create a Duration from DurationLike.
*
* @param {Object | number | Duration} durationLike
* One of:
* - object with keys like 'years' and 'hours'.
* - number representing milliseconds
* - Duration instance
* @return {Duration}
*/
static fromDurationLike(durationLike) {
if (isNumber2(durationLike)) {
return _Duration.fromMillis(durationLike);
} else if (_Duration.isDuration(durationLike)) {
return durationLike;
} else if (typeof durationLike === "object") {
return _Duration.fromObject(durationLike);
} else {
throw new InvalidArgumentError2(
`Unknown duration argument ${durationLike} of type ${typeof durationLike}`
);
}
}
/**
* Create a Duration from an ISO 8601 duration string.
* @param {string} text - text to parse
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the preset conversion system to use
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations
* @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }
* @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }
* @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
* @return {Duration}
*/
static fromISO(text, opts) {
const [parsed] = parseISODuration2(text);
if (parsed) {
return _Duration.fromObject(parsed, opts);
} else {
return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
}
/**
* Create a Duration from an ISO 8601 time string.
* @param {string} text - text to parse
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the conversion system to use
* @see https://en.wikipedia.org/wiki/ISO_8601#Times
* @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }
* @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @return {Duration}
*/
static fromISOTime(text, opts) {
const [parsed] = parseISOTimeOnly2(text);
if (parsed) {
return _Duration.fromObject(parsed, opts);
} else {
return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
}
/**
* Create an invalid Duration.
* @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {Duration}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the Duration is invalid");
}
const invalid = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidDurationError2(invalid);
} else {
return new _Duration({ invalid });
}
}
/**
* @private
*/
static normalizeUnit(unit) {
const normalized = {
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"
}[unit ? unit.toLowerCase() : unit];
if (!normalized)
throw new InvalidUnitError2(unit);
return normalized;
}
/**
* Check if an object is a Duration. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isDuration(o) {
return o && o.isLuxonDuration || false;
}
/**
* Get the locale of a Duration, such 'en-GB'
* @type {string}
*/
get locale() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
*
* @type {string}
*/
get numberingSystem() {
return this.isValid ? this.loc.numberingSystem : null;
}
/**
* Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
* * `S` for milliseconds
* * `s` for seconds
* * `m` for minutes
* * `h` for hours
* * `d` for days
* * `w` for weeks
* * `M` for months
* * `y` for years
* Notes:
* * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
* * Tokens can be escaped by wrapping with single quotes.
* * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
* @param {string} fmt - the format string
* @param {Object} opts - options
* @param {boolean} [opts.floor=true] - floor numerical values
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
* @return {string}
*/
toFormat(fmt, opts = {}) {
const fmtOpts = {
...opts,
floor: opts.round !== false && opts.floor !== false
};
return this.isValid ? Formatter2.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID$2;
}
/**
* Returns a string representation of a Duration with all units included.
* To modify its behavior use the `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat
* @param opts - On option object to override the formatting. Accepts the same keys as the options parameter of the native `Int.NumberFormat` constructor, as well as `listStyle`.
* @example
* ```js
* var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
* dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
* dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
* dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
* ```
*/
toHuman(opts = {}) {
if (!this.isValid)
return INVALID$2;
const l3 = orderedUnits$1.map((unit) => {
const val = this.values[unit];
if (isUndefined2(val)) {
return null;
}
return this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...opts, unit: unit.slice(0, -1) }).format(val);
}).filter((n3) => n3);
return this.loc.listFormatter({ type: "conjunction", style: opts.listStyle || "narrow", ...opts }).format(l3);
}
/**
* Returns a JavaScript object with this Duration's values.
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
* @return {Object}
*/
toObject() {
if (!this.isValid)
return {};
return { ...this.values };
}
/**
* Returns an ISO 8601-compliant string representation of this Duration.
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations
* @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'
* @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'
* @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'
* @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'
* @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'
* @return {string}
*/
toISO() {
if (!this.isValid)
return null;
let s3 = "P";
if (this.years !== 0)
s3 += this.years + "Y";
if (this.months !== 0 || this.quarters !== 0)
s3 += this.months + this.quarters * 3 + "M";
if (this.weeks !== 0)
s3 += this.weeks + "W";
if (this.days !== 0)
s3 += this.days + "D";
if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)
s3 += "T";
if (this.hours !== 0)
s3 += this.hours + "H";
if (this.minutes !== 0)
s3 += this.minutes + "M";
if (this.seconds !== 0 || this.milliseconds !== 0)
s3 += roundTo2(this.seconds + this.milliseconds / 1e3, 3) + "S";
if (s3 === "P")
s3 += "T0S";
return s3;
}
/**
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
* Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.
* @see https://en.wikipedia.org/wiki/ISO_8601#Times
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includePrefix=false] - include the `T` prefix
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'
* @return {string}
*/
toISOTime(opts = {}) {
if (!this.isValid)
return null;
const millis = this.toMillis();
if (millis < 0 || millis >= 864e5)
return null;
opts = {
suppressMilliseconds: false,
suppressSeconds: false,
includePrefix: false,
format: "extended",
...opts,
includeOffset: false
};
const dateTime = DateTime2.fromMillis(millis, { zone: "UTC" });
return dateTime.toISOTime(opts);
}
/**
* Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
* @return {string}
*/
toJSON() {
return this.toISO();
}
/**
* Returns an ISO 8601 representation of this Duration appropriate for use in debugging.
* @return {string}
*/
toString() {
return this.toISO();
}
/**
* Returns an milliseconds value of this Duration.
* @return {number}
*/
toMillis() {
if (!this.isValid)
return NaN;
return durationToMillis2(this.matrix, this.values);
}
/**
* Returns an milliseconds value of this Duration. Alias of {@link toMillis}
* @return {number}
*/
valueOf() {
return this.toMillis();
}
/**
* Make this Duration longer by the specified amount. Return a newly-constructed Duration.
* @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @return {Duration}
*/
plus(duration) {
if (!this.isValid)
return this;
const dur = _Duration.fromDurationLike(duration), result = {};
for (const k of orderedUnits$1) {
if (hasOwnProperty2(dur.values, k) || hasOwnProperty2(this.values, k)) {
result[k] = dur.get(k) + this.get(k);
}
}
return clone$1(this, { values: result }, true);
}
/**
* Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @return {Duration}
*/
minus(duration) {
if (!this.isValid)
return this;
const dur = _Duration.fromDurationLike(duration);
return this.plus(dur.negate());
}
/**
* Scale this Duration by the specified amount. Return a newly-constructed Duration.
* @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
* @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
* @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
* @return {Duration}
*/
mapUnits(fn) {
if (!this.isValid)
return this;
const result = {};
for (const k of Object.keys(this.values)) {
result[k] = asNumber2(fn(this.values[k], k));
}
return clone$1(this, { values: result }, true);
}
/**
* Get the value of unit.
* @param {string} unit - a unit such as 'minute' or 'day'
* @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
* @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
* @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
* @return {number}
*/
get(unit) {
return this[_Duration.normalizeUnit(unit)];
}
/**
* "Set" the values of specified units. Return a newly-constructed Duration.
* @param {Object} values - a mapping of units to numbers
* @example dur.set({ years: 2017 })
* @example dur.set({ hours: 8, minutes: 30 })
* @return {Duration}
*/
set(values) {
if (!this.isValid)
return this;
const mixed = { ...this.values, ...normalizeObject2(values, _Duration.normalizeUnit) };
return clone$1(this, { values: mixed });
}
/**
* "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration.
* @example dur.reconfigure({ locale: 'en-GB' })
* @return {Duration}
*/
reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {
const loc = this.loc.clone({ locale, numberingSystem });
const opts = { loc, matrix, conversionAccuracy };
return clone$1(this, opts);
}
/**
* Return the length of the duration in the specified unit.
* @param {string} unit - a unit such as 'minutes' or 'days'
* @example Duration.fromObject({years: 1}).as('days') //=> 365
* @example Duration.fromObject({years: 1}).as('months') //=> 12
* @example Duration.fromObject({hours: 60}).as('days') //=> 2.5
* @return {number}
*/
as(unit) {
return this.isValid ? this.shiftTo(unit).get(unit) : NaN;
}
/**
* Reduce this Duration to its canonical representation in its current units.
* Assuming the overall value of the Duration is positive, this means:
* - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)
* - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise
* the overall value would be negative, see second example)
* - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)
*
* If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.
* @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }
* @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }
* @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }
* @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }
* @return {Duration}
*/
normalize() {
if (!this.isValid)
return this;
const vals = this.toObject();
normalizeValues2(this.matrix, vals);
return clone$1(this, { values: vals }, true);
}
/**
* Rescale units to its largest representation
* @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }
* @return {Duration}
*/
rescale() {
if (!this.isValid)
return this;
const vals = removeZeroes2(this.normalize().shiftToAll().toObject());
return clone$1(this, { values: vals }, true);
}
/**
* Convert this Duration into its representation in a different set of units.
* @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }
* @return {Duration}
*/
shiftTo(...units) {
if (!this.isValid)
return this;
if (units.length === 0) {
return this;
}
units = units.map((u) => _Duration.normalizeUnit(u));
const built = {}, accumulated = {}, vals = this.toObject();
let lastUnit;
for (const k of orderedUnits$1) {
if (units.indexOf(k) >= 0) {
lastUnit = k;
let own = 0;
for (const ak in accumulated) {
own += this.matrix[ak][k] * accumulated[ak];
accumulated[ak] = 0;
}
if (isNumber2(vals[k])) {
own += vals[k];
}
const i = Math.trunc(own);
built[k] = i;
accumulated[k] = (own * 1e3 - i * 1e3) / 1e3;
} else if (isNumber2(vals[k])) {
accumulated[k] = vals[k];
}
}
for (const key2 in accumulated) {
if (accumulated[key2] !== 0) {
built[lastUnit] += key2 === lastUnit ? accumulated[key2] : accumulated[key2] / this.matrix[lastUnit][key2];
}
}
normalizeValues2(this.matrix, built);
return clone$1(this, { values: built }, true);
}
/**
* Shift this Duration to all available units.
* Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds")
* @return {Duration}
*/
shiftToAll() {
if (!this.isValid)
return this;
return this.shiftTo(
"years",
"months",
"weeks",
"days",
"hours",
"minutes",
"seconds",
"milliseconds"
);
}
/**
* Return the negative of this Duration.
* @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }
* @return {Duration}
*/
negate() {
if (!this.isValid)
return this;
const negated = {};
for (const k of Object.keys(this.values)) {
negated[k] = this.values[k] === 0 ? 0 : -this.values[k];
}
return clone$1(this, { values: negated }, true);
}
/**
* Get the years.
* @type {number}
*/
get years() {
return this.isValid ? this.values.years || 0 : NaN;
}
/**
* Get the quarters.
* @type {number}
*/
get quarters() {
return this.isValid ? this.values.quarters || 0 : NaN;
}
/**
* Get the months.
* @type {number}
*/
get months() {
return this.isValid ? this.values.months || 0 : NaN;
}
/**
* Get the weeks
* @type {number}
*/
get weeks() {
return this.isValid ? this.values.weeks || 0 : NaN;
}
/**
* Get the days.
* @type {number}
*/
get days() {
return this.isValid ? this.values.days || 0 : NaN;
}
/**
* Get the hours.
* @type {number}
*/
get hours() {
return this.isValid ? this.values.hours || 0 : NaN;
}
/**
* Get the minutes.
* @type {number}
*/
get minutes() {
return this.isValid ? this.values.minutes || 0 : NaN;
}
/**
* Get the seconds.
* @return {number}
*/
get seconds() {
return this.isValid ? this.values.seconds || 0 : NaN;
}
/**
* Get the milliseconds.
* @return {number}
*/
get milliseconds() {
return this.isValid ? this.values.milliseconds || 0 : NaN;
}
/**
* Returns whether the Duration is invalid. Invalid durations are returned by diff operations
* on invalid DateTimes or Intervals.
* @return {boolean}
*/
get isValid() {
return this.invalid === null;
}
/**
* Returns an error code if this Duration became invalid, or null if the Duration is valid
* @return {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Duration became invalid, or null if the Duration is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Equality check
* Two Durations are equal iff they have the same units and the same values for each unit.
* @param {Duration} other
* @return {boolean}
*/
equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
if (!this.loc.equals(other.loc)) {
return false;
}
function eq(v1, v2) {
if (v1 === void 0 || v1 === 0)
return v2 === void 0 || v2 === 0;
return v1 === v2;
}
for (const u of orderedUnits$1) {
if (!eq(this.values[u], other.values[u])) {
return false;
}
}
return true;
}
};
var INVALID$1 = "Invalid Interval";
function validateStartEnd2(start, end) {
if (!start || !start.isValid) {
return Interval2.invalid("missing or invalid start");
} else if (!end || !end.isValid) {
return Interval2.invalid("missing or invalid end");
} else if (end < start) {
return Interval2.invalid(
"end before start",
`The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`
);
} else {
return null;
}
}
var Interval2 = class _Interval {
/**
* @private
*/
constructor(config) {
this.s = config.start;
this.e = config.end;
this.invalid = config.invalid || null;
this.isLuxonInterval = true;
}
/**
* Create an invalid Interval.
* @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {Interval}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the Interval is invalid");
}
const invalid = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidIntervalError2(invalid);
} else {
return new _Interval({ invalid });
}
}
/**
* Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
* @param {DateTime|Date|Object} start
* @param {DateTime|Date|Object} end
* @return {Interval}
*/
static fromDateTimes(start, end) {
const builtStart = friendlyDateTime2(start), builtEnd = friendlyDateTime2(end);
const validateError = validateStartEnd2(builtStart, builtEnd);
if (validateError == null) {
return new _Interval({
start: builtStart,
end: builtEnd
});
} else {
return validateError;
}
}
/**
* Create an Interval from a start DateTime and a Duration to extend to.
* @param {DateTime|Date|Object} start
* @param {Duration|Object|number} duration - the length of the Interval.
* @return {Interval}
*/
static after(start, duration) {
const dur = Duration3.fromDurationLike(duration), dt = friendlyDateTime2(start);
return _Interval.fromDateTimes(dt, dt.plus(dur));
}
/**
* Create an Interval from an end DateTime and a Duration to extend backwards to.
* @param {DateTime|Date|Object} end
* @param {Duration|Object|number} duration - the length of the Interval.
* @return {Interval}
*/
static before(end, duration) {
const dur = Duration3.fromDurationLike(duration), dt = friendlyDateTime2(end);
return _Interval.fromDateTimes(dt.minus(dur), dt);
}
/**
* Create an Interval from an ISO 8601 string.
* Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
* @param {string} text - the ISO string to parse
* @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @return {Interval}
*/
static fromISO(text, opts) {
const [s3, e] = (text || "").split("/", 2);
if (s3 && e) {
let start, startIsValid;
try {
start = DateTime2.fromISO(s3, opts);
startIsValid = start.isValid;
} catch (e2) {
startIsValid = false;
}
let end, endIsValid;
try {
end = DateTime2.fromISO(e, opts);
endIsValid = end.isValid;
} catch (e2) {
endIsValid = false;
}
if (startIsValid && endIsValid) {
return _Interval.fromDateTimes(start, end);
}
if (startIsValid) {
const dur = Duration3.fromISO(e, opts);
if (dur.isValid) {
return _Interval.after(start, dur);
}
} else if (endIsValid) {
const dur = Duration3.fromISO(s3, opts);
if (dur.isValid) {
return _Interval.before(end, dur);
}
}
}
return _Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
/**
* Check if an object is an Interval. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isInterval(o) {
return o && o.isLuxonInterval || false;
}
/**
* Returns the start of the Interval
* @type {DateTime}
*/
get start() {
return this.isValid ? this.s : null;
}
/**
* Returns the end of the Interval
* @type {DateTime}
*/
get end() {
return this.isValid ? this.e : null;
}
/**
* Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
* @type {boolean}
*/
get isValid() {
return this.invalidReason === null;
}
/**
* Returns an error code if this Interval is invalid, or null if the Interval is valid
* @type {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Interval became invalid, or null if the Interval is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Returns the length of the Interval in the specified unit.
* @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
* @return {number}
*/
length(unit = "milliseconds") {
return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;
}
/**
* Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
* Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
* asks 'what dates are included in this interval?', not 'how many days long is this interval?'
* @param {string} [unit='milliseconds'] - the unit of time to count.
* @return {number}
*/
count(unit = "milliseconds") {
if (!this.isValid)
return NaN;
const start = this.start.startOf(unit), end = this.end.startOf(unit);
return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());
}
/**
* Returns whether this Interval's start and end are both in the same unit of time
* @param {string} unit - the unit of time to check sameness on
* @return {boolean}
*/
hasSame(unit) {
return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;
}
/**
* Return whether this Interval has the same start and end DateTimes.
* @return {boolean}
*/
isEmpty() {
return this.s.valueOf() === this.e.valueOf();
}
/**
* Return whether this Interval's start is after the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
isAfter(dateTime) {
if (!this.isValid)
return false;
return this.s > dateTime;
}
/**
* Return whether this Interval's end is before the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
isBefore(dateTime) {
if (!this.isValid)
return false;
return this.e <= dateTime;
}
/**
* Return whether this Interval contains the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
contains(dateTime) {
if (!this.isValid)
return false;
return this.s <= dateTime && this.e > dateTime;
}
/**
* "Sets" the start and/or end dates. Returns a newly-constructed Interval.
* @param {Object} values - the values to set
* @param {DateTime} values.start - the starting DateTime
* @param {DateTime} values.end - the ending DateTime
* @return {Interval}
*/
set({ start, end } = {}) {
if (!this.isValid)
return this;
return _Interval.fromDateTimes(start || this.s, end || this.e);
}
/**
* Split this Interval at each of the specified DateTimes
* @param {...DateTime} dateTimes - the unit of time to count.
* @return {Array}
*/
splitAt(...dateTimes) {
if (!this.isValid)
return [];
const sorted = dateTimes.map(friendlyDateTime2).filter((d) => this.contains(d)).sort(), results = [];
let { s: s3 } = this, i = 0;
while (s3 < this.e) {
const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;
results.push(_Interval.fromDateTimes(s3, next));
s3 = next;
i += 1;
}
return results;
}
/**
* Split this Interval into smaller Intervals, each of the specified length.
* Left over time is grouped into a smaller interval
* @param {Duration|Object|number} duration - The length of each resulting interval.
* @return {Array}
*/
splitBy(duration) {
const dur = Duration3.fromDurationLike(duration);
if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
return [];
}
let { s: s3 } = this, idx = 1, next;
const results = [];
while (s3 < this.e) {
const added = this.start.plus(dur.mapUnits((x) => x * idx));
next = +added > +this.e ? this.e : added;
results.push(_Interval.fromDateTimes(s3, next));
s3 = next;
idx += 1;
}
return results;
}
/**
* Split this Interval into the specified number of smaller intervals.
* @param {number} numberOfParts - The number of Intervals to divide the Interval into.
* @return {Array}
*/
divideEqually(numberOfParts) {
if (!this.isValid)
return [];
return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);
}
/**
* Return whether this Interval overlaps with the specified Interval
* @param {Interval} other
* @return {boolean}
*/
overlaps(other) {
return this.e > other.s && this.s < other.e;
}
/**
* Return whether this Interval's end is adjacent to the specified Interval's start.
* @param {Interval} other
* @return {boolean}
*/
abutsStart(other) {
if (!this.isValid)
return false;
return +this.e === +other.s;
}
/**
* Return whether this Interval's start is adjacent to the specified Interval's end.
* @param {Interval} other
* @return {boolean}
*/
abutsEnd(other) {
if (!this.isValid)
return false;
return +other.e === +this.s;
}
/**
* Return whether this Interval engulfs the start and end of the specified Interval.
* @param {Interval} other
* @return {boolean}
*/
engulfs(other) {
if (!this.isValid)
return false;
return this.s <= other.s && this.e >= other.e;
}
/**
* Return whether this Interval has the same start and end as the specified Interval.
* @param {Interval} other
* @return {boolean}
*/
equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
return this.s.equals(other.s) && this.e.equals(other.e);
}
/**
* Return an Interval representing the intersection of this Interval and the specified Interval.
* Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
* Returns null if the intersection is empty, meaning, the intervals don't intersect.
* @param {Interval} other
* @return {Interval}
*/
intersection(other) {
if (!this.isValid)
return this;
const s3 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e;
if (s3 >= e) {
return null;
} else {
return _Interval.fromDateTimes(s3, e);
}
}
/**
* Return an Interval representing the union of this Interval and the specified Interval.
* Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
* @param {Interval} other
* @return {Interval}
*/
union(other) {
if (!this.isValid)
return this;
const s3 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;
return _Interval.fromDateTimes(s3, e);
}
/**
* Merge an array of Intervals into a equivalent minimal set of Intervals.
* Combines overlapping and adjacent Intervals.
* @param {Array} intervals
* @return {Array}
*/
static merge(intervals) {
const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(
([sofar, current2], item) => {
if (!current2) {
return [sofar, item];
} else if (current2.overlaps(item) || current2.abutsStart(item)) {
return [sofar, current2.union(item)];
} else {
return [sofar.concat([current2]), item];
}
},
[[], null]
);
if (final) {
found.push(final);
}
return found;
}
/**
* Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
* @param {Array} intervals
* @return {Array}
*/
static xor(intervals) {
let start = null, currentCount = 0;
const results = [], ends = intervals.map((i) => [
{ time: i.s, type: "s" },
{ time: i.e, type: "e" }
]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time);
for (const i of arr) {
currentCount += i.type === "s" ? 1 : -1;
if (currentCount === 1) {
start = i.time;
} else {
if (start && +start !== +i.time) {
results.push(_Interval.fromDateTimes(start, i.time));
}
start = null;
}
}
return _Interval.merge(results);
}
/**
* Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
* @param {...Interval} intervals
* @return {Array}
*/
difference(...intervals) {
return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty());
}
/**
* Returns a string representation of this Interval appropriate for debugging.
* @return {string}
*/
toString() {
if (!this.isValid)
return INVALID$1;
return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`;
}
/**
* Returns a localized string representing this Interval. Accepts the same options as the
* Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
* {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
* is browser-specific, but in general it will return an appropriate representation of the
* Interval in the assigned locale. Defaults to the system's locale if no locale has been
* specified.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
* Intl.DateTimeFormat constructor options.
* @param {Object} opts - Options to override the configuration of the start DateTime.
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 11/8/2022
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 8, 2022
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 78 novembre 2022
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 8:00 PM
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 8:00 p
* @return {string}
*/
toLocaleString(formatOpts = DATE_SHORT2, opts = {}) {
return this.isValid ? Formatter2.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID$1;
}
/**
* Returns an ISO 8601-compliant string representation of this Interval.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @param {Object} opts - The same options as {@link DateTime#toISO}
* @return {string}
*/
toISO(opts) {
if (!this.isValid)
return INVALID$1;
return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;
}
/**
* Returns an ISO 8601-compliant string representation of date of this Interval.
* The time components are ignored.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @return {string}
*/
toISODate() {
if (!this.isValid)
return INVALID$1;
return `${this.s.toISODate()}/${this.e.toISODate()}`;
}
/**
* Returns an ISO 8601-compliant string representation of time of this Interval.
* The date components are ignored.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @param {Object} opts - The same options as {@link DateTime#toISO}
* @return {string}
*/
toISOTime(opts) {
if (!this.isValid)
return INVALID$1;
return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;
}
/**
* Returns a string representation of this Interval formatted according to the specified format
* string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
* formatting tool.
* @param {string} dateFormat - The format string. This string formats the start and end time.
* See {@link DateTime#toFormat} for details.
* @param {Object} opts - Options.
* @param {string} [opts.separator = ' '] - A separator to place between the start and end
* representations.
* @return {string}
*/
toFormat(dateFormat, { separator = " \u2013 " } = {}) {
if (!this.isValid)
return INVALID$1;
return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;
}
/**
* Return a Duration representing the time spanned by this interval.
* @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
* @return {Duration}
*/
toDuration(unit, opts) {
if (!this.isValid) {
return Duration3.invalid(this.invalidReason);
}
return this.e.diff(this.s, unit, opts);
}
/**
* Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
* @param {function} mapFn
* @return {Interval}
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
*/
mapEndpoints(mapFn) {
return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
}
};
var Info2 = class {
/**
* Return whether the specified zone contains a DST.
* @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
* @return {boolean}
*/
static hasDST(zone = Settings2.defaultZone) {
const proto = DateTime2.now().setZone(zone).set({ month: 12 });
return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;
}
/**
* Return whether the specified zone is a valid IANA specifier.
* @param {string} zone - Zone to check
* @return {boolean}
*/
static isValidIANAZone(zone) {
return IANAZone2.isValidZone(zone);
}
/**
* Converts the input into a {@link Zone} instance.
*
* * If `input` is already a Zone instance, it is returned unchanged.
* * If `input` is a string containing a valid time zone name, a Zone instance
* with that name is returned.
* * If `input` is a string that doesn't refer to a known time zone, a Zone
* instance with {@link Zone#isValid} == false is returned.
* * If `input is a number, a Zone instance with the specified fixed offset
* in minutes is returned.
* * If `input` is `null` or `undefined`, the default zone is returned.
* @param {string|Zone|number} [input] - the value to be converted
* @return {Zone}
*/
static normalizeZone(input) {
return normalizeZone2(input, Settings2.defaultZone);
}
/**
* Return an array of standalone month names.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @param {string} [opts.outputCalendar='gregory'] - the calendar
* @example Info.months()[0] //=> 'January'
* @example Info.months('short')[0] //=> 'Jan'
* @example Info.months('numeric')[0] //=> '1'
* @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
* @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
* @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
* @return {Array}
*/
static months(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
return (locObj || Locale2.create(locale, numberingSystem, outputCalendar)).months(length);
}
/**
* Return an array of format month names.
* Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
* changes the string.
* See {@link Info#months}
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @param {string} [opts.outputCalendar='gregory'] - the calendar
* @return {Array}
*/
static monthsFormat(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
return (locObj || Locale2.create(locale, numberingSystem, outputCalendar)).months(length, true);
}
/**
* Return an array of standalone week names.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @example Info.weekdays()[0] //=> 'Monday'
* @example Info.weekdays('short')[0] //=> 'Mon'
* @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
* @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
* @return {Array}
*/
static weekdays(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
return (locObj || Locale2.create(locale, numberingSystem, null)).weekdays(length);
}
/**
* Return an array of format week names.
* Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
* changes the string.
* See {@link Info#weekdays}
* @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
* @param {Object} opts - options
* @param {string} [opts.locale=null] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @return {Array}
*/
static weekdaysFormat(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
return (locObj || Locale2.create(locale, numberingSystem, null)).weekdays(length, true);
}
/**
* Return an array of meridiems.
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @example Info.meridiems() //=> [ 'AM', 'PM' ]
* @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
* @return {Array}
*/
static meridiems({ locale = null } = {}) {
return Locale2.create(locale).meridiems();
}
/**
* Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
* @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @example Info.eras() //=> [ 'BC', 'AD' ]
* @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
* @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
* @return {Array}
*/
static eras(length = "short", { locale = null } = {}) {
return Locale2.create(locale, null, "gregory").eras(length);
}
/**
* Return the set of available features in this environment.
* Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
* Keys:
* * `relative`: whether this environment supports relative time formatting
* @example Info.features() //=> { relative: false }
* @return {Object}
*/
static features() {
return { relative: hasRelative2() };
}
};
function dayDiff2(earlier, later) {
const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier);
return Math.floor(Duration3.fromMillis(ms).as("days"));
}
function highOrderDiffs2(cursor, later, units) {
const differs = [
["years", (a, b) => b.year - a.year],
["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],
["months", (a, b) => b.month - a.month + (b.year - a.year) * 12],
[
"weeks",
(a, b) => {
const days = dayDiff2(a, b);
return (days - days % 7) / 7;
}
],
["days", dayDiff2]
];
const results = {};
const earlier = cursor;
let lowestOrder, highWater;
for (const [unit, differ] of differs) {
if (units.indexOf(unit) >= 0) {
lowestOrder = unit;
results[unit] = differ(cursor, later);
highWater = earlier.plus(results);
if (highWater > later) {
results[unit]--;
cursor = earlier.plus(results);
if (cursor > later) {
highWater = cursor;
results[unit]--;
cursor = earlier.plus(results);
}
} else {
cursor = highWater;
}
}
}
return [cursor, results, highWater, lowestOrder];
}
function diff(earlier, later, units, opts) {
let [cursor, results, highWater, lowestOrder] = highOrderDiffs2(earlier, later, units);
const remainingMillis = later - cursor;
const lowerOrderUnits = units.filter(
(u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0
);
if (lowerOrderUnits.length === 0) {
if (highWater < later) {
highWater = cursor.plus({ [lowestOrder]: 1 });
}
if (highWater !== cursor) {
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
}
}
const duration = Duration3.fromObject(results, opts);
if (lowerOrderUnits.length > 0) {
return Duration3.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration);
} else {
return duration;
}
}
var numberingSystems2 = {
arab: "[\u0660-\u0669]",
arabext: "[\u06F0-\u06F9]",
bali: "[\u1B50-\u1B59]",
beng: "[\u09E6-\u09EF]",
deva: "[\u0966-\u096F]",
fullwide: "[\uFF10-\uFF19]",
gujr: "[\u0AE6-\u0AEF]",
hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",
khmr: "[\u17E0-\u17E9]",
knda: "[\u0CE6-\u0CEF]",
laoo: "[\u0ED0-\u0ED9]",
limb: "[\u1946-\u194F]",
mlym: "[\u0D66-\u0D6F]",
mong: "[\u1810-\u1819]",
mymr: "[\u1040-\u1049]",
orya: "[\u0B66-\u0B6F]",
tamldec: "[\u0BE6-\u0BEF]",
telu: "[\u0C66-\u0C6F]",
thai: "[\u0E50-\u0E59]",
tibt: "[\u0F20-\u0F29]",
latn: "\\d"
};
var numberingSystemsUTF162 = {
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]
};
var hanidecChars2 = numberingSystems2.hanidec.replace(/[\[|\]]/g, "").split("");
function parseDigits2(str) {
let value = parseInt(str, 10);
if (isNaN(value)) {
value = "";
for (let i = 0; i < str.length; i++) {
const code = str.charCodeAt(i);
if (str[i].search(numberingSystems2.hanidec) !== -1) {
value += hanidecChars2.indexOf(str[i]);
} else {
for (const key2 in numberingSystemsUTF162) {
const [min, max] = numberingSystemsUTF162[key2];
if (code >= min && code <= max) {
value += code - min;
}
}
}
}
return parseInt(value, 10);
} else {
return value;
}
}
function digitRegex2({ numberingSystem }, append = "") {
return new RegExp(`${numberingSystems2[numberingSystem || "latn"]}${append}`);
}
var MISSING_FTP2 = "missing Intl.DateTimeFormat.formatToParts support";
function intUnit2(regex, post = (i) => i) {
return { regex, deser: ([s3]) => post(parseDigits2(s3)) };
}
var NBSP2 = String.fromCharCode(160);
var spaceOrNBSP2 = `[ ${NBSP2}]`;
var spaceOrNBSPRegExp2 = new RegExp(spaceOrNBSP2, "g");
function fixListRegex2(s3) {
return s3.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp2, spaceOrNBSP2);
}
function stripInsensitivities2(s3) {
return s3.replace(/\./g, "").replace(spaceOrNBSPRegExp2, " ").toLowerCase();
}
function oneOf2(strings, startIndex) {
if (strings === null) {
return null;
} else {
return {
regex: RegExp(strings.map(fixListRegex2).join("|")),
deser: ([s3]) => strings.findIndex((i) => stripInsensitivities2(s3) === stripInsensitivities2(i)) + startIndex
};
}
}
function offset2(regex, groups) {
return { regex, deser: ([, h, m]) => signedOffset2(h, m), groups };
}
function simple2(regex) {
return { regex, deser: ([s3]) => s3 };
}
function escapeToken2(value) {
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function unitForToken2(token, loc) {
const one = digitRegex2(loc), two = digitRegex2(loc, "{2}"), three = digitRegex2(loc, "{3}"), four = digitRegex2(loc, "{4}"), six = digitRegex2(loc, "{6}"), oneOrTwo = digitRegex2(loc, "{1,2}"), oneToThree = digitRegex2(loc, "{1,3}"), oneToSix = digitRegex2(loc, "{1,6}"), oneToNine = digitRegex2(loc, "{1,9}"), twoToFour = digitRegex2(loc, "{2,4}"), fourToSix = digitRegex2(loc, "{4,6}"), literal = (t) => ({ regex: RegExp(escapeToken2(t.val)), deser: ([s3]) => s3, literal: true }), unitate = (t) => {
if (token.literal) {
return literal(t);
}
switch (t.val) {
case "G":
return oneOf2(loc.eras("short"), 0);
case "GG":
return oneOf2(loc.eras("long"), 0);
case "y":
return intUnit2(oneToSix);
case "yy":
return intUnit2(twoToFour, untruncateYear2);
case "yyyy":
return intUnit2(four);
case "yyyyy":
return intUnit2(fourToSix);
case "yyyyyy":
return intUnit2(six);
case "M":
return intUnit2(oneOrTwo);
case "MM":
return intUnit2(two);
case "MMM":
return oneOf2(loc.months("short", true), 1);
case "MMMM":
return oneOf2(loc.months("long", true), 1);
case "L":
return intUnit2(oneOrTwo);
case "LL":
return intUnit2(two);
case "LLL":
return oneOf2(loc.months("short", false), 1);
case "LLLL":
return oneOf2(loc.months("long", false), 1);
case "d":
return intUnit2(oneOrTwo);
case "dd":
return intUnit2(two);
case "o":
return intUnit2(oneToThree);
case "ooo":
return intUnit2(three);
case "HH":
return intUnit2(two);
case "H":
return intUnit2(oneOrTwo);
case "hh":
return intUnit2(two);
case "h":
return intUnit2(oneOrTwo);
case "mm":
return intUnit2(two);
case "m":
return intUnit2(oneOrTwo);
case "q":
return intUnit2(oneOrTwo);
case "qq":
return intUnit2(two);
case "s":
return intUnit2(oneOrTwo);
case "ss":
return intUnit2(two);
case "S":
return intUnit2(oneToThree);
case "SSS":
return intUnit2(three);
case "u":
return simple2(oneToNine);
case "uu":
return simple2(oneOrTwo);
case "uuu":
return intUnit2(one);
case "a":
return oneOf2(loc.meridiems(), 0);
case "kkkk":
return intUnit2(four);
case "kk":
return intUnit2(twoToFour, untruncateYear2);
case "W":
return intUnit2(oneOrTwo);
case "WW":
return intUnit2(two);
case "E":
case "c":
return intUnit2(one);
case "EEE":
return oneOf2(loc.weekdays("short", false), 1);
case "EEEE":
return oneOf2(loc.weekdays("long", false), 1);
case "ccc":
return oneOf2(loc.weekdays("short", true), 1);
case "cccc":
return oneOf2(loc.weekdays("long", true), 1);
case "Z":
case "ZZ":
return offset2(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);
case "ZZZ":
return offset2(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);
case "z":
return simple2(/[a-z_+-/]{1,256}?/i);
case " ":
return simple2(/[^\S\n\r]/);
default:
return literal(t);
}
};
const unit = unitate(token) || {
invalidReason: MISSING_FTP2
};
unit.token = token;
return unit;
}
var partTypeStyleToTokenVal2 = {
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 tokenForPart2(part, formatOpts, resolvedOpts) {
const { type, value } = part;
if (type === "literal") {
const isSpace = /^\s+$/.test(value);
return {
literal: !isSpace,
val: isSpace ? " " : value
};
}
const style = formatOpts[type];
let actualType = type;
if (type === "hour") {
if (formatOpts.hour12 != null) {
actualType = formatOpts.hour12 ? "hour12" : "hour24";
} else if (formatOpts.hourCycle != null) {
if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") {
actualType = "hour12";
} else {
actualType = "hour24";
}
} else {
actualType = resolvedOpts.hour12 ? "hour12" : "hour24";
}
}
let val = partTypeStyleToTokenVal2[actualType];
if (typeof val === "object") {
val = val[style];
}
if (val) {
return {
literal: false,
val
};
}
return void 0;
}
function buildRegex2(units) {
const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, "");
return [`^${re}$`, units];
}
function match2(input, regex, handlers) {
const matches = input.match(regex);
if (matches) {
const all = {};
let matchIndex = 1;
for (const i in handlers) {
if (hasOwnProperty2(handlers, i)) {
const h = handlers[i], groups = h.groups ? h.groups + 1 : 1;
if (!h.literal && h.token) {
all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));
}
matchIndex += groups;
}
}
return [matches, all];
} else {
return [matches, {}];
}
}
function dateTimeFromMatches2(matches) {
const toField = (token) => {
switch (token) {
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 zone = null;
let specificOffset;
if (!isUndefined2(matches.z)) {
zone = IANAZone2.create(matches.z);
}
if (!isUndefined2(matches.Z)) {
if (!zone) {
zone = new FixedOffsetZone2(matches.Z);
}
specificOffset = matches.Z;
}
if (!isUndefined2(matches.q)) {
matches.M = (matches.q - 1) * 3 + 1;
}
if (!isUndefined2(matches.h)) {
if (matches.h < 12 && matches.a === 1) {
matches.h += 12;
} else if (matches.h === 12 && matches.a === 0) {
matches.h = 0;
}
}
if (matches.G === 0 && matches.y) {
matches.y = -matches.y;
}
if (!isUndefined2(matches.u)) {
matches.S = parseMillis2(matches.u);
}
const vals = Object.keys(matches).reduce((r, k) => {
const f = toField(k);
if (f) {
r[f] = matches[k];
}
return r;
}, {});
return [vals, zone, specificOffset];
}
var dummyDateTimeCache2 = null;
function getDummyDateTime2() {
if (!dummyDateTimeCache2) {
dummyDateTimeCache2 = DateTime2.fromMillis(1555555555555);
}
return dummyDateTimeCache2;
}
function maybeExpandMacroToken2(token, locale) {
if (token.literal) {
return token;
}
const formatOpts = Formatter2.macroTokenToFormatOpts(token.val);
const tokens = formatOptsToTokens2(formatOpts, locale);
if (tokens == null || tokens.includes(void 0)) {
return token;
}
return tokens;
}
function expandMacroTokens2(tokens, locale) {
return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken2(t, locale)));
}
function explainFromTokens2(locale, input, format) {
const tokens = expandMacroTokens2(Formatter2.parseFormat(format), locale), units = tokens.map((t) => unitForToken2(t, locale)), disqualifyingUnit = units.find((t) => t.invalidReason);
if (disqualifyingUnit) {
return { input, tokens, invalidReason: disqualifyingUnit.invalidReason };
} else {
const [regexString, handlers] = buildRegex2(units), regex = RegExp(regexString, "i"), [rawMatches, matches] = match2(input, regex, handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches2(matches) : [null, null, void 0];
if (hasOwnProperty2(matches, "a") && hasOwnProperty2(matches, "H")) {
throw new ConflictingSpecificationError2(
"Can't include meridiem when specifying 24-hour format"
);
}
return { input, tokens, regex, rawMatches, matches, result, zone, specificOffset };
}
}
function parseFromTokens2(locale, input, format) {
const { result, zone, specificOffset, invalidReason } = explainFromTokens2(locale, input, format);
return [result, zone, specificOffset, invalidReason];
}
function formatOptsToTokens2(formatOpts, locale) {
if (!formatOpts) {
return null;
}
const formatter = Formatter2.create(locale, formatOpts);
const df = formatter.dtFormatter(getDummyDateTime2());
const parts = df.formatToParts();
const resolvedOpts = df.resolvedOptions();
return parts.map((p) => tokenForPart2(p, formatOpts, resolvedOpts));
}
var nonLeapLadder2 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
var leapLadder2 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function unitOutOfRange2(unit, value) {
return new Invalid2(
"unit out of range",
`you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`
);
}
function dayOfWeek2(year, month, day) {
const d = new Date(Date.UTC(year, month - 1, day));
if (year < 100 && year >= 0) {
d.setUTCFullYear(d.getUTCFullYear() - 1900);
}
const js = d.getUTCDay();
return js === 0 ? 7 : js;
}
function computeOrdinal2(year, month, day) {
return day + (isLeapYear2(year) ? leapLadder2 : nonLeapLadder2)[month - 1];
}
function uncomputeOrdinal2(year, ordinal) {
const table = isLeapYear2(year) ? leapLadder2 : nonLeapLadder2, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0];
return { month: month0 + 1, day };
}
function gregorianToWeek2(gregObj) {
const { year, month, day } = gregObj, ordinal = computeOrdinal2(year, month, day), weekday = dayOfWeek2(year, month, day);
let weekNumber = Math.floor((ordinal - weekday + 10) / 7), weekYear;
if (weekNumber < 1) {
weekYear = year - 1;
weekNumber = weeksInWeekYear2(weekYear);
} else if (weekNumber > weeksInWeekYear2(year)) {
weekYear = year + 1;
weekNumber = 1;
} else {
weekYear = year;
}
return { weekYear, weekNumber, weekday, ...timeObject2(gregObj) };
}
function weekToGregorian2(weekData) {
const { weekYear, weekNumber, weekday } = weekData, weekdayOfJan4 = dayOfWeek2(weekYear, 1, 4), yearInDays = daysInYear2(weekYear);
let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, year;
if (ordinal < 1) {
year = weekYear - 1;
ordinal += daysInYear2(year);
} else if (ordinal > yearInDays) {
year = weekYear + 1;
ordinal -= daysInYear2(weekYear);
} else {
year = weekYear;
}
const { month, day } = uncomputeOrdinal2(year, ordinal);
return { year, month, day, ...timeObject2(weekData) };
}
function gregorianToOrdinal2(gregData) {
const { year, month, day } = gregData;
const ordinal = computeOrdinal2(year, month, day);
return { year, ordinal, ...timeObject2(gregData) };
}
function ordinalToGregorian2(ordinalData) {
const { year, ordinal } = ordinalData;
const { month, day } = uncomputeOrdinal2(year, ordinal);
return { year, month, day, ...timeObject2(ordinalData) };
}
function hasInvalidWeekData2(obj) {
const validYear = isInteger2(obj.weekYear), validWeek = integerBetween2(obj.weekNumber, 1, weeksInWeekYear2(obj.weekYear)), validWeekday = integerBetween2(obj.weekday, 1, 7);
if (!validYear) {
return unitOutOfRange2("weekYear", obj.weekYear);
} else if (!validWeek) {
return unitOutOfRange2("week", obj.week);
} else if (!validWeekday) {
return unitOutOfRange2("weekday", obj.weekday);
} else
return false;
}
function hasInvalidOrdinalData2(obj) {
const validYear = isInteger2(obj.year), validOrdinal = integerBetween2(obj.ordinal, 1, daysInYear2(obj.year));
if (!validYear) {
return unitOutOfRange2("year", obj.year);
} else if (!validOrdinal) {
return unitOutOfRange2("ordinal", obj.ordinal);
} else
return false;
}
function hasInvalidGregorianData2(obj) {
const validYear = isInteger2(obj.year), validMonth = integerBetween2(obj.month, 1, 12), validDay = integerBetween2(obj.day, 1, daysInMonth2(obj.year, obj.month));
if (!validYear) {
return unitOutOfRange2("year", obj.year);
} else if (!validMonth) {
return unitOutOfRange2("month", obj.month);
} else if (!validDay) {
return unitOutOfRange2("day", obj.day);
} else
return false;
}
function hasInvalidTimeData2(obj) {
const { hour, minute, second, millisecond } = obj;
const validHour = integerBetween2(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween2(minute, 0, 59), validSecond = integerBetween2(second, 0, 59), validMillisecond = integerBetween2(millisecond, 0, 999);
if (!validHour) {
return unitOutOfRange2("hour", hour);
} else if (!validMinute) {
return unitOutOfRange2("minute", minute);
} else if (!validSecond) {
return unitOutOfRange2("second", second);
} else if (!validMillisecond) {
return unitOutOfRange2("millisecond", millisecond);
} else
return false;
}
var INVALID4 = "Invalid DateTime";
var MAX_DATE2 = 864e13;
function unsupportedZone2(zone) {
return new Invalid2("unsupported zone", `the zone "${zone.name}" is not supported`);
}
function possiblyCachedWeekData2(dt) {
if (dt.weekData === null) {
dt.weekData = gregorianToWeek2(dt.c);
}
return dt.weekData;
}
function clone3(inst, alts) {
const current2 = {
ts: inst.ts,
zone: inst.zone,
c: inst.c,
o: inst.o,
loc: inst.loc,
invalid: inst.invalid
};
return new DateTime2({ ...current2, ...alts, old: current2 });
}
function fixOffset2(localTS, o, tz) {
let utcGuess = localTS - o * 60 * 1e3;
const o2 = tz.offset(utcGuess);
if (o === o2) {
return [utcGuess, o];
}
utcGuess -= (o2 - o) * 60 * 1e3;
const o3 = tz.offset(utcGuess);
if (o2 === o3) {
return [utcGuess, o2];
}
return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)];
}
function tsToObj2(ts, offset3) {
ts += offset3 * 60 * 1e3;
const d = new Date(ts);
return {
year: d.getUTCFullYear(),
month: d.getUTCMonth() + 1,
day: d.getUTCDate(),
hour: d.getUTCHours(),
minute: d.getUTCMinutes(),
second: d.getUTCSeconds(),
millisecond: d.getUTCMilliseconds()
};
}
function objToTS2(obj, offset3, zone) {
return fixOffset2(objToLocalTS2(obj), offset3, zone);
}
function adjustTime2(inst, dur) {
const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = {
...inst.c,
year,
month,
day: Math.min(inst.c.day, daysInMonth2(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
}, millisToAdd = Duration3.fromObject({
years: dur.years - Math.trunc(dur.years),
quarters: dur.quarters - Math.trunc(dur.quarters),
months: dur.months - Math.trunc(dur.months),
weeks: dur.weeks - Math.trunc(dur.weeks),
days: dur.days - Math.trunc(dur.days),
hours: dur.hours,
minutes: dur.minutes,
seconds: dur.seconds,
milliseconds: dur.milliseconds
}).as("milliseconds"), localTS = objToLocalTS2(c);
let [ts, o] = fixOffset2(localTS, oPre, inst.zone);
if (millisToAdd !== 0) {
ts += millisToAdd;
o = inst.zone.offset(ts);
}
return { ts, o };
}
function parseDataToDateTime2(parsed, parsedZone, opts, format, text, specificOffset) {
const { setZone, zone } = opts;
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
const interpretationZone = parsedZone || zone, inst = DateTime2.fromObject(parsed, {
...opts,
zone: interpretationZone,
specificOffset
});
return setZone ? inst : inst.setZone(zone);
} else {
return DateTime2.invalid(
new Invalid2("unparsable", `the input "${text}" can't be parsed as ${format}`)
);
}
}
function toTechFormat2(dt, format, allowZ = true) {
return dt.isValid ? Formatter2.create(Locale2.create("en-US"), {
allowZ,
forceSimple: true
}).formatDateTimeFromString(dt, format) : null;
}
function toISODate2(o, extended) {
const longFormat = o.c.year > 9999 || o.c.year < 0;
let c = "";
if (longFormat && o.c.year >= 0)
c += "+";
c += padStart2(o.c.year, longFormat ? 6 : 4);
if (extended) {
c += "-";
c += padStart2(o.c.month);
c += "-";
c += padStart2(o.c.day);
} else {
c += padStart2(o.c.month);
c += padStart2(o.c.day);
}
return c;
}
function toISOTime2(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) {
let c = padStart2(o.c.hour);
if (extended) {
c += ":";
c += padStart2(o.c.minute);
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
c += ":";
}
} else {
c += padStart2(o.c.minute);
}
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
c += padStart2(o.c.second);
if (o.c.millisecond !== 0 || !suppressMilliseconds) {
c += ".";
c += padStart2(o.c.millisecond, 3);
}
}
if (includeOffset) {
if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {
c += "Z";
} else if (o.o < 0) {
c += "-";
c += padStart2(Math.trunc(-o.o / 60));
c += ":";
c += padStart2(Math.trunc(-o.o % 60));
} else {
c += "+";
c += padStart2(Math.trunc(o.o / 60));
c += ":";
c += padStart2(Math.trunc(o.o % 60));
}
}
if (extendedZone) {
c += "[" + o.zone.ianaName + "]";
}
return c;
}
var defaultUnitValues2 = {
month: 1,
day: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultWeekUnitValues2 = {
weekNumber: 1,
weekday: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultOrdinalUnitValues2 = {
ordinal: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var orderedUnits3 = ["year", "month", "day", "hour", "minute", "second", "millisecond"];
var orderedWeekUnits2 = [
"weekYear",
"weekNumber",
"weekday",
"hour",
"minute",
"second",
"millisecond"
];
var orderedOrdinalUnits2 = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function normalizeUnit2(unit) {
const normalized = {
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"
}[unit.toLowerCase()];
if (!normalized)
throw new InvalidUnitError2(unit);
return normalized;
}
function quickDT2(obj, opts) {
const zone = normalizeZone2(opts.zone, Settings2.defaultZone), loc = Locale2.fromObject(opts), tsNow = Settings2.now();
let ts, o;
if (!isUndefined2(obj.year)) {
for (const u of orderedUnits3) {
if (isUndefined2(obj[u])) {
obj[u] = defaultUnitValues2[u];
}
}
const invalid = hasInvalidGregorianData2(obj) || hasInvalidTimeData2(obj);
if (invalid) {
return DateTime2.invalid(invalid);
}
const offsetProvis = zone.offset(tsNow);
[ts, o] = objToTS2(obj, offsetProvis, zone);
} else {
ts = tsNow;
}
return new DateTime2({ ts, zone, loc, o });
}
function diffRelative2(start, end, opts) {
const round = isUndefined2(opts.round) ? true : opts.round, format = (c, unit) => {
c = roundTo2(c, round || opts.calendary ? 0 : 2, true);
const formatter = end.loc.clone(opts).relFormatter(opts);
return formatter.format(c, unit);
}, differ = (unit) => {
if (opts.calendary) {
if (!end.hasSame(start, unit)) {
return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);
} else
return 0;
} else {
return end.diff(start, unit).get(unit);
}
};
if (opts.unit) {
return format(differ(opts.unit), opts.unit);
}
for (const unit of opts.units) {
const count = differ(unit);
if (Math.abs(count) >= 1) {
return format(count, unit);
}
}
return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);
}
function lastOpts2(argList) {
let opts = {}, args;
if (argList.length > 0 && typeof argList[argList.length - 1] === "object") {
opts = argList[argList.length - 1];
args = Array.from(argList).slice(0, argList.length - 1);
} else {
args = Array.from(argList);
}
return [opts, args];
}
var DateTime2 = class _DateTime {
/**
* @access private
*/
constructor(config) {
const zone = config.zone || Settings2.defaultZone;
let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid2("invalid input") : null) || (!zone.isValid ? unsupportedZone2(zone) : null);
this.ts = isUndefined2(config.ts) ? Settings2.now() : config.ts;
let c = null, o = null;
if (!invalid) {
const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
if (unchanged) {
[c, o] = [config.old.c, config.old.o];
} else {
const ot = zone.offset(this.ts);
c = tsToObj2(this.ts, ot);
invalid = Number.isNaN(c.year) ? new Invalid2("invalid input") : null;
c = invalid ? null : c;
o = invalid ? null : ot;
}
}
this._zone = zone;
this.loc = config.loc || Locale2.create();
this.invalid = invalid;
this.weekData = null;
this.c = c;
this.o = o;
this.isLuxonDateTime = true;
}
// CONSTRUCT
/**
* Create a DateTime for the current instant, in the system's time zone.
*
* Use Settings to override these default values if needed.
* @example DateTime.now().toISO() //~> now in the ISO format
* @return {DateTime}
*/
static now() {
return new _DateTime({});
}
/**
* Create a local DateTime
* @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
* @param {number} [month=1] - The month, 1-indexed
* @param {number} [day=1] - The day of the month, 1-indexed
* @param {number} [hour=0] - The hour of the day, in 24-hour time
* @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
* @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
* @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
* @example DateTime.local() //~> now
* @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time
* @example DateTime.local(2017) //~> 2017-01-01T00:00:00
* @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00
* @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale
* @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00
* @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC
* @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00
* @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10
* @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765
* @return {DateTime}
*/
static local() {
const [opts, args] = lastOpts2(arguments), [year, month, day, hour, minute, second, millisecond] = args;
return quickDT2({ year, month, day, hour, minute, second, millisecond }, opts);
}
/**
* Create a DateTime in UTC
* @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
* @param {number} [month=1] - The month, 1-indexed
* @param {number} [day=1] - The day of the month
* @param {number} [hour=0] - The hour of the day, in 24-hour time
* @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
* @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
* @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
* @param {Object} options - configuration options for the DateTime
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
* @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
* @example DateTime.utc() //~> now
* @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z
* @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z
* @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z
* @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z
* @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z
* @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale
* @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z
* @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
* @return {DateTime}
*/
static utc() {
const [opts, args] = lastOpts2(arguments), [year, month, day, hour, minute, second, millisecond] = args;
opts.zone = FixedOffsetZone2.utcInstance;
return quickDT2({ year, month, day, hour, minute, second, millisecond }, opts);
}
/**
* Create a DateTime from a JavaScript Date object. Uses the default zone.
* @param {Date} date - a JavaScript Date object
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @return {DateTime}
*/
static fromJSDate(date, options = {}) {
const ts = isDate2(date) ? date.valueOf() : NaN;
if (Number.isNaN(ts)) {
return _DateTime.invalid("invalid input");
}
const zoneToUse = normalizeZone2(options.zone, Settings2.defaultZone);
if (!zoneToUse.isValid) {
return _DateTime.invalid(unsupportedZone2(zoneToUse));
}
return new _DateTime({
ts,
zone: zoneToUse,
loc: Locale2.fromObject(options)
});
}
/**
* Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
* @param {number} milliseconds - a number of milliseconds since 1970 UTC
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromMillis(milliseconds, options = {}) {
if (!isNumber2(milliseconds)) {
throw new InvalidArgumentError2(
`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`
);
} else if (milliseconds < -MAX_DATE2 || milliseconds > MAX_DATE2) {
return _DateTime.invalid("Timestamp out of range");
} else {
return new _DateTime({
ts: milliseconds,
zone: normalizeZone2(options.zone, Settings2.defaultZone),
loc: Locale2.fromObject(options)
});
}
}
/**
* Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
* @param {number} seconds - a number of seconds since 1970 UTC
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromSeconds(seconds, options = {}) {
if (!isNumber2(seconds)) {
throw new InvalidArgumentError2("fromSeconds requires a numerical input");
} else {
return new _DateTime({
ts: seconds * 1e3,
zone: normalizeZone2(options.zone, Settings2.defaultZone),
loc: Locale2.fromObject(options)
});
}
}
/**
* Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
* @param {Object} obj - the object to create the DateTime from
* @param {number} obj.year - a year, such as 1987
* @param {number} obj.month - a month, 1-12
* @param {number} obj.day - a day of the month, 1-31, depending on the month
* @param {number} obj.ordinal - day of the year, 1-365 or 366
* @param {number} obj.weekYear - an ISO week year
* @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
* @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
* @param {number} obj.hour - hour of the day, 0-23
* @param {number} obj.minute - minute of the hour, 0-59
* @param {number} obj.second - second of the minute, 0-59
* @param {number} obj.millisecond - millisecond of the second, 0-999
* @param {Object} opts - options for creating this DateTime
* @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
* @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
* @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
* @return {DateTime}
*/
static fromObject(obj, opts = {}) {
obj = obj || {};
const zoneToUse = normalizeZone2(opts.zone, Settings2.defaultZone);
if (!zoneToUse.isValid) {
return _DateTime.invalid(unsupportedZone2(zoneToUse));
}
const tsNow = Settings2.now(), offsetProvis = !isUndefined2(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), normalized = normalizeObject2(obj, normalizeUnit2), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale2.fromObject(opts);
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError2(
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
);
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError2("Can't mix ordinal dates with month/day");
}
const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;
let units, defaultValues, objNow = tsToObj2(tsNow, offsetProvis);
if (useWeekData) {
units = orderedWeekUnits2;
defaultValues = defaultWeekUnitValues2;
objNow = gregorianToWeek2(objNow);
} else if (containsOrdinal) {
units = orderedOrdinalUnits2;
defaultValues = defaultOrdinalUnitValues2;
objNow = gregorianToOrdinal2(objNow);
} else {
units = orderedUnits3;
defaultValues = defaultUnitValues2;
}
let foundFirst = false;
for (const u of units) {
const v = normalized[u];
if (!isUndefined2(v)) {
foundFirst = true;
} else if (foundFirst) {
normalized[u] = defaultValues[u];
} else {
normalized[u] = objNow[u];
}
}
const higherOrderInvalid = useWeekData ? hasInvalidWeekData2(normalized) : containsOrdinal ? hasInvalidOrdinalData2(normalized) : hasInvalidGregorianData2(normalized), invalid = higherOrderInvalid || hasInvalidTimeData2(normalized);
if (invalid) {
return _DateTime.invalid(invalid);
}
const gregorian = useWeekData ? weekToGregorian2(normalized) : containsOrdinal ? ordinalToGregorian2(normalized) : normalized, [tsFinal, offsetFinal] = objToTS2(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({
ts: tsFinal,
zone: zoneToUse,
o: offsetFinal,
loc
});
if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
return _DateTime.invalid(
"mismatched weekday",
`you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`
);
}
return inst;
}
/**
* Create a DateTime from an ISO 8601 string
* @param {string} text - the ISO string
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
* @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
* @example DateTime.fromISO('2016-05-25T09:08:34.123')
* @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
* @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
* @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
* @example DateTime.fromISO('2016-W05-4')
* @return {DateTime}
*/
static fromISO(text, opts = {}) {
const [vals, parsedZone] = parseISODate2(text);
return parseDataToDateTime2(vals, parsedZone, opts, "ISO 8601", text);
}
/**
* Create a DateTime from an RFC 2822 string
* @param {string} text - the RFC 2822 string
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
* @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
* @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
* @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
* @return {DateTime}
*/
static fromRFC2822(text, opts = {}) {
const [vals, parsedZone] = parseRFC2822Date2(text);
return parseDataToDateTime2(vals, parsedZone, opts, "RFC 2822", text);
}
/**
* Create a DateTime from an HTTP header date
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
* @param {string} text - the HTTP header date
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
* @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
* @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
* @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')
* @return {DateTime}
*/
static fromHTTP(text, opts = {}) {
const [vals, parsedZone] = parseHTTPDate2(text);
return parseDataToDateTime2(vals, parsedZone, opts, "HTTP", opts);
}
/**
* Create a DateTime from an input string and format string.
* Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
* @param {string} text - the string to parse
* @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
* @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromFormat(text, fmt, opts = {}) {
if (isUndefined2(text) || isUndefined2(fmt)) {
throw new InvalidArgumentError2("fromFormat requires an input string and a format");
}
const { locale = null, numberingSystem = null } = opts, localeToUse = Locale2.fromOpts({
locale,
numberingSystem,
defaultToEN: true
}), [vals, parsedZone, specificOffset, invalid] = parseFromTokens2(localeToUse, text, fmt);
if (invalid) {
return _DateTime.invalid(invalid);
} else {
return parseDataToDateTime2(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
}
}
/**
* @deprecated use fromFormat instead
*/
static fromString(text, fmt, opts = {}) {
return _DateTime.fromFormat(text, fmt, opts);
}
/**
* Create a DateTime from a SQL date, time, or datetime
* Defaults to en-US if no locale has been specified, regardless of the system's locale
* @param {string} text - the string to parse
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
* @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @example DateTime.fromSQL('2017-05-15')
* @example DateTime.fromSQL('2017-05-15 09:12:34')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
* @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
* @example DateTime.fromSQL('09:12:34.342')
* @return {DateTime}
*/
static fromSQL(text, opts = {}) {
const [vals, parsedZone] = parseSQL2(text);
return parseDataToDateTime2(vals, parsedZone, opts, "SQL", text);
}
/**
* Create an invalid DateTime.
* @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {DateTime}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the DateTime is invalid");
}
const invalid = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidDateTimeError2(invalid);
} else {
return new _DateTime({ invalid });
}
}
/**
* Check if an object is an instance of DateTime. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isDateTime(o) {
return o && o.isLuxonDateTime || false;
}
/**
* Produce the format string for a set of options
* @param formatOpts
* @param localeOpts
* @returns {string}
*/
static parseFormatForOpts(formatOpts, localeOpts = {}) {
const tokenList = formatOptsToTokens2(formatOpts, Locale2.fromObject(localeOpts));
return !tokenList ? null : tokenList.map((t) => t ? t.val : null).join("");
}
/**
* Produce the the fully expanded format token for the locale
* Does NOT quote characters, so quoted tokens will not round trip correctly
* @param fmt
* @param localeOpts
* @returns {string}
*/
static expandFormat(fmt, localeOpts = {}) {
const expanded = expandMacroTokens2(Formatter2.parseFormat(fmt), Locale2.fromObject(localeOpts));
return expanded.map((t) => t.val).join("");
}
// INFO
/**
* Get the value of unit.
* @param {string} unit - a unit such as 'minute' or 'day'
* @example DateTime.local(2017, 7, 4).get('month'); //=> 7
* @example DateTime.local(2017, 7, 4).get('day'); //=> 4
* @return {number}
*/
get(unit) {
return this[unit];
}
/**
* Returns whether the DateTime is valid. Invalid DateTimes occur when:
* * The DateTime was created from invalid calendar information, such as the 13th month or February 30
* * The DateTime was created by an operation on another invalid date
* @type {boolean}
*/
get isValid() {
return this.invalid === null;
}
/**
* Returns an error code if this DateTime is invalid, or null if the DateTime is valid
* @type {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
*
* @type {string}
*/
get locale() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
*
* @type {string}
*/
get numberingSystem() {
return this.isValid ? this.loc.numberingSystem : null;
}
/**
* Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
*
* @type {string}
*/
get outputCalendar() {
return this.isValid ? this.loc.outputCalendar : null;
}
/**
* Get the time zone associated with this DateTime.
* @type {Zone}
*/
get zone() {
return this._zone;
}
/**
* Get the name of the time zone.
* @type {string}
*/
get zoneName() {
return this.isValid ? this.zone.name : null;
}
/**
* Get the year
* @example DateTime.local(2017, 5, 25).year //=> 2017
* @type {number}
*/
get year() {
return this.isValid ? this.c.year : NaN;
}
/**
* Get the quarter
* @example DateTime.local(2017, 5, 25).quarter //=> 2
* @type {number}
*/
get quarter() {
return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
}
/**
* Get the month (1-12).
* @example DateTime.local(2017, 5, 25).month //=> 5
* @type {number}
*/
get month() {
return this.isValid ? this.c.month : NaN;
}
/**
* Get the day of the month (1-30ish).
* @example DateTime.local(2017, 5, 25).day //=> 25
* @type {number}
*/
get day() {
return this.isValid ? this.c.day : NaN;
}
/**
* Get the hour of the day (0-23).
* @example DateTime.local(2017, 5, 25, 9).hour //=> 9
* @type {number}
*/
get hour() {
return this.isValid ? this.c.hour : NaN;
}
/**
* Get the minute of the hour (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
* @type {number}
*/
get minute() {
return this.isValid ? this.c.minute : NaN;
}
/**
* Get the second of the minute (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
* @type {number}
*/
get second() {
return this.isValid ? this.c.second : NaN;
}
/**
* Get the millisecond of the second (0-999).
* @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
* @type {number}
*/
get millisecond() {
return this.isValid ? this.c.millisecond : NaN;
}
/**
* Get the week year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 12, 31).weekYear //=> 2015
* @type {number}
*/
get weekYear() {
return this.isValid ? possiblyCachedWeekData2(this).weekYear : NaN;
}
/**
* Get the week number of the week year (1-52ish).
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2017, 5, 25).weekNumber //=> 21
* @type {number}
*/
get weekNumber() {
return this.isValid ? possiblyCachedWeekData2(this).weekNumber : NaN;
}
/**
* Get the day of the week.
* 1 is Monday and 7 is Sunday
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 11, 31).weekday //=> 4
* @type {number}
*/
get weekday() {
return this.isValid ? possiblyCachedWeekData2(this).weekday : NaN;
}
/**
* Get the ordinal (meaning the day of the year)
* @example DateTime.local(2017, 5, 25).ordinal //=> 145
* @type {number|DateTime}
*/
get ordinal() {
return this.isValid ? gregorianToOrdinal2(this.c).ordinal : NaN;
}
/**
* Get the human readable short month name, such as 'Oct'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthShort //=> Oct
* @type {string}
*/
get monthShort() {
return this.isValid ? Info2.months("short", { locObj: this.loc })[this.month - 1] : null;
}
/**
* Get the human readable long month name, such as 'October'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthLong //=> October
* @type {string}
*/
get monthLong() {
return this.isValid ? Info2.months("long", { locObj: this.loc })[this.month - 1] : null;
}
/**
* Get the human readable short weekday, such as 'Mon'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
* @type {string}
*/
get weekdayShort() {
return this.isValid ? Info2.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
}
/**
* Get the human readable long weekday, such as 'Monday'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
* @type {string}
*/
get weekdayLong() {
return this.isValid ? Info2.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
}
/**
* Get the UTC offset of this DateTime in minutes
* @example DateTime.now().offset //=> -240
* @example DateTime.utc().offset //=> 0
* @type {number}
*/
get offset() {
return this.isValid ? +this.o : NaN;
}
/**
* Get the short human name for the zone's current offset, for example "EST" or "EDT".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
get offsetNameShort() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "short",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
get offsetNameLong() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "long",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get whether this zone's offset ever changes, as in a DST.
* @type {boolean}
*/
get isOffsetFixed() {
return this.isValid ? this.zone.isUniversal : null;
}
/**
* Get whether the DateTime is in a DST.
* @type {boolean}
*/
get isInDST() {
if (this.isOffsetFixed) {
return false;
} else {
return this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
}
}
/**
* Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
* in this DateTime's zone. During DST changes local time can be ambiguous, for example
* `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
* This method will return both possible DateTimes if this DateTime's local time is ambiguous.
* @returns {DateTime[]}
*/
getPossibleOffsets() {
if (!this.isValid || this.isOffsetFixed) {
return [this];
}
const dayMs = 864e5;
const minuteMs = 6e4;
const localTS = objToLocalTS2(this.c);
const oEarlier = this.zone.offset(localTS - dayMs);
const oLater = this.zone.offset(localTS + dayMs);
const o1 = this.zone.offset(localTS - oEarlier * minuteMs);
const o2 = this.zone.offset(localTS - oLater * minuteMs);
if (o1 === o2) {
return [this];
}
const ts1 = localTS - o1 * minuteMs;
const ts2 = localTS - o2 * minuteMs;
const c1 = tsToObj2(ts1, o1);
const c2 = tsToObj2(ts2, o2);
if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {
return [clone3(this, { ts: ts1 }), clone3(this, { ts: ts2 })];
}
return [this];
}
/**
* Returns true if this DateTime is in a leap year, false otherwise
* @example DateTime.local(2016).isInLeapYear //=> true
* @example DateTime.local(2013).isInLeapYear //=> false
* @type {boolean}
*/
get isInLeapYear() {
return isLeapYear2(this.year);
}
/**
* Returns the number of days in this DateTime's month
* @example DateTime.local(2016, 2).daysInMonth //=> 29
* @example DateTime.local(2016, 3).daysInMonth //=> 31
* @type {number}
*/
get daysInMonth() {
return daysInMonth2(this.year, this.month);
}
/**
* Returns the number of days in this DateTime's year
* @example DateTime.local(2016).daysInYear //=> 366
* @example DateTime.local(2013).daysInYear //=> 365
* @type {number}
*/
get daysInYear() {
return this.isValid ? daysInYear2(this.year) : NaN;
}
/**
* Returns the number of weeks in this DateTime's year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2004).weeksInWeekYear //=> 53
* @example DateTime.local(2013).weeksInWeekYear //=> 52
* @type {number}
*/
get weeksInWeekYear() {
return this.isValid ? weeksInWeekYear2(this.weekYear) : NaN;
}
/**
* Returns the resolved Intl options for this DateTime.
* This is useful in understanding the behavior of formatting methods
* @param {Object} opts - the same options as toLocaleString
* @return {Object}
*/
resolvedLocaleOptions(opts = {}) {
const { locale, numberingSystem, calendar } = Formatter2.create(
this.loc.clone(opts),
opts
).resolvedOptions(this);
return { locale, numberingSystem, outputCalendar: calendar };
}
// TRANSFORM
/**
* "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
*
* Equivalent to {@link DateTime#setZone}('utc')
* @param {number} [offset=0] - optionally, an offset from UTC in minutes
* @param {Object} [opts={}] - options to pass to `setZone()`
* @return {DateTime}
*/
toUTC(offset3 = 0, opts = {}) {
return this.setZone(FixedOffsetZone2.instance(offset3), opts);
}
/**
* "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
*
* Equivalent to `setZone('local')`
* @return {DateTime}
*/
toLocal() {
return this.setZone(Settings2.defaultZone);
}
/**
* "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
*
* By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
* @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
* @param {Object} opts - options
* @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
* @return {DateTime}
*/
setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {
zone = normalizeZone2(zone, Settings2.defaultZone);
if (zone.equals(this.zone)) {
return this;
} else if (!zone.isValid) {
return _DateTime.invalid(unsupportedZone2(zone));
} else {
let newTS = this.ts;
if (keepLocalTime || keepCalendarTime) {
const offsetGuess = zone.offset(this.ts);
const asObj = this.toObject();
[newTS] = objToTS2(asObj, offsetGuess, zone);
}
return clone3(this, { ts: newTS, zone });
}
}
/**
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
* @param {Object} properties - the properties to set
* @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
* @return {DateTime}
*/
reconfigure({ locale, numberingSystem, outputCalendar } = {}) {
const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });
return clone3(this, { loc });
}
/**
* "Set" the locale. Returns a newly-constructed DateTime.
* Just a convenient alias for reconfigure({ locale })
* @example DateTime.local(2017, 5, 25).setLocale('en-GB')
* @return {DateTime}
*/
setLocale(locale) {
return this.reconfigure({ locale });
}
/**
* "Set" the values of specified units. Returns a newly-constructed DateTime.
* You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
* @param {Object} values - a mapping of units to numbers
* @example dt.set({ year: 2017 })
* @example dt.set({ hour: 8, minute: 30 })
* @example dt.set({ weekday: 5 })
* @example dt.set({ year: 2005, ordinal: 234 })
* @return {DateTime}
*/
set(values) {
if (!this.isValid)
return this;
const normalized = normalizeObject2(values, normalizeUnit2), settingWeekStuff = !isUndefined2(normalized.weekYear) || !isUndefined2(normalized.weekNumber) || !isUndefined2(normalized.weekday), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError2(
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
);
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError2("Can't mix ordinal dates with month/day");
}
let mixed;
if (settingWeekStuff) {
mixed = weekToGregorian2({ ...gregorianToWeek2(this.c), ...normalized });
} else if (!isUndefined2(normalized.ordinal)) {
mixed = ordinalToGregorian2({ ...gregorianToOrdinal2(this.c), ...normalized });
} else {
mixed = { ...this.toObject(), ...normalized };
if (isUndefined2(normalized.day)) {
mixed.day = Math.min(daysInMonth2(mixed.year, mixed.month), mixed.day);
}
}
const [ts, o] = objToTS2(mixed, this.o, this.zone);
return clone3(this, { ts, o });
}
/**
* Add a period of time to this DateTime and return the resulting DateTime
*
* Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
* @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @example DateTime.now().plus(123) //~> in 123 milliseconds
* @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
* @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
* @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
* @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
* @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
* @return {DateTime}
*/
plus(duration) {
if (!this.isValid)
return this;
const dur = Duration3.fromDurationLike(duration);
return clone3(this, adjustTime2(this, dur));
}
/**
* Subtract a period of time to this DateTime and return the resulting DateTime
* See {@link DateTime#plus}
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
@return {DateTime}
*/
minus(duration) {
if (!this.isValid)
return this;
const dur = Duration3.fromDurationLike(duration).negate();
return clone3(this, adjustTime2(this, dur));
}
/**
* "Set" this DateTime to the beginning of a unit of time.
* @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
* @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
* @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
* @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
* @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
* @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
* @return {DateTime}
*/
startOf(unit) {
if (!this.isValid)
return this;
const o = {}, normalizedUnit = Duration3.normalizeUnit(unit);
switch (normalizedUnit) {
case "years":
o.month = 1;
case "quarters":
case "months":
o.day = 1;
case "weeks":
case "days":
o.hour = 0;
case "hours":
o.minute = 0;
case "minutes":
o.second = 0;
case "seconds":
o.millisecond = 0;
break;
}
if (normalizedUnit === "weeks") {
o.weekday = 1;
}
if (normalizedUnit === "quarters") {
const q = Math.ceil(this.month / 3);
o.month = (q - 1) * 3 + 1;
}
return this.set(o);
}
/**
* "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
* @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
* @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
* @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
* @return {DateTime}
*/
endOf(unit) {
return this.isValid ? this.plus({ [unit]: 1 }).startOf(unit).minus(1) : this;
}
// OUTPUT
/**
* Returns a string representation of this DateTime formatted according to the specified format string.
* **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
* Defaults to en-US if no locale has been specified, regardless of the system's locale.
* @param {string} fmt - the format string
* @param {Object} opts - opts to override the configuration options on this DateTime
* @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
* @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
* @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
* @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
* @return {string}
*/
toFormat(fmt, opts = {}) {
return this.isValid ? Formatter2.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID4;
}
/**
* Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
* The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
* of the DateTime in the assigned locale.
* Defaults to the system's locale if no locale has been specified
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
* @param {Object} opts - opts to override the configuration options on this DateTime
* @example DateTime.now().toLocaleString(); //=> 4/20/2017
* @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
* @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
* @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
* @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
* @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
* @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
* @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
* @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
* @return {string}
*/
toLocaleString(formatOpts = DATE_SHORT2, opts = {}) {
return this.isValid ? Formatter2.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID4;
}
/**
* Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
* Defaults to the system's locale if no locale has been specified
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
* @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
* @example DateTime.now().toLocaleParts(); //=> [
* //=> { type: 'day', value: '25' },
* //=> { type: 'literal', value: '/' },
* //=> { type: 'month', value: '05' },
* //=> { type: 'literal', value: '/' },
* //=> { type: 'year', value: '1982' }
* //=> ]
*/
toLocaleParts(opts = {}) {
return this.isValid ? Formatter2.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.extendedZone=false] - add the time zone format extension
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
* @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
* @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
* @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
* @return {string}
*/
toISO({
format = "extended",
suppressSeconds = false,
suppressMilliseconds = false,
includeOffset = true,
extendedZone = false
} = {}) {
if (!this.isValid) {
return null;
}
const ext = format === "extended";
let c = toISODate2(this, ext);
c += "T";
c += toISOTime2(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);
return c;
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's date component
* @param {Object} opts - options
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
* @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
* @return {string}
*/
toISODate({ format = "extended" } = {}) {
if (!this.isValid) {
return null;
}
return toISODate2(this, format === "extended");
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's week date
* @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
* @return {string}
*/
toISOWeekDate() {
return toTechFormat2(this, "kkkk-'W'WW-c");
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's time component
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.extendedZone=true] - add the time zone format extension
* @param {boolean} [opts.includePrefix=false] - include the `T` prefix
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
* @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
* @return {string}
*/
toISOTime({
suppressMilliseconds = false,
suppressSeconds = false,
includeOffset = true,
includePrefix = false,
extendedZone = false,
format = "extended"
} = {}) {
if (!this.isValid) {
return null;
}
let c = includePrefix ? "T" : "";
return c + toISOTime2(
this,
format === "extended",
suppressSeconds,
suppressMilliseconds,
includeOffset,
extendedZone
);
}
/**
* Returns an RFC 2822-compatible string representation of this DateTime
* @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
* @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
* @return {string}
*/
toRFC2822() {
return toTechFormat2(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
}
/**
* Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
* Specifically, the string conforms to RFC 1123.
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
* @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
* @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
* @return {string}
*/
toHTTP() {
return toTechFormat2(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL Date
* @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
* @return {string}
*/
toSQLDate() {
if (!this.isValid) {
return null;
}
return toISODate2(this, true);
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL Time
* @param {Object} opts - options
* @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
* @example DateTime.utc().toSQL() //=> '05:15:16.345'
* @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
* @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
* @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
* @return {string}
*/
toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {
let fmt = "HH:mm:ss.SSS";
if (includeZone || includeOffset) {
if (includeOffsetSpace) {
fmt += " ";
}
if (includeZone) {
fmt += "z";
} else if (includeOffset) {
fmt += "ZZ";
}
}
return toTechFormat2(this, fmt, true);
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL DateTime
* @param {Object} opts - options
* @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
* @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
* @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
* @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
* @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
* @return {string}
*/
toSQL(opts = {}) {
if (!this.isValid) {
return null;
}
return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;
}
/**
* Returns a string representation of this DateTime appropriate for debugging
* @return {string}
*/
toString() {
return this.isValid ? this.toISO() : INVALID4;
}
/**
* Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
* @return {number}
*/
valueOf() {
return this.toMillis();
}
/**
* Returns the epoch milliseconds of this DateTime.
* @return {number}
*/
toMillis() {
return this.isValid ? this.ts : NaN;
}
/**
* Returns the epoch seconds of this DateTime.
* @return {number}
*/
toSeconds() {
return this.isValid ? this.ts / 1e3 : NaN;
}
/**
* Returns the epoch seconds (as a whole number) of this DateTime.
* @return {number}
*/
toUnixInteger() {
return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
}
/**
* Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
* @return {string}
*/
toJSON() {
return this.toISO();
}
/**
* Returns a BSON serializable equivalent to this DateTime.
* @return {Date}
*/
toBSON() {
return this.toJSDate();
}
/**
* Returns a JavaScript object with this DateTime's year, month, day, and so on.
* @param opts - options for generating the object
* @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
* @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
* @return {Object}
*/
toObject(opts = {}) {
if (!this.isValid)
return {};
const base = { ...this.c };
if (opts.includeConfig) {
base.outputCalendar = this.outputCalendar;
base.numberingSystem = this.loc.numberingSystem;
base.locale = this.loc.locale;
}
return base;
}
/**
* Returns a JavaScript Date equivalent to this DateTime.
* @return {Date}
*/
toJSDate() {
return new Date(this.isValid ? this.ts : NaN);
}
// COMPARE
/**
* Return the difference between two DateTimes as a Duration.
* @param {DateTime} otherDateTime - the DateTime to compare this one to
* @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @example
* var i1 = DateTime.fromISO('1982-05-25T09:45'),
* i2 = DateTime.fromISO('1983-10-14T10:30');
* i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
* i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
* i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
* i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
* @return {Duration}
*/
diff(otherDateTime, unit = "milliseconds", opts = {}) {
if (!this.isValid || !otherDateTime.isValid) {
return Duration3.invalid("created by diffing an invalid DateTime");
}
const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };
const units = maybeArray2(unit).map(Duration3.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff(earlier, later, units, durOpts);
return otherIsLater ? diffed.negate() : diffed;
}
/**
* Return the difference between this DateTime and right now.
* See {@link DateTime#diff}
* @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @return {Duration}
*/
diffNow(unit = "milliseconds", opts = {}) {
return this.diff(_DateTime.now(), unit, opts);
}
/**
* Return an Interval spanning between this DateTime and another DateTime
* @param {DateTime} otherDateTime - the other end point of the Interval
* @return {Interval}
*/
until(otherDateTime) {
return this.isValid ? Interval2.fromDateTimes(this, otherDateTime) : this;
}
/**
* Return whether this DateTime is in the same unit of time as another DateTime.
* Higher-order units must also be identical for this function to return `true`.
* Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
* @param {DateTime} otherDateTime - the other DateTime
* @param {string} unit - the unit of time to check sameness on
* @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
* @return {boolean}
*/
hasSame(otherDateTime, unit) {
if (!this.isValid)
return false;
const inputMs = otherDateTime.valueOf();
const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });
return adjustedToZone.startOf(unit) <= inputMs && inputMs <= adjustedToZone.endOf(unit);
}
/**
* Equality check
* Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
* To compare just the millisecond values, use `+dt1 === +dt2`.
* @param {DateTime} other - the other DateTime
* @return {boolean}
*/
equals(other) {
return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);
}
/**
* Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
* platform supports Intl.RelativeTimeFormat. Rounds down by default.
* @param {Object} options - options that affect the output
* @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
* @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
* @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
* @param {boolean} [options.round=true] - whether to round the numbers in the output.
* @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
* @param {string} options.locale - override the locale of this DateTime
* @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
* @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
* @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
* @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
* @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
* @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
* @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
*/
toRelative(options = {}) {
if (!this.isValid)
return null;
const base = options.base || _DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0;
let units = ["years", "months", "days", "hours", "minutes", "seconds"];
let unit = options.unit;
if (Array.isArray(options.unit)) {
units = options.unit;
unit = void 0;
}
return diffRelative2(base, this.plus(padding), {
...options,
numeric: "always",
units,
unit
});
}
/**
* Returns a string representation of this date relative to today, such as "yesterday" or "next month".
* Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
* @param {Object} options - options that affect the output
* @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
* @param {string} options.locale - override the locale of this DateTime
* @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
* @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
* @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
* @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
* @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
*/
toRelativeCalendar(options = {}) {
if (!this.isValid)
return null;
return diffRelative2(options.base || _DateTime.fromObject({}, { zone: this.zone }), this, {
...options,
numeric: "auto",
units: ["years", "months", "days"],
calendary: true
});
}
/**
* Return the min of several date times
* @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
* @return {DateTime} the min DateTime, or undefined if called with no argument
*/
static min(...dateTimes) {
if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError2("min requires all arguments be DateTimes");
}
return bestBy2(dateTimes, (i) => i.valueOf(), Math.min);
}
/**
* Return the max of several date times
* @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
* @return {DateTime} the max DateTime, or undefined if called with no argument
*/
static max(...dateTimes) {
if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError2("max requires all arguments be DateTimes");
}
return bestBy2(dateTimes, (i) => i.valueOf(), Math.max);
}
// MISC
/**
* Explain how a string would be parsed by fromFormat()
* @param {string} text - the string to parse
* @param {string} fmt - the format the string is expected to be in (see description)
* @param {Object} options - options taken by fromFormat()
* @return {Object}
*/
static fromFormatExplain(text, fmt, options = {}) {
const { locale = null, numberingSystem = null } = options, localeToUse = Locale2.fromOpts({
locale,
numberingSystem,
defaultToEN: true
});
return explainFromTokens2(localeToUse, text, fmt);
}
/**
* @deprecated use fromFormatExplain instead
*/
static fromStringExplain(text, fmt, options = {}) {
return _DateTime.fromFormatExplain(text, fmt, options);
}
// FORMAT PRESETS
/**
* {@link DateTime#toLocaleString} format like 10/14/1983
* @type {Object}
*/
static get DATE_SHORT() {
return DATE_SHORT2;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
* @type {Object}
*/
static get DATE_MED() {
return DATE_MED2;
}
/**
* {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
* @type {Object}
*/
static get DATE_MED_WITH_WEEKDAY() {
return DATE_MED_WITH_WEEKDAY2;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983'
* @type {Object}
*/
static get DATE_FULL() {
return DATE_FULL2;
}
/**
* {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
* @type {Object}
*/
static get DATE_HUGE() {
return DATE_HUGE2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_SIMPLE() {
return TIME_SIMPLE2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_SECONDS() {
return TIME_WITH_SECONDS2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_SHORT_OFFSET() {
return TIME_WITH_SHORT_OFFSET2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_LONG_OFFSET() {
return TIME_WITH_LONG_OFFSET2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
* @type {Object}
*/
static get TIME_24_SIMPLE() {
return TIME_24_SIMPLE2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_SECONDS() {
return TIME_24_WITH_SECONDS2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_SHORT_OFFSET() {
return TIME_24_WITH_SHORT_OFFSET2;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_LONG_OFFSET() {
return TIME_24_WITH_LONG_OFFSET2;
}
/**
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_SHORT() {
return DATETIME_SHORT2;
}
/**
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_SHORT_WITH_SECONDS() {
return DATETIME_SHORT_WITH_SECONDS2;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED() {
return DATETIME_MED2;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED_WITH_SECONDS() {
return DATETIME_MED_WITH_SECONDS2;
}
/**
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED_WITH_WEEKDAY() {
return DATETIME_MED_WITH_WEEKDAY2;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_FULL() {
return DATETIME_FULL2;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_FULL_WITH_SECONDS() {
return DATETIME_FULL_WITH_SECONDS2;
}
/**
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_HUGE() {
return DATETIME_HUGE2;
}
/**
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_HUGE_WITH_SECONDS() {
return DATETIME_HUGE_WITH_SECONDS2;
}
};
function friendlyDateTime2(dateTimeish) {
if (DateTime2.isDateTime(dateTimeish)) {
return dateTimeish;
} else if (dateTimeish && dateTimeish.valueOf && isNumber2(dateTimeish.valueOf())) {
return DateTime2.fromJSDate(dateTimeish);
} else if (dateTimeish && typeof dateTimeish === "object") {
return DateTime2.fromObject(dateTimeish);
} else {
throw new InvalidArgumentError2(
`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`
);
}
}
var DEFAULT_QUERY_SETTINGS = {
renderNullAs: "\\-",
taskCompletionTracking: false,
taskCompletionUseEmojiShorthand: false,
taskCompletionText: "completion",
taskCompletionDateFormat: "yyyy-MM-dd",
recursiveSubTaskCompletion: false,
warnOnEmptyResult: true,
refreshEnabled: true,
refreshInterval: 2500,
defaultDateFormat: "MMMM dd, yyyy",
defaultDateTimeFormat: "h:mm a - MMMM dd, yyyy",
maxRecursiveRenderDepth: 4,
tableIdColumnName: "File",
tableGroupColumnName: "Group",
showResultCount: true
};
var DEFAULT_EXPORT_SETTINGS = {
allowHtml: true
};
({
...DEFAULT_QUERY_SETTINGS,
...DEFAULT_EXPORT_SETTINGS,
...{
inlineQueryPrefix: "=",
inlineJsQueryPrefix: "$=",
inlineQueriesInCodeblocks: true,
enableInlineDataview: true,
enableDataviewJs: false,
enableInlineDataviewJs: false,
prettyRenderInlineFields: true,
prettyRenderInlineFieldsInLivePreview: true,
dataviewJsKeyword: "dataviewjs"
}
});
var Success = class _Success {
constructor(value) {
__publicField(this, "value");
__publicField(this, "successful");
this.value = value;
this.successful = true;
}
map(f) {
return new _Success(f(this.value));
}
flatMap(f) {
return f(this.value);
}
mapErr(f) {
return this;
}
bimap(succ, _fail) {
return this.map(succ);
}
orElse(_value) {
return this.value;
}
cast() {
return this;
}
orElseThrow(_message) {
return this.value;
}
};
var Failure = class _Failure {
constructor(error) {
__publicField(this, "error");
__publicField(this, "successful");
this.error = error;
this.successful = false;
}
map(_f) {
return this;
}
flatMap(_f) {
return this;
}
mapErr(f) {
return new _Failure(f(this.error));
}
bimap(_succ, fail) {
return this.mapErr(fail);
}
orElse(value) {
return value;
}
cast() {
return this;
}
orElseThrow(message) {
if (message)
throw new Error(message(this.error));
else
throw new Error("" + this.error);
}
};
var Result;
(function(Result2) {
function success(value) {
return new Success(value);
}
Result2.success = success;
function failure(error) {
return new Failure(error);
}
Result2.failure = failure;
function flatMap2(first, second, f) {
if (first.successful) {
if (second.successful)
return f(first.value, second.value);
else
return failure(second.error);
} else {
return failure(first.error);
}
}
Result2.flatMap2 = flatMap2;
function map2(first, second, f) {
return flatMap2(first, second, (a, b) => success(f(a, b)));
}
Result2.map2 = map2;
})(Result || (Result = {}));
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
var parsimmon_umd_min = { exports: {} };
parsimmon_umd_min.exports;
(function(module3, exports2) {
!function(n3, t) {
module3.exports = t();
}("undefined" != typeof self ? self : commonjsGlobal, function() {
return function(n3) {
var t = {};
function r(e) {
if (t[e])
return t[e].exports;
var u = t[e] = { i: e, l: false, exports: {} };
return n3[e].call(u.exports, u, u.exports, r), u.l = true, u.exports;
}
return r.m = n3, r.c = t, r.d = function(n4, t2, e) {
r.o(n4, t2) || Object.defineProperty(n4, t2, { configurable: false, enumerable: true, get: e });
}, r.r = function(n4) {
Object.defineProperty(n4, "__esModule", { value: true });
}, r.n = function(n4) {
var t2 = n4 && n4.__esModule ? function() {
return n4.default;
} : function() {
return n4;
};
return r.d(t2, "a", t2), t2;
}, r.o = function(n4, t2) {
return Object.prototype.hasOwnProperty.call(n4, t2);
}, r.p = "", r(r.s = 0);
}([function(n3, t, r) {
function e(n4) {
if (!(this instanceof e))
return new e(n4);
this._ = n4;
}
var u = e.prototype;
function o(n4, t2) {
for (var r2 = 0; r2 < n4; r2++)
t2(r2);
}
function i(n4, t2, r2) {
return function(n5, t3) {
o(t3.length, function(r3) {
n5(t3[r3], r3, t3);
});
}(function(r3, e2, u2) {
t2 = n4(t2, r3, e2, u2);
}, r2), t2;
}
function a(n4, t2) {
return i(function(t3, r2, e2, u2) {
return t3.concat([n4(r2, e2, u2)]);
}, [], t2);
}
function f(n4, t2) {
var r2 = { v: 0, buf: t2 };
return o(n4, function() {
var n5;
r2 = { v: r2.v << 1 | (n5 = r2.buf, n5[0] >> 7), buf: function(n6) {
var t3 = i(function(n7, t4, r3, e2) {
return n7.concat(r3 === e2.length - 1 ? Buffer.from([t4, 0]).readUInt16BE(0) : e2.readUInt16BE(r3));
}, [], n6);
return Buffer.from(a(function(n7) {
return (n7 << 1 & 65535) >> 8;
}, t3));
}(r2.buf) };
}), r2;
}
function c() {
return "undefined" != typeof Buffer;
}
function s3() {
if (!c())
throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.");
}
function l3(n4) {
s3();
var t2 = i(function(n5, t3) {
return n5 + t3;
}, 0, n4);
if (t2 % 8 != 0)
throw new Error("The bits [" + n4.join(", ") + "] add up to " + t2 + " which is not an even number of bytes; the total should be divisible by 8");
var r2, u2 = t2 / 8, o2 = (r2 = function(n5) {
return n5 > 48;
}, i(function(n5, t3) {
return n5 || (r2(t3) ? t3 : n5);
}, null, n4));
if (o2)
throw new Error(o2 + " bit range requested exceeds 48 bit (6 byte) Number max.");
return new e(function(t3, r3) {
var e2 = u2 + r3;
return e2 > t3.length ? x(r3, u2.toString() + " bytes") : b(e2, i(function(n5, t4) {
var r4 = f(t4, n5.buf);
return { coll: n5.coll.concat(r4.v), buf: r4.buf };
}, { coll: [], buf: t3.slice(r3, e2) }, n4).coll);
});
}
function h(n4, t2) {
return new e(function(r2, e2) {
return s3(), e2 + t2 > r2.length ? x(e2, t2 + " bytes for " + n4) : b(e2 + t2, r2.slice(e2, e2 + t2));
});
}
function p(n4, t2) {
if ("number" != typeof (r2 = t2) || Math.floor(r2) !== r2 || t2 < 0 || t2 > 6)
throw new Error(n4 + " requires integer length in range [0, 6].");
var r2;
}
function d(n4) {
return p("uintBE", n4), h("uintBE(" + n4 + ")", n4).map(function(t2) {
return t2.readUIntBE(0, n4);
});
}
function v(n4) {
return p("uintLE", n4), h("uintLE(" + n4 + ")", n4).map(function(t2) {
return t2.readUIntLE(0, n4);
});
}
function g(n4) {
return p("intBE", n4), h("intBE(" + n4 + ")", n4).map(function(t2) {
return t2.readIntBE(0, n4);
});
}
function m(n4) {
return p("intLE", n4), h("intLE(" + n4 + ")", n4).map(function(t2) {
return t2.readIntLE(0, n4);
});
}
function y(n4) {
return n4 instanceof e;
}
function E(n4) {
return "[object Array]" === {}.toString.call(n4);
}
function w(n4) {
return c() && Buffer.isBuffer(n4);
}
function b(n4, t2) {
return { status: true, index: n4, value: t2, furthest: -1, expected: [] };
}
function x(n4, t2) {
return E(t2) || (t2 = [t2]), { status: false, index: -1, value: null, furthest: n4, expected: t2 };
}
function B(n4, t2) {
if (!t2)
return n4;
if (n4.furthest > t2.furthest)
return n4;
var r2 = n4.furthest === t2.furthest ? function(n5, t3) {
if (function() {
if (void 0 !== e._supportsSet)
return e._supportsSet;
var n6 = "undefined" != typeof Set;
return e._supportsSet = n6, n6;
}() && Array.from) {
for (var r3 = new Set(n5), u2 = 0; u2 < t3.length; u2++)
r3.add(t3[u2]);
var o2 = Array.from(r3);
return o2.sort(), o2;
}
for (var i2 = {}, a2 = 0; a2 < n5.length; a2++)
i2[n5[a2]] = true;
for (var f2 = 0; f2 < t3.length; f2++)
i2[t3[f2]] = true;
var c2 = [];
for (var s4 in i2)
({}).hasOwnProperty.call(i2, s4) && c2.push(s4);
return c2.sort(), c2;
}(n4.expected, t2.expected) : t2.expected;
return { status: n4.status, index: n4.index, value: n4.value, furthest: t2.furthest, expected: r2 };
}
var j = {};
function S(n4, t2) {
if (w(n4))
return { offset: t2, line: -1, column: -1 };
n4 in j || (j[n4] = {});
for (var r2 = j[n4], e2 = 0, u2 = 0, o2 = 0, i2 = t2; i2 >= 0; ) {
if (i2 in r2) {
e2 = r2[i2].line, 0 === o2 && (o2 = r2[i2].lineStart);
break;
}
("\n" === n4.charAt(i2) || "\r" === n4.charAt(i2) && "\n" !== n4.charAt(i2 + 1)) && (u2++, 0 === o2 && (o2 = i2 + 1)), i2--;
}
var a2 = e2 + u2, f2 = t2 - o2;
return r2[t2] = { line: a2, lineStart: o2 }, { offset: t2, line: a2 + 1, column: f2 + 1 };
}
function _18(n4) {
if (!y(n4))
throw new Error("not a parser: " + n4);
}
function L(n4, t2) {
return "string" == typeof n4 ? n4.charAt(t2) : n4[t2];
}
function O(n4) {
if ("number" != typeof n4)
throw new Error("not a number: " + n4);
}
function k(n4) {
if ("function" != typeof n4)
throw new Error("not a function: " + n4);
}
function P(n4) {
if ("string" != typeof n4)
throw new Error("not a string: " + n4);
}
var q = 2, A = 3, I = 8, F = 5 * I, M = 4 * I, z = " ";
function R(n4, t2) {
return new Array(t2 + 1).join(n4);
}
function U(n4, t2, r2) {
var e2 = t2 - n4.length;
return e2 <= 0 ? n4 : R(r2, e2) + n4;
}
function W(n4, t2, r2, e2) {
return { from: n4 - t2 > 0 ? n4 - t2 : 0, to: n4 + r2 > e2 ? e2 : n4 + r2 };
}
function D(n4, t2) {
var r2, e2, u2, o2, f2, c2 = t2.index, s4 = c2.offset, l4 = 1;
if (s4 === n4.length)
return "Got the end of the input";
if (w(n4)) {
var h2 = s4 - s4 % I, p2 = s4 - h2, d2 = W(h2, F, M + I, n4.length), v2 = a(function(n5) {
return a(function(n6) {
return U(n6.toString(16), 2, "0");
}, n5);
}, function(n5, t3) {
var r3 = n5.length, e3 = [], u3 = 0;
if (r3 <= t3)
return [n5.slice()];
for (var o3 = 0; o3 < r3; o3++)
e3[u3] || e3.push([]), e3[u3].push(n5[o3]), (o3 + 1) % t3 == 0 && u3++;
return e3;
}(n4.slice(d2.from, d2.to).toJSON().data, I));
o2 = function(n5) {
return 0 === n5.from && 1 === n5.to ? { from: n5.from, to: n5.to } : { from: n5.from / I, to: Math.floor(n5.to / I) };
}(d2), e2 = h2 / I, r2 = 3 * p2, p2 >= 4 && (r2 += 1), l4 = 2, u2 = a(function(n5) {
return n5.length <= 4 ? n5.join(" ") : n5.slice(0, 4).join(" ") + " " + n5.slice(4).join(" ");
}, v2), (f2 = (8 * (o2.to > 0 ? o2.to - 1 : o2.to)).toString(16).length) < 2 && (f2 = 2);
} else {
var g2 = n4.split(/\r\n|[\n\r\u2028\u2029]/);
r2 = c2.column - 1, e2 = c2.line - 1, o2 = W(e2, q, A, g2.length), u2 = g2.slice(o2.from, o2.to), f2 = o2.to.toString().length;
}
var m2 = e2 - o2.from;
return w(n4) && (f2 = (8 * (o2.to > 0 ? o2.to - 1 : o2.to)).toString(16).length) < 2 && (f2 = 2), i(function(t3, e3, u3) {
var i2, a2 = u3 === m2, c3 = a2 ? "> " : z;
return i2 = w(n4) ? U((8 * (o2.from + u3)).toString(16), f2, "0") : U((o2.from + u3 + 1).toString(), f2, " "), [].concat(t3, [c3 + i2 + " | " + e3], a2 ? [z + R(" ", f2) + " | " + U("", r2, " ") + R("^", l4)] : []);
}, [], u2).join("\n");
}
function N(n4, t2) {
return ["\n", "-- PARSING FAILED " + R("-", 50), "\n\n", D(n4, t2), "\n\n", (r2 = t2.expected, 1 === r2.length ? "Expected:\n\n" + r2[0] : "Expected one of the following: \n\n" + r2.join(", ")), "\n"].join("");
var r2;
}
function G(n4) {
return void 0 !== n4.flags ? n4.flags : [n4.global ? "g" : "", n4.ignoreCase ? "i" : "", n4.multiline ? "m" : "", n4.unicode ? "u" : "", n4.sticky ? "y" : ""].join("");
}
function C() {
for (var n4 = [].slice.call(arguments), t2 = n4.length, r2 = 0; r2 < t2; r2 += 1)
_18(n4[r2]);
return e(function(r3, e2) {
for (var u2, o2 = new Array(t2), i2 = 0; i2 < t2; i2 += 1) {
if (!(u2 = B(n4[i2]._(r3, e2), u2)).status)
return u2;
o2[i2] = u2.value, e2 = u2.index;
}
return B(b(e2, o2), u2);
});
}
function J() {
var n4 = [].slice.call(arguments);
if (0 === n4.length)
throw new Error("seqMap needs at least one argument");
var t2 = n4.pop();
return k(t2), C.apply(null, n4).map(function(n5) {
return t2.apply(null, n5);
});
}
function T() {
var n4 = [].slice.call(arguments), t2 = n4.length;
if (0 === t2)
return Y("zero alternates");
for (var r2 = 0; r2 < t2; r2 += 1)
_18(n4[r2]);
return e(function(t3, r3) {
for (var e2, u2 = 0; u2 < n4.length; u2 += 1)
if ((e2 = B(n4[u2]._(t3, r3), e2)).status)
return e2;
return e2;
});
}
function V(n4, t2) {
return H(n4, t2).or(X([]));
}
function H(n4, t2) {
return _18(n4), _18(t2), J(n4, t2.then(n4).many(), function(n5, t3) {
return [n5].concat(t3);
});
}
function K(n4) {
P(n4);
var t2 = "'" + n4 + "'";
return e(function(r2, e2) {
var u2 = e2 + n4.length, o2 = r2.slice(e2, u2);
return o2 === n4 ? b(u2, o2) : x(e2, t2);
});
}
function Q(n4, t2) {
!function(n5) {
if (!(n5 instanceof RegExp))
throw new Error("not a regexp: " + n5);
for (var t3 = G(n5), r3 = 0; r3 < t3.length; r3++) {
var e2 = t3.charAt(r3);
if ("i" !== e2 && "m" !== e2 && "u" !== e2 && "s" !== e2)
throw new Error('unsupported regexp flag "' + e2 + '": ' + n5);
}
}(n4), arguments.length >= 2 ? O(t2) : t2 = 0;
var r2 = function(n5) {
return RegExp("^(?:" + n5.source + ")", G(n5));
}(n4), u2 = "" + n4;
return e(function(n5, e2) {
var o2 = r2.exec(n5.slice(e2));
if (o2) {
if (0 <= t2 && t2 <= o2.length) {
var i2 = o2[0], a2 = o2[t2];
return b(e2 + i2.length, a2);
}
return x(e2, "valid match group (0 to " + o2.length + ") in " + u2);
}
return x(e2, u2);
});
}
function X(n4) {
return e(function(t2, r2) {
return b(r2, n4);
});
}
function Y(n4) {
return e(function(t2, r2) {
return x(r2, n4);
});
}
function Z(n4) {
if (y(n4))
return e(function(t2, r2) {
var e2 = n4._(t2, r2);
return e2.index = r2, e2.value = "", e2;
});
if ("string" == typeof n4)
return Z(K(n4));
if (n4 instanceof RegExp)
return Z(Q(n4));
throw new Error("not a string, regexp, or parser: " + n4);
}
function $3(n4) {
return _18(n4), e(function(t2, r2) {
var e2 = n4._(t2, r2), u2 = t2.slice(r2, e2.index);
return e2.status ? x(r2, 'not "' + u2 + '"') : b(r2, null);
});
}
function nn(n4) {
return k(n4), e(function(t2, r2) {
var e2 = L(t2, r2);
return r2 < t2.length && n4(e2) ? b(r2 + 1, e2) : x(r2, "a character/byte matching " + n4);
});
}
function tn(n4, t2) {
arguments.length < 2 && (t2 = n4, n4 = void 0);
var r2 = e(function(n5, e2) {
return r2._ = t2()._, r2._(n5, e2);
});
return n4 ? r2.desc(n4) : r2;
}
function rn() {
return Y("fantasy-land/empty");
}
u.parse = function(n4) {
if ("string" != typeof n4 && !w(n4))
throw new Error(".parse must be called with a string or Buffer as its argument");
var t2, r2 = this.skip(an)._(n4, 0);
return t2 = r2.status ? { status: true, value: r2.value } : { status: false, index: S(n4, r2.furthest), expected: r2.expected }, delete j[n4], t2;
}, u.tryParse = function(n4) {
var t2 = this.parse(n4);
if (t2.status)
return t2.value;
var r2 = N(n4, t2), e2 = new Error(r2);
throw e2.type = "ParsimmonError", e2.result = t2, e2;
}, u.assert = function(n4, t2) {
return this.chain(function(r2) {
return n4(r2) ? X(r2) : Y(t2);
});
}, u.or = function(n4) {
return T(this, n4);
}, u.trim = function(n4) {
return this.wrap(n4, n4);
}, u.wrap = function(n4, t2) {
return J(n4, this, t2, function(n5, t3) {
return t3;
});
}, u.thru = function(n4) {
return n4(this);
}, u.then = function(n4) {
return _18(n4), C(this, n4).map(function(n5) {
return n5[1];
});
}, u.many = function() {
var n4 = this;
return e(function(t2, r2) {
for (var e2 = [], u2 = void 0; ; ) {
if (!(u2 = B(n4._(t2, r2), u2)).status)
return B(b(r2, e2), u2);
if (r2 === u2.index)
throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");
r2 = u2.index, e2.push(u2.value);
}
});
}, u.tieWith = function(n4) {
return P(n4), this.map(function(t2) {
if (function(n5) {
if (!E(n5))
throw new Error("not an array: " + n5);
}(t2), t2.length) {
P(t2[0]);
for (var r2 = t2[0], e2 = 1; e2 < t2.length; e2++)
P(t2[e2]), r2 += n4 + t2[e2];
return r2;
}
return "";
});
}, u.tie = function() {
return this.tieWith("");
}, u.times = function(n4, t2) {
var r2 = this;
return arguments.length < 2 && (t2 = n4), O(n4), O(t2), e(function(e2, u2) {
for (var o2 = [], i2 = void 0, a2 = void 0, f2 = 0; f2 < n4; f2 += 1) {
if (a2 = B(i2 = r2._(e2, u2), a2), !i2.status)
return a2;
u2 = i2.index, o2.push(i2.value);
}
for (; f2 < t2 && (a2 = B(i2 = r2._(e2, u2), a2), i2.status); f2 += 1)
u2 = i2.index, o2.push(i2.value);
return B(b(u2, o2), a2);
});
}, u.result = function(n4) {
return this.map(function() {
return n4;
});
}, u.atMost = function(n4) {
return this.times(0, n4);
}, u.atLeast = function(n4) {
return J(this.times(n4), this.many(), function(n5, t2) {
return n5.concat(t2);
});
}, u.map = function(n4) {
k(n4);
var t2 = this;
return e(function(r2, e2) {
var u2 = t2._(r2, e2);
return u2.status ? B(b(u2.index, n4(u2.value)), u2) : u2;
});
}, u.contramap = function(n4) {
k(n4);
var t2 = this;
return e(function(r2, e2) {
var u2 = t2.parse(n4(r2.slice(e2)));
return u2.status ? b(e2 + r2.length, u2.value) : u2;
});
}, u.promap = function(n4, t2) {
return k(n4), k(t2), this.contramap(n4).map(t2);
}, u.skip = function(n4) {
return C(this, n4).map(function(n5) {
return n5[0];
});
}, u.mark = function() {
return J(en, this, en, function(n4, t2, r2) {
return { start: n4, value: t2, end: r2 };
});
}, u.node = function(n4) {
return J(en, this, en, function(t2, r2, e2) {
return { name: n4, value: r2, start: t2, end: e2 };
});
}, u.sepBy = function(n4) {
return V(this, n4);
}, u.sepBy1 = function(n4) {
return H(this, n4);
}, u.lookahead = function(n4) {
return this.skip(Z(n4));
}, u.notFollowedBy = function(n4) {
return this.skip($3(n4));
}, u.desc = function(n4) {
E(n4) || (n4 = [n4]);
var t2 = this;
return e(function(r2, e2) {
var u2 = t2._(r2, e2);
return u2.status || (u2.expected = n4), u2;
});
}, u.fallback = function(n4) {
return this.or(X(n4));
}, u.ap = function(n4) {
return J(n4, this, function(n5, t2) {
return n5(t2);
});
}, u.chain = function(n4) {
var t2 = this;
return e(function(r2, e2) {
var u2 = t2._(r2, e2);
return u2.status ? B(n4(u2.value)._(r2, u2.index), u2) : u2;
});
}, u.concat = u.or, u.empty = rn, u.of = X, u["fantasy-land/ap"] = u.ap, u["fantasy-land/chain"] = u.chain, u["fantasy-land/concat"] = u.concat, u["fantasy-land/empty"] = u.empty, u["fantasy-land/of"] = u.of, u["fantasy-land/map"] = u.map;
var en = e(function(n4, t2) {
return b(t2, S(n4, t2));
}), un = e(function(n4, t2) {
return t2 >= n4.length ? x(t2, "any character/byte") : b(t2 + 1, L(n4, t2));
}), on = e(function(n4, t2) {
return b(n4.length, n4.slice(t2));
}), an = e(function(n4, t2) {
return t2 < n4.length ? x(t2, "EOF") : b(t2, null);
}), fn = Q(/[0-9]/).desc("a digit"), cn = Q(/[0-9]*/).desc("optional digits"), sn = Q(/[a-z]/i).desc("a letter"), ln = Q(/[a-z]*/i).desc("optional letters"), hn = Q(/\s*/).desc("optional whitespace"), pn = Q(/\s+/).desc("whitespace"), dn = K("\r"), vn = K("\n"), gn = K("\r\n"), mn = T(gn, vn, dn).desc("newline"), yn = T(mn, an);
e.all = on, e.alt = T, e.any = un, e.cr = dn, e.createLanguage = function(n4) {
var t2 = {};
for (var r2 in n4)
({}).hasOwnProperty.call(n4, r2) && function(r3) {
t2[r3] = tn(function() {
return n4[r3](t2);
});
}(r2);
return t2;
}, e.crlf = gn, e.custom = function(n4) {
return e(n4(b, x));
}, e.digit = fn, e.digits = cn, e.empty = rn, e.end = yn, e.eof = an, e.fail = Y, e.formatError = N, e.index = en, e.isParser = y, e.lazy = tn, e.letter = sn, e.letters = ln, e.lf = vn, e.lookahead = Z, e.makeFailure = x, e.makeSuccess = b, e.newline = mn, e.noneOf = function(n4) {
return nn(function(t2) {
return n4.indexOf(t2) < 0;
}).desc("none of '" + n4 + "'");
}, e.notFollowedBy = $3, e.of = X, e.oneOf = function(n4) {
for (var t2 = n4.split(""), r2 = 0; r2 < t2.length; r2++)
t2[r2] = "'" + t2[r2] + "'";
return nn(function(t3) {
return n4.indexOf(t3) >= 0;
}).desc(t2);
}, e.optWhitespace = hn, e.Parser = e, e.range = function(n4, t2) {
return nn(function(r2) {
return n4 <= r2 && r2 <= t2;
}).desc(n4 + "-" + t2);
}, e.regex = Q, e.regexp = Q, e.sepBy = V, e.sepBy1 = H, e.seq = C, e.seqMap = J, e.seqObj = function() {
for (var n4, t2 = {}, r2 = 0, u2 = (n4 = arguments, Array.prototype.slice.call(n4)), o2 = u2.length, i2 = 0; i2 < o2; i2 += 1) {
var a2 = u2[i2];
if (!y(a2)) {
if (E(a2) && 2 === a2.length && "string" == typeof a2[0] && y(a2[1])) {
var f2 = a2[0];
if (Object.prototype.hasOwnProperty.call(t2, f2))
throw new Error("seqObj: duplicate key " + f2);
t2[f2] = true, r2++;
continue;
}
throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.");
}
}
if (0 === r2)
throw new Error("seqObj expects at least one named parser, found zero");
return e(function(n5, t3) {
for (var r3, e2 = {}, i3 = 0; i3 < o2; i3 += 1) {
var a3, f3;
if (E(u2[i3]) ? (a3 = u2[i3][0], f3 = u2[i3][1]) : (a3 = null, f3 = u2[i3]), !(r3 = B(f3._(n5, t3), r3)).status)
return r3;
a3 && (e2[a3] = r3.value), t3 = r3.index;
}
return B(b(t3, e2), r3);
});
}, e.string = K, e.succeed = X, e.takeWhile = function(n4) {
return k(n4), e(function(t2, r2) {
for (var e2 = r2; e2 < t2.length && n4(L(t2, e2)); )
e2++;
return b(e2, t2.slice(r2, e2));
});
}, e.test = nn, e.whitespace = pn, e["fantasy-land/empty"] = rn, e["fantasy-land/of"] = X, e.Binary = { bitSeq: l3, bitSeqObj: function(n4) {
s3();
var t2 = {}, r2 = 0, e2 = a(function(n5) {
if (E(n5)) {
var e3 = n5;
if (2 !== e3.length)
throw new Error("[" + e3.join(", ") + "] should be length 2, got length " + e3.length);
if (P(e3[0]), O(e3[1]), Object.prototype.hasOwnProperty.call(t2, e3[0]))
throw new Error("duplicate key in bitSeqObj: " + e3[0]);
return t2[e3[0]] = true, r2++, e3;
}
return O(n5), [null, n5];
}, n4);
if (r2 < 1)
throw new Error("bitSeqObj expects at least one named pair, got [" + n4.join(", ") + "]");
var u2 = a(function(n5) {
return n5[0];
}, e2);
return l3(a(function(n5) {
return n5[1];
}, e2)).map(function(n5) {
return i(function(n6, t3) {
return null !== t3[0] && (n6[t3[0]] = t3[1]), n6;
}, {}, a(function(t3, r3) {
return [t3, n5[r3]];
}, u2));
});
}, byte: function(n4) {
if (s3(), O(n4), n4 > 255)
throw new Error("Value specified to byte constructor (" + n4 + "=0x" + n4.toString(16) + ") is larger in value than a single byte.");
var t2 = (n4 > 15 ? "0x" : "0x0") + n4.toString(16);
return e(function(r2, e2) {
var u2 = L(r2, e2);
return u2 === n4 ? b(e2 + 1, u2) : x(e2, t2);
});
}, buffer: function(n4) {
return h("buffer", n4).map(function(n5) {
return Buffer.from(n5);
});
}, encodedString: function(n4, t2) {
return h("string", t2).map(function(t3) {
return t3.toString(n4);
});
}, uintBE: d, uint8BE: d(1), uint16BE: d(2), uint32BE: d(4), uintLE: v, uint8LE: v(1), uint16LE: v(2), uint32LE: v(4), intBE: g, int8BE: g(1), int16BE: g(2), int32BE: g(4), intLE: m, int8LE: m(1), int16LE: m(2), int32LE: m(4), floatBE: h("floatBE", 4).map(function(n4) {
return n4.readFloatBE(0);
}), floatLE: h("floatLE", 4).map(function(n4) {
return n4.readFloatLE(0);
}), doubleBE: h("doubleBE", 8).map(function(n4) {
return n4.readDoubleBE(0);
}), doubleLE: h("doubleLE", 8).map(function(n4) {
return n4.readDoubleLE(0);
}) }, n3.exports = e;
}]);
});
})(parsimmon_umd_min, parsimmon_umd_min.exports);
var parsimmon_umd_minExports = parsimmon_umd_min.exports;
var emojiRegex = () => {
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\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0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
};
function normalizeDuration(dur) {
if (dur === void 0 || dur === null)
return dur;
return dur.shiftToAll().normalize();
}
function getFileTitle(path2) {
if (path2.includes("/"))
path2 = path2.substring(path2.lastIndexOf("/") + 1);
if (path2.endsWith(".md"))
path2 = path2.substring(0, path2.length - 3);
return path2;
}
parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regex(new RegExp(emojiRegex(), "")), parsimmon_umd_minExports.regex(/[0-9\p{Letter}_-]+/u).map((str) => str.toLocaleLowerCase()), parsimmon_umd_minExports.whitespace.map((_18) => "-"), parsimmon_umd_minExports.any.map((_18) => "")).many().map((result) => result.join(""));
var HEADER_CANONICALIZER = parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regex(new RegExp(emojiRegex(), "")), parsimmon_umd_minExports.regex(/[0-9\p{Letter}_-]+/u), parsimmon_umd_minExports.whitespace.map((_18) => " "), parsimmon_umd_minExports.any.map((_18) => " ")).many().map((result) => {
return result.join("").split(/\s+/).join(" ").trim();
});
function normalizeHeaderForLink(header) {
return HEADER_CANONICALIZER.tryParse(header);
}
function renderMinimalDuration(dur) {
dur = normalizeDuration(dur);
dur = Duration3.fromObject(Object.fromEntries(Object.entries(dur.toObject()).filter(([, quantity]) => quantity != 0)));
return dur.toHuman();
}
var Values;
(function(Values2) {
function toString(field, setting = DEFAULT_QUERY_SETTINGS, recursive = false) {
let wrapped = wrapValue(field);
if (!wrapped)
return setting.renderNullAs;
switch (wrapped.type) {
case "null":
return setting.renderNullAs;
case "string":
return wrapped.value;
case "number":
case "boolean":
return "" + wrapped.value;
case "html":
return wrapped.value.outerHTML;
case "widget":
return wrapped.value.markdown();
case "link":
return wrapped.value.markdown();
case "function":
return "<function>";
case "array":
let result = "";
if (recursive)
result += "[";
result += wrapped.value.map((f) => toString(f, setting, true)).join(", ");
if (recursive)
result += "]";
return result;
case "object":
return "{ " + Object.entries(wrapped.value).map((e) => e[0] + ": " + toString(e[1], setting, true)).join(", ") + " }";
case "date":
if (wrapped.value.second == 0 && wrapped.value.hour == 0 && wrapped.value.minute == 0) {
return wrapped.value.toFormat(setting.defaultDateFormat);
}
return wrapped.value.toFormat(setting.defaultDateTimeFormat);
case "duration":
return renderMinimalDuration(wrapped.value);
}
}
Values2.toString = toString;
function wrapValue(val) {
if (isNull(val))
return { type: "null", value: val };
else if (isNumber3(val))
return { type: "number", value: val };
else if (isString3(val))
return { type: "string", value: val };
else if (isBoolean(val))
return { type: "boolean", value: val };
else if (isDuration(val))
return { type: "duration", value: val };
else if (isDate3(val))
return { type: "date", value: val };
else if (isWidget(val))
return { type: "widget", value: val };
else if (isArray(val))
return { type: "array", value: val };
else if (isLink(val))
return { type: "link", value: val };
else if (isFunction(val))
return { type: "function", value: val };
else if (isHtml(val))
return { type: "html", value: val };
else if (isObject(val))
return { type: "object", value: val };
else
return void 0;
}
Values2.wrapValue = wrapValue;
function mapLeaves(val, func) {
if (isObject(val)) {
let result = {};
for (let [key2, value] of Object.entries(val))
result[key2] = mapLeaves(value, func);
return result;
} else if (isArray(val)) {
let result = [];
for (let value of val)
result.push(mapLeaves(value, func));
return result;
} else {
return func(val);
}
}
Values2.mapLeaves = mapLeaves;
function compareValue(val1, val2, linkNormalizer) {
var _a, _b;
if (val1 === void 0)
val1 = null;
if (val2 === void 0)
val2 = null;
if (val1 === null && val2 === null)
return 0;
else if (val1 === null)
return -1;
else if (val2 === null)
return 1;
let wrap1 = wrapValue(val1);
let wrap2 = wrapValue(val2);
if (wrap1 === void 0 && wrap2 === void 0)
return 0;
else if (wrap1 === void 0)
return -1;
else if (wrap2 === void 0)
return 1;
if (wrap1.type != wrap2.type)
return wrap1.type.localeCompare(wrap2.type);
if (wrap1.value === wrap2.value)
return 0;
switch (wrap1.type) {
case "string":
return wrap1.value.localeCompare(wrap2.value);
case "number":
if (wrap1.value < wrap2.value)
return -1;
else if (wrap1.value == wrap2.value)
return 0;
return 1;
case "null":
return 0;
case "boolean":
if (wrap1.value == wrap2.value)
return 0;
else
return wrap1.value ? 1 : -1;
case "link":
let link1 = wrap1.value;
let link2 = wrap2.value;
let normalize = linkNormalizer != null ? linkNormalizer : (x) => x;
let pathCompare = normalize(link1.path).localeCompare(normalize(link2.path));
if (pathCompare != 0)
return pathCompare;
let typeCompare = link1.type.localeCompare(link2.type);
if (typeCompare != 0)
return typeCompare;
if (link1.subpath && !link2.subpath)
return 1;
if (!link1.subpath && link2.subpath)
return -1;
if (!link1.subpath && !link2.subpath)
return 0;
return ((_a = link1.subpath) != null ? _a : "").localeCompare((_b = link2.subpath) != null ? _b : "");
case "date":
return wrap1.value < wrap2.value ? -1 : wrap1.value.equals(wrap2.value) ? 0 : 1;
case "duration":
return wrap1.value < wrap2.value ? -1 : wrap1.value.equals(wrap2.value) ? 0 : 1;
case "array":
let f1 = wrap1.value;
let f2 = wrap2.value;
for (let index = 0; index < Math.min(f1.length, f2.length); index++) {
let comp = compareValue(f1[index], f2[index]);
if (comp != 0)
return comp;
}
return f1.length - f2.length;
case "object":
let o1 = wrap1.value;
let o2 = wrap2.value;
let k1 = Array.from(Object.keys(o1));
let k2 = Array.from(Object.keys(o2));
k1.sort();
k2.sort();
let keyCompare = compareValue(k1, k2);
if (keyCompare != 0)
return keyCompare;
for (let key2 of k1) {
let comp = compareValue(o1[key2], o2[key2]);
if (comp != 0)
return comp;
}
return 0;
case "widget":
case "html":
case "function":
return 0;
}
}
Values2.compareValue = compareValue;
function typeOf(val) {
var _a;
return (_a = wrapValue(val)) == null ? void 0 : _a.type;
}
Values2.typeOf = typeOf;
function isTruthy(field) {
let wrapped = wrapValue(field);
if (!wrapped)
return false;
switch (wrapped.type) {
case "number":
return wrapped.value != 0;
case "string":
return wrapped.value.length > 0;
case "boolean":
return wrapped.value;
case "link":
return !!wrapped.value.path;
case "date":
return wrapped.value.toMillis() != 0;
case "duration":
return wrapped.value.as("seconds") != 0;
case "object":
return Object.keys(wrapped.value).length > 0;
case "array":
return wrapped.value.length > 0;
case "null":
return false;
case "html":
case "widget":
case "function":
return true;
}
}
Values2.isTruthy = isTruthy;
function deepCopy(field) {
if (field === null || field === void 0)
return field;
if (Values2.isArray(field)) {
return [].concat(field.map((v) => deepCopy(v)));
} else if (Values2.isObject(field)) {
let result = {};
for (let [key2, value] of Object.entries(field))
result[key2] = deepCopy(value);
return result;
} else {
return field;
}
}
Values2.deepCopy = deepCopy;
function isString3(val) {
return typeof val == "string";
}
Values2.isString = isString3;
function isNumber3(val) {
return typeof val == "number";
}
Values2.isNumber = isNumber3;
function isDate3(val) {
return val instanceof DateTime2;
}
Values2.isDate = isDate3;
function isDuration(val) {
return val instanceof Duration3;
}
Values2.isDuration = isDuration;
function isNull(val) {
return val === null || val === void 0;
}
Values2.isNull = isNull;
function isArray(val) {
return Array.isArray(val);
}
Values2.isArray = isArray;
function isBoolean(val) {
return typeof val === "boolean";
}
Values2.isBoolean = isBoolean;
function isLink(val) {
return val instanceof Link;
}
Values2.isLink = isLink;
function isWidget(val) {
return val instanceof Widget;
}
Values2.isWidget = isWidget;
function isHtml(val) {
if (typeof HTMLElement !== "undefined") {
return val instanceof HTMLElement;
} else {
return false;
}
}
Values2.isHtml = isHtml;
function isObject(val) {
return typeof val == "object" && !isHtml(val) && !isWidget(val) && !isArray(val) && !isDuration(val) && !isDate3(val) && !isLink(val) && val !== void 0 && !isNull(val);
}
Values2.isObject = isObject;
function isFunction(val) {
return typeof val == "function";
}
Values2.isFunction = isFunction;
})(Values || (Values = {}));
var Groupings;
(function(Groupings2) {
function isElementGroup(entry) {
return Values.isObject(entry) && Object.keys(entry).length == 2 && "key" in entry && "rows" in entry;
}
Groupings2.isElementGroup = isElementGroup;
function isGrouping(entry) {
for (let element of entry)
if (!isElementGroup(element))
return false;
return true;
}
Groupings2.isGrouping = isGrouping;
function count(elements) {
if (isGrouping(elements)) {
let result = 0;
for (let subgroup of elements)
result += count(subgroup.rows);
return result;
} else {
return elements.length;
}
}
Groupings2.count = count;
})(Groupings || (Groupings = {}));
var Link = class _Link {
constructor(fields) {
/** The file path this link points to. */
__publicField(this, "path");
/** The display name associated with the link. */
__publicField(this, "display");
/** The block ID or header this link points to within a file, if relevant. */
__publicField(this, "subpath");
/** Is this link an embedded link (!)? */
__publicField(this, "embed");
/** The type of this link, which determines what 'subpath' refers to, if anything. */
__publicField(this, "type");
Object.assign(this, fields);
}
/** Create a link to a specific file. */
static file(path2, embed = false, display) {
return new _Link({
path: path2,
embed,
display,
subpath: void 0,
type: "file"
});
}
static infer(linkpath, embed = false, display) {
if (linkpath.includes("#^")) {
let split = linkpath.split("#^");
return _Link.block(split[0], split[1], embed, display);
} else if (linkpath.includes("#")) {
let split = linkpath.split("#");
return _Link.header(split[0], split[1], embed, display);
} else
return _Link.file(linkpath, embed, display);
}
/** Create a link to a specific file and header in that file. */
static header(path2, header, embed, display) {
return new _Link({
path: path2,
embed,
display,
subpath: normalizeHeaderForLink(header),
type: "header"
});
}
/** Create a link to a specific file and block in that file. */
static block(path2, blockId, embed, display) {
return new _Link({
path: path2,
embed,
display,
subpath: blockId,
type: "block"
});
}
static fromObject(object) {
return new _Link(object);
}
/** Checks for link equality (i.e., that the links are pointing to the same exact location). */
equals(other) {
if (other == void 0 || other == null)
return false;
return this.path == other.path && this.type == other.type && this.subpath == other.subpath;
}
/** Convert this link to it's markdown representation. */
toString() {
return this.markdown();
}
/** Convert this link to a raw object which is serialization-friendly. */
toObject() {
return { path: this.path, type: this.type, subpath: this.subpath, display: this.display, embed: this.embed };
}
/** Update this link with a new path. */
//@ts-ignore; error appeared after updating Obsidian to 0.15.4; it also updated other packages but didn't say which
withPath(path2) {
return new _Link(Object.assign({}, this, { path: path2 }));
}
/** Return a new link which points to the same location but with a new display value. */
withDisplay(display) {
return new _Link(Object.assign({}, this, { display }));
}
/** Convert a file link into a link to a specific header. */
withHeader(header) {
return _Link.header(this.path, header, this.embed, this.display);
}
/** Convert any link into a link to its file. */
toFile() {
return _Link.file(this.path, this.embed, this.display);
}
/** Convert this link into an embedded link. */
toEmbed() {
if (this.embed) {
return this;
} else {
let link = new _Link(this);
link.embed = true;
return link;
}
}
/** Convert this link into a non-embedded link. */
fromEmbed() {
if (!this.embed) {
return this;
} else {
let link = new _Link(this);
link.embed = false;
return link;
}
}
/** Convert this link to markdown so it can be rendered. */
markdown() {
let result = (this.embed ? "!" : "") + "[[" + this.obsidianLink();
if (this.display) {
result += "|" + this.display;
} else {
result += "|" + getFileTitle(this.path);
if (this.type == "header" || this.type == "block")
result += " > " + this.subpath;
}
result += "]]";
return result;
}
/** Convert the inner part of the link to something that Obsidian can open / understand. */
obsidianLink() {
var _a, _b;
const escaped = this.path.replaceAll("|", "\\|");
if (this.type == "header")
return escaped + "#" + ((_a = this.subpath) == null ? void 0 : _a.replaceAll("|", "\\|"));
if (this.type == "block")
return escaped + "#^" + ((_b = this.subpath) == null ? void 0 : _b.replaceAll("|", "\\|"));
else
return escaped;
}
/** The stripped name of the file this link points to. */
fileName() {
return getFileTitle(this.path).replace(".md", "");
}
};
var Widget = class {
constructor($widget) {
__publicField(this, "$widget");
this.$widget = $widget;
}
};
var ListPairWidget = class extends Widget {
constructor(key2, value) {
super("dataview:list-pair");
__publicField(this, "key");
__publicField(this, "value");
this.key = key2;
this.value = value;
}
markdown() {
return `${Values.toString(this.key)}: ${Values.toString(this.value)}`;
}
};
var ExternalLinkWidget = class extends Widget {
constructor(url, display) {
super("dataview:external-link");
__publicField(this, "url");
__publicField(this, "display");
this.url = url;
this.display = display;
}
markdown() {
var _a;
return `[${(_a = this.display) != null ? _a : this.url}](${this.url})`;
}
};
var Widgets;
(function(Widgets2) {
function listPair(key2, value) {
return new ListPairWidget(key2, value);
}
Widgets2.listPair = listPair;
function externalLink(url, display) {
return new ExternalLinkWidget(url, display);
}
Widgets2.externalLink = externalLink;
function isListPair(widget) {
return widget.$widget === "dataview:list-pair";
}
Widgets2.isListPair = isListPair;
function isExternalLink(widget) {
return widget.$widget === "dataview:external-link";
}
Widgets2.isExternalLink = isExternalLink;
function isBuiltin(widget) {
return isListPair(widget) || isExternalLink(widget);
}
Widgets2.isBuiltin = isBuiltin;
})(Widgets || (Widgets = {}));
var Fields;
(function(Fields2) {
function variable(name) {
return { type: "variable", name };
}
Fields2.variable = variable;
function literal(value) {
return { type: "literal", value };
}
Fields2.literal = literal;
function binaryOp(left, op, right) {
return { type: "binaryop", left, op, right };
}
Fields2.binaryOp = binaryOp;
function index(obj, index2) {
return { type: "index", object: obj, index: index2 };
}
Fields2.index = index;
function indexVariable(name) {
let parts = name.split(".");
let result = Fields2.variable(parts[0]);
for (let index2 = 1; index2 < parts.length; index2++) {
result = Fields2.index(result, Fields2.literal(parts[index2]));
}
return result;
}
Fields2.indexVariable = indexVariable;
function lambda(args, value) {
return { type: "lambda", arguments: args, value };
}
Fields2.lambda = lambda;
function func(func2, args) {
return { type: "function", func: func2, arguments: args };
}
Fields2.func = func;
function list(values) {
return { type: "list", values };
}
Fields2.list = list;
function object(values) {
return { type: "object", values };
}
Fields2.object = object;
function negate(child) {
return { type: "negated", child };
}
Fields2.negate = negate;
function isCompareOp(op) {
return op == "<=" || op == "<" || op == ">" || op == ">=" || op == "!=" || op == "=";
}
Fields2.isCompareOp = isCompareOp;
Fields2.NULL = Fields2.literal(null);
})(Fields || (Fields = {}));
var Sources;
(function(Sources2) {
function tag(tag2) {
return { type: "tag", tag: tag2 };
}
Sources2.tag = tag;
function csv(path2) {
return { type: "csv", path: path2 };
}
Sources2.csv = csv;
function folder(prefix2) {
return { type: "folder", folder: prefix2 };
}
Sources2.folder = folder;
function link(file, incoming) {
return { type: "link", file, direction: incoming ? "incoming" : "outgoing" };
}
Sources2.link = link;
function binaryOp(left, op, right) {
return { type: "binaryop", left, op, right };
}
Sources2.binaryOp = binaryOp;
function and(left, right) {
return { type: "binaryop", left, op: "&", right };
}
Sources2.and = and;
function or(left, right) {
return { type: "binaryop", left, op: "|", right };
}
Sources2.or = or;
function negate(child) {
return { type: "negate", child };
}
Sources2.negate = negate;
function empty() {
return { type: "empty" };
}
Sources2.empty = empty;
})(Sources || (Sources = {}));
var EMOJI_REGEX = new RegExp(emojiRegex(), "");
var DURATION_TYPES = {
year: Duration3.fromObject({ years: 1 }),
years: Duration3.fromObject({ years: 1 }),
yr: Duration3.fromObject({ years: 1 }),
yrs: Duration3.fromObject({ years: 1 }),
month: Duration3.fromObject({ months: 1 }),
months: Duration3.fromObject({ months: 1 }),
mo: Duration3.fromObject({ months: 1 }),
mos: Duration3.fromObject({ months: 1 }),
week: Duration3.fromObject({ weeks: 1 }),
weeks: Duration3.fromObject({ weeks: 1 }),
wk: Duration3.fromObject({ weeks: 1 }),
wks: Duration3.fromObject({ weeks: 1 }),
w: Duration3.fromObject({ weeks: 1 }),
day: Duration3.fromObject({ days: 1 }),
days: Duration3.fromObject({ days: 1 }),
d: Duration3.fromObject({ days: 1 }),
hour: Duration3.fromObject({ hours: 1 }),
hours: Duration3.fromObject({ hours: 1 }),
hr: Duration3.fromObject({ hours: 1 }),
hrs: Duration3.fromObject({ hours: 1 }),
h: Duration3.fromObject({ hours: 1 }),
minute: Duration3.fromObject({ minutes: 1 }),
minutes: Duration3.fromObject({ minutes: 1 }),
min: Duration3.fromObject({ minutes: 1 }),
mins: Duration3.fromObject({ minutes: 1 }),
m: Duration3.fromObject({ minutes: 1 }),
second: Duration3.fromObject({ seconds: 1 }),
seconds: Duration3.fromObject({ seconds: 1 }),
sec: Duration3.fromObject({ seconds: 1 }),
secs: Duration3.fromObject({ seconds: 1 }),
s: Duration3.fromObject({ seconds: 1 })
};
var DATE_SHORTHANDS = {
now: () => DateTime2.local(),
today: () => DateTime2.local().startOf("day"),
yesterday: () => DateTime2.local().startOf("day").minus(Duration3.fromObject({ days: 1 })),
tomorrow: () => DateTime2.local().startOf("day").plus(Duration3.fromObject({ days: 1 })),
sow: () => DateTime2.local().startOf("week"),
"start-of-week": () => DateTime2.local().startOf("week"),
eow: () => DateTime2.local().endOf("week"),
"end-of-week": () => DateTime2.local().endOf("week"),
soy: () => DateTime2.local().startOf("year"),
"start-of-year": () => DateTime2.local().startOf("year"),
eoy: () => DateTime2.local().endOf("year"),
"end-of-year": () => DateTime2.local().endOf("year"),
som: () => DateTime2.local().startOf("month"),
"start-of-month": () => DateTime2.local().startOf("month"),
eom: () => DateTime2.local().endOf("month"),
"end-of-month": () => DateTime2.local().endOf("month")
};
var KEYWORDS = ["FROM", "WHERE", "LIMIT", "GROUP", "FLATTEN"];
function splitOnUnescapedPipe(link) {
let pipe = -1;
while ((pipe = link.indexOf("|", pipe + 1)) >= 0) {
if (pipe > 0 && link[pipe - 1] == "\\")
continue;
return [link.substring(0, pipe).replace(/\\\|/g, "|"), link.substring(pipe + 1)];
}
return [link.replace(/\\\|/g, "|"), void 0];
}
function parseInnerLink(rawlink) {
let [link, display] = splitOnUnescapedPipe(rawlink);
return Link.infer(link, false, display);
}
function createBinaryParser(child, sep, combine) {
return parsimmon_umd_minExports.seqMap(child, parsimmon_umd_minExports.seq(parsimmon_umd_minExports.optWhitespace, sep, parsimmon_umd_minExports.optWhitespace, child).many(), (first, rest) => {
if (rest.length == 0)
return first;
let node = combine(first, rest[0][1], rest[0][3]);
for (let index = 1; index < rest.length; index++) {
node = combine(node, rest[index][1], rest[index][3]);
}
return node;
});
}
function chainOpt(base, ...funcs) {
return parsimmon_umd_minExports.custom((success, failure) => {
return (input, i) => {
let result = base._(input, i);
if (!result.status)
return result;
for (let func of funcs) {
let next = func(result.value)._(input, result.index);
if (!next.status)
return result;
result = next;
}
return result;
};
});
}
var EXPRESSION = parsimmon_umd_minExports.createLanguage({
// A floating point number; the decimal point is optional.
number: (q) => parsimmon_umd_minExports.regexp(/-?[0-9]+(\.[0-9]+)?/).map((str) => Number.parseFloat(str)).desc("number"),
// A quote-surrounded string which supports escape characters ('\').
string: (q) => parsimmon_umd_minExports.string('"').then(parsimmon_umd_minExports.alt(q.escapeCharacter, parsimmon_umd_minExports.noneOf('"\\')).atLeast(0).map((chars) => chars.join(""))).skip(parsimmon_umd_minExports.string('"')).desc("string"),
escapeCharacter: (_18) => parsimmon_umd_minExports.string("\\").then(parsimmon_umd_minExports.any).map((escaped) => {
if (escaped === '"')
return '"';
if (escaped === "\\")
return "\\";
else
return "\\" + escaped;
}),
// A boolean true/false value.
bool: (_18) => parsimmon_umd_minExports.regexp(/true|false|True|False/).map((str) => str.toLowerCase() == "true").desc("boolean ('true' or 'false')"),
// A tag of the form '#stuff/hello-there'.
tag: (_18) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("#"), parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(), (start, rest) => start + rest.join("")).desc("tag ('#hello/stuff')"),
// A variable identifier, which is alphanumeric and must start with a letter or... emoji.
identifier: (_18) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regexp(/\p{Letter}/u), parsimmon_umd_minExports.regexp(EMOJI_REGEX).desc("text")), parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regexp(/[0-9\p{Letter}_-]/u), parsimmon_umd_minExports.regexp(EMOJI_REGEX).desc("text")).many(), (first, rest) => first + rest.join("")).desc("variable identifier"),
// An Obsidian link of the form [[<link>]].
link: (_18) => parsimmon_umd_minExports.regexp(/\[\[([^\[\]]*?)\]\]/u, 1).map((linkInner) => parseInnerLink(linkInner)).desc("file link"),
// An embeddable link which can start with '!'. This overlaps with the normal negation operator, so it is only
// provided for metadata parsing.
embedLink: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("!").atMost(1), q.link, (p, l3) => {
if (p.length > 0)
l3.embed = true;
return l3;
}).desc("file link"),
// Binary plus or minus operator.
binaryPlusMinus: (_18) => parsimmon_umd_minExports.regexp(/\+|-/).map((str) => str).desc("'+' or '-'"),
// Binary times or divide operator.
binaryMulDiv: (_18) => parsimmon_umd_minExports.regexp(/\*|\/|%/).map((str) => str).desc("'*' or '/' or '%'"),
// Binary comparison operator.
binaryCompareOp: (_18) => parsimmon_umd_minExports.regexp(/>=|<=|!=|>|<|=/).map((str) => str).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),
// Binary boolean combination operator.
binaryBooleanOp: (_18) => parsimmon_umd_minExports.regexp(/and|or|&|\|/i).map((str) => {
if (str.toLowerCase() == "and")
return "&";
else if (str.toLowerCase() == "or")
return "|";
else
return str;
}).desc("'and' or 'or'"),
// A date which can be YYYY-MM[-DDTHH:mm:ss].
rootDate: (_18) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/\d{4}/), parsimmon_umd_minExports.string("-"), parsimmon_umd_minExports.regexp(/\d{2}/), (year, _19, month) => {
return DateTime2.fromObject({ year: Number.parseInt(year), month: Number.parseInt(month) });
}).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),
dateShorthand: (_18) => parsimmon_umd_minExports.alt(...Object.keys(DATE_SHORTHANDS).sort((a, b) => b.length - a.length).map(parsimmon_umd_minExports.string)),
date: (q) => chainOpt(q.rootDate, (ym) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("-"), parsimmon_umd_minExports.regexp(/\d{2}/), (_18, day) => ym.set({ day: Number.parseInt(day) })), (ymd) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("T"), parsimmon_umd_minExports.regexp(/\d{2}/), (_18, hour) => ymd.set({ hour: Number.parseInt(hour) })), (ymdh) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string(":"), parsimmon_umd_minExports.regexp(/\d{2}/), (_18, minute) => ymdh.set({ minute: Number.parseInt(minute) })), (ymdhm) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string(":"), parsimmon_umd_minExports.regexp(/\d{2}/), (_18, second) => ymdhm.set({ second: Number.parseInt(second) })), (ymdhms) => parsimmon_umd_minExports.alt(
parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("."), parsimmon_umd_minExports.regexp(/\d{3}/), (_18, millisecond) => ymdhms.set({ millisecond: Number.parseInt(millisecond) })),
parsimmon_umd_minExports.succeed(ymdhms)
// pass
), (dt) => parsimmon_umd_minExports.alt(parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("+").or(parsimmon_umd_minExports.string("-")), parsimmon_umd_minExports.regexp(/\d{1,2}(:\d{2})?/), (pm, hr) => dt.setZone("UTC" + pm + hr, { keepLocalTime: true })), parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("Z"), () => dt.setZone("utc", { keepLocalTime: true })), parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("["), parsimmon_umd_minExports.regexp(/[0-9A-Za-z+-\/]+/u), parsimmon_umd_minExports.string("]"), (_a, zone, _b) => dt.setZone(zone, { keepLocalTime: true })))).assert((dt) => dt.isValid, "valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),
// A date, plus various shorthand times of day it could be.
datePlus: (q) => parsimmon_umd_minExports.alt(q.dateShorthand.map((d) => DATE_SHORTHANDS[d]()), q.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),
// A duration of time.
durationType: (_18) => parsimmon_umd_minExports.alt(...Object.keys(DURATION_TYPES).sort((a, b) => b.length - a.length).map(parsimmon_umd_minExports.string)),
duration: (q) => parsimmon_umd_minExports.seqMap(q.number, parsimmon_umd_minExports.optWhitespace, q.durationType, (count, _18, t) => DURATION_TYPES[t].mapUnits((x) => x * count)).sepBy1(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace).or(parsimmon_umd_minExports.optWhitespace)).map((durations) => durations.reduce((p, c) => p.plus(c))).desc("duration like 4hr2min"),
// A raw null value.
rawNull: (_18) => parsimmon_umd_minExports.string("null"),
// Source parsing.
tagSource: (q) => q.tag.map((tag) => Sources.tag(tag)),
csvSource: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("csv(").skip(parsimmon_umd_minExports.optWhitespace), q.string, parsimmon_umd_minExports.string(")"), (_1, path2, _22) => Sources.csv(path2)),
linkIncomingSource: (q) => q.link.map((link) => Sources.link(link.path, true)),
linkOutgoingSource: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("outgoing(").skip(parsimmon_umd_minExports.optWhitespace), q.link, parsimmon_umd_minExports.string(")"), (_1, link, _22) => Sources.link(link.path, false)),
folderSource: (q) => q.string.map((str) => Sources.folder(str)),
parensSource: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("("), parsimmon_umd_minExports.optWhitespace, q.source, parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string(")"), (_1, _22, field, _32, _42) => field),
negateSource: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.alt(parsimmon_umd_minExports.string("-"), parsimmon_umd_minExports.string("!")), q.atomSource, (_18, source) => Sources.negate(source)),
atomSource: (q) => parsimmon_umd_minExports.alt(q.parensSource, q.negateSource, q.linkOutgoingSource, q.linkIncomingSource, q.folderSource, q.tagSource, q.csvSource),
binaryOpSource: (q) => createBinaryParser(q.atomSource, q.binaryBooleanOp.map((s3) => s3), Sources.binaryOp),
source: (q) => q.binaryOpSource,
// Field parsing.
variableField: (q) => q.identifier.chain((r) => {
if (KEYWORDS.includes(r.toUpperCase())) {
return parsimmon_umd_minExports.fail("Variable fields cannot be a keyword (" + KEYWORDS.join(" or ") + ")");
} else {
return parsimmon_umd_minExports.succeed(Fields.variable(r));
}
}).desc("variable"),
numberField: (q) => q.number.map((val) => Fields.literal(val)).desc("number"),
stringField: (q) => q.string.map((val) => Fields.literal(val)).desc("string"),
boolField: (q) => q.bool.map((val) => Fields.literal(val)).desc("boolean"),
dateField: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("date("), parsimmon_umd_minExports.optWhitespace, q.datePlus, parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string(")"), (prefix2, _1, date, _22, postfix) => Fields.literal(date)).desc("date"),
durationField: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("dur("), parsimmon_umd_minExports.optWhitespace, q.duration, parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string(")"), (prefix2, _1, dur, _22, postfix) => Fields.literal(dur)).desc("duration"),
nullField: (q) => q.rawNull.map((_18) => Fields.NULL),
linkField: (q) => q.link.map((f) => Fields.literal(f)),
listField: (q) => q.field.sepBy(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)).wrap(parsimmon_umd_minExports.string("[").skip(parsimmon_umd_minExports.optWhitespace), parsimmon_umd_minExports.optWhitespace.then(parsimmon_umd_minExports.string("]"))).map((l3) => Fields.list(l3)).desc("list ('[1, 2, 3]')"),
objectField: (q) => parsimmon_umd_minExports.seqMap(q.identifier.or(q.string), parsimmon_umd_minExports.string(":").trim(parsimmon_umd_minExports.optWhitespace), q.field, (name, _sep, value) => {
return { name, value };
}).sepBy(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)).wrap(parsimmon_umd_minExports.string("{").skip(parsimmon_umd_minExports.optWhitespace), parsimmon_umd_minExports.optWhitespace.then(parsimmon_umd_minExports.string("}"))).map((vals) => {
let res = {};
for (let entry of vals)
res[entry.name] = entry.value;
return Fields.object(res);
}).desc("object ('{ a: 1, b: 2 }')"),
atomInlineField: (q) => parsimmon_umd_minExports.alt(q.date, q.duration.map((d) => normalizeDuration(d)), q.string, q.tag, q.embedLink, q.bool, q.number, q.rawNull),
inlineFieldList: (q) => q.atomInlineField.sepBy(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace).lookahead(q.atomInlineField)),
inlineField: (q) => parsimmon_umd_minExports.alt(parsimmon_umd_minExports.seqMap(q.atomInlineField, parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace), q.inlineFieldList, (f, _s, l3) => [f].concat(l3)), q.atomInlineField),
atomField: (q) => parsimmon_umd_minExports.alt(
// Place embed links above negated fields as they are the special parser case '![[thing]]' and are generally unambiguous.
q.embedLink.map((l3) => Fields.literal(l3)),
q.negatedField,
q.linkField,
q.listField,
q.objectField,
q.lambdaField,
q.parensField,
q.boolField,
q.numberField,
q.stringField,
q.dateField,
q.durationField,
q.nullField,
q.variableField
),
indexField: (q) => parsimmon_umd_minExports.seqMap(q.atomField, parsimmon_umd_minExports.alt(q.dotPostfix, q.indexPostfix, q.functionPostfix).many(), (obj, postfixes) => {
let result = obj;
for (let post of postfixes) {
switch (post.type) {
case "dot":
result = Fields.index(result, Fields.literal(post.field));
break;
case "index":
result = Fields.index(result, post.field);
break;
case "function":
result = Fields.func(result, post.fields);
break;
}
}
return result;
}),
negatedField: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("!"), q.indexField, (_18, field) => Fields.negate(field)).desc("negated field"),
parensField: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("("), parsimmon_umd_minExports.optWhitespace, q.field, parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string(")"), (_1, _22, field, _32, _42) => field),
lambdaField: (q) => parsimmon_umd_minExports.seqMap(q.identifier.sepBy(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)).wrap(parsimmon_umd_minExports.string("(").trim(parsimmon_umd_minExports.optWhitespace), parsimmon_umd_minExports.string(")").trim(parsimmon_umd_minExports.optWhitespace)), parsimmon_umd_minExports.string("=>").trim(parsimmon_umd_minExports.optWhitespace), q.field, (ident, _ignore, value) => {
return { type: "lambda", arguments: ident, value };
}),
dotPostfix: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("."), q.identifier, (_18, field) => {
return { type: "dot", field };
}),
indexPostfix: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("["), parsimmon_umd_minExports.optWhitespace, q.field, parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string("]"), (_18, _22, field, _32, _42) => {
return { type: "index", field };
}),
functionPostfix: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.string("("), parsimmon_umd_minExports.optWhitespace, q.field.sepBy(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)), parsimmon_umd_minExports.optWhitespace, parsimmon_umd_minExports.string(")"), (_18, _1, fields, _22, _32) => {
return { type: "function", fields };
}),
// The precedence hierarchy of operators - multiply/divide, add/subtract, compare, and then boolean operations.
binaryMulDivField: (q) => createBinaryParser(q.indexField, q.binaryMulDiv, Fields.binaryOp),
binaryPlusMinusField: (q) => createBinaryParser(q.binaryMulDivField, q.binaryPlusMinus, Fields.binaryOp),
binaryCompareField: (q) => createBinaryParser(q.binaryPlusMinusField, q.binaryCompareOp, Fields.binaryOp),
binaryBooleanField: (q) => createBinaryParser(q.binaryCompareField, q.binaryBooleanOp, Fields.binaryOp),
binaryOpField: (q) => q.binaryBooleanField,
field: (q) => q.binaryOpField
});
function parseField(text) {
try {
return Result.success(EXPRESSION.field.tryParse(text));
} catch (error) {
return Result.failure("" + error);
}
}
var QueryFields;
(function(QueryFields2) {
function named(name, field) {
return { name, field };
}
QueryFields2.named = named;
function sortBy(field, dir) {
return { field, direction: dir };
}
QueryFields2.sortBy = sortBy;
})(QueryFields || (QueryFields = {}));
function captureRaw(base) {
return parsimmon_umd_minExports.custom((success, failure) => {
return (input, i) => {
let result = base._(input, i);
if (!result.status)
return result;
return Object.assign({}, result, { value: [result.value, input.substring(i, result.index)] });
};
});
}
function stripNewlines(text) {
return text.split(/[\r\n]+/).map((t) => t.trim()).join("");
}
function precededByWhitespaceIfNotEof(if_eof, parser) {
return parsimmon_umd_minExports.eof.map(if_eof).or(parsimmon_umd_minExports.whitespace.then(parser));
}
var QUERY_LANGUAGE = parsimmon_umd_minExports.createLanguage({
// Simple atom parsing, like words, identifiers, numbers.
queryType: (q) => parsimmon_umd_minExports.alt(parsimmon_umd_minExports.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map((str) => str.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),
explicitNamedField: (q) => parsimmon_umd_minExports.seqMap(EXPRESSION.field.skip(parsimmon_umd_minExports.whitespace), parsimmon_umd_minExports.regexp(/AS/i).skip(parsimmon_umd_minExports.whitespace), EXPRESSION.identifier.or(EXPRESSION.string), (field, _as, ident) => QueryFields.named(ident, field)),
comment: () => parsimmon_umd_minExports.Parser((input, i) => {
let line = input.substring(i);
if (!line.startsWith("//"))
return parsimmon_umd_minExports.makeFailure(i, "Not a comment");
line = line.split("\n")[0];
let comment = line.substring(2).trim();
return parsimmon_umd_minExports.makeSuccess(i + line.length, comment);
}),
namedField: (q) => parsimmon_umd_minExports.alt(q.explicitNamedField, captureRaw(EXPRESSION.field).map(([value, text]) => QueryFields.named(stripNewlines(text), value))),
sortField: (q) => parsimmon_umd_minExports.seqMap(EXPRESSION.field.skip(parsimmon_umd_minExports.optWhitespace), parsimmon_umd_minExports.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1), (field, dir) => {
let direction = dir.length == 0 ? "ascending" : dir[0].toLowerCase();
if (direction == "desc")
direction = "descending";
if (direction == "asc")
direction = "ascending";
return {
field,
direction
};
}),
headerClause: (q) => q.queryType.chain((type) => {
switch (type) {
case "table": {
return precededByWhitespaceIfNotEof(() => ({ type, fields: [], showId: true }), parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/WITHOUT\s+ID/i).skip(parsimmon_umd_minExports.optWhitespace).atMost(1), parsimmon_umd_minExports.sepBy(q.namedField, parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)), (withoutId, fields) => {
return { type, fields, showId: withoutId.length == 0 };
}));
}
case "list":
return precededByWhitespaceIfNotEof(() => ({ type, format: void 0, showId: true }), parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/WITHOUT\s+ID/i).skip(parsimmon_umd_minExports.optWhitespace).atMost(1), EXPRESSION.field.atMost(1), (withoutId, format) => {
return {
type,
format: format.length == 1 ? format[0] : void 0,
showId: withoutId.length == 0
};
}));
case "task":
return parsimmon_umd_minExports.succeed({ type });
case "calendar":
return parsimmon_umd_minExports.whitespace.then(parsimmon_umd_minExports.seqMap(q.namedField, (field) => {
return {
type,
showId: true,
field
};
}));
default:
return parsimmon_umd_minExports.fail(`Unrecognized query type '${type}'`);
}
}).desc("TABLE or LIST or TASK or CALENDAR"),
fromClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/FROM/i), parsimmon_umd_minExports.whitespace, EXPRESSION.source, (_1, _22, source) => source),
whereClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/WHERE/i), parsimmon_umd_minExports.whitespace, EXPRESSION.field, (where, _18, field) => {
return { type: "where", clause: field };
}).desc("WHERE <expression>"),
sortByClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/SORT/i), parsimmon_umd_minExports.whitespace, q.sortField.sepBy1(parsimmon_umd_minExports.string(",").trim(parsimmon_umd_minExports.optWhitespace)), (sort, _1, fields) => {
return { type: "sort", fields };
}).desc("SORT field [ASC/DESC]"),
limitClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/LIMIT/i), parsimmon_umd_minExports.whitespace, EXPRESSION.field, (limit, _1, field) => {
return { type: "limit", amount: field };
}).desc("LIMIT <value>"),
flattenClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/FLATTEN/i).skip(parsimmon_umd_minExports.whitespace), q.namedField, (_18, field) => {
return { type: "flatten", field };
}).desc("FLATTEN <value> [AS <name>]"),
groupByClause: (q) => parsimmon_umd_minExports.seqMap(parsimmon_umd_minExports.regexp(/GROUP BY/i).skip(parsimmon_umd_minExports.whitespace), q.namedField, (_18, field) => {
return { type: "group", field };
}).desc("GROUP BY <value> [AS <name>]"),
// Full query parsing.
clause: (q) => parsimmon_umd_minExports.alt(q.fromClause, q.whereClause, q.sortByClause, q.limitClause, q.groupByClause, q.flattenClause),
query: (q) => parsimmon_umd_minExports.seqMap(q.headerClause.trim(optionalWhitespaceOrComment), q.fromClause.trim(optionalWhitespaceOrComment).atMost(1), q.clause.trim(optionalWhitespaceOrComment).many(), (header, from, clauses) => {
return {
header,
source: from.length == 0 ? Sources.folder("") : from[0],
operations: clauses,
settings: DEFAULT_QUERY_SETTINGS
};
})
});
var optionalWhitespaceOrComment = parsimmon_umd_minExports.alt(parsimmon_umd_minExports.whitespace, QUERY_LANGUAGE.comment).many().map((arr) => arr.join(""));
var getAPI4 = (app) => {
var _a;
if (app)
return (_a = app.plugins.plugins.dataview) == null ? void 0 : _a.api;
else
return window.DataviewAPI;
};
var isPluginEnabled = (app) => app.plugins.enabledPlugins.has("dataview");
exports.DATE_SHORTHANDS = DATE_SHORTHANDS;
exports.DURATION_TYPES = DURATION_TYPES;
exports.EXPRESSION = EXPRESSION;
exports.KEYWORDS = KEYWORDS;
exports.QUERY_LANGUAGE = QUERY_LANGUAGE;
exports.getAPI = getAPI4;
exports.isPluginEnabled = isPluginEnabled;
exports.parseField = parseField;
}
});
// node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js
var require_lodash = __commonJS({
"node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js"(exports, module2) {
(function() {
var undefined2;
var VERSION = "4.17.21";
var LARGE_ARRAY_SIZE = 200;
var CORE_ERROR_TEXT = "Unsupported core-js use. Try https://npms.io/search?q=ponyfill.", FUNC_ERROR_TEXT = "Expected a function", INVALID_TEMPL_VAR_ERROR_TEXT = "Invalid `variable` option passed into `_.template`";
var HASH_UNDEFINED = "__lodash_hash_undefined__";
var MAX_MEMOIZE_SIZE = 500;
var PLACEHOLDER = "__lodash_placeholder__";
var CLONE_DEEP_FLAG = 1, CLONE_FLAT_FLAG = 2, CLONE_SYMBOLS_FLAG = 4;
var COMPARE_PARTIAL_FLAG = 1, COMPARE_UNORDERED_FLAG = 2;
var WRAP_BIND_FLAG = 1, WRAP_BIND_KEY_FLAG = 2, WRAP_CURRY_BOUND_FLAG = 4, WRAP_CURRY_FLAG = 8, WRAP_CURRY_RIGHT_FLAG = 16, WRAP_PARTIAL_FLAG = 32, WRAP_PARTIAL_RIGHT_FLAG = 64, WRAP_ARY_FLAG = 128, WRAP_REARG_FLAG = 256, WRAP_FLIP_FLAG = 512;
var DEFAULT_TRUNC_LENGTH = 30, DEFAULT_TRUNC_OMISSION = "...";
var HOT_COUNT = 800, HOT_SPAN = 16;
var LAZY_FILTER_FLAG = 1, LAZY_MAP_FLAG = 2, LAZY_WHILE_FLAG = 3;
var INFINITY = 1 / 0, MAX_SAFE_INTEGER = 9007199254740991, MAX_INTEGER = 17976931348623157e292, NAN = 0 / 0;
var MAX_ARRAY_LENGTH = 4294967295, MAX_ARRAY_INDEX = MAX_ARRAY_LENGTH - 1, HALF_MAX_ARRAY_LENGTH = MAX_ARRAY_LENGTH >>> 1;
var wrapFlags = [
["ary", WRAP_ARY_FLAG],
["bind", WRAP_BIND_FLAG],
["bindKey", WRAP_BIND_KEY_FLAG],
["curry", WRAP_CURRY_FLAG],
["curryRight", WRAP_CURRY_RIGHT_FLAG],
["flip", WRAP_FLIP_FLAG],
["partial", WRAP_PARTIAL_FLAG],
["partialRight", WRAP_PARTIAL_RIGHT_FLAG],
["rearg", WRAP_REARG_FLAG]
];
var argsTag = "[object Arguments]", arrayTag = "[object Array]", asyncTag = "[object AsyncFunction]", boolTag = "[object Boolean]", dateTag = "[object Date]", domExcTag = "[object DOMException]", errorTag = "[object Error]", funcTag = "[object Function]", genTag = "[object GeneratorFunction]", mapTag = "[object Map]", numberTag = "[object Number]", nullTag = "[object Null]", objectTag = "[object Object]", promiseTag = "[object Promise]", proxyTag = "[object Proxy]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]", undefinedTag = "[object Undefined]", weakMapTag = "[object WeakMap]", weakSetTag = "[object WeakSet]";
var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]", float32Tag = "[object Float32Array]", float64Tag = "[object Float64Array]", int8Tag = "[object Int8Array]", int16Tag = "[object Int16Array]", int32Tag = "[object Int32Array]", uint8Tag = "[object Uint8Array]", uint8ClampedTag = "[object Uint8ClampedArray]", uint16Tag = "[object Uint16Array]", uint32Tag = "[object Uint32Array]";
var reEmptyStringLeading = /\b__p \+= '';/g, reEmptyStringMiddle = /\b(__p \+=) '' \+/g, reEmptyStringTrailing = /(__e\(.*?\)|\b__t\)) \+\n'';/g;
var reEscapedHtml = /&(?:amp|lt|gt|quot|#39);/g, reUnescapedHtml = /[&<>"']/g, reHasEscapedHtml = RegExp(reEscapedHtml.source), reHasUnescapedHtml = RegExp(reUnescapedHtml.source);
var reEscape = /<%-([\s\S]+?)%>/g, reEvaluate = /<%([\s\S]+?)%>/g, reInterpolate = /<%=([\s\S]+?)%>/g;
var reIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, reIsPlainProp = /^\w*$/, rePropName = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g, reHasRegExpChar = RegExp(reRegExpChar.source);
var reTrimStart = /^\s+/;
var reWhitespace = /\s/;
var reWrapComment = /\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/, reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, reSplitDetails = /,? & /;
var reAsciiWord = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;
var reForbiddenIdentifierChars = /[()=,{}\[\]\/\s]/;
var reEscapeChar = /\\(\\)?/g;
var reEsTemplate = /\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g;
var reFlags = /\w*$/;
var reIsBadHex = /^[-+]0x[0-9a-f]+$/i;
var reIsBinary = /^0b[01]+$/i;
var reIsHostCtor = /^\[object .+?Constructor\]$/;
var reIsOctal = /^0o[0-7]+$/i;
var reIsUint = /^(?:0|[1-9]\d*)$/;
var reLatin = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g;
var reNoMatch = /($^)/;
var reUnescapedString = /['\n\r\u2028\u2029\\]/g;
var rsAstralRange = "\\ud800-\\udfff", rsComboMarksRange = "\\u0300-\\u036f", reComboHalfMarksRange = "\\ufe20-\\ufe2f", rsComboSymbolsRange = "\\u20d0-\\u20ff", rsComboRange = rsComboMarksRange + reComboHalfMarksRange + rsComboSymbolsRange, rsDingbatRange = "\\u2700-\\u27bf", rsLowerRange = "a-z\\xdf-\\xf6\\xf8-\\xff", rsMathOpRange = "\\xac\\xb1\\xd7\\xf7", rsNonCharRange = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", rsPunctuationRange = "\\u2000-\\u206f", rsSpaceRange = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", rsUpperRange = "A-Z\\xc0-\\xd6\\xd8-\\xde", rsVarRange = "\\ufe0e\\ufe0f", rsBreakRange = rsMathOpRange + rsNonCharRange + rsPunctuationRange + rsSpaceRange;
var rsApos = "['\u2019]", rsAstral = "[" + rsAstralRange + "]", rsBreak = "[" + rsBreakRange + "]", rsCombo = "[" + rsComboRange + "]", rsDigits = "\\d+", rsDingbat = "[" + rsDingbatRange + "]", rsLower = "[" + rsLowerRange + "]", rsMisc = "[^" + rsAstralRange + rsBreakRange + rsDigits + rsDingbatRange + rsLowerRange + rsUpperRange + "]", rsFitz = "\\ud83c[\\udffb-\\udfff]", rsModifier = "(?:" + rsCombo + "|" + rsFitz + ")", rsNonAstral = "[^" + rsAstralRange + "]", rsRegional = "(?:\\ud83c[\\udde6-\\uddff]){2}", rsSurrPair = "[\\ud800-\\udbff][\\udc00-\\udfff]", rsUpper = "[" + rsUpperRange + "]", rsZWJ = "\\u200d";
var rsMiscLower = "(?:" + rsLower + "|" + rsMisc + ")", rsMiscUpper = "(?:" + rsUpper + "|" + rsMisc + ")", rsOptContrLower = "(?:" + rsApos + "(?:d|ll|m|re|s|t|ve))?", rsOptContrUpper = "(?:" + rsApos + "(?:D|LL|M|RE|S|T|VE))?", reOptMod = rsModifier + "?", rsOptVar = "[" + rsVarRange + "]?", rsOptJoin = "(?:" + rsZWJ + "(?:" + [rsNonAstral, rsRegional, rsSurrPair].join("|") + ")" + rsOptVar + reOptMod + ")*", rsOrdLower = "\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])", rsOrdUpper = "\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])", rsSeq = rsOptVar + reOptMod + rsOptJoin, rsEmoji = "(?:" + [rsDingbat, rsRegional, rsSurrPair].join("|") + ")" + rsSeq, rsSymbol = "(?:" + [rsNonAstral + rsCombo + "?", rsCombo, rsRegional, rsSurrPair, rsAstral].join("|") + ")";
var reApos = RegExp(rsApos, "g");
var reComboMark = RegExp(rsCombo, "g");
var reUnicode = RegExp(rsFitz + "(?=" + rsFitz + ")|" + rsSymbol + rsSeq, "g");
var reUnicodeWord = RegExp([
rsUpper + "?" + rsLower + "+" + rsOptContrLower + "(?=" + [rsBreak, rsUpper, "$"].join("|") + ")",
rsMiscUpper + "+" + rsOptContrUpper + "(?=" + [rsBreak, rsUpper + rsMiscLower, "$"].join("|") + ")",
rsUpper + "?" + rsMiscLower + "+" + rsOptContrLower,
rsUpper + "+" + rsOptContrUpper,
rsOrdUpper,
rsOrdLower,
rsDigits,
rsEmoji
].join("|"), "g");
var reHasUnicode = RegExp("[" + rsZWJ + rsAstralRange + rsComboRange + rsVarRange + "]");
var reHasUnicodeWord = /[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;
var contextProps = [
"Array",
"Buffer",
"DataView",
"Date",
"Error",
"Float32Array",
"Float64Array",
"Function",
"Int8Array",
"Int16Array",
"Int32Array",
"Map",
"Math",
"Object",
"Promise",
"RegExp",
"Set",
"String",
"Symbol",
"TypeError",
"Uint8Array",
"Uint8ClampedArray",
"Uint16Array",
"Uint32Array",
"WeakMap",
"_",
"clearTimeout",
"isFinite",
"parseInt",
"setTimeout"
];
var templateCounter = -1;
var typedArrayTags = {};
typedArrayTags[float32Tag] = typedArrayTags[float64Tag] = typedArrayTags[int8Tag] = typedArrayTags[int16Tag] = typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] = typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] = typedArrayTags[uint32Tag] = true;
typedArrayTags[argsTag] = typedArrayTags[arrayTag] = typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] = typedArrayTags[dataViewTag] = typedArrayTags[dateTag] = typedArrayTags[errorTag] = typedArrayTags[funcTag] = typedArrayTags[mapTag] = typedArrayTags[numberTag] = typedArrayTags[objectTag] = typedArrayTags[regexpTag] = typedArrayTags[setTag] = typedArrayTags[stringTag] = typedArrayTags[weakMapTag] = false;
var cloneableTags = {};
cloneableTags[argsTag] = cloneableTags[arrayTag] = cloneableTags[arrayBufferTag] = cloneableTags[dataViewTag] = cloneableTags[boolTag] = cloneableTags[dateTag] = cloneableTags[float32Tag] = cloneableTags[float64Tag] = cloneableTags[int8Tag] = cloneableTags[int16Tag] = cloneableTags[int32Tag] = cloneableTags[mapTag] = cloneableTags[numberTag] = cloneableTags[objectTag] = cloneableTags[regexpTag] = cloneableTags[setTag] = cloneableTags[stringTag] = cloneableTags[symbolTag] = cloneableTags[uint8Tag] = cloneableTags[uint8ClampedTag] = cloneableTags[uint16Tag] = cloneableTags[uint32Tag] = true;
cloneableTags[errorTag] = cloneableTags[funcTag] = cloneableTags[weakMapTag] = false;
var deburredLetters = {
// Latin-1 Supplement block.
"\xC0": "A",
"\xC1": "A",
"\xC2": "A",
"\xC3": "A",
"\xC4": "A",
"\xC5": "A",
"\xE0": "a",
"\xE1": "a",
"\xE2": "a",
"\xE3": "a",
"\xE4": "a",
"\xE5": "a",
"\xC7": "C",
"\xE7": "c",
"\xD0": "D",
"\xF0": "d",
"\xC8": "E",
"\xC9": "E",
"\xCA": "E",
"\xCB": "E",
"\xE8": "e",
"\xE9": "e",
"\xEA": "e",
"\xEB": "e",
"\xCC": "I",
"\xCD": "I",
"\xCE": "I",
"\xCF": "I",
"\xEC": "i",
"\xED": "i",
"\xEE": "i",
"\xEF": "i",
"\xD1": "N",
"\xF1": "n",
"\xD2": "O",
"\xD3": "O",
"\xD4": "O",
"\xD5": "O",
"\xD6": "O",
"\xD8": "O",
"\xF2": "o",
"\xF3": "o",
"\xF4": "o",
"\xF5": "o",
"\xF6": "o",
"\xF8": "o",
"\xD9": "U",
"\xDA": "U",
"\xDB": "U",
"\xDC": "U",
"\xF9": "u",
"\xFA": "u",
"\xFB": "u",
"\xFC": "u",
"\xDD": "Y",
"\xFD": "y",
"\xFF": "y",
"\xC6": "Ae",
"\xE6": "ae",
"\xDE": "Th",
"\xFE": "th",
"\xDF": "ss",
// Latin Extended-A block.
"\u0100": "A",
"\u0102": "A",
"\u0104": "A",
"\u0101": "a",
"\u0103": "a",
"\u0105": "a",
"\u0106": "C",
"\u0108": "C",
"\u010A": "C",
"\u010C": "C",
"\u0107": "c",
"\u0109": "c",
"\u010B": "c",
"\u010D": "c",
"\u010E": "D",
"\u0110": "D",
"\u010F": "d",
"\u0111": "d",
"\u0112": "E",
"\u0114": "E",
"\u0116": "E",
"\u0118": "E",
"\u011A": "E",
"\u0113": "e",
"\u0115": "e",
"\u0117": "e",
"\u0119": "e",
"\u011B": "e",
"\u011C": "G",
"\u011E": "G",
"\u0120": "G",
"\u0122": "G",
"\u011D": "g",
"\u011F": "g",
"\u0121": "g",
"\u0123": "g",
"\u0124": "H",
"\u0126": "H",
"\u0125": "h",
"\u0127": "h",
"\u0128": "I",
"\u012A": "I",
"\u012C": "I",
"\u012E": "I",
"\u0130": "I",
"\u0129": "i",
"\u012B": "i",
"\u012D": "i",
"\u012F": "i",
"\u0131": "i",
"\u0134": "J",
"\u0135": "j",
"\u0136": "K",
"\u0137": "k",
"\u0138": "k",
"\u0139": "L",
"\u013B": "L",
"\u013D": "L",
"\u013F": "L",
"\u0141": "L",
"\u013A": "l",
"\u013C": "l",
"\u013E": "l",
"\u0140": "l",
"\u0142": "l",
"\u0143": "N",
"\u0145": "N",
"\u0147": "N",
"\u014A": "N",
"\u0144": "n",
"\u0146": "n",
"\u0148": "n",
"\u014B": "n",
"\u014C": "O",
"\u014E": "O",
"\u0150": "O",
"\u014D": "o",
"\u014F": "o",
"\u0151": "o",
"\u0154": "R",
"\u0156": "R",
"\u0158": "R",
"\u0155": "r",
"\u0157": "r",
"\u0159": "r",
"\u015A": "S",
"\u015C": "S",
"\u015E": "S",
"\u0160": "S",
"\u015B": "s",
"\u015D": "s",
"\u015F": "s",
"\u0161": "s",
"\u0162": "T",
"\u0164": "T",
"\u0166": "T",
"\u0163": "t",
"\u0165": "t",
"\u0167": "t",
"\u0168": "U",
"\u016A": "U",
"\u016C": "U",
"\u016E": "U",
"\u0170": "U",
"\u0172": "U",
"\u0169": "u",
"\u016B": "u",
"\u016D": "u",
"\u016F": "u",
"\u0171": "u",
"\u0173": "u",
"\u0174": "W",
"\u0175": "w",
"\u0176": "Y",
"\u0177": "y",
"\u0178": "Y",
"\u0179": "Z",
"\u017B": "Z",
"\u017D": "Z",
"\u017A": "z",
"\u017C": "z",
"\u017E": "z",
"\u0132": "IJ",
"\u0133": "ij",
"\u0152": "Oe",
"\u0153": "oe",
"\u0149": "'n",
"\u017F": "s"
};
var htmlEscapes = {
"&": "&amp;",
"<": "&lt;",
">": "&gt;",
'"': "&quot;",
"'": "&#39;"
};
var htmlUnescapes = {
"&amp;": "&",
"&lt;": "<",
"&gt;": ">",
"&quot;": '"',
"&#39;": "'"
};
var stringEscapes = {
"\\": "\\",
"'": "'",
"\n": "n",
"\r": "r",
"\u2028": "u2028",
"\u2029": "u2029"
};
var freeParseFloat = parseFloat, freeParseInt = parseInt;
var freeGlobal = typeof global == "object" && global && global.Object === Object && global;
var freeSelf = typeof self == "object" && self && self.Object === Object && self;
var root = freeGlobal || freeSelf || Function("return this")();
var freeExports = typeof exports == "object" && exports && !exports.nodeType && exports;
var freeModule = freeExports && typeof module2 == "object" && module2 && !module2.nodeType && module2;
var moduleExports = freeModule && freeModule.exports === freeExports;
var freeProcess = moduleExports && freeGlobal.process;
var nodeUtil = function() {
try {
var types = freeModule && freeModule.require && freeModule.require("util").types;
if (types) {
return types;
}
return freeProcess && freeProcess.binding && freeProcess.binding("util");
} catch (e) {
}
}();
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
function apply(func, thisArg, args) {
switch (args.length) {
case 0:
return func.call(thisArg);
case 1:
return func.call(thisArg, args[0]);
case 2:
return func.call(thisArg, args[0], args[1]);
case 3:
return func.call(thisArg, args[0], args[1], args[2]);
}
return func.apply(thisArg, args);
}
function arrayAggregator(array, setter, iteratee, accumulator) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
var value = array[index];
setter(accumulator, value, iteratee(value), array);
}
return accumulator;
}
function arrayEach(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
if (iteratee(array[index], index, array) === false) {
break;
}
}
return array;
}
function arrayEachRight(array, iteratee) {
var length = array == null ? 0 : array.length;
while (length--) {
if (iteratee(array[length], length, array) === false) {
break;
}
}
return array;
}
function arrayEvery(array, predicate) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
if (!predicate(array[index], index, array)) {
return false;
}
}
return true;
}
function arrayFilter(array, predicate) {
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result = [];
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result[resIndex++] = value;
}
}
return result;
}
function arrayIncludes(array, value) {
var length = array == null ? 0 : array.length;
return !!length && baseIndexOf(array, value, 0) > -1;
}
function arrayIncludesWith(array, value, comparator) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
if (comparator(value, array[index])) {
return true;
}
}
return false;
}
function arrayMap(array, iteratee) {
var index = -1, length = array == null ? 0 : array.length, result = Array(length);
while (++index < length) {
result[index] = iteratee(array[index], index, array);
}
return result;
}
function arrayPush(array, values) {
var index = -1, length = values.length, offset2 = array.length;
while (++index < length) {
array[offset2 + index] = values[index];
}
return array;
}
function arrayReduce(array, iteratee, accumulator, initAccum) {
var index = -1, length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[++index];
}
while (++index < length) {
accumulator = iteratee(accumulator, array[index], index, array);
}
return accumulator;
}
function arrayReduceRight(array, iteratee, accumulator, initAccum) {
var length = array == null ? 0 : array.length;
if (initAccum && length) {
accumulator = array[--length];
}
while (length--) {
accumulator = iteratee(accumulator, array[length], length, array);
}
return accumulator;
}
function arraySome(array, predicate) {
var index = -1, length = array == null ? 0 : array.length;
while (++index < length) {
if (predicate(array[index], index, array)) {
return true;
}
}
return false;
}
var asciiSize = baseProperty("length");
function asciiToArray(string) {
return string.split("");
}
function asciiWords(string) {
return string.match(reAsciiWord) || [];
}
function baseFindKey(collection, predicate, eachFunc) {
var result;
eachFunc(collection, function(value, key2, collection2) {
if (predicate(value, key2, collection2)) {
result = key2;
return false;
}
});
return result;
}
function baseFindIndex(array, predicate, fromIndex, fromRight) {
var length = array.length, index = fromIndex + (fromRight ? 1 : -1);
while (fromRight ? index-- : ++index < length) {
if (predicate(array[index], index, array)) {
return index;
}
}
return -1;
}
function baseIndexOf(array, value, fromIndex) {
return value === value ? strictIndexOf(array, value, fromIndex) : baseFindIndex(array, baseIsNaN, fromIndex);
}
function baseIndexOfWith(array, value, fromIndex, comparator) {
var index = fromIndex - 1, length = array.length;
while (++index < length) {
if (comparator(array[index], value)) {
return index;
}
}
return -1;
}
function baseIsNaN(value) {
return value !== value;
}
function baseMean(array, iteratee) {
var length = array == null ? 0 : array.length;
return length ? baseSum(array, iteratee) / length : NAN;
}
function baseProperty(key2) {
return function(object) {
return object == null ? undefined2 : object[key2];
};
}
function basePropertyOf(object) {
return function(key2) {
return object == null ? undefined2 : object[key2];
};
}
function baseReduce(collection, iteratee, accumulator, initAccum, eachFunc) {
eachFunc(collection, function(value, index, collection2) {
accumulator = initAccum ? (initAccum = false, value) : iteratee(accumulator, value, index, collection2);
});
return accumulator;
}
function baseSortBy(array, comparer) {
var length = array.length;
array.sort(comparer);
while (length--) {
array[length] = array[length].value;
}
return array;
}
function baseSum(array, iteratee) {
var result, index = -1, length = array.length;
while (++index < length) {
var current2 = iteratee(array[index]);
if (current2 !== undefined2) {
result = result === undefined2 ? current2 : result + current2;
}
}
return result;
}
function baseTimes(n2, iteratee) {
var index = -1, result = Array(n2);
while (++index < n2) {
result[index] = iteratee(index);
}
return result;
}
function baseToPairs(object, props) {
return arrayMap(props, function(key2) {
return [key2, object[key2]];
});
}
function baseTrim(string) {
return string ? string.slice(0, trimmedEndIndex(string) + 1).replace(reTrimStart, "") : string;
}
function baseUnary(func) {
return function(value) {
return func(value);
};
}
function baseValues(object, props) {
return arrayMap(props, function(key2) {
return object[key2];
});
}
function cacheHas(cache, key2) {
return cache.has(key2);
}
function charsStartIndex(strSymbols, chrSymbols) {
var index = -1, length = strSymbols.length;
while (++index < length && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
}
return index;
}
function charsEndIndex(strSymbols, chrSymbols) {
var index = strSymbols.length;
while (index-- && baseIndexOf(chrSymbols, strSymbols[index], 0) > -1) {
}
return index;
}
function countHolders(array, placeholder) {
var length = array.length, result = 0;
while (length--) {
if (array[length] === placeholder) {
++result;
}
}
return result;
}
var deburrLetter = basePropertyOf(deburredLetters);
var escapeHtmlChar = basePropertyOf(htmlEscapes);
function escapeStringChar(chr) {
return "\\" + stringEscapes[chr];
}
function getValue(object, key2) {
return object == null ? undefined2 : object[key2];
}
function hasUnicode(string) {
return reHasUnicode.test(string);
}
function hasUnicodeWord(string) {
return reHasUnicodeWord.test(string);
}
function iteratorToArray(iterator) {
var data, result = [];
while (!(data = iterator.next()).done) {
result.push(data.value);
}
return result;
}
function mapToArray(map) {
var index = -1, result = Array(map.size);
map.forEach(function(value, key2) {
result[++index] = [key2, value];
});
return result;
}
function overArg(func, transform) {
return function(arg) {
return func(transform(arg));
};
}
function replaceHolders(array, placeholder) {
var index = -1, length = array.length, resIndex = 0, result = [];
while (++index < length) {
var value = array[index];
if (value === placeholder || value === PLACEHOLDER) {
array[index] = PLACEHOLDER;
result[resIndex++] = index;
}
}
return result;
}
function setToArray(set2) {
var index = -1, result = Array(set2.size);
set2.forEach(function(value) {
result[++index] = value;
});
return result;
}
function setToPairs(set2) {
var index = -1, result = Array(set2.size);
set2.forEach(function(value) {
result[++index] = [value, value];
});
return result;
}
function strictIndexOf(array, value, fromIndex) {
var index = fromIndex - 1, length = array.length;
while (++index < length) {
if (array[index] === value) {
return index;
}
}
return -1;
}
function strictLastIndexOf(array, value, fromIndex) {
var index = fromIndex + 1;
while (index--) {
if (array[index] === value) {
return index;
}
}
return index;
}
function stringSize(string) {
return hasUnicode(string) ? unicodeSize(string) : asciiSize(string);
}
function stringToArray(string) {
return hasUnicode(string) ? unicodeToArray(string) : asciiToArray(string);
}
function trimmedEndIndex(string) {
var index = string.length;
while (index-- && reWhitespace.test(string.charAt(index))) {
}
return index;
}
var unescapeHtmlChar = basePropertyOf(htmlUnescapes);
function unicodeSize(string) {
var result = reUnicode.lastIndex = 0;
while (reUnicode.test(string)) {
++result;
}
return result;
}
function unicodeToArray(string) {
return string.match(reUnicode) || [];
}
function unicodeWords(string) {
return string.match(reUnicodeWord) || [];
}
var runInContext = function runInContext2(context) {
context = context == null ? root : _18.defaults(root.Object(), context, _18.pick(root, contextProps));
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError2 = context.TypeError;
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
var coreJsData = context["__core-js_shared__"];
var funcToString = funcProto.toString;
var hasOwnProperty2 = objectProto.hasOwnProperty;
var idCounter = 0;
var maskSrcKey = function() {
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
return uid ? "Symbol(src)_1." + uid : "";
}();
var nativeObjectToString = objectProto.toString;
var objectCtorString2 = funcToString.call(Object2);
var oldDash = root._;
var reIsNative = RegExp2(
"^" + funcToString.call(hasOwnProperty2).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
);
var Buffer2 = moduleExports ? context.Buffer : undefined2, Symbol2 = context.Symbol, Uint8Array2 = context.Uint8Array, allocUnsafe = Buffer2 ? Buffer2.allocUnsafe : undefined2, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol2 ? Symbol2.isConcatSpreadable : undefined2, symIterator = Symbol2 ? Symbol2.iterator : undefined2, symToStringTag = Symbol2 ? Symbol2.toStringTag : undefined2;
var defineProperty = function() {
try {
var func = getNative(Object2, "defineProperty");
func({}, "", {});
return func;
} catch (e) {
}
}();
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer2 ? Buffer2.isBuffer : undefined2, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
var DataView = getNative(context, "DataView"), Map2 = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set2 = getNative(context, "Set"), WeakMap2 = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
var metaMap = WeakMap2 && new WeakMap2();
var realNames = {};
var dataViewCtorString = toSource(DataView), mapCtorString = toSource(Map2), promiseCtorString = toSource(Promise2), setCtorString = toSource(Set2), weakMapCtorString = toSource(WeakMap2);
var symbolProto = Symbol2 ? Symbol2.prototype : undefined2, symbolValueOf = symbolProto ? symbolProto.valueOf : undefined2, symbolToString = symbolProto ? symbolProto.toString : undefined2;
function lodash(value) {
if (isObjectLike(value) && !isArray(value) && !(value instanceof LazyWrapper)) {
if (value instanceof LodashWrapper) {
return value;
}
if (hasOwnProperty2.call(value, "__wrapped__")) {
return wrapperClone(value);
}
}
return new LodashWrapper(value);
}
var baseCreate = /* @__PURE__ */ function() {
function object() {
}
return function(proto) {
if (!isObject(proto)) {
return {};
}
if (objectCreate) {
return objectCreate(proto);
}
object.prototype = proto;
var result2 = new object();
object.prototype = undefined2;
return result2;
};
}();
function baseLodash() {
}
function LodashWrapper(value, chainAll) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__chain__ = !!chainAll;
this.__index__ = 0;
this.__values__ = undefined2;
}
lodash.templateSettings = {
/**
* Used to detect `data` property values to be HTML-escaped.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
"escape": reEscape,
/**
* Used to detect code to be evaluated.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
"evaluate": reEvaluate,
/**
* Used to detect `data` property values to inject.
*
* @memberOf _.templateSettings
* @type {RegExp}
*/
"interpolate": reInterpolate,
/**
* Used to reference the data object in the template text.
*
* @memberOf _.templateSettings
* @type {string}
*/
"variable": "",
/**
* Used to import variables into the compiled template.
*
* @memberOf _.templateSettings
* @type {Object}
*/
"imports": {
/**
* A reference to the `lodash` function.
*
* @memberOf _.templateSettings.imports
* @type {Function}
*/
"_": lodash
}
};
lodash.prototype = baseLodash.prototype;
lodash.prototype.constructor = lodash;
LodashWrapper.prototype = baseCreate(baseLodash.prototype);
LodashWrapper.prototype.constructor = LodashWrapper;
function LazyWrapper(value) {
this.__wrapped__ = value;
this.__actions__ = [];
this.__dir__ = 1;
this.__filtered__ = false;
this.__iteratees__ = [];
this.__takeCount__ = MAX_ARRAY_LENGTH;
this.__views__ = [];
}
function lazyClone() {
var result2 = new LazyWrapper(this.__wrapped__);
result2.__actions__ = copyArray(this.__actions__);
result2.__dir__ = this.__dir__;
result2.__filtered__ = this.__filtered__;
result2.__iteratees__ = copyArray(this.__iteratees__);
result2.__takeCount__ = this.__takeCount__;
result2.__views__ = copyArray(this.__views__);
return result2;
}
function lazyReverse() {
if (this.__filtered__) {
var result2 = new LazyWrapper(this);
result2.__dir__ = -1;
result2.__filtered__ = true;
} else {
result2 = this.clone();
result2.__dir__ *= -1;
}
return result2;
}
function lazyValue() {
var array = this.__wrapped__.value(), dir = this.__dir__, isArr = isArray(array), isRight = dir < 0, arrLength = isArr ? array.length : 0, view = getView(0, arrLength, this.__views__), start = view.start, end = view.end, length = end - start, index = isRight ? end : start - 1, iteratees = this.__iteratees__, iterLength = iteratees.length, resIndex = 0, takeCount = nativeMin(length, this.__takeCount__);
if (!isArr || !isRight && arrLength == length && takeCount == length) {
return baseWrapperValue(array, this.__actions__);
}
var result2 = [];
outer:
while (length-- && resIndex < takeCount) {
index += dir;
var iterIndex = -1, value = array[index];
while (++iterIndex < iterLength) {
var data = iteratees[iterIndex], iteratee2 = data.iteratee, type = data.type, computed = iteratee2(value);
if (type == LAZY_MAP_FLAG) {
value = computed;
} else if (!computed) {
if (type == LAZY_FILTER_FLAG) {
continue outer;
} else {
break outer;
}
}
}
result2[resIndex++] = value;
}
return result2;
}
LazyWrapper.prototype = baseCreate(baseLodash.prototype);
LazyWrapper.prototype.constructor = LazyWrapper;
function Hash(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function hashClear() {
this.__data__ = nativeCreate ? nativeCreate(null) : {};
this.size = 0;
}
function hashDelete(key2) {
var result2 = this.has(key2) && delete this.__data__[key2];
this.size -= result2 ? 1 : 0;
return result2;
}
function hashGet(key2) {
var data = this.__data__;
if (nativeCreate) {
var result2 = data[key2];
return result2 === HASH_UNDEFINED ? undefined2 : result2;
}
return hasOwnProperty2.call(data, key2) ? data[key2] : undefined2;
}
function hashHas(key2) {
var data = this.__data__;
return nativeCreate ? data[key2] !== undefined2 : hasOwnProperty2.call(data, key2);
}
function hashSet(key2, value) {
var data = this.__data__;
this.size += this.has(key2) ? 0 : 1;
data[key2] = nativeCreate && value === undefined2 ? HASH_UNDEFINED : value;
return this;
}
Hash.prototype.clear = hashClear;
Hash.prototype["delete"] = hashDelete;
Hash.prototype.get = hashGet;
Hash.prototype.has = hashHas;
Hash.prototype.set = hashSet;
function ListCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function listCacheClear() {
this.__data__ = [];
this.size = 0;
}
function listCacheDelete(key2) {
var data = this.__data__, index = assocIndexOf(data, key2);
if (index < 0) {
return false;
}
var lastIndex = data.length - 1;
if (index == lastIndex) {
data.pop();
} else {
splice.call(data, index, 1);
}
--this.size;
return true;
}
function listCacheGet(key2) {
var data = this.__data__, index = assocIndexOf(data, key2);
return index < 0 ? undefined2 : data[index][1];
}
function listCacheHas(key2) {
return assocIndexOf(this.__data__, key2) > -1;
}
function listCacheSet(key2, value) {
var data = this.__data__, index = assocIndexOf(data, key2);
if (index < 0) {
++this.size;
data.push([key2, value]);
} else {
data[index][1] = value;
}
return this;
}
ListCache.prototype.clear = listCacheClear;
ListCache.prototype["delete"] = listCacheDelete;
ListCache.prototype.get = listCacheGet;
ListCache.prototype.has = listCacheHas;
ListCache.prototype.set = listCacheSet;
function MapCache(entries) {
var index = -1, length = entries == null ? 0 : entries.length;
this.clear();
while (++index < length) {
var entry = entries[index];
this.set(entry[0], entry[1]);
}
}
function mapCacheClear() {
this.size = 0;
this.__data__ = {
"hash": new Hash(),
"map": new (Map2 || ListCache)(),
"string": new Hash()
};
}
function mapCacheDelete(key2) {
var result2 = getMapData(this, key2)["delete"](key2);
this.size -= result2 ? 1 : 0;
return result2;
}
function mapCacheGet(key2) {
return getMapData(this, key2).get(key2);
}
function mapCacheHas(key2) {
return getMapData(this, key2).has(key2);
}
function mapCacheSet(key2, value) {
var data = getMapData(this, key2), size2 = data.size;
data.set(key2, value);
this.size += data.size == size2 ? 0 : 1;
return this;
}
MapCache.prototype.clear = mapCacheClear;
MapCache.prototype["delete"] = mapCacheDelete;
MapCache.prototype.get = mapCacheGet;
MapCache.prototype.has = mapCacheHas;
MapCache.prototype.set = mapCacheSet;
function SetCache(values2) {
var index = -1, length = values2 == null ? 0 : values2.length;
this.__data__ = new MapCache();
while (++index < length) {
this.add(values2[index]);
}
}
function setCacheAdd(value) {
this.__data__.set(value, HASH_UNDEFINED);
return this;
}
function setCacheHas(value) {
return this.__data__.has(value);
}
SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
SetCache.prototype.has = setCacheHas;
function Stack(entries) {
var data = this.__data__ = new ListCache(entries);
this.size = data.size;
}
function stackClear() {
this.__data__ = new ListCache();
this.size = 0;
}
function stackDelete(key2) {
var data = this.__data__, result2 = data["delete"](key2);
this.size = data.size;
return result2;
}
function stackGet(key2) {
return this.__data__.get(key2);
}
function stackHas(key2) {
return this.__data__.has(key2);
}
function stackSet(key2, value) {
var data = this.__data__;
if (data instanceof ListCache) {
var pairs = data.__data__;
if (!Map2 || pairs.length < LARGE_ARRAY_SIZE - 1) {
pairs.push([key2, value]);
this.size = ++data.size;
return this;
}
data = this.__data__ = new MapCache(pairs);
}
data.set(key2, value);
this.size = data.size;
return this;
}
Stack.prototype.clear = stackClear;
Stack.prototype["delete"] = stackDelete;
Stack.prototype.get = stackGet;
Stack.prototype.has = stackHas;
Stack.prototype.set = stackSet;
function arrayLikeKeys(value, inherited) {
var isArr = isArray(value), isArg = !isArr && isArguments(value), isBuff = !isArr && !isArg && isBuffer(value), isType = !isArr && !isArg && !isBuff && isTypedArray(value), skipIndexes = isArr || isArg || isBuff || isType, result2 = skipIndexes ? baseTimes(value.length, String2) : [], length = result2.length;
for (var key2 in value) {
if ((inherited || hasOwnProperty2.call(value, key2)) && !(skipIndexes && // Safari 9 has enumerable `arguments.length` in strict mode.
(key2 == "length" || // Node.js 0.10 has enumerable non-index properties on buffers.
isBuff && (key2 == "offset" || key2 == "parent") || // PhantomJS 2 has enumerable non-index properties on typed arrays.
isType && (key2 == "buffer" || key2 == "byteLength" || key2 == "byteOffset") || // Skip index properties.
isIndex(key2, length)))) {
result2.push(key2);
}
}
return result2;
}
function arraySample(array) {
var length = array.length;
return length ? array[baseRandom(0, length - 1)] : undefined2;
}
function arraySampleSize(array, n2) {
return shuffleSelf(copyArray(array), baseClamp(n2, 0, array.length));
}
function arrayShuffle(array) {
return shuffleSelf(copyArray(array));
}
function assignMergeValue(object, key2, value) {
if (value !== undefined2 && !eq(object[key2], value) || value === undefined2 && !(key2 in object)) {
baseAssignValue(object, key2, value);
}
}
function assignValue(object, key2, value) {
var objValue = object[key2];
if (!(hasOwnProperty2.call(object, key2) && eq(objValue, value)) || value === undefined2 && !(key2 in object)) {
baseAssignValue(object, key2, value);
}
}
function assocIndexOf(array, key2) {
var length = array.length;
while (length--) {
if (eq(array[length][0], key2)) {
return length;
}
}
return -1;
}
function baseAggregator(collection, setter, iteratee2, accumulator) {
baseEach(collection, function(value, key2, collection2) {
setter(accumulator, value, iteratee2(value), collection2);
});
return accumulator;
}
function baseAssign(object, source) {
return object && copyObject(source, keys(source), object);
}
function baseAssignIn(object, source) {
return object && copyObject(source, keysIn(source), object);
}
function baseAssignValue(object, key2, value) {
if (key2 == "__proto__" && defineProperty) {
defineProperty(object, key2, {
"configurable": true,
"enumerable": true,
"value": value,
"writable": true
});
} else {
object[key2] = value;
}
}
function baseAt(object, paths) {
var index = -1, length = paths.length, result2 = Array2(length), skip = object == null;
while (++index < length) {
result2[index] = skip ? undefined2 : get(object, paths[index]);
}
return result2;
}
function baseClamp(number, lower, upper) {
if (number === number) {
if (upper !== undefined2) {
number = number <= upper ? number : upper;
}
if (lower !== undefined2) {
number = number >= lower ? number : lower;
}
}
return number;
}
function baseClone(value, bitmask, customizer, key2, object, stack) {
var result2, isDeep = bitmask & CLONE_DEEP_FLAG, isFlat = bitmask & CLONE_FLAT_FLAG, isFull = bitmask & CLONE_SYMBOLS_FLAG;
if (customizer) {
result2 = object ? customizer(value, key2, object, stack) : customizer(value);
}
if (result2 !== undefined2) {
return result2;
}
if (!isObject(value)) {
return value;
}
var isArr = isArray(value);
if (isArr) {
result2 = initCloneArray(value);
if (!isDeep) {
return copyArray(value, result2);
}
} else {
var tag = getTag(value), isFunc = tag == funcTag || tag == genTag;
if (isBuffer(value)) {
return cloneBuffer(value, isDeep);
}
if (tag == objectTag || tag == argsTag || isFunc && !object) {
result2 = isFlat || isFunc ? {} : initCloneObject(value);
if (!isDeep) {
return isFlat ? copySymbolsIn(value, baseAssignIn(result2, value)) : copySymbols(value, baseAssign(result2, value));
}
} else {
if (!cloneableTags[tag]) {
return object ? value : {};
}
result2 = initCloneByTag(value, tag, isDeep);
}
}
stack || (stack = new Stack());
var stacked = stack.get(value);
if (stacked) {
return stacked;
}
stack.set(value, result2);
if (isSet2(value)) {
value.forEach(function(subValue) {
result2.add(baseClone(subValue, bitmask, customizer, subValue, value, stack));
});
} else if (isMap2(value)) {
value.forEach(function(subValue, key3) {
result2.set(key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
});
}
var keysFunc = isFull ? isFlat ? getAllKeysIn : getAllKeys : isFlat ? keysIn : keys;
var props = isArr ? undefined2 : keysFunc(value);
arrayEach(props || value, function(subValue, key3) {
if (props) {
key3 = subValue;
subValue = value[key3];
}
assignValue(result2, key3, baseClone(subValue, bitmask, customizer, key3, value, stack));
});
return result2;
}
function baseConforms(source) {
var props = keys(source);
return function(object) {
return baseConformsTo(object, source, props);
};
}
function baseConformsTo(object, source, props) {
var length = props.length;
if (object == null) {
return !length;
}
object = Object2(object);
while (length--) {
var key2 = props[length], predicate = source[key2], value = object[key2];
if (value === undefined2 && !(key2 in object) || !predicate(value)) {
return false;
}
}
return true;
}
function baseDelay(func, wait, args) {
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
return setTimeout2(function() {
func.apply(undefined2, args);
}, wait);
}
function baseDifference(array, values2, iteratee2, comparator) {
var index = -1, includes2 = arrayIncludes, isCommon = true, length = array.length, result2 = [], valuesLength = values2.length;
if (!length) {
return result2;
}
if (iteratee2) {
values2 = arrayMap(values2, baseUnary(iteratee2));
}
if (comparator) {
includes2 = arrayIncludesWith;
isCommon = false;
} else if (values2.length >= LARGE_ARRAY_SIZE) {
includes2 = cacheHas;
isCommon = false;
values2 = new SetCache(values2);
}
outer:
while (++index < length) {
var value = array[index], computed = iteratee2 == null ? value : iteratee2(value);
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var valuesIndex = valuesLength;
while (valuesIndex--) {
if (values2[valuesIndex] === computed) {
continue outer;
}
}
result2.push(value);
} else if (!includes2(values2, computed, comparator)) {
result2.push(value);
}
}
return result2;
}
var baseEach = createBaseEach(baseForOwn);
var baseEachRight = createBaseEach(baseForOwnRight, true);
function baseEvery(collection, predicate) {
var result2 = true;
baseEach(collection, function(value, index, collection2) {
result2 = !!predicate(value, index, collection2);
return result2;
});
return result2;
}
function baseExtremum(array, iteratee2, comparator) {
var index = -1, length = array.length;
while (++index < length) {
var value = array[index], current2 = iteratee2(value);
if (current2 != null && (computed === undefined2 ? current2 === current2 && !isSymbol(current2) : comparator(current2, computed))) {
var computed = current2, result2 = value;
}
}
return result2;
}
function baseFill(array, value, start, end) {
var length = array.length;
start = toInteger(start);
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end === undefined2 || end > length ? length : toInteger(end);
if (end < 0) {
end += length;
}
end = start > end ? 0 : toLength(end);
while (start < end) {
array[start++] = value;
}
return array;
}
function baseFilter(collection, predicate) {
var result2 = [];
baseEach(collection, function(value, index, collection2) {
if (predicate(value, index, collection2)) {
result2.push(value);
}
});
return result2;
}
function baseFlatten(array, depth, predicate, isStrict, result2) {
var index = -1, length = array.length;
predicate || (predicate = isFlattenable);
result2 || (result2 = []);
while (++index < length) {
var value = array[index];
if (depth > 0 && predicate(value)) {
if (depth > 1) {
baseFlatten(value, depth - 1, predicate, isStrict, result2);
} else {
arrayPush(result2, value);
}
} else if (!isStrict) {
result2[result2.length] = value;
}
}
return result2;
}
var baseFor = createBaseFor();
var baseForRight = createBaseFor(true);
function baseForOwn(object, iteratee2) {
return object && baseFor(object, iteratee2, keys);
}
function baseForOwnRight(object, iteratee2) {
return object && baseForRight(object, iteratee2, keys);
}
function baseFunctions(object, props) {
return arrayFilter(props, function(key2) {
return isFunction(object[key2]);
});
}
function baseGet(object, path2) {
path2 = castPath(path2, object);
var index = 0, length = path2.length;
while (object != null && index < length) {
object = object[toKey(path2[index++])];
}
return index && index == length ? object : undefined2;
}
function baseGetAllKeys(object, keysFunc, symbolsFunc) {
var result2 = keysFunc(object);
return isArray(object) ? result2 : arrayPush(result2, symbolsFunc(object));
}
function baseGetTag(value) {
if (value == null) {
return value === undefined2 ? undefinedTag : nullTag;
}
return symToStringTag && symToStringTag in Object2(value) ? getRawTag(value) : objectToString(value);
}
function baseGt(value, other) {
return value > other;
}
function baseHas(object, key2) {
return object != null && hasOwnProperty2.call(object, key2);
}
function baseHasIn(object, key2) {
return object != null && key2 in Object2(object);
}
function baseInRange(number, start, end) {
return number >= nativeMin(start, end) && number < nativeMax(start, end);
}
function baseIntersection(arrays, iteratee2, comparator) {
var includes2 = comparator ? arrayIncludesWith : arrayIncludes, length = arrays[0].length, othLength = arrays.length, othIndex = othLength, caches = Array2(othLength), maxLength = Infinity, result2 = [];
while (othIndex--) {
var array = arrays[othIndex];
if (othIndex && iteratee2) {
array = arrayMap(array, baseUnary(iteratee2));
}
maxLength = nativeMin(array.length, maxLength);
caches[othIndex] = !comparator && (iteratee2 || length >= 120 && array.length >= 120) ? new SetCache(othIndex && array) : undefined2;
}
array = arrays[0];
var index = -1, seen = caches[0];
outer:
while (++index < length && result2.length < maxLength) {
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
value = comparator || value !== 0 ? value : 0;
if (!(seen ? cacheHas(seen, computed) : includes2(result2, computed, comparator))) {
othIndex = othLength;
while (--othIndex) {
var cache = caches[othIndex];
if (!(cache ? cacheHas(cache, computed) : includes2(arrays[othIndex], computed, comparator))) {
continue outer;
}
}
if (seen) {
seen.push(computed);
}
result2.push(value);
}
}
return result2;
}
function baseInverter(object, setter, iteratee2, accumulator) {
baseForOwn(object, function(value, key2, object2) {
setter(accumulator, iteratee2(value), key2, object2);
});
return accumulator;
}
function baseInvoke(object, path2, args) {
path2 = castPath(path2, object);
object = parent(object, path2);
var func = object == null ? object : object[toKey(last(path2))];
return func == null ? undefined2 : apply(func, object, args);
}
function baseIsArguments(value) {
return isObjectLike(value) && baseGetTag(value) == argsTag;
}
function baseIsArrayBuffer(value) {
return isObjectLike(value) && baseGetTag(value) == arrayBufferTag;
}
function baseIsDate(value) {
return isObjectLike(value) && baseGetTag(value) == dateTag;
}
function baseIsEqual(value, other, bitmask, customizer, stack) {
if (value === other) {
return true;
}
if (value == null || other == null || !isObjectLike(value) && !isObjectLike(other)) {
return value !== value && other !== other;
}
return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
}
function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
var objIsArr = isArray(object), othIsArr = isArray(other), objTag = objIsArr ? arrayTag : getTag(object), othTag = othIsArr ? arrayTag : getTag(other);
objTag = objTag == argsTag ? objectTag : objTag;
othTag = othTag == argsTag ? objectTag : othTag;
var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
if (isSameTag && isBuffer(object)) {
if (!isBuffer(other)) {
return false;
}
objIsArr = true;
objIsObj = false;
}
if (isSameTag && !objIsObj) {
stack || (stack = new Stack());
return objIsArr || isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
}
if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
var objIsWrapped = objIsObj && hasOwnProperty2.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty2.call(other, "__wrapped__");
if (objIsWrapped || othIsWrapped) {
var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
stack || (stack = new Stack());
return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
}
}
if (!isSameTag) {
return false;
}
stack || (stack = new Stack());
return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
}
function baseIsMap(value) {
return isObjectLike(value) && getTag(value) == mapTag;
}
function baseIsMatch(object, source, matchData, customizer) {
var index = matchData.length, length = index, noCustomizer = !customizer;
if (object == null) {
return !length;
}
object = Object2(object);
while (index--) {
var data = matchData[index];
if (noCustomizer && data[2] ? data[1] !== object[data[0]] : !(data[0] in object)) {
return false;
}
}
while (++index < length) {
data = matchData[index];
var key2 = data[0], objValue = object[key2], srcValue = data[1];
if (noCustomizer && data[2]) {
if (objValue === undefined2 && !(key2 in object)) {
return false;
}
} else {
var stack = new Stack();
if (customizer) {
var result2 = customizer(objValue, srcValue, key2, object, source, stack);
}
if (!(result2 === undefined2 ? baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG, customizer, stack) : result2)) {
return false;
}
}
}
return true;
}
function baseIsNative(value) {
if (!isObject(value) || isMasked(value)) {
return false;
}
var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
return pattern.test(toSource(value));
}
function baseIsRegExp(value) {
return isObjectLike(value) && baseGetTag(value) == regexpTag;
}
function baseIsSet(value) {
return isObjectLike(value) && getTag(value) == setTag;
}
function baseIsTypedArray(value) {
return isObjectLike(value) && isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
}
function baseIteratee(value) {
if (typeof value == "function") {
return value;
}
if (value == null) {
return identity2;
}
if (typeof value == "object") {
return isArray(value) ? baseMatchesProperty(value[0], value[1]) : baseMatches(value);
}
return property(value);
}
function baseKeys(object) {
if (!isPrototype(object)) {
return nativeKeys(object);
}
var result2 = [];
for (var key2 in Object2(object)) {
if (hasOwnProperty2.call(object, key2) && key2 != "constructor") {
result2.push(key2);
}
}
return result2;
}
function baseKeysIn(object) {
if (!isObject(object)) {
return nativeKeysIn(object);
}
var isProto = isPrototype(object), result2 = [];
for (var key2 in object) {
if (!(key2 == "constructor" && (isProto || !hasOwnProperty2.call(object, key2)))) {
result2.push(key2);
}
}
return result2;
}
function baseLt(value, other) {
return value < other;
}
function baseMap(collection, iteratee2) {
var index = -1, result2 = isArrayLike(collection) ? Array2(collection.length) : [];
baseEach(collection, function(value, key2, collection2) {
result2[++index] = iteratee2(value, key2, collection2);
});
return result2;
}
function baseMatches(source) {
var matchData = getMatchData(source);
if (matchData.length == 1 && matchData[0][2]) {
return matchesStrictComparable(matchData[0][0], matchData[0][1]);
}
return function(object) {
return object === source || baseIsMatch(object, source, matchData);
};
}
function baseMatchesProperty(path2, srcValue) {
if (isKey(path2) && isStrictComparable(srcValue)) {
return matchesStrictComparable(toKey(path2), srcValue);
}
return function(object) {
var objValue = get(object, path2);
return objValue === undefined2 && objValue === srcValue ? hasIn(object, path2) : baseIsEqual(srcValue, objValue, COMPARE_PARTIAL_FLAG | COMPARE_UNORDERED_FLAG);
};
}
function baseMerge(object, source, srcIndex, customizer, stack) {
if (object === source) {
return;
}
baseFor(source, function(srcValue, key2) {
stack || (stack = new Stack());
if (isObject(srcValue)) {
baseMergeDeep(object, source, key2, srcIndex, baseMerge, customizer, stack);
} else {
var newValue = customizer ? customizer(safeGet(object, key2), srcValue, key2 + "", object, source, stack) : undefined2;
if (newValue === undefined2) {
newValue = srcValue;
}
assignMergeValue(object, key2, newValue);
}
}, keysIn);
}
function baseMergeDeep(object, source, key2, srcIndex, mergeFunc, customizer, stack) {
var objValue = safeGet(object, key2), srcValue = safeGet(source, key2), stacked = stack.get(srcValue);
if (stacked) {
assignMergeValue(object, key2, stacked);
return;
}
var newValue = customizer ? customizer(objValue, srcValue, key2 + "", object, source, stack) : undefined2;
var isCommon = newValue === undefined2;
if (isCommon) {
var isArr = isArray(srcValue), isBuff = !isArr && isBuffer(srcValue), isTyped = !isArr && !isBuff && isTypedArray(srcValue);
newValue = srcValue;
if (isArr || isBuff || isTyped) {
if (isArray(objValue)) {
newValue = objValue;
} else if (isArrayLikeObject(objValue)) {
newValue = copyArray(objValue);
} else if (isBuff) {
isCommon = false;
newValue = cloneBuffer(srcValue, true);
} else if (isTyped) {
isCommon = false;
newValue = cloneTypedArray(srcValue, true);
} else {
newValue = [];
}
} else if (isPlainObject2(srcValue) || isArguments(srcValue)) {
newValue = objValue;
if (isArguments(objValue)) {
newValue = toPlainObject(objValue);
} else if (!isObject(objValue) || isFunction(objValue)) {
newValue = initCloneObject(srcValue);
}
} else {
isCommon = false;
}
}
if (isCommon) {
stack.set(srcValue, newValue);
mergeFunc(newValue, srcValue, srcIndex, customizer, stack);
stack["delete"](srcValue);
}
assignMergeValue(object, key2, newValue);
}
function baseNth(array, n2) {
var length = array.length;
if (!length) {
return;
}
n2 += n2 < 0 ? length : 0;
return isIndex(n2, length) ? array[n2] : undefined2;
}
function baseOrderBy(collection, iteratees, orders) {
if (iteratees.length) {
iteratees = arrayMap(iteratees, function(iteratee2) {
if (isArray(iteratee2)) {
return function(value) {
return baseGet(value, iteratee2.length === 1 ? iteratee2[0] : iteratee2);
};
}
return iteratee2;
});
} else {
iteratees = [identity2];
}
var index = -1;
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
var result2 = baseMap(collection, function(value, key2, collection2) {
var criteria = arrayMap(iteratees, function(iteratee2) {
return iteratee2(value);
});
return { "criteria": criteria, "index": ++index, "value": value };
});
return baseSortBy(result2, function(object, other) {
return compareMultiple(object, other, orders);
});
}
function basePick(object, paths) {
return basePickBy(object, paths, function(value, path2) {
return hasIn(object, path2);
});
}
function basePickBy(object, paths, predicate) {
var index = -1, length = paths.length, result2 = {};
while (++index < length) {
var path2 = paths[index], value = baseGet(object, path2);
if (predicate(value, path2)) {
baseSet(result2, castPath(path2, object), value);
}
}
return result2;
}
function basePropertyDeep(path2) {
return function(object) {
return baseGet(object, path2);
};
}
function basePullAll(array, values2, iteratee2, comparator) {
var indexOf2 = comparator ? baseIndexOfWith : baseIndexOf, index = -1, length = values2.length, seen = array;
if (array === values2) {
values2 = copyArray(values2);
}
if (iteratee2) {
seen = arrayMap(array, baseUnary(iteratee2));
}
while (++index < length) {
var fromIndex = 0, value = values2[index], computed = iteratee2 ? iteratee2(value) : value;
while ((fromIndex = indexOf2(seen, computed, fromIndex, comparator)) > -1) {
if (seen !== array) {
splice.call(seen, fromIndex, 1);
}
splice.call(array, fromIndex, 1);
}
}
return array;
}
function basePullAt(array, indexes) {
var length = array ? indexes.length : 0, lastIndex = length - 1;
while (length--) {
var index = indexes[length];
if (length == lastIndex || index !== previous) {
var previous = index;
if (isIndex(index)) {
splice.call(array, index, 1);
} else {
baseUnset(array, index);
}
}
}
return array;
}
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
function baseRange(start, end, step, fromRight) {
var index = -1, length = nativeMax(nativeCeil((end - start) / (step || 1)), 0), result2 = Array2(length);
while (length--) {
result2[fromRight ? length : ++index] = start;
start += step;
}
return result2;
}
function baseRepeat(string, n2) {
var result2 = "";
if (!string || n2 < 1 || n2 > MAX_SAFE_INTEGER) {
return result2;
}
do {
if (n2 % 2) {
result2 += string;
}
n2 = nativeFloor(n2 / 2);
if (n2) {
string += string;
}
} while (n2);
return result2;
}
function baseRest(func, start) {
return setToString(overRest(func, start, identity2), func + "");
}
function baseSample(collection) {
return arraySample(values(collection));
}
function baseSampleSize(collection, n2) {
var array = values(collection);
return shuffleSelf(array, baseClamp(n2, 0, array.length));
}
function baseSet(object, path2, value, customizer) {
if (!isObject(object)) {
return object;
}
path2 = castPath(path2, object);
var index = -1, length = path2.length, lastIndex = length - 1, nested = object;
while (nested != null && ++index < length) {
var key2 = toKey(path2[index]), newValue = value;
if (key2 === "__proto__" || key2 === "constructor" || key2 === "prototype") {
return object;
}
if (index != lastIndex) {
var objValue = nested[key2];
newValue = customizer ? customizer(objValue, key2, nested) : undefined2;
if (newValue === undefined2) {
newValue = isObject(objValue) ? objValue : isIndex(path2[index + 1]) ? [] : {};
}
}
assignValue(nested, key2, newValue);
nested = nested[key2];
}
return object;
}
var baseSetData = !metaMap ? identity2 : function(func, data) {
metaMap.set(func, data);
return func;
};
var baseSetToString = !defineProperty ? identity2 : function(func, string) {
return defineProperty(func, "toString", {
"configurable": true,
"enumerable": false,
"value": constant(string),
"writable": true
});
};
function baseShuffle(collection) {
return shuffleSelf(values(collection));
}
function baseSlice(array, start, end) {
var index = -1, length = array.length;
if (start < 0) {
start = -start > length ? 0 : length + start;
}
end = end > length ? length : end;
if (end < 0) {
end += length;
}
length = start > end ? 0 : end - start >>> 0;
start >>>= 0;
var result2 = Array2(length);
while (++index < length) {
result2[index] = array[index + start];
}
return result2;
}
function baseSome(collection, predicate) {
var result2;
baseEach(collection, function(value, index, collection2) {
result2 = predicate(value, index, collection2);
return !result2;
});
return !!result2;
}
function baseSortedIndex(array, value, retHighest) {
var low = 0, high = array == null ? low : array.length;
if (typeof value == "number" && value === value && high <= HALF_MAX_ARRAY_LENGTH) {
while (low < high) {
var mid = low + high >>> 1, computed = array[mid];
if (computed !== null && !isSymbol(computed) && (retHighest ? computed <= value : computed < value)) {
low = mid + 1;
} else {
high = mid;
}
}
return high;
}
return baseSortedIndexBy(array, value, identity2, retHighest);
}
function baseSortedIndexBy(array, value, iteratee2, retHighest) {
var low = 0, high = array == null ? 0 : array.length;
if (high === 0) {
return 0;
}
value = iteratee2(value);
var valIsNaN = value !== value, valIsNull = value === null, valIsSymbol = isSymbol(value), valIsUndefined = value === undefined2;
while (low < high) {
var mid = nativeFloor((low + high) / 2), computed = iteratee2(array[mid]), othIsDefined = computed !== undefined2, othIsNull = computed === null, othIsReflexive = computed === computed, othIsSymbol = isSymbol(computed);
if (valIsNaN) {
var setLow = retHighest || othIsReflexive;
} else if (valIsUndefined) {
setLow = othIsReflexive && (retHighest || othIsDefined);
} else if (valIsNull) {
setLow = othIsReflexive && othIsDefined && (retHighest || !othIsNull);
} else if (valIsSymbol) {
setLow = othIsReflexive && othIsDefined && !othIsNull && (retHighest || !othIsSymbol);
} else if (othIsNull || othIsSymbol) {
setLow = false;
} else {
setLow = retHighest ? computed <= value : computed < value;
}
if (setLow) {
low = mid + 1;
} else {
high = mid;
}
}
return nativeMin(high, MAX_ARRAY_INDEX);
}
function baseSortedUniq(array, iteratee2) {
var index = -1, length = array.length, resIndex = 0, result2 = [];
while (++index < length) {
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
if (!index || !eq(computed, seen)) {
var seen = computed;
result2[resIndex++] = value === 0 ? 0 : value;
}
}
return result2;
}
function baseToNumber(value) {
if (typeof value == "number") {
return value;
}
if (isSymbol(value)) {
return NAN;
}
return +value;
}
function baseToString(value) {
if (typeof value == "string") {
return value;
}
if (isArray(value)) {
return arrayMap(value, baseToString) + "";
}
if (isSymbol(value)) {
return symbolToString ? symbolToString.call(value) : "";
}
var result2 = value + "";
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
}
function baseUniq(array, iteratee2, comparator) {
var index = -1, includes2 = arrayIncludes, length = array.length, isCommon = true, result2 = [], seen = result2;
if (comparator) {
isCommon = false;
includes2 = arrayIncludesWith;
} else if (length >= LARGE_ARRAY_SIZE) {
var set3 = iteratee2 ? null : createSet(array);
if (set3) {
return setToArray(set3);
}
isCommon = false;
includes2 = cacheHas;
seen = new SetCache();
} else {
seen = iteratee2 ? [] : result2;
}
outer:
while (++index < length) {
var value = array[index], computed = iteratee2 ? iteratee2(value) : value;
value = comparator || value !== 0 ? value : 0;
if (isCommon && computed === computed) {
var seenIndex = seen.length;
while (seenIndex--) {
if (seen[seenIndex] === computed) {
continue outer;
}
}
if (iteratee2) {
seen.push(computed);
}
result2.push(value);
} else if (!includes2(seen, computed, comparator)) {
if (seen !== result2) {
seen.push(computed);
}
result2.push(value);
}
}
return result2;
}
function baseUnset(object, path2) {
path2 = castPath(path2, object);
object = parent(object, path2);
return object == null || delete object[toKey(last(path2))];
}
function baseUpdate(object, path2, updater, customizer) {
return baseSet(object, path2, updater(baseGet(object, path2)), customizer);
}
function baseWhile(array, predicate, isDrop, fromRight) {
var length = array.length, index = fromRight ? length : -1;
while ((fromRight ? index-- : ++index < length) && predicate(array[index], index, array)) {
}
return isDrop ? baseSlice(array, fromRight ? 0 : index, fromRight ? index + 1 : length) : baseSlice(array, fromRight ? index + 1 : 0, fromRight ? length : index);
}
function baseWrapperValue(value, actions) {
var result2 = value;
if (result2 instanceof LazyWrapper) {
result2 = result2.value();
}
return arrayReduce(actions, function(result3, action) {
return action.func.apply(action.thisArg, arrayPush([result3], action.args));
}, result2);
}
function baseXor(arrays, iteratee2, comparator) {
var length = arrays.length;
if (length < 2) {
return length ? baseUniq(arrays[0]) : [];
}
var index = -1, result2 = Array2(length);
while (++index < length) {
var array = arrays[index], othIndex = -1;
while (++othIndex < length) {
if (othIndex != index) {
result2[index] = baseDifference(result2[index] || array, arrays[othIndex], iteratee2, comparator);
}
}
}
return baseUniq(baseFlatten(result2, 1), iteratee2, comparator);
}
function baseZipObject(props, values2, assignFunc) {
var index = -1, length = props.length, valsLength = values2.length, result2 = {};
while (++index < length) {
var value = index < valsLength ? values2[index] : undefined2;
assignFunc(result2, props[index], value);
}
return result2;
}
function castArrayLikeObject(value) {
return isArrayLikeObject(value) ? value : [];
}
function castFunction(value) {
return typeof value == "function" ? value : identity2;
}
function castPath(value, object) {
if (isArray(value)) {
return value;
}
return isKey(value, object) ? [value] : stringToPath(toString(value));
}
var castRest = baseRest;
function castSlice(array, start, end) {
var length = array.length;
end = end === undefined2 ? length : end;
return !start && end >= length ? array : baseSlice(array, start, end);
}
var clearTimeout2 = ctxClearTimeout || function(id) {
return root.clearTimeout(id);
};
function cloneBuffer(buffer, isDeep) {
if (isDeep) {
return buffer.slice();
}
var length = buffer.length, result2 = allocUnsafe ? allocUnsafe(length) : new buffer.constructor(length);
buffer.copy(result2);
return result2;
}
function cloneArrayBuffer(arrayBuffer) {
var result2 = new arrayBuffer.constructor(arrayBuffer.byteLength);
new Uint8Array2(result2).set(new Uint8Array2(arrayBuffer));
return result2;
}
function cloneDataView(dataView, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
}
function cloneRegExp(regexp) {
var result2 = new regexp.constructor(regexp.source, reFlags.exec(regexp));
result2.lastIndex = regexp.lastIndex;
return result2;
}
function cloneSymbol(symbol) {
return symbolValueOf ? Object2(symbolValueOf.call(symbol)) : {};
}
function cloneTypedArray(typedArray, isDeep) {
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}
function compareAscending(value, other) {
if (value !== other) {
var valIsDefined = value !== undefined2, valIsNull = value === null, valIsReflexive = value === value, valIsSymbol = isSymbol(value);
var othIsDefined = other !== undefined2, othIsNull = other === null, othIsReflexive = other === other, othIsSymbol = isSymbol(other);
if (!othIsNull && !othIsSymbol && !valIsSymbol && value > other || valIsSymbol && othIsDefined && othIsReflexive && !othIsNull && !othIsSymbol || valIsNull && othIsDefined && othIsReflexive || !valIsDefined && othIsReflexive || !valIsReflexive) {
return 1;
}
if (!valIsNull && !valIsSymbol && !othIsSymbol && value < other || othIsSymbol && valIsDefined && valIsReflexive && !valIsNull && !valIsSymbol || othIsNull && valIsDefined && valIsReflexive || !othIsDefined && valIsReflexive || !othIsReflexive) {
return -1;
}
}
return 0;
}
function compareMultiple(object, other, orders) {
var index = -1, objCriteria = object.criteria, othCriteria = other.criteria, length = objCriteria.length, ordersLength = orders.length;
while (++index < length) {
var result2 = compareAscending(objCriteria[index], othCriteria[index]);
if (result2) {
if (index >= ordersLength) {
return result2;
}
var order = orders[index];
return result2 * (order == "desc" ? -1 : 1);
}
}
return object.index - other.index;
}
function composeArgs(args, partials, holders, isCurried) {
var argsIndex = -1, argsLength = args.length, holdersLength = holders.length, leftIndex = -1, leftLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(leftLength + rangeLength), isUncurried = !isCurried;
while (++leftIndex < leftLength) {
result2[leftIndex] = partials[leftIndex];
}
while (++argsIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result2[holders[argsIndex]] = args[argsIndex];
}
}
while (rangeLength--) {
result2[leftIndex++] = args[argsIndex++];
}
return result2;
}
function composeArgsRight(args, partials, holders, isCurried) {
var argsIndex = -1, argsLength = args.length, holdersIndex = -1, holdersLength = holders.length, rightIndex = -1, rightLength = partials.length, rangeLength = nativeMax(argsLength - holdersLength, 0), result2 = Array2(rangeLength + rightLength), isUncurried = !isCurried;
while (++argsIndex < rangeLength) {
result2[argsIndex] = args[argsIndex];
}
var offset2 = argsIndex;
while (++rightIndex < rightLength) {
result2[offset2 + rightIndex] = partials[rightIndex];
}
while (++holdersIndex < holdersLength) {
if (isUncurried || argsIndex < argsLength) {
result2[offset2 + holders[holdersIndex]] = args[argsIndex++];
}
}
return result2;
}
function copyArray(source, array) {
var index = -1, length = source.length;
array || (array = Array2(length));
while (++index < length) {
array[index] = source[index];
}
return array;
}
function copyObject(source, props, object, customizer) {
var isNew = !object;
object || (object = {});
var index = -1, length = props.length;
while (++index < length) {
var key2 = props[index];
var newValue = customizer ? customizer(object[key2], source[key2], key2, object, source) : undefined2;
if (newValue === undefined2) {
newValue = source[key2];
}
if (isNew) {
baseAssignValue(object, key2, newValue);
} else {
assignValue(object, key2, newValue);
}
}
return object;
}
function copySymbols(source, object) {
return copyObject(source, getSymbols(source), object);
}
function copySymbolsIn(source, object) {
return copyObject(source, getSymbolsIn(source), object);
}
function createAggregator(setter, initializer) {
return function(collection, iteratee2) {
var func = isArray(collection) ? arrayAggregator : baseAggregator, accumulator = initializer ? initializer() : {};
return func(collection, setter, getIteratee(iteratee2, 2), accumulator);
};
}
function createAssigner(assigner) {
return baseRest(function(object, sources) {
var index = -1, length = sources.length, customizer = length > 1 ? sources[length - 1] : undefined2, guard = length > 2 ? sources[2] : undefined2;
customizer = assigner.length > 3 && typeof customizer == "function" ? (length--, customizer) : undefined2;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
customizer = length < 3 ? undefined2 : customizer;
length = 1;
}
object = Object2(object);
while (++index < length) {
var source = sources[index];
if (source) {
assigner(object, source, index, customizer);
}
}
return object;
});
}
function createBaseEach(eachFunc, fromRight) {
return function(collection, iteratee2) {
if (collection == null) {
return collection;
}
if (!isArrayLike(collection)) {
return eachFunc(collection, iteratee2);
}
var length = collection.length, index = fromRight ? length : -1, iterable = Object2(collection);
while (fromRight ? index-- : ++index < length) {
if (iteratee2(iterable[index], index, iterable) === false) {
break;
}
}
return collection;
};
}
function createBaseFor(fromRight) {
return function(object, iteratee2, keysFunc) {
var index = -1, iterable = Object2(object), props = keysFunc(object), length = props.length;
while (length--) {
var key2 = props[fromRight ? length : ++index];
if (iteratee2(iterable[key2], key2, iterable) === false) {
break;
}
}
return object;
};
}
function createBind(func, bitmask, thisArg) {
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
function wrapper() {
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
return fn.apply(isBind ? thisArg : this, arguments);
}
return wrapper;
}
function createCaseFirst(methodName) {
return function(string) {
string = toString(string);
var strSymbols = hasUnicode(string) ? stringToArray(string) : undefined2;
var chr = strSymbols ? strSymbols[0] : string.charAt(0);
var trailing = strSymbols ? castSlice(strSymbols, 1).join("") : string.slice(1);
return chr[methodName]() + trailing;
};
}
function createCompounder(callback) {
return function(string) {
return arrayReduce(words(deburr(string).replace(reApos, "")), callback, "");
};
}
function createCtor(Ctor) {
return function() {
var args = arguments;
switch (args.length) {
case 0:
return new Ctor();
case 1:
return new Ctor(args[0]);
case 2:
return new Ctor(args[0], args[1]);
case 3:
return new Ctor(args[0], args[1], args[2]);
case 4:
return new Ctor(args[0], args[1], args[2], args[3]);
case 5:
return new Ctor(args[0], args[1], args[2], args[3], args[4]);
case 6:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5]);
case 7:
return new Ctor(args[0], args[1], args[2], args[3], args[4], args[5], args[6]);
}
var thisBinding = baseCreate(Ctor.prototype), result2 = Ctor.apply(thisBinding, args);
return isObject(result2) ? result2 : thisBinding;
};
}
function createCurry(func, bitmask, arity) {
var Ctor = createCtor(func);
function wrapper() {
var length = arguments.length, args = Array2(length), index = length, placeholder = getHolder(wrapper);
while (index--) {
args[index] = arguments[index];
}
var holders = length < 3 && args[0] !== placeholder && args[length - 1] !== placeholder ? [] : replaceHolders(args, placeholder);
length -= holders.length;
if (length < arity) {
return createRecurry(
func,
bitmask,
createHybrid,
wrapper.placeholder,
undefined2,
args,
holders,
undefined2,
undefined2,
arity - length
);
}
var fn = this && this !== root && this instanceof wrapper ? Ctor : func;
return apply(fn, this, args);
}
return wrapper;
}
function createFind(findIndexFunc) {
return function(collection, predicate, fromIndex) {
var iterable = Object2(collection);
if (!isArrayLike(collection)) {
var iteratee2 = getIteratee(predicate, 3);
collection = keys(collection);
predicate = function(key2) {
return iteratee2(iterable[key2], key2, iterable);
};
}
var index = findIndexFunc(collection, predicate, fromIndex);
return index > -1 ? iterable[iteratee2 ? collection[index] : index] : undefined2;
};
}
function createFlow(fromRight) {
return flatRest(function(funcs) {
var length = funcs.length, index = length, prereq = LodashWrapper.prototype.thru;
if (fromRight) {
funcs.reverse();
}
while (index--) {
var func = funcs[index];
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
if (prereq && !wrapper && getFuncName(func) == "wrapper") {
var wrapper = new LodashWrapper([], true);
}
}
index = wrapper ? index : length;
while (++index < length) {
func = funcs[index];
var funcName = getFuncName(func), data = funcName == "wrapper" ? getData(func) : undefined2;
if (data && isLaziable(data[0]) && data[1] == (WRAP_ARY_FLAG | WRAP_CURRY_FLAG | WRAP_PARTIAL_FLAG | WRAP_REARG_FLAG) && !data[4].length && data[9] == 1) {
wrapper = wrapper[getFuncName(data[0])].apply(wrapper, data[3]);
} else {
wrapper = func.length == 1 && isLaziable(func) ? wrapper[funcName]() : wrapper.thru(func);
}
}
return function() {
var args = arguments, value = args[0];
if (wrapper && args.length == 1 && isArray(value)) {
return wrapper.plant(value).value();
}
var index2 = 0, result2 = length ? funcs[index2].apply(this, args) : value;
while (++index2 < length) {
result2 = funcs[index2].call(this, result2);
}
return result2;
};
});
}
function createHybrid(func, bitmask, thisArg, partials, holders, partialsRight, holdersRight, argPos, ary2, arity) {
var isAry = bitmask & WRAP_ARY_FLAG, isBind = bitmask & WRAP_BIND_FLAG, isBindKey = bitmask & WRAP_BIND_KEY_FLAG, isCurried = bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG), isFlip = bitmask & WRAP_FLIP_FLAG, Ctor = isBindKey ? undefined2 : createCtor(func);
function wrapper() {
var length = arguments.length, args = Array2(length), index = length;
while (index--) {
args[index] = arguments[index];
}
if (isCurried) {
var placeholder = getHolder(wrapper), holdersCount = countHolders(args, placeholder);
}
if (partials) {
args = composeArgs(args, partials, holders, isCurried);
}
if (partialsRight) {
args = composeArgsRight(args, partialsRight, holdersRight, isCurried);
}
length -= holdersCount;
if (isCurried && length < arity) {
var newHolders = replaceHolders(args, placeholder);
return createRecurry(
func,
bitmask,
createHybrid,
wrapper.placeholder,
thisArg,
args,
newHolders,
argPos,
ary2,
arity - length
);
}
var thisBinding = isBind ? thisArg : this, fn = isBindKey ? thisBinding[func] : func;
length = args.length;
if (argPos) {
args = reorder(args, argPos);
} else if (isFlip && length > 1) {
args.reverse();
}
if (isAry && ary2 < length) {
args.length = ary2;
}
if (this && this !== root && this instanceof wrapper) {
fn = Ctor || createCtor(fn);
}
return fn.apply(thisBinding, args);
}
return wrapper;
}
function createInverter(setter, toIteratee) {
return function(object, iteratee2) {
return baseInverter(object, setter, toIteratee(iteratee2), {});
};
}
function createMathOperation(operator, defaultValue2) {
return function(value, other) {
var result2;
if (value === undefined2 && other === undefined2) {
return defaultValue2;
}
if (value !== undefined2) {
result2 = value;
}
if (other !== undefined2) {
if (result2 === undefined2) {
return other;
}
if (typeof value == "string" || typeof other == "string") {
value = baseToString(value);
other = baseToString(other);
} else {
value = baseToNumber(value);
other = baseToNumber(other);
}
result2 = operator(value, other);
}
return result2;
};
}
function createOver(arrayFunc) {
return flatRest(function(iteratees) {
iteratees = arrayMap(iteratees, baseUnary(getIteratee()));
return baseRest(function(args) {
var thisArg = this;
return arrayFunc(iteratees, function(iteratee2) {
return apply(iteratee2, thisArg, args);
});
});
});
}
function createPadding(length, chars) {
chars = chars === undefined2 ? " " : baseToString(chars);
var charsLength = chars.length;
if (charsLength < 2) {
return charsLength ? baseRepeat(chars, length) : chars;
}
var result2 = baseRepeat(chars, nativeCeil(length / stringSize(chars)));
return hasUnicode(chars) ? castSlice(stringToArray(result2), 0, length).join("") : result2.slice(0, length);
}
function createPartial(func, bitmask, thisArg, partials) {
var isBind = bitmask & WRAP_BIND_FLAG, Ctor = createCtor(func);
function wrapper() {
var argsIndex = -1, argsLength = arguments.length, leftIndex = -1, leftLength = partials.length, args = Array2(leftLength + argsLength), fn = this && this !== root && this instanceof wrapper ? Ctor : func;
while (++leftIndex < leftLength) {
args[leftIndex] = partials[leftIndex];
}
while (argsLength--) {
args[leftIndex++] = arguments[++argsIndex];
}
return apply(fn, isBind ? thisArg : this, args);
}
return wrapper;
}
function createRange(fromRight) {
return function(start, end, step) {
if (step && typeof step != "number" && isIterateeCall(start, end, step)) {
end = step = undefined2;
}
start = toFinite(start);
if (end === undefined2) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
step = step === undefined2 ? start < end ? 1 : -1 : toFinite(step);
return baseRange(start, end, step, fromRight);
};
}
function createRelationalOperation(operator) {
return function(value, other) {
if (!(typeof value == "string" && typeof other == "string")) {
value = toNumber(value);
other = toNumber(other);
}
return operator(value, other);
};
}
function createRecurry(func, bitmask, wrapFunc, placeholder, thisArg, partials, holders, argPos, ary2, arity) {
var isCurry = bitmask & WRAP_CURRY_FLAG, newHolders = isCurry ? holders : undefined2, newHoldersRight = isCurry ? undefined2 : holders, newPartials = isCurry ? partials : undefined2, newPartialsRight = isCurry ? undefined2 : partials;
bitmask |= isCurry ? WRAP_PARTIAL_FLAG : WRAP_PARTIAL_RIGHT_FLAG;
bitmask &= ~(isCurry ? WRAP_PARTIAL_RIGHT_FLAG : WRAP_PARTIAL_FLAG);
if (!(bitmask & WRAP_CURRY_BOUND_FLAG)) {
bitmask &= ~(WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG);
}
var newData = [
func,
bitmask,
thisArg,
newPartials,
newHolders,
newPartialsRight,
newHoldersRight,
argPos,
ary2,
arity
];
var result2 = wrapFunc.apply(undefined2, newData);
if (isLaziable(func)) {
setData(result2, newData);
}
result2.placeholder = placeholder;
return setWrapToString(result2, func, bitmask);
}
function createRound(methodName) {
var func = Math2[methodName];
return function(number, precision) {
number = toNumber(number);
precision = precision == null ? 0 : nativeMin(toInteger(precision), 292);
if (precision && nativeIsFinite(number)) {
var pair = (toString(number) + "e").split("e"), value = func(pair[0] + "e" + (+pair[1] + precision));
pair = (toString(value) + "e").split("e");
return +(pair[0] + "e" + (+pair[1] - precision));
}
return func(number);
};
}
var createSet = !(Set2 && 1 / setToArray(new Set2([, -0]))[1] == INFINITY) ? noop2 : function(values2) {
return new Set2(values2);
};
function createToPairs(keysFunc) {
return function(object) {
var tag = getTag(object);
if (tag == mapTag) {
return mapToArray(object);
}
if (tag == setTag) {
return setToPairs(object);
}
return baseToPairs(object, keysFunc(object));
};
}
function createWrap(func, bitmask, thisArg, partials, holders, argPos, ary2, arity) {
var isBindKey = bitmask & WRAP_BIND_KEY_FLAG;
if (!isBindKey && typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
var length = partials ? partials.length : 0;
if (!length) {
bitmask &= ~(WRAP_PARTIAL_FLAG | WRAP_PARTIAL_RIGHT_FLAG);
partials = holders = undefined2;
}
ary2 = ary2 === undefined2 ? ary2 : nativeMax(toInteger(ary2), 0);
arity = arity === undefined2 ? arity : toInteger(arity);
length -= holders ? holders.length : 0;
if (bitmask & WRAP_PARTIAL_RIGHT_FLAG) {
var partialsRight = partials, holdersRight = holders;
partials = holders = undefined2;
}
var data = isBindKey ? undefined2 : getData(func);
var newData = [
func,
bitmask,
thisArg,
partials,
holders,
partialsRight,
holdersRight,
argPos,
ary2,
arity
];
if (data) {
mergeData(newData, data);
}
func = newData[0];
bitmask = newData[1];
thisArg = newData[2];
partials = newData[3];
holders = newData[4];
arity = newData[9] = newData[9] === undefined2 ? isBindKey ? 0 : func.length : nativeMax(newData[9] - length, 0);
if (!arity && bitmask & (WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG)) {
bitmask &= ~(WRAP_CURRY_FLAG | WRAP_CURRY_RIGHT_FLAG);
}
if (!bitmask || bitmask == WRAP_BIND_FLAG) {
var result2 = createBind(func, bitmask, thisArg);
} else if (bitmask == WRAP_CURRY_FLAG || bitmask == WRAP_CURRY_RIGHT_FLAG) {
result2 = createCurry(func, bitmask, arity);
} else if ((bitmask == WRAP_PARTIAL_FLAG || bitmask == (WRAP_BIND_FLAG | WRAP_PARTIAL_FLAG)) && !holders.length) {
result2 = createPartial(func, bitmask, thisArg, partials);
} else {
result2 = createHybrid.apply(undefined2, newData);
}
var setter = data ? baseSetData : setData;
return setWrapToString(setter(result2, newData), func, bitmask);
}
function customDefaultsAssignIn(objValue, srcValue, key2, object) {
if (objValue === undefined2 || eq(objValue, objectProto[key2]) && !hasOwnProperty2.call(object, key2)) {
return srcValue;
}
return objValue;
}
function customDefaultsMerge(objValue, srcValue, key2, object, source, stack) {
if (isObject(objValue) && isObject(srcValue)) {
stack.set(srcValue, objValue);
baseMerge(objValue, srcValue, undefined2, customDefaultsMerge, stack);
stack["delete"](srcValue);
}
return objValue;
}
function customOmitClone(value) {
return isPlainObject2(value) ? undefined2 : value;
}
function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, arrLength = array.length, othLength = other.length;
if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
return false;
}
var arrStacked = stack.get(array);
var othStacked = stack.get(other);
if (arrStacked && othStacked) {
return arrStacked == other && othStacked == array;
}
var index = -1, result2 = true, seen = bitmask & COMPARE_UNORDERED_FLAG ? new SetCache() : undefined2;
stack.set(array, other);
stack.set(other, array);
while (++index < arrLength) {
var arrValue = array[index], othValue = other[index];
if (customizer) {
var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
}
if (compared !== undefined2) {
if (compared) {
continue;
}
result2 = false;
break;
}
if (seen) {
if (!arraySome(other, function(othValue2, othIndex) {
if (!cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
return seen.push(othIndex);
}
})) {
result2 = false;
break;
}
} else if (!(arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
result2 = false;
break;
}
}
stack["delete"](array);
stack["delete"](other);
return result2;
}
function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
switch (tag) {
case dataViewTag:
if (object.byteLength != other.byteLength || object.byteOffset != other.byteOffset) {
return false;
}
object = object.buffer;
other = other.buffer;
case arrayBufferTag:
if (object.byteLength != other.byteLength || !equalFunc(new Uint8Array2(object), new Uint8Array2(other))) {
return false;
}
return true;
case boolTag:
case dateTag:
case numberTag:
return eq(+object, +other);
case errorTag:
return object.name == other.name && object.message == other.message;
case regexpTag:
case stringTag:
return object == other + "";
case mapTag:
var convert = mapToArray;
case setTag:
var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
convert || (convert = setToArray);
if (object.size != other.size && !isPartial) {
return false;
}
var stacked = stack.get(object);
if (stacked) {
return stacked == other;
}
bitmask |= COMPARE_UNORDERED_FLAG;
stack.set(object, other);
var result2 = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
stack["delete"](object);
return result2;
case symbolTag:
if (symbolValueOf) {
return symbolValueOf.call(object) == symbolValueOf.call(other);
}
}
return false;
}
function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
var isPartial = bitmask & COMPARE_PARTIAL_FLAG, objProps = getAllKeys(object), objLength = objProps.length, othProps = getAllKeys(other), othLength = othProps.length;
if (objLength != othLength && !isPartial) {
return false;
}
var index = objLength;
while (index--) {
var key2 = objProps[index];
if (!(isPartial ? key2 in other : hasOwnProperty2.call(other, key2))) {
return false;
}
}
var objStacked = stack.get(object);
var othStacked = stack.get(other);
if (objStacked && othStacked) {
return objStacked == other && othStacked == object;
}
var result2 = true;
stack.set(object, other);
stack.set(other, object);
var skipCtor = isPartial;
while (++index < objLength) {
key2 = objProps[index];
var objValue = object[key2], othValue = other[key2];
if (customizer) {
var compared = isPartial ? customizer(othValue, objValue, key2, other, object, stack) : customizer(objValue, othValue, key2, object, other, stack);
}
if (!(compared === undefined2 ? objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack) : compared)) {
result2 = false;
break;
}
skipCtor || (skipCtor = key2 == "constructor");
}
if (result2 && !skipCtor) {
var objCtor = object.constructor, othCtor = other.constructor;
if (objCtor != othCtor && ("constructor" in object && "constructor" in other) && !(typeof objCtor == "function" && objCtor instanceof objCtor && typeof othCtor == "function" && othCtor instanceof othCtor)) {
result2 = false;
}
}
stack["delete"](object);
stack["delete"](other);
return result2;
}
function flatRest(func) {
return setToString(overRest(func, undefined2, flatten), func + "");
}
function getAllKeys(object) {
return baseGetAllKeys(object, keys, getSymbols);
}
function getAllKeysIn(object) {
return baseGetAllKeys(object, keysIn, getSymbolsIn);
}
var getData = !metaMap ? noop2 : function(func) {
return metaMap.get(func);
};
function getFuncName(func) {
var result2 = func.name + "", array = realNames[result2], length = hasOwnProperty2.call(realNames, result2) ? array.length : 0;
while (length--) {
var data = array[length], otherFunc = data.func;
if (otherFunc == null || otherFunc == func) {
return data.name;
}
}
return result2;
}
function getHolder(func) {
var object = hasOwnProperty2.call(lodash, "placeholder") ? lodash : func;
return object.placeholder;
}
function getIteratee() {
var result2 = lodash.iteratee || iteratee;
result2 = result2 === iteratee ? baseIteratee : result2;
return arguments.length ? result2(arguments[0], arguments[1]) : result2;
}
function getMapData(map2, key2) {
var data = map2.__data__;
return isKeyable(key2) ? data[typeof key2 == "string" ? "string" : "hash"] : data.map;
}
function getMatchData(object) {
var result2 = keys(object), length = result2.length;
while (length--) {
var key2 = result2[length], value = object[key2];
result2[length] = [key2, value, isStrictComparable(value)];
}
return result2;
}
function getNative(object, key2) {
var value = getValue(object, key2);
return baseIsNative(value) ? value : undefined2;
}
function getRawTag(value) {
var isOwn = hasOwnProperty2.call(value, symToStringTag), tag = value[symToStringTag];
try {
value[symToStringTag] = undefined2;
var unmasked = true;
} catch (e) {
}
var result2 = nativeObjectToString.call(value);
if (unmasked) {
if (isOwn) {
value[symToStringTag] = tag;
} else {
delete value[symToStringTag];
}
}
return result2;
}
var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
if (object == null) {
return [];
}
object = Object2(object);
return arrayFilter(nativeGetSymbols(object), function(symbol) {
return propertyIsEnumerable.call(object, symbol);
});
};
var getSymbolsIn = !nativeGetSymbols ? stubArray : function(object) {
var result2 = [];
while (object) {
arrayPush(result2, getSymbols(object));
object = getPrototype(object);
}
return result2;
};
var getTag = baseGetTag;
if (DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag || Map2 && getTag(new Map2()) != mapTag || Promise2 && getTag(Promise2.resolve()) != promiseTag || Set2 && getTag(new Set2()) != setTag || WeakMap2 && getTag(new WeakMap2()) != weakMapTag) {
getTag = function(value) {
var result2 = baseGetTag(value), Ctor = result2 == objectTag ? value.constructor : undefined2, ctorString = Ctor ? toSource(Ctor) : "";
if (ctorString) {
switch (ctorString) {
case dataViewCtorString:
return dataViewTag;
case mapCtorString:
return mapTag;
case promiseCtorString:
return promiseTag;
case setCtorString:
return setTag;
case weakMapCtorString:
return weakMapTag;
}
}
return result2;
};
}
function getView(start, end, transforms) {
var index = -1, length = transforms.length;
while (++index < length) {
var data = transforms[index], size2 = data.size;
switch (data.type) {
case "drop":
start += size2;
break;
case "dropRight":
end -= size2;
break;
case "take":
end = nativeMin(end, start + size2);
break;
case "takeRight":
start = nativeMax(start, end - size2);
break;
}
}
return { "start": start, "end": end };
}
function getWrapDetails(source) {
var match2 = source.match(reWrapDetails);
return match2 ? match2[1].split(reSplitDetails) : [];
}
function hasPath(object, path2, hasFunc) {
path2 = castPath(path2, object);
var index = -1, length = path2.length, result2 = false;
while (++index < length) {
var key2 = toKey(path2[index]);
if (!(result2 = object != null && hasFunc(object, key2))) {
break;
}
object = object[key2];
}
if (result2 || ++index != length) {
return result2;
}
length = object == null ? 0 : object.length;
return !!length && isLength(length) && isIndex(key2, length) && (isArray(object) || isArguments(object));
}
function initCloneArray(array) {
var length = array.length, result2 = new array.constructor(length);
if (length && typeof array[0] == "string" && hasOwnProperty2.call(array, "index")) {
result2.index = array.index;
result2.input = array.input;
}
return result2;
}
function initCloneObject(object) {
return typeof object.constructor == "function" && !isPrototype(object) ? baseCreate(getPrototype(object)) : {};
}
function initCloneByTag(object, tag, isDeep) {
var Ctor = object.constructor;
switch (tag) {
case arrayBufferTag:
return cloneArrayBuffer(object);
case boolTag:
case dateTag:
return new Ctor(+object);
case dataViewTag:
return cloneDataView(object, isDeep);
case float32Tag:
case float64Tag:
case int8Tag:
case int16Tag:
case int32Tag:
case uint8Tag:
case uint8ClampedTag:
case uint16Tag:
case uint32Tag:
return cloneTypedArray(object, isDeep);
case mapTag:
return new Ctor();
case numberTag:
case stringTag:
return new Ctor(object);
case regexpTag:
return cloneRegExp(object);
case setTag:
return new Ctor();
case symbolTag:
return cloneSymbol(object);
}
}
function insertWrapDetails(source, details) {
var length = details.length;
if (!length) {
return source;
}
var lastIndex = length - 1;
details[lastIndex] = (length > 1 ? "& " : "") + details[lastIndex];
details = details.join(length > 2 ? ", " : " ");
return source.replace(reWrapComment, "{\n/* [wrapped with " + details + "] */\n");
}
function isFlattenable(value) {
return isArray(value) || isArguments(value) || !!(spreadableSymbol && value && value[spreadableSymbol]);
}
function isIndex(value, length) {
var type = typeof value;
length = length == null ? MAX_SAFE_INTEGER : length;
return !!length && (type == "number" || type != "symbol" && reIsUint.test(value)) && (value > -1 && value % 1 == 0 && value < length);
}
function isIterateeCall(value, index, object) {
if (!isObject(object)) {
return false;
}
var type = typeof index;
if (type == "number" ? isArrayLike(object) && isIndex(index, object.length) : type == "string" && index in object) {
return eq(object[index], value);
}
return false;
}
function isKey(value, object) {
if (isArray(value)) {
return false;
}
var type = typeof value;
if (type == "number" || type == "symbol" || type == "boolean" || value == null || isSymbol(value)) {
return true;
}
return reIsPlainProp.test(value) || !reIsDeepProp.test(value) || object != null && value in Object2(object);
}
function isKeyable(value) {
var type = typeof value;
return type == "string" || type == "number" || type == "symbol" || type == "boolean" ? value !== "__proto__" : value === null;
}
function isLaziable(func) {
var funcName = getFuncName(func), other = lodash[funcName];
if (typeof other != "function" || !(funcName in LazyWrapper.prototype)) {
return false;
}
if (func === other) {
return true;
}
var data = getData(other);
return !!data && func === data[0];
}
function isMasked(func) {
return !!maskSrcKey && maskSrcKey in func;
}
var isMaskable = coreJsData ? isFunction : stubFalse;
function isPrototype(value) {
var Ctor = value && value.constructor, proto = typeof Ctor == "function" && Ctor.prototype || objectProto;
return value === proto;
}
function isStrictComparable(value) {
return value === value && !isObject(value);
}
function matchesStrictComparable(key2, srcValue) {
return function(object) {
if (object == null) {
return false;
}
return object[key2] === srcValue && (srcValue !== undefined2 || key2 in Object2(object));
};
}
function memoizeCapped(func) {
var result2 = memoize(func, function(key2) {
if (cache.size === MAX_MEMOIZE_SIZE) {
cache.clear();
}
return key2;
});
var cache = result2.cache;
return result2;
}
function mergeData(data, source) {
var bitmask = data[1], srcBitmask = source[1], newBitmask = bitmask | srcBitmask, isCommon = newBitmask < (WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG | WRAP_ARY_FLAG);
var isCombo = srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_CURRY_FLAG || srcBitmask == WRAP_ARY_FLAG && bitmask == WRAP_REARG_FLAG && data[7].length <= source[8] || srcBitmask == (WRAP_ARY_FLAG | WRAP_REARG_FLAG) && source[7].length <= source[8] && bitmask == WRAP_CURRY_FLAG;
if (!(isCommon || isCombo)) {
return data;
}
if (srcBitmask & WRAP_BIND_FLAG) {
data[2] = source[2];
newBitmask |= bitmask & WRAP_BIND_FLAG ? 0 : WRAP_CURRY_BOUND_FLAG;
}
var value = source[3];
if (value) {
var partials = data[3];
data[3] = partials ? composeArgs(partials, value, source[4]) : value;
data[4] = partials ? replaceHolders(data[3], PLACEHOLDER) : source[4];
}
value = source[5];
if (value) {
partials = data[5];
data[5] = partials ? composeArgsRight(partials, value, source[6]) : value;
data[6] = partials ? replaceHolders(data[5], PLACEHOLDER) : source[6];
}
value = source[7];
if (value) {
data[7] = value;
}
if (srcBitmask & WRAP_ARY_FLAG) {
data[8] = data[8] == null ? source[8] : nativeMin(data[8], source[8]);
}
if (data[9] == null) {
data[9] = source[9];
}
data[0] = source[0];
data[1] = newBitmask;
return data;
}
function nativeKeysIn(object) {
var result2 = [];
if (object != null) {
for (var key2 in Object2(object)) {
result2.push(key2);
}
}
return result2;
}
function objectToString(value) {
return nativeObjectToString.call(value);
}
function overRest(func, start, transform2) {
start = nativeMax(start === undefined2 ? func.length - 1 : start, 0);
return function() {
var args = arguments, index = -1, length = nativeMax(args.length - start, 0), array = Array2(length);
while (++index < length) {
array[index] = args[start + index];
}
index = -1;
var otherArgs = Array2(start + 1);
while (++index < start) {
otherArgs[index] = args[index];
}
otherArgs[start] = transform2(array);
return apply(func, this, otherArgs);
};
}
function parent(object, path2) {
return path2.length < 2 ? object : baseGet(object, baseSlice(path2, 0, -1));
}
function reorder(array, indexes) {
var arrLength = array.length, length = nativeMin(indexes.length, arrLength), oldArray = copyArray(array);
while (length--) {
var index = indexes[length];
array[length] = isIndex(index, arrLength) ? oldArray[index] : undefined2;
}
return array;
}
function safeGet(object, key2) {
if (key2 === "constructor" && typeof object[key2] === "function") {
return;
}
if (key2 == "__proto__") {
return;
}
return object[key2];
}
var setData = shortOut(baseSetData);
var setTimeout2 = ctxSetTimeout || function(func, wait) {
return root.setTimeout(func, wait);
};
var setToString = shortOut(baseSetToString);
function setWrapToString(wrapper, reference, bitmask) {
var source = reference + "";
return setToString(wrapper, insertWrapDetails(source, updateWrapDetails(getWrapDetails(source), bitmask)));
}
function shortOut(func) {
var count = 0, lastCalled = 0;
return function() {
var stamp = nativeNow(), remaining = HOT_SPAN - (stamp - lastCalled);
lastCalled = stamp;
if (remaining > 0) {
if (++count >= HOT_COUNT) {
return arguments[0];
}
} else {
count = 0;
}
return func.apply(undefined2, arguments);
};
}
function shuffleSelf(array, size2) {
var index = -1, length = array.length, lastIndex = length - 1;
size2 = size2 === undefined2 ? length : size2;
while (++index < size2) {
var rand = baseRandom(index, lastIndex), value = array[rand];
array[rand] = array[index];
array[index] = value;
}
array.length = size2;
return array;
}
var stringToPath = memoizeCapped(function(string) {
var result2 = [];
if (string.charCodeAt(0) === 46) {
result2.push("");
}
string.replace(rePropName, function(match2, number, quote, subString) {
result2.push(quote ? subString.replace(reEscapeChar, "$1") : number || match2);
});
return result2;
});
function toKey(value) {
if (typeof value == "string" || isSymbol(value)) {
return value;
}
var result2 = value + "";
return result2 == "0" && 1 / value == -INFINITY ? "-0" : result2;
}
function toSource(func) {
if (func != null) {
try {
return funcToString.call(func);
} catch (e) {
}
try {
return func + "";
} catch (e) {
}
}
return "";
}
function updateWrapDetails(details, bitmask) {
arrayEach(wrapFlags, function(pair) {
var value = "_." + pair[0];
if (bitmask & pair[1] && !arrayIncludes(details, value)) {
details.push(value);
}
});
return details.sort();
}
function wrapperClone(wrapper) {
if (wrapper instanceof LazyWrapper) {
return wrapper.clone();
}
var result2 = new LodashWrapper(wrapper.__wrapped__, wrapper.__chain__);
result2.__actions__ = copyArray(wrapper.__actions__);
result2.__index__ = wrapper.__index__;
result2.__values__ = wrapper.__values__;
return result2;
}
function chunk(array, size2, guard) {
if (guard ? isIterateeCall(array, size2, guard) : size2 === undefined2) {
size2 = 1;
} else {
size2 = nativeMax(toInteger(size2), 0);
}
var length = array == null ? 0 : array.length;
if (!length || size2 < 1) {
return [];
}
var index = 0, resIndex = 0, result2 = Array2(nativeCeil(length / size2));
while (index < length) {
result2[resIndex++] = baseSlice(array, index, index += size2);
}
return result2;
}
function compact(array) {
var index = -1, length = array == null ? 0 : array.length, resIndex = 0, result2 = [];
while (++index < length) {
var value = array[index];
if (value) {
result2[resIndex++] = value;
}
}
return result2;
}
function concat() {
var length = arguments.length;
if (!length) {
return [];
}
var args = Array2(length - 1), array = arguments[0], index = length;
while (index--) {
args[index - 1] = arguments[index];
}
return arrayPush(isArray(array) ? copyArray(array) : [array], baseFlatten(args, 1));
}
var difference = baseRest(function(array, values2) {
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true)) : [];
});
var differenceBy = baseRest(function(array, values2) {
var iteratee2 = last(values2);
if (isArrayLikeObject(iteratee2)) {
iteratee2 = undefined2;
}
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2)) : [];
});
var differenceWith = baseRest(function(array, values2) {
var comparator = last(values2);
if (isArrayLikeObject(comparator)) {
comparator = undefined2;
}
return isArrayLikeObject(array) ? baseDifference(array, baseFlatten(values2, 1, isArrayLikeObject, true), undefined2, comparator) : [];
});
function drop(array, n2, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n2 = guard || n2 === undefined2 ? 1 : toInteger(n2);
return baseSlice(array, n2 < 0 ? 0 : n2, length);
}
function dropRight(array, n2, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n2 = guard || n2 === undefined2 ? 1 : toInteger(n2);
n2 = length - n2;
return baseSlice(array, 0, n2 < 0 ? 0 : n2);
}
function dropRightWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true, true) : [];
}
function dropWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), true) : [];
}
function fill(array, value, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (start && typeof start != "number" && isIterateeCall(array, value, start)) {
start = 0;
end = length;
}
return baseFill(array, value, start, end);
}
function findIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseFindIndex(array, getIteratee(predicate, 3), index);
}
function findLastIndex(array, predicate, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length - 1;
if (fromIndex !== undefined2) {
index = toInteger(fromIndex);
index = fromIndex < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return baseFindIndex(array, getIteratee(predicate, 3), index, true);
}
function flatten(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, 1) : [];
}
function flattenDeep(array) {
var length = array == null ? 0 : array.length;
return length ? baseFlatten(array, INFINITY) : [];
}
function flattenDepth(array, depth) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
depth = depth === undefined2 ? 1 : toInteger(depth);
return baseFlatten(array, depth);
}
function fromPairs(pairs) {
var index = -1, length = pairs == null ? 0 : pairs.length, result2 = {};
while (++index < length) {
var pair = pairs[index];
result2[pair[0]] = pair[1];
}
return result2;
}
function head(array) {
return array && array.length ? array[0] : undefined2;
}
function indexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = fromIndex == null ? 0 : toInteger(fromIndex);
if (index < 0) {
index = nativeMax(length + index, 0);
}
return baseIndexOf(array, value, index);
}
function initial(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 0, -1) : [];
}
var intersection = baseRest(function(arrays) {
var mapped = arrayMap(arrays, castArrayLikeObject);
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped) : [];
});
var intersectionBy = baseRest(function(arrays) {
var iteratee2 = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
if (iteratee2 === last(mapped)) {
iteratee2 = undefined2;
} else {
mapped.pop();
}
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, getIteratee(iteratee2, 2)) : [];
});
var intersectionWith = baseRest(function(arrays) {
var comparator = last(arrays), mapped = arrayMap(arrays, castArrayLikeObject);
comparator = typeof comparator == "function" ? comparator : undefined2;
if (comparator) {
mapped.pop();
}
return mapped.length && mapped[0] === arrays[0] ? baseIntersection(mapped, undefined2, comparator) : [];
});
function join(array, separator) {
return array == null ? "" : nativeJoin.call(array, separator);
}
function last(array) {
var length = array == null ? 0 : array.length;
return length ? array[length - 1] : undefined2;
}
function lastIndexOf(array, value, fromIndex) {
var length = array == null ? 0 : array.length;
if (!length) {
return -1;
}
var index = length;
if (fromIndex !== undefined2) {
index = toInteger(fromIndex);
index = index < 0 ? nativeMax(length + index, 0) : nativeMin(index, length - 1);
}
return value === value ? strictLastIndexOf(array, value, index) : baseFindIndex(array, baseIsNaN, index, true);
}
function nth(array, n2) {
return array && array.length ? baseNth(array, toInteger(n2)) : undefined2;
}
var pull = baseRest(pullAll);
function pullAll(array, values2) {
return array && array.length && values2 && values2.length ? basePullAll(array, values2) : array;
}
function pullAllBy(array, values2, iteratee2) {
return array && array.length && values2 && values2.length ? basePullAll(array, values2, getIteratee(iteratee2, 2)) : array;
}
function pullAllWith(array, values2, comparator) {
return array && array.length && values2 && values2.length ? basePullAll(array, values2, undefined2, comparator) : array;
}
var pullAt = flatRest(function(array, indexes) {
var length = array == null ? 0 : array.length, result2 = baseAt(array, indexes);
basePullAt(array, arrayMap(indexes, function(index) {
return isIndex(index, length) ? +index : index;
}).sort(compareAscending));
return result2;
});
function remove(array, predicate) {
var result2 = [];
if (!(array && array.length)) {
return result2;
}
var index = -1, indexes = [], length = array.length;
predicate = getIteratee(predicate, 3);
while (++index < length) {
var value = array[index];
if (predicate(value, index, array)) {
result2.push(value);
indexes.push(index);
}
}
basePullAt(array, indexes);
return result2;
}
function reverse(array) {
return array == null ? array : nativeReverse.call(array);
}
function slice(array, start, end) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
if (end && typeof end != "number" && isIterateeCall(array, start, end)) {
start = 0;
end = length;
} else {
start = start == null ? 0 : toInteger(start);
end = end === undefined2 ? length : toInteger(end);
}
return baseSlice(array, start, end);
}
function sortedIndex(array, value) {
return baseSortedIndex(array, value);
}
function sortedIndexBy(array, value, iteratee2) {
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2));
}
function sortedIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value);
if (index < length && eq(array[index], value)) {
return index;
}
}
return -1;
}
function sortedLastIndex(array, value) {
return baseSortedIndex(array, value, true);
}
function sortedLastIndexBy(array, value, iteratee2) {
return baseSortedIndexBy(array, value, getIteratee(iteratee2, 2), true);
}
function sortedLastIndexOf(array, value) {
var length = array == null ? 0 : array.length;
if (length) {
var index = baseSortedIndex(array, value, true) - 1;
if (eq(array[index], value)) {
return index;
}
}
return -1;
}
function sortedUniq(array) {
return array && array.length ? baseSortedUniq(array) : [];
}
function sortedUniqBy(array, iteratee2) {
return array && array.length ? baseSortedUniq(array, getIteratee(iteratee2, 2)) : [];
}
function tail(array) {
var length = array == null ? 0 : array.length;
return length ? baseSlice(array, 1, length) : [];
}
function take(array, n2, guard) {
if (!(array && array.length)) {
return [];
}
n2 = guard || n2 === undefined2 ? 1 : toInteger(n2);
return baseSlice(array, 0, n2 < 0 ? 0 : n2);
}
function takeRight(array, n2, guard) {
var length = array == null ? 0 : array.length;
if (!length) {
return [];
}
n2 = guard || n2 === undefined2 ? 1 : toInteger(n2);
n2 = length - n2;
return baseSlice(array, n2 < 0 ? 0 : n2, length);
}
function takeRightWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3), false, true) : [];
}
function takeWhile(array, predicate) {
return array && array.length ? baseWhile(array, getIteratee(predicate, 3)) : [];
}
var union = baseRest(function(arrays) {
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true));
});
var unionBy = baseRest(function(arrays) {
var iteratee2 = last(arrays);
if (isArrayLikeObject(iteratee2)) {
iteratee2 = undefined2;
}
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), getIteratee(iteratee2, 2));
});
var unionWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == "function" ? comparator : undefined2;
return baseUniq(baseFlatten(arrays, 1, isArrayLikeObject, true), undefined2, comparator);
});
function uniq(array) {
return array && array.length ? baseUniq(array) : [];
}
function uniqBy(array, iteratee2) {
return array && array.length ? baseUniq(array, getIteratee(iteratee2, 2)) : [];
}
function uniqWith(array, comparator) {
comparator = typeof comparator == "function" ? comparator : undefined2;
return array && array.length ? baseUniq(array, undefined2, comparator) : [];
}
function unzip(array) {
if (!(array && array.length)) {
return [];
}
var length = 0;
array = arrayFilter(array, function(group) {
if (isArrayLikeObject(group)) {
length = nativeMax(group.length, length);
return true;
}
});
return baseTimes(length, function(index) {
return arrayMap(array, baseProperty(index));
});
}
function unzipWith(array, iteratee2) {
if (!(array && array.length)) {
return [];
}
var result2 = unzip(array);
if (iteratee2 == null) {
return result2;
}
return arrayMap(result2, function(group) {
return apply(iteratee2, undefined2, group);
});
}
var without = baseRest(function(array, values2) {
return isArrayLikeObject(array) ? baseDifference(array, values2) : [];
});
var xor = baseRest(function(arrays) {
return baseXor(arrayFilter(arrays, isArrayLikeObject));
});
var xorBy = baseRest(function(arrays) {
var iteratee2 = last(arrays);
if (isArrayLikeObject(iteratee2)) {
iteratee2 = undefined2;
}
return baseXor(arrayFilter(arrays, isArrayLikeObject), getIteratee(iteratee2, 2));
});
var xorWith = baseRest(function(arrays) {
var comparator = last(arrays);
comparator = typeof comparator == "function" ? comparator : undefined2;
return baseXor(arrayFilter(arrays, isArrayLikeObject), undefined2, comparator);
});
var zip = baseRest(unzip);
function zipObject(props, values2) {
return baseZipObject(props || [], values2 || [], assignValue);
}
function zipObjectDeep(props, values2) {
return baseZipObject(props || [], values2 || [], baseSet);
}
var zipWith = baseRest(function(arrays) {
var length = arrays.length, iteratee2 = length > 1 ? arrays[length - 1] : undefined2;
iteratee2 = typeof iteratee2 == "function" ? (arrays.pop(), iteratee2) : undefined2;
return unzipWith(arrays, iteratee2);
});
function chain(value) {
var result2 = lodash(value);
result2.__chain__ = true;
return result2;
}
function tap(value, interceptor) {
interceptor(value);
return value;
}
function thru(value, interceptor) {
return interceptor(value);
}
var wrapperAt = flatRest(function(paths) {
var length = paths.length, start = length ? paths[0] : 0, value = this.__wrapped__, interceptor = function(object) {
return baseAt(object, paths);
};
if (length > 1 || this.__actions__.length || !(value instanceof LazyWrapper) || !isIndex(start)) {
return this.thru(interceptor);
}
value = value.slice(start, +start + (length ? 1 : 0));
value.__actions__.push({
"func": thru,
"args": [interceptor],
"thisArg": undefined2
});
return new LodashWrapper(value, this.__chain__).thru(function(array) {
if (length && !array.length) {
array.push(undefined2);
}
return array;
});
});
function wrapperChain() {
return chain(this);
}
function wrapperCommit() {
return new LodashWrapper(this.value(), this.__chain__);
}
function wrapperNext() {
if (this.__values__ === undefined2) {
this.__values__ = toArray(this.value());
}
var done = this.__index__ >= this.__values__.length, value = done ? undefined2 : this.__values__[this.__index__++];
return { "done": done, "value": value };
}
function wrapperToIterator() {
return this;
}
function wrapperPlant(value) {
var result2, parent2 = this;
while (parent2 instanceof baseLodash) {
var clone4 = wrapperClone(parent2);
clone4.__index__ = 0;
clone4.__values__ = undefined2;
if (result2) {
previous.__wrapped__ = clone4;
} else {
result2 = clone4;
}
var previous = clone4;
parent2 = parent2.__wrapped__;
}
previous.__wrapped__ = value;
return result2;
}
function wrapperReverse() {
var value = this.__wrapped__;
if (value instanceof LazyWrapper) {
var wrapped = value;
if (this.__actions__.length) {
wrapped = new LazyWrapper(this);
}
wrapped = wrapped.reverse();
wrapped.__actions__.push({
"func": thru,
"args": [reverse],
"thisArg": undefined2
});
return new LodashWrapper(wrapped, this.__chain__);
}
return this.thru(reverse);
}
function wrapperValue() {
return baseWrapperValue(this.__wrapped__, this.__actions__);
}
var countBy = createAggregator(function(result2, value, key2) {
if (hasOwnProperty2.call(result2, key2)) {
++result2[key2];
} else {
baseAssignValue(result2, key2, 1);
}
});
function every(collection, predicate, guard) {
var func = isArray(collection) ? arrayEvery : baseEvery;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined2;
}
return func(collection, getIteratee(predicate, 3));
}
function filter2(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, getIteratee(predicate, 3));
}
var find = createFind(findIndex);
var findLast = createFind(findLastIndex);
function flatMap(collection, iteratee2) {
return baseFlatten(map(collection, iteratee2), 1);
}
function flatMapDeep(collection, iteratee2) {
return baseFlatten(map(collection, iteratee2), INFINITY);
}
function flatMapDepth(collection, iteratee2, depth) {
depth = depth === undefined2 ? 1 : toInteger(depth);
return baseFlatten(map(collection, iteratee2), depth);
}
function forEach(collection, iteratee2) {
var func = isArray(collection) ? arrayEach : baseEach;
return func(collection, getIteratee(iteratee2, 3));
}
function forEachRight(collection, iteratee2) {
var func = isArray(collection) ? arrayEachRight : baseEachRight;
return func(collection, getIteratee(iteratee2, 3));
}
var groupBy = createAggregator(function(result2, value, key2) {
if (hasOwnProperty2.call(result2, key2)) {
result2[key2].push(value);
} else {
baseAssignValue(result2, key2, [value]);
}
});
function includes(collection, value, fromIndex, guard) {
collection = isArrayLike(collection) ? collection : values(collection);
fromIndex = fromIndex && !guard ? toInteger(fromIndex) : 0;
var length = collection.length;
if (fromIndex < 0) {
fromIndex = nativeMax(length + fromIndex, 0);
}
return isString2(collection) ? fromIndex <= length && collection.indexOf(value, fromIndex) > -1 : !!length && baseIndexOf(collection, value, fromIndex) > -1;
}
var invokeMap = baseRest(function(collection, path2, args) {
var index = -1, isFunc = typeof path2 == "function", result2 = isArrayLike(collection) ? Array2(collection.length) : [];
baseEach(collection, function(value) {
result2[++index] = isFunc ? apply(path2, value, args) : baseInvoke(value, path2, args);
});
return result2;
});
var keyBy = createAggregator(function(result2, value, key2) {
baseAssignValue(result2, key2, value);
});
function map(collection, iteratee2) {
var func = isArray(collection) ? arrayMap : baseMap;
return func(collection, getIteratee(iteratee2, 3));
}
function orderBy(collection, iteratees, orders, guard) {
if (collection == null) {
return [];
}
if (!isArray(iteratees)) {
iteratees = iteratees == null ? [] : [iteratees];
}
orders = guard ? undefined2 : orders;
if (!isArray(orders)) {
orders = orders == null ? [] : [orders];
}
return baseOrderBy(collection, iteratees, orders);
}
var partition = createAggregator(function(result2, value, key2) {
result2[key2 ? 0 : 1].push(value);
}, function() {
return [[], []];
});
function reduce(collection, iteratee2, accumulator) {
var func = isArray(collection) ? arrayReduce : baseReduce, initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEach);
}
function reduceRight(collection, iteratee2, accumulator) {
var func = isArray(collection) ? arrayReduceRight : baseReduce, initAccum = arguments.length < 3;
return func(collection, getIteratee(iteratee2, 4), accumulator, initAccum, baseEachRight);
}
function reject2(collection, predicate) {
var func = isArray(collection) ? arrayFilter : baseFilter;
return func(collection, negate(getIteratee(predicate, 3)));
}
function sample(collection) {
var func = isArray(collection) ? arraySample : baseSample;
return func(collection);
}
function sampleSize(collection, n2, guard) {
if (guard ? isIterateeCall(collection, n2, guard) : n2 === undefined2) {
n2 = 1;
} else {
n2 = toInteger(n2);
}
var func = isArray(collection) ? arraySampleSize : baseSampleSize;
return func(collection, n2);
}
function shuffle(collection) {
var func = isArray(collection) ? arrayShuffle : baseShuffle;
return func(collection);
}
function size(collection) {
if (collection == null) {
return 0;
}
if (isArrayLike(collection)) {
return isString2(collection) ? stringSize(collection) : collection.length;
}
var tag = getTag(collection);
if (tag == mapTag || tag == setTag) {
return collection.size;
}
return baseKeys(collection).length;
}
function some(collection, predicate, guard) {
var func = isArray(collection) ? arraySome : baseSome;
if (guard && isIterateeCall(collection, predicate, guard)) {
predicate = undefined2;
}
return func(collection, getIteratee(predicate, 3));
}
var sortBy = baseRest(function(collection, iteratees) {
if (collection == null) {
return [];
}
var length = iteratees.length;
if (length > 1 && isIterateeCall(collection, iteratees[0], iteratees[1])) {
iteratees = [];
} else if (length > 2 && isIterateeCall(iteratees[0], iteratees[1], iteratees[2])) {
iteratees = [iteratees[0]];
}
return baseOrderBy(collection, baseFlatten(iteratees, 1), []);
});
var now3 = ctxNow || function() {
return root.Date.now();
};
function after(n2, func) {
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
n2 = toInteger(n2);
return function() {
if (--n2 < 1) {
return func.apply(this, arguments);
}
};
}
function ary(func, n2, guard) {
n2 = guard ? undefined2 : n2;
n2 = func && n2 == null ? func.length : n2;
return createWrap(func, WRAP_ARY_FLAG, undefined2, undefined2, undefined2, undefined2, n2);
}
function before(n2, func) {
var result2;
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
n2 = toInteger(n2);
return function() {
if (--n2 > 0) {
result2 = func.apply(this, arguments);
}
if (n2 <= 1) {
func = undefined2;
}
return result2;
};
}
var bind = baseRest(function(func, thisArg, partials) {
var bitmask = WRAP_BIND_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bind));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(func, bitmask, thisArg, partials, holders);
});
var bindKey = baseRest(function(object, key2, partials) {
var bitmask = WRAP_BIND_FLAG | WRAP_BIND_KEY_FLAG;
if (partials.length) {
var holders = replaceHolders(partials, getHolder(bindKey));
bitmask |= WRAP_PARTIAL_FLAG;
}
return createWrap(key2, bitmask, object, partials, holders);
});
function curry(func, arity, guard) {
arity = guard ? undefined2 : arity;
var result2 = createWrap(func, WRAP_CURRY_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
result2.placeholder = curry.placeholder;
return result2;
}
function curryRight(func, arity, guard) {
arity = guard ? undefined2 : arity;
var result2 = createWrap(func, WRAP_CURRY_RIGHT_FLAG, undefined2, undefined2, undefined2, undefined2, undefined2, arity);
result2.placeholder = curryRight.placeholder;
return result2;
}
function debounce(func, wait, options) {
var lastArgs, lastThis, maxWait, result2, timerId, lastCallTime, lastInvokeTime = 0, leading = false, maxing = false, trailing = true;
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
wait = toNumber(wait) || 0;
if (isObject(options)) {
leading = !!options.leading;
maxing = "maxWait" in options;
maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
function invokeFunc(time) {
var args = lastArgs, thisArg = lastThis;
lastArgs = lastThis = undefined2;
lastInvokeTime = time;
result2 = func.apply(thisArg, args);
return result2;
}
function leadingEdge(time) {
lastInvokeTime = time;
timerId = setTimeout2(timerExpired, wait);
return leading ? invokeFunc(time) : result2;
}
function remainingWait(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime, timeWaiting = wait - timeSinceLastCall;
return maxing ? nativeMin(timeWaiting, maxWait - timeSinceLastInvoke) : timeWaiting;
}
function shouldInvoke(time) {
var timeSinceLastCall = time - lastCallTime, timeSinceLastInvoke = time - lastInvokeTime;
return lastCallTime === undefined2 || timeSinceLastCall >= wait || timeSinceLastCall < 0 || maxing && timeSinceLastInvoke >= maxWait;
}
function timerExpired() {
var time = now3();
if (shouldInvoke(time)) {
return trailingEdge(time);
}
timerId = setTimeout2(timerExpired, remainingWait(time));
}
function trailingEdge(time) {
timerId = undefined2;
if (trailing && lastArgs) {
return invokeFunc(time);
}
lastArgs = lastThis = undefined2;
return result2;
}
function cancel() {
if (timerId !== undefined2) {
clearTimeout2(timerId);
}
lastInvokeTime = 0;
lastArgs = lastCallTime = lastThis = timerId = undefined2;
}
function flush() {
return timerId === undefined2 ? result2 : trailingEdge(now3());
}
function debounced() {
var time = now3(), isInvoking = shouldInvoke(time);
lastArgs = arguments;
lastThis = this;
lastCallTime = time;
if (isInvoking) {
if (timerId === undefined2) {
return leadingEdge(lastCallTime);
}
if (maxing) {
clearTimeout2(timerId);
timerId = setTimeout2(timerExpired, wait);
return invokeFunc(lastCallTime);
}
}
if (timerId === undefined2) {
timerId = setTimeout2(timerExpired, wait);
}
return result2;
}
debounced.cancel = cancel;
debounced.flush = flush;
return debounced;
}
var defer = baseRest(function(func, args) {
return baseDelay(func, 1, args);
});
var delay = baseRest(function(func, wait, args) {
return baseDelay(func, toNumber(wait) || 0, args);
});
function flip(func) {
return createWrap(func, WRAP_FLIP_FLAG);
}
function memoize(func, resolver) {
if (typeof func != "function" || resolver != null && typeof resolver != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
var memoized = function() {
var args = arguments, key2 = resolver ? resolver.apply(this, args) : args[0], cache = memoized.cache;
if (cache.has(key2)) {
return cache.get(key2);
}
var result2 = func.apply(this, args);
memoized.cache = cache.set(key2, result2) || cache;
return result2;
};
memoized.cache = new (memoize.Cache || MapCache)();
return memoized;
}
memoize.Cache = MapCache;
function negate(predicate) {
if (typeof predicate != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
return function() {
var args = arguments;
switch (args.length) {
case 0:
return !predicate.call(this);
case 1:
return !predicate.call(this, args[0]);
case 2:
return !predicate.call(this, args[0], args[1]);
case 3:
return !predicate.call(this, args[0], args[1], args[2]);
}
return !predicate.apply(this, args);
};
}
function once(func) {
return before(2, func);
}
var overArgs = castRest(function(func, transforms) {
transforms = transforms.length == 1 && isArray(transforms[0]) ? arrayMap(transforms[0], baseUnary(getIteratee())) : arrayMap(baseFlatten(transforms, 1), baseUnary(getIteratee()));
var funcsLength = transforms.length;
return baseRest(function(args) {
var index = -1, length = nativeMin(args.length, funcsLength);
while (++index < length) {
args[index] = transforms[index].call(this, args[index]);
}
return apply(func, this, args);
});
});
var partial = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partial));
return createWrap(func, WRAP_PARTIAL_FLAG, undefined2, partials, holders);
});
var partialRight = baseRest(function(func, partials) {
var holders = replaceHolders(partials, getHolder(partialRight));
return createWrap(func, WRAP_PARTIAL_RIGHT_FLAG, undefined2, partials, holders);
});
var rearg = flatRest(function(func, indexes) {
return createWrap(func, WRAP_REARG_FLAG, undefined2, undefined2, undefined2, indexes);
});
function rest(func, start) {
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
start = start === undefined2 ? start : toInteger(start);
return baseRest(func, start);
}
function spread(func, start) {
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
start = start == null ? 0 : nativeMax(toInteger(start), 0);
return baseRest(function(args) {
var array = args[start], otherArgs = castSlice(args, 0, start);
if (array) {
arrayPush(otherArgs, array);
}
return apply(func, this, otherArgs);
});
}
function throttle(func, wait, options) {
var leading = true, trailing = true;
if (typeof func != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
if (isObject(options)) {
leading = "leading" in options ? !!options.leading : leading;
trailing = "trailing" in options ? !!options.trailing : trailing;
}
return debounce(func, wait, {
"leading": leading,
"maxWait": wait,
"trailing": trailing
});
}
function unary(func) {
return ary(func, 1);
}
function wrap(value, wrapper) {
return partial(castFunction(wrapper), value);
}
function castArray() {
if (!arguments.length) {
return [];
}
var value = arguments[0];
return isArray(value) ? value : [value];
}
function clone3(value) {
return baseClone(value, CLONE_SYMBOLS_FLAG);
}
function cloneWith(value, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
return baseClone(value, CLONE_SYMBOLS_FLAG, customizer);
}
function cloneDeep(value) {
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG);
}
function cloneDeepWith(value, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
return baseClone(value, CLONE_DEEP_FLAG | CLONE_SYMBOLS_FLAG, customizer);
}
function conformsTo(object, source) {
return source == null || baseConformsTo(object, source, keys(source));
}
function eq(value, other) {
return value === other || value !== value && other !== other;
}
var gt = createRelationalOperation(baseGt);
var gte = createRelationalOperation(function(value, other) {
return value >= other;
});
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
return arguments;
}()) ? baseIsArguments : function(value) {
return isObjectLike(value) && hasOwnProperty2.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
};
var isArray = Array2.isArray;
var isArrayBuffer = nodeIsArrayBuffer ? baseUnary(nodeIsArrayBuffer) : baseIsArrayBuffer;
function isArrayLike(value) {
return value != null && isLength(value.length) && !isFunction(value);
}
function isArrayLikeObject(value) {
return isObjectLike(value) && isArrayLike(value);
}
function isBoolean(value) {
return value === true || value === false || isObjectLike(value) && baseGetTag(value) == boolTag;
}
var isBuffer = nativeIsBuffer || stubFalse;
var isDate2 = nodeIsDate ? baseUnary(nodeIsDate) : baseIsDate;
function isElement(value) {
return isObjectLike(value) && value.nodeType === 1 && !isPlainObject2(value);
}
function isEmpty(value) {
if (value == null) {
return true;
}
if (isArrayLike(value) && (isArray(value) || typeof value == "string" || typeof value.splice == "function" || isBuffer(value) || isTypedArray(value) || isArguments(value))) {
return !value.length;
}
var tag = getTag(value);
if (tag == mapTag || tag == setTag) {
return !value.size;
}
if (isPrototype(value)) {
return !baseKeys(value).length;
}
for (var key2 in value) {
if (hasOwnProperty2.call(value, key2)) {
return false;
}
}
return true;
}
function isEqual(value, other) {
return baseIsEqual(value, other);
}
function isEqualWith(value, other, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
var result2 = customizer ? customizer(value, other) : undefined2;
return result2 === undefined2 ? baseIsEqual(value, other, undefined2, customizer) : !!result2;
}
function isError(value) {
if (!isObjectLike(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == errorTag || tag == domExcTag || typeof value.message == "string" && typeof value.name == "string" && !isPlainObject2(value);
}
function isFinite2(value) {
return typeof value == "number" && nativeIsFinite(value);
}
function isFunction(value) {
if (!isObject(value)) {
return false;
}
var tag = baseGetTag(value);
return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
}
function isInteger2(value) {
return typeof value == "number" && value == toInteger(value);
}
function isLength(value) {
return typeof value == "number" && value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
}
function isObject(value) {
var type = typeof value;
return value != null && (type == "object" || type == "function");
}
function isObjectLike(value) {
return value != null && typeof value == "object";
}
var isMap2 = nodeIsMap ? baseUnary(nodeIsMap) : baseIsMap;
function isMatch(object, source) {
return object === source || baseIsMatch(object, source, getMatchData(source));
}
function isMatchWith(object, source, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
return baseIsMatch(object, source, getMatchData(source), customizer);
}
function isNaN2(value) {
return isNumber2(value) && value != +value;
}
function isNative(value) {
if (isMaskable(value)) {
throw new Error2(CORE_ERROR_TEXT);
}
return baseIsNative(value);
}
function isNull(value) {
return value === null;
}
function isNil(value) {
return value == null;
}
function isNumber2(value) {
return typeof value == "number" || isObjectLike(value) && baseGetTag(value) == numberTag;
}
function isPlainObject2(value) {
if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
return false;
}
var proto = getPrototype(value);
if (proto === null) {
return true;
}
var Ctor = hasOwnProperty2.call(proto, "constructor") && proto.constructor;
return typeof Ctor == "function" && Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString2;
}
var isRegExp = nodeIsRegExp ? baseUnary(nodeIsRegExp) : baseIsRegExp;
function isSafeInteger(value) {
return isInteger2(value) && value >= -MAX_SAFE_INTEGER && value <= MAX_SAFE_INTEGER;
}
var isSet2 = nodeIsSet ? baseUnary(nodeIsSet) : baseIsSet;
function isString2(value) {
return typeof value == "string" || !isArray(value) && isObjectLike(value) && baseGetTag(value) == stringTag;
}
function isSymbol(value) {
return typeof value == "symbol" || isObjectLike(value) && baseGetTag(value) == symbolTag;
}
var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
function isUndefined2(value) {
return value === undefined2;
}
function isWeakMap(value) {
return isObjectLike(value) && getTag(value) == weakMapTag;
}
function isWeakSet(value) {
return isObjectLike(value) && baseGetTag(value) == weakSetTag;
}
var lt = createRelationalOperation(baseLt);
var lte = createRelationalOperation(function(value, other) {
return value <= other;
});
function toArray(value) {
if (!value) {
return [];
}
if (isArrayLike(value)) {
return isString2(value) ? stringToArray(value) : copyArray(value);
}
if (symIterator && value[symIterator]) {
return iteratorToArray(value[symIterator]());
}
var tag = getTag(value), func = tag == mapTag ? mapToArray : tag == setTag ? setToArray : values;
return func(value);
}
function toFinite(value) {
if (!value) {
return value === 0 ? value : 0;
}
value = toNumber(value);
if (value === INFINITY || value === -INFINITY) {
var sign = value < 0 ? -1 : 1;
return sign * MAX_INTEGER;
}
return value === value ? value : 0;
}
function toInteger(value) {
var result2 = toFinite(value), remainder = result2 % 1;
return result2 === result2 ? remainder ? result2 - remainder : result2 : 0;
}
function toLength(value) {
return value ? baseClamp(toInteger(value), 0, MAX_ARRAY_LENGTH) : 0;
}
function toNumber(value) {
if (typeof value == "number") {
return value;
}
if (isSymbol(value)) {
return NAN;
}
if (isObject(value)) {
var other = typeof value.valueOf == "function" ? value.valueOf() : value;
value = isObject(other) ? other + "" : other;
}
if (typeof value != "string") {
return value === 0 ? value : +value;
}
value = baseTrim(value);
var isBinary = reIsBinary.test(value);
return isBinary || reIsOctal.test(value) ? freeParseInt(value.slice(2), isBinary ? 2 : 8) : reIsBadHex.test(value) ? NAN : +value;
}
function toPlainObject(value) {
return copyObject(value, keysIn(value));
}
function toSafeInteger(value) {
return value ? baseClamp(toInteger(value), -MAX_SAFE_INTEGER, MAX_SAFE_INTEGER) : value === 0 ? value : 0;
}
function toString(value) {
return value == null ? "" : baseToString(value);
}
var assign = createAssigner(function(object, source) {
if (isPrototype(source) || isArrayLike(source)) {
copyObject(source, keys(source), object);
return;
}
for (var key2 in source) {
if (hasOwnProperty2.call(source, key2)) {
assignValue(object, key2, source[key2]);
}
}
});
var assignIn = createAssigner(function(object, source) {
copyObject(source, keysIn(source), object);
});
var assignInWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keysIn(source), object, customizer);
});
var assignWith = createAssigner(function(object, source, srcIndex, customizer) {
copyObject(source, keys(source), object, customizer);
});
var at = flatRest(baseAt);
function create(prototype, properties2) {
var result2 = baseCreate(prototype);
return properties2 == null ? result2 : baseAssign(result2, properties2);
}
var defaults = baseRest(function(object, sources) {
object = Object2(object);
var index = -1;
var length = sources.length;
var guard = length > 2 ? sources[2] : undefined2;
if (guard && isIterateeCall(sources[0], sources[1], guard)) {
length = 1;
}
while (++index < length) {
var source = sources[index];
var props = keysIn(source);
var propsIndex = -1;
var propsLength = props.length;
while (++propsIndex < propsLength) {
var key2 = props[propsIndex];
var value = object[key2];
if (value === undefined2 || eq(value, objectProto[key2]) && !hasOwnProperty2.call(object, key2)) {
object[key2] = source[key2];
}
}
}
return object;
});
var defaultsDeep = baseRest(function(args) {
args.push(undefined2, customDefaultsMerge);
return apply(mergeWith, undefined2, args);
});
function findKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwn);
}
function findLastKey(object, predicate) {
return baseFindKey(object, getIteratee(predicate, 3), baseForOwnRight);
}
function forIn(object, iteratee2) {
return object == null ? object : baseFor(object, getIteratee(iteratee2, 3), keysIn);
}
function forInRight(object, iteratee2) {
return object == null ? object : baseForRight(object, getIteratee(iteratee2, 3), keysIn);
}
function forOwn(object, iteratee2) {
return object && baseForOwn(object, getIteratee(iteratee2, 3));
}
function forOwnRight(object, iteratee2) {
return object && baseForOwnRight(object, getIteratee(iteratee2, 3));
}
function functions(object) {
return object == null ? [] : baseFunctions(object, keys(object));
}
function functionsIn(object) {
return object == null ? [] : baseFunctions(object, keysIn(object));
}
function get(object, path2, defaultValue2) {
var result2 = object == null ? undefined2 : baseGet(object, path2);
return result2 === undefined2 ? defaultValue2 : result2;
}
function has2(object, path2) {
return object != null && hasPath(object, path2, baseHas);
}
function hasIn(object, path2) {
return object != null && hasPath(object, path2, baseHasIn);
}
var invert = createInverter(function(result2, value, key2) {
if (value != null && typeof value.toString != "function") {
value = nativeObjectToString.call(value);
}
result2[value] = key2;
}, constant(identity2));
var invertBy = createInverter(function(result2, value, key2) {
if (value != null && typeof value.toString != "function") {
value = nativeObjectToString.call(value);
}
if (hasOwnProperty2.call(result2, value)) {
result2[value].push(key2);
} else {
result2[value] = [key2];
}
}, getIteratee);
var invoke = baseRest(baseInvoke);
function keys(object) {
return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
}
function keysIn(object) {
return isArrayLike(object) ? arrayLikeKeys(object, true) : baseKeysIn(object);
}
function mapKeys(object, iteratee2) {
var result2 = {};
iteratee2 = getIteratee(iteratee2, 3);
baseForOwn(object, function(value, key2, object2) {
baseAssignValue(result2, iteratee2(value, key2, object2), value);
});
return result2;
}
function mapValues(object, iteratee2) {
var result2 = {};
iteratee2 = getIteratee(iteratee2, 3);
baseForOwn(object, function(value, key2, object2) {
baseAssignValue(result2, key2, iteratee2(value, key2, object2));
});
return result2;
}
var merge = createAssigner(function(object, source, srcIndex) {
baseMerge(object, source, srcIndex);
});
var mergeWith = createAssigner(function(object, source, srcIndex, customizer) {
baseMerge(object, source, srcIndex, customizer);
});
var omit = flatRest(function(object, paths) {
var result2 = {};
if (object == null) {
return result2;
}
var isDeep = false;
paths = arrayMap(paths, function(path2) {
path2 = castPath(path2, object);
isDeep || (isDeep = path2.length > 1);
return path2;
});
copyObject(object, getAllKeysIn(object), result2);
if (isDeep) {
result2 = baseClone(result2, CLONE_DEEP_FLAG | CLONE_FLAT_FLAG | CLONE_SYMBOLS_FLAG, customOmitClone);
}
var length = paths.length;
while (length--) {
baseUnset(result2, paths[length]);
}
return result2;
});
function omitBy(object, predicate) {
return pickBy(object, negate(getIteratee(predicate)));
}
var pick2 = flatRest(function(object, paths) {
return object == null ? {} : basePick(object, paths);
});
function pickBy(object, predicate) {
if (object == null) {
return {};
}
var props = arrayMap(getAllKeysIn(object), function(prop) {
return [prop];
});
predicate = getIteratee(predicate);
return basePickBy(object, props, function(value, path2) {
return predicate(value, path2[0]);
});
}
function result(object, path2, defaultValue2) {
path2 = castPath(path2, object);
var index = -1, length = path2.length;
if (!length) {
length = 1;
object = undefined2;
}
while (++index < length) {
var value = object == null ? undefined2 : object[toKey(path2[index])];
if (value === undefined2) {
index = length;
value = defaultValue2;
}
object = isFunction(value) ? value.call(object) : value;
}
return object;
}
function set2(object, path2, value) {
return object == null ? object : baseSet(object, path2, value);
}
function setWith(object, path2, value, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
return object == null ? object : baseSet(object, path2, value, customizer);
}
var toPairs = createToPairs(keys);
var toPairsIn = createToPairs(keysIn);
function transform(object, iteratee2, accumulator) {
var isArr = isArray(object), isArrLike = isArr || isBuffer(object) || isTypedArray(object);
iteratee2 = getIteratee(iteratee2, 4);
if (accumulator == null) {
var Ctor = object && object.constructor;
if (isArrLike) {
accumulator = isArr ? new Ctor() : [];
} else if (isObject(object)) {
accumulator = isFunction(Ctor) ? baseCreate(getPrototype(object)) : {};
} else {
accumulator = {};
}
}
(isArrLike ? arrayEach : baseForOwn)(object, function(value, index, object2) {
return iteratee2(accumulator, value, index, object2);
});
return accumulator;
}
function unset(object, path2) {
return object == null ? true : baseUnset(object, path2);
}
function update(object, path2, updater) {
return object == null ? object : baseUpdate(object, path2, castFunction(updater));
}
function updateWith(object, path2, updater, customizer) {
customizer = typeof customizer == "function" ? customizer : undefined2;
return object == null ? object : baseUpdate(object, path2, castFunction(updater), customizer);
}
function values(object) {
return object == null ? [] : baseValues(object, keys(object));
}
function valuesIn(object) {
return object == null ? [] : baseValues(object, keysIn(object));
}
function clamp(number, lower, upper) {
if (upper === undefined2) {
upper = lower;
lower = undefined2;
}
if (upper !== undefined2) {
upper = toNumber(upper);
upper = upper === upper ? upper : 0;
}
if (lower !== undefined2) {
lower = toNumber(lower);
lower = lower === lower ? lower : 0;
}
return baseClamp(toNumber(number), lower, upper);
}
function inRange(number, start, end) {
start = toFinite(start);
if (end === undefined2) {
end = start;
start = 0;
} else {
end = toFinite(end);
}
number = toNumber(number);
return baseInRange(number, start, end);
}
function random(lower, upper, floating) {
if (floating && typeof floating != "boolean" && isIterateeCall(lower, upper, floating)) {
upper = floating = undefined2;
}
if (floating === undefined2) {
if (typeof upper == "boolean") {
floating = upper;
upper = undefined2;
} else if (typeof lower == "boolean") {
floating = lower;
lower = undefined2;
}
}
if (lower === undefined2 && upper === undefined2) {
lower = 0;
upper = 1;
} else {
lower = toFinite(lower);
if (upper === undefined2) {
upper = lower;
lower = 0;
} else {
upper = toFinite(upper);
}
}
if (lower > upper) {
var temp = lower;
lower = upper;
upper = temp;
}
if (floating || lower % 1 || upper % 1) {
var rand = nativeRandom();
return nativeMin(lower + rand * (upper - lower + freeParseFloat("1e-" + ((rand + "").length - 1))), upper);
}
return baseRandom(lower, upper);
}
var camelCase = createCompounder(function(result2, word, index) {
word = word.toLowerCase();
return result2 + (index ? capitalize(word) : word);
});
function capitalize(string) {
return upperFirst(toString(string).toLowerCase());
}
function deburr(string) {
string = toString(string);
return string && string.replace(reLatin, deburrLetter).replace(reComboMark, "");
}
function endsWith(string, target, position) {
string = toString(string);
target = baseToString(target);
var length = string.length;
position = position === undefined2 ? length : baseClamp(toInteger(position), 0, length);
var end = position;
position -= target.length;
return position >= 0 && string.slice(position, end) == target;
}
function escape(string) {
string = toString(string);
return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
}
function escapeRegExp2(string) {
string = toString(string);
return string && reHasRegExpChar.test(string) ? string.replace(reRegExpChar, "\\$&") : string;
}
var kebabCase = createCompounder(function(result2, word, index) {
return result2 + (index ? "-" : "") + word.toLowerCase();
});
var lowerCase = createCompounder(function(result2, word, index) {
return result2 + (index ? " " : "") + word.toLowerCase();
});
var lowerFirst = createCaseFirst("toLowerCase");
function pad(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
if (!length || strLength >= length) {
return string;
}
var mid = (length - strLength) / 2;
return createPadding(nativeFloor(mid), chars) + string + createPadding(nativeCeil(mid), chars);
}
function padEnd(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return length && strLength < length ? string + createPadding(length - strLength, chars) : string;
}
function padStart2(string, length, chars) {
string = toString(string);
length = toInteger(length);
var strLength = length ? stringSize(string) : 0;
return length && strLength < length ? createPadding(length - strLength, chars) + string : string;
}
function parseInt2(string, radix, guard) {
if (guard || radix == null) {
radix = 0;
} else if (radix) {
radix = +radix;
}
return nativeParseInt(toString(string).replace(reTrimStart, ""), radix || 0);
}
function repeat(string, n2, guard) {
if (guard ? isIterateeCall(string, n2, guard) : n2 === undefined2) {
n2 = 1;
} else {
n2 = toInteger(n2);
}
return baseRepeat(toString(string), n2);
}
function replace() {
var args = arguments, string = toString(args[0]);
return args.length < 3 ? string : string.replace(args[1], args[2]);
}
var snakeCase = createCompounder(function(result2, word, index) {
return result2 + (index ? "_" : "") + word.toLowerCase();
});
function split(string, separator, limit) {
if (limit && typeof limit != "number" && isIterateeCall(string, separator, limit)) {
separator = limit = undefined2;
}
limit = limit === undefined2 ? MAX_ARRAY_LENGTH : limit >>> 0;
if (!limit) {
return [];
}
string = toString(string);
if (string && (typeof separator == "string" || separator != null && !isRegExp(separator))) {
separator = baseToString(separator);
if (!separator && hasUnicode(string)) {
return castSlice(stringToArray(string), 0, limit);
}
}
return string.split(separator, limit);
}
var startCase = createCompounder(function(result2, word, index) {
return result2 + (index ? " " : "") + upperFirst(word);
});
function startsWith(string, target, position) {
string = toString(string);
position = position == null ? 0 : baseClamp(toInteger(position), 0, string.length);
target = baseToString(target);
return string.slice(position, position + target.length) == target;
}
function template(string, options, guard) {
var settings = lodash.templateSettings;
if (guard && isIterateeCall(string, options, guard)) {
options = undefined2;
}
string = toString(string);
options = assignInWith({}, options, settings, customDefaultsAssignIn);
var imports = assignInWith({}, options.imports, settings.imports, customDefaultsAssignIn), importsKeys = keys(imports), importsValues = baseValues(imports, importsKeys);
var isEscaping, isEvaluating, index = 0, interpolate = options.interpolate || reNoMatch, source = "__p += '";
var reDelimiters = RegExp2(
(options.escape || reNoMatch).source + "|" + interpolate.source + "|" + (interpolate === reInterpolate ? reEsTemplate : reNoMatch).source + "|" + (options.evaluate || reNoMatch).source + "|$",
"g"
);
var sourceURL = "//# sourceURL=" + (hasOwnProperty2.call(options, "sourceURL") ? (options.sourceURL + "").replace(/\s/g, " ") : "lodash.templateSources[" + ++templateCounter + "]") + "\n";
string.replace(reDelimiters, function(match2, escapeValue, interpolateValue, esTemplateValue, evaluateValue, offset2) {
interpolateValue || (interpolateValue = esTemplateValue);
source += string.slice(index, offset2).replace(reUnescapedString, escapeStringChar);
if (escapeValue) {
isEscaping = true;
source += "' +\n__e(" + escapeValue + ") +\n'";
}
if (evaluateValue) {
isEvaluating = true;
source += "';\n" + evaluateValue + ";\n__p += '";
}
if (interpolateValue) {
source += "' +\n((__t = (" + interpolateValue + ")) == null ? '' : __t) +\n'";
}
index = offset2 + match2.length;
return match2;
});
source += "';\n";
var variable = hasOwnProperty2.call(options, "variable") && options.variable;
if (!variable) {
source = "with (obj) {\n" + source + "\n}\n";
} else if (reForbiddenIdentifierChars.test(variable)) {
throw new Error2(INVALID_TEMPL_VAR_ERROR_TEXT);
}
source = (isEvaluating ? source.replace(reEmptyStringLeading, "") : source).replace(reEmptyStringMiddle, "$1").replace(reEmptyStringTrailing, "$1;");
source = "function(" + (variable || "obj") + ") {\n" + (variable ? "" : "obj || (obj = {});\n") + "var __t, __p = ''" + (isEscaping ? ", __e = _.escape" : "") + (isEvaluating ? ", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n" : ";\n") + source + "return __p\n}";
var result2 = attempt(function() {
return Function2(importsKeys, sourceURL + "return " + source).apply(undefined2, importsValues);
});
result2.source = source;
if (isError(result2)) {
throw result2;
}
return result2;
}
function toLower(value) {
return toString(value).toLowerCase();
}
function toUpper(value) {
return toString(value).toUpperCase();
}
function trim(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined2)) {
return baseTrim(string);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string), chrSymbols = stringToArray(chars), start = charsStartIndex(strSymbols, chrSymbols), end = charsEndIndex(strSymbols, chrSymbols) + 1;
return castSlice(strSymbols, start, end).join("");
}
function trimEnd(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined2)) {
return string.slice(0, trimmedEndIndex(string) + 1);
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string), end = charsEndIndex(strSymbols, stringToArray(chars)) + 1;
return castSlice(strSymbols, 0, end).join("");
}
function trimStart(string, chars, guard) {
string = toString(string);
if (string && (guard || chars === undefined2)) {
return string.replace(reTrimStart, "");
}
if (!string || !(chars = baseToString(chars))) {
return string;
}
var strSymbols = stringToArray(string), start = charsStartIndex(strSymbols, stringToArray(chars));
return castSlice(strSymbols, start).join("");
}
function truncate(string, options) {
var length = DEFAULT_TRUNC_LENGTH, omission = DEFAULT_TRUNC_OMISSION;
if (isObject(options)) {
var separator = "separator" in options ? options.separator : separator;
length = "length" in options ? toInteger(options.length) : length;
omission = "omission" in options ? baseToString(options.omission) : omission;
}
string = toString(string);
var strLength = string.length;
if (hasUnicode(string)) {
var strSymbols = stringToArray(string);
strLength = strSymbols.length;
}
if (length >= strLength) {
return string;
}
var end = length - stringSize(omission);
if (end < 1) {
return omission;
}
var result2 = strSymbols ? castSlice(strSymbols, 0, end).join("") : string.slice(0, end);
if (separator === undefined2) {
return result2 + omission;
}
if (strSymbols) {
end += result2.length - end;
}
if (isRegExp(separator)) {
if (string.slice(end).search(separator)) {
var match2, substring = result2;
if (!separator.global) {
separator = RegExp2(separator.source, toString(reFlags.exec(separator)) + "g");
}
separator.lastIndex = 0;
while (match2 = separator.exec(substring)) {
var newEnd = match2.index;
}
result2 = result2.slice(0, newEnd === undefined2 ? end : newEnd);
}
} else if (string.indexOf(baseToString(separator), end) != end) {
var index = result2.lastIndexOf(separator);
if (index > -1) {
result2 = result2.slice(0, index);
}
}
return result2 + omission;
}
function unescape(string) {
string = toString(string);
return string && reHasEscapedHtml.test(string) ? string.replace(reEscapedHtml, unescapeHtmlChar) : string;
}
var upperCase = createCompounder(function(result2, word, index) {
return result2 + (index ? " " : "") + word.toUpperCase();
});
var upperFirst = createCaseFirst("toUpperCase");
function words(string, pattern, guard) {
string = toString(string);
pattern = guard ? undefined2 : pattern;
if (pattern === undefined2) {
return hasUnicodeWord(string) ? unicodeWords(string) : asciiWords(string);
}
return string.match(pattern) || [];
}
var attempt = baseRest(function(func, args) {
try {
return apply(func, undefined2, args);
} catch (e) {
return isError(e) ? e : new Error2(e);
}
});
var bindAll = flatRest(function(object, methodNames) {
arrayEach(methodNames, function(key2) {
key2 = toKey(key2);
baseAssignValue(object, key2, bind(object[key2], object));
});
return object;
});
function cond(pairs) {
var length = pairs == null ? 0 : pairs.length, toIteratee = getIteratee();
pairs = !length ? [] : arrayMap(pairs, function(pair) {
if (typeof pair[1] != "function") {
throw new TypeError2(FUNC_ERROR_TEXT);
}
return [toIteratee(pair[0]), pair[1]];
});
return baseRest(function(args) {
var index = -1;
while (++index < length) {
var pair = pairs[index];
if (apply(pair[0], this, args)) {
return apply(pair[1], this, args);
}
}
});
}
function conforms(source) {
return baseConforms(baseClone(source, CLONE_DEEP_FLAG));
}
function constant(value) {
return function() {
return value;
};
}
function defaultTo(value, defaultValue2) {
return value == null || value !== value ? defaultValue2 : value;
}
var flow = createFlow();
var flowRight = createFlow(true);
function identity2(value) {
return value;
}
function iteratee(func) {
return baseIteratee(typeof func == "function" ? func : baseClone(func, CLONE_DEEP_FLAG));
}
function matches(source) {
return baseMatches(baseClone(source, CLONE_DEEP_FLAG));
}
function matchesProperty(path2, srcValue) {
return baseMatchesProperty(path2, baseClone(srcValue, CLONE_DEEP_FLAG));
}
var method = baseRest(function(path2, args) {
return function(object) {
return baseInvoke(object, path2, args);
};
});
var methodOf = baseRest(function(object, args) {
return function(path2) {
return baseInvoke(object, path2, args);
};
});
function mixin(object, source, options) {
var props = keys(source), methodNames = baseFunctions(source, props);
if (options == null && !(isObject(source) && (methodNames.length || !props.length))) {
options = source;
source = object;
object = this;
methodNames = baseFunctions(source, keys(source));
}
var chain2 = !(isObject(options) && "chain" in options) || !!options.chain, isFunc = isFunction(object);
arrayEach(methodNames, function(methodName) {
var func = source[methodName];
object[methodName] = func;
if (isFunc) {
object.prototype[methodName] = function() {
var chainAll = this.__chain__;
if (chain2 || chainAll) {
var result2 = object(this.__wrapped__), actions = result2.__actions__ = copyArray(this.__actions__);
actions.push({ "func": func, "args": arguments, "thisArg": object });
result2.__chain__ = chainAll;
return result2;
}
return func.apply(object, arrayPush([this.value()], arguments));
};
}
});
return object;
}
function noConflict() {
if (root._ === this) {
root._ = oldDash;
}
return this;
}
function noop2() {
}
function nthArg(n2) {
n2 = toInteger(n2);
return baseRest(function(args) {
return baseNth(args, n2);
});
}
var over = createOver(arrayMap);
var overEvery = createOver(arrayEvery);
var overSome = createOver(arraySome);
function property(path2) {
return isKey(path2) ? baseProperty(toKey(path2)) : basePropertyDeep(path2);
}
function propertyOf(object) {
return function(path2) {
return object == null ? undefined2 : baseGet(object, path2);
};
}
var range = createRange();
var rangeRight = createRange(true);
function stubArray() {
return [];
}
function stubFalse() {
return false;
}
function stubObject() {
return {};
}
function stubString() {
return "";
}
function stubTrue() {
return true;
}
function times(n2, iteratee2) {
n2 = toInteger(n2);
if (n2 < 1 || n2 > MAX_SAFE_INTEGER) {
return [];
}
var index = MAX_ARRAY_LENGTH, length = nativeMin(n2, MAX_ARRAY_LENGTH);
iteratee2 = getIteratee(iteratee2);
n2 -= MAX_ARRAY_LENGTH;
var result2 = baseTimes(length, iteratee2);
while (++index < n2) {
iteratee2(index);
}
return result2;
}
function toPath(value) {
if (isArray(value)) {
return arrayMap(value, toKey);
}
return isSymbol(value) ? [value] : copyArray(stringToPath(toString(value)));
}
function uniqueId(prefix2) {
var id = ++idCounter;
return toString(prefix2) + id;
}
var add2 = createMathOperation(function(augend, addend) {
return augend + addend;
}, 0);
var ceil = createRound("ceil");
var divide = createMathOperation(function(dividend, divisor) {
return dividend / divisor;
}, 1);
var floor = createRound("floor");
function max(array) {
return array && array.length ? baseExtremum(array, identity2, baseGt) : undefined2;
}
function maxBy(array, iteratee2) {
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseGt) : undefined2;
}
function mean(array) {
return baseMean(array, identity2);
}
function meanBy(array, iteratee2) {
return baseMean(array, getIteratee(iteratee2, 2));
}
function min(array) {
return array && array.length ? baseExtremum(array, identity2, baseLt) : undefined2;
}
function minBy(array, iteratee2) {
return array && array.length ? baseExtremum(array, getIteratee(iteratee2, 2), baseLt) : undefined2;
}
var multiply = createMathOperation(function(multiplier, multiplicand) {
return multiplier * multiplicand;
}, 1);
var round = createRound("round");
var subtract2 = createMathOperation(function(minuend, subtrahend) {
return minuend - subtrahend;
}, 0);
function sum(array) {
return array && array.length ? baseSum(array, identity2) : 0;
}
function sumBy(array, iteratee2) {
return array && array.length ? baseSum(array, getIteratee(iteratee2, 2)) : 0;
}
lodash.after = after;
lodash.ary = ary;
lodash.assign = assign;
lodash.assignIn = assignIn;
lodash.assignInWith = assignInWith;
lodash.assignWith = assignWith;
lodash.at = at;
lodash.before = before;
lodash.bind = bind;
lodash.bindAll = bindAll;
lodash.bindKey = bindKey;
lodash.castArray = castArray;
lodash.chain = chain;
lodash.chunk = chunk;
lodash.compact = compact;
lodash.concat = concat;
lodash.cond = cond;
lodash.conforms = conforms;
lodash.constant = constant;
lodash.countBy = countBy;
lodash.create = create;
lodash.curry = curry;
lodash.curryRight = curryRight;
lodash.debounce = debounce;
lodash.defaults = defaults;
lodash.defaultsDeep = defaultsDeep;
lodash.defer = defer;
lodash.delay = delay;
lodash.difference = difference;
lodash.differenceBy = differenceBy;
lodash.differenceWith = differenceWith;
lodash.drop = drop;
lodash.dropRight = dropRight;
lodash.dropRightWhile = dropRightWhile;
lodash.dropWhile = dropWhile;
lodash.fill = fill;
lodash.filter = filter2;
lodash.flatMap = flatMap;
lodash.flatMapDeep = flatMapDeep;
lodash.flatMapDepth = flatMapDepth;
lodash.flatten = flatten;
lodash.flattenDeep = flattenDeep;
lodash.flattenDepth = flattenDepth;
lodash.flip = flip;
lodash.flow = flow;
lodash.flowRight = flowRight;
lodash.fromPairs = fromPairs;
lodash.functions = functions;
lodash.functionsIn = functionsIn;
lodash.groupBy = groupBy;
lodash.initial = initial;
lodash.intersection = intersection;
lodash.intersectionBy = intersectionBy;
lodash.intersectionWith = intersectionWith;
lodash.invert = invert;
lodash.invertBy = invertBy;
lodash.invokeMap = invokeMap;
lodash.iteratee = iteratee;
lodash.keyBy = keyBy;
lodash.keys = keys;
lodash.keysIn = keysIn;
lodash.map = map;
lodash.mapKeys = mapKeys;
lodash.mapValues = mapValues;
lodash.matches = matches;
lodash.matchesProperty = matchesProperty;
lodash.memoize = memoize;
lodash.merge = merge;
lodash.mergeWith = mergeWith;
lodash.method = method;
lodash.methodOf = methodOf;
lodash.mixin = mixin;
lodash.negate = negate;
lodash.nthArg = nthArg;
lodash.omit = omit;
lodash.omitBy = omitBy;
lodash.once = once;
lodash.orderBy = orderBy;
lodash.over = over;
lodash.overArgs = overArgs;
lodash.overEvery = overEvery;
lodash.overSome = overSome;
lodash.partial = partial;
lodash.partialRight = partialRight;
lodash.partition = partition;
lodash.pick = pick2;
lodash.pickBy = pickBy;
lodash.property = property;
lodash.propertyOf = propertyOf;
lodash.pull = pull;
lodash.pullAll = pullAll;
lodash.pullAllBy = pullAllBy;
lodash.pullAllWith = pullAllWith;
lodash.pullAt = pullAt;
lodash.range = range;
lodash.rangeRight = rangeRight;
lodash.rearg = rearg;
lodash.reject = reject2;
lodash.remove = remove;
lodash.rest = rest;
lodash.reverse = reverse;
lodash.sampleSize = sampleSize;
lodash.set = set2;
lodash.setWith = setWith;
lodash.shuffle = shuffle;
lodash.slice = slice;
lodash.sortBy = sortBy;
lodash.sortedUniq = sortedUniq;
lodash.sortedUniqBy = sortedUniqBy;
lodash.split = split;
lodash.spread = spread;
lodash.tail = tail;
lodash.take = take;
lodash.takeRight = takeRight;
lodash.takeRightWhile = takeRightWhile;
lodash.takeWhile = takeWhile;
lodash.tap = tap;
lodash.throttle = throttle;
lodash.thru = thru;
lodash.toArray = toArray;
lodash.toPairs = toPairs;
lodash.toPairsIn = toPairsIn;
lodash.toPath = toPath;
lodash.toPlainObject = toPlainObject;
lodash.transform = transform;
lodash.unary = unary;
lodash.union = union;
lodash.unionBy = unionBy;
lodash.unionWith = unionWith;
lodash.uniq = uniq;
lodash.uniqBy = uniqBy;
lodash.uniqWith = uniqWith;
lodash.unset = unset;
lodash.unzip = unzip;
lodash.unzipWith = unzipWith;
lodash.update = update;
lodash.updateWith = updateWith;
lodash.values = values;
lodash.valuesIn = valuesIn;
lodash.without = without;
lodash.words = words;
lodash.wrap = wrap;
lodash.xor = xor;
lodash.xorBy = xorBy;
lodash.xorWith = xorWith;
lodash.zip = zip;
lodash.zipObject = zipObject;
lodash.zipObjectDeep = zipObjectDeep;
lodash.zipWith = zipWith;
lodash.entries = toPairs;
lodash.entriesIn = toPairsIn;
lodash.extend = assignIn;
lodash.extendWith = assignInWith;
mixin(lodash, lodash);
lodash.add = add2;
lodash.attempt = attempt;
lodash.camelCase = camelCase;
lodash.capitalize = capitalize;
lodash.ceil = ceil;
lodash.clamp = clamp;
lodash.clone = clone3;
lodash.cloneDeep = cloneDeep;
lodash.cloneDeepWith = cloneDeepWith;
lodash.cloneWith = cloneWith;
lodash.conformsTo = conformsTo;
lodash.deburr = deburr;
lodash.defaultTo = defaultTo;
lodash.divide = divide;
lodash.endsWith = endsWith;
lodash.eq = eq;
lodash.escape = escape;
lodash.escapeRegExp = escapeRegExp2;
lodash.every = every;
lodash.find = find;
lodash.findIndex = findIndex;
lodash.findKey = findKey;
lodash.findLast = findLast;
lodash.findLastIndex = findLastIndex;
lodash.findLastKey = findLastKey;
lodash.floor = floor;
lodash.forEach = forEach;
lodash.forEachRight = forEachRight;
lodash.forIn = forIn;
lodash.forInRight = forInRight;
lodash.forOwn = forOwn;
lodash.forOwnRight = forOwnRight;
lodash.get = get;
lodash.gt = gt;
lodash.gte = gte;
lodash.has = has2;
lodash.hasIn = hasIn;
lodash.head = head;
lodash.identity = identity2;
lodash.includes = includes;
lodash.indexOf = indexOf;
lodash.inRange = inRange;
lodash.invoke = invoke;
lodash.isArguments = isArguments;
lodash.isArray = isArray;
lodash.isArrayBuffer = isArrayBuffer;
lodash.isArrayLike = isArrayLike;
lodash.isArrayLikeObject = isArrayLikeObject;
lodash.isBoolean = isBoolean;
lodash.isBuffer = isBuffer;
lodash.isDate = isDate2;
lodash.isElement = isElement;
lodash.isEmpty = isEmpty;
lodash.isEqual = isEqual;
lodash.isEqualWith = isEqualWith;
lodash.isError = isError;
lodash.isFinite = isFinite2;
lodash.isFunction = isFunction;
lodash.isInteger = isInteger2;
lodash.isLength = isLength;
lodash.isMap = isMap2;
lodash.isMatch = isMatch;
lodash.isMatchWith = isMatchWith;
lodash.isNaN = isNaN2;
lodash.isNative = isNative;
lodash.isNil = isNil;
lodash.isNull = isNull;
lodash.isNumber = isNumber2;
lodash.isObject = isObject;
lodash.isObjectLike = isObjectLike;
lodash.isPlainObject = isPlainObject2;
lodash.isRegExp = isRegExp;
lodash.isSafeInteger = isSafeInteger;
lodash.isSet = isSet2;
lodash.isString = isString2;
lodash.isSymbol = isSymbol;
lodash.isTypedArray = isTypedArray;
lodash.isUndefined = isUndefined2;
lodash.isWeakMap = isWeakMap;
lodash.isWeakSet = isWeakSet;
lodash.join = join;
lodash.kebabCase = kebabCase;
lodash.last = last;
lodash.lastIndexOf = lastIndexOf;
lodash.lowerCase = lowerCase;
lodash.lowerFirst = lowerFirst;
lodash.lt = lt;
lodash.lte = lte;
lodash.max = max;
lodash.maxBy = maxBy;
lodash.mean = mean;
lodash.meanBy = meanBy;
lodash.min = min;
lodash.minBy = minBy;
lodash.stubArray = stubArray;
lodash.stubFalse = stubFalse;
lodash.stubObject = stubObject;
lodash.stubString = stubString;
lodash.stubTrue = stubTrue;
lodash.multiply = multiply;
lodash.nth = nth;
lodash.noConflict = noConflict;
lodash.noop = noop2;
lodash.now = now3;
lodash.pad = pad;
lodash.padEnd = padEnd;
lodash.padStart = padStart2;
lodash.parseInt = parseInt2;
lodash.random = random;
lodash.reduce = reduce;
lodash.reduceRight = reduceRight;
lodash.repeat = repeat;
lodash.replace = replace;
lodash.result = result;
lodash.round = round;
lodash.runInContext = runInContext2;
lodash.sample = sample;
lodash.size = size;
lodash.snakeCase = snakeCase;
lodash.some = some;
lodash.sortedIndex = sortedIndex;
lodash.sortedIndexBy = sortedIndexBy;
lodash.sortedIndexOf = sortedIndexOf;
lodash.sortedLastIndex = sortedLastIndex;
lodash.sortedLastIndexBy = sortedLastIndexBy;
lodash.sortedLastIndexOf = sortedLastIndexOf;
lodash.startCase = startCase;
lodash.startsWith = startsWith;
lodash.subtract = subtract2;
lodash.sum = sum;
lodash.sumBy = sumBy;
lodash.template = template;
lodash.times = times;
lodash.toFinite = toFinite;
lodash.toInteger = toInteger;
lodash.toLength = toLength;
lodash.toLower = toLower;
lodash.toNumber = toNumber;
lodash.toSafeInteger = toSafeInteger;
lodash.toString = toString;
lodash.toUpper = toUpper;
lodash.trim = trim;
lodash.trimEnd = trimEnd;
lodash.trimStart = trimStart;
lodash.truncate = truncate;
lodash.unescape = unescape;
lodash.uniqueId = uniqueId;
lodash.upperCase = upperCase;
lodash.upperFirst = upperFirst;
lodash.each = forEach;
lodash.eachRight = forEachRight;
lodash.first = head;
mixin(lodash, function() {
var source = {};
baseForOwn(lodash, function(func, methodName) {
if (!hasOwnProperty2.call(lodash.prototype, methodName)) {
source[methodName] = func;
}
});
return source;
}(), { "chain": false });
lodash.VERSION = VERSION;
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
lodash[methodName].placeholder = lodash;
});
arrayEach(["drop", "take"], function(methodName, index) {
LazyWrapper.prototype[methodName] = function(n2) {
n2 = n2 === undefined2 ? 1 : nativeMax(toInteger(n2), 0);
var result2 = this.__filtered__ && !index ? new LazyWrapper(this) : this.clone();
if (result2.__filtered__) {
result2.__takeCount__ = nativeMin(n2, result2.__takeCount__);
} else {
result2.__views__.push({
"size": nativeMin(n2, MAX_ARRAY_LENGTH),
"type": methodName + (result2.__dir__ < 0 ? "Right" : "")
});
}
return result2;
};
LazyWrapper.prototype[methodName + "Right"] = function(n2) {
return this.reverse()[methodName](n2).reverse();
};
});
arrayEach(["filter", "map", "takeWhile"], function(methodName, index) {
var type = index + 1, isFilter = type == LAZY_FILTER_FLAG || type == LAZY_WHILE_FLAG;
LazyWrapper.prototype[methodName] = function(iteratee2) {
var result2 = this.clone();
result2.__iteratees__.push({
"iteratee": getIteratee(iteratee2, 3),
"type": type
});
result2.__filtered__ = result2.__filtered__ || isFilter;
return result2;
};
});
arrayEach(["head", "last"], function(methodName, index) {
var takeName = "take" + (index ? "Right" : "");
LazyWrapper.prototype[methodName] = function() {
return this[takeName](1).value()[0];
};
});
arrayEach(["initial", "tail"], function(methodName, index) {
var dropName = "drop" + (index ? "" : "Right");
LazyWrapper.prototype[methodName] = function() {
return this.__filtered__ ? new LazyWrapper(this) : this[dropName](1);
};
});
LazyWrapper.prototype.compact = function() {
return this.filter(identity2);
};
LazyWrapper.prototype.find = function(predicate) {
return this.filter(predicate).head();
};
LazyWrapper.prototype.findLast = function(predicate) {
return this.reverse().find(predicate);
};
LazyWrapper.prototype.invokeMap = baseRest(function(path2, args) {
if (typeof path2 == "function") {
return new LazyWrapper(this);
}
return this.map(function(value) {
return baseInvoke(value, path2, args);
});
});
LazyWrapper.prototype.reject = function(predicate) {
return this.filter(negate(getIteratee(predicate)));
};
LazyWrapper.prototype.slice = function(start, end) {
start = toInteger(start);
var result2 = this;
if (result2.__filtered__ && (start > 0 || end < 0)) {
return new LazyWrapper(result2);
}
if (start < 0) {
result2 = result2.takeRight(-start);
} else if (start) {
result2 = result2.drop(start);
}
if (end !== undefined2) {
end = toInteger(end);
result2 = end < 0 ? result2.dropRight(-end) : result2.take(end - start);
}
return result2;
};
LazyWrapper.prototype.takeRightWhile = function(predicate) {
return this.reverse().takeWhile(predicate).reverse();
};
LazyWrapper.prototype.toArray = function() {
return this.take(MAX_ARRAY_LENGTH);
};
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var checkIteratee = /^(?:filter|find|map|reject)|While$/.test(methodName), isTaker = /^(?:head|last)$/.test(methodName), lodashFunc = lodash[isTaker ? "take" + (methodName == "last" ? "Right" : "") : methodName], retUnwrapped = isTaker || /^find/.test(methodName);
if (!lodashFunc) {
return;
}
lodash.prototype[methodName] = function() {
var value = this.__wrapped__, args = isTaker ? [1] : arguments, isLazy = value instanceof LazyWrapper, iteratee2 = args[0], useLazy = isLazy || isArray(value);
var interceptor = function(value2) {
var result3 = lodashFunc.apply(lodash, arrayPush([value2], args));
return isTaker && chainAll ? result3[0] : result3;
};
if (useLazy && checkIteratee && typeof iteratee2 == "function" && iteratee2.length != 1) {
isLazy = useLazy = false;
}
var chainAll = this.__chain__, isHybrid = !!this.__actions__.length, isUnwrapped = retUnwrapped && !chainAll, onlyLazy = isLazy && !isHybrid;
if (!retUnwrapped && useLazy) {
value = onlyLazy ? value : new LazyWrapper(this);
var result2 = func.apply(value, args);
result2.__actions__.push({ "func": thru, "args": [interceptor], "thisArg": undefined2 });
return new LodashWrapper(result2, chainAll);
}
if (isUnwrapped && onlyLazy) {
return func.apply(this, args);
}
result2 = this.thru(interceptor);
return isUnwrapped ? isTaker ? result2.value()[0] : result2.value() : result2;
};
});
arrayEach(["pop", "push", "shift", "sort", "splice", "unshift"], function(methodName) {
var func = arrayProto[methodName], chainName = /^(?:push|sort|unshift)$/.test(methodName) ? "tap" : "thru", retUnwrapped = /^(?:pop|shift)$/.test(methodName);
lodash.prototype[methodName] = function() {
var args = arguments;
if (retUnwrapped && !this.__chain__) {
var value = this.value();
return func.apply(isArray(value) ? value : [], args);
}
return this[chainName](function(value2) {
return func.apply(isArray(value2) ? value2 : [], args);
});
};
});
baseForOwn(LazyWrapper.prototype, function(func, methodName) {
var lodashFunc = lodash[methodName];
if (lodashFunc) {
var key2 = lodashFunc.name + "";
if (!hasOwnProperty2.call(realNames, key2)) {
realNames[key2] = [];
}
realNames[key2].push({ "name": methodName, "func": lodashFunc });
}
});
realNames[createHybrid(undefined2, WRAP_BIND_KEY_FLAG).name] = [{
"name": "wrapper",
"func": undefined2
}];
LazyWrapper.prototype.clone = lazyClone;
LazyWrapper.prototype.reverse = lazyReverse;
LazyWrapper.prototype.value = lazyValue;
lodash.prototype.at = wrapperAt;
lodash.prototype.chain = wrapperChain;
lodash.prototype.commit = wrapperCommit;
lodash.prototype.next = wrapperNext;
lodash.prototype.plant = wrapperPlant;
lodash.prototype.reverse = wrapperReverse;
lodash.prototype.toJSON = lodash.prototype.valueOf = lodash.prototype.value = wrapperValue;
lodash.prototype.first = lodash.prototype.head;
if (symIterator) {
lodash.prototype[symIterator] = wrapperToIterator;
}
return lodash;
};
var _18 = runInContext();
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
root._ = _18;
define(function() {
return _18;
});
} else if (freeModule) {
(freeModule.exports = _18)._ = _18;
freeExports._ = _18;
} else {
root._ = _18;
}
}).call(exports);
}
});
// node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js
var require_react_development = __commonJS({
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react.development.js"(exports, module2) {
"use strict";
if (true) {
(function() {
"use strict";
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var ReactVersion = "18.3.1";
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = "@@iterator";
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== "object") {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === "function") {
return maybeIterator;
}
return null;
}
var ReactCurrentDispatcher = {
/**
* @internal
* @type {ReactComponent}
*/
current: null
};
var ReactCurrentBatchConfig = {
transition: null
};
var ReactCurrentActQueue = {
current: null,
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
isBatchingLegacy: false,
didScheduleLegacyUpdate: false
};
var ReactCurrentOwner = {
/**
* @internal
* @type {ReactComponent}
*/
current: null
};
var ReactDebugCurrentFrame = {};
var currentExtraStackFrame = null;
function setExtraStackFrame(stack) {
{
currentExtraStackFrame = stack;
}
}
{
ReactDebugCurrentFrame.setExtraStackFrame = function(stack) {
{
currentExtraStackFrame = stack;
}
};
ReactDebugCurrentFrame.getCurrentStack = null;
ReactDebugCurrentFrame.getStackAddendum = function() {
var stack = "";
if (currentExtraStackFrame) {
stack += currentExtraStackFrame;
}
var impl = ReactDebugCurrentFrame.getCurrentStack;
if (impl) {
stack += impl() || "";
}
return stack;
};
}
var enableScopeAPI = false;
var enableCacheElement = false;
var enableTransitionTracing = false;
var enableLegacyHidden = false;
var enableDebugTracing = false;
var ReactSharedInternals = {
ReactCurrentDispatcher,
ReactCurrentBatchConfig,
ReactCurrentOwner
};
{
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
}
function warn(format) {
{
{
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
printWarning("warn", format, args);
}
}
}
function error(format) {
{
{
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning("error", format, args);
}
}
}
function printWarning(level, format, args) {
{
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame2.getStackAddendum();
if (stack !== "") {
format += "%s";
args = args.concat([stack]);
}
var argsWithFormat = args.map(function(item) {
return String(item);
});
argsWithFormat.unshift("Warning: " + format);
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var didWarnStateUpdateForUnmountedComponent = {};
function warnNoop(publicInstance, callerName) {
{
var _constructor = publicInstance.constructor;
var componentName = _constructor && (_constructor.displayName || _constructor.name) || "ReactClass";
var warningKey = componentName + "." + callerName;
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
return;
}
error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.", callerName, componentName);
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
}
}
var ReactNoopUpdateQueue = {
/**
* Checks whether or not this composite component is mounted.
* @param {ReactClass} publicInstance The instance we want to test.
* @return {boolean} True if mounted, false otherwise.
* @protected
* @final
*/
isMounted: function(publicInstance) {
return false;
},
/**
* Forces an update. This should only be invoked when it is known with
* certainty that we are **not** in a DOM transaction.
*
* You may want to call this when you know that some deeper aspect of the
* component's state has changed but `setState` was not called.
*
* This will not invoke `shouldComponentUpdate`, but it will invoke
* `componentWillUpdate` and `componentDidUpdate`.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {?function} callback Called after component is updated.
* @param {?string} callerName name of the calling function in the public API.
* @internal
*/
enqueueForceUpdate: function(publicInstance, callback, callerName) {
warnNoop(publicInstance, "forceUpdate");
},
/**
* Replaces all of the state. Always use this or `setState` to mutate state.
* You should treat `this.state` as immutable.
*
* There is no guarantee that `this.state` will be immediately updated, so
* accessing `this.state` after calling this method may return the old value.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} completeState Next state.
* @param {?function} callback Called after component is updated.
* @param {?string} callerName name of the calling function in the public API.
* @internal
*/
enqueueReplaceState: function(publicInstance, completeState, callback, callerName) {
warnNoop(publicInstance, "replaceState");
},
/**
* Sets a subset of the state. This only exists because _pendingState is
* internal. This provides a merging strategy that is not available to deep
* properties which is confusing. TODO: Expose pendingState or don't use it
* during the merge.
*
* @param {ReactClass} publicInstance The instance that should rerender.
* @param {object} partialState Next partial state to be merged with state.
* @param {?function} callback Called after component is updated.
* @param {?string} Name of the calling function in the public API.
* @internal
*/
enqueueSetState: function(publicInstance, partialState, callback, callerName) {
warnNoop(publicInstance, "setState");
}
};
var assign = Object.assign;
var emptyObject = {};
{
Object.freeze(emptyObject);
}
function Component3(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
Component3.prototype.isReactComponent = {};
Component3.prototype.setState = function(partialState, callback) {
if (typeof partialState !== "object" && typeof partialState !== "function" && partialState != null) {
throw new Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");
}
this.updater.enqueueSetState(this, partialState, callback, "setState");
};
Component3.prototype.forceUpdate = function(callback) {
this.updater.enqueueForceUpdate(this, callback, "forceUpdate");
};
{
var deprecatedAPIs = {
isMounted: ["isMounted", "Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],
replaceState: ["replaceState", "Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]
};
var defineDeprecationWarning = function(methodName, info) {
Object.defineProperty(Component3.prototype, methodName, {
get: function() {
warn("%s(...) is deprecated in plain JavaScript React classes. %s", info[0], info[1]);
return void 0;
}
});
};
for (var fnName in deprecatedAPIs) {
if (deprecatedAPIs.hasOwnProperty(fnName)) {
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
}
}
}
function ComponentDummy() {
}
ComponentDummy.prototype = Component3.prototype;
function PureComponent(props, context, updater) {
this.props = props;
this.context = context;
this.refs = emptyObject;
this.updater = updater || ReactNoopUpdateQueue;
}
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
pureComponentPrototype.constructor = PureComponent;
assign(pureComponentPrototype, Component3.prototype);
pureComponentPrototype.isPureReactComponent = true;
function createRef() {
var refObject = {
current: null
};
{
Object.seal(refObject);
}
return refObject;
}
var isArrayImpl = Array.isArray;
function isArray(a) {
return isArrayImpl(a);
}
function typeName(value) {
{
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
return type;
}
}
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || "";
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
}
function getContextName(type) {
return type.displayName || "Context";
}
function getComponentNameFromType(type) {
if (type == null) {
return null;
}
{
if (typeof type.tag === "number") {
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
}
}
if (typeof type === "function") {
return type.displayName || type.name || null;
}
if (typeof type === "string") {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + ".Consumer";
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + ".Provider";
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, "ForwardRef");
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
}
}
return null;
}
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
{
didWarnAboutStringRefs = {};
}
function hasValidRef(config) {
{
if (hasOwnProperty2.call(config, "ref")) {
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== void 0;
}
function hasValidKey(config) {
{
if (hasOwnProperty2.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== void 0;
}
function defineKeyPropWarningGetter(props, displayName) {
var warnAboutAccessingKey = function() {
{
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
function defineRefPropWarningGetter(props, displayName) {
var warnAboutAccessingRef = function() {
{
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, "ref", {
get: warnAboutAccessingRef,
configurable: true
});
}
function warnIfStringRefCannotBeAutoConverted(config) {
{
if (typeof config.ref === "string" && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
if (!didWarnAboutStringRefs[componentName]) {
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
didWarnAboutStringRefs[componentName] = true;
}
}
}
}
var ReactElement = function(type, key2, ref, self2, source, owner, props) {
var element = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type,
key: key2,
ref,
props,
// Record the component responsible for creating this element.
_owner: owner
};
{
element._store = {};
Object.defineProperty(element._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: false
});
Object.defineProperty(element, "_self", {
configurable: false,
enumerable: false,
writable: false,
value: self2
});
Object.defineProperty(element, "_source", {
configurable: false,
enumerable: false,
writable: false,
value: source
});
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
function createElement(type, config, children) {
var propName;
var props = {};
var key2 = null;
var ref = null;
var self2 = null;
var source = null;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
{
warnIfStringRefCannotBeAutoConverted(config);
}
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key2 = "" + config.key;
}
self2 = config.__self === void 0 ? null : config.__self;
source = config.__source === void 0 ? null : config.__source;
for (propName in config) {
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
}
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
{
if (Object.freeze) {
Object.freeze(childArray);
}
}
props.children = childArray;
}
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
}
{
if (key2 || ref) {
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
if (key2) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
}
return ReactElement(type, key2, ref, self2, source, ReactCurrentOwner.current, props);
}
function cloneAndReplaceKey(oldElement, newKey) {
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
return newElement;
}
function cloneElement3(element, config, children) {
if (element === null || element === void 0) {
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
}
var propName;
var props = assign({}, element.props);
var key2 = element.key;
var ref = element.ref;
var self2 = element._self;
var source = element._source;
var owner = element._owner;
if (config != null) {
if (hasValidRef(config)) {
ref = config.ref;
owner = ReactCurrentOwner.current;
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key2 = "" + config.key;
}
var defaultProps;
if (element.type && element.type.defaultProps) {
defaultProps = element.type.defaultProps;
}
for (propName in config) {
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
if (config[propName] === void 0 && defaultProps !== void 0) {
props[propName] = defaultProps[propName];
} else {
props[propName] = config[propName];
}
}
}
}
var childrenLength = arguments.length - 2;
if (childrenLength === 1) {
props.children = children;
} else if (childrenLength > 1) {
var childArray = Array(childrenLength);
for (var i = 0; i < childrenLength; i++) {
childArray[i] = arguments[i + 2];
}
props.children = childArray;
}
return ReactElement(element.type, key2, ref, self2, source, owner, props);
}
function isValidElement(object) {
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
var SEPARATOR = ".";
var SUBSEPARATOR = ":";
function escape(key2) {
var escapeRegex = /[=:]/g;
var escaperLookup = {
"=": "=0",
":": "=2"
};
var escapedString = key2.replace(escapeRegex, function(match2) {
return escaperLookup[match2];
});
return "$" + escapedString;
}
var didWarnAboutMaps = false;
var userProvidedKeyEscapeRegex = /\/+/g;
function escapeUserProvidedKey(text) {
return text.replace(userProvidedKeyEscapeRegex, "$&/");
}
function getElementKey(element, index) {
if (typeof element === "object" && element !== null && element.key != null) {
{
checkKeyStringCoercion(element.key);
}
return escape("" + element.key);
}
return index.toString(36);
}
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
var type = typeof children;
if (type === "undefined" || type === "boolean") {
children = null;
}
var invokeCallback = false;
if (children === null) {
invokeCallback = true;
} else {
switch (type) {
case "string":
case "number":
invokeCallback = true;
break;
case "object":
switch (children.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
invokeCallback = true;
}
}
}
if (invokeCallback) {
var _child = children;
var mappedChild = callback(_child);
var childKey = nameSoFar === "" ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
if (isArray(mappedChild)) {
var escapedChildKey = "";
if (childKey != null) {
escapedChildKey = escapeUserProvidedKey(childKey) + "/";
}
mapIntoArray(mappedChild, array, escapedChildKey, "", function(c) {
return c;
});
} else if (mappedChild != null) {
if (isValidElement(mappedChild)) {
{
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
checkKeyStringCoercion(mappedChild.key);
}
}
mappedChild = cloneAndReplaceKey(
mappedChild,
// Keep both the (mapped) and old keys if they differ, just as
// traverseAllChildren used to do for objects as children
escapedPrefix + // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
(mappedChild.key && (!_child || _child.key !== mappedChild.key) ? (
// $FlowFixMe Flow incorrectly thinks existing element's key can be a number
// eslint-disable-next-line react-internal/safe-string-coercion
escapeUserProvidedKey("" + mappedChild.key) + "/"
) : "") + childKey
);
}
array.push(mappedChild);
}
return 1;
}
var child;
var nextName;
var subtreeCount = 0;
var nextNamePrefix = nameSoFar === "" ? SEPARATOR : nameSoFar + SUBSEPARATOR;
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
child = children[i];
nextName = nextNamePrefix + getElementKey(child, i);
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
}
} else {
var iteratorFn = getIteratorFn(children);
if (typeof iteratorFn === "function") {
var iterableChildren = children;
{
if (iteratorFn === iterableChildren.entries) {
if (!didWarnAboutMaps) {
warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
}
didWarnAboutMaps = true;
}
}
var iterator = iteratorFn.call(iterableChildren);
var step;
var ii = 0;
while (!(step = iterator.next()).done) {
child = step.value;
nextName = nextNamePrefix + getElementKey(child, ii++);
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
}
} else if (type === "object") {
var childrenString = String(children);
throw new Error("Objects are not valid as a React child (found: " + (childrenString === "[object Object]" ? "object with keys {" + Object.keys(children).join(", ") + "}" : childrenString) + "). If you meant to render a collection of children, use an array instead.");
}
}
return subtreeCount;
}
function mapChildren(children, func, context) {
if (children == null) {
return children;
}
var result = [];
var count = 0;
mapIntoArray(children, result, "", "", function(child) {
return func.call(context, child, count++);
});
return result;
}
function countChildren(children) {
var n2 = 0;
mapChildren(children, function() {
n2++;
});
return n2;
}
function forEachChildren(children, forEachFunc, forEachContext) {
mapChildren(children, function() {
forEachFunc.apply(this, arguments);
}, forEachContext);
}
function toArray(children) {
return mapChildren(children, function(child) {
return child;
}) || [];
}
function onlyChild(children) {
if (!isValidElement(children)) {
throw new Error("React.Children.only expected to receive a single React element child.");
}
return children;
}
function createContext2(defaultValue2) {
var context = {
$$typeof: REACT_CONTEXT_TYPE,
// As a workaround to support multiple concurrent renderers, we categorize
// some renderers as primary and others as secondary. We only expect
// there to be two concurrent renderers at most: React Native (primary) and
// Fabric (secondary); React DOM (primary) and React ART (secondary).
// Secondary renderers store their context values on separate fields.
_currentValue: defaultValue2,
_currentValue2: defaultValue2,
// Used to track how many concurrent renderers this context currently
// supports within in a single renderer. Such as parallel server rendering.
_threadCount: 0,
// These are circular
Provider: null,
Consumer: null,
// Add these to use same hidden class in VM as ServerContext
_defaultValue: null,
_globalName: null
};
context.Provider = {
$$typeof: REACT_PROVIDER_TYPE,
_context: context
};
var hasWarnedAboutUsingNestedContextConsumers = false;
var hasWarnedAboutUsingConsumerProvider = false;
var hasWarnedAboutDisplayNameOnConsumer = false;
{
var Consumer = {
$$typeof: REACT_CONTEXT_TYPE,
_context: context
};
Object.defineProperties(Consumer, {
Provider: {
get: function() {
if (!hasWarnedAboutUsingConsumerProvider) {
hasWarnedAboutUsingConsumerProvider = true;
error("Rendering <Context.Consumer.Provider> is not supported and will be removed in a future major release. Did you mean to render <Context.Provider> instead?");
}
return context.Provider;
},
set: function(_Provider) {
context.Provider = _Provider;
}
},
_currentValue: {
get: function() {
return context._currentValue;
},
set: function(_currentValue) {
context._currentValue = _currentValue;
}
},
_currentValue2: {
get: function() {
return context._currentValue2;
},
set: function(_currentValue2) {
context._currentValue2 = _currentValue2;
}
},
_threadCount: {
get: function() {
return context._threadCount;
},
set: function(_threadCount) {
context._threadCount = _threadCount;
}
},
Consumer: {
get: function() {
if (!hasWarnedAboutUsingNestedContextConsumers) {
hasWarnedAboutUsingNestedContextConsumers = true;
error("Rendering <Context.Consumer.Consumer> is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
}
return context.Consumer;
}
},
displayName: {
get: function() {
return context.displayName;
},
set: function(displayName) {
if (!hasWarnedAboutDisplayNameOnConsumer) {
warn("Setting `displayName` on Context.Consumer has no effect. You should set it directly on the context with Context.displayName = '%s'.", displayName);
hasWarnedAboutDisplayNameOnConsumer = true;
}
}
}
});
context.Consumer = Consumer;
}
{
context._currentRenderer = null;
context._currentRenderer2 = null;
}
return context;
}
var Uninitialized = -1;
var Pending = 0;
var Resolved = 1;
var Rejected = 2;
function lazyInitializer(payload) {
if (payload._status === Uninitialized) {
var ctor = payload._result;
var thenable = ctor();
thenable.then(function(moduleObject2) {
if (payload._status === Pending || payload._status === Uninitialized) {
var resolved = payload;
resolved._status = Resolved;
resolved._result = moduleObject2;
}
}, function(error2) {
if (payload._status === Pending || payload._status === Uninitialized) {
var rejected = payload;
rejected._status = Rejected;
rejected._result = error2;
}
});
if (payload._status === Uninitialized) {
var pending = payload;
pending._status = Pending;
pending._result = thenable;
}
}
if (payload._status === Resolved) {
var moduleObject = payload._result;
{
if (moduleObject === void 0) {
error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly braces around the import?", moduleObject);
}
}
{
if (!("default" in moduleObject)) {
error("lazy: Expected the result of a dynamic import() call. Instead received: %s\n\nYour code should look like: \n const MyComponent = lazy(() => import('./MyComponent'))", moduleObject);
}
}
return moduleObject.default;
} else {
throw payload._result;
}
}
function lazy(ctor) {
var payload = {
// We use these fields to store the result.
_status: Uninitialized,
_result: ctor
};
var lazyType = {
$$typeof: REACT_LAZY_TYPE,
_payload: payload,
_init: lazyInitializer
};
{
var defaultProps;
var propTypes;
Object.defineProperties(lazyType, {
defaultProps: {
configurable: true,
get: function() {
return defaultProps;
},
set: function(newDefaultProps) {
error("React.lazy(...): It is not supported to assign `defaultProps` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
defaultProps = newDefaultProps;
Object.defineProperty(lazyType, "defaultProps", {
enumerable: true
});
}
},
propTypes: {
configurable: true,
get: function() {
return propTypes;
},
set: function(newPropTypes) {
error("React.lazy(...): It is not supported to assign `propTypes` to a lazy component import. Either specify them where the component is defined, or create a wrapping component around it.");
propTypes = newPropTypes;
Object.defineProperty(lazyType, "propTypes", {
enumerable: true
});
}
}
});
}
return lazyType;
}
function forwardRef3(render) {
{
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...)).");
} else if (typeof render !== "function") {
error("forwardRef requires a render function but was given %s.", render === null ? "null" : typeof render);
} else {
if (render.length !== 0 && render.length !== 2) {
error("forwardRef render functions accept exactly two parameters: props and ref. %s", render.length === 1 ? "Did you forget to use the ref parameter?" : "Any additional parameter will be undefined.");
}
}
if (render != null) {
if (render.defaultProps != null || render.propTypes != null) {
error("forwardRef render functions do not support propTypes or defaultProps. Did you accidentally pass a React component?");
}
}
}
var elementType = {
$$typeof: REACT_FORWARD_REF_TYPE,
render
};
{
var ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name) {
ownName = name;
if (!render.name && !render.displayName) {
render.displayName = name;
}
}
});
}
return elementType;
}
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
}
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
return true;
}
if (typeof type === "object" && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
return true;
}
}
return false;
}
function memo3(type, compare) {
{
if (!isValidElementType(type)) {
error("memo: The first argument must be a component. Instead received: %s", type === null ? "null" : typeof type);
}
}
var elementType = {
$$typeof: REACT_MEMO_TYPE,
type,
compare: compare === void 0 ? null : compare
};
{
var ownName;
Object.defineProperty(elementType, "displayName", {
enumerable: false,
configurable: true,
get: function() {
return ownName;
},
set: function(name) {
ownName = name;
if (!type.name && !type.displayName) {
type.displayName = name;
}
}
});
}
return elementType;
}
function resolveDispatcher() {
var dispatcher = ReactCurrentDispatcher.current;
{
if (dispatcher === null) {
error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
}
}
return dispatcher;
}
function useContext2(Context) {
var dispatcher = resolveDispatcher();
{
if (Context._context !== void 0) {
var realContext = Context._context;
if (realContext.Consumer === Context) {
error("Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be removed in a future major release. Did you mean to call useContext(Context) instead?");
} else if (realContext.Provider === Context) {
error("Calling useContext(Context.Provider) is not supported. Did you mean to call useContext(Context) instead?");
}
}
}
return dispatcher.useContext(Context);
}
function useState10(initialState) {
var dispatcher = resolveDispatcher();
return dispatcher.useState(initialState);
}
function useReducer2(reducer2, initialArg, init) {
var dispatcher = resolveDispatcher();
return dispatcher.useReducer(reducer2, initialArg, init);
}
function useRef13(initialValue) {
var dispatcher = resolveDispatcher();
return dispatcher.useRef(initialValue);
}
function useEffect14(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useEffect(create, deps);
}
function useInsertionEffect(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useInsertionEffect(create, deps);
}
function useLayoutEffect3(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useLayoutEffect(create, deps);
}
function useCallback4(callback, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useCallback(callback, deps);
}
function useMemo5(create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useMemo(create, deps);
}
function useImperativeHandle(ref, create, deps) {
var dispatcher = resolveDispatcher();
return dispatcher.useImperativeHandle(ref, create, deps);
}
function useDebugValue2(value, formatterFn) {
{
var dispatcher = resolveDispatcher();
return dispatcher.useDebugValue(value, formatterFn);
}
}
function useTransition() {
var dispatcher = resolveDispatcher();
return dispatcher.useTransition();
}
function useDeferredValue(value) {
var dispatcher = resolveDispatcher();
return dispatcher.useDeferredValue(value);
}
function useId() {
var dispatcher = resolveDispatcher();
return dispatcher.useId();
}
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var dispatcher = resolveDispatcher();
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
}
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {
}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
var props = {
configurable: true,
enumerable: true,
writable: true
};
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
}
if (disabledDepth < 0) {
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
}
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
var prefix2;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix2 === void 0) {
try {
throw Error();
} catch (x) {
var match2 = x.stack.trim().match(/\n( *(at )?)/);
prefix2 = match2 && match2[1] || "";
}
}
return "\n" + prefix2 + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) {
return "";
}
{
var frame = componentFrameCache.get(fn);
if (frame !== void 0) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = null;
disableLogs();
}
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if (typeof Reflect === "object" && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
if (sample && control && typeof sample.stack === "string") {
var sampleLines = sample.stack.split("\n");
var controlLines = control.stack.split("\n");
var s2 = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s2 >= 1 && c >= 0 && sampleLines[s2] !== controlLines[c]) {
c--;
}
for (; s2 >= 1 && c >= 0; s2--, c--) {
if (sampleLines[s2] !== controlLines[c]) {
if (s2 !== 1 || c !== 1) {
do {
s2--;
c--;
if (c < 0 || sampleLines[s2] !== controlLines[c]) {
var _frame = "\n" + sampleLines[s2].replace(" at new ", " at ");
if (fn.displayName && _frame.includes("<anonymous>")) {
_frame = _frame.replace("<anonymous>", fn.displayName);
}
{
if (typeof fn === "function") {
componentFrameCache.set(fn, _frame);
}
}
return _frame;
}
} while (s2 >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher$1.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
}
var name = fn ? fn.displayName || fn.name : "";
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
{
if (typeof fn === "function") {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component4) {
var prototype = Component4.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return "";
}
if (typeof type === "function") {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === "string") {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame("Suspense");
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame("SuspenseList");
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {
}
}
}
}
return "";
}
var loggedTypeFailures = {};
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
var has2 = Function.call.bind(hasOwnProperty2);
for (var typeSpecName in typeSpecs) {
if (has2(typeSpecs, typeSpecName)) {
var error$1 = void 0;
try {
if (typeof typeSpecs[typeSpecName] !== "function") {
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
err.name = "Invariant Violation";
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error("Failed %s type: %s", location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
setExtraStackFrame(stack);
} else {
setExtraStackFrame(null);
}
}
}
var propTypesMisspellWarningShown;
{
propTypesMisspellWarningShown = false;
}
function getDeclarationErrorAddendum() {
if (ReactCurrentOwner.current) {
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
if (name) {
return "\n\nCheck the render method of `" + name + "`.";
}
}
return "";
}
function getSourceInfoErrorAddendum(source) {
if (source !== void 0) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}
return "";
}
function getSourceInfoErrorAddendumForProps(elementProps) {
if (elementProps !== null && elementProps !== void 0) {
return getSourceInfoErrorAddendum(elementProps.__source);
}
return "";
}
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
}
}
return info;
}
function validateExplicitKey(element, parentType) {
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
return;
}
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
var childOwner = "";
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
}
{
setCurrentlyValidatingElement$1(element);
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
setCurrentlyValidatingElement$1(null);
}
}
function validateChildKeys(node, parentType) {
if (typeof node !== "object") {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (isValidElement(node)) {
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (typeof iteratorFn === "function") {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === void 0 || typeof type === "string") {
return;
}
var propTypes;
if (typeof type === "function") {
propTypes = type.propTypes;
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
type.$$typeof === REACT_MEMO_TYPE)) {
propTypes = type.propTypes;
} else {
return;
}
if (propTypes) {
var name = getComponentNameFromType(type);
checkPropTypes(propTypes, element.props, "prop", name, element);
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = true;
var _name = getComponentNameFromType(type);
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
}
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
}
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key2 = keys[i];
if (key2 !== "children" && key2 !== "key") {
setCurrentlyValidatingElement$1(fragment);
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key2);
setCurrentlyValidatingElement$1(null);
break;
}
}
if (fragment.ref !== null) {
setCurrentlyValidatingElement$1(fragment);
error("Invalid attribute `ref` supplied to `React.Fragment`.");
setCurrentlyValidatingElement$1(null);
}
}
}
function createElementWithValidation(type, props, children) {
var validType = isValidElementType(type);
if (!validType) {
var info = "";
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
}
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
var typeString;
if (type === null) {
typeString = "null";
} else if (isArray(type)) {
typeString = "array";
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
info = " Did you accidentally export a JSX literal instead of a component?";
} else {
typeString = typeof type;
}
{
error("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
}
}
var element = createElement.apply(this, arguments);
if (element == null) {
return element;
}
if (validType) {
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], type);
}
}
if (type === REACT_FRAGMENT_TYPE) {
validateFragmentProps(element);
} else {
validatePropTypes(element);
}
return element;
}
var didWarnAboutDeprecatedCreateFactory = false;
function createFactoryWithValidation(type) {
var validatedFactory = createElementWithValidation.bind(null, type);
validatedFactory.type = type;
{
if (!didWarnAboutDeprecatedCreateFactory) {
didWarnAboutDeprecatedCreateFactory = true;
warn("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.");
}
Object.defineProperty(validatedFactory, "type", {
enumerable: false,
get: function() {
warn("Factory.type is deprecated. Access the class directly before passing it to createFactory.");
Object.defineProperty(this, "type", {
value: type
});
return type;
}
});
}
return validatedFactory;
}
function cloneElementWithValidation(element, props, children) {
var newElement = cloneElement3.apply(this, arguments);
for (var i = 2; i < arguments.length; i++) {
validateChildKeys(arguments[i], newElement.type);
}
validatePropTypes(newElement);
return newElement;
}
function startTransition(scope, options) {
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = {};
var currentTransition = ReactCurrentBatchConfig.transition;
{
ReactCurrentBatchConfig.transition._updatedFibers = /* @__PURE__ */ new Set();
}
try {
scope();
} finally {
ReactCurrentBatchConfig.transition = prevTransition;
{
if (prevTransition === null && currentTransition._updatedFibers) {
var updatedFibersCount = currentTransition._updatedFibers.size;
if (updatedFibersCount > 10) {
warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
}
currentTransition._updatedFibers.clear();
}
}
}
}
var didWarnAboutMessageChannel = false;
var enqueueTaskImpl = null;
function enqueueTask(task) {
if (enqueueTaskImpl === null) {
try {
var requireString = ("require" + Math.random()).slice(0, 7);
var nodeRequire = module2 && module2[requireString];
enqueueTaskImpl = nodeRequire.call(module2, "timers").setImmediate;
} catch (_err) {
enqueueTaskImpl = function(callback) {
{
if (didWarnAboutMessageChannel === false) {
didWarnAboutMessageChannel = true;
if (typeof MessageChannel === "undefined") {
error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.");
}
}
}
var channel = new MessageChannel();
channel.port1.onmessage = callback;
channel.port2.postMessage(void 0);
};
}
}
return enqueueTaskImpl(task);
}
var actScopeDepth = 0;
var didWarnNoAwaitAct = false;
function act(callback) {
{
var prevActScopeDepth = actScopeDepth;
actScopeDepth++;
if (ReactCurrentActQueue.current === null) {
ReactCurrentActQueue.current = [];
}
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
var result;
try {
ReactCurrentActQueue.isBatchingLegacy = true;
result = callback();
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
var queue = ReactCurrentActQueue.current;
if (queue !== null) {
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
flushActQueue(queue);
}
}
} catch (error2) {
popActScope(prevActScopeDepth);
throw error2;
} finally {
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
}
if (result !== null && typeof result === "object" && typeof result.then === "function") {
var thenableResult = result;
var wasAwaited = false;
var thenable = {
then: function(resolve, reject2) {
wasAwaited = true;
thenableResult.then(function(returnValue2) {
popActScope(prevActScopeDepth);
if (actScopeDepth === 0) {
recursivelyFlushAsyncActWork(returnValue2, resolve, reject2);
} else {
resolve(returnValue2);
}
}, function(error2) {
popActScope(prevActScopeDepth);
reject2(error2);
});
}
};
{
if (!didWarnNoAwaitAct && typeof Promise !== "undefined") {
Promise.resolve().then(function() {
}).then(function() {
if (!wasAwaited) {
didWarnNoAwaitAct = true;
error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);");
}
});
}
}
return thenable;
} else {
var returnValue = result;
popActScope(prevActScopeDepth);
if (actScopeDepth === 0) {
var _queue = ReactCurrentActQueue.current;
if (_queue !== null) {
flushActQueue(_queue);
ReactCurrentActQueue.current = null;
}
var _thenable = {
then: function(resolve, reject2) {
if (ReactCurrentActQueue.current === null) {
ReactCurrentActQueue.current = [];
recursivelyFlushAsyncActWork(returnValue, resolve, reject2);
} else {
resolve(returnValue);
}
}
};
return _thenable;
} else {
var _thenable2 = {
then: function(resolve, reject2) {
resolve(returnValue);
}
};
return _thenable2;
}
}
}
}
function popActScope(prevActScopeDepth) {
{
if (prevActScopeDepth !== actScopeDepth - 1) {
error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. ");
}
actScopeDepth = prevActScopeDepth;
}
}
function recursivelyFlushAsyncActWork(returnValue, resolve, reject2) {
{
var queue = ReactCurrentActQueue.current;
if (queue !== null) {
try {
flushActQueue(queue);
enqueueTask(function() {
if (queue.length === 0) {
ReactCurrentActQueue.current = null;
resolve(returnValue);
} else {
recursivelyFlushAsyncActWork(returnValue, resolve, reject2);
}
});
} catch (error2) {
reject2(error2);
}
} else {
resolve(returnValue);
}
}
}
var isFlushing = false;
function flushActQueue(queue) {
{
if (!isFlushing) {
isFlushing = true;
var i = 0;
try {
for (; i < queue.length; i++) {
var callback = queue[i];
do {
callback = callback(true);
} while (callback !== null);
}
queue.length = 0;
} catch (error2) {
queue = queue.slice(i + 1);
throw error2;
} finally {
isFlushing = false;
}
}
}
}
var createElement$1 = createElementWithValidation;
var cloneElement$1 = cloneElementWithValidation;
var createFactory = createFactoryWithValidation;
var Children = {
map: mapChildren,
forEach: forEachChildren,
count: countChildren,
toArray,
only: onlyChild
};
exports.Children = Children;
exports.Component = Component3;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.Profiler = REACT_PROFILER_TYPE;
exports.PureComponent = PureComponent;
exports.StrictMode = REACT_STRICT_MODE_TYPE;
exports.Suspense = REACT_SUSPENSE_TYPE;
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
exports.act = act;
exports.cloneElement = cloneElement$1;
exports.createContext = createContext2;
exports.createElement = createElement$1;
exports.createFactory = createFactory;
exports.createRef = createRef;
exports.forwardRef = forwardRef3;
exports.isValidElement = isValidElement;
exports.lazy = lazy;
exports.memo = memo3;
exports.startTransition = startTransition;
exports.unstable_act = act;
exports.useCallback = useCallback4;
exports.useContext = useContext2;
exports.useDebugValue = useDebugValue2;
exports.useDeferredValue = useDeferredValue;
exports.useEffect = useEffect14;
exports.useId = useId;
exports.useImperativeHandle = useImperativeHandle;
exports.useInsertionEffect = useInsertionEffect;
exports.useLayoutEffect = useLayoutEffect3;
exports.useMemo = useMemo5;
exports.useReducer = useReducer2;
exports.useRef = useRef13;
exports.useState = useState10;
exports.useSyncExternalStore = useSyncExternalStore;
exports.useTransition = useTransition;
exports.version = ReactVersion;
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
}
});
// node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
var require_react = __commonJS({
"node_modules/.pnpm/react@18.3.1/node_modules/react/index.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_react_development();
}
}
});
// node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js
var require_scheduler_development = __commonJS({
"node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/cjs/scheduler.development.js"(exports) {
"use strict";
if (true) {
(function() {
"use strict";
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var enableSchedulerDebugging = false;
var enableProfiling = false;
var frameYieldMs = 5;
function push(heap, node) {
var index = heap.length;
heap.push(node);
siftUp(heap, node, index);
}
function peek2(heap) {
return heap.length === 0 ? null : heap[0];
}
function pop(heap) {
if (heap.length === 0) {
return null;
}
var first = heap[0];
var last = heap.pop();
if (last !== first) {
heap[0] = last;
siftDown(heap, last, 0);
}
return first;
}
function siftUp(heap, node, i) {
var index = i;
while (index > 0) {
var parentIndex = index - 1 >>> 1;
var parent = heap[parentIndex];
if (compare(parent, node) > 0) {
heap[parentIndex] = node;
heap[index] = parent;
index = parentIndex;
} else {
return;
}
}
}
function siftDown(heap, node, i) {
var index = i;
var length = heap.length;
var halfLength = length >>> 1;
while (index < halfLength) {
var leftIndex = (index + 1) * 2 - 1;
var left = heap[leftIndex];
var rightIndex = leftIndex + 1;
var right = heap[rightIndex];
if (compare(left, node) < 0) {
if (rightIndex < length && compare(right, left) < 0) {
heap[index] = right;
heap[rightIndex] = node;
index = rightIndex;
} else {
heap[index] = left;
heap[leftIndex] = node;
index = leftIndex;
}
} else if (rightIndex < length && compare(right, node) < 0) {
heap[index] = right;
heap[rightIndex] = node;
index = rightIndex;
} else {
return;
}
}
}
function compare(a, b) {
var diff = a.sortIndex - b.sortIndex;
return diff !== 0 ? diff : a.id - b.id;
}
var ImmediatePriority = 1;
var UserBlockingPriority = 2;
var NormalPriority = 3;
var LowPriority = 4;
var IdlePriority = 5;
function markTaskErrored(task, ms) {
}
var hasPerformanceNow = typeof performance === "object" && typeof performance.now === "function";
if (hasPerformanceNow) {
var localPerformance = performance;
exports.unstable_now = function() {
return localPerformance.now();
};
} else {
var localDate = Date;
var initialTime = localDate.now();
exports.unstable_now = function() {
return localDate.now() - initialTime;
};
}
var maxSigned31BitInt = 1073741823;
var IMMEDIATE_PRIORITY_TIMEOUT = -1;
var USER_BLOCKING_PRIORITY_TIMEOUT = 250;
var NORMAL_PRIORITY_TIMEOUT = 5e3;
var LOW_PRIORITY_TIMEOUT = 1e4;
var IDLE_PRIORITY_TIMEOUT = maxSigned31BitInt;
var taskQueue = [];
var timerQueue = [];
var taskIdCounter = 1;
var currentTask = null;
var currentPriorityLevel = NormalPriority;
var isPerformingWork = false;
var isHostCallbackScheduled = false;
var isHostTimeoutScheduled = false;
var localSetTimeout = typeof setTimeout === "function" ? setTimeout : null;
var localClearTimeout = typeof clearTimeout === "function" ? clearTimeout : null;
var localSetImmediate = typeof setImmediate !== "undefined" ? setImmediate : null;
var isInputPending = typeof navigator !== "undefined" && navigator.scheduling !== void 0 && navigator.scheduling.isInputPending !== void 0 ? navigator.scheduling.isInputPending.bind(navigator.scheduling) : null;
function advanceTimers(currentTime) {
var timer = peek2(timerQueue);
while (timer !== null) {
if (timer.callback === null) {
pop(timerQueue);
} else if (timer.startTime <= currentTime) {
pop(timerQueue);
timer.sortIndex = timer.expirationTime;
push(taskQueue, timer);
} else {
return;
}
timer = peek2(timerQueue);
}
}
function handleTimeout(currentTime) {
isHostTimeoutScheduled = false;
advanceTimers(currentTime);
if (!isHostCallbackScheduled) {
if (peek2(taskQueue) !== null) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
} else {
var firstTimer = peek2(timerQueue);
if (firstTimer !== null) {
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
}
}
}
function flushWork(hasTimeRemaining, initialTime2) {
isHostCallbackScheduled = false;
if (isHostTimeoutScheduled) {
isHostTimeoutScheduled = false;
cancelHostTimeout();
}
isPerformingWork = true;
var previousPriorityLevel = currentPriorityLevel;
try {
if (enableProfiling) {
try {
return workLoop(hasTimeRemaining, initialTime2);
} catch (error) {
if (currentTask !== null) {
var currentTime = exports.unstable_now();
markTaskErrored(currentTask, currentTime);
currentTask.isQueued = false;
}
throw error;
}
} else {
return workLoop(hasTimeRemaining, initialTime2);
}
} finally {
currentTask = null;
currentPriorityLevel = previousPriorityLevel;
isPerformingWork = false;
}
}
function workLoop(hasTimeRemaining, initialTime2) {
var currentTime = initialTime2;
advanceTimers(currentTime);
currentTask = peek2(taskQueue);
while (currentTask !== null && !enableSchedulerDebugging) {
if (currentTask.expirationTime > currentTime && (!hasTimeRemaining || shouldYieldToHost())) {
break;
}
var callback = currentTask.callback;
if (typeof callback === "function") {
currentTask.callback = null;
currentPriorityLevel = currentTask.priorityLevel;
var didUserCallbackTimeout = currentTask.expirationTime <= currentTime;
var continuationCallback = callback(didUserCallbackTimeout);
currentTime = exports.unstable_now();
if (typeof continuationCallback === "function") {
currentTask.callback = continuationCallback;
} else {
if (currentTask === peek2(taskQueue)) {
pop(taskQueue);
}
}
advanceTimers(currentTime);
} else {
pop(taskQueue);
}
currentTask = peek2(taskQueue);
}
if (currentTask !== null) {
return true;
} else {
var firstTimer = peek2(timerQueue);
if (firstTimer !== null) {
requestHostTimeout(handleTimeout, firstTimer.startTime - currentTime);
}
return false;
}
}
function unstable_runWithPriority(priorityLevel, eventHandler) {
switch (priorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
case NormalPriority:
case LowPriority:
case IdlePriority:
break;
default:
priorityLevel = NormalPriority;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
}
function unstable_next(eventHandler) {
var priorityLevel;
switch (currentPriorityLevel) {
case ImmediatePriority:
case UserBlockingPriority:
case NormalPriority:
priorityLevel = NormalPriority;
break;
default:
priorityLevel = currentPriorityLevel;
break;
}
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = priorityLevel;
try {
return eventHandler();
} finally {
currentPriorityLevel = previousPriorityLevel;
}
}
function unstable_wrapCallback(callback) {
var parentPriorityLevel = currentPriorityLevel;
return function() {
var previousPriorityLevel = currentPriorityLevel;
currentPriorityLevel = parentPriorityLevel;
try {
return callback.apply(this, arguments);
} finally {
currentPriorityLevel = previousPriorityLevel;
}
};
}
function unstable_scheduleCallback(priorityLevel, callback, options) {
var currentTime = exports.unstable_now();
var startTime2;
if (typeof options === "object" && options !== null) {
var delay = options.delay;
if (typeof delay === "number" && delay > 0) {
startTime2 = currentTime + delay;
} else {
startTime2 = currentTime;
}
} else {
startTime2 = currentTime;
}
var timeout;
switch (priorityLevel) {
case ImmediatePriority:
timeout = IMMEDIATE_PRIORITY_TIMEOUT;
break;
case UserBlockingPriority:
timeout = USER_BLOCKING_PRIORITY_TIMEOUT;
break;
case IdlePriority:
timeout = IDLE_PRIORITY_TIMEOUT;
break;
case LowPriority:
timeout = LOW_PRIORITY_TIMEOUT;
break;
case NormalPriority:
default:
timeout = NORMAL_PRIORITY_TIMEOUT;
break;
}
var expirationTime = startTime2 + timeout;
var newTask = {
id: taskIdCounter++,
callback,
priorityLevel,
startTime: startTime2,
expirationTime,
sortIndex: -1
};
if (startTime2 > currentTime) {
newTask.sortIndex = startTime2;
push(timerQueue, newTask);
if (peek2(taskQueue) === null && newTask === peek2(timerQueue)) {
if (isHostTimeoutScheduled) {
cancelHostTimeout();
} else {
isHostTimeoutScheduled = true;
}
requestHostTimeout(handleTimeout, startTime2 - currentTime);
}
} else {
newTask.sortIndex = expirationTime;
push(taskQueue, newTask);
if (!isHostCallbackScheduled && !isPerformingWork) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
}
}
return newTask;
}
function unstable_pauseExecution() {
}
function unstable_continueExecution() {
if (!isHostCallbackScheduled && !isPerformingWork) {
isHostCallbackScheduled = true;
requestHostCallback(flushWork);
}
}
function unstable_getFirstCallbackNode() {
return peek2(taskQueue);
}
function unstable_cancelCallback(task) {
task.callback = null;
}
function unstable_getCurrentPriorityLevel() {
return currentPriorityLevel;
}
var isMessageLoopRunning = false;
var scheduledHostCallback = null;
var taskTimeoutID = -1;
var frameInterval = frameYieldMs;
var startTime = -1;
function shouldYieldToHost() {
var timeElapsed = exports.unstable_now() - startTime;
if (timeElapsed < frameInterval) {
return false;
}
return true;
}
function requestPaint() {
}
function forceFrameRate(fps) {
if (fps < 0 || fps > 125) {
console["error"]("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported");
return;
}
if (fps > 0) {
frameInterval = Math.floor(1e3 / fps);
} else {
frameInterval = frameYieldMs;
}
}
var performWorkUntilDeadline = function() {
if (scheduledHostCallback !== null) {
var currentTime = exports.unstable_now();
startTime = currentTime;
var hasTimeRemaining = true;
var hasMoreWork = true;
try {
hasMoreWork = scheduledHostCallback(hasTimeRemaining, currentTime);
} finally {
if (hasMoreWork) {
schedulePerformWorkUntilDeadline();
} else {
isMessageLoopRunning = false;
scheduledHostCallback = null;
}
}
} else {
isMessageLoopRunning = false;
}
};
var schedulePerformWorkUntilDeadline;
if (typeof localSetImmediate === "function") {
schedulePerformWorkUntilDeadline = function() {
localSetImmediate(performWorkUntilDeadline);
};
} else if (typeof MessageChannel !== "undefined") {
var channel = new MessageChannel();
var port = channel.port2;
channel.port1.onmessage = performWorkUntilDeadline;
schedulePerformWorkUntilDeadline = function() {
port.postMessage(null);
};
} else {
schedulePerformWorkUntilDeadline = function() {
localSetTimeout(performWorkUntilDeadline, 0);
};
}
function requestHostCallback(callback) {
scheduledHostCallback = callback;
if (!isMessageLoopRunning) {
isMessageLoopRunning = true;
schedulePerformWorkUntilDeadline();
}
}
function requestHostTimeout(callback, ms) {
taskTimeoutID = localSetTimeout(function() {
callback(exports.unstable_now());
}, ms);
}
function cancelHostTimeout() {
localClearTimeout(taskTimeoutID);
taskTimeoutID = -1;
}
var unstable_requestPaint = requestPaint;
var unstable_Profiling = null;
exports.unstable_IdlePriority = IdlePriority;
exports.unstable_ImmediatePriority = ImmediatePriority;
exports.unstable_LowPriority = LowPriority;
exports.unstable_NormalPriority = NormalPriority;
exports.unstable_Profiling = unstable_Profiling;
exports.unstable_UserBlockingPriority = UserBlockingPriority;
exports.unstable_cancelCallback = unstable_cancelCallback;
exports.unstable_continueExecution = unstable_continueExecution;
exports.unstable_forceFrameRate = forceFrameRate;
exports.unstable_getCurrentPriorityLevel = unstable_getCurrentPriorityLevel;
exports.unstable_getFirstCallbackNode = unstable_getFirstCallbackNode;
exports.unstable_next = unstable_next;
exports.unstable_pauseExecution = unstable_pauseExecution;
exports.unstable_requestPaint = unstable_requestPaint;
exports.unstable_runWithPriority = unstable_runWithPriority;
exports.unstable_scheduleCallback = unstable_scheduleCallback;
exports.unstable_shouldYield = shouldYieldToHost;
exports.unstable_wrapCallback = unstable_wrapCallback;
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
}
});
// node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.js
var require_scheduler = __commonJS({
"node_modules/.pnpm/scheduler@0.23.2/node_modules/scheduler/index.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_scheduler_development();
}
}
});
// node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js
var require_react_dom_development = __commonJS({
"node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/cjs/react-dom.development.js"(exports) {
"use strict";
if (true) {
(function() {
"use strict";
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
}
var React4 = require_react();
var Scheduler = require_scheduler();
var ReactSharedInternals = React4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
var suppressWarning = false;
function setSuppressWarning(newSuppressWarning) {
{
suppressWarning = newSuppressWarning;
}
}
function warn(format) {
{
if (!suppressWarning) {
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
args[_key - 1] = arguments[_key];
}
printWarning("warn", format, args);
}
}
}
function error(format) {
{
if (!suppressWarning) {
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning("error", format, args);
}
}
}
function printWarning(level, format, args) {
{
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame2.getStackAddendum();
if (stack !== "") {
format += "%s";
args = args.concat([stack]);
}
var argsWithFormat = args.map(function(item) {
return String(item);
});
argsWithFormat.unshift("Warning: " + format);
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var FunctionComponent = 0;
var ClassComponent = 1;
var IndeterminateComponent = 2;
var HostRoot = 3;
var HostPortal = 4;
var HostComponent = 5;
var HostText = 6;
var Fragment9 = 7;
var Mode = 8;
var ContextConsumer = 9;
var ContextProvider = 10;
var ForwardRef = 11;
var Profiler = 12;
var SuspenseComponent = 13;
var MemoComponent = 14;
var SimpleMemoComponent = 15;
var LazyComponent = 16;
var IncompleteClassComponent = 17;
var DehydratedFragment = 18;
var SuspenseListComponent = 19;
var ScopeComponent = 21;
var OffscreenComponent = 22;
var LegacyHiddenComponent = 23;
var CacheComponent = 24;
var TracingMarkerComponent = 25;
var enableClientRenderFallbackOnTextMismatch = true;
var enableNewReconciler = false;
var enableLazyContextPropagation = false;
var enableLegacyHidden = false;
var enableSuspenseAvoidThisFallback = false;
var disableCommentsAsDOMContainers = true;
var enableCustomElementPropertySupport = false;
var warnAboutStringRefs = true;
var enableSchedulingProfiler = true;
var enableProfilerTimer = true;
var enableProfilerCommitHooks = true;
var allNativeEvents = /* @__PURE__ */ new Set();
var registrationNameDependencies = {};
var possibleRegistrationNames = {};
function registerTwoPhaseEvent(registrationName, dependencies) {
registerDirectEvent(registrationName, dependencies);
registerDirectEvent(registrationName + "Capture", dependencies);
}
function registerDirectEvent(registrationName, dependencies) {
{
if (registrationNameDependencies[registrationName]) {
error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.", registrationName);
}
}
registrationNameDependencies[registrationName] = dependencies;
{
var lowerCasedName = registrationName.toLowerCase();
possibleRegistrationNames[lowerCasedName] = registrationName;
if (registrationName === "onDoubleClick") {
possibleRegistrationNames.ondblclick = registrationName;
}
}
for (var i = 0; i < dependencies.length; i++) {
allNativeEvents.add(dependencies[i]);
}
}
var canUseDOM2 = !!(typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined");
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
function typeName(value) {
{
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
return type;
}
}
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
return "" + value;
}
function checkAttributeStringCoercion(value, attributeName) {
{
if (willCoercionThrow(value)) {
error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before before using it here.", attributeName, typeName(value));
return testStringCoercion(value);
}
}
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
function checkPropStringCoercion(value, propName) {
{
if (willCoercionThrow(value)) {
error("The provided `%s` prop is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value));
return testStringCoercion(value);
}
}
}
function checkCSSPropertyStringCoercion(value, propName) {
{
if (willCoercionThrow(value)) {
error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before before using it here.", propName, typeName(value));
return testStringCoercion(value);
}
}
}
function checkHtmlStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
function checkFormFieldValueStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
var RESERVED = 0;
var STRING = 1;
var BOOLEANISH_STRING = 2;
var BOOLEAN = 3;
var OVERLOADED_BOOLEAN = 4;
var NUMERIC = 5;
var POSITIVE_NUMERIC = 6;
var ATTRIBUTE_NAME_START_CHAR = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD";
var ATTRIBUTE_NAME_CHAR = ATTRIBUTE_NAME_START_CHAR + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040";
var VALID_ATTRIBUTE_NAME_REGEX = new RegExp("^[" + ATTRIBUTE_NAME_START_CHAR + "][" + ATTRIBUTE_NAME_CHAR + "]*$");
var illegalAttributeNameCache = {};
var validatedAttributeNameCache = {};
function isAttributeNameSafe(attributeName) {
if (hasOwnProperty2.call(validatedAttributeNameCache, attributeName)) {
return true;
}
if (hasOwnProperty2.call(illegalAttributeNameCache, attributeName)) {
return false;
}
if (VALID_ATTRIBUTE_NAME_REGEX.test(attributeName)) {
validatedAttributeNameCache[attributeName] = true;
return true;
}
illegalAttributeNameCache[attributeName] = true;
{
error("Invalid attribute name: `%s`", attributeName);
}
return false;
}
function shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag) {
if (propertyInfo !== null) {
return propertyInfo.type === RESERVED;
}
if (isCustomComponentTag) {
return false;
}
if (name.length > 2 && (name[0] === "o" || name[0] === "O") && (name[1] === "n" || name[1] === "N")) {
return true;
}
return false;
}
function shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag) {
if (propertyInfo !== null && propertyInfo.type === RESERVED) {
return false;
}
switch (typeof value) {
case "function":
case "symbol":
return true;
case "boolean": {
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
return !propertyInfo.acceptsBooleans;
} else {
var prefix3 = name.toLowerCase().slice(0, 5);
return prefix3 !== "data-" && prefix3 !== "aria-";
}
}
default:
return false;
}
}
function shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag) {
if (value === null || typeof value === "undefined") {
return true;
}
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, isCustomComponentTag)) {
return true;
}
if (isCustomComponentTag) {
return false;
}
if (propertyInfo !== null) {
switch (propertyInfo.type) {
case BOOLEAN:
return !value;
case OVERLOADED_BOOLEAN:
return value === false;
case NUMERIC:
return isNaN(value);
case POSITIVE_NUMERIC:
return isNaN(value) || value < 1;
}
}
return false;
}
function getPropertyInfo(name) {
return properties2.hasOwnProperty(name) ? properties2[name] : null;
}
function PropertyInfoRecord(name, type, mustUseProperty, attributeName, attributeNamespace, sanitizeURL2, removeEmptyString) {
this.acceptsBooleans = type === BOOLEANISH_STRING || type === BOOLEAN || type === OVERLOADED_BOOLEAN;
this.attributeName = attributeName;
this.attributeNamespace = attributeNamespace;
this.mustUseProperty = mustUseProperty;
this.propertyName = name;
this.type = type;
this.sanitizeURL = sanitizeURL2;
this.removeEmptyString = removeEmptyString;
}
var properties2 = {};
var reservedProps = [
"children",
"dangerouslySetInnerHTML",
// TODO: This prevents the assignment of defaultValue to regular
// elements (not just inputs). Now that ReactDOMInput assigns to the
// defaultValue property -- do we need this?
"defaultValue",
"defaultChecked",
"innerHTML",
"suppressContentEditableWarning",
"suppressHydrationWarning",
"style"
];
reservedProps.forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
RESERVED,
false,
// mustUseProperty
name,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach(function(_ref) {
var name = _ref[0], attributeName = _ref[1];
properties2[name] = new PropertyInfoRecord(
name,
STRING,
false,
// mustUseProperty
attributeName,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
["contentEditable", "draggable", "spellCheck", "value"].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
BOOLEANISH_STRING,
false,
// mustUseProperty
name.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
["autoReverse", "externalResourcesRequired", "focusable", "preserveAlpha"].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
BOOLEANISH_STRING,
false,
// mustUseProperty
name,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[
"allowFullScreen",
"async",
// Note: there is a special case that prevents it from being written to the DOM
// on the client side because the browsers are inconsistent. Instead we call focus().
"autoFocus",
"autoPlay",
"controls",
"default",
"defer",
"disabled",
"disablePictureInPicture",
"disableRemotePlayback",
"formNoValidate",
"hidden",
"loop",
"noModule",
"noValidate",
"open",
"playsInline",
"readOnly",
"required",
"reversed",
"scoped",
"seamless",
// Microdata
"itemScope"
].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
BOOLEAN,
false,
// mustUseProperty
name.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[
"checked",
// Note: `option.selected` is not updated if `select.multiple` is
// disabled with `removeAttribute`. We have special logic for handling this.
"multiple",
"muted",
"selected"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
BOOLEAN,
true,
// mustUseProperty
name,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[
"capture",
"download"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
OVERLOADED_BOOLEAN,
false,
// mustUseProperty
name,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[
"cols",
"rows",
"size",
"span"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
POSITIVE_NUMERIC,
false,
// mustUseProperty
name,
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
["rowSpan", "start"].forEach(function(name) {
properties2[name] = new PropertyInfoRecord(
name,
NUMERIC,
false,
// mustUseProperty
name.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
var CAMELIZE = /[\-\:]([a-z])/g;
var capitalize = function(token) {
return token[1].toUpperCase();
};
[
"accent-height",
"alignment-baseline",
"arabic-form",
"baseline-shift",
"cap-height",
"clip-path",
"clip-rule",
"color-interpolation",
"color-interpolation-filters",
"color-profile",
"color-rendering",
"dominant-baseline",
"enable-background",
"fill-opacity",
"fill-rule",
"flood-color",
"flood-opacity",
"font-family",
"font-size",
"font-size-adjust",
"font-stretch",
"font-style",
"font-variant",
"font-weight",
"glyph-name",
"glyph-orientation-horizontal",
"glyph-orientation-vertical",
"horiz-adv-x",
"horiz-origin-x",
"image-rendering",
"letter-spacing",
"lighting-color",
"marker-end",
"marker-mid",
"marker-start",
"overline-position",
"overline-thickness",
"paint-order",
"panose-1",
"pointer-events",
"rendering-intent",
"shape-rendering",
"stop-color",
"stop-opacity",
"strikethrough-position",
"strikethrough-thickness",
"stroke-dasharray",
"stroke-dashoffset",
"stroke-linecap",
"stroke-linejoin",
"stroke-miterlimit",
"stroke-opacity",
"stroke-width",
"text-anchor",
"text-decoration",
"text-rendering",
"underline-position",
"underline-thickness",
"unicode-bidi",
"unicode-range",
"units-per-em",
"v-alphabetic",
"v-hanging",
"v-ideographic",
"v-mathematical",
"vector-effect",
"vert-adv-y",
"vert-origin-x",
"vert-origin-y",
"word-spacing",
"writing-mode",
"xmlns:xlink",
"x-height"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties2[name] = new PropertyInfoRecord(
name,
STRING,
false,
// mustUseProperty
attributeName,
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
[
"xlink:actuate",
"xlink:arcrole",
"xlink:role",
"xlink:show",
"xlink:title",
"xlink:type"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties2[name] = new PropertyInfoRecord(
name,
STRING,
false,
// mustUseProperty
attributeName,
"http://www.w3.org/1999/xlink",
false,
// sanitizeURL
false
);
});
[
"xml:base",
"xml:lang",
"xml:space"
// NOTE: if you add a camelCased prop to this list,
// you'll need to set attributeName to name.toLowerCase()
// instead in the assignment below.
].forEach(function(attributeName) {
var name = attributeName.replace(CAMELIZE, capitalize);
properties2[name] = new PropertyInfoRecord(
name,
STRING,
false,
// mustUseProperty
attributeName,
"http://www.w3.org/XML/1998/namespace",
false,
// sanitizeURL
false
);
});
["tabIndex", "crossOrigin"].forEach(function(attributeName) {
properties2[attributeName] = new PropertyInfoRecord(
attributeName,
STRING,
false,
// mustUseProperty
attributeName.toLowerCase(),
// attributeName
null,
// attributeNamespace
false,
// sanitizeURL
false
);
});
var xlinkHref = "xlinkHref";
properties2[xlinkHref] = new PropertyInfoRecord(
"xlinkHref",
STRING,
false,
// mustUseProperty
"xlink:href",
"http://www.w3.org/1999/xlink",
true,
// sanitizeURL
false
);
["src", "href", "action", "formAction"].forEach(function(attributeName) {
properties2[attributeName] = new PropertyInfoRecord(
attributeName,
STRING,
false,
// mustUseProperty
attributeName.toLowerCase(),
// attributeName
null,
// attributeNamespace
true,
// sanitizeURL
true
);
});
var isJavaScriptProtocol = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i;
var didWarn = false;
function sanitizeURL(url) {
{
if (!didWarn && isJavaScriptProtocol.test(url)) {
didWarn = true;
error("A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If you need to generate unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.", JSON.stringify(url));
}
}
}
function getValueForProperty(node, name, expected, propertyInfo) {
{
if (propertyInfo.mustUseProperty) {
var propertyName = propertyInfo.propertyName;
return node[propertyName];
} else {
{
checkAttributeStringCoercion(expected, name);
}
if (propertyInfo.sanitizeURL) {
sanitizeURL("" + expected);
}
var attributeName = propertyInfo.attributeName;
var stringValue = null;
if (propertyInfo.type === OVERLOADED_BOOLEAN) {
if (node.hasAttribute(attributeName)) {
var value = node.getAttribute(attributeName);
if (value === "") {
return true;
}
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
return value;
}
if (value === "" + expected) {
return expected;
}
return value;
}
} else if (node.hasAttribute(attributeName)) {
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
return node.getAttribute(attributeName);
}
if (propertyInfo.type === BOOLEAN) {
return expected;
}
stringValue = node.getAttribute(attributeName);
}
if (shouldRemoveAttribute(name, expected, propertyInfo, false)) {
return stringValue === null ? expected : stringValue;
} else if (stringValue === "" + expected) {
return expected;
} else {
return stringValue;
}
}
}
}
function getValueForAttribute(node, name, expected, isCustomComponentTag) {
{
if (!isAttributeNameSafe(name)) {
return;
}
if (!node.hasAttribute(name)) {
return expected === void 0 ? void 0 : null;
}
var value = node.getAttribute(name);
{
checkAttributeStringCoercion(expected, name);
}
if (value === "" + expected) {
return expected;
}
return value;
}
}
function setValueForProperty(node, name, value, isCustomComponentTag) {
var propertyInfo = getPropertyInfo(name);
if (shouldIgnoreAttribute(name, propertyInfo, isCustomComponentTag)) {
return;
}
if (shouldRemoveAttribute(name, value, propertyInfo, isCustomComponentTag)) {
value = null;
}
if (isCustomComponentTag || propertyInfo === null) {
if (isAttributeNameSafe(name)) {
var _attributeName = name;
if (value === null) {
node.removeAttribute(_attributeName);
} else {
{
checkAttributeStringCoercion(value, name);
}
node.setAttribute(_attributeName, "" + value);
}
}
return;
}
var mustUseProperty = propertyInfo.mustUseProperty;
if (mustUseProperty) {
var propertyName = propertyInfo.propertyName;
if (value === null) {
var type = propertyInfo.type;
node[propertyName] = type === BOOLEAN ? false : "";
} else {
node[propertyName] = value;
}
return;
}
var attributeName = propertyInfo.attributeName, attributeNamespace = propertyInfo.attributeNamespace;
if (value === null) {
node.removeAttribute(attributeName);
} else {
var _type = propertyInfo.type;
var attributeValue;
if (_type === BOOLEAN || _type === OVERLOADED_BOOLEAN && value === true) {
attributeValue = "";
} else {
{
{
checkAttributeStringCoercion(value, attributeName);
}
attributeValue = "" + value;
}
if (propertyInfo.sanitizeURL) {
sanitizeURL(attributeValue.toString());
}
}
if (attributeNamespace) {
node.setAttributeNS(attributeNamespace, attributeName, attributeValue);
} else {
node.setAttribute(attributeName, attributeValue);
}
}
}
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_SCOPE_TYPE = Symbol.for("react.scope");
var REACT_DEBUG_TRACING_MODE_TYPE = Symbol.for("react.debug_trace_mode");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var REACT_LEGACY_HIDDEN_TYPE = Symbol.for("react.legacy_hidden");
var REACT_CACHE_TYPE = Symbol.for("react.cache");
var REACT_TRACING_MARKER_TYPE = Symbol.for("react.tracing_marker");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = "@@iterator";
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== "object") {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === "function") {
return maybeIterator;
}
return null;
}
var assign = Object.assign;
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {
}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
var props = {
configurable: true,
enumerable: true,
writable: true
};
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
}
if (disabledDepth < 0) {
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
}
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var prefix2;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix2 === void 0) {
try {
throw Error();
} catch (x) {
var match2 = x.stack.trim().match(/\n( *(at )?)/);
prefix2 = match2 && match2[1] || "";
}
}
return "\n" + prefix2 + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) {
return "";
}
{
var frame = componentFrameCache.get(fn);
if (frame !== void 0) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher.current;
ReactCurrentDispatcher.current = null;
disableLogs();
}
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if (typeof Reflect === "object" && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
if (sample && control && typeof sample.stack === "string") {
var sampleLines = sample.stack.split("\n");
var controlLines = control.stack.split("\n");
var s2 = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s2 >= 1 && c >= 0 && sampleLines[s2] !== controlLines[c]) {
c--;
}
for (; s2 >= 1 && c >= 0; s2--, c--) {
if (sampleLines[s2] !== controlLines[c]) {
if (s2 !== 1 || c !== 1) {
do {
s2--;
c--;
if (c < 0 || sampleLines[s2] !== controlLines[c]) {
var _frame = "\n" + sampleLines[s2].replace(" at new ", " at ");
if (fn.displayName && _frame.includes("<anonymous>")) {
_frame = _frame.replace("<anonymous>", fn.displayName);
}
{
if (typeof fn === "function") {
componentFrameCache.set(fn, _frame);
}
}
return _frame;
}
} while (s2 >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
}
var name = fn ? fn.displayName || fn.name : "";
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
{
if (typeof fn === "function") {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeClassComponentFrame(ctor, source, ownerFn) {
{
return describeNativeComponentFrame(ctor, true);
}
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component3) {
var prototype = Component3.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return "";
}
if (typeof type === "function") {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === "string") {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame("Suspense");
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame("SuspenseList");
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {
}
}
}
}
return "";
}
function describeFiber(fiber) {
var owner = fiber._debugOwner ? fiber._debugOwner.type : null;
var source = fiber._debugSource;
switch (fiber.tag) {
case HostComponent:
return describeBuiltInComponentFrame(fiber.type);
case LazyComponent:
return describeBuiltInComponentFrame("Lazy");
case SuspenseComponent:
return describeBuiltInComponentFrame("Suspense");
case SuspenseListComponent:
return describeBuiltInComponentFrame("SuspenseList");
case FunctionComponent:
case IndeterminateComponent:
case SimpleMemoComponent:
return describeFunctionComponentFrame(fiber.type);
case ForwardRef:
return describeFunctionComponentFrame(fiber.type.render);
case ClassComponent:
return describeClassComponentFrame(fiber.type);
default:
return "";
}
}
function getStackByFiberInDevAndProd(workInProgress2) {
try {
var info = "";
var node = workInProgress2;
do {
info += describeFiber(node);
node = node.return;
} while (node);
return info;
} catch (x) {
return "\nError generating stack: " + x.message + "\n" + x.stack;
}
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || "";
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
}
function getContextName(type) {
return type.displayName || "Context";
}
function getComponentNameFromType(type) {
if (type == null) {
return null;
}
{
if (typeof type.tag === "number") {
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
}
}
if (typeof type === "function") {
return type.displayName || type.name || null;
}
if (typeof type === "string") {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + ".Consumer";
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + ".Provider";
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, "ForwardRef");
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
}
}
return null;
}
function getWrappedName$1(outerType, innerType, wrapperName) {
var functionName = innerType.displayName || innerType.name || "";
return outerType.displayName || (functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName);
}
function getContextName$1(type) {
return type.displayName || "Context";
}
function getComponentNameFromFiber(fiber) {
var tag = fiber.tag, type = fiber.type;
switch (tag) {
case CacheComponent:
return "Cache";
case ContextConsumer:
var context = type;
return getContextName$1(context) + ".Consumer";
case ContextProvider:
var provider = type;
return getContextName$1(provider._context) + ".Provider";
case DehydratedFragment:
return "DehydratedFragment";
case ForwardRef:
return getWrappedName$1(type, type.render, "ForwardRef");
case Fragment9:
return "Fragment";
case HostComponent:
return type;
case HostPortal:
return "Portal";
case HostRoot:
return "Root";
case HostText:
return "Text";
case LazyComponent:
return getComponentNameFromType(type);
case Mode:
if (type === REACT_STRICT_MODE_TYPE) {
return "StrictMode";
}
return "Mode";
case OffscreenComponent:
return "Offscreen";
case Profiler:
return "Profiler";
case ScopeComponent:
return "Scope";
case SuspenseComponent:
return "Suspense";
case SuspenseListComponent:
return "SuspenseList";
case TracingMarkerComponent:
return "TracingMarker";
case ClassComponent:
case FunctionComponent:
case IncompleteClassComponent:
case IndeterminateComponent:
case MemoComponent:
case SimpleMemoComponent:
if (typeof type === "function") {
return type.displayName || type.name || null;
}
if (typeof type === "string") {
return type;
}
break;
}
return null;
}
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
var current2 = null;
var isRendering = false;
function getCurrentFiberOwnerNameInDevOrNull() {
{
if (current2 === null) {
return null;
}
var owner = current2._debugOwner;
if (owner !== null && typeof owner !== "undefined") {
return getComponentNameFromFiber(owner);
}
}
return null;
}
function getCurrentFiberStackInDev() {
{
if (current2 === null) {
return "";
}
return getStackByFiberInDevAndProd(current2);
}
}
function resetCurrentFiber() {
{
ReactDebugCurrentFrame.getCurrentStack = null;
current2 = null;
isRendering = false;
}
}
function setCurrentFiber(fiber) {
{
ReactDebugCurrentFrame.getCurrentStack = fiber === null ? null : getCurrentFiberStackInDev;
current2 = fiber;
isRendering = false;
}
}
function getCurrentFiber() {
{
return current2;
}
}
function setIsRendering(rendering) {
{
isRendering = rendering;
}
}
function toString(value) {
return "" + value;
}
function getToStringValue(value) {
switch (typeof value) {
case "boolean":
case "number":
case "string":
case "undefined":
return value;
case "object":
{
checkFormFieldValueStringCoercion(value);
}
return value;
default:
return "";
}
}
var hasReadOnlyValue = {
button: true,
checkbox: true,
image: true,
hidden: true,
radio: true,
reset: true,
submit: true
};
function checkControlledValueProps(tagName, props) {
{
if (!(hasReadOnlyValue[props.type] || props.onChange || props.onInput || props.readOnly || props.disabled || props.value == null)) {
error("You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`.");
}
if (!(props.onChange || props.readOnly || props.disabled || props.checked == null)) {
error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.");
}
}
}
function isCheckable(elem) {
var type = elem.type;
var nodeName = elem.nodeName;
return nodeName && nodeName.toLowerCase() === "input" && (type === "checkbox" || type === "radio");
}
function getTracker(node) {
return node._valueTracker;
}
function detachTracker(node) {
node._valueTracker = null;
}
function getValueFromNode(node) {
var value = "";
if (!node) {
return value;
}
if (isCheckable(node)) {
value = node.checked ? "true" : "false";
} else {
value = node.value;
}
return value;
}
function trackValueOnNode(node) {
var valueField = isCheckable(node) ? "checked" : "value";
var descriptor = Object.getOwnPropertyDescriptor(node.constructor.prototype, valueField);
{
checkFormFieldValueStringCoercion(node[valueField]);
}
var currentValue = "" + node[valueField];
if (node.hasOwnProperty(valueField) || typeof descriptor === "undefined" || typeof descriptor.get !== "function" || typeof descriptor.set !== "function") {
return;
}
var get2 = descriptor.get, set3 = descriptor.set;
Object.defineProperty(node, valueField, {
configurable: true,
get: function() {
return get2.call(this);
},
set: function(value) {
{
checkFormFieldValueStringCoercion(value);
}
currentValue = "" + value;
set3.call(this, value);
}
});
Object.defineProperty(node, valueField, {
enumerable: descriptor.enumerable
});
var tracker = {
getValue: function() {
return currentValue;
},
setValue: function(value) {
{
checkFormFieldValueStringCoercion(value);
}
currentValue = "" + value;
},
stopTracking: function() {
detachTracker(node);
delete node[valueField];
}
};
return tracker;
}
function track(node) {
if (getTracker(node)) {
return;
}
node._valueTracker = trackValueOnNode(node);
}
function updateValueIfChanged(node) {
if (!node) {
return false;
}
var tracker = getTracker(node);
if (!tracker) {
return true;
}
var lastValue = tracker.getValue();
var nextValue = getValueFromNode(node);
if (nextValue !== lastValue) {
tracker.setValue(nextValue);
return true;
}
return false;
}
function getActiveElement(doc) {
doc = doc || (typeof document !== "undefined" ? document : void 0);
if (typeof doc === "undefined") {
return null;
}
try {
return doc.activeElement || doc.body;
} catch (e) {
return doc.body;
}
}
var didWarnValueDefaultValue = false;
var didWarnCheckedDefaultChecked = false;
var didWarnControlledToUncontrolled = false;
var didWarnUncontrolledToControlled = false;
function isControlled(props) {
var usesChecked = props.type === "checkbox" || props.type === "radio";
return usesChecked ? props.checked != null : props.value != null;
}
function getHostProps(element, props) {
var node = element;
var checked = props.checked;
var hostProps = assign({}, props, {
defaultChecked: void 0,
defaultValue: void 0,
value: void 0,
checked: checked != null ? checked : node._wrapperState.initialChecked
});
return hostProps;
}
function initWrapperState(element, props) {
{
checkControlledValueProps("input", props);
if (props.checked !== void 0 && props.defaultChecked !== void 0 && !didWarnCheckedDefaultChecked) {
error("%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
didWarnCheckedDefaultChecked = true;
}
if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue) {
error("%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component", props.type);
didWarnValueDefaultValue = true;
}
}
var node = element;
var defaultValue2 = props.defaultValue == null ? "" : props.defaultValue;
node._wrapperState = {
initialChecked: props.checked != null ? props.checked : props.defaultChecked,
initialValue: getToStringValue(props.value != null ? props.value : defaultValue2),
controlled: isControlled(props)
};
}
function updateChecked(element, props) {
var node = element;
var checked = props.checked;
if (checked != null) {
setValueForProperty(node, "checked", checked, false);
}
}
function updateWrapper(element, props) {
var node = element;
{
var controlled = isControlled(props);
if (!node._wrapperState.controlled && controlled && !didWarnUncontrolledToControlled) {
error("A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
didWarnUncontrolledToControlled = true;
}
if (node._wrapperState.controlled && !controlled && !didWarnControlledToUncontrolled) {
error("A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://reactjs.org/link/controlled-components");
didWarnControlledToUncontrolled = true;
}
}
updateChecked(element, props);
var value = getToStringValue(props.value);
var type = props.type;
if (value != null) {
if (type === "number") {
if (value === 0 && node.value === "" || // We explicitly want to coerce to number here if possible.
// eslint-disable-next-line
node.value != value) {
node.value = toString(value);
}
} else if (node.value !== toString(value)) {
node.value = toString(value);
}
} else if (type === "submit" || type === "reset") {
node.removeAttribute("value");
return;
}
{
if (props.hasOwnProperty("value")) {
setDefaultValue(node, props.type, value);
} else if (props.hasOwnProperty("defaultValue")) {
setDefaultValue(node, props.type, getToStringValue(props.defaultValue));
}
}
{
if (props.checked == null && props.defaultChecked != null) {
node.defaultChecked = !!props.defaultChecked;
}
}
}
function postMountWrapper(element, props, isHydrating2) {
var node = element;
if (props.hasOwnProperty("value") || props.hasOwnProperty("defaultValue")) {
var type = props.type;
var isButton = type === "submit" || type === "reset";
if (isButton && (props.value === void 0 || props.value === null)) {
return;
}
var initialValue = toString(node._wrapperState.initialValue);
if (!isHydrating2) {
{
if (initialValue !== node.value) {
node.value = initialValue;
}
}
}
{
node.defaultValue = initialValue;
}
}
var name = node.name;
if (name !== "") {
node.name = "";
}
{
node.defaultChecked = !node.defaultChecked;
node.defaultChecked = !!node._wrapperState.initialChecked;
}
if (name !== "") {
node.name = name;
}
}
function restoreControlledState(element, props) {
var node = element;
updateWrapper(node, props);
updateNamedCousins(node, props);
}
function updateNamedCousins(rootNode, props) {
var name = props.name;
if (props.type === "radio" && name != null) {
var queryRoot = rootNode;
while (queryRoot.parentNode) {
queryRoot = queryRoot.parentNode;
}
{
checkAttributeStringCoercion(name, "name");
}
var group = queryRoot.querySelectorAll("input[name=" + JSON.stringify("" + name) + '][type="radio"]');
for (var i = 0; i < group.length; i++) {
var otherNode = group[i];
if (otherNode === rootNode || otherNode.form !== rootNode.form) {
continue;
}
var otherProps = getFiberCurrentPropsFromNode(otherNode);
if (!otherProps) {
throw new Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");
}
updateValueIfChanged(otherNode);
updateWrapper(otherNode, otherProps);
}
}
}
function setDefaultValue(node, type, value) {
if (
// Focused number inputs synchronize on blur. See ChangeEventPlugin.js
type !== "number" || getActiveElement(node.ownerDocument) !== node
) {
if (value == null) {
node.defaultValue = toString(node._wrapperState.initialValue);
} else if (node.defaultValue !== toString(value)) {
node.defaultValue = toString(value);
}
}
}
var didWarnSelectedSetOnOption = false;
var didWarnInvalidChild = false;
var didWarnInvalidInnerHTML = false;
function validateProps(element, props) {
{
if (props.value == null) {
if (typeof props.children === "object" && props.children !== null) {
React4.Children.forEach(props.children, function(child) {
if (child == null) {
return;
}
if (typeof child === "string" || typeof child === "number") {
return;
}
if (!didWarnInvalidChild) {
didWarnInvalidChild = true;
error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>.");
}
});
} else if (props.dangerouslySetInnerHTML != null) {
if (!didWarnInvalidInnerHTML) {
didWarnInvalidInnerHTML = true;
error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected.");
}
}
}
if (props.selected != null && !didWarnSelectedSetOnOption) {
error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>.");
didWarnSelectedSetOnOption = true;
}
}
}
function postMountWrapper$1(element, props) {
if (props.value != null) {
element.setAttribute("value", toString(getToStringValue(props.value)));
}
}
var isArrayImpl = Array.isArray;
function isArray(a) {
return isArrayImpl(a);
}
var didWarnValueDefaultValue$1;
{
didWarnValueDefaultValue$1 = false;
}
function getDeclarationErrorAddendum() {
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
if (ownerName) {
return "\n\nCheck the render method of `" + ownerName + "`.";
}
return "";
}
var valuePropNames = ["value", "defaultValue"];
function checkSelectPropTypes(props) {
{
checkControlledValueProps("select", props);
for (var i = 0; i < valuePropNames.length; i++) {
var propName = valuePropNames[i];
if (props[propName] == null) {
continue;
}
var propNameIsArray = isArray(props[propName]);
if (props.multiple && !propNameIsArray) {
error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s", propName, getDeclarationErrorAddendum());
} else if (!props.multiple && propNameIsArray) {
error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s", propName, getDeclarationErrorAddendum());
}
}
}
}
function updateOptions(node, multiple, propValue, setDefaultSelected) {
var options2 = node.options;
if (multiple) {
var selectedValues = propValue;
var selectedValue = {};
for (var i = 0; i < selectedValues.length; i++) {
selectedValue["$" + selectedValues[i]] = true;
}
for (var _i = 0; _i < options2.length; _i++) {
var selected = selectedValue.hasOwnProperty("$" + options2[_i].value);
if (options2[_i].selected !== selected) {
options2[_i].selected = selected;
}
if (selected && setDefaultSelected) {
options2[_i].defaultSelected = true;
}
}
} else {
var _selectedValue = toString(getToStringValue(propValue));
var defaultSelected = null;
for (var _i2 = 0; _i2 < options2.length; _i2++) {
if (options2[_i2].value === _selectedValue) {
options2[_i2].selected = true;
if (setDefaultSelected) {
options2[_i2].defaultSelected = true;
}
return;
}
if (defaultSelected === null && !options2[_i2].disabled) {
defaultSelected = options2[_i2];
}
}
if (defaultSelected !== null) {
defaultSelected.selected = true;
}
}
}
function getHostProps$1(element, props) {
return assign({}, props, {
value: void 0
});
}
function initWrapperState$1(element, props) {
var node = element;
{
checkSelectPropTypes(props);
}
node._wrapperState = {
wasMultiple: !!props.multiple
};
{
if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValueDefaultValue$1) {
error("Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://reactjs.org/link/controlled-components");
didWarnValueDefaultValue$1 = true;
}
}
}
function postMountWrapper$2(element, props) {
var node = element;
node.multiple = !!props.multiple;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
}
}
function postUpdateWrapper(element, props) {
var node = element;
var wasMultiple = node._wrapperState.wasMultiple;
node._wrapperState.wasMultiple = !!props.multiple;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
} else if (wasMultiple !== !!props.multiple) {
if (props.defaultValue != null) {
updateOptions(node, !!props.multiple, props.defaultValue, true);
} else {
updateOptions(node, !!props.multiple, props.multiple ? [] : "", false);
}
}
}
function restoreControlledState$1(element, props) {
var node = element;
var value = props.value;
if (value != null) {
updateOptions(node, !!props.multiple, value, false);
}
}
var didWarnValDefaultVal = false;
function getHostProps$2(element, props) {
var node = element;
if (props.dangerouslySetInnerHTML != null) {
throw new Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");
}
var hostProps = assign({}, props, {
value: void 0,
defaultValue: void 0,
children: toString(node._wrapperState.initialValue)
});
return hostProps;
}
function initWrapperState$2(element, props) {
var node = element;
{
checkControlledValueProps("textarea", props);
if (props.value !== void 0 && props.defaultValue !== void 0 && !didWarnValDefaultVal) {
error("%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://reactjs.org/link/controlled-components", getCurrentFiberOwnerNameInDevOrNull() || "A component");
didWarnValDefaultVal = true;
}
}
var initialValue = props.value;
if (initialValue == null) {
var children = props.children, defaultValue2 = props.defaultValue;
if (children != null) {
{
error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.");
}
{
if (defaultValue2 != null) {
throw new Error("If you supply `defaultValue` on a <textarea>, do not pass children.");
}
if (isArray(children)) {
if (children.length > 1) {
throw new Error("<textarea> can only have at most one child.");
}
children = children[0];
}
defaultValue2 = children;
}
}
if (defaultValue2 == null) {
defaultValue2 = "";
}
initialValue = defaultValue2;
}
node._wrapperState = {
initialValue: getToStringValue(initialValue)
};
}
function updateWrapper$1(element, props) {
var node = element;
var value = getToStringValue(props.value);
var defaultValue2 = getToStringValue(props.defaultValue);
if (value != null) {
var newValue = toString(value);
if (newValue !== node.value) {
node.value = newValue;
}
if (props.defaultValue == null && node.defaultValue !== newValue) {
node.defaultValue = newValue;
}
}
if (defaultValue2 != null) {
node.defaultValue = toString(defaultValue2);
}
}
function postMountWrapper$3(element, props) {
var node = element;
var textContent = node.textContent;
if (textContent === node._wrapperState.initialValue) {
if (textContent !== "" && textContent !== null) {
node.value = textContent;
}
}
}
function restoreControlledState$2(element, props) {
updateWrapper$1(element, props);
}
var HTML_NAMESPACE = "http://www.w3.org/1999/xhtml";
var MATH_NAMESPACE = "http://www.w3.org/1998/Math/MathML";
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
function getIntrinsicNamespace(type) {
switch (type) {
case "svg":
return SVG_NAMESPACE;
case "math":
return MATH_NAMESPACE;
default:
return HTML_NAMESPACE;
}
}
function getChildNamespace(parentNamespace, type) {
if (parentNamespace == null || parentNamespace === HTML_NAMESPACE) {
return getIntrinsicNamespace(type);
}
if (parentNamespace === SVG_NAMESPACE && type === "foreignObject") {
return HTML_NAMESPACE;
}
return parentNamespace;
}
var createMicrosoftUnsafeLocalFunction = function(func) {
if (typeof MSApp !== "undefined" && MSApp.execUnsafeLocalFunction) {
return function(arg0, arg1, arg2, arg3) {
MSApp.execUnsafeLocalFunction(function() {
return func(arg0, arg1, arg2, arg3);
});
};
} else {
return func;
}
};
var reusableSVGContainer;
var setInnerHTML = createMicrosoftUnsafeLocalFunction(function(node, html) {
if (node.namespaceURI === SVG_NAMESPACE) {
if (!("innerHTML" in node)) {
reusableSVGContainer = reusableSVGContainer || document.createElement("div");
reusableSVGContainer.innerHTML = "<svg>" + html.valueOf().toString() + "</svg>";
var svgNode = reusableSVGContainer.firstChild;
while (node.firstChild) {
node.removeChild(node.firstChild);
}
while (svgNode.firstChild) {
node.appendChild(svgNode.firstChild);
}
return;
}
}
node.innerHTML = html;
});
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var COMMENT_NODE = 8;
var DOCUMENT_NODE = 9;
var DOCUMENT_FRAGMENT_NODE = 11;
var setTextContent = function(node, text) {
if (text) {
var firstChild = node.firstChild;
if (firstChild && firstChild === node.lastChild && firstChild.nodeType === TEXT_NODE) {
firstChild.nodeValue = text;
return;
}
}
node.textContent = text;
};
var shorthandToLonghand = {
animation: ["animationDelay", "animationDirection", "animationDuration", "animationFillMode", "animationIterationCount", "animationName", "animationPlayState", "animationTimingFunction"],
background: ["backgroundAttachment", "backgroundClip", "backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPositionX", "backgroundPositionY", "backgroundRepeat", "backgroundSize"],
backgroundPosition: ["backgroundPositionX", "backgroundPositionY"],
border: ["borderBottomColor", "borderBottomStyle", "borderBottomWidth", "borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth", "borderLeftColor", "borderLeftStyle", "borderLeftWidth", "borderRightColor", "borderRightStyle", "borderRightWidth", "borderTopColor", "borderTopStyle", "borderTopWidth"],
borderBlockEnd: ["borderBlockEndColor", "borderBlockEndStyle", "borderBlockEndWidth"],
borderBlockStart: ["borderBlockStartColor", "borderBlockStartStyle", "borderBlockStartWidth"],
borderBottom: ["borderBottomColor", "borderBottomStyle", "borderBottomWidth"],
borderColor: ["borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor"],
borderImage: ["borderImageOutset", "borderImageRepeat", "borderImageSlice", "borderImageSource", "borderImageWidth"],
borderInlineEnd: ["borderInlineEndColor", "borderInlineEndStyle", "borderInlineEndWidth"],
borderInlineStart: ["borderInlineStartColor", "borderInlineStartStyle", "borderInlineStartWidth"],
borderLeft: ["borderLeftColor", "borderLeftStyle", "borderLeftWidth"],
borderRadius: ["borderBottomLeftRadius", "borderBottomRightRadius", "borderTopLeftRadius", "borderTopRightRadius"],
borderRight: ["borderRightColor", "borderRightStyle", "borderRightWidth"],
borderStyle: ["borderBottomStyle", "borderLeftStyle", "borderRightStyle", "borderTopStyle"],
borderTop: ["borderTopColor", "borderTopStyle", "borderTopWidth"],
borderWidth: ["borderBottomWidth", "borderLeftWidth", "borderRightWidth", "borderTopWidth"],
columnRule: ["columnRuleColor", "columnRuleStyle", "columnRuleWidth"],
columns: ["columnCount", "columnWidth"],
flex: ["flexBasis", "flexGrow", "flexShrink"],
flexFlow: ["flexDirection", "flexWrap"],
font: ["fontFamily", "fontFeatureSettings", "fontKerning", "fontLanguageOverride", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle", "fontVariant", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", "fontWeight", "lineHeight"],
fontVariant: ["fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian", "fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition"],
gap: ["columnGap", "rowGap"],
grid: ["gridAutoColumns", "gridAutoFlow", "gridAutoRows", "gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"],
gridArea: ["gridColumnEnd", "gridColumnStart", "gridRowEnd", "gridRowStart"],
gridColumn: ["gridColumnEnd", "gridColumnStart"],
gridColumnGap: ["columnGap"],
gridGap: ["columnGap", "rowGap"],
gridRow: ["gridRowEnd", "gridRowStart"],
gridRowGap: ["rowGap"],
gridTemplate: ["gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"],
listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
margin: ["marginBottom", "marginLeft", "marginRight", "marginTop"],
marker: ["markerEnd", "markerMid", "markerStart"],
mask: ["maskClip", "maskComposite", "maskImage", "maskMode", "maskOrigin", "maskPositionX", "maskPositionY", "maskRepeat", "maskSize"],
maskPosition: ["maskPositionX", "maskPositionY"],
outline: ["outlineColor", "outlineStyle", "outlineWidth"],
overflow: ["overflowX", "overflowY"],
padding: ["paddingBottom", "paddingLeft", "paddingRight", "paddingTop"],
placeContent: ["alignContent", "justifyContent"],
placeItems: ["alignItems", "justifyItems"],
placeSelf: ["alignSelf", "justifySelf"],
textDecoration: ["textDecorationColor", "textDecorationLine", "textDecorationStyle"],
textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
transition: ["transitionDelay", "transitionDuration", "transitionProperty", "transitionTimingFunction"],
wordWrap: ["overflowWrap"]
};
var isUnitlessNumber = {
animationIterationCount: true,
aspectRatio: true,
borderImageOutset: true,
borderImageSlice: true,
borderImageWidth: true,
boxFlex: true,
boxFlexGroup: true,
boxOrdinalGroup: true,
columnCount: true,
columns: true,
flex: true,
flexGrow: true,
flexPositive: true,
flexShrink: true,
flexNegative: true,
flexOrder: true,
gridArea: true,
gridRow: true,
gridRowEnd: true,
gridRowSpan: true,
gridRowStart: true,
gridColumn: true,
gridColumnEnd: true,
gridColumnSpan: true,
gridColumnStart: true,
fontWeight: true,
lineClamp: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
tabSize: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related properties
fillOpacity: true,
floodOpacity: true,
stopOpacity: true,
strokeDasharray: true,
strokeDashoffset: true,
strokeMiterlimit: true,
strokeOpacity: true,
strokeWidth: true
};
function prefixKey(prefix3, key2) {
return prefix3 + key2.charAt(0).toUpperCase() + key2.substring(1);
}
var prefixes = ["Webkit", "ms", "Moz", "O"];
Object.keys(isUnitlessNumber).forEach(function(prop) {
prefixes.forEach(function(prefix3) {
isUnitlessNumber[prefixKey(prefix3, prop)] = isUnitlessNumber[prop];
});
});
function dangerousStyleValue(name, value, isCustomProperty) {
var isEmpty = value == null || typeof value === "boolean" || value === "";
if (isEmpty) {
return "";
}
if (!isCustomProperty && typeof value === "number" && value !== 0 && !(isUnitlessNumber.hasOwnProperty(name) && isUnitlessNumber[name])) {
return value + "px";
}
{
checkCSSPropertyStringCoercion(value, name);
}
return ("" + value).trim();
}
var uppercasePattern = /([A-Z])/g;
var msPattern = /^ms-/;
function hyphenateStyleName(name) {
return name.replace(uppercasePattern, "-$1").toLowerCase().replace(msPattern, "-ms-");
}
var warnValidStyle = function() {
};
{
var badVendoredStyleNamePattern = /^(?:webkit|moz|o)[A-Z]/;
var msPattern$1 = /^-ms-/;
var hyphenPattern = /-(.)/g;
var badStyleValueWithSemicolonPattern = /;\s*$/;
var warnedStyleNames = {};
var warnedStyleValues = {};
var warnedForNaNValue = false;
var warnedForInfinityValue = false;
var camelize = function(string) {
return string.replace(hyphenPattern, function(_18, character) {
return character.toUpperCase();
});
};
var warnHyphenatedStyleName = function(name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
error(
"Unsupported style property %s. Did you mean %s?",
name,
// As Andi Smith suggests
// (http://www.andismith.com/blog/2012/02/modernizr-prefixed/), an `-ms` prefix
// is converted to lowercase `ms`.
camelize(name.replace(msPattern$1, "ms-"))
);
};
var warnBadVendoredStyleName = function(name) {
if (warnedStyleNames.hasOwnProperty(name) && warnedStyleNames[name]) {
return;
}
warnedStyleNames[name] = true;
error("Unsupported vendor-prefixed style property %s. Did you mean %s?", name, name.charAt(0).toUpperCase() + name.slice(1));
};
var warnStyleValueWithSemicolon = function(name, value) {
if (warnedStyleValues.hasOwnProperty(value) && warnedStyleValues[value]) {
return;
}
warnedStyleValues[value] = true;
error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`, name, value.replace(badStyleValueWithSemicolonPattern, ""));
};
var warnStyleValueIsNaN = function(name, value) {
if (warnedForNaNValue) {
return;
}
warnedForNaNValue = true;
error("`NaN` is an invalid value for the `%s` css style property.", name);
};
var warnStyleValueIsInfinity = function(name, value) {
if (warnedForInfinityValue) {
return;
}
warnedForInfinityValue = true;
error("`Infinity` is an invalid value for the `%s` css style property.", name);
};
warnValidStyle = function(name, value) {
if (name.indexOf("-") > -1) {
warnHyphenatedStyleName(name);
} else if (badVendoredStyleNamePattern.test(name)) {
warnBadVendoredStyleName(name);
} else if (badStyleValueWithSemicolonPattern.test(value)) {
warnStyleValueWithSemicolon(name, value);
}
if (typeof value === "number") {
if (isNaN(value)) {
warnStyleValueIsNaN(name, value);
} else if (!isFinite(value)) {
warnStyleValueIsInfinity(name, value);
}
}
};
}
var warnValidStyle$1 = warnValidStyle;
function createDangerousStringForStyles(styles) {
{
var serialized = "";
var delimiter = "";
for (var styleName in styles) {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
var styleValue = styles[styleName];
if (styleValue != null) {
var isCustomProperty = styleName.indexOf("--") === 0;
serialized += delimiter + (isCustomProperty ? styleName : hyphenateStyleName(styleName)) + ":";
serialized += dangerousStyleValue(styleName, styleValue, isCustomProperty);
delimiter = ";";
}
}
return serialized || null;
}
}
function setValueForStyles(node, styles) {
var style2 = node.style;
for (var styleName in styles) {
if (!styles.hasOwnProperty(styleName)) {
continue;
}
var isCustomProperty = styleName.indexOf("--") === 0;
{
if (!isCustomProperty) {
warnValidStyle$1(styleName, styles[styleName]);
}
}
var styleValue = dangerousStyleValue(styleName, styles[styleName], isCustomProperty);
if (styleName === "float") {
styleName = "cssFloat";
}
if (isCustomProperty) {
style2.setProperty(styleName, styleValue);
} else {
style2[styleName] = styleValue;
}
}
}
function isValueEmpty(value) {
return value == null || typeof value === "boolean" || value === "";
}
function expandShorthandMap(styles) {
var expanded = {};
for (var key2 in styles) {
var longhands = shorthandToLonghand[key2] || [key2];
for (var i = 0; i < longhands.length; i++) {
expanded[longhands[i]] = key2;
}
}
return expanded;
}
function validateShorthandPropertyCollisionInDev(styleUpdates, nextStyles) {
{
if (!nextStyles) {
return;
}
var expandedUpdates = expandShorthandMap(styleUpdates);
var expandedStyles = expandShorthandMap(nextStyles);
var warnedAbout = {};
for (var key2 in expandedUpdates) {
var originalKey = expandedUpdates[key2];
var correctOriginalKey = expandedStyles[key2];
if (correctOriginalKey && originalKey !== correctOriginalKey) {
var warningKey = originalKey + "," + correctOriginalKey;
if (warnedAbout[warningKey]) {
continue;
}
warnedAbout[warningKey] = true;
error("%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.", isValueEmpty(styleUpdates[originalKey]) ? "Removing" : "Updating", originalKey, correctOriginalKey);
}
}
}
}
var omittedCloseTags = {
area: true,
base: true,
br: true,
col: true,
embed: true,
hr: true,
img: true,
input: true,
keygen: true,
link: true,
meta: true,
param: true,
source: true,
track: true,
wbr: true
// NOTE: menuitem's close tag should be omitted, but that causes problems.
};
var voidElementTags = assign({
menuitem: true
}, omittedCloseTags);
var HTML = "__html";
function assertValidProps(tag, props) {
if (!props) {
return;
}
if (voidElementTags[tag]) {
if (props.children != null || props.dangerouslySetInnerHTML != null) {
throw new Error(tag + " is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");
}
}
if (props.dangerouslySetInnerHTML != null) {
if (props.children != null) {
throw new Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");
}
if (typeof props.dangerouslySetInnerHTML !== "object" || !(HTML in props.dangerouslySetInnerHTML)) {
throw new Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://reactjs.org/link/dangerously-set-inner-html for more information.");
}
}
{
if (!props.suppressContentEditableWarning && props.contentEditable && props.children != null) {
error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.");
}
}
if (props.style != null && typeof props.style !== "object") {
throw new Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");
}
}
function isCustomComponent(tagName, props) {
if (tagName.indexOf("-") === -1) {
return typeof props.is === "string";
}
switch (tagName) {
case "annotation-xml":
case "color-profile":
case "font-face":
case "font-face-src":
case "font-face-uri":
case "font-face-format":
case "font-face-name":
case "missing-glyph":
return false;
default:
return true;
}
}
var possibleStandardNames = {
// HTML
accept: "accept",
acceptcharset: "acceptCharset",
"accept-charset": "acceptCharset",
accesskey: "accessKey",
action: "action",
allowfullscreen: "allowFullScreen",
alt: "alt",
as: "as",
async: "async",
autocapitalize: "autoCapitalize",
autocomplete: "autoComplete",
autocorrect: "autoCorrect",
autofocus: "autoFocus",
autoplay: "autoPlay",
autosave: "autoSave",
capture: "capture",
cellpadding: "cellPadding",
cellspacing: "cellSpacing",
challenge: "challenge",
charset: "charSet",
checked: "checked",
children: "children",
cite: "cite",
class: "className",
classid: "classID",
classname: "className",
cols: "cols",
colspan: "colSpan",
content: "content",
contenteditable: "contentEditable",
contextmenu: "contextMenu",
controls: "controls",
controlslist: "controlsList",
coords: "coords",
crossorigin: "crossOrigin",
dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
data: "data",
datetime: "dateTime",
default: "default",
defaultchecked: "defaultChecked",
defaultvalue: "defaultValue",
defer: "defer",
dir: "dir",
disabled: "disabled",
disablepictureinpicture: "disablePictureInPicture",
disableremoteplayback: "disableRemotePlayback",
download: "download",
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
formaction: "formAction",
formenctype: "formEncType",
formnovalidate: "formNoValidate",
formtarget: "formTarget",
frameborder: "frameBorder",
headers: "headers",
height: "height",
hidden: "hidden",
high: "high",
href: "href",
hreflang: "hrefLang",
htmlfor: "htmlFor",
httpequiv: "httpEquiv",
"http-equiv": "httpEquiv",
icon: "icon",
id: "id",
imagesizes: "imageSizes",
imagesrcset: "imageSrcSet",
innerhtml: "innerHTML",
inputmode: "inputMode",
integrity: "integrity",
is: "is",
itemid: "itemID",
itemprop: "itemProp",
itemref: "itemRef",
itemscope: "itemScope",
itemtype: "itemType",
keyparams: "keyParams",
keytype: "keyType",
kind: "kind",
label: "label",
lang: "lang",
list: "list",
loop: "loop",
low: "low",
manifest: "manifest",
marginwidth: "marginWidth",
marginheight: "marginHeight",
max: "max",
maxlength: "maxLength",
media: "media",
mediagroup: "mediaGroup",
method: "method",
min: "min",
minlength: "minLength",
multiple: "multiple",
muted: "muted",
name: "name",
nomodule: "noModule",
nonce: "nonce",
novalidate: "noValidate",
open: "open",
optimum: "optimum",
pattern: "pattern",
placeholder: "placeholder",
playsinline: "playsInline",
poster: "poster",
preload: "preload",
profile: "profile",
radiogroup: "radioGroup",
readonly: "readOnly",
referrerpolicy: "referrerPolicy",
rel: "rel",
required: "required",
reversed: "reversed",
role: "role",
rows: "rows",
rowspan: "rowSpan",
sandbox: "sandbox",
scope: "scope",
scoped: "scoped",
scrolling: "scrolling",
seamless: "seamless",
selected: "selected",
shape: "shape",
size: "size",
sizes: "sizes",
span: "span",
spellcheck: "spellCheck",
src: "src",
srcdoc: "srcDoc",
srclang: "srcLang",
srcset: "srcSet",
start: "start",
step: "step",
style: "style",
summary: "summary",
tabindex: "tabIndex",
target: "target",
title: "title",
type: "type",
usemap: "useMap",
value: "value",
width: "width",
wmode: "wmode",
wrap: "wrap",
// SVG
about: "about",
accentheight: "accentHeight",
"accent-height": "accentHeight",
accumulate: "accumulate",
additive: "additive",
alignmentbaseline: "alignmentBaseline",
"alignment-baseline": "alignmentBaseline",
allowreorder: "allowReorder",
alphabetic: "alphabetic",
amplitude: "amplitude",
arabicform: "arabicForm",
"arabic-form": "arabicForm",
ascent: "ascent",
attributename: "attributeName",
attributetype: "attributeType",
autoreverse: "autoReverse",
azimuth: "azimuth",
basefrequency: "baseFrequency",
baselineshift: "baselineShift",
"baseline-shift": "baselineShift",
baseprofile: "baseProfile",
bbox: "bbox",
begin: "begin",
bias: "bias",
by: "by",
calcmode: "calcMode",
capheight: "capHeight",
"cap-height": "capHeight",
clip: "clip",
clippath: "clipPath",
"clip-path": "clipPath",
clippathunits: "clipPathUnits",
cliprule: "clipRule",
"clip-rule": "clipRule",
color: "color",
colorinterpolation: "colorInterpolation",
"color-interpolation": "colorInterpolation",
colorinterpolationfilters: "colorInterpolationFilters",
"color-interpolation-filters": "colorInterpolationFilters",
colorprofile: "colorProfile",
"color-profile": "colorProfile",
colorrendering: "colorRendering",
"color-rendering": "colorRendering",
contentscripttype: "contentScriptType",
contentstyletype: "contentStyleType",
cursor: "cursor",
cx: "cx",
cy: "cy",
d: "d",
datatype: "datatype",
decelerate: "decelerate",
descent: "descent",
diffuseconstant: "diffuseConstant",
direction: "direction",
display: "display",
divisor: "divisor",
dominantbaseline: "dominantBaseline",
"dominant-baseline": "dominantBaseline",
dur: "dur",
dx: "dx",
dy: "dy",
edgemode: "edgeMode",
elevation: "elevation",
enablebackground: "enableBackground",
"enable-background": "enableBackground",
end: "end",
exponent: "exponent",
externalresourcesrequired: "externalResourcesRequired",
fill: "fill",
fillopacity: "fillOpacity",
"fill-opacity": "fillOpacity",
fillrule: "fillRule",
"fill-rule": "fillRule",
filter: "filter",
filterres: "filterRes",
filterunits: "filterUnits",
floodopacity: "floodOpacity",
"flood-opacity": "floodOpacity",
floodcolor: "floodColor",
"flood-color": "floodColor",
focusable: "focusable",
fontfamily: "fontFamily",
"font-family": "fontFamily",
fontsize: "fontSize",
"font-size": "fontSize",
fontsizeadjust: "fontSizeAdjust",
"font-size-adjust": "fontSizeAdjust",
fontstretch: "fontStretch",
"font-stretch": "fontStretch",
fontstyle: "fontStyle",
"font-style": "fontStyle",
fontvariant: "fontVariant",
"font-variant": "fontVariant",
fontweight: "fontWeight",
"font-weight": "fontWeight",
format: "format",
from: "from",
fx: "fx",
fy: "fy",
g1: "g1",
g2: "g2",
glyphname: "glyphName",
"glyph-name": "glyphName",
glyphorientationhorizontal: "glyphOrientationHorizontal",
"glyph-orientation-horizontal": "glyphOrientationHorizontal",
glyphorientationvertical: "glyphOrientationVertical",
"glyph-orientation-vertical": "glyphOrientationVertical",
glyphref: "glyphRef",
gradienttransform: "gradientTransform",
gradientunits: "gradientUnits",
hanging: "hanging",
horizadvx: "horizAdvX",
"horiz-adv-x": "horizAdvX",
horizoriginx: "horizOriginX",
"horiz-origin-x": "horizOriginX",
ideographic: "ideographic",
imagerendering: "imageRendering",
"image-rendering": "imageRendering",
in2: "in2",
in: "in",
inlist: "inlist",
intercept: "intercept",
k1: "k1",
k2: "k2",
k3: "k3",
k4: "k4",
k: "k",
kernelmatrix: "kernelMatrix",
kernelunitlength: "kernelUnitLength",
kerning: "kerning",
keypoints: "keyPoints",
keysplines: "keySplines",
keytimes: "keyTimes",
lengthadjust: "lengthAdjust",
letterspacing: "letterSpacing",
"letter-spacing": "letterSpacing",
lightingcolor: "lightingColor",
"lighting-color": "lightingColor",
limitingconeangle: "limitingConeAngle",
local: "local",
markerend: "markerEnd",
"marker-end": "markerEnd",
markerheight: "markerHeight",
markermid: "markerMid",
"marker-mid": "markerMid",
markerstart: "markerStart",
"marker-start": "markerStart",
markerunits: "markerUnits",
markerwidth: "markerWidth",
mask: "mask",
maskcontentunits: "maskContentUnits",
maskunits: "maskUnits",
mathematical: "mathematical",
mode: "mode",
numoctaves: "numOctaves",
offset: "offset",
opacity: "opacity",
operator: "operator",
order: "order",
orient: "orient",
orientation: "orientation",
origin: "origin",
overflow: "overflow",
overlineposition: "overlinePosition",
"overline-position": "overlinePosition",
overlinethickness: "overlineThickness",
"overline-thickness": "overlineThickness",
paintorder: "paintOrder",
"paint-order": "paintOrder",
panose1: "panose1",
"panose-1": "panose1",
pathlength: "pathLength",
patterncontentunits: "patternContentUnits",
patterntransform: "patternTransform",
patternunits: "patternUnits",
pointerevents: "pointerEvents",
"pointer-events": "pointerEvents",
points: "points",
pointsatx: "pointsAtX",
pointsaty: "pointsAtY",
pointsatz: "pointsAtZ",
prefix: "prefix",
preservealpha: "preserveAlpha",
preserveaspectratio: "preserveAspectRatio",
primitiveunits: "primitiveUnits",
property: "property",
r: "r",
radius: "radius",
refx: "refX",
refy: "refY",
renderingintent: "renderingIntent",
"rendering-intent": "renderingIntent",
repeatcount: "repeatCount",
repeatdur: "repeatDur",
requiredextensions: "requiredExtensions",
requiredfeatures: "requiredFeatures",
resource: "resource",
restart: "restart",
result: "result",
results: "results",
rotate: "rotate",
rx: "rx",
ry: "ry",
scale: "scale",
security: "security",
seed: "seed",
shaperendering: "shapeRendering",
"shape-rendering": "shapeRendering",
slope: "slope",
spacing: "spacing",
specularconstant: "specularConstant",
specularexponent: "specularExponent",
speed: "speed",
spreadmethod: "spreadMethod",
startoffset: "startOffset",
stddeviation: "stdDeviation",
stemh: "stemh",
stemv: "stemv",
stitchtiles: "stitchTiles",
stopcolor: "stopColor",
"stop-color": "stopColor",
stopopacity: "stopOpacity",
"stop-opacity": "stopOpacity",
strikethroughposition: "strikethroughPosition",
"strikethrough-position": "strikethroughPosition",
strikethroughthickness: "strikethroughThickness",
"strikethrough-thickness": "strikethroughThickness",
string: "string",
stroke: "stroke",
strokedasharray: "strokeDasharray",
"stroke-dasharray": "strokeDasharray",
strokedashoffset: "strokeDashoffset",
"stroke-dashoffset": "strokeDashoffset",
strokelinecap: "strokeLinecap",
"stroke-linecap": "strokeLinecap",
strokelinejoin: "strokeLinejoin",
"stroke-linejoin": "strokeLinejoin",
strokemiterlimit: "strokeMiterlimit",
"stroke-miterlimit": "strokeMiterlimit",
strokewidth: "strokeWidth",
"stroke-width": "strokeWidth",
strokeopacity: "strokeOpacity",
"stroke-opacity": "strokeOpacity",
suppresscontenteditablewarning: "suppressContentEditableWarning",
suppresshydrationwarning: "suppressHydrationWarning",
surfacescale: "surfaceScale",
systemlanguage: "systemLanguage",
tablevalues: "tableValues",
targetx: "targetX",
targety: "targetY",
textanchor: "textAnchor",
"text-anchor": "textAnchor",
textdecoration: "textDecoration",
"text-decoration": "textDecoration",
textlength: "textLength",
textrendering: "textRendering",
"text-rendering": "textRendering",
to: "to",
transform: "transform",
typeof: "typeof",
u1: "u1",
u2: "u2",
underlineposition: "underlinePosition",
"underline-position": "underlinePosition",
underlinethickness: "underlineThickness",
"underline-thickness": "underlineThickness",
unicode: "unicode",
unicodebidi: "unicodeBidi",
"unicode-bidi": "unicodeBidi",
unicoderange: "unicodeRange",
"unicode-range": "unicodeRange",
unitsperem: "unitsPerEm",
"units-per-em": "unitsPerEm",
unselectable: "unselectable",
valphabetic: "vAlphabetic",
"v-alphabetic": "vAlphabetic",
values: "values",
vectoreffect: "vectorEffect",
"vector-effect": "vectorEffect",
version: "version",
vertadvy: "vertAdvY",
"vert-adv-y": "vertAdvY",
vertoriginx: "vertOriginX",
"vert-origin-x": "vertOriginX",
vertoriginy: "vertOriginY",
"vert-origin-y": "vertOriginY",
vhanging: "vHanging",
"v-hanging": "vHanging",
videographic: "vIdeographic",
"v-ideographic": "vIdeographic",
viewbox: "viewBox",
viewtarget: "viewTarget",
visibility: "visibility",
vmathematical: "vMathematical",
"v-mathematical": "vMathematical",
vocab: "vocab",
widths: "widths",
wordspacing: "wordSpacing",
"word-spacing": "wordSpacing",
writingmode: "writingMode",
"writing-mode": "writingMode",
x1: "x1",
x2: "x2",
x: "x",
xchannelselector: "xChannelSelector",
xheight: "xHeight",
"x-height": "xHeight",
xlinkactuate: "xlinkActuate",
"xlink:actuate": "xlinkActuate",
xlinkarcrole: "xlinkArcrole",
"xlink:arcrole": "xlinkArcrole",
xlinkhref: "xlinkHref",
"xlink:href": "xlinkHref",
xlinkrole: "xlinkRole",
"xlink:role": "xlinkRole",
xlinkshow: "xlinkShow",
"xlink:show": "xlinkShow",
xlinktitle: "xlinkTitle",
"xlink:title": "xlinkTitle",
xlinktype: "xlinkType",
"xlink:type": "xlinkType",
xmlbase: "xmlBase",
"xml:base": "xmlBase",
xmllang: "xmlLang",
"xml:lang": "xmlLang",
xmlns: "xmlns",
"xml:space": "xmlSpace",
xmlnsxlink: "xmlnsXlink",
"xmlns:xlink": "xmlnsXlink",
xmlspace: "xmlSpace",
y1: "y1",
y2: "y2",
y: "y",
ychannelselector: "yChannelSelector",
z: "z",
zoomandpan: "zoomAndPan"
};
var ariaProperties = {
"aria-current": 0,
// state
"aria-description": 0,
"aria-details": 0,
"aria-disabled": 0,
// state
"aria-hidden": 0,
// state
"aria-invalid": 0,
// state
"aria-keyshortcuts": 0,
"aria-label": 0,
"aria-roledescription": 0,
// Widget Attributes
"aria-autocomplete": 0,
"aria-checked": 0,
"aria-expanded": 0,
"aria-haspopup": 0,
"aria-level": 0,
"aria-modal": 0,
"aria-multiline": 0,
"aria-multiselectable": 0,
"aria-orientation": 0,
"aria-placeholder": 0,
"aria-pressed": 0,
"aria-readonly": 0,
"aria-required": 0,
"aria-selected": 0,
"aria-sort": 0,
"aria-valuemax": 0,
"aria-valuemin": 0,
"aria-valuenow": 0,
"aria-valuetext": 0,
// Live Region Attributes
"aria-atomic": 0,
"aria-busy": 0,
"aria-live": 0,
"aria-relevant": 0,
// Drag-and-Drop Attributes
"aria-dropeffect": 0,
"aria-grabbed": 0,
// Relationship Attributes
"aria-activedescendant": 0,
"aria-colcount": 0,
"aria-colindex": 0,
"aria-colspan": 0,
"aria-controls": 0,
"aria-describedby": 0,
"aria-errormessage": 0,
"aria-flowto": 0,
"aria-labelledby": 0,
"aria-owns": 0,
"aria-posinset": 0,
"aria-rowcount": 0,
"aria-rowindex": 0,
"aria-rowspan": 0,
"aria-setsize": 0
};
var warnedProperties = {};
var rARIA = new RegExp("^(aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$");
var rARIACamel = new RegExp("^(aria)[A-Z][" + ATTRIBUTE_NAME_CHAR + "]*$");
function validateProperty(tagName, name) {
{
if (hasOwnProperty2.call(warnedProperties, name) && warnedProperties[name]) {
return true;
}
if (rARIACamel.test(name)) {
var ariaName = "aria-" + name.slice(4).toLowerCase();
var correctName = ariaProperties.hasOwnProperty(ariaName) ? ariaName : null;
if (correctName == null) {
error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.", name);
warnedProperties[name] = true;
return true;
}
if (name !== correctName) {
error("Invalid ARIA attribute `%s`. Did you mean `%s`?", name, correctName);
warnedProperties[name] = true;
return true;
}
}
if (rARIA.test(name)) {
var lowerCasedName = name.toLowerCase();
var standardName = ariaProperties.hasOwnProperty(lowerCasedName) ? lowerCasedName : null;
if (standardName == null) {
warnedProperties[name] = true;
return false;
}
if (name !== standardName) {
error("Unknown ARIA attribute `%s`. Did you mean `%s`?", name, standardName);
warnedProperties[name] = true;
return true;
}
}
}
return true;
}
function warnInvalidARIAProps(type, props) {
{
var invalidProps = [];
for (var key2 in props) {
var isValid = validateProperty(type, key2);
if (!isValid) {
invalidProps.push(key2);
}
}
var unknownPropString = invalidProps.map(function(prop) {
return "`" + prop + "`";
}).join(", ");
if (invalidProps.length === 1) {
error("Invalid aria prop %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", unknownPropString, type);
} else if (invalidProps.length > 1) {
error("Invalid aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", unknownPropString, type);
}
}
}
function validateProperties(type, props) {
if (isCustomComponent(type, props)) {
return;
}
warnInvalidARIAProps(type, props);
}
var didWarnValueNull = false;
function validateProperties$1(type, props) {
{
if (type !== "input" && type !== "textarea" && type !== "select") {
return;
}
if (props != null && props.value === null && !didWarnValueNull) {
didWarnValueNull = true;
if (type === "select" && props.multiple) {
error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.", type);
} else {
error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.", type);
}
}
}
}
var validateProperty$1 = function() {
};
{
var warnedProperties$1 = {};
var EVENT_NAME_REGEX = /^on./;
var INVALID_EVENT_NAME_REGEX = /^on[^A-Z]/;
var rARIA$1 = new RegExp("^(aria)-[" + ATTRIBUTE_NAME_CHAR + "]*$");
var rARIACamel$1 = new RegExp("^(aria)[A-Z][" + ATTRIBUTE_NAME_CHAR + "]*$");
validateProperty$1 = function(tagName, name, value, eventRegistry) {
if (hasOwnProperty2.call(warnedProperties$1, name) && warnedProperties$1[name]) {
return true;
}
var lowerCasedName = name.toLowerCase();
if (lowerCasedName === "onfocusin" || lowerCasedName === "onfocusout") {
error("React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.");
warnedProperties$1[name] = true;
return true;
}
if (eventRegistry != null) {
var registrationNameDependencies2 = eventRegistry.registrationNameDependencies, possibleRegistrationNames2 = eventRegistry.possibleRegistrationNames;
if (registrationNameDependencies2.hasOwnProperty(name)) {
return true;
}
var registrationName = possibleRegistrationNames2.hasOwnProperty(lowerCasedName) ? possibleRegistrationNames2[lowerCasedName] : null;
if (registrationName != null) {
error("Invalid event handler property `%s`. Did you mean `%s`?", name, registrationName);
warnedProperties$1[name] = true;
return true;
}
if (EVENT_NAME_REGEX.test(name)) {
error("Unknown event handler property `%s`. It will be ignored.", name);
warnedProperties$1[name] = true;
return true;
}
} else if (EVENT_NAME_REGEX.test(name)) {
if (INVALID_EVENT_NAME_REGEX.test(name)) {
error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.", name);
}
warnedProperties$1[name] = true;
return true;
}
if (rARIA$1.test(name) || rARIACamel$1.test(name)) {
return true;
}
if (lowerCasedName === "innerhtml") {
error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`.");
warnedProperties$1[name] = true;
return true;
}
if (lowerCasedName === "aria") {
error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead.");
warnedProperties$1[name] = true;
return true;
}
if (lowerCasedName === "is" && value !== null && value !== void 0 && typeof value !== "string") {
error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.", typeof value);
warnedProperties$1[name] = true;
return true;
}
if (typeof value === "number" && isNaN(value)) {
error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.", name);
warnedProperties$1[name] = true;
return true;
}
var propertyInfo = getPropertyInfo(name);
var isReserved = propertyInfo !== null && propertyInfo.type === RESERVED;
if (possibleStandardNames.hasOwnProperty(lowerCasedName)) {
var standardName = possibleStandardNames[lowerCasedName];
if (standardName !== name) {
error("Invalid DOM property `%s`. Did you mean `%s`?", name, standardName);
warnedProperties$1[name] = true;
return true;
}
} else if (!isReserved && name !== lowerCasedName) {
error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.", name, lowerCasedName);
warnedProperties$1[name] = true;
return true;
}
if (typeof value === "boolean" && shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
if (value) {
error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.', value, name, name, value, name);
} else {
error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.', value, name, name, value, name, name, name);
}
warnedProperties$1[name] = true;
return true;
}
if (isReserved) {
return true;
}
if (shouldRemoveAttributeWithWarning(name, value, propertyInfo, false)) {
warnedProperties$1[name] = true;
return false;
}
if ((value === "false" || value === "true") && propertyInfo !== null && propertyInfo.type === BOOLEAN) {
error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?", value, name, value === "false" ? "The browser will interpret it as a truthy value." : 'Although this works, it will not work as expected if you pass the string "false".', name, value);
warnedProperties$1[name] = true;
return true;
}
return true;
};
}
var warnUnknownProperties = function(type, props, eventRegistry) {
{
var unknownProps = [];
for (var key2 in props) {
var isValid = validateProperty$1(type, key2, props[key2], eventRegistry);
if (!isValid) {
unknownProps.push(key2);
}
}
var unknownPropString = unknownProps.map(function(prop) {
return "`" + prop + "`";
}).join(", ");
if (unknownProps.length === 1) {
error("Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", unknownPropString, type);
} else if (unknownProps.length > 1) {
error("Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://reactjs.org/link/attribute-behavior ", unknownPropString, type);
}
}
};
function validateProperties$2(type, props, eventRegistry) {
if (isCustomComponent(type, props)) {
return;
}
warnUnknownProperties(type, props, eventRegistry);
}
var IS_EVENT_HANDLE_NON_MANAGED_NODE = 1;
var IS_NON_DELEGATED = 1 << 1;
var IS_CAPTURE_PHASE = 1 << 2;
var SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS = IS_EVENT_HANDLE_NON_MANAGED_NODE | IS_NON_DELEGATED | IS_CAPTURE_PHASE;
var currentReplayingEvent = null;
function setReplayingEvent(event) {
{
if (currentReplayingEvent !== null) {
error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.");
}
}
currentReplayingEvent = event;
}
function resetReplayingEvent() {
{
if (currentReplayingEvent === null) {
error("Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.");
}
}
currentReplayingEvent = null;
}
function isReplayingEvent(event) {
return event === currentReplayingEvent;
}
function getEventTarget(nativeEvent) {
var target = nativeEvent.target || nativeEvent.srcElement || window;
if (target.correspondingUseElement) {
target = target.correspondingUseElement;
}
return target.nodeType === TEXT_NODE ? target.parentNode : target;
}
var restoreImpl = null;
var restoreTarget = null;
var restoreQueue = null;
function restoreStateOfTarget(target) {
var internalInstance = getInstanceFromNode(target);
if (!internalInstance) {
return;
}
if (typeof restoreImpl !== "function") {
throw new Error("setRestoreImplementation() needs to be called to handle a target for controlled events. This error is likely caused by a bug in React. Please file an issue.");
}
var stateNode = internalInstance.stateNode;
if (stateNode) {
var _props = getFiberCurrentPropsFromNode(stateNode);
restoreImpl(internalInstance.stateNode, internalInstance.type, _props);
}
}
function setRestoreImplementation(impl) {
restoreImpl = impl;
}
function enqueueStateRestore(target) {
if (restoreTarget) {
if (restoreQueue) {
restoreQueue.push(target);
} else {
restoreQueue = [target];
}
} else {
restoreTarget = target;
}
}
function needsStateRestore() {
return restoreTarget !== null || restoreQueue !== null;
}
function restoreStateIfNeeded() {
if (!restoreTarget) {
return;
}
var target = restoreTarget;
var queuedTargets = restoreQueue;
restoreTarget = null;
restoreQueue = null;
restoreStateOfTarget(target);
if (queuedTargets) {
for (var i = 0; i < queuedTargets.length; i++) {
restoreStateOfTarget(queuedTargets[i]);
}
}
}
var batchedUpdatesImpl = function(fn, bookkeeping) {
return fn(bookkeeping);
};
var flushSyncImpl = function() {
};
var isInsideEventHandler = false;
function finishEventHandler() {
var controlledComponentsHavePendingUpdates = needsStateRestore();
if (controlledComponentsHavePendingUpdates) {
flushSyncImpl();
restoreStateIfNeeded();
}
}
function batchedUpdates(fn, a, b) {
if (isInsideEventHandler) {
return fn(a, b);
}
isInsideEventHandler = true;
try {
return batchedUpdatesImpl(fn, a, b);
} finally {
isInsideEventHandler = false;
finishEventHandler();
}
}
function setBatchingImplementation(_batchedUpdatesImpl, _discreteUpdatesImpl, _flushSyncImpl) {
batchedUpdatesImpl = _batchedUpdatesImpl;
flushSyncImpl = _flushSyncImpl;
}
function isInteractive(tag) {
return tag === "button" || tag === "input" || tag === "select" || tag === "textarea";
}
function shouldPreventMouseEvent(name, type, props) {
switch (name) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
case "onMouseEnter":
return !!(props.disabled && isInteractive(type));
default:
return false;
}
}
function getListener(inst, registrationName) {
var stateNode = inst.stateNode;
if (stateNode === null) {
return null;
}
var props = getFiberCurrentPropsFromNode(stateNode);
if (props === null) {
return null;
}
var listener = props[registrationName];
if (shouldPreventMouseEvent(registrationName, inst.type, props)) {
return null;
}
if (listener && typeof listener !== "function") {
throw new Error("Expected `" + registrationName + "` listener to be a function, instead got a value of `" + typeof listener + "` type.");
}
return listener;
}
var passiveBrowserEventsSupported = false;
if (canUseDOM2) {
try {
var options = {};
Object.defineProperty(options, "passive", {
get: function() {
passiveBrowserEventsSupported = true;
}
});
window.addEventListener("test", options, options);
window.removeEventListener("test", options, options);
} catch (e) {
passiveBrowserEventsSupported = false;
}
}
function invokeGuardedCallbackProd(name, func, context, a, b, c, d, e, f) {
var funcArgs = Array.prototype.slice.call(arguments, 3);
try {
func.apply(context, funcArgs);
} catch (error2) {
this.onError(error2);
}
}
var invokeGuardedCallbackImpl = invokeGuardedCallbackProd;
{
if (typeof window !== "undefined" && typeof window.dispatchEvent === "function" && typeof document !== "undefined" && typeof document.createEvent === "function") {
var fakeNode = document.createElement("react");
invokeGuardedCallbackImpl = function invokeGuardedCallbackDev(name, func, context, a, b, c, d, e, f) {
if (typeof document === "undefined" || document === null) {
throw new Error("The `document` global was defined when React was initialized, but is not defined anymore. This can happen in a test environment if a component schedules an update from an asynchronous callback, but the test has already finished running. To solve this, you can either unmount the component at the end of your test (and ensure that any asynchronous operations get canceled in `componentWillUnmount`), or you can change the test itself to be asynchronous.");
}
var evt = document.createEvent("Event");
var didCall = false;
var didError = true;
var windowEvent = window.event;
var windowEventDescriptor = Object.getOwnPropertyDescriptor(window, "event");
function restoreAfterDispatch() {
fakeNode.removeEventListener(evtType, callCallback2, false);
if (typeof window.event !== "undefined" && window.hasOwnProperty("event")) {
window.event = windowEvent;
}
}
var funcArgs = Array.prototype.slice.call(arguments, 3);
function callCallback2() {
didCall = true;
restoreAfterDispatch();
func.apply(context, funcArgs);
didError = false;
}
var error2;
var didSetError = false;
var isCrossOriginError = false;
function handleWindowError(event) {
error2 = event.error;
didSetError = true;
if (error2 === null && event.colno === 0 && event.lineno === 0) {
isCrossOriginError = true;
}
if (event.defaultPrevented) {
if (error2 != null && typeof error2 === "object") {
try {
error2._suppressLogging = true;
} catch (inner) {
}
}
}
}
var evtType = "react-" + (name ? name : "invokeguardedcallback");
window.addEventListener("error", handleWindowError);
fakeNode.addEventListener(evtType, callCallback2, false);
evt.initEvent(evtType, false, false);
fakeNode.dispatchEvent(evt);
if (windowEventDescriptor) {
Object.defineProperty(window, "event", windowEventDescriptor);
}
if (didCall && didError) {
if (!didSetError) {
error2 = new Error(`An error was thrown inside one of your components, but React doesn't know what it was. This is likely due to browser flakiness. React does its best to preserve the "Pause on exceptions" behavior of the DevTools, which requires some DEV-mode only tricks. It's possible that these don't work in your browser. Try triggering the error in production mode, or switching to a modern browser. If you suspect that this is actually an issue with React, please file an issue.`);
} else if (isCrossOriginError) {
error2 = new Error("A cross-origin error was thrown. React doesn't have access to the actual error object in development. See https://reactjs.org/link/crossorigin-error for more information.");
}
this.onError(error2);
}
window.removeEventListener("error", handleWindowError);
if (!didCall) {
restoreAfterDispatch();
return invokeGuardedCallbackProd.apply(this, arguments);
}
};
}
}
var invokeGuardedCallbackImpl$1 = invokeGuardedCallbackImpl;
var hasError = false;
var caughtError = null;
var hasRethrowError = false;
var rethrowError = null;
var reporter = {
onError: function(error2) {
hasError = true;
caughtError = error2;
}
};
function invokeGuardedCallback(name, func, context, a, b, c, d, e, f) {
hasError = false;
caughtError = null;
invokeGuardedCallbackImpl$1.apply(reporter, arguments);
}
function invokeGuardedCallbackAndCatchFirstError(name, func, context, a, b, c, d, e, f) {
invokeGuardedCallback.apply(this, arguments);
if (hasError) {
var error2 = clearCaughtError();
if (!hasRethrowError) {
hasRethrowError = true;
rethrowError = error2;
}
}
}
function rethrowCaughtError() {
if (hasRethrowError) {
var error2 = rethrowError;
hasRethrowError = false;
rethrowError = null;
throw error2;
}
}
function hasCaughtError() {
return hasError;
}
function clearCaughtError() {
if (hasError) {
var error2 = caughtError;
hasError = false;
caughtError = null;
return error2;
} else {
throw new Error("clearCaughtError was called but no error was captured. This error is likely caused by a bug in React. Please file an issue.");
}
}
function get(key2) {
return key2._reactInternals;
}
function has2(key2) {
return key2._reactInternals !== void 0;
}
function set2(key2, value) {
key2._reactInternals = value;
}
var NoFlags = (
/* */
0
);
var PerformedWork = (
/* */
1
);
var Placement = (
/* */
2
);
var Update = (
/* */
4
);
var ChildDeletion = (
/* */
16
);
var ContentReset = (
/* */
32
);
var Callback = (
/* */
64
);
var DidCapture = (
/* */
128
);
var ForceClientRender = (
/* */
256
);
var Ref = (
/* */
512
);
var Snapshot = (
/* */
1024
);
var Passive = (
/* */
2048
);
var Hydrating = (
/* */
4096
);
var Visibility = (
/* */
8192
);
var StoreConsistency = (
/* */
16384
);
var LifecycleEffectMask = Passive | Update | Callback | Ref | Snapshot | StoreConsistency;
var HostEffectMask = (
/* */
32767
);
var Incomplete = (
/* */
32768
);
var ShouldCapture = (
/* */
65536
);
var ForceUpdateForLegacySuspense = (
/* */
131072
);
var Forked = (
/* */
1048576
);
var RefStatic = (
/* */
2097152
);
var LayoutStatic = (
/* */
4194304
);
var PassiveStatic = (
/* */
8388608
);
var MountLayoutDev = (
/* */
16777216
);
var MountPassiveDev = (
/* */
33554432
);
var BeforeMutationMask = (
// TODO: Remove Update flag from before mutation phase by re-landing Visibility
// flag logic (see #20043)
Update | Snapshot | 0
);
var MutationMask = Placement | Update | ChildDeletion | ContentReset | Ref | Hydrating | Visibility;
var LayoutMask = Update | Callback | Ref | Visibility;
var PassiveMask = Passive | ChildDeletion;
var StaticMask = LayoutStatic | PassiveStatic | RefStatic;
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
function getNearestMountedFiber(fiber) {
var node = fiber;
var nearestMounted = fiber;
if (!fiber.alternate) {
var nextNode = node;
do {
node = nextNode;
if ((node.flags & (Placement | Hydrating)) !== NoFlags) {
nearestMounted = node.return;
}
nextNode = node.return;
} while (nextNode);
} else {
while (node.return) {
node = node.return;
}
}
if (node.tag === HostRoot) {
return nearestMounted;
}
return null;
}
function getSuspenseInstanceFromFiber(fiber) {
if (fiber.tag === SuspenseComponent) {
var suspenseState = fiber.memoizedState;
if (suspenseState === null) {
var current3 = fiber.alternate;
if (current3 !== null) {
suspenseState = current3.memoizedState;
}
}
if (suspenseState !== null) {
return suspenseState.dehydrated;
}
}
return null;
}
function getContainerFromFiber(fiber) {
return fiber.tag === HostRoot ? fiber.stateNode.containerInfo : null;
}
function isFiberMounted(fiber) {
return getNearestMountedFiber(fiber) === fiber;
}
function isMounted(component) {
{
var owner = ReactCurrentOwner.current;
if (owner !== null && owner.tag === ClassComponent) {
var ownerFiber = owner;
var instance = ownerFiber.stateNode;
if (!instance._warnedAboutRefsInRender) {
error("%s is accessing isMounted inside its render() function. render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", getComponentNameFromFiber(ownerFiber) || "A component");
}
instance._warnedAboutRefsInRender = true;
}
}
var fiber = get(component);
if (!fiber) {
return false;
}
return getNearestMountedFiber(fiber) === fiber;
}
function assertIsMounted(fiber) {
if (getNearestMountedFiber(fiber) !== fiber) {
throw new Error("Unable to find node on an unmounted component.");
}
}
function findCurrentFiberUsingSlowPath(fiber) {
var alternate = fiber.alternate;
if (!alternate) {
var nearestMounted = getNearestMountedFiber(fiber);
if (nearestMounted === null) {
throw new Error("Unable to find node on an unmounted component.");
}
if (nearestMounted !== fiber) {
return null;
}
return fiber;
}
var a = fiber;
var b = alternate;
while (true) {
var parentA = a.return;
if (parentA === null) {
break;
}
var parentB = parentA.alternate;
if (parentB === null) {
var nextParent = parentA.return;
if (nextParent !== null) {
a = b = nextParent;
continue;
}
break;
}
if (parentA.child === parentB.child) {
var child = parentA.child;
while (child) {
if (child === a) {
assertIsMounted(parentA);
return fiber;
}
if (child === b) {
assertIsMounted(parentA);
return alternate;
}
child = child.sibling;
}
throw new Error("Unable to find node on an unmounted component.");
}
if (a.return !== b.return) {
a = parentA;
b = parentB;
} else {
var didFindChild = false;
var _child = parentA.child;
while (_child) {
if (_child === a) {
didFindChild = true;
a = parentA;
b = parentB;
break;
}
if (_child === b) {
didFindChild = true;
b = parentA;
a = parentB;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
_child = parentB.child;
while (_child) {
if (_child === a) {
didFindChild = true;
a = parentB;
b = parentA;
break;
}
if (_child === b) {
didFindChild = true;
b = parentB;
a = parentA;
break;
}
_child = _child.sibling;
}
if (!didFindChild) {
throw new Error("Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.");
}
}
}
if (a.alternate !== b) {
throw new Error("Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.");
}
}
if (a.tag !== HostRoot) {
throw new Error("Unable to find node on an unmounted component.");
}
if (a.stateNode.current === a) {
return fiber;
}
return alternate;
}
function findCurrentHostFiber(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberImpl(currentParent) : null;
}
function findCurrentHostFiberImpl(node) {
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
var match2 = findCurrentHostFiberImpl(child);
if (match2 !== null) {
return match2;
}
child = child.sibling;
}
return null;
}
function findCurrentHostFiberWithNoPortals(parent) {
var currentParent = findCurrentFiberUsingSlowPath(parent);
return currentParent !== null ? findCurrentHostFiberWithNoPortalsImpl(currentParent) : null;
}
function findCurrentHostFiberWithNoPortalsImpl(node) {
if (node.tag === HostComponent || node.tag === HostText) {
return node;
}
var child = node.child;
while (child !== null) {
if (child.tag !== HostPortal) {
var match2 = findCurrentHostFiberWithNoPortalsImpl(child);
if (match2 !== null) {
return match2;
}
}
child = child.sibling;
}
return null;
}
var scheduleCallback = Scheduler.unstable_scheduleCallback;
var cancelCallback = Scheduler.unstable_cancelCallback;
var shouldYield = Scheduler.unstable_shouldYield;
var requestPaint = Scheduler.unstable_requestPaint;
var now3 = Scheduler.unstable_now;
var getCurrentPriorityLevel = Scheduler.unstable_getCurrentPriorityLevel;
var ImmediatePriority = Scheduler.unstable_ImmediatePriority;
var UserBlockingPriority = Scheduler.unstable_UserBlockingPriority;
var NormalPriority = Scheduler.unstable_NormalPriority;
var LowPriority = Scheduler.unstable_LowPriority;
var IdlePriority = Scheduler.unstable_IdlePriority;
var unstable_yieldValue = Scheduler.unstable_yieldValue;
var unstable_setDisableYieldValue = Scheduler.unstable_setDisableYieldValue;
var rendererID = null;
var injectedHook = null;
var injectedProfilingHooks = null;
var hasLoggedError = false;
var isDevToolsPresent = typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined";
function injectInternals(internals) {
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === "undefined") {
return false;
}
var hook = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (hook.isDisabled) {
return true;
}
if (!hook.supportsFiber) {
{
error("The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://reactjs.org/link/react-devtools");
}
return true;
}
try {
if (enableSchedulingProfiler) {
internals = assign({}, internals, {
getLaneLabelMap,
injectProfilingHooks
});
}
rendererID = hook.inject(internals);
injectedHook = hook;
} catch (err) {
{
error("React instrumentation encountered an error: %s.", err);
}
}
if (hook.checkDCE) {
return true;
} else {
return false;
}
}
function onScheduleRoot(root2, children) {
{
if (injectedHook && typeof injectedHook.onScheduleFiberRoot === "function") {
try {
injectedHook.onScheduleFiberRoot(rendererID, root2, children);
} catch (err) {
if (!hasLoggedError) {
hasLoggedError = true;
error("React instrumentation encountered an error: %s", err);
}
}
}
}
}
function onCommitRoot(root2, eventPriority) {
if (injectedHook && typeof injectedHook.onCommitFiberRoot === "function") {
try {
var didError = (root2.current.flags & DidCapture) === DidCapture;
if (enableProfilerTimer) {
var schedulerPriority;
switch (eventPriority) {
case DiscreteEventPriority:
schedulerPriority = ImmediatePriority;
break;
case ContinuousEventPriority:
schedulerPriority = UserBlockingPriority;
break;
case DefaultEventPriority:
schedulerPriority = NormalPriority;
break;
case IdleEventPriority:
schedulerPriority = IdlePriority;
break;
default:
schedulerPriority = NormalPriority;
break;
}
injectedHook.onCommitFiberRoot(rendererID, root2, schedulerPriority, didError);
} else {
injectedHook.onCommitFiberRoot(rendererID, root2, void 0, didError);
}
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error("React instrumentation encountered an error: %s", err);
}
}
}
}
}
function onPostCommitRoot(root2) {
if (injectedHook && typeof injectedHook.onPostCommitFiberRoot === "function") {
try {
injectedHook.onPostCommitFiberRoot(rendererID, root2);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error("React instrumentation encountered an error: %s", err);
}
}
}
}
}
function onCommitUnmount(fiber) {
if (injectedHook && typeof injectedHook.onCommitFiberUnmount === "function") {
try {
injectedHook.onCommitFiberUnmount(rendererID, fiber);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error("React instrumentation encountered an error: %s", err);
}
}
}
}
}
function setIsStrictModeForDevtools(newIsStrictMode) {
{
if (typeof unstable_yieldValue === "function") {
unstable_setDisableYieldValue(newIsStrictMode);
setSuppressWarning(newIsStrictMode);
}
if (injectedHook && typeof injectedHook.setStrictMode === "function") {
try {
injectedHook.setStrictMode(rendererID, newIsStrictMode);
} catch (err) {
{
if (!hasLoggedError) {
hasLoggedError = true;
error("React instrumentation encountered an error: %s", err);
}
}
}
}
}
}
function injectProfilingHooks(profilingHooks) {
injectedProfilingHooks = profilingHooks;
}
function getLaneLabelMap() {
{
var map = /* @__PURE__ */ new Map();
var lane = 1;
for (var index2 = 0; index2 < TotalLanes; index2++) {
var label = getLabelForLane(lane);
map.set(lane, label);
lane *= 2;
}
return map;
}
}
function markCommitStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStarted === "function") {
injectedProfilingHooks.markCommitStarted(lanes);
}
}
}
function markCommitStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markCommitStopped === "function") {
injectedProfilingHooks.markCommitStopped();
}
}
}
function markComponentRenderStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStarted === "function") {
injectedProfilingHooks.markComponentRenderStarted(fiber);
}
}
}
function markComponentRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentRenderStopped === "function") {
injectedProfilingHooks.markComponentRenderStopped();
}
}
}
function markComponentPassiveEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStarted === "function") {
injectedProfilingHooks.markComponentPassiveEffectMountStarted(fiber);
}
}
}
function markComponentPassiveEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectMountStopped === "function") {
injectedProfilingHooks.markComponentPassiveEffectMountStopped();
}
}
}
function markComponentPassiveEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStarted === "function") {
injectedProfilingHooks.markComponentPassiveEffectUnmountStarted(fiber);
}
}
}
function markComponentPassiveEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentPassiveEffectUnmountStopped === "function") {
injectedProfilingHooks.markComponentPassiveEffectUnmountStopped();
}
}
}
function markComponentLayoutEffectMountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStarted === "function") {
injectedProfilingHooks.markComponentLayoutEffectMountStarted(fiber);
}
}
}
function markComponentLayoutEffectMountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectMountStopped === "function") {
injectedProfilingHooks.markComponentLayoutEffectMountStopped();
}
}
}
function markComponentLayoutEffectUnmountStarted(fiber) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStarted === "function") {
injectedProfilingHooks.markComponentLayoutEffectUnmountStarted(fiber);
}
}
}
function markComponentLayoutEffectUnmountStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentLayoutEffectUnmountStopped === "function") {
injectedProfilingHooks.markComponentLayoutEffectUnmountStopped();
}
}
}
function markComponentErrored(fiber, thrownValue, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentErrored === "function") {
injectedProfilingHooks.markComponentErrored(fiber, thrownValue, lanes);
}
}
}
function markComponentSuspended(fiber, wakeable, lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markComponentSuspended === "function") {
injectedProfilingHooks.markComponentSuspended(fiber, wakeable, lanes);
}
}
}
function markLayoutEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStarted === "function") {
injectedProfilingHooks.markLayoutEffectsStarted(lanes);
}
}
}
function markLayoutEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markLayoutEffectsStopped === "function") {
injectedProfilingHooks.markLayoutEffectsStopped();
}
}
}
function markPassiveEffectsStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStarted === "function") {
injectedProfilingHooks.markPassiveEffectsStarted(lanes);
}
}
}
function markPassiveEffectsStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markPassiveEffectsStopped === "function") {
injectedProfilingHooks.markPassiveEffectsStopped();
}
}
}
function markRenderStarted(lanes) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStarted === "function") {
injectedProfilingHooks.markRenderStarted(lanes);
}
}
}
function markRenderYielded() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderYielded === "function") {
injectedProfilingHooks.markRenderYielded();
}
}
}
function markRenderStopped() {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderStopped === "function") {
injectedProfilingHooks.markRenderStopped();
}
}
}
function markRenderScheduled(lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markRenderScheduled === "function") {
injectedProfilingHooks.markRenderScheduled(lane);
}
}
}
function markForceUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markForceUpdateScheduled === "function") {
injectedProfilingHooks.markForceUpdateScheduled(fiber, lane);
}
}
}
function markStateUpdateScheduled(fiber, lane) {
{
if (injectedProfilingHooks !== null && typeof injectedProfilingHooks.markStateUpdateScheduled === "function") {
injectedProfilingHooks.markStateUpdateScheduled(fiber, lane);
}
}
}
var NoMode = (
/* */
0
);
var ConcurrentMode = (
/* */
1
);
var ProfileMode = (
/* */
2
);
var StrictLegacyMode = (
/* */
8
);
var StrictEffectsMode = (
/* */
16
);
var clz32 = Math.clz32 ? Math.clz32 : clz32Fallback;
var log = Math.log;
var LN2 = Math.LN2;
function clz32Fallback(x) {
var asUint = x >>> 0;
if (asUint === 0) {
return 32;
}
return 31 - (log(asUint) / LN2 | 0) | 0;
}
var TotalLanes = 31;
var NoLanes = (
/* */
0
);
var NoLane = (
/* */
0
);
var SyncLane = (
/* */
1
);
var InputContinuousHydrationLane = (
/* */
2
);
var InputContinuousLane = (
/* */
4
);
var DefaultHydrationLane = (
/* */
8
);
var DefaultLane = (
/* */
16
);
var TransitionHydrationLane = (
/* */
32
);
var TransitionLanes = (
/* */
4194240
);
var TransitionLane1 = (
/* */
64
);
var TransitionLane2 = (
/* */
128
);
var TransitionLane3 = (
/* */
256
);
var TransitionLane4 = (
/* */
512
);
var TransitionLane5 = (
/* */
1024
);
var TransitionLane6 = (
/* */
2048
);
var TransitionLane7 = (
/* */
4096
);
var TransitionLane8 = (
/* */
8192
);
var TransitionLane9 = (
/* */
16384
);
var TransitionLane10 = (
/* */
32768
);
var TransitionLane11 = (
/* */
65536
);
var TransitionLane12 = (
/* */
131072
);
var TransitionLane13 = (
/* */
262144
);
var TransitionLane14 = (
/* */
524288
);
var TransitionLane15 = (
/* */
1048576
);
var TransitionLane16 = (
/* */
2097152
);
var RetryLanes = (
/* */
130023424
);
var RetryLane1 = (
/* */
4194304
);
var RetryLane2 = (
/* */
8388608
);
var RetryLane3 = (
/* */
16777216
);
var RetryLane4 = (
/* */
33554432
);
var RetryLane5 = (
/* */
67108864
);
var SomeRetryLane = RetryLane1;
var SelectiveHydrationLane = (
/* */
134217728
);
var NonIdleLanes = (
/* */
268435455
);
var IdleHydrationLane = (
/* */
268435456
);
var IdleLane = (
/* */
536870912
);
var OffscreenLane = (
/* */
1073741824
);
function getLabelForLane(lane) {
{
if (lane & SyncLane) {
return "Sync";
}
if (lane & InputContinuousHydrationLane) {
return "InputContinuousHydration";
}
if (lane & InputContinuousLane) {
return "InputContinuous";
}
if (lane & DefaultHydrationLane) {
return "DefaultHydration";
}
if (lane & DefaultLane) {
return "Default";
}
if (lane & TransitionHydrationLane) {
return "TransitionHydration";
}
if (lane & TransitionLanes) {
return "Transition";
}
if (lane & RetryLanes) {
return "Retry";
}
if (lane & SelectiveHydrationLane) {
return "SelectiveHydration";
}
if (lane & IdleHydrationLane) {
return "IdleHydration";
}
if (lane & IdleLane) {
return "Idle";
}
if (lane & OffscreenLane) {
return "Offscreen";
}
}
}
var NoTimestamp = -1;
var nextTransitionLane = TransitionLane1;
var nextRetryLane = RetryLane1;
function getHighestPriorityLanes(lanes) {
switch (getHighestPriorityLane(lanes)) {
case SyncLane:
return SyncLane;
case InputContinuousHydrationLane:
return InputContinuousHydrationLane;
case InputContinuousLane:
return InputContinuousLane;
case DefaultHydrationLane:
return DefaultHydrationLane;
case DefaultLane:
return DefaultLane;
case TransitionHydrationLane:
return TransitionHydrationLane;
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
return lanes & TransitionLanes;
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
return lanes & RetryLanes;
case SelectiveHydrationLane:
return SelectiveHydrationLane;
case IdleHydrationLane:
return IdleHydrationLane;
case IdleLane:
return IdleLane;
case OffscreenLane:
return OffscreenLane;
default:
{
error("Should have found matching lanes. This is a bug in React.");
}
return lanes;
}
}
function getNextLanes(root2, wipLanes) {
var pendingLanes = root2.pendingLanes;
if (pendingLanes === NoLanes) {
return NoLanes;
}
var nextLanes = NoLanes;
var suspendedLanes = root2.suspendedLanes;
var pingedLanes = root2.pingedLanes;
var nonIdlePendingLanes = pendingLanes & NonIdleLanes;
if (nonIdlePendingLanes !== NoLanes) {
var nonIdleUnblockedLanes = nonIdlePendingLanes & ~suspendedLanes;
if (nonIdleUnblockedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(nonIdleUnblockedLanes);
} else {
var nonIdlePingedLanes = nonIdlePendingLanes & pingedLanes;
if (nonIdlePingedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(nonIdlePingedLanes);
}
}
} else {
var unblockedLanes = pendingLanes & ~suspendedLanes;
if (unblockedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(unblockedLanes);
} else {
if (pingedLanes !== NoLanes) {
nextLanes = getHighestPriorityLanes(pingedLanes);
}
}
}
if (nextLanes === NoLanes) {
return NoLanes;
}
if (wipLanes !== NoLanes && wipLanes !== nextLanes && // If we already suspended with a delay, then interrupting is fine. Don't
// bother waiting until the root is complete.
(wipLanes & suspendedLanes) === NoLanes) {
var nextLane = getHighestPriorityLane(nextLanes);
var wipLane = getHighestPriorityLane(wipLanes);
if (
// Tests whether the next lane is equal or lower priority than the wip
// one. This works because the bits decrease in priority as you go left.
nextLane >= wipLane || // Default priority updates should not interrupt transition updates. The
// only difference between default updates and transition updates is that
// default updates do not support refresh transitions.
nextLane === DefaultLane && (wipLane & TransitionLanes) !== NoLanes
) {
return wipLanes;
}
}
if ((nextLanes & InputContinuousLane) !== NoLanes) {
nextLanes |= pendingLanes & DefaultLane;
}
var entangledLanes = root2.entangledLanes;
if (entangledLanes !== NoLanes) {
var entanglements = root2.entanglements;
var lanes = nextLanes & entangledLanes;
while (lanes > 0) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
nextLanes |= entanglements[index2];
lanes &= ~lane;
}
}
return nextLanes;
}
function getMostRecentEventTime(root2, lanes) {
var eventTimes = root2.eventTimes;
var mostRecentEventTime = NoTimestamp;
while (lanes > 0) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
var eventTime = eventTimes[index2];
if (eventTime > mostRecentEventTime) {
mostRecentEventTime = eventTime;
}
lanes &= ~lane;
}
return mostRecentEventTime;
}
function computeExpirationTime(lane, currentTime) {
switch (lane) {
case SyncLane:
case InputContinuousHydrationLane:
case InputContinuousLane:
return currentTime + 250;
case DefaultHydrationLane:
case DefaultLane:
case TransitionHydrationLane:
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
return currentTime + 5e3;
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
return NoTimestamp;
case SelectiveHydrationLane:
case IdleHydrationLane:
case IdleLane:
case OffscreenLane:
return NoTimestamp;
default:
{
error("Should have found matching lanes. This is a bug in React.");
}
return NoTimestamp;
}
}
function markStarvedLanesAsExpired(root2, currentTime) {
var pendingLanes = root2.pendingLanes;
var suspendedLanes = root2.suspendedLanes;
var pingedLanes = root2.pingedLanes;
var expirationTimes = root2.expirationTimes;
var lanes = pendingLanes;
while (lanes > 0) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
var expirationTime = expirationTimes[index2];
if (expirationTime === NoTimestamp) {
if ((lane & suspendedLanes) === NoLanes || (lane & pingedLanes) !== NoLanes) {
expirationTimes[index2] = computeExpirationTime(lane, currentTime);
}
} else if (expirationTime <= currentTime) {
root2.expiredLanes |= lane;
}
lanes &= ~lane;
}
}
function getHighestPriorityPendingLanes(root2) {
return getHighestPriorityLanes(root2.pendingLanes);
}
function getLanesToRetrySynchronouslyOnError(root2) {
var everythingButOffscreen = root2.pendingLanes & ~OffscreenLane;
if (everythingButOffscreen !== NoLanes) {
return everythingButOffscreen;
}
if (everythingButOffscreen & OffscreenLane) {
return OffscreenLane;
}
return NoLanes;
}
function includesSyncLane(lanes) {
return (lanes & SyncLane) !== NoLanes;
}
function includesNonIdleWork(lanes) {
return (lanes & NonIdleLanes) !== NoLanes;
}
function includesOnlyRetries(lanes) {
return (lanes & RetryLanes) === lanes;
}
function includesOnlyNonUrgentLanes(lanes) {
var UrgentLanes = SyncLane | InputContinuousLane | DefaultLane;
return (lanes & UrgentLanes) === NoLanes;
}
function includesOnlyTransitions(lanes) {
return (lanes & TransitionLanes) === lanes;
}
function includesBlockingLane(root2, lanes) {
var SyncDefaultLanes = InputContinuousHydrationLane | InputContinuousLane | DefaultHydrationLane | DefaultLane;
return (lanes & SyncDefaultLanes) !== NoLanes;
}
function includesExpiredLane(root2, lanes) {
return (lanes & root2.expiredLanes) !== NoLanes;
}
function isTransitionLane(lane) {
return (lane & TransitionLanes) !== NoLanes;
}
function claimNextTransitionLane() {
var lane = nextTransitionLane;
nextTransitionLane <<= 1;
if ((nextTransitionLane & TransitionLanes) === NoLanes) {
nextTransitionLane = TransitionLane1;
}
return lane;
}
function claimNextRetryLane() {
var lane = nextRetryLane;
nextRetryLane <<= 1;
if ((nextRetryLane & RetryLanes) === NoLanes) {
nextRetryLane = RetryLane1;
}
return lane;
}
function getHighestPriorityLane(lanes) {
return lanes & -lanes;
}
function pickArbitraryLane(lanes) {
return getHighestPriorityLane(lanes);
}
function pickArbitraryLaneIndex(lanes) {
return 31 - clz32(lanes);
}
function laneToIndex(lane) {
return pickArbitraryLaneIndex(lane);
}
function includesSomeLane(a, b) {
return (a & b) !== NoLanes;
}
function isSubsetOfLanes(set3, subset) {
return (set3 & subset) === subset;
}
function mergeLanes(a, b) {
return a | b;
}
function removeLanes(set3, subset) {
return set3 & ~subset;
}
function intersectLanes(a, b) {
return a & b;
}
function laneToLanes(lane) {
return lane;
}
function higherPriorityLane(a, b) {
return a !== NoLane && a < b ? a : b;
}
function createLaneMap(initial) {
var laneMap = [];
for (var i = 0; i < TotalLanes; i++) {
laneMap.push(initial);
}
return laneMap;
}
function markRootUpdated(root2, updateLane, eventTime) {
root2.pendingLanes |= updateLane;
if (updateLane !== IdleLane) {
root2.suspendedLanes = NoLanes;
root2.pingedLanes = NoLanes;
}
var eventTimes = root2.eventTimes;
var index2 = laneToIndex(updateLane);
eventTimes[index2] = eventTime;
}
function markRootSuspended(root2, suspendedLanes) {
root2.suspendedLanes |= suspendedLanes;
root2.pingedLanes &= ~suspendedLanes;
var expirationTimes = root2.expirationTimes;
var lanes = suspendedLanes;
while (lanes > 0) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
expirationTimes[index2] = NoTimestamp;
lanes &= ~lane;
}
}
function markRootPinged(root2, pingedLanes, eventTime) {
root2.pingedLanes |= root2.suspendedLanes & pingedLanes;
}
function markRootFinished(root2, remainingLanes) {
var noLongerPendingLanes = root2.pendingLanes & ~remainingLanes;
root2.pendingLanes = remainingLanes;
root2.suspendedLanes = NoLanes;
root2.pingedLanes = NoLanes;
root2.expiredLanes &= remainingLanes;
root2.mutableReadLanes &= remainingLanes;
root2.entangledLanes &= remainingLanes;
var entanglements = root2.entanglements;
var eventTimes = root2.eventTimes;
var expirationTimes = root2.expirationTimes;
var lanes = noLongerPendingLanes;
while (lanes > 0) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
entanglements[index2] = NoLanes;
eventTimes[index2] = NoTimestamp;
expirationTimes[index2] = NoTimestamp;
lanes &= ~lane;
}
}
function markRootEntangled(root2, entangledLanes) {
var rootEntangledLanes = root2.entangledLanes |= entangledLanes;
var entanglements = root2.entanglements;
var lanes = rootEntangledLanes;
while (lanes) {
var index2 = pickArbitraryLaneIndex(lanes);
var lane = 1 << index2;
if (
// Is this one of the newly entangled lanes?
lane & entangledLanes | // Is this lane transitively entangled with the newly entangled lanes?
entanglements[index2] & entangledLanes
) {
entanglements[index2] |= entangledLanes;
}
lanes &= ~lane;
}
}
function getBumpedLaneForHydration(root2, renderLanes2) {
var renderLane = getHighestPriorityLane(renderLanes2);
var lane;
switch (renderLane) {
case InputContinuousLane:
lane = InputContinuousHydrationLane;
break;
case DefaultLane:
lane = DefaultHydrationLane;
break;
case TransitionLane1:
case TransitionLane2:
case TransitionLane3:
case TransitionLane4:
case TransitionLane5:
case TransitionLane6:
case TransitionLane7:
case TransitionLane8:
case TransitionLane9:
case TransitionLane10:
case TransitionLane11:
case TransitionLane12:
case TransitionLane13:
case TransitionLane14:
case TransitionLane15:
case TransitionLane16:
case RetryLane1:
case RetryLane2:
case RetryLane3:
case RetryLane4:
case RetryLane5:
lane = TransitionHydrationLane;
break;
case IdleLane:
lane = IdleHydrationLane;
break;
default:
lane = NoLane;
break;
}
if ((lane & (root2.suspendedLanes | renderLanes2)) !== NoLane) {
return NoLane;
}
return lane;
}
function addFiberToLanesMap(root2, fiber, lanes) {
if (!isDevToolsPresent) {
return;
}
var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap;
while (lanes > 0) {
var index2 = laneToIndex(lanes);
var lane = 1 << index2;
var updaters = pendingUpdatersLaneMap[index2];
updaters.add(fiber);
lanes &= ~lane;
}
}
function movePendingFibersToMemoized(root2, lanes) {
if (!isDevToolsPresent) {
return;
}
var pendingUpdatersLaneMap = root2.pendingUpdatersLaneMap;
var memoizedUpdaters = root2.memoizedUpdaters;
while (lanes > 0) {
var index2 = laneToIndex(lanes);
var lane = 1 << index2;
var updaters = pendingUpdatersLaneMap[index2];
if (updaters.size > 0) {
updaters.forEach(function(fiber) {
var alternate = fiber.alternate;
if (alternate === null || !memoizedUpdaters.has(alternate)) {
memoizedUpdaters.add(fiber);
}
});
updaters.clear();
}
lanes &= ~lane;
}
}
function getTransitionsForLanes(root2, lanes) {
{
return null;
}
}
var DiscreteEventPriority = SyncLane;
var ContinuousEventPriority = InputContinuousLane;
var DefaultEventPriority = DefaultLane;
var IdleEventPriority = IdleLane;
var currentUpdatePriority = NoLane;
function getCurrentUpdatePriority() {
return currentUpdatePriority;
}
function setCurrentUpdatePriority(newPriority) {
currentUpdatePriority = newPriority;
}
function runWithPriority(priority, fn) {
var previousPriority = currentUpdatePriority;
try {
currentUpdatePriority = priority;
return fn();
} finally {
currentUpdatePriority = previousPriority;
}
}
function higherEventPriority(a, b) {
return a !== 0 && a < b ? a : b;
}
function lowerEventPriority(a, b) {
return a === 0 || a > b ? a : b;
}
function isHigherEventPriority(a, b) {
return a !== 0 && a < b;
}
function lanesToEventPriority(lanes) {
var lane = getHighestPriorityLane(lanes);
if (!isHigherEventPriority(DiscreteEventPriority, lane)) {
return DiscreteEventPriority;
}
if (!isHigherEventPriority(ContinuousEventPriority, lane)) {
return ContinuousEventPriority;
}
if (includesNonIdleWork(lane)) {
return DefaultEventPriority;
}
return IdleEventPriority;
}
function isRootDehydrated(root2) {
var currentState = root2.current.memoizedState;
return currentState.isDehydrated;
}
var _attemptSynchronousHydration;
function setAttemptSynchronousHydration(fn) {
_attemptSynchronousHydration = fn;
}
function attemptSynchronousHydration(fiber) {
_attemptSynchronousHydration(fiber);
}
var attemptContinuousHydration;
function setAttemptContinuousHydration(fn) {
attemptContinuousHydration = fn;
}
var attemptHydrationAtCurrentPriority;
function setAttemptHydrationAtCurrentPriority(fn) {
attemptHydrationAtCurrentPriority = fn;
}
var getCurrentUpdatePriority$1;
function setGetCurrentUpdatePriority(fn) {
getCurrentUpdatePriority$1 = fn;
}
var attemptHydrationAtPriority;
function setAttemptHydrationAtPriority(fn) {
attemptHydrationAtPriority = fn;
}
var hasScheduledReplayAttempt = false;
var queuedDiscreteEvents = [];
var queuedFocus = null;
var queuedDrag = null;
var queuedMouse = null;
var queuedPointers = /* @__PURE__ */ new Map();
var queuedPointerCaptures = /* @__PURE__ */ new Map();
var queuedExplicitHydrationTargets = [];
var discreteReplayableEvents = [
"mousedown",
"mouseup",
"touchcancel",
"touchend",
"touchstart",
"auxclick",
"dblclick",
"pointercancel",
"pointerdown",
"pointerup",
"dragend",
"dragstart",
"drop",
"compositionend",
"compositionstart",
"keydown",
"keypress",
"keyup",
"input",
"textInput",
// Intentionally camelCase
"copy",
"cut",
"paste",
"click",
"change",
"contextmenu",
"reset",
"submit"
];
function isDiscreteEventThatRequiresHydration(eventType) {
return discreteReplayableEvents.indexOf(eventType) > -1;
}
function createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
return {
blockedOn,
domEventName,
eventSystemFlags,
nativeEvent,
targetContainers: [targetContainer]
};
}
function clearIfContinuousEvent(domEventName, nativeEvent) {
switch (domEventName) {
case "focusin":
case "focusout":
queuedFocus = null;
break;
case "dragenter":
case "dragleave":
queuedDrag = null;
break;
case "mouseover":
case "mouseout":
queuedMouse = null;
break;
case "pointerover":
case "pointerout": {
var pointerId = nativeEvent.pointerId;
queuedPointers.delete(pointerId);
break;
}
case "gotpointercapture":
case "lostpointercapture": {
var _pointerId = nativeEvent.pointerId;
queuedPointerCaptures.delete(_pointerId);
break;
}
}
}
function accumulateOrCreateContinuousQueuedReplayableEvent(existingQueuedEvent, blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
if (existingQueuedEvent === null || existingQueuedEvent.nativeEvent !== nativeEvent) {
var queuedEvent = createQueuedReplayableEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (blockedOn !== null) {
var _fiber2 = getInstanceFromNode(blockedOn);
if (_fiber2 !== null) {
attemptContinuousHydration(_fiber2);
}
}
return queuedEvent;
}
existingQueuedEvent.eventSystemFlags |= eventSystemFlags;
var targetContainers = existingQueuedEvent.targetContainers;
if (targetContainer !== null && targetContainers.indexOf(targetContainer) === -1) {
targetContainers.push(targetContainer);
}
return existingQueuedEvent;
}
function queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent) {
switch (domEventName) {
case "focusin": {
var focusEvent = nativeEvent;
queuedFocus = accumulateOrCreateContinuousQueuedReplayableEvent(queuedFocus, blockedOn, domEventName, eventSystemFlags, targetContainer, focusEvent);
return true;
}
case "dragenter": {
var dragEvent = nativeEvent;
queuedDrag = accumulateOrCreateContinuousQueuedReplayableEvent(queuedDrag, blockedOn, domEventName, eventSystemFlags, targetContainer, dragEvent);
return true;
}
case "mouseover": {
var mouseEvent = nativeEvent;
queuedMouse = accumulateOrCreateContinuousQueuedReplayableEvent(queuedMouse, blockedOn, domEventName, eventSystemFlags, targetContainer, mouseEvent);
return true;
}
case "pointerover": {
var pointerEvent = nativeEvent;
var pointerId = pointerEvent.pointerId;
queuedPointers.set(pointerId, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointers.get(pointerId) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, pointerEvent));
return true;
}
case "gotpointercapture": {
var _pointerEvent = nativeEvent;
var _pointerId2 = _pointerEvent.pointerId;
queuedPointerCaptures.set(_pointerId2, accumulateOrCreateContinuousQueuedReplayableEvent(queuedPointerCaptures.get(_pointerId2) || null, blockedOn, domEventName, eventSystemFlags, targetContainer, _pointerEvent));
return true;
}
}
return false;
}
function attemptExplicitHydrationTarget(queuedTarget) {
var targetInst = getClosestInstanceFromNode(queuedTarget.target);
if (targetInst !== null) {
var nearestMounted = getNearestMountedFiber(targetInst);
if (nearestMounted !== null) {
var tag = nearestMounted.tag;
if (tag === SuspenseComponent) {
var instance = getSuspenseInstanceFromFiber(nearestMounted);
if (instance !== null) {
queuedTarget.blockedOn = instance;
attemptHydrationAtPriority(queuedTarget.priority, function() {
attemptHydrationAtCurrentPriority(nearestMounted);
});
return;
}
} else if (tag === HostRoot) {
var root2 = nearestMounted.stateNode;
if (isRootDehydrated(root2)) {
queuedTarget.blockedOn = getContainerFromFiber(nearestMounted);
return;
}
}
}
}
queuedTarget.blockedOn = null;
}
function queueExplicitHydrationTarget(target) {
var updatePriority = getCurrentUpdatePriority$1();
var queuedTarget = {
blockedOn: null,
target,
priority: updatePriority
};
var i = 0;
for (; i < queuedExplicitHydrationTargets.length; i++) {
if (!isHigherEventPriority(updatePriority, queuedExplicitHydrationTargets[i].priority)) {
break;
}
}
queuedExplicitHydrationTargets.splice(i, 0, queuedTarget);
if (i === 0) {
attemptExplicitHydrationTarget(queuedTarget);
}
}
function attemptReplayContinuousQueuedEvent(queuedEvent) {
if (queuedEvent.blockedOn !== null) {
return false;
}
var targetContainers = queuedEvent.targetContainers;
while (targetContainers.length > 0) {
var targetContainer = targetContainers[0];
var nextBlockedOn = findInstanceBlockingEvent(queuedEvent.domEventName, queuedEvent.eventSystemFlags, targetContainer, queuedEvent.nativeEvent);
if (nextBlockedOn === null) {
{
var nativeEvent = queuedEvent.nativeEvent;
var nativeEventClone = new nativeEvent.constructor(nativeEvent.type, nativeEvent);
setReplayingEvent(nativeEventClone);
nativeEvent.target.dispatchEvent(nativeEventClone);
resetReplayingEvent();
}
} else {
var _fiber3 = getInstanceFromNode(nextBlockedOn);
if (_fiber3 !== null) {
attemptContinuousHydration(_fiber3);
}
queuedEvent.blockedOn = nextBlockedOn;
return false;
}
targetContainers.shift();
}
return true;
}
function attemptReplayContinuousQueuedEventInMap(queuedEvent, key2, map) {
if (attemptReplayContinuousQueuedEvent(queuedEvent)) {
map.delete(key2);
}
}
function replayUnblockedEvents() {
hasScheduledReplayAttempt = false;
if (queuedFocus !== null && attemptReplayContinuousQueuedEvent(queuedFocus)) {
queuedFocus = null;
}
if (queuedDrag !== null && attemptReplayContinuousQueuedEvent(queuedDrag)) {
queuedDrag = null;
}
if (queuedMouse !== null && attemptReplayContinuousQueuedEvent(queuedMouse)) {
queuedMouse = null;
}
queuedPointers.forEach(attemptReplayContinuousQueuedEventInMap);
queuedPointerCaptures.forEach(attemptReplayContinuousQueuedEventInMap);
}
function scheduleCallbackIfUnblocked(queuedEvent, unblocked) {
if (queuedEvent.blockedOn === unblocked) {
queuedEvent.blockedOn = null;
if (!hasScheduledReplayAttempt) {
hasScheduledReplayAttempt = true;
Scheduler.unstable_scheduleCallback(Scheduler.unstable_NormalPriority, replayUnblockedEvents);
}
}
}
function retryIfBlockedOn(unblocked) {
if (queuedDiscreteEvents.length > 0) {
scheduleCallbackIfUnblocked(queuedDiscreteEvents[0], unblocked);
for (var i = 1; i < queuedDiscreteEvents.length; i++) {
var queuedEvent = queuedDiscreteEvents[i];
if (queuedEvent.blockedOn === unblocked) {
queuedEvent.blockedOn = null;
}
}
}
if (queuedFocus !== null) {
scheduleCallbackIfUnblocked(queuedFocus, unblocked);
}
if (queuedDrag !== null) {
scheduleCallbackIfUnblocked(queuedDrag, unblocked);
}
if (queuedMouse !== null) {
scheduleCallbackIfUnblocked(queuedMouse, unblocked);
}
var unblock = function(queuedEvent2) {
return scheduleCallbackIfUnblocked(queuedEvent2, unblocked);
};
queuedPointers.forEach(unblock);
queuedPointerCaptures.forEach(unblock);
for (var _i = 0; _i < queuedExplicitHydrationTargets.length; _i++) {
var queuedTarget = queuedExplicitHydrationTargets[_i];
if (queuedTarget.blockedOn === unblocked) {
queuedTarget.blockedOn = null;
}
}
while (queuedExplicitHydrationTargets.length > 0) {
var nextExplicitTarget = queuedExplicitHydrationTargets[0];
if (nextExplicitTarget.blockedOn !== null) {
break;
} else {
attemptExplicitHydrationTarget(nextExplicitTarget);
if (nextExplicitTarget.blockedOn === null) {
queuedExplicitHydrationTargets.shift();
}
}
}
}
var ReactCurrentBatchConfig = ReactSharedInternals.ReactCurrentBatchConfig;
var _enabled = true;
function setEnabled(enabled) {
_enabled = !!enabled;
}
function isEnabled() {
return _enabled;
}
function createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags) {
var eventPriority = getEventPriority(domEventName);
var listenerWrapper;
switch (eventPriority) {
case DiscreteEventPriority:
listenerWrapper = dispatchDiscreteEvent;
break;
case ContinuousEventPriority:
listenerWrapper = dispatchContinuousEvent;
break;
case DefaultEventPriority:
default:
listenerWrapper = dispatchEvent;
break;
}
return listenerWrapper.bind(null, domEventName, eventSystemFlags, targetContainer);
}
function dispatchDiscreteEvent(domEventName, eventSystemFlags, container, nativeEvent) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = null;
try {
setCurrentUpdatePriority(DiscreteEventPriority);
dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig.transition = prevTransition;
}
}
function dispatchContinuousEvent(domEventName, eventSystemFlags, container, nativeEvent) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig.transition;
ReactCurrentBatchConfig.transition = null;
try {
setCurrentUpdatePriority(ContinuousEventPriority);
dispatchEvent(domEventName, eventSystemFlags, container, nativeEvent);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig.transition = prevTransition;
}
}
function dispatchEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
if (!_enabled) {
return;
}
{
dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent);
}
}
function dispatchEventWithEnableCapturePhaseSelectiveHydrationWithoutDiscreteEventReplay(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
var blockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (blockedOn === null) {
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
clearIfContinuousEvent(domEventName, nativeEvent);
return;
}
if (queueIfContinuousEvent(blockedOn, domEventName, eventSystemFlags, targetContainer, nativeEvent)) {
nativeEvent.stopPropagation();
return;
}
clearIfContinuousEvent(domEventName, nativeEvent);
if (eventSystemFlags & IS_CAPTURE_PHASE && isDiscreteEventThatRequiresHydration(domEventName)) {
while (blockedOn !== null) {
var fiber = getInstanceFromNode(blockedOn);
if (fiber !== null) {
attemptSynchronousHydration(fiber);
}
var nextBlockedOn = findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent);
if (nextBlockedOn === null) {
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, return_targetInst, targetContainer);
}
if (nextBlockedOn === blockedOn) {
break;
}
blockedOn = nextBlockedOn;
}
if (blockedOn !== null) {
nativeEvent.stopPropagation();
}
return;
}
dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, null, targetContainer);
}
var return_targetInst = null;
function findInstanceBlockingEvent(domEventName, eventSystemFlags, targetContainer, nativeEvent) {
return_targetInst = null;
var nativeEventTarget = getEventTarget(nativeEvent);
var targetInst = getClosestInstanceFromNode(nativeEventTarget);
if (targetInst !== null) {
var nearestMounted = getNearestMountedFiber(targetInst);
if (nearestMounted === null) {
targetInst = null;
} else {
var tag = nearestMounted.tag;
if (tag === SuspenseComponent) {
var instance = getSuspenseInstanceFromFiber(nearestMounted);
if (instance !== null) {
return instance;
}
targetInst = null;
} else if (tag === HostRoot) {
var root2 = nearestMounted.stateNode;
if (isRootDehydrated(root2)) {
return getContainerFromFiber(nearestMounted);
}
targetInst = null;
} else if (nearestMounted !== targetInst) {
targetInst = null;
}
}
}
return_targetInst = targetInst;
return null;
}
function getEventPriority(domEventName) {
switch (domEventName) {
case "cancel":
case "click":
case "close":
case "contextmenu":
case "copy":
case "cut":
case "auxclick":
case "dblclick":
case "dragend":
case "dragstart":
case "drop":
case "focusin":
case "focusout":
case "input":
case "invalid":
case "keydown":
case "keypress":
case "keyup":
case "mousedown":
case "mouseup":
case "paste":
case "pause":
case "play":
case "pointercancel":
case "pointerdown":
case "pointerup":
case "ratechange":
case "reset":
case "resize":
case "seeked":
case "submit":
case "touchcancel":
case "touchend":
case "touchstart":
case "volumechange":
case "change":
case "selectionchange":
case "textInput":
case "compositionstart":
case "compositionend":
case "compositionupdate":
case "beforeblur":
case "afterblur":
case "beforeinput":
case "blur":
case "fullscreenchange":
case "focus":
case "hashchange":
case "popstate":
case "select":
case "selectstart":
return DiscreteEventPriority;
case "drag":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "mousemove":
case "mouseout":
case "mouseover":
case "pointermove":
case "pointerout":
case "pointerover":
case "scroll":
case "toggle":
case "touchmove":
case "wheel":
case "mouseenter":
case "mouseleave":
case "pointerenter":
case "pointerleave":
return ContinuousEventPriority;
case "message": {
var schedulerPriority = getCurrentPriorityLevel();
switch (schedulerPriority) {
case ImmediatePriority:
return DiscreteEventPriority;
case UserBlockingPriority:
return ContinuousEventPriority;
case NormalPriority:
case LowPriority:
return DefaultEventPriority;
case IdlePriority:
return IdleEventPriority;
default:
return DefaultEventPriority;
}
}
default:
return DefaultEventPriority;
}
}
function addEventBubbleListener(target, eventType, listener) {
target.addEventListener(eventType, listener, false);
return listener;
}
function addEventCaptureListener(target, eventType, listener) {
target.addEventListener(eventType, listener, true);
return listener;
}
function addEventCaptureListenerWithPassiveFlag(target, eventType, listener, passive) {
target.addEventListener(eventType, listener, {
capture: true,
passive
});
return listener;
}
function addEventBubbleListenerWithPassiveFlag(target, eventType, listener, passive) {
target.addEventListener(eventType, listener, {
passive
});
return listener;
}
var root = null;
var startText = null;
var fallbackText = null;
function initialize(nativeEventTarget) {
root = nativeEventTarget;
startText = getText();
return true;
}
function reset() {
root = null;
startText = null;
fallbackText = null;
}
function getData() {
if (fallbackText) {
return fallbackText;
}
var start;
var startValue = startText;
var startLength = startValue.length;
var end;
var endValue = getText();
var endLength = endValue.length;
for (start = 0; start < startLength; start++) {
if (startValue[start] !== endValue[start]) {
break;
}
}
var minEnd = startLength - start;
for (end = 1; end <= minEnd; end++) {
if (startValue[startLength - end] !== endValue[endLength - end]) {
break;
}
}
var sliceTail = end > 1 ? 1 - end : void 0;
fallbackText = endValue.slice(start, sliceTail);
return fallbackText;
}
function getText() {
if ("value" in root) {
return root.value;
}
return root.textContent;
}
function getEventCharCode(nativeEvent) {
var charCode;
var keyCode = nativeEvent.keyCode;
if ("charCode" in nativeEvent) {
charCode = nativeEvent.charCode;
if (charCode === 0 && keyCode === 13) {
charCode = 13;
}
} else {
charCode = keyCode;
}
if (charCode === 10) {
charCode = 13;
}
if (charCode >= 32 || charCode === 13) {
return charCode;
}
return 0;
}
function functionThatReturnsTrue() {
return true;
}
function functionThatReturnsFalse() {
return false;
}
function createSyntheticEvent(Interface) {
function SyntheticBaseEvent(reactName, reactEventType, targetInst, nativeEvent, nativeEventTarget) {
this._reactName = reactName;
this._targetInst = targetInst;
this.type = reactEventType;
this.nativeEvent = nativeEvent;
this.target = nativeEventTarget;
this.currentTarget = null;
for (var _propName in Interface) {
if (!Interface.hasOwnProperty(_propName)) {
continue;
}
var normalize = Interface[_propName];
if (normalize) {
this[_propName] = normalize(nativeEvent);
} else {
this[_propName] = nativeEvent[_propName];
}
}
var defaultPrevented = nativeEvent.defaultPrevented != null ? nativeEvent.defaultPrevented : nativeEvent.returnValue === false;
if (defaultPrevented) {
this.isDefaultPrevented = functionThatReturnsTrue;
} else {
this.isDefaultPrevented = functionThatReturnsFalse;
}
this.isPropagationStopped = functionThatReturnsFalse;
return this;
}
assign(SyntheticBaseEvent.prototype, {
preventDefault: function() {
this.defaultPrevented = true;
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.preventDefault) {
event.preventDefault();
} else if (typeof event.returnValue !== "unknown") {
event.returnValue = false;
}
this.isDefaultPrevented = functionThatReturnsTrue;
},
stopPropagation: function() {
var event = this.nativeEvent;
if (!event) {
return;
}
if (event.stopPropagation) {
event.stopPropagation();
} else if (typeof event.cancelBubble !== "unknown") {
event.cancelBubble = true;
}
this.isPropagationStopped = functionThatReturnsTrue;
},
/**
* We release all dispatched `SyntheticEvent`s after each event loop, adding
* them back into the pool. This allows a way to hold onto a reference that
* won't be added back into the pool.
*/
persist: function() {
},
/**
* Checks if this event should be released back into the pool.
*
* @return {boolean} True if this should not be released, false otherwise.
*/
isPersistent: functionThatReturnsTrue
});
return SyntheticBaseEvent;
}
var EventInterface = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function(event) {
return event.timeStamp || Date.now();
},
defaultPrevented: 0,
isTrusted: 0
};
var SyntheticEvent = createSyntheticEvent(EventInterface);
var UIEventInterface = assign({}, EventInterface, {
view: 0,
detail: 0
});
var SyntheticUIEvent = createSyntheticEvent(UIEventInterface);
var lastMovementX;
var lastMovementY;
var lastMouseEvent;
function updateMouseMovementPolyfillState(event) {
if (event !== lastMouseEvent) {
if (lastMouseEvent && event.type === "mousemove") {
lastMovementX = event.screenX - lastMouseEvent.screenX;
lastMovementY = event.screenY - lastMouseEvent.screenY;
} else {
lastMovementX = 0;
lastMovementY = 0;
}
lastMouseEvent = event;
}
}
var MouseEventInterface = assign({}, UIEventInterface, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: getEventModifierState,
button: 0,
buttons: 0,
relatedTarget: function(event) {
if (event.relatedTarget === void 0)
return event.fromElement === event.srcElement ? event.toElement : event.fromElement;
return event.relatedTarget;
},
movementX: function(event) {
if ("movementX" in event) {
return event.movementX;
}
updateMouseMovementPolyfillState(event);
return lastMovementX;
},
movementY: function(event) {
if ("movementY" in event) {
return event.movementY;
}
return lastMovementY;
}
});
var SyntheticMouseEvent = createSyntheticEvent(MouseEventInterface);
var DragEventInterface = assign({}, MouseEventInterface, {
dataTransfer: 0
});
var SyntheticDragEvent = createSyntheticEvent(DragEventInterface);
var FocusEventInterface = assign({}, UIEventInterface, {
relatedTarget: 0
});
var SyntheticFocusEvent = createSyntheticEvent(FocusEventInterface);
var AnimationEventInterface = assign({}, EventInterface, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
});
var SyntheticAnimationEvent = createSyntheticEvent(AnimationEventInterface);
var ClipboardEventInterface = assign({}, EventInterface, {
clipboardData: function(event) {
return "clipboardData" in event ? event.clipboardData : window.clipboardData;
}
});
var SyntheticClipboardEvent = createSyntheticEvent(ClipboardEventInterface);
var CompositionEventInterface = assign({}, EventInterface, {
data: 0
});
var SyntheticCompositionEvent = createSyntheticEvent(CompositionEventInterface);
var SyntheticInputEvent = SyntheticCompositionEvent;
var normalizeKey = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
};
var translateToKey = {
"8": "Backspace",
"9": "Tab",
"12": "Clear",
"13": "Enter",
"16": "Shift",
"17": "Control",
"18": "Alt",
"19": "Pause",
"20": "CapsLock",
"27": "Escape",
"32": " ",
"33": "PageUp",
"34": "PageDown",
"35": "End",
"36": "Home",
"37": "ArrowLeft",
"38": "ArrowUp",
"39": "ArrowRight",
"40": "ArrowDown",
"45": "Insert",
"46": "Delete",
"112": "F1",
"113": "F2",
"114": "F3",
"115": "F4",
"116": "F5",
"117": "F6",
"118": "F7",
"119": "F8",
"120": "F9",
"121": "F10",
"122": "F11",
"123": "F12",
"144": "NumLock",
"145": "ScrollLock",
"224": "Meta"
};
function getEventKey(nativeEvent) {
if (nativeEvent.key) {
var key2 = normalizeKey[nativeEvent.key] || nativeEvent.key;
if (key2 !== "Unidentified") {
return key2;
}
}
if (nativeEvent.type === "keypress") {
var charCode = getEventCharCode(nativeEvent);
return charCode === 13 ? "Enter" : String.fromCharCode(charCode);
}
if (nativeEvent.type === "keydown" || nativeEvent.type === "keyup") {
return translateToKey[nativeEvent.keyCode] || "Unidentified";
}
return "";
}
var modifierKeyToProp = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
function modifierStateGetter(keyArg) {
var syntheticEvent = this;
var nativeEvent = syntheticEvent.nativeEvent;
if (nativeEvent.getModifierState) {
return nativeEvent.getModifierState(keyArg);
}
var keyProp = modifierKeyToProp[keyArg];
return keyProp ? !!nativeEvent[keyProp] : false;
}
function getEventModifierState(nativeEvent) {
return modifierStateGetter;
}
var KeyboardEventInterface = assign({}, UIEventInterface, {
key: getEventKey,
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: getEventModifierState,
// Legacy Interface
charCode: function(event) {
if (event.type === "keypress") {
return getEventCharCode(event);
}
return 0;
},
keyCode: function(event) {
if (event.type === "keydown" || event.type === "keyup") {
return event.keyCode;
}
return 0;
},
which: function(event) {
if (event.type === "keypress") {
return getEventCharCode(event);
}
if (event.type === "keydown" || event.type === "keyup") {
return event.keyCode;
}
return 0;
}
});
var SyntheticKeyboardEvent = createSyntheticEvent(KeyboardEventInterface);
var PointerEventInterface = assign({}, MouseEventInterface, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
});
var SyntheticPointerEvent = createSyntheticEvent(PointerEventInterface);
var TouchEventInterface = assign({}, UIEventInterface, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: getEventModifierState
});
var SyntheticTouchEvent = createSyntheticEvent(TouchEventInterface);
var TransitionEventInterface = assign({}, EventInterface, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
});
var SyntheticTransitionEvent = createSyntheticEvent(TransitionEventInterface);
var WheelEventInterface = assign({}, MouseEventInterface, {
deltaX: function(event) {
return "deltaX" in event ? event.deltaX : (
// Fallback to `wheelDeltaX` for Webkit and normalize (right is positive).
"wheelDeltaX" in event ? -event.wheelDeltaX : 0
);
},
deltaY: function(event) {
return "deltaY" in event ? event.deltaY : (
// Fallback to `wheelDeltaY` for Webkit and normalize (down is positive).
"wheelDeltaY" in event ? -event.wheelDeltaY : (
// Fallback to `wheelDelta` for IE<9 and normalize (down is positive).
"wheelDelta" in event ? -event.wheelDelta : 0
)
);
},
deltaZ: 0,
// Browsers without "deltaMode" is reporting in raw wheel delta where one
// notch on the scroll is always +/- 120, roughly equivalent to pixels.
// A good approximation of DOM_DELTA_LINE (1) is 5% of viewport size or
// ~40 pixels, for DOM_DELTA_SCREEN (2) it is 87.5% of viewport size.
deltaMode: 0
});
var SyntheticWheelEvent = createSyntheticEvent(WheelEventInterface);
var END_KEYCODES = [9, 13, 27, 32];
var START_KEYCODE = 229;
var canUseCompositionEvent = canUseDOM2 && "CompositionEvent" in window;
var documentMode = null;
if (canUseDOM2 && "documentMode" in document) {
documentMode = document.documentMode;
}
var canUseTextInputEvent = canUseDOM2 && "TextEvent" in window && !documentMode;
var useFallbackCompositionData = canUseDOM2 && (!canUseCompositionEvent || documentMode && documentMode > 8 && documentMode <= 11);
var SPACEBAR_CODE = 32;
var SPACEBAR_CHAR = String.fromCharCode(SPACEBAR_CODE);
function registerEvents() {
registerTwoPhaseEvent("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]);
registerTwoPhaseEvent("onCompositionEnd", ["compositionend", "focusout", "keydown", "keypress", "keyup", "mousedown"]);
registerTwoPhaseEvent("onCompositionStart", ["compositionstart", "focusout", "keydown", "keypress", "keyup", "mousedown"]);
registerTwoPhaseEvent("onCompositionUpdate", ["compositionupdate", "focusout", "keydown", "keypress", "keyup", "mousedown"]);
}
var hasSpaceKeypress = false;
function isKeypressCommand(nativeEvent) {
return (nativeEvent.ctrlKey || nativeEvent.altKey || nativeEvent.metaKey) && // ctrlKey && altKey is equivalent to AltGr, and is not a command.
!(nativeEvent.ctrlKey && nativeEvent.altKey);
}
function getCompositionEventType(domEventName) {
switch (domEventName) {
case "compositionstart":
return "onCompositionStart";
case "compositionend":
return "onCompositionEnd";
case "compositionupdate":
return "onCompositionUpdate";
}
}
function isFallbackCompositionStart(domEventName, nativeEvent) {
return domEventName === "keydown" && nativeEvent.keyCode === START_KEYCODE;
}
function isFallbackCompositionEnd(domEventName, nativeEvent) {
switch (domEventName) {
case "keyup":
return END_KEYCODES.indexOf(nativeEvent.keyCode) !== -1;
case "keydown":
return nativeEvent.keyCode !== START_KEYCODE;
case "keypress":
case "mousedown":
case "focusout":
return true;
default:
return false;
}
}
function getDataFromCustomEvent(nativeEvent) {
var detail = nativeEvent.detail;
if (typeof detail === "object" && "data" in detail) {
return detail.data;
}
return null;
}
function isUsingKoreanIME(nativeEvent) {
return nativeEvent.locale === "ko";
}
var isComposing = false;
function extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
var eventType;
var fallbackData;
if (canUseCompositionEvent) {
eventType = getCompositionEventType(domEventName);
} else if (!isComposing) {
if (isFallbackCompositionStart(domEventName, nativeEvent)) {
eventType = "onCompositionStart";
}
} else if (isFallbackCompositionEnd(domEventName, nativeEvent)) {
eventType = "onCompositionEnd";
}
if (!eventType) {
return null;
}
if (useFallbackCompositionData && !isUsingKoreanIME(nativeEvent)) {
if (!isComposing && eventType === "onCompositionStart") {
isComposing = initialize(nativeEventTarget);
} else if (eventType === "onCompositionEnd") {
if (isComposing) {
fallbackData = getData();
}
}
}
var listeners = accumulateTwoPhaseListeners(targetInst, eventType);
if (listeners.length > 0) {
var event = new SyntheticCompositionEvent(eventType, domEventName, null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event,
listeners
});
if (fallbackData) {
event.data = fallbackData;
} else {
var customData = getDataFromCustomEvent(nativeEvent);
if (customData !== null) {
event.data = customData;
}
}
}
}
function getNativeBeforeInputChars(domEventName, nativeEvent) {
switch (domEventName) {
case "compositionend":
return getDataFromCustomEvent(nativeEvent);
case "keypress":
var which = nativeEvent.which;
if (which !== SPACEBAR_CODE) {
return null;
}
hasSpaceKeypress = true;
return SPACEBAR_CHAR;
case "textInput":
var chars = nativeEvent.data;
if (chars === SPACEBAR_CHAR && hasSpaceKeypress) {
return null;
}
return chars;
default:
return null;
}
}
function getFallbackBeforeInputChars(domEventName, nativeEvent) {
if (isComposing) {
if (domEventName === "compositionend" || !canUseCompositionEvent && isFallbackCompositionEnd(domEventName, nativeEvent)) {
var chars = getData();
reset();
isComposing = false;
return chars;
}
return null;
}
switch (domEventName) {
case "paste":
return null;
case "keypress":
if (!isKeypressCommand(nativeEvent)) {
if (nativeEvent.char && nativeEvent.char.length > 1) {
return nativeEvent.char;
} else if (nativeEvent.which) {
return String.fromCharCode(nativeEvent.which);
}
}
return null;
case "compositionend":
return useFallbackCompositionData && !isUsingKoreanIME(nativeEvent) ? null : nativeEvent.data;
default:
return null;
}
}
function extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget) {
var chars;
if (canUseTextInputEvent) {
chars = getNativeBeforeInputChars(domEventName, nativeEvent);
} else {
chars = getFallbackBeforeInputChars(domEventName, nativeEvent);
}
if (!chars) {
return null;
}
var listeners = accumulateTwoPhaseListeners(targetInst, "onBeforeInput");
if (listeners.length > 0) {
var event = new SyntheticInputEvent("onBeforeInput", "beforeinput", null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event,
listeners
});
event.data = chars;
}
}
function extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
extractCompositionEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractBeforeInputEvent(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
}
var supportedInputTypes = {
color: true,
date: true,
datetime: true,
"datetime-local": true,
email: true,
month: true,
number: true,
password: true,
range: true,
search: true,
tel: true,
text: true,
time: true,
url: true,
week: true
};
function isTextInputElement(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
if (nodeName === "input") {
return !!supportedInputTypes[elem.type];
}
if (nodeName === "textarea") {
return true;
}
return false;
}
function isEventSupported(eventNameSuffix) {
if (!canUseDOM2) {
return false;
}
var eventName = "on" + eventNameSuffix;
var isSupported = eventName in document;
if (!isSupported) {
var element = document.createElement("div");
element.setAttribute(eventName, "return;");
isSupported = typeof element[eventName] === "function";
}
return isSupported;
}
function registerEvents$1() {
registerTwoPhaseEvent("onChange", ["change", "click", "focusin", "focusout", "input", "keydown", "keyup", "selectionchange"]);
}
function createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, target) {
enqueueStateRestore(target);
var listeners = accumulateTwoPhaseListeners(inst, "onChange");
if (listeners.length > 0) {
var event = new SyntheticEvent("onChange", "change", null, nativeEvent, target);
dispatchQueue.push({
event,
listeners
});
}
}
var activeElement = null;
var activeElementInst = null;
function shouldUseChangeEvent(elem) {
var nodeName = elem.nodeName && elem.nodeName.toLowerCase();
return nodeName === "select" || nodeName === "input" && elem.type === "file";
}
function manualDispatchChangeEvent(nativeEvent) {
var dispatchQueue = [];
createAndAccumulateChangeEvent(dispatchQueue, activeElementInst, nativeEvent, getEventTarget(nativeEvent));
batchedUpdates(runEventInBatch, dispatchQueue);
}
function runEventInBatch(dispatchQueue) {
processDispatchQueue(dispatchQueue, 0);
}
function getInstIfValueChanged(targetInst) {
var targetNode = getNodeFromInstance(targetInst);
if (updateValueIfChanged(targetNode)) {
return targetInst;
}
}
function getTargetInstForChangeEvent(domEventName, targetInst) {
if (domEventName === "change") {
return targetInst;
}
}
var isInputEventSupported = false;
if (canUseDOM2) {
isInputEventSupported = isEventSupported("input") && (!document.documentMode || document.documentMode > 9);
}
function startWatchingForValueChange(target, targetInst) {
activeElement = target;
activeElementInst = targetInst;
activeElement.attachEvent("onpropertychange", handlePropertyChange);
}
function stopWatchingForValueChange() {
if (!activeElement) {
return;
}
activeElement.detachEvent("onpropertychange", handlePropertyChange);
activeElement = null;
activeElementInst = null;
}
function handlePropertyChange(nativeEvent) {
if (nativeEvent.propertyName !== "value") {
return;
}
if (getInstIfValueChanged(activeElementInst)) {
manualDispatchChangeEvent(nativeEvent);
}
}
function handleEventsForInputEventPolyfill(domEventName, target, targetInst) {
if (domEventName === "focusin") {
stopWatchingForValueChange();
startWatchingForValueChange(target, targetInst);
} else if (domEventName === "focusout") {
stopWatchingForValueChange();
}
}
function getTargetInstForInputEventPolyfill(domEventName, targetInst) {
if (domEventName === "selectionchange" || domEventName === "keyup" || domEventName === "keydown") {
return getInstIfValueChanged(activeElementInst);
}
}
function shouldUseClickEvent(elem) {
var nodeName = elem.nodeName;
return nodeName && nodeName.toLowerCase() === "input" && (elem.type === "checkbox" || elem.type === "radio");
}
function getTargetInstForClickEvent(domEventName, targetInst) {
if (domEventName === "click") {
return getInstIfValueChanged(targetInst);
}
}
function getTargetInstForInputOrChangeEvent(domEventName, targetInst) {
if (domEventName === "input" || domEventName === "change") {
return getInstIfValueChanged(targetInst);
}
}
function handleControlledInputBlur(node) {
var state = node._wrapperState;
if (!state || !state.controlled || node.type !== "number") {
return;
}
{
setDefaultValue(node, "number", node.value);
}
}
function extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
var getTargetInstFunc, handleEventFunc;
if (shouldUseChangeEvent(targetNode)) {
getTargetInstFunc = getTargetInstForChangeEvent;
} else if (isTextInputElement(targetNode)) {
if (isInputEventSupported) {
getTargetInstFunc = getTargetInstForInputOrChangeEvent;
} else {
getTargetInstFunc = getTargetInstForInputEventPolyfill;
handleEventFunc = handleEventsForInputEventPolyfill;
}
} else if (shouldUseClickEvent(targetNode)) {
getTargetInstFunc = getTargetInstForClickEvent;
}
if (getTargetInstFunc) {
var inst = getTargetInstFunc(domEventName, targetInst);
if (inst) {
createAndAccumulateChangeEvent(dispatchQueue, inst, nativeEvent, nativeEventTarget);
return;
}
}
if (handleEventFunc) {
handleEventFunc(domEventName, targetNode, targetInst);
}
if (domEventName === "focusout") {
handleControlledInputBlur(targetNode);
}
}
function registerEvents$2() {
registerDirectEvent("onMouseEnter", ["mouseout", "mouseover"]);
registerDirectEvent("onMouseLeave", ["mouseout", "mouseover"]);
registerDirectEvent("onPointerEnter", ["pointerout", "pointerover"]);
registerDirectEvent("onPointerLeave", ["pointerout", "pointerover"]);
}
function extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var isOverEvent = domEventName === "mouseover" || domEventName === "pointerover";
var isOutEvent = domEventName === "mouseout" || domEventName === "pointerout";
if (isOverEvent && !isReplayingEvent(nativeEvent)) {
var related = nativeEvent.relatedTarget || nativeEvent.fromElement;
if (related) {
if (getClosestInstanceFromNode(related) || isContainerMarkedAsRoot(related)) {
return;
}
}
}
if (!isOutEvent && !isOverEvent) {
return;
}
var win;
if (nativeEventTarget.window === nativeEventTarget) {
win = nativeEventTarget;
} else {
var doc = nativeEventTarget.ownerDocument;
if (doc) {
win = doc.defaultView || doc.parentWindow;
} else {
win = window;
}
}
var from;
var to;
if (isOutEvent) {
var _related = nativeEvent.relatedTarget || nativeEvent.toElement;
from = targetInst;
to = _related ? getClosestInstanceFromNode(_related) : null;
if (to !== null) {
var nearestMounted = getNearestMountedFiber(to);
if (to !== nearestMounted || to.tag !== HostComponent && to.tag !== HostText) {
to = null;
}
}
} else {
from = null;
to = targetInst;
}
if (from === to) {
return;
}
var SyntheticEventCtor = SyntheticMouseEvent;
var leaveEventType = "onMouseLeave";
var enterEventType = "onMouseEnter";
var eventTypePrefix = "mouse";
if (domEventName === "pointerout" || domEventName === "pointerover") {
SyntheticEventCtor = SyntheticPointerEvent;
leaveEventType = "onPointerLeave";
enterEventType = "onPointerEnter";
eventTypePrefix = "pointer";
}
var fromNode = from == null ? win : getNodeFromInstance(from);
var toNode = to == null ? win : getNodeFromInstance(to);
var leave = new SyntheticEventCtor(leaveEventType, eventTypePrefix + "leave", from, nativeEvent, nativeEventTarget);
leave.target = fromNode;
leave.relatedTarget = toNode;
var enter = null;
var nativeTargetInst = getClosestInstanceFromNode(nativeEventTarget);
if (nativeTargetInst === targetInst) {
var enterEvent = new SyntheticEventCtor(enterEventType, eventTypePrefix + "enter", to, nativeEvent, nativeEventTarget);
enterEvent.target = toNode;
enterEvent.relatedTarget = fromNode;
enter = enterEvent;
}
accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leave, enter, from, to);
}
function is2(x, y) {
return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y;
}
var objectIs = typeof Object.is === "function" ? Object.is : is2;
function shallowEqual(objA, objB) {
if (objectIs(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
var keysA = Object.keys(objA);
var keysB = Object.keys(objB);
if (keysA.length !== keysB.length) {
return false;
}
for (var i = 0; i < keysA.length; i++) {
var currentKey = keysA[i];
if (!hasOwnProperty2.call(objB, currentKey) || !objectIs(objA[currentKey], objB[currentKey])) {
return false;
}
}
return true;
}
function getLeafNode(node) {
while (node && node.firstChild) {
node = node.firstChild;
}
return node;
}
function getSiblingNode(node) {
while (node) {
if (node.nextSibling) {
return node.nextSibling;
}
node = node.parentNode;
}
}
function getNodeForCharacterOffset(root2, offset2) {
var node = getLeafNode(root2);
var nodeStart = 0;
var nodeEnd = 0;
while (node) {
if (node.nodeType === TEXT_NODE) {
nodeEnd = nodeStart + node.textContent.length;
if (nodeStart <= offset2 && nodeEnd >= offset2) {
return {
node,
offset: offset2 - nodeStart
};
}
nodeStart = nodeEnd;
}
node = getLeafNode(getSiblingNode(node));
}
}
function getOffsets(outerNode) {
var ownerDocument = outerNode.ownerDocument;
var win = ownerDocument && ownerDocument.defaultView || window;
var selection = win.getSelection && win.getSelection();
if (!selection || selection.rangeCount === 0) {
return null;
}
var anchorNode = selection.anchorNode, anchorOffset = selection.anchorOffset, focusNode = selection.focusNode, focusOffset = selection.focusOffset;
try {
anchorNode.nodeType;
focusNode.nodeType;
} catch (e) {
return null;
}
return getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset);
}
function getModernOffsetsFromPoints(outerNode, anchorNode, anchorOffset, focusNode, focusOffset) {
var length = 0;
var start = -1;
var end = -1;
var indexWithinAnchor = 0;
var indexWithinFocus = 0;
var node = outerNode;
var parentNode = null;
outer:
while (true) {
var next = null;
while (true) {
if (node === anchorNode && (anchorOffset === 0 || node.nodeType === TEXT_NODE)) {
start = length + anchorOffset;
}
if (node === focusNode && (focusOffset === 0 || node.nodeType === TEXT_NODE)) {
end = length + focusOffset;
}
if (node.nodeType === TEXT_NODE) {
length += node.nodeValue.length;
}
if ((next = node.firstChild) === null) {
break;
}
parentNode = node;
node = next;
}
while (true) {
if (node === outerNode) {
break outer;
}
if (parentNode === anchorNode && ++indexWithinAnchor === anchorOffset) {
start = length;
}
if (parentNode === focusNode && ++indexWithinFocus === focusOffset) {
end = length;
}
if ((next = node.nextSibling) !== null) {
break;
}
node = parentNode;
parentNode = node.parentNode;
}
node = next;
}
if (start === -1 || end === -1) {
return null;
}
return {
start,
end
};
}
function setOffsets(node, offsets) {
var doc = node.ownerDocument || document;
var win = doc && doc.defaultView || window;
if (!win.getSelection) {
return;
}
var selection = win.getSelection();
var length = node.textContent.length;
var start = Math.min(offsets.start, length);
var end = offsets.end === void 0 ? start : Math.min(offsets.end, length);
if (!selection.extend && start > end) {
var temp = end;
end = start;
start = temp;
}
var startMarker = getNodeForCharacterOffset(node, start);
var endMarker = getNodeForCharacterOffset(node, end);
if (startMarker && endMarker) {
if (selection.rangeCount === 1 && selection.anchorNode === startMarker.node && selection.anchorOffset === startMarker.offset && selection.focusNode === endMarker.node && selection.focusOffset === endMarker.offset) {
return;
}
var range = doc.createRange();
range.setStart(startMarker.node, startMarker.offset);
selection.removeAllRanges();
if (start > end) {
selection.addRange(range);
selection.extend(endMarker.node, endMarker.offset);
} else {
range.setEnd(endMarker.node, endMarker.offset);
selection.addRange(range);
}
}
}
function isTextNode(node) {
return node && node.nodeType === TEXT_NODE;
}
function containsNode(outerNode, innerNode) {
if (!outerNode || !innerNode) {
return false;
} else if (outerNode === innerNode) {
return true;
} else if (isTextNode(outerNode)) {
return false;
} else if (isTextNode(innerNode)) {
return containsNode(outerNode, innerNode.parentNode);
} else if ("contains" in outerNode) {
return outerNode.contains(innerNode);
} else if (outerNode.compareDocumentPosition) {
return !!(outerNode.compareDocumentPosition(innerNode) & 16);
} else {
return false;
}
}
function isInDocument(node) {
return node && node.ownerDocument && containsNode(node.ownerDocument.documentElement, node);
}
function isSameOriginFrame(iframe) {
try {
return typeof iframe.contentWindow.location.href === "string";
} catch (err) {
return false;
}
}
function getActiveElementDeep() {
var win = window;
var element = getActiveElement();
while (element instanceof win.HTMLIFrameElement) {
if (isSameOriginFrame(element)) {
win = element.contentWindow;
} else {
return element;
}
element = getActiveElement(win.document);
}
return element;
}
function hasSelectionCapabilities(elem) {
var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase();
return nodeName && (nodeName === "input" && (elem.type === "text" || elem.type === "search" || elem.type === "tel" || elem.type === "url" || elem.type === "password") || nodeName === "textarea" || elem.contentEditable === "true");
}
function getSelectionInformation() {
var focusedElem = getActiveElementDeep();
return {
focusedElem,
selectionRange: hasSelectionCapabilities(focusedElem) ? getSelection(focusedElem) : null
};
}
function restoreSelection(priorSelectionInformation) {
var curFocusedElem = getActiveElementDeep();
var priorFocusedElem = priorSelectionInformation.focusedElem;
var priorSelectionRange = priorSelectionInformation.selectionRange;
if (curFocusedElem !== priorFocusedElem && isInDocument(priorFocusedElem)) {
if (priorSelectionRange !== null && hasSelectionCapabilities(priorFocusedElem)) {
setSelection(priorFocusedElem, priorSelectionRange);
}
var ancestors = [];
var ancestor = priorFocusedElem;
while (ancestor = ancestor.parentNode) {
if (ancestor.nodeType === ELEMENT_NODE) {
ancestors.push({
element: ancestor,
left: ancestor.scrollLeft,
top: ancestor.scrollTop
});
}
}
if (typeof priorFocusedElem.focus === "function") {
priorFocusedElem.focus();
}
for (var i = 0; i < ancestors.length; i++) {
var info = ancestors[i];
info.element.scrollLeft = info.left;
info.element.scrollTop = info.top;
}
}
}
function getSelection(input) {
var selection;
if ("selectionStart" in input) {
selection = {
start: input.selectionStart,
end: input.selectionEnd
};
} else {
selection = getOffsets(input);
}
return selection || {
start: 0,
end: 0
};
}
function setSelection(input, offsets) {
var start = offsets.start;
var end = offsets.end;
if (end === void 0) {
end = start;
}
if ("selectionStart" in input) {
input.selectionStart = start;
input.selectionEnd = Math.min(end, input.value.length);
} else {
setOffsets(input, offsets);
}
}
var skipSelectionChangeEvent = canUseDOM2 && "documentMode" in document && document.documentMode <= 11;
function registerEvents$3() {
registerTwoPhaseEvent("onSelect", ["focusout", "contextmenu", "dragend", "focusin", "keydown", "keyup", "mousedown", "mouseup", "selectionchange"]);
}
var activeElement$1 = null;
var activeElementInst$1 = null;
var lastSelection = null;
var mouseDown = false;
function getSelection$1(node) {
if ("selectionStart" in node && hasSelectionCapabilities(node)) {
return {
start: node.selectionStart,
end: node.selectionEnd
};
} else {
var win = node.ownerDocument && node.ownerDocument.defaultView || window;
var selection = win.getSelection();
return {
anchorNode: selection.anchorNode,
anchorOffset: selection.anchorOffset,
focusNode: selection.focusNode,
focusOffset: selection.focusOffset
};
}
}
function getEventTargetDocument(eventTarget) {
return eventTarget.window === eventTarget ? eventTarget.document : eventTarget.nodeType === DOCUMENT_NODE ? eventTarget : eventTarget.ownerDocument;
}
function constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget) {
var doc = getEventTargetDocument(nativeEventTarget);
if (mouseDown || activeElement$1 == null || activeElement$1 !== getActiveElement(doc)) {
return;
}
var currentSelection = getSelection$1(activeElement$1);
if (!lastSelection || !shallowEqual(lastSelection, currentSelection)) {
lastSelection = currentSelection;
var listeners = accumulateTwoPhaseListeners(activeElementInst$1, "onSelect");
if (listeners.length > 0) {
var event = new SyntheticEvent("onSelect", "select", null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event,
listeners
});
event.target = activeElement$1;
}
}
}
function extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var targetNode = targetInst ? getNodeFromInstance(targetInst) : window;
switch (domEventName) {
case "focusin":
if (isTextInputElement(targetNode) || targetNode.contentEditable === "true") {
activeElement$1 = targetNode;
activeElementInst$1 = targetInst;
lastSelection = null;
}
break;
case "focusout":
activeElement$1 = null;
activeElementInst$1 = null;
lastSelection = null;
break;
case "mousedown":
mouseDown = true;
break;
case "contextmenu":
case "mouseup":
case "dragend":
mouseDown = false;
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
break;
case "selectionchange":
if (skipSelectionChangeEvent) {
break;
}
case "keydown":
case "keyup":
constructSelectEvent(dispatchQueue, nativeEvent, nativeEventTarget);
}
}
function makePrefixMap(styleProp, eventName) {
var prefixes2 = {};
prefixes2[styleProp.toLowerCase()] = eventName.toLowerCase();
prefixes2["Webkit" + styleProp] = "webkit" + eventName;
prefixes2["Moz" + styleProp] = "moz" + eventName;
return prefixes2;
}
var vendorPrefixes = {
animationend: makePrefixMap("Animation", "AnimationEnd"),
animationiteration: makePrefixMap("Animation", "AnimationIteration"),
animationstart: makePrefixMap("Animation", "AnimationStart"),
transitionend: makePrefixMap("Transition", "TransitionEnd")
};
var prefixedEventNames = {};
var style = {};
if (canUseDOM2) {
style = document.createElement("div").style;
if (!("AnimationEvent" in window)) {
delete vendorPrefixes.animationend.animation;
delete vendorPrefixes.animationiteration.animation;
delete vendorPrefixes.animationstart.animation;
}
if (!("TransitionEvent" in window)) {
delete vendorPrefixes.transitionend.transition;
}
}
function getVendorPrefixedEventName(eventName) {
if (prefixedEventNames[eventName]) {
return prefixedEventNames[eventName];
} else if (!vendorPrefixes[eventName]) {
return eventName;
}
var prefixMap = vendorPrefixes[eventName];
for (var styleProp in prefixMap) {
if (prefixMap.hasOwnProperty(styleProp) && styleProp in style) {
return prefixedEventNames[eventName] = prefixMap[styleProp];
}
}
return eventName;
}
var ANIMATION_END = getVendorPrefixedEventName("animationend");
var ANIMATION_ITERATION = getVendorPrefixedEventName("animationiteration");
var ANIMATION_START = getVendorPrefixedEventName("animationstart");
var TRANSITION_END = getVendorPrefixedEventName("transitionend");
var topLevelEventsToReactNames = /* @__PURE__ */ new Map();
var simpleEventPluginEvents = ["abort", "auxClick", "cancel", "canPlay", "canPlayThrough", "click", "close", "contextMenu", "copy", "cut", "drag", "dragEnd", "dragEnter", "dragExit", "dragLeave", "dragOver", "dragStart", "drop", "durationChange", "emptied", "encrypted", "ended", "error", "gotPointerCapture", "input", "invalid", "keyDown", "keyPress", "keyUp", "load", "loadedData", "loadedMetadata", "loadStart", "lostPointerCapture", "mouseDown", "mouseMove", "mouseOut", "mouseOver", "mouseUp", "paste", "pause", "play", "playing", "pointerCancel", "pointerDown", "pointerMove", "pointerOut", "pointerOver", "pointerUp", "progress", "rateChange", "reset", "resize", "seeked", "seeking", "stalled", "submit", "suspend", "timeUpdate", "touchCancel", "touchEnd", "touchStart", "volumeChange", "scroll", "toggle", "touchMove", "waiting", "wheel"];
function registerSimpleEvent(domEventName, reactName) {
topLevelEventsToReactNames.set(domEventName, reactName);
registerTwoPhaseEvent(reactName, [domEventName]);
}
function registerSimpleEvents() {
for (var i = 0; i < simpleEventPluginEvents.length; i++) {
var eventName = simpleEventPluginEvents[i];
var domEventName = eventName.toLowerCase();
var capitalizedEvent = eventName[0].toUpperCase() + eventName.slice(1);
registerSimpleEvent(domEventName, "on" + capitalizedEvent);
}
registerSimpleEvent(ANIMATION_END, "onAnimationEnd");
registerSimpleEvent(ANIMATION_ITERATION, "onAnimationIteration");
registerSimpleEvent(ANIMATION_START, "onAnimationStart");
registerSimpleEvent("dblclick", "onDoubleClick");
registerSimpleEvent("focusin", "onFocus");
registerSimpleEvent("focusout", "onBlur");
registerSimpleEvent(TRANSITION_END, "onTransitionEnd");
}
function extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
var reactName = topLevelEventsToReactNames.get(domEventName);
if (reactName === void 0) {
return;
}
var SyntheticEventCtor = SyntheticEvent;
var reactEventType = domEventName;
switch (domEventName) {
case "keypress":
if (getEventCharCode(nativeEvent) === 0) {
return;
}
case "keydown":
case "keyup":
SyntheticEventCtor = SyntheticKeyboardEvent;
break;
case "focusin":
reactEventType = "focus";
SyntheticEventCtor = SyntheticFocusEvent;
break;
case "focusout":
reactEventType = "blur";
SyntheticEventCtor = SyntheticFocusEvent;
break;
case "beforeblur":
case "afterblur":
SyntheticEventCtor = SyntheticFocusEvent;
break;
case "click":
if (nativeEvent.button === 2) {
return;
}
case "auxclick":
case "dblclick":
case "mousedown":
case "mousemove":
case "mouseup":
case "mouseout":
case "mouseover":
case "contextmenu":
SyntheticEventCtor = SyntheticMouseEvent;
break;
case "drag":
case "dragend":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "dragstart":
case "drop":
SyntheticEventCtor = SyntheticDragEvent;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
SyntheticEventCtor = SyntheticTouchEvent;
break;
case ANIMATION_END:
case ANIMATION_ITERATION:
case ANIMATION_START:
SyntheticEventCtor = SyntheticAnimationEvent;
break;
case TRANSITION_END:
SyntheticEventCtor = SyntheticTransitionEvent;
break;
case "scroll":
SyntheticEventCtor = SyntheticUIEvent;
break;
case "wheel":
SyntheticEventCtor = SyntheticWheelEvent;
break;
case "copy":
case "cut":
case "paste":
SyntheticEventCtor = SyntheticClipboardEvent;
break;
case "gotpointercapture":
case "lostpointercapture":
case "pointercancel":
case "pointerdown":
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerup":
SyntheticEventCtor = SyntheticPointerEvent;
break;
}
var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
{
var accumulateTargetOnly = !inCapturePhase && // TODO: ideally, we'd eventually add all events from
// nonDelegatedEvents list in DOMPluginEventSystem.
// Then we can remove this special list.
// This is a breaking change that can wait until React 18.
domEventName === "scroll";
var _listeners = accumulateSinglePhaseListeners(targetInst, reactName, nativeEvent.type, inCapturePhase, accumulateTargetOnly);
if (_listeners.length > 0) {
var _event = new SyntheticEventCtor(reactName, reactEventType, null, nativeEvent, nativeEventTarget);
dispatchQueue.push({
event: _event,
listeners: _listeners
});
}
}
}
registerSimpleEvents();
registerEvents$2();
registerEvents$1();
registerEvents$3();
registerEvents();
function extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags, targetContainer) {
extractEvents$4(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
var shouldProcessPolyfillPlugins = (eventSystemFlags & SHOULD_NOT_PROCESS_POLYFILL_EVENT_PLUGINS) === 0;
if (shouldProcessPolyfillPlugins) {
extractEvents$2(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents$1(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents$3(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
extractEvents(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget);
}
}
var mediaEventTypes = ["abort", "canplay", "canplaythrough", "durationchange", "emptied", "encrypted", "ended", "error", "loadeddata", "loadedmetadata", "loadstart", "pause", "play", "playing", "progress", "ratechange", "resize", "seeked", "seeking", "stalled", "suspend", "timeupdate", "volumechange", "waiting"];
var nonDelegatedEvents = new Set(["cancel", "close", "invalid", "load", "scroll", "toggle"].concat(mediaEventTypes));
function executeDispatch(event, listener, currentTarget) {
var type = event.type || "unknown-event";
event.currentTarget = currentTarget;
invokeGuardedCallbackAndCatchFirstError(type, listener, void 0, event);
event.currentTarget = null;
}
function processDispatchQueueItemsInOrder(event, dispatchListeners, inCapturePhase) {
var previousInstance;
if (inCapturePhase) {
for (var i = dispatchListeners.length - 1; i >= 0; i--) {
var _dispatchListeners$i = dispatchListeners[i], instance = _dispatchListeners$i.instance, currentTarget = _dispatchListeners$i.currentTarget, listener = _dispatchListeners$i.listener;
if (instance !== previousInstance && event.isPropagationStopped()) {
return;
}
executeDispatch(event, listener, currentTarget);
previousInstance = instance;
}
} else {
for (var _i = 0; _i < dispatchListeners.length; _i++) {
var _dispatchListeners$_i = dispatchListeners[_i], _instance = _dispatchListeners$_i.instance, _currentTarget = _dispatchListeners$_i.currentTarget, _listener = _dispatchListeners$_i.listener;
if (_instance !== previousInstance && event.isPropagationStopped()) {
return;
}
executeDispatch(event, _listener, _currentTarget);
previousInstance = _instance;
}
}
}
function processDispatchQueue(dispatchQueue, eventSystemFlags) {
var inCapturePhase = (eventSystemFlags & IS_CAPTURE_PHASE) !== 0;
for (var i = 0; i < dispatchQueue.length; i++) {
var _dispatchQueue$i = dispatchQueue[i], event = _dispatchQueue$i.event, listeners = _dispatchQueue$i.listeners;
processDispatchQueueItemsInOrder(event, listeners, inCapturePhase);
}
rethrowCaughtError();
}
function dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
var nativeEventTarget = getEventTarget(nativeEvent);
var dispatchQueue = [];
extractEvents$5(dispatchQueue, domEventName, targetInst, nativeEvent, nativeEventTarget, eventSystemFlags);
processDispatchQueue(dispatchQueue, eventSystemFlags);
}
function listenToNonDelegatedEvent(domEventName, targetElement) {
{
if (!nonDelegatedEvents.has(domEventName)) {
error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.', domEventName);
}
}
var isCapturePhaseListener = false;
var listenerSet = getEventListenerSet(targetElement);
var listenerSetKey = getListenerSetKey(domEventName, isCapturePhaseListener);
if (!listenerSet.has(listenerSetKey)) {
addTrappedEventListener(targetElement, domEventName, IS_NON_DELEGATED, isCapturePhaseListener);
listenerSet.add(listenerSetKey);
}
}
function listenToNativeEvent(domEventName, isCapturePhaseListener, target) {
{
if (nonDelegatedEvents.has(domEventName) && !isCapturePhaseListener) {
error('Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.', domEventName);
}
}
var eventSystemFlags = 0;
if (isCapturePhaseListener) {
eventSystemFlags |= IS_CAPTURE_PHASE;
}
addTrappedEventListener(target, domEventName, eventSystemFlags, isCapturePhaseListener);
}
var listeningMarker = "_reactListening" + Math.random().toString(36).slice(2);
function listenToAllSupportedEvents(rootContainerElement) {
if (!rootContainerElement[listeningMarker]) {
rootContainerElement[listeningMarker] = true;
allNativeEvents.forEach(function(domEventName) {
if (domEventName !== "selectionchange") {
if (!nonDelegatedEvents.has(domEventName)) {
listenToNativeEvent(domEventName, false, rootContainerElement);
}
listenToNativeEvent(domEventName, true, rootContainerElement);
}
});
var ownerDocument = rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
if (ownerDocument !== null) {
if (!ownerDocument[listeningMarker]) {
ownerDocument[listeningMarker] = true;
listenToNativeEvent("selectionchange", false, ownerDocument);
}
}
}
}
function addTrappedEventListener(targetContainer, domEventName, eventSystemFlags, isCapturePhaseListener, isDeferredListenerForLegacyFBSupport) {
var listener = createEventListenerWrapperWithPriority(targetContainer, domEventName, eventSystemFlags);
var isPassiveListener = void 0;
if (passiveBrowserEventsSupported) {
if (domEventName === "touchstart" || domEventName === "touchmove" || domEventName === "wheel") {
isPassiveListener = true;
}
}
targetContainer = targetContainer;
var unsubscribeListener;
if (isCapturePhaseListener) {
if (isPassiveListener !== void 0) {
unsubscribeListener = addEventCaptureListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
} else {
unsubscribeListener = addEventCaptureListener(targetContainer, domEventName, listener);
}
} else {
if (isPassiveListener !== void 0) {
unsubscribeListener = addEventBubbleListenerWithPassiveFlag(targetContainer, domEventName, listener, isPassiveListener);
} else {
unsubscribeListener = addEventBubbleListener(targetContainer, domEventName, listener);
}
}
}
function isMatchingRootContainer(grandContainer, targetContainer) {
return grandContainer === targetContainer || grandContainer.nodeType === COMMENT_NODE && grandContainer.parentNode === targetContainer;
}
function dispatchEventForPluginEventSystem(domEventName, eventSystemFlags, nativeEvent, targetInst, targetContainer) {
var ancestorInst = targetInst;
if ((eventSystemFlags & IS_EVENT_HANDLE_NON_MANAGED_NODE) === 0 && (eventSystemFlags & IS_NON_DELEGATED) === 0) {
var targetContainerNode = targetContainer;
if (targetInst !== null) {
var node = targetInst;
mainLoop:
while (true) {
if (node === null) {
return;
}
var nodeTag = node.tag;
if (nodeTag === HostRoot || nodeTag === HostPortal) {
var container = node.stateNode.containerInfo;
if (isMatchingRootContainer(container, targetContainerNode)) {
break;
}
if (nodeTag === HostPortal) {
var grandNode = node.return;
while (grandNode !== null) {
var grandTag = grandNode.tag;
if (grandTag === HostRoot || grandTag === HostPortal) {
var grandContainer = grandNode.stateNode.containerInfo;
if (isMatchingRootContainer(grandContainer, targetContainerNode)) {
return;
}
}
grandNode = grandNode.return;
}
}
while (container !== null) {
var parentNode = getClosestInstanceFromNode(container);
if (parentNode === null) {
return;
}
var parentTag = parentNode.tag;
if (parentTag === HostComponent || parentTag === HostText) {
node = ancestorInst = parentNode;
continue mainLoop;
}
container = container.parentNode;
}
}
node = node.return;
}
}
}
batchedUpdates(function() {
return dispatchEventsForPlugins(domEventName, eventSystemFlags, nativeEvent, ancestorInst);
});
}
function createDispatchListener(instance, listener, currentTarget) {
return {
instance,
listener,
currentTarget
};
}
function accumulateSinglePhaseListeners(targetFiber, reactName, nativeEventType, inCapturePhase, accumulateTargetOnly, nativeEvent) {
var captureName = reactName !== null ? reactName + "Capture" : null;
var reactEventName = inCapturePhase ? captureName : reactName;
var listeners = [];
var instance = targetFiber;
var lastHostComponent = null;
while (instance !== null) {
var _instance2 = instance, stateNode = _instance2.stateNode, tag = _instance2.tag;
if (tag === HostComponent && stateNode !== null) {
lastHostComponent = stateNode;
if (reactEventName !== null) {
var listener = getListener(instance, reactEventName);
if (listener != null) {
listeners.push(createDispatchListener(instance, listener, lastHostComponent));
}
}
}
if (accumulateTargetOnly) {
break;
}
instance = instance.return;
}
return listeners;
}
function accumulateTwoPhaseListeners(targetFiber, reactName) {
var captureName = reactName + "Capture";
var listeners = [];
var instance = targetFiber;
while (instance !== null) {
var _instance3 = instance, stateNode = _instance3.stateNode, tag = _instance3.tag;
if (tag === HostComponent && stateNode !== null) {
var currentTarget = stateNode;
var captureListener = getListener(instance, captureName);
if (captureListener != null) {
listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
}
var bubbleListener = getListener(instance, reactName);
if (bubbleListener != null) {
listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
}
}
instance = instance.return;
}
return listeners;
}
function getParent(inst) {
if (inst === null) {
return null;
}
do {
inst = inst.return;
} while (inst && inst.tag !== HostComponent);
if (inst) {
return inst;
}
return null;
}
function getLowestCommonAncestor(instA, instB) {
var nodeA = instA;
var nodeB = instB;
var depthA = 0;
for (var tempA = nodeA; tempA; tempA = getParent(tempA)) {
depthA++;
}
var depthB = 0;
for (var tempB = nodeB; tempB; tempB = getParent(tempB)) {
depthB++;
}
while (depthA - depthB > 0) {
nodeA = getParent(nodeA);
depthA--;
}
while (depthB - depthA > 0) {
nodeB = getParent(nodeB);
depthB--;
}
var depth = depthA;
while (depth--) {
if (nodeA === nodeB || nodeB !== null && nodeA === nodeB.alternate) {
return nodeA;
}
nodeA = getParent(nodeA);
nodeB = getParent(nodeB);
}
return null;
}
function accumulateEnterLeaveListenersForEvent(dispatchQueue, event, target, common, inCapturePhase) {
var registrationName = event._reactName;
var listeners = [];
var instance = target;
while (instance !== null) {
if (instance === common) {
break;
}
var _instance4 = instance, alternate = _instance4.alternate, stateNode = _instance4.stateNode, tag = _instance4.tag;
if (alternate !== null && alternate === common) {
break;
}
if (tag === HostComponent && stateNode !== null) {
var currentTarget = stateNode;
if (inCapturePhase) {
var captureListener = getListener(instance, registrationName);
if (captureListener != null) {
listeners.unshift(createDispatchListener(instance, captureListener, currentTarget));
}
} else if (!inCapturePhase) {
var bubbleListener = getListener(instance, registrationName);
if (bubbleListener != null) {
listeners.push(createDispatchListener(instance, bubbleListener, currentTarget));
}
}
}
instance = instance.return;
}
if (listeners.length !== 0) {
dispatchQueue.push({
event,
listeners
});
}
}
function accumulateEnterLeaveTwoPhaseListeners(dispatchQueue, leaveEvent, enterEvent, from, to) {
var common = from && to ? getLowestCommonAncestor(from, to) : null;
if (from !== null) {
accumulateEnterLeaveListenersForEvent(dispatchQueue, leaveEvent, from, common, false);
}
if (to !== null && enterEvent !== null) {
accumulateEnterLeaveListenersForEvent(dispatchQueue, enterEvent, to, common, true);
}
}
function getListenerSetKey(domEventName, capture) {
return domEventName + "__" + (capture ? "capture" : "bubble");
}
var didWarnInvalidHydration = false;
var DANGEROUSLY_SET_INNER_HTML = "dangerouslySetInnerHTML";
var SUPPRESS_CONTENT_EDITABLE_WARNING = "suppressContentEditableWarning";
var SUPPRESS_HYDRATION_WARNING = "suppressHydrationWarning";
var AUTOFOCUS = "autoFocus";
var CHILDREN = "children";
var STYLE = "style";
var HTML$1 = "__html";
var warnedUnknownTags;
var validatePropertiesInDevelopment;
var warnForPropDifference;
var warnForExtraAttributes;
var warnForInvalidEventListener;
var canDiffStyleForHydrationWarning;
var normalizeHTML;
{
warnedUnknownTags = {
// There are working polyfills for <dialog>. Let people use it.
dialog: true,
// Electron ships a custom <webview> tag to display external web content in
// an isolated frame and process.
// This tag is not present in non Electron environments such as JSDom which
// is often used for testing purposes.
// @see https://electronjs.org/docs/api/webview-tag
webview: true
};
validatePropertiesInDevelopment = function(type, props) {
validateProperties(type, props);
validateProperties$1(type, props);
validateProperties$2(type, props, {
registrationNameDependencies,
possibleRegistrationNames
});
};
canDiffStyleForHydrationWarning = canUseDOM2 && !document.documentMode;
warnForPropDifference = function(propName, serverValue, clientValue) {
if (didWarnInvalidHydration) {
return;
}
var normalizedClientValue = normalizeMarkupForTextOrAttribute(clientValue);
var normalizedServerValue = normalizeMarkupForTextOrAttribute(serverValue);
if (normalizedServerValue === normalizedClientValue) {
return;
}
didWarnInvalidHydration = true;
error("Prop `%s` did not match. Server: %s Client: %s", propName, JSON.stringify(normalizedServerValue), JSON.stringify(normalizedClientValue));
};
warnForExtraAttributes = function(attributeNames) {
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
var names = [];
attributeNames.forEach(function(name) {
names.push(name);
});
error("Extra attributes from the server: %s", names);
};
warnForInvalidEventListener = function(registrationName, listener) {
if (listener === false) {
error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.", registrationName, registrationName, registrationName);
} else {
error("Expected `%s` listener to be a function, instead got a value of `%s` type.", registrationName, typeof listener);
}
};
normalizeHTML = function(parent, html) {
var testElement = parent.namespaceURI === HTML_NAMESPACE ? parent.ownerDocument.createElement(parent.tagName) : parent.ownerDocument.createElementNS(parent.namespaceURI, parent.tagName);
testElement.innerHTML = html;
return testElement.innerHTML;
};
}
var NORMALIZE_NEWLINES_REGEX = /\r\n?/g;
var NORMALIZE_NULL_AND_REPLACEMENT_REGEX = /\u0000|\uFFFD/g;
function normalizeMarkupForTextOrAttribute(markup) {
{
checkHtmlStringCoercion(markup);
}
var markupString = typeof markup === "string" ? markup : "" + markup;
return markupString.replace(NORMALIZE_NEWLINES_REGEX, "\n").replace(NORMALIZE_NULL_AND_REPLACEMENT_REGEX, "");
}
function checkForUnmatchedText(serverText, clientText, isConcurrentMode, shouldWarnDev) {
var normalizedClientText = normalizeMarkupForTextOrAttribute(clientText);
var normalizedServerText = normalizeMarkupForTextOrAttribute(serverText);
if (normalizedServerText === normalizedClientText) {
return;
}
if (shouldWarnDev) {
{
if (!didWarnInvalidHydration) {
didWarnInvalidHydration = true;
error('Text content did not match. Server: "%s" Client: "%s"', normalizedServerText, normalizedClientText);
}
}
}
if (isConcurrentMode && enableClientRenderFallbackOnTextMismatch) {
throw new Error("Text content does not match server-rendered HTML.");
}
}
function getOwnerDocumentFromRootContainer(rootContainerElement) {
return rootContainerElement.nodeType === DOCUMENT_NODE ? rootContainerElement : rootContainerElement.ownerDocument;
}
function noop2() {
}
function trapClickOnNonInteractiveElement(node) {
node.onclick = noop2;
}
function setInitialDOMProperties(tag, domElement, rootContainerElement, nextProps, isCustomComponentTag) {
for (var propKey in nextProps) {
if (!nextProps.hasOwnProperty(propKey)) {
continue;
}
var nextProp = nextProps[propKey];
if (propKey === STYLE) {
{
if (nextProp) {
Object.freeze(nextProp);
}
}
setValueForStyles(domElement, nextProp);
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var nextHtml = nextProp ? nextProp[HTML$1] : void 0;
if (nextHtml != null) {
setInnerHTML(domElement, nextHtml);
}
} else if (propKey === CHILDREN) {
if (typeof nextProp === "string") {
var canSetTextContent = tag !== "textarea" || nextProp !== "";
if (canSetTextContent) {
setTextContent(domElement, nextProp);
}
} else if (typeof nextProp === "number") {
setTextContent(domElement, "" + nextProp);
}
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING)
;
else if (propKey === AUTOFOCUS)
;
else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if (typeof nextProp !== "function") {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === "onScroll") {
listenToNonDelegatedEvent("scroll", domElement);
}
}
} else if (nextProp != null) {
setValueForProperty(domElement, propKey, nextProp, isCustomComponentTag);
}
}
}
function updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag) {
for (var i = 0; i < updatePayload.length; i += 2) {
var propKey = updatePayload[i];
var propValue = updatePayload[i + 1];
if (propKey === STYLE) {
setValueForStyles(domElement, propValue);
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
setInnerHTML(domElement, propValue);
} else if (propKey === CHILDREN) {
setTextContent(domElement, propValue);
} else {
setValueForProperty(domElement, propKey, propValue, isCustomComponentTag);
}
}
}
function createElement(type, props, rootContainerElement, parentNamespace) {
var isCustomComponentTag;
var ownerDocument = getOwnerDocumentFromRootContainer(rootContainerElement);
var domElement;
var namespaceURI = parentNamespace;
if (namespaceURI === HTML_NAMESPACE) {
namespaceURI = getIntrinsicNamespace(type);
}
if (namespaceURI === HTML_NAMESPACE) {
{
isCustomComponentTag = isCustomComponent(type, props);
if (!isCustomComponentTag && type !== type.toLowerCase()) {
error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.", type);
}
}
if (type === "script") {
var div = ownerDocument.createElement("div");
div.innerHTML = "<script><\/script>";
var firstChild = div.firstChild;
domElement = div.removeChild(firstChild);
} else if (typeof props.is === "string") {
domElement = ownerDocument.createElement(type, {
is: props.is
});
} else {
domElement = ownerDocument.createElement(type);
if (type === "select") {
var node = domElement;
if (props.multiple) {
node.multiple = true;
} else if (props.size) {
node.size = props.size;
}
}
}
} else {
domElement = ownerDocument.createElementNS(namespaceURI, type);
}
{
if (namespaceURI === HTML_NAMESPACE) {
if (!isCustomComponentTag && Object.prototype.toString.call(domElement) === "[object HTMLUnknownElement]" && !hasOwnProperty2.call(warnedUnknownTags, type)) {
warnedUnknownTags[type] = true;
error("The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.", type);
}
}
}
return domElement;
}
function createTextNode(text, rootContainerElement) {
return getOwnerDocumentFromRootContainer(rootContainerElement).createTextNode(text);
}
function setInitialProperties(domElement, tag, rawProps, rootContainerElement) {
var isCustomComponentTag = isCustomComponent(tag, rawProps);
{
validatePropertiesInDevelopment(tag, rawProps);
}
var props;
switch (tag) {
case "dialog":
listenToNonDelegatedEvent("cancel", domElement);
listenToNonDelegatedEvent("close", domElement);
props = rawProps;
break;
case "iframe":
case "object":
case "embed":
listenToNonDelegatedEvent("load", domElement);
props = rawProps;
break;
case "video":
case "audio":
for (var i = 0; i < mediaEventTypes.length; i++) {
listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
props = rawProps;
break;
case "source":
listenToNonDelegatedEvent("error", domElement);
props = rawProps;
break;
case "img":
case "image":
case "link":
listenToNonDelegatedEvent("error", domElement);
listenToNonDelegatedEvent("load", domElement);
props = rawProps;
break;
case "details":
listenToNonDelegatedEvent("toggle", domElement);
props = rawProps;
break;
case "input":
initWrapperState(domElement, rawProps);
props = getHostProps(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
case "option":
validateProps(domElement, rawProps);
props = rawProps;
break;
case "select":
initWrapperState$1(domElement, rawProps);
props = getHostProps$1(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
case "textarea":
initWrapperState$2(domElement, rawProps);
props = getHostProps$2(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
default:
props = rawProps;
}
assertValidProps(tag, props);
setInitialDOMProperties(tag, domElement, rootContainerElement, props, isCustomComponentTag);
switch (tag) {
case "input":
track(domElement);
postMountWrapper(domElement, rawProps, false);
break;
case "textarea":
track(domElement);
postMountWrapper$3(domElement);
break;
case "option":
postMountWrapper$1(domElement, rawProps);
break;
case "select":
postMountWrapper$2(domElement, rawProps);
break;
default:
if (typeof props.onClick === "function") {
trapClickOnNonInteractiveElement(domElement);
}
break;
}
}
function diffProperties(domElement, tag, lastRawProps, nextRawProps, rootContainerElement) {
{
validatePropertiesInDevelopment(tag, nextRawProps);
}
var updatePayload = null;
var lastProps;
var nextProps;
switch (tag) {
case "input":
lastProps = getHostProps(domElement, lastRawProps);
nextProps = getHostProps(domElement, nextRawProps);
updatePayload = [];
break;
case "select":
lastProps = getHostProps$1(domElement, lastRawProps);
nextProps = getHostProps$1(domElement, nextRawProps);
updatePayload = [];
break;
case "textarea":
lastProps = getHostProps$2(domElement, lastRawProps);
nextProps = getHostProps$2(domElement, nextRawProps);
updatePayload = [];
break;
default:
lastProps = lastRawProps;
nextProps = nextRawProps;
if (typeof lastProps.onClick !== "function" && typeof nextProps.onClick === "function") {
trapClickOnNonInteractiveElement(domElement);
}
break;
}
assertValidProps(tag, nextProps);
var propKey;
var styleName;
var styleUpdates = null;
for (propKey in lastProps) {
if (nextProps.hasOwnProperty(propKey) || !lastProps.hasOwnProperty(propKey) || lastProps[propKey] == null) {
continue;
}
if (propKey === STYLE) {
var lastStyle = lastProps[propKey];
for (styleName in lastStyle) {
if (lastStyle.hasOwnProperty(styleName)) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = "";
}
}
} else if (propKey === DANGEROUSLY_SET_INNER_HTML || propKey === CHILDREN)
;
else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING)
;
else if (propKey === AUTOFOCUS)
;
else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (!updatePayload) {
updatePayload = [];
}
} else {
(updatePayload = updatePayload || []).push(propKey, null);
}
}
for (propKey in nextProps) {
var nextProp = nextProps[propKey];
var lastProp = lastProps != null ? lastProps[propKey] : void 0;
if (!nextProps.hasOwnProperty(propKey) || nextProp === lastProp || nextProp == null && lastProp == null) {
continue;
}
if (propKey === STYLE) {
{
if (nextProp) {
Object.freeze(nextProp);
}
}
if (lastProp) {
for (styleName in lastProp) {
if (lastProp.hasOwnProperty(styleName) && (!nextProp || !nextProp.hasOwnProperty(styleName))) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = "";
}
}
for (styleName in nextProp) {
if (nextProp.hasOwnProperty(styleName) && lastProp[styleName] !== nextProp[styleName]) {
if (!styleUpdates) {
styleUpdates = {};
}
styleUpdates[styleName] = nextProp[styleName];
}
}
} else {
if (!styleUpdates) {
if (!updatePayload) {
updatePayload = [];
}
updatePayload.push(propKey, styleUpdates);
}
styleUpdates = nextProp;
}
} else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var nextHtml = nextProp ? nextProp[HTML$1] : void 0;
var lastHtml = lastProp ? lastProp[HTML$1] : void 0;
if (nextHtml != null) {
if (lastHtml !== nextHtml) {
(updatePayload = updatePayload || []).push(propKey, nextHtml);
}
}
} else if (propKey === CHILDREN) {
if (typeof nextProp === "string" || typeof nextProp === "number") {
(updatePayload = updatePayload || []).push(propKey, "" + nextProp);
}
} else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING)
;
else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if (typeof nextProp !== "function") {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === "onScroll") {
listenToNonDelegatedEvent("scroll", domElement);
}
}
if (!updatePayload && lastProp !== nextProp) {
updatePayload = [];
}
} else {
(updatePayload = updatePayload || []).push(propKey, nextProp);
}
}
if (styleUpdates) {
{
validateShorthandPropertyCollisionInDev(styleUpdates, nextProps[STYLE]);
}
(updatePayload = updatePayload || []).push(STYLE, styleUpdates);
}
return updatePayload;
}
function updateProperties(domElement, updatePayload, tag, lastRawProps, nextRawProps) {
if (tag === "input" && nextRawProps.type === "radio" && nextRawProps.name != null) {
updateChecked(domElement, nextRawProps);
}
var wasCustomComponentTag = isCustomComponent(tag, lastRawProps);
var isCustomComponentTag = isCustomComponent(tag, nextRawProps);
updateDOMProperties(domElement, updatePayload, wasCustomComponentTag, isCustomComponentTag);
switch (tag) {
case "input":
updateWrapper(domElement, nextRawProps);
break;
case "textarea":
updateWrapper$1(domElement, nextRawProps);
break;
case "select":
postUpdateWrapper(domElement, nextRawProps);
break;
}
}
function getPossibleStandardName(propName) {
{
var lowerCasedName = propName.toLowerCase();
if (!possibleStandardNames.hasOwnProperty(lowerCasedName)) {
return null;
}
return possibleStandardNames[lowerCasedName] || null;
}
}
function diffHydratedProperties(domElement, tag, rawProps, parentNamespace, rootContainerElement, isConcurrentMode, shouldWarnDev) {
var isCustomComponentTag;
var extraAttributeNames;
{
isCustomComponentTag = isCustomComponent(tag, rawProps);
validatePropertiesInDevelopment(tag, rawProps);
}
switch (tag) {
case "dialog":
listenToNonDelegatedEvent("cancel", domElement);
listenToNonDelegatedEvent("close", domElement);
break;
case "iframe":
case "object":
case "embed":
listenToNonDelegatedEvent("load", domElement);
break;
case "video":
case "audio":
for (var i = 0; i < mediaEventTypes.length; i++) {
listenToNonDelegatedEvent(mediaEventTypes[i], domElement);
}
break;
case "source":
listenToNonDelegatedEvent("error", domElement);
break;
case "img":
case "image":
case "link":
listenToNonDelegatedEvent("error", domElement);
listenToNonDelegatedEvent("load", domElement);
break;
case "details":
listenToNonDelegatedEvent("toggle", domElement);
break;
case "input":
initWrapperState(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
case "option":
validateProps(domElement, rawProps);
break;
case "select":
initWrapperState$1(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
case "textarea":
initWrapperState$2(domElement, rawProps);
listenToNonDelegatedEvent("invalid", domElement);
break;
}
assertValidProps(tag, rawProps);
{
extraAttributeNames = /* @__PURE__ */ new Set();
var attributes = domElement.attributes;
for (var _i = 0; _i < attributes.length; _i++) {
var name = attributes[_i].name.toLowerCase();
switch (name) {
case "value":
break;
case "checked":
break;
case "selected":
break;
default:
extraAttributeNames.add(attributes[_i].name);
}
}
}
var updatePayload = null;
for (var propKey in rawProps) {
if (!rawProps.hasOwnProperty(propKey)) {
continue;
}
var nextProp = rawProps[propKey];
if (propKey === CHILDREN) {
if (typeof nextProp === "string") {
if (domElement.textContent !== nextProp) {
if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
}
updatePayload = [CHILDREN, nextProp];
}
} else if (typeof nextProp === "number") {
if (domElement.textContent !== "" + nextProp) {
if (rawProps[SUPPRESS_HYDRATION_WARNING] !== true) {
checkForUnmatchedText(domElement.textContent, nextProp, isConcurrentMode, shouldWarnDev);
}
updatePayload = [CHILDREN, "" + nextProp];
}
}
} else if (registrationNameDependencies.hasOwnProperty(propKey)) {
if (nextProp != null) {
if (typeof nextProp !== "function") {
warnForInvalidEventListener(propKey, nextProp);
}
if (propKey === "onScroll") {
listenToNonDelegatedEvent("scroll", domElement);
}
}
} else if (shouldWarnDev && true && // Convince Flow we've calculated it (it's DEV-only in this method.)
typeof isCustomComponentTag === "boolean") {
var serverValue = void 0;
var propertyInfo = isCustomComponentTag && enableCustomElementPropertySupport ? null : getPropertyInfo(propKey);
if (rawProps[SUPPRESS_HYDRATION_WARNING] === true)
;
else if (propKey === SUPPRESS_CONTENT_EDITABLE_WARNING || propKey === SUPPRESS_HYDRATION_WARNING || // Controlled attributes are not validated
// TODO: Only ignore them on controlled tags.
propKey === "value" || propKey === "checked" || propKey === "selected")
;
else if (propKey === DANGEROUSLY_SET_INNER_HTML) {
var serverHTML = domElement.innerHTML;
var nextHtml = nextProp ? nextProp[HTML$1] : void 0;
if (nextHtml != null) {
var expectedHTML = normalizeHTML(domElement, nextHtml);
if (expectedHTML !== serverHTML) {
warnForPropDifference(propKey, serverHTML, expectedHTML);
}
}
} else if (propKey === STYLE) {
extraAttributeNames.delete(propKey);
if (canDiffStyleForHydrationWarning) {
var expectedStyle = createDangerousStringForStyles(nextProp);
serverValue = domElement.getAttribute("style");
if (expectedStyle !== serverValue) {
warnForPropDifference(propKey, serverValue, expectedStyle);
}
}
} else if (isCustomComponentTag && !enableCustomElementPropertySupport) {
extraAttributeNames.delete(propKey.toLowerCase());
serverValue = getValueForAttribute(domElement, propKey, nextProp);
if (nextProp !== serverValue) {
warnForPropDifference(propKey, serverValue, nextProp);
}
} else if (!shouldIgnoreAttribute(propKey, propertyInfo, isCustomComponentTag) && !shouldRemoveAttribute(propKey, nextProp, propertyInfo, isCustomComponentTag)) {
var isMismatchDueToBadCasing = false;
if (propertyInfo !== null) {
extraAttributeNames.delete(propertyInfo.attributeName);
serverValue = getValueForProperty(domElement, propKey, nextProp, propertyInfo);
} else {
var ownNamespace = parentNamespace;
if (ownNamespace === HTML_NAMESPACE) {
ownNamespace = getIntrinsicNamespace(tag);
}
if (ownNamespace === HTML_NAMESPACE) {
extraAttributeNames.delete(propKey.toLowerCase());
} else {
var standardName = getPossibleStandardName(propKey);
if (standardName !== null && standardName !== propKey) {
isMismatchDueToBadCasing = true;
extraAttributeNames.delete(standardName);
}
extraAttributeNames.delete(propKey);
}
serverValue = getValueForAttribute(domElement, propKey, nextProp);
}
var dontWarnCustomElement = enableCustomElementPropertySupport;
if (!dontWarnCustomElement && nextProp !== serverValue && !isMismatchDueToBadCasing) {
warnForPropDifference(propKey, serverValue, nextProp);
}
}
}
}
{
if (shouldWarnDev) {
if (
// $FlowFixMe - Should be inferred as not undefined.
extraAttributeNames.size > 0 && rawProps[SUPPRESS_HYDRATION_WARNING] !== true
) {
warnForExtraAttributes(extraAttributeNames);
}
}
}
switch (tag) {
case "input":
track(domElement);
postMountWrapper(domElement, rawProps, true);
break;
case "textarea":
track(domElement);
postMountWrapper$3(domElement);
break;
case "select":
case "option":
break;
default:
if (typeof rawProps.onClick === "function") {
trapClickOnNonInteractiveElement(domElement);
}
break;
}
return updatePayload;
}
function diffHydratedText(textNode, text, isConcurrentMode) {
var isDifferent = textNode.nodeValue !== text;
return isDifferent;
}
function warnForDeletedHydratableElement(parentNode, child) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error("Did not expect server HTML to contain a <%s> in <%s>.", child.nodeName.toLowerCase(), parentNode.nodeName.toLowerCase());
}
}
function warnForDeletedHydratableText(parentNode, child) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Did not expect server HTML to contain the text node "%s" in <%s>.', child.nodeValue, parentNode.nodeName.toLowerCase());
}
}
function warnForInsertedHydratedElement(parentNode, tag, props) {
{
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error("Expected server HTML to contain a matching <%s> in <%s>.", tag, parentNode.nodeName.toLowerCase());
}
}
function warnForInsertedHydratedText(parentNode, text) {
{
if (text === "") {
return;
}
if (didWarnInvalidHydration) {
return;
}
didWarnInvalidHydration = true;
error('Expected server HTML to contain a matching text node for "%s" in <%s>.', text, parentNode.nodeName.toLowerCase());
}
}
function restoreControlledState$3(domElement, tag, props) {
switch (tag) {
case "input":
restoreControlledState(domElement, props);
return;
case "textarea":
restoreControlledState$2(domElement, props);
return;
case "select":
restoreControlledState$1(domElement, props);
return;
}
}
var validateDOMNesting = function() {
};
var updatedAncestorInfo = function() {
};
{
var specialTags = ["address", "applet", "area", "article", "aside", "base", "basefont", "bgsound", "blockquote", "body", "br", "button", "caption", "center", "col", "colgroup", "dd", "details", "dir", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure", "footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header", "hgroup", "hr", "html", "iframe", "img", "input", "isindex", "li", "link", "listing", "main", "marquee", "menu", "menuitem", "meta", "nav", "noembed", "noframes", "noscript", "object", "ol", "p", "param", "plaintext", "pre", "script", "section", "select", "source", "style", "summary", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "title", "tr", "track", "ul", "wbr", "xmp"];
var inScopeTags = [
"applet",
"caption",
"html",
"table",
"td",
"th",
"marquee",
"object",
"template",
// https://html.spec.whatwg.org/multipage/syntax.html#html-integration-point
// TODO: Distinguish by namespace here -- for <title>, including it here
// errs on the side of fewer warnings
"foreignObject",
"desc",
"title"
];
var buttonScopeTags = inScopeTags.concat(["button"]);
var impliedEndTags = ["dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"];
var emptyAncestorInfo = {
current: null,
formTag: null,
aTagInScope: null,
buttonTagInScope: null,
nobrTagInScope: null,
pTagInButtonScope: null,
listItemTagAutoclosing: null,
dlItemTagAutoclosing: null
};
updatedAncestorInfo = function(oldInfo, tag) {
var ancestorInfo = assign({}, oldInfo || emptyAncestorInfo);
var info = {
tag
};
if (inScopeTags.indexOf(tag) !== -1) {
ancestorInfo.aTagInScope = null;
ancestorInfo.buttonTagInScope = null;
ancestorInfo.nobrTagInScope = null;
}
if (buttonScopeTags.indexOf(tag) !== -1) {
ancestorInfo.pTagInButtonScope = null;
}
if (specialTags.indexOf(tag) !== -1 && tag !== "address" && tag !== "div" && tag !== "p") {
ancestorInfo.listItemTagAutoclosing = null;
ancestorInfo.dlItemTagAutoclosing = null;
}
ancestorInfo.current = info;
if (tag === "form") {
ancestorInfo.formTag = info;
}
if (tag === "a") {
ancestorInfo.aTagInScope = info;
}
if (tag === "button") {
ancestorInfo.buttonTagInScope = info;
}
if (tag === "nobr") {
ancestorInfo.nobrTagInScope = info;
}
if (tag === "p") {
ancestorInfo.pTagInButtonScope = info;
}
if (tag === "li") {
ancestorInfo.listItemTagAutoclosing = info;
}
if (tag === "dd" || tag === "dt") {
ancestorInfo.dlItemTagAutoclosing = info;
}
return ancestorInfo;
};
var isTagValidWithParent = function(tag, parentTag) {
switch (parentTag) {
case "select":
return tag === "option" || tag === "optgroup" || tag === "#text";
case "optgroup":
return tag === "option" || tag === "#text";
case "option":
return tag === "#text";
case "tr":
return tag === "th" || tag === "td" || tag === "style" || tag === "script" || tag === "template";
case "tbody":
case "thead":
case "tfoot":
return tag === "tr" || tag === "style" || tag === "script" || tag === "template";
case "colgroup":
return tag === "col" || tag === "template";
case "table":
return tag === "caption" || tag === "colgroup" || tag === "tbody" || tag === "tfoot" || tag === "thead" || tag === "style" || tag === "script" || tag === "template";
case "head":
return tag === "base" || tag === "basefont" || tag === "bgsound" || tag === "link" || tag === "meta" || tag === "title" || tag === "noscript" || tag === "noframes" || tag === "style" || tag === "script" || tag === "template";
case "html":
return tag === "head" || tag === "body" || tag === "frameset";
case "frameset":
return tag === "frame";
case "#document":
return tag === "html";
}
switch (tag) {
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
return parentTag !== "h1" && parentTag !== "h2" && parentTag !== "h3" && parentTag !== "h4" && parentTag !== "h5" && parentTag !== "h6";
case "rp":
case "rt":
return impliedEndTags.indexOf(parentTag) === -1;
case "body":
case "caption":
case "col":
case "colgroup":
case "frameset":
case "frame":
case "head":
case "html":
case "tbody":
case "td":
case "tfoot":
case "th":
case "thead":
case "tr":
return parentTag == null;
}
return true;
};
var findInvalidAncestorForTag = function(tag, ancestorInfo) {
switch (tag) {
case "address":
case "article":
case "aside":
case "blockquote":
case "center":
case "details":
case "dialog":
case "dir":
case "div":
case "dl":
case "fieldset":
case "figcaption":
case "figure":
case "footer":
case "header":
case "hgroup":
case "main":
case "menu":
case "nav":
case "ol":
case "p":
case "section":
case "summary":
case "ul":
case "pre":
case "listing":
case "table":
case "hr":
case "xmp":
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
return ancestorInfo.pTagInButtonScope;
case "form":
return ancestorInfo.formTag || ancestorInfo.pTagInButtonScope;
case "li":
return ancestorInfo.listItemTagAutoclosing;
case "dd":
case "dt":
return ancestorInfo.dlItemTagAutoclosing;
case "button":
return ancestorInfo.buttonTagInScope;
case "a":
return ancestorInfo.aTagInScope;
case "nobr":
return ancestorInfo.nobrTagInScope;
}
return null;
};
var didWarn$1 = {};
validateDOMNesting = function(childTag, childText, ancestorInfo) {
ancestorInfo = ancestorInfo || emptyAncestorInfo;
var parentInfo = ancestorInfo.current;
var parentTag = parentInfo && parentInfo.tag;
if (childText != null) {
if (childTag != null) {
error("validateDOMNesting: when childText is passed, childTag should be null");
}
childTag = "#text";
}
var invalidParent = isTagValidWithParent(childTag, parentTag) ? null : parentInfo;
var invalidAncestor = invalidParent ? null : findInvalidAncestorForTag(childTag, ancestorInfo);
var invalidParentOrAncestor = invalidParent || invalidAncestor;
if (!invalidParentOrAncestor) {
return;
}
var ancestorTag = invalidParentOrAncestor.tag;
var warnKey = !!invalidParent + "|" + childTag + "|" + ancestorTag;
if (didWarn$1[warnKey]) {
return;
}
didWarn$1[warnKey] = true;
var tagDisplayName = childTag;
var whitespaceInfo = "";
if (childTag === "#text") {
if (/\S/.test(childText)) {
tagDisplayName = "Text nodes";
} else {
tagDisplayName = "Whitespace text nodes";
whitespaceInfo = " Make sure you don't have any extra whitespace between tags on each line of your source code.";
}
} else {
tagDisplayName = "<" + childTag + ">";
}
if (invalidParent) {
var info = "";
if (ancestorTag === "table" && childTag === "tr") {
info += " Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.";
}
error("validateDOMNesting(...): %s cannot appear as a child of <%s>.%s%s", tagDisplayName, ancestorTag, whitespaceInfo, info);
} else {
error("validateDOMNesting(...): %s cannot appear as a descendant of <%s>.", tagDisplayName, ancestorTag);
}
};
}
var SUPPRESS_HYDRATION_WARNING$1 = "suppressHydrationWarning";
var SUSPENSE_START_DATA = "$";
var SUSPENSE_END_DATA = "/$";
var SUSPENSE_PENDING_START_DATA = "$?";
var SUSPENSE_FALLBACK_START_DATA = "$!";
var STYLE$1 = "style";
var eventsEnabled = null;
var selectionInformation = null;
function getRootHostContext(rootContainerInstance) {
var type;
var namespace;
var nodeType = rootContainerInstance.nodeType;
switch (nodeType) {
case DOCUMENT_NODE:
case DOCUMENT_FRAGMENT_NODE: {
type = nodeType === DOCUMENT_NODE ? "#document" : "#fragment";
var root2 = rootContainerInstance.documentElement;
namespace = root2 ? root2.namespaceURI : getChildNamespace(null, "");
break;
}
default: {
var container = nodeType === COMMENT_NODE ? rootContainerInstance.parentNode : rootContainerInstance;
var ownNamespace = container.namespaceURI || null;
type = container.tagName;
namespace = getChildNamespace(ownNamespace, type);
break;
}
}
{
var validatedTag = type.toLowerCase();
var ancestorInfo = updatedAncestorInfo(null, validatedTag);
return {
namespace,
ancestorInfo
};
}
}
function getChildHostContext(parentHostContext, type, rootContainerInstance) {
{
var parentHostContextDev = parentHostContext;
var namespace = getChildNamespace(parentHostContextDev.namespace, type);
var ancestorInfo = updatedAncestorInfo(parentHostContextDev.ancestorInfo, type);
return {
namespace,
ancestorInfo
};
}
}
function getPublicInstance(instance) {
return instance;
}
function prepareForCommit(containerInfo) {
eventsEnabled = isEnabled();
selectionInformation = getSelectionInformation();
var activeInstance = null;
setEnabled(false);
return activeInstance;
}
function resetAfterCommit(containerInfo) {
restoreSelection(selectionInformation);
setEnabled(eventsEnabled);
eventsEnabled = null;
selectionInformation = null;
}
function createInstance(type, props, rootContainerInstance, hostContext, internalInstanceHandle) {
var parentNamespace;
{
var hostContextDev = hostContext;
validateDOMNesting(type, null, hostContextDev.ancestorInfo);
if (typeof props.children === "string" || typeof props.children === "number") {
var string = "" + props.children;
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
validateDOMNesting(null, string, ownAncestorInfo);
}
parentNamespace = hostContextDev.namespace;
}
var domElement = createElement(type, props, rootContainerInstance, parentNamespace);
precacheFiberNode(internalInstanceHandle, domElement);
updateFiberProps(domElement, props);
return domElement;
}
function appendInitialChild(parentInstance, child) {
parentInstance.appendChild(child);
}
function finalizeInitialChildren(domElement, type, props, rootContainerInstance, hostContext) {
setInitialProperties(domElement, type, props, rootContainerInstance);
switch (type) {
case "button":
case "input":
case "select":
case "textarea":
return !!props.autoFocus;
case "img":
return true;
default:
return false;
}
}
function prepareUpdate(domElement, type, oldProps, newProps, rootContainerInstance, hostContext) {
{
var hostContextDev = hostContext;
if (typeof newProps.children !== typeof oldProps.children && (typeof newProps.children === "string" || typeof newProps.children === "number")) {
var string = "" + newProps.children;
var ownAncestorInfo = updatedAncestorInfo(hostContextDev.ancestorInfo, type);
validateDOMNesting(null, string, ownAncestorInfo);
}
}
return diffProperties(domElement, type, oldProps, newProps);
}
function shouldSetTextContent(type, props) {
return type === "textarea" || type === "noscript" || typeof props.children === "string" || typeof props.children === "number" || typeof props.dangerouslySetInnerHTML === "object" && props.dangerouslySetInnerHTML !== null && props.dangerouslySetInnerHTML.__html != null;
}
function createTextInstance(text, rootContainerInstance, hostContext, internalInstanceHandle) {
{
var hostContextDev = hostContext;
validateDOMNesting(null, text, hostContextDev.ancestorInfo);
}
var textNode = createTextNode(text, rootContainerInstance);
precacheFiberNode(internalInstanceHandle, textNode);
return textNode;
}
function getCurrentEventPriority() {
var currentEvent = window.event;
if (currentEvent === void 0) {
return DefaultEventPriority;
}
return getEventPriority(currentEvent.type);
}
var scheduleTimeout = typeof setTimeout === "function" ? setTimeout : void 0;
var cancelTimeout = typeof clearTimeout === "function" ? clearTimeout : void 0;
var noTimeout = -1;
var localPromise = typeof Promise === "function" ? Promise : void 0;
var scheduleMicrotask = typeof queueMicrotask === "function" ? queueMicrotask : typeof localPromise !== "undefined" ? function(callback) {
return localPromise.resolve(null).then(callback).catch(handleErrorInNextTick);
} : scheduleTimeout;
function handleErrorInNextTick(error2) {
setTimeout(function() {
throw error2;
});
}
function commitMount(domElement, type, newProps, internalInstanceHandle) {
switch (type) {
case "button":
case "input":
case "select":
case "textarea":
if (newProps.autoFocus) {
domElement.focus();
}
return;
case "img": {
if (newProps.src) {
domElement.src = newProps.src;
}
return;
}
}
}
function commitUpdate(domElement, updatePayload, type, oldProps, newProps, internalInstanceHandle) {
updateProperties(domElement, updatePayload, type, oldProps, newProps);
updateFiberProps(domElement, newProps);
}
function resetTextContent(domElement) {
setTextContent(domElement, "");
}
function commitTextUpdate(textInstance, oldText, newText) {
textInstance.nodeValue = newText;
}
function appendChild(parentInstance, child) {
parentInstance.appendChild(child);
}
function appendChildToContainer(container, child) {
var parentNode;
if (container.nodeType === COMMENT_NODE) {
parentNode = container.parentNode;
parentNode.insertBefore(child, container);
} else {
parentNode = container;
parentNode.appendChild(child);
}
var reactRootContainer = container._reactRootContainer;
if ((reactRootContainer === null || reactRootContainer === void 0) && parentNode.onclick === null) {
trapClickOnNonInteractiveElement(parentNode);
}
}
function insertBefore(parentInstance, child, beforeChild) {
parentInstance.insertBefore(child, beforeChild);
}
function insertInContainerBefore(container, child, beforeChild) {
if (container.nodeType === COMMENT_NODE) {
container.parentNode.insertBefore(child, beforeChild);
} else {
container.insertBefore(child, beforeChild);
}
}
function removeChild(parentInstance, child) {
parentInstance.removeChild(child);
}
function removeChildFromContainer(container, child) {
if (container.nodeType === COMMENT_NODE) {
container.parentNode.removeChild(child);
} else {
container.removeChild(child);
}
}
function clearSuspenseBoundary(parentInstance, suspenseInstance) {
var node = suspenseInstance;
var depth = 0;
do {
var nextNode = node.nextSibling;
parentInstance.removeChild(node);
if (nextNode && nextNode.nodeType === COMMENT_NODE) {
var data = nextNode.data;
if (data === SUSPENSE_END_DATA) {
if (depth === 0) {
parentInstance.removeChild(nextNode);
retryIfBlockedOn(suspenseInstance);
return;
} else {
depth--;
}
} else if (data === SUSPENSE_START_DATA || data === SUSPENSE_PENDING_START_DATA || data === SUSPENSE_FALLBACK_START_DATA) {
depth++;
}
}
node = nextNode;
} while (node);
retryIfBlockedOn(suspenseInstance);
}
function clearSuspenseBoundaryFromContainer(container, suspenseInstance) {
if (container.nodeType === COMMENT_NODE) {
clearSuspenseBoundary(container.parentNode, suspenseInstance);
} else if (container.nodeType === ELEMENT_NODE) {
clearSuspenseBoundary(container, suspenseInstance);
}
retryIfBlockedOn(container);
}
function hideInstance(instance) {
instance = instance;
var style2 = instance.style;
if (typeof style2.setProperty === "function") {
style2.setProperty("display", "none", "important");
} else {
style2.display = "none";
}
}
function hideTextInstance(textInstance) {
textInstance.nodeValue = "";
}
function unhideInstance(instance, props) {
instance = instance;
var styleProp = props[STYLE$1];
var display = styleProp !== void 0 && styleProp !== null && styleProp.hasOwnProperty("display") ? styleProp.display : null;
instance.style.display = dangerousStyleValue("display", display);
}
function unhideTextInstance(textInstance, text) {
textInstance.nodeValue = text;
}
function clearContainer(container) {
if (container.nodeType === ELEMENT_NODE) {
container.textContent = "";
} else if (container.nodeType === DOCUMENT_NODE) {
if (container.documentElement) {
container.removeChild(container.documentElement);
}
}
}
function canHydrateInstance(instance, type, props) {
if (instance.nodeType !== ELEMENT_NODE || type.toLowerCase() !== instance.nodeName.toLowerCase()) {
return null;
}
return instance;
}
function canHydrateTextInstance(instance, text) {
if (text === "" || instance.nodeType !== TEXT_NODE) {
return null;
}
return instance;
}
function canHydrateSuspenseInstance(instance) {
if (instance.nodeType !== COMMENT_NODE) {
return null;
}
return instance;
}
function isSuspenseInstancePending(instance) {
return instance.data === SUSPENSE_PENDING_START_DATA;
}
function isSuspenseInstanceFallback(instance) {
return instance.data === SUSPENSE_FALLBACK_START_DATA;
}
function getSuspenseInstanceFallbackErrorDetails(instance) {
var dataset = instance.nextSibling && instance.nextSibling.dataset;
var digest, message, stack;
if (dataset) {
digest = dataset.dgst;
{
message = dataset.msg;
stack = dataset.stck;
}
}
{
return {
message,
digest,
stack
};
}
}
function registerSuspenseInstanceRetry(instance, callback) {
instance._reactRetry = callback;
}
function getNextHydratable(node) {
for (; node != null; node = node.nextSibling) {
var nodeType = node.nodeType;
if (nodeType === ELEMENT_NODE || nodeType === TEXT_NODE) {
break;
}
if (nodeType === COMMENT_NODE) {
var nodeData = node.data;
if (nodeData === SUSPENSE_START_DATA || nodeData === SUSPENSE_FALLBACK_START_DATA || nodeData === SUSPENSE_PENDING_START_DATA) {
break;
}
if (nodeData === SUSPENSE_END_DATA) {
return null;
}
}
}
return node;
}
function getNextHydratableSibling(instance) {
return getNextHydratable(instance.nextSibling);
}
function getFirstHydratableChild(parentInstance) {
return getNextHydratable(parentInstance.firstChild);
}
function getFirstHydratableChildWithinContainer(parentContainer) {
return getNextHydratable(parentContainer.firstChild);
}
function getFirstHydratableChildWithinSuspenseInstance(parentInstance) {
return getNextHydratable(parentInstance.nextSibling);
}
function hydrateInstance(instance, type, props, rootContainerInstance, hostContext, internalInstanceHandle, shouldWarnDev) {
precacheFiberNode(internalInstanceHandle, instance);
updateFiberProps(instance, props);
var parentNamespace;
{
var hostContextDev = hostContext;
parentNamespace = hostContextDev.namespace;
}
var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
return diffHydratedProperties(instance, type, props, parentNamespace, rootContainerInstance, isConcurrentMode, shouldWarnDev);
}
function hydrateTextInstance(textInstance, text, internalInstanceHandle, shouldWarnDev) {
precacheFiberNode(internalInstanceHandle, textInstance);
var isConcurrentMode = (internalInstanceHandle.mode & ConcurrentMode) !== NoMode;
return diffHydratedText(textInstance, text);
}
function hydrateSuspenseInstance(suspenseInstance, internalInstanceHandle) {
precacheFiberNode(internalInstanceHandle, suspenseInstance);
}
function getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance) {
var node = suspenseInstance.nextSibling;
var depth = 0;
while (node) {
if (node.nodeType === COMMENT_NODE) {
var data = node.data;
if (data === SUSPENSE_END_DATA) {
if (depth === 0) {
return getNextHydratableSibling(node);
} else {
depth--;
}
} else if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
depth++;
}
}
node = node.nextSibling;
}
return null;
}
function getParentSuspenseInstance(targetInstance) {
var node = targetInstance.previousSibling;
var depth = 0;
while (node) {
if (node.nodeType === COMMENT_NODE) {
var data = node.data;
if (data === SUSPENSE_START_DATA || data === SUSPENSE_FALLBACK_START_DATA || data === SUSPENSE_PENDING_START_DATA) {
if (depth === 0) {
return node;
} else {
depth--;
}
} else if (data === SUSPENSE_END_DATA) {
depth++;
}
}
node = node.previousSibling;
}
return null;
}
function commitHydratedContainer(container) {
retryIfBlockedOn(container);
}
function commitHydratedSuspenseInstance(suspenseInstance) {
retryIfBlockedOn(suspenseInstance);
}
function shouldDeleteUnhydratedTailInstances(parentType) {
return parentType !== "head" && parentType !== "body";
}
function didNotMatchHydratedContainerTextInstance(parentContainer, textInstance, text, isConcurrentMode) {
var shouldWarnDev = true;
checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
}
function didNotMatchHydratedTextInstance(parentType, parentProps, parentInstance, textInstance, text, isConcurrentMode) {
if (parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
var shouldWarnDev = true;
checkForUnmatchedText(textInstance.nodeValue, text, isConcurrentMode, shouldWarnDev);
}
}
function didNotHydrateInstanceWithinContainer(parentContainer, instance) {
{
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentContainer, instance);
} else if (instance.nodeType === COMMENT_NODE)
;
else {
warnForDeletedHydratableText(parentContainer, instance);
}
}
}
function didNotHydrateInstanceWithinSuspenseInstance(parentInstance, instance) {
{
var parentNode = parentInstance.parentNode;
if (parentNode !== null) {
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentNode, instance);
} else if (instance.nodeType === COMMENT_NODE)
;
else {
warnForDeletedHydratableText(parentNode, instance);
}
}
}
}
function didNotHydrateInstance(parentType, parentProps, parentInstance, instance, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
if (instance.nodeType === ELEMENT_NODE) {
warnForDeletedHydratableElement(parentInstance, instance);
} else if (instance.nodeType === COMMENT_NODE)
;
else {
warnForDeletedHydratableText(parentInstance, instance);
}
}
}
}
function didNotFindHydratableInstanceWithinContainer(parentContainer, type, props) {
{
warnForInsertedHydratedElement(parentContainer, type);
}
}
function didNotFindHydratableTextInstanceWithinContainer(parentContainer, text) {
{
warnForInsertedHydratedText(parentContainer, text);
}
}
function didNotFindHydratableInstanceWithinSuspenseInstance(parentInstance, type, props) {
{
var parentNode = parentInstance.parentNode;
if (parentNode !== null)
warnForInsertedHydratedElement(parentNode, type);
}
}
function didNotFindHydratableTextInstanceWithinSuspenseInstance(parentInstance, text) {
{
var parentNode = parentInstance.parentNode;
if (parentNode !== null)
warnForInsertedHydratedText(parentNode, text);
}
}
function didNotFindHydratableInstance(parentType, parentProps, parentInstance, type, props, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
warnForInsertedHydratedElement(parentInstance, type);
}
}
}
function didNotFindHydratableTextInstance(parentType, parentProps, parentInstance, text, isConcurrentMode) {
{
if (isConcurrentMode || parentProps[SUPPRESS_HYDRATION_WARNING$1] !== true) {
warnForInsertedHydratedText(parentInstance, text);
}
}
}
function errorHydratingContainer(parentContainer) {
{
error("An error occurred during hydration. The server HTML was replaced with client content in <%s>.", parentContainer.nodeName.toLowerCase());
}
}
function preparePortalMount(portalInstance) {
listenToAllSupportedEvents(portalInstance);
}
var randomKey = Math.random().toString(36).slice(2);
var internalInstanceKey = "__reactFiber$" + randomKey;
var internalPropsKey = "__reactProps$" + randomKey;
var internalContainerInstanceKey = "__reactContainer$" + randomKey;
var internalEventHandlersKey = "__reactEvents$" + randomKey;
var internalEventHandlerListenersKey = "__reactListeners$" + randomKey;
var internalEventHandlesSetKey = "__reactHandles$" + randomKey;
function detachDeletedInstance(node) {
delete node[internalInstanceKey];
delete node[internalPropsKey];
delete node[internalEventHandlersKey];
delete node[internalEventHandlerListenersKey];
delete node[internalEventHandlesSetKey];
}
function precacheFiberNode(hostInst, node) {
node[internalInstanceKey] = hostInst;
}
function markContainerAsRoot(hostRoot, node) {
node[internalContainerInstanceKey] = hostRoot;
}
function unmarkContainerAsRoot(node) {
node[internalContainerInstanceKey] = null;
}
function isContainerMarkedAsRoot(node) {
return !!node[internalContainerInstanceKey];
}
function getClosestInstanceFromNode(targetNode) {
var targetInst = targetNode[internalInstanceKey];
if (targetInst) {
return targetInst;
}
var parentNode = targetNode.parentNode;
while (parentNode) {
targetInst = parentNode[internalContainerInstanceKey] || parentNode[internalInstanceKey];
if (targetInst) {
var alternate = targetInst.alternate;
if (targetInst.child !== null || alternate !== null && alternate.child !== null) {
var suspenseInstance = getParentSuspenseInstance(targetNode);
while (suspenseInstance !== null) {
var targetSuspenseInst = suspenseInstance[internalInstanceKey];
if (targetSuspenseInst) {
return targetSuspenseInst;
}
suspenseInstance = getParentSuspenseInstance(suspenseInstance);
}
}
return targetInst;
}
targetNode = parentNode;
parentNode = targetNode.parentNode;
}
return null;
}
function getInstanceFromNode(node) {
var inst = node[internalInstanceKey] || node[internalContainerInstanceKey];
if (inst) {
if (inst.tag === HostComponent || inst.tag === HostText || inst.tag === SuspenseComponent || inst.tag === HostRoot) {
return inst;
} else {
return null;
}
}
return null;
}
function getNodeFromInstance(inst) {
if (inst.tag === HostComponent || inst.tag === HostText) {
return inst.stateNode;
}
throw new Error("getNodeFromInstance: Invalid argument.");
}
function getFiberCurrentPropsFromNode(node) {
return node[internalPropsKey] || null;
}
function updateFiberProps(node, props) {
node[internalPropsKey] = props;
}
function getEventListenerSet(node) {
var elementListenerSet = node[internalEventHandlersKey];
if (elementListenerSet === void 0) {
elementListenerSet = node[internalEventHandlersKey] = /* @__PURE__ */ new Set();
}
return elementListenerSet;
}
var loggedTypeFailures = {};
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
var has3 = Function.call.bind(hasOwnProperty2);
for (var typeSpecName in typeSpecs) {
if (has3(typeSpecs, typeSpecName)) {
var error$1 = void 0;
try {
if (typeof typeSpecs[typeSpecName] !== "function") {
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
err.name = "Invariant Violation";
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error("Failed %s type: %s", location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
var valueStack = [];
var fiberStack;
{
fiberStack = [];
}
var index = -1;
function createCursor(defaultValue2) {
return {
current: defaultValue2
};
}
function pop(cursor, fiber) {
if (index < 0) {
{
error("Unexpected pop.");
}
return;
}
{
if (fiber !== fiberStack[index]) {
error("Unexpected Fiber popped.");
}
}
cursor.current = valueStack[index];
valueStack[index] = null;
{
fiberStack[index] = null;
}
index--;
}
function push(cursor, value, fiber) {
index++;
valueStack[index] = cursor.current;
{
fiberStack[index] = fiber;
}
cursor.current = value;
}
var warnedAboutMissingGetChildContext;
{
warnedAboutMissingGetChildContext = {};
}
var emptyContextObject = {};
{
Object.freeze(emptyContextObject);
}
var contextStackCursor = createCursor(emptyContextObject);
var didPerformWorkStackCursor = createCursor(false);
var previousContext = emptyContextObject;
function getUnmaskedContext(workInProgress2, Component3, didPushOwnContextIfProvider) {
{
if (didPushOwnContextIfProvider && isContextProvider(Component3)) {
return previousContext;
}
return contextStackCursor.current;
}
}
function cacheContext(workInProgress2, unmaskedContext, maskedContext) {
{
var instance = workInProgress2.stateNode;
instance.__reactInternalMemoizedUnmaskedChildContext = unmaskedContext;
instance.__reactInternalMemoizedMaskedChildContext = maskedContext;
}
}
function getMaskedContext(workInProgress2, unmaskedContext) {
{
var type = workInProgress2.type;
var contextTypes = type.contextTypes;
if (!contextTypes) {
return emptyContextObject;
}
var instance = workInProgress2.stateNode;
if (instance && instance.__reactInternalMemoizedUnmaskedChildContext === unmaskedContext) {
return instance.__reactInternalMemoizedMaskedChildContext;
}
var context = {};
for (var key2 in contextTypes) {
context[key2] = unmaskedContext[key2];
}
{
var name = getComponentNameFromFiber(workInProgress2) || "Unknown";
checkPropTypes(contextTypes, context, "context", name);
}
if (instance) {
cacheContext(workInProgress2, unmaskedContext, context);
}
return context;
}
}
function hasContextChanged() {
{
return didPerformWorkStackCursor.current;
}
}
function isContextProvider(type) {
{
var childContextTypes = type.childContextTypes;
return childContextTypes !== null && childContextTypes !== void 0;
}
}
function popContext(fiber) {
{
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
}
function popTopLevelContextObject(fiber) {
{
pop(didPerformWorkStackCursor, fiber);
pop(contextStackCursor, fiber);
}
}
function pushTopLevelContextObject(fiber, context, didChange) {
{
if (contextStackCursor.current !== emptyContextObject) {
throw new Error("Unexpected context found on stack. This error is likely caused by a bug in React. Please file an issue.");
}
push(contextStackCursor, context, fiber);
push(didPerformWorkStackCursor, didChange, fiber);
}
}
function processChildContext(fiber, type, parentContext) {
{
var instance = fiber.stateNode;
var childContextTypes = type.childContextTypes;
if (typeof instance.getChildContext !== "function") {
{
var componentName = getComponentNameFromFiber(fiber) || "Unknown";
if (!warnedAboutMissingGetChildContext[componentName]) {
warnedAboutMissingGetChildContext[componentName] = true;
error("%s.childContextTypes is specified but there is no getChildContext() method on the instance. You can either define getChildContext() on %s or remove childContextTypes from it.", componentName, componentName);
}
}
return parentContext;
}
var childContext = instance.getChildContext();
for (var contextKey in childContext) {
if (!(contextKey in childContextTypes)) {
throw new Error((getComponentNameFromFiber(fiber) || "Unknown") + '.getChildContext(): key "' + contextKey + '" is not defined in childContextTypes.');
}
}
{
var name = getComponentNameFromFiber(fiber) || "Unknown";
checkPropTypes(childContextTypes, childContext, "child context", name);
}
return assign({}, parentContext, childContext);
}
}
function pushContextProvider(workInProgress2) {
{
var instance = workInProgress2.stateNode;
var memoizedMergedChildContext = instance && instance.__reactInternalMemoizedMergedChildContext || emptyContextObject;
previousContext = contextStackCursor.current;
push(contextStackCursor, memoizedMergedChildContext, workInProgress2);
push(didPerformWorkStackCursor, didPerformWorkStackCursor.current, workInProgress2);
return true;
}
}
function invalidateContextProvider(workInProgress2, type, didChange) {
{
var instance = workInProgress2.stateNode;
if (!instance) {
throw new Error("Expected to have an instance by this point. This error is likely caused by a bug in React. Please file an issue.");
}
if (didChange) {
var mergedContext = processChildContext(workInProgress2, type, previousContext);
instance.__reactInternalMemoizedMergedChildContext = mergedContext;
pop(didPerformWorkStackCursor, workInProgress2);
pop(contextStackCursor, workInProgress2);
push(contextStackCursor, mergedContext, workInProgress2);
push(didPerformWorkStackCursor, didChange, workInProgress2);
} else {
pop(didPerformWorkStackCursor, workInProgress2);
push(didPerformWorkStackCursor, didChange, workInProgress2);
}
}
}
function findCurrentUnmaskedContext(fiber) {
{
if (!isFiberMounted(fiber) || fiber.tag !== ClassComponent) {
throw new Error("Expected subtree parent to be a mounted class component. This error is likely caused by a bug in React. Please file an issue.");
}
var node = fiber;
do {
switch (node.tag) {
case HostRoot:
return node.stateNode.context;
case ClassComponent: {
var Component3 = node.type;
if (isContextProvider(Component3)) {
return node.stateNode.__reactInternalMemoizedMergedChildContext;
}
break;
}
}
node = node.return;
} while (node !== null);
throw new Error("Found unexpected detached subtree parent. This error is likely caused by a bug in React. Please file an issue.");
}
}
var LegacyRoot = 0;
var ConcurrentRoot = 1;
var syncQueue = null;
var includesLegacySyncCallbacks = false;
var isFlushingSyncQueue = false;
function scheduleSyncCallback(callback) {
if (syncQueue === null) {
syncQueue = [callback];
} else {
syncQueue.push(callback);
}
}
function scheduleLegacySyncCallback(callback) {
includesLegacySyncCallbacks = true;
scheduleSyncCallback(callback);
}
function flushSyncCallbacksOnlyInLegacyMode() {
if (includesLegacySyncCallbacks) {
flushSyncCallbacks();
}
}
function flushSyncCallbacks() {
if (!isFlushingSyncQueue && syncQueue !== null) {
isFlushingSyncQueue = true;
var i = 0;
var previousUpdatePriority = getCurrentUpdatePriority();
try {
var isSync = true;
var queue = syncQueue;
setCurrentUpdatePriority(DiscreteEventPriority);
for (; i < queue.length; i++) {
var callback = queue[i];
do {
callback = callback(isSync);
} while (callback !== null);
}
syncQueue = null;
includesLegacySyncCallbacks = false;
} catch (error2) {
if (syncQueue !== null) {
syncQueue = syncQueue.slice(i + 1);
}
scheduleCallback(ImmediatePriority, flushSyncCallbacks);
throw error2;
} finally {
setCurrentUpdatePriority(previousUpdatePriority);
isFlushingSyncQueue = false;
}
}
return null;
}
var forkStack = [];
var forkStackIndex = 0;
var treeForkProvider = null;
var treeForkCount = 0;
var idStack = [];
var idStackIndex = 0;
var treeContextProvider = null;
var treeContextId = 1;
var treeContextOverflow = "";
function isForkedChild(workInProgress2) {
warnIfNotHydrating();
return (workInProgress2.flags & Forked) !== NoFlags;
}
function getForksAtLevel(workInProgress2) {
warnIfNotHydrating();
return treeForkCount;
}
function getTreeId() {
var overflow = treeContextOverflow;
var idWithLeadingBit = treeContextId;
var id = idWithLeadingBit & ~getLeadingBit(idWithLeadingBit);
return id.toString(32) + overflow;
}
function pushTreeFork(workInProgress2, totalChildren) {
warnIfNotHydrating();
forkStack[forkStackIndex++] = treeForkCount;
forkStack[forkStackIndex++] = treeForkProvider;
treeForkProvider = workInProgress2;
treeForkCount = totalChildren;
}
function pushTreeId(workInProgress2, totalChildren, index2) {
warnIfNotHydrating();
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextProvider = workInProgress2;
var baseIdWithLeadingBit = treeContextId;
var baseOverflow = treeContextOverflow;
var baseLength = getBitLength(baseIdWithLeadingBit) - 1;
var baseId = baseIdWithLeadingBit & ~(1 << baseLength);
var slot = index2 + 1;
var length = getBitLength(totalChildren) + baseLength;
if (length > 30) {
var numberOfOverflowBits = baseLength - baseLength % 5;
var newOverflowBits = (1 << numberOfOverflowBits) - 1;
var newOverflow = (baseId & newOverflowBits).toString(32);
var restOfBaseId = baseId >> numberOfOverflowBits;
var restOfBaseLength = baseLength - numberOfOverflowBits;
var restOfLength = getBitLength(totalChildren) + restOfBaseLength;
var restOfNewBits = slot << restOfBaseLength;
var id = restOfNewBits | restOfBaseId;
var overflow = newOverflow + baseOverflow;
treeContextId = 1 << restOfLength | id;
treeContextOverflow = overflow;
} else {
var newBits = slot << baseLength;
var _id = newBits | baseId;
var _overflow = baseOverflow;
treeContextId = 1 << length | _id;
treeContextOverflow = _overflow;
}
}
function pushMaterializedTreeId(workInProgress2) {
warnIfNotHydrating();
var returnFiber = workInProgress2.return;
if (returnFiber !== null) {
var numberOfForks = 1;
var slotIndex = 0;
pushTreeFork(workInProgress2, numberOfForks);
pushTreeId(workInProgress2, numberOfForks, slotIndex);
}
}
function getBitLength(number) {
return 32 - clz32(number);
}
function getLeadingBit(id) {
return 1 << getBitLength(id) - 1;
}
function popTreeContext(workInProgress2) {
while (workInProgress2 === treeForkProvider) {
treeForkProvider = forkStack[--forkStackIndex];
forkStack[forkStackIndex] = null;
treeForkCount = forkStack[--forkStackIndex];
forkStack[forkStackIndex] = null;
}
while (workInProgress2 === treeContextProvider) {
treeContextProvider = idStack[--idStackIndex];
idStack[idStackIndex] = null;
treeContextOverflow = idStack[--idStackIndex];
idStack[idStackIndex] = null;
treeContextId = idStack[--idStackIndex];
idStack[idStackIndex] = null;
}
}
function getSuspendedTreeContext() {
warnIfNotHydrating();
if (treeContextProvider !== null) {
return {
id: treeContextId,
overflow: treeContextOverflow
};
} else {
return null;
}
}
function restoreSuspendedTreeContext(workInProgress2, suspendedContext) {
warnIfNotHydrating();
idStack[idStackIndex++] = treeContextId;
idStack[idStackIndex++] = treeContextOverflow;
idStack[idStackIndex++] = treeContextProvider;
treeContextId = suspendedContext.id;
treeContextOverflow = suspendedContext.overflow;
treeContextProvider = workInProgress2;
}
function warnIfNotHydrating() {
{
if (!getIsHydrating()) {
error("Expected to be hydrating. This is a bug in React. Please file an issue.");
}
}
}
var hydrationParentFiber = null;
var nextHydratableInstance = null;
var isHydrating = false;
var didSuspendOrErrorDEV = false;
var hydrationErrors = null;
function warnIfHydrating() {
{
if (isHydrating) {
error("We should not be hydrating here. This is a bug in React. Please file a bug.");
}
}
}
function markDidThrowWhileHydratingDEV() {
{
didSuspendOrErrorDEV = true;
}
}
function didSuspendOrErrorWhileHydratingDEV() {
{
return didSuspendOrErrorDEV;
}
}
function enterHydrationState(fiber) {
var parentInstance = fiber.stateNode.containerInfo;
nextHydratableInstance = getFirstHydratableChildWithinContainer(parentInstance);
hydrationParentFiber = fiber;
isHydrating = true;
hydrationErrors = null;
didSuspendOrErrorDEV = false;
return true;
}
function reenterHydrationStateFromDehydratedSuspenseInstance(fiber, suspenseInstance, treeContext) {
nextHydratableInstance = getFirstHydratableChildWithinSuspenseInstance(suspenseInstance);
hydrationParentFiber = fiber;
isHydrating = true;
hydrationErrors = null;
didSuspendOrErrorDEV = false;
if (treeContext !== null) {
restoreSuspendedTreeContext(fiber, treeContext);
}
return true;
}
function warnUnhydratedInstance(returnFiber, instance) {
{
switch (returnFiber.tag) {
case HostRoot: {
didNotHydrateInstanceWithinContainer(returnFiber.stateNode.containerInfo, instance);
break;
}
case HostComponent: {
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotHydrateInstance(
returnFiber.type,
returnFiber.memoizedProps,
returnFiber.stateNode,
instance,
// TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode
);
break;
}
case SuspenseComponent: {
var suspenseState = returnFiber.memoizedState;
if (suspenseState.dehydrated !== null)
didNotHydrateInstanceWithinSuspenseInstance(suspenseState.dehydrated, instance);
break;
}
}
}
}
function deleteHydratableInstance(returnFiber, instance) {
warnUnhydratedInstance(returnFiber, instance);
var childToDelete = createFiberFromHostInstanceForDeletion();
childToDelete.stateNode = instance;
childToDelete.return = returnFiber;
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [childToDelete];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(childToDelete);
}
}
function warnNonhydratedInstance(returnFiber, fiber) {
{
if (didSuspendOrErrorDEV) {
return;
}
switch (returnFiber.tag) {
case HostRoot: {
var parentContainer = returnFiber.stateNode.containerInfo;
switch (fiber.tag) {
case HostComponent:
var type = fiber.type;
var props = fiber.pendingProps;
didNotFindHydratableInstanceWithinContainer(parentContainer, type);
break;
case HostText:
var text = fiber.pendingProps;
didNotFindHydratableTextInstanceWithinContainer(parentContainer, text);
break;
}
break;
}
case HostComponent: {
var parentType = returnFiber.type;
var parentProps = returnFiber.memoizedProps;
var parentInstance = returnFiber.stateNode;
switch (fiber.tag) {
case HostComponent: {
var _type = fiber.type;
var _props = fiber.pendingProps;
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotFindHydratableInstance(
parentType,
parentProps,
parentInstance,
_type,
_props,
// TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode
);
break;
}
case HostText: {
var _text = fiber.pendingProps;
var _isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotFindHydratableTextInstance(
parentType,
parentProps,
parentInstance,
_text,
// TODO: Delete this argument when we remove the legacy root API.
_isConcurrentMode
);
break;
}
}
break;
}
case SuspenseComponent: {
var suspenseState = returnFiber.memoizedState;
var _parentInstance = suspenseState.dehydrated;
if (_parentInstance !== null)
switch (fiber.tag) {
case HostComponent:
var _type2 = fiber.type;
var _props2 = fiber.pendingProps;
didNotFindHydratableInstanceWithinSuspenseInstance(_parentInstance, _type2);
break;
case HostText:
var _text2 = fiber.pendingProps;
didNotFindHydratableTextInstanceWithinSuspenseInstance(_parentInstance, _text2);
break;
}
break;
}
default:
return;
}
}
}
function insertNonHydratedInstance(returnFiber, fiber) {
fiber.flags = fiber.flags & ~Hydrating | Placement;
warnNonhydratedInstance(returnFiber, fiber);
}
function tryHydrate(fiber, nextInstance) {
switch (fiber.tag) {
case HostComponent: {
var type = fiber.type;
var props = fiber.pendingProps;
var instance = canHydrateInstance(nextInstance, type);
if (instance !== null) {
fiber.stateNode = instance;
hydrationParentFiber = fiber;
nextHydratableInstance = getFirstHydratableChild(instance);
return true;
}
return false;
}
case HostText: {
var text = fiber.pendingProps;
var textInstance = canHydrateTextInstance(nextInstance, text);
if (textInstance !== null) {
fiber.stateNode = textInstance;
hydrationParentFiber = fiber;
nextHydratableInstance = null;
return true;
}
return false;
}
case SuspenseComponent: {
var suspenseInstance = canHydrateSuspenseInstance(nextInstance);
if (suspenseInstance !== null) {
var suspenseState = {
dehydrated: suspenseInstance,
treeContext: getSuspendedTreeContext(),
retryLane: OffscreenLane
};
fiber.memoizedState = suspenseState;
var dehydratedFragment = createFiberFromDehydratedFragment(suspenseInstance);
dehydratedFragment.return = fiber;
fiber.child = dehydratedFragment;
hydrationParentFiber = fiber;
nextHydratableInstance = null;
return true;
}
return false;
}
default:
return false;
}
}
function shouldClientRenderOnMismatch(fiber) {
return (fiber.mode & ConcurrentMode) !== NoMode && (fiber.flags & DidCapture) === NoFlags;
}
function throwOnHydrationMismatch(fiber) {
throw new Error("Hydration failed because the initial UI does not match what was rendered on the server.");
}
function tryToClaimNextHydratableInstance(fiber) {
if (!isHydrating) {
return;
}
var nextInstance = nextHydratableInstance;
if (!nextInstance) {
if (shouldClientRenderOnMismatch(fiber)) {
warnNonhydratedInstance(hydrationParentFiber, fiber);
throwOnHydrationMismatch();
}
insertNonHydratedInstance(hydrationParentFiber, fiber);
isHydrating = false;
hydrationParentFiber = fiber;
return;
}
var firstAttemptedInstance = nextInstance;
if (!tryHydrate(fiber, nextInstance)) {
if (shouldClientRenderOnMismatch(fiber)) {
warnNonhydratedInstance(hydrationParentFiber, fiber);
throwOnHydrationMismatch();
}
nextInstance = getNextHydratableSibling(firstAttemptedInstance);
var prevHydrationParentFiber = hydrationParentFiber;
if (!nextInstance || !tryHydrate(fiber, nextInstance)) {
insertNonHydratedInstance(hydrationParentFiber, fiber);
isHydrating = false;
hydrationParentFiber = fiber;
return;
}
deleteHydratableInstance(prevHydrationParentFiber, firstAttemptedInstance);
}
}
function prepareToHydrateHostInstance(fiber, rootContainerInstance, hostContext) {
var instance = fiber.stateNode;
var shouldWarnIfMismatchDev = !didSuspendOrErrorDEV;
var updatePayload = hydrateInstance(instance, fiber.type, fiber.memoizedProps, rootContainerInstance, hostContext, fiber, shouldWarnIfMismatchDev);
fiber.updateQueue = updatePayload;
if (updatePayload !== null) {
return true;
}
return false;
}
function prepareToHydrateHostTextInstance(fiber) {
var textInstance = fiber.stateNode;
var textContent = fiber.memoizedProps;
var shouldUpdate = hydrateTextInstance(textInstance, textContent, fiber);
if (shouldUpdate) {
var returnFiber = hydrationParentFiber;
if (returnFiber !== null) {
switch (returnFiber.tag) {
case HostRoot: {
var parentContainer = returnFiber.stateNode.containerInfo;
var isConcurrentMode = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotMatchHydratedContainerTextInstance(
parentContainer,
textInstance,
textContent,
// TODO: Delete this argument when we remove the legacy root API.
isConcurrentMode
);
break;
}
case HostComponent: {
var parentType = returnFiber.type;
var parentProps = returnFiber.memoizedProps;
var parentInstance = returnFiber.stateNode;
var _isConcurrentMode2 = (returnFiber.mode & ConcurrentMode) !== NoMode;
didNotMatchHydratedTextInstance(
parentType,
parentProps,
parentInstance,
textInstance,
textContent,
// TODO: Delete this argument when we remove the legacy root API.
_isConcurrentMode2
);
break;
}
}
}
}
return shouldUpdate;
}
function prepareToHydrateHostSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
}
hydrateSuspenseInstance(suspenseInstance, fiber);
}
function skipPastDehydratedSuspenseInstance(fiber) {
var suspenseState = fiber.memoizedState;
var suspenseInstance = suspenseState !== null ? suspenseState.dehydrated : null;
if (!suspenseInstance) {
throw new Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");
}
return getNextHydratableInstanceAfterSuspenseInstance(suspenseInstance);
}
function popToNextHostParent(fiber) {
var parent = fiber.return;
while (parent !== null && parent.tag !== HostComponent && parent.tag !== HostRoot && parent.tag !== SuspenseComponent) {
parent = parent.return;
}
hydrationParentFiber = parent;
}
function popHydrationState(fiber) {
if (fiber !== hydrationParentFiber) {
return false;
}
if (!isHydrating) {
popToNextHostParent(fiber);
isHydrating = true;
return false;
}
if (fiber.tag !== HostRoot && (fiber.tag !== HostComponent || shouldDeleteUnhydratedTailInstances(fiber.type) && !shouldSetTextContent(fiber.type, fiber.memoizedProps))) {
var nextInstance = nextHydratableInstance;
if (nextInstance) {
if (shouldClientRenderOnMismatch(fiber)) {
warnIfUnhydratedTailNodes(fiber);
throwOnHydrationMismatch();
} else {
while (nextInstance) {
deleteHydratableInstance(fiber, nextInstance);
nextInstance = getNextHydratableSibling(nextInstance);
}
}
}
}
popToNextHostParent(fiber);
if (fiber.tag === SuspenseComponent) {
nextHydratableInstance = skipPastDehydratedSuspenseInstance(fiber);
} else {
nextHydratableInstance = hydrationParentFiber ? getNextHydratableSibling(fiber.stateNode) : null;
}
return true;
}
function hasUnhydratedTailNodes() {
return isHydrating && nextHydratableInstance !== null;
}
function warnIfUnhydratedTailNodes(fiber) {
var nextInstance = nextHydratableInstance;
while (nextInstance) {
warnUnhydratedInstance(fiber, nextInstance);
nextInstance = getNextHydratableSibling(nextInstance);
}
}
function resetHydrationState() {
hydrationParentFiber = null;
nextHydratableInstance = null;
isHydrating = false;
didSuspendOrErrorDEV = false;
}
function upgradeHydrationErrorsToRecoverable() {
if (hydrationErrors !== null) {
queueRecoverableErrors(hydrationErrors);
hydrationErrors = null;
}
}
function getIsHydrating() {
return isHydrating;
}
function queueHydrationError(error2) {
if (hydrationErrors === null) {
hydrationErrors = [error2];
} else {
hydrationErrors.push(error2);
}
}
var ReactCurrentBatchConfig$1 = ReactSharedInternals.ReactCurrentBatchConfig;
var NoTransition = null;
function requestCurrentTransition() {
return ReactCurrentBatchConfig$1.transition;
}
var ReactStrictModeWarnings = {
recordUnsafeLifecycleWarnings: function(fiber, instance) {
},
flushPendingUnsafeLifecycleWarnings: function() {
},
recordLegacyContextWarning: function(fiber, instance) {
},
flushLegacyContextWarning: function() {
},
discardPendingWarnings: function() {
}
};
{
var findStrictRoot = function(fiber) {
var maybeStrictRoot = null;
var node = fiber;
while (node !== null) {
if (node.mode & StrictLegacyMode) {
maybeStrictRoot = node;
}
node = node.return;
}
return maybeStrictRoot;
};
var setToSortedString = function(set3) {
var array = [];
set3.forEach(function(value) {
array.push(value);
});
return array.sort().join(", ");
};
var pendingComponentWillMountWarnings = [];
var pendingUNSAFE_ComponentWillMountWarnings = [];
var pendingComponentWillReceivePropsWarnings = [];
var pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
var pendingComponentWillUpdateWarnings = [];
var pendingUNSAFE_ComponentWillUpdateWarnings = [];
var didWarnAboutUnsafeLifecycles = /* @__PURE__ */ new Set();
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings = function(fiber, instance) {
if (didWarnAboutUnsafeLifecycles.has(fiber.type)) {
return;
}
if (typeof instance.componentWillMount === "function" && // Don't warn about react-lifecycles-compat polyfilled components.
instance.componentWillMount.__suppressDeprecationWarning !== true) {
pendingComponentWillMountWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillMount === "function") {
pendingUNSAFE_ComponentWillMountWarnings.push(fiber);
}
if (typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
pendingComponentWillReceivePropsWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillReceiveProps === "function") {
pendingUNSAFE_ComponentWillReceivePropsWarnings.push(fiber);
}
if (typeof instance.componentWillUpdate === "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
pendingComponentWillUpdateWarnings.push(fiber);
}
if (fiber.mode & StrictLegacyMode && typeof instance.UNSAFE_componentWillUpdate === "function") {
pendingUNSAFE_ComponentWillUpdateWarnings.push(fiber);
}
};
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings = function() {
var componentWillMountUniqueNames = /* @__PURE__ */ new Set();
if (pendingComponentWillMountWarnings.length > 0) {
pendingComponentWillMountWarnings.forEach(function(fiber) {
componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillMountWarnings = [];
}
var UNSAFE_componentWillMountUniqueNames = /* @__PURE__ */ new Set();
if (pendingUNSAFE_ComponentWillMountWarnings.length > 0) {
pendingUNSAFE_ComponentWillMountWarnings.forEach(function(fiber) {
UNSAFE_componentWillMountUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillMountWarnings = [];
}
var componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
if (pendingComponentWillReceivePropsWarnings.length > 0) {
pendingComponentWillReceivePropsWarnings.forEach(function(fiber) {
componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillReceivePropsWarnings = [];
}
var UNSAFE_componentWillReceivePropsUniqueNames = /* @__PURE__ */ new Set();
if (pendingUNSAFE_ComponentWillReceivePropsWarnings.length > 0) {
pendingUNSAFE_ComponentWillReceivePropsWarnings.forEach(function(fiber) {
UNSAFE_componentWillReceivePropsUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
}
var componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
if (pendingComponentWillUpdateWarnings.length > 0) {
pendingComponentWillUpdateWarnings.forEach(function(fiber) {
componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingComponentWillUpdateWarnings = [];
}
var UNSAFE_componentWillUpdateUniqueNames = /* @__PURE__ */ new Set();
if (pendingUNSAFE_ComponentWillUpdateWarnings.length > 0) {
pendingUNSAFE_ComponentWillUpdateWarnings.forEach(function(fiber) {
UNSAFE_componentWillUpdateUniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutUnsafeLifecycles.add(fiber.type);
});
pendingUNSAFE_ComponentWillUpdateWarnings = [];
}
if (UNSAFE_componentWillMountUniqueNames.size > 0) {
var sortedNames = setToSortedString(UNSAFE_componentWillMountUniqueNames);
error("Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n\nPlease update the following components: %s", sortedNames);
}
if (UNSAFE_componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames = setToSortedString(UNSAFE_componentWillReceivePropsUniqueNames);
error("Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\nPlease update the following components: %s", _sortedNames);
}
if (UNSAFE_componentWillUpdateUniqueNames.size > 0) {
var _sortedNames2 = setToSortedString(UNSAFE_componentWillUpdateUniqueNames);
error("Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n\nPlease update the following components: %s", _sortedNames2);
}
if (componentWillMountUniqueNames.size > 0) {
var _sortedNames3 = setToSortedString(componentWillMountUniqueNames);
warn("componentWillMount has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side effects to componentDidMount, and set initial state in the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames3);
}
if (componentWillReceivePropsUniqueNames.size > 0) {
var _sortedNames4 = setToSortedString(componentWillReceivePropsUniqueNames);
warn("componentWillReceiveProps has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames4);
}
if (componentWillUpdateUniqueNames.size > 0) {
var _sortedNames5 = setToSortedString(componentWillUpdateUniqueNames);
warn("componentWillUpdate has been renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following components: %s", _sortedNames5);
}
};
var pendingLegacyContextWarning = /* @__PURE__ */ new Map();
var didWarnAboutLegacyContext = /* @__PURE__ */ new Set();
ReactStrictModeWarnings.recordLegacyContextWarning = function(fiber, instance) {
var strictRoot = findStrictRoot(fiber);
if (strictRoot === null) {
error("Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.");
return;
}
if (didWarnAboutLegacyContext.has(fiber.type)) {
return;
}
var warningsForRoot = pendingLegacyContextWarning.get(strictRoot);
if (fiber.type.contextTypes != null || fiber.type.childContextTypes != null || instance !== null && typeof instance.getChildContext === "function") {
if (warningsForRoot === void 0) {
warningsForRoot = [];
pendingLegacyContextWarning.set(strictRoot, warningsForRoot);
}
warningsForRoot.push(fiber);
}
};
ReactStrictModeWarnings.flushLegacyContextWarning = function() {
pendingLegacyContextWarning.forEach(function(fiberArray, strictRoot) {
if (fiberArray.length === 0) {
return;
}
var firstFiber = fiberArray[0];
var uniqueNames = /* @__PURE__ */ new Set();
fiberArray.forEach(function(fiber) {
uniqueNames.add(getComponentNameFromFiber(fiber) || "Component");
didWarnAboutLegacyContext.add(fiber.type);
});
var sortedNames = setToSortedString(uniqueNames);
try {
setCurrentFiber(firstFiber);
error("Legacy context API has been detected within a strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications using it should migrate to the new version.\n\nPlease update the following components: %s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", sortedNames);
} finally {
resetCurrentFiber();
}
});
};
ReactStrictModeWarnings.discardPendingWarnings = function() {
pendingComponentWillMountWarnings = [];
pendingUNSAFE_ComponentWillMountWarnings = [];
pendingComponentWillReceivePropsWarnings = [];
pendingUNSAFE_ComponentWillReceivePropsWarnings = [];
pendingComponentWillUpdateWarnings = [];
pendingUNSAFE_ComponentWillUpdateWarnings = [];
pendingLegacyContextWarning = /* @__PURE__ */ new Map();
};
}
var didWarnAboutMaps;
var didWarnAboutGenerators;
var didWarnAboutStringRefs;
var ownerHasKeyUseWarning;
var ownerHasFunctionTypeWarning;
var warnForMissingKey = function(child, returnFiber) {
};
{
didWarnAboutMaps = false;
didWarnAboutGenerators = false;
didWarnAboutStringRefs = {};
ownerHasKeyUseWarning = {};
ownerHasFunctionTypeWarning = {};
warnForMissingKey = function(child, returnFiber) {
if (child === null || typeof child !== "object") {
return;
}
if (!child._store || child._store.validated || child.key != null) {
return;
}
if (typeof child._store !== "object") {
throw new Error("React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.");
}
child._store.validated = true;
var componentName = getComponentNameFromFiber(returnFiber) || "Component";
if (ownerHasKeyUseWarning[componentName]) {
return;
}
ownerHasKeyUseWarning[componentName] = true;
error('Each child in a list should have a unique "key" prop. See https://reactjs.org/link/warning-keys for more information.');
};
}
function isReactClass(type) {
return type.prototype && type.prototype.isReactComponent;
}
function coerceRef(returnFiber, current3, element) {
var mixedRef = element.ref;
if (mixedRef !== null && typeof mixedRef !== "function" && typeof mixedRef !== "object") {
{
if ((returnFiber.mode & StrictLegacyMode || warnAboutStringRefs) && // We warn in ReactElement.js if owner and self are equal for string refs
// because these cannot be automatically converted to an arrow function
// using a codemod. Therefore, we don't have to warn about string refs again.
!(element._owner && element._self && element._owner.stateNode !== element._self) && // Will already throw with "Function components cannot have string refs"
!(element._owner && element._owner.tag !== ClassComponent) && // Will already warn with "Function components cannot be given refs"
!(typeof element.type === "function" && !isReactClass(element.type)) && // Will already throw with "Element ref was specified as a string (someStringRef) but no owner was set"
element._owner) {
var componentName = getComponentNameFromFiber(returnFiber) || "Component";
if (!didWarnAboutStringRefs[componentName]) {
{
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. We recommend using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', componentName, mixedRef);
}
didWarnAboutStringRefs[componentName] = true;
}
}
}
if (element._owner) {
var owner = element._owner;
var inst;
if (owner) {
var ownerFiber = owner;
if (ownerFiber.tag !== ClassComponent) {
throw new Error("Function components cannot have string refs. We recommend using useRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref");
}
inst = ownerFiber.stateNode;
}
if (!inst) {
throw new Error("Missing owner for string ref " + mixedRef + ". This error is likely caused by a bug in React. Please file an issue.");
}
var resolvedInst = inst;
{
checkPropStringCoercion(mixedRef, "ref");
}
var stringRef = "" + mixedRef;
if (current3 !== null && current3.ref !== null && typeof current3.ref === "function" && current3.ref._stringRef === stringRef) {
return current3.ref;
}
var ref = function(value) {
var refs = resolvedInst.refs;
if (value === null) {
delete refs[stringRef];
} else {
refs[stringRef] = value;
}
};
ref._stringRef = stringRef;
return ref;
} else {
if (typeof mixedRef !== "string") {
throw new Error("Expected ref to be a function, a string, an object returned by React.createRef(), or null.");
}
if (!element._owner) {
throw new Error("Element ref was specified as a string (" + mixedRef + ") but no owner was set. This could happen for one of the following reasons:\n1. You may be adding a ref to a function component\n2. You may be adding a ref to a component that was not created inside a component's render method\n3. You have multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for more information.");
}
}
}
return mixedRef;
}
function throwOnInvalidObjectType(returnFiber, newChild) {
var childString = Object.prototype.toString.call(newChild);
throw new Error("Objects are not valid as a React child (found: " + (childString === "[object Object]" ? "object with keys {" + Object.keys(newChild).join(", ") + "}" : childString) + "). If you meant to render a collection of children, use an array instead.");
}
function warnOnFunctionType(returnFiber) {
{
var componentName = getComponentNameFromFiber(returnFiber) || "Component";
if (ownerHasFunctionTypeWarning[componentName]) {
return;
}
ownerHasFunctionTypeWarning[componentName] = true;
error("Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.");
}
}
function resolveLazy(lazyType) {
var payload = lazyType._payload;
var init = lazyType._init;
return init(payload);
}
function ChildReconciler(shouldTrackSideEffects) {
function deleteChild(returnFiber, childToDelete) {
if (!shouldTrackSideEffects) {
return;
}
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [childToDelete];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(childToDelete);
}
}
function deleteRemainingChildren(returnFiber, currentFirstChild) {
if (!shouldTrackSideEffects) {
return null;
}
var childToDelete = currentFirstChild;
while (childToDelete !== null) {
deleteChild(returnFiber, childToDelete);
childToDelete = childToDelete.sibling;
}
return null;
}
function mapRemainingChildren(returnFiber, currentFirstChild) {
var existingChildren = /* @__PURE__ */ new Map();
var existingChild = currentFirstChild;
while (existingChild !== null) {
if (existingChild.key !== null) {
existingChildren.set(existingChild.key, existingChild);
} else {
existingChildren.set(existingChild.index, existingChild);
}
existingChild = existingChild.sibling;
}
return existingChildren;
}
function useFiber(fiber, pendingProps) {
var clone3 = createWorkInProgress(fiber, pendingProps);
clone3.index = 0;
clone3.sibling = null;
return clone3;
}
function placeChild(newFiber, lastPlacedIndex, newIndex) {
newFiber.index = newIndex;
if (!shouldTrackSideEffects) {
newFiber.flags |= Forked;
return lastPlacedIndex;
}
var current3 = newFiber.alternate;
if (current3 !== null) {
var oldIndex = current3.index;
if (oldIndex < lastPlacedIndex) {
newFiber.flags |= Placement;
return lastPlacedIndex;
} else {
return oldIndex;
}
} else {
newFiber.flags |= Placement;
return lastPlacedIndex;
}
}
function placeSingleChild(newFiber) {
if (shouldTrackSideEffects && newFiber.alternate === null) {
newFiber.flags |= Placement;
}
return newFiber;
}
function updateTextNode(returnFiber, current3, textContent, lanes) {
if (current3 === null || current3.tag !== HostText) {
var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
var existing = useFiber(current3, textContent);
existing.return = returnFiber;
return existing;
}
}
function updateElement(returnFiber, current3, element, lanes) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE) {
return updateFragment2(returnFiber, current3, element.props.children, lanes, element.key);
}
if (current3 !== null) {
if (current3.elementType === elementType || // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(current3, element) || // Lazy types should reconcile their resolved type.
// We need to do this after the Hot Reloading check above,
// because hot reloading has different semantics than prod because
// it doesn't resuspend. So we can't let the call below suspend.
typeof elementType === "object" && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === current3.type) {
var existing = useFiber(current3, element.props);
existing.ref = coerceRef(returnFiber, current3, element);
existing.return = returnFiber;
{
existing._debugSource = element._source;
existing._debugOwner = element._owner;
}
return existing;
}
}
var created = createFiberFromElement(element, returnFiber.mode, lanes);
created.ref = coerceRef(returnFiber, current3, element);
created.return = returnFiber;
return created;
}
function updatePortal(returnFiber, current3, portal, lanes) {
if (current3 === null || current3.tag !== HostPortal || current3.stateNode.containerInfo !== portal.containerInfo || current3.stateNode.implementation !== portal.implementation) {
var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
} else {
var existing = useFiber(current3, portal.children || []);
existing.return = returnFiber;
return existing;
}
}
function updateFragment2(returnFiber, current3, fragment, lanes, key2) {
if (current3 === null || current3.tag !== Fragment9) {
var created = createFiberFromFragment(fragment, returnFiber.mode, lanes, key2);
created.return = returnFiber;
return created;
} else {
var existing = useFiber(current3, fragment);
existing.return = returnFiber;
return existing;
}
}
function createChild(returnFiber, newChild, lanes) {
if (typeof newChild === "string" && newChild !== "" || typeof newChild === "number") {
var created = createFiberFromText("" + newChild, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE: {
var _created = createFiberFromElement(newChild, returnFiber.mode, lanes);
_created.ref = coerceRef(returnFiber, null, newChild);
_created.return = returnFiber;
return _created;
}
case REACT_PORTAL_TYPE: {
var _created2 = createFiberFromPortal(newChild, returnFiber.mode, lanes);
_created2.return = returnFiber;
return _created2;
}
case REACT_LAZY_TYPE: {
var payload = newChild._payload;
var init = newChild._init;
return createChild(returnFiber, init(payload), lanes);
}
}
if (isArray(newChild) || getIteratorFn(newChild)) {
var _created3 = createFiberFromFragment(newChild, returnFiber.mode, lanes, null);
_created3.return = returnFiber;
return _created3;
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
}
}
return null;
}
function updateSlot(returnFiber, oldFiber, newChild, lanes) {
var key2 = oldFiber !== null ? oldFiber.key : null;
if (typeof newChild === "string" && newChild !== "" || typeof newChild === "number") {
if (key2 !== null) {
return null;
}
return updateTextNode(returnFiber, oldFiber, "" + newChild, lanes);
}
if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE: {
if (newChild.key === key2) {
return updateElement(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
}
case REACT_PORTAL_TYPE: {
if (newChild.key === key2) {
return updatePortal(returnFiber, oldFiber, newChild, lanes);
} else {
return null;
}
}
case REACT_LAZY_TYPE: {
var payload = newChild._payload;
var init = newChild._init;
return updateSlot(returnFiber, oldFiber, init(payload), lanes);
}
}
if (isArray(newChild) || getIteratorFn(newChild)) {
if (key2 !== null) {
return null;
}
return updateFragment2(returnFiber, oldFiber, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
}
}
return null;
}
function updateFromMap(existingChildren, returnFiber, newIdx, newChild, lanes) {
if (typeof newChild === "string" && newChild !== "" || typeof newChild === "number") {
var matchedFiber = existingChildren.get(newIdx) || null;
return updateTextNode(returnFiber, matchedFiber, "" + newChild, lanes);
}
if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE: {
var _matchedFiber = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
return updateElement(returnFiber, _matchedFiber, newChild, lanes);
}
case REACT_PORTAL_TYPE: {
var _matchedFiber2 = existingChildren.get(newChild.key === null ? newIdx : newChild.key) || null;
return updatePortal(returnFiber, _matchedFiber2, newChild, lanes);
}
case REACT_LAZY_TYPE:
var payload = newChild._payload;
var init = newChild._init;
return updateFromMap(existingChildren, returnFiber, newIdx, init(payload), lanes);
}
if (isArray(newChild) || getIteratorFn(newChild)) {
var _matchedFiber3 = existingChildren.get(newIdx) || null;
return updateFragment2(returnFiber, _matchedFiber3, newChild, lanes, null);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
}
}
return null;
}
function warnOnInvalidKey(child, knownKeys, returnFiber) {
{
if (typeof child !== "object" || child === null) {
return knownKeys;
}
switch (child.$$typeof) {
case REACT_ELEMENT_TYPE:
case REACT_PORTAL_TYPE:
warnForMissingKey(child, returnFiber);
var key2 = child.key;
if (typeof key2 !== "string") {
break;
}
if (knownKeys === null) {
knownKeys = /* @__PURE__ */ new Set();
knownKeys.add(key2);
break;
}
if (!knownKeys.has(key2)) {
knownKeys.add(key2);
break;
}
error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is unsupported and could change in a future version.", key2);
break;
case REACT_LAZY_TYPE:
var payload = child._payload;
var init = child._init;
warnOnInvalidKey(init(payload), knownKeys, returnFiber);
break;
}
}
return knownKeys;
}
function reconcileChildrenArray(returnFiber, currentFirstChild, newChildren, lanes) {
{
var knownKeys = null;
for (var i = 0; i < newChildren.length; i++) {
var child = newChildren[i];
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
var resultingFirstChild = null;
var previousNewFiber = null;
var oldFiber = currentFirstChild;
var lastPlacedIndex = 0;
var newIdx = 0;
var nextOldFiber = null;
for (; oldFiber !== null && newIdx < newChildren.length; newIdx++) {
if (oldFiber.index > newIdx) {
nextOldFiber = oldFiber;
oldFiber = null;
} else {
nextOldFiber = oldFiber.sibling;
}
var newFiber = updateSlot(returnFiber, oldFiber, newChildren[newIdx], lanes);
if (newFiber === null) {
if (oldFiber === null) {
oldFiber = nextOldFiber;
}
break;
}
if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
deleteChild(returnFiber, oldFiber);
}
}
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = newFiber;
} else {
previousNewFiber.sibling = newFiber;
}
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (newIdx === newChildren.length) {
deleteRemainingChildren(returnFiber, oldFiber);
if (getIsHydrating()) {
var numberOfForks = newIdx;
pushTreeFork(returnFiber, numberOfForks);
}
return resultingFirstChild;
}
if (oldFiber === null) {
for (; newIdx < newChildren.length; newIdx++) {
var _newFiber = createChild(returnFiber, newChildren[newIdx], lanes);
if (_newFiber === null) {
continue;
}
lastPlacedIndex = placeChild(_newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber;
} else {
previousNewFiber.sibling = _newFiber;
}
previousNewFiber = _newFiber;
}
if (getIsHydrating()) {
var _numberOfForks = newIdx;
pushTreeFork(returnFiber, _numberOfForks);
}
return resultingFirstChild;
}
var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
for (; newIdx < newChildren.length; newIdx++) {
var _newFiber2 = updateFromMap(existingChildren, returnFiber, newIdx, newChildren[newIdx], lanes);
if (_newFiber2 !== null) {
if (shouldTrackSideEffects) {
if (_newFiber2.alternate !== null) {
existingChildren.delete(_newFiber2.key === null ? newIdx : _newFiber2.key);
}
}
lastPlacedIndex = placeChild(_newFiber2, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber2;
} else {
previousNewFiber.sibling = _newFiber2;
}
previousNewFiber = _newFiber2;
}
}
if (shouldTrackSideEffects) {
existingChildren.forEach(function(child2) {
return deleteChild(returnFiber, child2);
});
}
if (getIsHydrating()) {
var _numberOfForks2 = newIdx;
pushTreeFork(returnFiber, _numberOfForks2);
}
return resultingFirstChild;
}
function reconcileChildrenIterator(returnFiber, currentFirstChild, newChildrenIterable, lanes) {
var iteratorFn = getIteratorFn(newChildrenIterable);
if (typeof iteratorFn !== "function") {
throw new Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");
}
{
if (typeof Symbol === "function" && // $FlowFixMe Flow doesn't know about toStringTag
newChildrenIterable[Symbol.toStringTag] === "Generator") {
if (!didWarnAboutGenerators) {
error("Using Generators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. Keep in mind you might need to polyfill these features for older browsers.");
}
didWarnAboutGenerators = true;
}
if (newChildrenIterable.entries === iteratorFn) {
if (!didWarnAboutMaps) {
error("Using Maps as children is not supported. Use an array of keyed ReactElements instead.");
}
didWarnAboutMaps = true;
}
var _newChildren = iteratorFn.call(newChildrenIterable);
if (_newChildren) {
var knownKeys = null;
var _step = _newChildren.next();
for (; !_step.done; _step = _newChildren.next()) {
var child = _step.value;
knownKeys = warnOnInvalidKey(child, knownKeys, returnFiber);
}
}
}
var newChildren = iteratorFn.call(newChildrenIterable);
if (newChildren == null) {
throw new Error("An iterable object provided no iterator.");
}
var resultingFirstChild = null;
var previousNewFiber = null;
var oldFiber = currentFirstChild;
var lastPlacedIndex = 0;
var newIdx = 0;
var nextOldFiber = null;
var step = newChildren.next();
for (; oldFiber !== null && !step.done; newIdx++, step = newChildren.next()) {
if (oldFiber.index > newIdx) {
nextOldFiber = oldFiber;
oldFiber = null;
} else {
nextOldFiber = oldFiber.sibling;
}
var newFiber = updateSlot(returnFiber, oldFiber, step.value, lanes);
if (newFiber === null) {
if (oldFiber === null) {
oldFiber = nextOldFiber;
}
break;
}
if (shouldTrackSideEffects) {
if (oldFiber && newFiber.alternate === null) {
deleteChild(returnFiber, oldFiber);
}
}
lastPlacedIndex = placeChild(newFiber, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = newFiber;
} else {
previousNewFiber.sibling = newFiber;
}
previousNewFiber = newFiber;
oldFiber = nextOldFiber;
}
if (step.done) {
deleteRemainingChildren(returnFiber, oldFiber);
if (getIsHydrating()) {
var numberOfForks = newIdx;
pushTreeFork(returnFiber, numberOfForks);
}
return resultingFirstChild;
}
if (oldFiber === null) {
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber3 = createChild(returnFiber, step.value, lanes);
if (_newFiber3 === null) {
continue;
}
lastPlacedIndex = placeChild(_newFiber3, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber3;
} else {
previousNewFiber.sibling = _newFiber3;
}
previousNewFiber = _newFiber3;
}
if (getIsHydrating()) {
var _numberOfForks3 = newIdx;
pushTreeFork(returnFiber, _numberOfForks3);
}
return resultingFirstChild;
}
var existingChildren = mapRemainingChildren(returnFiber, oldFiber);
for (; !step.done; newIdx++, step = newChildren.next()) {
var _newFiber4 = updateFromMap(existingChildren, returnFiber, newIdx, step.value, lanes);
if (_newFiber4 !== null) {
if (shouldTrackSideEffects) {
if (_newFiber4.alternate !== null) {
existingChildren.delete(_newFiber4.key === null ? newIdx : _newFiber4.key);
}
}
lastPlacedIndex = placeChild(_newFiber4, lastPlacedIndex, newIdx);
if (previousNewFiber === null) {
resultingFirstChild = _newFiber4;
} else {
previousNewFiber.sibling = _newFiber4;
}
previousNewFiber = _newFiber4;
}
}
if (shouldTrackSideEffects) {
existingChildren.forEach(function(child2) {
return deleteChild(returnFiber, child2);
});
}
if (getIsHydrating()) {
var _numberOfForks4 = newIdx;
pushTreeFork(returnFiber, _numberOfForks4);
}
return resultingFirstChild;
}
function reconcileSingleTextNode(returnFiber, currentFirstChild, textContent, lanes) {
if (currentFirstChild !== null && currentFirstChild.tag === HostText) {
deleteRemainingChildren(returnFiber, currentFirstChild.sibling);
var existing = useFiber(currentFirstChild, textContent);
existing.return = returnFiber;
return existing;
}
deleteRemainingChildren(returnFiber, currentFirstChild);
var created = createFiberFromText(textContent, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
function reconcileSingleElement(returnFiber, currentFirstChild, element, lanes) {
var key2 = element.key;
var child = currentFirstChild;
while (child !== null) {
if (child.key === key2) {
var elementType = element.type;
if (elementType === REACT_FRAGMENT_TYPE) {
if (child.tag === Fragment9) {
deleteRemainingChildren(returnFiber, child.sibling);
var existing = useFiber(child, element.props.children);
existing.return = returnFiber;
{
existing._debugSource = element._source;
existing._debugOwner = element._owner;
}
return existing;
}
} else {
if (child.elementType === elementType || // Keep this check inline so it only runs on the false path:
isCompatibleFamilyForHotReloading(child, element) || // Lazy types should reconcile their resolved type.
// We need to do this after the Hot Reloading check above,
// because hot reloading has different semantics than prod because
// it doesn't resuspend. So we can't let the call below suspend.
typeof elementType === "object" && elementType !== null && elementType.$$typeof === REACT_LAZY_TYPE && resolveLazy(elementType) === child.type) {
deleteRemainingChildren(returnFiber, child.sibling);
var _existing = useFiber(child, element.props);
_existing.ref = coerceRef(returnFiber, child, element);
_existing.return = returnFiber;
{
_existing._debugSource = element._source;
_existing._debugOwner = element._owner;
}
return _existing;
}
}
deleteRemainingChildren(returnFiber, child);
break;
} else {
deleteChild(returnFiber, child);
}
child = child.sibling;
}
if (element.type === REACT_FRAGMENT_TYPE) {
var created = createFiberFromFragment(element.props.children, returnFiber.mode, lanes, element.key);
created.return = returnFiber;
return created;
} else {
var _created4 = createFiberFromElement(element, returnFiber.mode, lanes);
_created4.ref = coerceRef(returnFiber, currentFirstChild, element);
_created4.return = returnFiber;
return _created4;
}
}
function reconcileSinglePortal(returnFiber, currentFirstChild, portal, lanes) {
var key2 = portal.key;
var child = currentFirstChild;
while (child !== null) {
if (child.key === key2) {
if (child.tag === HostPortal && child.stateNode.containerInfo === portal.containerInfo && child.stateNode.implementation === portal.implementation) {
deleteRemainingChildren(returnFiber, child.sibling);
var existing = useFiber(child, portal.children || []);
existing.return = returnFiber;
return existing;
} else {
deleteRemainingChildren(returnFiber, child);
break;
}
} else {
deleteChild(returnFiber, child);
}
child = child.sibling;
}
var created = createFiberFromPortal(portal, returnFiber.mode, lanes);
created.return = returnFiber;
return created;
}
function reconcileChildFibers2(returnFiber, currentFirstChild, newChild, lanes) {
var isUnkeyedTopLevelFragment = typeof newChild === "object" && newChild !== null && newChild.type === REACT_FRAGMENT_TYPE && newChild.key === null;
if (isUnkeyedTopLevelFragment) {
newChild = newChild.props.children;
}
if (typeof newChild === "object" && newChild !== null) {
switch (newChild.$$typeof) {
case REACT_ELEMENT_TYPE:
return placeSingleChild(reconcileSingleElement(returnFiber, currentFirstChild, newChild, lanes));
case REACT_PORTAL_TYPE:
return placeSingleChild(reconcileSinglePortal(returnFiber, currentFirstChild, newChild, lanes));
case REACT_LAZY_TYPE:
var payload = newChild._payload;
var init = newChild._init;
return reconcileChildFibers2(returnFiber, currentFirstChild, init(payload), lanes);
}
if (isArray(newChild)) {
return reconcileChildrenArray(returnFiber, currentFirstChild, newChild, lanes);
}
if (getIteratorFn(newChild)) {
return reconcileChildrenIterator(returnFiber, currentFirstChild, newChild, lanes);
}
throwOnInvalidObjectType(returnFiber, newChild);
}
if (typeof newChild === "string" && newChild !== "" || typeof newChild === "number") {
return placeSingleChild(reconcileSingleTextNode(returnFiber, currentFirstChild, "" + newChild, lanes));
}
{
if (typeof newChild === "function") {
warnOnFunctionType(returnFiber);
}
}
return deleteRemainingChildren(returnFiber, currentFirstChild);
}
return reconcileChildFibers2;
}
var reconcileChildFibers = ChildReconciler(true);
var mountChildFibers = ChildReconciler(false);
function cloneChildFibers(current3, workInProgress2) {
if (current3 !== null && workInProgress2.child !== current3.child) {
throw new Error("Resuming work not yet implemented.");
}
if (workInProgress2.child === null) {
return;
}
var currentChild = workInProgress2.child;
var newChild = createWorkInProgress(currentChild, currentChild.pendingProps);
workInProgress2.child = newChild;
newChild.return = workInProgress2;
while (currentChild.sibling !== null) {
currentChild = currentChild.sibling;
newChild = newChild.sibling = createWorkInProgress(currentChild, currentChild.pendingProps);
newChild.return = workInProgress2;
}
newChild.sibling = null;
}
function resetChildFibers(workInProgress2, lanes) {
var child = workInProgress2.child;
while (child !== null) {
resetWorkInProgress(child, lanes);
child = child.sibling;
}
}
var valueCursor = createCursor(null);
var rendererSigil;
{
rendererSigil = {};
}
var currentlyRenderingFiber = null;
var lastContextDependency = null;
var lastFullyObservedContext = null;
var isDisallowedContextReadInDEV = false;
function resetContextDependencies() {
currentlyRenderingFiber = null;
lastContextDependency = null;
lastFullyObservedContext = null;
{
isDisallowedContextReadInDEV = false;
}
}
function enterDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = true;
}
}
function exitDisallowedContextReadInDEV() {
{
isDisallowedContextReadInDEV = false;
}
}
function pushProvider(providerFiber, context, nextValue) {
{
push(valueCursor, context._currentValue, providerFiber);
context._currentValue = nextValue;
{
if (context._currentRenderer !== void 0 && context._currentRenderer !== null && context._currentRenderer !== rendererSigil) {
error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.");
}
context._currentRenderer = rendererSigil;
}
}
}
function popProvider(context, providerFiber) {
var currentValue = valueCursor.current;
pop(valueCursor, providerFiber);
{
{
context._currentValue = currentValue;
}
}
}
function scheduleContextWorkOnParentPath(parent, renderLanes2, propagationRoot) {
var node = parent;
while (node !== null) {
var alternate = node.alternate;
if (!isSubsetOfLanes(node.childLanes, renderLanes2)) {
node.childLanes = mergeLanes(node.childLanes, renderLanes2);
if (alternate !== null) {
alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes2);
}
} else if (alternate !== null && !isSubsetOfLanes(alternate.childLanes, renderLanes2)) {
alternate.childLanes = mergeLanes(alternate.childLanes, renderLanes2);
}
if (node === propagationRoot) {
break;
}
node = node.return;
}
{
if (node !== propagationRoot) {
error("Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.");
}
}
}
function propagateContextChange(workInProgress2, context, renderLanes2) {
{
propagateContextChange_eager(workInProgress2, context, renderLanes2);
}
}
function propagateContextChange_eager(workInProgress2, context, renderLanes2) {
var fiber = workInProgress2.child;
if (fiber !== null) {
fiber.return = workInProgress2;
}
while (fiber !== null) {
var nextFiber = void 0;
var list = fiber.dependencies;
if (list !== null) {
nextFiber = fiber.child;
var dependency = list.firstContext;
while (dependency !== null) {
if (dependency.context === context) {
if (fiber.tag === ClassComponent) {
var lane = pickArbitraryLane(renderLanes2);
var update = createUpdate(NoTimestamp, lane);
update.tag = ForceUpdate;
var updateQueue = fiber.updateQueue;
if (updateQueue === null)
;
else {
var sharedQueue = updateQueue.shared;
var pending = sharedQueue.pending;
if (pending === null) {
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
sharedQueue.pending = update;
}
}
fiber.lanes = mergeLanes(fiber.lanes, renderLanes2);
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, renderLanes2);
}
scheduleContextWorkOnParentPath(fiber.return, renderLanes2, workInProgress2);
list.lanes = mergeLanes(list.lanes, renderLanes2);
break;
}
dependency = dependency.next;
}
} else if (fiber.tag === ContextProvider) {
nextFiber = fiber.type === workInProgress2.type ? null : fiber.child;
} else if (fiber.tag === DehydratedFragment) {
var parentSuspense = fiber.return;
if (parentSuspense === null) {
throw new Error("We just came from a parent so we must have had a parent. This is a bug in React.");
}
parentSuspense.lanes = mergeLanes(parentSuspense.lanes, renderLanes2);
var _alternate = parentSuspense.alternate;
if (_alternate !== null) {
_alternate.lanes = mergeLanes(_alternate.lanes, renderLanes2);
}
scheduleContextWorkOnParentPath(parentSuspense, renderLanes2, workInProgress2);
nextFiber = fiber.sibling;
} else {
nextFiber = fiber.child;
}
if (nextFiber !== null) {
nextFiber.return = fiber;
} else {
nextFiber = fiber;
while (nextFiber !== null) {
if (nextFiber === workInProgress2) {
nextFiber = null;
break;
}
var sibling = nextFiber.sibling;
if (sibling !== null) {
sibling.return = nextFiber.return;
nextFiber = sibling;
break;
}
nextFiber = nextFiber.return;
}
}
fiber = nextFiber;
}
}
function prepareToReadContext(workInProgress2, renderLanes2) {
currentlyRenderingFiber = workInProgress2;
lastContextDependency = null;
lastFullyObservedContext = null;
var dependencies = workInProgress2.dependencies;
if (dependencies !== null) {
{
var firstContext = dependencies.firstContext;
if (firstContext !== null) {
if (includesSomeLane(dependencies.lanes, renderLanes2)) {
markWorkInProgressReceivedUpdate();
}
dependencies.firstContext = null;
}
}
}
}
function readContext(context) {
{
if (isDisallowedContextReadInDEV) {
error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
}
}
var value = context._currentValue;
if (lastFullyObservedContext === context)
;
else {
var contextItem = {
context,
memoizedValue: value,
next: null
};
if (lastContextDependency === null) {
if (currentlyRenderingFiber === null) {
throw new Error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
}
lastContextDependency = contextItem;
currentlyRenderingFiber.dependencies = {
lanes: NoLanes,
firstContext: contextItem
};
} else {
lastContextDependency = lastContextDependency.next = contextItem;
}
}
return value;
}
var concurrentQueues = null;
function pushConcurrentUpdateQueue(queue) {
if (concurrentQueues === null) {
concurrentQueues = [queue];
} else {
concurrentQueues.push(queue);
}
}
function finishQueueingConcurrentUpdates() {
if (concurrentQueues !== null) {
for (var i = 0; i < concurrentQueues.length; i++) {
var queue = concurrentQueues[i];
var lastInterleavedUpdate = queue.interleaved;
if (lastInterleavedUpdate !== null) {
queue.interleaved = null;
var firstInterleavedUpdate = lastInterleavedUpdate.next;
var lastPendingUpdate = queue.pending;
if (lastPendingUpdate !== null) {
var firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = firstInterleavedUpdate;
lastInterleavedUpdate.next = firstPendingUpdate;
}
queue.pending = lastInterleavedUpdate;
}
}
concurrentQueues = null;
}
}
function enqueueConcurrentHookUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
update.next = update;
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
return markUpdateLaneFromFiberToRoot(fiber, lane);
}
function enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
update.next = update;
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
}
function enqueueConcurrentClassUpdate(fiber, queue, update, lane) {
var interleaved = queue.interleaved;
if (interleaved === null) {
update.next = update;
pushConcurrentUpdateQueue(queue);
} else {
update.next = interleaved.next;
interleaved.next = update;
}
queue.interleaved = update;
return markUpdateLaneFromFiberToRoot(fiber, lane);
}
function enqueueConcurrentRenderForLane(fiber, lane) {
return markUpdateLaneFromFiberToRoot(fiber, lane);
}
var unsafe_markUpdateLaneFromFiberToRoot = markUpdateLaneFromFiberToRoot;
function markUpdateLaneFromFiberToRoot(sourceFiber, lane) {
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, lane);
var alternate = sourceFiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, lane);
}
{
if (alternate === null && (sourceFiber.flags & (Placement | Hydrating)) !== NoFlags) {
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
}
var node = sourceFiber;
var parent = sourceFiber.return;
while (parent !== null) {
parent.childLanes = mergeLanes(parent.childLanes, lane);
alternate = parent.alternate;
if (alternate !== null) {
alternate.childLanes = mergeLanes(alternate.childLanes, lane);
} else {
{
if ((parent.flags & (Placement | Hydrating)) !== NoFlags) {
warnAboutUpdateOnNotYetMountedFiberInDEV(sourceFiber);
}
}
}
node = parent;
parent = parent.return;
}
if (node.tag === HostRoot) {
var root2 = node.stateNode;
return root2;
} else {
return null;
}
}
var UpdateState = 0;
var ReplaceState = 1;
var ForceUpdate = 2;
var CaptureUpdate = 3;
var hasForceUpdate = false;
var didWarnUpdateInsideUpdate;
var currentlyProcessingQueue;
{
didWarnUpdateInsideUpdate = false;
currentlyProcessingQueue = null;
}
function initializeUpdateQueue(fiber) {
var queue = {
baseState: fiber.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: NoLanes
},
effects: null
};
fiber.updateQueue = queue;
}
function cloneUpdateQueue(current3, workInProgress2) {
var queue = workInProgress2.updateQueue;
var currentQueue = current3.updateQueue;
if (queue === currentQueue) {
var clone3 = {
baseState: currentQueue.baseState,
firstBaseUpdate: currentQueue.firstBaseUpdate,
lastBaseUpdate: currentQueue.lastBaseUpdate,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress2.updateQueue = clone3;
}
}
function createUpdate(eventTime, lane) {
var update = {
eventTime,
lane,
tag: UpdateState,
payload: null,
callback: null,
next: null
};
return update;
}
function enqueueUpdate(fiber, update, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
return null;
}
var sharedQueue = updateQueue.shared;
{
if (currentlyProcessingQueue === sharedQueue && !didWarnUpdateInsideUpdate) {
error("An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.");
didWarnUpdateInsideUpdate = true;
}
}
if (isUnsafeClassRenderPhaseUpdate()) {
var pending = sharedQueue.pending;
if (pending === null) {
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
sharedQueue.pending = update;
return unsafe_markUpdateLaneFromFiberToRoot(fiber, lane);
} else {
return enqueueConcurrentClassUpdate(fiber, sharedQueue, update, lane);
}
}
function entangleTransitions(root2, fiber, lane) {
var updateQueue = fiber.updateQueue;
if (updateQueue === null) {
return;
}
var sharedQueue = updateQueue.shared;
if (isTransitionLane(lane)) {
var queueLanes = sharedQueue.lanes;
queueLanes = intersectLanes(queueLanes, root2.pendingLanes);
var newQueueLanes = mergeLanes(queueLanes, lane);
sharedQueue.lanes = newQueueLanes;
markRootEntangled(root2, newQueueLanes);
}
}
function enqueueCapturedUpdate(workInProgress2, capturedUpdate) {
var queue = workInProgress2.updateQueue;
var current3 = workInProgress2.alternate;
if (current3 !== null) {
var currentQueue = current3.updateQueue;
if (queue === currentQueue) {
var newFirst = null;
var newLast = null;
var firstBaseUpdate = queue.firstBaseUpdate;
if (firstBaseUpdate !== null) {
var update = firstBaseUpdate;
do {
var clone3 = {
eventTime: update.eventTime,
lane: update.lane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
if (newLast === null) {
newFirst = newLast = clone3;
} else {
newLast.next = clone3;
newLast = clone3;
}
update = update.next;
} while (update !== null);
if (newLast === null) {
newFirst = newLast = capturedUpdate;
} else {
newLast.next = capturedUpdate;
newLast = capturedUpdate;
}
} else {
newFirst = newLast = capturedUpdate;
}
queue = {
baseState: currentQueue.baseState,
firstBaseUpdate: newFirst,
lastBaseUpdate: newLast,
shared: currentQueue.shared,
effects: currentQueue.effects
};
workInProgress2.updateQueue = queue;
return;
}
}
var lastBaseUpdate = queue.lastBaseUpdate;
if (lastBaseUpdate === null) {
queue.firstBaseUpdate = capturedUpdate;
} else {
lastBaseUpdate.next = capturedUpdate;
}
queue.lastBaseUpdate = capturedUpdate;
}
function getStateFromUpdate(workInProgress2, queue, update, prevState, nextProps, instance) {
switch (update.tag) {
case ReplaceState: {
var payload = update.payload;
if (typeof payload === "function") {
{
enterDisallowedContextReadInDEV();
}
var nextState = payload.call(instance, prevState, nextProps);
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
payload.call(instance, prevState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
exitDisallowedContextReadInDEV();
}
return nextState;
}
return payload;
}
case CaptureUpdate: {
workInProgress2.flags = workInProgress2.flags & ~ShouldCapture | DidCapture;
}
case UpdateState: {
var _payload = update.payload;
var partialState;
if (typeof _payload === "function") {
{
enterDisallowedContextReadInDEV();
}
partialState = _payload.call(instance, prevState, nextProps);
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
_payload.call(instance, prevState, nextProps);
} finally {
setIsStrictModeForDevtools(false);
}
}
exitDisallowedContextReadInDEV();
}
} else {
partialState = _payload;
}
if (partialState === null || partialState === void 0) {
return prevState;
}
return assign({}, prevState, partialState);
}
case ForceUpdate: {
hasForceUpdate = true;
return prevState;
}
}
return prevState;
}
function processUpdateQueue(workInProgress2, props, instance, renderLanes2) {
var queue = workInProgress2.updateQueue;
hasForceUpdate = false;
{
currentlyProcessingQueue = queue.shared;
}
var firstBaseUpdate = queue.firstBaseUpdate;
var lastBaseUpdate = queue.lastBaseUpdate;
var pendingQueue = queue.shared.pending;
if (pendingQueue !== null) {
queue.shared.pending = null;
var lastPendingUpdate = pendingQueue;
var firstPendingUpdate = lastPendingUpdate.next;
lastPendingUpdate.next = null;
if (lastBaseUpdate === null) {
firstBaseUpdate = firstPendingUpdate;
} else {
lastBaseUpdate.next = firstPendingUpdate;
}
lastBaseUpdate = lastPendingUpdate;
var current3 = workInProgress2.alternate;
if (current3 !== null) {
var currentQueue = current3.updateQueue;
var currentLastBaseUpdate = currentQueue.lastBaseUpdate;
if (currentLastBaseUpdate !== lastBaseUpdate) {
if (currentLastBaseUpdate === null) {
currentQueue.firstBaseUpdate = firstPendingUpdate;
} else {
currentLastBaseUpdate.next = firstPendingUpdate;
}
currentQueue.lastBaseUpdate = lastPendingUpdate;
}
}
}
if (firstBaseUpdate !== null) {
var newState = queue.baseState;
var newLanes = NoLanes;
var newBaseState = null;
var newFirstBaseUpdate = null;
var newLastBaseUpdate = null;
var update = firstBaseUpdate;
do {
var updateLane = update.lane;
var updateEventTime = update.eventTime;
if (!isSubsetOfLanes(renderLanes2, updateLane)) {
var clone3 = {
eventTime: updateEventTime,
lane: updateLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
if (newLastBaseUpdate === null) {
newFirstBaseUpdate = newLastBaseUpdate = clone3;
newBaseState = newState;
} else {
newLastBaseUpdate = newLastBaseUpdate.next = clone3;
}
newLanes = mergeLanes(newLanes, updateLane);
} else {
if (newLastBaseUpdate !== null) {
var _clone = {
eventTime: updateEventTime,
// This update is going to be committed so we never want uncommit
// it. Using NoLane works because 0 is a subset of all bitmasks, so
// this will never be skipped by the check above.
lane: NoLane,
tag: update.tag,
payload: update.payload,
callback: update.callback,
next: null
};
newLastBaseUpdate = newLastBaseUpdate.next = _clone;
}
newState = getStateFromUpdate(workInProgress2, queue, update, newState, props, instance);
var callback = update.callback;
if (callback !== null && // If the update was already committed, we should not queue its
// callback again.
update.lane !== NoLane) {
workInProgress2.flags |= Callback;
var effects = queue.effects;
if (effects === null) {
queue.effects = [update];
} else {
effects.push(update);
}
}
}
update = update.next;
if (update === null) {
pendingQueue = queue.shared.pending;
if (pendingQueue === null) {
break;
} else {
var _lastPendingUpdate = pendingQueue;
var _firstPendingUpdate = _lastPendingUpdate.next;
_lastPendingUpdate.next = null;
update = _firstPendingUpdate;
queue.lastBaseUpdate = _lastPendingUpdate;
queue.shared.pending = null;
}
}
} while (true);
if (newLastBaseUpdate === null) {
newBaseState = newState;
}
queue.baseState = newBaseState;
queue.firstBaseUpdate = newFirstBaseUpdate;
queue.lastBaseUpdate = newLastBaseUpdate;
var lastInterleaved = queue.shared.interleaved;
if (lastInterleaved !== null) {
var interleaved = lastInterleaved;
do {
newLanes = mergeLanes(newLanes, interleaved.lane);
interleaved = interleaved.next;
} while (interleaved !== lastInterleaved);
} else if (firstBaseUpdate === null) {
queue.shared.lanes = NoLanes;
}
markSkippedUpdateLanes(newLanes);
workInProgress2.lanes = newLanes;
workInProgress2.memoizedState = newState;
}
{
currentlyProcessingQueue = null;
}
}
function callCallback(callback, context) {
if (typeof callback !== "function") {
throw new Error("Invalid argument passed as callback. Expected a function. Instead " + ("received: " + callback));
}
callback.call(context);
}
function resetHasForceUpdateBeforeProcessing() {
hasForceUpdate = false;
}
function checkHasForceUpdateAfterProcessing() {
return hasForceUpdate;
}
function commitUpdateQueue(finishedWork, finishedQueue, instance) {
var effects = finishedQueue.effects;
finishedQueue.effects = null;
if (effects !== null) {
for (var i = 0; i < effects.length; i++) {
var effect = effects[i];
var callback = effect.callback;
if (callback !== null) {
effect.callback = null;
callCallback(callback, instance);
}
}
}
}
var NO_CONTEXT = {};
var contextStackCursor$1 = createCursor(NO_CONTEXT);
var contextFiberStackCursor = createCursor(NO_CONTEXT);
var rootInstanceStackCursor = createCursor(NO_CONTEXT);
function requiredContext(c) {
if (c === NO_CONTEXT) {
throw new Error("Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.");
}
return c;
}
function getRootHostContainer() {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
return rootInstance;
}
function pushHostContainer(fiber, nextRootInstance) {
push(rootInstanceStackCursor, nextRootInstance, fiber);
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor$1, NO_CONTEXT, fiber);
var nextRootContext = getRootHostContext(nextRootInstance);
pop(contextStackCursor$1, fiber);
push(contextStackCursor$1, nextRootContext, fiber);
}
function popHostContainer(fiber) {
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
pop(rootInstanceStackCursor, fiber);
}
function getHostContext() {
var context = requiredContext(contextStackCursor$1.current);
return context;
}
function pushHostContext(fiber) {
var rootInstance = requiredContext(rootInstanceStackCursor.current);
var context = requiredContext(contextStackCursor$1.current);
var nextContext = getChildHostContext(context, fiber.type);
if (context === nextContext) {
return;
}
push(contextFiberStackCursor, fiber, fiber);
push(contextStackCursor$1, nextContext, fiber);
}
function popHostContext(fiber) {
if (contextFiberStackCursor.current !== fiber) {
return;
}
pop(contextStackCursor$1, fiber);
pop(contextFiberStackCursor, fiber);
}
var DefaultSuspenseContext = 0;
var SubtreeSuspenseContextMask = 1;
var InvisibleParentSuspenseContext = 1;
var ForceSuspenseFallback = 2;
var suspenseStackCursor = createCursor(DefaultSuspenseContext);
function hasSuspenseContext(parentContext, flag) {
return (parentContext & flag) !== 0;
}
function setDefaultShallowSuspenseContext(parentContext) {
return parentContext & SubtreeSuspenseContextMask;
}
function setShallowSuspenseContext(parentContext, shallowContext) {
return parentContext & SubtreeSuspenseContextMask | shallowContext;
}
function addSubtreeSuspenseContext(parentContext, subtreeContext) {
return parentContext | subtreeContext;
}
function pushSuspenseContext(fiber, newContext) {
push(suspenseStackCursor, newContext, fiber);
}
function popSuspenseContext(fiber) {
pop(suspenseStackCursor, fiber);
}
function shouldCaptureSuspense(workInProgress2, hasInvisibleParent) {
var nextState = workInProgress2.memoizedState;
if (nextState !== null) {
if (nextState.dehydrated !== null) {
return true;
}
return false;
}
var props = workInProgress2.memoizedProps;
{
return true;
}
}
function findFirstSuspended(row) {
var node = row;
while (node !== null) {
if (node.tag === SuspenseComponent) {
var state = node.memoizedState;
if (state !== null) {
var dehydrated = state.dehydrated;
if (dehydrated === null || isSuspenseInstancePending(dehydrated) || isSuspenseInstanceFallback(dehydrated)) {
return node;
}
}
} else if (node.tag === SuspenseListComponent && // revealOrder undefined can't be trusted because it don't
// keep track of whether it suspended or not.
node.memoizedProps.revealOrder !== void 0) {
var didSuspend = (node.flags & DidCapture) !== NoFlags;
if (didSuspend) {
return node;
}
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === row) {
return null;
}
while (node.sibling === null) {
if (node.return === null || node.return === row) {
return null;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return null;
}
var NoFlags$1 = (
/* */
0
);
var HasEffect = (
/* */
1
);
var Insertion = (
/* */
2
);
var Layout = (
/* */
4
);
var Passive$1 = (
/* */
8
);
var workInProgressSources = [];
function resetWorkInProgressVersions() {
for (var i = 0; i < workInProgressSources.length; i++) {
var mutableSource = workInProgressSources[i];
{
mutableSource._workInProgressVersionPrimary = null;
}
}
workInProgressSources.length = 0;
}
function registerMutableSourceForHydration(root2, mutableSource) {
var getVersion = mutableSource._getVersion;
var version = getVersion(mutableSource._source);
if (root2.mutableSourceEagerHydrationData == null) {
root2.mutableSourceEagerHydrationData = [mutableSource, version];
} else {
root2.mutableSourceEagerHydrationData.push(mutableSource, version);
}
}
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentBatchConfig$2 = ReactSharedInternals.ReactCurrentBatchConfig;
var didWarnAboutMismatchedHooksForComponent;
var didWarnUncachedGetSnapshot;
{
didWarnAboutMismatchedHooksForComponent = /* @__PURE__ */ new Set();
}
var renderLanes = NoLanes;
var currentlyRenderingFiber$1 = null;
var currentHook = null;
var workInProgressHook = null;
var didScheduleRenderPhaseUpdate = false;
var didScheduleRenderPhaseUpdateDuringThisPass = false;
var localIdCounter = 0;
var globalClientIdCounter = 0;
var RE_RENDER_LIMIT = 25;
var currentHookNameInDev = null;
var hookTypesDev = null;
var hookTypesUpdateIndexDev = -1;
var ignorePreviousDependencies = false;
function mountHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev === null) {
hookTypesDev = [hookName];
} else {
hookTypesDev.push(hookName);
}
}
}
function updateHookTypesDev() {
{
var hookName = currentHookNameInDev;
if (hookTypesDev !== null) {
hookTypesUpdateIndexDev++;
if (hookTypesDev[hookTypesUpdateIndexDev] !== hookName) {
warnOnHookMismatchInDev(hookName);
}
}
}
}
function checkDepsAreArrayDev(deps) {
{
if (deps !== void 0 && deps !== null && !isArray(deps)) {
error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.", currentHookNameInDev, typeof deps);
}
}
}
function warnOnHookMismatchInDev(currentHookName) {
{
var componentName = getComponentNameFromFiber(currentlyRenderingFiber$1);
if (!didWarnAboutMismatchedHooksForComponent.has(componentName)) {
didWarnAboutMismatchedHooksForComponent.add(componentName);
if (hookTypesDev !== null) {
var table = "";
var secondColumnStart = 30;
for (var i = 0; i <= hookTypesUpdateIndexDev; i++) {
var oldHookName = hookTypesDev[i];
var newHookName = i === hookTypesUpdateIndexDev ? currentHookName : oldHookName;
var row = i + 1 + ". " + oldHookName;
while (row.length < secondColumnStart) {
row += " ";
}
row += newHookName + "\n";
table += row;
}
error("React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render Next render\n ------------------------------------------------------\n%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", componentName, table);
}
}
}
}
function throwInvalidHookError() {
throw new Error("Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:\n1. You might have mismatching versions of React and the renderer (such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.");
}
function areHookInputsEqual(nextDeps, prevDeps) {
{
if (ignorePreviousDependencies) {
return false;
}
}
if (prevDeps === null) {
{
error("%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.", currentHookNameInDev);
}
return false;
}
{
if (nextDeps.length !== prevDeps.length) {
error("The final argument passed to %s changed size between renders. The order and size of this array must remain constant.\n\nPrevious: %s\nIncoming: %s", currentHookNameInDev, "[" + prevDeps.join(", ") + "]", "[" + nextDeps.join(", ") + "]");
}
}
for (var i = 0; i < prevDeps.length && i < nextDeps.length; i++) {
if (objectIs(nextDeps[i], prevDeps[i])) {
continue;
}
return false;
}
return true;
}
function renderWithHooks(current3, workInProgress2, Component3, props, secondArg, nextRenderLanes) {
renderLanes = nextRenderLanes;
currentlyRenderingFiber$1 = workInProgress2;
{
hookTypesDev = current3 !== null ? current3._debugHookTypes : null;
hookTypesUpdateIndexDev = -1;
ignorePreviousDependencies = current3 !== null && current3.type !== workInProgress2.type;
}
workInProgress2.memoizedState = null;
workInProgress2.updateQueue = null;
workInProgress2.lanes = NoLanes;
{
if (current3 !== null && current3.memoizedState !== null) {
ReactCurrentDispatcher$1.current = HooksDispatcherOnUpdateInDEV;
} else if (hookTypesDev !== null) {
ReactCurrentDispatcher$1.current = HooksDispatcherOnMountWithHookTypesInDEV;
} else {
ReactCurrentDispatcher$1.current = HooksDispatcherOnMountInDEV;
}
}
var children = Component3(props, secondArg);
if (didScheduleRenderPhaseUpdateDuringThisPass) {
var numberOfReRenders = 0;
do {
didScheduleRenderPhaseUpdateDuringThisPass = false;
localIdCounter = 0;
if (numberOfReRenders >= RE_RENDER_LIMIT) {
throw new Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");
}
numberOfReRenders += 1;
{
ignorePreviousDependencies = false;
}
currentHook = null;
workInProgressHook = null;
workInProgress2.updateQueue = null;
{
hookTypesUpdateIndexDev = -1;
}
ReactCurrentDispatcher$1.current = HooksDispatcherOnRerenderInDEV;
children = Component3(props, secondArg);
} while (didScheduleRenderPhaseUpdateDuringThisPass);
}
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
{
workInProgress2._debugHookTypes = hookTypesDev;
}
var didRenderTooFewHooks = currentHook !== null && currentHook.next !== null;
renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
{
currentHookNameInDev = null;
hookTypesDev = null;
hookTypesUpdateIndexDev = -1;
if (current3 !== null && (current3.flags & StaticMask) !== (workInProgress2.flags & StaticMask) && // Disable this warning in legacy mode, because legacy Suspense is weird
// and creates false positives. To make this work in legacy mode, we'd
// need to mark fibers that commit in an incomplete state, somehow. For
// now I'll disable the warning that most of the bugs that would trigger
// it are either exclusive to concurrent mode or exist in both.
(current3.mode & ConcurrentMode) !== NoMode) {
error("Internal React error: Expected static flag was missing. Please notify the React team.");
}
}
didScheduleRenderPhaseUpdate = false;
if (didRenderTooFewHooks) {
throw new Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");
}
return children;
}
function checkDidRenderIdHook() {
var didRenderIdHook = localIdCounter !== 0;
localIdCounter = 0;
return didRenderIdHook;
}
function bailoutHooks(current3, workInProgress2, lanes) {
workInProgress2.updateQueue = current3.updateQueue;
if ((workInProgress2.mode & StrictEffectsMode) !== NoMode) {
workInProgress2.flags &= ~(MountPassiveDev | MountLayoutDev | Passive | Update);
} else {
workInProgress2.flags &= ~(Passive | Update);
}
current3.lanes = removeLanes(current3.lanes, lanes);
}
function resetHooksAfterThrow() {
ReactCurrentDispatcher$1.current = ContextOnlyDispatcher;
if (didScheduleRenderPhaseUpdate) {
var hook = currentlyRenderingFiber$1.memoizedState;
while (hook !== null) {
var queue = hook.queue;
if (queue !== null) {
queue.pending = null;
}
hook = hook.next;
}
didScheduleRenderPhaseUpdate = false;
}
renderLanes = NoLanes;
currentlyRenderingFiber$1 = null;
currentHook = null;
workInProgressHook = null;
{
hookTypesDev = null;
hookTypesUpdateIndexDev = -1;
currentHookNameInDev = null;
isUpdatingOpaqueValueInRenderPhase = false;
}
didScheduleRenderPhaseUpdateDuringThisPass = false;
localIdCounter = 0;
}
function mountWorkInProgressHook() {
var hook = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
if (workInProgressHook === null) {
currentlyRenderingFiber$1.memoizedState = workInProgressHook = hook;
} else {
workInProgressHook = workInProgressHook.next = hook;
}
return workInProgressHook;
}
function updateWorkInProgressHook() {
var nextCurrentHook;
if (currentHook === null) {
var current3 = currentlyRenderingFiber$1.alternate;
if (current3 !== null) {
nextCurrentHook = current3.memoizedState;
} else {
nextCurrentHook = null;
}
} else {
nextCurrentHook = currentHook.next;
}
var nextWorkInProgressHook;
if (workInProgressHook === null) {
nextWorkInProgressHook = currentlyRenderingFiber$1.memoizedState;
} else {
nextWorkInProgressHook = workInProgressHook.next;
}
if (nextWorkInProgressHook !== null) {
workInProgressHook = nextWorkInProgressHook;
nextWorkInProgressHook = workInProgressHook.next;
currentHook = nextCurrentHook;
} else {
if (nextCurrentHook === null) {
throw new Error("Rendered more hooks than during the previous render.");
}
currentHook = nextCurrentHook;
var newHook = {
memoizedState: currentHook.memoizedState,
baseState: currentHook.baseState,
baseQueue: currentHook.baseQueue,
queue: currentHook.queue,
next: null
};
if (workInProgressHook === null) {
currentlyRenderingFiber$1.memoizedState = workInProgressHook = newHook;
} else {
workInProgressHook = workInProgressHook.next = newHook;
}
}
return workInProgressHook;
}
function createFunctionComponentUpdateQueue() {
return {
lastEffect: null,
stores: null
};
}
function basicStateReducer(state, action) {
return typeof action === "function" ? action(state) : action;
}
function mountReducer(reducer2, initialArg, init) {
var hook = mountWorkInProgressHook();
var initialState;
if (init !== void 0) {
initialState = init(initialArg);
} else {
initialState = initialArg;
}
hook.memoizedState = hook.baseState = initialState;
var queue = {
pending: null,
interleaved: null,
lanes: NoLanes,
dispatch: null,
lastRenderedReducer: reducer2,
lastRenderedState: initialState
};
hook.queue = queue;
var dispatch = queue.dispatch = dispatchReducerAction.bind(null, currentlyRenderingFiber$1, queue);
return [hook.memoizedState, dispatch];
}
function updateReducer(reducer2, initialArg, init) {
var hook = updateWorkInProgressHook();
var queue = hook.queue;
if (queue === null) {
throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
}
queue.lastRenderedReducer = reducer2;
var current3 = currentHook;
var baseQueue = current3.baseQueue;
var pendingQueue = queue.pending;
if (pendingQueue !== null) {
if (baseQueue !== null) {
var baseFirst = baseQueue.next;
var pendingFirst = pendingQueue.next;
baseQueue.next = pendingFirst;
pendingQueue.next = baseFirst;
}
{
if (current3.baseQueue !== baseQueue) {
error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.");
}
}
current3.baseQueue = baseQueue = pendingQueue;
queue.pending = null;
}
if (baseQueue !== null) {
var first = baseQueue.next;
var newState = current3.baseState;
var newBaseState = null;
var newBaseQueueFirst = null;
var newBaseQueueLast = null;
var update = first;
do {
var updateLane = update.lane;
if (!isSubsetOfLanes(renderLanes, updateLane)) {
var clone3 = {
lane: updateLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
};
if (newBaseQueueLast === null) {
newBaseQueueFirst = newBaseQueueLast = clone3;
newBaseState = newState;
} else {
newBaseQueueLast = newBaseQueueLast.next = clone3;
}
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, updateLane);
markSkippedUpdateLanes(updateLane);
} else {
if (newBaseQueueLast !== null) {
var _clone = {
// This update is going to be committed so we never want uncommit
// it. Using NoLane works because 0 is a subset of all bitmasks, so
// this will never be skipped by the check above.
lane: NoLane,
action: update.action,
hasEagerState: update.hasEagerState,
eagerState: update.eagerState,
next: null
};
newBaseQueueLast = newBaseQueueLast.next = _clone;
}
if (update.hasEagerState) {
newState = update.eagerState;
} else {
var action = update.action;
newState = reducer2(newState, action);
}
}
update = update.next;
} while (update !== null && update !== first);
if (newBaseQueueLast === null) {
newBaseState = newState;
} else {
newBaseQueueLast.next = newBaseQueueFirst;
}
if (!objectIs(newState, hook.memoizedState)) {
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = newState;
hook.baseState = newBaseState;
hook.baseQueue = newBaseQueueLast;
queue.lastRenderedState = newState;
}
var lastInterleaved = queue.interleaved;
if (lastInterleaved !== null) {
var interleaved = lastInterleaved;
do {
var interleavedLane = interleaved.lane;
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, interleavedLane);
markSkippedUpdateLanes(interleavedLane);
interleaved = interleaved.next;
} while (interleaved !== lastInterleaved);
} else if (baseQueue === null) {
queue.lanes = NoLanes;
}
var dispatch = queue.dispatch;
return [hook.memoizedState, dispatch];
}
function rerenderReducer(reducer2, initialArg, init) {
var hook = updateWorkInProgressHook();
var queue = hook.queue;
if (queue === null) {
throw new Error("Should have a queue. This is likely a bug in React. Please file an issue.");
}
queue.lastRenderedReducer = reducer2;
var dispatch = queue.dispatch;
var lastRenderPhaseUpdate = queue.pending;
var newState = hook.memoizedState;
if (lastRenderPhaseUpdate !== null) {
queue.pending = null;
var firstRenderPhaseUpdate = lastRenderPhaseUpdate.next;
var update = firstRenderPhaseUpdate;
do {
var action = update.action;
newState = reducer2(newState, action);
update = update.next;
} while (update !== firstRenderPhaseUpdate);
if (!objectIs(newState, hook.memoizedState)) {
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = newState;
if (hook.baseQueue === null) {
hook.baseState = newState;
}
queue.lastRenderedState = newState;
}
return [newState, dispatch];
}
function mountMutableSource(source, getSnapshot, subscribe) {
{
return void 0;
}
}
function updateMutableSource(source, getSnapshot, subscribe) {
{
return void 0;
}
}
function mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber$1;
var hook = mountWorkInProgressHook();
var nextSnapshot;
var isHydrating2 = getIsHydrating();
if (isHydrating2) {
if (getServerSnapshot === void 0) {
throw new Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");
}
nextSnapshot = getServerSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
if (nextSnapshot !== getServerSnapshot()) {
error("The result of getServerSnapshot should be cached to avoid an infinite loop");
didWarnUncachedGetSnapshot = true;
}
}
}
} else {
nextSnapshot = getSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
var cachedSnapshot = getSnapshot();
if (!objectIs(nextSnapshot, cachedSnapshot)) {
error("The result of getSnapshot should be cached to avoid an infinite loop");
didWarnUncachedGetSnapshot = true;
}
}
}
var root2 = getWorkInProgressRoot();
if (root2 === null) {
throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
}
if (!includesBlockingLane(root2, renderLanes)) {
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
}
}
hook.memoizedState = nextSnapshot;
var inst = {
value: nextSnapshot,
getSnapshot
};
hook.queue = inst;
mountEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]);
fiber.flags |= Passive;
pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), void 0, null);
return nextSnapshot;
}
function updateSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
var fiber = currentlyRenderingFiber$1;
var hook = updateWorkInProgressHook();
var nextSnapshot = getSnapshot();
{
if (!didWarnUncachedGetSnapshot) {
var cachedSnapshot = getSnapshot();
if (!objectIs(nextSnapshot, cachedSnapshot)) {
error("The result of getSnapshot should be cached to avoid an infinite loop");
didWarnUncachedGetSnapshot = true;
}
}
}
var prevSnapshot = hook.memoizedState;
var snapshotChanged = !objectIs(prevSnapshot, nextSnapshot);
if (snapshotChanged) {
hook.memoizedState = nextSnapshot;
markWorkInProgressReceivedUpdate();
}
var inst = hook.queue;
updateEffect(subscribeToStore.bind(null, fiber, inst, subscribe), [subscribe]);
if (inst.getSnapshot !== getSnapshot || snapshotChanged || // Check if the susbcribe function changed. We can save some memory by
// checking whether we scheduled a subscription effect above.
workInProgressHook !== null && workInProgressHook.memoizedState.tag & HasEffect) {
fiber.flags |= Passive;
pushEffect(HasEffect | Passive$1, updateStoreInstance.bind(null, fiber, inst, nextSnapshot, getSnapshot), void 0, null);
var root2 = getWorkInProgressRoot();
if (root2 === null) {
throw new Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");
}
if (!includesBlockingLane(root2, renderLanes)) {
pushStoreConsistencyCheck(fiber, getSnapshot, nextSnapshot);
}
}
return nextSnapshot;
}
function pushStoreConsistencyCheck(fiber, getSnapshot, renderedSnapshot) {
fiber.flags |= StoreConsistency;
var check = {
getSnapshot,
value: renderedSnapshot
};
var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
if (componentUpdateQueue === null) {
componentUpdateQueue = createFunctionComponentUpdateQueue();
currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
componentUpdateQueue.stores = [check];
} else {
var stores = componentUpdateQueue.stores;
if (stores === null) {
componentUpdateQueue.stores = [check];
} else {
stores.push(check);
}
}
}
function updateStoreInstance(fiber, inst, nextSnapshot, getSnapshot) {
inst.value = nextSnapshot;
inst.getSnapshot = getSnapshot;
if (checkIfSnapshotChanged(inst)) {
forceStoreRerender(fiber);
}
}
function subscribeToStore(fiber, inst, subscribe) {
var handleStoreChange = function() {
if (checkIfSnapshotChanged(inst)) {
forceStoreRerender(fiber);
}
};
return subscribe(handleStoreChange);
}
function checkIfSnapshotChanged(inst) {
var latestGetSnapshot = inst.getSnapshot;
var prevValue = inst.value;
try {
var nextValue = latestGetSnapshot();
return !objectIs(prevValue, nextValue);
} catch (error2) {
return true;
}
}
function forceStoreRerender(fiber) {
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
}
function mountState(initialState) {
var hook = mountWorkInProgressHook();
if (typeof initialState === "function") {
initialState = initialState();
}
hook.memoizedState = hook.baseState = initialState;
var queue = {
pending: null,
interleaved: null,
lanes: NoLanes,
dispatch: null,
lastRenderedReducer: basicStateReducer,
lastRenderedState: initialState
};
hook.queue = queue;
var dispatch = queue.dispatch = dispatchSetState.bind(null, currentlyRenderingFiber$1, queue);
return [hook.memoizedState, dispatch];
}
function updateState(initialState) {
return updateReducer(basicStateReducer);
}
function rerenderState(initialState) {
return rerenderReducer(basicStateReducer);
}
function pushEffect(tag, create, destroy, deps) {
var effect = {
tag,
create,
destroy,
deps,
// Circular
next: null
};
var componentUpdateQueue = currentlyRenderingFiber$1.updateQueue;
if (componentUpdateQueue === null) {
componentUpdateQueue = createFunctionComponentUpdateQueue();
currentlyRenderingFiber$1.updateQueue = componentUpdateQueue;
componentUpdateQueue.lastEffect = effect.next = effect;
} else {
var lastEffect = componentUpdateQueue.lastEffect;
if (lastEffect === null) {
componentUpdateQueue.lastEffect = effect.next = effect;
} else {
var firstEffect = lastEffect.next;
lastEffect.next = effect;
effect.next = firstEffect;
componentUpdateQueue.lastEffect = effect;
}
}
return effect;
}
function mountRef(initialValue) {
var hook = mountWorkInProgressHook();
{
var _ref2 = {
current: initialValue
};
hook.memoizedState = _ref2;
return _ref2;
}
}
function updateRef(initialValue) {
var hook = updateWorkInProgressHook();
return hook.memoizedState;
}
function mountEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
currentlyRenderingFiber$1.flags |= fiberFlags;
hook.memoizedState = pushEffect(HasEffect | hookFlags, create, void 0, nextDeps);
}
function updateEffectImpl(fiberFlags, hookFlags, create, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
var destroy = void 0;
if (currentHook !== null) {
var prevEffect = currentHook.memoizedState;
destroy = prevEffect.destroy;
if (nextDeps !== null) {
var prevDeps = prevEffect.deps;
if (areHookInputsEqual(nextDeps, prevDeps)) {
hook.memoizedState = pushEffect(hookFlags, create, destroy, nextDeps);
return;
}
}
}
currentlyRenderingFiber$1.flags |= fiberFlags;
hook.memoizedState = pushEffect(HasEffect | hookFlags, create, destroy, nextDeps);
}
function mountEffect(create, deps) {
if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
return mountEffectImpl(MountPassiveDev | Passive | PassiveStatic, Passive$1, create, deps);
} else {
return mountEffectImpl(Passive | PassiveStatic, Passive$1, create, deps);
}
}
function updateEffect(create, deps) {
return updateEffectImpl(Passive, Passive$1, create, deps);
}
function mountInsertionEffect(create, deps) {
return mountEffectImpl(Update, Insertion, create, deps);
}
function updateInsertionEffect(create, deps) {
return updateEffectImpl(Update, Insertion, create, deps);
}
function mountLayoutEffect(create, deps) {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
return mountEffectImpl(fiberFlags, Layout, create, deps);
}
function updateLayoutEffect(create, deps) {
return updateEffectImpl(Update, Layout, create, deps);
}
function imperativeHandleEffect(create, ref) {
if (typeof ref === "function") {
var refCallback = ref;
var _inst = create();
refCallback(_inst);
return function() {
refCallback(null);
};
} else if (ref !== null && ref !== void 0) {
var refObject = ref;
{
if (!refObject.hasOwnProperty("current")) {
error("Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.", "an object with keys {" + Object.keys(refObject).join(", ") + "}");
}
}
var _inst2 = create();
refObject.current = _inst2;
return function() {
refObject.current = null;
};
}
}
function mountImperativeHandle(ref, create, deps) {
{
if (typeof create !== "function") {
error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create !== null ? typeof create : "null");
}
}
var effectDeps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null;
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ((currentlyRenderingFiber$1.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
return mountEffectImpl(fiberFlags, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}
function updateImperativeHandle(ref, create, deps) {
{
if (typeof create !== "function") {
error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.", create !== null ? typeof create : "null");
}
}
var effectDeps = deps !== null && deps !== void 0 ? deps.concat([ref]) : null;
return updateEffectImpl(Update, Layout, imperativeHandleEffect.bind(null, create, ref), effectDeps);
}
function mountDebugValue(value, formatterFn) {
}
var updateDebugValue = mountDebugValue;
function mountCallback(callback, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
hook.memoizedState = [callback, nextDeps];
return callback;
}
function updateCallback(callback, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
var prevState = hook.memoizedState;
if (prevState !== null) {
if (nextDeps !== null) {
var prevDeps = prevState[1];
if (areHookInputsEqual(nextDeps, prevDeps)) {
return prevState[0];
}
}
}
hook.memoizedState = [callback, nextDeps];
return callback;
}
function mountMemo(nextCreate, deps) {
var hook = mountWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
var nextValue = nextCreate();
hook.memoizedState = [nextValue, nextDeps];
return nextValue;
}
function updateMemo(nextCreate, deps) {
var hook = updateWorkInProgressHook();
var nextDeps = deps === void 0 ? null : deps;
var prevState = hook.memoizedState;
if (prevState !== null) {
if (nextDeps !== null) {
var prevDeps = prevState[1];
if (areHookInputsEqual(nextDeps, prevDeps)) {
return prevState[0];
}
}
}
var nextValue = nextCreate();
hook.memoizedState = [nextValue, nextDeps];
return nextValue;
}
function mountDeferredValue(value) {
var hook = mountWorkInProgressHook();
hook.memoizedState = value;
return value;
}
function updateDeferredValue(value) {
var hook = updateWorkInProgressHook();
var resolvedCurrentHook = currentHook;
var prevValue = resolvedCurrentHook.memoizedState;
return updateDeferredValueImpl(hook, prevValue, value);
}
function rerenderDeferredValue(value) {
var hook = updateWorkInProgressHook();
if (currentHook === null) {
hook.memoizedState = value;
return value;
} else {
var prevValue = currentHook.memoizedState;
return updateDeferredValueImpl(hook, prevValue, value);
}
}
function updateDeferredValueImpl(hook, prevValue, value) {
var shouldDeferValue = !includesOnlyNonUrgentLanes(renderLanes);
if (shouldDeferValue) {
if (!objectIs(value, prevValue)) {
var deferredLane = claimNextTransitionLane();
currentlyRenderingFiber$1.lanes = mergeLanes(currentlyRenderingFiber$1.lanes, deferredLane);
markSkippedUpdateLanes(deferredLane);
hook.baseState = true;
}
return prevValue;
} else {
if (hook.baseState) {
hook.baseState = false;
markWorkInProgressReceivedUpdate();
}
hook.memoizedState = value;
return value;
}
}
function startTransition(setPending, callback, options2) {
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(higherEventPriority(previousPriority, ContinuousEventPriority));
setPending(true);
var prevTransition = ReactCurrentBatchConfig$2.transition;
ReactCurrentBatchConfig$2.transition = {};
var currentTransition = ReactCurrentBatchConfig$2.transition;
{
ReactCurrentBatchConfig$2.transition._updatedFibers = /* @__PURE__ */ new Set();
}
try {
setPending(false);
callback();
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$2.transition = prevTransition;
{
if (prevTransition === null && currentTransition._updatedFibers) {
var updatedFibersCount = currentTransition._updatedFibers.size;
if (updatedFibersCount > 10) {
warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.");
}
currentTransition._updatedFibers.clear();
}
}
}
}
function mountTransition() {
var _mountState = mountState(false), isPending = _mountState[0], setPending = _mountState[1];
var start = startTransition.bind(null, setPending);
var hook = mountWorkInProgressHook();
hook.memoizedState = start;
return [isPending, start];
}
function updateTransition() {
var _updateState = updateState(), isPending = _updateState[0];
var hook = updateWorkInProgressHook();
var start = hook.memoizedState;
return [isPending, start];
}
function rerenderTransition() {
var _rerenderState = rerenderState(), isPending = _rerenderState[0];
var hook = updateWorkInProgressHook();
var start = hook.memoizedState;
return [isPending, start];
}
var isUpdatingOpaqueValueInRenderPhase = false;
function getIsUpdatingOpaqueValueInRenderPhaseInDEV() {
{
return isUpdatingOpaqueValueInRenderPhase;
}
}
function mountId() {
var hook = mountWorkInProgressHook();
var root2 = getWorkInProgressRoot();
var identifierPrefix = root2.identifierPrefix;
var id;
if (getIsHydrating()) {
var treeId = getTreeId();
id = ":" + identifierPrefix + "R" + treeId;
var localId = localIdCounter++;
if (localId > 0) {
id += "H" + localId.toString(32);
}
id += ":";
} else {
var globalClientId = globalClientIdCounter++;
id = ":" + identifierPrefix + "r" + globalClientId.toString(32) + ":";
}
hook.memoizedState = id;
return id;
}
function updateId() {
var hook = updateWorkInProgressHook();
var id = hook.memoizedState;
return id;
}
function dispatchReducerAction(fiber, queue, action) {
{
if (typeof arguments[3] === "function") {
error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
}
}
var lane = requestUpdateLane(fiber);
var update = {
lane,
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
enqueueRenderPhaseUpdate(queue, update);
} else {
var root2 = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (root2 !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
entangleTransitionUpdate(root2, queue, lane);
}
}
markUpdateInDevTools(fiber, lane);
}
function dispatchSetState(fiber, queue, action) {
{
if (typeof arguments[3] === "function") {
error("State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().");
}
}
var lane = requestUpdateLane(fiber);
var update = {
lane,
action,
hasEagerState: false,
eagerState: null,
next: null
};
if (isRenderPhaseUpdate(fiber)) {
enqueueRenderPhaseUpdate(queue, update);
} else {
var alternate = fiber.alternate;
if (fiber.lanes === NoLanes && (alternate === null || alternate.lanes === NoLanes)) {
var lastRenderedReducer = queue.lastRenderedReducer;
if (lastRenderedReducer !== null) {
var prevDispatcher;
{
prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
}
try {
var currentState = queue.lastRenderedState;
var eagerState = lastRenderedReducer(currentState, action);
update.hasEagerState = true;
update.eagerState = eagerState;
if (objectIs(eagerState, currentState)) {
enqueueConcurrentHookUpdateAndEagerlyBailout(fiber, queue, update, lane);
return;
}
} catch (error2) {
} finally {
{
ReactCurrentDispatcher$1.current = prevDispatcher;
}
}
}
}
var root2 = enqueueConcurrentHookUpdate(fiber, queue, update, lane);
if (root2 !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
entangleTransitionUpdate(root2, queue, lane);
}
}
markUpdateInDevTools(fiber, lane);
}
function isRenderPhaseUpdate(fiber) {
var alternate = fiber.alternate;
return fiber === currentlyRenderingFiber$1 || alternate !== null && alternate === currentlyRenderingFiber$1;
}
function enqueueRenderPhaseUpdate(queue, update) {
didScheduleRenderPhaseUpdateDuringThisPass = didScheduleRenderPhaseUpdate = true;
var pending = queue.pending;
if (pending === null) {
update.next = update;
} else {
update.next = pending.next;
pending.next = update;
}
queue.pending = update;
}
function entangleTransitionUpdate(root2, queue, lane) {
if (isTransitionLane(lane)) {
var queueLanes = queue.lanes;
queueLanes = intersectLanes(queueLanes, root2.pendingLanes);
var newQueueLanes = mergeLanes(queueLanes, lane);
queue.lanes = newQueueLanes;
markRootEntangled(root2, newQueueLanes);
}
}
function markUpdateInDevTools(fiber, lane, action) {
{
markStateUpdateScheduled(fiber, lane);
}
}
var ContextOnlyDispatcher = {
readContext,
useCallback: throwInvalidHookError,
useContext: throwInvalidHookError,
useEffect: throwInvalidHookError,
useImperativeHandle: throwInvalidHookError,
useInsertionEffect: throwInvalidHookError,
useLayoutEffect: throwInvalidHookError,
useMemo: throwInvalidHookError,
useReducer: throwInvalidHookError,
useRef: throwInvalidHookError,
useState: throwInvalidHookError,
useDebugValue: throwInvalidHookError,
useDeferredValue: throwInvalidHookError,
useTransition: throwInvalidHookError,
useMutableSource: throwInvalidHookError,
useSyncExternalStore: throwInvalidHookError,
useId: throwInvalidHookError,
unstable_isNewReconciler: enableNewReconciler
};
var HooksDispatcherOnMountInDEV = null;
var HooksDispatcherOnMountWithHookTypesInDEV = null;
var HooksDispatcherOnUpdateInDEV = null;
var HooksDispatcherOnRerenderInDEV = null;
var InvalidNestedHooksDispatcherOnMountInDEV = null;
var InvalidNestedHooksDispatcherOnUpdateInDEV = null;
var InvalidNestedHooksDispatcherOnRerenderInDEV = null;
{
var warnInvalidContextAccess = function() {
error("Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().");
};
var warnInvalidHookAccess = function() {
error("Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://reactjs.org/link/rules-of-hooks");
};
HooksDispatcherOnMountInDEV = {
readContext: function(context) {
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
mountHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
return mountLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
mountHookTypesDev();
checkDepsAreArrayDev(deps);
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function(initialState) {
currentHookNameInDev = "useState";
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
mountHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
mountHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
mountHookTypesDev();
return mountTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
mountHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
mountHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnMountWithHookTypesInDEV = {
readContext: function(context) {
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
updateHookTypesDev();
return mountCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
updateHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return mountEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
updateHookTypesDev();
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
updateHookTypesDev();
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
updateHookTypesDev();
return mountLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
updateHookTypesDev();
return mountRef(initialValue);
},
useState: function(initialState) {
currentHookNameInDev = "useState";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
updateHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
updateHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
updateHookTypesDev();
return mountTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
updateHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
updateHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
updateHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnUpdateInDEV = {
readContext: function(context) {
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
updateHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
updateHookTypesDev();
return updateRef();
},
useState: function(initialState) {
currentHookNameInDev = "useState";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
updateHookTypesDev();
return updateDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
updateHookTypesDev();
return updateTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
HooksDispatcherOnRerenderInDEV = {
readContext: function(context) {
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
updateHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
updateHookTypesDev();
return updateRef();
},
useState: function(initialState) {
currentHookNameInDev = "useState";
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnRerenderInDEV;
try {
return rerenderState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
updateHookTypesDev();
return rerenderDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
updateHookTypesDev();
return rerenderTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnMountInDEV = {
readContext: function(context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
warnInvalidHookAccess();
mountHookTypesDev();
return mountCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
warnInvalidHookAccess();
mountHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
warnInvalidHookAccess();
mountHookTypesDev();
return mountImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
warnInvalidHookAccess();
mountHookTypesDev();
return mountLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
warnInvalidHookAccess();
mountHookTypesDev();
return mountRef(initialValue);
},
useState: function(initialState) {
currentHookNameInDev = "useState";
warnInvalidHookAccess();
mountHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnMountInDEV;
try {
return mountState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
warnInvalidHookAccess();
mountHookTypesDev();
return mountDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
warnInvalidHookAccess();
mountHookTypesDev();
return mountDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
warnInvalidHookAccess();
mountHookTypesDev();
return mountTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
warnInvalidHookAccess();
mountHookTypesDev();
return mountMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
warnInvalidHookAccess();
mountHookTypesDev();
return mountSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
warnInvalidHookAccess();
mountHookTypesDev();
return mountId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnUpdateInDEV = {
readContext: function(context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
warnInvalidHookAccess();
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
warnInvalidHookAccess();
updateHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
warnInvalidHookAccess();
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
warnInvalidHookAccess();
updateHookTypesDev();
return updateRef();
},
useState: function(initialState) {
currentHookNameInDev = "useState";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
warnInvalidHookAccess();
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
warnInvalidHookAccess();
updateHookTypesDev();
return updateDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
warnInvalidHookAccess();
updateHookTypesDev();
return updateTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
warnInvalidHookAccess();
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
warnInvalidHookAccess();
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
warnInvalidHookAccess();
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
InvalidNestedHooksDispatcherOnRerenderInDEV = {
readContext: function(context) {
warnInvalidContextAccess();
return readContext(context);
},
useCallback: function(callback, deps) {
currentHookNameInDev = "useCallback";
warnInvalidHookAccess();
updateHookTypesDev();
return updateCallback(callback, deps);
},
useContext: function(context) {
currentHookNameInDev = "useContext";
warnInvalidHookAccess();
updateHookTypesDev();
return readContext(context);
},
useEffect: function(create, deps) {
currentHookNameInDev = "useEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateEffect(create, deps);
},
useImperativeHandle: function(ref, create, deps) {
currentHookNameInDev = "useImperativeHandle";
warnInvalidHookAccess();
updateHookTypesDev();
return updateImperativeHandle(ref, create, deps);
},
useInsertionEffect: function(create, deps) {
currentHookNameInDev = "useInsertionEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateInsertionEffect(create, deps);
},
useLayoutEffect: function(create, deps) {
currentHookNameInDev = "useLayoutEffect";
warnInvalidHookAccess();
updateHookTypesDev();
return updateLayoutEffect(create, deps);
},
useMemo: function(create, deps) {
currentHookNameInDev = "useMemo";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return updateMemo(create, deps);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useReducer: function(reducer2, initialArg, init) {
currentHookNameInDev = "useReducer";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderReducer(reducer2, initialArg, init);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useRef: function(initialValue) {
currentHookNameInDev = "useRef";
warnInvalidHookAccess();
updateHookTypesDev();
return updateRef();
},
useState: function(initialState) {
currentHookNameInDev = "useState";
warnInvalidHookAccess();
updateHookTypesDev();
var prevDispatcher = ReactCurrentDispatcher$1.current;
ReactCurrentDispatcher$1.current = InvalidNestedHooksDispatcherOnUpdateInDEV;
try {
return rerenderState(initialState);
} finally {
ReactCurrentDispatcher$1.current = prevDispatcher;
}
},
useDebugValue: function(value, formatterFn) {
currentHookNameInDev = "useDebugValue";
warnInvalidHookAccess();
updateHookTypesDev();
return updateDebugValue();
},
useDeferredValue: function(value) {
currentHookNameInDev = "useDeferredValue";
warnInvalidHookAccess();
updateHookTypesDev();
return rerenderDeferredValue(value);
},
useTransition: function() {
currentHookNameInDev = "useTransition";
warnInvalidHookAccess();
updateHookTypesDev();
return rerenderTransition();
},
useMutableSource: function(source, getSnapshot, subscribe) {
currentHookNameInDev = "useMutableSource";
warnInvalidHookAccess();
updateHookTypesDev();
return updateMutableSource();
},
useSyncExternalStore: function(subscribe, getSnapshot, getServerSnapshot) {
currentHookNameInDev = "useSyncExternalStore";
warnInvalidHookAccess();
updateHookTypesDev();
return updateSyncExternalStore(subscribe, getSnapshot);
},
useId: function() {
currentHookNameInDev = "useId";
warnInvalidHookAccess();
updateHookTypesDev();
return updateId();
},
unstable_isNewReconciler: enableNewReconciler
};
}
var now$1 = Scheduler.unstable_now;
var commitTime = 0;
var layoutEffectStartTime = -1;
var profilerStartTime = -1;
var passiveEffectStartTime = -1;
var currentUpdateIsNested = false;
var nestedUpdateScheduled = false;
function isCurrentUpdateNested() {
return currentUpdateIsNested;
}
function markNestedUpdateScheduled() {
{
nestedUpdateScheduled = true;
}
}
function resetNestedUpdateFlag() {
{
currentUpdateIsNested = false;
nestedUpdateScheduled = false;
}
}
function syncNestedUpdateFlag() {
{
currentUpdateIsNested = nestedUpdateScheduled;
nestedUpdateScheduled = false;
}
}
function getCommitTime() {
return commitTime;
}
function recordCommitTime() {
commitTime = now$1();
}
function startProfilerTimer(fiber) {
profilerStartTime = now$1();
if (fiber.actualStartTime < 0) {
fiber.actualStartTime = now$1();
}
}
function stopProfilerTimerIfRunning(fiber) {
profilerStartTime = -1;
}
function stopProfilerTimerIfRunningAndRecordDelta(fiber, overrideBaseTime) {
if (profilerStartTime >= 0) {
var elapsedTime = now$1() - profilerStartTime;
fiber.actualDuration += elapsedTime;
if (overrideBaseTime) {
fiber.selfBaseDuration = elapsedTime;
}
profilerStartTime = -1;
}
}
function recordLayoutEffectDuration(fiber) {
if (layoutEffectStartTime >= 0) {
var elapsedTime = now$1() - layoutEffectStartTime;
layoutEffectStartTime = -1;
var parentFiber = fiber.return;
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root2 = parentFiber.stateNode;
root2.effectDuration += elapsedTime;
return;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.effectDuration += elapsedTime;
return;
}
parentFiber = parentFiber.return;
}
}
}
function recordPassiveEffectDuration(fiber) {
if (passiveEffectStartTime >= 0) {
var elapsedTime = now$1() - passiveEffectStartTime;
passiveEffectStartTime = -1;
var parentFiber = fiber.return;
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root2 = parentFiber.stateNode;
if (root2 !== null) {
root2.passiveEffectDuration += elapsedTime;
}
return;
case Profiler:
var parentStateNode = parentFiber.stateNode;
if (parentStateNode !== null) {
parentStateNode.passiveEffectDuration += elapsedTime;
}
return;
}
parentFiber = parentFiber.return;
}
}
}
function startLayoutEffectTimer() {
layoutEffectStartTime = now$1();
}
function startPassiveEffectTimer() {
passiveEffectStartTime = now$1();
}
function transferActualDuration(fiber) {
var child = fiber.child;
while (child) {
fiber.actualDuration += child.actualDuration;
child = child.sibling;
}
}
function resolveDefaultProps(Component3, baseProps) {
if (Component3 && Component3.defaultProps) {
var props = assign({}, baseProps);
var defaultProps = Component3.defaultProps;
for (var propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
return props;
}
return baseProps;
}
var fakeInternalInstance = {};
var didWarnAboutStateAssignmentForComponent;
var didWarnAboutUninitializedState;
var didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate;
var didWarnAboutLegacyLifecyclesAndDerivedState;
var didWarnAboutUndefinedDerivedState;
var warnOnUndefinedDerivedState;
var warnOnInvalidCallback;
var didWarnAboutDirectlyAssigningPropsToState;
var didWarnAboutContextTypeAndContextTypes;
var didWarnAboutInvalidateContextType;
var didWarnAboutLegacyContext$1;
{
didWarnAboutStateAssignmentForComponent = /* @__PURE__ */ new Set();
didWarnAboutUninitializedState = /* @__PURE__ */ new Set();
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate = /* @__PURE__ */ new Set();
didWarnAboutLegacyLifecyclesAndDerivedState = /* @__PURE__ */ new Set();
didWarnAboutDirectlyAssigningPropsToState = /* @__PURE__ */ new Set();
didWarnAboutUndefinedDerivedState = /* @__PURE__ */ new Set();
didWarnAboutContextTypeAndContextTypes = /* @__PURE__ */ new Set();
didWarnAboutInvalidateContextType = /* @__PURE__ */ new Set();
didWarnAboutLegacyContext$1 = /* @__PURE__ */ new Set();
var didWarnOnInvalidCallback = /* @__PURE__ */ new Set();
warnOnInvalidCallback = function(callback, callerName) {
if (callback === null || typeof callback === "function") {
return;
}
var key2 = callerName + "_" + callback;
if (!didWarnOnInvalidCallback.has(key2)) {
didWarnOnInvalidCallback.add(key2);
error("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", callerName, callback);
}
};
warnOnUndefinedDerivedState = function(type, partialState) {
if (partialState === void 0) {
var componentName = getComponentNameFromType(type) || "Component";
if (!didWarnAboutUndefinedDerivedState.has(componentName)) {
didWarnAboutUndefinedDerivedState.add(componentName);
error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.", componentName);
}
}
};
Object.defineProperty(fakeInternalInstance, "_processChildContext", {
enumerable: false,
value: function() {
throw new Error("_processChildContext is not available in React 16+. This likely means you have multiple copies of React and are attempting to nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer, which isn't supported. Try to make sure you have only one copy of React (and ideally, switch to ReactDOM.createPortal).");
}
});
Object.freeze(fakeInternalInstance);
}
function applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, nextProps) {
var prevState = workInProgress2.memoizedState;
var partialState = getDerivedStateFromProps(nextProps, prevState);
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
partialState = getDerivedStateFromProps(nextProps, prevState);
} finally {
setIsStrictModeForDevtools(false);
}
}
warnOnUndefinedDerivedState(ctor, partialState);
}
var memoizedState = partialState === null || partialState === void 0 ? prevState : assign({}, prevState, partialState);
workInProgress2.memoizedState = memoizedState;
if (workInProgress2.lanes === NoLanes) {
var updateQueue = workInProgress2.updateQueue;
updateQueue.baseState = memoizedState;
}
}
var classComponentUpdater = {
isMounted,
enqueueSetState: function(inst, payload, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.payload = payload;
if (callback !== void 0 && callback !== null) {
{
warnOnInvalidCallback(callback, "setState");
}
update.callback = callback;
}
var root2 = enqueueUpdate(fiber, update, lane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
entangleTransitions(root2, fiber, lane);
}
{
markStateUpdateScheduled(fiber, lane);
}
},
enqueueReplaceState: function(inst, payload, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.tag = ReplaceState;
update.payload = payload;
if (callback !== void 0 && callback !== null) {
{
warnOnInvalidCallback(callback, "replaceState");
}
update.callback = callback;
}
var root2 = enqueueUpdate(fiber, update, lane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
entangleTransitions(root2, fiber, lane);
}
{
markStateUpdateScheduled(fiber, lane);
}
},
enqueueForceUpdate: function(inst, callback) {
var fiber = get(inst);
var eventTime = requestEventTime();
var lane = requestUpdateLane(fiber);
var update = createUpdate(eventTime, lane);
update.tag = ForceUpdate;
if (callback !== void 0 && callback !== null) {
{
warnOnInvalidCallback(callback, "forceUpdate");
}
update.callback = callback;
}
var root2 = enqueueUpdate(fiber, update, lane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
entangleTransitions(root2, fiber, lane);
}
{
markForceUpdateScheduled(fiber, lane);
}
}
};
function checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) {
var instance = workInProgress2.stateNode;
if (typeof instance.shouldComponentUpdate === "function") {
var shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
shouldUpdate = instance.shouldComponentUpdate(newProps, newState, nextContext);
} finally {
setIsStrictModeForDevtools(false);
}
}
if (shouldUpdate === void 0) {
error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.", getComponentNameFromType(ctor) || "Component");
}
}
return shouldUpdate;
}
if (ctor.prototype && ctor.prototype.isPureReactComponent) {
return !shallowEqual(oldProps, newProps) || !shallowEqual(oldState, newState);
}
return true;
}
function checkClassInstance(workInProgress2, ctor, newProps) {
var instance = workInProgress2.stateNode;
{
var name = getComponentNameFromType(ctor) || "Component";
var renderPresent = instance.render;
if (!renderPresent) {
if (ctor.prototype && typeof ctor.prototype.render === "function") {
error("%s(...): No `render` method found on the returned component instance: did you accidentally return an object from the constructor?", name);
} else {
error("%s(...): No `render` method found on the returned component instance: you may have forgotten to define `render`.", name);
}
}
if (instance.getInitialState && !instance.getInitialState.isReactClassApproved && !instance.state) {
error("getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?", name);
}
if (instance.getDefaultProps && !instance.getDefaultProps.isReactClassApproved) {
error("getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.", name);
}
if (instance.propTypes) {
error("propTypes was defined as an instance property on %s. Use a static property to define propTypes instead.", name);
}
if (instance.contextType) {
error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.", name);
}
{
if (ctor.childContextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip
// this one.
(workInProgress2.mode & StrictLegacyMode) === NoMode) {
didWarnAboutLegacyContext$1.add(ctor);
error("%s uses the legacy childContextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() instead\n\n.Learn more about this warning here: https://reactjs.org/link/legacy-context", name);
}
if (ctor.contextTypes && !didWarnAboutLegacyContext$1.has(ctor) && // Strict Mode has its own warning for legacy context, so we can skip
// this one.
(workInProgress2.mode & StrictLegacyMode) === NoMode) {
didWarnAboutLegacyContext$1.add(ctor);
error("%s uses the legacy contextTypes API which is no longer supported and will be removed in the next major release. Use React.createContext() with static contextType instead.\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", name);
}
if (instance.contextTypes) {
error("contextTypes was defined as an instance property on %s. Use a static property to define contextTypes instead.", name);
}
if (ctor.contextType && ctor.contextTypes && !didWarnAboutContextTypeAndContextTypes.has(ctor)) {
didWarnAboutContextTypeAndContextTypes.add(ctor);
error("%s declares both contextTypes and contextType static properties. The legacy contextTypes property will be ignored.", name);
}
}
if (typeof instance.componentShouldUpdate === "function") {
error("%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.", name);
}
if (ctor.prototype && ctor.prototype.isPureReactComponent && typeof instance.shouldComponentUpdate !== "undefined") {
error("%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.", getComponentNameFromType(ctor) || "A pure component");
}
if (typeof instance.componentDidUnmount === "function") {
error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?", name);
}
if (typeof instance.componentDidReceiveProps === "function") {
error("%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().", name);
}
if (typeof instance.componentWillRecieveProps === "function") {
error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?", name);
}
if (typeof instance.UNSAFE_componentWillRecieveProps === "function") {
error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?", name);
}
var hasMutatedProps = instance.props !== newProps;
if (instance.props !== void 0 && hasMutatedProps) {
error("%s(...): When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.", name, name);
}
if (instance.defaultProps) {
error("Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.", name, name);
}
if (typeof instance.getSnapshotBeforeUpdate === "function" && typeof instance.componentDidUpdate !== "function" && !didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.has(ctor)) {
didWarnAboutGetSnapshotBeforeUpdateWithoutDidUpdate.add(ctor);
error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.", getComponentNameFromType(ctor));
}
if (typeof instance.getDerivedStateFromProps === "function") {
error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name);
}
if (typeof instance.getDerivedStateFromError === "function") {
error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.", name);
}
if (typeof ctor.getSnapshotBeforeUpdate === "function") {
error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.", name);
}
var _state = instance.state;
if (_state && (typeof _state !== "object" || isArray(_state))) {
error("%s.state: must be set to an object or null", name);
}
if (typeof instance.getChildContext === "function" && typeof ctor.childContextTypes !== "object") {
error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().", name);
}
}
}
function adoptClassInstance(workInProgress2, instance) {
instance.updater = classComponentUpdater;
workInProgress2.stateNode = instance;
set2(instance, workInProgress2);
{
instance._reactInternalInstance = fakeInternalInstance;
}
}
function constructClassInstance(workInProgress2, ctor, props) {
var isLegacyContextConsumer = false;
var unmaskedContext = emptyContextObject;
var context = emptyContextObject;
var contextType = ctor.contextType;
{
if ("contextType" in ctor) {
var isValid = (
// Allow null for conditional declaration
contextType === null || contextType !== void 0 && contextType.$$typeof === REACT_CONTEXT_TYPE && contextType._context === void 0
);
if (!isValid && !didWarnAboutInvalidateContextType.has(ctor)) {
didWarnAboutInvalidateContextType.add(ctor);
var addendum = "";
if (contextType === void 0) {
addendum = " However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.";
} else if (typeof contextType !== "object") {
addendum = " However, it is set to a " + typeof contextType + ".";
} else if (contextType.$$typeof === REACT_PROVIDER_TYPE) {
addendum = " Did you accidentally pass the Context.Provider instead?";
} else if (contextType._context !== void 0) {
addendum = " Did you accidentally pass the Context.Consumer instead?";
} else {
addendum = " However, it is set to an object with keys {" + Object.keys(contextType).join(", ") + "}.";
}
error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s", getComponentNameFromType(ctor) || "Component", addendum);
}
}
}
if (typeof contextType === "object" && contextType !== null) {
context = readContext(contextType);
} else {
unmaskedContext = getUnmaskedContext(workInProgress2, ctor, true);
var contextTypes = ctor.contextTypes;
isLegacyContextConsumer = contextTypes !== null && contextTypes !== void 0;
context = isLegacyContextConsumer ? getMaskedContext(workInProgress2, unmaskedContext) : emptyContextObject;
}
var instance = new ctor(props, context);
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
instance = new ctor(props, context);
} finally {
setIsStrictModeForDevtools(false);
}
}
}
var state = workInProgress2.memoizedState = instance.state !== null && instance.state !== void 0 ? instance.state : null;
adoptClassInstance(workInProgress2, instance);
{
if (typeof ctor.getDerivedStateFromProps === "function" && state === null) {
var componentName = getComponentNameFromType(ctor) || "Component";
if (!didWarnAboutUninitializedState.has(componentName)) {
didWarnAboutUninitializedState.add(componentName);
error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.", componentName, instance.state === null ? "null" : "undefined", componentName);
}
}
if (typeof ctor.getDerivedStateFromProps === "function" || typeof instance.getSnapshotBeforeUpdate === "function") {
var foundWillMountName = null;
var foundWillReceivePropsName = null;
var foundWillUpdateName = null;
if (typeof instance.componentWillMount === "function" && instance.componentWillMount.__suppressDeprecationWarning !== true) {
foundWillMountName = "componentWillMount";
} else if (typeof instance.UNSAFE_componentWillMount === "function") {
foundWillMountName = "UNSAFE_componentWillMount";
}
if (typeof instance.componentWillReceiveProps === "function" && instance.componentWillReceiveProps.__suppressDeprecationWarning !== true) {
foundWillReceivePropsName = "componentWillReceiveProps";
} else if (typeof instance.UNSAFE_componentWillReceiveProps === "function") {
foundWillReceivePropsName = "UNSAFE_componentWillReceiveProps";
}
if (typeof instance.componentWillUpdate === "function" && instance.componentWillUpdate.__suppressDeprecationWarning !== true) {
foundWillUpdateName = "componentWillUpdate";
} else if (typeof instance.UNSAFE_componentWillUpdate === "function") {
foundWillUpdateName = "UNSAFE_componentWillUpdate";
}
if (foundWillMountName !== null || foundWillReceivePropsName !== null || foundWillUpdateName !== null) {
var _componentName = getComponentNameFromType(ctor) || "Component";
var newApiName = typeof ctor.getDerivedStateFromProps === "function" ? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
if (!didWarnAboutLegacyLifecyclesAndDerivedState.has(_componentName)) {
didWarnAboutLegacyLifecyclesAndDerivedState.add(_componentName);
error("Unsafe legacy lifecycles will not be called for components using new component APIs.\n\n%s uses %s but also contains the following legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles", _componentName, newApiName, foundWillMountName !== null ? "\n " + foundWillMountName : "", foundWillReceivePropsName !== null ? "\n " + foundWillReceivePropsName : "", foundWillUpdateName !== null ? "\n " + foundWillUpdateName : "");
}
}
}
}
if (isLegacyContextConsumer) {
cacheContext(workInProgress2, unmaskedContext, context);
}
return instance;
}
function callComponentWillMount(workInProgress2, instance) {
var oldState = instance.state;
if (typeof instance.componentWillMount === "function") {
instance.componentWillMount();
}
if (typeof instance.UNSAFE_componentWillMount === "function") {
instance.UNSAFE_componentWillMount();
}
if (oldState !== instance.state) {
{
error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", getComponentNameFromFiber(workInProgress2) || "Component");
}
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
}
}
function callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext) {
var oldState = instance.state;
if (typeof instance.componentWillReceiveProps === "function") {
instance.componentWillReceiveProps(newProps, nextContext);
}
if (typeof instance.UNSAFE_componentWillReceiveProps === "function") {
instance.UNSAFE_componentWillReceiveProps(newProps, nextContext);
}
if (instance.state !== oldState) {
{
var componentName = getComponentNameFromFiber(workInProgress2) || "Component";
if (!didWarnAboutStateAssignmentForComponent.has(componentName)) {
didWarnAboutStateAssignmentForComponent.add(componentName);
error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.", componentName);
}
}
classComponentUpdater.enqueueReplaceState(instance, instance.state, null);
}
}
function mountClassInstance(workInProgress2, ctor, newProps, renderLanes2) {
{
checkClassInstance(workInProgress2, ctor, newProps);
}
var instance = workInProgress2.stateNode;
instance.props = newProps;
instance.state = workInProgress2.memoizedState;
instance.refs = {};
initializeUpdateQueue(workInProgress2);
var contextType = ctor.contextType;
if (typeof contextType === "object" && contextType !== null) {
instance.context = readContext(contextType);
} else {
var unmaskedContext = getUnmaskedContext(workInProgress2, ctor, true);
instance.context = getMaskedContext(workInProgress2, unmaskedContext);
}
{
if (instance.state === newProps) {
var componentName = getComponentNameFromType(ctor) || "Component";
if (!didWarnAboutDirectlyAssigningPropsToState.has(componentName)) {
didWarnAboutDirectlyAssigningPropsToState.add(componentName);
error("%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.", componentName);
}
}
if (workInProgress2.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress2, instance);
}
{
ReactStrictModeWarnings.recordUnsafeLifecycleWarnings(workInProgress2, instance);
}
}
instance.state = workInProgress2.memoizedState;
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
if (typeof getDerivedStateFromProps === "function") {
applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps);
instance.state = workInProgress2.memoizedState;
}
if (typeof ctor.getDerivedStateFromProps !== "function" && typeof instance.getSnapshotBeforeUpdate !== "function" && (typeof instance.UNSAFE_componentWillMount === "function" || typeof instance.componentWillMount === "function")) {
callComponentWillMount(workInProgress2, instance);
processUpdateQueue(workInProgress2, newProps, instance, renderLanes2);
instance.state = workInProgress2.memoizedState;
}
if (typeof instance.componentDidMount === "function") {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ((workInProgress2.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
workInProgress2.flags |= fiberFlags;
}
}
function resumeMountClassInstance(workInProgress2, ctor, newProps, renderLanes2) {
var instance = workInProgress2.stateNode;
var oldProps = workInProgress2.memoizedProps;
instance.props = oldProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
if (typeof contextType === "object" && contextType !== null) {
nextContext = readContext(contextType);
} else {
var nextLegacyUnmaskedContext = getUnmaskedContext(workInProgress2, ctor, true);
nextContext = getMaskedContext(workInProgress2, nextLegacyUnmaskedContext);
}
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
var hasNewLifecycles = typeof getDerivedStateFromProps === "function" || typeof instance.getSnapshotBeforeUpdate === "function";
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === "function" || typeof instance.componentWillReceiveProps === "function")) {
if (oldProps !== newProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext);
}
}
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress2.memoizedState;
var newState = instance.state = oldState;
processUpdateQueue(workInProgress2, newProps, instance, renderLanes2);
newState = workInProgress2.memoizedState;
if (oldProps === newProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing()) {
if (typeof instance.componentDidMount === "function") {
var fiberFlags = Update;
{
fiberFlags |= LayoutStatic;
}
if ((workInProgress2.mode & StrictEffectsMode) !== NoMode) {
fiberFlags |= MountLayoutDev;
}
workInProgress2.flags |= fiberFlags;
}
return false;
}
if (typeof getDerivedStateFromProps === "function") {
applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps);
newState = workInProgress2.memoizedState;
}
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext);
if (shouldUpdate) {
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillMount === "function" || typeof instance.componentWillMount === "function")) {
if (typeof instance.componentWillMount === "function") {
instance.componentWillMount();
}
if (typeof instance.UNSAFE_componentWillMount === "function") {
instance.UNSAFE_componentWillMount();
}
}
if (typeof instance.componentDidMount === "function") {
var _fiberFlags = Update;
{
_fiberFlags |= LayoutStatic;
}
if ((workInProgress2.mode & StrictEffectsMode) !== NoMode) {
_fiberFlags |= MountLayoutDev;
}
workInProgress2.flags |= _fiberFlags;
}
} else {
if (typeof instance.componentDidMount === "function") {
var _fiberFlags2 = Update;
{
_fiberFlags2 |= LayoutStatic;
}
if ((workInProgress2.mode & StrictEffectsMode) !== NoMode) {
_fiberFlags2 |= MountLayoutDev;
}
workInProgress2.flags |= _fiberFlags2;
}
workInProgress2.memoizedProps = newProps;
workInProgress2.memoizedState = newState;
}
instance.props = newProps;
instance.state = newState;
instance.context = nextContext;
return shouldUpdate;
}
function updateClassInstance(current3, workInProgress2, ctor, newProps, renderLanes2) {
var instance = workInProgress2.stateNode;
cloneUpdateQueue(current3, workInProgress2);
var unresolvedOldProps = workInProgress2.memoizedProps;
var oldProps = workInProgress2.type === workInProgress2.elementType ? unresolvedOldProps : resolveDefaultProps(workInProgress2.type, unresolvedOldProps);
instance.props = oldProps;
var unresolvedNewProps = workInProgress2.pendingProps;
var oldContext = instance.context;
var contextType = ctor.contextType;
var nextContext = emptyContextObject;
if (typeof contextType === "object" && contextType !== null) {
nextContext = readContext(contextType);
} else {
var nextUnmaskedContext = getUnmaskedContext(workInProgress2, ctor, true);
nextContext = getMaskedContext(workInProgress2, nextUnmaskedContext);
}
var getDerivedStateFromProps = ctor.getDerivedStateFromProps;
var hasNewLifecycles = typeof getDerivedStateFromProps === "function" || typeof instance.getSnapshotBeforeUpdate === "function";
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillReceiveProps === "function" || typeof instance.componentWillReceiveProps === "function")) {
if (unresolvedOldProps !== unresolvedNewProps || oldContext !== nextContext) {
callComponentWillReceiveProps(workInProgress2, instance, newProps, nextContext);
}
}
resetHasForceUpdateBeforeProcessing();
var oldState = workInProgress2.memoizedState;
var newState = instance.state = oldState;
processUpdateQueue(workInProgress2, newProps, instance, renderLanes2);
newState = workInProgress2.memoizedState;
if (unresolvedOldProps === unresolvedNewProps && oldState === newState && !hasContextChanged() && !checkHasForceUpdateAfterProcessing() && !enableLazyContextPropagation) {
if (typeof instance.componentDidUpdate === "function") {
if (unresolvedOldProps !== current3.memoizedProps || oldState !== current3.memoizedState) {
workInProgress2.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === "function") {
if (unresolvedOldProps !== current3.memoizedProps || oldState !== current3.memoizedState) {
workInProgress2.flags |= Snapshot;
}
}
return false;
}
if (typeof getDerivedStateFromProps === "function") {
applyDerivedStateFromProps(workInProgress2, ctor, getDerivedStateFromProps, newProps);
newState = workInProgress2.memoizedState;
}
var shouldUpdate = checkHasForceUpdateAfterProcessing() || checkShouldComponentUpdate(workInProgress2, ctor, oldProps, newProps, oldState, newState, nextContext) || // TODO: In some cases, we'll end up checking if context has changed twice,
// both before and after `shouldComponentUpdate` has been called. Not ideal,
// but I'm loath to refactor this function. This only happens for memoized
// components so it's not that common.
enableLazyContextPropagation;
if (shouldUpdate) {
if (!hasNewLifecycles && (typeof instance.UNSAFE_componentWillUpdate === "function" || typeof instance.componentWillUpdate === "function")) {
if (typeof instance.componentWillUpdate === "function") {
instance.componentWillUpdate(newProps, newState, nextContext);
}
if (typeof instance.UNSAFE_componentWillUpdate === "function") {
instance.UNSAFE_componentWillUpdate(newProps, newState, nextContext);
}
}
if (typeof instance.componentDidUpdate === "function") {
workInProgress2.flags |= Update;
}
if (typeof instance.getSnapshotBeforeUpdate === "function") {
workInProgress2.flags |= Snapshot;
}
} else {
if (typeof instance.componentDidUpdate === "function") {
if (unresolvedOldProps !== current3.memoizedProps || oldState !== current3.memoizedState) {
workInProgress2.flags |= Update;
}
}
if (typeof instance.getSnapshotBeforeUpdate === "function") {
if (unresolvedOldProps !== current3.memoizedProps || oldState !== current3.memoizedState) {
workInProgress2.flags |= Snapshot;
}
}
workInProgress2.memoizedProps = newProps;
workInProgress2.memoizedState = newState;
}
instance.props = newProps;
instance.state = newState;
instance.context = nextContext;
return shouldUpdate;
}
function createCapturedValueAtFiber(value, source) {
return {
value,
source,
stack: getStackByFiberInDevAndProd(source),
digest: null
};
}
function createCapturedValue(value, digest, stack) {
return {
value,
source: null,
stack: stack != null ? stack : null,
digest: digest != null ? digest : null
};
}
function showErrorDialog(boundary, errorInfo) {
return true;
}
function logCapturedError(boundary, errorInfo) {
try {
var logError = showErrorDialog(boundary, errorInfo);
if (logError === false) {
return;
}
var error2 = errorInfo.value;
if (true) {
var source = errorInfo.source;
var stack = errorInfo.stack;
var componentStack = stack !== null ? stack : "";
if (error2 != null && error2._suppressLogging) {
if (boundary.tag === ClassComponent) {
return;
}
console["error"](error2);
}
var componentName = source ? getComponentNameFromFiber(source) : null;
var componentNameMessage = componentName ? "The above error occurred in the <" + componentName + "> component:" : "The above error occurred in one of your React components:";
var errorBoundaryMessage;
if (boundary.tag === HostRoot) {
errorBoundaryMessage = "Consider adding an error boundary to your tree to customize error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more about error boundaries.";
} else {
var errorBoundaryName = getComponentNameFromFiber(boundary) || "Anonymous";
errorBoundaryMessage = "React will try to recreate this component tree from scratch " + ("using the error boundary you provided, " + errorBoundaryName + ".");
}
var combinedMessage = componentNameMessage + "\n" + componentStack + "\n\n" + ("" + errorBoundaryMessage);
console["error"](combinedMessage);
} else {
console["error"](error2);
}
} catch (e) {
setTimeout(function() {
throw e;
});
}
}
var PossiblyWeakMap$1 = typeof WeakMap === "function" ? WeakMap : Map;
function createRootErrorUpdate(fiber, errorInfo, lane) {
var update = createUpdate(NoTimestamp, lane);
update.tag = CaptureUpdate;
update.payload = {
element: null
};
var error2 = errorInfo.value;
update.callback = function() {
onUncaughtError(error2);
logCapturedError(fiber, errorInfo);
};
return update;
}
function createClassErrorUpdate(fiber, errorInfo, lane) {
var update = createUpdate(NoTimestamp, lane);
update.tag = CaptureUpdate;
var getDerivedStateFromError = fiber.type.getDerivedStateFromError;
if (typeof getDerivedStateFromError === "function") {
var error$1 = errorInfo.value;
update.payload = function() {
return getDerivedStateFromError(error$1);
};
update.callback = function() {
{
markFailedErrorBoundaryForHotReloading(fiber);
}
logCapturedError(fiber, errorInfo);
};
}
var inst = fiber.stateNode;
if (inst !== null && typeof inst.componentDidCatch === "function") {
update.callback = function callback() {
{
markFailedErrorBoundaryForHotReloading(fiber);
}
logCapturedError(fiber, errorInfo);
if (typeof getDerivedStateFromError !== "function") {
markLegacyErrorBoundaryAsFailed(this);
}
var error$12 = errorInfo.value;
var stack = errorInfo.stack;
this.componentDidCatch(error$12, {
componentStack: stack !== null ? stack : ""
});
{
if (typeof getDerivedStateFromError !== "function") {
if (!includesSomeLane(fiber.lanes, SyncLane)) {
error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.", getComponentNameFromFiber(fiber) || "Unknown");
}
}
}
};
}
return update;
}
function attachPingListener(root2, wakeable, lanes) {
var pingCache = root2.pingCache;
var threadIDs;
if (pingCache === null) {
pingCache = root2.pingCache = new PossiblyWeakMap$1();
threadIDs = /* @__PURE__ */ new Set();
pingCache.set(wakeable, threadIDs);
} else {
threadIDs = pingCache.get(wakeable);
if (threadIDs === void 0) {
threadIDs = /* @__PURE__ */ new Set();
pingCache.set(wakeable, threadIDs);
}
}
if (!threadIDs.has(lanes)) {
threadIDs.add(lanes);
var ping = pingSuspendedRoot.bind(null, root2, wakeable, lanes);
{
if (isDevToolsPresent) {
restorePendingUpdaters(root2, lanes);
}
}
wakeable.then(ping, ping);
}
}
function attachRetryListener(suspenseBoundary, root2, wakeable, lanes) {
var wakeables = suspenseBoundary.updateQueue;
if (wakeables === null) {
var updateQueue = /* @__PURE__ */ new Set();
updateQueue.add(wakeable);
suspenseBoundary.updateQueue = updateQueue;
} else {
wakeables.add(wakeable);
}
}
function resetSuspendedComponent(sourceFiber, rootRenderLanes) {
var tag = sourceFiber.tag;
if ((sourceFiber.mode & ConcurrentMode) === NoMode && (tag === FunctionComponent || tag === ForwardRef || tag === SimpleMemoComponent)) {
var currentSource = sourceFiber.alternate;
if (currentSource) {
sourceFiber.updateQueue = currentSource.updateQueue;
sourceFiber.memoizedState = currentSource.memoizedState;
sourceFiber.lanes = currentSource.lanes;
} else {
sourceFiber.updateQueue = null;
sourceFiber.memoizedState = null;
}
}
}
function getNearestSuspenseBoundaryToCapture(returnFiber) {
var node = returnFiber;
do {
if (node.tag === SuspenseComponent && shouldCaptureSuspense(node)) {
return node;
}
node = node.return;
} while (node !== null);
return null;
}
function markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root2, rootRenderLanes) {
if ((suspenseBoundary.mode & ConcurrentMode) === NoMode) {
if (suspenseBoundary === returnFiber) {
suspenseBoundary.flags |= ShouldCapture;
} else {
suspenseBoundary.flags |= DidCapture;
sourceFiber.flags |= ForceUpdateForLegacySuspense;
sourceFiber.flags &= ~(LifecycleEffectMask | Incomplete);
if (sourceFiber.tag === ClassComponent) {
var currentSourceFiber = sourceFiber.alternate;
if (currentSourceFiber === null) {
sourceFiber.tag = IncompleteClassComponent;
} else {
var update = createUpdate(NoTimestamp, SyncLane);
update.tag = ForceUpdate;
enqueueUpdate(sourceFiber, update, SyncLane);
}
}
sourceFiber.lanes = mergeLanes(sourceFiber.lanes, SyncLane);
}
return suspenseBoundary;
}
suspenseBoundary.flags |= ShouldCapture;
suspenseBoundary.lanes = rootRenderLanes;
return suspenseBoundary;
}
function throwException(root2, returnFiber, sourceFiber, value, rootRenderLanes) {
sourceFiber.flags |= Incomplete;
{
if (isDevToolsPresent) {
restorePendingUpdaters(root2, rootRenderLanes);
}
}
if (value !== null && typeof value === "object" && typeof value.then === "function") {
var wakeable = value;
resetSuspendedComponent(sourceFiber);
{
if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
markDidThrowWhileHydratingDEV();
}
}
var suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
if (suspenseBoundary !== null) {
suspenseBoundary.flags &= ~ForceClientRender;
markSuspenseBoundaryShouldCapture(suspenseBoundary, returnFiber, sourceFiber, root2, rootRenderLanes);
if (suspenseBoundary.mode & ConcurrentMode) {
attachPingListener(root2, wakeable, rootRenderLanes);
}
attachRetryListener(suspenseBoundary, root2, wakeable);
return;
} else {
if (!includesSyncLane(rootRenderLanes)) {
attachPingListener(root2, wakeable, rootRenderLanes);
renderDidSuspendDelayIfPossible();
return;
}
var uncaughtSuspenseError = new Error("A component suspended while responding to synchronous input. This will cause the UI to be replaced with a loading indicator. To fix, updates that suspend should be wrapped with startTransition.");
value = uncaughtSuspenseError;
}
} else {
if (getIsHydrating() && sourceFiber.mode & ConcurrentMode) {
markDidThrowWhileHydratingDEV();
var _suspenseBoundary = getNearestSuspenseBoundaryToCapture(returnFiber);
if (_suspenseBoundary !== null) {
if ((_suspenseBoundary.flags & ShouldCapture) === NoFlags) {
_suspenseBoundary.flags |= ForceClientRender;
}
markSuspenseBoundaryShouldCapture(_suspenseBoundary, returnFiber, sourceFiber, root2, rootRenderLanes);
queueHydrationError(createCapturedValueAtFiber(value, sourceFiber));
return;
}
}
}
value = createCapturedValueAtFiber(value, sourceFiber);
renderDidError(value);
var workInProgress2 = returnFiber;
do {
switch (workInProgress2.tag) {
case HostRoot: {
var _errorInfo = value;
workInProgress2.flags |= ShouldCapture;
var lane = pickArbitraryLane(rootRenderLanes);
workInProgress2.lanes = mergeLanes(workInProgress2.lanes, lane);
var update = createRootErrorUpdate(workInProgress2, _errorInfo, lane);
enqueueCapturedUpdate(workInProgress2, update);
return;
}
case ClassComponent:
var errorInfo = value;
var ctor = workInProgress2.type;
var instance = workInProgress2.stateNode;
if ((workInProgress2.flags & DidCapture) === NoFlags && (typeof ctor.getDerivedStateFromError === "function" || instance !== null && typeof instance.componentDidCatch === "function" && !isAlreadyFailedLegacyErrorBoundary(instance))) {
workInProgress2.flags |= ShouldCapture;
var _lane = pickArbitraryLane(rootRenderLanes);
workInProgress2.lanes = mergeLanes(workInProgress2.lanes, _lane);
var _update = createClassErrorUpdate(workInProgress2, errorInfo, _lane);
enqueueCapturedUpdate(workInProgress2, _update);
return;
}
break;
}
workInProgress2 = workInProgress2.return;
} while (workInProgress2 !== null);
}
function getSuspendedCache() {
{
return null;
}
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var didReceiveUpdate = false;
var didWarnAboutBadClass;
var didWarnAboutModulePatternComponent;
var didWarnAboutContextTypeOnFunctionComponent;
var didWarnAboutGetDerivedStateOnFunctionComponent;
var didWarnAboutFunctionRefs;
var didWarnAboutReassigningProps;
var didWarnAboutRevealOrder;
var didWarnAboutTailOptions;
var didWarnAboutDefaultPropsOnFunctionComponent;
{
didWarnAboutBadClass = {};
didWarnAboutModulePatternComponent = {};
didWarnAboutContextTypeOnFunctionComponent = {};
didWarnAboutGetDerivedStateOnFunctionComponent = {};
didWarnAboutFunctionRefs = {};
didWarnAboutReassigningProps = false;
didWarnAboutRevealOrder = {};
didWarnAboutTailOptions = {};
didWarnAboutDefaultPropsOnFunctionComponent = {};
}
function reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2) {
if (current3 === null) {
workInProgress2.child = mountChildFibers(workInProgress2, null, nextChildren, renderLanes2);
} else {
workInProgress2.child = reconcileChildFibers(workInProgress2, current3.child, nextChildren, renderLanes2);
}
}
function forceUnmountCurrentAndReconcile(current3, workInProgress2, nextChildren, renderLanes2) {
workInProgress2.child = reconcileChildFibers(workInProgress2, current3.child, null, renderLanes2);
workInProgress2.child = reconcileChildFibers(workInProgress2, null, nextChildren, renderLanes2);
}
function updateForwardRef(current3, workInProgress2, Component3, nextProps, renderLanes2) {
{
if (workInProgress2.type !== workInProgress2.elementType) {
var innerPropTypes = Component3.propTypes;
if (innerPropTypes) {
checkPropTypes(
innerPropTypes,
nextProps,
// Resolved props
"prop",
getComponentNameFromType(Component3)
);
}
}
}
var render2 = Component3.render;
var ref = workInProgress2.ref;
var nextChildren;
var hasId;
prepareToReadContext(workInProgress2, renderLanes2);
{
markComponentRenderStarted(workInProgress2);
}
{
ReactCurrentOwner$1.current = workInProgress2;
setIsRendering(true);
nextChildren = renderWithHooks(current3, workInProgress2, render2, nextProps, ref, renderLanes2);
hasId = checkDidRenderIdHook();
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
nextChildren = renderWithHooks(current3, workInProgress2, render2, nextProps, ref, renderLanes2);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
if (current3 !== null && !didReceiveUpdate) {
bailoutHooks(current3, workInProgress2, renderLanes2);
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress2);
}
workInProgress2.flags |= PerformedWork;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateMemoComponent(current3, workInProgress2, Component3, nextProps, renderLanes2) {
if (current3 === null) {
var type = Component3.type;
if (isSimpleFunctionComponent(type) && Component3.compare === null && // SimpleMemoComponent codepath doesn't resolve outer props either.
Component3.defaultProps === void 0) {
var resolvedType = type;
{
resolvedType = resolveFunctionForHotReloading(type);
}
workInProgress2.tag = SimpleMemoComponent;
workInProgress2.type = resolvedType;
{
validateFunctionComponentInDev(workInProgress2, type);
}
return updateSimpleMemoComponent(current3, workInProgress2, resolvedType, nextProps, renderLanes2);
}
{
var innerPropTypes = type.propTypes;
if (innerPropTypes) {
checkPropTypes(
innerPropTypes,
nextProps,
// Resolved props
"prop",
getComponentNameFromType(type)
);
}
if (Component3.defaultProps !== void 0) {
var componentName = getComponentNameFromType(type) || "Unknown";
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
error("%s: Support for defaultProps will be removed from memo components in a future major release. Use JavaScript default parameters instead.", componentName);
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
}
}
}
var child = createFiberFromTypeAndProps(Component3.type, null, nextProps, workInProgress2, workInProgress2.mode, renderLanes2);
child.ref = workInProgress2.ref;
child.return = workInProgress2;
workInProgress2.child = child;
return child;
}
{
var _type = Component3.type;
var _innerPropTypes = _type.propTypes;
if (_innerPropTypes) {
checkPropTypes(
_innerPropTypes,
nextProps,
// Resolved props
"prop",
getComponentNameFromType(_type)
);
}
}
var currentChild = current3.child;
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current3, renderLanes2);
if (!hasScheduledUpdateOrContext) {
var prevProps = currentChild.memoizedProps;
var compare = Component3.compare;
compare = compare !== null ? compare : shallowEqual;
if (compare(prevProps, nextProps) && current3.ref === workInProgress2.ref) {
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
}
workInProgress2.flags |= PerformedWork;
var newChild = createWorkInProgress(currentChild, nextProps);
newChild.ref = workInProgress2.ref;
newChild.return = workInProgress2;
workInProgress2.child = newChild;
return newChild;
}
function updateSimpleMemoComponent(current3, workInProgress2, Component3, nextProps, renderLanes2) {
{
if (workInProgress2.type !== workInProgress2.elementType) {
var outerMemoType = workInProgress2.elementType;
if (outerMemoType.$$typeof === REACT_LAZY_TYPE) {
var lazyComponent = outerMemoType;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
outerMemoType = init(payload);
} catch (x) {
outerMemoType = null;
}
var outerPropTypes = outerMemoType && outerMemoType.propTypes;
if (outerPropTypes) {
checkPropTypes(
outerPropTypes,
nextProps,
// Resolved (SimpleMemoComponent has no defaultProps)
"prop",
getComponentNameFromType(outerMemoType)
);
}
}
}
}
if (current3 !== null) {
var prevProps = current3.memoizedProps;
if (shallowEqual(prevProps, nextProps) && current3.ref === workInProgress2.ref && // Prevent bailout if the implementation changed due to hot reload.
workInProgress2.type === current3.type) {
didReceiveUpdate = false;
workInProgress2.pendingProps = nextProps = prevProps;
if (!checkScheduledUpdateOrContext(current3, renderLanes2)) {
workInProgress2.lanes = current3.lanes;
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
} else if ((current3.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
didReceiveUpdate = true;
}
}
}
return updateFunctionComponent(current3, workInProgress2, Component3, nextProps, renderLanes2);
}
function updateOffscreenComponent(current3, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps;
var nextChildren = nextProps.children;
var prevState = current3 !== null ? current3.memoizedState : null;
if (nextProps.mode === "hidden" || enableLegacyHidden) {
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
var nextState = {
baseLanes: NoLanes,
cachePool: null,
transitions: null
};
workInProgress2.memoizedState = nextState;
pushRenderLanes(workInProgress2, renderLanes2);
} else if (!includesSomeLane(renderLanes2, OffscreenLane)) {
var spawnedCachePool = null;
var nextBaseLanes;
if (prevState !== null) {
var prevBaseLanes = prevState.baseLanes;
nextBaseLanes = mergeLanes(prevBaseLanes, renderLanes2);
} else {
nextBaseLanes = renderLanes2;
}
workInProgress2.lanes = workInProgress2.childLanes = laneToLanes(OffscreenLane);
var _nextState = {
baseLanes: nextBaseLanes,
cachePool: spawnedCachePool,
transitions: null
};
workInProgress2.memoizedState = _nextState;
workInProgress2.updateQueue = null;
pushRenderLanes(workInProgress2, nextBaseLanes);
return null;
} else {
var _nextState2 = {
baseLanes: NoLanes,
cachePool: null,
transitions: null
};
workInProgress2.memoizedState = _nextState2;
var subtreeRenderLanes2 = prevState !== null ? prevState.baseLanes : renderLanes2;
pushRenderLanes(workInProgress2, subtreeRenderLanes2);
}
} else {
var _subtreeRenderLanes;
if (prevState !== null) {
_subtreeRenderLanes = mergeLanes(prevState.baseLanes, renderLanes2);
workInProgress2.memoizedState = null;
} else {
_subtreeRenderLanes = renderLanes2;
}
pushRenderLanes(workInProgress2, _subtreeRenderLanes);
}
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateFragment(current3, workInProgress2, renderLanes2) {
var nextChildren = workInProgress2.pendingProps;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateMode(current3, workInProgress2, renderLanes2) {
var nextChildren = workInProgress2.pendingProps.children;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateProfiler(current3, workInProgress2, renderLanes2) {
{
workInProgress2.flags |= Update;
{
var stateNode = workInProgress2.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
}
var nextProps = workInProgress2.pendingProps;
var nextChildren = nextProps.children;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function markRef(current3, workInProgress2) {
var ref = workInProgress2.ref;
if (current3 === null && ref !== null || current3 !== null && current3.ref !== ref) {
workInProgress2.flags |= Ref;
{
workInProgress2.flags |= RefStatic;
}
}
}
function updateFunctionComponent(current3, workInProgress2, Component3, nextProps, renderLanes2) {
{
if (workInProgress2.type !== workInProgress2.elementType) {
var innerPropTypes = Component3.propTypes;
if (innerPropTypes) {
checkPropTypes(
innerPropTypes,
nextProps,
// Resolved props
"prop",
getComponentNameFromType(Component3)
);
}
}
}
var context;
{
var unmaskedContext = getUnmaskedContext(workInProgress2, Component3, true);
context = getMaskedContext(workInProgress2, unmaskedContext);
}
var nextChildren;
var hasId;
prepareToReadContext(workInProgress2, renderLanes2);
{
markComponentRenderStarted(workInProgress2);
}
{
ReactCurrentOwner$1.current = workInProgress2;
setIsRendering(true);
nextChildren = renderWithHooks(current3, workInProgress2, Component3, nextProps, context, renderLanes2);
hasId = checkDidRenderIdHook();
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
nextChildren = renderWithHooks(current3, workInProgress2, Component3, nextProps, context, renderLanes2);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
if (current3 !== null && !didReceiveUpdate) {
bailoutHooks(current3, workInProgress2, renderLanes2);
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress2);
}
workInProgress2.flags |= PerformedWork;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateClassComponent(current3, workInProgress2, Component3, nextProps, renderLanes2) {
{
switch (shouldError(workInProgress2)) {
case false: {
var _instance = workInProgress2.stateNode;
var ctor = workInProgress2.type;
var tempInstance = new ctor(workInProgress2.memoizedProps, _instance.context);
var state = tempInstance.state;
_instance.updater.enqueueSetState(_instance, state, null);
break;
}
case true: {
workInProgress2.flags |= DidCapture;
workInProgress2.flags |= ShouldCapture;
var error$1 = new Error("Simulated error coming from DevTools");
var lane = pickArbitraryLane(renderLanes2);
workInProgress2.lanes = mergeLanes(workInProgress2.lanes, lane);
var update = createClassErrorUpdate(workInProgress2, createCapturedValueAtFiber(error$1, workInProgress2), lane);
enqueueCapturedUpdate(workInProgress2, update);
break;
}
}
if (workInProgress2.type !== workInProgress2.elementType) {
var innerPropTypes = Component3.propTypes;
if (innerPropTypes) {
checkPropTypes(
innerPropTypes,
nextProps,
// Resolved props
"prop",
getComponentNameFromType(Component3)
);
}
}
}
var hasContext;
if (isContextProvider(Component3)) {
hasContext = true;
pushContextProvider(workInProgress2);
} else {
hasContext = false;
}
prepareToReadContext(workInProgress2, renderLanes2);
var instance = workInProgress2.stateNode;
var shouldUpdate;
if (instance === null) {
resetSuspendedCurrentOnMountInLegacyMode(current3, workInProgress2);
constructClassInstance(workInProgress2, Component3, nextProps);
mountClassInstance(workInProgress2, Component3, nextProps, renderLanes2);
shouldUpdate = true;
} else if (current3 === null) {
shouldUpdate = resumeMountClassInstance(workInProgress2, Component3, nextProps, renderLanes2);
} else {
shouldUpdate = updateClassInstance(current3, workInProgress2, Component3, nextProps, renderLanes2);
}
var nextUnitOfWork = finishClassComponent(current3, workInProgress2, Component3, shouldUpdate, hasContext, renderLanes2);
{
var inst = workInProgress2.stateNode;
if (shouldUpdate && inst.props !== nextProps) {
if (!didWarnAboutReassigningProps) {
error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.", getComponentNameFromFiber(workInProgress2) || "a component");
}
didWarnAboutReassigningProps = true;
}
}
return nextUnitOfWork;
}
function finishClassComponent(current3, workInProgress2, Component3, shouldUpdate, hasContext, renderLanes2) {
markRef(current3, workInProgress2);
var didCaptureError = (workInProgress2.flags & DidCapture) !== NoFlags;
if (!shouldUpdate && !didCaptureError) {
if (hasContext) {
invalidateContextProvider(workInProgress2, Component3, false);
}
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
var instance = workInProgress2.stateNode;
ReactCurrentOwner$1.current = workInProgress2;
var nextChildren;
if (didCaptureError && typeof Component3.getDerivedStateFromError !== "function") {
nextChildren = null;
{
stopProfilerTimerIfRunning();
}
} else {
{
markComponentRenderStarted(workInProgress2);
}
{
setIsRendering(true);
nextChildren = instance.render();
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
instance.render();
} finally {
setIsStrictModeForDevtools(false);
}
}
setIsRendering(false);
}
{
markComponentRenderStopped();
}
}
workInProgress2.flags |= PerformedWork;
if (current3 !== null && didCaptureError) {
forceUnmountCurrentAndReconcile(current3, workInProgress2, nextChildren, renderLanes2);
} else {
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
}
workInProgress2.memoizedState = instance.state;
if (hasContext) {
invalidateContextProvider(workInProgress2, Component3, true);
}
return workInProgress2.child;
}
function pushHostRootContext(workInProgress2) {
var root2 = workInProgress2.stateNode;
if (root2.pendingContext) {
pushTopLevelContextObject(workInProgress2, root2.pendingContext, root2.pendingContext !== root2.context);
} else if (root2.context) {
pushTopLevelContextObject(workInProgress2, root2.context, false);
}
pushHostContainer(workInProgress2, root2.containerInfo);
}
function updateHostRoot(current3, workInProgress2, renderLanes2) {
pushHostRootContext(workInProgress2);
if (current3 === null) {
throw new Error("Should have a current fiber. This is a bug in React.");
}
var nextProps = workInProgress2.pendingProps;
var prevState = workInProgress2.memoizedState;
var prevChildren = prevState.element;
cloneUpdateQueue(current3, workInProgress2);
processUpdateQueue(workInProgress2, nextProps, null, renderLanes2);
var nextState = workInProgress2.memoizedState;
var root2 = workInProgress2.stateNode;
var nextChildren = nextState.element;
if (prevState.isDehydrated) {
var overrideState = {
element: nextChildren,
isDehydrated: false,
cache: nextState.cache,
pendingSuspenseBoundaries: nextState.pendingSuspenseBoundaries,
transitions: nextState.transitions
};
var updateQueue = workInProgress2.updateQueue;
updateQueue.baseState = overrideState;
workInProgress2.memoizedState = overrideState;
if (workInProgress2.flags & ForceClientRender) {
var recoverableError = createCapturedValueAtFiber(new Error("There was an error while hydrating. Because the error happened outside of a Suspense boundary, the entire root will switch to client rendering."), workInProgress2);
return mountHostRootWithoutHydrating(current3, workInProgress2, nextChildren, renderLanes2, recoverableError);
} else if (nextChildren !== prevChildren) {
var _recoverableError = createCapturedValueAtFiber(new Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."), workInProgress2);
return mountHostRootWithoutHydrating(current3, workInProgress2, nextChildren, renderLanes2, _recoverableError);
} else {
enterHydrationState(workInProgress2);
var child = mountChildFibers(workInProgress2, null, nextChildren, renderLanes2);
workInProgress2.child = child;
var node = child;
while (node) {
node.flags = node.flags & ~Placement | Hydrating;
node = node.sibling;
}
}
} else {
resetHydrationState();
if (nextChildren === prevChildren) {
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
}
return workInProgress2.child;
}
function mountHostRootWithoutHydrating(current3, workInProgress2, nextChildren, renderLanes2, recoverableError) {
resetHydrationState();
queueHydrationError(recoverableError);
workInProgress2.flags |= ForceClientRender;
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateHostComponent(current3, workInProgress2, renderLanes2) {
pushHostContext(workInProgress2);
if (current3 === null) {
tryToClaimNextHydratableInstance(workInProgress2);
}
var type = workInProgress2.type;
var nextProps = workInProgress2.pendingProps;
var prevProps = current3 !== null ? current3.memoizedProps : null;
var nextChildren = nextProps.children;
var isDirectTextChild = shouldSetTextContent(type, nextProps);
if (isDirectTextChild) {
nextChildren = null;
} else if (prevProps !== null && shouldSetTextContent(type, prevProps)) {
workInProgress2.flags |= ContentReset;
}
markRef(current3, workInProgress2);
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
return workInProgress2.child;
}
function updateHostText(current3, workInProgress2) {
if (current3 === null) {
tryToClaimNextHydratableInstance(workInProgress2);
}
return null;
}
function mountLazyComponent(_current, workInProgress2, elementType, renderLanes2) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress2);
var props = workInProgress2.pendingProps;
var lazyComponent = elementType;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
var Component3 = init(payload);
workInProgress2.type = Component3;
var resolvedTag = workInProgress2.tag = resolveLazyComponentTag(Component3);
var resolvedProps = resolveDefaultProps(Component3, props);
var child;
switch (resolvedTag) {
case FunctionComponent: {
{
validateFunctionComponentInDev(workInProgress2, Component3);
workInProgress2.type = Component3 = resolveFunctionForHotReloading(Component3);
}
child = updateFunctionComponent(null, workInProgress2, Component3, resolvedProps, renderLanes2);
return child;
}
case ClassComponent: {
{
workInProgress2.type = Component3 = resolveClassForHotReloading(Component3);
}
child = updateClassComponent(null, workInProgress2, Component3, resolvedProps, renderLanes2);
return child;
}
case ForwardRef: {
{
workInProgress2.type = Component3 = resolveForwardRefForHotReloading(Component3);
}
child = updateForwardRef(null, workInProgress2, Component3, resolvedProps, renderLanes2);
return child;
}
case MemoComponent: {
{
if (workInProgress2.type !== workInProgress2.elementType) {
var outerPropTypes = Component3.propTypes;
if (outerPropTypes) {
checkPropTypes(
outerPropTypes,
resolvedProps,
// Resolved for outer only
"prop",
getComponentNameFromType(Component3)
);
}
}
}
child = updateMemoComponent(
null,
workInProgress2,
Component3,
resolveDefaultProps(Component3.type, resolvedProps),
// The inner type can have defaults too
renderLanes2
);
return child;
}
}
var hint = "";
{
if (Component3 !== null && typeof Component3 === "object" && Component3.$$typeof === REACT_LAZY_TYPE) {
hint = " Did you wrap a component in React.lazy() more than once?";
}
}
throw new Error("Element type is invalid. Received a promise that resolves to: " + Component3 + ". " + ("Lazy element type must resolve to a class or function." + hint));
}
function mountIncompleteClassComponent(_current, workInProgress2, Component3, nextProps, renderLanes2) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress2);
workInProgress2.tag = ClassComponent;
var hasContext;
if (isContextProvider(Component3)) {
hasContext = true;
pushContextProvider(workInProgress2);
} else {
hasContext = false;
}
prepareToReadContext(workInProgress2, renderLanes2);
constructClassInstance(workInProgress2, Component3, nextProps);
mountClassInstance(workInProgress2, Component3, nextProps, renderLanes2);
return finishClassComponent(null, workInProgress2, Component3, true, hasContext, renderLanes2);
}
function mountIndeterminateComponent(_current, workInProgress2, Component3, renderLanes2) {
resetSuspendedCurrentOnMountInLegacyMode(_current, workInProgress2);
var props = workInProgress2.pendingProps;
var context;
{
var unmaskedContext = getUnmaskedContext(workInProgress2, Component3, false);
context = getMaskedContext(workInProgress2, unmaskedContext);
}
prepareToReadContext(workInProgress2, renderLanes2);
var value;
var hasId;
{
markComponentRenderStarted(workInProgress2);
}
{
if (Component3.prototype && typeof Component3.prototype.render === "function") {
var componentName = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutBadClass[componentName]) {
error("The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.", componentName, componentName);
didWarnAboutBadClass[componentName] = true;
}
}
if (workInProgress2.mode & StrictLegacyMode) {
ReactStrictModeWarnings.recordLegacyContextWarning(workInProgress2, null);
}
setIsRendering(true);
ReactCurrentOwner$1.current = workInProgress2;
value = renderWithHooks(null, workInProgress2, Component3, props, context, renderLanes2);
hasId = checkDidRenderIdHook();
setIsRendering(false);
}
{
markComponentRenderStopped();
}
workInProgress2.flags |= PerformedWork;
{
if (typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0) {
var _componentName = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutModulePatternComponent[_componentName]) {
error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName, _componentName, _componentName);
didWarnAboutModulePatternComponent[_componentName] = true;
}
}
}
if (
// Run these checks in production only if the flag is off.
// Eventually we'll delete this branch altogether.
typeof value === "object" && value !== null && typeof value.render === "function" && value.$$typeof === void 0
) {
{
var _componentName2 = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutModulePatternComponent[_componentName2]) {
error("The <%s /> component appears to be a function component that returns a class instance. Change %s to a class that extends React.Component instead. If you can't use a class try assigning the prototype on the function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an arrow function since it cannot be called with `new` by React.", _componentName2, _componentName2, _componentName2);
didWarnAboutModulePatternComponent[_componentName2] = true;
}
}
workInProgress2.tag = ClassComponent;
workInProgress2.memoizedState = null;
workInProgress2.updateQueue = null;
var hasContext = false;
if (isContextProvider(Component3)) {
hasContext = true;
pushContextProvider(workInProgress2);
} else {
hasContext = false;
}
workInProgress2.memoizedState = value.state !== null && value.state !== void 0 ? value.state : null;
initializeUpdateQueue(workInProgress2);
adoptClassInstance(workInProgress2, value);
mountClassInstance(workInProgress2, Component3, props, renderLanes2);
return finishClassComponent(null, workInProgress2, Component3, true, hasContext, renderLanes2);
} else {
workInProgress2.tag = FunctionComponent;
{
if (workInProgress2.mode & StrictLegacyMode) {
setIsStrictModeForDevtools(true);
try {
value = renderWithHooks(null, workInProgress2, Component3, props, context, renderLanes2);
hasId = checkDidRenderIdHook();
} finally {
setIsStrictModeForDevtools(false);
}
}
}
if (getIsHydrating() && hasId) {
pushMaterializedTreeId(workInProgress2);
}
reconcileChildren(null, workInProgress2, value, renderLanes2);
{
validateFunctionComponentInDev(workInProgress2, Component3);
}
return workInProgress2.child;
}
}
function validateFunctionComponentInDev(workInProgress2, Component3) {
{
if (Component3) {
if (Component3.childContextTypes) {
error("%s(...): childContextTypes cannot be defined on a function component.", Component3.displayName || Component3.name || "Component");
}
}
if (workInProgress2.ref !== null) {
var info = "";
var ownerName = getCurrentFiberOwnerNameInDevOrNull();
if (ownerName) {
info += "\n\nCheck the render method of `" + ownerName + "`.";
}
var warningKey = ownerName || "";
var debugSource = workInProgress2._debugSource;
if (debugSource) {
warningKey = debugSource.fileName + ":" + debugSource.lineNumber;
}
if (!didWarnAboutFunctionRefs[warningKey]) {
didWarnAboutFunctionRefs[warningKey] = true;
error("Function components cannot be given refs. Attempts to access this ref will fail. Did you mean to use React.forwardRef()?%s", info);
}
}
if (Component3.defaultProps !== void 0) {
var componentName = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutDefaultPropsOnFunctionComponent[componentName]) {
error("%s: Support for defaultProps will be removed from function components in a future major release. Use JavaScript default parameters instead.", componentName);
didWarnAboutDefaultPropsOnFunctionComponent[componentName] = true;
}
}
if (typeof Component3.getDerivedStateFromProps === "function") {
var _componentName3 = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3]) {
error("%s: Function components do not support getDerivedStateFromProps.", _componentName3);
didWarnAboutGetDerivedStateOnFunctionComponent[_componentName3] = true;
}
}
if (typeof Component3.contextType === "object" && Component3.contextType !== null) {
var _componentName4 = getComponentNameFromType(Component3) || "Unknown";
if (!didWarnAboutContextTypeOnFunctionComponent[_componentName4]) {
error("%s: Function components do not support contextType.", _componentName4);
didWarnAboutContextTypeOnFunctionComponent[_componentName4] = true;
}
}
}
}
var SUSPENDED_MARKER = {
dehydrated: null,
treeContext: null,
retryLane: NoLane
};
function mountSuspenseOffscreenState(renderLanes2) {
return {
baseLanes: renderLanes2,
cachePool: getSuspendedCache(),
transitions: null
};
}
function updateSuspenseOffscreenState(prevOffscreenState, renderLanes2) {
var cachePool = null;
return {
baseLanes: mergeLanes(prevOffscreenState.baseLanes, renderLanes2),
cachePool,
transitions: prevOffscreenState.transitions
};
}
function shouldRemainOnFallback(suspenseContext, current3, workInProgress2, renderLanes2) {
if (current3 !== null) {
var suspenseState = current3.memoizedState;
if (suspenseState === null) {
return false;
}
}
return hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
}
function getRemainingWorkInPrimaryTree(current3, renderLanes2) {
return removeLanes(current3.childLanes, renderLanes2);
}
function updateSuspenseComponent(current3, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps;
{
if (shouldSuspend(workInProgress2)) {
workInProgress2.flags |= DidCapture;
}
}
var suspenseContext = suspenseStackCursor.current;
var showFallback = false;
var didSuspend = (workInProgress2.flags & DidCapture) !== NoFlags;
if (didSuspend || shouldRemainOnFallback(suspenseContext, current3)) {
showFallback = true;
workInProgress2.flags &= ~DidCapture;
} else {
if (current3 === null || current3.memoizedState !== null) {
{
suspenseContext = addSubtreeSuspenseContext(suspenseContext, InvisibleParentSuspenseContext);
}
}
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
pushSuspenseContext(workInProgress2, suspenseContext);
if (current3 === null) {
tryToClaimNextHydratableInstance(workInProgress2);
var suspenseState = workInProgress2.memoizedState;
if (suspenseState !== null) {
var dehydrated = suspenseState.dehydrated;
if (dehydrated !== null) {
return mountDehydratedSuspenseComponent(workInProgress2, dehydrated);
}
}
var nextPrimaryChildren = nextProps.children;
var nextFallbackChildren = nextProps.fallback;
if (showFallback) {
var fallbackFragment = mountSuspenseFallbackChildren(workInProgress2, nextPrimaryChildren, nextFallbackChildren, renderLanes2);
var primaryChildFragment = workInProgress2.child;
primaryChildFragment.memoizedState = mountSuspenseOffscreenState(renderLanes2);
workInProgress2.memoizedState = SUSPENDED_MARKER;
return fallbackFragment;
} else {
return mountSuspensePrimaryChildren(workInProgress2, nextPrimaryChildren);
}
} else {
var prevState = current3.memoizedState;
if (prevState !== null) {
var _dehydrated = prevState.dehydrated;
if (_dehydrated !== null) {
return updateDehydratedSuspenseComponent(current3, workInProgress2, didSuspend, nextProps, _dehydrated, prevState, renderLanes2);
}
}
if (showFallback) {
var _nextFallbackChildren = nextProps.fallback;
var _nextPrimaryChildren = nextProps.children;
var fallbackChildFragment = updateSuspenseFallbackChildren(current3, workInProgress2, _nextPrimaryChildren, _nextFallbackChildren, renderLanes2);
var _primaryChildFragment2 = workInProgress2.child;
var prevOffscreenState = current3.child.memoizedState;
_primaryChildFragment2.memoizedState = prevOffscreenState === null ? mountSuspenseOffscreenState(renderLanes2) : updateSuspenseOffscreenState(prevOffscreenState, renderLanes2);
_primaryChildFragment2.childLanes = getRemainingWorkInPrimaryTree(current3, renderLanes2);
workInProgress2.memoizedState = SUSPENDED_MARKER;
return fallbackChildFragment;
} else {
var _nextPrimaryChildren2 = nextProps.children;
var _primaryChildFragment3 = updateSuspensePrimaryChildren(current3, workInProgress2, _nextPrimaryChildren2, renderLanes2);
workInProgress2.memoizedState = null;
return _primaryChildFragment3;
}
}
}
function mountSuspensePrimaryChildren(workInProgress2, primaryChildren, renderLanes2) {
var mode = workInProgress2.mode;
var primaryChildProps = {
mode: "visible",
children: primaryChildren
};
var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
primaryChildFragment.return = workInProgress2;
workInProgress2.child = primaryChildFragment;
return primaryChildFragment;
}
function mountSuspenseFallbackChildren(workInProgress2, primaryChildren, fallbackChildren, renderLanes2) {
var mode = workInProgress2.mode;
var progressedPrimaryFragment = workInProgress2.child;
var primaryChildProps = {
mode: "hidden",
children: primaryChildren
};
var primaryChildFragment;
var fallbackChildFragment;
if ((mode & ConcurrentMode) === NoMode && progressedPrimaryFragment !== null) {
primaryChildFragment = progressedPrimaryFragment;
primaryChildFragment.childLanes = NoLanes;
primaryChildFragment.pendingProps = primaryChildProps;
if (workInProgress2.mode & ProfileMode) {
primaryChildFragment.actualDuration = 0;
primaryChildFragment.actualStartTime = -1;
primaryChildFragment.selfBaseDuration = 0;
primaryChildFragment.treeBaseDuration = 0;
}
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes2, null);
} else {
primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, mode);
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes2, null);
}
primaryChildFragment.return = workInProgress2;
fallbackChildFragment.return = workInProgress2;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress2.child = primaryChildFragment;
return fallbackChildFragment;
}
function mountWorkInProgressOffscreenFiber(offscreenProps, mode, renderLanes2) {
return createFiberFromOffscreen(offscreenProps, mode, NoLanes, null);
}
function updateWorkInProgressOffscreenFiber(current3, offscreenProps) {
return createWorkInProgress(current3, offscreenProps);
}
function updateSuspensePrimaryChildren(current3, workInProgress2, primaryChildren, renderLanes2) {
var currentPrimaryChildFragment = current3.child;
var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
var primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, {
mode: "visible",
children: primaryChildren
});
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
primaryChildFragment.lanes = renderLanes2;
}
primaryChildFragment.return = workInProgress2;
primaryChildFragment.sibling = null;
if (currentFallbackChildFragment !== null) {
var deletions = workInProgress2.deletions;
if (deletions === null) {
workInProgress2.deletions = [currentFallbackChildFragment];
workInProgress2.flags |= ChildDeletion;
} else {
deletions.push(currentFallbackChildFragment);
}
}
workInProgress2.child = primaryChildFragment;
return primaryChildFragment;
}
function updateSuspenseFallbackChildren(current3, workInProgress2, primaryChildren, fallbackChildren, renderLanes2) {
var mode = workInProgress2.mode;
var currentPrimaryChildFragment = current3.child;
var currentFallbackChildFragment = currentPrimaryChildFragment.sibling;
var primaryChildProps = {
mode: "hidden",
children: primaryChildren
};
var primaryChildFragment;
if (
// In legacy mode, we commit the primary tree as if it successfully
// completed, even though it's in an inconsistent state.
(mode & ConcurrentMode) === NoMode && // Make sure we're on the second pass, i.e. the primary child fragment was
// already cloned. In legacy mode, the only case where this isn't true is
// when DevTools forces us to display a fallback; we skip the first render
// pass entirely and go straight to rendering the fallback. (In Concurrent
// Mode, SuspenseList can also trigger this scenario, but this is a legacy-
// only codepath.)
workInProgress2.child !== currentPrimaryChildFragment
) {
var progressedPrimaryFragment = workInProgress2.child;
primaryChildFragment = progressedPrimaryFragment;
primaryChildFragment.childLanes = NoLanes;
primaryChildFragment.pendingProps = primaryChildProps;
if (workInProgress2.mode & ProfileMode) {
primaryChildFragment.actualDuration = 0;
primaryChildFragment.actualStartTime = -1;
primaryChildFragment.selfBaseDuration = currentPrimaryChildFragment.selfBaseDuration;
primaryChildFragment.treeBaseDuration = currentPrimaryChildFragment.treeBaseDuration;
}
workInProgress2.deletions = null;
} else {
primaryChildFragment = updateWorkInProgressOffscreenFiber(currentPrimaryChildFragment, primaryChildProps);
primaryChildFragment.subtreeFlags = currentPrimaryChildFragment.subtreeFlags & StaticMask;
}
var fallbackChildFragment;
if (currentFallbackChildFragment !== null) {
fallbackChildFragment = createWorkInProgress(currentFallbackChildFragment, fallbackChildren);
} else {
fallbackChildFragment = createFiberFromFragment(fallbackChildren, mode, renderLanes2, null);
fallbackChildFragment.flags |= Placement;
}
fallbackChildFragment.return = workInProgress2;
primaryChildFragment.return = workInProgress2;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress2.child = primaryChildFragment;
return fallbackChildFragment;
}
function retrySuspenseComponentWithoutHydrating(current3, workInProgress2, renderLanes2, recoverableError) {
if (recoverableError !== null) {
queueHydrationError(recoverableError);
}
reconcileChildFibers(workInProgress2, current3.child, null, renderLanes2);
var nextProps = workInProgress2.pendingProps;
var primaryChildren = nextProps.children;
var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress2, primaryChildren);
primaryChildFragment.flags |= Placement;
workInProgress2.memoizedState = null;
return primaryChildFragment;
}
function mountSuspenseFallbackAfterRetryWithoutHydrating(current3, workInProgress2, primaryChildren, fallbackChildren, renderLanes2) {
var fiberMode = workInProgress2.mode;
var primaryChildProps = {
mode: "visible",
children: primaryChildren
};
var primaryChildFragment = mountWorkInProgressOffscreenFiber(primaryChildProps, fiberMode);
var fallbackChildFragment = createFiberFromFragment(fallbackChildren, fiberMode, renderLanes2, null);
fallbackChildFragment.flags |= Placement;
primaryChildFragment.return = workInProgress2;
fallbackChildFragment.return = workInProgress2;
primaryChildFragment.sibling = fallbackChildFragment;
workInProgress2.child = primaryChildFragment;
if ((workInProgress2.mode & ConcurrentMode) !== NoMode) {
reconcileChildFibers(workInProgress2, current3.child, null, renderLanes2);
}
return fallbackChildFragment;
}
function mountDehydratedSuspenseComponent(workInProgress2, suspenseInstance, renderLanes2) {
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
{
error("Cannot hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container) to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the Suspense components from the server rendered components.");
}
workInProgress2.lanes = laneToLanes(SyncLane);
} else if (isSuspenseInstanceFallback(suspenseInstance)) {
workInProgress2.lanes = laneToLanes(DefaultHydrationLane);
} else {
workInProgress2.lanes = laneToLanes(OffscreenLane);
}
return null;
}
function updateDehydratedSuspenseComponent(current3, workInProgress2, didSuspend, nextProps, suspenseInstance, suspenseState, renderLanes2) {
if (!didSuspend) {
warnIfHydrating();
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
return retrySuspenseComponentWithoutHydrating(
current3,
workInProgress2,
renderLanes2,
// TODO: When we delete legacy mode, we should make this error argument
// required — every concurrent mode path that causes hydration to
// de-opt to client rendering should have an error message.
null
);
}
if (isSuspenseInstanceFallback(suspenseInstance)) {
var digest, message, stack;
{
var _getSuspenseInstanceF = getSuspenseInstanceFallbackErrorDetails(suspenseInstance);
digest = _getSuspenseInstanceF.digest;
message = _getSuspenseInstanceF.message;
stack = _getSuspenseInstanceF.stack;
}
var error2;
if (message) {
error2 = new Error(message);
} else {
error2 = new Error("The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.");
}
var capturedValue = createCapturedValue(error2, digest, stack);
return retrySuspenseComponentWithoutHydrating(current3, workInProgress2, renderLanes2, capturedValue);
}
var hasContextChanged2 = includesSomeLane(renderLanes2, current3.childLanes);
if (didReceiveUpdate || hasContextChanged2) {
var root2 = getWorkInProgressRoot();
if (root2 !== null) {
var attemptHydrationAtLane = getBumpedLaneForHydration(root2, renderLanes2);
if (attemptHydrationAtLane !== NoLane && attemptHydrationAtLane !== suspenseState.retryLane) {
suspenseState.retryLane = attemptHydrationAtLane;
var eventTime = NoTimestamp;
enqueueConcurrentRenderForLane(current3, attemptHydrationAtLane);
scheduleUpdateOnFiber(root2, current3, attemptHydrationAtLane, eventTime);
}
}
renderDidSuspendDelayIfPossible();
var _capturedValue = createCapturedValue(new Error("This Suspense boundary received an update before it finished hydrating. This caused the boundary to switch to client rendering. The usual way to fix this is to wrap the original update in startTransition."));
return retrySuspenseComponentWithoutHydrating(current3, workInProgress2, renderLanes2, _capturedValue);
} else if (isSuspenseInstancePending(suspenseInstance)) {
workInProgress2.flags |= DidCapture;
workInProgress2.child = current3.child;
var retry = retryDehydratedSuspenseBoundary.bind(null, current3);
registerSuspenseInstanceRetry(suspenseInstance, retry);
return null;
} else {
reenterHydrationStateFromDehydratedSuspenseInstance(workInProgress2, suspenseInstance, suspenseState.treeContext);
var primaryChildren = nextProps.children;
var primaryChildFragment = mountSuspensePrimaryChildren(workInProgress2, primaryChildren);
primaryChildFragment.flags |= Hydrating;
return primaryChildFragment;
}
} else {
if (workInProgress2.flags & ForceClientRender) {
workInProgress2.flags &= ~ForceClientRender;
var _capturedValue2 = createCapturedValue(new Error("There was an error while hydrating this Suspense boundary. Switched to client rendering."));
return retrySuspenseComponentWithoutHydrating(current3, workInProgress2, renderLanes2, _capturedValue2);
} else if (workInProgress2.memoizedState !== null) {
workInProgress2.child = current3.child;
workInProgress2.flags |= DidCapture;
return null;
} else {
var nextPrimaryChildren = nextProps.children;
var nextFallbackChildren = nextProps.fallback;
var fallbackChildFragment = mountSuspenseFallbackAfterRetryWithoutHydrating(current3, workInProgress2, nextPrimaryChildren, nextFallbackChildren, renderLanes2);
var _primaryChildFragment4 = workInProgress2.child;
_primaryChildFragment4.memoizedState = mountSuspenseOffscreenState(renderLanes2);
workInProgress2.memoizedState = SUSPENDED_MARKER;
return fallbackChildFragment;
}
}
}
function scheduleSuspenseWorkOnFiber(fiber, renderLanes2, propagationRoot) {
fiber.lanes = mergeLanes(fiber.lanes, renderLanes2);
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.lanes = mergeLanes(alternate.lanes, renderLanes2);
}
scheduleContextWorkOnParentPath(fiber.return, renderLanes2, propagationRoot);
}
function propagateSuspenseContextChange(workInProgress2, firstChild, renderLanes2) {
var node = firstChild;
while (node !== null) {
if (node.tag === SuspenseComponent) {
var state = node.memoizedState;
if (state !== null) {
scheduleSuspenseWorkOnFiber(node, renderLanes2, workInProgress2);
}
} else if (node.tag === SuspenseListComponent) {
scheduleSuspenseWorkOnFiber(node, renderLanes2, workInProgress2);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress2) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === workInProgress2) {
return;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
function findLastContentRow(firstChild) {
var row = firstChild;
var lastContentRow = null;
while (row !== null) {
var currentRow = row.alternate;
if (currentRow !== null && findFirstSuspended(currentRow) === null) {
lastContentRow = row;
}
row = row.sibling;
}
return lastContentRow;
}
function validateRevealOrder(revealOrder) {
{
if (revealOrder !== void 0 && revealOrder !== "forwards" && revealOrder !== "backwards" && revealOrder !== "together" && !didWarnAboutRevealOrder[revealOrder]) {
didWarnAboutRevealOrder[revealOrder] = true;
if (typeof revealOrder === "string") {
switch (revealOrder.toLowerCase()) {
case "together":
case "forwards":
case "backwards": {
error('"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.', revealOrder, revealOrder.toLowerCase());
break;
}
case "forward":
case "backward": {
error('"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.', revealOrder, revealOrder.toLowerCase());
break;
}
default:
error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', revealOrder);
break;
}
} else {
error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "together", "forwards" or "backwards"?', revealOrder);
}
}
}
}
function validateTailOptions(tailMode, revealOrder) {
{
if (tailMode !== void 0 && !didWarnAboutTailOptions[tailMode]) {
if (tailMode !== "collapsed" && tailMode !== "hidden") {
didWarnAboutTailOptions[tailMode] = true;
error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "collapsed" or "hidden"?', tailMode);
} else if (revealOrder !== "forwards" && revealOrder !== "backwards") {
didWarnAboutTailOptions[tailMode] = true;
error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', tailMode);
}
}
}
}
function validateSuspenseListNestedChild(childSlot, index2) {
{
var isAnArray = isArray(childSlot);
var isIterable = !isAnArray && typeof getIteratorFn(childSlot) === "function";
if (isAnArray || isIterable) {
var type = isAnArray ? "array" : "iterable";
error("A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>", type, index2, type);
return false;
}
}
return true;
}
function validateSuspenseListChildren(children, revealOrder) {
{
if ((revealOrder === "forwards" || revealOrder === "backwards") && children !== void 0 && children !== null && children !== false) {
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
if (!validateSuspenseListNestedChild(children[i], i)) {
return;
}
}
} else {
var iteratorFn = getIteratorFn(children);
if (typeof iteratorFn === "function") {
var childrenIterator = iteratorFn.call(children);
if (childrenIterator) {
var step = childrenIterator.next();
var _i = 0;
for (; !step.done; step = childrenIterator.next()) {
if (!validateSuspenseListNestedChild(step.value, _i)) {
return;
}
_i++;
}
}
} else {
error('A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?', revealOrder);
}
}
}
}
}
function initSuspenseListRenderState(workInProgress2, isBackwards, tail, lastContentRow, tailMode) {
var renderState = workInProgress2.memoizedState;
if (renderState === null) {
workInProgress2.memoizedState = {
isBackwards,
rendering: null,
renderingStartTime: 0,
last: lastContentRow,
tail,
tailMode
};
} else {
renderState.isBackwards = isBackwards;
renderState.rendering = null;
renderState.renderingStartTime = 0;
renderState.last = lastContentRow;
renderState.tail = tail;
renderState.tailMode = tailMode;
}
}
function updateSuspenseListComponent(current3, workInProgress2, renderLanes2) {
var nextProps = workInProgress2.pendingProps;
var revealOrder = nextProps.revealOrder;
var tailMode = nextProps.tail;
var newChildren = nextProps.children;
validateRevealOrder(revealOrder);
validateTailOptions(tailMode, revealOrder);
validateSuspenseListChildren(newChildren, revealOrder);
reconcileChildren(current3, workInProgress2, newChildren, renderLanes2);
var suspenseContext = suspenseStackCursor.current;
var shouldForceFallback = hasSuspenseContext(suspenseContext, ForceSuspenseFallback);
if (shouldForceFallback) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
workInProgress2.flags |= DidCapture;
} else {
var didSuspendBefore = current3 !== null && (current3.flags & DidCapture) !== NoFlags;
if (didSuspendBefore) {
propagateSuspenseContextChange(workInProgress2, workInProgress2.child, renderLanes2);
}
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
}
pushSuspenseContext(workInProgress2, suspenseContext);
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
workInProgress2.memoizedState = null;
} else {
switch (revealOrder) {
case "forwards": {
var lastContentRow = findLastContentRow(workInProgress2.child);
var tail;
if (lastContentRow === null) {
tail = workInProgress2.child;
workInProgress2.child = null;
} else {
tail = lastContentRow.sibling;
lastContentRow.sibling = null;
}
initSuspenseListRenderState(
workInProgress2,
false,
// isBackwards
tail,
lastContentRow,
tailMode
);
break;
}
case "backwards": {
var _tail = null;
var row = workInProgress2.child;
workInProgress2.child = null;
while (row !== null) {
var currentRow = row.alternate;
if (currentRow !== null && findFirstSuspended(currentRow) === null) {
workInProgress2.child = row;
break;
}
var nextRow = row.sibling;
row.sibling = _tail;
_tail = row;
row = nextRow;
}
initSuspenseListRenderState(
workInProgress2,
true,
// isBackwards
_tail,
null,
// last
tailMode
);
break;
}
case "together": {
initSuspenseListRenderState(
workInProgress2,
false,
// isBackwards
null,
// tail
null,
// last
void 0
);
break;
}
default: {
workInProgress2.memoizedState = null;
}
}
}
return workInProgress2.child;
}
function updatePortalComponent(current3, workInProgress2, renderLanes2) {
pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo);
var nextChildren = workInProgress2.pendingProps;
if (current3 === null) {
workInProgress2.child = reconcileChildFibers(workInProgress2, null, nextChildren, renderLanes2);
} else {
reconcileChildren(current3, workInProgress2, nextChildren, renderLanes2);
}
return workInProgress2.child;
}
var hasWarnedAboutUsingNoValuePropOnContextProvider = false;
function updateContextProvider(current3, workInProgress2, renderLanes2) {
var providerType = workInProgress2.type;
var context = providerType._context;
var newProps = workInProgress2.pendingProps;
var oldProps = workInProgress2.memoizedProps;
var newValue = newProps.value;
{
if (!("value" in newProps)) {
if (!hasWarnedAboutUsingNoValuePropOnContextProvider) {
hasWarnedAboutUsingNoValuePropOnContextProvider = true;
error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?");
}
}
var providerPropTypes = workInProgress2.type.propTypes;
if (providerPropTypes) {
checkPropTypes(providerPropTypes, newProps, "prop", "Context.Provider");
}
}
pushProvider(workInProgress2, context, newValue);
{
if (oldProps !== null) {
var oldValue = oldProps.value;
if (objectIs(oldValue, newValue)) {
if (oldProps.children === newProps.children && !hasContextChanged()) {
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
} else {
propagateContextChange(workInProgress2, context, renderLanes2);
}
}
}
var newChildren = newProps.children;
reconcileChildren(current3, workInProgress2, newChildren, renderLanes2);
return workInProgress2.child;
}
var hasWarnedAboutUsingContextAsConsumer = false;
function updateContextConsumer(current3, workInProgress2, renderLanes2) {
var context = workInProgress2.type;
{
if (context._context === void 0) {
if (context !== context.Consumer) {
if (!hasWarnedAboutUsingContextAsConsumer) {
hasWarnedAboutUsingContextAsConsumer = true;
error("Rendering <Context> directly is not supported and will be removed in a future major release. Did you mean to render <Context.Consumer> instead?");
}
}
} else {
context = context._context;
}
}
var newProps = workInProgress2.pendingProps;
var render2 = newProps.children;
{
if (typeof render2 !== "function") {
error("A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.");
}
}
prepareToReadContext(workInProgress2, renderLanes2);
var newValue = readContext(context);
{
markComponentRenderStarted(workInProgress2);
}
var newChildren;
{
ReactCurrentOwner$1.current = workInProgress2;
setIsRendering(true);
newChildren = render2(newValue);
setIsRendering(false);
}
{
markComponentRenderStopped();
}
workInProgress2.flags |= PerformedWork;
reconcileChildren(current3, workInProgress2, newChildren, renderLanes2);
return workInProgress2.child;
}
function markWorkInProgressReceivedUpdate() {
didReceiveUpdate = true;
}
function resetSuspendedCurrentOnMountInLegacyMode(current3, workInProgress2) {
if ((workInProgress2.mode & ConcurrentMode) === NoMode) {
if (current3 !== null) {
current3.alternate = null;
workInProgress2.alternate = null;
workInProgress2.flags |= Placement;
}
}
}
function bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2) {
if (current3 !== null) {
workInProgress2.dependencies = current3.dependencies;
}
{
stopProfilerTimerIfRunning();
}
markSkippedUpdateLanes(workInProgress2.lanes);
if (!includesSomeLane(renderLanes2, workInProgress2.childLanes)) {
{
return null;
}
}
cloneChildFibers(current3, workInProgress2);
return workInProgress2.child;
}
function remountFiber(current3, oldWorkInProgress, newWorkInProgress) {
{
var returnFiber = oldWorkInProgress.return;
if (returnFiber === null) {
throw new Error("Cannot swap the root fiber.");
}
current3.alternate = null;
oldWorkInProgress.alternate = null;
newWorkInProgress.index = oldWorkInProgress.index;
newWorkInProgress.sibling = oldWorkInProgress.sibling;
newWorkInProgress.return = oldWorkInProgress.return;
newWorkInProgress.ref = oldWorkInProgress.ref;
if (oldWorkInProgress === returnFiber.child) {
returnFiber.child = newWorkInProgress;
} else {
var prevSibling = returnFiber.child;
if (prevSibling === null) {
throw new Error("Expected parent to have a child.");
}
while (prevSibling.sibling !== oldWorkInProgress) {
prevSibling = prevSibling.sibling;
if (prevSibling === null) {
throw new Error("Expected to find the previous sibling.");
}
}
prevSibling.sibling = newWorkInProgress;
}
var deletions = returnFiber.deletions;
if (deletions === null) {
returnFiber.deletions = [current3];
returnFiber.flags |= ChildDeletion;
} else {
deletions.push(current3);
}
newWorkInProgress.flags |= Placement;
return newWorkInProgress;
}
}
function checkScheduledUpdateOrContext(current3, renderLanes2) {
var updateLanes = current3.lanes;
if (includesSomeLane(updateLanes, renderLanes2)) {
return true;
}
return false;
}
function attemptEarlyBailoutIfNoScheduledUpdate(current3, workInProgress2, renderLanes2) {
switch (workInProgress2.tag) {
case HostRoot:
pushHostRootContext(workInProgress2);
var root2 = workInProgress2.stateNode;
resetHydrationState();
break;
case HostComponent:
pushHostContext(workInProgress2);
break;
case ClassComponent: {
var Component3 = workInProgress2.type;
if (isContextProvider(Component3)) {
pushContextProvider(workInProgress2);
}
break;
}
case HostPortal:
pushHostContainer(workInProgress2, workInProgress2.stateNode.containerInfo);
break;
case ContextProvider: {
var newValue = workInProgress2.memoizedProps.value;
var context = workInProgress2.type._context;
pushProvider(workInProgress2, context, newValue);
break;
}
case Profiler:
{
var hasChildWork = includesSomeLane(renderLanes2, workInProgress2.childLanes);
if (hasChildWork) {
workInProgress2.flags |= Update;
}
{
var stateNode = workInProgress2.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
}
break;
case SuspenseComponent: {
var state = workInProgress2.memoizedState;
if (state !== null) {
if (state.dehydrated !== null) {
pushSuspenseContext(workInProgress2, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
workInProgress2.flags |= DidCapture;
return null;
}
var primaryChildFragment = workInProgress2.child;
var primaryChildLanes = primaryChildFragment.childLanes;
if (includesSomeLane(renderLanes2, primaryChildLanes)) {
return updateSuspenseComponent(current3, workInProgress2, renderLanes2);
} else {
pushSuspenseContext(workInProgress2, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
var child = bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
if (child !== null) {
return child.sibling;
} else {
return null;
}
}
} else {
pushSuspenseContext(workInProgress2, setDefaultShallowSuspenseContext(suspenseStackCursor.current));
}
break;
}
case SuspenseListComponent: {
var didSuspendBefore = (current3.flags & DidCapture) !== NoFlags;
var _hasChildWork = includesSomeLane(renderLanes2, workInProgress2.childLanes);
if (didSuspendBefore) {
if (_hasChildWork) {
return updateSuspenseListComponent(current3, workInProgress2, renderLanes2);
}
workInProgress2.flags |= DidCapture;
}
var renderState = workInProgress2.memoizedState;
if (renderState !== null) {
renderState.rendering = null;
renderState.tail = null;
renderState.lastEffect = null;
}
pushSuspenseContext(workInProgress2, suspenseStackCursor.current);
if (_hasChildWork) {
break;
} else {
return null;
}
}
case OffscreenComponent:
case LegacyHiddenComponent: {
workInProgress2.lanes = NoLanes;
return updateOffscreenComponent(current3, workInProgress2, renderLanes2);
}
}
return bailoutOnAlreadyFinishedWork(current3, workInProgress2, renderLanes2);
}
function beginWork(current3, workInProgress2, renderLanes2) {
{
if (workInProgress2._debugNeedsRemount && current3 !== null) {
return remountFiber(current3, workInProgress2, createFiberFromTypeAndProps(workInProgress2.type, workInProgress2.key, workInProgress2.pendingProps, workInProgress2._debugOwner || null, workInProgress2.mode, workInProgress2.lanes));
}
}
if (current3 !== null) {
var oldProps = current3.memoizedProps;
var newProps = workInProgress2.pendingProps;
if (oldProps !== newProps || hasContextChanged() || // Force a re-render if the implementation changed due to hot reload:
workInProgress2.type !== current3.type) {
didReceiveUpdate = true;
} else {
var hasScheduledUpdateOrContext = checkScheduledUpdateOrContext(current3, renderLanes2);
if (!hasScheduledUpdateOrContext && // If this is the second pass of an error or suspense boundary, there
// may not be work scheduled on `current`, so we check for this flag.
(workInProgress2.flags & DidCapture) === NoFlags) {
didReceiveUpdate = false;
return attemptEarlyBailoutIfNoScheduledUpdate(current3, workInProgress2, renderLanes2);
}
if ((current3.flags & ForceUpdateForLegacySuspense) !== NoFlags) {
didReceiveUpdate = true;
} else {
didReceiveUpdate = false;
}
}
} else {
didReceiveUpdate = false;
if (getIsHydrating() && isForkedChild(workInProgress2)) {
var slotIndex = workInProgress2.index;
var numberOfForks = getForksAtLevel();
pushTreeId(workInProgress2, numberOfForks, slotIndex);
}
}
workInProgress2.lanes = NoLanes;
switch (workInProgress2.tag) {
case IndeterminateComponent: {
return mountIndeterminateComponent(current3, workInProgress2, workInProgress2.type, renderLanes2);
}
case LazyComponent: {
var elementType = workInProgress2.elementType;
return mountLazyComponent(current3, workInProgress2, elementType, renderLanes2);
}
case FunctionComponent: {
var Component3 = workInProgress2.type;
var unresolvedProps = workInProgress2.pendingProps;
var resolvedProps = workInProgress2.elementType === Component3 ? unresolvedProps : resolveDefaultProps(Component3, unresolvedProps);
return updateFunctionComponent(current3, workInProgress2, Component3, resolvedProps, renderLanes2);
}
case ClassComponent: {
var _Component = workInProgress2.type;
var _unresolvedProps = workInProgress2.pendingProps;
var _resolvedProps = workInProgress2.elementType === _Component ? _unresolvedProps : resolveDefaultProps(_Component, _unresolvedProps);
return updateClassComponent(current3, workInProgress2, _Component, _resolvedProps, renderLanes2);
}
case HostRoot:
return updateHostRoot(current3, workInProgress2, renderLanes2);
case HostComponent:
return updateHostComponent(current3, workInProgress2, renderLanes2);
case HostText:
return updateHostText(current3, workInProgress2);
case SuspenseComponent:
return updateSuspenseComponent(current3, workInProgress2, renderLanes2);
case HostPortal:
return updatePortalComponent(current3, workInProgress2, renderLanes2);
case ForwardRef: {
var type = workInProgress2.type;
var _unresolvedProps2 = workInProgress2.pendingProps;
var _resolvedProps2 = workInProgress2.elementType === type ? _unresolvedProps2 : resolveDefaultProps(type, _unresolvedProps2);
return updateForwardRef(current3, workInProgress2, type, _resolvedProps2, renderLanes2);
}
case Fragment9:
return updateFragment(current3, workInProgress2, renderLanes2);
case Mode:
return updateMode(current3, workInProgress2, renderLanes2);
case Profiler:
return updateProfiler(current3, workInProgress2, renderLanes2);
case ContextProvider:
return updateContextProvider(current3, workInProgress2, renderLanes2);
case ContextConsumer:
return updateContextConsumer(current3, workInProgress2, renderLanes2);
case MemoComponent: {
var _type2 = workInProgress2.type;
var _unresolvedProps3 = workInProgress2.pendingProps;
var _resolvedProps3 = resolveDefaultProps(_type2, _unresolvedProps3);
{
if (workInProgress2.type !== workInProgress2.elementType) {
var outerPropTypes = _type2.propTypes;
if (outerPropTypes) {
checkPropTypes(
outerPropTypes,
_resolvedProps3,
// Resolved for outer only
"prop",
getComponentNameFromType(_type2)
);
}
}
}
_resolvedProps3 = resolveDefaultProps(_type2.type, _resolvedProps3);
return updateMemoComponent(current3, workInProgress2, _type2, _resolvedProps3, renderLanes2);
}
case SimpleMemoComponent: {
return updateSimpleMemoComponent(current3, workInProgress2, workInProgress2.type, workInProgress2.pendingProps, renderLanes2);
}
case IncompleteClassComponent: {
var _Component2 = workInProgress2.type;
var _unresolvedProps4 = workInProgress2.pendingProps;
var _resolvedProps4 = workInProgress2.elementType === _Component2 ? _unresolvedProps4 : resolveDefaultProps(_Component2, _unresolvedProps4);
return mountIncompleteClassComponent(current3, workInProgress2, _Component2, _resolvedProps4, renderLanes2);
}
case SuspenseListComponent: {
return updateSuspenseListComponent(current3, workInProgress2, renderLanes2);
}
case ScopeComponent: {
break;
}
case OffscreenComponent: {
return updateOffscreenComponent(current3, workInProgress2, renderLanes2);
}
}
throw new Error("Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue.");
}
function markUpdate(workInProgress2) {
workInProgress2.flags |= Update;
}
function markRef$1(workInProgress2) {
workInProgress2.flags |= Ref;
{
workInProgress2.flags |= RefStatic;
}
}
var appendAllChildren;
var updateHostContainer;
var updateHostComponent$1;
var updateHostText$1;
{
appendAllChildren = function(parent, workInProgress2, needsVisibilityToggle, isHidden) {
var node = workInProgress2.child;
while (node !== null) {
if (node.tag === HostComponent || node.tag === HostText) {
appendInitialChild(parent, node.stateNode);
} else if (node.tag === HostPortal)
;
else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === workInProgress2) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === workInProgress2) {
return;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
};
updateHostContainer = function(current3, workInProgress2) {
};
updateHostComponent$1 = function(current3, workInProgress2, type, newProps, rootContainerInstance) {
var oldProps = current3.memoizedProps;
if (oldProps === newProps) {
return;
}
var instance = workInProgress2.stateNode;
var currentHostContext = getHostContext();
var updatePayload = prepareUpdate(instance, type, oldProps, newProps, rootContainerInstance, currentHostContext);
workInProgress2.updateQueue = updatePayload;
if (updatePayload) {
markUpdate(workInProgress2);
}
};
updateHostText$1 = function(current3, workInProgress2, oldText, newText) {
if (oldText !== newText) {
markUpdate(workInProgress2);
}
};
}
function cutOffTailIfNeeded(renderState, hasRenderedATailFallback) {
if (getIsHydrating()) {
return;
}
switch (renderState.tailMode) {
case "hidden": {
var tailNode = renderState.tail;
var lastTailNode = null;
while (tailNode !== null) {
if (tailNode.alternate !== null) {
lastTailNode = tailNode;
}
tailNode = tailNode.sibling;
}
if (lastTailNode === null) {
renderState.tail = null;
} else {
lastTailNode.sibling = null;
}
break;
}
case "collapsed": {
var _tailNode = renderState.tail;
var _lastTailNode = null;
while (_tailNode !== null) {
if (_tailNode.alternate !== null) {
_lastTailNode = _tailNode;
}
_tailNode = _tailNode.sibling;
}
if (_lastTailNode === null) {
if (!hasRenderedATailFallback && renderState.tail !== null) {
renderState.tail.sibling = null;
} else {
renderState.tail = null;
}
} else {
_lastTailNode.sibling = null;
}
break;
}
}
}
function bubbleProperties(completedWork) {
var didBailout = completedWork.alternate !== null && completedWork.alternate.child === completedWork.child;
var newChildLanes = NoLanes;
var subtreeFlags = NoFlags;
if (!didBailout) {
if ((completedWork.mode & ProfileMode) !== NoMode) {
var actualDuration = completedWork.actualDuration;
var treeBaseDuration = completedWork.selfBaseDuration;
var child = completedWork.child;
while (child !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(child.lanes, child.childLanes));
subtreeFlags |= child.subtreeFlags;
subtreeFlags |= child.flags;
actualDuration += child.actualDuration;
treeBaseDuration += child.treeBaseDuration;
child = child.sibling;
}
completedWork.actualDuration = actualDuration;
completedWork.treeBaseDuration = treeBaseDuration;
} else {
var _child = completedWork.child;
while (_child !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child.lanes, _child.childLanes));
subtreeFlags |= _child.subtreeFlags;
subtreeFlags |= _child.flags;
_child.return = completedWork;
_child = _child.sibling;
}
}
completedWork.subtreeFlags |= subtreeFlags;
} else {
if ((completedWork.mode & ProfileMode) !== NoMode) {
var _treeBaseDuration = completedWork.selfBaseDuration;
var _child2 = completedWork.child;
while (_child2 !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child2.lanes, _child2.childLanes));
subtreeFlags |= _child2.subtreeFlags & StaticMask;
subtreeFlags |= _child2.flags & StaticMask;
_treeBaseDuration += _child2.treeBaseDuration;
_child2 = _child2.sibling;
}
completedWork.treeBaseDuration = _treeBaseDuration;
} else {
var _child3 = completedWork.child;
while (_child3 !== null) {
newChildLanes = mergeLanes(newChildLanes, mergeLanes(_child3.lanes, _child3.childLanes));
subtreeFlags |= _child3.subtreeFlags & StaticMask;
subtreeFlags |= _child3.flags & StaticMask;
_child3.return = completedWork;
_child3 = _child3.sibling;
}
}
completedWork.subtreeFlags |= subtreeFlags;
}
completedWork.childLanes = newChildLanes;
return didBailout;
}
function completeDehydratedSuspenseBoundary(current3, workInProgress2, nextState) {
if (hasUnhydratedTailNodes() && (workInProgress2.mode & ConcurrentMode) !== NoMode && (workInProgress2.flags & DidCapture) === NoFlags) {
warnIfUnhydratedTailNodes(workInProgress2);
resetHydrationState();
workInProgress2.flags |= ForceClientRender | Incomplete | ShouldCapture;
return false;
}
var wasHydrated = popHydrationState(workInProgress2);
if (nextState !== null && nextState.dehydrated !== null) {
if (current3 === null) {
if (!wasHydrated) {
throw new Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");
}
prepareToHydrateHostSuspenseInstance(workInProgress2);
bubbleProperties(workInProgress2);
{
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
var isTimedOutSuspense = nextState !== null;
if (isTimedOutSuspense) {
var primaryChildFragment = workInProgress2.child;
if (primaryChildFragment !== null) {
workInProgress2.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
}
}
}
}
return false;
} else {
resetHydrationState();
if ((workInProgress2.flags & DidCapture) === NoFlags) {
workInProgress2.memoizedState = null;
}
workInProgress2.flags |= Update;
bubbleProperties(workInProgress2);
{
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
var _isTimedOutSuspense = nextState !== null;
if (_isTimedOutSuspense) {
var _primaryChildFragment = workInProgress2.child;
if (_primaryChildFragment !== null) {
workInProgress2.treeBaseDuration -= _primaryChildFragment.treeBaseDuration;
}
}
}
}
return false;
}
} else {
upgradeHydrationErrorsToRecoverable();
return true;
}
}
function completeWork(current3, workInProgress2, renderLanes2) {
var newProps = workInProgress2.pendingProps;
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case IndeterminateComponent:
case LazyComponent:
case SimpleMemoComponent:
case FunctionComponent:
case ForwardRef:
case Fragment9:
case Mode:
case Profiler:
case ContextConsumer:
case MemoComponent:
bubbleProperties(workInProgress2);
return null;
case ClassComponent: {
var Component3 = workInProgress2.type;
if (isContextProvider(Component3)) {
popContext(workInProgress2);
}
bubbleProperties(workInProgress2);
return null;
}
case HostRoot: {
var fiberRoot = workInProgress2.stateNode;
popHostContainer(workInProgress2);
popTopLevelContextObject(workInProgress2);
resetWorkInProgressVersions();
if (fiberRoot.pendingContext) {
fiberRoot.context = fiberRoot.pendingContext;
fiberRoot.pendingContext = null;
}
if (current3 === null || current3.child === null) {
var wasHydrated = popHydrationState(workInProgress2);
if (wasHydrated) {
markUpdate(workInProgress2);
} else {
if (current3 !== null) {
var prevState = current3.memoizedState;
if (
// Check if this is a client root
!prevState.isDehydrated || // Check if we reverted to client rendering (e.g. due to an error)
(workInProgress2.flags & ForceClientRender) !== NoFlags
) {
workInProgress2.flags |= Snapshot;
upgradeHydrationErrorsToRecoverable();
}
}
}
}
updateHostContainer(current3, workInProgress2);
bubbleProperties(workInProgress2);
return null;
}
case HostComponent: {
popHostContext(workInProgress2);
var rootContainerInstance = getRootHostContainer();
var type = workInProgress2.type;
if (current3 !== null && workInProgress2.stateNode != null) {
updateHostComponent$1(current3, workInProgress2, type, newProps, rootContainerInstance);
if (current3.ref !== workInProgress2.ref) {
markRef$1(workInProgress2);
}
} else {
if (!newProps) {
if (workInProgress2.stateNode === null) {
throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
}
bubbleProperties(workInProgress2);
return null;
}
var currentHostContext = getHostContext();
var _wasHydrated = popHydrationState(workInProgress2);
if (_wasHydrated) {
if (prepareToHydrateHostInstance(workInProgress2, rootContainerInstance, currentHostContext)) {
markUpdate(workInProgress2);
}
} else {
var instance = createInstance(type, newProps, rootContainerInstance, currentHostContext, workInProgress2);
appendAllChildren(instance, workInProgress2, false, false);
workInProgress2.stateNode = instance;
if (finalizeInitialChildren(instance, type, newProps, rootContainerInstance)) {
markUpdate(workInProgress2);
}
}
if (workInProgress2.ref !== null) {
markRef$1(workInProgress2);
}
}
bubbleProperties(workInProgress2);
return null;
}
case HostText: {
var newText = newProps;
if (current3 && workInProgress2.stateNode != null) {
var oldText = current3.memoizedProps;
updateHostText$1(current3, workInProgress2, oldText, newText);
} else {
if (typeof newText !== "string") {
if (workInProgress2.stateNode === null) {
throw new Error("We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.");
}
}
var _rootContainerInstance = getRootHostContainer();
var _currentHostContext = getHostContext();
var _wasHydrated2 = popHydrationState(workInProgress2);
if (_wasHydrated2) {
if (prepareToHydrateHostTextInstance(workInProgress2)) {
markUpdate(workInProgress2);
}
} else {
workInProgress2.stateNode = createTextInstance(newText, _rootContainerInstance, _currentHostContext, workInProgress2);
}
}
bubbleProperties(workInProgress2);
return null;
}
case SuspenseComponent: {
popSuspenseContext(workInProgress2);
var nextState = workInProgress2.memoizedState;
if (current3 === null || current3.memoizedState !== null && current3.memoizedState.dehydrated !== null) {
var fallthroughToNormalSuspensePath = completeDehydratedSuspenseBoundary(current3, workInProgress2, nextState);
if (!fallthroughToNormalSuspensePath) {
if (workInProgress2.flags & ShouldCapture) {
return workInProgress2;
} else {
return null;
}
}
}
if ((workInProgress2.flags & DidCapture) !== NoFlags) {
workInProgress2.lanes = renderLanes2;
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress2);
}
return workInProgress2;
}
var nextDidTimeout = nextState !== null;
var prevDidTimeout = current3 !== null && current3.memoizedState !== null;
if (nextDidTimeout !== prevDidTimeout) {
if (nextDidTimeout) {
var _offscreenFiber2 = workInProgress2.child;
_offscreenFiber2.flags |= Visibility;
if ((workInProgress2.mode & ConcurrentMode) !== NoMode) {
var hasInvisibleChildContext = current3 === null && (workInProgress2.memoizedProps.unstable_avoidThisFallback !== true || !enableSuspenseAvoidThisFallback);
if (hasInvisibleChildContext || hasSuspenseContext(suspenseStackCursor.current, InvisibleParentSuspenseContext)) {
renderDidSuspend();
} else {
renderDidSuspendDelayIfPossible();
}
}
}
}
var wakeables = workInProgress2.updateQueue;
if (wakeables !== null) {
workInProgress2.flags |= Update;
}
bubbleProperties(workInProgress2);
{
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
if (nextDidTimeout) {
var primaryChildFragment = workInProgress2.child;
if (primaryChildFragment !== null) {
workInProgress2.treeBaseDuration -= primaryChildFragment.treeBaseDuration;
}
}
}
}
return null;
}
case HostPortal:
popHostContainer(workInProgress2);
updateHostContainer(current3, workInProgress2);
if (current3 === null) {
preparePortalMount(workInProgress2.stateNode.containerInfo);
}
bubbleProperties(workInProgress2);
return null;
case ContextProvider:
var context = workInProgress2.type._context;
popProvider(context, workInProgress2);
bubbleProperties(workInProgress2);
return null;
case IncompleteClassComponent: {
var _Component = workInProgress2.type;
if (isContextProvider(_Component)) {
popContext(workInProgress2);
}
bubbleProperties(workInProgress2);
return null;
}
case SuspenseListComponent: {
popSuspenseContext(workInProgress2);
var renderState = workInProgress2.memoizedState;
if (renderState === null) {
bubbleProperties(workInProgress2);
return null;
}
var didSuspendAlready = (workInProgress2.flags & DidCapture) !== NoFlags;
var renderedTail = renderState.rendering;
if (renderedTail === null) {
if (!didSuspendAlready) {
var cannotBeSuspended = renderHasNotSuspendedYet() && (current3 === null || (current3.flags & DidCapture) === NoFlags);
if (!cannotBeSuspended) {
var row = workInProgress2.child;
while (row !== null) {
var suspended = findFirstSuspended(row);
if (suspended !== null) {
didSuspendAlready = true;
workInProgress2.flags |= DidCapture;
cutOffTailIfNeeded(renderState, false);
var newThenables = suspended.updateQueue;
if (newThenables !== null) {
workInProgress2.updateQueue = newThenables;
workInProgress2.flags |= Update;
}
workInProgress2.subtreeFlags = NoFlags;
resetChildFibers(workInProgress2, renderLanes2);
pushSuspenseContext(workInProgress2, setShallowSuspenseContext(suspenseStackCursor.current, ForceSuspenseFallback));
return workInProgress2.child;
}
row = row.sibling;
}
}
if (renderState.tail !== null && now3() > getRenderTargetTime()) {
workInProgress2.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false);
workInProgress2.lanes = SomeRetryLane;
}
} else {
cutOffTailIfNeeded(renderState, false);
}
} else {
if (!didSuspendAlready) {
var _suspended = findFirstSuspended(renderedTail);
if (_suspended !== null) {
workInProgress2.flags |= DidCapture;
didSuspendAlready = true;
var _newThenables = _suspended.updateQueue;
if (_newThenables !== null) {
workInProgress2.updateQueue = _newThenables;
workInProgress2.flags |= Update;
}
cutOffTailIfNeeded(renderState, true);
if (renderState.tail === null && renderState.tailMode === "hidden" && !renderedTail.alternate && !getIsHydrating()) {
bubbleProperties(workInProgress2);
return null;
}
} else if (
// The time it took to render last row is greater than the remaining
// time we have to render. So rendering one more row would likely
// exceed it.
now3() * 2 - renderState.renderingStartTime > getRenderTargetTime() && renderLanes2 !== OffscreenLane
) {
workInProgress2.flags |= DidCapture;
didSuspendAlready = true;
cutOffTailIfNeeded(renderState, false);
workInProgress2.lanes = SomeRetryLane;
}
}
if (renderState.isBackwards) {
renderedTail.sibling = workInProgress2.child;
workInProgress2.child = renderedTail;
} else {
var previousSibling = renderState.last;
if (previousSibling !== null) {
previousSibling.sibling = renderedTail;
} else {
workInProgress2.child = renderedTail;
}
renderState.last = renderedTail;
}
}
if (renderState.tail !== null) {
var next = renderState.tail;
renderState.rendering = next;
renderState.tail = next.sibling;
renderState.renderingStartTime = now3();
next.sibling = null;
var suspenseContext = suspenseStackCursor.current;
if (didSuspendAlready) {
suspenseContext = setShallowSuspenseContext(suspenseContext, ForceSuspenseFallback);
} else {
suspenseContext = setDefaultShallowSuspenseContext(suspenseContext);
}
pushSuspenseContext(workInProgress2, suspenseContext);
return next;
}
bubbleProperties(workInProgress2);
return null;
}
case ScopeComponent: {
break;
}
case OffscreenComponent:
case LegacyHiddenComponent: {
popRenderLanes(workInProgress2);
var _nextState = workInProgress2.memoizedState;
var nextIsHidden = _nextState !== null;
if (current3 !== null) {
var _prevState = current3.memoizedState;
var prevIsHidden = _prevState !== null;
if (prevIsHidden !== nextIsHidden && // LegacyHidden doesn't do any hiding — it only pre-renders.
!enableLegacyHidden) {
workInProgress2.flags |= Visibility;
}
}
if (!nextIsHidden || (workInProgress2.mode & ConcurrentMode) === NoMode) {
bubbleProperties(workInProgress2);
} else {
if (includesSomeLane(subtreeRenderLanes, OffscreenLane)) {
bubbleProperties(workInProgress2);
{
if (workInProgress2.subtreeFlags & (Placement | Update)) {
workInProgress2.flags |= Visibility;
}
}
}
}
return null;
}
case CacheComponent: {
return null;
}
case TracingMarkerComponent: {
return null;
}
}
throw new Error("Unknown unit of work tag (" + workInProgress2.tag + "). This error is likely caused by a bug in React. Please file an issue.");
}
function unwindWork(current3, workInProgress2, renderLanes2) {
popTreeContext(workInProgress2);
switch (workInProgress2.tag) {
case ClassComponent: {
var Component3 = workInProgress2.type;
if (isContextProvider(Component3)) {
popContext(workInProgress2);
}
var flags = workInProgress2.flags;
if (flags & ShouldCapture) {
workInProgress2.flags = flags & ~ShouldCapture | DidCapture;
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress2);
}
return workInProgress2;
}
return null;
}
case HostRoot: {
var root2 = workInProgress2.stateNode;
popHostContainer(workInProgress2);
popTopLevelContextObject(workInProgress2);
resetWorkInProgressVersions();
var _flags = workInProgress2.flags;
if ((_flags & ShouldCapture) !== NoFlags && (_flags & DidCapture) === NoFlags) {
workInProgress2.flags = _flags & ~ShouldCapture | DidCapture;
return workInProgress2;
}
return null;
}
case HostComponent: {
popHostContext(workInProgress2);
return null;
}
case SuspenseComponent: {
popSuspenseContext(workInProgress2);
var suspenseState = workInProgress2.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
if (workInProgress2.alternate === null) {
throw new Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");
}
resetHydrationState();
}
var _flags2 = workInProgress2.flags;
if (_flags2 & ShouldCapture) {
workInProgress2.flags = _flags2 & ~ShouldCapture | DidCapture;
if ((workInProgress2.mode & ProfileMode) !== NoMode) {
transferActualDuration(workInProgress2);
}
return workInProgress2;
}
return null;
}
case SuspenseListComponent: {
popSuspenseContext(workInProgress2);
return null;
}
case HostPortal:
popHostContainer(workInProgress2);
return null;
case ContextProvider:
var context = workInProgress2.type._context;
popProvider(context, workInProgress2);
return null;
case OffscreenComponent:
case LegacyHiddenComponent:
popRenderLanes(workInProgress2);
return null;
case CacheComponent:
return null;
default:
return null;
}
}
function unwindInterruptedWork(current3, interruptedWork, renderLanes2) {
popTreeContext(interruptedWork);
switch (interruptedWork.tag) {
case ClassComponent: {
var childContextTypes = interruptedWork.type.childContextTypes;
if (childContextTypes !== null && childContextTypes !== void 0) {
popContext(interruptedWork);
}
break;
}
case HostRoot: {
var root2 = interruptedWork.stateNode;
popHostContainer(interruptedWork);
popTopLevelContextObject(interruptedWork);
resetWorkInProgressVersions();
break;
}
case HostComponent: {
popHostContext(interruptedWork);
break;
}
case HostPortal:
popHostContainer(interruptedWork);
break;
case SuspenseComponent:
popSuspenseContext(interruptedWork);
break;
case SuspenseListComponent:
popSuspenseContext(interruptedWork);
break;
case ContextProvider:
var context = interruptedWork.type._context;
popProvider(context, interruptedWork);
break;
case OffscreenComponent:
case LegacyHiddenComponent:
popRenderLanes(interruptedWork);
break;
}
}
var didWarnAboutUndefinedSnapshotBeforeUpdate = null;
{
didWarnAboutUndefinedSnapshotBeforeUpdate = /* @__PURE__ */ new Set();
}
var offscreenSubtreeIsHidden = false;
var offscreenSubtreeWasHidden = false;
var PossiblyWeakSet = typeof WeakSet === "function" ? WeakSet : Set;
var nextEffect = null;
var inProgressLanes = null;
var inProgressRoot = null;
function reportUncaughtErrorInDEV(error2) {
{
invokeGuardedCallback(null, function() {
throw error2;
});
clearCaughtError();
}
}
var callComponentWillUnmountWithTimer = function(current3, instance) {
instance.props = current3.memoizedProps;
instance.state = current3.memoizedState;
if (current3.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentWillUnmount();
} finally {
recordLayoutEffectDuration(current3);
}
} else {
instance.componentWillUnmount();
}
};
function safelyCallCommitHookLayoutEffectListMount(current3, nearestMountedAncestor) {
try {
commitHookEffectListMount(Layout, current3);
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
}
function safelyCallComponentWillUnmount(current3, nearestMountedAncestor, instance) {
try {
callComponentWillUnmountWithTimer(current3, instance);
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
}
function safelyCallComponentDidMount(current3, nearestMountedAncestor, instance) {
try {
instance.componentDidMount();
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
}
function safelyAttachRef(current3, nearestMountedAncestor) {
try {
commitAttachRef(current3);
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
}
function safelyDetachRef(current3, nearestMountedAncestor) {
var ref = current3.ref;
if (ref !== null) {
if (typeof ref === "function") {
var retVal;
try {
if (enableProfilerTimer && enableProfilerCommitHooks && current3.mode & ProfileMode) {
try {
startLayoutEffectTimer();
retVal = ref(null);
} finally {
recordLayoutEffectDuration(current3);
}
} else {
retVal = ref(null);
}
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
{
if (typeof retVal === "function") {
error("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", getComponentNameFromFiber(current3));
}
}
} else {
ref.current = null;
}
}
}
function safelyCallDestroy(current3, nearestMountedAncestor, destroy) {
try {
destroy();
} catch (error2) {
captureCommitPhaseError(current3, nearestMountedAncestor, error2);
}
}
var focusedInstanceHandle = null;
var shouldFireAfterActiveInstanceBlur = false;
function commitBeforeMutationEffects(root2, firstChild) {
focusedInstanceHandle = prepareForCommit(root2.containerInfo);
nextEffect = firstChild;
commitBeforeMutationEffects_begin();
var shouldFire = shouldFireAfterActiveInstanceBlur;
shouldFireAfterActiveInstanceBlur = false;
focusedInstanceHandle = null;
return shouldFire;
}
function commitBeforeMutationEffects_begin() {
while (nextEffect !== null) {
var fiber = nextEffect;
var child = fiber.child;
if ((fiber.subtreeFlags & BeforeMutationMask) !== NoFlags && child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitBeforeMutationEffects_complete();
}
}
}
function commitBeforeMutationEffects_complete() {
while (nextEffect !== null) {
var fiber = nextEffect;
setCurrentFiber(fiber);
try {
commitBeforeMutationEffectsOnFiber(fiber);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
resetCurrentFiber();
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitBeforeMutationEffectsOnFiber(finishedWork) {
var current3 = finishedWork.alternate;
var flags = finishedWork.flags;
if ((flags & Snapshot) !== NoFlags) {
setCurrentFiber(finishedWork);
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
break;
}
case ClassComponent: {
if (current3 !== null) {
var prevProps = current3.memoizedProps;
var prevState = current3.memoizedState;
var instance = finishedWork.stateNode;
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
if (instance.state !== finishedWork.memoizedState) {
error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
}
}
var snapshot = instance.getSnapshotBeforeUpdate(finishedWork.elementType === finishedWork.type ? prevProps : resolveDefaultProps(finishedWork.type, prevProps), prevState);
{
var didWarnSet = didWarnAboutUndefinedSnapshotBeforeUpdate;
if (snapshot === void 0 && !didWarnSet.has(finishedWork.type)) {
didWarnSet.add(finishedWork.type);
error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.", getComponentNameFromFiber(finishedWork));
}
}
instance.__reactInternalSnapshotBeforeUpdate = snapshot;
}
break;
}
case HostRoot: {
{
var root2 = finishedWork.stateNode;
clearContainer(root2.containerInfo);
}
break;
}
case HostComponent:
case HostText:
case HostPortal:
case IncompleteClassComponent:
break;
default: {
throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
}
}
resetCurrentFiber();
}
}
function commitHookEffectListUnmount(flags, finishedWork, nearestMountedAncestor) {
var updateQueue = finishedWork.updateQueue;
var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
if ((effect.tag & flags) === flags) {
var destroy = effect.destroy;
effect.destroy = void 0;
if (destroy !== void 0) {
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectUnmountStarted(finishedWork);
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectUnmountStarted(finishedWork);
}
}
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(true);
}
}
safelyCallDestroy(finishedWork, nearestMountedAncestor, destroy);
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(false);
}
}
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectUnmountStopped();
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectUnmountStopped();
}
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
function commitHookEffectListMount(flags, finishedWork) {
var updateQueue = finishedWork.updateQueue;
var lastEffect = updateQueue !== null ? updateQueue.lastEffect : null;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
if ((effect.tag & flags) === flags) {
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectMountStarted(finishedWork);
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectMountStarted(finishedWork);
}
}
var create = effect.create;
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(true);
}
}
effect.destroy = create();
{
if ((flags & Insertion) !== NoFlags$1) {
setIsRunningInsertionEffect(false);
}
}
{
if ((flags & Passive$1) !== NoFlags$1) {
markComponentPassiveEffectMountStopped();
} else if ((flags & Layout) !== NoFlags$1) {
markComponentLayoutEffectMountStopped();
}
}
{
var destroy = effect.destroy;
if (destroy !== void 0 && typeof destroy !== "function") {
var hookName = void 0;
if ((effect.tag & Layout) !== NoFlags) {
hookName = "useLayoutEffect";
} else if ((effect.tag & Insertion) !== NoFlags) {
hookName = "useInsertionEffect";
} else {
hookName = "useEffect";
}
var addendum = void 0;
if (destroy === null) {
addendum = " You returned null. If your effect does not require clean up, return undefined (or nothing).";
} else if (typeof destroy.then === "function") {
addendum = "\n\nIt looks like you wrote " + hookName + "(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:\n\n" + hookName + "(() => {\n async function fetchData() {\n // You can await here\n const response = await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if effect doesn't need props or state\n\nLearn more about data fetching with Hooks: https://reactjs.org/link/hooks-data-fetching";
} else {
addendum = " You returned: " + destroy;
}
error("%s must not return anything besides a function, which is used for clean-up.%s", hookName, addendum);
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
function commitPassiveEffectDurations(finishedRoot, finishedWork) {
{
if ((finishedWork.flags & Update) !== NoFlags) {
switch (finishedWork.tag) {
case Profiler: {
var passiveEffectDuration = finishedWork.stateNode.passiveEffectDuration;
var _finishedWork$memoize = finishedWork.memoizedProps, id = _finishedWork$memoize.id, onPostCommit = _finishedWork$memoize.onPostCommit;
var commitTime2 = getCommitTime();
var phase = finishedWork.alternate === null ? "mount" : "update";
{
if (isCurrentUpdateNested()) {
phase = "nested-update";
}
}
if (typeof onPostCommit === "function") {
onPostCommit(id, phase, passiveEffectDuration, commitTime2);
}
var parentFiber = finishedWork.return;
outer:
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root2 = parentFiber.stateNode;
root2.passiveEffectDuration += passiveEffectDuration;
break outer;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.passiveEffectDuration += passiveEffectDuration;
break outer;
}
parentFiber = parentFiber.return;
}
break;
}
}
}
}
}
function commitLayoutEffectOnFiber(finishedRoot, current3, finishedWork, committedLanes) {
if ((finishedWork.flags & LayoutMask) !== NoFlags) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
if (!offscreenSubtreeWasHidden) {
if (finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListMount(Layout | HasEffect, finishedWork);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
commitHookEffectListMount(Layout | HasEffect, finishedWork);
}
}
break;
}
case ClassComponent: {
var instance = finishedWork.stateNode;
if (finishedWork.flags & Update) {
if (!offscreenSubtreeWasHidden) {
if (current3 === null) {
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
if (instance.state !== finishedWork.memoizedState) {
error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
}
}
if (finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentDidMount();
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
instance.componentDidMount();
}
} else {
var prevProps = finishedWork.elementType === finishedWork.type ? current3.memoizedProps : resolveDefaultProps(finishedWork.type, current3.memoizedProps);
var prevState = current3.memoizedState;
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
if (instance.state !== finishedWork.memoizedState) {
error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
}
}
if (finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
instance.componentDidUpdate(prevProps, prevState, instance.__reactInternalSnapshotBeforeUpdate);
}
}
}
}
var updateQueue = finishedWork.updateQueue;
if (updateQueue !== null) {
{
if (finishedWork.type === finishedWork.elementType && !didWarnAboutReassigningProps) {
if (instance.props !== finishedWork.memoizedProps) {
error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
if (instance.state !== finishedWork.memoizedState) {
error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.", getComponentNameFromFiber(finishedWork) || "instance");
}
}
}
commitUpdateQueue(finishedWork, updateQueue, instance);
}
break;
}
case HostRoot: {
var _updateQueue = finishedWork.updateQueue;
if (_updateQueue !== null) {
var _instance = null;
if (finishedWork.child !== null) {
switch (finishedWork.child.tag) {
case HostComponent:
_instance = getPublicInstance(finishedWork.child.stateNode);
break;
case ClassComponent:
_instance = finishedWork.child.stateNode;
break;
}
}
commitUpdateQueue(finishedWork, _updateQueue, _instance);
}
break;
}
case HostComponent: {
var _instance2 = finishedWork.stateNode;
if (current3 === null && finishedWork.flags & Update) {
var type = finishedWork.type;
var props = finishedWork.memoizedProps;
commitMount(_instance2, type, props);
}
break;
}
case HostText: {
break;
}
case HostPortal: {
break;
}
case Profiler: {
{
var _finishedWork$memoize2 = finishedWork.memoizedProps, onCommit = _finishedWork$memoize2.onCommit, onRender = _finishedWork$memoize2.onRender;
var effectDuration = finishedWork.stateNode.effectDuration;
var commitTime2 = getCommitTime();
var phase = current3 === null ? "mount" : "update";
{
if (isCurrentUpdateNested()) {
phase = "nested-update";
}
}
if (typeof onRender === "function") {
onRender(finishedWork.memoizedProps.id, phase, finishedWork.actualDuration, finishedWork.treeBaseDuration, finishedWork.actualStartTime, commitTime2);
}
{
if (typeof onCommit === "function") {
onCommit(finishedWork.memoizedProps.id, phase, effectDuration, commitTime2);
}
enqueuePendingPassiveProfilerEffect(finishedWork);
var parentFiber = finishedWork.return;
outer:
while (parentFiber !== null) {
switch (parentFiber.tag) {
case HostRoot:
var root2 = parentFiber.stateNode;
root2.effectDuration += effectDuration;
break outer;
case Profiler:
var parentStateNode = parentFiber.stateNode;
parentStateNode.effectDuration += effectDuration;
break outer;
}
parentFiber = parentFiber.return;
}
}
}
break;
}
case SuspenseComponent: {
commitSuspenseHydrationCallbacks(finishedRoot, finishedWork);
break;
}
case SuspenseListComponent:
case IncompleteClassComponent:
case ScopeComponent:
case OffscreenComponent:
case LegacyHiddenComponent:
case TracingMarkerComponent: {
break;
}
default:
throw new Error("This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.");
}
}
if (!offscreenSubtreeWasHidden) {
{
if (finishedWork.flags & Ref) {
commitAttachRef(finishedWork);
}
}
}
}
function reappearLayoutEffectsOnFiber(node) {
switch (node.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
if (node.mode & ProfileMode) {
try {
startLayoutEffectTimer();
safelyCallCommitHookLayoutEffectListMount(node, node.return);
} finally {
recordLayoutEffectDuration(node);
}
} else {
safelyCallCommitHookLayoutEffectListMount(node, node.return);
}
break;
}
case ClassComponent: {
var instance = node.stateNode;
if (typeof instance.componentDidMount === "function") {
safelyCallComponentDidMount(node, node.return, instance);
}
safelyAttachRef(node, node.return);
break;
}
case HostComponent: {
safelyAttachRef(node, node.return);
break;
}
}
}
function hideOrUnhideAllChildren(finishedWork, isHidden) {
var hostSubtreeRoot = null;
{
var node = finishedWork;
while (true) {
if (node.tag === HostComponent) {
if (hostSubtreeRoot === null) {
hostSubtreeRoot = node;
try {
var instance = node.stateNode;
if (isHidden) {
hideInstance(instance);
} else {
unhideInstance(node.stateNode, node.memoizedProps);
}
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
} else if (node.tag === HostText) {
if (hostSubtreeRoot === null) {
try {
var _instance3 = node.stateNode;
if (isHidden) {
hideTextInstance(_instance3);
} else {
unhideTextInstance(_instance3, node.memoizedProps);
}
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
} else if ((node.tag === OffscreenComponent || node.tag === LegacyHiddenComponent) && node.memoizedState !== null && node !== finishedWork)
;
else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === finishedWork) {
return;
}
while (node.sibling === null) {
if (node.return === null || node.return === finishedWork) {
return;
}
if (hostSubtreeRoot === node) {
hostSubtreeRoot = null;
}
node = node.return;
}
if (hostSubtreeRoot === node) {
hostSubtreeRoot = null;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
}
function commitAttachRef(finishedWork) {
var ref = finishedWork.ref;
if (ref !== null) {
var instance = finishedWork.stateNode;
var instanceToUse;
switch (finishedWork.tag) {
case HostComponent:
instanceToUse = getPublicInstance(instance);
break;
default:
instanceToUse = instance;
}
if (typeof ref === "function") {
var retVal;
if (finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
retVal = ref(instanceToUse);
} finally {
recordLayoutEffectDuration(finishedWork);
}
} else {
retVal = ref(instanceToUse);
}
{
if (typeof retVal === "function") {
error("Unexpected return value from a callback ref in %s. A callback ref should not return a function.", getComponentNameFromFiber(finishedWork));
}
}
} else {
{
if (!ref.hasOwnProperty("current")) {
error("Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().", getComponentNameFromFiber(finishedWork));
}
}
ref.current = instanceToUse;
}
}
}
function detachFiberMutation(fiber) {
var alternate = fiber.alternate;
if (alternate !== null) {
alternate.return = null;
}
fiber.return = null;
}
function detachFiberAfterEffects(fiber) {
var alternate = fiber.alternate;
if (alternate !== null) {
fiber.alternate = null;
detachFiberAfterEffects(alternate);
}
{
fiber.child = null;
fiber.deletions = null;
fiber.sibling = null;
if (fiber.tag === HostComponent) {
var hostInstance = fiber.stateNode;
if (hostInstance !== null) {
detachDeletedInstance(hostInstance);
}
}
fiber.stateNode = null;
{
fiber._debugOwner = null;
}
{
fiber.return = null;
fiber.dependencies = null;
fiber.memoizedProps = null;
fiber.memoizedState = null;
fiber.pendingProps = null;
fiber.stateNode = null;
fiber.updateQueue = null;
}
}
}
function getHostParentFiber(fiber) {
var parent = fiber.return;
while (parent !== null) {
if (isHostParent(parent)) {
return parent;
}
parent = parent.return;
}
throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
}
function isHostParent(fiber) {
return fiber.tag === HostComponent || fiber.tag === HostRoot || fiber.tag === HostPortal;
}
function getHostSibling(fiber) {
var node = fiber;
siblings:
while (true) {
while (node.sibling === null) {
if (node.return === null || isHostParent(node.return)) {
return null;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
while (node.tag !== HostComponent && node.tag !== HostText && node.tag !== DehydratedFragment) {
if (node.flags & Placement) {
continue siblings;
}
if (node.child === null || node.tag === HostPortal) {
continue siblings;
} else {
node.child.return = node;
node = node.child;
}
}
if (!(node.flags & Placement)) {
return node.stateNode;
}
}
}
function commitPlacement(finishedWork) {
var parentFiber = getHostParentFiber(finishedWork);
switch (parentFiber.tag) {
case HostComponent: {
var parent = parentFiber.stateNode;
if (parentFiber.flags & ContentReset) {
resetTextContent(parent);
parentFiber.flags &= ~ContentReset;
}
var before = getHostSibling(finishedWork);
insertOrAppendPlacementNode(finishedWork, before, parent);
break;
}
case HostRoot:
case HostPortal: {
var _parent = parentFiber.stateNode.containerInfo;
var _before = getHostSibling(finishedWork);
insertOrAppendPlacementNodeIntoContainer(finishedWork, _before, _parent);
break;
}
default:
throw new Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.");
}
}
function insertOrAppendPlacementNodeIntoContainer(node, before, parent) {
var tag = node.tag;
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
var stateNode = node.stateNode;
if (before) {
insertInContainerBefore(parent, stateNode, before);
} else {
appendChildToContainer(parent, stateNode);
}
} else if (tag === HostPortal)
;
else {
var child = node.child;
if (child !== null) {
insertOrAppendPlacementNodeIntoContainer(child, before, parent);
var sibling = child.sibling;
while (sibling !== null) {
insertOrAppendPlacementNodeIntoContainer(sibling, before, parent);
sibling = sibling.sibling;
}
}
}
}
function insertOrAppendPlacementNode(node, before, parent) {
var tag = node.tag;
var isHost = tag === HostComponent || tag === HostText;
if (isHost) {
var stateNode = node.stateNode;
if (before) {
insertBefore(parent, stateNode, before);
} else {
appendChild(parent, stateNode);
}
} else if (tag === HostPortal)
;
else {
var child = node.child;
if (child !== null) {
insertOrAppendPlacementNode(child, before, parent);
var sibling = child.sibling;
while (sibling !== null) {
insertOrAppendPlacementNode(sibling, before, parent);
sibling = sibling.sibling;
}
}
}
}
var hostParent = null;
var hostParentIsContainer = false;
function commitDeletionEffects(root2, returnFiber, deletedFiber) {
{
var parent = returnFiber;
findParent:
while (parent !== null) {
switch (parent.tag) {
case HostComponent: {
hostParent = parent.stateNode;
hostParentIsContainer = false;
break findParent;
}
case HostRoot: {
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break findParent;
}
case HostPortal: {
hostParent = parent.stateNode.containerInfo;
hostParentIsContainer = true;
break findParent;
}
}
parent = parent.return;
}
if (hostParent === null) {
throw new Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");
}
commitDeletionEffectsOnFiber(root2, returnFiber, deletedFiber);
hostParent = null;
hostParentIsContainer = false;
}
detachFiberMutation(deletedFiber);
}
function recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, parent) {
var child = parent.child;
while (child !== null) {
commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, child);
child = child.sibling;
}
}
function commitDeletionEffectsOnFiber(finishedRoot, nearestMountedAncestor, deletedFiber) {
onCommitUnmount(deletedFiber);
switch (deletedFiber.tag) {
case HostComponent: {
if (!offscreenSubtreeWasHidden) {
safelyDetachRef(deletedFiber, nearestMountedAncestor);
}
}
case HostText: {
{
var prevHostParent = hostParent;
var prevHostParentIsContainer = hostParentIsContainer;
hostParent = null;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
hostParent = prevHostParent;
hostParentIsContainer = prevHostParentIsContainer;
if (hostParent !== null) {
if (hostParentIsContainer) {
removeChildFromContainer(hostParent, deletedFiber.stateNode);
} else {
removeChild(hostParent, deletedFiber.stateNode);
}
}
}
return;
}
case DehydratedFragment: {
{
if (hostParent !== null) {
if (hostParentIsContainer) {
clearSuspenseBoundaryFromContainer(hostParent, deletedFiber.stateNode);
} else {
clearSuspenseBoundary(hostParent, deletedFiber.stateNode);
}
}
}
return;
}
case HostPortal: {
{
var _prevHostParent = hostParent;
var _prevHostParentIsContainer = hostParentIsContainer;
hostParent = deletedFiber.stateNode.containerInfo;
hostParentIsContainer = true;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
hostParent = _prevHostParent;
hostParentIsContainer = _prevHostParentIsContainer;
}
return;
}
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent: {
if (!offscreenSubtreeWasHidden) {
var updateQueue = deletedFiber.updateQueue;
if (updateQueue !== null) {
var lastEffect = updateQueue.lastEffect;
if (lastEffect !== null) {
var firstEffect = lastEffect.next;
var effect = firstEffect;
do {
var _effect = effect, destroy = _effect.destroy, tag = _effect.tag;
if (destroy !== void 0) {
if ((tag & Insertion) !== NoFlags$1) {
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
} else if ((tag & Layout) !== NoFlags$1) {
{
markComponentLayoutEffectUnmountStarted(deletedFiber);
}
if (deletedFiber.mode & ProfileMode) {
startLayoutEffectTimer();
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
recordLayoutEffectDuration(deletedFiber);
} else {
safelyCallDestroy(deletedFiber, nearestMountedAncestor, destroy);
}
{
markComponentLayoutEffectUnmountStopped();
}
}
}
effect = effect.next;
} while (effect !== firstEffect);
}
}
}
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case ClassComponent: {
if (!offscreenSubtreeWasHidden) {
safelyDetachRef(deletedFiber, nearestMountedAncestor);
var instance = deletedFiber.stateNode;
if (typeof instance.componentWillUnmount === "function") {
safelyCallComponentWillUnmount(deletedFiber, nearestMountedAncestor, instance);
}
}
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case ScopeComponent: {
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
case OffscreenComponent: {
if (
// TODO: Remove this dead flag
deletedFiber.mode & ConcurrentMode
) {
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || deletedFiber.memoizedState !== null;
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
} else {
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
}
break;
}
default: {
recursivelyTraverseDeletionEffects(finishedRoot, nearestMountedAncestor, deletedFiber);
return;
}
}
}
function commitSuspenseCallback(finishedWork) {
var newState = finishedWork.memoizedState;
}
function commitSuspenseHydrationCallbacks(finishedRoot, finishedWork) {
var newState = finishedWork.memoizedState;
if (newState === null) {
var current3 = finishedWork.alternate;
if (current3 !== null) {
var prevState = current3.memoizedState;
if (prevState !== null) {
var suspenseInstance = prevState.dehydrated;
if (suspenseInstance !== null) {
commitHydratedSuspenseInstance(suspenseInstance);
}
}
}
}
}
function attachSuspenseRetryListeners(finishedWork) {
var wakeables = finishedWork.updateQueue;
if (wakeables !== null) {
finishedWork.updateQueue = null;
var retryCache = finishedWork.stateNode;
if (retryCache === null) {
retryCache = finishedWork.stateNode = new PossiblyWeakSet();
}
wakeables.forEach(function(wakeable) {
var retry = resolveRetryWakeable.bind(null, finishedWork, wakeable);
if (!retryCache.has(wakeable)) {
retryCache.add(wakeable);
{
if (isDevToolsPresent) {
if (inProgressLanes !== null && inProgressRoot !== null) {
restorePendingUpdaters(inProgressRoot, inProgressLanes);
} else {
throw Error("Expected finished root and lanes to be set. This is a bug in React.");
}
}
}
wakeable.then(retry, retry);
}
});
}
}
function commitMutationEffects(root2, finishedWork, committedLanes) {
inProgressLanes = committedLanes;
inProgressRoot = root2;
setCurrentFiber(finishedWork);
commitMutationEffectsOnFiber(finishedWork, root2);
setCurrentFiber(finishedWork);
inProgressLanes = null;
inProgressRoot = null;
}
function recursivelyTraverseMutationEffects(root2, parentFiber, lanes) {
var deletions = parentFiber.deletions;
if (deletions !== null) {
for (var i = 0; i < deletions.length; i++) {
var childToDelete = deletions[i];
try {
commitDeletionEffects(root2, parentFiber, childToDelete);
} catch (error2) {
captureCommitPhaseError(childToDelete, parentFiber, error2);
}
}
}
var prevDebugFiber = getCurrentFiber();
if (parentFiber.subtreeFlags & MutationMask) {
var child = parentFiber.child;
while (child !== null) {
setCurrentFiber(child);
commitMutationEffectsOnFiber(child, root2);
child = child.sibling;
}
}
setCurrentFiber(prevDebugFiber);
}
function commitMutationEffectsOnFiber(finishedWork, root2, lanes) {
var current3 = finishedWork.alternate;
var flags = finishedWork.flags;
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
try {
commitHookEffectListUnmount(Insertion | HasEffect, finishedWork, finishedWork.return);
commitHookEffectListMount(Insertion | HasEffect, finishedWork);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
if (finishedWork.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
recordLayoutEffectDuration(finishedWork);
} else {
try {
commitHookEffectListUnmount(Layout | HasEffect, finishedWork, finishedWork.return);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
}
return;
}
case ClassComponent: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Ref) {
if (current3 !== null) {
safelyDetachRef(current3, current3.return);
}
}
return;
}
case HostComponent: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Ref) {
if (current3 !== null) {
safelyDetachRef(current3, current3.return);
}
}
{
if (finishedWork.flags & ContentReset) {
var instance = finishedWork.stateNode;
try {
resetTextContent(instance);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
if (flags & Update) {
var _instance4 = finishedWork.stateNode;
if (_instance4 != null) {
var newProps = finishedWork.memoizedProps;
var oldProps = current3 !== null ? current3.memoizedProps : newProps;
var type = finishedWork.type;
var updatePayload = finishedWork.updateQueue;
finishedWork.updateQueue = null;
if (updatePayload !== null) {
try {
commitUpdate(_instance4, updatePayload, type, oldProps, newProps, finishedWork);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
}
}
}
return;
}
case HostText: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
{
if (finishedWork.stateNode === null) {
throw new Error("This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.");
}
var textInstance = finishedWork.stateNode;
var newText = finishedWork.memoizedProps;
var oldText = current3 !== null ? current3.memoizedProps : newText;
try {
commitTextUpdate(textInstance, oldText, newText);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
}
return;
}
case HostRoot: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
{
if (current3 !== null) {
var prevRootState = current3.memoizedState;
if (prevRootState.isDehydrated) {
try {
commitHydratedContainer(root2.containerInfo);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
}
}
}
}
return;
}
case HostPortal: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
return;
}
case SuspenseComponent: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
var offscreenFiber = finishedWork.child;
if (offscreenFiber.flags & Visibility) {
var offscreenInstance = offscreenFiber.stateNode;
var newState = offscreenFiber.memoizedState;
var isHidden = newState !== null;
offscreenInstance.isHidden = isHidden;
if (isHidden) {
var wasHidden = offscreenFiber.alternate !== null && offscreenFiber.alternate.memoizedState !== null;
if (!wasHidden) {
markCommitTimeOfFallback();
}
}
}
if (flags & Update) {
try {
commitSuspenseCallback(finishedWork);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
attachSuspenseRetryListeners(finishedWork);
}
return;
}
case OffscreenComponent: {
var _wasHidden = current3 !== null && current3.memoizedState !== null;
if (
// TODO: Remove this dead flag
finishedWork.mode & ConcurrentMode
) {
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden || _wasHidden;
recursivelyTraverseMutationEffects(root2, finishedWork);
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
} else {
recursivelyTraverseMutationEffects(root2, finishedWork);
}
commitReconciliationEffects(finishedWork);
if (flags & Visibility) {
var _offscreenInstance = finishedWork.stateNode;
var _newState = finishedWork.memoizedState;
var _isHidden = _newState !== null;
var offscreenBoundary = finishedWork;
_offscreenInstance.isHidden = _isHidden;
{
if (_isHidden) {
if (!_wasHidden) {
if ((offscreenBoundary.mode & ConcurrentMode) !== NoMode) {
nextEffect = offscreenBoundary;
var offscreenChild = offscreenBoundary.child;
while (offscreenChild !== null) {
nextEffect = offscreenChild;
disappearLayoutEffects_begin(offscreenChild);
offscreenChild = offscreenChild.sibling;
}
}
}
}
}
{
hideOrUnhideAllChildren(offscreenBoundary, _isHidden);
}
}
return;
}
case SuspenseListComponent: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
if (flags & Update) {
attachSuspenseRetryListeners(finishedWork);
}
return;
}
case ScopeComponent: {
return;
}
default: {
recursivelyTraverseMutationEffects(root2, finishedWork);
commitReconciliationEffects(finishedWork);
return;
}
}
}
function commitReconciliationEffects(finishedWork) {
var flags = finishedWork.flags;
if (flags & Placement) {
try {
commitPlacement(finishedWork);
} catch (error2) {
captureCommitPhaseError(finishedWork, finishedWork.return, error2);
}
finishedWork.flags &= ~Placement;
}
if (flags & Hydrating) {
finishedWork.flags &= ~Hydrating;
}
}
function commitLayoutEffects(finishedWork, root2, committedLanes) {
inProgressLanes = committedLanes;
inProgressRoot = root2;
nextEffect = finishedWork;
commitLayoutEffects_begin(finishedWork, root2, committedLanes);
inProgressLanes = null;
inProgressRoot = null;
}
function commitLayoutEffects_begin(subtreeRoot, root2, committedLanes) {
var isModernRoot = (subtreeRoot.mode & ConcurrentMode) !== NoMode;
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if (fiber.tag === OffscreenComponent && isModernRoot) {
var isHidden = fiber.memoizedState !== null;
var newOffscreenSubtreeIsHidden = isHidden || offscreenSubtreeIsHidden;
if (newOffscreenSubtreeIsHidden) {
commitLayoutMountEffects_complete(subtreeRoot, root2, committedLanes);
continue;
} else {
var current3 = fiber.alternate;
var wasHidden = current3 !== null && current3.memoizedState !== null;
var newOffscreenSubtreeWasHidden = wasHidden || offscreenSubtreeWasHidden;
var prevOffscreenSubtreeIsHidden = offscreenSubtreeIsHidden;
var prevOffscreenSubtreeWasHidden = offscreenSubtreeWasHidden;
offscreenSubtreeIsHidden = newOffscreenSubtreeIsHidden;
offscreenSubtreeWasHidden = newOffscreenSubtreeWasHidden;
if (offscreenSubtreeWasHidden && !prevOffscreenSubtreeWasHidden) {
nextEffect = fiber;
reappearLayoutEffects_begin(fiber);
}
var child = firstChild;
while (child !== null) {
nextEffect = child;
commitLayoutEffects_begin(
child,
// New root; bubble back up to here and stop.
root2,
committedLanes
);
child = child.sibling;
}
nextEffect = fiber;
offscreenSubtreeIsHidden = prevOffscreenSubtreeIsHidden;
offscreenSubtreeWasHidden = prevOffscreenSubtreeWasHidden;
commitLayoutMountEffects_complete(subtreeRoot, root2, committedLanes);
continue;
}
}
if ((fiber.subtreeFlags & LayoutMask) !== NoFlags && firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
commitLayoutMountEffects_complete(subtreeRoot, root2, committedLanes);
}
}
}
function commitLayoutMountEffects_complete(subtreeRoot, root2, committedLanes) {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & LayoutMask) !== NoFlags) {
var current3 = fiber.alternate;
setCurrentFiber(fiber);
try {
commitLayoutEffectOnFiber(root2, current3, fiber, committedLanes);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
resetCurrentFiber();
}
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function disappearLayoutEffects_begin(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case MemoComponent:
case SimpleMemoComponent: {
if (fiber.mode & ProfileMode) {
try {
startLayoutEffectTimer();
commitHookEffectListUnmount(Layout, fiber, fiber.return);
} finally {
recordLayoutEffectDuration(fiber);
}
} else {
commitHookEffectListUnmount(Layout, fiber, fiber.return);
}
break;
}
case ClassComponent: {
safelyDetachRef(fiber, fiber.return);
var instance = fiber.stateNode;
if (typeof instance.componentWillUnmount === "function") {
safelyCallComponentWillUnmount(fiber, fiber.return, instance);
}
break;
}
case HostComponent: {
safelyDetachRef(fiber, fiber.return);
break;
}
case OffscreenComponent: {
var isHidden = fiber.memoizedState !== null;
if (isHidden) {
disappearLayoutEffects_complete(subtreeRoot);
continue;
}
break;
}
}
if (firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
disappearLayoutEffects_complete(subtreeRoot);
}
}
}
function disappearLayoutEffects_complete(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function reappearLayoutEffects_begin(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if (fiber.tag === OffscreenComponent) {
var isHidden = fiber.memoizedState !== null;
if (isHidden) {
reappearLayoutEffects_complete(subtreeRoot);
continue;
}
}
if (firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
reappearLayoutEffects_complete(subtreeRoot);
}
}
}
function reappearLayoutEffects_complete(subtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
setCurrentFiber(fiber);
try {
reappearLayoutEffectsOnFiber(fiber);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
resetCurrentFiber();
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveMountEffects(root2, finishedWork, committedLanes, committedTransitions) {
nextEffect = finishedWork;
commitPassiveMountEffects_begin(finishedWork, root2, committedLanes, committedTransitions);
}
function commitPassiveMountEffects_begin(subtreeRoot, root2, committedLanes, committedTransitions) {
while (nextEffect !== null) {
var fiber = nextEffect;
var firstChild = fiber.child;
if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && firstChild !== null) {
firstChild.return = fiber;
nextEffect = firstChild;
} else {
commitPassiveMountEffects_complete(subtreeRoot, root2, committedLanes, committedTransitions);
}
}
}
function commitPassiveMountEffects_complete(subtreeRoot, root2, committedLanes, committedTransitions) {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & Passive) !== NoFlags) {
setCurrentFiber(fiber);
try {
commitPassiveMountOnFiber(root2, fiber, committedLanes, committedTransitions);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
resetCurrentFiber();
}
if (fiber === subtreeRoot) {
nextEffect = null;
return;
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveMountOnFiber(finishedRoot, finishedWork, committedLanes, committedTransitions) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
if (finishedWork.mode & ProfileMode) {
startPassiveEffectTimer();
try {
commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
} finally {
recordPassiveEffectDuration(finishedWork);
}
} else {
commitHookEffectListMount(Passive$1 | HasEffect, finishedWork);
}
break;
}
}
}
function commitPassiveUnmountEffects(firstChild) {
nextEffect = firstChild;
commitPassiveUnmountEffects_begin();
}
function commitPassiveUnmountEffects_begin() {
while (nextEffect !== null) {
var fiber = nextEffect;
var child = fiber.child;
if ((nextEffect.flags & ChildDeletion) !== NoFlags) {
var deletions = fiber.deletions;
if (deletions !== null) {
for (var i = 0; i < deletions.length; i++) {
var fiberToDelete = deletions[i];
nextEffect = fiberToDelete;
commitPassiveUnmountEffectsInsideOfDeletedTree_begin(fiberToDelete, fiber);
}
{
var previousFiber = fiber.alternate;
if (previousFiber !== null) {
var detachedChild = previousFiber.child;
if (detachedChild !== null) {
previousFiber.child = null;
do {
var detachedSibling = detachedChild.sibling;
detachedChild.sibling = null;
detachedChild = detachedSibling;
} while (detachedChild !== null);
}
}
}
nextEffect = fiber;
}
}
if ((fiber.subtreeFlags & PassiveMask) !== NoFlags && child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitPassiveUnmountEffects_complete();
}
}
}
function commitPassiveUnmountEffects_complete() {
while (nextEffect !== null) {
var fiber = nextEffect;
if ((fiber.flags & Passive) !== NoFlags) {
setCurrentFiber(fiber);
commitPassiveUnmountOnFiber(fiber);
resetCurrentFiber();
}
var sibling = fiber.sibling;
if (sibling !== null) {
sibling.return = fiber.return;
nextEffect = sibling;
return;
}
nextEffect = fiber.return;
}
}
function commitPassiveUnmountOnFiber(finishedWork) {
switch (finishedWork.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
if (finishedWork.mode & ProfileMode) {
startPassiveEffectTimer();
commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
recordPassiveEffectDuration(finishedWork);
} else {
commitHookEffectListUnmount(Passive$1 | HasEffect, finishedWork, finishedWork.return);
}
break;
}
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_begin(deletedSubtreeRoot, nearestMountedAncestor) {
while (nextEffect !== null) {
var fiber = nextEffect;
setCurrentFiber(fiber);
commitPassiveUnmountInsideDeletedTreeOnFiber(fiber, nearestMountedAncestor);
resetCurrentFiber();
var child = fiber.child;
if (child !== null) {
child.return = fiber;
nextEffect = child;
} else {
commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot);
}
}
}
function commitPassiveUnmountEffectsInsideOfDeletedTree_complete(deletedSubtreeRoot) {
while (nextEffect !== null) {
var fiber = nextEffect;
var sibling = fiber.sibling;
var returnFiber = fiber.return;
{
detachFiberAfterEffects(fiber);
if (fiber === deletedSubtreeRoot) {
nextEffect = null;
return;
}
}
if (sibling !== null) {
sibling.return = returnFiber;
nextEffect = sibling;
return;
}
nextEffect = returnFiber;
}
}
function commitPassiveUnmountInsideDeletedTreeOnFiber(current3, nearestMountedAncestor) {
switch (current3.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
if (current3.mode & ProfileMode) {
startPassiveEffectTimer();
commitHookEffectListUnmount(Passive$1, current3, nearestMountedAncestor);
recordPassiveEffectDuration(current3);
} else {
commitHookEffectListUnmount(Passive$1, current3, nearestMountedAncestor);
}
break;
}
}
}
function invokeLayoutEffectMountInDEV(fiber) {
{
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
try {
commitHookEffectListMount(Layout | HasEffect, fiber);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
break;
}
case ClassComponent: {
var instance = fiber.stateNode;
try {
instance.componentDidMount();
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
break;
}
}
}
}
function invokePassiveEffectMountInDEV(fiber) {
{
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
try {
commitHookEffectListMount(Passive$1 | HasEffect, fiber);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
break;
}
}
}
}
function invokeLayoutEffectUnmountInDEV(fiber) {
{
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
try {
commitHookEffectListUnmount(Layout | HasEffect, fiber, fiber.return);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
break;
}
case ClassComponent: {
var instance = fiber.stateNode;
if (typeof instance.componentWillUnmount === "function") {
safelyCallComponentWillUnmount(fiber, fiber.return, instance);
}
break;
}
}
}
}
function invokePassiveEffectUnmountInDEV(fiber) {
{
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
try {
commitHookEffectListUnmount(Passive$1 | HasEffect, fiber, fiber.return);
} catch (error2) {
captureCommitPhaseError(fiber, fiber.return, error2);
}
}
}
}
}
var COMPONENT_TYPE = 0;
var HAS_PSEUDO_CLASS_TYPE = 1;
var ROLE_TYPE = 2;
var TEST_NAME_TYPE = 3;
var TEXT_TYPE = 4;
if (typeof Symbol === "function" && Symbol.for) {
var symbolFor = Symbol.for;
COMPONENT_TYPE = symbolFor("selector.component");
HAS_PSEUDO_CLASS_TYPE = symbolFor("selector.has_pseudo_class");
ROLE_TYPE = symbolFor("selector.role");
TEST_NAME_TYPE = symbolFor("selector.test_id");
TEXT_TYPE = symbolFor("selector.text");
}
var commitHooks = [];
function onCommitRoot$1() {
{
commitHooks.forEach(function(commitHook) {
return commitHook();
});
}
}
var ReactCurrentActQueue = ReactSharedInternals.ReactCurrentActQueue;
function isLegacyActEnvironment(fiber) {
{
var isReactActEnvironmentGlobal = (
// $FlowExpectedError Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
typeof IS_REACT_ACT_ENVIRONMENT !== "undefined" ? IS_REACT_ACT_ENVIRONMENT : void 0
);
var jestIsDefined = typeof jest !== "undefined";
return jestIsDefined && isReactActEnvironmentGlobal !== false;
}
}
function isConcurrentActEnvironment() {
{
var isReactActEnvironmentGlobal = (
// $FlowExpectedError Flow doesn't know about IS_REACT_ACT_ENVIRONMENT global
typeof IS_REACT_ACT_ENVIRONMENT !== "undefined" ? IS_REACT_ACT_ENVIRONMENT : void 0
);
if (!isReactActEnvironmentGlobal && ReactCurrentActQueue.current !== null) {
error("The current testing environment is not configured to support act(...)");
}
return isReactActEnvironmentGlobal;
}
}
var ceil = Math.ceil;
var ReactCurrentDispatcher$2 = ReactSharedInternals.ReactCurrentDispatcher, ReactCurrentOwner$2 = ReactSharedInternals.ReactCurrentOwner, ReactCurrentBatchConfig$3 = ReactSharedInternals.ReactCurrentBatchConfig, ReactCurrentActQueue$1 = ReactSharedInternals.ReactCurrentActQueue;
var NoContext = (
/* */
0
);
var BatchedContext = (
/* */
1
);
var RenderContext = (
/* */
2
);
var CommitContext = (
/* */
4
);
var RootInProgress = 0;
var RootFatalErrored = 1;
var RootErrored = 2;
var RootSuspended = 3;
var RootSuspendedWithDelay = 4;
var RootCompleted = 5;
var RootDidNotComplete = 6;
var executionContext = NoContext;
var workInProgressRoot = null;
var workInProgress = null;
var workInProgressRootRenderLanes = NoLanes;
var subtreeRenderLanes = NoLanes;
var subtreeRenderLanesCursor = createCursor(NoLanes);
var workInProgressRootExitStatus = RootInProgress;
var workInProgressRootFatalError = null;
var workInProgressRootIncludedLanes = NoLanes;
var workInProgressRootSkippedLanes = NoLanes;
var workInProgressRootInterleavedUpdatedLanes = NoLanes;
var workInProgressRootPingedLanes = NoLanes;
var workInProgressRootConcurrentErrors = null;
var workInProgressRootRecoverableErrors = null;
var globalMostRecentFallbackTime = 0;
var FALLBACK_THROTTLE_MS = 500;
var workInProgressRootRenderTargetTime = Infinity;
var RENDER_TIMEOUT_MS = 500;
var workInProgressTransitions = null;
function resetRenderTimer() {
workInProgressRootRenderTargetTime = now3() + RENDER_TIMEOUT_MS;
}
function getRenderTargetTime() {
return workInProgressRootRenderTargetTime;
}
var hasUncaughtError = false;
var firstUncaughtError = null;
var legacyErrorBoundariesThatAlreadyFailed = null;
var rootDoesHavePassiveEffects = false;
var rootWithPendingPassiveEffects = null;
var pendingPassiveEffectsLanes = NoLanes;
var pendingPassiveProfilerEffects = [];
var pendingPassiveTransitions = null;
var NESTED_UPDATE_LIMIT = 50;
var nestedUpdateCount = 0;
var rootWithNestedUpdates = null;
var isFlushingPassiveEffects = false;
var didScheduleUpdateDuringPassiveEffects = false;
var NESTED_PASSIVE_UPDATE_LIMIT = 50;
var nestedPassiveUpdateCount = 0;
var rootWithPassiveNestedUpdates = null;
var currentEventTime = NoTimestamp;
var currentEventTransitionLane = NoLanes;
var isRunningInsertionEffect = false;
function getWorkInProgressRoot() {
return workInProgressRoot;
}
function requestEventTime() {
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
return now3();
}
if (currentEventTime !== NoTimestamp) {
return currentEventTime;
}
currentEventTime = now3();
return currentEventTime;
}
function requestUpdateLane(fiber) {
var mode = fiber.mode;
if ((mode & ConcurrentMode) === NoMode) {
return SyncLane;
} else if ((executionContext & RenderContext) !== NoContext && workInProgressRootRenderLanes !== NoLanes) {
return pickArbitraryLane(workInProgressRootRenderLanes);
}
var isTransition = requestCurrentTransition() !== NoTransition;
if (isTransition) {
if (ReactCurrentBatchConfig$3.transition !== null) {
var transition = ReactCurrentBatchConfig$3.transition;
if (!transition._updatedFibers) {
transition._updatedFibers = /* @__PURE__ */ new Set();
}
transition._updatedFibers.add(fiber);
}
if (currentEventTransitionLane === NoLane) {
currentEventTransitionLane = claimNextTransitionLane();
}
return currentEventTransitionLane;
}
var updateLane = getCurrentUpdatePriority();
if (updateLane !== NoLane) {
return updateLane;
}
var eventLane = getCurrentEventPriority();
return eventLane;
}
function requestRetryLane(fiber) {
var mode = fiber.mode;
if ((mode & ConcurrentMode) === NoMode) {
return SyncLane;
}
return claimNextRetryLane();
}
function scheduleUpdateOnFiber(root2, fiber, lane, eventTime) {
checkForNestedUpdates();
{
if (isRunningInsertionEffect) {
error("useInsertionEffect must not schedule updates.");
}
}
{
if (isFlushingPassiveEffects) {
didScheduleUpdateDuringPassiveEffects = true;
}
}
markRootUpdated(root2, lane, eventTime);
if ((executionContext & RenderContext) !== NoLanes && root2 === workInProgressRoot) {
warnAboutRenderPhaseUpdatesInDEV(fiber);
} else {
{
if (isDevToolsPresent) {
addFiberToLanesMap(root2, fiber, lane);
}
}
warnIfUpdatesNotWrappedWithActDEV(fiber);
if (root2 === workInProgressRoot) {
if ((executionContext & RenderContext) === NoContext) {
workInProgressRootInterleavedUpdatedLanes = mergeLanes(workInProgressRootInterleavedUpdatedLanes, lane);
}
if (workInProgressRootExitStatus === RootSuspendedWithDelay) {
markRootSuspended$1(root2, workInProgressRootRenderLanes);
}
}
ensureRootIsScheduled(root2, eventTime);
if (lane === SyncLane && executionContext === NoContext && (fiber.mode & ConcurrentMode) === NoMode && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue$1.isBatchingLegacy) {
resetRenderTimer();
flushSyncCallbacksOnlyInLegacyMode();
}
}
}
function scheduleInitialHydrationOnRoot(root2, lane, eventTime) {
var current3 = root2.current;
current3.lanes = lane;
markRootUpdated(root2, lane, eventTime);
ensureRootIsScheduled(root2, eventTime);
}
function isUnsafeClassRenderPhaseUpdate(fiber) {
return (
// TODO: Remove outdated deferRenderPhaseUpdateToNextBatch experiment. We
// decided not to enable it.
(executionContext & RenderContext) !== NoContext
);
}
function ensureRootIsScheduled(root2, currentTime) {
var existingCallbackNode = root2.callbackNode;
markStarvedLanesAsExpired(root2, currentTime);
var nextLanes = getNextLanes(root2, root2 === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
if (nextLanes === NoLanes) {
if (existingCallbackNode !== null) {
cancelCallback$1(existingCallbackNode);
}
root2.callbackNode = null;
root2.callbackPriority = NoLane;
return;
}
var newCallbackPriority = getHighestPriorityLane(nextLanes);
var existingCallbackPriority = root2.callbackPriority;
if (existingCallbackPriority === newCallbackPriority && // Special case related to `act`. If the currently scheduled task is a
// Scheduler task, rather than an `act` task, cancel it and re-scheduled
// on the `act` queue.
!(ReactCurrentActQueue$1.current !== null && existingCallbackNode !== fakeActCallbackNode)) {
{
if (existingCallbackNode == null && existingCallbackPriority !== SyncLane) {
error("Expected scheduled callback to exist. This error is likely caused by a bug in React. Please file an issue.");
}
}
return;
}
if (existingCallbackNode != null) {
cancelCallback$1(existingCallbackNode);
}
var newCallbackNode;
if (newCallbackPriority === SyncLane) {
if (root2.tag === LegacyRoot) {
if (ReactCurrentActQueue$1.isBatchingLegacy !== null) {
ReactCurrentActQueue$1.didScheduleLegacyUpdate = true;
}
scheduleLegacySyncCallback(performSyncWorkOnRoot.bind(null, root2));
} else {
scheduleSyncCallback(performSyncWorkOnRoot.bind(null, root2));
}
{
if (ReactCurrentActQueue$1.current !== null) {
ReactCurrentActQueue$1.current.push(flushSyncCallbacks);
} else {
scheduleMicrotask(function() {
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
flushSyncCallbacks();
}
});
}
}
newCallbackNode = null;
} else {
var schedulerPriorityLevel;
switch (lanesToEventPriority(nextLanes)) {
case DiscreteEventPriority:
schedulerPriorityLevel = ImmediatePriority;
break;
case ContinuousEventPriority:
schedulerPriorityLevel = UserBlockingPriority;
break;
case DefaultEventPriority:
schedulerPriorityLevel = NormalPriority;
break;
case IdleEventPriority:
schedulerPriorityLevel = IdlePriority;
break;
default:
schedulerPriorityLevel = NormalPriority;
break;
}
newCallbackNode = scheduleCallback$1(schedulerPriorityLevel, performConcurrentWorkOnRoot.bind(null, root2));
}
root2.callbackPriority = newCallbackPriority;
root2.callbackNode = newCallbackNode;
}
function performConcurrentWorkOnRoot(root2, didTimeout) {
{
resetNestedUpdateFlag();
}
currentEventTime = NoTimestamp;
currentEventTransitionLane = NoLanes;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error("Should not already be working.");
}
var originalCallbackNode = root2.callbackNode;
var didFlushPassiveEffects = flushPassiveEffects();
if (didFlushPassiveEffects) {
if (root2.callbackNode !== originalCallbackNode) {
return null;
}
}
var lanes = getNextLanes(root2, root2 === workInProgressRoot ? workInProgressRootRenderLanes : NoLanes);
if (lanes === NoLanes) {
return null;
}
var shouldTimeSlice = !includesBlockingLane(root2, lanes) && !includesExpiredLane(root2, lanes) && !didTimeout;
var exitStatus = shouldTimeSlice ? renderRootConcurrent(root2, lanes) : renderRootSync(root2, lanes);
if (exitStatus !== RootInProgress) {
if (exitStatus === RootErrored) {
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root2);
if (errorRetryLanes !== NoLanes) {
lanes = errorRetryLanes;
exitStatus = recoverFromConcurrentError(root2, errorRetryLanes);
}
}
if (exitStatus === RootFatalErrored) {
var fatalError = workInProgressRootFatalError;
prepareFreshStack(root2, NoLanes);
markRootSuspended$1(root2, lanes);
ensureRootIsScheduled(root2, now3());
throw fatalError;
}
if (exitStatus === RootDidNotComplete) {
markRootSuspended$1(root2, lanes);
} else {
var renderWasConcurrent = !includesBlockingLane(root2, lanes);
var finishedWork = root2.current.alternate;
if (renderWasConcurrent && !isRenderConsistentWithExternalStores(finishedWork)) {
exitStatus = renderRootSync(root2, lanes);
if (exitStatus === RootErrored) {
var _errorRetryLanes = getLanesToRetrySynchronouslyOnError(root2);
if (_errorRetryLanes !== NoLanes) {
lanes = _errorRetryLanes;
exitStatus = recoverFromConcurrentError(root2, _errorRetryLanes);
}
}
if (exitStatus === RootFatalErrored) {
var _fatalError = workInProgressRootFatalError;
prepareFreshStack(root2, NoLanes);
markRootSuspended$1(root2, lanes);
ensureRootIsScheduled(root2, now3());
throw _fatalError;
}
}
root2.finishedWork = finishedWork;
root2.finishedLanes = lanes;
finishConcurrentRender(root2, exitStatus, lanes);
}
}
ensureRootIsScheduled(root2, now3());
if (root2.callbackNode === originalCallbackNode) {
return performConcurrentWorkOnRoot.bind(null, root2);
}
return null;
}
function recoverFromConcurrentError(root2, errorRetryLanes) {
var errorsFromFirstAttempt = workInProgressRootConcurrentErrors;
if (isRootDehydrated(root2)) {
var rootWorkInProgress = prepareFreshStack(root2, errorRetryLanes);
rootWorkInProgress.flags |= ForceClientRender;
{
errorHydratingContainer(root2.containerInfo);
}
}
var exitStatus = renderRootSync(root2, errorRetryLanes);
if (exitStatus !== RootErrored) {
var errorsFromSecondAttempt = workInProgressRootRecoverableErrors;
workInProgressRootRecoverableErrors = errorsFromFirstAttempt;
if (errorsFromSecondAttempt !== null) {
queueRecoverableErrors(errorsFromSecondAttempt);
}
}
return exitStatus;
}
function queueRecoverableErrors(errors2) {
if (workInProgressRootRecoverableErrors === null) {
workInProgressRootRecoverableErrors = errors2;
} else {
workInProgressRootRecoverableErrors.push.apply(workInProgressRootRecoverableErrors, errors2);
}
}
function finishConcurrentRender(root2, exitStatus, lanes) {
switch (exitStatus) {
case RootInProgress:
case RootFatalErrored: {
throw new Error("Root did not complete. This is a bug in React.");
}
case RootErrored: {
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootSuspended: {
markRootSuspended$1(root2, lanes);
if (includesOnlyRetries(lanes) && // do not delay if we're inside an act() scope
!shouldForceFlushFallbacksInDEV()) {
var msUntilTimeout = globalMostRecentFallbackTime + FALLBACK_THROTTLE_MS - now3();
if (msUntilTimeout > 10) {
var nextLanes = getNextLanes(root2, NoLanes);
if (nextLanes !== NoLanes) {
break;
}
var suspendedLanes = root2.suspendedLanes;
if (!isSubsetOfLanes(suspendedLanes, lanes)) {
var eventTime = requestEventTime();
markRootPinged(root2, suspendedLanes);
break;
}
root2.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root2, workInProgressRootRecoverableErrors, workInProgressTransitions), msUntilTimeout);
break;
}
}
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootSuspendedWithDelay: {
markRootSuspended$1(root2, lanes);
if (includesOnlyTransitions(lanes)) {
break;
}
if (!shouldForceFlushFallbacksInDEV()) {
var mostRecentEventTime = getMostRecentEventTime(root2, lanes);
var eventTimeMs = mostRecentEventTime;
var timeElapsedMs = now3() - eventTimeMs;
var _msUntilTimeout = jnd(timeElapsedMs) - timeElapsedMs;
if (_msUntilTimeout > 10) {
root2.timeoutHandle = scheduleTimeout(commitRoot.bind(null, root2, workInProgressRootRecoverableErrors, workInProgressTransitions), _msUntilTimeout);
break;
}
}
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
case RootCompleted: {
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
break;
}
default: {
throw new Error("Unknown root exit status.");
}
}
}
function isRenderConsistentWithExternalStores(finishedWork) {
var node = finishedWork;
while (true) {
if (node.flags & StoreConsistency) {
var updateQueue = node.updateQueue;
if (updateQueue !== null) {
var checks = updateQueue.stores;
if (checks !== null) {
for (var i = 0; i < checks.length; i++) {
var check = checks[i];
var getSnapshot = check.getSnapshot;
var renderedValue = check.value;
try {
if (!objectIs(getSnapshot(), renderedValue)) {
return false;
}
} catch (error2) {
return false;
}
}
}
}
}
var child = node.child;
if (node.subtreeFlags & StoreConsistency && child !== null) {
child.return = node;
node = child;
continue;
}
if (node === finishedWork) {
return true;
}
while (node.sibling === null) {
if (node.return === null || node.return === finishedWork) {
return true;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
return true;
}
function markRootSuspended$1(root2, suspendedLanes) {
suspendedLanes = removeLanes(suspendedLanes, workInProgressRootPingedLanes);
suspendedLanes = removeLanes(suspendedLanes, workInProgressRootInterleavedUpdatedLanes);
markRootSuspended(root2, suspendedLanes);
}
function performSyncWorkOnRoot(root2) {
{
syncNestedUpdateFlag();
}
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error("Should not already be working.");
}
flushPassiveEffects();
var lanes = getNextLanes(root2, NoLanes);
if (!includesSomeLane(lanes, SyncLane)) {
ensureRootIsScheduled(root2, now3());
return null;
}
var exitStatus = renderRootSync(root2, lanes);
if (root2.tag !== LegacyRoot && exitStatus === RootErrored) {
var errorRetryLanes = getLanesToRetrySynchronouslyOnError(root2);
if (errorRetryLanes !== NoLanes) {
lanes = errorRetryLanes;
exitStatus = recoverFromConcurrentError(root2, errorRetryLanes);
}
}
if (exitStatus === RootFatalErrored) {
var fatalError = workInProgressRootFatalError;
prepareFreshStack(root2, NoLanes);
markRootSuspended$1(root2, lanes);
ensureRootIsScheduled(root2, now3());
throw fatalError;
}
if (exitStatus === RootDidNotComplete) {
throw new Error("Root did not complete. This is a bug in React.");
}
var finishedWork = root2.current.alternate;
root2.finishedWork = finishedWork;
root2.finishedLanes = lanes;
commitRoot(root2, workInProgressRootRecoverableErrors, workInProgressTransitions);
ensureRootIsScheduled(root2, now3());
return null;
}
function flushRoot(root2, lanes) {
if (lanes !== NoLanes) {
markRootEntangled(root2, mergeLanes(lanes, SyncLane));
ensureRootIsScheduled(root2, now3());
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
resetRenderTimer();
flushSyncCallbacks();
}
}
}
function batchedUpdates$1(fn, a) {
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
try {
return fn(a);
} finally {
executionContext = prevExecutionContext;
if (executionContext === NoContext && // Treat `act` as if it's inside `batchedUpdates`, even in legacy mode.
!ReactCurrentActQueue$1.isBatchingLegacy) {
resetRenderTimer();
flushSyncCallbacksOnlyInLegacyMode();
}
}
}
function discreteUpdates(fn, a, b, c, d) {
var previousPriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig$3.transition;
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
return fn(a, b, c, d);
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
if (executionContext === NoContext) {
resetRenderTimer();
}
}
}
function flushSync(fn) {
if (rootWithPendingPassiveEffects !== null && rootWithPendingPassiveEffects.tag === LegacyRoot && (executionContext & (RenderContext | CommitContext)) === NoContext) {
flushPassiveEffects();
}
var prevExecutionContext = executionContext;
executionContext |= BatchedContext;
var prevTransition = ReactCurrentBatchConfig$3.transition;
var previousPriority = getCurrentUpdatePriority();
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
if (fn) {
return fn();
} else {
return void 0;
}
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
executionContext = prevExecutionContext;
if ((executionContext & (RenderContext | CommitContext)) === NoContext) {
flushSyncCallbacks();
}
}
}
function isAlreadyRendering() {
return (executionContext & (RenderContext | CommitContext)) !== NoContext;
}
function pushRenderLanes(fiber, lanes) {
push(subtreeRenderLanesCursor, subtreeRenderLanes, fiber);
subtreeRenderLanes = mergeLanes(subtreeRenderLanes, lanes);
workInProgressRootIncludedLanes = mergeLanes(workInProgressRootIncludedLanes, lanes);
}
function popRenderLanes(fiber) {
subtreeRenderLanes = subtreeRenderLanesCursor.current;
pop(subtreeRenderLanesCursor, fiber);
}
function prepareFreshStack(root2, lanes) {
root2.finishedWork = null;
root2.finishedLanes = NoLanes;
var timeoutHandle = root2.timeoutHandle;
if (timeoutHandle !== noTimeout) {
root2.timeoutHandle = noTimeout;
cancelTimeout(timeoutHandle);
}
if (workInProgress !== null) {
var interruptedWork = workInProgress.return;
while (interruptedWork !== null) {
var current3 = interruptedWork.alternate;
unwindInterruptedWork(current3, interruptedWork);
interruptedWork = interruptedWork.return;
}
}
workInProgressRoot = root2;
var rootWorkInProgress = createWorkInProgress(root2.current, null);
workInProgress = rootWorkInProgress;
workInProgressRootRenderLanes = subtreeRenderLanes = workInProgressRootIncludedLanes = lanes;
workInProgressRootExitStatus = RootInProgress;
workInProgressRootFatalError = null;
workInProgressRootSkippedLanes = NoLanes;
workInProgressRootInterleavedUpdatedLanes = NoLanes;
workInProgressRootPingedLanes = NoLanes;
workInProgressRootConcurrentErrors = null;
workInProgressRootRecoverableErrors = null;
finishQueueingConcurrentUpdates();
{
ReactStrictModeWarnings.discardPendingWarnings();
}
return rootWorkInProgress;
}
function handleError(root2, thrownValue) {
do {
var erroredWork = workInProgress;
try {
resetContextDependencies();
resetHooksAfterThrow();
resetCurrentFiber();
ReactCurrentOwner$2.current = null;
if (erroredWork === null || erroredWork.return === null) {
workInProgressRootExitStatus = RootFatalErrored;
workInProgressRootFatalError = thrownValue;
workInProgress = null;
return;
}
if (enableProfilerTimer && erroredWork.mode & ProfileMode) {
stopProfilerTimerIfRunningAndRecordDelta(erroredWork, true);
}
if (enableSchedulingProfiler) {
markComponentRenderStopped();
if (thrownValue !== null && typeof thrownValue === "object" && typeof thrownValue.then === "function") {
var wakeable = thrownValue;
markComponentSuspended(erroredWork, wakeable, workInProgressRootRenderLanes);
} else {
markComponentErrored(erroredWork, thrownValue, workInProgressRootRenderLanes);
}
}
throwException(root2, erroredWork.return, erroredWork, thrownValue, workInProgressRootRenderLanes);
completeUnitOfWork(erroredWork);
} catch (yetAnotherThrownValue) {
thrownValue = yetAnotherThrownValue;
if (workInProgress === erroredWork && erroredWork !== null) {
erroredWork = erroredWork.return;
workInProgress = erroredWork;
} else {
erroredWork = workInProgress;
}
continue;
}
return;
} while (true);
}
function pushDispatcher() {
var prevDispatcher = ReactCurrentDispatcher$2.current;
ReactCurrentDispatcher$2.current = ContextOnlyDispatcher;
if (prevDispatcher === null) {
return ContextOnlyDispatcher;
} else {
return prevDispatcher;
}
}
function popDispatcher(prevDispatcher) {
ReactCurrentDispatcher$2.current = prevDispatcher;
}
function markCommitTimeOfFallback() {
globalMostRecentFallbackTime = now3();
}
function markSkippedUpdateLanes(lane) {
workInProgressRootSkippedLanes = mergeLanes(lane, workInProgressRootSkippedLanes);
}
function renderDidSuspend() {
if (workInProgressRootExitStatus === RootInProgress) {
workInProgressRootExitStatus = RootSuspended;
}
}
function renderDidSuspendDelayIfPossible() {
if (workInProgressRootExitStatus === RootInProgress || workInProgressRootExitStatus === RootSuspended || workInProgressRootExitStatus === RootErrored) {
workInProgressRootExitStatus = RootSuspendedWithDelay;
}
if (workInProgressRoot !== null && (includesNonIdleWork(workInProgressRootSkippedLanes) || includesNonIdleWork(workInProgressRootInterleavedUpdatedLanes))) {
markRootSuspended$1(workInProgressRoot, workInProgressRootRenderLanes);
}
}
function renderDidError(error2) {
if (workInProgressRootExitStatus !== RootSuspendedWithDelay) {
workInProgressRootExitStatus = RootErrored;
}
if (workInProgressRootConcurrentErrors === null) {
workInProgressRootConcurrentErrors = [error2];
} else {
workInProgressRootConcurrentErrors.push(error2);
}
}
function renderHasNotSuspendedYet() {
return workInProgressRootExitStatus === RootInProgress;
}
function renderRootSync(root2, lanes) {
var prevExecutionContext = executionContext;
executionContext |= RenderContext;
var prevDispatcher = pushDispatcher();
if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root2.memoizedUpdaters;
if (memoizedUpdaters.size > 0) {
restorePendingUpdaters(root2, workInProgressRootRenderLanes);
memoizedUpdaters.clear();
}
movePendingFibersToMemoized(root2, lanes);
}
}
workInProgressTransitions = getTransitionsForLanes();
prepareFreshStack(root2, lanes);
}
{
markRenderStarted(lanes);
}
do {
try {
workLoopSync();
break;
} catch (thrownValue) {
handleError(root2, thrownValue);
}
} while (true);
resetContextDependencies();
executionContext = prevExecutionContext;
popDispatcher(prevDispatcher);
if (workInProgress !== null) {
throw new Error("Cannot commit an incomplete root. This error is likely caused by a bug in React. Please file an issue.");
}
{
markRenderStopped();
}
workInProgressRoot = null;
workInProgressRootRenderLanes = NoLanes;
return workInProgressRootExitStatus;
}
function workLoopSync() {
while (workInProgress !== null) {
performUnitOfWork(workInProgress);
}
}
function renderRootConcurrent(root2, lanes) {
var prevExecutionContext = executionContext;
executionContext |= RenderContext;
var prevDispatcher = pushDispatcher();
if (workInProgressRoot !== root2 || workInProgressRootRenderLanes !== lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root2.memoizedUpdaters;
if (memoizedUpdaters.size > 0) {
restorePendingUpdaters(root2, workInProgressRootRenderLanes);
memoizedUpdaters.clear();
}
movePendingFibersToMemoized(root2, lanes);
}
}
workInProgressTransitions = getTransitionsForLanes();
resetRenderTimer();
prepareFreshStack(root2, lanes);
}
{
markRenderStarted(lanes);
}
do {
try {
workLoopConcurrent();
break;
} catch (thrownValue) {
handleError(root2, thrownValue);
}
} while (true);
resetContextDependencies();
popDispatcher(prevDispatcher);
executionContext = prevExecutionContext;
if (workInProgress !== null) {
{
markRenderYielded();
}
return RootInProgress;
} else {
{
markRenderStopped();
}
workInProgressRoot = null;
workInProgressRootRenderLanes = NoLanes;
return workInProgressRootExitStatus;
}
}
function workLoopConcurrent() {
while (workInProgress !== null && !shouldYield()) {
performUnitOfWork(workInProgress);
}
}
function performUnitOfWork(unitOfWork) {
var current3 = unitOfWork.alternate;
setCurrentFiber(unitOfWork);
var next;
if ((unitOfWork.mode & ProfileMode) !== NoMode) {
startProfilerTimer(unitOfWork);
next = beginWork$1(current3, unitOfWork, subtreeRenderLanes);
stopProfilerTimerIfRunningAndRecordDelta(unitOfWork, true);
} else {
next = beginWork$1(current3, unitOfWork, subtreeRenderLanes);
}
resetCurrentFiber();
unitOfWork.memoizedProps = unitOfWork.pendingProps;
if (next === null) {
completeUnitOfWork(unitOfWork);
} else {
workInProgress = next;
}
ReactCurrentOwner$2.current = null;
}
function completeUnitOfWork(unitOfWork) {
var completedWork = unitOfWork;
do {
var current3 = completedWork.alternate;
var returnFiber = completedWork.return;
if ((completedWork.flags & Incomplete) === NoFlags) {
setCurrentFiber(completedWork);
var next = void 0;
if ((completedWork.mode & ProfileMode) === NoMode) {
next = completeWork(current3, completedWork, subtreeRenderLanes);
} else {
startProfilerTimer(completedWork);
next = completeWork(current3, completedWork, subtreeRenderLanes);
stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
}
resetCurrentFiber();
if (next !== null) {
workInProgress = next;
return;
}
} else {
var _next = unwindWork(current3, completedWork);
if (_next !== null) {
_next.flags &= HostEffectMask;
workInProgress = _next;
return;
}
if ((completedWork.mode & ProfileMode) !== NoMode) {
stopProfilerTimerIfRunningAndRecordDelta(completedWork, false);
var actualDuration = completedWork.actualDuration;
var child = completedWork.child;
while (child !== null) {
actualDuration += child.actualDuration;
child = child.sibling;
}
completedWork.actualDuration = actualDuration;
}
if (returnFiber !== null) {
returnFiber.flags |= Incomplete;
returnFiber.subtreeFlags = NoFlags;
returnFiber.deletions = null;
} else {
workInProgressRootExitStatus = RootDidNotComplete;
workInProgress = null;
return;
}
}
var siblingFiber = completedWork.sibling;
if (siblingFiber !== null) {
workInProgress = siblingFiber;
return;
}
completedWork = returnFiber;
workInProgress = completedWork;
} while (completedWork !== null);
if (workInProgressRootExitStatus === RootInProgress) {
workInProgressRootExitStatus = RootCompleted;
}
}
function commitRoot(root2, recoverableErrors, transitions) {
var previousUpdateLanePriority = getCurrentUpdatePriority();
var prevTransition = ReactCurrentBatchConfig$3.transition;
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(DiscreteEventPriority);
commitRootImpl(root2, recoverableErrors, transitions, previousUpdateLanePriority);
} finally {
ReactCurrentBatchConfig$3.transition = prevTransition;
setCurrentUpdatePriority(previousUpdateLanePriority);
}
return null;
}
function commitRootImpl(root2, recoverableErrors, transitions, renderPriorityLevel) {
do {
flushPassiveEffects();
} while (rootWithPendingPassiveEffects !== null);
flushRenderPhaseStrictModeWarningsInDEV();
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error("Should not already be working.");
}
var finishedWork = root2.finishedWork;
var lanes = root2.finishedLanes;
{
markCommitStarted(lanes);
}
if (finishedWork === null) {
{
markCommitStopped();
}
return null;
} else {
{
if (lanes === NoLanes) {
error("root.finishedLanes should not be empty during a commit. This is a bug in React.");
}
}
}
root2.finishedWork = null;
root2.finishedLanes = NoLanes;
if (finishedWork === root2.current) {
throw new Error("Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.");
}
root2.callbackNode = null;
root2.callbackPriority = NoLane;
var remainingLanes = mergeLanes(finishedWork.lanes, finishedWork.childLanes);
markRootFinished(root2, remainingLanes);
if (root2 === workInProgressRoot) {
workInProgressRoot = null;
workInProgress = null;
workInProgressRootRenderLanes = NoLanes;
}
if ((finishedWork.subtreeFlags & PassiveMask) !== NoFlags || (finishedWork.flags & PassiveMask) !== NoFlags) {
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
pendingPassiveTransitions = transitions;
scheduleCallback$1(NormalPriority, function() {
flushPassiveEffects();
return null;
});
}
}
var subtreeHasEffects = (finishedWork.subtreeFlags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;
var rootHasEffect = (finishedWork.flags & (BeforeMutationMask | MutationMask | LayoutMask | PassiveMask)) !== NoFlags;
if (subtreeHasEffects || rootHasEffect) {
var prevTransition = ReactCurrentBatchConfig$3.transition;
ReactCurrentBatchConfig$3.transition = null;
var previousPriority = getCurrentUpdatePriority();
setCurrentUpdatePriority(DiscreteEventPriority);
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
ReactCurrentOwner$2.current = null;
var shouldFireAfterActiveInstanceBlur2 = commitBeforeMutationEffects(root2, finishedWork);
{
recordCommitTime();
}
commitMutationEffects(root2, finishedWork, lanes);
resetAfterCommit(root2.containerInfo);
root2.current = finishedWork;
{
markLayoutEffectsStarted(lanes);
}
commitLayoutEffects(finishedWork, root2, lanes);
{
markLayoutEffectsStopped();
}
requestPaint();
executionContext = prevExecutionContext;
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
} else {
root2.current = finishedWork;
{
recordCommitTime();
}
}
var rootDidHavePassiveEffects = rootDoesHavePassiveEffects;
if (rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = false;
rootWithPendingPassiveEffects = root2;
pendingPassiveEffectsLanes = lanes;
} else {
{
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = null;
}
}
remainingLanes = root2.pendingLanes;
if (remainingLanes === NoLanes) {
legacyErrorBoundariesThatAlreadyFailed = null;
}
{
if (!rootDidHavePassiveEffects) {
commitDoubleInvokeEffectsInDEV(root2.current, false);
}
}
onCommitRoot(finishedWork.stateNode, renderPriorityLevel);
{
if (isDevToolsPresent) {
root2.memoizedUpdaters.clear();
}
}
{
onCommitRoot$1();
}
ensureRootIsScheduled(root2, now3());
if (recoverableErrors !== null) {
var onRecoverableError = root2.onRecoverableError;
for (var i = 0; i < recoverableErrors.length; i++) {
var recoverableError = recoverableErrors[i];
var componentStack = recoverableError.stack;
var digest = recoverableError.digest;
onRecoverableError(recoverableError.value, {
componentStack,
digest
});
}
}
if (hasUncaughtError) {
hasUncaughtError = false;
var error$1 = firstUncaughtError;
firstUncaughtError = null;
throw error$1;
}
if (includesSomeLane(pendingPassiveEffectsLanes, SyncLane) && root2.tag !== LegacyRoot) {
flushPassiveEffects();
}
remainingLanes = root2.pendingLanes;
if (includesSomeLane(remainingLanes, SyncLane)) {
{
markNestedUpdateScheduled();
}
if (root2 === rootWithNestedUpdates) {
nestedUpdateCount++;
} else {
nestedUpdateCount = 0;
rootWithNestedUpdates = root2;
}
} else {
nestedUpdateCount = 0;
}
flushSyncCallbacks();
{
markCommitStopped();
}
return null;
}
function flushPassiveEffects() {
if (rootWithPendingPassiveEffects !== null) {
var renderPriority = lanesToEventPriority(pendingPassiveEffectsLanes);
var priority = lowerEventPriority(DefaultEventPriority, renderPriority);
var prevTransition = ReactCurrentBatchConfig$3.transition;
var previousPriority = getCurrentUpdatePriority();
try {
ReactCurrentBatchConfig$3.transition = null;
setCurrentUpdatePriority(priority);
return flushPassiveEffectsImpl();
} finally {
setCurrentUpdatePriority(previousPriority);
ReactCurrentBatchConfig$3.transition = prevTransition;
}
}
return false;
}
function enqueuePendingPassiveProfilerEffect(fiber) {
{
pendingPassiveProfilerEffects.push(fiber);
if (!rootDoesHavePassiveEffects) {
rootDoesHavePassiveEffects = true;
scheduleCallback$1(NormalPriority, function() {
flushPassiveEffects();
return null;
});
}
}
}
function flushPassiveEffectsImpl() {
if (rootWithPendingPassiveEffects === null) {
return false;
}
var transitions = pendingPassiveTransitions;
pendingPassiveTransitions = null;
var root2 = rootWithPendingPassiveEffects;
var lanes = pendingPassiveEffectsLanes;
rootWithPendingPassiveEffects = null;
pendingPassiveEffectsLanes = NoLanes;
if ((executionContext & (RenderContext | CommitContext)) !== NoContext) {
throw new Error("Cannot flush passive effects while already rendering.");
}
{
isFlushingPassiveEffects = true;
didScheduleUpdateDuringPassiveEffects = false;
}
{
markPassiveEffectsStarted(lanes);
}
var prevExecutionContext = executionContext;
executionContext |= CommitContext;
commitPassiveUnmountEffects(root2.current);
commitPassiveMountEffects(root2, root2.current, lanes, transitions);
{
var profilerEffects = pendingPassiveProfilerEffects;
pendingPassiveProfilerEffects = [];
for (var i = 0; i < profilerEffects.length; i++) {
var _fiber = profilerEffects[i];
commitPassiveEffectDurations(root2, _fiber);
}
}
{
markPassiveEffectsStopped();
}
{
commitDoubleInvokeEffectsInDEV(root2.current, true);
}
executionContext = prevExecutionContext;
flushSyncCallbacks();
{
if (didScheduleUpdateDuringPassiveEffects) {
if (root2 === rootWithPassiveNestedUpdates) {
nestedPassiveUpdateCount++;
} else {
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = root2;
}
} else {
nestedPassiveUpdateCount = 0;
}
isFlushingPassiveEffects = false;
didScheduleUpdateDuringPassiveEffects = false;
}
onPostCommitRoot(root2);
{
var stateNode = root2.current.stateNode;
stateNode.effectDuration = 0;
stateNode.passiveEffectDuration = 0;
}
return true;
}
function isAlreadyFailedLegacyErrorBoundary(instance) {
return legacyErrorBoundariesThatAlreadyFailed !== null && legacyErrorBoundariesThatAlreadyFailed.has(instance);
}
function markLegacyErrorBoundaryAsFailed(instance) {
if (legacyErrorBoundariesThatAlreadyFailed === null) {
legacyErrorBoundariesThatAlreadyFailed = /* @__PURE__ */ new Set([instance]);
} else {
legacyErrorBoundariesThatAlreadyFailed.add(instance);
}
}
function prepareToThrowUncaughtError(error2) {
if (!hasUncaughtError) {
hasUncaughtError = true;
firstUncaughtError = error2;
}
}
var onUncaughtError = prepareToThrowUncaughtError;
function captureCommitPhaseErrorOnRoot(rootFiber, sourceFiber, error2) {
var errorInfo = createCapturedValueAtFiber(error2, sourceFiber);
var update = createRootErrorUpdate(rootFiber, errorInfo, SyncLane);
var root2 = enqueueUpdate(rootFiber, update, SyncLane);
var eventTime = requestEventTime();
if (root2 !== null) {
markRootUpdated(root2, SyncLane, eventTime);
ensureRootIsScheduled(root2, eventTime);
}
}
function captureCommitPhaseError(sourceFiber, nearestMountedAncestor, error$1) {
{
reportUncaughtErrorInDEV(error$1);
setIsRunningInsertionEffect(false);
}
if (sourceFiber.tag === HostRoot) {
captureCommitPhaseErrorOnRoot(sourceFiber, sourceFiber, error$1);
return;
}
var fiber = null;
{
fiber = nearestMountedAncestor;
}
while (fiber !== null) {
if (fiber.tag === HostRoot) {
captureCommitPhaseErrorOnRoot(fiber, sourceFiber, error$1);
return;
} else if (fiber.tag === ClassComponent) {
var ctor = fiber.type;
var instance = fiber.stateNode;
if (typeof ctor.getDerivedStateFromError === "function" || typeof instance.componentDidCatch === "function" && !isAlreadyFailedLegacyErrorBoundary(instance)) {
var errorInfo = createCapturedValueAtFiber(error$1, sourceFiber);
var update = createClassErrorUpdate(fiber, errorInfo, SyncLane);
var root2 = enqueueUpdate(fiber, update, SyncLane);
var eventTime = requestEventTime();
if (root2 !== null) {
markRootUpdated(root2, SyncLane, eventTime);
ensureRootIsScheduled(root2, eventTime);
}
return;
}
}
fiber = fiber.return;
}
{
error("Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Likely causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.\n\nError message:\n\n%s", error$1);
}
}
function pingSuspendedRoot(root2, wakeable, pingedLanes) {
var pingCache = root2.pingCache;
if (pingCache !== null) {
pingCache.delete(wakeable);
}
var eventTime = requestEventTime();
markRootPinged(root2, pingedLanes);
warnIfSuspenseResolutionNotWrappedWithActDEV(root2);
if (workInProgressRoot === root2 && isSubsetOfLanes(workInProgressRootRenderLanes, pingedLanes)) {
if (workInProgressRootExitStatus === RootSuspendedWithDelay || workInProgressRootExitStatus === RootSuspended && includesOnlyRetries(workInProgressRootRenderLanes) && now3() - globalMostRecentFallbackTime < FALLBACK_THROTTLE_MS) {
prepareFreshStack(root2, NoLanes);
} else {
workInProgressRootPingedLanes = mergeLanes(workInProgressRootPingedLanes, pingedLanes);
}
}
ensureRootIsScheduled(root2, eventTime);
}
function retryTimedOutBoundary(boundaryFiber, retryLane) {
if (retryLane === NoLane) {
retryLane = requestRetryLane(boundaryFiber);
}
var eventTime = requestEventTime();
var root2 = enqueueConcurrentRenderForLane(boundaryFiber, retryLane);
if (root2 !== null) {
markRootUpdated(root2, retryLane, eventTime);
ensureRootIsScheduled(root2, eventTime);
}
}
function retryDehydratedSuspenseBoundary(boundaryFiber) {
var suspenseState = boundaryFiber.memoizedState;
var retryLane = NoLane;
if (suspenseState !== null) {
retryLane = suspenseState.retryLane;
}
retryTimedOutBoundary(boundaryFiber, retryLane);
}
function resolveRetryWakeable(boundaryFiber, wakeable) {
var retryLane = NoLane;
var retryCache;
switch (boundaryFiber.tag) {
case SuspenseComponent:
retryCache = boundaryFiber.stateNode;
var suspenseState = boundaryFiber.memoizedState;
if (suspenseState !== null) {
retryLane = suspenseState.retryLane;
}
break;
case SuspenseListComponent:
retryCache = boundaryFiber.stateNode;
break;
default:
throw new Error("Pinged unknown suspense boundary type. This is probably a bug in React.");
}
if (retryCache !== null) {
retryCache.delete(wakeable);
}
retryTimedOutBoundary(boundaryFiber, retryLane);
}
function jnd(timeElapsed) {
return timeElapsed < 120 ? 120 : timeElapsed < 480 ? 480 : timeElapsed < 1080 ? 1080 : timeElapsed < 1920 ? 1920 : timeElapsed < 3e3 ? 3e3 : timeElapsed < 4320 ? 4320 : ceil(timeElapsed / 1960) * 1960;
}
function checkForNestedUpdates() {
if (nestedUpdateCount > NESTED_UPDATE_LIMIT) {
nestedUpdateCount = 0;
rootWithNestedUpdates = null;
throw new Error("Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.");
}
{
if (nestedPassiveUpdateCount > NESTED_PASSIVE_UPDATE_LIMIT) {
nestedPassiveUpdateCount = 0;
rootWithPassiveNestedUpdates = null;
error("Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.");
}
}
}
function flushRenderPhaseStrictModeWarningsInDEV() {
{
ReactStrictModeWarnings.flushLegacyContextWarning();
{
ReactStrictModeWarnings.flushPendingUnsafeLifecycleWarnings();
}
}
}
function commitDoubleInvokeEffectsInDEV(fiber, hasPassiveEffects) {
{
setCurrentFiber(fiber);
invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectUnmountInDEV);
if (hasPassiveEffects) {
invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectUnmountInDEV);
}
invokeEffectsInDev(fiber, MountLayoutDev, invokeLayoutEffectMountInDEV);
if (hasPassiveEffects) {
invokeEffectsInDev(fiber, MountPassiveDev, invokePassiveEffectMountInDEV);
}
resetCurrentFiber();
}
}
function invokeEffectsInDev(firstChild, fiberFlags, invokeEffectFn) {
{
var current3 = firstChild;
var subtreeRoot = null;
while (current3 !== null) {
var primarySubtreeFlag = current3.subtreeFlags & fiberFlags;
if (current3 !== subtreeRoot && current3.child !== null && primarySubtreeFlag !== NoFlags) {
current3 = current3.child;
} else {
if ((current3.flags & fiberFlags) !== NoFlags) {
invokeEffectFn(current3);
}
if (current3.sibling !== null) {
current3 = current3.sibling;
} else {
current3 = subtreeRoot = current3.return;
}
}
}
}
}
var didWarnStateUpdateForNotYetMountedComponent = null;
function warnAboutUpdateOnNotYetMountedFiberInDEV(fiber) {
{
if ((executionContext & RenderContext) !== NoContext) {
return;
}
if (!(fiber.mode & ConcurrentMode)) {
return;
}
var tag = fiber.tag;
if (tag !== IndeterminateComponent && tag !== HostRoot && tag !== ClassComponent && tag !== FunctionComponent && tag !== ForwardRef && tag !== MemoComponent && tag !== SimpleMemoComponent) {
return;
}
var componentName = getComponentNameFromFiber(fiber) || "ReactComponent";
if (didWarnStateUpdateForNotYetMountedComponent !== null) {
if (didWarnStateUpdateForNotYetMountedComponent.has(componentName)) {
return;
}
didWarnStateUpdateForNotYetMountedComponent.add(componentName);
} else {
didWarnStateUpdateForNotYetMountedComponent = /* @__PURE__ */ new Set([componentName]);
}
var previousFiber = current2;
try {
setCurrentFiber(fiber);
error("Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously later calls tries to update the component. Move this work to useEffect instead.");
} finally {
if (previousFiber) {
setCurrentFiber(fiber);
} else {
resetCurrentFiber();
}
}
}
}
var beginWork$1;
{
var dummyFiber = null;
beginWork$1 = function(current3, unitOfWork, lanes) {
var originalWorkInProgressCopy = assignFiberPropertiesInDEV(dummyFiber, unitOfWork);
try {
return beginWork(current3, unitOfWork, lanes);
} catch (originalError) {
if (didSuspendOrErrorWhileHydratingDEV() || originalError !== null && typeof originalError === "object" && typeof originalError.then === "function") {
throw originalError;
}
resetContextDependencies();
resetHooksAfterThrow();
unwindInterruptedWork(current3, unitOfWork);
assignFiberPropertiesInDEV(unitOfWork, originalWorkInProgressCopy);
if (unitOfWork.mode & ProfileMode) {
startProfilerTimer(unitOfWork);
}
invokeGuardedCallback(null, beginWork, null, current3, unitOfWork, lanes);
if (hasCaughtError()) {
var replayError = clearCaughtError();
if (typeof replayError === "object" && replayError !== null && replayError._suppressLogging && typeof originalError === "object" && originalError !== null && !originalError._suppressLogging) {
originalError._suppressLogging = true;
}
}
throw originalError;
}
};
}
var didWarnAboutUpdateInRender = false;
var didWarnAboutUpdateInRenderForAnotherComponent;
{
didWarnAboutUpdateInRenderForAnotherComponent = /* @__PURE__ */ new Set();
}
function warnAboutRenderPhaseUpdatesInDEV(fiber) {
{
if (isRendering && !getIsUpdatingOpaqueValueInRenderPhaseInDEV()) {
switch (fiber.tag) {
case FunctionComponent:
case ForwardRef:
case SimpleMemoComponent: {
var renderingComponentName = workInProgress && getComponentNameFromFiber(workInProgress) || "Unknown";
var dedupeKey = renderingComponentName;
if (!didWarnAboutUpdateInRenderForAnotherComponent.has(dedupeKey)) {
didWarnAboutUpdateInRenderForAnotherComponent.add(dedupeKey);
var setStateComponentName = getComponentNameFromFiber(fiber) || "Unknown";
error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://reactjs.org/link/setstate-in-render", setStateComponentName, renderingComponentName, renderingComponentName);
}
break;
}
case ClassComponent: {
if (!didWarnAboutUpdateInRender) {
error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state.");
didWarnAboutUpdateInRender = true;
}
break;
}
}
}
}
}
function restorePendingUpdaters(root2, lanes) {
{
if (isDevToolsPresent) {
var memoizedUpdaters = root2.memoizedUpdaters;
memoizedUpdaters.forEach(function(schedulingFiber) {
addFiberToLanesMap(root2, schedulingFiber, lanes);
});
}
}
}
var fakeActCallbackNode = {};
function scheduleCallback$1(priorityLevel, callback) {
{
var actQueue = ReactCurrentActQueue$1.current;
if (actQueue !== null) {
actQueue.push(callback);
return fakeActCallbackNode;
} else {
return scheduleCallback(priorityLevel, callback);
}
}
}
function cancelCallback$1(callbackNode) {
if (callbackNode === fakeActCallbackNode) {
return;
}
return cancelCallback(callbackNode);
}
function shouldForceFlushFallbacksInDEV() {
return ReactCurrentActQueue$1.current !== null;
}
function warnIfUpdatesNotWrappedWithActDEV(fiber) {
{
if (fiber.mode & ConcurrentMode) {
if (!isConcurrentActEnvironment()) {
return;
}
} else {
if (!isLegacyActEnvironment()) {
return;
}
if (executionContext !== NoContext) {
return;
}
if (fiber.tag !== FunctionComponent && fiber.tag !== ForwardRef && fiber.tag !== SimpleMemoComponent) {
return;
}
}
if (ReactCurrentActQueue$1.current === null) {
var previousFiber = current2;
try {
setCurrentFiber(fiber);
error("An update to %s inside a test was not wrapped in act(...).\n\nWhen testing, code that causes React state updates should be wrapped into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act", getComponentNameFromFiber(fiber));
} finally {
if (previousFiber) {
setCurrentFiber(fiber);
} else {
resetCurrentFiber();
}
}
}
}
}
function warnIfSuspenseResolutionNotWrappedWithActDEV(root2) {
{
if (root2.tag !== LegacyRoot && isConcurrentActEnvironment() && ReactCurrentActQueue$1.current === null) {
error("A suspended resource finished loading inside a test, but the event was not wrapped in act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output */\n\nThis ensures that you're testing the behavior the user would see in the browser. Learn more at https://reactjs.org/link/wrap-tests-with-act");
}
}
}
function setIsRunningInsertionEffect(isRunning) {
{
isRunningInsertionEffect = isRunning;
}
}
var resolveFamily = null;
var failedBoundaries = null;
var setRefreshHandler = function(handler) {
{
resolveFamily = handler;
}
};
function resolveFunctionForHotReloading(type) {
{
if (resolveFamily === null) {
return type;
}
var family = resolveFamily(type);
if (family === void 0) {
return type;
}
return family.current;
}
}
function resolveClassForHotReloading(type) {
return resolveFunctionForHotReloading(type);
}
function resolveForwardRefForHotReloading(type) {
{
if (resolveFamily === null) {
return type;
}
var family = resolveFamily(type);
if (family === void 0) {
if (type !== null && type !== void 0 && typeof type.render === "function") {
var currentRender = resolveFunctionForHotReloading(type.render);
if (type.render !== currentRender) {
var syntheticType = {
$$typeof: REACT_FORWARD_REF_TYPE,
render: currentRender
};
if (type.displayName !== void 0) {
syntheticType.displayName = type.displayName;
}
return syntheticType;
}
}
return type;
}
return family.current;
}
}
function isCompatibleFamilyForHotReloading(fiber, element) {
{
if (resolveFamily === null) {
return false;
}
var prevType = fiber.elementType;
var nextType = element.type;
var needsCompareFamilies = false;
var $$typeofNextType = typeof nextType === "object" && nextType !== null ? nextType.$$typeof : null;
switch (fiber.tag) {
case ClassComponent: {
if (typeof nextType === "function") {
needsCompareFamilies = true;
}
break;
}
case FunctionComponent: {
if (typeof nextType === "function") {
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
needsCompareFamilies = true;
}
break;
}
case ForwardRef: {
if ($$typeofNextType === REACT_FORWARD_REF_TYPE) {
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
needsCompareFamilies = true;
}
break;
}
case MemoComponent:
case SimpleMemoComponent: {
if ($$typeofNextType === REACT_MEMO_TYPE) {
needsCompareFamilies = true;
} else if ($$typeofNextType === REACT_LAZY_TYPE) {
needsCompareFamilies = true;
}
break;
}
default:
return false;
}
if (needsCompareFamilies) {
var prevFamily = resolveFamily(prevType);
if (prevFamily !== void 0 && prevFamily === resolveFamily(nextType)) {
return true;
}
}
return false;
}
}
function markFailedErrorBoundaryForHotReloading(fiber) {
{
if (resolveFamily === null) {
return;
}
if (typeof WeakSet !== "function") {
return;
}
if (failedBoundaries === null) {
failedBoundaries = /* @__PURE__ */ new WeakSet();
}
failedBoundaries.add(fiber);
}
}
var scheduleRefresh = function(root2, update) {
{
if (resolveFamily === null) {
return;
}
var staleFamilies = update.staleFamilies, updatedFamilies = update.updatedFamilies;
flushPassiveEffects();
flushSync(function() {
scheduleFibersWithFamiliesRecursively(root2.current, updatedFamilies, staleFamilies);
});
}
};
var scheduleRoot = function(root2, element) {
{
if (root2.context !== emptyContextObject) {
return;
}
flushPassiveEffects();
flushSync(function() {
updateContainer(element, root2, null, null);
});
}
};
function scheduleFibersWithFamiliesRecursively(fiber, updatedFamilies, staleFamilies) {
{
var alternate = fiber.alternate, child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type;
var candidateType = null;
switch (tag) {
case FunctionComponent:
case SimpleMemoComponent:
case ClassComponent:
candidateType = type;
break;
case ForwardRef:
candidateType = type.render;
break;
}
if (resolveFamily === null) {
throw new Error("Expected resolveFamily to be set during hot reload.");
}
var needsRender = false;
var needsRemount = false;
if (candidateType !== null) {
var family = resolveFamily(candidateType);
if (family !== void 0) {
if (staleFamilies.has(family)) {
needsRemount = true;
} else if (updatedFamilies.has(family)) {
if (tag === ClassComponent) {
needsRemount = true;
} else {
needsRender = true;
}
}
}
}
if (failedBoundaries !== null) {
if (failedBoundaries.has(fiber) || alternate !== null && failedBoundaries.has(alternate)) {
needsRemount = true;
}
}
if (needsRemount) {
fiber._debugNeedsRemount = true;
}
if (needsRemount || needsRender) {
var _root = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (_root !== null) {
scheduleUpdateOnFiber(_root, fiber, SyncLane, NoTimestamp);
}
}
if (child !== null && !needsRemount) {
scheduleFibersWithFamiliesRecursively(child, updatedFamilies, staleFamilies);
}
if (sibling !== null) {
scheduleFibersWithFamiliesRecursively(sibling, updatedFamilies, staleFamilies);
}
}
}
var findHostInstancesForRefresh = function(root2, families) {
{
var hostInstances = /* @__PURE__ */ new Set();
var types = new Set(families.map(function(family) {
return family.current;
}));
findHostInstancesForMatchingFibersRecursively(root2.current, types, hostInstances);
return hostInstances;
}
};
function findHostInstancesForMatchingFibersRecursively(fiber, types, hostInstances) {
{
var child = fiber.child, sibling = fiber.sibling, tag = fiber.tag, type = fiber.type;
var candidateType = null;
switch (tag) {
case FunctionComponent:
case SimpleMemoComponent:
case ClassComponent:
candidateType = type;
break;
case ForwardRef:
candidateType = type.render;
break;
}
var didMatch = false;
if (candidateType !== null) {
if (types.has(candidateType)) {
didMatch = true;
}
}
if (didMatch) {
findHostInstancesForFiberShallowly(fiber, hostInstances);
} else {
if (child !== null) {
findHostInstancesForMatchingFibersRecursively(child, types, hostInstances);
}
}
if (sibling !== null) {
findHostInstancesForMatchingFibersRecursively(sibling, types, hostInstances);
}
}
}
function findHostInstancesForFiberShallowly(fiber, hostInstances) {
{
var foundHostInstances = findChildHostInstancesForFiberShallowly(fiber, hostInstances);
if (foundHostInstances) {
return;
}
var node = fiber;
while (true) {
switch (node.tag) {
case HostComponent:
hostInstances.add(node.stateNode);
return;
case HostPortal:
hostInstances.add(node.stateNode.containerInfo);
return;
case HostRoot:
hostInstances.add(node.stateNode.containerInfo);
return;
}
if (node.return === null) {
throw new Error("Expected to reach root first.");
}
node = node.return;
}
}
}
function findChildHostInstancesForFiberShallowly(fiber, hostInstances) {
{
var node = fiber;
var foundHostInstances = false;
while (true) {
if (node.tag === HostComponent) {
foundHostInstances = true;
hostInstances.add(node.stateNode);
} else if (node.child !== null) {
node.child.return = node;
node = node.child;
continue;
}
if (node === fiber) {
return foundHostInstances;
}
while (node.sibling === null) {
if (node.return === null || node.return === fiber) {
return foundHostInstances;
}
node = node.return;
}
node.sibling.return = node.return;
node = node.sibling;
}
}
return false;
}
var hasBadMapPolyfill;
{
hasBadMapPolyfill = false;
try {
var nonExtensibleObject = Object.preventExtensions({});
/* @__PURE__ */ new Map([[nonExtensibleObject, null]]);
/* @__PURE__ */ new Set([nonExtensibleObject]);
} catch (e) {
hasBadMapPolyfill = true;
}
}
function FiberNode(tag, pendingProps, key2, mode) {
this.tag = tag;
this.key = key2;
this.elementType = null;
this.type = null;
this.stateNode = null;
this.return = null;
this.child = null;
this.sibling = null;
this.index = 0;
this.ref = null;
this.pendingProps = pendingProps;
this.memoizedProps = null;
this.updateQueue = null;
this.memoizedState = null;
this.dependencies = null;
this.mode = mode;
this.flags = NoFlags;
this.subtreeFlags = NoFlags;
this.deletions = null;
this.lanes = NoLanes;
this.childLanes = NoLanes;
this.alternate = null;
{
this.actualDuration = Number.NaN;
this.actualStartTime = Number.NaN;
this.selfBaseDuration = Number.NaN;
this.treeBaseDuration = Number.NaN;
this.actualDuration = 0;
this.actualStartTime = -1;
this.selfBaseDuration = 0;
this.treeBaseDuration = 0;
}
{
this._debugSource = null;
this._debugOwner = null;
this._debugNeedsRemount = false;
this._debugHookTypes = null;
if (!hasBadMapPolyfill && typeof Object.preventExtensions === "function") {
Object.preventExtensions(this);
}
}
}
var createFiber = function(tag, pendingProps, key2, mode) {
return new FiberNode(tag, pendingProps, key2, mode);
};
function shouldConstruct$1(Component3) {
var prototype = Component3.prototype;
return !!(prototype && prototype.isReactComponent);
}
function isSimpleFunctionComponent(type) {
return typeof type === "function" && !shouldConstruct$1(type) && type.defaultProps === void 0;
}
function resolveLazyComponentTag(Component3) {
if (typeof Component3 === "function") {
return shouldConstruct$1(Component3) ? ClassComponent : FunctionComponent;
} else if (Component3 !== void 0 && Component3 !== null) {
var $$typeof = Component3.$$typeof;
if ($$typeof === REACT_FORWARD_REF_TYPE) {
return ForwardRef;
}
if ($$typeof === REACT_MEMO_TYPE) {
return MemoComponent;
}
}
return IndeterminateComponent;
}
function createWorkInProgress(current3, pendingProps) {
var workInProgress2 = current3.alternate;
if (workInProgress2 === null) {
workInProgress2 = createFiber(current3.tag, pendingProps, current3.key, current3.mode);
workInProgress2.elementType = current3.elementType;
workInProgress2.type = current3.type;
workInProgress2.stateNode = current3.stateNode;
{
workInProgress2._debugSource = current3._debugSource;
workInProgress2._debugOwner = current3._debugOwner;
workInProgress2._debugHookTypes = current3._debugHookTypes;
}
workInProgress2.alternate = current3;
current3.alternate = workInProgress2;
} else {
workInProgress2.pendingProps = pendingProps;
workInProgress2.type = current3.type;
workInProgress2.flags = NoFlags;
workInProgress2.subtreeFlags = NoFlags;
workInProgress2.deletions = null;
{
workInProgress2.actualDuration = 0;
workInProgress2.actualStartTime = -1;
}
}
workInProgress2.flags = current3.flags & StaticMask;
workInProgress2.childLanes = current3.childLanes;
workInProgress2.lanes = current3.lanes;
workInProgress2.child = current3.child;
workInProgress2.memoizedProps = current3.memoizedProps;
workInProgress2.memoizedState = current3.memoizedState;
workInProgress2.updateQueue = current3.updateQueue;
var currentDependencies = current3.dependencies;
workInProgress2.dependencies = currentDependencies === null ? null : {
lanes: currentDependencies.lanes,
firstContext: currentDependencies.firstContext
};
workInProgress2.sibling = current3.sibling;
workInProgress2.index = current3.index;
workInProgress2.ref = current3.ref;
{
workInProgress2.selfBaseDuration = current3.selfBaseDuration;
workInProgress2.treeBaseDuration = current3.treeBaseDuration;
}
{
workInProgress2._debugNeedsRemount = current3._debugNeedsRemount;
switch (workInProgress2.tag) {
case IndeterminateComponent:
case FunctionComponent:
case SimpleMemoComponent:
workInProgress2.type = resolveFunctionForHotReloading(current3.type);
break;
case ClassComponent:
workInProgress2.type = resolveClassForHotReloading(current3.type);
break;
case ForwardRef:
workInProgress2.type = resolveForwardRefForHotReloading(current3.type);
break;
}
}
return workInProgress2;
}
function resetWorkInProgress(workInProgress2, renderLanes2) {
workInProgress2.flags &= StaticMask | Placement;
var current3 = workInProgress2.alternate;
if (current3 === null) {
workInProgress2.childLanes = NoLanes;
workInProgress2.lanes = renderLanes2;
workInProgress2.child = null;
workInProgress2.subtreeFlags = NoFlags;
workInProgress2.memoizedProps = null;
workInProgress2.memoizedState = null;
workInProgress2.updateQueue = null;
workInProgress2.dependencies = null;
workInProgress2.stateNode = null;
{
workInProgress2.selfBaseDuration = 0;
workInProgress2.treeBaseDuration = 0;
}
} else {
workInProgress2.childLanes = current3.childLanes;
workInProgress2.lanes = current3.lanes;
workInProgress2.child = current3.child;
workInProgress2.subtreeFlags = NoFlags;
workInProgress2.deletions = null;
workInProgress2.memoizedProps = current3.memoizedProps;
workInProgress2.memoizedState = current3.memoizedState;
workInProgress2.updateQueue = current3.updateQueue;
workInProgress2.type = current3.type;
var currentDependencies = current3.dependencies;
workInProgress2.dependencies = currentDependencies === null ? null : {
lanes: currentDependencies.lanes,
firstContext: currentDependencies.firstContext
};
{
workInProgress2.selfBaseDuration = current3.selfBaseDuration;
workInProgress2.treeBaseDuration = current3.treeBaseDuration;
}
}
return workInProgress2;
}
function createHostRootFiber(tag, isStrictMode, concurrentUpdatesByDefaultOverride) {
var mode;
if (tag === ConcurrentRoot) {
mode = ConcurrentMode;
if (isStrictMode === true) {
mode |= StrictLegacyMode;
{
mode |= StrictEffectsMode;
}
}
} else {
mode = NoMode;
}
if (isDevToolsPresent) {
mode |= ProfileMode;
}
return createFiber(HostRoot, null, null, mode);
}
function createFiberFromTypeAndProps(type, key2, pendingProps, owner, mode, lanes) {
var fiberTag = IndeterminateComponent;
var resolvedType = type;
if (typeof type === "function") {
if (shouldConstruct$1(type)) {
fiberTag = ClassComponent;
{
resolvedType = resolveClassForHotReloading(resolvedType);
}
} else {
{
resolvedType = resolveFunctionForHotReloading(resolvedType);
}
}
} else if (typeof type === "string") {
fiberTag = HostComponent;
} else {
getTag:
switch (type) {
case REACT_FRAGMENT_TYPE:
return createFiberFromFragment(pendingProps.children, mode, lanes, key2);
case REACT_STRICT_MODE_TYPE:
fiberTag = Mode;
mode |= StrictLegacyMode;
if ((mode & ConcurrentMode) !== NoMode) {
mode |= StrictEffectsMode;
}
break;
case REACT_PROFILER_TYPE:
return createFiberFromProfiler(pendingProps, mode, lanes, key2);
case REACT_SUSPENSE_TYPE:
return createFiberFromSuspense(pendingProps, mode, lanes, key2);
case REACT_SUSPENSE_LIST_TYPE:
return createFiberFromSuspenseList(pendingProps, mode, lanes, key2);
case REACT_OFFSCREEN_TYPE:
return createFiberFromOffscreen(pendingProps, mode, lanes, key2);
case REACT_LEGACY_HIDDEN_TYPE:
case REACT_SCOPE_TYPE:
case REACT_CACHE_TYPE:
case REACT_TRACING_MARKER_TYPE:
case REACT_DEBUG_TRACING_MODE_TYPE:
default: {
if (typeof type === "object" && type !== null) {
switch (type.$$typeof) {
case REACT_PROVIDER_TYPE:
fiberTag = ContextProvider;
break getTag;
case REACT_CONTEXT_TYPE:
fiberTag = ContextConsumer;
break getTag;
case REACT_FORWARD_REF_TYPE:
fiberTag = ForwardRef;
{
resolvedType = resolveForwardRefForHotReloading(resolvedType);
}
break getTag;
case REACT_MEMO_TYPE:
fiberTag = MemoComponent;
break getTag;
case REACT_LAZY_TYPE:
fiberTag = LazyComponent;
resolvedType = null;
break getTag;
}
}
var info = "";
{
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
}
var ownerName = owner ? getComponentNameFromFiber(owner) : null;
if (ownerName) {
info += "\n\nCheck the render method of `" + ownerName + "`.";
}
}
throw new Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) " + ("but got: " + (type == null ? type : typeof type) + "." + info));
}
}
}
var fiber = createFiber(fiberTag, pendingProps, key2, mode);
fiber.elementType = type;
fiber.type = resolvedType;
fiber.lanes = lanes;
{
fiber._debugOwner = owner;
}
return fiber;
}
function createFiberFromElement(element, mode, lanes) {
var owner = null;
{
owner = element._owner;
}
var type = element.type;
var key2 = element.key;
var pendingProps = element.props;
var fiber = createFiberFromTypeAndProps(type, key2, pendingProps, owner, mode, lanes);
{
fiber._debugSource = element._source;
fiber._debugOwner = element._owner;
}
return fiber;
}
function createFiberFromFragment(elements, mode, lanes, key2) {
var fiber = createFiber(Fragment9, elements, key2, mode);
fiber.lanes = lanes;
return fiber;
}
function createFiberFromProfiler(pendingProps, mode, lanes, key2) {
{
if (typeof pendingProps.id !== "string") {
error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.', typeof pendingProps.id);
}
}
var fiber = createFiber(Profiler, pendingProps, key2, mode | ProfileMode);
fiber.elementType = REACT_PROFILER_TYPE;
fiber.lanes = lanes;
{
fiber.stateNode = {
effectDuration: 0,
passiveEffectDuration: 0
};
}
return fiber;
}
function createFiberFromSuspense(pendingProps, mode, lanes, key2) {
var fiber = createFiber(SuspenseComponent, pendingProps, key2, mode);
fiber.elementType = REACT_SUSPENSE_TYPE;
fiber.lanes = lanes;
return fiber;
}
function createFiberFromSuspenseList(pendingProps, mode, lanes, key2) {
var fiber = createFiber(SuspenseListComponent, pendingProps, key2, mode);
fiber.elementType = REACT_SUSPENSE_LIST_TYPE;
fiber.lanes = lanes;
return fiber;
}
function createFiberFromOffscreen(pendingProps, mode, lanes, key2) {
var fiber = createFiber(OffscreenComponent, pendingProps, key2, mode);
fiber.elementType = REACT_OFFSCREEN_TYPE;
fiber.lanes = lanes;
var primaryChildInstance = {
isHidden: false
};
fiber.stateNode = primaryChildInstance;
return fiber;
}
function createFiberFromText(content, mode, lanes) {
var fiber = createFiber(HostText, content, null, mode);
fiber.lanes = lanes;
return fiber;
}
function createFiberFromHostInstanceForDeletion() {
var fiber = createFiber(HostComponent, null, null, NoMode);
fiber.elementType = "DELETED";
return fiber;
}
function createFiberFromDehydratedFragment(dehydratedNode) {
var fiber = createFiber(DehydratedFragment, null, null, NoMode);
fiber.stateNode = dehydratedNode;
return fiber;
}
function createFiberFromPortal(portal, mode, lanes) {
var pendingProps = portal.children !== null ? portal.children : [];
var fiber = createFiber(HostPortal, pendingProps, portal.key, mode);
fiber.lanes = lanes;
fiber.stateNode = {
containerInfo: portal.containerInfo,
pendingChildren: null,
// Used by persistent updates
implementation: portal.implementation
};
return fiber;
}
function assignFiberPropertiesInDEV(target, source) {
if (target === null) {
target = createFiber(IndeterminateComponent, null, null, NoMode);
}
target.tag = source.tag;
target.key = source.key;
target.elementType = source.elementType;
target.type = source.type;
target.stateNode = source.stateNode;
target.return = source.return;
target.child = source.child;
target.sibling = source.sibling;
target.index = source.index;
target.ref = source.ref;
target.pendingProps = source.pendingProps;
target.memoizedProps = source.memoizedProps;
target.updateQueue = source.updateQueue;
target.memoizedState = source.memoizedState;
target.dependencies = source.dependencies;
target.mode = source.mode;
target.flags = source.flags;
target.subtreeFlags = source.subtreeFlags;
target.deletions = source.deletions;
target.lanes = source.lanes;
target.childLanes = source.childLanes;
target.alternate = source.alternate;
{
target.actualDuration = source.actualDuration;
target.actualStartTime = source.actualStartTime;
target.selfBaseDuration = source.selfBaseDuration;
target.treeBaseDuration = source.treeBaseDuration;
}
target._debugSource = source._debugSource;
target._debugOwner = source._debugOwner;
target._debugNeedsRemount = source._debugNeedsRemount;
target._debugHookTypes = source._debugHookTypes;
return target;
}
function FiberRootNode(containerInfo, tag, hydrate2, identifierPrefix, onRecoverableError) {
this.tag = tag;
this.containerInfo = containerInfo;
this.pendingChildren = null;
this.current = null;
this.pingCache = null;
this.finishedWork = null;
this.timeoutHandle = noTimeout;
this.context = null;
this.pendingContext = null;
this.callbackNode = null;
this.callbackPriority = NoLane;
this.eventTimes = createLaneMap(NoLanes);
this.expirationTimes = createLaneMap(NoTimestamp);
this.pendingLanes = NoLanes;
this.suspendedLanes = NoLanes;
this.pingedLanes = NoLanes;
this.expiredLanes = NoLanes;
this.mutableReadLanes = NoLanes;
this.finishedLanes = NoLanes;
this.entangledLanes = NoLanes;
this.entanglements = createLaneMap(NoLanes);
this.identifierPrefix = identifierPrefix;
this.onRecoverableError = onRecoverableError;
{
this.mutableSourceEagerHydrationData = null;
}
{
this.effectDuration = 0;
this.passiveEffectDuration = 0;
}
{
this.memoizedUpdaters = /* @__PURE__ */ new Set();
var pendingUpdatersLaneMap = this.pendingUpdatersLaneMap = [];
for (var _i = 0; _i < TotalLanes; _i++) {
pendingUpdatersLaneMap.push(/* @__PURE__ */ new Set());
}
}
{
switch (tag) {
case ConcurrentRoot:
this._debugRootType = hydrate2 ? "hydrateRoot()" : "createRoot()";
break;
case LegacyRoot:
this._debugRootType = hydrate2 ? "hydrate()" : "render()";
break;
}
}
}
function createFiberRoot(containerInfo, tag, hydrate2, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
var root2 = new FiberRootNode(containerInfo, tag, hydrate2, identifierPrefix, onRecoverableError);
var uninitializedFiber = createHostRootFiber(tag, isStrictMode);
root2.current = uninitializedFiber;
uninitializedFiber.stateNode = root2;
{
var _initialState = {
element: initialChildren,
isDehydrated: hydrate2,
cache: null,
// not enabled yet
transitions: null,
pendingSuspenseBoundaries: null
};
uninitializedFiber.memoizedState = _initialState;
}
initializeUpdateQueue(uninitializedFiber);
return root2;
}
var ReactVersion = "18.3.1";
function createPortal4(children, containerInfo, implementation) {
var key2 = arguments.length > 3 && arguments[3] !== void 0 ? arguments[3] : null;
{
checkKeyStringCoercion(key2);
}
return {
// This tag allow us to uniquely identify this as a React Portal
$$typeof: REACT_PORTAL_TYPE,
key: key2 == null ? null : "" + key2,
children,
containerInfo,
implementation
};
}
var didWarnAboutNestedUpdates;
var didWarnAboutFindNodeInStrictMode;
{
didWarnAboutNestedUpdates = false;
didWarnAboutFindNodeInStrictMode = {};
}
function getContextForSubtree(parentComponent) {
if (!parentComponent) {
return emptyContextObject;
}
var fiber = get(parentComponent);
var parentContext = findCurrentUnmaskedContext(fiber);
if (fiber.tag === ClassComponent) {
var Component3 = fiber.type;
if (isContextProvider(Component3)) {
return processChildContext(fiber, Component3, parentContext);
}
}
return parentContext;
}
function findHostInstanceWithWarning(component, methodName) {
{
var fiber = get(component);
if (fiber === void 0) {
if (typeof component.render === "function") {
throw new Error("Unable to find node on an unmounted component.");
} else {
var keys = Object.keys(component).join(",");
throw new Error("Argument appears to not be a ReactComponent. Keys: " + keys);
}
}
var hostFiber = findCurrentHostFiber(fiber);
if (hostFiber === null) {
return null;
}
if (hostFiber.mode & StrictLegacyMode) {
var componentName = getComponentNameFromFiber(fiber) || "Component";
if (!didWarnAboutFindNodeInStrictMode[componentName]) {
didWarnAboutFindNodeInStrictMode[componentName] = true;
var previousFiber = current2;
try {
setCurrentFiber(hostFiber);
if (fiber.mode & StrictLegacyMode) {
error("%s is deprecated in StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName);
} else {
error("%s is deprecated in StrictMode. %s was passed an instance of %s which renders StrictMode children. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node", methodName, methodName, componentName);
}
} finally {
if (previousFiber) {
setCurrentFiber(previousFiber);
} else {
resetCurrentFiber();
}
}
}
}
return hostFiber.stateNode;
}
}
function createContainer(containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
var hydrate2 = false;
var initialChildren = null;
return createFiberRoot(containerInfo, tag, hydrate2, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
}
function createHydrationContainer(initialChildren, callback, containerInfo, tag, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError, transitionCallbacks) {
var hydrate2 = true;
var root2 = createFiberRoot(containerInfo, tag, hydrate2, initialChildren, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
root2.context = getContextForSubtree(null);
var current3 = root2.current;
var eventTime = requestEventTime();
var lane = requestUpdateLane(current3);
var update = createUpdate(eventTime, lane);
update.callback = callback !== void 0 && callback !== null ? callback : null;
enqueueUpdate(current3, update, lane);
scheduleInitialHydrationOnRoot(root2, lane, eventTime);
return root2;
}
function updateContainer(element, container, parentComponent, callback) {
{
onScheduleRoot(container, element);
}
var current$1 = container.current;
var eventTime = requestEventTime();
var lane = requestUpdateLane(current$1);
{
markRenderScheduled(lane);
}
var context = getContextForSubtree(parentComponent);
if (container.context === null) {
container.context = context;
} else {
container.pendingContext = context;
}
{
if (isRendering && current2 !== null && !didWarnAboutNestedUpdates) {
didWarnAboutNestedUpdates = true;
error("Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.", getComponentNameFromFiber(current2) || "Unknown");
}
}
var update = createUpdate(eventTime, lane);
update.payload = {
element
};
callback = callback === void 0 ? null : callback;
if (callback !== null) {
{
if (typeof callback !== "function") {
error("render(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", callback);
}
}
update.callback = callback;
}
var root2 = enqueueUpdate(current$1, update, lane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, current$1, lane, eventTime);
entangleTransitions(root2, current$1, lane);
}
return lane;
}
function getPublicRootInstance(container) {
var containerFiber = container.current;
if (!containerFiber.child) {
return null;
}
switch (containerFiber.child.tag) {
case HostComponent:
return getPublicInstance(containerFiber.child.stateNode);
default:
return containerFiber.child.stateNode;
}
}
function attemptSynchronousHydration$1(fiber) {
switch (fiber.tag) {
case HostRoot: {
var root2 = fiber.stateNode;
if (isRootDehydrated(root2)) {
var lanes = getHighestPriorityPendingLanes(root2);
flushRoot(root2, lanes);
}
break;
}
case SuspenseComponent: {
flushSync(function() {
var root3 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root3 !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root3, fiber, SyncLane, eventTime);
}
});
var retryLane = SyncLane;
markRetryLaneIfNotHydrated(fiber, retryLane);
break;
}
}
}
function markRetryLaneImpl(fiber, retryLane) {
var suspenseState = fiber.memoizedState;
if (suspenseState !== null && suspenseState.dehydrated !== null) {
suspenseState.retryLane = higherPriorityLane(suspenseState.retryLane, retryLane);
}
}
function markRetryLaneIfNotHydrated(fiber, retryLane) {
markRetryLaneImpl(fiber, retryLane);
var alternate = fiber.alternate;
if (alternate) {
markRetryLaneImpl(alternate, retryLane);
}
}
function attemptContinuousHydration$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
return;
}
var lane = SelectiveHydrationLane;
var root2 = enqueueConcurrentRenderForLane(fiber, lane);
if (root2 !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
}
markRetryLaneIfNotHydrated(fiber, lane);
}
function attemptHydrationAtCurrentPriority$1(fiber) {
if (fiber.tag !== SuspenseComponent) {
return;
}
var lane = requestUpdateLane(fiber);
var root2 = enqueueConcurrentRenderForLane(fiber, lane);
if (root2 !== null) {
var eventTime = requestEventTime();
scheduleUpdateOnFiber(root2, fiber, lane, eventTime);
}
markRetryLaneIfNotHydrated(fiber, lane);
}
function findHostInstanceWithNoPortals(fiber) {
var hostFiber = findCurrentHostFiberWithNoPortals(fiber);
if (hostFiber === null) {
return null;
}
return hostFiber.stateNode;
}
var shouldErrorImpl = function(fiber) {
return null;
};
function shouldError(fiber) {
return shouldErrorImpl(fiber);
}
var shouldSuspendImpl = function(fiber) {
return false;
};
function shouldSuspend(fiber) {
return shouldSuspendImpl(fiber);
}
var overrideHookState = null;
var overrideHookStateDeletePath = null;
var overrideHookStateRenamePath = null;
var overrideProps = null;
var overridePropsDeletePath = null;
var overridePropsRenamePath = null;
var scheduleUpdate = null;
var setErrorHandler = null;
var setSuspenseHandler = null;
{
var copyWithDeleteImpl = function(obj, path2, index2) {
var key2 = path2[index2];
var updated = isArray(obj) ? obj.slice() : assign({}, obj);
if (index2 + 1 === path2.length) {
if (isArray(updated)) {
updated.splice(key2, 1);
} else {
delete updated[key2];
}
return updated;
}
updated[key2] = copyWithDeleteImpl(obj[key2], path2, index2 + 1);
return updated;
};
var copyWithDelete = function(obj, path2) {
return copyWithDeleteImpl(obj, path2, 0);
};
var copyWithRenameImpl = function(obj, oldPath, newPath, index2) {
var oldKey = oldPath[index2];
var updated = isArray(obj) ? obj.slice() : assign({}, obj);
if (index2 + 1 === oldPath.length) {
var newKey = newPath[index2];
updated[newKey] = updated[oldKey];
if (isArray(updated)) {
updated.splice(oldKey, 1);
} else {
delete updated[oldKey];
}
} else {
updated[oldKey] = copyWithRenameImpl(
// $FlowFixMe number or string is fine here
obj[oldKey],
oldPath,
newPath,
index2 + 1
);
}
return updated;
};
var copyWithRename = function(obj, oldPath, newPath) {
if (oldPath.length !== newPath.length) {
warn("copyWithRename() expects paths of the same length");
return;
} else {
for (var i = 0; i < newPath.length - 1; i++) {
if (oldPath[i] !== newPath[i]) {
warn("copyWithRename() expects paths to be the same except for the deepest key");
return;
}
}
}
return copyWithRenameImpl(obj, oldPath, newPath, 0);
};
var copyWithSetImpl = function(obj, path2, index2, value) {
if (index2 >= path2.length) {
return value;
}
var key2 = path2[index2];
var updated = isArray(obj) ? obj.slice() : assign({}, obj);
updated[key2] = copyWithSetImpl(obj[key2], path2, index2 + 1, value);
return updated;
};
var copyWithSet = function(obj, path2, value) {
return copyWithSetImpl(obj, path2, 0, value);
};
var findHook = function(fiber, id) {
var currentHook2 = fiber.memoizedState;
while (currentHook2 !== null && id > 0) {
currentHook2 = currentHook2.next;
id--;
}
return currentHook2;
};
overrideHookState = function(fiber, id, path2, value) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithSet(hook.memoizedState, path2, value);
hook.memoizedState = newState;
hook.baseState = newState;
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
}
};
overrideHookStateDeletePath = function(fiber, id, path2) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithDelete(hook.memoizedState, path2);
hook.memoizedState = newState;
hook.baseState = newState;
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
}
};
overrideHookStateRenamePath = function(fiber, id, oldPath, newPath) {
var hook = findHook(fiber, id);
if (hook !== null) {
var newState = copyWithRename(hook.memoizedState, oldPath, newPath);
hook.memoizedState = newState;
hook.baseState = newState;
fiber.memoizedProps = assign({}, fiber.memoizedProps);
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
}
};
overrideProps = function(fiber, path2, value) {
fiber.pendingProps = copyWithSet(fiber.memoizedProps, path2, value);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
};
overridePropsDeletePath = function(fiber, path2) {
fiber.pendingProps = copyWithDelete(fiber.memoizedProps, path2);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
};
overridePropsRenamePath = function(fiber, oldPath, newPath) {
fiber.pendingProps = copyWithRename(fiber.memoizedProps, oldPath, newPath);
if (fiber.alternate) {
fiber.alternate.pendingProps = fiber.pendingProps;
}
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
};
scheduleUpdate = function(fiber) {
var root2 = enqueueConcurrentRenderForLane(fiber, SyncLane);
if (root2 !== null) {
scheduleUpdateOnFiber(root2, fiber, SyncLane, NoTimestamp);
}
};
setErrorHandler = function(newShouldErrorImpl) {
shouldErrorImpl = newShouldErrorImpl;
};
setSuspenseHandler = function(newShouldSuspendImpl) {
shouldSuspendImpl = newShouldSuspendImpl;
};
}
function findHostInstanceByFiber(fiber) {
var hostFiber = findCurrentHostFiber(fiber);
if (hostFiber === null) {
return null;
}
return hostFiber.stateNode;
}
function emptyFindFiberByHostInstance(instance) {
return null;
}
function getCurrentFiberForDevTools() {
return current2;
}
function injectIntoDevTools(devToolsConfig) {
var findFiberByHostInstance = devToolsConfig.findFiberByHostInstance;
var ReactCurrentDispatcher2 = ReactSharedInternals.ReactCurrentDispatcher;
return injectInternals({
bundleType: devToolsConfig.bundleType,
version: devToolsConfig.version,
rendererPackageName: devToolsConfig.rendererPackageName,
rendererConfig: devToolsConfig.rendererConfig,
overrideHookState,
overrideHookStateDeletePath,
overrideHookStateRenamePath,
overrideProps,
overridePropsDeletePath,
overridePropsRenamePath,
setErrorHandler,
setSuspenseHandler,
scheduleUpdate,
currentDispatcherRef: ReactCurrentDispatcher2,
findHostInstanceByFiber,
findFiberByHostInstance: findFiberByHostInstance || emptyFindFiberByHostInstance,
// React Refresh
findHostInstancesForRefresh,
scheduleRefresh,
scheduleRoot,
setRefreshHandler,
// Enables DevTools to append owner stacks to error messages in DEV mode.
getCurrentFiber: getCurrentFiberForDevTools,
// Enables DevTools to detect reconciler version rather than renderer version
// which may not match for third party renderers.
reconcilerVersion: ReactVersion
});
}
var defaultOnRecoverableError = typeof reportError === "function" ? (
// In modern browsers, reportError will dispatch an error event,
// emulating an uncaught JavaScript error.
reportError
) : function(error2) {
console["error"](error2);
};
function ReactDOMRoot(internalRoot) {
this._internalRoot = internalRoot;
}
ReactDOMHydrationRoot.prototype.render = ReactDOMRoot.prototype.render = function(children) {
var root2 = this._internalRoot;
if (root2 === null) {
throw new Error("Cannot update an unmounted root.");
}
{
if (typeof arguments[1] === "function") {
error("render(...): does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");
} else if (isValidContainer(arguments[1])) {
error("You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.");
} else if (typeof arguments[1] !== "undefined") {
error("You passed a second argument to root.render(...) but it only accepts one argument.");
}
var container = root2.containerInfo;
if (container.nodeType !== COMMENT_NODE) {
var hostInstance = findHostInstanceWithNoPortals(root2.current);
if (hostInstance) {
if (hostInstance.parentNode !== container) {
error("render(...): It looks like the React-rendered content of the root container was removed without using React. This is not supported and will cause errors. Instead, call root.unmount() to empty a root's container.");
}
}
}
}
updateContainer(children, root2, null, null);
};
ReactDOMHydrationRoot.prototype.unmount = ReactDOMRoot.prototype.unmount = function() {
{
if (typeof arguments[0] === "function") {
error("unmount(...): does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().");
}
}
var root2 = this._internalRoot;
if (root2 !== null) {
this._internalRoot = null;
var container = root2.containerInfo;
{
if (isAlreadyRendering()) {
error("Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.");
}
}
flushSync(function() {
updateContainer(null, root2, null, null);
});
unmarkContainerAsRoot(container);
}
};
function createRoot3(container, options2) {
if (!isValidContainer(container)) {
throw new Error("createRoot(...): Target container is not a DOM element.");
}
warnIfReactDOMContainerInDEV(container);
var isStrictMode = false;
var concurrentUpdatesByDefaultOverride = false;
var identifierPrefix = "";
var onRecoverableError = defaultOnRecoverableError;
var transitionCallbacks = null;
if (options2 !== null && options2 !== void 0) {
{
if (options2.hydrate) {
warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.");
} else {
if (typeof options2 === "object" && options2 !== null && options2.$$typeof === REACT_ELEMENT_TYPE) {
error("You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:\n\n let root = createRoot(domContainer);\n root.render(<App />);");
}
}
}
if (options2.unstable_strictMode === true) {
isStrictMode = true;
}
if (options2.identifierPrefix !== void 0) {
identifierPrefix = options2.identifierPrefix;
}
if (options2.onRecoverableError !== void 0) {
onRecoverableError = options2.onRecoverableError;
}
if (options2.transitionCallbacks !== void 0) {
transitionCallbacks = options2.transitionCallbacks;
}
}
var root2 = createContainer(container, ConcurrentRoot, null, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
markContainerAsRoot(root2.current, container);
var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(rootContainerElement);
return new ReactDOMRoot(root2);
}
function ReactDOMHydrationRoot(internalRoot) {
this._internalRoot = internalRoot;
}
function scheduleHydration(target) {
if (target) {
queueExplicitHydrationTarget(target);
}
}
ReactDOMHydrationRoot.prototype.unstable_scheduleHydration = scheduleHydration;
function hydrateRoot(container, initialChildren, options2) {
if (!isValidContainer(container)) {
throw new Error("hydrateRoot(...): Target container is not a DOM element.");
}
warnIfReactDOMContainerInDEV(container);
{
if (initialChildren === void 0) {
error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");
}
}
var hydrationCallbacks = options2 != null ? options2 : null;
var mutableSources = options2 != null && options2.hydratedSources || null;
var isStrictMode = false;
var concurrentUpdatesByDefaultOverride = false;
var identifierPrefix = "";
var onRecoverableError = defaultOnRecoverableError;
if (options2 !== null && options2 !== void 0) {
if (options2.unstable_strictMode === true) {
isStrictMode = true;
}
if (options2.identifierPrefix !== void 0) {
identifierPrefix = options2.identifierPrefix;
}
if (options2.onRecoverableError !== void 0) {
onRecoverableError = options2.onRecoverableError;
}
}
var root2 = createHydrationContainer(initialChildren, null, container, ConcurrentRoot, hydrationCallbacks, isStrictMode, concurrentUpdatesByDefaultOverride, identifierPrefix, onRecoverableError);
markContainerAsRoot(root2.current, container);
listenToAllSupportedEvents(container);
if (mutableSources) {
for (var i = 0; i < mutableSources.length; i++) {
var mutableSource = mutableSources[i];
registerMutableSourceForHydration(root2, mutableSource);
}
}
return new ReactDOMHydrationRoot(root2);
}
function isValidContainer(node) {
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || !disableCommentsAsDOMContainers));
}
function isValidContainerLegacy(node) {
return !!(node && (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE || node.nodeType === COMMENT_NODE && node.nodeValue === " react-mount-point-unstable "));
}
function warnIfReactDOMContainerInDEV(container) {
{
if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === "BODY") {
error("createRoot(): Creating roots directly with document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try using a container element created for your app.");
}
if (isContainerMarkedAsRoot(container)) {
if (container._reactRootContainer) {
error("You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.");
} else {
error("You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.");
}
}
}
}
var ReactCurrentOwner$3 = ReactSharedInternals.ReactCurrentOwner;
var topLevelUpdateWarnings;
{
topLevelUpdateWarnings = function(container) {
if (container._reactRootContainer && container.nodeType !== COMMENT_NODE) {
var hostInstance = findHostInstanceWithNoPortals(container._reactRootContainer.current);
if (hostInstance) {
if (hostInstance.parentNode !== container) {
error("render(...): It looks like the React-rendered content of this container was removed without using React. This is not supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to empty a container.");
}
}
}
var isRootRenderedBySomeReact = !!container._reactRootContainer;
var rootEl = getReactRootElementInContainer(container);
var hasNonRootReactChild = !!(rootEl && getInstanceFromNode(rootEl));
if (hasNonRootReactChild && !isRootRenderedBySomeReact) {
error("render(...): Replacing React-rendered children with a new root component. If you intended to update the children of this node, you should instead have the existing children update their state and render the new components instead of calling ReactDOM.render.");
}
if (container.nodeType === ELEMENT_NODE && container.tagName && container.tagName.toUpperCase() === "BODY") {
error("render(): Rendering components directly into document.body is discouraged, since its children are often manipulated by third-party scripts and browser extensions. This may lead to subtle reconciliation issues. Try rendering into a container element created for your app.");
}
};
}
function getReactRootElementInContainer(container) {
if (!container) {
return null;
}
if (container.nodeType === DOCUMENT_NODE) {
return container.documentElement;
} else {
return container.firstChild;
}
}
function noopOnRecoverableError() {
}
function legacyCreateRootFromDOMContainer(container, initialChildren, parentComponent, callback, isHydrationContainer) {
if (isHydrationContainer) {
if (typeof callback === "function") {
var originalCallback = callback;
callback = function() {
var instance = getPublicRootInstance(root2);
originalCallback.call(instance);
};
}
var root2 = createHydrationContainer(
initialChildren,
callback,
container,
LegacyRoot,
null,
// hydrationCallbacks
false,
// isStrictMode
false,
// concurrentUpdatesByDefaultOverride,
"",
// identifierPrefix
noopOnRecoverableError
);
container._reactRootContainer = root2;
markContainerAsRoot(root2.current, container);
var rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(rootContainerElement);
flushSync();
return root2;
} else {
var rootSibling;
while (rootSibling = container.lastChild) {
container.removeChild(rootSibling);
}
if (typeof callback === "function") {
var _originalCallback = callback;
callback = function() {
var instance = getPublicRootInstance(_root);
_originalCallback.call(instance);
};
}
var _root = createContainer(
container,
LegacyRoot,
null,
// hydrationCallbacks
false,
// isStrictMode
false,
// concurrentUpdatesByDefaultOverride,
"",
// identifierPrefix
noopOnRecoverableError
);
container._reactRootContainer = _root;
markContainerAsRoot(_root.current, container);
var _rootContainerElement = container.nodeType === COMMENT_NODE ? container.parentNode : container;
listenToAllSupportedEvents(_rootContainerElement);
flushSync(function() {
updateContainer(initialChildren, _root, parentComponent, callback);
});
return _root;
}
}
function warnOnInvalidCallback$1(callback, callerName) {
{
if (callback !== null && typeof callback !== "function") {
error("%s(...): Expected the last optional `callback` argument to be a function. Instead received: %s.", callerName, callback);
}
}
}
function legacyRenderSubtreeIntoContainer(parentComponent, children, container, forceHydrate, callback) {
{
topLevelUpdateWarnings(container);
warnOnInvalidCallback$1(callback === void 0 ? null : callback, "render");
}
var maybeRoot = container._reactRootContainer;
var root2;
if (!maybeRoot) {
root2 = legacyCreateRootFromDOMContainer(container, children, parentComponent, callback, forceHydrate);
} else {
root2 = maybeRoot;
if (typeof callback === "function") {
var originalCallback = callback;
callback = function() {
var instance = getPublicRootInstance(root2);
originalCallback.call(instance);
};
}
updateContainer(children, root2, parentComponent, callback);
}
return getPublicRootInstance(root2);
}
var didWarnAboutFindDOMNode = false;
function findDOMNode(componentOrElement) {
{
if (!didWarnAboutFindDOMNode) {
didWarnAboutFindDOMNode = true;
error("findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-node");
}
var owner = ReactCurrentOwner$3.current;
if (owner !== null && owner.stateNode !== null) {
var warnedAboutRefsInRender = owner.stateNode._warnedAboutRefsInRender;
if (!warnedAboutRefsInRender) {
error("%s is accessing findDOMNode inside its render(). render() should be a pure function of props and state. It should never access something that requires stale data from the previous render, such as refs. Move this logic to componentDidMount and componentDidUpdate instead.", getComponentNameFromType(owner.type) || "A component");
}
owner.stateNode._warnedAboutRefsInRender = true;
}
}
if (componentOrElement == null) {
return null;
}
if (componentOrElement.nodeType === ELEMENT_NODE) {
return componentOrElement;
}
{
return findHostInstanceWithWarning(componentOrElement, "findDOMNode");
}
}
function hydrate(element, container, callback) {
{
error("ReactDOM.hydrate is no longer supported in React 18. Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot");
}
if (!isValidContainerLegacy(container)) {
throw new Error("Target container is not a DOM element.");
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === void 0;
if (isModernRoot) {
error("You are calling ReactDOM.hydrate() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call hydrateRoot(container, element)?");
}
}
return legacyRenderSubtreeIntoContainer(null, element, container, true, callback);
}
function render(element, container, callback) {
{
error("ReactDOM.render is no longer supported in React 18. Use createRoot instead. Until you switch to the new API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot");
}
if (!isValidContainerLegacy(container)) {
throw new Error("Target container is not a DOM element.");
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === void 0;
if (isModernRoot) {
error("You are calling ReactDOM.render() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.render(element)?");
}
}
return legacyRenderSubtreeIntoContainer(null, element, container, false, callback);
}
function unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
{
error("ReactDOM.unstable_renderSubtreeIntoContainer() is no longer supported in React 18. Consider using a portal instead. Until you switch to the createRoot API, your app will behave as if it's running React 17. Learn more: https://reactjs.org/link/switch-to-createroot");
}
if (!isValidContainerLegacy(containerNode)) {
throw new Error("Target container is not a DOM element.");
}
if (parentComponent == null || !has2(parentComponent)) {
throw new Error("parentComponent must be a valid React Component");
}
return legacyRenderSubtreeIntoContainer(parentComponent, element, containerNode, false, callback);
}
var didWarnAboutUnmountComponentAtNode = false;
function unmountComponentAtNode(container) {
{
if (!didWarnAboutUnmountComponentAtNode) {
didWarnAboutUnmountComponentAtNode = true;
error("unmountComponentAtNode is deprecated and will be removed in the next major release. Switch to the createRoot API. Learn more: https://reactjs.org/link/switch-to-createroot");
}
}
if (!isValidContainerLegacy(container)) {
throw new Error("unmountComponentAtNode(...): Target container is not a DOM element.");
}
{
var isModernRoot = isContainerMarkedAsRoot(container) && container._reactRootContainer === void 0;
if (isModernRoot) {
error("You are calling ReactDOM.unmountComponentAtNode() on a container that was previously passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call root.unmount()?");
}
}
if (container._reactRootContainer) {
{
var rootEl = getReactRootElementInContainer(container);
var renderedByDifferentReact = rootEl && !getInstanceFromNode(rootEl);
if (renderedByDifferentReact) {
error("unmountComponentAtNode(): The node you're attempting to unmount was rendered by another copy of React.");
}
}
flushSync(function() {
legacyRenderSubtreeIntoContainer(null, null, container, false, function() {
container._reactRootContainer = null;
unmarkContainerAsRoot(container);
});
});
return true;
} else {
{
var _rootEl = getReactRootElementInContainer(container);
var hasNonRootReactChild = !!(_rootEl && getInstanceFromNode(_rootEl));
var isContainerReactRoot = container.nodeType === ELEMENT_NODE && isValidContainerLegacy(container.parentNode) && !!container.parentNode._reactRootContainer;
if (hasNonRootReactChild) {
error("unmountComponentAtNode(): The node you're attempting to unmount was rendered by React and is not a top-level container. %s", isContainerReactRoot ? "You may have accidentally passed in a React root node instead of its container." : "Instead, have the parent component update its state and rerender in order to remove this component.");
}
}
return false;
}
}
setAttemptSynchronousHydration(attemptSynchronousHydration$1);
setAttemptContinuousHydration(attemptContinuousHydration$1);
setAttemptHydrationAtCurrentPriority(attemptHydrationAtCurrentPriority$1);
setGetCurrentUpdatePriority(getCurrentUpdatePriority);
setAttemptHydrationAtPriority(runWithPriority);
{
if (typeof Map !== "function" || // $FlowIssue Flow incorrectly thinks Map has no prototype
Map.prototype == null || typeof Map.prototype.forEach !== "function" || typeof Set !== "function" || // $FlowIssue Flow incorrectly thinks Set has no prototype
Set.prototype == null || typeof Set.prototype.clear !== "function" || typeof Set.prototype.forEach !== "function") {
error("React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills");
}
}
setRestoreImplementation(restoreControlledState$3);
setBatchingImplementation(batchedUpdates$1, discreteUpdates, flushSync);
function createPortal$1(children, container) {
var key2 = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : null;
if (!isValidContainer(container)) {
throw new Error("Target container is not a DOM element.");
}
return createPortal4(children, container, null, key2);
}
function renderSubtreeIntoContainer(parentComponent, element, containerNode, callback) {
return unstable_renderSubtreeIntoContainer(parentComponent, element, containerNode, callback);
}
var Internals = {
usingClientEntryPoint: false,
// Keep in sync with ReactTestUtils.js.
// This is an array for better minification.
Events: [getInstanceFromNode, getNodeFromInstance, getFiberCurrentPropsFromNode, enqueueStateRestore, restoreStateIfNeeded, batchedUpdates$1]
};
function createRoot$1(container, options2) {
{
if (!Internals.usingClientEntryPoint && true) {
error('You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');
}
}
return createRoot3(container, options2);
}
function hydrateRoot$1(container, initialChildren, options2) {
{
if (!Internals.usingClientEntryPoint && true) {
error('You are importing hydrateRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".');
}
}
return hydrateRoot(container, initialChildren, options2);
}
function flushSync$1(fn) {
{
if (isAlreadyRendering()) {
error("flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.");
}
}
return flushSync(fn);
}
var foundDevTools = injectIntoDevTools({
findFiberByHostInstance: getClosestInstanceFromNode,
bundleType: 1,
version: ReactVersion,
rendererPackageName: "react-dom"
});
{
if (!foundDevTools && canUseDOM2 && window.top === window.self) {
if (navigator.userAgent.indexOf("Chrome") > -1 && navigator.userAgent.indexOf("Edge") === -1 || navigator.userAgent.indexOf("Firefox") > -1) {
var protocol = window.location.protocol;
if (/^(https?|file):$/.test(protocol)) {
console.info("%cDownload the React DevTools for a better development experience: https://reactjs.org/link/react-devtools" + (protocol === "file:" ? "\nYou might need to use a local HTTP server (instead of file://): https://reactjs.org/link/react-devtools-faq" : ""), "font-weight:bold");
}
}
}
}
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Internals;
exports.createPortal = createPortal$1;
exports.createRoot = createRoot$1;
exports.findDOMNode = findDOMNode;
exports.flushSync = flushSync$1;
exports.hydrate = hydrate;
exports.hydrateRoot = hydrateRoot$1;
exports.render = render;
exports.unmountComponentAtNode = unmountComponentAtNode;
exports.unstable_batchedUpdates = batchedUpdates$1;
exports.unstable_renderSubtreeIntoContainer = renderSubtreeIntoContainer;
exports.version = ReactVersion;
if (typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== "undefined" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop === "function") {
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
}
})();
}
}
});
// node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js
var require_react_dom = __commonJS({
"node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/index.js"(exports, module2) {
"use strict";
if (false) {
checkDCE();
module2.exports = null;
} else {
module2.exports = require_react_dom_development();
}
}
});
// node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js
var require_client = __commonJS({
"node_modules/.pnpm/react-dom@18.3.1_react@18.3.1/node_modules/react-dom/client.js"(exports) {
"use strict";
var m = require_react_dom();
if (false) {
exports.createRoot = m.createRoot;
exports.hydrateRoot = m.hydrateRoot;
} else {
i = m.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
exports.createRoot = function(c, o) {
i.usingClientEntryPoint = true;
try {
return m.createRoot(c, o);
} finally {
i.usingClientEntryPoint = false;
}
};
exports.hydrateRoot = function(c, h, o) {
i.usingClientEntryPoint = true;
try {
return m.hydrateRoot(c, h, o);
} finally {
i.usingClientEntryPoint = false;
}
};
}
var i;
}
});
// node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js
var require_jquery = __commonJS({
"node_modules/.pnpm/jquery@3.7.1/node_modules/jquery/dist/jquery.js"(exports, module2) {
(function(global2, factory) {
"use strict";
if (typeof module2 === "object" && typeof module2.exports === "object") {
module2.exports = global2.document ? factory(global2, true) : function(w) {
if (!w.document) {
throw new Error("jQuery requires a window with a document");
}
return factory(w);
};
} else {
factory(global2);
}
})(typeof window !== "undefined" ? window : exports, function(window2, noGlobal) {
"use strict";
var arr = [];
var getProto = Object.getPrototypeOf;
var slice = arr.slice;
var flat = arr.flat ? function(array) {
return arr.flat.call(array);
} : function(array) {
return arr.concat.apply([], array);
};
var push = arr.push;
var indexOf = arr.indexOf;
var class2type = {};
var toString = class2type.toString;
var hasOwn = class2type.hasOwnProperty;
var fnToString = hasOwn.toString;
var ObjectFunctionString = fnToString.call(Object);
var support = {};
var isFunction = function isFunction2(obj) {
return typeof obj === "function" && typeof obj.nodeType !== "number" && typeof obj.item !== "function";
};
var isWindow2 = function isWindow3(obj) {
return obj != null && obj === obj.window;
};
var document2 = window2.document;
var preservedScriptAttributes = {
type: true,
src: true,
nonce: true,
noModule: true
};
function DOMEval(code, node, doc) {
doc = doc || document2;
var i, val, script = doc.createElement("script");
script.text = code;
if (node) {
for (i in preservedScriptAttributes) {
val = node[i] || node.getAttribute && node.getAttribute(i);
if (val) {
script.setAttribute(i, val);
}
}
}
doc.head.appendChild(script).parentNode.removeChild(script);
}
function toType(obj) {
if (obj == null) {
return obj + "";
}
return typeof obj === "object" || typeof obj === "function" ? class2type[toString.call(obj)] || "object" : typeof obj;
}
var version = "3.7.1", rhtmlSuffix = /HTML$/i, jQuery = function(selector, context) {
return new jQuery.fn.init(selector, context);
};
jQuery.fn = jQuery.prototype = {
// The current version of jQuery being used
jquery: version,
constructor: jQuery,
// The default length of a jQuery object is 0
length: 0,
toArray: function() {
return slice.call(this);
},
// Get the Nth element in the matched element set OR
// Get the whole matched element set as a clean array
get: function(num) {
if (num == null) {
return slice.call(this);
}
return num < 0 ? this[num + this.length] : this[num];
},
// Take an array of elements and push it onto the stack
// (returning the new matched element set)
pushStack: function(elems) {
var ret = jQuery.merge(this.constructor(), elems);
ret.prevObject = this;
return ret;
},
// Execute a callback for every element in the matched set.
each: function(callback) {
return jQuery.each(this, callback);
},
map: function(callback) {
return this.pushStack(jQuery.map(this, function(elem, i) {
return callback.call(elem, i, elem);
}));
},
slice: function() {
return this.pushStack(slice.apply(this, arguments));
},
first: function() {
return this.eq(0);
},
last: function() {
return this.eq(-1);
},
even: function() {
return this.pushStack(jQuery.grep(this, function(_elem, i) {
return (i + 1) % 2;
}));
},
odd: function() {
return this.pushStack(jQuery.grep(this, function(_elem, i) {
return i % 2;
}));
},
eq: function(i) {
var len = this.length, j = +i + (i < 0 ? len : 0);
return this.pushStack(j >= 0 && j < len ? [this[j]] : []);
},
end: function() {
return this.prevObject || this.constructor();
},
// For internal use only.
// Behaves like an Array's method, not like a jQuery method.
push,
sort: arr.sort,
splice: arr.splice
};
jQuery.extend = jQuery.fn.extend = function() {
var options, name, src, copy, copyIsArray, clone3, target = arguments[0] || {}, i = 1, length = arguments.length, deep = false;
if (typeof target === "boolean") {
deep = target;
target = arguments[i] || {};
i++;
}
if (typeof target !== "object" && !isFunction(target)) {
target = {};
}
if (i === length) {
target = this;
i--;
}
for (; i < length; i++) {
if ((options = arguments[i]) != null) {
for (name in options) {
copy = options[name];
if (name === "__proto__" || target === copy) {
continue;
}
if (deep && copy && (jQuery.isPlainObject(copy) || (copyIsArray = Array.isArray(copy)))) {
src = target[name];
if (copyIsArray && !Array.isArray(src)) {
clone3 = [];
} else if (!copyIsArray && !jQuery.isPlainObject(src)) {
clone3 = {};
} else {
clone3 = src;
}
copyIsArray = false;
target[name] = jQuery.extend(deep, clone3, copy);
} else if (copy !== void 0) {
target[name] = copy;
}
}
}
}
return target;
};
jQuery.extend({
// Unique for each copy of jQuery on the page
expando: "jQuery" + (version + Math.random()).replace(/\D/g, ""),
// Assume jQuery is ready without the ready module
isReady: true,
error: function(msg) {
throw new Error(msg);
},
noop: function() {
},
isPlainObject: function(obj) {
var proto, Ctor;
if (!obj || toString.call(obj) !== "[object Object]") {
return false;
}
proto = getProto(obj);
if (!proto) {
return true;
}
Ctor = hasOwn.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && fnToString.call(Ctor) === ObjectFunctionString;
},
isEmptyObject: function(obj) {
var name;
for (name in obj) {
return false;
}
return true;
},
// Evaluates a script in a provided context; falls back to the global one
// if not specified.
globalEval: function(code, options, doc) {
DOMEval(code, { nonce: options && options.nonce }, doc);
},
each: function(obj, callback) {
var length, i = 0;
if (isArrayLike(obj)) {
length = obj.length;
for (; i < length; i++) {
if (callback.call(obj[i], i, obj[i]) === false) {
break;
}
}
} else {
for (i in obj) {
if (callback.call(obj[i], i, obj[i]) === false) {
break;
}
}
}
return obj;
},
// Retrieve the text value of an array of DOM nodes
text: function(elem) {
var node, ret = "", i = 0, nodeType = elem.nodeType;
if (!nodeType) {
while (node = elem[i++]) {
ret += jQuery.text(node);
}
}
if (nodeType === 1 || nodeType === 11) {
return elem.textContent;
}
if (nodeType === 9) {
return elem.documentElement.textContent;
}
if (nodeType === 3 || nodeType === 4) {
return elem.nodeValue;
}
return ret;
},
// results is for internal usage only
makeArray: function(arr2, results) {
var ret = results || [];
if (arr2 != null) {
if (isArrayLike(Object(arr2))) {
jQuery.merge(
ret,
typeof arr2 === "string" ? [arr2] : arr2
);
} else {
push.call(ret, arr2);
}
}
return ret;
},
inArray: function(elem, arr2, i) {
return arr2 == null ? -1 : indexOf.call(arr2, elem, i);
},
isXMLDoc: function(elem) {
var namespace = elem && elem.namespaceURI, docElem = elem && (elem.ownerDocument || elem).documentElement;
return !rhtmlSuffix.test(namespace || docElem && docElem.nodeName || "HTML");
},
// Support: Android <=4.0 only, PhantomJS 1 only
// push.apply(_, arraylike) throws on ancient WebKit
merge: function(first, second) {
var len = +second.length, j = 0, i = first.length;
for (; j < len; j++) {
first[i++] = second[j];
}
first.length = i;
return first;
},
grep: function(elems, callback, invert) {
var callbackInverse, matches = [], i = 0, length = elems.length, callbackExpect = !invert;
for (; i < length; i++) {
callbackInverse = !callback(elems[i], i);
if (callbackInverse !== callbackExpect) {
matches.push(elems[i]);
}
}
return matches;
},
// arg is for internal usage only
map: function(elems, callback, arg) {
var length, value, i = 0, ret = [];
if (isArrayLike(elems)) {
length = elems.length;
for (; i < length; i++) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
} else {
for (i in elems) {
value = callback(elems[i], i, arg);
if (value != null) {
ret.push(value);
}
}
}
return flat(ret);
},
// A global GUID counter for objects
guid: 1,
// jQuery.support is not used in Core but other projects attach their
// properties to it so it needs to exist.
support
});
if (typeof Symbol === "function") {
jQuery.fn[Symbol.iterator] = arr[Symbol.iterator];
}
jQuery.each(
"Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),
function(_i, name) {
class2type["[object " + name + "]"] = name.toLowerCase();
}
);
function isArrayLike(obj) {
var length = !!obj && "length" in obj && obj.length, type = toType(obj);
if (isFunction(obj) || isWindow2(obj)) {
return false;
}
return type === "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj;
}
function nodeName(elem, name) {
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
}
var pop = arr.pop;
var sort = arr.sort;
var splice = arr.splice;
var whitespace = "[\\x20\\t\\r\\n\\f]";
var rtrimCSS = new RegExp(
"^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$",
"g"
);
jQuery.contains = function(a, b) {
var bup = b && b.parentNode;
return a === bup || !!(bup && bup.nodeType === 1 && // Support: IE 9 - 11+
// IE doesn't have `contains` on SVG.
(a.contains ? a.contains(bup) : a.compareDocumentPosition && a.compareDocumentPosition(bup) & 16));
};
var rcssescape = /([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;
function fcssescape(ch, asCodePoint) {
if (asCodePoint) {
if (ch === "\0") {
return "\uFFFD";
}
return ch.slice(0, -1) + "\\" + ch.charCodeAt(ch.length - 1).toString(16) + " ";
}
return "\\" + ch;
}
jQuery.escapeSelector = function(sel) {
return (sel + "").replace(rcssescape, fcssescape);
};
var preferredDoc = document2, pushNative = push;
(function() {
var i, Expr, outermostContext, sortInput, hasDuplicate, push2 = pushNative, document3, documentElement2, documentIsHTML, rbuggyQSA, matches, expando = jQuery.expando, dirruns = 0, done = 0, classCache = createCache(), tokenCache = createCache(), compilerCache = createCache(), nonnativeSelectorCache = createCache(), sortOrder = function(a, b) {
if (a === b) {
hasDuplicate = true;
}
return 0;
}, booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped", identifier = "(?:\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+", attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace + // Operator (capture 2)
"*([*^$|!~]?=)" + whitespace + // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
`*(?:'((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)"|(` + identifier + "))|)" + whitespace + "*\\]", pseudos = ":(" + identifier + `)(?:\\((('((?:\\\\.|[^\\\\'])*)'|"((?:\\\\.|[^\\\\"])*)")|((?:\\\\.|[^\\\\()[\\]]|` + attributes + ")*)|.*)\\)|)", rwhitespace = new RegExp(whitespace + "+", "g"), rcomma = new RegExp("^" + whitespace + "*," + whitespace + "*"), rleadingCombinator = new RegExp("^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*"), rdescend = new RegExp(whitespace + "|>"), rpseudo = new RegExp(pseudos), ridentifier = new RegExp("^" + identifier + "$"), matchExpr = {
ID: new RegExp("^#(" + identifier + ")"),
CLASS: new RegExp("^\\.(" + identifier + ")"),
TAG: new RegExp("^(" + identifier + "|[*])"),
ATTR: new RegExp("^" + attributes),
PSEUDO: new RegExp("^" + pseudos),
CHILD: new RegExp(
"^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace + "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace + "*(\\d+)|))" + whitespace + "*\\)|)",
"i"
),
bool: new RegExp("^(?:" + booleans + ")$", "i"),
// For use in libraries implementing .is()
// We use this for POS matching in `select`
needsContext: new RegExp("^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" + whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i")
}, rinputs = /^(?:input|select|textarea|button)$/i, rheader = /^h\d$/i, rquickExpr2 = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/, rsibling = /[+~]/, runescape = new RegExp("\\\\[\\da-fA-F]{1,6}" + whitespace + "?|\\\\([^\\r\\n\\f])", "g"), funescape = function(escape, nonHex) {
var high = "0x" + escape.slice(1) - 65536;
if (nonHex) {
return nonHex;
}
return high < 0 ? String.fromCharCode(high + 65536) : String.fromCharCode(high >> 10 | 55296, high & 1023 | 56320);
}, unloadHandler = function() {
setDocument();
}, inDisabledFieldset = addCombinator(
function(elem) {
return elem.disabled === true && nodeName(elem, "fieldset");
},
{ dir: "parentNode", next: "legend" }
);
function safeActiveElement() {
try {
return document3.activeElement;
} catch (err) {
}
}
try {
push2.apply(
arr = slice.call(preferredDoc.childNodes),
preferredDoc.childNodes
);
arr[preferredDoc.childNodes.length].nodeType;
} catch (e) {
push2 = {
apply: function(target, els) {
pushNative.apply(target, slice.call(els));
},
call: function(target) {
pushNative.apply(target, slice.call(arguments, 1));
}
};
}
function find(selector, context, results, seed) {
var m, i2, elem, nid, match2, groups, newSelector, newContext = context && context.ownerDocument, nodeType = context ? context.nodeType : 9;
results = results || [];
if (typeof selector !== "string" || !selector || nodeType !== 1 && nodeType !== 9 && nodeType !== 11) {
return results;
}
if (!seed) {
setDocument(context);
context = context || document3;
if (documentIsHTML) {
if (nodeType !== 11 && (match2 = rquickExpr2.exec(selector))) {
if (m = match2[1]) {
if (nodeType === 9) {
if (elem = context.getElementById(m)) {
if (elem.id === m) {
push2.call(results, elem);
return results;
}
} else {
return results;
}
} else {
if (newContext && (elem = newContext.getElementById(m)) && find.contains(context, elem) && elem.id === m) {
push2.call(results, elem);
return results;
}
}
} else if (match2[2]) {
push2.apply(results, context.getElementsByTagName(selector));
return results;
} else if ((m = match2[3]) && context.getElementsByClassName) {
push2.apply(results, context.getElementsByClassName(m));
return results;
}
}
if (!nonnativeSelectorCache[selector + " "] && (!rbuggyQSA || !rbuggyQSA.test(selector))) {
newSelector = selector;
newContext = context;
if (nodeType === 1 && (rdescend.test(selector) || rleadingCombinator.test(selector))) {
newContext = rsibling.test(selector) && testContext(context.parentNode) || context;
if (newContext != context || !support.scope) {
if (nid = context.getAttribute("id")) {
nid = jQuery.escapeSelector(nid);
} else {
context.setAttribute("id", nid = expando);
}
}
groups = tokenize(selector);
i2 = groups.length;
while (i2--) {
groups[i2] = (nid ? "#" + nid : ":scope") + " " + toSelector(groups[i2]);
}
newSelector = groups.join(",");
}
try {
push2.apply(
results,
newContext.querySelectorAll(newSelector)
);
return results;
} catch (qsaError) {
nonnativeSelectorCache(selector, true);
} finally {
if (nid === expando) {
context.removeAttribute("id");
}
}
}
}
}
return select(selector.replace(rtrimCSS, "$1"), context, results, seed);
}
function createCache() {
var keys = [];
function cache(key2, value) {
if (keys.push(key2 + " ") > Expr.cacheLength) {
delete cache[keys.shift()];
}
return cache[key2 + " "] = value;
}
return cache;
}
function markFunction(fn) {
fn[expando] = true;
return fn;
}
function assert(fn) {
var el = document3.createElement("fieldset");
try {
return !!fn(el);
} catch (e) {
return false;
} finally {
if (el.parentNode) {
el.parentNode.removeChild(el);
}
el = null;
}
}
function createInputPseudo(type) {
return function(elem) {
return nodeName(elem, "input") && elem.type === type;
};
}
function createButtonPseudo(type) {
return function(elem) {
return (nodeName(elem, "input") || nodeName(elem, "button")) && elem.type === type;
};
}
function createDisabledPseudo(disabled) {
return function(elem) {
if ("form" in elem) {
if (elem.parentNode && elem.disabled === false) {
if ("label" in elem) {
if ("label" in elem.parentNode) {
return elem.parentNode.disabled === disabled;
} else {
return elem.disabled === disabled;
}
}
return elem.isDisabled === disabled || // Where there is no isDisabled, check manually
elem.isDisabled !== !disabled && inDisabledFieldset(elem) === disabled;
}
return elem.disabled === disabled;
} else if ("label" in elem) {
return elem.disabled === disabled;
}
return false;
};
}
function createPositionalPseudo(fn) {
return markFunction(function(argument) {
argument = +argument;
return markFunction(function(seed, matches2) {
var j, matchIndexes = fn([], seed.length, argument), i2 = matchIndexes.length;
while (i2--) {
if (seed[j = matchIndexes[i2]]) {
seed[j] = !(matches2[j] = seed[j]);
}
}
});
});
}
function testContext(context) {
return context && typeof context.getElementsByTagName !== "undefined" && context;
}
function setDocument(node) {
var subWindow, doc = node ? node.ownerDocument || node : preferredDoc;
if (doc == document3 || doc.nodeType !== 9 || !doc.documentElement) {
return document3;
}
document3 = doc;
documentElement2 = document3.documentElement;
documentIsHTML = !jQuery.isXMLDoc(document3);
matches = documentElement2.matches || documentElement2.webkitMatchesSelector || documentElement2.msMatchesSelector;
if (documentElement2.msMatchesSelector && // Support: IE 11+, Edge 17 - 18+
// IE/Edge sometimes throw a "Permission denied" error when strict-comparing
// two documents; shallow comparisons work.
// eslint-disable-next-line eqeqeq
preferredDoc != document3 && (subWindow = document3.defaultView) && subWindow.top !== subWindow) {
subWindow.addEventListener("unload", unloadHandler);
}
support.getById = assert(function(el) {
documentElement2.appendChild(el).id = jQuery.expando;
return !document3.getElementsByName || !document3.getElementsByName(jQuery.expando).length;
});
support.disconnectedMatch = assert(function(el) {
return matches.call(el, "*");
});
support.scope = assert(function() {
return document3.querySelectorAll(":scope");
});
support.cssHas = assert(function() {
try {
document3.querySelector(":has(*,:jqfake)");
return false;
} catch (e) {
return true;
}
});
if (support.getById) {
Expr.filter.ID = function(id) {
var attrId = id.replace(runescape, funescape);
return function(elem) {
return elem.getAttribute("id") === attrId;
};
};
Expr.find.ID = function(id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var elem = context.getElementById(id);
return elem ? [elem] : [];
}
};
} else {
Expr.filter.ID = function(id) {
var attrId = id.replace(runescape, funescape);
return function(elem) {
var node2 = typeof elem.getAttributeNode !== "undefined" && elem.getAttributeNode("id");
return node2 && node2.value === attrId;
};
};
Expr.find.ID = function(id, context) {
if (typeof context.getElementById !== "undefined" && documentIsHTML) {
var node2, i2, elems, elem = context.getElementById(id);
if (elem) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id) {
return [elem];
}
elems = context.getElementsByName(id);
i2 = 0;
while (elem = elems[i2++]) {
node2 = elem.getAttributeNode("id");
if (node2 && node2.value === id) {
return [elem];
}
}
}
return [];
}
};
}
Expr.find.TAG = function(tag, context) {
if (typeof context.getElementsByTagName !== "undefined") {
return context.getElementsByTagName(tag);
} else {
return context.querySelectorAll(tag);
}
};
Expr.find.CLASS = function(className, context) {
if (typeof context.getElementsByClassName !== "undefined" && documentIsHTML) {
return context.getElementsByClassName(className);
}
};
rbuggyQSA = [];
assert(function(el) {
var input;
documentElement2.appendChild(el).innerHTML = "<a id='" + expando + "' href='' disabled='disabled'></a><select id='" + expando + "-\r\\' disabled='disabled'><option selected=''></option></select>";
if (!el.querySelectorAll("[selected]").length) {
rbuggyQSA.push("\\[" + whitespace + "*(?:value|" + booleans + ")");
}
if (!el.querySelectorAll("[id~=" + expando + "-]").length) {
rbuggyQSA.push("~=");
}
if (!el.querySelectorAll("a#" + expando + "+*").length) {
rbuggyQSA.push(".#.+[+~]");
}
if (!el.querySelectorAll(":checked").length) {
rbuggyQSA.push(":checked");
}
input = document3.createElement("input");
input.setAttribute("type", "hidden");
el.appendChild(input).setAttribute("name", "D");
documentElement2.appendChild(el).disabled = true;
if (el.querySelectorAll(":disabled").length !== 2) {
rbuggyQSA.push(":enabled", ":disabled");
}
input = document3.createElement("input");
input.setAttribute("name", "");
el.appendChild(input);
if (!el.querySelectorAll("[name='']").length) {
rbuggyQSA.push("\\[" + whitespace + "*name" + whitespace + "*=" + whitespace + `*(?:''|"")`);
}
});
if (!support.cssHas) {
rbuggyQSA.push(":has");
}
rbuggyQSA = rbuggyQSA.length && new RegExp(rbuggyQSA.join("|"));
sortOrder = function(a, b) {
if (a === b) {
hasDuplicate = true;
return 0;
}
var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
if (compare) {
return compare;
}
compare = (a.ownerDocument || a) == (b.ownerDocument || b) ? a.compareDocumentPosition(b) : (
// Otherwise we know they are disconnected
1
);
if (compare & 1 || !support.sortDetached && b.compareDocumentPosition(a) === compare) {
if (a === document3 || a.ownerDocument == preferredDoc && find.contains(preferredDoc, a)) {
return -1;
}
if (b === document3 || b.ownerDocument == preferredDoc && find.contains(preferredDoc, b)) {
return 1;
}
return sortInput ? indexOf.call(sortInput, a) - indexOf.call(sortInput, b) : 0;
}
return compare & 4 ? -1 : 1;
};
return document3;
}
find.matches = function(expr, elements) {
return find(expr, null, null, elements);
};
find.matchesSelector = function(elem, expr) {
setDocument(elem);
if (documentIsHTML && !nonnativeSelectorCache[expr + " "] && (!rbuggyQSA || !rbuggyQSA.test(expr))) {
try {
var ret = matches.call(elem, expr);
if (ret || support.disconnectedMatch || // As well, disconnected nodes are said to be in a document
// fragment in IE 9
elem.document && elem.document.nodeType !== 11) {
return ret;
}
} catch (e) {
nonnativeSelectorCache(expr, true);
}
}
return find(expr, document3, null, [elem]).length > 0;
};
find.contains = function(context, elem) {
if ((context.ownerDocument || context) != document3) {
setDocument(context);
}
return jQuery.contains(context, elem);
};
find.attr = function(elem, name) {
if ((elem.ownerDocument || elem) != document3) {
setDocument(elem);
}
var fn = Expr.attrHandle[name.toLowerCase()], val = fn && hasOwn.call(Expr.attrHandle, name.toLowerCase()) ? fn(elem, name, !documentIsHTML) : void 0;
if (val !== void 0) {
return val;
}
return elem.getAttribute(name);
};
find.error = function(msg) {
throw new Error("Syntax error, unrecognized expression: " + msg);
};
jQuery.uniqueSort = function(results) {
var elem, duplicates = [], j = 0, i2 = 0;
hasDuplicate = !support.sortStable;
sortInput = !support.sortStable && slice.call(results, 0);
sort.call(results, sortOrder);
if (hasDuplicate) {
while (elem = results[i2++]) {
if (elem === results[i2]) {
j = duplicates.push(i2);
}
}
while (j--) {
splice.call(results, duplicates[j], 1);
}
}
sortInput = null;
return results;
};
jQuery.fn.uniqueSort = function() {
return this.pushStack(jQuery.uniqueSort(slice.apply(this)));
};
Expr = jQuery.expr = {
// Can be adjusted by the user
cacheLength: 50,
createPseudo: markFunction,
match: matchExpr,
attrHandle: {},
find: {},
relative: {
">": { dir: "parentNode", first: true },
" ": { dir: "parentNode" },
"+": { dir: "previousSibling", first: true },
"~": { dir: "previousSibling" }
},
preFilter: {
ATTR: function(match2) {
match2[1] = match2[1].replace(runescape, funescape);
match2[3] = (match2[3] || match2[4] || match2[5] || "").replace(runescape, funescape);
if (match2[2] === "~=") {
match2[3] = " " + match2[3] + " ";
}
return match2.slice(0, 4);
},
CHILD: function(match2) {
match2[1] = match2[1].toLowerCase();
if (match2[1].slice(0, 3) === "nth") {
if (!match2[3]) {
find.error(match2[0]);
}
match2[4] = +(match2[4] ? match2[5] + (match2[6] || 1) : 2 * (match2[3] === "even" || match2[3] === "odd"));
match2[5] = +(match2[7] + match2[8] || match2[3] === "odd");
} else if (match2[3]) {
find.error(match2[0]);
}
return match2;
},
PSEUDO: function(match2) {
var excess, unquoted = !match2[6] && match2[2];
if (matchExpr.CHILD.test(match2[0])) {
return null;
}
if (match2[3]) {
match2[2] = match2[4] || match2[5] || "";
} else if (unquoted && rpseudo.test(unquoted) && // Get excess from tokenize (recursively)
(excess = tokenize(unquoted, true)) && // advance to the next closing parenthesis
(excess = unquoted.indexOf(")", unquoted.length - excess) - unquoted.length)) {
match2[0] = match2[0].slice(0, excess);
match2[2] = unquoted.slice(0, excess);
}
return match2.slice(0, 3);
}
},
filter: {
TAG: function(nodeNameSelector) {
var expectedNodeName = nodeNameSelector.replace(runescape, funescape).toLowerCase();
return nodeNameSelector === "*" ? function() {
return true;
} : function(elem) {
return nodeName(elem, expectedNodeName);
};
},
CLASS: function(className) {
var pattern = classCache[className + " "];
return pattern || (pattern = new RegExp("(^|" + whitespace + ")" + className + "(" + whitespace + "|$)")) && classCache(className, function(elem) {
return pattern.test(
typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || ""
);
});
},
ATTR: function(name, operator, check) {
return function(elem) {
var result = find.attr(elem, name);
if (result == null) {
return operator === "!=";
}
if (!operator) {
return true;
}
result += "";
if (operator === "=") {
return result === check;
}
if (operator === "!=") {
return result !== check;
}
if (operator === "^=") {
return check && result.indexOf(check) === 0;
}
if (operator === "*=") {
return check && result.indexOf(check) > -1;
}
if (operator === "$=") {
return check && result.slice(-check.length) === check;
}
if (operator === "~=") {
return (" " + result.replace(rwhitespace, " ") + " ").indexOf(check) > -1;
}
if (operator === "|=") {
return result === check || result.slice(0, check.length + 1) === check + "-";
}
return false;
};
},
CHILD: function(type, what, _argument, first, last) {
var simple2 = type.slice(0, 3) !== "nth", forward = type.slice(-4) !== "last", ofType = what === "of-type";
return first === 1 && last === 0 ? (
// Shortcut for :nth-*(n)
function(elem) {
return !!elem.parentNode;
}
) : function(elem, _context, xml) {
var cache, outerCache, node, nodeIndex, start, dir2 = simple2 !== forward ? "nextSibling" : "previousSibling", parent = elem.parentNode, name = ofType && elem.nodeName.toLowerCase(), useCache = !xml && !ofType, diff = false;
if (parent) {
if (simple2) {
while (dir2) {
node = elem;
while (node = node[dir2]) {
if (ofType ? nodeName(node, name) : node.nodeType === 1) {
return false;
}
}
start = dir2 = type === "only" && !start && "nextSibling";
}
return true;
}
start = [forward ? parent.firstChild : parent.lastChild];
if (forward && useCache) {
outerCache = parent[expando] || (parent[expando] = {});
cache = outerCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex && cache[2];
node = nodeIndex && parent.childNodes[nodeIndex];
while (node = ++nodeIndex && node && node[dir2] || // Fallback to seeking `elem` from the start
(diff = nodeIndex = 0) || start.pop()) {
if (node.nodeType === 1 && ++diff && node === elem) {
outerCache[type] = [dirruns, nodeIndex, diff];
break;
}
}
} else {
if (useCache) {
outerCache = elem[expando] || (elem[expando] = {});
cache = outerCache[type] || [];
nodeIndex = cache[0] === dirruns && cache[1];
diff = nodeIndex;
}
if (diff === false) {
while (node = ++nodeIndex && node && node[dir2] || (diff = nodeIndex = 0) || start.pop()) {
if ((ofType ? nodeName(node, name) : node.nodeType === 1) && ++diff) {
if (useCache) {
outerCache = node[expando] || (node[expando] = {});
outerCache[type] = [dirruns, diff];
}
if (node === elem) {
break;
}
}
}
}
}
diff -= last;
return diff === first || diff % first === 0 && diff / first >= 0;
}
};
},
PSEUDO: function(pseudo, argument) {
var args, fn = Expr.pseudos[pseudo] || Expr.setFilters[pseudo.toLowerCase()] || find.error("unsupported pseudo: " + pseudo);
if (fn[expando]) {
return fn(argument);
}
if (fn.length > 1) {
args = [pseudo, pseudo, "", argument];
return Expr.setFilters.hasOwnProperty(pseudo.toLowerCase()) ? markFunction(function(seed, matches2) {
var idx, matched = fn(seed, argument), i2 = matched.length;
while (i2--) {
idx = indexOf.call(seed, matched[i2]);
seed[idx] = !(matches2[idx] = matched[i2]);
}
}) : function(elem) {
return fn(elem, 0, args);
};
}
return fn;
}
},
pseudos: {
// Potentially complex pseudos
not: markFunction(function(selector) {
var input = [], results = [], matcher = compile(selector.replace(rtrimCSS, "$1"));
return matcher[expando] ? markFunction(function(seed, matches2, _context, xml) {
var elem, unmatched = matcher(seed, null, xml, []), i2 = seed.length;
while (i2--) {
if (elem = unmatched[i2]) {
seed[i2] = !(matches2[i2] = elem);
}
}
}) : function(elem, _context, xml) {
input[0] = elem;
matcher(input, null, xml, results);
input[0] = null;
return !results.pop();
};
}),
has: markFunction(function(selector) {
return function(elem) {
return find(selector, elem).length > 0;
};
}),
contains: markFunction(function(text) {
text = text.replace(runescape, funescape);
return function(elem) {
return (elem.textContent || jQuery.text(elem)).indexOf(text) > -1;
};
}),
// "Whether an element is represented by a :lang() selector
// is based solely on the element's language value
// being equal to the identifier C,
// or beginning with the identifier C immediately followed by "-".
// The matching of C against the element's language value is performed case-insensitively.
// The identifier C does not have to be a valid language name."
// https://www.w3.org/TR/selectors/#lang-pseudo
lang: markFunction(function(lang) {
if (!ridentifier.test(lang || "")) {
find.error("unsupported lang: " + lang);
}
lang = lang.replace(runescape, funescape).toLowerCase();
return function(elem) {
var elemLang;
do {
if (elemLang = documentIsHTML ? elem.lang : elem.getAttribute("xml:lang") || elem.getAttribute("lang")) {
elemLang = elemLang.toLowerCase();
return elemLang === lang || elemLang.indexOf(lang + "-") === 0;
}
} while ((elem = elem.parentNode) && elem.nodeType === 1);
return false;
};
}),
// Miscellaneous
target: function(elem) {
var hash = window2.location && window2.location.hash;
return hash && hash.slice(1) === elem.id;
},
root: function(elem) {
return elem === documentElement2;
},
focus: function(elem) {
return elem === safeActiveElement() && document3.hasFocus() && !!(elem.type || elem.href || ~elem.tabIndex);
},
// Boolean properties
enabled: createDisabledPseudo(false),
disabled: createDisabledPseudo(true),
checked: function(elem) {
return nodeName(elem, "input") && !!elem.checked || nodeName(elem, "option") && !!elem.selected;
},
selected: function(elem) {
if (elem.parentNode) {
elem.parentNode.selectedIndex;
}
return elem.selected === true;
},
// Contents
empty: function(elem) {
for (elem = elem.firstChild; elem; elem = elem.nextSibling) {
if (elem.nodeType < 6) {
return false;
}
}
return true;
},
parent: function(elem) {
return !Expr.pseudos.empty(elem);
},
// Element/input types
header: function(elem) {
return rheader.test(elem.nodeName);
},
input: function(elem) {
return rinputs.test(elem.nodeName);
},
button: function(elem) {
return nodeName(elem, "input") && elem.type === "button" || nodeName(elem, "button");
},
text: function(elem) {
var attr;
return nodeName(elem, "input") && elem.type === "text" && // Support: IE <10 only
// New HTML5 attribute values (e.g., "search") appear
// with elem.type === "text"
((attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text");
},
// Position-in-collection
first: createPositionalPseudo(function() {
return [0];
}),
last: createPositionalPseudo(function(_matchIndexes, length) {
return [length - 1];
}),
eq: createPositionalPseudo(function(_matchIndexes, length, argument) {
return [argument < 0 ? argument + length : argument];
}),
even: createPositionalPseudo(function(matchIndexes, length) {
var i2 = 0;
for (; i2 < length; i2 += 2) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
odd: createPositionalPseudo(function(matchIndexes, length) {
var i2 = 1;
for (; i2 < length; i2 += 2) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
lt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i2;
if (argument < 0) {
i2 = argument + length;
} else if (argument > length) {
i2 = length;
} else {
i2 = argument;
}
for (; --i2 >= 0; ) {
matchIndexes.push(i2);
}
return matchIndexes;
}),
gt: createPositionalPseudo(function(matchIndexes, length, argument) {
var i2 = argument < 0 ? argument + length : argument;
for (; ++i2 < length; ) {
matchIndexes.push(i2);
}
return matchIndexes;
})
}
};
Expr.pseudos.nth = Expr.pseudos.eq;
for (i in { radio: true, checkbox: true, file: true, password: true, image: true }) {
Expr.pseudos[i] = createInputPseudo(i);
}
for (i in { submit: true, reset: true }) {
Expr.pseudos[i] = createButtonPseudo(i);
}
function setFilters() {
}
setFilters.prototype = Expr.filters = Expr.pseudos;
Expr.setFilters = new setFilters();
function tokenize(selector, parseOnly) {
var matched, match2, tokens, type, soFar, groups, preFilters, cached = tokenCache[selector + " "];
if (cached) {
return parseOnly ? 0 : cached.slice(0);
}
soFar = selector;
groups = [];
preFilters = Expr.preFilter;
while (soFar) {
if (!matched || (match2 = rcomma.exec(soFar))) {
if (match2) {
soFar = soFar.slice(match2[0].length) || soFar;
}
groups.push(tokens = []);
}
matched = false;
if (match2 = rleadingCombinator.exec(soFar)) {
matched = match2.shift();
tokens.push({
value: matched,
// Cast descendant combinators to space
type: match2[0].replace(rtrimCSS, " ")
});
soFar = soFar.slice(matched.length);
}
for (type in Expr.filter) {
if ((match2 = matchExpr[type].exec(soFar)) && (!preFilters[type] || (match2 = preFilters[type](match2)))) {
matched = match2.shift();
tokens.push({
value: matched,
type,
matches: match2
});
soFar = soFar.slice(matched.length);
}
}
if (!matched) {
break;
}
}
if (parseOnly) {
return soFar.length;
}
return soFar ? find.error(selector) : (
// Cache the tokens
tokenCache(selector, groups).slice(0)
);
}
function toSelector(tokens) {
var i2 = 0, len = tokens.length, selector = "";
for (; i2 < len; i2++) {
selector += tokens[i2].value;
}
return selector;
}
function addCombinator(matcher, combinator, base) {
var dir2 = combinator.dir, skip = combinator.next, key2 = skip || dir2, checkNonElements = base && key2 === "parentNode", doneName = done++;
return combinator.first ? (
// Check against closest ancestor/preceding element
function(elem, context, xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
return matcher(elem, context, xml);
}
}
return false;
}
) : (
// Check against all ancestor/preceding elements
function(elem, context, xml) {
var oldCache, outerCache, newCache = [dirruns, doneName];
if (xml) {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
if (matcher(elem, context, xml)) {
return true;
}
}
}
} else {
while (elem = elem[dir2]) {
if (elem.nodeType === 1 || checkNonElements) {
outerCache = elem[expando] || (elem[expando] = {});
if (skip && nodeName(elem, skip)) {
elem = elem[dir2] || elem;
} else if ((oldCache = outerCache[key2]) && oldCache[0] === dirruns && oldCache[1] === doneName) {
return newCache[2] = oldCache[2];
} else {
outerCache[key2] = newCache;
if (newCache[2] = matcher(elem, context, xml)) {
return true;
}
}
}
}
}
return false;
}
);
}
function elementMatcher(matchers) {
return matchers.length > 1 ? function(elem, context, xml) {
var i2 = matchers.length;
while (i2--) {
if (!matchers[i2](elem, context, xml)) {
return false;
}
}
return true;
} : matchers[0];
}
function multipleContexts(selector, contexts, results) {
var i2 = 0, len = contexts.length;
for (; i2 < len; i2++) {
find(selector, contexts[i2], results);
}
return results;
}
function condense(unmatched, map, filter2, context, xml) {
var elem, newUnmatched = [], i2 = 0, len = unmatched.length, mapped = map != null;
for (; i2 < len; i2++) {
if (elem = unmatched[i2]) {
if (!filter2 || filter2(elem, context, xml)) {
newUnmatched.push(elem);
if (mapped) {
map.push(i2);
}
}
}
}
return newUnmatched;
}
function setMatcher(preFilter, selector, matcher, postFilter, postFinder, postSelector) {
if (postFilter && !postFilter[expando]) {
postFilter = setMatcher(postFilter);
}
if (postFinder && !postFinder[expando]) {
postFinder = setMatcher(postFinder, postSelector);
}
return markFunction(function(seed, results, context, xml) {
var temp, i2, elem, matcherOut, preMap = [], postMap = [], preexisting = results.length, elems = seed || multipleContexts(
selector || "*",
context.nodeType ? [context] : context,
[]
), matcherIn = preFilter && (seed || !selector) ? condense(elems, preMap, preFilter, context, xml) : elems;
if (matcher) {
matcherOut = postFinder || (seed ? preFilter : preexisting || postFilter) ? (
// ...intermediate processing is necessary
[]
) : (
// ...otherwise use results directly
results
);
matcher(matcherIn, matcherOut, context, xml);
} else {
matcherOut = matcherIn;
}
if (postFilter) {
temp = condense(matcherOut, postMap);
postFilter(temp, [], context, xml);
i2 = temp.length;
while (i2--) {
if (elem = temp[i2]) {
matcherOut[postMap[i2]] = !(matcherIn[postMap[i2]] = elem);
}
}
}
if (seed) {
if (postFinder || preFilter) {
if (postFinder) {
temp = [];
i2 = matcherOut.length;
while (i2--) {
if (elem = matcherOut[i2]) {
temp.push(matcherIn[i2] = elem);
}
}
postFinder(null, matcherOut = [], temp, xml);
}
i2 = matcherOut.length;
while (i2--) {
if ((elem = matcherOut[i2]) && (temp = postFinder ? indexOf.call(seed, elem) : preMap[i2]) > -1) {
seed[temp] = !(results[temp] = elem);
}
}
}
} else {
matcherOut = condense(
matcherOut === results ? matcherOut.splice(preexisting, matcherOut.length) : matcherOut
);
if (postFinder) {
postFinder(null, results, matcherOut, xml);
} else {
push2.apply(results, matcherOut);
}
}
});
}
function matcherFromTokens(tokens) {
var checkContext, matcher, j, len = tokens.length, leadingRelative = Expr.relative[tokens[0].type], implicitRelative = leadingRelative || Expr.relative[" "], i2 = leadingRelative ? 1 : 0, matchContext = addCombinator(function(elem) {
return elem === checkContext;
}, implicitRelative, true), matchAnyContext = addCombinator(function(elem) {
return indexOf.call(checkContext, elem) > -1;
}, implicitRelative, true), matchers = [function(elem, context, xml) {
var ret = !leadingRelative && (xml || context != outermostContext) || ((checkContext = context).nodeType ? matchContext(elem, context, xml) : matchAnyContext(elem, context, xml));
checkContext = null;
return ret;
}];
for (; i2 < len; i2++) {
if (matcher = Expr.relative[tokens[i2].type]) {
matchers = [addCombinator(elementMatcher(matchers), matcher)];
} else {
matcher = Expr.filter[tokens[i2].type].apply(null, tokens[i2].matches);
if (matcher[expando]) {
j = ++i2;
for (; j < len; j++) {
if (Expr.relative[tokens[j].type]) {
break;
}
}
return setMatcher(
i2 > 1 && elementMatcher(matchers),
i2 > 1 && toSelector(
// If the preceding token was a descendant combinator, insert an implicit any-element `*`
tokens.slice(0, i2 - 1).concat({ value: tokens[i2 - 2].type === " " ? "*" : "" })
).replace(rtrimCSS, "$1"),
matcher,
i2 < j && matcherFromTokens(tokens.slice(i2, j)),
j < len && matcherFromTokens(tokens = tokens.slice(j)),
j < len && toSelector(tokens)
);
}
matchers.push(matcher);
}
}
return elementMatcher(matchers);
}
function matcherFromGroupMatchers(elementMatchers, setMatchers) {
var bySet = setMatchers.length > 0, byElement = elementMatchers.length > 0, superMatcher = function(seed, context, xml, results, outermost) {
var elem, j, matcher, matchedCount = 0, i2 = "0", unmatched = seed && [], setMatched = [], contextBackup = outermostContext, elems = seed || byElement && Expr.find.TAG("*", outermost), dirrunsUnique = dirruns += contextBackup == null ? 1 : Math.random() || 0.1, len = elems.length;
if (outermost) {
outermostContext = context == document3 || context || outermost;
}
for (; i2 !== len && (elem = elems[i2]) != null; i2++) {
if (byElement && elem) {
j = 0;
if (!context && elem.ownerDocument != document3) {
setDocument(elem);
xml = !documentIsHTML;
}
while (matcher = elementMatchers[j++]) {
if (matcher(elem, context || document3, xml)) {
push2.call(results, elem);
break;
}
}
if (outermost) {
dirruns = dirrunsUnique;
}
}
if (bySet) {
if (elem = !matcher && elem) {
matchedCount--;
}
if (seed) {
unmatched.push(elem);
}
}
}
matchedCount += i2;
if (bySet && i2 !== matchedCount) {
j = 0;
while (matcher = setMatchers[j++]) {
matcher(unmatched, setMatched, context, xml);
}
if (seed) {
if (matchedCount > 0) {
while (i2--) {
if (!(unmatched[i2] || setMatched[i2])) {
setMatched[i2] = pop.call(results);
}
}
}
setMatched = condense(setMatched);
}
push2.apply(results, setMatched);
if (outermost && !seed && setMatched.length > 0 && matchedCount + setMatchers.length > 1) {
jQuery.uniqueSort(results);
}
}
if (outermost) {
dirruns = dirrunsUnique;
outermostContext = contextBackup;
}
return unmatched;
};
return bySet ? markFunction(superMatcher) : superMatcher;
}
function compile(selector, match2) {
var i2, setMatchers = [], elementMatchers = [], cached = compilerCache[selector + " "];
if (!cached) {
if (!match2) {
match2 = tokenize(selector);
}
i2 = match2.length;
while (i2--) {
cached = matcherFromTokens(match2[i2]);
if (cached[expando]) {
setMatchers.push(cached);
} else {
elementMatchers.push(cached);
}
}
cached = compilerCache(
selector,
matcherFromGroupMatchers(elementMatchers, setMatchers)
);
cached.selector = selector;
}
return cached;
}
function select(selector, context, results, seed) {
var i2, tokens, token, type, find2, compiled = typeof selector === "function" && selector, match2 = !seed && tokenize(selector = compiled.selector || selector);
results = results || [];
if (match2.length === 1) {
tokens = match2[0] = match2[0].slice(0);
if (tokens.length > 2 && (token = tokens[0]).type === "ID" && context.nodeType === 9 && documentIsHTML && Expr.relative[tokens[1].type]) {
context = (Expr.find.ID(
token.matches[0].replace(runescape, funescape),
context
) || [])[0];
if (!context) {
return results;
} else if (compiled) {
context = context.parentNode;
}
selector = selector.slice(tokens.shift().value.length);
}
i2 = matchExpr.needsContext.test(selector) ? 0 : tokens.length;
while (i2--) {
token = tokens[i2];
if (Expr.relative[type = token.type]) {
break;
}
if (find2 = Expr.find[type]) {
if (seed = find2(
token.matches[0].replace(runescape, funescape),
rsibling.test(tokens[0].type) && testContext(context.parentNode) || context
)) {
tokens.splice(i2, 1);
selector = seed.length && toSelector(tokens);
if (!selector) {
push2.apply(results, seed);
return results;
}
break;
}
}
}
}
(compiled || compile(selector, match2))(
seed,
context,
!documentIsHTML,
results,
!context || rsibling.test(selector) && testContext(context.parentNode) || context
);
return results;
}
support.sortStable = expando.split("").sort(sortOrder).join("") === expando;
setDocument();
support.sortDetached = assert(function(el) {
return el.compareDocumentPosition(document3.createElement("fieldset")) & 1;
});
jQuery.find = find;
jQuery.expr[":"] = jQuery.expr.pseudos;
jQuery.unique = jQuery.uniqueSort;
find.compile = compile;
find.select = select;
find.setDocument = setDocument;
find.tokenize = tokenize;
find.escape = jQuery.escapeSelector;
find.getText = jQuery.text;
find.isXML = jQuery.isXMLDoc;
find.selectors = jQuery.expr;
find.support = jQuery.support;
find.uniqueSort = jQuery.uniqueSort;
})();
var dir = function(elem, dir2, until) {
var matched = [], truncate = until !== void 0;
while ((elem = elem[dir2]) && elem.nodeType !== 9) {
if (elem.nodeType === 1) {
if (truncate && jQuery(elem).is(until)) {
break;
}
matched.push(elem);
}
}
return matched;
};
var siblings = function(n2, elem) {
var matched = [];
for (; n2; n2 = n2.nextSibling) {
if (n2.nodeType === 1 && n2 !== elem) {
matched.push(n2);
}
}
return matched;
};
var rneedsContext = jQuery.expr.match.needsContext;
var rsingleTag = /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;
function winnow(elements, qualifier, not) {
if (isFunction(qualifier)) {
return jQuery.grep(elements, function(elem, i) {
return !!qualifier.call(elem, i, elem) !== not;
});
}
if (qualifier.nodeType) {
return jQuery.grep(elements, function(elem) {
return elem === qualifier !== not;
});
}
if (typeof qualifier !== "string") {
return jQuery.grep(elements, function(elem) {
return indexOf.call(qualifier, elem) > -1 !== not;
});
}
return jQuery.filter(qualifier, elements, not);
}
jQuery.filter = function(expr, elems, not) {
var elem = elems[0];
if (not) {
expr = ":not(" + expr + ")";
}
if (elems.length === 1 && elem.nodeType === 1) {
return jQuery.find.matchesSelector(elem, expr) ? [elem] : [];
}
return jQuery.find.matches(expr, jQuery.grep(elems, function(elem2) {
return elem2.nodeType === 1;
}));
};
jQuery.fn.extend({
find: function(selector) {
var i, ret, len = this.length, self2 = this;
if (typeof selector !== "string") {
return this.pushStack(jQuery(selector).filter(function() {
for (i = 0; i < len; i++) {
if (jQuery.contains(self2[i], this)) {
return true;
}
}
}));
}
ret = this.pushStack([]);
for (i = 0; i < len; i++) {
jQuery.find(selector, self2[i], ret);
}
return len > 1 ? jQuery.uniqueSort(ret) : ret;
},
filter: function(selector) {
return this.pushStack(winnow(this, selector || [], false));
},
not: function(selector) {
return this.pushStack(winnow(this, selector || [], true));
},
is: function(selector) {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test(selector) ? jQuery(selector) : selector || [],
false
).length;
}
});
var rootjQuery, rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/, init = jQuery.fn.init = function(selector, context, root) {
var match2, elem;
if (!selector) {
return this;
}
root = root || rootjQuery;
if (typeof selector === "string") {
if (selector[0] === "<" && selector[selector.length - 1] === ">" && selector.length >= 3) {
match2 = [null, selector, null];
} else {
match2 = rquickExpr.exec(selector);
}
if (match2 && (match2[1] || !context)) {
if (match2[1]) {
context = context instanceof jQuery ? context[0] : context;
jQuery.merge(this, jQuery.parseHTML(
match2[1],
context && context.nodeType ? context.ownerDocument || context : document2,
true
));
if (rsingleTag.test(match2[1]) && jQuery.isPlainObject(context)) {
for (match2 in context) {
if (isFunction(this[match2])) {
this[match2](context[match2]);
} else {
this.attr(match2, context[match2]);
}
}
}
return this;
} else {
elem = document2.getElementById(match2[2]);
if (elem) {
this[0] = elem;
this.length = 1;
}
return this;
}
} else if (!context || context.jquery) {
return (context || root).find(selector);
} else {
return this.constructor(context).find(selector);
}
} else if (selector.nodeType) {
this[0] = selector;
this.length = 1;
return this;
} else if (isFunction(selector)) {
return root.ready !== void 0 ? root.ready(selector) : (
// Execute immediately if ready is not present
selector(jQuery)
);
}
return jQuery.makeArray(selector, this);
};
init.prototype = jQuery.fn;
rootjQuery = jQuery(document2);
var rparentsprev = /^(?:parents|prev(?:Until|All))/, guaranteedUnique = {
children: true,
contents: true,
next: true,
prev: true
};
jQuery.fn.extend({
has: function(target) {
var targets = jQuery(target, this), l2 = targets.length;
return this.filter(function() {
var i = 0;
for (; i < l2; i++) {
if (jQuery.contains(this, targets[i])) {
return true;
}
}
});
},
closest: function(selectors, context) {
var cur, i = 0, l2 = this.length, matched = [], targets = typeof selectors !== "string" && jQuery(selectors);
if (!rneedsContext.test(selectors)) {
for (; i < l2; i++) {
for (cur = this[i]; cur && cur !== context; cur = cur.parentNode) {
if (cur.nodeType < 11 && (targets ? targets.index(cur) > -1 : (
// Don't pass non-elements to jQuery#find
cur.nodeType === 1 && jQuery.find.matchesSelector(cur, selectors)
))) {
matched.push(cur);
break;
}
}
}
}
return this.pushStack(matched.length > 1 ? jQuery.uniqueSort(matched) : matched);
},
// Determine the position of an element within the set
index: function(elem) {
if (!elem) {
return this[0] && this[0].parentNode ? this.first().prevAll().length : -1;
}
if (typeof elem === "string") {
return indexOf.call(jQuery(elem), this[0]);
}
return indexOf.call(
this,
// If it receives a jQuery object, the first element is used
elem.jquery ? elem[0] : elem
);
},
add: function(selector, context) {
return this.pushStack(
jQuery.uniqueSort(
jQuery.merge(this.get(), jQuery(selector, context))
)
);
},
addBack: function(selector) {
return this.add(
selector == null ? this.prevObject : this.prevObject.filter(selector)
);
}
});
function sibling(cur, dir2) {
while ((cur = cur[dir2]) && cur.nodeType !== 1) {
}
return cur;
}
jQuery.each({
parent: function(elem) {
var parent = elem.parentNode;
return parent && parent.nodeType !== 11 ? parent : null;
},
parents: function(elem) {
return dir(elem, "parentNode");
},
parentsUntil: function(elem, _i, until) {
return dir(elem, "parentNode", until);
},
next: function(elem) {
return sibling(elem, "nextSibling");
},
prev: function(elem) {
return sibling(elem, "previousSibling");
},
nextAll: function(elem) {
return dir(elem, "nextSibling");
},
prevAll: function(elem) {
return dir(elem, "previousSibling");
},
nextUntil: function(elem, _i, until) {
return dir(elem, "nextSibling", until);
},
prevUntil: function(elem, _i, until) {
return dir(elem, "previousSibling", until);
},
siblings: function(elem) {
return siblings((elem.parentNode || {}).firstChild, elem);
},
children: function(elem) {
return siblings(elem.firstChild);
},
contents: function(elem) {
if (elem.contentDocument != null && // Support: IE 11+
// <object> elements with no `data` attribute has an object
// `contentDocument` with a `null` prototype.
getProto(elem.contentDocument)) {
return elem.contentDocument;
}
if (nodeName(elem, "template")) {
elem = elem.content || elem;
}
return jQuery.merge([], elem.childNodes);
}
}, function(name, fn) {
jQuery.fn[name] = function(until, selector) {
var matched = jQuery.map(this, fn, until);
if (name.slice(-5) !== "Until") {
selector = until;
}
if (selector && typeof selector === "string") {
matched = jQuery.filter(selector, matched);
}
if (this.length > 1) {
if (!guaranteedUnique[name]) {
jQuery.uniqueSort(matched);
}
if (rparentsprev.test(name)) {
matched.reverse();
}
}
return this.pushStack(matched);
};
});
var rnothtmlwhite = /[^\x20\t\r\n\f]+/g;
function createOptions(options) {
var object = {};
jQuery.each(options.match(rnothtmlwhite) || [], function(_18, flag) {
object[flag] = true;
});
return object;
}
jQuery.Callbacks = function(options) {
options = typeof options === "string" ? createOptions(options) : jQuery.extend({}, options);
var firing, memory, fired, locked, list = [], queue = [], firingIndex = -1, fire = function() {
locked = locked || options.once;
fired = firing = true;
for (; queue.length; firingIndex = -1) {
memory = queue.shift();
while (++firingIndex < list.length) {
if (list[firingIndex].apply(memory[0], memory[1]) === false && options.stopOnFalse) {
firingIndex = list.length;
memory = false;
}
}
}
if (!options.memory) {
memory = false;
}
firing = false;
if (locked) {
if (memory) {
list = [];
} else {
list = "";
}
}
}, self2 = {
// Add a callback or a collection of callbacks to the list
add: function() {
if (list) {
if (memory && !firing) {
firingIndex = list.length - 1;
queue.push(memory);
}
(function add2(args) {
jQuery.each(args, function(_18, arg) {
if (isFunction(arg)) {
if (!options.unique || !self2.has(arg)) {
list.push(arg);
}
} else if (arg && arg.length && toType(arg) !== "string") {
add2(arg);
}
});
})(arguments);
if (memory && !firing) {
fire();
}
}
return this;
},
// Remove a callback from the list
remove: function() {
jQuery.each(arguments, function(_18, arg) {
var index;
while ((index = jQuery.inArray(arg, list, index)) > -1) {
list.splice(index, 1);
if (index <= firingIndex) {
firingIndex--;
}
}
});
return this;
},
// Check if a given callback is in the list.
// If no argument is given, return whether or not list has callbacks attached.
has: function(fn) {
return fn ? jQuery.inArray(fn, list) > -1 : list.length > 0;
},
// Remove all callbacks from the list
empty: function() {
if (list) {
list = [];
}
return this;
},
// Disable .fire and .add
// Abort any current/pending executions
// Clear all callbacks and values
disable: function() {
locked = queue = [];
list = memory = "";
return this;
},
disabled: function() {
return !list;
},
// Disable .fire
// Also disable .add unless we have memory (since it would have no effect)
// Abort any pending executions
lock: function() {
locked = queue = [];
if (!memory && !firing) {
list = memory = "";
}
return this;
},
locked: function() {
return !!locked;
},
// Call all callbacks with the given context and arguments
fireWith: function(context, args) {
if (!locked) {
args = args || [];
args = [context, args.slice ? args.slice() : args];
queue.push(args);
if (!firing) {
fire();
}
}
return this;
},
// Call all the callbacks with the given arguments
fire: function() {
self2.fireWith(this, arguments);
return this;
},
// To know if the callbacks have already been called at least once
fired: function() {
return !!fired;
}
};
return self2;
};
function Identity(v) {
return v;
}
function Thrower(ex) {
throw ex;
}
function adoptValue(value, resolve, reject2, noValue) {
var method;
try {
if (value && isFunction(method = value.promise)) {
method.call(value).done(resolve).fail(reject2);
} else if (value && isFunction(method = value.then)) {
method.call(value, resolve, reject2);
} else {
resolve.apply(void 0, [value].slice(noValue));
}
} catch (value2) {
reject2.apply(void 0, [value2]);
}
}
jQuery.extend({
Deferred: function(func) {
var tuples = [
// action, add listener, callbacks,
// ... .then handlers, argument index, [final state]
[
"notify",
"progress",
jQuery.Callbacks("memory"),
jQuery.Callbacks("memory"),
2
],
[
"resolve",
"done",
jQuery.Callbacks("once memory"),
jQuery.Callbacks("once memory"),
0,
"resolved"
],
[
"reject",
"fail",
jQuery.Callbacks("once memory"),
jQuery.Callbacks("once memory"),
1,
"rejected"
]
], state = "pending", promise = {
state: function() {
return state;
},
always: function() {
deferred.done(arguments).fail(arguments);
return this;
},
"catch": function(fn) {
return promise.then(null, fn);
},
// Keep pipe for back-compat
pipe: function() {
var fns = arguments;
return jQuery.Deferred(function(newDefer) {
jQuery.each(tuples, function(_i, tuple) {
var fn = isFunction(fns[tuple[4]]) && fns[tuple[4]];
deferred[tuple[1]](function() {
var returned = fn && fn.apply(this, arguments);
if (returned && isFunction(returned.promise)) {
returned.promise().progress(newDefer.notify).done(newDefer.resolve).fail(newDefer.reject);
} else {
newDefer[tuple[0] + "With"](
this,
fn ? [returned] : arguments
);
}
});
});
fns = null;
}).promise();
},
then: function(onFulfilled, onRejected, onProgress) {
var maxDepth = 0;
function resolve(depth, deferred2, handler, special) {
return function() {
var that = this, args = arguments, mightThrow = function() {
var returned, then;
if (depth < maxDepth) {
return;
}
returned = handler.apply(that, args);
if (returned === deferred2.promise()) {
throw new TypeError("Thenable self-resolution");
}
then = returned && // Support: Promises/A+ section 2.3.4
// https://promisesaplus.com/#point-64
// Only check objects and functions for thenability
(typeof returned === "object" || typeof returned === "function") && returned.then;
if (isFunction(then)) {
if (special) {
then.call(
returned,
resolve(maxDepth, deferred2, Identity, special),
resolve(maxDepth, deferred2, Thrower, special)
);
} else {
maxDepth++;
then.call(
returned,
resolve(maxDepth, deferred2, Identity, special),
resolve(maxDepth, deferred2, Thrower, special),
resolve(
maxDepth,
deferred2,
Identity,
deferred2.notifyWith
)
);
}
} else {
if (handler !== Identity) {
that = void 0;
args = [returned];
}
(special || deferred2.resolveWith)(that, args);
}
}, process2 = special ? mightThrow : function() {
try {
mightThrow();
} catch (e) {
if (jQuery.Deferred.exceptionHook) {
jQuery.Deferred.exceptionHook(
e,
process2.error
);
}
if (depth + 1 >= maxDepth) {
if (handler !== Thrower) {
that = void 0;
args = [e];
}
deferred2.rejectWith(that, args);
}
}
};
if (depth) {
process2();
} else {
if (jQuery.Deferred.getErrorHook) {
process2.error = jQuery.Deferred.getErrorHook();
} else if (jQuery.Deferred.getStackHook) {
process2.error = jQuery.Deferred.getStackHook();
}
window2.setTimeout(process2);
}
};
}
return jQuery.Deferred(function(newDefer) {
tuples[0][3].add(
resolve(
0,
newDefer,
isFunction(onProgress) ? onProgress : Identity,
newDefer.notifyWith
)
);
tuples[1][3].add(
resolve(
0,
newDefer,
isFunction(onFulfilled) ? onFulfilled : Identity
)
);
tuples[2][3].add(
resolve(
0,
newDefer,
isFunction(onRejected) ? onRejected : Thrower
)
);
}).promise();
},
// Get a promise for this deferred
// If obj is provided, the promise aspect is added to the object
promise: function(obj) {
return obj != null ? jQuery.extend(obj, promise) : promise;
}
}, deferred = {};
jQuery.each(tuples, function(i, tuple) {
var list = tuple[2], stateString = tuple[5];
promise[tuple[1]] = list.add;
if (stateString) {
list.add(
function() {
state = stateString;
},
// rejected_callbacks.disable
// fulfilled_callbacks.disable
tuples[3 - i][2].disable,
// rejected_handlers.disable
// fulfilled_handlers.disable
tuples[3 - i][3].disable,
// progress_callbacks.lock
tuples[0][2].lock,
// progress_handlers.lock
tuples[0][3].lock
);
}
list.add(tuple[3].fire);
deferred[tuple[0]] = function() {
deferred[tuple[0] + "With"](this === deferred ? void 0 : this, arguments);
return this;
};
deferred[tuple[0] + "With"] = list.fireWith;
});
promise.promise(deferred);
if (func) {
func.call(deferred, deferred);
}
return deferred;
},
// Deferred helper
when: function(singleValue) {
var remaining = arguments.length, i = remaining, resolveContexts = Array(i), resolveValues = slice.call(arguments), primary = jQuery.Deferred(), updateFunc = function(i2) {
return function(value) {
resolveContexts[i2] = this;
resolveValues[i2] = arguments.length > 1 ? slice.call(arguments) : value;
if (!--remaining) {
primary.resolveWith(resolveContexts, resolveValues);
}
};
};
if (remaining <= 1) {
adoptValue(
singleValue,
primary.done(updateFunc(i)).resolve,
primary.reject,
!remaining
);
if (primary.state() === "pending" || isFunction(resolveValues[i] && resolveValues[i].then)) {
return primary.then();
}
}
while (i--) {
adoptValue(resolveValues[i], updateFunc(i), primary.reject);
}
return primary.promise();
}
});
var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;
jQuery.Deferred.exceptionHook = function(error, asyncError) {
if (window2.console && window2.console.warn && error && rerrorNames.test(error.name)) {
window2.console.warn(
"jQuery.Deferred exception: " + error.message,
error.stack,
asyncError
);
}
};
jQuery.readyException = function(error) {
window2.setTimeout(function() {
throw error;
});
};
var readyList = jQuery.Deferred();
jQuery.fn.ready = function(fn) {
readyList.then(fn).catch(function(error) {
jQuery.readyException(error);
});
return this;
};
jQuery.extend({
// Is the DOM ready to be used? Set to true once it occurs.
isReady: false,
// A counter to track how many items to wait for before
// the ready event fires. See trac-6781
readyWait: 1,
// Handle when the DOM is ready
ready: function(wait) {
if (wait === true ? --jQuery.readyWait : jQuery.isReady) {
return;
}
jQuery.isReady = true;
if (wait !== true && --jQuery.readyWait > 0) {
return;
}
readyList.resolveWith(document2, [jQuery]);
}
});
jQuery.ready.then = readyList.then;
function completed2() {
document2.removeEventListener("DOMContentLoaded", completed2);
window2.removeEventListener("load", completed2);
jQuery.ready();
}
if (document2.readyState === "complete" || document2.readyState !== "loading" && !document2.documentElement.doScroll) {
window2.setTimeout(jQuery.ready);
} else {
document2.addEventListener("DOMContentLoaded", completed2);
window2.addEventListener("load", completed2);
}
var access = function(elems, fn, key2, value, chainable, emptyGet, raw) {
var i = 0, len = elems.length, bulk = key2 == null;
if (toType(key2) === "object") {
chainable = true;
for (i in key2) {
access(elems, fn, i, key2[i], true, emptyGet, raw);
}
} else if (value !== void 0) {
chainable = true;
if (!isFunction(value)) {
raw = true;
}
if (bulk) {
if (raw) {
fn.call(elems, value);
fn = null;
} else {
bulk = fn;
fn = function(elem, _key, value2) {
return bulk.call(jQuery(elem), value2);
};
}
}
if (fn) {
for (; i < len; i++) {
fn(
elems[i],
key2,
raw ? value : value.call(elems[i], i, fn(elems[i], key2))
);
}
}
}
if (chainable) {
return elems;
}
if (bulk) {
return fn.call(elems);
}
return len ? fn(elems[0], key2) : emptyGet;
};
var rmsPrefix = /^-ms-/, rdashAlpha = /-([a-z])/g;
function fcamelCase(_all, letter) {
return letter.toUpperCase();
}
function camelCase(string) {
return string.replace(rmsPrefix, "ms-").replace(rdashAlpha, fcamelCase);
}
var acceptData = function(owner) {
return owner.nodeType === 1 || owner.nodeType === 9 || !+owner.nodeType;
};
function Data() {
this.expando = jQuery.expando + Data.uid++;
}
Data.uid = 1;
Data.prototype = {
cache: function(owner) {
var value = owner[this.expando];
if (!value) {
value = {};
if (acceptData(owner)) {
if (owner.nodeType) {
owner[this.expando] = value;
} else {
Object.defineProperty(owner, this.expando, {
value,
configurable: true
});
}
}
}
return value;
},
set: function(owner, data, value) {
var prop, cache = this.cache(owner);
if (typeof data === "string") {
cache[camelCase(data)] = value;
} else {
for (prop in data) {
cache[camelCase(prop)] = data[prop];
}
}
return cache;
},
get: function(owner, key2) {
return key2 === void 0 ? this.cache(owner) : (
// Always use camelCase key (gh-2257)
owner[this.expando] && owner[this.expando][camelCase(key2)]
);
},
access: function(owner, key2, value) {
if (key2 === void 0 || key2 && typeof key2 === "string" && value === void 0) {
return this.get(owner, key2);
}
this.set(owner, key2, value);
return value !== void 0 ? value : key2;
},
remove: function(owner, key2) {
var i, cache = owner[this.expando];
if (cache === void 0) {
return;
}
if (key2 !== void 0) {
if (Array.isArray(key2)) {
key2 = key2.map(camelCase);
} else {
key2 = camelCase(key2);
key2 = key2 in cache ? [key2] : key2.match(rnothtmlwhite) || [];
}
i = key2.length;
while (i--) {
delete cache[key2[i]];
}
}
if (key2 === void 0 || jQuery.isEmptyObject(cache)) {
if (owner.nodeType) {
owner[this.expando] = void 0;
} else {
delete owner[this.expando];
}
}
},
hasData: function(owner) {
var cache = owner[this.expando];
return cache !== void 0 && !jQuery.isEmptyObject(cache);
}
};
var dataPriv = new Data();
var dataUser = new Data();
var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/, rmultiDash = /[A-Z]/g;
function getData(data) {
if (data === "true") {
return true;
}
if (data === "false") {
return false;
}
if (data === "null") {
return null;
}
if (data === +data + "") {
return +data;
}
if (rbrace.test(data)) {
return JSON.parse(data);
}
return data;
}
function dataAttr(elem, key2, data) {
var name;
if (data === void 0 && elem.nodeType === 1) {
name = "data-" + key2.replace(rmultiDash, "-$&").toLowerCase();
data = elem.getAttribute(name);
if (typeof data === "string") {
try {
data = getData(data);
} catch (e) {
}
dataUser.set(elem, key2, data);
} else {
data = void 0;
}
}
return data;
}
jQuery.extend({
hasData: function(elem) {
return dataUser.hasData(elem) || dataPriv.hasData(elem);
},
data: function(elem, name, data) {
return dataUser.access(elem, name, data);
},
removeData: function(elem, name) {
dataUser.remove(elem, name);
},
// TODO: Now that all calls to _data and _removeData have been replaced
// with direct calls to dataPriv methods, these can be deprecated.
_data: function(elem, name, data) {
return dataPriv.access(elem, name, data);
},
_removeData: function(elem, name) {
dataPriv.remove(elem, name);
}
});
jQuery.fn.extend({
data: function(key2, value) {
var i, name, data, elem = this[0], attrs = elem && elem.attributes;
if (key2 === void 0) {
if (this.length) {
data = dataUser.get(elem);
if (elem.nodeType === 1 && !dataPriv.get(elem, "hasDataAttrs")) {
i = attrs.length;
while (i--) {
if (attrs[i]) {
name = attrs[i].name;
if (name.indexOf("data-") === 0) {
name = camelCase(name.slice(5));
dataAttr(elem, name, data[name]);
}
}
}
dataPriv.set(elem, "hasDataAttrs", true);
}
}
return data;
}
if (typeof key2 === "object") {
return this.each(function() {
dataUser.set(this, key2);
});
}
return access(this, function(value2) {
var data2;
if (elem && value2 === void 0) {
data2 = dataUser.get(elem, key2);
if (data2 !== void 0) {
return data2;
}
data2 = dataAttr(elem, key2);
if (data2 !== void 0) {
return data2;
}
return;
}
this.each(function() {
dataUser.set(this, key2, value2);
});
}, null, value, arguments.length > 1, null, true);
},
removeData: function(key2) {
return this.each(function() {
dataUser.remove(this, key2);
});
}
});
jQuery.extend({
queue: function(elem, type, data) {
var queue;
if (elem) {
type = (type || "fx") + "queue";
queue = dataPriv.get(elem, type);
if (data) {
if (!queue || Array.isArray(data)) {
queue = dataPriv.access(elem, type, jQuery.makeArray(data));
} else {
queue.push(data);
}
}
return queue || [];
}
},
dequeue: function(elem, type) {
type = type || "fx";
var queue = jQuery.queue(elem, type), startLength = queue.length, fn = queue.shift(), hooks = jQuery._queueHooks(elem, type), next = function() {
jQuery.dequeue(elem, type);
};
if (fn === "inprogress") {
fn = queue.shift();
startLength--;
}
if (fn) {
if (type === "fx") {
queue.unshift("inprogress");
}
delete hooks.stop;
fn.call(elem, next, hooks);
}
if (!startLength && hooks) {
hooks.empty.fire();
}
},
// Not public - generate a queueHooks object, or return the current one
_queueHooks: function(elem, type) {
var key2 = type + "queueHooks";
return dataPriv.get(elem, key2) || dataPriv.access(elem, key2, {
empty: jQuery.Callbacks("once memory").add(function() {
dataPriv.remove(elem, [type + "queue", key2]);
})
});
}
});
jQuery.fn.extend({
queue: function(type, data) {
var setter = 2;
if (typeof type !== "string") {
data = type;
type = "fx";
setter--;
}
if (arguments.length < setter) {
return jQuery.queue(this[0], type);
}
return data === void 0 ? this : this.each(function() {
var queue = jQuery.queue(this, type, data);
jQuery._queueHooks(this, type);
if (type === "fx" && queue[0] !== "inprogress") {
jQuery.dequeue(this, type);
}
});
},
dequeue: function(type) {
return this.each(function() {
jQuery.dequeue(this, type);
});
},
clearQueue: function(type) {
return this.queue(type || "fx", []);
},
// Get a promise resolved when queues of a certain type
// are emptied (fx is the type by default)
promise: function(type, obj) {
var tmp, count = 1, defer = jQuery.Deferred(), elements = this, i = this.length, resolve = function() {
if (!--count) {
defer.resolveWith(elements, [elements]);
}
};
if (typeof type !== "string") {
obj = type;
type = void 0;
}
type = type || "fx";
while (i--) {
tmp = dataPriv.get(elements[i], type + "queueHooks");
if (tmp && tmp.empty) {
count++;
tmp.empty.add(resolve);
}
}
resolve();
return defer.promise(obj);
}
});
var pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;
var rcssNum = new RegExp("^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i");
var cssExpand = ["Top", "Right", "Bottom", "Left"];
var documentElement = document2.documentElement;
var isAttached = function(elem) {
return jQuery.contains(elem.ownerDocument, elem);
}, composed = { composed: true };
if (documentElement.getRootNode) {
isAttached = function(elem) {
return jQuery.contains(elem.ownerDocument, elem) || elem.getRootNode(composed) === elem.ownerDocument;
};
}
var isHiddenWithinTree = function(elem, el) {
elem = el || elem;
return elem.style.display === "none" || elem.style.display === "" && // Otherwise, check computed style
// Support: Firefox <=43 - 45
// Disconnected elements can have computed display: none, so first confirm that elem is
// in the document.
isAttached(elem) && jQuery.css(elem, "display") === "none";
};
function adjustCSS(elem, prop, valueParts, tween) {
var adjusted, scale, maxIterations = 20, currentValue = tween ? function() {
return tween.cur();
} : function() {
return jQuery.css(elem, prop, "");
}, initial = currentValue(), unit = valueParts && valueParts[3] || (jQuery.cssNumber[prop] ? "" : "px"), initialInUnit = elem.nodeType && (jQuery.cssNumber[prop] || unit !== "px" && +initial) && rcssNum.exec(jQuery.css(elem, prop));
if (initialInUnit && initialInUnit[3] !== unit) {
initial = initial / 2;
unit = unit || initialInUnit[3];
initialInUnit = +initial || 1;
while (maxIterations--) {
jQuery.style(elem, prop, initialInUnit + unit);
if ((1 - scale) * (1 - (scale = currentValue() / initial || 0.5)) <= 0) {
maxIterations = 0;
}
initialInUnit = initialInUnit / scale;
}
initialInUnit = initialInUnit * 2;
jQuery.style(elem, prop, initialInUnit + unit);
valueParts = valueParts || [];
}
if (valueParts) {
initialInUnit = +initialInUnit || +initial || 0;
adjusted = valueParts[1] ? initialInUnit + (valueParts[1] + 1) * valueParts[2] : +valueParts[2];
if (tween) {
tween.unit = unit;
tween.start = initialInUnit;
tween.end = adjusted;
}
}
return adjusted;
}
var defaultDisplayMap = {};
function getDefaultDisplay(elem) {
var temp, doc = elem.ownerDocument, nodeName2 = elem.nodeName, display = defaultDisplayMap[nodeName2];
if (display) {
return display;
}
temp = doc.body.appendChild(doc.createElement(nodeName2));
display = jQuery.css(temp, "display");
temp.parentNode.removeChild(temp);
if (display === "none") {
display = "block";
}
defaultDisplayMap[nodeName2] = display;
return display;
}
function showHide(elements, show) {
var display, elem, values = [], index = 0, length = elements.length;
for (; index < length; index++) {
elem = elements[index];
if (!elem.style) {
continue;
}
display = elem.style.display;
if (show) {
if (display === "none") {
values[index] = dataPriv.get(elem, "display") || null;
if (!values[index]) {
elem.style.display = "";
}
}
if (elem.style.display === "" && isHiddenWithinTree(elem)) {
values[index] = getDefaultDisplay(elem);
}
} else {
if (display !== "none") {
values[index] = "none";
dataPriv.set(elem, "display", display);
}
}
}
for (index = 0; index < length; index++) {
if (values[index] != null) {
elements[index].style.display = values[index];
}
}
return elements;
}
jQuery.fn.extend({
show: function() {
return showHide(this, true);
},
hide: function() {
return showHide(this);
},
toggle: function(state) {
if (typeof state === "boolean") {
return state ? this.show() : this.hide();
}
return this.each(function() {
if (isHiddenWithinTree(this)) {
jQuery(this).show();
} else {
jQuery(this).hide();
}
});
}
});
var rcheckableType = /^(?:checkbox|radio)$/i;
var rtagName = /<([a-z][^\/\0>\x20\t\r\n\f]*)/i;
var rscriptType = /^$|^module$|\/(?:java|ecma)script/i;
(function() {
var fragment = document2.createDocumentFragment(), div = fragment.appendChild(document2.createElement("div")), input = document2.createElement("input");
input.setAttribute("type", "radio");
input.setAttribute("checked", "checked");
input.setAttribute("name", "t");
div.appendChild(input);
support.checkClone = div.cloneNode(true).cloneNode(true).lastChild.checked;
div.innerHTML = "<textarea>x</textarea>";
support.noCloneChecked = !!div.cloneNode(true).lastChild.defaultValue;
div.innerHTML = "<option></option>";
support.option = !!div.lastChild;
})();
var wrapMap = {
// XHTML parsers do not magically insert elements in the
// same way that tag soup parsers do. So we cannot shorten
// this by omitting <tbody> or other required elements.
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
wrapMap.th = wrapMap.td;
if (!support.option) {
wrapMap.optgroup = wrapMap.option = [1, "<select multiple='multiple'>", "</select>"];
}
function getAll(context, tag) {
var ret;
if (typeof context.getElementsByTagName !== "undefined") {
ret = context.getElementsByTagName(tag || "*");
} else if (typeof context.querySelectorAll !== "undefined") {
ret = context.querySelectorAll(tag || "*");
} else {
ret = [];
}
if (tag === void 0 || tag && nodeName(context, tag)) {
return jQuery.merge([context], ret);
}
return ret;
}
function setGlobalEval(elems, refElements) {
var i = 0, l2 = elems.length;
for (; i < l2; i++) {
dataPriv.set(
elems[i],
"globalEval",
!refElements || dataPriv.get(refElements[i], "globalEval")
);
}
}
var rhtml = /<|&#?\w+;/;
function buildFragment(elems, context, scripts, selection, ignored) {
var elem, tmp, tag, wrap, attached, j, fragment = context.createDocumentFragment(), nodes = [], i = 0, l2 = elems.length;
for (; i < l2; i++) {
elem = elems[i];
if (elem || elem === 0) {
if (toType(elem) === "object") {
jQuery.merge(nodes, elem.nodeType ? [elem] : elem);
} else if (!rhtml.test(elem)) {
nodes.push(context.createTextNode(elem));
} else {
tmp = tmp || fragment.appendChild(context.createElement("div"));
tag = (rtagName.exec(elem) || ["", ""])[1].toLowerCase();
wrap = wrapMap[tag] || wrapMap._default;
tmp.innerHTML = wrap[1] + jQuery.htmlPrefilter(elem) + wrap[2];
j = wrap[0];
while (j--) {
tmp = tmp.lastChild;
}
jQuery.merge(nodes, tmp.childNodes);
tmp = fragment.firstChild;
tmp.textContent = "";
}
}
}
fragment.textContent = "";
i = 0;
while (elem = nodes[i++]) {
if (selection && jQuery.inArray(elem, selection) > -1) {
if (ignored) {
ignored.push(elem);
}
continue;
}
attached = isAttached(elem);
tmp = getAll(fragment.appendChild(elem), "script");
if (attached) {
setGlobalEval(tmp);
}
if (scripts) {
j = 0;
while (elem = tmp[j++]) {
if (rscriptType.test(elem.type || "")) {
scripts.push(elem);
}
}
}
}
return fragment;
}
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
function returnTrue() {
return true;
}
function returnFalse() {
return false;
}
function on(elem, types, selector, data, fn, one) {
var origFn, type;
if (typeof types === "object") {
if (typeof selector !== "string") {
data = data || selector;
selector = void 0;
}
for (type in types) {
on(elem, type, selector, data, types[type], one);
}
return elem;
}
if (data == null && fn == null) {
fn = selector;
data = selector = void 0;
} else if (fn == null) {
if (typeof selector === "string") {
fn = data;
data = void 0;
} else {
fn = data;
data = selector;
selector = void 0;
}
}
if (fn === false) {
fn = returnFalse;
} else if (!fn) {
return elem;
}
if (one === 1) {
origFn = fn;
fn = function(event) {
jQuery().off(event);
return origFn.apply(this, arguments);
};
fn.guid = origFn.guid || (origFn.guid = jQuery.guid++);
}
return elem.each(function() {
jQuery.event.add(this, types, fn, data, selector);
});
}
jQuery.event = {
global: {},
add: function(elem, types, handler, data, selector) {
var handleObjIn, eventHandle, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.get(elem);
if (!acceptData(elem)) {
return;
}
if (handler.handler) {
handleObjIn = handler;
handler = handleObjIn.handler;
selector = handleObjIn.selector;
}
if (selector) {
jQuery.find.matchesSelector(documentElement, selector);
}
if (!handler.guid) {
handler.guid = jQuery.guid++;
}
if (!(events2 = elemData.events)) {
events2 = elemData.events = /* @__PURE__ */ Object.create(null);
}
if (!(eventHandle = elemData.handle)) {
eventHandle = elemData.handle = function(e) {
return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ? jQuery.event.dispatch.apply(elem, arguments) : void 0;
};
}
types = (types || "").match(rnothtmlwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
continue;
}
special = jQuery.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
special = jQuery.event.special[type] || {};
handleObj = jQuery.extend({
type,
origType,
data,
handler,
guid: handler.guid,
selector,
needsContext: selector && jQuery.expr.match.needsContext.test(selector),
namespace: namespaces.join(".")
}, handleObjIn);
if (!(handlers = events2[type])) {
handlers = events2[type] = [];
handlers.delegateCount = 0;
if (!special.setup || special.setup.call(elem, data, namespaces, eventHandle) === false) {
if (elem.addEventListener) {
elem.addEventListener(type, eventHandle);
}
}
}
if (special.add) {
special.add.call(elem, handleObj);
if (!handleObj.handler.guid) {
handleObj.handler.guid = handler.guid;
}
}
if (selector) {
handlers.splice(handlers.delegateCount++, 0, handleObj);
} else {
handlers.push(handleObj);
}
jQuery.event.global[type] = true;
}
},
// Detach an event or set of events from an element
remove: function(elem, types, handler, selector, mappedTypes) {
var j, origCount, tmp, events2, t, handleObj, special, handlers, type, namespaces, origType, elemData = dataPriv.hasData(elem) && dataPriv.get(elem);
if (!elemData || !(events2 = elemData.events)) {
return;
}
types = (types || "").match(rnothtmlwhite) || [""];
t = types.length;
while (t--) {
tmp = rtypenamespace.exec(types[t]) || [];
type = origType = tmp[1];
namespaces = (tmp[2] || "").split(".").sort();
if (!type) {
for (type in events2) {
jQuery.event.remove(elem, type + types[t], handler, selector, true);
}
continue;
}
special = jQuery.event.special[type] || {};
type = (selector ? special.delegateType : special.bindType) || type;
handlers = events2[type] || [];
tmp = tmp[2] && new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)");
origCount = j = handlers.length;
while (j--) {
handleObj = handlers[j];
if ((mappedTypes || origType === handleObj.origType) && (!handler || handler.guid === handleObj.guid) && (!tmp || tmp.test(handleObj.namespace)) && (!selector || selector === handleObj.selector || selector === "**" && handleObj.selector)) {
handlers.splice(j, 1);
if (handleObj.selector) {
handlers.delegateCount--;
}
if (special.remove) {
special.remove.call(elem, handleObj);
}
}
}
if (origCount && !handlers.length) {
if (!special.teardown || special.teardown.call(elem, namespaces, elemData.handle) === false) {
jQuery.removeEvent(elem, type, elemData.handle);
}
delete events2[type];
}
}
if (jQuery.isEmptyObject(events2)) {
dataPriv.remove(elem, "handle events");
}
},
dispatch: function(nativeEvent) {
var i, j, ret, matched, handleObj, handlerQueue, args = new Array(arguments.length), event = jQuery.event.fix(nativeEvent), handlers = (dataPriv.get(this, "events") || /* @__PURE__ */ Object.create(null))[event.type] || [], special = jQuery.event.special[event.type] || {};
args[0] = event;
for (i = 1; i < arguments.length; i++) {
args[i] = arguments[i];
}
event.delegateTarget = this;
if (special.preDispatch && special.preDispatch.call(this, event) === false) {
return;
}
handlerQueue = jQuery.event.handlers.call(this, event, handlers);
i = 0;
while ((matched = handlerQueue[i++]) && !event.isPropagationStopped()) {
event.currentTarget = matched.elem;
j = 0;
while ((handleObj = matched.handlers[j++]) && !event.isImmediatePropagationStopped()) {
if (!event.rnamespace || handleObj.namespace === false || event.rnamespace.test(handleObj.namespace)) {
event.handleObj = handleObj;
event.data = handleObj.data;
ret = ((jQuery.event.special[handleObj.origType] || {}).handle || handleObj.handler).apply(matched.elem, args);
if (ret !== void 0) {
if ((event.result = ret) === false) {
event.preventDefault();
event.stopPropagation();
}
}
}
}
}
if (special.postDispatch) {
special.postDispatch.call(this, event);
}
return event.result;
},
handlers: function(event, handlers) {
var i, handleObj, sel, matchedHandlers, matchedSelectors, handlerQueue = [], delegateCount = handlers.delegateCount, cur = event.target;
if (delegateCount && // Support: IE <=9
// Black-hole SVG <use> instance trees (trac-13180)
cur.nodeType && // Support: Firefox <=42
// Suppress spec-violating clicks indicating a non-primary pointer button (trac-3861)
// https://www.w3.org/TR/DOM-Level-3-Events/#event-type-click
// Support: IE 11 only
// ...but not arrow key "clicks" of radio inputs, which can have `button` -1 (gh-2343)
!(event.type === "click" && event.button >= 1)) {
for (; cur !== this; cur = cur.parentNode || this) {
if (cur.nodeType === 1 && !(event.type === "click" && cur.disabled === true)) {
matchedHandlers = [];
matchedSelectors = {};
for (i = 0; i < delegateCount; i++) {
handleObj = handlers[i];
sel = handleObj.selector + " ";
if (matchedSelectors[sel] === void 0) {
matchedSelectors[sel] = handleObj.needsContext ? jQuery(sel, this).index(cur) > -1 : jQuery.find(sel, this, null, [cur]).length;
}
if (matchedSelectors[sel]) {
matchedHandlers.push(handleObj);
}
}
if (matchedHandlers.length) {
handlerQueue.push({ elem: cur, handlers: matchedHandlers });
}
}
}
}
cur = this;
if (delegateCount < handlers.length) {
handlerQueue.push({ elem: cur, handlers: handlers.slice(delegateCount) });
}
return handlerQueue;
},
addProp: function(name, hook) {
Object.defineProperty(jQuery.Event.prototype, name, {
enumerable: true,
configurable: true,
get: isFunction(hook) ? function() {
if (this.originalEvent) {
return hook(this.originalEvent);
}
} : function() {
if (this.originalEvent) {
return this.originalEvent[name];
}
},
set: function(value) {
Object.defineProperty(this, name, {
enumerable: true,
configurable: true,
writable: true,
value
});
}
});
},
fix: function(originalEvent) {
return originalEvent[jQuery.expando] ? originalEvent : new jQuery.Event(originalEvent);
},
special: {
load: {
// Prevent triggered image.load events from bubbling to window.load
noBubble: true
},
click: {
// Utilize native event to ensure correct state for checkable inputs
setup: function(data) {
var el = this || data;
if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
leverageNative(el, "click", true);
}
return false;
},
trigger: function(data) {
var el = this || data;
if (rcheckableType.test(el.type) && el.click && nodeName(el, "input")) {
leverageNative(el, "click");
}
return true;
},
// For cross-browser consistency, suppress native .click() on links
// Also prevent it if we're currently inside a leveraged native-event stack
_default: function(event) {
var target = event.target;
return rcheckableType.test(target.type) && target.click && nodeName(target, "input") && dataPriv.get(target, "click") || nodeName(target, "a");
}
},
beforeunload: {
postDispatch: function(event) {
if (event.result !== void 0 && event.originalEvent) {
event.originalEvent.returnValue = event.result;
}
}
}
}
};
function leverageNative(el, type, isSetup) {
if (!isSetup) {
if (dataPriv.get(el, type) === void 0) {
jQuery.event.add(el, type, returnTrue);
}
return;
}
dataPriv.set(el, type, false);
jQuery.event.add(el, type, {
namespace: false,
handler: function(event) {
var result, saved = dataPriv.get(this, type);
if (event.isTrigger & 1 && this[type]) {
if (!saved) {
saved = slice.call(arguments);
dataPriv.set(this, type, saved);
this[type]();
result = dataPriv.get(this, type);
dataPriv.set(this, type, false);
if (saved !== result) {
event.stopImmediatePropagation();
event.preventDefault();
return result;
}
} else if ((jQuery.event.special[type] || {}).delegateType) {
event.stopPropagation();
}
} else if (saved) {
dataPriv.set(this, type, jQuery.event.trigger(
saved[0],
saved.slice(1),
this
));
event.stopPropagation();
event.isImmediatePropagationStopped = returnTrue;
}
}
});
}
jQuery.removeEvent = function(elem, type, handle) {
if (elem.removeEventListener) {
elem.removeEventListener(type, handle);
}
};
jQuery.Event = function(src, props) {
if (!(this instanceof jQuery.Event)) {
return new jQuery.Event(src, props);
}
if (src && src.type) {
this.originalEvent = src;
this.type = src.type;
this.isDefaultPrevented = src.defaultPrevented || src.defaultPrevented === void 0 && // Support: Android <=2.3 only
src.returnValue === false ? returnTrue : returnFalse;
this.target = src.target && src.target.nodeType === 3 ? src.target.parentNode : src.target;
this.currentTarget = src.currentTarget;
this.relatedTarget = src.relatedTarget;
} else {
this.type = src;
}
if (props) {
jQuery.extend(this, props);
}
this.timeStamp = src && src.timeStamp || Date.now();
this[jQuery.expando] = true;
};
jQuery.Event.prototype = {
constructor: jQuery.Event,
isDefaultPrevented: returnFalse,
isPropagationStopped: returnFalse,
isImmediatePropagationStopped: returnFalse,
isSimulated: false,
preventDefault: function() {
var e = this.originalEvent;
this.isDefaultPrevented = returnTrue;
if (e && !this.isSimulated) {
e.preventDefault();
}
},
stopPropagation: function() {
var e = this.originalEvent;
this.isPropagationStopped = returnTrue;
if (e && !this.isSimulated) {
e.stopPropagation();
}
},
stopImmediatePropagation: function() {
var e = this.originalEvent;
this.isImmediatePropagationStopped = returnTrue;
if (e && !this.isSimulated) {
e.stopImmediatePropagation();
}
this.stopPropagation();
}
};
jQuery.each({
altKey: true,
bubbles: true,
cancelable: true,
changedTouches: true,
ctrlKey: true,
detail: true,
eventPhase: true,
metaKey: true,
pageX: true,
pageY: true,
shiftKey: true,
view: true,
"char": true,
code: true,
charCode: true,
key: true,
keyCode: true,
button: true,
buttons: true,
clientX: true,
clientY: true,
offsetX: true,
offsetY: true,
pointerId: true,
pointerType: true,
screenX: true,
screenY: true,
targetTouches: true,
toElement: true,
touches: true,
which: true
}, jQuery.event.addProp);
jQuery.each({ focus: "focusin", blur: "focusout" }, function(type, delegateType) {
function focusMappedHandler(nativeEvent) {
if (document2.documentMode) {
var handle = dataPriv.get(this, "handle"), event = jQuery.event.fix(nativeEvent);
event.type = nativeEvent.type === "focusin" ? "focus" : "blur";
event.isSimulated = true;
handle(nativeEvent);
if (event.target === event.currentTarget) {
handle(event);
}
} else {
jQuery.event.simulate(
delegateType,
nativeEvent.target,
jQuery.event.fix(nativeEvent)
);
}
}
jQuery.event.special[type] = {
// Utilize native event if possible so blur/focus sequence is correct
setup: function() {
var attaches;
leverageNative(this, type, true);
if (document2.documentMode) {
attaches = dataPriv.get(this, delegateType);
if (!attaches) {
this.addEventListener(delegateType, focusMappedHandler);
}
dataPriv.set(this, delegateType, (attaches || 0) + 1);
} else {
return false;
}
},
trigger: function() {
leverageNative(this, type);
return true;
},
teardown: function() {
var attaches;
if (document2.documentMode) {
attaches = dataPriv.get(this, delegateType) - 1;
if (!attaches) {
this.removeEventListener(delegateType, focusMappedHandler);
dataPriv.remove(this, delegateType);
} else {
dataPriv.set(this, delegateType, attaches);
}
} else {
return false;
}
},
// Suppress native focus or blur if we're currently inside
// a leveraged native-event stack
_default: function(event) {
return dataPriv.get(event.target, type);
},
delegateType
};
jQuery.event.special[delegateType] = {
setup: function() {
var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType);
if (!attaches) {
if (document2.documentMode) {
this.addEventListener(delegateType, focusMappedHandler);
} else {
doc.addEventListener(type, focusMappedHandler, true);
}
}
dataPriv.set(dataHolder, delegateType, (attaches || 0) + 1);
},
teardown: function() {
var doc = this.ownerDocument || this.document || this, dataHolder = document2.documentMode ? this : doc, attaches = dataPriv.get(dataHolder, delegateType) - 1;
if (!attaches) {
if (document2.documentMode) {
this.removeEventListener(delegateType, focusMappedHandler);
} else {
doc.removeEventListener(type, focusMappedHandler, true);
}
dataPriv.remove(dataHolder, delegateType);
} else {
dataPriv.set(dataHolder, delegateType, attaches);
}
}
};
});
jQuery.each({
mouseenter: "mouseover",
mouseleave: "mouseout",
pointerenter: "pointerover",
pointerleave: "pointerout"
}, function(orig, fix) {
jQuery.event.special[orig] = {
delegateType: fix,
bindType: fix,
handle: function(event) {
var ret, target = this, related = event.relatedTarget, handleObj = event.handleObj;
if (!related || related !== target && !jQuery.contains(target, related)) {
event.type = handleObj.origType;
ret = handleObj.handler.apply(this, arguments);
event.type = fix;
}
return ret;
}
};
});
jQuery.fn.extend({
on: function(types, selector, data, fn) {
return on(this, types, selector, data, fn);
},
one: function(types, selector, data, fn) {
return on(this, types, selector, data, fn, 1);
},
off: function(types, selector, fn) {
var handleObj, type;
if (types && types.preventDefault && types.handleObj) {
handleObj = types.handleObj;
jQuery(types.delegateTarget).off(
handleObj.namespace ? handleObj.origType + "." + handleObj.namespace : handleObj.origType,
handleObj.selector,
handleObj.handler
);
return this;
}
if (typeof types === "object") {
for (type in types) {
this.off(type, selector, types[type]);
}
return this;
}
if (selector === false || typeof selector === "function") {
fn = selector;
selector = void 0;
}
if (fn === false) {
fn = returnFalse;
}
return this.each(function() {
jQuery.event.remove(this, types, fn, selector);
});
}
});
var rnoInnerhtml = /<script|<style|<link/i, rchecked = /checked\s*(?:[^=]|=\s*.checked.)/i, rcleanScript = /^\s*<!\[CDATA\[|\]\]>\s*$/g;
function manipulationTarget(elem, content) {
if (nodeName(elem, "table") && nodeName(content.nodeType !== 11 ? content : content.firstChild, "tr")) {
return jQuery(elem).children("tbody")[0] || elem;
}
return elem;
}
function disableScript(elem) {
elem.type = (elem.getAttribute("type") !== null) + "/" + elem.type;
return elem;
}
function restoreScript(elem) {
if ((elem.type || "").slice(0, 5) === "true/") {
elem.type = elem.type.slice(5);
} else {
elem.removeAttribute("type");
}
return elem;
}
function cloneCopyEvent(src, dest) {
var i, l2, type, pdataOld, udataOld, udataCur, events2;
if (dest.nodeType !== 1) {
return;
}
if (dataPriv.hasData(src)) {
pdataOld = dataPriv.get(src);
events2 = pdataOld.events;
if (events2) {
dataPriv.remove(dest, "handle events");
for (type in events2) {
for (i = 0, l2 = events2[type].length; i < l2; i++) {
jQuery.event.add(dest, type, events2[type][i]);
}
}
}
}
if (dataUser.hasData(src)) {
udataOld = dataUser.access(src);
udataCur = jQuery.extend({}, udataOld);
dataUser.set(dest, udataCur);
}
}
function fixInput(src, dest) {
var nodeName2 = dest.nodeName.toLowerCase();
if (nodeName2 === "input" && rcheckableType.test(src.type)) {
dest.checked = src.checked;
} else if (nodeName2 === "input" || nodeName2 === "textarea") {
dest.defaultValue = src.defaultValue;
}
}
function domManip(collection, args, callback, ignored) {
args = flat(args);
var fragment, first, scripts, hasScripts, node, doc, i = 0, l2 = collection.length, iNoClone = l2 - 1, value = args[0], valueIsFunction = isFunction(value);
if (valueIsFunction || l2 > 1 && typeof value === "string" && !support.checkClone && rchecked.test(value)) {
return collection.each(function(index) {
var self2 = collection.eq(index);
if (valueIsFunction) {
args[0] = value.call(this, index, self2.html());
}
domManip(self2, args, callback, ignored);
});
}
if (l2) {
fragment = buildFragment(args, collection[0].ownerDocument, false, collection, ignored);
first = fragment.firstChild;
if (fragment.childNodes.length === 1) {
fragment = first;
}
if (first || ignored) {
scripts = jQuery.map(getAll(fragment, "script"), disableScript);
hasScripts = scripts.length;
for (; i < l2; i++) {
node = fragment;
if (i !== iNoClone) {
node = jQuery.clone(node, true, true);
if (hasScripts) {
jQuery.merge(scripts, getAll(node, "script"));
}
}
callback.call(collection[i], node, i);
}
if (hasScripts) {
doc = scripts[scripts.length - 1].ownerDocument;
jQuery.map(scripts, restoreScript);
for (i = 0; i < hasScripts; i++) {
node = scripts[i];
if (rscriptType.test(node.type || "") && !dataPriv.access(node, "globalEval") && jQuery.contains(doc, node)) {
if (node.src && (node.type || "").toLowerCase() !== "module") {
if (jQuery._evalUrl && !node.noModule) {
jQuery._evalUrl(node.src, {
nonce: node.nonce || node.getAttribute("nonce")
}, doc);
}
} else {
DOMEval(node.textContent.replace(rcleanScript, ""), node, doc);
}
}
}
}
}
}
return collection;
}
function remove(elem, selector, keepData) {
var node, nodes = selector ? jQuery.filter(selector, elem) : elem, i = 0;
for (; (node = nodes[i]) != null; i++) {
if (!keepData && node.nodeType === 1) {
jQuery.cleanData(getAll(node));
}
if (node.parentNode) {
if (keepData && isAttached(node)) {
setGlobalEval(getAll(node, "script"));
}
node.parentNode.removeChild(node);
}
}
return elem;
}
jQuery.extend({
htmlPrefilter: function(html) {
return html;
},
clone: function(elem, dataAndEvents, deepDataAndEvents) {
var i, l2, srcElements, destElements, clone3 = elem.cloneNode(true), inPage = isAttached(elem);
if (!support.noCloneChecked && (elem.nodeType === 1 || elem.nodeType === 11) && !jQuery.isXMLDoc(elem)) {
destElements = getAll(clone3);
srcElements = getAll(elem);
for (i = 0, l2 = srcElements.length; i < l2; i++) {
fixInput(srcElements[i], destElements[i]);
}
}
if (dataAndEvents) {
if (deepDataAndEvents) {
srcElements = srcElements || getAll(elem);
destElements = destElements || getAll(clone3);
for (i = 0, l2 = srcElements.length; i < l2; i++) {
cloneCopyEvent(srcElements[i], destElements[i]);
}
} else {
cloneCopyEvent(elem, clone3);
}
}
destElements = getAll(clone3, "script");
if (destElements.length > 0) {
setGlobalEval(destElements, !inPage && getAll(elem, "script"));
}
return clone3;
},
cleanData: function(elems) {
var data, elem, type, special = jQuery.event.special, i = 0;
for (; (elem = elems[i]) !== void 0; i++) {
if (acceptData(elem)) {
if (data = elem[dataPriv.expando]) {
if (data.events) {
for (type in data.events) {
if (special[type]) {
jQuery.event.remove(elem, type);
} else {
jQuery.removeEvent(elem, type, data.handle);
}
}
}
elem[dataPriv.expando] = void 0;
}
if (elem[dataUser.expando]) {
elem[dataUser.expando] = void 0;
}
}
}
}
});
jQuery.fn.extend({
detach: function(selector) {
return remove(this, selector, true);
},
remove: function(selector) {
return remove(this, selector);
},
text: function(value) {
return access(this, function(value2) {
return value2 === void 0 ? jQuery.text(this) : this.empty().each(function() {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
this.textContent = value2;
}
});
}, null, value, arguments.length);
},
append: function() {
return domManip(this, arguments, function(elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.appendChild(elem);
}
});
},
prepend: function() {
return domManip(this, arguments, function(elem) {
if (this.nodeType === 1 || this.nodeType === 11 || this.nodeType === 9) {
var target = manipulationTarget(this, elem);
target.insertBefore(elem, target.firstChild);
}
});
},
before: function() {
return domManip(this, arguments, function(elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this);
}
});
},
after: function() {
return domManip(this, arguments, function(elem) {
if (this.parentNode) {
this.parentNode.insertBefore(elem, this.nextSibling);
}
});
},
empty: function() {
var elem, i = 0;
for (; (elem = this[i]) != null; i++) {
if (elem.nodeType === 1) {
jQuery.cleanData(getAll(elem, false));
elem.textContent = "";
}
}
return this;
},
clone: function(dataAndEvents, deepDataAndEvents) {
dataAndEvents = dataAndEvents == null ? false : dataAndEvents;
deepDataAndEvents = deepDataAndEvents == null ? dataAndEvents : deepDataAndEvents;
return this.map(function() {
return jQuery.clone(this, dataAndEvents, deepDataAndEvents);
});
},
html: function(value) {
return access(this, function(value2) {
var elem = this[0] || {}, i = 0, l2 = this.length;
if (value2 === void 0 && elem.nodeType === 1) {
return elem.innerHTML;
}
if (typeof value2 === "string" && !rnoInnerhtml.test(value2) && !wrapMap[(rtagName.exec(value2) || ["", ""])[1].toLowerCase()]) {
value2 = jQuery.htmlPrefilter(value2);
try {
for (; i < l2; i++) {
elem = this[i] || {};
if (elem.nodeType === 1) {
jQuery.cleanData(getAll(elem, false));
elem.innerHTML = value2;
}
}
elem = 0;
} catch (e) {
}
}
if (elem) {
this.empty().append(value2);
}
}, null, value, arguments.length);
},
replaceWith: function() {
var ignored = [];
return domManip(this, arguments, function(elem) {
var parent = this.parentNode;
if (jQuery.inArray(this, ignored) < 0) {
jQuery.cleanData(getAll(this));
if (parent) {
parent.replaceChild(elem, this);
}
}
}, ignored);
}
});
jQuery.each({
appendTo: "append",
prependTo: "prepend",
insertBefore: "before",
insertAfter: "after",
replaceAll: "replaceWith"
}, function(name, original) {
jQuery.fn[name] = function(selector) {
var elems, ret = [], insert = jQuery(selector), last = insert.length - 1, i = 0;
for (; i <= last; i++) {
elems = i === last ? this : this.clone(true);
jQuery(insert[i])[original](elems);
push.apply(ret, elems.get());
}
return this.pushStack(ret);
};
});
var rnumnonpx = new RegExp("^(" + pnum + ")(?!px)[a-z%]+$", "i");
var rcustomProp = /^--/;
var getStyles = function(elem) {
var view = elem.ownerDocument.defaultView;
if (!view || !view.opener) {
view = window2;
}
return view.getComputedStyle(elem);
};
var swap = function(elem, options, callback) {
var ret, name, old = {};
for (name in options) {
old[name] = elem.style[name];
elem.style[name] = options[name];
}
ret = callback.call(elem);
for (name in options) {
elem.style[name] = old[name];
}
return ret;
};
var rboxStyle = new RegExp(cssExpand.join("|"), "i");
(function() {
function computeStyleTests() {
if (!div) {
return;
}
container.style.cssText = "position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0";
div.style.cssText = "position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%";
documentElement.appendChild(container).appendChild(div);
var divStyle = window2.getComputedStyle(div);
pixelPositionVal = divStyle.top !== "1%";
reliableMarginLeftVal = roundPixelMeasures(divStyle.marginLeft) === 12;
div.style.right = "60%";
pixelBoxStylesVal = roundPixelMeasures(divStyle.right) === 36;
boxSizingReliableVal = roundPixelMeasures(divStyle.width) === 36;
div.style.position = "absolute";
scrollboxSizeVal = roundPixelMeasures(div.offsetWidth / 3) === 12;
documentElement.removeChild(container);
div = null;
}
function roundPixelMeasures(measure) {
return Math.round(parseFloat(measure));
}
var pixelPositionVal, boxSizingReliableVal, scrollboxSizeVal, pixelBoxStylesVal, reliableTrDimensionsVal, reliableMarginLeftVal, container = document2.createElement("div"), div = document2.createElement("div");
if (!div.style) {
return;
}
div.style.backgroundClip = "content-box";
div.cloneNode(true).style.backgroundClip = "";
support.clearCloneStyle = div.style.backgroundClip === "content-box";
jQuery.extend(support, {
boxSizingReliable: function() {
computeStyleTests();
return boxSizingReliableVal;
},
pixelBoxStyles: function() {
computeStyleTests();
return pixelBoxStylesVal;
},
pixelPosition: function() {
computeStyleTests();
return pixelPositionVal;
},
reliableMarginLeft: function() {
computeStyleTests();
return reliableMarginLeftVal;
},
scrollboxSize: function() {
computeStyleTests();
return scrollboxSizeVal;
},
// Support: IE 9 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Behavior in IE 9 is more subtle than in newer versions & it passes
// some versions of this test; make sure not to make it pass there!
//
// Support: Firefox 70+
// Only Firefox includes border widths
// in computed dimensions. (gh-4529)
reliableTrDimensions: function() {
var table, tr, trChild, trStyle;
if (reliableTrDimensionsVal == null) {
table = document2.createElement("table");
tr = document2.createElement("tr");
trChild = document2.createElement("div");
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
tr.style.cssText = "box-sizing:content-box;border:1px solid";
tr.style.height = "1px";
trChild.style.height = "9px";
trChild.style.display = "block";
documentElement.appendChild(table).appendChild(tr).appendChild(trChild);
trStyle = window2.getComputedStyle(tr);
reliableTrDimensionsVal = parseInt(trStyle.height, 10) + parseInt(trStyle.borderTopWidth, 10) + parseInt(trStyle.borderBottomWidth, 10) === tr.offsetHeight;
documentElement.removeChild(table);
}
return reliableTrDimensionsVal;
}
});
})();
function curCSS(elem, name, computed) {
var width, minWidth, maxWidth, ret, isCustomProp = rcustomProp.test(name), style = elem.style;
computed = computed || getStyles(elem);
if (computed) {
ret = computed.getPropertyValue(name) || computed[name];
if (isCustomProp && ret) {
ret = ret.replace(rtrimCSS, "$1") || void 0;
}
if (ret === "" && !isAttached(elem)) {
ret = jQuery.style(elem, name);
}
if (!support.pixelBoxStyles() && rnumnonpx.test(ret) && rboxStyle.test(name)) {
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
style.minWidth = style.maxWidth = style.width = ret;
ret = computed.width;
style.width = width;
style.minWidth = minWidth;
style.maxWidth = maxWidth;
}
}
return ret !== void 0 ? (
// Support: IE <=9 - 11 only
// IE returns zIndex value as an integer.
ret + ""
) : ret;
}
function addGetHookIf(conditionFn, hookFn) {
return {
get: function() {
if (conditionFn()) {
delete this.get;
return;
}
return (this.get = hookFn).apply(this, arguments);
}
};
}
var cssPrefixes = ["Webkit", "Moz", "ms"], emptyStyle = document2.createElement("div").style, vendorProps = {};
function vendorPropName(name) {
var capName = name[0].toUpperCase() + name.slice(1), i = cssPrefixes.length;
while (i--) {
name = cssPrefixes[i] + capName;
if (name in emptyStyle) {
return name;
}
}
}
function finalPropName(name) {
var final = jQuery.cssProps[name] || vendorProps[name];
if (final) {
return final;
}
if (name in emptyStyle) {
return name;
}
return vendorProps[name] = vendorPropName(name) || name;
}
var rdisplayswap = /^(none|table(?!-c[ea]).+)/, cssShow = { position: "absolute", visibility: "hidden", display: "block" }, cssNormalTransform = {
letterSpacing: "0",
fontWeight: "400"
};
function setPositiveNumber(_elem, value, subtract2) {
var matches = rcssNum.exec(value);
return matches ? (
// Guard against undefined "subtract", e.g., when used as in cssHooks
Math.max(0, matches[2] - (subtract2 || 0)) + (matches[3] || "px")
) : value;
}
function boxModelAdjustment(elem, dimension, box, isBorderBox, styles, computedVal) {
var i = dimension === "width" ? 1 : 0, extra = 0, delta = 0, marginDelta = 0;
if (box === (isBorderBox ? "border" : "content")) {
return 0;
}
for (; i < 4; i += 2) {
if (box === "margin") {
marginDelta += jQuery.css(elem, box + cssExpand[i], true, styles);
}
if (!isBorderBox) {
delta += jQuery.css(elem, "padding" + cssExpand[i], true, styles);
if (box !== "padding") {
delta += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
} else {
extra += jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
} else {
if (box === "content") {
delta -= jQuery.css(elem, "padding" + cssExpand[i], true, styles);
}
if (box !== "margin") {
delta -= jQuery.css(elem, "border" + cssExpand[i] + "Width", true, styles);
}
}
}
if (!isBorderBox && computedVal >= 0) {
delta += Math.max(0, Math.ceil(
elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - computedVal - delta - extra - 0.5
// If offsetWidth/offsetHeight is unknown, then we can't determine content-box scroll gutter
// Use an explicit zero to avoid NaN (gh-3964)
)) || 0;
}
return delta + marginDelta;
}
function getWidthOrHeight(elem, dimension, extra) {
var styles = getStyles(elem), boxSizingNeeded = !support.boxSizingReliable() || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", valueIsBorderBox = isBorderBox, val = curCSS(elem, dimension, styles), offsetProp = "offset" + dimension[0].toUpperCase() + dimension.slice(1);
if (rnumnonpx.test(val)) {
if (!extra) {
return val;
}
val = "auto";
}
if ((!support.boxSizingReliable() && isBorderBox || // Support: IE 10 - 11+, Edge 15 - 18+
// IE/Edge misreport `getComputedStyle` of table rows with width/height
// set in CSS while `offset*` properties report correct values.
// Interestingly, in some cases IE 9 doesn't suffer from this issue.
!support.reliableTrDimensions() && nodeName(elem, "tr") || // Fall back to offsetWidth/offsetHeight when value is "auto"
// This happens for inline elements with no explicit setting (gh-3571)
val === "auto" || // Support: Android <=4.1 - 4.3 only
// Also use offsetWidth/offsetHeight for misreported inline dimensions (gh-3602)
!parseFloat(val) && jQuery.css(elem, "display", false, styles) === "inline") && // Make sure the element is visible & connected
elem.getClientRects().length) {
isBorderBox = jQuery.css(elem, "boxSizing", false, styles) === "border-box";
valueIsBorderBox = offsetProp in elem;
if (valueIsBorderBox) {
val = elem[offsetProp];
}
}
val = parseFloat(val) || 0;
return val + boxModelAdjustment(
elem,
dimension,
extra || (isBorderBox ? "border" : "content"),
valueIsBorderBox,
styles,
// Provide the current computed size to request scroll gutter calculation (gh-3589)
val
) + "px";
}
jQuery.extend({
// Add in style property hooks for overriding the default
// behavior of getting and setting a style property
cssHooks: {
opacity: {
get: function(elem, computed) {
if (computed) {
var ret = curCSS(elem, "opacity");
return ret === "" ? "1" : ret;
}
}
}
},
// Don't automatically add "px" to these possibly-unitless properties
cssNumber: {
animationIterationCount: true,
aspectRatio: true,
borderImageSlice: true,
columnCount: true,
flexGrow: true,
flexShrink: true,
fontWeight: true,
gridArea: true,
gridColumn: true,
gridColumnEnd: true,
gridColumnStart: true,
gridRow: true,
gridRowEnd: true,
gridRowStart: true,
lineHeight: true,
opacity: true,
order: true,
orphans: true,
scale: true,
widows: true,
zIndex: true,
zoom: true,
// SVG-related
fillOpacity: true,
floodOpacity: true,
stopOpacity: true,
strokeMiterlimit: true,
strokeOpacity: true
},
// Add in properties whose names you wish to fix before
// setting or getting the value
cssProps: {},
// Get and set the style property on a DOM Node
style: function(elem, name, value, extra) {
if (!elem || elem.nodeType === 3 || elem.nodeType === 8 || !elem.style) {
return;
}
var ret, type, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name), style = elem.style;
if (!isCustomProp) {
name = finalPropName(origName);
}
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (value !== void 0) {
type = typeof value;
if (type === "string" && (ret = rcssNum.exec(value)) && ret[1]) {
value = adjustCSS(elem, name, ret);
type = "number";
}
if (value == null || value !== value) {
return;
}
if (type === "number" && !isCustomProp) {
value += ret && ret[3] || (jQuery.cssNumber[origName] ? "" : "px");
}
if (!support.clearCloneStyle && value === "" && name.indexOf("background") === 0) {
style[name] = "inherit";
}
if (!hooks || !("set" in hooks) || (value = hooks.set(elem, value, extra)) !== void 0) {
if (isCustomProp) {
style.setProperty(name, value);
} else {
style[name] = value;
}
}
} else {
if (hooks && "get" in hooks && (ret = hooks.get(elem, false, extra)) !== void 0) {
return ret;
}
return style[name];
}
},
css: function(elem, name, extra, styles) {
var val, num, hooks, origName = camelCase(name), isCustomProp = rcustomProp.test(name);
if (!isCustomProp) {
name = finalPropName(origName);
}
hooks = jQuery.cssHooks[name] || jQuery.cssHooks[origName];
if (hooks && "get" in hooks) {
val = hooks.get(elem, true, extra);
}
if (val === void 0) {
val = curCSS(elem, name, styles);
}
if (val === "normal" && name in cssNormalTransform) {
val = cssNormalTransform[name];
}
if (extra === "" || extra) {
num = parseFloat(val);
return extra === true || isFinite(num) ? num || 0 : val;
}
return val;
}
});
jQuery.each(["height", "width"], function(_i, dimension) {
jQuery.cssHooks[dimension] = {
get: function(elem, computed, extra) {
if (computed) {
return rdisplayswap.test(jQuery.css(elem, "display")) && // Support: Safari 8+
// Table columns in Safari have non-zero offsetWidth & zero
// getBoundingClientRect().width unless display is changed.
// Support: IE <=11 only
// Running getBoundingClientRect on a disconnected node
// in IE throws an error.
(!elem.getClientRects().length || !elem.getBoundingClientRect().width) ? swap(elem, cssShow, function() {
return getWidthOrHeight(elem, dimension, extra);
}) : getWidthOrHeight(elem, dimension, extra);
}
},
set: function(elem, value, extra) {
var matches, styles = getStyles(elem), scrollboxSizeBuggy = !support.scrollboxSize() && styles.position === "absolute", boxSizingNeeded = scrollboxSizeBuggy || extra, isBorderBox = boxSizingNeeded && jQuery.css(elem, "boxSizing", false, styles) === "border-box", subtract2 = extra ? boxModelAdjustment(
elem,
dimension,
extra,
isBorderBox,
styles
) : 0;
if (isBorderBox && scrollboxSizeBuggy) {
subtract2 -= Math.ceil(
elem["offset" + dimension[0].toUpperCase() + dimension.slice(1)] - parseFloat(styles[dimension]) - boxModelAdjustment(elem, dimension, "border", false, styles) - 0.5
);
}
if (subtract2 && (matches = rcssNum.exec(value)) && (matches[3] || "px") !== "px") {
elem.style[dimension] = value;
value = jQuery.css(elem, dimension);
}
return setPositiveNumber(elem, value, subtract2);
}
};
});
jQuery.cssHooks.marginLeft = addGetHookIf(
support.reliableMarginLeft,
function(elem, computed) {
if (computed) {
return (parseFloat(curCSS(elem, "marginLeft")) || elem.getBoundingClientRect().left - swap(elem, { marginLeft: 0 }, function() {
return elem.getBoundingClientRect().left;
})) + "px";
}
}
);
jQuery.each({
margin: "",
padding: "",
border: "Width"
}, function(prefix2, suffix) {
jQuery.cssHooks[prefix2 + suffix] = {
expand: function(value) {
var i = 0, expanded = {}, parts = typeof value === "string" ? value.split(" ") : [value];
for (; i < 4; i++) {
expanded[prefix2 + cssExpand[i] + suffix] = parts[i] || parts[i - 2] || parts[0];
}
return expanded;
}
};
if (prefix2 !== "margin") {
jQuery.cssHooks[prefix2 + suffix].set = setPositiveNumber;
}
});
jQuery.fn.extend({
css: function(name, value) {
return access(this, function(elem, name2, value2) {
var styles, len, map = {}, i = 0;
if (Array.isArray(name2)) {
styles = getStyles(elem);
len = name2.length;
for (; i < len; i++) {
map[name2[i]] = jQuery.css(elem, name2[i], false, styles);
}
return map;
}
return value2 !== void 0 ? jQuery.style(elem, name2, value2) : jQuery.css(elem, name2);
}, name, value, arguments.length > 1);
}
});
function Tween(elem, options, prop, end, easing) {
return new Tween.prototype.init(elem, options, prop, end, easing);
}
jQuery.Tween = Tween;
Tween.prototype = {
constructor: Tween,
init: function(elem, options, prop, end, easing, unit) {
this.elem = elem;
this.prop = prop;
this.easing = easing || jQuery.easing._default;
this.options = options;
this.start = this.now = this.cur();
this.end = end;
this.unit = unit || (jQuery.cssNumber[prop] ? "" : "px");
},
cur: function() {
var hooks = Tween.propHooks[this.prop];
return hooks && hooks.get ? hooks.get(this) : Tween.propHooks._default.get(this);
},
run: function(percent) {
var eased, hooks = Tween.propHooks[this.prop];
if (this.options.duration) {
this.pos = eased = jQuery.easing[this.easing](
percent,
this.options.duration * percent,
0,
1,
this.options.duration
);
} else {
this.pos = eased = percent;
}
this.now = (this.end - this.start) * eased + this.start;
if (this.options.step) {
this.options.step.call(this.elem, this.now, this);
}
if (hooks && hooks.set) {
hooks.set(this);
} else {
Tween.propHooks._default.set(this);
}
return this;
}
};
Tween.prototype.init.prototype = Tween.prototype;
Tween.propHooks = {
_default: {
get: function(tween) {
var result;
if (tween.elem.nodeType !== 1 || tween.elem[tween.prop] != null && tween.elem.style[tween.prop] == null) {
return tween.elem[tween.prop];
}
result = jQuery.css(tween.elem, tween.prop, "");
return !result || result === "auto" ? 0 : result;
},
set: function(tween) {
if (jQuery.fx.step[tween.prop]) {
jQuery.fx.step[tween.prop](tween);
} else if (tween.elem.nodeType === 1 && (jQuery.cssHooks[tween.prop] || tween.elem.style[finalPropName(tween.prop)] != null)) {
jQuery.style(tween.elem, tween.prop, tween.now + tween.unit);
} else {
tween.elem[tween.prop] = tween.now;
}
}
}
};
Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = {
set: function(tween) {
if (tween.elem.nodeType && tween.elem.parentNode) {
tween.elem[tween.prop] = tween.now;
}
}
};
jQuery.easing = {
linear: function(p) {
return p;
},
swing: function(p) {
return 0.5 - Math.cos(p * Math.PI) / 2;
},
_default: "swing"
};
jQuery.fx = Tween.prototype.init;
jQuery.fx.step = {};
var fxNow, inProgress, rfxtypes = /^(?:toggle|show|hide)$/, rrun = /queueHooks$/;
function schedule() {
if (inProgress) {
if (document2.hidden === false && window2.requestAnimationFrame) {
window2.requestAnimationFrame(schedule);
} else {
window2.setTimeout(schedule, jQuery.fx.interval);
}
jQuery.fx.tick();
}
}
function createFxNow() {
window2.setTimeout(function() {
fxNow = void 0;
});
return fxNow = Date.now();
}
function genFx(type, includeWidth) {
var which, i = 0, attrs = { height: type };
includeWidth = includeWidth ? 1 : 0;
for (; i < 4; i += 2 - includeWidth) {
which = cssExpand[i];
attrs["margin" + which] = attrs["padding" + which] = type;
}
if (includeWidth) {
attrs.opacity = attrs.width = type;
}
return attrs;
}
function createTween(value, prop, animation) {
var tween, collection = (Animation.tweeners[prop] || []).concat(Animation.tweeners["*"]), index = 0, length = collection.length;
for (; index < length; index++) {
if (tween = collection[index].call(animation, prop, value)) {
return tween;
}
}
}
function defaultPrefilter(elem, props, opts) {
var prop, value, toggle, hooks, oldfire, propTween, restoreDisplay, display, isBox = "width" in props || "height" in props, anim = this, orig = {}, style = elem.style, hidden = elem.nodeType && isHiddenWithinTree(elem), dataShow = dataPriv.get(elem, "fxshow");
if (!opts.queue) {
hooks = jQuery._queueHooks(elem, "fx");
if (hooks.unqueued == null) {
hooks.unqueued = 0;
oldfire = hooks.empty.fire;
hooks.empty.fire = function() {
if (!hooks.unqueued) {
oldfire();
}
};
}
hooks.unqueued++;
anim.always(function() {
anim.always(function() {
hooks.unqueued--;
if (!jQuery.queue(elem, "fx").length) {
hooks.empty.fire();
}
});
});
}
for (prop in props) {
value = props[prop];
if (rfxtypes.test(value)) {
delete props[prop];
toggle = toggle || value === "toggle";
if (value === (hidden ? "hide" : "show")) {
if (value === "show" && dataShow && dataShow[prop] !== void 0) {
hidden = true;
} else {
continue;
}
}
orig[prop] = dataShow && dataShow[prop] || jQuery.style(elem, prop);
}
}
propTween = !jQuery.isEmptyObject(props);
if (!propTween && jQuery.isEmptyObject(orig)) {
return;
}
if (isBox && elem.nodeType === 1) {
opts.overflow = [style.overflow, style.overflowX, style.overflowY];
restoreDisplay = dataShow && dataShow.display;
if (restoreDisplay == null) {
restoreDisplay = dataPriv.get(elem, "display");
}
display = jQuery.css(elem, "display");
if (display === "none") {
if (restoreDisplay) {
display = restoreDisplay;
} else {
showHide([elem], true);
restoreDisplay = elem.style.display || restoreDisplay;
display = jQuery.css(elem, "display");
showHide([elem]);
}
}
if (display === "inline" || display === "inline-block" && restoreDisplay != null) {
if (jQuery.css(elem, "float") === "none") {
if (!propTween) {
anim.done(function() {
style.display = restoreDisplay;
});
if (restoreDisplay == null) {
display = style.display;
restoreDisplay = display === "none" ? "" : display;
}
}
style.display = "inline-block";
}
}
}
if (opts.overflow) {
style.overflow = "hidden";
anim.always(function() {
style.overflow = opts.overflow[0];
style.overflowX = opts.overflow[1];
style.overflowY = opts.overflow[2];
});
}
propTween = false;
for (prop in orig) {
if (!propTween) {
if (dataShow) {
if ("hidden" in dataShow) {
hidden = dataShow.hidden;
}
} else {
dataShow = dataPriv.access(elem, "fxshow", { display: restoreDisplay });
}
if (toggle) {
dataShow.hidden = !hidden;
}
if (hidden) {
showHide([elem], true);
}
anim.done(function() {
if (!hidden) {
showHide([elem]);
}
dataPriv.remove(elem, "fxshow");
for (prop in orig) {
jQuery.style(elem, prop, orig[prop]);
}
});
}
propTween = createTween(hidden ? dataShow[prop] : 0, prop, anim);
if (!(prop in dataShow)) {
dataShow[prop] = propTween.start;
if (hidden) {
propTween.end = propTween.start;
propTween.start = 0;
}
}
}
}
function propFilter(props, specialEasing) {
var index, name, easing, value, hooks;
for (index in props) {
name = camelCase(index);
easing = specialEasing[name];
value = props[index];
if (Array.isArray(value)) {
easing = value[1];
value = props[index] = value[0];
}
if (index !== name) {
props[name] = value;
delete props[index];
}
hooks = jQuery.cssHooks[name];
if (hooks && "expand" in hooks) {
value = hooks.expand(value);
delete props[name];
for (index in value) {
if (!(index in props)) {
props[index] = value[index];
specialEasing[index] = easing;
}
}
} else {
specialEasing[name] = easing;
}
}
}
function Animation(elem, properties2, options) {
var result, stopped, index = 0, length = Animation.prefilters.length, deferred = jQuery.Deferred().always(function() {
delete tick.elem;
}), tick = function() {
if (stopped) {
return false;
}
var currentTime = fxNow || createFxNow(), remaining = Math.max(0, animation.startTime + animation.duration - currentTime), temp = remaining / animation.duration || 0, percent = 1 - temp, index2 = 0, length2 = animation.tweens.length;
for (; index2 < length2; index2++) {
animation.tweens[index2].run(percent);
}
deferred.notifyWith(elem, [animation, percent, remaining]);
if (percent < 1 && length2) {
return remaining;
}
if (!length2) {
deferred.notifyWith(elem, [animation, 1, 0]);
}
deferred.resolveWith(elem, [animation]);
return false;
}, animation = deferred.promise({
elem,
props: jQuery.extend({}, properties2),
opts: jQuery.extend(true, {
specialEasing: {},
easing: jQuery.easing._default
}, options),
originalProperties: properties2,
originalOptions: options,
startTime: fxNow || createFxNow(),
duration: options.duration,
tweens: [],
createTween: function(prop, end) {
var tween = jQuery.Tween(
elem,
animation.opts,
prop,
end,
animation.opts.specialEasing[prop] || animation.opts.easing
);
animation.tweens.push(tween);
return tween;
},
stop: function(gotoEnd) {
var index2 = 0, length2 = gotoEnd ? animation.tweens.length : 0;
if (stopped) {
return this;
}
stopped = true;
for (; index2 < length2; index2++) {
animation.tweens[index2].run(1);
}
if (gotoEnd) {
deferred.notifyWith(elem, [animation, 1, 0]);
deferred.resolveWith(elem, [animation, gotoEnd]);
} else {
deferred.rejectWith(elem, [animation, gotoEnd]);
}
return this;
}
}), props = animation.props;
propFilter(props, animation.opts.specialEasing);
for (; index < length; index++) {
result = Animation.prefilters[index].call(animation, elem, props, animation.opts);
if (result) {
if (isFunction(result.stop)) {
jQuery._queueHooks(animation.elem, animation.opts.queue).stop = result.stop.bind(result);
}
return result;
}
}
jQuery.map(props, createTween, animation);
if (isFunction(animation.opts.start)) {
animation.opts.start.call(elem, animation);
}
animation.progress(animation.opts.progress).done(animation.opts.done, animation.opts.complete).fail(animation.opts.fail).always(animation.opts.always);
jQuery.fx.timer(
jQuery.extend(tick, {
elem,
anim: animation,
queue: animation.opts.queue
})
);
return animation;
}
jQuery.Animation = jQuery.extend(Animation, {
tweeners: {
"*": [function(prop, value) {
var tween = this.createTween(prop, value);
adjustCSS(tween.elem, prop, rcssNum.exec(value), tween);
return tween;
}]
},
tweener: function(props, callback) {
if (isFunction(props)) {
callback = props;
props = ["*"];
} else {
props = props.match(rnothtmlwhite);
}
var prop, index = 0, length = props.length;
for (; index < length; index++) {
prop = props[index];
Animation.tweeners[prop] = Animation.tweeners[prop] || [];
Animation.tweeners[prop].unshift(callback);
}
},
prefilters: [defaultPrefilter],
prefilter: function(callback, prepend) {
if (prepend) {
Animation.prefilters.unshift(callback);
} else {
Animation.prefilters.push(callback);
}
}
});
jQuery.speed = function(speed, easing, fn) {
var opt = speed && typeof speed === "object" ? jQuery.extend({}, speed) : {
complete: fn || !fn && easing || isFunction(speed) && speed,
duration: speed,
easing: fn && easing || easing && !isFunction(easing) && easing
};
if (jQuery.fx.off) {
opt.duration = 0;
} else {
if (typeof opt.duration !== "number") {
if (opt.duration in jQuery.fx.speeds) {
opt.duration = jQuery.fx.speeds[opt.duration];
} else {
opt.duration = jQuery.fx.speeds._default;
}
}
}
if (opt.queue == null || opt.queue === true) {
opt.queue = "fx";
}
opt.old = opt.complete;
opt.complete = function() {
if (isFunction(opt.old)) {
opt.old.call(this);
}
if (opt.queue) {
jQuery.dequeue(this, opt.queue);
}
};
return opt;
};
jQuery.fn.extend({
fadeTo: function(speed, to, easing, callback) {
return this.filter(isHiddenWithinTree).css("opacity", 0).show().end().animate({ opacity: to }, speed, easing, callback);
},
animate: function(prop, speed, easing, callback) {
var empty = jQuery.isEmptyObject(prop), optall = jQuery.speed(speed, easing, callback), doAnimation = function() {
var anim = Animation(this, jQuery.extend({}, prop), optall);
if (empty || dataPriv.get(this, "finish")) {
anim.stop(true);
}
};
doAnimation.finish = doAnimation;
return empty || optall.queue === false ? this.each(doAnimation) : this.queue(optall.queue, doAnimation);
},
stop: function(type, clearQueue, gotoEnd) {
var stopQueue = function(hooks) {
var stop = hooks.stop;
delete hooks.stop;
stop(gotoEnd);
};
if (typeof type !== "string") {
gotoEnd = clearQueue;
clearQueue = type;
type = void 0;
}
if (clearQueue) {
this.queue(type || "fx", []);
}
return this.each(function() {
var dequeue = true, index = type != null && type + "queueHooks", timers = jQuery.timers, data = dataPriv.get(this);
if (index) {
if (data[index] && data[index].stop) {
stopQueue(data[index]);
}
} else {
for (index in data) {
if (data[index] && data[index].stop && rrun.test(index)) {
stopQueue(data[index]);
}
}
}
for (index = timers.length; index--; ) {
if (timers[index].elem === this && (type == null || timers[index].queue === type)) {
timers[index].anim.stop(gotoEnd);
dequeue = false;
timers.splice(index, 1);
}
}
if (dequeue || !gotoEnd) {
jQuery.dequeue(this, type);
}
});
},
finish: function(type) {
if (type !== false) {
type = type || "fx";
}
return this.each(function() {
var index, data = dataPriv.get(this), queue = data[type + "queue"], hooks = data[type + "queueHooks"], timers = jQuery.timers, length = queue ? queue.length : 0;
data.finish = true;
jQuery.queue(this, type, []);
if (hooks && hooks.stop) {
hooks.stop.call(this, true);
}
for (index = timers.length; index--; ) {
if (timers[index].elem === this && timers[index].queue === type) {
timers[index].anim.stop(true);
timers.splice(index, 1);
}
}
for (index = 0; index < length; index++) {
if (queue[index] && queue[index].finish) {
queue[index].finish.call(this);
}
}
delete data.finish;
});
}
});
jQuery.each(["toggle", "show", "hide"], function(_i, name) {
var cssFn = jQuery.fn[name];
jQuery.fn[name] = function(speed, easing, callback) {
return speed == null || typeof speed === "boolean" ? cssFn.apply(this, arguments) : this.animate(genFx(name, true), speed, easing, callback);
};
});
jQuery.each({
slideDown: genFx("show"),
slideUp: genFx("hide"),
slideToggle: genFx("toggle"),
fadeIn: { opacity: "show" },
fadeOut: { opacity: "hide" },
fadeToggle: { opacity: "toggle" }
}, function(name, props) {
jQuery.fn[name] = function(speed, easing, callback) {
return this.animate(props, speed, easing, callback);
};
});
jQuery.timers = [];
jQuery.fx.tick = function() {
var timer, i = 0, timers = jQuery.timers;
fxNow = Date.now();
for (; i < timers.length; i++) {
timer = timers[i];
if (!timer() && timers[i] === timer) {
timers.splice(i--, 1);
}
}
if (!timers.length) {
jQuery.fx.stop();
}
fxNow = void 0;
};
jQuery.fx.timer = function(timer) {
jQuery.timers.push(timer);
jQuery.fx.start();
};
jQuery.fx.interval = 13;
jQuery.fx.start = function() {
if (inProgress) {
return;
}
inProgress = true;
schedule();
};
jQuery.fx.stop = function() {
inProgress = null;
};
jQuery.fx.speeds = {
slow: 600,
fast: 200,
// Default speed
_default: 400
};
jQuery.fn.delay = function(time, type) {
time = jQuery.fx ? jQuery.fx.speeds[time] || time : time;
type = type || "fx";
return this.queue(type, function(next, hooks) {
var timeout = window2.setTimeout(next, time);
hooks.stop = function() {
window2.clearTimeout(timeout);
};
});
};
(function() {
var input = document2.createElement("input"), select = document2.createElement("select"), opt = select.appendChild(document2.createElement("option"));
input.type = "checkbox";
support.checkOn = input.value !== "";
support.optSelected = opt.selected;
input = document2.createElement("input");
input.value = "t";
input.type = "radio";
support.radioValue = input.value === "t";
})();
var boolHook, attrHandle = jQuery.expr.attrHandle;
jQuery.fn.extend({
attr: function(name, value) {
return access(this, jQuery.attr, name, value, arguments.length > 1);
},
removeAttr: function(name) {
return this.each(function() {
jQuery.removeAttr(this, name);
});
}
});
jQuery.extend({
attr: function(elem, name, value) {
var ret, hooks, nType = elem.nodeType;
if (nType === 3 || nType === 8 || nType === 2) {
return;
}
if (typeof elem.getAttribute === "undefined") {
return jQuery.prop(elem, name, value);
}
if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
hooks = jQuery.attrHooks[name.toLowerCase()] || (jQuery.expr.match.bool.test(name) ? boolHook : void 0);
}
if (value !== void 0) {
if (value === null) {
jQuery.removeAttr(elem, name);
return;
}
if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
return ret;
}
elem.setAttribute(name, value + "");
return value;
}
if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
return ret;
}
ret = jQuery.find.attr(elem, name);
return ret == null ? void 0 : ret;
},
attrHooks: {
type: {
set: function(elem, value) {
if (!support.radioValue && value === "radio" && nodeName(elem, "input")) {
var val = elem.value;
elem.setAttribute("type", value);
if (val) {
elem.value = val;
}
return value;
}
}
}
},
removeAttr: function(elem, value) {
var name, i = 0, attrNames = value && value.match(rnothtmlwhite);
if (attrNames && elem.nodeType === 1) {
while (name = attrNames[i++]) {
elem.removeAttribute(name);
}
}
}
});
boolHook = {
set: function(elem, value, name) {
if (value === false) {
jQuery.removeAttr(elem, name);
} else {
elem.setAttribute(name, name);
}
return name;
}
};
jQuery.each(jQuery.expr.match.bool.source.match(/\w+/g), function(_i, name) {
var getter = attrHandle[name] || jQuery.find.attr;
attrHandle[name] = function(elem, name2, isXML) {
var ret, handle, lowercaseName = name2.toLowerCase();
if (!isXML) {
handle = attrHandle[lowercaseName];
attrHandle[lowercaseName] = ret;
ret = getter(elem, name2, isXML) != null ? lowercaseName : null;
attrHandle[lowercaseName] = handle;
}
return ret;
};
});
var rfocusable = /^(?:input|select|textarea|button)$/i, rclickable = /^(?:a|area)$/i;
jQuery.fn.extend({
prop: function(name, value) {
return access(this, jQuery.prop, name, value, arguments.length > 1);
},
removeProp: function(name) {
return this.each(function() {
delete this[jQuery.propFix[name] || name];
});
}
});
jQuery.extend({
prop: function(elem, name, value) {
var ret, hooks, nType = elem.nodeType;
if (nType === 3 || nType === 8 || nType === 2) {
return;
}
if (nType !== 1 || !jQuery.isXMLDoc(elem)) {
name = jQuery.propFix[name] || name;
hooks = jQuery.propHooks[name];
}
if (value !== void 0) {
if (hooks && "set" in hooks && (ret = hooks.set(elem, value, name)) !== void 0) {
return ret;
}
return elem[name] = value;
}
if (hooks && "get" in hooks && (ret = hooks.get(elem, name)) !== null) {
return ret;
}
return elem[name];
},
propHooks: {
tabIndex: {
get: function(elem) {
var tabindex = jQuery.find.attr(elem, "tabindex");
if (tabindex) {
return parseInt(tabindex, 10);
}
if (rfocusable.test(elem.nodeName) || rclickable.test(elem.nodeName) && elem.href) {
return 0;
}
return -1;
}
}
},
propFix: {
"for": "htmlFor",
"class": "className"
}
});
if (!support.optSelected) {
jQuery.propHooks.selected = {
get: function(elem) {
var parent = elem.parentNode;
if (parent && parent.parentNode) {
parent.parentNode.selectedIndex;
}
return null;
},
set: function(elem) {
var parent = elem.parentNode;
if (parent) {
parent.selectedIndex;
if (parent.parentNode) {
parent.parentNode.selectedIndex;
}
}
}
};
}
jQuery.each([
"tabIndex",
"readOnly",
"maxLength",
"cellSpacing",
"cellPadding",
"rowSpan",
"colSpan",
"useMap",
"frameBorder",
"contentEditable"
], function() {
jQuery.propFix[this.toLowerCase()] = this;
});
function stripAndCollapse(value) {
var tokens = value.match(rnothtmlwhite) || [];
return tokens.join(" ");
}
function getClass(elem) {
return elem.getAttribute && elem.getAttribute("class") || "";
}
function classesToArray(value) {
if (Array.isArray(value)) {
return value;
}
if (typeof value === "string") {
return value.match(rnothtmlwhite) || [];
}
return [];
}
jQuery.fn.extend({
addClass: function(value) {
var classNames, cur, curValue, className, i, finalValue;
if (isFunction(value)) {
return this.each(function(j) {
jQuery(this).addClass(value.call(this, j, getClass(this)));
});
}
classNames = classesToArray(value);
if (classNames.length) {
return this.each(function() {
curValue = getClass(this);
cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
if (cur) {
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
if (cur.indexOf(" " + className + " ") < 0) {
cur += className + " ";
}
}
finalValue = stripAndCollapse(cur);
if (curValue !== finalValue) {
this.setAttribute("class", finalValue);
}
}
});
}
return this;
},
removeClass: function(value) {
var classNames, cur, curValue, className, i, finalValue;
if (isFunction(value)) {
return this.each(function(j) {
jQuery(this).removeClass(value.call(this, j, getClass(this)));
});
}
if (!arguments.length) {
return this.attr("class", "");
}
classNames = classesToArray(value);
if (classNames.length) {
return this.each(function() {
curValue = getClass(this);
cur = this.nodeType === 1 && " " + stripAndCollapse(curValue) + " ";
if (cur) {
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
while (cur.indexOf(" " + className + " ") > -1) {
cur = cur.replace(" " + className + " ", " ");
}
}
finalValue = stripAndCollapse(cur);
if (curValue !== finalValue) {
this.setAttribute("class", finalValue);
}
}
});
}
return this;
},
toggleClass: function(value, stateVal) {
var classNames, className, i, self2, type = typeof value, isValidValue = type === "string" || Array.isArray(value);
if (isFunction(value)) {
return this.each(function(i2) {
jQuery(this).toggleClass(
value.call(this, i2, getClass(this), stateVal),
stateVal
);
});
}
if (typeof stateVal === "boolean" && isValidValue) {
return stateVal ? this.addClass(value) : this.removeClass(value);
}
classNames = classesToArray(value);
return this.each(function() {
if (isValidValue) {
self2 = jQuery(this);
for (i = 0; i < classNames.length; i++) {
className = classNames[i];
if (self2.hasClass(className)) {
self2.removeClass(className);
} else {
self2.addClass(className);
}
}
} else if (value === void 0 || type === "boolean") {
className = getClass(this);
if (className) {
dataPriv.set(this, "__className__", className);
}
if (this.setAttribute) {
this.setAttribute(
"class",
className || value === false ? "" : dataPriv.get(this, "__className__") || ""
);
}
}
});
},
hasClass: function(selector) {
var className, elem, i = 0;
className = " " + selector + " ";
while (elem = this[i++]) {
if (elem.nodeType === 1 && (" " + stripAndCollapse(getClass(elem)) + " ").indexOf(className) > -1) {
return true;
}
}
return false;
}
});
var rreturn = /\r/g;
jQuery.fn.extend({
val: function(value) {
var hooks, ret, valueIsFunction, elem = this[0];
if (!arguments.length) {
if (elem) {
hooks = jQuery.valHooks[elem.type] || jQuery.valHooks[elem.nodeName.toLowerCase()];
if (hooks && "get" in hooks && (ret = hooks.get(elem, "value")) !== void 0) {
return ret;
}
ret = elem.value;
if (typeof ret === "string") {
return ret.replace(rreturn, "");
}
return ret == null ? "" : ret;
}
return;
}
valueIsFunction = isFunction(value);
return this.each(function(i) {
var val;
if (this.nodeType !== 1) {
return;
}
if (valueIsFunction) {
val = value.call(this, i, jQuery(this).val());
} else {
val = value;
}
if (val == null) {
val = "";
} else if (typeof val === "number") {
val += "";
} else if (Array.isArray(val)) {
val = jQuery.map(val, function(value2) {
return value2 == null ? "" : value2 + "";
});
}
hooks = jQuery.valHooks[this.type] || jQuery.valHooks[this.nodeName.toLowerCase()];
if (!hooks || !("set" in hooks) || hooks.set(this, val, "value") === void 0) {
this.value = val;
}
});
}
});
jQuery.extend({
valHooks: {
option: {
get: function(elem) {
var val = jQuery.find.attr(elem, "value");
return val != null ? val : (
// Support: IE <=10 - 11 only
// option.text throws exceptions (trac-14686, trac-14858)
// Strip and collapse whitespace
// https://html.spec.whatwg.org/#strip-and-collapse-whitespace
stripAndCollapse(jQuery.text(elem))
);
}
},
select: {
get: function(elem) {
var value, option, i, options = elem.options, index = elem.selectedIndex, one = elem.type === "select-one", values = one ? null : [], max = one ? index + 1 : options.length;
if (index < 0) {
i = max;
} else {
i = one ? index : 0;
}
for (; i < max; i++) {
option = options[i];
if ((option.selected || i === index) && // Don't return options that are disabled or in a disabled optgroup
!option.disabled && (!option.parentNode.disabled || !nodeName(option.parentNode, "optgroup"))) {
value = jQuery(option).val();
if (one) {
return value;
}
values.push(value);
}
}
return values;
},
set: function(elem, value) {
var optionSet, option, options = elem.options, values = jQuery.makeArray(value), i = options.length;
while (i--) {
option = options[i];
if (option.selected = jQuery.inArray(jQuery.valHooks.option.get(option), values) > -1) {
optionSet = true;
}
}
if (!optionSet) {
elem.selectedIndex = -1;
}
return values;
}
}
}
});
jQuery.each(["radio", "checkbox"], function() {
jQuery.valHooks[this] = {
set: function(elem, value) {
if (Array.isArray(value)) {
return elem.checked = jQuery.inArray(jQuery(elem).val(), value) > -1;
}
}
};
if (!support.checkOn) {
jQuery.valHooks[this].get = function(elem) {
return elem.getAttribute("value") === null ? "on" : elem.value;
};
}
});
var location = window2.location;
var nonce = { guid: Date.now() };
var rquery = /\?/;
jQuery.parseXML = function(data) {
var xml, parserErrorElem;
if (!data || typeof data !== "string") {
return null;
}
try {
xml = new window2.DOMParser().parseFromString(data, "text/xml");
} catch (e) {
}
parserErrorElem = xml && xml.getElementsByTagName("parsererror")[0];
if (!xml || parserErrorElem) {
jQuery.error("Invalid XML: " + (parserErrorElem ? jQuery.map(parserErrorElem.childNodes, function(el) {
return el.textContent;
}).join("\n") : data));
}
return xml;
};
var rfocusMorph = /^(?:focusinfocus|focusoutblur)$/, stopPropagationCallback = function(e) {
e.stopPropagation();
};
jQuery.extend(jQuery.event, {
trigger: function(event, data, elem, onlyHandlers) {
var i, cur, tmp, bubbleType, ontype, handle, special, lastElement, eventPath = [elem || document2], type = hasOwn.call(event, "type") ? event.type : event, namespaces = hasOwn.call(event, "namespace") ? event.namespace.split(".") : [];
cur = lastElement = tmp = elem = elem || document2;
if (elem.nodeType === 3 || elem.nodeType === 8) {
return;
}
if (rfocusMorph.test(type + jQuery.event.triggered)) {
return;
}
if (type.indexOf(".") > -1) {
namespaces = type.split(".");
type = namespaces.shift();
namespaces.sort();
}
ontype = type.indexOf(":") < 0 && "on" + type;
event = event[jQuery.expando] ? event : new jQuery.Event(type, typeof event === "object" && event);
event.isTrigger = onlyHandlers ? 2 : 3;
event.namespace = namespaces.join(".");
event.rnamespace = event.namespace ? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)") : null;
event.result = void 0;
if (!event.target) {
event.target = elem;
}
data = data == null ? [event] : jQuery.makeArray(data, [event]);
special = jQuery.event.special[type] || {};
if (!onlyHandlers && special.trigger && special.trigger.apply(elem, data) === false) {
return;
}
if (!onlyHandlers && !special.noBubble && !isWindow2(elem)) {
bubbleType = special.delegateType || type;
if (!rfocusMorph.test(bubbleType + type)) {
cur = cur.parentNode;
}
for (; cur; cur = cur.parentNode) {
eventPath.push(cur);
tmp = cur;
}
if (tmp === (elem.ownerDocument || document2)) {
eventPath.push(tmp.defaultView || tmp.parentWindow || window2);
}
}
i = 0;
while ((cur = eventPath[i++]) && !event.isPropagationStopped()) {
lastElement = cur;
event.type = i > 1 ? bubbleType : special.bindType || type;
handle = (dataPriv.get(cur, "events") || /* @__PURE__ */ Object.create(null))[event.type] && dataPriv.get(cur, "handle");
if (handle) {
handle.apply(cur, data);
}
handle = ontype && cur[ontype];
if (handle && handle.apply && acceptData(cur)) {
event.result = handle.apply(cur, data);
if (event.result === false) {
event.preventDefault();
}
}
}
event.type = type;
if (!onlyHandlers && !event.isDefaultPrevented()) {
if ((!special._default || special._default.apply(eventPath.pop(), data) === false) && acceptData(elem)) {
if (ontype && isFunction(elem[type]) && !isWindow2(elem)) {
tmp = elem[ontype];
if (tmp) {
elem[ontype] = null;
}
jQuery.event.triggered = type;
if (event.isPropagationStopped()) {
lastElement.addEventListener(type, stopPropagationCallback);
}
elem[type]();
if (event.isPropagationStopped()) {
lastElement.removeEventListener(type, stopPropagationCallback);
}
jQuery.event.triggered = void 0;
if (tmp) {
elem[ontype] = tmp;
}
}
}
}
return event.result;
},
// Piggyback on a donor event to simulate a different one
// Used only for `focus(in | out)` events
simulate: function(type, elem, event) {
var e = jQuery.extend(
new jQuery.Event(),
event,
{
type,
isSimulated: true
}
);
jQuery.event.trigger(e, null, elem);
}
});
jQuery.fn.extend({
trigger: function(type, data) {
return this.each(function() {
jQuery.event.trigger(type, data, this);
});
},
triggerHandler: function(type, data) {
var elem = this[0];
if (elem) {
return jQuery.event.trigger(type, data, elem, true);
}
}
});
var rbracket = /\[\]$/, rCRLF = /\r?\n/g, rsubmitterTypes = /^(?:submit|button|image|reset|file)$/i, rsubmittable = /^(?:input|select|textarea|keygen)/i;
function buildParams(prefix2, obj, traditional, add2) {
var name;
if (Array.isArray(obj)) {
jQuery.each(obj, function(i, v) {
if (traditional || rbracket.test(prefix2)) {
add2(prefix2, v);
} else {
buildParams(
prefix2 + "[" + (typeof v === "object" && v != null ? i : "") + "]",
v,
traditional,
add2
);
}
});
} else if (!traditional && toType(obj) === "object") {
for (name in obj) {
buildParams(prefix2 + "[" + name + "]", obj[name], traditional, add2);
}
} else {
add2(prefix2, obj);
}
}
jQuery.param = function(a, traditional) {
var prefix2, s2 = [], add2 = function(key2, valueOrFunction) {
var value = isFunction(valueOrFunction) ? valueOrFunction() : valueOrFunction;
s2[s2.length] = encodeURIComponent(key2) + "=" + encodeURIComponent(value == null ? "" : value);
};
if (a == null) {
return "";
}
if (Array.isArray(a) || a.jquery && !jQuery.isPlainObject(a)) {
jQuery.each(a, function() {
add2(this.name, this.value);
});
} else {
for (prefix2 in a) {
buildParams(prefix2, a[prefix2], traditional, add2);
}
}
return s2.join("&");
};
jQuery.fn.extend({
serialize: function() {
return jQuery.param(this.serializeArray());
},
serializeArray: function() {
return this.map(function() {
var elements = jQuery.prop(this, "elements");
return elements ? jQuery.makeArray(elements) : this;
}).filter(function() {
var type = this.type;
return this.name && !jQuery(this).is(":disabled") && rsubmittable.test(this.nodeName) && !rsubmitterTypes.test(type) && (this.checked || !rcheckableType.test(type));
}).map(function(_i, elem) {
var val = jQuery(this).val();
if (val == null) {
return null;
}
if (Array.isArray(val)) {
return jQuery.map(val, function(val2) {
return { name: elem.name, value: val2.replace(rCRLF, "\r\n") };
});
}
return { name: elem.name, value: val.replace(rCRLF, "\r\n") };
}).get();
}
});
var r20 = /%20/g, rhash = /#.*$/, rantiCache = /([?&])_=[^&]*/, rheaders = /^(.*?):[ \t]*([^\r\n]*)$/mg, rlocalProtocol = /^(?:about|app|app-storage|.+-extension|file|res|widget):$/, rnoContent = /^(?:GET|HEAD)$/, rprotocol = /^\/\//, prefilters = {}, transports = {}, allTypes = "*/".concat("*"), originAnchor = document2.createElement("a");
originAnchor.href = location.href;
function addToPrefiltersOrTransports(structure) {
return function(dataTypeExpression, func) {
if (typeof dataTypeExpression !== "string") {
func = dataTypeExpression;
dataTypeExpression = "*";
}
var dataType, i = 0, dataTypes = dataTypeExpression.toLowerCase().match(rnothtmlwhite) || [];
if (isFunction(func)) {
while (dataType = dataTypes[i++]) {
if (dataType[0] === "+") {
dataType = dataType.slice(1) || "*";
(structure[dataType] = structure[dataType] || []).unshift(func);
} else {
(structure[dataType] = structure[dataType] || []).push(func);
}
}
}
};
}
function inspectPrefiltersOrTransports(structure, options, originalOptions, jqXHR) {
var inspected = {}, seekingTransport = structure === transports;
function inspect(dataType) {
var selected;
inspected[dataType] = true;
jQuery.each(structure[dataType] || [], function(_18, prefilterOrFactory) {
var dataTypeOrTransport = prefilterOrFactory(options, originalOptions, jqXHR);
if (typeof dataTypeOrTransport === "string" && !seekingTransport && !inspected[dataTypeOrTransport]) {
options.dataTypes.unshift(dataTypeOrTransport);
inspect(dataTypeOrTransport);
return false;
} else if (seekingTransport) {
return !(selected = dataTypeOrTransport);
}
});
return selected;
}
return inspect(options.dataTypes[0]) || !inspected["*"] && inspect("*");
}
function ajaxExtend(target, src) {
var key2, deep, flatOptions = jQuery.ajaxSettings.flatOptions || {};
for (key2 in src) {
if (src[key2] !== void 0) {
(flatOptions[key2] ? target : deep || (deep = {}))[key2] = src[key2];
}
}
if (deep) {
jQuery.extend(true, target, deep);
}
return target;
}
function ajaxHandleResponses(s2, jqXHR, responses) {
var ct, type, finalDataType, firstDataType, contents = s2.contents, dataTypes = s2.dataTypes;
while (dataTypes[0] === "*") {
dataTypes.shift();
if (ct === void 0) {
ct = s2.mimeType || jqXHR.getResponseHeader("Content-Type");
}
}
if (ct) {
for (type in contents) {
if (contents[type] && contents[type].test(ct)) {
dataTypes.unshift(type);
break;
}
}
}
if (dataTypes[0] in responses) {
finalDataType = dataTypes[0];
} else {
for (type in responses) {
if (!dataTypes[0] || s2.converters[type + " " + dataTypes[0]]) {
finalDataType = type;
break;
}
if (!firstDataType) {
firstDataType = type;
}
}
finalDataType = finalDataType || firstDataType;
}
if (finalDataType) {
if (finalDataType !== dataTypes[0]) {
dataTypes.unshift(finalDataType);
}
return responses[finalDataType];
}
}
function ajaxConvert(s2, response, jqXHR, isSuccess) {
var conv2, current2, conv, tmp, prev, converters = {}, dataTypes = s2.dataTypes.slice();
if (dataTypes[1]) {
for (conv in s2.converters) {
converters[conv.toLowerCase()] = s2.converters[conv];
}
}
current2 = dataTypes.shift();
while (current2) {
if (s2.responseFields[current2]) {
jqXHR[s2.responseFields[current2]] = response;
}
if (!prev && isSuccess && s2.dataFilter) {
response = s2.dataFilter(response, s2.dataType);
}
prev = current2;
current2 = dataTypes.shift();
if (current2) {
if (current2 === "*") {
current2 = prev;
} else if (prev !== "*" && prev !== current2) {
conv = converters[prev + " " + current2] || converters["* " + current2];
if (!conv) {
for (conv2 in converters) {
tmp = conv2.split(" ");
if (tmp[1] === current2) {
conv = converters[prev + " " + tmp[0]] || converters["* " + tmp[0]];
if (conv) {
if (conv === true) {
conv = converters[conv2];
} else if (converters[conv2] !== true) {
current2 = tmp[0];
dataTypes.unshift(tmp[1]);
}
break;
}
}
}
}
if (conv !== true) {
if (conv && s2.throws) {
response = conv(response);
} else {
try {
response = conv(response);
} catch (e) {
return {
state: "parsererror",
error: conv ? e : "No conversion from " + prev + " to " + current2
};
}
}
}
}
}
}
return { state: "success", data: response };
}
jQuery.extend({
// Counter for holding the number of active queries
active: 0,
// Last-Modified header cache for next request
lastModified: {},
etag: {},
ajaxSettings: {
url: location.href,
type: "GET",
isLocal: rlocalProtocol.test(location.protocol),
global: true,
processData: true,
async: true,
contentType: "application/x-www-form-urlencoded; charset=UTF-8",
/*
timeout: 0,
data: null,
dataType: null,
username: null,
password: null,
cache: null,
throws: false,
traditional: false,
headers: {},
*/
accepts: {
"*": allTypes,
text: "text/plain",
html: "text/html",
xml: "application/xml, text/xml",
json: "application/json, text/javascript"
},
contents: {
xml: /\bxml\b/,
html: /\bhtml/,
json: /\bjson\b/
},
responseFields: {
xml: "responseXML",
text: "responseText",
json: "responseJSON"
},
// Data converters
// Keys separate source (or catchall "*") and destination types with a single space
converters: {
// Convert anything to text
"* text": String,
// Text to html (true = no transformation)
"text html": true,
// Evaluate text as a json expression
"text json": JSON.parse,
// Parse text as xml
"text xml": jQuery.parseXML
},
// For options that shouldn't be deep extended:
// you can add your own custom options here if
// and when you create one that shouldn't be
// deep extended (see ajaxExtend)
flatOptions: {
url: true,
context: true
}
},
// Creates a full fledged settings object into target
// with both ajaxSettings and settings fields.
// If target is omitted, writes into ajaxSettings.
ajaxSetup: function(target, settings) {
return settings ? (
// Building a settings object
ajaxExtend(ajaxExtend(target, jQuery.ajaxSettings), settings)
) : (
// Extending ajaxSettings
ajaxExtend(jQuery.ajaxSettings, target)
);
},
ajaxPrefilter: addToPrefiltersOrTransports(prefilters),
ajaxTransport: addToPrefiltersOrTransports(transports),
// Main method
ajax: function(url, options) {
if (typeof url === "object") {
options = url;
url = void 0;
}
options = options || {};
var transport, cacheURL, responseHeadersString, responseHeaders, timeoutTimer, urlAnchor, completed3, fireGlobals, i, uncached, s2 = jQuery.ajaxSetup({}, options), callbackContext = s2.context || s2, globalEventContext = s2.context && (callbackContext.nodeType || callbackContext.jquery) ? jQuery(callbackContext) : jQuery.event, deferred = jQuery.Deferred(), completeDeferred = jQuery.Callbacks("once memory"), statusCode = s2.statusCode || {}, requestHeaders = {}, requestHeadersNames = {}, strAbort = "canceled", jqXHR = {
readyState: 0,
// Builds headers hashtable if needed
getResponseHeader: function(key2) {
var match2;
if (completed3) {
if (!responseHeaders) {
responseHeaders = {};
while (match2 = rheaders.exec(responseHeadersString)) {
responseHeaders[match2[1].toLowerCase() + " "] = (responseHeaders[match2[1].toLowerCase() + " "] || []).concat(match2[2]);
}
}
match2 = responseHeaders[key2.toLowerCase() + " "];
}
return match2 == null ? null : match2.join(", ");
},
// Raw string
getAllResponseHeaders: function() {
return completed3 ? responseHeadersString : null;
},
// Caches the header
setRequestHeader: function(name, value) {
if (completed3 == null) {
name = requestHeadersNames[name.toLowerCase()] = requestHeadersNames[name.toLowerCase()] || name;
requestHeaders[name] = value;
}
return this;
},
// Overrides response content-type header
overrideMimeType: function(type) {
if (completed3 == null) {
s2.mimeType = type;
}
return this;
},
// Status-dependent callbacks
statusCode: function(map) {
var code;
if (map) {
if (completed3) {
jqXHR.always(map[jqXHR.status]);
} else {
for (code in map) {
statusCode[code] = [statusCode[code], map[code]];
}
}
}
return this;
},
// Cancel the request
abort: function(statusText) {
var finalText = statusText || strAbort;
if (transport) {
transport.abort(finalText);
}
done(0, finalText);
return this;
}
};
deferred.promise(jqXHR);
s2.url = ((url || s2.url || location.href) + "").replace(rprotocol, location.protocol + "//");
s2.type = options.method || options.type || s2.method || s2.type;
s2.dataTypes = (s2.dataType || "*").toLowerCase().match(rnothtmlwhite) || [""];
if (s2.crossDomain == null) {
urlAnchor = document2.createElement("a");
try {
urlAnchor.href = s2.url;
urlAnchor.href = urlAnchor.href;
s2.crossDomain = originAnchor.protocol + "//" + originAnchor.host !== urlAnchor.protocol + "//" + urlAnchor.host;
} catch (e) {
s2.crossDomain = true;
}
}
if (s2.data && s2.processData && typeof s2.data !== "string") {
s2.data = jQuery.param(s2.data, s2.traditional);
}
inspectPrefiltersOrTransports(prefilters, s2, options, jqXHR);
if (completed3) {
return jqXHR;
}
fireGlobals = jQuery.event && s2.global;
if (fireGlobals && jQuery.active++ === 0) {
jQuery.event.trigger("ajaxStart");
}
s2.type = s2.type.toUpperCase();
s2.hasContent = !rnoContent.test(s2.type);
cacheURL = s2.url.replace(rhash, "");
if (!s2.hasContent) {
uncached = s2.url.slice(cacheURL.length);
if (s2.data && (s2.processData || typeof s2.data === "string")) {
cacheURL += (rquery.test(cacheURL) ? "&" : "?") + s2.data;
delete s2.data;
}
if (s2.cache === false) {
cacheURL = cacheURL.replace(rantiCache, "$1");
uncached = (rquery.test(cacheURL) ? "&" : "?") + "_=" + nonce.guid++ + uncached;
}
s2.url = cacheURL + uncached;
} else if (s2.data && s2.processData && (s2.contentType || "").indexOf("application/x-www-form-urlencoded") === 0) {
s2.data = s2.data.replace(r20, "+");
}
if (s2.ifModified) {
if (jQuery.lastModified[cacheURL]) {
jqXHR.setRequestHeader("If-Modified-Since", jQuery.lastModified[cacheURL]);
}
if (jQuery.etag[cacheURL]) {
jqXHR.setRequestHeader("If-None-Match", jQuery.etag[cacheURL]);
}
}
if (s2.data && s2.hasContent && s2.contentType !== false || options.contentType) {
jqXHR.setRequestHeader("Content-Type", s2.contentType);
}
jqXHR.setRequestHeader(
"Accept",
s2.dataTypes[0] && s2.accepts[s2.dataTypes[0]] ? s2.accepts[s2.dataTypes[0]] + (s2.dataTypes[0] !== "*" ? ", " + allTypes + "; q=0.01" : "") : s2.accepts["*"]
);
for (i in s2.headers) {
jqXHR.setRequestHeader(i, s2.headers[i]);
}
if (s2.beforeSend && (s2.beforeSend.call(callbackContext, jqXHR, s2) === false || completed3)) {
return jqXHR.abort();
}
strAbort = "abort";
completeDeferred.add(s2.complete);
jqXHR.done(s2.success);
jqXHR.fail(s2.error);
transport = inspectPrefiltersOrTransports(transports, s2, options, jqXHR);
if (!transport) {
done(-1, "No Transport");
} else {
jqXHR.readyState = 1;
if (fireGlobals) {
globalEventContext.trigger("ajaxSend", [jqXHR, s2]);
}
if (completed3) {
return jqXHR;
}
if (s2.async && s2.timeout > 0) {
timeoutTimer = window2.setTimeout(function() {
jqXHR.abort("timeout");
}, s2.timeout);
}
try {
completed3 = false;
transport.send(requestHeaders, done);
} catch (e) {
if (completed3) {
throw e;
}
done(-1, e);
}
}
function done(status, nativeStatusText, responses, headers) {
var isSuccess, success, error, response, modified, statusText = nativeStatusText;
if (completed3) {
return;
}
completed3 = true;
if (timeoutTimer) {
window2.clearTimeout(timeoutTimer);
}
transport = void 0;
responseHeadersString = headers || "";
jqXHR.readyState = status > 0 ? 4 : 0;
isSuccess = status >= 200 && status < 300 || status === 304;
if (responses) {
response = ajaxHandleResponses(s2, jqXHR, responses);
}
if (!isSuccess && jQuery.inArray("script", s2.dataTypes) > -1 && jQuery.inArray("json", s2.dataTypes) < 0) {
s2.converters["text script"] = function() {
};
}
response = ajaxConvert(s2, response, jqXHR, isSuccess);
if (isSuccess) {
if (s2.ifModified) {
modified = jqXHR.getResponseHeader("Last-Modified");
if (modified) {
jQuery.lastModified[cacheURL] = modified;
}
modified = jqXHR.getResponseHeader("etag");
if (modified) {
jQuery.etag[cacheURL] = modified;
}
}
if (status === 204 || s2.type === "HEAD") {
statusText = "nocontent";
} else if (status === 304) {
statusText = "notmodified";
} else {
statusText = response.state;
success = response.data;
error = response.error;
isSuccess = !error;
}
} else {
error = statusText;
if (status || !statusText) {
statusText = "error";
if (status < 0) {
status = 0;
}
}
}
jqXHR.status = status;
jqXHR.statusText = (nativeStatusText || statusText) + "";
if (isSuccess) {
deferred.resolveWith(callbackContext, [success, statusText, jqXHR]);
} else {
deferred.rejectWith(callbackContext, [jqXHR, statusText, error]);
}
jqXHR.statusCode(statusCode);
statusCode = void 0;
if (fireGlobals) {
globalEventContext.trigger(
isSuccess ? "ajaxSuccess" : "ajaxError",
[jqXHR, s2, isSuccess ? success : error]
);
}
completeDeferred.fireWith(callbackContext, [jqXHR, statusText]);
if (fireGlobals) {
globalEventContext.trigger("ajaxComplete", [jqXHR, s2]);
if (!--jQuery.active) {
jQuery.event.trigger("ajaxStop");
}
}
}
return jqXHR;
},
getJSON: function(url, data, callback) {
return jQuery.get(url, data, callback, "json");
},
getScript: function(url, callback) {
return jQuery.get(url, void 0, callback, "script");
}
});
jQuery.each(["get", "post"], function(_i, method) {
jQuery[method] = function(url, data, callback, type) {
if (isFunction(data)) {
type = type || callback;
callback = data;
data = void 0;
}
return jQuery.ajax(jQuery.extend({
url,
type: method,
dataType: type,
data,
success: callback
}, jQuery.isPlainObject(url) && url));
};
});
jQuery.ajaxPrefilter(function(s2) {
var i;
for (i in s2.headers) {
if (i.toLowerCase() === "content-type") {
s2.contentType = s2.headers[i] || "";
}
}
});
jQuery._evalUrl = function(url, options, doc) {
return jQuery.ajax({
url,
// Make this explicit, since user can override this through ajaxSetup (trac-11264)
type: "GET",
dataType: "script",
cache: true,
async: false,
global: false,
// Only evaluate the response if it is successful (gh-4126)
// dataFilter is not invoked for failure responses, so using it instead
// of the default converter is kludgy but it works.
converters: {
"text script": function() {
}
},
dataFilter: function(response) {
jQuery.globalEval(response, options, doc);
}
});
};
jQuery.fn.extend({
wrapAll: function(html) {
var wrap;
if (this[0]) {
if (isFunction(html)) {
html = html.call(this[0]);
}
wrap = jQuery(html, this[0].ownerDocument).eq(0).clone(true);
if (this[0].parentNode) {
wrap.insertBefore(this[0]);
}
wrap.map(function() {
var elem = this;
while (elem.firstElementChild) {
elem = elem.firstElementChild;
}
return elem;
}).append(this);
}
return this;
},
wrapInner: function(html) {
if (isFunction(html)) {
return this.each(function(i) {
jQuery(this).wrapInner(html.call(this, i));
});
}
return this.each(function() {
var self2 = jQuery(this), contents = self2.contents();
if (contents.length) {
contents.wrapAll(html);
} else {
self2.append(html);
}
});
},
wrap: function(html) {
var htmlIsFunction = isFunction(html);
return this.each(function(i) {
jQuery(this).wrapAll(htmlIsFunction ? html.call(this, i) : html);
});
},
unwrap: function(selector) {
this.parent(selector).not("body").each(function() {
jQuery(this).replaceWith(this.childNodes);
});
return this;
}
});
jQuery.expr.pseudos.hidden = function(elem) {
return !jQuery.expr.pseudos.visible(elem);
};
jQuery.expr.pseudos.visible = function(elem) {
return !!(elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length);
};
jQuery.ajaxSettings.xhr = function() {
try {
return new window2.XMLHttpRequest();
} catch (e) {
}
};
var xhrSuccessStatus = {
// File protocol always yields status code 0, assume 200
0: 200,
// Support: IE <=9 only
// trac-1450: sometimes IE returns 1223 when it should be 204
1223: 204
}, xhrSupported = jQuery.ajaxSettings.xhr();
support.cors = !!xhrSupported && "withCredentials" in xhrSupported;
support.ajax = xhrSupported = !!xhrSupported;
jQuery.ajaxTransport(function(options) {
var callback, errorCallback;
if (support.cors || xhrSupported && !options.crossDomain) {
return {
send: function(headers, complete) {
var i, xhr = options.xhr();
xhr.open(
options.type,
options.url,
options.async,
options.username,
options.password
);
if (options.xhrFields) {
for (i in options.xhrFields) {
xhr[i] = options.xhrFields[i];
}
}
if (options.mimeType && xhr.overrideMimeType) {
xhr.overrideMimeType(options.mimeType);
}
if (!options.crossDomain && !headers["X-Requested-With"]) {
headers["X-Requested-With"] = "XMLHttpRequest";
}
for (i in headers) {
xhr.setRequestHeader(i, headers[i]);
}
callback = function(type) {
return function() {
if (callback) {
callback = errorCallback = xhr.onload = xhr.onerror = xhr.onabort = xhr.ontimeout = xhr.onreadystatechange = null;
if (type === "abort") {
xhr.abort();
} else if (type === "error") {
if (typeof xhr.status !== "number") {
complete(0, "error");
} else {
complete(
// File: protocol always yields status 0; see trac-8605, trac-14207
xhr.status,
xhr.statusText
);
}
} else {
complete(
xhrSuccessStatus[xhr.status] || xhr.status,
xhr.statusText,
// Support: IE <=9 only
// IE9 has no XHR2 but throws on binary (trac-11426)
// For XHR2 non-text, let the caller handle it (gh-2498)
(xhr.responseType || "text") !== "text" || typeof xhr.responseText !== "string" ? { binary: xhr.response } : { text: xhr.responseText },
xhr.getAllResponseHeaders()
);
}
}
};
};
xhr.onload = callback();
errorCallback = xhr.onerror = xhr.ontimeout = callback("error");
if (xhr.onabort !== void 0) {
xhr.onabort = errorCallback;
} else {
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
window2.setTimeout(function() {
if (callback) {
errorCallback();
}
});
}
};
}
callback = callback("abort");
try {
xhr.send(options.hasContent && options.data || null);
} catch (e) {
if (callback) {
throw e;
}
}
},
abort: function() {
if (callback) {
callback();
}
}
};
}
});
jQuery.ajaxPrefilter(function(s2) {
if (s2.crossDomain) {
s2.contents.script = false;
}
});
jQuery.ajaxSetup({
accepts: {
script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
},
contents: {
script: /\b(?:java|ecma)script\b/
},
converters: {
"text script": function(text) {
jQuery.globalEval(text);
return text;
}
}
});
jQuery.ajaxPrefilter("script", function(s2) {
if (s2.cache === void 0) {
s2.cache = false;
}
if (s2.crossDomain) {
s2.type = "GET";
}
});
jQuery.ajaxTransport("script", function(s2) {
if (s2.crossDomain || s2.scriptAttrs) {
var script, callback;
return {
send: function(_18, complete) {
script = jQuery("<script>").attr(s2.scriptAttrs || {}).prop({ charset: s2.scriptCharset, src: s2.url }).on("load error", callback = function(evt) {
script.remove();
callback = null;
if (evt) {
complete(evt.type === "error" ? 404 : 200, evt.type);
}
});
document2.head.appendChild(script[0]);
},
abort: function() {
if (callback) {
callback();
}
}
};
}
});
var oldCallbacks = [], rjsonp = /(=)\?(?=&|$)|\?\?/;
jQuery.ajaxSetup({
jsonp: "callback",
jsonpCallback: function() {
var callback = oldCallbacks.pop() || jQuery.expando + "_" + nonce.guid++;
this[callback] = true;
return callback;
}
});
jQuery.ajaxPrefilter("json jsonp", function(s2, originalSettings, jqXHR) {
var callbackName, overwritten, responseContainer, jsonProp = s2.jsonp !== false && (rjsonp.test(s2.url) ? "url" : typeof s2.data === "string" && (s2.contentType || "").indexOf("application/x-www-form-urlencoded") === 0 && rjsonp.test(s2.data) && "data");
if (jsonProp || s2.dataTypes[0] === "jsonp") {
callbackName = s2.jsonpCallback = isFunction(s2.jsonpCallback) ? s2.jsonpCallback() : s2.jsonpCallback;
if (jsonProp) {
s2[jsonProp] = s2[jsonProp].replace(rjsonp, "$1" + callbackName);
} else if (s2.jsonp !== false) {
s2.url += (rquery.test(s2.url) ? "&" : "?") + s2.jsonp + "=" + callbackName;
}
s2.converters["script json"] = function() {
if (!responseContainer) {
jQuery.error(callbackName + " was not called");
}
return responseContainer[0];
};
s2.dataTypes[0] = "json";
overwritten = window2[callbackName];
window2[callbackName] = function() {
responseContainer = arguments;
};
jqXHR.always(function() {
if (overwritten === void 0) {
jQuery(window2).removeProp(callbackName);
} else {
window2[callbackName] = overwritten;
}
if (s2[callbackName]) {
s2.jsonpCallback = originalSettings.jsonpCallback;
oldCallbacks.push(callbackName);
}
if (responseContainer && isFunction(overwritten)) {
overwritten(responseContainer[0]);
}
responseContainer = overwritten = void 0;
});
return "script";
}
});
support.createHTMLDocument = function() {
var body = document2.implementation.createHTMLDocument("").body;
body.innerHTML = "<form></form><form></form>";
return body.childNodes.length === 2;
}();
jQuery.parseHTML = function(data, context, keepScripts) {
if (typeof data !== "string") {
return [];
}
if (typeof context === "boolean") {
keepScripts = context;
context = false;
}
var base, parsed, scripts;
if (!context) {
if (support.createHTMLDocument) {
context = document2.implementation.createHTMLDocument("");
base = context.createElement("base");
base.href = document2.location.href;
context.head.appendChild(base);
} else {
context = document2;
}
}
parsed = rsingleTag.exec(data);
scripts = !keepScripts && [];
if (parsed) {
return [context.createElement(parsed[1])];
}
parsed = buildFragment([data], context, scripts);
if (scripts && scripts.length) {
jQuery(scripts).remove();
}
return jQuery.merge([], parsed.childNodes);
};
jQuery.fn.load = function(url, params, callback) {
var selector, type, response, self2 = this, off = url.indexOf(" ");
if (off > -1) {
selector = stripAndCollapse(url.slice(off));
url = url.slice(0, off);
}
if (isFunction(params)) {
callback = params;
params = void 0;
} else if (params && typeof params === "object") {
type = "POST";
}
if (self2.length > 0) {
jQuery.ajax({
url,
// If "type" variable is undefined, then "GET" method will be used.
// Make value of this field explicit since
// user can override it through ajaxSetup method
type: type || "GET",
dataType: "html",
data: params
}).done(function(responseText) {
response = arguments;
self2.html(selector ? (
// If a selector was specified, locate the right elements in a dummy div
// Exclude scripts to avoid IE 'Permission Denied' errors
jQuery("<div>").append(jQuery.parseHTML(responseText)).find(selector)
) : (
// Otherwise use the full result
responseText
));
}).always(callback && function(jqXHR, status) {
self2.each(function() {
callback.apply(this, response || [jqXHR.responseText, status, jqXHR]);
});
});
}
return this;
};
jQuery.expr.pseudos.animated = function(elem) {
return jQuery.grep(jQuery.timers, function(fn) {
return elem === fn.elem;
}).length;
};
jQuery.offset = {
setOffset: function(elem, options, i) {
var curPosition, curLeft, curCSSTop, curTop, curOffset, curCSSLeft, calculatePosition, position = jQuery.css(elem, "position"), curElem = jQuery(elem), props = {};
if (position === "static") {
elem.style.position = "relative";
}
curOffset = curElem.offset();
curCSSTop = jQuery.css(elem, "top");
curCSSLeft = jQuery.css(elem, "left");
calculatePosition = (position === "absolute" || position === "fixed") && (curCSSTop + curCSSLeft).indexOf("auto") > -1;
if (calculatePosition) {
curPosition = curElem.position();
curTop = curPosition.top;
curLeft = curPosition.left;
} else {
curTop = parseFloat(curCSSTop) || 0;
curLeft = parseFloat(curCSSLeft) || 0;
}
if (isFunction(options)) {
options = options.call(elem, i, jQuery.extend({}, curOffset));
}
if (options.top != null) {
props.top = options.top - curOffset.top + curTop;
}
if (options.left != null) {
props.left = options.left - curOffset.left + curLeft;
}
if ("using" in options) {
options.using.call(elem, props);
} else {
curElem.css(props);
}
}
};
jQuery.fn.extend({
// offset() relates an element's border box to the document origin
offset: function(options) {
if (arguments.length) {
return options === void 0 ? this : this.each(function(i) {
jQuery.offset.setOffset(this, options, i);
});
}
var rect, win, elem = this[0];
if (!elem) {
return;
}
if (!elem.getClientRects().length) {
return { top: 0, left: 0 };
}
rect = elem.getBoundingClientRect();
win = elem.ownerDocument.defaultView;
return {
top: rect.top + win.pageYOffset,
left: rect.left + win.pageXOffset
};
},
// position() relates an element's margin box to its offset parent's padding box
// This corresponds to the behavior of CSS absolute positioning
position: function() {
if (!this[0]) {
return;
}
var offsetParent, offset2, doc, elem = this[0], parentOffset = { top: 0, left: 0 };
if (jQuery.css(elem, "position") === "fixed") {
offset2 = elem.getBoundingClientRect();
} else {
offset2 = this.offset();
doc = elem.ownerDocument;
offsetParent = elem.offsetParent || doc.documentElement;
while (offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && jQuery.css(offsetParent, "position") === "static") {
offsetParent = offsetParent.parentNode;
}
if (offsetParent && offsetParent !== elem && offsetParent.nodeType === 1) {
parentOffset = jQuery(offsetParent).offset();
parentOffset.top += jQuery.css(offsetParent, "borderTopWidth", true);
parentOffset.left += jQuery.css(offsetParent, "borderLeftWidth", true);
}
}
return {
top: offset2.top - parentOffset.top - jQuery.css(elem, "marginTop", true),
left: offset2.left - parentOffset.left - jQuery.css(elem, "marginLeft", true)
};
},
// This method will return documentElement in the following cases:
// 1) For the element inside the iframe without offsetParent, this method will return
// documentElement of the parent window
// 2) For the hidden or detached element
// 3) For body or html element, i.e. in case of the html node - it will return itself
//
// but those exceptions were never presented as a real life use-cases
// and might be considered as more preferable results.
//
// This logic, however, is not guaranteed and can change at any point in the future
offsetParent: function() {
return this.map(function() {
var offsetParent = this.offsetParent;
while (offsetParent && jQuery.css(offsetParent, "position") === "static") {
offsetParent = offsetParent.offsetParent;
}
return offsetParent || documentElement;
});
}
});
jQuery.each({ scrollLeft: "pageXOffset", scrollTop: "pageYOffset" }, function(method, prop) {
var top = "pageYOffset" === prop;
jQuery.fn[method] = function(val) {
return access(this, function(elem, method2, val2) {
var win;
if (isWindow2(elem)) {
win = elem;
} else if (elem.nodeType === 9) {
win = elem.defaultView;
}
if (val2 === void 0) {
return win ? win[prop] : elem[method2];
}
if (win) {
win.scrollTo(
!top ? val2 : win.pageXOffset,
top ? val2 : win.pageYOffset
);
} else {
elem[method2] = val2;
}
}, method, val, arguments.length);
};
});
jQuery.each(["top", "left"], function(_i, prop) {
jQuery.cssHooks[prop] = addGetHookIf(
support.pixelPosition,
function(elem, computed) {
if (computed) {
computed = curCSS(elem, prop);
return rnumnonpx.test(computed) ? jQuery(elem).position()[prop] + "px" : computed;
}
}
);
});
jQuery.each({ Height: "height", Width: "width" }, function(name, type) {
jQuery.each({
padding: "inner" + name,
content: type,
"": "outer" + name
}, function(defaultExtra, funcName) {
jQuery.fn[funcName] = function(margin, value) {
var chainable = arguments.length && (defaultExtra || typeof margin !== "boolean"), extra = defaultExtra || (margin === true || value === true ? "margin" : "border");
return access(this, function(elem, type2, value2) {
var doc;
if (isWindow2(elem)) {
return funcName.indexOf("outer") === 0 ? elem["inner" + name] : elem.document.documentElement["client" + name];
}
if (elem.nodeType === 9) {
doc = elem.documentElement;
return Math.max(
elem.body["scroll" + name],
doc["scroll" + name],
elem.body["offset" + name],
doc["offset" + name],
doc["client" + name]
);
}
return value2 === void 0 ? (
// Get width or height on the element, requesting but not forcing parseFloat
jQuery.css(elem, type2, extra)
) : (
// Set width or height on the element
jQuery.style(elem, type2, value2, extra)
);
}, type, chainable ? margin : void 0, chainable);
};
});
});
jQuery.each([
"ajaxStart",
"ajaxStop",
"ajaxComplete",
"ajaxError",
"ajaxSuccess",
"ajaxSend"
], function(_i, type) {
jQuery.fn[type] = function(fn) {
return this.on(type, fn);
};
});
jQuery.fn.extend({
bind: function(types, data, fn) {
return this.on(types, null, data, fn);
},
unbind: function(types, fn) {
return this.off(types, null, fn);
},
delegate: function(selector, types, data, fn) {
return this.on(types, selector, data, fn);
},
undelegate: function(selector, types, fn) {
return arguments.length === 1 ? this.off(selector, "**") : this.off(types, selector || "**", fn);
},
hover: function(fnOver, fnOut) {
return this.on("mouseenter", fnOver).on("mouseleave", fnOut || fnOver);
}
});
jQuery.each(
"blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),
function(_i, name) {
jQuery.fn[name] = function(data, fn) {
return arguments.length > 0 ? this.on(name, null, data, fn) : this.trigger(name);
};
}
);
var rtrim = /^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;
jQuery.proxy = function(fn, context) {
var tmp, args, proxy;
if (typeof context === "string") {
tmp = fn[context];
context = fn;
fn = tmp;
}
if (!isFunction(fn)) {
return void 0;
}
args = slice.call(arguments, 2);
proxy = function() {
return fn.apply(context || this, args.concat(slice.call(arguments)));
};
proxy.guid = fn.guid = fn.guid || jQuery.guid++;
return proxy;
};
jQuery.holdReady = function(hold) {
if (hold) {
jQuery.readyWait++;
} else {
jQuery.ready(true);
}
};
jQuery.isArray = Array.isArray;
jQuery.parseJSON = JSON.parse;
jQuery.nodeName = nodeName;
jQuery.isFunction = isFunction;
jQuery.isWindow = isWindow2;
jQuery.camelCase = camelCase;
jQuery.type = toType;
jQuery.now = Date.now;
jQuery.isNumeric = function(obj) {
var type = jQuery.type(obj);
return (type === "number" || type === "string") && // parseFloat NaNs numeric-cast false positives ("")
// ...but misinterprets leading-number strings, particularly hex literals ("0x...")
// subtraction forces infinities to NaN
!isNaN(obj - parseFloat(obj));
};
jQuery.trim = function(text) {
return text == null ? "" : (text + "").replace(rtrim, "$1");
};
if (typeof define === "function" && define.amd) {
define("jquery", [], function() {
return jQuery;
});
}
var _jQuery = window2.jQuery, _$ = window2.$;
jQuery.noConflict = function(deep) {
if (window2.$ === jQuery) {
window2.$ = _$;
}
if (deep && window2.jQuery === jQuery) {
window2.jQuery = _jQuery;
}
return jQuery;
};
if (typeof noGlobal === "undefined") {
window2.jQuery = window2.$ = jQuery;
}
return jQuery;
});
}
});
// node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js
var require_use_sync_external_store_shim_development = __commonJS({
"node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js"(exports) {
"use strict";
(function() {
function is2(x, y) {
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
}
function useSyncExternalStore$2(subscribe, getSnapshot) {
didWarnOld18Alpha || void 0 === React4.startTransition || (didWarnOld18Alpha = true, console.error(
"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
));
var value = getSnapshot();
if (!didWarnUncachedGetSnapshot) {
var cachedValue = getSnapshot();
objectIs(value, cachedValue) || (console.error(
"The result of getSnapshot should be cached to avoid an infinite loop"
), didWarnUncachedGetSnapshot = true);
}
cachedValue = useState10({
inst: { value, getSnapshot }
});
var inst = cachedValue[0].inst, forceUpdate = cachedValue[1];
useLayoutEffect3(
function() {
inst.value = value;
inst.getSnapshot = getSnapshot;
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
},
[subscribe, value, getSnapshot]
);
useEffect14(
function() {
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
return subscribe(function() {
checkIfSnapshotChanged(inst) && forceUpdate({ inst });
});
},
[subscribe]
);
useDebugValue2(value);
return value;
}
function checkIfSnapshotChanged(inst) {
var latestGetSnapshot = inst.getSnapshot;
inst = inst.value;
try {
var nextValue = latestGetSnapshot();
return !objectIs(inst, nextValue);
} catch (error) {
return true;
}
}
function useSyncExternalStore$1(subscribe, getSnapshot) {
return getSnapshot();
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React4 = require_react(), objectIs = "function" === typeof Object.is ? Object.is : is2, useState10 = React4.useState, useEffect14 = React4.useEffect, useLayoutEffect3 = React4.useLayoutEffect, useDebugValue2 = React4.useDebugValue, didWarnOld18Alpha = false, didWarnUncachedGetSnapshot = false, shim = "undefined" === typeof window || "undefined" === typeof window.document || "undefined" === typeof window.document.createElement ? useSyncExternalStore$1 : useSyncExternalStore$2;
exports.useSyncExternalStore = void 0 !== React4.useSyncExternalStore ? React4.useSyncExternalStore : shim;
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
}
});
// node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js
var require_shim = __commonJS({
"node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/shim/index.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_use_sync_external_store_shim_development();
}
}
});
// node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js
var require_with_selector_development = __commonJS({
"node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js"(exports) {
"use strict";
(function() {
function is2(x, y) {
return x === y && (0 !== x || 1 / x === 1 / y) || x !== x && y !== y;
}
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
var React4 = require_react(), shim = require_shim(), objectIs = "function" === typeof Object.is ? Object.is : is2, useSyncExternalStore = shim.useSyncExternalStore, useRef13 = React4.useRef, useEffect14 = React4.useEffect, useMemo5 = React4.useMemo, useDebugValue2 = React4.useDebugValue;
exports.useSyncExternalStoreWithSelector = function(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {
var instRef = useRef13(null);
if (null === instRef.current) {
var inst = { hasValue: false, value: null };
instRef.current = inst;
} else
inst = instRef.current;
instRef = useMemo5(
function() {
function memoizedSelector(nextSnapshot) {
if (!hasMemo) {
hasMemo = true;
memoizedSnapshot = nextSnapshot;
nextSnapshot = selector(nextSnapshot);
if (void 0 !== isEqual && inst.hasValue) {
var currentSelection = inst.value;
if (isEqual(currentSelection, nextSnapshot))
return memoizedSelection = currentSelection;
}
return memoizedSelection = nextSnapshot;
}
currentSelection = memoizedSelection;
if (objectIs(memoizedSnapshot, nextSnapshot))
return currentSelection;
var nextSelection = selector(nextSnapshot);
if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))
return memoizedSnapshot = nextSnapshot, currentSelection;
memoizedSnapshot = nextSnapshot;
return memoizedSelection = nextSelection;
}
var hasMemo = false, memoizedSnapshot, memoizedSelection, maybeGetServerSnapshot = void 0 === getServerSnapshot ? null : getServerSnapshot;
return [
function() {
return memoizedSelector(getSnapshot());
},
null === maybeGetServerSnapshot ? void 0 : function() {
return memoizedSelector(maybeGetServerSnapshot());
}
];
},
[getSnapshot, getServerSnapshot, selector, isEqual]
);
var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);
useEffect14(
function() {
inst.hasValue = true;
inst.value = value;
},
[value]
);
useDebugValue2(value);
return value;
};
"undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
})();
}
});
// node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js
var require_with_selector = __commonJS({
"node_modules/.pnpm/use-sync-external-store@1.5.0_react@18.3.1/node_modules/use-sync-external-store/shim/with-selector.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_with_selector_development();
}
}
});
// node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js
var require_moment = __commonJS({
"node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js"(exports, module2) {
(function(global2, factory) {
typeof exports === "object" && typeof module2 !== "undefined" ? module2.exports = factory() : typeof define === "function" && define.amd ? define(factory) : global2.moment = factory();
})(exports, function() {
"use strict";
var hookCallback;
function hooks() {
return hookCallback.apply(null, arguments);
}
function setHookCallback(callback) {
hookCallback = callback;
}
function isArray(input) {
return input instanceof Array || Object.prototype.toString.call(input) === "[object Array]";
}
function isObject(input) {
return input != null && Object.prototype.toString.call(input) === "[object Object]";
}
function hasOwnProp(a, b) {
return Object.prototype.hasOwnProperty.call(a, b);
}
function isObjectEmpty(obj) {
if (Object.getOwnPropertyNames) {
return Object.getOwnPropertyNames(obj).length === 0;
} else {
var k;
for (k in obj) {
if (hasOwnProp(obj, k)) {
return false;
}
}
return true;
}
}
function isUndefined2(input) {
return input === void 0;
}
function isNumber2(input) {
return typeof input === "number" || Object.prototype.toString.call(input) === "[object Number]";
}
function isDate2(input) {
return input instanceof Date || Object.prototype.toString.call(input) === "[object Date]";
}
function map(arr, fn) {
var res = [], i, arrLen = arr.length;
for (i = 0; i < arrLen; ++i) {
res.push(fn(arr[i], i));
}
return res;
}
function extend(a, b) {
for (var i in b) {
if (hasOwnProp(b, i)) {
a[i] = b[i];
}
}
if (hasOwnProp(b, "toString")) {
a.toString = b.toString;
}
if (hasOwnProp(b, "valueOf")) {
a.valueOf = b.valueOf;
}
return a;
}
function createUTC(input, format2, locale2, strict) {
return createLocalOrUTC(input, format2, locale2, strict, true).utc();
}
function defaultParsingFlags() {
return {
empty: false,
unusedTokens: [],
unusedInput: [],
overflow: -2,
charsLeftOver: 0,
nullInput: false,
invalidEra: null,
invalidMonth: null,
invalidFormat: false,
userInvalidated: false,
iso: false,
parsedDateParts: [],
era: null,
meridiem: null,
rfc2822: false,
weekdayMismatch: false
};
}
function getParsingFlags(m) {
if (m._pf == null) {
m._pf = defaultParsingFlags();
}
return m._pf;
}
var some;
if (Array.prototype.some) {
some = Array.prototype.some;
} else {
some = function(fun) {
var t = Object(this), len = t.length >>> 0, i;
for (i = 0; i < len; i++) {
if (i in t && fun.call(this, t[i], i, t)) {
return true;
}
}
return false;
};
}
function isValid(m) {
var flags = null, parsedParts = false, isNowValid = m._d && !isNaN(m._d.getTime());
if (isNowValid) {
flags = getParsingFlags(m);
parsedParts = some.call(flags.parsedDateParts, function(i) {
return i != null;
});
isNowValid = flags.overflow < 0 && !flags.empty && !flags.invalidEra && !flags.invalidMonth && !flags.invalidWeekday && !flags.weekdayMismatch && !flags.nullInput && !flags.invalidFormat && !flags.userInvalidated && (!flags.meridiem || flags.meridiem && parsedParts);
if (m._strict) {
isNowValid = isNowValid && flags.charsLeftOver === 0 && flags.unusedTokens.length === 0 && flags.bigHour === void 0;
}
}
if (Object.isFrozen == null || !Object.isFrozen(m)) {
m._isValid = isNowValid;
} else {
return isNowValid;
}
return m._isValid;
}
function createInvalid(flags) {
var m = createUTC(NaN);
if (flags != null) {
extend(getParsingFlags(m), flags);
} else {
getParsingFlags(m).userInvalidated = true;
}
return m;
}
var momentProperties = hooks.momentProperties = [], updateInProgress = false;
function copyConfig(to2, from2) {
var i, prop, val, momentPropertiesLen = momentProperties.length;
if (!isUndefined2(from2._isAMomentObject)) {
to2._isAMomentObject = from2._isAMomentObject;
}
if (!isUndefined2(from2._i)) {
to2._i = from2._i;
}
if (!isUndefined2(from2._f)) {
to2._f = from2._f;
}
if (!isUndefined2(from2._l)) {
to2._l = from2._l;
}
if (!isUndefined2(from2._strict)) {
to2._strict = from2._strict;
}
if (!isUndefined2(from2._tzm)) {
to2._tzm = from2._tzm;
}
if (!isUndefined2(from2._isUTC)) {
to2._isUTC = from2._isUTC;
}
if (!isUndefined2(from2._offset)) {
to2._offset = from2._offset;
}
if (!isUndefined2(from2._pf)) {
to2._pf = getParsingFlags(from2);
}
if (!isUndefined2(from2._locale)) {
to2._locale = from2._locale;
}
if (momentPropertiesLen > 0) {
for (i = 0; i < momentPropertiesLen; i++) {
prop = momentProperties[i];
val = from2[prop];
if (!isUndefined2(val)) {
to2[prop] = val;
}
}
}
return to2;
}
function Moment(config) {
copyConfig(this, config);
this._d = new Date(config._d != null ? config._d.getTime() : NaN);
if (!this.isValid()) {
this._d = /* @__PURE__ */ new Date(NaN);
}
if (updateInProgress === false) {
updateInProgress = true;
hooks.updateOffset(this);
updateInProgress = false;
}
}
function isMoment(obj) {
return obj instanceof Moment || obj != null && obj._isAMomentObject != null;
}
function warn(msg) {
if (hooks.suppressDeprecationWarnings === false && typeof console !== "undefined" && console.warn) {
console.warn("Deprecation warning: " + msg);
}
}
function deprecate(msg, fn) {
var firstTime = true;
return extend(function() {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(null, msg);
}
if (firstTime) {
var args = [], arg, i, key2, argLen = arguments.length;
for (i = 0; i < argLen; i++) {
arg = "";
if (typeof arguments[i] === "object") {
arg += "\n[" + i + "] ";
for (key2 in arguments[0]) {
if (hasOwnProp(arguments[0], key2)) {
arg += key2 + ": " + arguments[0][key2] + ", ";
}
}
arg = arg.slice(0, -2);
} else {
arg = arguments[i];
}
args.push(arg);
}
warn(
msg + "\nArguments: " + Array.prototype.slice.call(args).join("") + "\n" + new Error().stack
);
firstTime = false;
}
return fn.apply(this, arguments);
}, fn);
}
var deprecations = {};
function deprecateSimple(name, msg) {
if (hooks.deprecationHandler != null) {
hooks.deprecationHandler(name, msg);
}
if (!deprecations[name]) {
warn(msg);
deprecations[name] = true;
}
}
hooks.suppressDeprecationWarnings = false;
hooks.deprecationHandler = null;
function isFunction(input) {
return typeof Function !== "undefined" && input instanceof Function || Object.prototype.toString.call(input) === "[object Function]";
}
function set2(config) {
var prop, i;
for (i in config) {
if (hasOwnProp(config, i)) {
prop = config[i];
if (isFunction(prop)) {
this[i] = prop;
} else {
this["_" + i] = prop;
}
}
}
this._config = config;
this._dayOfMonthOrdinalParseLenient = new RegExp(
(this._dayOfMonthOrdinalParse.source || this._ordinalParse.source) + "|" + /\d{1,2}/.source
);
}
function mergeConfigs(parentConfig, childConfig) {
var res = extend({}, parentConfig), prop;
for (prop in childConfig) {
if (hasOwnProp(childConfig, prop)) {
if (isObject(parentConfig[prop]) && isObject(childConfig[prop])) {
res[prop] = {};
extend(res[prop], parentConfig[prop]);
extend(res[prop], childConfig[prop]);
} else if (childConfig[prop] != null) {
res[prop] = childConfig[prop];
} else {
delete res[prop];
}
}
}
for (prop in parentConfig) {
if (hasOwnProp(parentConfig, prop) && !hasOwnProp(childConfig, prop) && isObject(parentConfig[prop])) {
res[prop] = extend({}, res[prop]);
}
}
return res;
}
function Locale2(config) {
if (config != null) {
this.set(config);
}
}
var keys;
if (Object.keys) {
keys = Object.keys;
} else {
keys = function(obj) {
var i, res = [];
for (i in obj) {
if (hasOwnProp(obj, i)) {
res.push(i);
}
}
return res;
};
}
var defaultCalendar = {
sameDay: "[Today at] LT",
nextDay: "[Tomorrow at] LT",
nextWeek: "dddd [at] LT",
lastDay: "[Yesterday at] LT",
lastWeek: "[Last] dddd [at] LT",
sameElse: "L"
};
function calendar(key2, mom, now4) {
var output = this._calendar[key2] || this._calendar["sameElse"];
return isFunction(output) ? output.call(mom, now4) : output;
}
function zeroFill(number, targetLength, forceSign) {
var absNumber = "" + Math.abs(number), zerosToFill = targetLength - absNumber.length, sign2 = number >= 0;
return (sign2 ? forceSign ? "+" : "" : "-") + Math.pow(10, Math.max(0, zerosToFill)).toString().substr(1) + absNumber;
}
var formattingTokens = /(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g, localFormattingTokens = /(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g, formatFunctions = {}, formatTokenFunctions = {};
function addFormatToken(token2, padded, ordinal2, callback) {
var func = callback;
if (typeof callback === "string") {
func = function() {
return this[callback]();
};
}
if (token2) {
formatTokenFunctions[token2] = func;
}
if (padded) {
formatTokenFunctions[padded[0]] = function() {
return zeroFill(func.apply(this, arguments), padded[1], padded[2]);
};
}
if (ordinal2) {
formatTokenFunctions[ordinal2] = function() {
return this.localeData().ordinal(
func.apply(this, arguments),
token2
);
};
}
}
function removeFormattingTokens(input) {
if (input.match(/\[[\s\S]/)) {
return input.replace(/^\[|\]$/g, "");
}
return input.replace(/\\/g, "");
}
function makeFormatFunction(format2) {
var array = format2.match(formattingTokens), i, length;
for (i = 0, length = array.length; i < length; i++) {
if (formatTokenFunctions[array[i]]) {
array[i] = formatTokenFunctions[array[i]];
} else {
array[i] = removeFormattingTokens(array[i]);
}
}
return function(mom) {
var output = "", i2;
for (i2 = 0; i2 < length; i2++) {
output += isFunction(array[i2]) ? array[i2].call(mom, format2) : array[i2];
}
return output;
};
}
function formatMoment(m, format2) {
if (!m.isValid()) {
return m.localeData().invalidDate();
}
format2 = expandFormat(format2, m.localeData());
formatFunctions[format2] = formatFunctions[format2] || makeFormatFunction(format2);
return formatFunctions[format2](m);
}
function expandFormat(format2, locale2) {
var i = 5;
function replaceLongDateFormatTokens(input) {
return locale2.longDateFormat(input) || input;
}
localFormattingTokens.lastIndex = 0;
while (i >= 0 && localFormattingTokens.test(format2)) {
format2 = format2.replace(
localFormattingTokens,
replaceLongDateFormatTokens
);
localFormattingTokens.lastIndex = 0;
i -= 1;
}
return format2;
}
var defaultLongDateFormat = {
LTS: "h:mm:ss A",
LT: "h:mm A",
L: "MM/DD/YYYY",
LL: "MMMM D, YYYY",
LLL: "MMMM D, YYYY h:mm A",
LLLL: "dddd, MMMM D, YYYY h:mm A"
};
function longDateFormat(key2) {
var format2 = this._longDateFormat[key2], formatUpper = this._longDateFormat[key2.toUpperCase()];
if (format2 || !formatUpper) {
return format2;
}
this._longDateFormat[key2] = formatUpper.match(formattingTokens).map(function(tok) {
if (tok === "MMMM" || tok === "MM" || tok === "DD" || tok === "dddd") {
return tok.slice(1);
}
return tok;
}).join("");
return this._longDateFormat[key2];
}
var defaultInvalidDate = "Invalid date";
function invalidDate() {
return this._invalidDate;
}
var defaultOrdinal = "%d", defaultDayOfMonthOrdinalParse = /\d{1,2}/;
function ordinal(number) {
return this._ordinal.replace("%d", number);
}
var defaultRelativeTime = {
future: "in %s",
past: "%s ago",
s: "a few seconds",
ss: "%d seconds",
m: "a minute",
mm: "%d minutes",
h: "an hour",
hh: "%d hours",
d: "a day",
dd: "%d days",
w: "a week",
ww: "%d weeks",
M: "a month",
MM: "%d months",
y: "a year",
yy: "%d years"
};
function relativeTime(number, withoutSuffix, string, isFuture) {
var output = this._relativeTime[string];
return isFunction(output) ? output(number, withoutSuffix, string, isFuture) : output.replace(/%d/i, number);
}
function pastFuture(diff2, output) {
var format2 = this._relativeTime[diff2 > 0 ? "future" : "past"];
return isFunction(format2) ? format2(output) : format2.replace(/%s/i, output);
}
var aliases = {
D: "date",
dates: "date",
date: "date",
d: "day",
days: "day",
day: "day",
e: "weekday",
weekdays: "weekday",
weekday: "weekday",
E: "isoWeekday",
isoweekdays: "isoWeekday",
isoweekday: "isoWeekday",
DDD: "dayOfYear",
dayofyears: "dayOfYear",
dayofyear: "dayOfYear",
h: "hour",
hours: "hour",
hour: "hour",
ms: "millisecond",
milliseconds: "millisecond",
millisecond: "millisecond",
m: "minute",
minutes: "minute",
minute: "minute",
M: "month",
months: "month",
month: "month",
Q: "quarter",
quarters: "quarter",
quarter: "quarter",
s: "second",
seconds: "second",
second: "second",
gg: "weekYear",
weekyears: "weekYear",
weekyear: "weekYear",
GG: "isoWeekYear",
isoweekyears: "isoWeekYear",
isoweekyear: "isoWeekYear",
w: "week",
weeks: "week",
week: "week",
W: "isoWeek",
isoweeks: "isoWeek",
isoweek: "isoWeek",
y: "year",
years: "year",
year: "year"
};
function normalizeUnits(units) {
return typeof units === "string" ? aliases[units] || aliases[units.toLowerCase()] : void 0;
}
function normalizeObjectUnits(inputObject) {
var normalizedInput = {}, normalizedProp, prop;
for (prop in inputObject) {
if (hasOwnProp(inputObject, prop)) {
normalizedProp = normalizeUnits(prop);
if (normalizedProp) {
normalizedInput[normalizedProp] = inputObject[prop];
}
}
}
return normalizedInput;
}
var priorities = {
date: 9,
day: 11,
weekday: 11,
isoWeekday: 11,
dayOfYear: 4,
hour: 13,
millisecond: 16,
minute: 14,
month: 8,
quarter: 7,
second: 15,
weekYear: 1,
isoWeekYear: 1,
week: 5,
isoWeek: 5,
year: 1
};
function getPrioritizedUnits(unitsObj) {
var units = [], u;
for (u in unitsObj) {
if (hasOwnProp(unitsObj, u)) {
units.push({ unit: u, priority: priorities[u] });
}
}
units.sort(function(a, b) {
return a.priority - b.priority;
});
return units;
}
var match1 = /\d/, match2 = /\d\d/, match3 = /\d{3}/, match4 = /\d{4}/, match6 = /[+-]?\d{6}/, match1to2 = /\d\d?/, match3to4 = /\d\d\d\d?/, match5to6 = /\d\d\d\d\d\d?/, match1to3 = /\d{1,3}/, match1to4 = /\d{1,4}/, match1to6 = /[+-]?\d{1,6}/, matchUnsigned = /\d+/, matchSigned = /[+-]?\d+/, matchOffset = /Z|[+-]\d\d:?\d\d/gi, matchShortOffset = /Z|[+-]\d\d(?::?\d\d)?/gi, matchTimestamp = /[+-]?\d+(\.\d{1,3})?/, matchWord = /[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i, match1to2NoLeadingZero = /^[1-9]\d?/, match1to2HasZero = /^([1-9]\d|\d)/, regexes;
regexes = {};
function addRegexToken(token2, regex, strictRegex) {
regexes[token2] = isFunction(regex) ? regex : function(isStrict, localeData2) {
return isStrict && strictRegex ? strictRegex : regex;
};
}
function getParseRegexForToken(token2, config) {
if (!hasOwnProp(regexes, token2)) {
return new RegExp(unescapeFormat(token2));
}
return regexes[token2](config._strict, config._locale);
}
function unescapeFormat(s2) {
return regexEscape(
s2.replace("\\", "").replace(
/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,
function(matched, p1, p2, p3, p4) {
return p1 || p2 || p3 || p4;
}
)
);
}
function regexEscape(s2) {
return s2.replace(/[-\/\\^$*+?.()|[\]{}]/g, "\\$&");
}
function absFloor(number) {
if (number < 0) {
return Math.ceil(number) || 0;
} else {
return Math.floor(number);
}
}
function toInt(argumentForCoercion) {
var coercedNumber = +argumentForCoercion, value = 0;
if (coercedNumber !== 0 && isFinite(coercedNumber)) {
value = absFloor(coercedNumber);
}
return value;
}
var tokens = {};
function addParseToken(token2, callback) {
var i, func = callback, tokenLen;
if (typeof token2 === "string") {
token2 = [token2];
}
if (isNumber2(callback)) {
func = function(input, array) {
array[callback] = toInt(input);
};
}
tokenLen = token2.length;
for (i = 0; i < tokenLen; i++) {
tokens[token2[i]] = func;
}
}
function addWeekParseToken(token2, callback) {
addParseToken(token2, function(input, array, config, token3) {
config._w = config._w || {};
callback(input, config._w, config, token3);
});
}
function addTimeToArrayFromToken(token2, input, config) {
if (input != null && hasOwnProp(tokens, token2)) {
tokens[token2](input, config._a, config, token2);
}
}
function isLeapYear2(year) {
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
}
var YEAR = 0, MONTH = 1, DATE = 2, HOUR = 3, MINUTE = 4, SECOND = 5, MILLISECOND = 6, WEEK = 7, WEEKDAY = 8;
addFormatToken("Y", 0, 0, function() {
var y = this.year();
return y <= 9999 ? zeroFill(y, 4) : "+" + y;
});
addFormatToken(0, ["YY", 2], 0, function() {
return this.year() % 100;
});
addFormatToken(0, ["YYYY", 4], 0, "year");
addFormatToken(0, ["YYYYY", 5], 0, "year");
addFormatToken(0, ["YYYYYY", 6, true], 0, "year");
addRegexToken("Y", matchSigned);
addRegexToken("YY", match1to2, match2);
addRegexToken("YYYY", match1to4, match4);
addRegexToken("YYYYY", match1to6, match6);
addRegexToken("YYYYYY", match1to6, match6);
addParseToken(["YYYYY", "YYYYYY"], YEAR);
addParseToken("YYYY", function(input, array) {
array[YEAR] = input.length === 2 ? hooks.parseTwoDigitYear(input) : toInt(input);
});
addParseToken("YY", function(input, array) {
array[YEAR] = hooks.parseTwoDigitYear(input);
});
addParseToken("Y", function(input, array) {
array[YEAR] = parseInt(input, 10);
});
function daysInYear2(year) {
return isLeapYear2(year) ? 366 : 365;
}
hooks.parseTwoDigitYear = function(input) {
return toInt(input) + (toInt(input) > 68 ? 1900 : 2e3);
};
var getSetYear = makeGetSet("FullYear", true);
function getIsLeapYear() {
return isLeapYear2(this.year());
}
function makeGetSet(unit, keepTime) {
return function(value) {
if (value != null) {
set$1(this, unit, value);
hooks.updateOffset(this, keepTime);
return this;
} else {
return get(this, unit);
}
};
}
function get(mom, unit) {
if (!mom.isValid()) {
return NaN;
}
var d = mom._d, isUTC = mom._isUTC;
switch (unit) {
case "Milliseconds":
return isUTC ? d.getUTCMilliseconds() : d.getMilliseconds();
case "Seconds":
return isUTC ? d.getUTCSeconds() : d.getSeconds();
case "Minutes":
return isUTC ? d.getUTCMinutes() : d.getMinutes();
case "Hours":
return isUTC ? d.getUTCHours() : d.getHours();
case "Date":
return isUTC ? d.getUTCDate() : d.getDate();
case "Day":
return isUTC ? d.getUTCDay() : d.getDay();
case "Month":
return isUTC ? d.getUTCMonth() : d.getMonth();
case "FullYear":
return isUTC ? d.getUTCFullYear() : d.getFullYear();
default:
return NaN;
}
}
function set$1(mom, unit, value) {
var d, isUTC, year, month, date;
if (!mom.isValid() || isNaN(value)) {
return;
}
d = mom._d;
isUTC = mom._isUTC;
switch (unit) {
case "Milliseconds":
return void (isUTC ? d.setUTCMilliseconds(value) : d.setMilliseconds(value));
case "Seconds":
return void (isUTC ? d.setUTCSeconds(value) : d.setSeconds(value));
case "Minutes":
return void (isUTC ? d.setUTCMinutes(value) : d.setMinutes(value));
case "Hours":
return void (isUTC ? d.setUTCHours(value) : d.setHours(value));
case "Date":
return void (isUTC ? d.setUTCDate(value) : d.setDate(value));
case "FullYear":
break;
default:
return;
}
year = value;
month = mom.month();
date = mom.date();
date = date === 29 && month === 1 && !isLeapYear2(year) ? 28 : date;
void (isUTC ? d.setUTCFullYear(year, month, date) : d.setFullYear(year, month, date));
}
function stringGet(units) {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units]();
}
return this;
}
function stringSet(units, value) {
if (typeof units === "object") {
units = normalizeObjectUnits(units);
var prioritized = getPrioritizedUnits(units), i, prioritizedLen = prioritized.length;
for (i = 0; i < prioritizedLen; i++) {
this[prioritized[i].unit](units[prioritized[i].unit]);
}
} else {
units = normalizeUnits(units);
if (isFunction(this[units])) {
return this[units](value);
}
}
return this;
}
function mod(n2, x) {
return (n2 % x + x) % x;
}
var indexOf;
if (Array.prototype.indexOf) {
indexOf = Array.prototype.indexOf;
} else {
indexOf = function(o) {
var i;
for (i = 0; i < this.length; ++i) {
if (this[i] === o) {
return i;
}
}
return -1;
};
}
function daysInMonth2(year, month) {
if (isNaN(year) || isNaN(month)) {
return NaN;
}
var modMonth = mod(month, 12);
year += (month - modMonth) / 12;
return modMonth === 1 ? isLeapYear2(year) ? 29 : 28 : 31 - modMonth % 7 % 2;
}
addFormatToken("M", ["MM", 2], "Mo", function() {
return this.month() + 1;
});
addFormatToken("MMM", 0, 0, function(format2) {
return this.localeData().monthsShort(this, format2);
});
addFormatToken("MMMM", 0, 0, function(format2) {
return this.localeData().months(this, format2);
});
addRegexToken("M", match1to2, match1to2NoLeadingZero);
addRegexToken("MM", match1to2, match2);
addRegexToken("MMM", function(isStrict, locale2) {
return locale2.monthsShortRegex(isStrict);
});
addRegexToken("MMMM", function(isStrict, locale2) {
return locale2.monthsRegex(isStrict);
});
addParseToken(["M", "MM"], function(input, array) {
array[MONTH] = toInt(input) - 1;
});
addParseToken(["MMM", "MMMM"], function(input, array, config, token2) {
var month = config._locale.monthsParse(input, token2, config._strict);
if (month != null) {
array[MONTH] = month;
} else {
getParsingFlags(config).invalidMonth = input;
}
});
var defaultLocaleMonths = "January_February_March_April_May_June_July_August_September_October_November_December".split(
"_"
), defaultLocaleMonthsShort = "Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"), MONTHS_IN_FORMAT = /D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/, defaultMonthsShortRegex = matchWord, defaultMonthsRegex = matchWord;
function localeMonths(m, format2) {
if (!m) {
return isArray(this._months) ? this._months : this._months["standalone"];
}
return isArray(this._months) ? this._months[m.month()] : this._months[(this._months.isFormat || MONTHS_IN_FORMAT).test(format2) ? "format" : "standalone"][m.month()];
}
function localeMonthsShort(m, format2) {
if (!m) {
return isArray(this._monthsShort) ? this._monthsShort : this._monthsShort["standalone"];
}
return isArray(this._monthsShort) ? this._monthsShort[m.month()] : this._monthsShort[MONTHS_IN_FORMAT.test(format2) ? "format" : "standalone"][m.month()];
}
function handleStrictParse(monthName, format2, strict) {
var i, ii, mom, llc = monthName.toLocaleLowerCase();
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
for (i = 0; i < 12; ++i) {
mom = createUTC([2e3, i]);
this._shortMonthsParse[i] = this.monthsShort(
mom,
""
).toLocaleLowerCase();
this._longMonthsParse[i] = this.months(mom, "").toLocaleLowerCase();
}
}
if (strict) {
if (format2 === "MMM") {
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format2 === "MMM") {
ii = indexOf.call(this._shortMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._longMonthsParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._longMonthsParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortMonthsParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeMonthsParse(monthName, format2, strict) {
var i, mom, regex;
if (this._monthsParseExact) {
return handleStrictParse.call(this, monthName, format2, strict);
}
if (!this._monthsParse) {
this._monthsParse = [];
this._longMonthsParse = [];
this._shortMonthsParse = [];
}
for (i = 0; i < 12; i++) {
mom = createUTC([2e3, i]);
if (strict && !this._longMonthsParse[i]) {
this._longMonthsParse[i] = new RegExp(
"^" + this.months(mom, "").replace(".", "") + "$",
"i"
);
this._shortMonthsParse[i] = new RegExp(
"^" + this.monthsShort(mom, "").replace(".", "") + "$",
"i"
);
}
if (!strict && !this._monthsParse[i]) {
regex = "^" + this.months(mom, "") + "|^" + this.monthsShort(mom, "");
this._monthsParse[i] = new RegExp(regex.replace(".", ""), "i");
}
if (strict && format2 === "MMMM" && this._longMonthsParse[i].test(monthName)) {
return i;
} else if (strict && format2 === "MMM" && this._shortMonthsParse[i].test(monthName)) {
return i;
} else if (!strict && this._monthsParse[i].test(monthName)) {
return i;
}
}
}
function setMonth(mom, value) {
if (!mom.isValid()) {
return mom;
}
if (typeof value === "string") {
if (/^\d+$/.test(value)) {
value = toInt(value);
} else {
value = mom.localeData().monthsParse(value);
if (!isNumber2(value)) {
return mom;
}
}
}
var month = value, date = mom.date();
date = date < 29 ? date : Math.min(date, daysInMonth2(mom.year(), month));
void (mom._isUTC ? mom._d.setUTCMonth(month, date) : mom._d.setMonth(month, date));
return mom;
}
function getSetMonth(value) {
if (value != null) {
setMonth(this, value);
hooks.updateOffset(this, true);
return this;
} else {
return get(this, "Month");
}
}
function getDaysInMonth() {
return daysInMonth2(this.year(), this.month());
}
function monthsShortRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, "_monthsRegex")) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsShortStrictRegex;
} else {
return this._monthsShortRegex;
}
} else {
if (!hasOwnProp(this, "_monthsShortRegex")) {
this._monthsShortRegex = defaultMonthsShortRegex;
}
return this._monthsShortStrictRegex && isStrict ? this._monthsShortStrictRegex : this._monthsShortRegex;
}
}
function monthsRegex(isStrict) {
if (this._monthsParseExact) {
if (!hasOwnProp(this, "_monthsRegex")) {
computeMonthsParse.call(this);
}
if (isStrict) {
return this._monthsStrictRegex;
} else {
return this._monthsRegex;
}
} else {
if (!hasOwnProp(this, "_monthsRegex")) {
this._monthsRegex = defaultMonthsRegex;
}
return this._monthsStrictRegex && isStrict ? this._monthsStrictRegex : this._monthsRegex;
}
}
function computeMonthsParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var shortPieces = [], longPieces = [], mixedPieces = [], i, mom, shortP, longP;
for (i = 0; i < 12; i++) {
mom = createUTC([2e3, i]);
shortP = regexEscape(this.monthsShort(mom, ""));
longP = regexEscape(this.months(mom, ""));
shortPieces.push(shortP);
longPieces.push(longP);
mixedPieces.push(longP);
mixedPieces.push(shortP);
}
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._monthsRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
this._monthsShortRegex = this._monthsRegex;
this._monthsStrictRegex = new RegExp(
"^(" + longPieces.join("|") + ")",
"i"
);
this._monthsShortStrictRegex = new RegExp(
"^(" + shortPieces.join("|") + ")",
"i"
);
}
function createDate(y, m, d, h, M, s2, ms) {
var date;
if (y < 100 && y >= 0) {
date = new Date(y + 400, m, d, h, M, s2, ms);
if (isFinite(date.getFullYear())) {
date.setFullYear(y);
}
} else {
date = new Date(y, m, d, h, M, s2, ms);
}
return date;
}
function createUTCDate(y) {
var date, args;
if (y < 100 && y >= 0) {
args = Array.prototype.slice.call(arguments);
args[0] = y + 400;
date = new Date(Date.UTC.apply(null, args));
if (isFinite(date.getUTCFullYear())) {
date.setUTCFullYear(y);
}
} else {
date = new Date(Date.UTC.apply(null, arguments));
}
return date;
}
function firstWeekOffset2(year, dow, doy) {
var fwd = 7 + dow - doy, fwdlw = (7 + createUTCDate(year, 0, fwd).getUTCDay() - dow) % 7;
return -fwdlw + fwd - 1;
}
function dayOfYearFromWeeks(year, week, weekday, dow, doy) {
var localWeekday = (7 + weekday - dow) % 7, weekOffset = firstWeekOffset2(year, dow, doy), dayOfYear = 1 + 7 * (week - 1) + localWeekday + weekOffset, resYear, resDayOfYear;
if (dayOfYear <= 0) {
resYear = year - 1;
resDayOfYear = daysInYear2(resYear) + dayOfYear;
} else if (dayOfYear > daysInYear2(year)) {
resYear = year + 1;
resDayOfYear = dayOfYear - daysInYear2(year);
} else {
resYear = year;
resDayOfYear = dayOfYear;
}
return {
year: resYear,
dayOfYear: resDayOfYear
};
}
function weekOfYear(mom, dow, doy) {
var weekOffset = firstWeekOffset2(mom.year(), dow, doy), week = Math.floor((mom.dayOfYear() - weekOffset - 1) / 7) + 1, resWeek, resYear;
if (week < 1) {
resYear = mom.year() - 1;
resWeek = week + weeksInYear(resYear, dow, doy);
} else if (week > weeksInYear(mom.year(), dow, doy)) {
resWeek = week - weeksInYear(mom.year(), dow, doy);
resYear = mom.year() + 1;
} else {
resYear = mom.year();
resWeek = week;
}
return {
week: resWeek,
year: resYear
};
}
function weeksInYear(year, dow, doy) {
var weekOffset = firstWeekOffset2(year, dow, doy), weekOffsetNext = firstWeekOffset2(year + 1, dow, doy);
return (daysInYear2(year) - weekOffset + weekOffsetNext) / 7;
}
addFormatToken("w", ["ww", 2], "wo", "week");
addFormatToken("W", ["WW", 2], "Wo", "isoWeek");
addRegexToken("w", match1to2, match1to2NoLeadingZero);
addRegexToken("ww", match1to2, match2);
addRegexToken("W", match1to2, match1to2NoLeadingZero);
addRegexToken("WW", match1to2, match2);
addWeekParseToken(
["w", "ww", "W", "WW"],
function(input, week, config, token2) {
week[token2.substr(0, 1)] = toInt(input);
}
);
function localeWeek(mom) {
return weekOfYear(mom, this._week.dow, this._week.doy).week;
}
var defaultLocaleWeek = {
dow: 0,
// Sunday is the first day of the week.
doy: 6
// The week that contains Jan 6th is the first week of the year.
};
function localeFirstDayOfWeek() {
return this._week.dow;
}
function localeFirstDayOfYear() {
return this._week.doy;
}
function getSetWeek(input) {
var week = this.localeData().week(this);
return input == null ? week : this.add((input - week) * 7, "d");
}
function getSetISOWeek(input) {
var week = weekOfYear(this, 1, 4).week;
return input == null ? week : this.add((input - week) * 7, "d");
}
addFormatToken("d", 0, "do", "day");
addFormatToken("dd", 0, 0, function(format2) {
return this.localeData().weekdaysMin(this, format2);
});
addFormatToken("ddd", 0, 0, function(format2) {
return this.localeData().weekdaysShort(this, format2);
});
addFormatToken("dddd", 0, 0, function(format2) {
return this.localeData().weekdays(this, format2);
});
addFormatToken("e", 0, 0, "weekday");
addFormatToken("E", 0, 0, "isoWeekday");
addRegexToken("d", match1to2);
addRegexToken("e", match1to2);
addRegexToken("E", match1to2);
addRegexToken("dd", function(isStrict, locale2) {
return locale2.weekdaysMinRegex(isStrict);
});
addRegexToken("ddd", function(isStrict, locale2) {
return locale2.weekdaysShortRegex(isStrict);
});
addRegexToken("dddd", function(isStrict, locale2) {
return locale2.weekdaysRegex(isStrict);
});
addWeekParseToken(["dd", "ddd", "dddd"], function(input, week, config, token2) {
var weekday = config._locale.weekdaysParse(input, token2, config._strict);
if (weekday != null) {
week.d = weekday;
} else {
getParsingFlags(config).invalidWeekday = input;
}
});
addWeekParseToken(["d", "e", "E"], function(input, week, config, token2) {
week[token2] = toInt(input);
});
function parseWeekday(input, locale2) {
if (typeof input !== "string") {
return input;
}
if (!isNaN(input)) {
return parseInt(input, 10);
}
input = locale2.weekdaysParse(input);
if (typeof input === "number") {
return input;
}
return null;
}
function parseIsoWeekday(input, locale2) {
if (typeof input === "string") {
return locale2.weekdaysParse(input) % 7 || 7;
}
return isNaN(input) ? null : input;
}
function shiftWeekdays(ws, n2) {
return ws.slice(n2, 7).concat(ws.slice(0, n2));
}
var defaultLocaleWeekdays = "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), defaultLocaleWeekdaysShort = "Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"), defaultLocaleWeekdaysMin = "Su_Mo_Tu_We_Th_Fr_Sa".split("_"), defaultWeekdaysRegex = matchWord, defaultWeekdaysShortRegex = matchWord, defaultWeekdaysMinRegex = matchWord;
function localeWeekdays(m, format2) {
var weekdays2 = isArray(this._weekdays) ? this._weekdays : this._weekdays[m && m !== true && this._weekdays.isFormat.test(format2) ? "format" : "standalone"];
return m === true ? shiftWeekdays(weekdays2, this._week.dow) : m ? weekdays2[m.day()] : weekdays2;
}
function localeWeekdaysShort(m) {
return m === true ? shiftWeekdays(this._weekdaysShort, this._week.dow) : m ? this._weekdaysShort[m.day()] : this._weekdaysShort;
}
function localeWeekdaysMin(m) {
return m === true ? shiftWeekdays(this._weekdaysMin, this._week.dow) : m ? this._weekdaysMin[m.day()] : this._weekdaysMin;
}
function handleStrictParse$1(weekdayName, format2, strict) {
var i, ii, mom, llc = weekdayName.toLocaleLowerCase();
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._shortWeekdaysParse = [];
this._minWeekdaysParse = [];
for (i = 0; i < 7; ++i) {
mom = createUTC([2e3, 1]).day(i);
this._minWeekdaysParse[i] = this.weekdaysMin(
mom,
""
).toLocaleLowerCase();
this._shortWeekdaysParse[i] = this.weekdaysShort(
mom,
""
).toLocaleLowerCase();
this._weekdaysParse[i] = this.weekdays(mom, "").toLocaleLowerCase();
}
}
if (strict) {
if (format2 === "dddd") {
ii = indexOf.call(this._weekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format2 === "ddd") {
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
} else {
if (format2 === "dddd") {
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else if (format2 === "ddd") {
ii = indexOf.call(this._shortWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._minWeekdaysParse, llc);
return ii !== -1 ? ii : null;
} else {
ii = indexOf.call(this._minWeekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._weekdaysParse, llc);
if (ii !== -1) {
return ii;
}
ii = indexOf.call(this._shortWeekdaysParse, llc);
return ii !== -1 ? ii : null;
}
}
}
function localeWeekdaysParse(weekdayName, format2, strict) {
var i, mom, regex;
if (this._weekdaysParseExact) {
return handleStrictParse$1.call(this, weekdayName, format2, strict);
}
if (!this._weekdaysParse) {
this._weekdaysParse = [];
this._minWeekdaysParse = [];
this._shortWeekdaysParse = [];
this._fullWeekdaysParse = [];
}
for (i = 0; i < 7; i++) {
mom = createUTC([2e3, 1]).day(i);
if (strict && !this._fullWeekdaysParse[i]) {
this._fullWeekdaysParse[i] = new RegExp(
"^" + this.weekdays(mom, "").replace(".", "\\.?") + "$",
"i"
);
this._shortWeekdaysParse[i] = new RegExp(
"^" + this.weekdaysShort(mom, "").replace(".", "\\.?") + "$",
"i"
);
this._minWeekdaysParse[i] = new RegExp(
"^" + this.weekdaysMin(mom, "").replace(".", "\\.?") + "$",
"i"
);
}
if (!this._weekdaysParse[i]) {
regex = "^" + this.weekdays(mom, "") + "|^" + this.weekdaysShort(mom, "") + "|^" + this.weekdaysMin(mom, "");
this._weekdaysParse[i] = new RegExp(regex.replace(".", ""), "i");
}
if (strict && format2 === "dddd" && this._fullWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format2 === "ddd" && this._shortWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (strict && format2 === "dd" && this._minWeekdaysParse[i].test(weekdayName)) {
return i;
} else if (!strict && this._weekdaysParse[i].test(weekdayName)) {
return i;
}
}
}
function getSetDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var day = get(this, "Day");
if (input != null) {
input = parseWeekday(input, this.localeData());
return this.add(input - day, "d");
} else {
return day;
}
}
function getSetLocaleDayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
var weekday = (this.day() + 7 - this.localeData()._week.dow) % 7;
return input == null ? weekday : this.add(input - weekday, "d");
}
function getSetISODayOfWeek(input) {
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
var weekday = parseIsoWeekday(input, this.localeData());
return this.day(this.day() % 7 ? weekday : weekday - 7);
} else {
return this.day() || 7;
}
}
function weekdaysRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, "_weekdaysRegex")) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysStrictRegex;
} else {
return this._weekdaysRegex;
}
} else {
if (!hasOwnProp(this, "_weekdaysRegex")) {
this._weekdaysRegex = defaultWeekdaysRegex;
}
return this._weekdaysStrictRegex && isStrict ? this._weekdaysStrictRegex : this._weekdaysRegex;
}
}
function weekdaysShortRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, "_weekdaysRegex")) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysShortStrictRegex;
} else {
return this._weekdaysShortRegex;
}
} else {
if (!hasOwnProp(this, "_weekdaysShortRegex")) {
this._weekdaysShortRegex = defaultWeekdaysShortRegex;
}
return this._weekdaysShortStrictRegex && isStrict ? this._weekdaysShortStrictRegex : this._weekdaysShortRegex;
}
}
function weekdaysMinRegex(isStrict) {
if (this._weekdaysParseExact) {
if (!hasOwnProp(this, "_weekdaysRegex")) {
computeWeekdaysParse.call(this);
}
if (isStrict) {
return this._weekdaysMinStrictRegex;
} else {
return this._weekdaysMinRegex;
}
} else {
if (!hasOwnProp(this, "_weekdaysMinRegex")) {
this._weekdaysMinRegex = defaultWeekdaysMinRegex;
}
return this._weekdaysMinStrictRegex && isStrict ? this._weekdaysMinStrictRegex : this._weekdaysMinRegex;
}
}
function computeWeekdaysParse() {
function cmpLenRev(a, b) {
return b.length - a.length;
}
var minPieces = [], shortPieces = [], longPieces = [], mixedPieces = [], i, mom, minp, shortp, longp;
for (i = 0; i < 7; i++) {
mom = createUTC([2e3, 1]).day(i);
minp = regexEscape(this.weekdaysMin(mom, ""));
shortp = regexEscape(this.weekdaysShort(mom, ""));
longp = regexEscape(this.weekdays(mom, ""));
minPieces.push(minp);
shortPieces.push(shortp);
longPieces.push(longp);
mixedPieces.push(minp);
mixedPieces.push(shortp);
mixedPieces.push(longp);
}
minPieces.sort(cmpLenRev);
shortPieces.sort(cmpLenRev);
longPieces.sort(cmpLenRev);
mixedPieces.sort(cmpLenRev);
this._weekdaysRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
this._weekdaysShortRegex = this._weekdaysRegex;
this._weekdaysMinRegex = this._weekdaysRegex;
this._weekdaysStrictRegex = new RegExp(
"^(" + longPieces.join("|") + ")",
"i"
);
this._weekdaysShortStrictRegex = new RegExp(
"^(" + shortPieces.join("|") + ")",
"i"
);
this._weekdaysMinStrictRegex = new RegExp(
"^(" + minPieces.join("|") + ")",
"i"
);
}
function hFormat() {
return this.hours() % 12 || 12;
}
function kFormat() {
return this.hours() || 24;
}
addFormatToken("H", ["HH", 2], 0, "hour");
addFormatToken("h", ["hh", 2], 0, hFormat);
addFormatToken("k", ["kk", 2], 0, kFormat);
addFormatToken("hmm", 0, 0, function() {
return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2);
});
addFormatToken("hmmss", 0, 0, function() {
return "" + hFormat.apply(this) + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
});
addFormatToken("Hmm", 0, 0, function() {
return "" + this.hours() + zeroFill(this.minutes(), 2);
});
addFormatToken("Hmmss", 0, 0, function() {
return "" + this.hours() + zeroFill(this.minutes(), 2) + zeroFill(this.seconds(), 2);
});
function meridiem(token2, lowercase) {
addFormatToken(token2, 0, 0, function() {
return this.localeData().meridiem(
this.hours(),
this.minutes(),
lowercase
);
});
}
meridiem("a", true);
meridiem("A", false);
function matchMeridiem(isStrict, locale2) {
return locale2._meridiemParse;
}
addRegexToken("a", matchMeridiem);
addRegexToken("A", matchMeridiem);
addRegexToken("H", match1to2, match1to2HasZero);
addRegexToken("h", match1to2, match1to2NoLeadingZero);
addRegexToken("k", match1to2, match1to2NoLeadingZero);
addRegexToken("HH", match1to2, match2);
addRegexToken("hh", match1to2, match2);
addRegexToken("kk", match1to2, match2);
addRegexToken("hmm", match3to4);
addRegexToken("hmmss", match5to6);
addRegexToken("Hmm", match3to4);
addRegexToken("Hmmss", match5to6);
addParseToken(["H", "HH"], HOUR);
addParseToken(["k", "kk"], function(input, array, config) {
var kInput = toInt(input);
array[HOUR] = kInput === 24 ? 0 : kInput;
});
addParseToken(["a", "A"], function(input, array, config) {
config._isPm = config._locale.isPM(input);
config._meridiem = input;
});
addParseToken(["h", "hh"], function(input, array, config) {
array[HOUR] = toInt(input);
getParsingFlags(config).bigHour = true;
});
addParseToken("hmm", function(input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
getParsingFlags(config).bigHour = true;
});
addParseToken("hmmss", function(input, array, config) {
var pos1 = input.length - 4, pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
getParsingFlags(config).bigHour = true;
});
addParseToken("Hmm", function(input, array, config) {
var pos = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos));
array[MINUTE] = toInt(input.substr(pos));
});
addParseToken("Hmmss", function(input, array, config) {
var pos1 = input.length - 4, pos2 = input.length - 2;
array[HOUR] = toInt(input.substr(0, pos1));
array[MINUTE] = toInt(input.substr(pos1, 2));
array[SECOND] = toInt(input.substr(pos2));
});
function localeIsPM(input) {
return (input + "").toLowerCase().charAt(0) === "p";
}
var defaultLocaleMeridiemParse = /[ap]\.?m?\.?/i, getSetHour = makeGetSet("Hours", true);
function localeMeridiem(hours2, minutes2, isLower) {
if (hours2 > 11) {
return isLower ? "pm" : "PM";
} else {
return isLower ? "am" : "AM";
}
}
var baseConfig = {
calendar: defaultCalendar,
longDateFormat: defaultLongDateFormat,
invalidDate: defaultInvalidDate,
ordinal: defaultOrdinal,
dayOfMonthOrdinalParse: defaultDayOfMonthOrdinalParse,
relativeTime: defaultRelativeTime,
months: defaultLocaleMonths,
monthsShort: defaultLocaleMonthsShort,
week: defaultLocaleWeek,
weekdays: defaultLocaleWeekdays,
weekdaysMin: defaultLocaleWeekdaysMin,
weekdaysShort: defaultLocaleWeekdaysShort,
meridiemParse: defaultLocaleMeridiemParse
};
var locales = {}, localeFamilies = {}, globalLocale;
function commonPrefix(arr1, arr2) {
var i, minl = Math.min(arr1.length, arr2.length);
for (i = 0; i < minl; i += 1) {
if (arr1[i] !== arr2[i]) {
return i;
}
}
return minl;
}
function normalizeLocale(key2) {
return key2 ? key2.toLowerCase().replace("_", "-") : key2;
}
function chooseLocale(names) {
var i = 0, j, next, locale2, split;
while (i < names.length) {
split = normalizeLocale(names[i]).split("-");
j = split.length;
next = normalizeLocale(names[i + 1]);
next = next ? next.split("-") : null;
while (j > 0) {
locale2 = loadLocale(split.slice(0, j).join("-"));
if (locale2) {
return locale2;
}
if (next && next.length >= j && commonPrefix(split, next) >= j - 1) {
break;
}
j--;
}
i++;
}
return globalLocale;
}
function isLocaleNameSane(name) {
return !!(name && name.match("^[^/\\\\]*$"));
}
function loadLocale(name) {
var oldLocale = null, aliasedRequire;
if (locales[name] === void 0 && typeof module2 !== "undefined" && module2 && module2.exports && isLocaleNameSane(name)) {
try {
oldLocale = globalLocale._abbr;
aliasedRequire = require;
aliasedRequire("./locale/" + name);
getSetGlobalLocale(oldLocale);
} catch (e) {
locales[name] = null;
}
}
return locales[name];
}
function getSetGlobalLocale(key2, values) {
var data;
if (key2) {
if (isUndefined2(values)) {
data = getLocale(key2);
} else {
data = defineLocale(key2, values);
}
if (data) {
globalLocale = data;
} else {
if (typeof console !== "undefined" && console.warn) {
console.warn(
"Locale " + key2 + " not found. Did you forget to load it?"
);
}
}
}
return globalLocale._abbr;
}
function defineLocale(name, config) {
if (config !== null) {
var locale2, parentConfig = baseConfig;
config.abbr = name;
if (locales[name] != null) {
deprecateSimple(
"defineLocaleOverride",
"use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."
);
parentConfig = locales[name]._config;
} else if (config.parentLocale != null) {
if (locales[config.parentLocale] != null) {
parentConfig = locales[config.parentLocale]._config;
} else {
locale2 = loadLocale(config.parentLocale);
if (locale2 != null) {
parentConfig = locale2._config;
} else {
if (!localeFamilies[config.parentLocale]) {
localeFamilies[config.parentLocale] = [];
}
localeFamilies[config.parentLocale].push({
name,
config
});
return null;
}
}
}
locales[name] = new Locale2(mergeConfigs(parentConfig, config));
if (localeFamilies[name]) {
localeFamilies[name].forEach(function(x) {
defineLocale(x.name, x.config);
});
}
getSetGlobalLocale(name);
return locales[name];
} else {
delete locales[name];
return null;
}
}
function updateLocale(name, config) {
if (config != null) {
var locale2, tmpLocale, parentConfig = baseConfig;
if (locales[name] != null && locales[name].parentLocale != null) {
locales[name].set(mergeConfigs(locales[name]._config, config));
} else {
tmpLocale = loadLocale(name);
if (tmpLocale != null) {
parentConfig = tmpLocale._config;
}
config = mergeConfigs(parentConfig, config);
if (tmpLocale == null) {
config.abbr = name;
}
locale2 = new Locale2(config);
locale2.parentLocale = locales[name];
locales[name] = locale2;
}
getSetGlobalLocale(name);
} else {
if (locales[name] != null) {
if (locales[name].parentLocale != null) {
locales[name] = locales[name].parentLocale;
if (name === getSetGlobalLocale()) {
getSetGlobalLocale(name);
}
} else if (locales[name] != null) {
delete locales[name];
}
}
}
return locales[name];
}
function getLocale(key2) {
var locale2;
if (key2 && key2._locale && key2._locale._abbr) {
key2 = key2._locale._abbr;
}
if (!key2) {
return globalLocale;
}
if (!isArray(key2)) {
locale2 = loadLocale(key2);
if (locale2) {
return locale2;
}
key2 = [key2];
}
return chooseLocale(key2);
}
function listLocales() {
return keys(locales);
}
function checkOverflow(m) {
var overflow, a = m._a;
if (a && getParsingFlags(m).overflow === -2) {
overflow = a[MONTH] < 0 || a[MONTH] > 11 ? MONTH : a[DATE] < 1 || a[DATE] > daysInMonth2(a[YEAR], a[MONTH]) ? DATE : a[HOUR] < 0 || a[HOUR] > 24 || a[HOUR] === 24 && (a[MINUTE] !== 0 || a[SECOND] !== 0 || a[MILLISECOND] !== 0) ? HOUR : a[MINUTE] < 0 || a[MINUTE] > 59 ? MINUTE : a[SECOND] < 0 || a[SECOND] > 59 ? SECOND : a[MILLISECOND] < 0 || a[MILLISECOND] > 999 ? MILLISECOND : -1;
if (getParsingFlags(m)._overflowDayOfYear && (overflow < YEAR || overflow > DATE)) {
overflow = DATE;
}
if (getParsingFlags(m)._overflowWeeks && overflow === -1) {
overflow = WEEK;
}
if (getParsingFlags(m)._overflowWeekday && overflow === -1) {
overflow = WEEKDAY;
}
getParsingFlags(m).overflow = overflow;
}
return m;
}
var extendedIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, basicIsoRegex = /^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/, tzRegex = /Z|[+-]\d\d(?::?\d\d)?/, isoDates = [
["YYYYYY-MM-DD", /[+-]\d{6}-\d\d-\d\d/],
["YYYY-MM-DD", /\d{4}-\d\d-\d\d/],
["GGGG-[W]WW-E", /\d{4}-W\d\d-\d/],
["GGGG-[W]WW", /\d{4}-W\d\d/, false],
["YYYY-DDD", /\d{4}-\d{3}/],
["YYYY-MM", /\d{4}-\d\d/, false],
["YYYYYYMMDD", /[+-]\d{10}/],
["YYYYMMDD", /\d{8}/],
["GGGG[W]WWE", /\d{4}W\d{3}/],
["GGGG[W]WW", /\d{4}W\d{2}/, false],
["YYYYDDD", /\d{7}/],
["YYYYMM", /\d{6}/, false],
["YYYY", /\d{4}/, false]
], isoTimes = [
["HH:mm:ss.SSSS", /\d\d:\d\d:\d\d\.\d+/],
["HH:mm:ss,SSSS", /\d\d:\d\d:\d\d,\d+/],
["HH:mm:ss", /\d\d:\d\d:\d\d/],
["HH:mm", /\d\d:\d\d/],
["HHmmss.SSSS", /\d\d\d\d\d\d\.\d+/],
["HHmmss,SSSS", /\d\d\d\d\d\d,\d+/],
["HHmmss", /\d\d\d\d\d\d/],
["HHmm", /\d\d\d\d/],
["HH", /\d\d/]
], aspNetJsonRegex = /^\/?Date\((-?\d+)/i, rfc28222 = /^(?:(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{4}))$/, obsOffsets2 = {
UT: 0,
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60
};
function configFromISO(config) {
var i, l2, string = config._i, match5 = extendedIsoRegex.exec(string) || basicIsoRegex.exec(string), allowTime, dateFormat, timeFormat, tzFormat, isoDatesLen = isoDates.length, isoTimesLen = isoTimes.length;
if (match5) {
getParsingFlags(config).iso = true;
for (i = 0, l2 = isoDatesLen; i < l2; i++) {
if (isoDates[i][1].exec(match5[1])) {
dateFormat = isoDates[i][0];
allowTime = isoDates[i][2] !== false;
break;
}
}
if (dateFormat == null) {
config._isValid = false;
return;
}
if (match5[3]) {
for (i = 0, l2 = isoTimesLen; i < l2; i++) {
if (isoTimes[i][1].exec(match5[3])) {
timeFormat = (match5[2] || " ") + isoTimes[i][0];
break;
}
}
if (timeFormat == null) {
config._isValid = false;
return;
}
}
if (!allowTime && timeFormat != null) {
config._isValid = false;
return;
}
if (match5[4]) {
if (tzRegex.exec(match5[4])) {
tzFormat = "Z";
} else {
config._isValid = false;
return;
}
}
config._f = dateFormat + (timeFormat || "") + (tzFormat || "");
configFromStringAndFormat(config);
} else {
config._isValid = false;
}
}
function extractFromRFC2822Strings(yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
var result = [
untruncateYear2(yearStr),
defaultLocaleMonthsShort.indexOf(monthStr),
parseInt(dayStr, 10),
parseInt(hourStr, 10),
parseInt(minuteStr, 10)
];
if (secondStr) {
result.push(parseInt(secondStr, 10));
}
return result;
}
function untruncateYear2(yearStr) {
var year = parseInt(yearStr, 10);
if (year <= 49) {
return 2e3 + year;
} else if (year <= 999) {
return 1900 + year;
}
return year;
}
function preprocessRFC28222(s2) {
return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").replace(/^\s\s*/, "").replace(/\s\s*$/, "");
}
function checkWeekday(weekdayStr, parsedInput, config) {
if (weekdayStr) {
var weekdayProvided = defaultLocaleWeekdaysShort.indexOf(weekdayStr), weekdayActual = new Date(
parsedInput[0],
parsedInput[1],
parsedInput[2]
).getDay();
if (weekdayProvided !== weekdayActual) {
getParsingFlags(config).weekdayMismatch = true;
config._isValid = false;
return false;
}
}
return true;
}
function calculateOffset(obsOffset, militaryOffset, numOffset) {
if (obsOffset) {
return obsOffsets2[obsOffset];
} else if (militaryOffset) {
return 0;
} else {
var hm = parseInt(numOffset, 10), m = hm % 100, h = (hm - m) / 100;
return h * 60 + m;
}
}
function configFromRFC2822(config) {
var match5 = rfc28222.exec(preprocessRFC28222(config._i)), parsedArray;
if (match5) {
parsedArray = extractFromRFC2822Strings(
match5[4],
match5[3],
match5[2],
match5[5],
match5[6],
match5[7]
);
if (!checkWeekday(match5[1], parsedArray, config)) {
return;
}
config._a = parsedArray;
config._tzm = calculateOffset(match5[8], match5[9], match5[10]);
config._d = createUTCDate.apply(null, config._a);
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
getParsingFlags(config).rfc2822 = true;
} else {
config._isValid = false;
}
}
function configFromString(config) {
var matched = aspNetJsonRegex.exec(config._i);
if (matched !== null) {
config._d = /* @__PURE__ */ new Date(+matched[1]);
return;
}
configFromISO(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
configFromRFC2822(config);
if (config._isValid === false) {
delete config._isValid;
} else {
return;
}
if (config._strict) {
config._isValid = false;
} else {
hooks.createFromInputFallback(config);
}
}
hooks.createFromInputFallback = deprecate(
"value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",
function(config) {
config._d = /* @__PURE__ */ new Date(config._i + (config._useUTC ? " UTC" : ""));
}
);
function defaults(a, b, c) {
if (a != null) {
return a;
}
if (b != null) {
return b;
}
return c;
}
function currentDateArray(config) {
var nowValue = new Date(hooks.now());
if (config._useUTC) {
return [
nowValue.getUTCFullYear(),
nowValue.getUTCMonth(),
nowValue.getUTCDate()
];
}
return [nowValue.getFullYear(), nowValue.getMonth(), nowValue.getDate()];
}
function configFromArray(config) {
var i, date, input = [], currentDate, expectedWeekday, yearToUse;
if (config._d) {
return;
}
currentDate = currentDateArray(config);
if (config._w && config._a[DATE] == null && config._a[MONTH] == null) {
dayOfYearFromWeekInfo(config);
}
if (config._dayOfYear != null) {
yearToUse = defaults(config._a[YEAR], currentDate[YEAR]);
if (config._dayOfYear > daysInYear2(yearToUse) || config._dayOfYear === 0) {
getParsingFlags(config)._overflowDayOfYear = true;
}
date = createUTCDate(yearToUse, 0, config._dayOfYear);
config._a[MONTH] = date.getUTCMonth();
config._a[DATE] = date.getUTCDate();
}
for (i = 0; i < 3 && config._a[i] == null; ++i) {
config._a[i] = input[i] = currentDate[i];
}
for (; i < 7; i++) {
config._a[i] = input[i] = config._a[i] == null ? i === 2 ? 1 : 0 : config._a[i];
}
if (config._a[HOUR] === 24 && config._a[MINUTE] === 0 && config._a[SECOND] === 0 && config._a[MILLISECOND] === 0) {
config._nextDay = true;
config._a[HOUR] = 0;
}
config._d = (config._useUTC ? createUTCDate : createDate).apply(
null,
input
);
expectedWeekday = config._useUTC ? config._d.getUTCDay() : config._d.getDay();
if (config._tzm != null) {
config._d.setUTCMinutes(config._d.getUTCMinutes() - config._tzm);
}
if (config._nextDay) {
config._a[HOUR] = 24;
}
if (config._w && typeof config._w.d !== "undefined" && config._w.d !== expectedWeekday) {
getParsingFlags(config).weekdayMismatch = true;
}
}
function dayOfYearFromWeekInfo(config) {
var w, weekYear, week, weekday, dow, doy, temp, weekdayOverflow, curWeek;
w = config._w;
if (w.GG != null || w.W != null || w.E != null) {
dow = 1;
doy = 4;
weekYear = defaults(
w.GG,
config._a[YEAR],
weekOfYear(createLocal(), 1, 4).year
);
week = defaults(w.W, 1);
weekday = defaults(w.E, 1);
if (weekday < 1 || weekday > 7) {
weekdayOverflow = true;
}
} else {
dow = config._locale._week.dow;
doy = config._locale._week.doy;
curWeek = weekOfYear(createLocal(), dow, doy);
weekYear = defaults(w.gg, config._a[YEAR], curWeek.year);
week = defaults(w.w, curWeek.week);
if (w.d != null) {
weekday = w.d;
if (weekday < 0 || weekday > 6) {
weekdayOverflow = true;
}
} else if (w.e != null) {
weekday = w.e + dow;
if (w.e < 0 || w.e > 6) {
weekdayOverflow = true;
}
} else {
weekday = dow;
}
}
if (week < 1 || week > weeksInYear(weekYear, dow, doy)) {
getParsingFlags(config)._overflowWeeks = true;
} else if (weekdayOverflow != null) {
getParsingFlags(config)._overflowWeekday = true;
} else {
temp = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy);
config._a[YEAR] = temp.year;
config._dayOfYear = temp.dayOfYear;
}
}
hooks.ISO_8601 = function() {
};
hooks.RFC_2822 = function() {
};
function configFromStringAndFormat(config) {
if (config._f === hooks.ISO_8601) {
configFromISO(config);
return;
}
if (config._f === hooks.RFC_2822) {
configFromRFC2822(config);
return;
}
config._a = [];
getParsingFlags(config).empty = true;
var string = "" + config._i, i, parsedInput, tokens2, token2, skipped, stringLength = string.length, totalParsedInputLength = 0, era, tokenLen;
tokens2 = expandFormat(config._f, config._locale).match(formattingTokens) || [];
tokenLen = tokens2.length;
for (i = 0; i < tokenLen; i++) {
token2 = tokens2[i];
parsedInput = (string.match(getParseRegexForToken(token2, config)) || [])[0];
if (parsedInput) {
skipped = string.substr(0, string.indexOf(parsedInput));
if (skipped.length > 0) {
getParsingFlags(config).unusedInput.push(skipped);
}
string = string.slice(
string.indexOf(parsedInput) + parsedInput.length
);
totalParsedInputLength += parsedInput.length;
}
if (formatTokenFunctions[token2]) {
if (parsedInput) {
getParsingFlags(config).empty = false;
} else {
getParsingFlags(config).unusedTokens.push(token2);
}
addTimeToArrayFromToken(token2, parsedInput, config);
} else if (config._strict && !parsedInput) {
getParsingFlags(config).unusedTokens.push(token2);
}
}
getParsingFlags(config).charsLeftOver = stringLength - totalParsedInputLength;
if (string.length > 0) {
getParsingFlags(config).unusedInput.push(string);
}
if (config._a[HOUR] <= 12 && getParsingFlags(config).bigHour === true && config._a[HOUR] > 0) {
getParsingFlags(config).bigHour = void 0;
}
getParsingFlags(config).parsedDateParts = config._a.slice(0);
getParsingFlags(config).meridiem = config._meridiem;
config._a[HOUR] = meridiemFixWrap(
config._locale,
config._a[HOUR],
config._meridiem
);
era = getParsingFlags(config).era;
if (era !== null) {
config._a[YEAR] = config._locale.erasConvertYear(era, config._a[YEAR]);
}
configFromArray(config);
checkOverflow(config);
}
function meridiemFixWrap(locale2, hour, meridiem2) {
var isPm;
if (meridiem2 == null) {
return hour;
}
if (locale2.meridiemHour != null) {
return locale2.meridiemHour(hour, meridiem2);
} else if (locale2.isPM != null) {
isPm = locale2.isPM(meridiem2);
if (isPm && hour < 12) {
hour += 12;
}
if (!isPm && hour === 12) {
hour = 0;
}
return hour;
} else {
return hour;
}
}
function configFromStringAndArray(config) {
var tempConfig, bestMoment, scoreToBeat, i, currentScore, validFormatFound, bestFormatIsValid = false, configfLen = config._f.length;
if (configfLen === 0) {
getParsingFlags(config).invalidFormat = true;
config._d = /* @__PURE__ */ new Date(NaN);
return;
}
for (i = 0; i < configfLen; i++) {
currentScore = 0;
validFormatFound = false;
tempConfig = copyConfig({}, config);
if (config._useUTC != null) {
tempConfig._useUTC = config._useUTC;
}
tempConfig._f = config._f[i];
configFromStringAndFormat(tempConfig);
if (isValid(tempConfig)) {
validFormatFound = true;
}
currentScore += getParsingFlags(tempConfig).charsLeftOver;
currentScore += getParsingFlags(tempConfig).unusedTokens.length * 10;
getParsingFlags(tempConfig).score = currentScore;
if (!bestFormatIsValid) {
if (scoreToBeat == null || currentScore < scoreToBeat || validFormatFound) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
if (validFormatFound) {
bestFormatIsValid = true;
}
}
} else {
if (currentScore < scoreToBeat) {
scoreToBeat = currentScore;
bestMoment = tempConfig;
}
}
}
extend(config, bestMoment || tempConfig);
}
function configFromObject(config) {
if (config._d) {
return;
}
var i = normalizeObjectUnits(config._i), dayOrDate = i.day === void 0 ? i.date : i.day;
config._a = map(
[i.year, i.month, dayOrDate, i.hour, i.minute, i.second, i.millisecond],
function(obj) {
return obj && parseInt(obj, 10);
}
);
configFromArray(config);
}
function createFromConfig(config) {
var res = new Moment(checkOverflow(prepareConfig(config)));
if (res._nextDay) {
res.add(1, "d");
res._nextDay = void 0;
}
return res;
}
function prepareConfig(config) {
var input = config._i, format2 = config._f;
config._locale = config._locale || getLocale(config._l);
if (input === null || format2 === void 0 && input === "") {
return createInvalid({ nullInput: true });
}
if (typeof input === "string") {
config._i = input = config._locale.preparse(input);
}
if (isMoment(input)) {
return new Moment(checkOverflow(input));
} else if (isDate2(input)) {
config._d = input;
} else if (isArray(format2)) {
configFromStringAndArray(config);
} else if (format2) {
configFromStringAndFormat(config);
} else {
configFromInput(config);
}
if (!isValid(config)) {
config._d = null;
}
return config;
}
function configFromInput(config) {
var input = config._i;
if (isUndefined2(input)) {
config._d = new Date(hooks.now());
} else if (isDate2(input)) {
config._d = new Date(input.valueOf());
} else if (typeof input === "string") {
configFromString(config);
} else if (isArray(input)) {
config._a = map(input.slice(0), function(obj) {
return parseInt(obj, 10);
});
configFromArray(config);
} else if (isObject(input)) {
configFromObject(config);
} else if (isNumber2(input)) {
config._d = new Date(input);
} else {
hooks.createFromInputFallback(config);
}
}
function createLocalOrUTC(input, format2, locale2, strict, isUTC) {
var c = {};
if (format2 === true || format2 === false) {
strict = format2;
format2 = void 0;
}
if (locale2 === true || locale2 === false) {
strict = locale2;
locale2 = void 0;
}
if (isObject(input) && isObjectEmpty(input) || isArray(input) && input.length === 0) {
input = void 0;
}
c._isAMomentObject = true;
c._useUTC = c._isUTC = isUTC;
c._l = locale2;
c._i = input;
c._f = format2;
c._strict = strict;
return createFromConfig(c);
}
function createLocal(input, format2, locale2, strict) {
return createLocalOrUTC(input, format2, locale2, strict, false);
}
var prototypeMin = deprecate(
"moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",
function() {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other < this ? this : other;
} else {
return createInvalid();
}
}
), prototypeMax = deprecate(
"moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",
function() {
var other = createLocal.apply(null, arguments);
if (this.isValid() && other.isValid()) {
return other > this ? this : other;
} else {
return createInvalid();
}
}
);
function pickBy(fn, moments) {
var res, i;
if (moments.length === 1 && isArray(moments[0])) {
moments = moments[0];
}
if (!moments.length) {
return createLocal();
}
res = moments[0];
for (i = 1; i < moments.length; ++i) {
if (!moments[i].isValid() || moments[i][fn](res)) {
res = moments[i];
}
}
return res;
}
function min() {
var args = [].slice.call(arguments, 0);
return pickBy("isBefore", args);
}
function max() {
var args = [].slice.call(arguments, 0);
return pickBy("isAfter", args);
}
var now3 = function() {
return Date.now ? Date.now() : +/* @__PURE__ */ new Date();
};
var ordering = [
"year",
"quarter",
"month",
"week",
"day",
"hour",
"minute",
"second",
"millisecond"
];
function isDurationValid(m) {
var key2, unitHasDecimal = false, i, orderLen = ordering.length;
for (key2 in m) {
if (hasOwnProp(m, key2) && !(indexOf.call(ordering, key2) !== -1 && (m[key2] == null || !isNaN(m[key2])))) {
return false;
}
}
for (i = 0; i < orderLen; ++i) {
if (m[ordering[i]]) {
if (unitHasDecimal) {
return false;
}
if (parseFloat(m[ordering[i]]) !== toInt(m[ordering[i]])) {
unitHasDecimal = true;
}
}
}
return true;
}
function isValid$1() {
return this._isValid;
}
function createInvalid$1() {
return createDuration(NaN);
}
function Duration3(duration) {
var normalizedInput = normalizeObjectUnits(duration), years2 = normalizedInput.year || 0, quarters = normalizedInput.quarter || 0, months3 = normalizedInput.month || 0, weeks2 = normalizedInput.week || normalizedInput.isoWeek || 0, days2 = normalizedInput.day || 0, hours2 = normalizedInput.hour || 0, minutes2 = normalizedInput.minute || 0, seconds2 = normalizedInput.second || 0, milliseconds2 = normalizedInput.millisecond || 0;
this._isValid = isDurationValid(normalizedInput);
this._milliseconds = +milliseconds2 + seconds2 * 1e3 + // 1000
minutes2 * 6e4 + // 1000 * 60
hours2 * 1e3 * 60 * 60;
this._days = +days2 + weeks2 * 7;
this._months = +months3 + quarters * 3 + years2 * 12;
this._data = {};
this._locale = getLocale();
this._bubble();
}
function isDuration(obj) {
return obj instanceof Duration3;
}
function absRound(number) {
if (number < 0) {
return Math.round(-1 * number) * -1;
} else {
return Math.round(number);
}
}
function compareArrays(array1, array2, dontConvert) {
var len = Math.min(array1.length, array2.length), lengthDiff = Math.abs(array1.length - array2.length), diffs = 0, i;
for (i = 0; i < len; i++) {
if (dontConvert && array1[i] !== array2[i] || !dontConvert && toInt(array1[i]) !== toInt(array2[i])) {
diffs++;
}
}
return diffs + lengthDiff;
}
function offset2(token2, separator) {
addFormatToken(token2, 0, 0, function() {
var offset3 = this.utcOffset(), sign2 = "+";
if (offset3 < 0) {
offset3 = -offset3;
sign2 = "-";
}
return sign2 + zeroFill(~~(offset3 / 60), 2) + separator + zeroFill(~~offset3 % 60, 2);
});
}
offset2("Z", ":");
offset2("ZZ", "");
addRegexToken("Z", matchShortOffset);
addRegexToken("ZZ", matchShortOffset);
addParseToken(["Z", "ZZ"], function(input, array, config) {
config._useUTC = true;
config._tzm = offsetFromString(matchShortOffset, input);
});
var chunkOffset = /([\+\-]|\d\d)/gi;
function offsetFromString(matcher, string) {
var matches = (string || "").match(matcher), chunk, parts, minutes2;
if (matches === null) {
return null;
}
chunk = matches[matches.length - 1] || [];
parts = (chunk + "").match(chunkOffset) || ["-", 0, 0];
minutes2 = +(parts[1] * 60) + toInt(parts[2]);
return minutes2 === 0 ? 0 : parts[0] === "+" ? minutes2 : -minutes2;
}
function cloneWithOffset(input, model) {
var res, diff2;
if (model._isUTC) {
res = model.clone();
diff2 = (isMoment(input) || isDate2(input) ? input.valueOf() : createLocal(input).valueOf()) - res.valueOf();
res._d.setTime(res._d.valueOf() + diff2);
hooks.updateOffset(res, false);
return res;
} else {
return createLocal(input).local();
}
}
function getDateOffset(m) {
return -Math.round(m._d.getTimezoneOffset());
}
hooks.updateOffset = function() {
};
function getSetOffset(input, keepLocalTime, keepMinutes) {
var offset3 = this._offset || 0, localAdjust;
if (!this.isValid()) {
return input != null ? this : NaN;
}
if (input != null) {
if (typeof input === "string") {
input = offsetFromString(matchShortOffset, input);
if (input === null) {
return this;
}
} else if (Math.abs(input) < 16 && !keepMinutes) {
input = input * 60;
}
if (!this._isUTC && keepLocalTime) {
localAdjust = getDateOffset(this);
}
this._offset = input;
this._isUTC = true;
if (localAdjust != null) {
this.add(localAdjust, "m");
}
if (offset3 !== input) {
if (!keepLocalTime || this._changeInProgress) {
addSubtract(
this,
createDuration(input - offset3, "m"),
1,
false
);
} else if (!this._changeInProgress) {
this._changeInProgress = true;
hooks.updateOffset(this, true);
this._changeInProgress = null;
}
}
return this;
} else {
return this._isUTC ? offset3 : getDateOffset(this);
}
}
function getSetZone(input, keepLocalTime) {
if (input != null) {
if (typeof input !== "string") {
input = -input;
}
this.utcOffset(input, keepLocalTime);
return this;
} else {
return -this.utcOffset();
}
}
function setOffsetToUTC(keepLocalTime) {
return this.utcOffset(0, keepLocalTime);
}
function setOffsetToLocal(keepLocalTime) {
if (this._isUTC) {
this.utcOffset(0, keepLocalTime);
this._isUTC = false;
if (keepLocalTime) {
this.subtract(getDateOffset(this), "m");
}
}
return this;
}
function setOffsetToParsedOffset() {
if (this._tzm != null) {
this.utcOffset(this._tzm, false, true);
} else if (typeof this._i === "string") {
var tZone = offsetFromString(matchOffset, this._i);
if (tZone != null) {
this.utcOffset(tZone);
} else {
this.utcOffset(0, true);
}
}
return this;
}
function hasAlignedHourOffset(input) {
if (!this.isValid()) {
return false;
}
input = input ? createLocal(input).utcOffset() : 0;
return (this.utcOffset() - input) % 60 === 0;
}
function isDaylightSavingTime() {
return this.utcOffset() > this.clone().month(0).utcOffset() || this.utcOffset() > this.clone().month(5).utcOffset();
}
function isDaylightSavingTimeShifted() {
if (!isUndefined2(this._isDSTShifted)) {
return this._isDSTShifted;
}
var c = {}, other;
copyConfig(c, this);
c = prepareConfig(c);
if (c._a) {
other = c._isUTC ? createUTC(c._a) : createLocal(c._a);
this._isDSTShifted = this.isValid() && compareArrays(c._a, other.toArray()) > 0;
} else {
this._isDSTShifted = false;
}
return this._isDSTShifted;
}
function isLocal() {
return this.isValid() ? !this._isUTC : false;
}
function isUtcOffset() {
return this.isValid() ? this._isUTC : false;
}
function isUtc() {
return this.isValid() ? this._isUTC && this._offset === 0 : false;
}
var aspNetRegex = /^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/, isoRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
function createDuration(input, key2) {
var duration = input, match5 = null, sign2, ret, diffRes;
if (isDuration(input)) {
duration = {
ms: input._milliseconds,
d: input._days,
M: input._months
};
} else if (isNumber2(input) || !isNaN(+input)) {
duration = {};
if (key2) {
duration[key2] = +input;
} else {
duration.milliseconds = +input;
}
} else if (match5 = aspNetRegex.exec(input)) {
sign2 = match5[1] === "-" ? -1 : 1;
duration = {
y: 0,
d: toInt(match5[DATE]) * sign2,
h: toInt(match5[HOUR]) * sign2,
m: toInt(match5[MINUTE]) * sign2,
s: toInt(match5[SECOND]) * sign2,
ms: toInt(absRound(match5[MILLISECOND] * 1e3)) * sign2
// the millisecond decimal point is included in the match
};
} else if (match5 = isoRegex.exec(input)) {
sign2 = match5[1] === "-" ? -1 : 1;
duration = {
y: parseIso(match5[2], sign2),
M: parseIso(match5[3], sign2),
w: parseIso(match5[4], sign2),
d: parseIso(match5[5], sign2),
h: parseIso(match5[6], sign2),
m: parseIso(match5[7], sign2),
s: parseIso(match5[8], sign2)
};
} else if (duration == null) {
duration = {};
} else if (typeof duration === "object" && ("from" in duration || "to" in duration)) {
diffRes = momentsDifference(
createLocal(duration.from),
createLocal(duration.to)
);
duration = {};
duration.ms = diffRes.milliseconds;
duration.M = diffRes.months;
}
ret = new Duration3(duration);
if (isDuration(input) && hasOwnProp(input, "_locale")) {
ret._locale = input._locale;
}
if (isDuration(input) && hasOwnProp(input, "_isValid")) {
ret._isValid = input._isValid;
}
return ret;
}
createDuration.fn = Duration3.prototype;
createDuration.invalid = createInvalid$1;
function parseIso(inp, sign2) {
var res = inp && parseFloat(inp.replace(",", "."));
return (isNaN(res) ? 0 : res) * sign2;
}
function positiveMomentsDifference(base, other) {
var res = {};
res.months = other.month() - base.month() + (other.year() - base.year()) * 12;
if (base.clone().add(res.months, "M").isAfter(other)) {
--res.months;
}
res.milliseconds = +other - +base.clone().add(res.months, "M");
return res;
}
function momentsDifference(base, other) {
var res;
if (!(base.isValid() && other.isValid())) {
return { milliseconds: 0, months: 0 };
}
other = cloneWithOffset(other, base);
if (base.isBefore(other)) {
res = positiveMomentsDifference(base, other);
} else {
res = positiveMomentsDifference(other, base);
res.milliseconds = -res.milliseconds;
res.months = -res.months;
}
return res;
}
function createAdder(direction, name) {
return function(val, period) {
var dur, tmp;
if (period !== null && !isNaN(+period)) {
deprecateSimple(
name,
"moment()." + name + "(period, number) is deprecated. Please use moment()." + name + "(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."
);
tmp = val;
val = period;
period = tmp;
}
dur = createDuration(val, period);
addSubtract(this, dur, direction);
return this;
};
}
function addSubtract(mom, duration, isAdding, updateOffset) {
var milliseconds2 = duration._milliseconds, days2 = absRound(duration._days), months3 = absRound(duration._months);
if (!mom.isValid()) {
return;
}
updateOffset = updateOffset == null ? true : updateOffset;
if (months3) {
setMonth(mom, get(mom, "Month") + months3 * isAdding);
}
if (days2) {
set$1(mom, "Date", get(mom, "Date") + days2 * isAdding);
}
if (milliseconds2) {
mom._d.setTime(mom._d.valueOf() + milliseconds2 * isAdding);
}
if (updateOffset) {
hooks.updateOffset(mom, days2 || months3);
}
}
var add2 = createAdder(1, "add"), subtract2 = createAdder(-1, "subtract");
function isString2(input) {
return typeof input === "string" || input instanceof String;
}
function isMomentInput(input) {
return isMoment(input) || isDate2(input) || isString2(input) || isNumber2(input) || isNumberOrStringArray(input) || isMomentInputObject(input) || input === null || input === void 0;
}
function isMomentInputObject(input) {
var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties2 = [
"years",
"year",
"y",
"months",
"month",
"M",
"days",
"day",
"d",
"dates",
"date",
"D",
"hours",
"hour",
"h",
"minutes",
"minute",
"m",
"seconds",
"second",
"s",
"milliseconds",
"millisecond",
"ms"
], i, property, propertyLen = properties2.length;
for (i = 0; i < propertyLen; i += 1) {
property = properties2[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function isNumberOrStringArray(input) {
var arrayTest = isArray(input), dataTypeTest = false;
if (arrayTest) {
dataTypeTest = input.filter(function(item) {
return !isNumber2(item) && isString2(input);
}).length === 0;
}
return arrayTest && dataTypeTest;
}
function isCalendarSpec(input) {
var objectTest = isObject(input) && !isObjectEmpty(input), propertyTest = false, properties2 = [
"sameDay",
"nextDay",
"lastDay",
"nextWeek",
"lastWeek",
"sameElse"
], i, property;
for (i = 0; i < properties2.length; i += 1) {
property = properties2[i];
propertyTest = propertyTest || hasOwnProp(input, property);
}
return objectTest && propertyTest;
}
function getCalendarFormat(myMoment, now4) {
var diff2 = myMoment.diff(now4, "days", true);
return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse";
}
function calendar$1(time, formats) {
if (arguments.length === 1) {
if (!arguments[0]) {
time = void 0;
formats = void 0;
} else if (isMomentInput(arguments[0])) {
time = arguments[0];
formats = void 0;
} else if (isCalendarSpec(arguments[0])) {
formats = arguments[0];
time = void 0;
}
}
var now4 = time || createLocal(), sod = cloneWithOffset(now4, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format2]) ? formats[format2].call(this, now4) : formats[format2]);
return this.format(
output || this.localeData().calendar(format2, this, createLocal(now4))
);
}
function clone3() {
return new Moment(this);
}
function isAfter(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || "millisecond";
if (units === "millisecond") {
return this.valueOf() > localInput.valueOf();
} else {
return localInput.valueOf() < this.clone().startOf(units).valueOf();
}
}
function isBefore(input, units) {
var localInput = isMoment(input) ? input : createLocal(input);
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || "millisecond";
if (units === "millisecond") {
return this.valueOf() < localInput.valueOf();
} else {
return this.clone().endOf(units).valueOf() < localInput.valueOf();
}
}
function isBetween(from2, to2, units, inclusivity) {
var localFrom = isMoment(from2) ? from2 : createLocal(from2), localTo = isMoment(to2) ? to2 : createLocal(to2);
if (!(this.isValid() && localFrom.isValid() && localTo.isValid())) {
return false;
}
inclusivity = inclusivity || "()";
return (inclusivity[0] === "(" ? this.isAfter(localFrom, units) : !this.isBefore(localFrom, units)) && (inclusivity[1] === ")" ? this.isBefore(localTo, units) : !this.isAfter(localTo, units));
}
function isSame(input, units) {
var localInput = isMoment(input) ? input : createLocal(input), inputMs;
if (!(this.isValid() && localInput.isValid())) {
return false;
}
units = normalizeUnits(units) || "millisecond";
if (units === "millisecond") {
return this.valueOf() === localInput.valueOf();
} else {
inputMs = localInput.valueOf();
return this.clone().startOf(units).valueOf() <= inputMs && inputMs <= this.clone().endOf(units).valueOf();
}
}
function isSameOrAfter(input, units) {
return this.isSame(input, units) || this.isAfter(input, units);
}
function isSameOrBefore(input, units) {
return this.isSame(input, units) || this.isBefore(input, units);
}
function diff(input, units, asFloat) {
var that, zoneDelta, output;
if (!this.isValid()) {
return NaN;
}
that = cloneWithOffset(input, this);
if (!that.isValid()) {
return NaN;
}
zoneDelta = (that.utcOffset() - this.utcOffset()) * 6e4;
units = normalizeUnits(units);
switch (units) {
case "year":
output = monthDiff(this, that) / 12;
break;
case "month":
output = monthDiff(this, that);
break;
case "quarter":
output = monthDiff(this, that) / 3;
break;
case "second":
output = (this - that) / 1e3;
break;
case "minute":
output = (this - that) / 6e4;
break;
case "hour":
output = (this - that) / 36e5;
break;
case "day":
output = (this - that - zoneDelta) / 864e5;
break;
case "week":
output = (this - that - zoneDelta) / 6048e5;
break;
default:
output = this - that;
}
return asFloat ? output : absFloor(output);
}
function monthDiff(a, b) {
if (a.date() < b.date()) {
return -monthDiff(b, a);
}
var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month()), anchor = a.clone().add(wholeMonthDiff, "months"), anchor2, adjust;
if (b - anchor < 0) {
anchor2 = a.clone().add(wholeMonthDiff - 1, "months");
adjust = (b - anchor) / (anchor - anchor2);
} else {
anchor2 = a.clone().add(wholeMonthDiff + 1, "months");
adjust = (b - anchor) / (anchor2 - anchor);
}
return -(wholeMonthDiff + adjust) || 0;
}
hooks.defaultFormat = "YYYY-MM-DDTHH:mm:ssZ";
hooks.defaultFormatUtc = "YYYY-MM-DDTHH:mm:ss[Z]";
function toString() {
return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ");
}
function toISOString(keepOffset) {
if (!this.isValid()) {
return null;
}
var utc = keepOffset !== true, m = utc ? this.clone().utc() : this;
if (m.year() < 0 || m.year() > 9999) {
return formatMoment(
m,
utc ? "YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"
);
}
if (isFunction(Date.prototype.toISOString)) {
if (utc) {
return this.toDate().toISOString();
} else {
return new Date(this.valueOf() + this.utcOffset() * 60 * 1e3).toISOString().replace("Z", formatMoment(m, "Z"));
}
}
return formatMoment(
m,
utc ? "YYYY-MM-DD[T]HH:mm:ss.SSS[Z]" : "YYYY-MM-DD[T]HH:mm:ss.SSSZ"
);
}
function inspect() {
if (!this.isValid()) {
return "moment.invalid(/* " + this._i + " */)";
}
var func = "moment", zone = "", prefix2, year, datetime, suffix;
if (!this.isLocal()) {
func = this.utcOffset() === 0 ? "moment.utc" : "moment.parseZone";
zone = "Z";
}
prefix2 = "[" + func + '("]';
year = 0 <= this.year() && this.year() <= 9999 ? "YYYY" : "YYYYYY";
datetime = "-MM-DD[T]HH:mm:ss.SSS";
suffix = zone + '[")]';
return this.format(prefix2 + year + datetime + suffix);
}
function format(inputString) {
if (!inputString) {
inputString = this.isUtc() ? hooks.defaultFormatUtc : hooks.defaultFormat;
}
var output = formatMoment(this, inputString);
return this.localeData().postformat(output);
}
function from(time, withoutSuffix) {
if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
return createDuration({ to: this, from: time }).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function fromNow(withoutSuffix) {
return this.from(createLocal(), withoutSuffix);
}
function to(time, withoutSuffix) {
if (this.isValid() && (isMoment(time) && time.isValid() || createLocal(time).isValid())) {
return createDuration({ from: this, to: time }).locale(this.locale()).humanize(!withoutSuffix);
} else {
return this.localeData().invalidDate();
}
}
function toNow(withoutSuffix) {
return this.to(createLocal(), withoutSuffix);
}
function locale(key2) {
var newLocaleData;
if (key2 === void 0) {
return this._locale._abbr;
} else {
newLocaleData = getLocale(key2);
if (newLocaleData != null) {
this._locale = newLocaleData;
}
return this;
}
}
var lang = deprecate(
"moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",
function(key2) {
if (key2 === void 0) {
return this.localeData();
} else {
return this.locale(key2);
}
}
);
function localeData() {
return this._locale;
}
var MS_PER_SECOND = 1e3, MS_PER_MINUTE = 60 * MS_PER_SECOND, MS_PER_HOUR = 60 * MS_PER_MINUTE, MS_PER_400_YEARS = (365 * 400 + 97) * 24 * MS_PER_HOUR;
function mod$1(dividend, divisor) {
return (dividend % divisor + divisor) % divisor;
}
function localStartOfDate(y, m, d) {
if (y < 100 && y >= 0) {
return new Date(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return new Date(y, m, d).valueOf();
}
}
function utcStartOfDate(y, m, d) {
if (y < 100 && y >= 0) {
return Date.UTC(y + 400, m, d) - MS_PER_400_YEARS;
} else {
return Date.UTC(y, m, d);
}
}
function startOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === void 0 || units === "millisecond" || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case "year":
time = startOfDate(this.year(), 0, 1);
break;
case "quarter":
time = startOfDate(
this.year(),
this.month() - this.month() % 3,
1
);
break;
case "month":
time = startOfDate(this.year(), this.month(), 1);
break;
case "week":
time = startOfDate(
this.year(),
this.month(),
this.date() - this.weekday()
);
break;
case "isoWeek":
time = startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1)
);
break;
case "day":
case "date":
time = startOfDate(this.year(), this.month(), this.date());
break;
case "hour":
time = this._d.valueOf();
time -= mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
);
break;
case "minute":
time = this._d.valueOf();
time -= mod$1(time, MS_PER_MINUTE);
break;
case "second":
time = this._d.valueOf();
time -= mod$1(time, MS_PER_SECOND);
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function endOf(units) {
var time, startOfDate;
units = normalizeUnits(units);
if (units === void 0 || units === "millisecond" || !this.isValid()) {
return this;
}
startOfDate = this._isUTC ? utcStartOfDate : localStartOfDate;
switch (units) {
case "year":
time = startOfDate(this.year() + 1, 0, 1) - 1;
break;
case "quarter":
time = startOfDate(
this.year(),
this.month() - this.month() % 3 + 3,
1
) - 1;
break;
case "month":
time = startOfDate(this.year(), this.month() + 1, 1) - 1;
break;
case "week":
time = startOfDate(
this.year(),
this.month(),
this.date() - this.weekday() + 7
) - 1;
break;
case "isoWeek":
time = startOfDate(
this.year(),
this.month(),
this.date() - (this.isoWeekday() - 1) + 7
) - 1;
break;
case "day":
case "date":
time = startOfDate(this.year(), this.month(), this.date() + 1) - 1;
break;
case "hour":
time = this._d.valueOf();
time += MS_PER_HOUR - mod$1(
time + (this._isUTC ? 0 : this.utcOffset() * MS_PER_MINUTE),
MS_PER_HOUR
) - 1;
break;
case "minute":
time = this._d.valueOf();
time += MS_PER_MINUTE - mod$1(time, MS_PER_MINUTE) - 1;
break;
case "second":
time = this._d.valueOf();
time += MS_PER_SECOND - mod$1(time, MS_PER_SECOND) - 1;
break;
}
this._d.setTime(time);
hooks.updateOffset(this, true);
return this;
}
function valueOf() {
return this._d.valueOf() - (this._offset || 0) * 6e4;
}
function unix() {
return Math.floor(this.valueOf() / 1e3);
}
function toDate() {
return new Date(this.valueOf());
}
function toArray() {
var m = this;
return [
m.year(),
m.month(),
m.date(),
m.hour(),
m.minute(),
m.second(),
m.millisecond()
];
}
function toObject() {
var m = this;
return {
years: m.year(),
months: m.month(),
date: m.date(),
hours: m.hours(),
minutes: m.minutes(),
seconds: m.seconds(),
milliseconds: m.milliseconds()
};
}
function toJSON() {
return this.isValid() ? this.toISOString() : null;
}
function isValid$2() {
return isValid(this);
}
function parsingFlags() {
return extend({}, getParsingFlags(this));
}
function invalidAt() {
return getParsingFlags(this).overflow;
}
function creationData() {
return {
input: this._i,
format: this._f,
locale: this._locale,
isUTC: this._isUTC,
strict: this._strict
};
}
addFormatToken("N", 0, 0, "eraAbbr");
addFormatToken("NN", 0, 0, "eraAbbr");
addFormatToken("NNN", 0, 0, "eraAbbr");
addFormatToken("NNNN", 0, 0, "eraName");
addFormatToken("NNNNN", 0, 0, "eraNarrow");
addFormatToken("y", ["y", 1], "yo", "eraYear");
addFormatToken("y", ["yy", 2], 0, "eraYear");
addFormatToken("y", ["yyy", 3], 0, "eraYear");
addFormatToken("y", ["yyyy", 4], 0, "eraYear");
addRegexToken("N", matchEraAbbr);
addRegexToken("NN", matchEraAbbr);
addRegexToken("NNN", matchEraAbbr);
addRegexToken("NNNN", matchEraName);
addRegexToken("NNNNN", matchEraNarrow);
addParseToken(
["N", "NN", "NNN", "NNNN", "NNNNN"],
function(input, array, config, token2) {
var era = config._locale.erasParse(input, token2, config._strict);
if (era) {
getParsingFlags(config).era = era;
} else {
getParsingFlags(config).invalidEra = input;
}
}
);
addRegexToken("y", matchUnsigned);
addRegexToken("yy", matchUnsigned);
addRegexToken("yyy", matchUnsigned);
addRegexToken("yyyy", matchUnsigned);
addRegexToken("yo", matchEraYearOrdinal);
addParseToken(["y", "yy", "yyy", "yyyy"], YEAR);
addParseToken(["yo"], function(input, array, config, token2) {
var match5;
if (config._locale._eraYearOrdinalRegex) {
match5 = input.match(config._locale._eraYearOrdinalRegex);
}
if (config._locale.eraYearOrdinalParse) {
array[YEAR] = config._locale.eraYearOrdinalParse(input, match5);
} else {
array[YEAR] = parseInt(input, 10);
}
});
function localeEras(m, format2) {
var i, l2, date, eras2 = this._eras || getLocale("en")._eras;
for (i = 0, l2 = eras2.length; i < l2; ++i) {
switch (typeof eras2[i].since) {
case "string":
date = hooks(eras2[i].since).startOf("day");
eras2[i].since = date.valueOf();
break;
}
switch (typeof eras2[i].until) {
case "undefined":
eras2[i].until = Infinity;
break;
case "string":
date = hooks(eras2[i].until).startOf("day").valueOf();
eras2[i].until = date.valueOf();
break;
}
}
return eras2;
}
function localeErasParse(eraName, format2, strict) {
var i, l2, eras2 = this.eras(), name, abbr, narrow;
eraName = eraName.toUpperCase();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
name = eras2[i].name.toUpperCase();
abbr = eras2[i].abbr.toUpperCase();
narrow = eras2[i].narrow.toUpperCase();
if (strict) {
switch (format2) {
case "N":
case "NN":
case "NNN":
if (abbr === eraName) {
return eras2[i];
}
break;
case "NNNN":
if (name === eraName) {
return eras2[i];
}
break;
case "NNNNN":
if (narrow === eraName) {
return eras2[i];
}
break;
}
} else if ([name, abbr, narrow].indexOf(eraName) >= 0) {
return eras2[i];
}
}
}
function localeErasConvertYear(era, year) {
var dir = era.since <= era.until ? 1 : -1;
if (year === void 0) {
return hooks(era.since).year();
} else {
return hooks(era.since).year() + (year - era.offset) * dir;
}
}
function getEraName() {
var i, l2, val, eras2 = this.localeData().eras();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
val = this.clone().startOf("day").valueOf();
if (eras2[i].since <= val && val <= eras2[i].until) {
return eras2[i].name;
}
if (eras2[i].until <= val && val <= eras2[i].since) {
return eras2[i].name;
}
}
return "";
}
function getEraNarrow() {
var i, l2, val, eras2 = this.localeData().eras();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
val = this.clone().startOf("day").valueOf();
if (eras2[i].since <= val && val <= eras2[i].until) {
return eras2[i].narrow;
}
if (eras2[i].until <= val && val <= eras2[i].since) {
return eras2[i].narrow;
}
}
return "";
}
function getEraAbbr() {
var i, l2, val, eras2 = this.localeData().eras();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
val = this.clone().startOf("day").valueOf();
if (eras2[i].since <= val && val <= eras2[i].until) {
return eras2[i].abbr;
}
if (eras2[i].until <= val && val <= eras2[i].since) {
return eras2[i].abbr;
}
}
return "";
}
function getEraYear() {
var i, l2, dir, val, eras2 = this.localeData().eras();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
dir = eras2[i].since <= eras2[i].until ? 1 : -1;
val = this.clone().startOf("day").valueOf();
if (eras2[i].since <= val && val <= eras2[i].until || eras2[i].until <= val && val <= eras2[i].since) {
return (this.year() - hooks(eras2[i].since).year()) * dir + eras2[i].offset;
}
}
return this.year();
}
function erasNameRegex(isStrict) {
if (!hasOwnProp(this, "_erasNameRegex")) {
computeErasParse.call(this);
}
return isStrict ? this._erasNameRegex : this._erasRegex;
}
function erasAbbrRegex(isStrict) {
if (!hasOwnProp(this, "_erasAbbrRegex")) {
computeErasParse.call(this);
}
return isStrict ? this._erasAbbrRegex : this._erasRegex;
}
function erasNarrowRegex(isStrict) {
if (!hasOwnProp(this, "_erasNarrowRegex")) {
computeErasParse.call(this);
}
return isStrict ? this._erasNarrowRegex : this._erasRegex;
}
function matchEraAbbr(isStrict, locale2) {
return locale2.erasAbbrRegex(isStrict);
}
function matchEraName(isStrict, locale2) {
return locale2.erasNameRegex(isStrict);
}
function matchEraNarrow(isStrict, locale2) {
return locale2.erasNarrowRegex(isStrict);
}
function matchEraYearOrdinal(isStrict, locale2) {
return locale2._eraYearOrdinalRegex || matchUnsigned;
}
function computeErasParse() {
var abbrPieces = [], namePieces = [], narrowPieces = [], mixedPieces = [], i, l2, erasName, erasAbbr, erasNarrow2, eras2 = this.eras();
for (i = 0, l2 = eras2.length; i < l2; ++i) {
erasName = regexEscape(eras2[i].name);
erasAbbr = regexEscape(eras2[i].abbr);
erasNarrow2 = regexEscape(eras2[i].narrow);
namePieces.push(erasName);
abbrPieces.push(erasAbbr);
narrowPieces.push(erasNarrow2);
mixedPieces.push(erasName);
mixedPieces.push(erasAbbr);
mixedPieces.push(erasNarrow2);
}
this._erasRegex = new RegExp("^(" + mixedPieces.join("|") + ")", "i");
this._erasNameRegex = new RegExp("^(" + namePieces.join("|") + ")", "i");
this._erasAbbrRegex = new RegExp("^(" + abbrPieces.join("|") + ")", "i");
this._erasNarrowRegex = new RegExp(
"^(" + narrowPieces.join("|") + ")",
"i"
);
}
addFormatToken(0, ["gg", 2], 0, function() {
return this.weekYear() % 100;
});
addFormatToken(0, ["GG", 2], 0, function() {
return this.isoWeekYear() % 100;
});
function addWeekYearFormatToken(token2, getter) {
addFormatToken(0, [token2, token2.length], 0, getter);
}
addWeekYearFormatToken("gggg", "weekYear");
addWeekYearFormatToken("ggggg", "weekYear");
addWeekYearFormatToken("GGGG", "isoWeekYear");
addWeekYearFormatToken("GGGGG", "isoWeekYear");
addRegexToken("G", matchSigned);
addRegexToken("g", matchSigned);
addRegexToken("GG", match1to2, match2);
addRegexToken("gg", match1to2, match2);
addRegexToken("GGGG", match1to4, match4);
addRegexToken("gggg", match1to4, match4);
addRegexToken("GGGGG", match1to6, match6);
addRegexToken("ggggg", match1to6, match6);
addWeekParseToken(
["gggg", "ggggg", "GGGG", "GGGGG"],
function(input, week, config, token2) {
week[token2.substr(0, 2)] = toInt(input);
}
);
addWeekParseToken(["gg", "GG"], function(input, week, config, token2) {
week[token2] = hooks.parseTwoDigitYear(input);
});
function getSetWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.week(),
this.weekday() + this.localeData()._week.dow,
this.localeData()._week.dow,
this.localeData()._week.doy
);
}
function getSetISOWeekYear(input) {
return getSetWeekYearHelper.call(
this,
input,
this.isoWeek(),
this.isoWeekday(),
1,
4
);
}
function getISOWeeksInYear() {
return weeksInYear(this.year(), 1, 4);
}
function getISOWeeksInISOWeekYear() {
return weeksInYear(this.isoWeekYear(), 1, 4);
}
function getWeeksInYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.year(), weekInfo.dow, weekInfo.doy);
}
function getWeeksInWeekYear() {
var weekInfo = this.localeData()._week;
return weeksInYear(this.weekYear(), weekInfo.dow, weekInfo.doy);
}
function getSetWeekYearHelper(input, week, weekday, dow, doy) {
var weeksTarget;
if (input == null) {
return weekOfYear(this, dow, doy).year;
} else {
weeksTarget = weeksInYear(input, dow, doy);
if (week > weeksTarget) {
week = weeksTarget;
}
return setWeekAll.call(this, input, week, weekday, dow, doy);
}
}
function setWeekAll(weekYear, week, weekday, dow, doy) {
var dayOfYearData = dayOfYearFromWeeks(weekYear, week, weekday, dow, doy), date = createUTCDate(dayOfYearData.year, 0, dayOfYearData.dayOfYear);
this.year(date.getUTCFullYear());
this.month(date.getUTCMonth());
this.date(date.getUTCDate());
return this;
}
addFormatToken("Q", 0, "Qo", "quarter");
addRegexToken("Q", match1);
addParseToken("Q", function(input, array) {
array[MONTH] = (toInt(input) - 1) * 3;
});
function getSetQuarter(input) {
return input == null ? Math.ceil((this.month() + 1) / 3) : this.month((input - 1) * 3 + this.month() % 3);
}
addFormatToken("D", ["DD", 2], "Do", "date");
addRegexToken("D", match1to2, match1to2NoLeadingZero);
addRegexToken("DD", match1to2, match2);
addRegexToken("Do", function(isStrict, locale2) {
return isStrict ? locale2._dayOfMonthOrdinalParse || locale2._ordinalParse : locale2._dayOfMonthOrdinalParseLenient;
});
addParseToken(["D", "DD"], DATE);
addParseToken("Do", function(input, array) {
array[DATE] = toInt(input.match(match1to2)[0]);
});
var getSetDayOfMonth = makeGetSet("Date", true);
addFormatToken("DDD", ["DDDD", 3], "DDDo", "dayOfYear");
addRegexToken("DDD", match1to3);
addRegexToken("DDDD", match3);
addParseToken(["DDD", "DDDD"], function(input, array, config) {
config._dayOfYear = toInt(input);
});
function getSetDayOfYear(input) {
var dayOfYear = Math.round(
(this.clone().startOf("day") - this.clone().startOf("year")) / 864e5
) + 1;
return input == null ? dayOfYear : this.add(input - dayOfYear, "d");
}
addFormatToken("m", ["mm", 2], 0, "minute");
addRegexToken("m", match1to2, match1to2HasZero);
addRegexToken("mm", match1to2, match2);
addParseToken(["m", "mm"], MINUTE);
var getSetMinute = makeGetSet("Minutes", false);
addFormatToken("s", ["ss", 2], 0, "second");
addRegexToken("s", match1to2, match1to2HasZero);
addRegexToken("ss", match1to2, match2);
addParseToken(["s", "ss"], SECOND);
var getSetSecond = makeGetSet("Seconds", false);
addFormatToken("S", 0, 0, function() {
return ~~(this.millisecond() / 100);
});
addFormatToken(0, ["SS", 2], 0, function() {
return ~~(this.millisecond() / 10);
});
addFormatToken(0, ["SSS", 3], 0, "millisecond");
addFormatToken(0, ["SSSS", 4], 0, function() {
return this.millisecond() * 10;
});
addFormatToken(0, ["SSSSS", 5], 0, function() {
return this.millisecond() * 100;
});
addFormatToken(0, ["SSSSSS", 6], 0, function() {
return this.millisecond() * 1e3;
});
addFormatToken(0, ["SSSSSSS", 7], 0, function() {
return this.millisecond() * 1e4;
});
addFormatToken(0, ["SSSSSSSS", 8], 0, function() {
return this.millisecond() * 1e5;
});
addFormatToken(0, ["SSSSSSSSS", 9], 0, function() {
return this.millisecond() * 1e6;
});
addRegexToken("S", match1to3, match1);
addRegexToken("SS", match1to3, match2);
addRegexToken("SSS", match1to3, match3);
var token, getSetMillisecond;
for (token = "SSSS"; token.length <= 9; token += "S") {
addRegexToken(token, matchUnsigned);
}
function parseMs(input, array) {
array[MILLISECOND] = toInt(("0." + input) * 1e3);
}
for (token = "S"; token.length <= 9; token += "S") {
addParseToken(token, parseMs);
}
getSetMillisecond = makeGetSet("Milliseconds", false);
addFormatToken("z", 0, 0, "zoneAbbr");
addFormatToken("zz", 0, 0, "zoneName");
function getZoneAbbr() {
return this._isUTC ? "UTC" : "";
}
function getZoneName() {
return this._isUTC ? "Coordinated Universal Time" : "";
}
var proto = Moment.prototype;
proto.add = add2;
proto.calendar = calendar$1;
proto.clone = clone3;
proto.diff = diff;
proto.endOf = endOf;
proto.format = format;
proto.from = from;
proto.fromNow = fromNow;
proto.to = to;
proto.toNow = toNow;
proto.get = stringGet;
proto.invalidAt = invalidAt;
proto.isAfter = isAfter;
proto.isBefore = isBefore;
proto.isBetween = isBetween;
proto.isSame = isSame;
proto.isSameOrAfter = isSameOrAfter;
proto.isSameOrBefore = isSameOrBefore;
proto.isValid = isValid$2;
proto.lang = lang;
proto.locale = locale;
proto.localeData = localeData;
proto.max = prototypeMax;
proto.min = prototypeMin;
proto.parsingFlags = parsingFlags;
proto.set = stringSet;
proto.startOf = startOf;
proto.subtract = subtract2;
proto.toArray = toArray;
proto.toObject = toObject;
proto.toDate = toDate;
proto.toISOString = toISOString;
proto.inspect = inspect;
if (typeof Symbol !== "undefined" && Symbol.for != null) {
proto[Symbol.for("nodejs.util.inspect.custom")] = function() {
return "Moment<" + this.format() + ">";
};
}
proto.toJSON = toJSON;
proto.toString = toString;
proto.unix = unix;
proto.valueOf = valueOf;
proto.creationData = creationData;
proto.eraName = getEraName;
proto.eraNarrow = getEraNarrow;
proto.eraAbbr = getEraAbbr;
proto.eraYear = getEraYear;
proto.year = getSetYear;
proto.isLeapYear = getIsLeapYear;
proto.weekYear = getSetWeekYear;
proto.isoWeekYear = getSetISOWeekYear;
proto.quarter = proto.quarters = getSetQuarter;
proto.month = getSetMonth;
proto.daysInMonth = getDaysInMonth;
proto.week = proto.weeks = getSetWeek;
proto.isoWeek = proto.isoWeeks = getSetISOWeek;
proto.weeksInYear = getWeeksInYear;
proto.weeksInWeekYear = getWeeksInWeekYear;
proto.isoWeeksInYear = getISOWeeksInYear;
proto.isoWeeksInISOWeekYear = getISOWeeksInISOWeekYear;
proto.date = getSetDayOfMonth;
proto.day = proto.days = getSetDayOfWeek;
proto.weekday = getSetLocaleDayOfWeek;
proto.isoWeekday = getSetISODayOfWeek;
proto.dayOfYear = getSetDayOfYear;
proto.hour = proto.hours = getSetHour;
proto.minute = proto.minutes = getSetMinute;
proto.second = proto.seconds = getSetSecond;
proto.millisecond = proto.milliseconds = getSetMillisecond;
proto.utcOffset = getSetOffset;
proto.utc = setOffsetToUTC;
proto.local = setOffsetToLocal;
proto.parseZone = setOffsetToParsedOffset;
proto.hasAlignedHourOffset = hasAlignedHourOffset;
proto.isDST = isDaylightSavingTime;
proto.isLocal = isLocal;
proto.isUtcOffset = isUtcOffset;
proto.isUtc = isUtc;
proto.isUTC = isUtc;
proto.zoneAbbr = getZoneAbbr;
proto.zoneName = getZoneName;
proto.dates = deprecate(
"dates accessor is deprecated. Use date instead.",
getSetDayOfMonth
);
proto.months = deprecate(
"months accessor is deprecated. Use month instead",
getSetMonth
);
proto.years = deprecate(
"years accessor is deprecated. Use year instead",
getSetYear
);
proto.zone = deprecate(
"moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",
getSetZone
);
proto.isDSTShifted = deprecate(
"isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",
isDaylightSavingTimeShifted
);
function createUnix(input) {
return createLocal(input * 1e3);
}
function createInZone() {
return createLocal.apply(null, arguments).parseZone();
}
function preParsePostFormat(string) {
return string;
}
var proto$1 = Locale2.prototype;
proto$1.calendar = calendar;
proto$1.longDateFormat = longDateFormat;
proto$1.invalidDate = invalidDate;
proto$1.ordinal = ordinal;
proto$1.preparse = preParsePostFormat;
proto$1.postformat = preParsePostFormat;
proto$1.relativeTime = relativeTime;
proto$1.pastFuture = pastFuture;
proto$1.set = set2;
proto$1.eras = localeEras;
proto$1.erasParse = localeErasParse;
proto$1.erasConvertYear = localeErasConvertYear;
proto$1.erasAbbrRegex = erasAbbrRegex;
proto$1.erasNameRegex = erasNameRegex;
proto$1.erasNarrowRegex = erasNarrowRegex;
proto$1.months = localeMonths;
proto$1.monthsShort = localeMonthsShort;
proto$1.monthsParse = localeMonthsParse;
proto$1.monthsRegex = monthsRegex;
proto$1.monthsShortRegex = monthsShortRegex;
proto$1.week = localeWeek;
proto$1.firstDayOfYear = localeFirstDayOfYear;
proto$1.firstDayOfWeek = localeFirstDayOfWeek;
proto$1.weekdays = localeWeekdays;
proto$1.weekdaysMin = localeWeekdaysMin;
proto$1.weekdaysShort = localeWeekdaysShort;
proto$1.weekdaysParse = localeWeekdaysParse;
proto$1.weekdaysRegex = weekdaysRegex;
proto$1.weekdaysShortRegex = weekdaysShortRegex;
proto$1.weekdaysMinRegex = weekdaysMinRegex;
proto$1.isPM = localeIsPM;
proto$1.meridiem = localeMeridiem;
function get$1(format2, index, field, setter) {
var locale2 = getLocale(), utc = createUTC().set(setter, index);
return locale2[field](utc, format2);
}
function listMonthsImpl(format2, index, field) {
if (isNumber2(format2)) {
index = format2;
format2 = void 0;
}
format2 = format2 || "";
if (index != null) {
return get$1(format2, index, field, "month");
}
var i, out = [];
for (i = 0; i < 12; i++) {
out[i] = get$1(format2, i, field, "month");
}
return out;
}
function listWeekdaysImpl(localeSorted, format2, index, field) {
if (typeof localeSorted === "boolean") {
if (isNumber2(format2)) {
index = format2;
format2 = void 0;
}
format2 = format2 || "";
} else {
format2 = localeSorted;
index = format2;
localeSorted = false;
if (isNumber2(format2)) {
index = format2;
format2 = void 0;
}
format2 = format2 || "";
}
var locale2 = getLocale(), shift = localeSorted ? locale2._week.dow : 0, i, out = [];
if (index != null) {
return get$1(format2, (index + shift) % 7, field, "day");
}
for (i = 0; i < 7; i++) {
out[i] = get$1(format2, (i + shift) % 7, field, "day");
}
return out;
}
function listMonths(format2, index) {
return listMonthsImpl(format2, index, "months");
}
function listMonthsShort(format2, index) {
return listMonthsImpl(format2, index, "monthsShort");
}
function listWeekdays(localeSorted, format2, index) {
return listWeekdaysImpl(localeSorted, format2, index, "weekdays");
}
function listWeekdaysShort(localeSorted, format2, index) {
return listWeekdaysImpl(localeSorted, format2, index, "weekdaysShort");
}
function listWeekdaysMin(localeSorted, format2, index) {
return listWeekdaysImpl(localeSorted, format2, index, "weekdaysMin");
}
getSetGlobalLocale("en", {
eras: [
{
since: "0001-01-01",
until: Infinity,
offset: 1,
name: "Anno Domini",
narrow: "AD",
abbr: "AD"
},
{
since: "0000-12-31",
until: -Infinity,
offset: 1,
name: "Before Christ",
narrow: "BC",
abbr: "BC"
}
],
dayOfMonthOrdinalParse: /\d{1,2}(th|st|nd|rd)/,
ordinal: function(number) {
var b = number % 10, output = toInt(number % 100 / 10) === 1 ? "th" : b === 1 ? "st" : b === 2 ? "nd" : b === 3 ? "rd" : "th";
return number + output;
}
});
hooks.lang = deprecate(
"moment.lang is deprecated. Use moment.locale instead.",
getSetGlobalLocale
);
hooks.langData = deprecate(
"moment.langData is deprecated. Use moment.localeData instead.",
getLocale
);
var mathAbs = Math.abs;
function abs() {
var data = this._data;
this._milliseconds = mathAbs(this._milliseconds);
this._days = mathAbs(this._days);
this._months = mathAbs(this._months);
data.milliseconds = mathAbs(data.milliseconds);
data.seconds = mathAbs(data.seconds);
data.minutes = mathAbs(data.minutes);
data.hours = mathAbs(data.hours);
data.months = mathAbs(data.months);
data.years = mathAbs(data.years);
return this;
}
function addSubtract$1(duration, input, value, direction) {
var other = createDuration(input, value);
duration._milliseconds += direction * other._milliseconds;
duration._days += direction * other._days;
duration._months += direction * other._months;
return duration._bubble();
}
function add$1(input, value) {
return addSubtract$1(this, input, value, 1);
}
function subtract$1(input, value) {
return addSubtract$1(this, input, value, -1);
}
function absCeil(number) {
if (number < 0) {
return Math.floor(number);
} else {
return Math.ceil(number);
}
}
function bubble() {
var milliseconds2 = this._milliseconds, days2 = this._days, months3 = this._months, data = this._data, seconds2, minutes2, hours2, years2, monthsFromDays;
if (!(milliseconds2 >= 0 && days2 >= 0 && months3 >= 0 || milliseconds2 <= 0 && days2 <= 0 && months3 <= 0)) {
milliseconds2 += absCeil(monthsToDays(months3) + days2) * 864e5;
days2 = 0;
months3 = 0;
}
data.milliseconds = milliseconds2 % 1e3;
seconds2 = absFloor(milliseconds2 / 1e3);
data.seconds = seconds2 % 60;
minutes2 = absFloor(seconds2 / 60);
data.minutes = minutes2 % 60;
hours2 = absFloor(minutes2 / 60);
data.hours = hours2 % 24;
days2 += absFloor(hours2 / 24);
monthsFromDays = absFloor(daysToMonths(days2));
months3 += monthsFromDays;
days2 -= absCeil(monthsToDays(monthsFromDays));
years2 = absFloor(months3 / 12);
months3 %= 12;
data.days = days2;
data.months = months3;
data.years = years2;
return this;
}
function daysToMonths(days2) {
return days2 * 4800 / 146097;
}
function monthsToDays(months3) {
return months3 * 146097 / 4800;
}
function as(units) {
if (!this.isValid()) {
return NaN;
}
var days2, months3, milliseconds2 = this._milliseconds;
units = normalizeUnits(units);
if (units === "month" || units === "quarter" || units === "year") {
days2 = this._days + milliseconds2 / 864e5;
months3 = this._months + daysToMonths(days2);
switch (units) {
case "month":
return months3;
case "quarter":
return months3 / 3;
case "year":
return months3 / 12;
}
} else {
days2 = this._days + Math.round(monthsToDays(this._months));
switch (units) {
case "week":
return days2 / 7 + milliseconds2 / 6048e5;
case "day":
return days2 + milliseconds2 / 864e5;
case "hour":
return days2 * 24 + milliseconds2 / 36e5;
case "minute":
return days2 * 1440 + milliseconds2 / 6e4;
case "second":
return days2 * 86400 + milliseconds2 / 1e3;
case "millisecond":
return Math.floor(days2 * 864e5) + milliseconds2;
default:
throw new Error("Unknown unit " + units);
}
}
}
function makeAs(alias) {
return function() {
return this.as(alias);
};
}
var asMilliseconds = makeAs("ms"), asSeconds = makeAs("s"), asMinutes = makeAs("m"), asHours = makeAs("h"), asDays = makeAs("d"), asWeeks = makeAs("w"), asMonths = makeAs("M"), asQuarters = makeAs("Q"), asYears = makeAs("y"), valueOf$1 = asMilliseconds;
function clone$1() {
return createDuration(this);
}
function get$2(units) {
units = normalizeUnits(units);
return this.isValid() ? this[units + "s"]() : NaN;
}
function makeGetter(name) {
return function() {
return this.isValid() ? this._data[name] : NaN;
};
}
var milliseconds = makeGetter("milliseconds"), seconds = makeGetter("seconds"), minutes = makeGetter("minutes"), hours = makeGetter("hours"), days = makeGetter("days"), months2 = makeGetter("months"), years = makeGetter("years");
function weeks() {
return absFloor(this.days() / 7);
}
var round = Math.round, thresholds = {
ss: 44,
// a few seconds to seconds
s: 45,
// seconds to minute
m: 45,
// minutes to hour
h: 22,
// hours to day
d: 26,
// days to month/week
w: null,
// weeks to month
M: 11
// months to year
};
function substituteTimeAgo(string, number, withoutSuffix, isFuture, locale2) {
return locale2.relativeTime(number || 1, !!withoutSuffix, string, isFuture);
}
function relativeTime$1(posNegDuration, withoutSuffix, thresholds2, locale2) {
var duration = createDuration(posNegDuration).abs(), seconds2 = round(duration.as("s")), minutes2 = round(duration.as("m")), hours2 = round(duration.as("h")), days2 = round(duration.as("d")), months3 = round(duration.as("M")), weeks2 = round(duration.as("w")), years2 = round(duration.as("y")), a = seconds2 <= thresholds2.ss && ["s", seconds2] || seconds2 < thresholds2.s && ["ss", seconds2] || minutes2 <= 1 && ["m"] || minutes2 < thresholds2.m && ["mm", minutes2] || hours2 <= 1 && ["h"] || hours2 < thresholds2.h && ["hh", hours2] || days2 <= 1 && ["d"] || days2 < thresholds2.d && ["dd", days2];
if (thresholds2.w != null) {
a = a || weeks2 <= 1 && ["w"] || weeks2 < thresholds2.w && ["ww", weeks2];
}
a = a || months3 <= 1 && ["M"] || months3 < thresholds2.M && ["MM", months3] || years2 <= 1 && ["y"] || ["yy", years2];
a[2] = withoutSuffix;
a[3] = +posNegDuration > 0;
a[4] = locale2;
return substituteTimeAgo.apply(null, a);
}
function getSetRelativeTimeRounding(roundingFunction) {
if (roundingFunction === void 0) {
return round;
}
if (typeof roundingFunction === "function") {
round = roundingFunction;
return true;
}
return false;
}
function getSetRelativeTimeThreshold(threshold, limit) {
if (thresholds[threshold] === void 0) {
return false;
}
if (limit === void 0) {
return thresholds[threshold];
}
thresholds[threshold] = limit;
if (threshold === "s") {
thresholds.ss = limit - 1;
}
return true;
}
function humanize(argWithSuffix, argThresholds) {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var withSuffix = false, th = thresholds, locale2, output;
if (typeof argWithSuffix === "object") {
argThresholds = argWithSuffix;
argWithSuffix = false;
}
if (typeof argWithSuffix === "boolean") {
withSuffix = argWithSuffix;
}
if (typeof argThresholds === "object") {
th = Object.assign({}, thresholds, argThresholds);
if (argThresholds.s != null && argThresholds.ss == null) {
th.ss = argThresholds.s - 1;
}
}
locale2 = this.localeData();
output = relativeTime$1(this, !withSuffix, th, locale2);
if (withSuffix) {
output = locale2.pastFuture(+this, output);
}
return locale2.postformat(output);
}
var abs$1 = Math.abs;
function sign(x) {
return (x > 0) - (x < 0) || +x;
}
function toISOString$1() {
if (!this.isValid()) {
return this.localeData().invalidDate();
}
var seconds2 = abs$1(this._milliseconds) / 1e3, days2 = abs$1(this._days), months3 = abs$1(this._months), minutes2, hours2, years2, s2, total = this.asSeconds(), totalSign, ymSign, daysSign, hmsSign;
if (!total) {
return "P0D";
}
minutes2 = absFloor(seconds2 / 60);
hours2 = absFloor(minutes2 / 60);
seconds2 %= 60;
minutes2 %= 60;
years2 = absFloor(months3 / 12);
months3 %= 12;
s2 = seconds2 ? seconds2.toFixed(3).replace(/\.?0+$/, "") : "";
totalSign = total < 0 ? "-" : "";
ymSign = sign(this._months) !== sign(total) ? "-" : "";
daysSign = sign(this._days) !== sign(total) ? "-" : "";
hmsSign = sign(this._milliseconds) !== sign(total) ? "-" : "";
return totalSign + "P" + (years2 ? ymSign + years2 + "Y" : "") + (months3 ? ymSign + months3 + "M" : "") + (days2 ? daysSign + days2 + "D" : "") + (hours2 || minutes2 || seconds2 ? "T" : "") + (hours2 ? hmsSign + hours2 + "H" : "") + (minutes2 ? hmsSign + minutes2 + "M" : "") + (seconds2 ? hmsSign + s2 + "S" : "");
}
var proto$2 = Duration3.prototype;
proto$2.isValid = isValid$1;
proto$2.abs = abs;
proto$2.add = add$1;
proto$2.subtract = subtract$1;
proto$2.as = as;
proto$2.asMilliseconds = asMilliseconds;
proto$2.asSeconds = asSeconds;
proto$2.asMinutes = asMinutes;
proto$2.asHours = asHours;
proto$2.asDays = asDays;
proto$2.asWeeks = asWeeks;
proto$2.asMonths = asMonths;
proto$2.asQuarters = asQuarters;
proto$2.asYears = asYears;
proto$2.valueOf = valueOf$1;
proto$2._bubble = bubble;
proto$2.clone = clone$1;
proto$2.get = get$2;
proto$2.milliseconds = milliseconds;
proto$2.seconds = seconds;
proto$2.minutes = minutes;
proto$2.hours = hours;
proto$2.days = days;
proto$2.weeks = weeks;
proto$2.months = months2;
proto$2.years = years;
proto$2.humanize = humanize;
proto$2.toISOString = toISOString$1;
proto$2.toString = toISOString$1;
proto$2.toJSON = toISOString$1;
proto$2.locale = locale;
proto$2.localeData = localeData;
proto$2.toIsoString = deprecate(
"toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",
toISOString$1
);
proto$2.lang = lang;
addFormatToken("X", 0, 0, "unix");
addFormatToken("x", 0, 0, "valueOf");
addRegexToken("x", matchSigned);
addRegexToken("X", matchTimestamp);
addParseToken("X", function(input, array, config) {
config._d = new Date(parseFloat(input) * 1e3);
});
addParseToken("x", function(input, array, config) {
config._d = new Date(toInt(input));
});
hooks.version = "2.30.1";
setHookCallback(createLocal);
hooks.fn = proto;
hooks.min = min;
hooks.max = max;
hooks.now = now3;
hooks.utc = createUTC;
hooks.unix = createUnix;
hooks.months = listMonths;
hooks.isDate = isDate2;
hooks.locale = getSetGlobalLocale;
hooks.invalid = createInvalid;
hooks.duration = createDuration;
hooks.isMoment = isMoment;
hooks.weekdays = listWeekdays;
hooks.parseZone = createInZone;
hooks.localeData = getLocale;
hooks.isDuration = isDuration;
hooks.monthsShort = listMonthsShort;
hooks.weekdaysMin = listWeekdaysMin;
hooks.defineLocale = defineLocale;
hooks.updateLocale = updateLocale;
hooks.locales = listLocales;
hooks.weekdaysShort = listWeekdaysShort;
hooks.normalizeUnits = normalizeUnits;
hooks.relativeTimeRounding = getSetRelativeTimeRounding;
hooks.relativeTimeThreshold = getSetRelativeTimeThreshold;
hooks.calendarFormat = getCalendarFormat;
hooks.prototype = proto;
hooks.HTML5_FMT = {
DATETIME_LOCAL: "YYYY-MM-DDTHH:mm",
// <input type="datetime-local" />
DATETIME_LOCAL_SECONDS: "YYYY-MM-DDTHH:mm:ss",
// <input type="datetime-local" step="1" />
DATETIME_LOCAL_MS: "YYYY-MM-DDTHH:mm:ss.SSS",
// <input type="datetime-local" step="0.001" />
DATE: "YYYY-MM-DD",
// <input type="date" />
TIME: "HH:mm",
// <input type="time" />
TIME_SECONDS: "HH:mm:ss",
// <input type="time" step="1" />
TIME_MS: "HH:mm:ss.SSS",
// <input type="time" step="0.001" />
WEEK: "GGGG-[W]WW",
// <input type="week" />
MONTH: "YYYY-MM"
// <input type="month" />
};
return hooks;
});
}
});
// node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js
var require_react_jsx_runtime_development = __commonJS({
"node_modules/.pnpm/react@18.3.1/node_modules/react/cjs/react-jsx-runtime.development.js"(exports) {
"use strict";
if (true) {
(function() {
"use strict";
var React4 = require_react();
var REACT_ELEMENT_TYPE = Symbol.for("react.element");
var REACT_PORTAL_TYPE = Symbol.for("react.portal");
var REACT_FRAGMENT_TYPE = Symbol.for("react.fragment");
var REACT_STRICT_MODE_TYPE = Symbol.for("react.strict_mode");
var REACT_PROFILER_TYPE = Symbol.for("react.profiler");
var REACT_PROVIDER_TYPE = Symbol.for("react.provider");
var REACT_CONTEXT_TYPE = Symbol.for("react.context");
var REACT_FORWARD_REF_TYPE = Symbol.for("react.forward_ref");
var REACT_SUSPENSE_TYPE = Symbol.for("react.suspense");
var REACT_SUSPENSE_LIST_TYPE = Symbol.for("react.suspense_list");
var REACT_MEMO_TYPE = Symbol.for("react.memo");
var REACT_LAZY_TYPE = Symbol.for("react.lazy");
var REACT_OFFSCREEN_TYPE = Symbol.for("react.offscreen");
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
var FAUX_ITERATOR_SYMBOL = "@@iterator";
function getIteratorFn(maybeIterable) {
if (maybeIterable === null || typeof maybeIterable !== "object") {
return null;
}
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
if (typeof maybeIterator === "function") {
return maybeIterator;
}
return null;
}
var ReactSharedInternals = React4.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
function error(format) {
{
{
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
args[_key2 - 1] = arguments[_key2];
}
printWarning("error", format, args);
}
}
}
function printWarning(level, format, args) {
{
var ReactDebugCurrentFrame2 = ReactSharedInternals.ReactDebugCurrentFrame;
var stack = ReactDebugCurrentFrame2.getStackAddendum();
if (stack !== "") {
format += "%s";
args = args.concat([stack]);
}
var argsWithFormat = args.map(function(item) {
return String(item);
});
argsWithFormat.unshift("Warning: " + format);
Function.prototype.apply.call(console[level], console, argsWithFormat);
}
}
var enableScopeAPI = false;
var enableCacheElement = false;
var enableTransitionTracing = false;
var enableLegacyHidden = false;
var enableDebugTracing = false;
var REACT_MODULE_REFERENCE;
{
REACT_MODULE_REFERENCE = Symbol.for("react.module.reference");
}
function isValidElementType(type) {
if (typeof type === "string" || typeof type === "function") {
return true;
}
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing) {
return true;
}
if (typeof type === "object" && type !== null) {
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
// types supported by any Flight configuration anywhere since
// we don't know which Flight build this will end up being used
// with.
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== void 0) {
return true;
}
}
return false;
}
function getWrappedName(outerType, innerType, wrapperName) {
var displayName = outerType.displayName;
if (displayName) {
return displayName;
}
var functionName = innerType.displayName || innerType.name || "";
return functionName !== "" ? wrapperName + "(" + functionName + ")" : wrapperName;
}
function getContextName(type) {
return type.displayName || "Context";
}
function getComponentNameFromType(type) {
if (type == null) {
return null;
}
{
if (typeof type.tag === "number") {
error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.");
}
}
if (typeof type === "function") {
return type.displayName || type.name || null;
}
if (typeof type === "string") {
return type;
}
switch (type) {
case REACT_FRAGMENT_TYPE:
return "Fragment";
case REACT_PORTAL_TYPE:
return "Portal";
case REACT_PROFILER_TYPE:
return "Profiler";
case REACT_STRICT_MODE_TYPE:
return "StrictMode";
case REACT_SUSPENSE_TYPE:
return "Suspense";
case REACT_SUSPENSE_LIST_TYPE:
return "SuspenseList";
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_CONTEXT_TYPE:
var context = type;
return getContextName(context) + ".Consumer";
case REACT_PROVIDER_TYPE:
var provider = type;
return getContextName(provider._context) + ".Provider";
case REACT_FORWARD_REF_TYPE:
return getWrappedName(type, type.render, "ForwardRef");
case REACT_MEMO_TYPE:
var outerName = type.displayName || null;
if (outerName !== null) {
return outerName;
}
return getComponentNameFromType(type.type) || "Memo";
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return getComponentNameFromType(init(payload));
} catch (x) {
return null;
}
}
}
}
return null;
}
var assign = Object.assign;
var disabledDepth = 0;
var prevLog;
var prevInfo;
var prevWarn;
var prevError;
var prevGroup;
var prevGroupCollapsed;
var prevGroupEnd;
function disabledLog() {
}
disabledLog.__reactDisabledLog = true;
function disableLogs() {
{
if (disabledDepth === 0) {
prevLog = console.log;
prevInfo = console.info;
prevWarn = console.warn;
prevError = console.error;
prevGroup = console.group;
prevGroupCollapsed = console.groupCollapsed;
prevGroupEnd = console.groupEnd;
var props = {
configurable: true,
enumerable: true,
value: disabledLog,
writable: true
};
Object.defineProperties(console, {
info: props,
log: props,
warn: props,
error: props,
group: props,
groupCollapsed: props,
groupEnd: props
});
}
disabledDepth++;
}
}
function reenableLogs() {
{
disabledDepth--;
if (disabledDepth === 0) {
var props = {
configurable: true,
enumerable: true,
writable: true
};
Object.defineProperties(console, {
log: assign({}, props, {
value: prevLog
}),
info: assign({}, props, {
value: prevInfo
}),
warn: assign({}, props, {
value: prevWarn
}),
error: assign({}, props, {
value: prevError
}),
group: assign({}, props, {
value: prevGroup
}),
groupCollapsed: assign({}, props, {
value: prevGroupCollapsed
}),
groupEnd: assign({}, props, {
value: prevGroupEnd
})
});
}
if (disabledDepth < 0) {
error("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
}
}
}
var ReactCurrentDispatcher = ReactSharedInternals.ReactCurrentDispatcher;
var prefix2;
function describeBuiltInComponentFrame(name, source, ownerFn) {
{
if (prefix2 === void 0) {
try {
throw Error();
} catch (x) {
var match2 = x.stack.trim().match(/\n( *(at )?)/);
prefix2 = match2 && match2[1] || "";
}
}
return "\n" + prefix2 + name;
}
}
var reentry = false;
var componentFrameCache;
{
var PossiblyWeakMap = typeof WeakMap === "function" ? WeakMap : Map;
componentFrameCache = new PossiblyWeakMap();
}
function describeNativeComponentFrame(fn, construct) {
if (!fn || reentry) {
return "";
}
{
var frame = componentFrameCache.get(fn);
if (frame !== void 0) {
return frame;
}
}
var control;
reentry = true;
var previousPrepareStackTrace = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
var previousDispatcher;
{
previousDispatcher = ReactCurrentDispatcher.current;
ReactCurrentDispatcher.current = null;
disableLogs();
}
try {
if (construct) {
var Fake = function() {
throw Error();
};
Object.defineProperty(Fake.prototype, "props", {
set: function() {
throw Error();
}
});
if (typeof Reflect === "object" && Reflect.construct) {
try {
Reflect.construct(Fake, []);
} catch (x) {
control = x;
}
Reflect.construct(fn, [], Fake);
} else {
try {
Fake.call();
} catch (x) {
control = x;
}
fn.call(Fake.prototype);
}
} else {
try {
throw Error();
} catch (x) {
control = x;
}
fn();
}
} catch (sample) {
if (sample && control && typeof sample.stack === "string") {
var sampleLines = sample.stack.split("\n");
var controlLines = control.stack.split("\n");
var s2 = sampleLines.length - 1;
var c = controlLines.length - 1;
while (s2 >= 1 && c >= 0 && sampleLines[s2] !== controlLines[c]) {
c--;
}
for (; s2 >= 1 && c >= 0; s2--, c--) {
if (sampleLines[s2] !== controlLines[c]) {
if (s2 !== 1 || c !== 1) {
do {
s2--;
c--;
if (c < 0 || sampleLines[s2] !== controlLines[c]) {
var _frame = "\n" + sampleLines[s2].replace(" at new ", " at ");
if (fn.displayName && _frame.includes("<anonymous>")) {
_frame = _frame.replace("<anonymous>", fn.displayName);
}
{
if (typeof fn === "function") {
componentFrameCache.set(fn, _frame);
}
}
return _frame;
}
} while (s2 >= 1 && c >= 0);
}
break;
}
}
}
} finally {
reentry = false;
{
ReactCurrentDispatcher.current = previousDispatcher;
reenableLogs();
}
Error.prepareStackTrace = previousPrepareStackTrace;
}
var name = fn ? fn.displayName || fn.name : "";
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : "";
{
if (typeof fn === "function") {
componentFrameCache.set(fn, syntheticFrame);
}
}
return syntheticFrame;
}
function describeFunctionComponentFrame(fn, source, ownerFn) {
{
return describeNativeComponentFrame(fn, false);
}
}
function shouldConstruct(Component3) {
var prototype = Component3.prototype;
return !!(prototype && prototype.isReactComponent);
}
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
if (type == null) {
return "";
}
if (typeof type === "function") {
{
return describeNativeComponentFrame(type, shouldConstruct(type));
}
}
if (typeof type === "string") {
return describeBuiltInComponentFrame(type);
}
switch (type) {
case REACT_SUSPENSE_TYPE:
return describeBuiltInComponentFrame("Suspense");
case REACT_SUSPENSE_LIST_TYPE:
return describeBuiltInComponentFrame("SuspenseList");
}
if (typeof type === "object") {
switch (type.$$typeof) {
case REACT_FORWARD_REF_TYPE:
return describeFunctionComponentFrame(type.render);
case REACT_MEMO_TYPE:
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
case REACT_LAZY_TYPE: {
var lazyComponent = type;
var payload = lazyComponent._payload;
var init = lazyComponent._init;
try {
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
} catch (x) {
}
}
}
}
return "";
}
var hasOwnProperty2 = Object.prototype.hasOwnProperty;
var loggedTypeFailures = {};
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame.setExtraStackFrame(null);
}
}
}
function checkPropTypes(typeSpecs, values, location, componentName, element) {
{
var has2 = Function.call.bind(hasOwnProperty2);
for (var typeSpecName in typeSpecs) {
if (has2(typeSpecs, typeSpecName)) {
var error$1 = void 0;
try {
if (typeof typeSpecs[typeSpecName] !== "function") {
var err = Error((componentName || "React class") + ": " + location + " type `" + typeSpecName + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof typeSpecs[typeSpecName] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
err.name = "Invariant Violation";
throw err;
}
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
} catch (ex) {
error$1 = ex;
}
if (error$1 && !(error$1 instanceof Error)) {
setCurrentlyValidatingElement(element);
error("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", componentName || "React class", location, typeSpecName, typeof error$1);
setCurrentlyValidatingElement(null);
}
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
loggedTypeFailures[error$1.message] = true;
setCurrentlyValidatingElement(element);
error("Failed %s type: %s", location, error$1.message);
setCurrentlyValidatingElement(null);
}
}
}
}
}
var isArrayImpl = Array.isArray;
function isArray(a) {
return isArrayImpl(a);
}
function typeName(value) {
{
var hasToStringTag = typeof Symbol === "function" && Symbol.toStringTag;
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || "Object";
return type;
}
}
function willCoercionThrow(value) {
{
try {
testStringCoercion(value);
return false;
} catch (e) {
return true;
}
}
}
function testStringCoercion(value) {
return "" + value;
}
function checkKeyStringCoercion(value) {
{
if (willCoercionThrow(value)) {
error("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", typeName(value));
return testStringCoercion(value);
}
}
}
var ReactCurrentOwner = ReactSharedInternals.ReactCurrentOwner;
var RESERVED_PROPS = {
key: true,
ref: true,
__self: true,
__source: true
};
var specialPropKeyWarningShown;
var specialPropRefWarningShown;
var didWarnAboutStringRefs;
{
didWarnAboutStringRefs = {};
}
function hasValidRef(config) {
{
if (hasOwnProperty2.call(config, "ref")) {
var getter = Object.getOwnPropertyDescriptor(config, "ref").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.ref !== void 0;
}
function hasValidKey(config) {
{
if (hasOwnProperty2.call(config, "key")) {
var getter = Object.getOwnPropertyDescriptor(config, "key").get;
if (getter && getter.isReactWarning) {
return false;
}
}
}
return config.key !== void 0;
}
function warnIfStringRefCannotBeAutoConverted(config, self2) {
{
if (typeof config.ref === "string" && ReactCurrentOwner.current && self2 && ReactCurrentOwner.current.stateNode !== self2) {
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
if (!didWarnAboutStringRefs[componentName]) {
error('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', getComponentNameFromType(ReactCurrentOwner.current.type), config.ref);
didWarnAboutStringRefs[componentName] = true;
}
}
}
}
function defineKeyPropWarningGetter(props, displayName) {
{
var warnAboutAccessingKey = function() {
if (!specialPropKeyWarningShown) {
specialPropKeyWarningShown = true;
error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
};
warnAboutAccessingKey.isReactWarning = true;
Object.defineProperty(props, "key", {
get: warnAboutAccessingKey,
configurable: true
});
}
}
function defineRefPropWarningGetter(props, displayName) {
{
var warnAboutAccessingRef = function() {
if (!specialPropRefWarningShown) {
specialPropRefWarningShown = true;
error("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", displayName);
}
};
warnAboutAccessingRef.isReactWarning = true;
Object.defineProperty(props, "ref", {
get: warnAboutAccessingRef,
configurable: true
});
}
}
var ReactElement = function(type, key2, ref, self2, source, owner, props) {
var element = {
// This tag allows us to uniquely identify this as a React Element
$$typeof: REACT_ELEMENT_TYPE,
// Built-in properties that belong on the element
type,
key: key2,
ref,
props,
// Record the component responsible for creating this element.
_owner: owner
};
{
element._store = {};
Object.defineProperty(element._store, "validated", {
configurable: false,
enumerable: false,
writable: true,
value: false
});
Object.defineProperty(element, "_self", {
configurable: false,
enumerable: false,
writable: false,
value: self2
});
Object.defineProperty(element, "_source", {
configurable: false,
enumerable: false,
writable: false,
value: source
});
if (Object.freeze) {
Object.freeze(element.props);
Object.freeze(element);
}
}
return element;
};
function jsxDEV(type, config, maybeKey, source, self2) {
{
var propName;
var props = {};
var key2 = null;
var ref = null;
if (maybeKey !== void 0) {
{
checkKeyStringCoercion(maybeKey);
}
key2 = "" + maybeKey;
}
if (hasValidKey(config)) {
{
checkKeyStringCoercion(config.key);
}
key2 = "" + config.key;
}
if (hasValidRef(config)) {
ref = config.ref;
warnIfStringRefCannotBeAutoConverted(config, self2);
}
for (propName in config) {
if (hasOwnProperty2.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
props[propName] = config[propName];
}
}
if (type && type.defaultProps) {
var defaultProps = type.defaultProps;
for (propName in defaultProps) {
if (props[propName] === void 0) {
props[propName] = defaultProps[propName];
}
}
}
if (key2 || ref) {
var displayName = typeof type === "function" ? type.displayName || type.name || "Unknown" : type;
if (key2) {
defineKeyPropWarningGetter(props, displayName);
}
if (ref) {
defineRefPropWarningGetter(props, displayName);
}
}
return ReactElement(type, key2, ref, self2, source, ReactCurrentOwner.current, props);
}
}
var ReactCurrentOwner$1 = ReactSharedInternals.ReactCurrentOwner;
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
function setCurrentlyValidatingElement$1(element) {
{
if (element) {
var owner = element._owner;
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
} else {
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
}
}
}
var propTypesMisspellWarningShown;
{
propTypesMisspellWarningShown = false;
}
function isValidElement(object) {
{
return typeof object === "object" && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
}
}
function getDeclarationErrorAddendum() {
{
if (ReactCurrentOwner$1.current) {
var name = getComponentNameFromType(ReactCurrentOwner$1.current.type);
if (name) {
return "\n\nCheck the render method of `" + name + "`.";
}
}
return "";
}
}
function getSourceInfoErrorAddendum(source) {
{
if (source !== void 0) {
var fileName = source.fileName.replace(/^.*[\\\/]/, "");
var lineNumber = source.lineNumber;
return "\n\nCheck your code at " + fileName + ":" + lineNumber + ".";
}
return "";
}
}
var ownerHasKeyUseWarning = {};
function getCurrentComponentErrorInfo(parentType) {
{
var info = getDeclarationErrorAddendum();
if (!info) {
var parentName = typeof parentType === "string" ? parentType : parentType.displayName || parentType.name;
if (parentName) {
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
}
}
return info;
}
}
function validateExplicitKey(element, parentType) {
{
if (!element._store || element._store.validated || element.key != null) {
return;
}
element._store.validated = true;
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
return;
}
ownerHasKeyUseWarning[currentComponentErrorInfo] = true;
var childOwner = "";
if (element && element._owner && element._owner !== ReactCurrentOwner$1.current) {
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
}
setCurrentlyValidatingElement$1(element);
error('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
setCurrentlyValidatingElement$1(null);
}
}
function validateChildKeys(node, parentType) {
{
if (typeof node !== "object") {
return;
}
if (isArray(node)) {
for (var i = 0; i < node.length; i++) {
var child = node[i];
if (isValidElement(child)) {
validateExplicitKey(child, parentType);
}
}
} else if (isValidElement(node)) {
if (node._store) {
node._store.validated = true;
}
} else if (node) {
var iteratorFn = getIteratorFn(node);
if (typeof iteratorFn === "function") {
if (iteratorFn !== node.entries) {
var iterator = iteratorFn.call(node);
var step;
while (!(step = iterator.next()).done) {
if (isValidElement(step.value)) {
validateExplicitKey(step.value, parentType);
}
}
}
}
}
}
}
function validatePropTypes(element) {
{
var type = element.type;
if (type === null || type === void 0 || typeof type === "string") {
return;
}
var propTypes;
if (typeof type === "function") {
propTypes = type.propTypes;
} else if (typeof type === "object" && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
// Inner props are checked in the reconciler.
type.$$typeof === REACT_MEMO_TYPE)) {
propTypes = type.propTypes;
} else {
return;
}
if (propTypes) {
var name = getComponentNameFromType(type);
checkPropTypes(propTypes, element.props, "prop", name, element);
} else if (type.PropTypes !== void 0 && !propTypesMisspellWarningShown) {
propTypesMisspellWarningShown = true;
var _name = getComponentNameFromType(type);
error("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _name || "Unknown");
}
if (typeof type.getDefaultProps === "function" && !type.getDefaultProps.isReactClassApproved) {
error("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
}
}
}
function validateFragmentProps(fragment) {
{
var keys = Object.keys(fragment.props);
for (var i = 0; i < keys.length; i++) {
var key2 = keys[i];
if (key2 !== "children" && key2 !== "key") {
setCurrentlyValidatingElement$1(fragment);
error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", key2);
setCurrentlyValidatingElement$1(null);
break;
}
}
if (fragment.ref !== null) {
setCurrentlyValidatingElement$1(fragment);
error("Invalid attribute `ref` supplied to `React.Fragment`.");
setCurrentlyValidatingElement$1(null);
}
}
}
var didWarnAboutKeySpread = {};
function jsxWithValidation(type, props, key2, isStaticChildren, source, self2) {
{
var validType = isValidElementType(type);
if (!validType) {
var info = "";
if (type === void 0 || typeof type === "object" && type !== null && Object.keys(type).length === 0) {
info += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.";
}
var sourceInfo = getSourceInfoErrorAddendum(source);
if (sourceInfo) {
info += sourceInfo;
} else {
info += getDeclarationErrorAddendum();
}
var typeString;
if (type === null) {
typeString = "null";
} else if (isArray(type)) {
typeString = "array";
} else if (type !== void 0 && type.$$typeof === REACT_ELEMENT_TYPE) {
typeString = "<" + (getComponentNameFromType(type.type) || "Unknown") + " />";
info = " Did you accidentally export a JSX literal instead of a component?";
} else {
typeString = typeof type;
}
error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", typeString, info);
}
var element = jsxDEV(type, props, key2, source, self2);
if (element == null) {
return element;
}
if (validType) {
var children = props.children;
if (children !== void 0) {
if (isStaticChildren) {
if (isArray(children)) {
for (var i = 0; i < children.length; i++) {
validateChildKeys(children[i], type);
}
if (Object.freeze) {
Object.freeze(children);
}
} else {
error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
}
} else {
validateChildKeys(children, type);
}
}
}
{
if (hasOwnProperty2.call(props, "key")) {
var componentName = getComponentNameFromType(type);
var keys = Object.keys(props).filter(function(k) {
return k !== "key";
});
var beforeExample = keys.length > 0 ? "{key: someKey, " + keys.join(": ..., ") + ": ...}" : "{key: someKey}";
if (!didWarnAboutKeySpread[componentName + beforeExample]) {
var afterExample = keys.length > 0 ? "{" + keys.join(": ..., ") + ": ...}" : "{}";
error('A props object containing a "key" prop is being spread into JSX:\n let props = %s;\n <%s {...props} />\nReact keys must be passed directly to JSX without using spread:\n let props = %s;\n <%s key={someKey} {...props} />', beforeExample, componentName, afterExample, componentName);
didWarnAboutKeySpread[componentName + beforeExample] = true;
}
}
}
if (type === REACT_FRAGMENT_TYPE) {
validateFragmentProps(element);
} else {
validatePropTypes(element);
}
return element;
}
}
function jsxWithValidationStatic(type, props, key2) {
{
return jsxWithValidation(type, props, key2, true);
}
}
function jsxWithValidationDynamic(type, props, key2) {
{
return jsxWithValidation(type, props, key2, false);
}
}
var jsx16 = jsxWithValidationDynamic;
var jsxs13 = jsxWithValidationStatic;
exports.Fragment = REACT_FRAGMENT_TYPE;
exports.jsx = jsx16;
exports.jsxs = jsxs13;
})();
}
}
});
// node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js
var require_jsx_runtime = __commonJS({
"node_modules/.pnpm/react@18.3.1/node_modules/react/jsx-runtime.js"(exports, module2) {
"use strict";
if (false) {
module2.exports = null;
} else {
module2.exports = require_react_jsx_runtime_development();
}
}
});
// node_modules/.pnpm/react-timer-hook@3.0.8_react@18.3.1/node_modules/react-timer-hook/dist/index.js
var require_dist = __commonJS({
"node_modules/.pnpm/react-timer-hook@3.0.8_react@18.3.1/node_modules/react-timer-hook/dist/index.js"(exports, module2) {
!function(e, t) {
"object" == typeof exports && "object" == typeof module2 ? module2.exports = t(require_react()) : "function" == typeof define && define.amd ? define(["react"], t) : "object" == typeof exports ? exports["react-timer-hook"] = t(require_react()) : e["react-timer-hook"] = t(e.react);
}("undefined" != typeof self ? self : exports, (e) => (() => {
"use strict";
var t = { 155: (t2) => {
t2.exports = e;
} }, r = {};
function o(e2) {
var n3 = r[e2];
if (void 0 !== n3)
return n3.exports;
var s3 = r[e2] = { exports: {} };
return t[e2](s3, s3.exports, o), s3.exports;
}
o.d = (e2, t2) => {
for (var r2 in t2)
o.o(t2, r2) && !o.o(e2, r2) && Object.defineProperty(e2, r2, { enumerable: true, get: t2[r2] });
}, o.o = (e2, t2) => Object.prototype.hasOwnProperty.call(e2, t2), o.r = (e2) => {
"undefined" != typeof Symbol && Symbol.toStringTag && Object.defineProperty(e2, Symbol.toStringTag, { value: "Module" }), Object.defineProperty(e2, "__esModule", { value: true });
};
var n2 = {};
o.r(n2), o.d(n2, { default: () => f, useStopwatch: () => d, useTime: () => p, useTimer: () => l2 });
var s2 = o(155);
class i {
static expiryTimestamp(e2) {
const t2 = new Date(e2).getTime() > 0;
return t2 || console.warn("react-timer-hook: { useTimer } Invalid expiryTimestamp settings", e2), t2;
}
static onExpire(e2) {
const t2 = e2 && "function" == typeof e2;
return e2 && !t2 && console.warn("react-timer-hook: { useTimer } Invalid onExpire settings function", e2), t2;
}
}
class a {
static getTimeFromSeconds(e2) {
const t2 = Math.ceil(e2), r2 = Math.floor(t2 / 86400), o2 = Math.floor(t2 % 86400 / 3600), n3 = Math.floor(t2 % 3600 / 60);
return { totalSeconds: t2, seconds: Math.floor(t2 % 60), minutes: n3, hours: o2, days: r2 };
}
static getSecondsFromExpiry(e2, t2) {
const r2 = e2 - (/* @__PURE__ */ new Date()).getTime();
if (r2 > 0) {
const e3 = r2 / 1e3;
return t2 ? Math.round(e3) : e3;
}
return 0;
}
static getSecondsFromPrevTime(e2, t2) {
const r2 = (/* @__PURE__ */ new Date()).getTime() - e2;
if (r2 > 0) {
const e3 = r2 / 1e3;
return t2 ? Math.round(e3) : e3;
}
return 0;
}
static getSecondsFromTimeNow() {
const e2 = /* @__PURE__ */ new Date();
return e2.getTime() / 1e3 - 60 * e2.getTimezoneOffset();
}
static getFormattedTimeFromSeconds(e2, t2) {
const { seconds: r2, minutes: o2, hours: n3 } = a.getTimeFromSeconds(e2);
let s3 = "", i2 = n3;
return "12-hour" === t2 && (s3 = n3 >= 12 ? "pm" : "am", i2 = n3 % 12), { seconds: r2, minutes: o2, hours: i2, ampm: s3 };
}
}
function c(e2, t2) {
const r2 = (0, s2.useRef)();
(0, s2.useEffect)(() => {
r2.current = e2;
}), (0, s2.useEffect)(() => {
if (!t2)
return () => {
};
const e3 = setInterval(() => {
r2.current && r2.current();
}, t2);
return () => clearInterval(e3);
}, [t2]);
}
const u = 1e3;
function m(e2) {
if (!i.expiryTimestamp(e2))
return null;
const t2 = a.getSecondsFromExpiry(e2), r2 = Math.floor(1e3 * (t2 - Math.floor(t2)));
return r2 > 0 ? r2 : u;
}
function l2() {
let { expiryTimestamp: e2, onExpire: t2, autoStart: r2 = true } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
const [o2, n3] = (0, s2.useState)(e2), [l3, d2] = (0, s2.useState)(a.getSecondsFromExpiry(o2)), [p2, f2] = (0, s2.useState)(r2), [g, S] = (0, s2.useState)(r2), [T, y] = (0, s2.useState)(m(o2)), h = (0, s2.useCallback)(() => {
i.onExpire(t2) && t2(), f2(false), y(null);
}, [t2]), x = (0, s2.useCallback)(() => {
f2(false);
}, []), v = (0, s2.useCallback)(function(e3) {
let t3 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
y(m(e3)), S(t3), f2(t3), n3(e3), d2(a.getSecondsFromExpiry(e3));
}, []), F = (0, s2.useCallback)(() => {
const e3 = /* @__PURE__ */ new Date();
e3.setMilliseconds(e3.getMilliseconds() + 1e3 * l3), v(e3);
}, [l3, v]), b = (0, s2.useCallback)(() => {
g ? (d2(a.getSecondsFromExpiry(o2)), f2(true)) : F();
}, [o2, g, F]);
return c(() => {
T !== u && y(u);
const e3 = a.getSecondsFromExpiry(o2);
d2(e3), e3 <= 0 && h();
}, p2 ? T : null), { ...a.getTimeFromSeconds(l3), start: b, pause: x, resume: F, restart: v, isRunning: p2 };
}
function d() {
let { autoStart: e2, offsetTimestamp: t2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
const [r2, o2] = (0, s2.useState)(a.getSecondsFromExpiry(t2, true) || 0), [n3, i2] = (0, s2.useState)(/* @__PURE__ */ new Date()), [u2, m2] = (0, s2.useState)(r2 + a.getSecondsFromPrevTime(n3 || 0, true)), [l3, d2] = (0, s2.useState)(e2);
c(() => {
m2(r2 + a.getSecondsFromPrevTime(n3, true));
}, l3 ? 1e3 : null);
const p2 = (0, s2.useCallback)(() => {
const e3 = /* @__PURE__ */ new Date();
i2(e3), d2(true), m2(r2 + a.getSecondsFromPrevTime(e3, true));
}, [r2]), f2 = (0, s2.useCallback)(() => {
o2(u2), d2(false);
}, [u2]), g = (0, s2.useCallback)(function() {
let e3 = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : 0, t3 = !(arguments.length > 1 && void 0 !== arguments[1]) || arguments[1];
const r3 = a.getSecondsFromExpiry(e3, true) || 0, n4 = /* @__PURE__ */ new Date();
i2(n4), o2(r3), d2(t3), m2(r3 + a.getSecondsFromPrevTime(n4, true));
}, []);
return { ...a.getTimeFromSeconds(u2), start: p2, pause: f2, reset: g, isRunning: l3 };
}
function p() {
let { format: e2 } = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
const [t2, r2] = (0, s2.useState)(a.getSecondsFromTimeNow());
return c(() => {
r2(a.getSecondsFromTimeNow());
}, 1e3), { ...a.getFormattedTimeFromSeconds(t2, e2) };
}
function f(e2) {
if ((0, s2.useEffect)(() => {
console.warn("react-timer-hook: default export useTimer is deprecated, use named exports { useTimer, useStopwatch, useTime } instead");
}, []), e2.expiryTimestamp) {
const t3 = l2(e2);
return { ...t3, startTimer: t3.start, stopTimer: t3.pause, resetTimer: () => {
} };
}
const t2 = d(e2);
return { ...t2, startTimer: t2.start, stopTimer: t2.pause, resetTimer: t2.reset };
}
return n2;
})());
}
});
// node_modules/.pnpm/ical@0.8.0/node_modules/ical/ical.js
var require_ical = __commonJS({
"node_modules/.pnpm/ical@0.8.0/node_modules/ical/ical.js"(exports, module2) {
(function(name, definition) {
if (typeof module2 !== "undefined") {
module2.exports = definition();
} else if (typeof define === "function" && typeof define.amd === "object") {
define(definition);
} else {
this[name] = definition();
}
})("ical", function() {
var text = function(t) {
t = t || "";
return t.replace(/\\\,/g, ",").replace(/\\\;/g, ";").replace(/\\[nN]/g, "\n").replace(/\\\\/g, "\\");
};
var parseParams = function(p) {
var out = {};
for (var i = 0; i < p.length; i++) {
if (p[i].indexOf("=") > -1) {
var segs = p[i].split("=");
out[segs[0]] = parseValue(segs.slice(1).join("="));
}
}
return out || sp;
};
var parseValue = function(val) {
if ("TRUE" === val)
return true;
if ("FALSE" === val)
return false;
var number = Number(val);
if (!isNaN(number))
return number;
return val;
};
var storeValParam = function(name) {
return function(val, curr) {
var current2 = curr[name];
if (Array.isArray(current2)) {
current2.push(val);
return curr;
}
if (current2 != null) {
curr[name] = [current2, val];
return curr;
}
curr[name] = val;
return curr;
};
};
var storeParam = function(name) {
return function(val, params, curr) {
var data;
if (params && params.length && !(params.length == 1 && params[0] === "CHARSET=utf-8")) {
data = { params: parseParams(params), val: text(val) };
} else
data = text(val);
return storeValParam(name)(data, curr);
};
};
var addTZ = function(dt, params) {
var p = parseParams(params);
if (params && p) {
dt.tz = p.TZID;
if (dt.tz !== void 0) {
dt.tz = dt.tz.replace(/^"(.*)"$/, "$1");
}
}
return dt;
};
var dateParam = function(name) {
return function(val, params, curr) {
var newDate = text(val);
if (params && params[0] === "VALUE=DATE") {
var comps = /^(\d{4})(\d{2})(\d{2})$/.exec(val);
if (comps !== null) {
newDate = new Date(
comps[1],
parseInt(comps[2], 10) - 1,
comps[3]
);
newDate = addTZ(newDate, params);
newDate.dateOnly = true;
return storeValParam(name)(newDate, curr);
}
}
var comps = /^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})(Z)?$/.exec(val);
if (comps !== null) {
if (comps[7] == "Z") {
newDate = new Date(Date.UTC(
parseInt(comps[1], 10),
parseInt(comps[2], 10) - 1,
parseInt(comps[3], 10),
parseInt(comps[4], 10),
parseInt(comps[5], 10),
parseInt(comps[6], 10)
));
} else {
newDate = new Date(
parseInt(comps[1], 10),
parseInt(comps[2], 10) - 1,
parseInt(comps[3], 10),
parseInt(comps[4], 10),
parseInt(comps[5], 10),
parseInt(comps[6], 10)
);
}
newDate = addTZ(newDate, params);
}
return storeValParam(name)(newDate, curr);
};
};
var geoParam = function(name) {
return function(val, params, curr) {
storeParam(val, params, curr);
var parts = val.split(";");
curr[name] = { lat: Number(parts[0]), lon: Number(parts[1]) };
return curr;
};
};
var categoriesParam = function(name) {
var separatorPattern = /\s*,\s*/g;
return function(val, params, curr) {
storeParam(val, params, curr);
if (curr[name] === void 0)
curr[name] = val ? val.split(separatorPattern) : [];
else if (val)
curr[name] = curr[name].concat(val.split(separatorPattern));
return curr;
};
};
var exdateParam = function(name) {
return function(val, params, curr) {
var separatorPattern = /\s*,\s*/g;
curr[name] = curr[name] || [];
var dates = val ? val.split(separatorPattern) : [];
dates.forEach(
function(entry) {
var exdate = new Array();
dateParam(name)(entry, params, exdate);
if (exdate[name]) {
if (typeof exdate[name].toISOString === "function") {
curr[name][exdate[name].toISOString().substring(0, 10)] = exdate[name];
} else {
console.error("No toISOString function in exdate[name]", exdate[name]);
}
}
}
);
return curr;
};
};
var recurrenceParam = function(name) {
return dateParam(name);
};
var addFBType = function(fb, params) {
var p = parseParams(params);
if (params && p) {
fb.type = p.FBTYPE || "BUSY";
}
return fb;
};
var freebusyParam = function(name) {
return function(val, params, curr) {
var fb = addFBType({}, params);
curr[name] = curr[name] || [];
curr[name].push(fb);
storeParam(val, params, fb);
var parts = val.split("/");
["start", "end"].forEach(function(name2, index) {
dateParam(name2)(parts[index], params, fb);
});
return curr;
};
};
return {
objectHandlers: {
"BEGIN": function(component, params, curr, stack) {
stack.push(curr);
return { type: component, params };
},
"END": function(component, params, curr, stack) {
if (component === "VCALENDAR") {
var key2, obj;
for (key2 in curr) {
if (curr.hasOwnProperty(key2)) {
obj = curr[key2];
if (typeof obj === "string") {
delete curr[key2];
}
}
}
return curr;
}
var par = stack.pop();
if (curr.uid) {
if (par[curr.uid] === void 0) {
par[curr.uid] = curr;
} else {
if (curr.recurrenceid === void 0) {
var key2;
for (key2 in curr) {
par[curr.uid][key2] = curr[key2];
}
}
}
if (curr.recurrenceid != null) {
var recurrenceObj = new Object();
var key2;
for (key2 in curr) {
recurrenceObj[key2] = curr[key2];
}
if (recurrenceObj.recurrences != void 0) {
delete recurrenceObj.recurrences;
}
if (par[curr.uid].recurrences === void 0) {
par[curr.uid].recurrences = new Array();
}
if (typeof curr.recurrenceid.toISOString === "function") {
par[curr.uid].recurrences[curr.recurrenceid.toISOString().substring(0, 10)] = recurrenceObj;
} else {
console.error("No toISOString function in curr.recurrenceid", curr.recurrenceid);
}
}
if (par[curr.uid].rrule != void 0 && par[curr.uid].recurrenceid != void 0) {
delete par[curr.uid].recurrenceid;
}
} else
par[Math.random() * 1e5] = curr;
return par;
},
"SUMMARY": storeParam("summary"),
"DESCRIPTION": storeParam("description"),
"URL": storeParam("url"),
"UID": storeParam("uid"),
"LOCATION": storeParam("location"),
"DTSTART": dateParam("start"),
"DTEND": dateParam("end"),
"EXDATE": exdateParam("exdate"),
" CLASS": storeParam("class"),
"TRANSP": storeParam("transparency"),
"GEO": geoParam("geo"),
"PERCENT-COMPLETE": storeParam("completion"),
"COMPLETED": dateParam("completed"),
"CATEGORIES": categoriesParam("categories"),
"FREEBUSY": freebusyParam("freebusy"),
"DTSTAMP": dateParam("dtstamp"),
"CREATED": dateParam("created"),
"LAST-MODIFIED": dateParam("lastmodified"),
"RECURRENCE-ID": recurrenceParam("recurrenceid")
},
handleObject: function(name, val, params, ctx, stack, line) {
var self2 = this;
if (self2.objectHandlers[name])
return self2.objectHandlers[name](val, params, ctx, stack, line);
if (name.match(/X\-[\w\-]+/) && stack.length > 0) {
name = name.substring(2);
return storeParam(name)(val, params, ctx, stack, line);
}
return storeParam(name.toLowerCase())(val, params, ctx);
},
getLineBreakChar: function(string) {
const indexOfLF = string.indexOf("\n", 1);
if (indexOfLF === -1) {
if (string.indexOf("\r") !== -1)
return "\r";
return "\n";
}
if (string[indexOfLF - 1] === "\r")
return "\r?\n";
return "\n";
},
parseICS: function(str) {
var self2 = this;
var line_end_type = self2.getLineBreakChar(str);
var lines = str.split(line_end_type == "\n" ? /\n/ : /\r?\n/);
var ctx = {};
var stack = [];
for (var i = 0, ii = lines.length, l2 = lines[0]; i < ii; i++, l2 = lines[i]) {
while (lines[i + 1] && /[ \t]/.test(lines[i + 1][0])) {
l2 += lines[i + 1].slice(1);
i += 1;
}
var kv = l2.split(/:(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/g);
if (kv.length < 2) {
continue;
}
var value = kv.slice(1).join(":"), kp = kv[0].split(";"), name = kp[0], params = kp.slice(1);
ctx = self2.handleObject(name, value, params, ctx, stack, l2) || {};
}
delete ctx.type;
delete ctx.params;
return ctx;
}
};
});
}
});
// node_modules/.pnpm/luxon@1.28.1/node_modules/luxon/build/cjs-browser/luxon.js
var require_luxon = __commonJS({
"node_modules/.pnpm/luxon@1.28.1/node_modules/luxon/build/cjs-browser/luxon.js"(exports) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor)
descriptor.writable = true;
Object.defineProperty(target, descriptor.key, descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps)
_defineProperties(Constructor.prototype, protoProps);
if (staticProps)
_defineProperties(Constructor, staticProps);
return Constructor;
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
subClass.__proto__ = superClass;
}
function _getPrototypeOf(o) {
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf2(o2) {
return o2.__proto__ || Object.getPrototypeOf(o2);
};
return _getPrototypeOf(o);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf2(o2, p2) {
o2.__proto__ = p2;
return o2;
};
return _setPrototypeOf(o, p);
}
function _isNativeReflectConstruct() {
if (typeof Reflect === "undefined" || !Reflect.construct)
return false;
if (Reflect.construct.sham)
return false;
if (typeof Proxy === "function")
return true;
try {
Date.prototype.toString.call(Reflect.construct(Date, [], function() {
}));
return true;
} catch (e) {
return false;
}
}
function _construct(Parent, args, Class) {
if (_isNativeReflectConstruct()) {
_construct = Reflect.construct;
} else {
_construct = function _construct2(Parent2, args2, Class2) {
var a = [null];
a.push.apply(a, args2);
var Constructor = Function.bind.apply(Parent2, a);
var instance = new Constructor();
if (Class2)
_setPrototypeOf(instance, Class2.prototype);
return instance;
};
}
return _construct.apply(null, arguments);
}
function _isNativeFunction(fn) {
return Function.toString.call(fn).indexOf("[native code]") !== -1;
}
function _wrapNativeSuper(Class) {
var _cache = typeof Map === "function" ? /* @__PURE__ */ new Map() : void 0;
_wrapNativeSuper = function _wrapNativeSuper2(Class2) {
if (Class2 === null || !_isNativeFunction(Class2))
return Class2;
if (typeof Class2 !== "function") {
throw new TypeError("Super expression must either be null or a function");
}
if (typeof _cache !== "undefined") {
if (_cache.has(Class2))
return _cache.get(Class2);
_cache.set(Class2, Wrapper);
}
function Wrapper() {
return _construct(Class2, arguments, _getPrototypeOf(this).constructor);
}
Wrapper.prototype = Object.create(Class2.prototype, {
constructor: {
value: Wrapper,
enumerable: false,
writable: true,
configurable: true
}
});
return _setPrototypeOf(Wrapper, Class2);
};
return _wrapNativeSuper(Class);
}
function _objectWithoutPropertiesLoose(source, excluded) {
if (source == null)
return {};
var target = {};
var sourceKeys = Object.keys(source);
var key2, i;
for (i = 0; i < sourceKeys.length; i++) {
key2 = sourceKeys[i];
if (excluded.indexOf(key2) >= 0)
continue;
target[key2] = source[key2];
}
return target;
}
function _unsupportedIterableToArray(o, minLen) {
if (!o)
return;
if (typeof o === "string")
return _arrayLikeToArray(o, minLen);
var n3 = Object.prototype.toString.call(o).slice(8, -1);
if (n3 === "Object" && o.constructor)
n3 = o.constructor.name;
if (n3 === "Map" || n3 === "Set")
return Array.from(n3);
if (n3 === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n3))
return _arrayLikeToArray(o, minLen);
}
function _arrayLikeToArray(arr, len) {
if (len == null || len > arr.length)
len = arr.length;
for (var i = 0, arr2 = new Array(len); i < len; i++)
arr2[i] = arr[i];
return arr2;
}
function _createForOfIteratorHelperLoose(o) {
var i = 0;
if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) {
if (Array.isArray(o) || (o = _unsupportedIterableToArray(o)))
return function() {
if (i >= o.length)
return {
done: true
};
return {
done: false,
value: o[i++]
};
};
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
}
i = o[Symbol.iterator]();
return i.next.bind(i);
}
var LuxonError2 = /* @__PURE__ */ function(_Error) {
_inheritsLoose(LuxonError3, _Error);
function LuxonError3() {
return _Error.apply(this, arguments) || this;
}
return LuxonError3;
}(/* @__PURE__ */ _wrapNativeSuper(Error));
var InvalidDateTimeError2 = /* @__PURE__ */ function(_LuxonError) {
_inheritsLoose(InvalidDateTimeError3, _LuxonError);
function InvalidDateTimeError3(reason) {
return _LuxonError.call(this, "Invalid DateTime: " + reason.toMessage()) || this;
}
return InvalidDateTimeError3;
}(LuxonError2);
var InvalidIntervalError2 = /* @__PURE__ */ function(_LuxonError2) {
_inheritsLoose(InvalidIntervalError3, _LuxonError2);
function InvalidIntervalError3(reason) {
return _LuxonError2.call(this, "Invalid Interval: " + reason.toMessage()) || this;
}
return InvalidIntervalError3;
}(LuxonError2);
var InvalidDurationError2 = /* @__PURE__ */ function(_LuxonError3) {
_inheritsLoose(InvalidDurationError3, _LuxonError3);
function InvalidDurationError3(reason) {
return _LuxonError3.call(this, "Invalid Duration: " + reason.toMessage()) || this;
}
return InvalidDurationError3;
}(LuxonError2);
var ConflictingSpecificationError2 = /* @__PURE__ */ function(_LuxonError4) {
_inheritsLoose(ConflictingSpecificationError3, _LuxonError4);
function ConflictingSpecificationError3() {
return _LuxonError4.apply(this, arguments) || this;
}
return ConflictingSpecificationError3;
}(LuxonError2);
var InvalidUnitError2 = /* @__PURE__ */ function(_LuxonError5) {
_inheritsLoose(InvalidUnitError3, _LuxonError5);
function InvalidUnitError3(unit) {
return _LuxonError5.call(this, "Invalid unit " + unit) || this;
}
return InvalidUnitError3;
}(LuxonError2);
var InvalidArgumentError2 = /* @__PURE__ */ function(_LuxonError6) {
_inheritsLoose(InvalidArgumentError3, _LuxonError6);
function InvalidArgumentError3() {
return _LuxonError6.apply(this, arguments) || this;
}
return InvalidArgumentError3;
}(LuxonError2);
var ZoneIsAbstractError2 = /* @__PURE__ */ function(_LuxonError7) {
_inheritsLoose(ZoneIsAbstractError3, _LuxonError7);
function ZoneIsAbstractError3() {
return _LuxonError7.call(this, "Zone is an abstract class") || this;
}
return ZoneIsAbstractError3;
}(LuxonError2);
var n2 = "numeric";
var s2 = "short";
var l2 = "long";
var DATE_SHORT2 = {
year: n2,
month: n2,
day: n2
};
var DATE_MED2 = {
year: n2,
month: s2,
day: n2
};
var DATE_MED_WITH_WEEKDAY2 = {
year: n2,
month: s2,
day: n2,
weekday: s2
};
var DATE_FULL2 = {
year: n2,
month: l2,
day: n2
};
var DATE_HUGE2 = {
year: n2,
month: l2,
day: n2,
weekday: l2
};
var TIME_SIMPLE2 = {
hour: n2,
minute: n2
};
var TIME_WITH_SECONDS2 = {
hour: n2,
minute: n2,
second: n2
};
var TIME_WITH_SHORT_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
timeZoneName: s2
};
var TIME_WITH_LONG_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
timeZoneName: l2
};
var TIME_24_SIMPLE2 = {
hour: n2,
minute: n2,
hour12: false
};
var TIME_24_WITH_SECONDS2 = {
hour: n2,
minute: n2,
second: n2,
hour12: false
};
var TIME_24_WITH_SHORT_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
hour12: false,
timeZoneName: s2
};
var TIME_24_WITH_LONG_OFFSET2 = {
hour: n2,
minute: n2,
second: n2,
hour12: false,
timeZoneName: l2
};
var DATETIME_SHORT2 = {
year: n2,
month: n2,
day: n2,
hour: n2,
minute: n2
};
var DATETIME_SHORT_WITH_SECONDS2 = {
year: n2,
month: n2,
day: n2,
hour: n2,
minute: n2,
second: n2
};
var DATETIME_MED2 = {
year: n2,
month: s2,
day: n2,
hour: n2,
minute: n2
};
var DATETIME_MED_WITH_SECONDS2 = {
year: n2,
month: s2,
day: n2,
hour: n2,
minute: n2,
second: n2
};
var DATETIME_MED_WITH_WEEKDAY2 = {
year: n2,
month: s2,
day: n2,
weekday: s2,
hour: n2,
minute: n2
};
var DATETIME_FULL2 = {
year: n2,
month: l2,
day: n2,
hour: n2,
minute: n2,
timeZoneName: s2
};
var DATETIME_FULL_WITH_SECONDS2 = {
year: n2,
month: l2,
day: n2,
hour: n2,
minute: n2,
second: n2,
timeZoneName: s2
};
var DATETIME_HUGE2 = {
year: n2,
month: l2,
day: n2,
weekday: l2,
hour: n2,
minute: n2,
timeZoneName: l2
};
var DATETIME_HUGE_WITH_SECONDS2 = {
year: n2,
month: l2,
day: n2,
weekday: l2,
hour: n2,
minute: n2,
second: n2,
timeZoneName: l2
};
function isUndefined2(o) {
return typeof o === "undefined";
}
function isNumber2(o) {
return typeof o === "number";
}
function isInteger2(o) {
return typeof o === "number" && o % 1 === 0;
}
function isString2(o) {
return typeof o === "string";
}
function isDate2(o) {
return Object.prototype.toString.call(o) === "[object Date]";
}
function hasIntl() {
try {
return typeof Intl !== "undefined" && Intl.DateTimeFormat;
} catch (e) {
return false;
}
}
function hasFormatToParts() {
return !isUndefined2(Intl.DateTimeFormat.prototype.formatToParts);
}
function hasRelative2() {
try {
return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat;
} catch (e) {
return false;
}
}
function maybeArray2(thing) {
return Array.isArray(thing) ? thing : [thing];
}
function bestBy2(arr, by, compare) {
if (arr.length === 0) {
return void 0;
}
return arr.reduce(function(best, next) {
var pair = [by(next), next];
if (!best) {
return pair;
} else if (compare(best[0], pair[0]) === best[0]) {
return best;
} else {
return pair;
}
}, null)[1];
}
function pick2(obj, keys) {
return keys.reduce(function(a, k) {
a[k] = obj[k];
return a;
}, {});
}
function hasOwnProperty2(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
function integerBetween2(thing, bottom, top) {
return isInteger2(thing) && thing >= bottom && thing <= top;
}
function floorMod2(x, n3) {
return x - n3 * Math.floor(x / n3);
}
function padStart2(input, n3) {
if (n3 === void 0) {
n3 = 2;
}
var minus = input < 0 ? "-" : "";
var target = minus ? input * -1 : input;
var result;
if (target.toString().length < n3) {
result = ("0".repeat(n3) + target).slice(-n3);
} else {
result = target.toString();
}
return "" + minus + result;
}
function parseInteger2(string) {
if (isUndefined2(string) || string === null || string === "") {
return void 0;
} else {
return parseInt(string, 10);
}
}
function parseMillis2(fraction) {
if (isUndefined2(fraction) || fraction === null || fraction === "") {
return void 0;
} else {
var f = parseFloat("0." + fraction) * 1e3;
return Math.floor(f);
}
}
function roundTo2(number, digits, towardZero) {
if (towardZero === void 0) {
towardZero = false;
}
var factor = Math.pow(10, digits), rounder = towardZero ? Math.trunc : Math.round;
return rounder(number * factor) / factor;
}
function isLeapYear2(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function daysInYear2(year) {
return isLeapYear2(year) ? 366 : 365;
}
function daysInMonth2(year, month) {
var modMonth = floorMod2(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12;
if (modMonth === 2) {
return isLeapYear2(modYear) ? 29 : 28;
} else {
return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];
}
}
function objToLocalTS2(obj) {
var d = Date.UTC(obj.year, obj.month - 1, obj.day, obj.hour, obj.minute, obj.second, obj.millisecond);
if (obj.year < 100 && obj.year >= 0) {
d = new Date(d);
d.setUTCFullYear(d.getUTCFullYear() - 1900);
}
return +d;
}
function weeksInWeekYear2(weekYear) {
var p1 = (weekYear + Math.floor(weekYear / 4) - Math.floor(weekYear / 100) + Math.floor(weekYear / 400)) % 7, last = weekYear - 1, p2 = (last + Math.floor(last / 4) - Math.floor(last / 100) + Math.floor(last / 400)) % 7;
return p1 === 4 || p2 === 3 ? 53 : 52;
}
function untruncateYear2(year) {
if (year > 99) {
return year;
} else
return year > 60 ? 1900 + year : 2e3 + year;
}
function parseZoneInfo2(ts, offsetFormat, locale, timeZone) {
if (timeZone === void 0) {
timeZone = null;
}
var date = new Date(ts), intlOpts = {
hour12: false,
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit"
};
if (timeZone) {
intlOpts.timeZone = timeZone;
}
var modified = Object.assign({
timeZoneName: offsetFormat
}, intlOpts), intl = hasIntl();
if (intl && hasFormatToParts()) {
var parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find(function(m) {
return m.type.toLowerCase() === "timezonename";
});
return parsed ? parsed.value : null;
} else if (intl) {
var without = new Intl.DateTimeFormat(locale, intlOpts).format(date), included = new Intl.DateTimeFormat(locale, modified).format(date), diffed = included.substring(without.length), trimmed = diffed.replace(/^[, \u200e]+/, "");
return trimmed;
} else {
return null;
}
}
function signedOffset2(offHourStr, offMinuteStr) {
var offHour = parseInt(offHourStr, 10);
if (Number.isNaN(offHour)) {
offHour = 0;
}
var offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;
return offHour * 60 + offMinSigned;
}
function asNumber2(value) {
var numericValue = Number(value);
if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue))
throw new InvalidArgumentError2("Invalid unit value " + value);
return numericValue;
}
function normalizeObject2(obj, normalizer, nonUnitKeys) {
var normalized = {};
for (var u in obj) {
if (hasOwnProperty2(obj, u)) {
if (nonUnitKeys.indexOf(u) >= 0)
continue;
var v = obj[u];
if (v === void 0 || v === null)
continue;
normalized[normalizer(u)] = asNumber2(v);
}
}
return normalized;
}
function formatOffset2(offset3, format) {
var hours = Math.trunc(Math.abs(offset3 / 60)), minutes = Math.trunc(Math.abs(offset3 % 60)), sign = offset3 >= 0 ? "+" : "-";
switch (format) {
case "short":
return "" + sign + padStart2(hours, 2) + ":" + padStart2(minutes, 2);
case "narrow":
return "" + sign + hours + (minutes > 0 ? ":" + minutes : "");
case "techie":
return "" + sign + padStart2(hours, 2) + padStart2(minutes, 2);
default:
throw new RangeError("Value format " + format + " is out of range for property format");
}
}
function timeObject2(obj) {
return pick2(obj, ["hour", "minute", "second", "millisecond"]);
}
var ianaRegex2 = /[A-Za-z_+-]{1,256}(:?\/[A-Za-z_+-]{1,256}(\/[A-Za-z_+-]{1,256})?)?/;
function stringify(obj) {
return JSON.stringify(obj, Object.keys(obj).sort());
}
var monthsLong2 = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
var monthsShort2 = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
var monthsNarrow2 = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function months2(length) {
switch (length) {
case "narrow":
return [].concat(monthsNarrow2);
case "short":
return [].concat(monthsShort2);
case "long":
return [].concat(monthsLong2);
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
case "2-digit":
return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
default:
return null;
}
}
var weekdaysLong2 = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
var weekdaysShort2 = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
var weekdaysNarrow2 = ["M", "T", "W", "T", "F", "S", "S"];
function weekdays2(length) {
switch (length) {
case "narrow":
return [].concat(weekdaysNarrow2);
case "short":
return [].concat(weekdaysShort2);
case "long":
return [].concat(weekdaysLong2);
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7"];
default:
return null;
}
}
var meridiems2 = ["AM", "PM"];
var erasLong2 = ["Before Christ", "Anno Domini"];
var erasShort2 = ["BC", "AD"];
var erasNarrow2 = ["B", "A"];
function eras2(length) {
switch (length) {
case "narrow":
return [].concat(erasNarrow2);
case "short":
return [].concat(erasShort2);
case "long":
return [].concat(erasLong2);
default:
return null;
}
}
function meridiemForDateTime2(dt) {
return meridiems2[dt.hour < 12 ? 0 : 1];
}
function weekdayForDateTime2(dt, length) {
return weekdays2(length)[dt.weekday - 1];
}
function monthForDateTime2(dt, length) {
return months2(length)[dt.month - 1];
}
function eraForDateTime2(dt, length) {
return eras2(length)[dt.year < 0 ? 0 : 1];
}
function formatRelativeTime2(unit, count, numeric, narrow) {
if (numeric === void 0) {
numeric = "always";
}
if (narrow === void 0) {
narrow = false;
}
var units = {
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."]
};
var lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1;
if (numeric === "auto" && lastable) {
var isDay = unit === "days";
switch (count) {
case 1:
return isDay ? "tomorrow" : "next " + units[unit][0];
case -1:
return isDay ? "yesterday" : "last " + units[unit][0];
case 0:
return isDay ? "today" : "this " + units[unit][0];
}
}
var isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;
return isInPast ? fmtValue + " " + fmtUnit + " ago" : "in " + fmtValue + " " + fmtUnit;
}
function formatString(knownFormat) {
var filtered = pick2(knownFormat, ["weekday", "era", "year", "month", "day", "hour", "minute", "second", "timeZoneName", "hour12"]), key2 = stringify(filtered), dateTimeHuge = "EEEE, LLLL d, yyyy, h:mm a";
switch (key2) {
case stringify(DATE_SHORT2):
return "M/d/yyyy";
case stringify(DATE_MED2):
return "LLL d, yyyy";
case stringify(DATE_MED_WITH_WEEKDAY2):
return "EEE, LLL d, yyyy";
case stringify(DATE_FULL2):
return "LLLL d, yyyy";
case stringify(DATE_HUGE2):
return "EEEE, LLLL d, yyyy";
case stringify(TIME_SIMPLE2):
return "h:mm a";
case stringify(TIME_WITH_SECONDS2):
return "h:mm:ss a";
case stringify(TIME_WITH_SHORT_OFFSET2):
return "h:mm a";
case stringify(TIME_WITH_LONG_OFFSET2):
return "h:mm a";
case stringify(TIME_24_SIMPLE2):
return "HH:mm";
case stringify(TIME_24_WITH_SECONDS2):
return "HH:mm:ss";
case stringify(TIME_24_WITH_SHORT_OFFSET2):
return "HH:mm";
case stringify(TIME_24_WITH_LONG_OFFSET2):
return "HH:mm";
case stringify(DATETIME_SHORT2):
return "M/d/yyyy, h:mm a";
case stringify(DATETIME_MED2):
return "LLL d, yyyy, h:mm a";
case stringify(DATETIME_FULL2):
return "LLLL d, yyyy, h:mm a";
case stringify(DATETIME_HUGE2):
return dateTimeHuge;
case stringify(DATETIME_SHORT_WITH_SECONDS2):
return "M/d/yyyy, h:mm:ss a";
case stringify(DATETIME_MED_WITH_SECONDS2):
return "LLL d, yyyy, h:mm:ss a";
case stringify(DATETIME_MED_WITH_WEEKDAY2):
return "EEE, d LLL yyyy, h:mm a";
case stringify(DATETIME_FULL_WITH_SECONDS2):
return "LLLL d, yyyy, h:mm:ss a";
case stringify(DATETIME_HUGE_WITH_SECONDS2):
return "EEEE, LLLL d, yyyy, h:mm:ss a";
default:
return dateTimeHuge;
}
}
function stringifyTokens2(splits, tokenToString) {
var s3 = "";
for (var _iterator = _createForOfIteratorHelperLoose(splits), _step; !(_step = _iterator()).done; ) {
var token = _step.value;
if (token.literal) {
s3 += token.val;
} else {
s3 += tokenToString(token.val);
}
}
return s3;
}
var _macroTokenToFormatOpts = {
D: DATE_SHORT2,
DD: DATE_MED2,
DDD: DATE_FULL2,
DDDD: DATE_HUGE2,
t: TIME_SIMPLE2,
tt: TIME_WITH_SECONDS2,
ttt: TIME_WITH_SHORT_OFFSET2,
tttt: TIME_WITH_LONG_OFFSET2,
T: TIME_24_SIMPLE2,
TT: TIME_24_WITH_SECONDS2,
TTT: TIME_24_WITH_SHORT_OFFSET2,
TTTT: TIME_24_WITH_LONG_OFFSET2,
f: DATETIME_SHORT2,
ff: DATETIME_MED2,
fff: DATETIME_FULL2,
ffff: DATETIME_HUGE2,
F: DATETIME_SHORT_WITH_SECONDS2,
FF: DATETIME_MED_WITH_SECONDS2,
FFF: DATETIME_FULL_WITH_SECONDS2,
FFFF: DATETIME_HUGE_WITH_SECONDS2
};
var Formatter2 = /* @__PURE__ */ function() {
Formatter3.create = function create(locale, opts) {
if (opts === void 0) {
opts = {};
}
return new Formatter3(locale, opts);
};
Formatter3.parseFormat = function parseFormat(fmt) {
var current2 = null, currentFull = "", bracketed = false;
var splits = [];
for (var i = 0; i < fmt.length; i++) {
var c = fmt.charAt(i);
if (c === "'") {
if (currentFull.length > 0) {
splits.push({
literal: bracketed,
val: currentFull
});
}
current2 = null;
currentFull = "";
bracketed = !bracketed;
} else if (bracketed) {
currentFull += c;
} else if (c === current2) {
currentFull += c;
} else {
if (currentFull.length > 0) {
splits.push({
literal: false,
val: currentFull
});
}
currentFull = c;
current2 = c;
}
}
if (currentFull.length > 0) {
splits.push({
literal: bracketed,
val: currentFull
});
}
return splits;
};
Formatter3.macroTokenToFormatOpts = function macroTokenToFormatOpts2(token) {
return _macroTokenToFormatOpts[token];
};
function Formatter3(locale, formatOpts) {
this.opts = formatOpts;
this.loc = locale;
this.systemLoc = null;
}
var _proto = Formatter3.prototype;
_proto.formatWithSystemDefault = function formatWithSystemDefault(dt, opts) {
if (this.systemLoc === null) {
this.systemLoc = this.loc.redefaultToSystem();
}
var df = this.systemLoc.dtFormatter(dt, Object.assign({}, this.opts, opts));
return df.format();
};
_proto.formatDateTime = function formatDateTime(dt, opts) {
if (opts === void 0) {
opts = {};
}
var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));
return df.format();
};
_proto.formatDateTimeParts = function formatDateTimeParts(dt, opts) {
if (opts === void 0) {
opts = {};
}
var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));
return df.formatToParts();
};
_proto.resolvedOptions = function resolvedOptions(dt, opts) {
if (opts === void 0) {
opts = {};
}
var df = this.loc.dtFormatter(dt, Object.assign({}, this.opts, opts));
return df.resolvedOptions();
};
_proto.num = function num(n3, p) {
if (p === void 0) {
p = 0;
}
if (this.opts.forceSimple) {
return padStart2(n3, p);
}
var opts = Object.assign({}, this.opts);
if (p > 0) {
opts.padTo = p;
}
return this.loc.numberFormatter(opts).format(n3);
};
_proto.formatDateTimeFromString = function formatDateTimeFromString(dt, fmt) {
var _this = this;
var knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory" && hasFormatToParts(), string = function string2(opts, extract) {
return _this.loc.extract(dt, opts, extract);
}, formatOffset3 = function formatOffset4(opts) {
if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {
return "Z";
}
return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : "";
}, meridiem = function meridiem2() {
return knownEnglish ? meridiemForDateTime2(dt) : string({
hour: "numeric",
hour12: true
}, "dayperiod");
}, month = function month2(length, standalone) {
return knownEnglish ? monthForDateTime2(dt, length) : string(standalone ? {
month: length
} : {
month: length,
day: "numeric"
}, "month");
}, weekday = function weekday2(length, standalone) {
return knownEnglish ? weekdayForDateTime2(dt, length) : string(standalone ? {
weekday: length
} : {
weekday: length,
month: "long",
day: "numeric"
}, "weekday");
}, maybeMacro = function maybeMacro2(token) {
var formatOpts = Formatter3.macroTokenToFormatOpts(token);
if (formatOpts) {
return _this.formatWithSystemDefault(dt, formatOpts);
} else {
return token;
}
}, era = function era2(length) {
return knownEnglish ? eraForDateTime2(dt, length) : string({
era: length
}, "era");
}, tokenToString = function tokenToString2(token) {
switch (token) {
case "S":
return _this.num(dt.millisecond);
case "u":
case "SSS":
return _this.num(dt.millisecond, 3);
case "s":
return _this.num(dt.second);
case "ss":
return _this.num(dt.second, 2);
case "m":
return _this.num(dt.minute);
case "mm":
return _this.num(dt.minute, 2);
case "h":
return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);
case "hh":
return _this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);
case "H":
return _this.num(dt.hour);
case "HH":
return _this.num(dt.hour, 2);
case "Z":
return formatOffset3({
format: "narrow",
allowZ: _this.opts.allowZ
});
case "ZZ":
return formatOffset3({
format: "short",
allowZ: _this.opts.allowZ
});
case "ZZZ":
return formatOffset3({
format: "techie",
allowZ: _this.opts.allowZ
});
case "ZZZZ":
return dt.zone.offsetName(dt.ts, {
format: "short",
locale: _this.loc.locale
});
case "ZZZZZ":
return dt.zone.offsetName(dt.ts, {
format: "long",
locale: _this.loc.locale
});
case "z":
return dt.zoneName;
case "a":
return meridiem();
case "d":
return useDateTimeFormatter ? string({
day: "numeric"
}, "day") : _this.num(dt.day);
case "dd":
return useDateTimeFormatter ? string({
day: "2-digit"
}, "day") : _this.num(dt.day, 2);
case "c":
return _this.num(dt.weekday);
case "ccc":
return weekday("short", true);
case "cccc":
return weekday("long", true);
case "ccccc":
return weekday("narrow", true);
case "E":
return _this.num(dt.weekday);
case "EEE":
return weekday("short", false);
case "EEEE":
return weekday("long", false);
case "EEEEE":
return weekday("narrow", false);
case "L":
return useDateTimeFormatter ? string({
month: "numeric",
day: "numeric"
}, "month") : _this.num(dt.month);
case "LL":
return useDateTimeFormatter ? string({
month: "2-digit",
day: "numeric"
}, "month") : _this.num(dt.month, 2);
case "LLL":
return month("short", true);
case "LLLL":
return month("long", true);
case "LLLLL":
return month("narrow", true);
case "M":
return useDateTimeFormatter ? string({
month: "numeric"
}, "month") : _this.num(dt.month);
case "MM":
return useDateTimeFormatter ? string({
month: "2-digit"
}, "month") : _this.num(dt.month, 2);
case "MMM":
return month("short", false);
case "MMMM":
return month("long", false);
case "MMMMM":
return month("narrow", false);
case "y":
return useDateTimeFormatter ? string({
year: "numeric"
}, "year") : _this.num(dt.year);
case "yy":
return useDateTimeFormatter ? string({
year: "2-digit"
}, "year") : _this.num(dt.year.toString().slice(-2), 2);
case "yyyy":
return useDateTimeFormatter ? string({
year: "numeric"
}, "year") : _this.num(dt.year, 4);
case "yyyyyy":
return useDateTimeFormatter ? string({
year: "numeric"
}, "year") : _this.num(dt.year, 6);
case "G":
return era("short");
case "GG":
return era("long");
case "GGGGG":
return era("narrow");
case "kk":
return _this.num(dt.weekYear.toString().slice(-2), 2);
case "kkkk":
return _this.num(dt.weekYear, 4);
case "W":
return _this.num(dt.weekNumber);
case "WW":
return _this.num(dt.weekNumber, 2);
case "o":
return _this.num(dt.ordinal);
case "ooo":
return _this.num(dt.ordinal, 3);
case "q":
return _this.num(dt.quarter);
case "qq":
return _this.num(dt.quarter, 2);
case "X":
return _this.num(Math.floor(dt.ts / 1e3));
case "x":
return _this.num(dt.ts);
default:
return maybeMacro(token);
}
};
return stringifyTokens2(Formatter3.parseFormat(fmt), tokenToString);
};
_proto.formatDurationFromString = function formatDurationFromString(dur, fmt) {
var _this2 = this;
var tokenToField = function tokenToField2(token) {
switch (token[0]) {
case "S":
return "millisecond";
case "s":
return "second";
case "m":
return "minute";
case "h":
return "hour";
case "d":
return "day";
case "M":
return "month";
case "y":
return "year";
default:
return null;
}
}, tokenToString = function tokenToString2(lildur) {
return function(token) {
var mapped = tokenToField(token);
if (mapped) {
return _this2.num(lildur.get(mapped), token.length);
} else {
return token;
}
};
}, tokens = Formatter3.parseFormat(fmt), realTokens = tokens.reduce(function(found, _ref) {
var literal = _ref.literal, val = _ref.val;
return literal ? found : found.concat(val);
}, []), collapsed = dur.shiftTo.apply(dur, realTokens.map(tokenToField).filter(function(t) {
return t;
}));
return stringifyTokens2(tokens, tokenToString(collapsed));
};
return Formatter3;
}();
var Invalid2 = /* @__PURE__ */ function() {
function Invalid3(reason, explanation) {
this.reason = reason;
this.explanation = explanation;
}
var _proto = Invalid3.prototype;
_proto.toMessage = function toMessage() {
if (this.explanation) {
return this.reason + ": " + this.explanation;
} else {
return this.reason;
}
};
return Invalid3;
}();
var Zone2 = /* @__PURE__ */ function() {
function Zone3() {
}
var _proto = Zone3.prototype;
_proto.offsetName = function offsetName(ts, opts) {
throw new ZoneIsAbstractError2();
};
_proto.formatOffset = function formatOffset3(ts, format) {
throw new ZoneIsAbstractError2();
};
_proto.offset = function offset3(ts) {
throw new ZoneIsAbstractError2();
};
_proto.equals = function equals(otherZone) {
throw new ZoneIsAbstractError2();
};
_createClass(Zone3, [{
key: "type",
/**
* The type of zone
* @abstract
* @type {string}
*/
get: function get() {
throw new ZoneIsAbstractError2();
}
/**
* The name of this zone.
* @abstract
* @type {string}
*/
}, {
key: "name",
get: function get() {
throw new ZoneIsAbstractError2();
}
/**
* Returns whether the offset is known to be fixed for the whole year.
* @abstract
* @type {boolean}
*/
}, {
key: "universal",
get: function get() {
throw new ZoneIsAbstractError2();
}
}, {
key: "isValid",
get: function get() {
throw new ZoneIsAbstractError2();
}
}]);
return Zone3;
}();
var singleton3 = null;
var LocalZone = /* @__PURE__ */ function(_Zone) {
_inheritsLoose(LocalZone2, _Zone);
function LocalZone2() {
return _Zone.apply(this, arguments) || this;
}
var _proto = LocalZone2.prototype;
_proto.offsetName = function offsetName(ts, _ref) {
var format = _ref.format, locale = _ref.locale;
return parseZoneInfo2(ts, format, locale);
};
_proto.formatOffset = function formatOffset$1(ts, format) {
return formatOffset2(this.offset(ts), format);
};
_proto.offset = function offset3(ts) {
return -new Date(ts).getTimezoneOffset();
};
_proto.equals = function equals(otherZone) {
return otherZone.type === "local";
};
_createClass(LocalZone2, [{
key: "type",
/** @override **/
get: function get() {
return "local";
}
/** @override **/
}, {
key: "name",
get: function get() {
if (hasIntl()) {
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
} else
return "local";
}
/** @override **/
}, {
key: "universal",
get: function get() {
return false;
}
}, {
key: "isValid",
get: function get() {
return true;
}
}], [{
key: "instance",
/**
* Get a singleton instance of the local zone
* @return {LocalZone}
*/
get: function get() {
if (singleton3 === null) {
singleton3 = new LocalZone2();
}
return singleton3;
}
}]);
return LocalZone2;
}(Zone2);
var matchingRegex = RegExp("^" + ianaRegex2.source + "$");
var dtfCache2 = {};
function makeDTF2(zone) {
if (!dtfCache2[zone]) {
dtfCache2[zone] = new Intl.DateTimeFormat("en-US", {
hour12: false,
timeZone: zone,
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit"
});
}
return dtfCache2[zone];
}
var typeToPos2 = {
year: 0,
month: 1,
day: 2,
hour: 3,
minute: 4,
second: 5
};
function hackyOffset2(dtf, date) {
var formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(formatted), fMonth = parsed[1], fDay = parsed[2], fYear = parsed[3], fHour = parsed[4], fMinute = parsed[5], fSecond = parsed[6];
return [fYear, fMonth, fDay, fHour, fMinute, fSecond];
}
function partsOffset2(dtf, date) {
var formatted = dtf.formatToParts(date), filled = [];
for (var i = 0; i < formatted.length; i++) {
var _formatted$i = formatted[i], type = _formatted$i.type, value = _formatted$i.value, pos = typeToPos2[type];
if (!isUndefined2(pos)) {
filled[pos] = parseInt(value, 10);
}
}
return filled;
}
var ianaZoneCache2 = {};
var IANAZone2 = /* @__PURE__ */ function(_Zone) {
_inheritsLoose(IANAZone3, _Zone);
IANAZone3.create = function create(name) {
if (!ianaZoneCache2[name]) {
ianaZoneCache2[name] = new IANAZone3(name);
}
return ianaZoneCache2[name];
};
IANAZone3.resetCache = function resetCache() {
ianaZoneCache2 = {};
dtfCache2 = {};
};
IANAZone3.isValidSpecifier = function isValidSpecifier(s3) {
return !!(s3 && s3.match(matchingRegex));
};
IANAZone3.isValidZone = function isValidZone(zone) {
try {
new Intl.DateTimeFormat("en-US", {
timeZone: zone
}).format();
return true;
} catch (e) {
return false;
}
};
IANAZone3.parseGMTOffset = function parseGMTOffset(specifier) {
if (specifier) {
var match3 = specifier.match(/^Etc\/GMT(0|[+-]\d{1,2})$/i);
if (match3) {
return -60 * parseInt(match3[1]);
}
}
return null;
};
function IANAZone3(name) {
var _this;
_this = _Zone.call(this) || this;
_this.zoneName = name;
_this.valid = IANAZone3.isValidZone(name);
return _this;
}
var _proto = IANAZone3.prototype;
_proto.offsetName = function offsetName(ts, _ref) {
var format = _ref.format, locale = _ref.locale;
return parseZoneInfo2(ts, format, locale, this.name);
};
_proto.formatOffset = function formatOffset$1(ts, format) {
return formatOffset2(this.offset(ts), format);
};
_proto.offset = function offset3(ts) {
var date = new Date(ts);
if (isNaN(date))
return NaN;
var dtf = makeDTF2(this.name), _ref2 = dtf.formatToParts ? partsOffset2(dtf, date) : hackyOffset2(dtf, date), year = _ref2[0], month = _ref2[1], day = _ref2[2], hour = _ref2[3], minute = _ref2[4], second = _ref2[5], adjustedHour = hour === 24 ? 0 : hour;
var asUTC = objToLocalTS2({
year,
month,
day,
hour: adjustedHour,
minute,
second,
millisecond: 0
});
var asTS = +date;
var over = asTS % 1e3;
asTS -= over >= 0 ? over : 1e3 + over;
return (asUTC - asTS) / (60 * 1e3);
};
_proto.equals = function equals(otherZone) {
return otherZone.type === "iana" && otherZone.name === this.name;
};
_createClass(IANAZone3, [{
key: "type",
get: function get() {
return "iana";
}
/** @override **/
}, {
key: "name",
get: function get() {
return this.zoneName;
}
/** @override **/
}, {
key: "universal",
get: function get() {
return false;
}
}, {
key: "isValid",
get: function get() {
return this.valid;
}
}]);
return IANAZone3;
}(Zone2);
var singleton$1 = null;
var FixedOffsetZone2 = /* @__PURE__ */ function(_Zone) {
_inheritsLoose(FixedOffsetZone3, _Zone);
FixedOffsetZone3.instance = function instance(offset3) {
return offset3 === 0 ? FixedOffsetZone3.utcInstance : new FixedOffsetZone3(offset3);
};
FixedOffsetZone3.parseSpecifier = function parseSpecifier(s3) {
if (s3) {
var r = s3.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
if (r) {
return new FixedOffsetZone3(signedOffset2(r[1], r[2]));
}
}
return null;
};
_createClass(FixedOffsetZone3, null, [{
key: "utcInstance",
/**
* Get a singleton instance of UTC
* @return {FixedOffsetZone}
*/
get: function get() {
if (singleton$1 === null) {
singleton$1 = new FixedOffsetZone3(0);
}
return singleton$1;
}
}]);
function FixedOffsetZone3(offset3) {
var _this;
_this = _Zone.call(this) || this;
_this.fixed = offset3;
return _this;
}
var _proto = FixedOffsetZone3.prototype;
_proto.offsetName = function offsetName() {
return this.name;
};
_proto.formatOffset = function formatOffset$1(ts, format) {
return formatOffset2(this.fixed, format);
};
_proto.offset = function offset3() {
return this.fixed;
};
_proto.equals = function equals(otherZone) {
return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
};
_createClass(FixedOffsetZone3, [{
key: "type",
get: function get() {
return "fixed";
}
/** @override **/
}, {
key: "name",
get: function get() {
return this.fixed === 0 ? "UTC" : "UTC" + formatOffset2(this.fixed, "narrow");
}
}, {
key: "universal",
get: function get() {
return true;
}
}, {
key: "isValid",
get: function get() {
return true;
}
}]);
return FixedOffsetZone3;
}(Zone2);
var InvalidZone2 = /* @__PURE__ */ function(_Zone) {
_inheritsLoose(InvalidZone3, _Zone);
function InvalidZone3(zoneName) {
var _this;
_this = _Zone.call(this) || this;
_this.zoneName = zoneName;
return _this;
}
var _proto = InvalidZone3.prototype;
_proto.offsetName = function offsetName() {
return null;
};
_proto.formatOffset = function formatOffset3() {
return "";
};
_proto.offset = function offset3() {
return NaN;
};
_proto.equals = function equals() {
return false;
};
_createClass(InvalidZone3, [{
key: "type",
get: function get() {
return "invalid";
}
/** @override **/
}, {
key: "name",
get: function get() {
return this.zoneName;
}
/** @override **/
}, {
key: "universal",
get: function get() {
return false;
}
}, {
key: "isValid",
get: function get() {
return false;
}
}]);
return InvalidZone3;
}(Zone2);
function normalizeZone2(input, defaultZone3) {
var offset3;
if (isUndefined2(input) || input === null) {
return defaultZone3;
} else if (input instanceof Zone2) {
return input;
} else if (isString2(input)) {
var lowered = input.toLowerCase();
if (lowered === "local")
return defaultZone3;
else if (lowered === "utc" || lowered === "gmt")
return FixedOffsetZone2.utcInstance;
else if ((offset3 = IANAZone2.parseGMTOffset(input)) != null) {
return FixedOffsetZone2.instance(offset3);
} else if (IANAZone2.isValidSpecifier(lowered))
return IANAZone2.create(input);
else
return FixedOffsetZone2.parseSpecifier(lowered) || new InvalidZone2(input);
} else if (isNumber2(input)) {
return FixedOffsetZone2.instance(input);
} else if (typeof input === "object" && input.offset && typeof input.offset === "number") {
return input;
} else {
return new InvalidZone2(input);
}
}
var now3 = function now4() {
return Date.now();
};
var defaultZone2 = null;
var defaultLocale2 = null;
var defaultNumberingSystem2 = null;
var defaultOutputCalendar2 = null;
var throwOnInvalid2 = false;
var Settings2 = /* @__PURE__ */ function() {
function Settings3() {
}
Settings3.resetCaches = function resetCaches() {
Locale2.resetCache();
IANAZone2.resetCache();
};
_createClass(Settings3, null, [{
key: "now",
/**
* Get the callback for returning the current timestamp.
* @type {function}
*/
get: function get() {
return now3;
},
set: function set2(n3) {
now3 = n3;
}
/**
* Get the default time zone to create DateTimes in.
* @type {string}
*/
}, {
key: "defaultZoneName",
get: function get() {
return Settings3.defaultZone.name;
},
set: function set2(z) {
if (!z) {
defaultZone2 = null;
} else {
defaultZone2 = normalizeZone2(z);
}
}
/**
* Get the default time zone object to create DateTimes in. Does not affect existing instances.
* @type {Zone}
*/
}, {
key: "defaultZone",
get: function get() {
return defaultZone2 || LocalZone.instance;
}
/**
* Get the default locale to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
}, {
key: "defaultLocale",
get: function get() {
return defaultLocale2;
},
set: function set2(locale) {
defaultLocale2 = locale;
}
/**
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
}, {
key: "defaultNumberingSystem",
get: function get() {
return defaultNumberingSystem2;
},
set: function set2(numberingSystem) {
defaultNumberingSystem2 = numberingSystem;
}
/**
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
}, {
key: "defaultOutputCalendar",
get: function get() {
return defaultOutputCalendar2;
},
set: function set2(outputCalendar) {
defaultOutputCalendar2 = outputCalendar;
}
/**
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
* @type {boolean}
*/
}, {
key: "throwOnInvalid",
get: function get() {
return throwOnInvalid2;
},
set: function set2(t) {
throwOnInvalid2 = t;
}
}]);
return Settings3;
}();
var intlDTCache2 = {};
function getCachedDTF2(locString, opts) {
if (opts === void 0) {
opts = {};
}
var key2 = JSON.stringify([locString, opts]);
var dtf = intlDTCache2[key2];
if (!dtf) {
dtf = new Intl.DateTimeFormat(locString, opts);
intlDTCache2[key2] = dtf;
}
return dtf;
}
var intlNumCache2 = {};
function getCachedINF2(locString, opts) {
if (opts === void 0) {
opts = {};
}
var key2 = JSON.stringify([locString, opts]);
var inf = intlNumCache2[key2];
if (!inf) {
inf = new Intl.NumberFormat(locString, opts);
intlNumCache2[key2] = inf;
}
return inf;
}
var intlRelCache2 = {};
function getCachedRTF2(locString, opts) {
if (opts === void 0) {
opts = {};
}
var _opts = opts, base = _opts.base, cacheKeyOpts = _objectWithoutPropertiesLoose(_opts, ["base"]);
var key2 = JSON.stringify([locString, cacheKeyOpts]);
var inf = intlRelCache2[key2];
if (!inf) {
inf = new Intl.RelativeTimeFormat(locString, opts);
intlRelCache2[key2] = inf;
}
return inf;
}
var sysLocaleCache2 = null;
function systemLocale2() {
if (sysLocaleCache2) {
return sysLocaleCache2;
} else if (hasIntl()) {
var computedSys = new Intl.DateTimeFormat().resolvedOptions().locale;
sysLocaleCache2 = !computedSys || computedSys === "und" ? "en-US" : computedSys;
return sysLocaleCache2;
} else {
sysLocaleCache2 = "en-US";
return sysLocaleCache2;
}
}
function parseLocaleString2(localeStr) {
var uIndex = localeStr.indexOf("-u-");
if (uIndex === -1) {
return [localeStr];
} else {
var options;
var smaller = localeStr.substring(0, uIndex);
try {
options = getCachedDTF2(localeStr).resolvedOptions();
} catch (e) {
options = getCachedDTF2(smaller).resolvedOptions();
}
var _options = options, numberingSystem = _options.numberingSystem, calendar = _options.calendar;
return [smaller, numberingSystem, calendar];
}
}
function intlConfigString2(localeStr, numberingSystem, outputCalendar) {
if (hasIntl()) {
if (outputCalendar || numberingSystem) {
localeStr += "-u";
if (outputCalendar) {
localeStr += "-ca-" + outputCalendar;
}
if (numberingSystem) {
localeStr += "-nu-" + numberingSystem;
}
return localeStr;
} else {
return localeStr;
}
} else {
return [];
}
}
function mapMonths2(f) {
var ms = [];
for (var i = 1; i <= 12; i++) {
var dt = DateTime2.utc(2016, i, 1);
ms.push(f(dt));
}
return ms;
}
function mapWeekdays2(f) {
var ms = [];
for (var i = 1; i <= 7; i++) {
var dt = DateTime2.utc(2016, 11, 13 + i);
ms.push(f(dt));
}
return ms;
}
function listStuff2(loc, length, defaultOK, englishFn, intlFn) {
var mode = loc.listingMode(defaultOK);
if (mode === "error") {
return null;
} else if (mode === "en") {
return englishFn(length);
} else {
return intlFn(length);
}
}
function supportsFastNumbers2(loc) {
if (loc.numberingSystem && loc.numberingSystem !== "latn") {
return false;
} else {
return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || hasIntl() && new Intl.DateTimeFormat(loc.intl).resolvedOptions().numberingSystem === "latn";
}
}
var PolyNumberFormatter2 = /* @__PURE__ */ function() {
function PolyNumberFormatter3(intl, forceSimple, opts) {
this.padTo = opts.padTo || 0;
this.floor = opts.floor || false;
if (!forceSimple && hasIntl()) {
var intlOpts = {
useGrouping: false
};
if (opts.padTo > 0)
intlOpts.minimumIntegerDigits = opts.padTo;
this.inf = getCachedINF2(intl, intlOpts);
}
}
var _proto = PolyNumberFormatter3.prototype;
_proto.format = function format(i) {
if (this.inf) {
var fixed = this.floor ? Math.floor(i) : i;
return this.inf.format(fixed);
} else {
var _fixed = this.floor ? Math.floor(i) : roundTo2(i, 3);
return padStart2(_fixed, this.padTo);
}
};
return PolyNumberFormatter3;
}();
var PolyDateFormatter2 = /* @__PURE__ */ function() {
function PolyDateFormatter3(dt, intl, opts) {
this.opts = opts;
this.hasIntl = hasIntl();
var z;
if (dt.zone.universal && this.hasIntl) {
var gmtOffset = -1 * (dt.offset / 60);
var offsetZ = gmtOffset >= 0 ? "Etc/GMT+" + gmtOffset : "Etc/GMT" + gmtOffset;
var isOffsetZoneSupported = IANAZone2.isValidZone(offsetZ);
if (dt.offset !== 0 && isOffsetZoneSupported) {
z = offsetZ;
this.dt = dt;
} else {
z = "UTC";
if (opts.timeZoneName) {
this.dt = dt;
} else {
this.dt = dt.offset === 0 ? dt : DateTime2.fromMillis(dt.ts + dt.offset * 60 * 1e3);
}
}
} else if (dt.zone.type === "local") {
this.dt = dt;
} else {
this.dt = dt;
z = dt.zone.name;
}
if (this.hasIntl) {
var intlOpts = Object.assign({}, this.opts);
if (z) {
intlOpts.timeZone = z;
}
this.dtf = getCachedDTF2(intl, intlOpts);
}
}
var _proto2 = PolyDateFormatter3.prototype;
_proto2.format = function format() {
if (this.hasIntl) {
return this.dtf.format(this.dt.toJSDate());
} else {
var tokenFormat = formatString(this.opts), loc = Locale2.create("en-US");
return Formatter2.create(loc).formatDateTimeFromString(this.dt, tokenFormat);
}
};
_proto2.formatToParts = function formatToParts() {
if (this.hasIntl && hasFormatToParts()) {
return this.dtf.formatToParts(this.dt.toJSDate());
} else {
return [];
}
};
_proto2.resolvedOptions = function resolvedOptions() {
if (this.hasIntl) {
return this.dtf.resolvedOptions();
} else {
return {
locale: "en-US",
numberingSystem: "latn",
outputCalendar: "gregory"
};
}
};
return PolyDateFormatter3;
}();
var PolyRelFormatter2 = /* @__PURE__ */ function() {
function PolyRelFormatter3(intl, isEnglish, opts) {
this.opts = Object.assign({
style: "long"
}, opts);
if (!isEnglish && hasRelative2()) {
this.rtf = getCachedRTF2(intl, opts);
}
}
var _proto3 = PolyRelFormatter3.prototype;
_proto3.format = function format(count, unit) {
if (this.rtf) {
return this.rtf.format(count, unit);
} else {
return formatRelativeTime2(unit, count, this.opts.numeric, this.opts.style !== "long");
}
};
_proto3.formatToParts = function formatToParts(count, unit) {
if (this.rtf) {
return this.rtf.formatToParts(count, unit);
} else {
return [];
}
};
return PolyRelFormatter3;
}();
var Locale2 = /* @__PURE__ */ function() {
Locale3.fromOpts = function fromOpts(opts) {
return Locale3.create(opts.locale, opts.numberingSystem, opts.outputCalendar, opts.defaultToEN);
};
Locale3.create = function create(locale, numberingSystem, outputCalendar, defaultToEN) {
if (defaultToEN === void 0) {
defaultToEN = false;
}
var specifiedLocale = locale || Settings2.defaultLocale, localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale2()), numberingSystemR = numberingSystem || Settings2.defaultNumberingSystem, outputCalendarR = outputCalendar || Settings2.defaultOutputCalendar;
return new Locale3(localeR, numberingSystemR, outputCalendarR, specifiedLocale);
};
Locale3.resetCache = function resetCache() {
sysLocaleCache2 = null;
intlDTCache2 = {};
intlNumCache2 = {};
intlRelCache2 = {};
};
Locale3.fromObject = function fromObject(_temp) {
var _ref = _temp === void 0 ? {} : _temp, locale = _ref.locale, numberingSystem = _ref.numberingSystem, outputCalendar = _ref.outputCalendar;
return Locale3.create(locale, numberingSystem, outputCalendar);
};
function Locale3(locale, numbering, outputCalendar, specifiedLocale) {
var _parseLocaleString = parseLocaleString2(locale), parsedLocale = _parseLocaleString[0], parsedNumberingSystem = _parseLocaleString[1], parsedOutputCalendar = _parseLocaleString[2];
this.locale = parsedLocale;
this.numberingSystem = numbering || parsedNumberingSystem || null;
this.outputCalendar = outputCalendar || parsedOutputCalendar || null;
this.intl = intlConfigString2(this.locale, this.numberingSystem, this.outputCalendar);
this.weekdaysCache = {
format: {},
standalone: {}
};
this.monthsCache = {
format: {},
standalone: {}
};
this.meridiemCache = null;
this.eraCache = {};
this.specifiedLocale = specifiedLocale;
this.fastNumbersCached = null;
}
var _proto4 = Locale3.prototype;
_proto4.listingMode = function listingMode(defaultOK) {
if (defaultOK === void 0) {
defaultOK = true;
}
var intl = hasIntl(), hasFTP = intl && hasFormatToParts(), isActuallyEn = this.isEnglish(), hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
if (!hasFTP && !(isActuallyEn && hasNoWeirdness) && !defaultOK) {
return "error";
} else if (!hasFTP || isActuallyEn && hasNoWeirdness) {
return "en";
} else {
return "intl";
}
};
_proto4.clone = function clone4(alts) {
if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
return this;
} else {
return Locale3.create(alts.locale || this.specifiedLocale, alts.numberingSystem || this.numberingSystem, alts.outputCalendar || this.outputCalendar, alts.defaultToEN || false);
}
};
_proto4.redefaultToEN = function redefaultToEN(alts) {
if (alts === void 0) {
alts = {};
}
return this.clone(Object.assign({}, alts, {
defaultToEN: true
}));
};
_proto4.redefaultToSystem = function redefaultToSystem(alts) {
if (alts === void 0) {
alts = {};
}
return this.clone(Object.assign({}, alts, {
defaultToEN: false
}));
};
_proto4.months = function months$1(length, format, defaultOK) {
var _this = this;
if (format === void 0) {
format = false;
}
if (defaultOK === void 0) {
defaultOK = true;
}
return listStuff2(this, length, defaultOK, months2, function() {
var intl = format ? {
month: length,
day: "numeric"
} : {
month: length
}, formatStr = format ? "format" : "standalone";
if (!_this.monthsCache[formatStr][length]) {
_this.monthsCache[formatStr][length] = mapMonths2(function(dt) {
return _this.extract(dt, intl, "month");
});
}
return _this.monthsCache[formatStr][length];
});
};
_proto4.weekdays = function weekdays$1(length, format, defaultOK) {
var _this2 = this;
if (format === void 0) {
format = false;
}
if (defaultOK === void 0) {
defaultOK = true;
}
return listStuff2(this, length, defaultOK, weekdays2, function() {
var intl = format ? {
weekday: length,
year: "numeric",
month: "long",
day: "numeric"
} : {
weekday: length
}, formatStr = format ? "format" : "standalone";
if (!_this2.weekdaysCache[formatStr][length]) {
_this2.weekdaysCache[formatStr][length] = mapWeekdays2(function(dt) {
return _this2.extract(dt, intl, "weekday");
});
}
return _this2.weekdaysCache[formatStr][length];
});
};
_proto4.meridiems = function meridiems$1(defaultOK) {
var _this3 = this;
if (defaultOK === void 0) {
defaultOK = true;
}
return listStuff2(this, void 0, defaultOK, function() {
return meridiems2;
}, function() {
if (!_this3.meridiemCache) {
var intl = {
hour: "numeric",
hour12: true
};
_this3.meridiemCache = [DateTime2.utc(2016, 11, 13, 9), DateTime2.utc(2016, 11, 13, 19)].map(function(dt) {
return _this3.extract(dt, intl, "dayperiod");
});
}
return _this3.meridiemCache;
});
};
_proto4.eras = function eras$1(length, defaultOK) {
var _this4 = this;
if (defaultOK === void 0) {
defaultOK = true;
}
return listStuff2(this, length, defaultOK, eras2, function() {
var intl = {
era: length
};
if (!_this4.eraCache[length]) {
_this4.eraCache[length] = [DateTime2.utc(-40, 1, 1), DateTime2.utc(2017, 1, 1)].map(function(dt) {
return _this4.extract(dt, intl, "era");
});
}
return _this4.eraCache[length];
});
};
_proto4.extract = function extract(dt, intlOpts, field) {
var df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find(function(m) {
return m.type.toLowerCase() === field;
});
return matching ? matching.value : null;
};
_proto4.numberFormatter = function numberFormatter(opts) {
if (opts === void 0) {
opts = {};
}
return new PolyNumberFormatter2(this.intl, opts.forceSimple || this.fastNumbers, opts);
};
_proto4.dtFormatter = function dtFormatter(dt, intlOpts) {
if (intlOpts === void 0) {
intlOpts = {};
}
return new PolyDateFormatter2(dt, this.intl, intlOpts);
};
_proto4.relFormatter = function relFormatter(opts) {
if (opts === void 0) {
opts = {};
}
return new PolyRelFormatter2(this.intl, this.isEnglish(), opts);
};
_proto4.isEnglish = function isEnglish() {
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || hasIntl() && new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us");
};
_proto4.equals = function equals(other) {
return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
};
_createClass(Locale3, [{
key: "fastNumbers",
get: function get() {
if (this.fastNumbersCached == null) {
this.fastNumbersCached = supportsFastNumbers2(this);
}
return this.fastNumbersCached;
}
}]);
return Locale3;
}();
function combineRegexes2() {
for (var _len = arguments.length, regexes = new Array(_len), _key = 0; _key < _len; _key++) {
regexes[_key] = arguments[_key];
}
var full = regexes.reduce(function(f, r) {
return f + r.source;
}, "");
return RegExp("^" + full + "$");
}
function combineExtractors2() {
for (var _len2 = arguments.length, extractors = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
extractors[_key2] = arguments[_key2];
}
return function(m) {
return extractors.reduce(function(_ref, ex) {
var mergedVals = _ref[0], mergedZone = _ref[1], cursor = _ref[2];
var _ex = ex(m, cursor), val = _ex[0], zone = _ex[1], next = _ex[2];
return [Object.assign(mergedVals, val), mergedZone || zone, next];
}, [{}, null, 1]).slice(0, 2);
};
}
function parse2(s3) {
if (s3 == null) {
return [null, null];
}
for (var _len3 = arguments.length, patterns = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
patterns[_key3 - 1] = arguments[_key3];
}
for (var _i = 0, _patterns = patterns; _i < _patterns.length; _i++) {
var _patterns$_i = _patterns[_i], regex = _patterns$_i[0], extractor = _patterns$_i[1];
var m = regex.exec(s3);
if (m) {
return extractor(m);
}
}
return [null, null];
}
function simpleParse2() {
for (var _len4 = arguments.length, keys = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
keys[_key4] = arguments[_key4];
}
return function(match3, cursor) {
var ret = {};
var i;
for (i = 0; i < keys.length; i++) {
ret[keys[i]] = parseInteger2(match3[cursor + i]);
}
return [ret, null, cursor + i];
};
}
var offsetRegex2 = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;
var isoTimeBaseRegex2 = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
var isoTimeRegex2 = RegExp("" + isoTimeBaseRegex2.source + offsetRegex2.source + "?");
var isoTimeExtensionRegex2 = RegExp("(?:T" + isoTimeRegex2.source + ")?");
var isoYmdRegex2 = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
var isoWeekRegex2 = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
var isoOrdinalRegex2 = /(\d{4})-?(\d{3})/;
var extractISOWeekData2 = simpleParse2("weekYear", "weekNumber", "weekDay");
var extractISOOrdinalData2 = simpleParse2("year", "ordinal");
var sqlYmdRegex2 = /(\d{4})-(\d\d)-(\d\d)/;
var sqlTimeRegex2 = RegExp(isoTimeBaseRegex2.source + " ?(?:" + offsetRegex2.source + "|(" + ianaRegex2.source + "))?");
var sqlTimeExtensionRegex2 = RegExp("(?: " + sqlTimeRegex2.source + ")?");
function int2(match3, pos, fallback) {
var m = match3[pos];
return isUndefined2(m) ? fallback : parseInteger2(m);
}
function extractISOYmd2(match3, cursor) {
var item = {
year: int2(match3, cursor),
month: int2(match3, cursor + 1, 1),
day: int2(match3, cursor + 2, 1)
};
return [item, null, cursor + 3];
}
function extractISOTime2(match3, cursor) {
var item = {
hours: int2(match3, cursor, 0),
minutes: int2(match3, cursor + 1, 0),
seconds: int2(match3, cursor + 2, 0),
milliseconds: parseMillis2(match3[cursor + 3])
};
return [item, null, cursor + 4];
}
function extractISOOffset2(match3, cursor) {
var local = !match3[cursor] && !match3[cursor + 1], fullOffset = signedOffset2(match3[cursor + 1], match3[cursor + 2]), zone = local ? null : FixedOffsetZone2.instance(fullOffset);
return [{}, zone, cursor + 3];
}
function extractIANAZone2(match3, cursor) {
var zone = match3[cursor] ? IANAZone2.create(match3[cursor]) : null;
return [{}, zone, cursor + 1];
}
var isoTimeOnly2 = RegExp("^T?" + isoTimeBaseRegex2.source + "$");
var isoDuration2 = /^-?P(?:(?:(-?\d{1,9})Y)?(?:(-?\d{1,9})M)?(?:(-?\d{1,9})W)?(?:(-?\d{1,9})D)?(?:T(?:(-?\d{1,9})H)?(?:(-?\d{1,9})M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;
function extractISODuration2(match3) {
var s3 = match3[0], yearStr = match3[1], monthStr = match3[2], weekStr = match3[3], dayStr = match3[4], hourStr = match3[5], minuteStr = match3[6], secondStr = match3[7], millisecondsStr = match3[8];
var hasNegativePrefix = s3[0] === "-";
var negativeSeconds = secondStr && secondStr[0] === "-";
var maybeNegate = function maybeNegate2(num, force) {
if (force === void 0) {
force = false;
}
return num !== void 0 && (force || num && hasNegativePrefix) ? -num : num;
};
return [{
years: maybeNegate(parseInteger2(yearStr)),
months: maybeNegate(parseInteger2(monthStr)),
weeks: maybeNegate(parseInteger2(weekStr)),
days: maybeNegate(parseInteger2(dayStr)),
hours: maybeNegate(parseInteger2(hourStr)),
minutes: maybeNegate(parseInteger2(minuteStr)),
seconds: maybeNegate(parseInteger2(secondStr), secondStr === "-0"),
milliseconds: maybeNegate(parseMillis2(millisecondsStr), negativeSeconds)
}];
}
var obsOffsets2 = {
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60
};
function fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
var result = {
year: yearStr.length === 2 ? untruncateYear2(parseInteger2(yearStr)) : parseInteger2(yearStr),
month: monthsShort2.indexOf(monthStr) + 1,
day: parseInteger2(dayStr),
hour: parseInteger2(hourStr),
minute: parseInteger2(minuteStr)
};
if (secondStr)
result.second = parseInteger2(secondStr);
if (weekdayStr) {
result.weekday = weekdayStr.length > 3 ? weekdaysLong2.indexOf(weekdayStr) + 1 : weekdaysShort2.indexOf(weekdayStr) + 1;
}
return result;
}
var rfc28222 = /^(?:(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 extractRFC28222(match3) {
var weekdayStr = match3[1], dayStr = match3[2], monthStr = match3[3], yearStr = match3[4], hourStr = match3[5], minuteStr = match3[6], secondStr = match3[7], obsOffset = match3[8], milOffset = match3[9], offHourStr = match3[10], offMinuteStr = match3[11], result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
var offset3;
if (obsOffset) {
offset3 = obsOffsets2[obsOffset];
} else if (milOffset) {
offset3 = 0;
} else {
offset3 = signedOffset2(offHourStr, offMinuteStr);
}
return [result, new FixedOffsetZone2(offset3)];
}
function preprocessRFC28222(s3) {
return s3.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
var rfc11232 = /^(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$/;
var rfc8502 = /^(Monday|Tuesday|Wedsday|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$/;
var ascii2 = /^(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 extractRFC1123Or8502(match3) {
var weekdayStr = match3[1], dayStr = match3[2], monthStr = match3[3], yearStr = match3[4], hourStr = match3[5], minuteStr = match3[6], secondStr = match3[7], result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone2.utcInstance];
}
function extractASCII2(match3) {
var weekdayStr = match3[1], monthStr = match3[2], dayStr = match3[3], hourStr = match3[4], minuteStr = match3[5], secondStr = match3[6], yearStr = match3[7], result = fromStrings2(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone2.utcInstance];
}
var isoYmdWithTimeExtensionRegex2 = combineRegexes2(isoYmdRegex2, isoTimeExtensionRegex2);
var isoWeekWithTimeExtensionRegex2 = combineRegexes2(isoWeekRegex2, isoTimeExtensionRegex2);
var isoOrdinalWithTimeExtensionRegex2 = combineRegexes2(isoOrdinalRegex2, isoTimeExtensionRegex2);
var isoTimeCombinedRegex2 = combineRegexes2(isoTimeRegex2);
var extractISOYmdTimeAndOffset2 = combineExtractors2(extractISOYmd2, extractISOTime2, extractISOOffset2);
var extractISOWeekTimeAndOffset2 = combineExtractors2(extractISOWeekData2, extractISOTime2, extractISOOffset2);
var extractISOOrdinalDateAndTime2 = combineExtractors2(extractISOOrdinalData2, extractISOTime2, extractISOOffset2);
var extractISOTimeAndOffset2 = combineExtractors2(extractISOTime2, extractISOOffset2);
function parseISODate2(s3) {
return parse2(s3, [isoYmdWithTimeExtensionRegex2, extractISOYmdTimeAndOffset2], [isoWeekWithTimeExtensionRegex2, extractISOWeekTimeAndOffset2], [isoOrdinalWithTimeExtensionRegex2, extractISOOrdinalDateAndTime2], [isoTimeCombinedRegex2, extractISOTimeAndOffset2]);
}
function parseRFC2822Date2(s3) {
return parse2(preprocessRFC28222(s3), [rfc28222, extractRFC28222]);
}
function parseHTTPDate2(s3) {
return parse2(s3, [rfc11232, extractRFC1123Or8502], [rfc8502, extractRFC1123Or8502], [ascii2, extractASCII2]);
}
function parseISODuration2(s3) {
return parse2(s3, [isoDuration2, extractISODuration2]);
}
var extractISOTimeOnly2 = combineExtractors2(extractISOTime2);
function parseISOTimeOnly2(s3) {
return parse2(s3, [isoTimeOnly2, extractISOTimeOnly2]);
}
var sqlYmdWithTimeExtensionRegex2 = combineRegexes2(sqlYmdRegex2, sqlTimeExtensionRegex2);
var sqlTimeCombinedRegex2 = combineRegexes2(sqlTimeRegex2);
var extractISOYmdTimeOffsetAndIANAZone = combineExtractors2(extractISOYmd2, extractISOTime2, extractISOOffset2, extractIANAZone2);
var extractISOTimeOffsetAndIANAZone2 = combineExtractors2(extractISOTime2, extractISOOffset2, extractIANAZone2);
function parseSQL2(s3) {
return parse2(s3, [sqlYmdWithTimeExtensionRegex2, extractISOYmdTimeOffsetAndIANAZone], [sqlTimeCombinedRegex2, extractISOTimeOffsetAndIANAZone2]);
}
var INVALID4 = "Invalid Duration";
var lowOrderMatrix2 = {
weeks: {
days: 7,
hours: 7 * 24,
minutes: 7 * 24 * 60,
seconds: 7 * 24 * 60 * 60,
milliseconds: 7 * 24 * 60 * 60 * 1e3
},
days: {
hours: 24,
minutes: 24 * 60,
seconds: 24 * 60 * 60,
milliseconds: 24 * 60 * 60 * 1e3
},
hours: {
minutes: 60,
seconds: 60 * 60,
milliseconds: 60 * 60 * 1e3
},
minutes: {
seconds: 60,
milliseconds: 60 * 1e3
},
seconds: {
milliseconds: 1e3
}
};
var casualMatrix2 = Object.assign({
years: {
quarters: 4,
months: 12,
weeks: 52,
days: 365,
hours: 365 * 24,
minutes: 365 * 24 * 60,
seconds: 365 * 24 * 60 * 60,
milliseconds: 365 * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: 13,
days: 91,
hours: 91 * 24,
minutes: 91 * 24 * 60,
seconds: 91 * 24 * 60 * 60,
milliseconds: 91 * 24 * 60 * 60 * 1e3
},
months: {
weeks: 4,
days: 30,
hours: 30 * 24,
minutes: 30 * 24 * 60,
seconds: 30 * 24 * 60 * 60,
milliseconds: 30 * 24 * 60 * 60 * 1e3
}
}, lowOrderMatrix2);
var daysInYearAccurate2 = 146097 / 400;
var daysInMonthAccurate2 = 146097 / 4800;
var accurateMatrix2 = Object.assign({
years: {
quarters: 4,
months: 12,
weeks: daysInYearAccurate2 / 7,
days: daysInYearAccurate2,
hours: daysInYearAccurate2 * 24,
minutes: daysInYearAccurate2 * 24 * 60,
seconds: daysInYearAccurate2 * 24 * 60 * 60,
milliseconds: daysInYearAccurate2 * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: daysInYearAccurate2 / 28,
days: daysInYearAccurate2 / 4,
hours: daysInYearAccurate2 * 24 / 4,
minutes: daysInYearAccurate2 * 24 * 60 / 4,
seconds: daysInYearAccurate2 * 24 * 60 * 60 / 4,
milliseconds: daysInYearAccurate2 * 24 * 60 * 60 * 1e3 / 4
},
months: {
weeks: daysInMonthAccurate2 / 7,
days: daysInMonthAccurate2,
hours: daysInMonthAccurate2 * 24,
minutes: daysInMonthAccurate2 * 24 * 60,
seconds: daysInMonthAccurate2 * 24 * 60 * 60,
milliseconds: daysInMonthAccurate2 * 24 * 60 * 60 * 1e3
}
}, lowOrderMatrix2);
var orderedUnits3 = ["years", "quarters", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds"];
var reverseUnits2 = orderedUnits3.slice(0).reverse();
function clone3(dur, alts, clear) {
if (clear === void 0) {
clear = false;
}
var conf = {
values: clear ? alts.values : Object.assign({}, dur.values, alts.values || {}),
loc: dur.loc.clone(alts.loc),
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy
};
return new Duration3(conf);
}
function antiTrunc(n3) {
return n3 < 0 ? Math.floor(n3) : Math.ceil(n3);
}
function convert(matrix, fromMap, fromUnit, toMap, toUnit) {
var conv = matrix[toUnit][fromUnit], raw = fromMap[fromUnit] / conv, sameSign = Math.sign(raw) === Math.sign(toMap[toUnit]), added = !sameSign && toMap[toUnit] !== 0 && Math.abs(raw) <= 1 ? antiTrunc(raw) : Math.trunc(raw);
toMap[toUnit] += added;
fromMap[fromUnit] -= added * conv;
}
function normalizeValues2(matrix, vals) {
reverseUnits2.reduce(function(previous, current2) {
if (!isUndefined2(vals[current2])) {
if (previous) {
convert(matrix, vals, previous, vals, current2);
}
return current2;
} else {
return previous;
}
}, null);
}
var Duration3 = /* @__PURE__ */ function() {
function Duration4(config) {
var accurate = config.conversionAccuracy === "longterm" || false;
this.values = config.values;
this.loc = config.loc || Locale2.create();
this.conversionAccuracy = accurate ? "longterm" : "casual";
this.invalid = config.invalid || null;
this.matrix = accurate ? accurateMatrix2 : casualMatrix2;
this.isLuxonDuration = true;
}
Duration4.fromMillis = function fromMillis(count, opts) {
return Duration4.fromObject(Object.assign({
milliseconds: count
}, opts));
};
Duration4.fromObject = function fromObject(obj) {
if (obj == null || typeof obj !== "object") {
throw new InvalidArgumentError2("Duration.fromObject: argument expected to be an object, got " + (obj === null ? "null" : typeof obj));
}
return new Duration4({
values: normalizeObject2(obj, Duration4.normalizeUnit, [
"locale",
"numberingSystem",
"conversionAccuracy",
"zone"
// a bit of debt; it's super inconvenient internally not to be able to blindly pass this
]),
loc: Locale2.fromObject(obj),
conversionAccuracy: obj.conversionAccuracy
});
};
Duration4.fromISO = function fromISO(text, opts) {
var _parseISODuration = parseISODuration2(text), parsed = _parseISODuration[0];
if (parsed) {
var obj = Object.assign(parsed, opts);
return Duration4.fromObject(obj);
} else {
return Duration4.invalid("unparsable", 'the input "' + text + `" can't be parsed as ISO 8601`);
}
};
Duration4.fromISOTime = function fromISOTime(text, opts) {
var _parseISOTimeOnly = parseISOTimeOnly2(text), parsed = _parseISOTimeOnly[0];
if (parsed) {
var obj = Object.assign(parsed, opts);
return Duration4.fromObject(obj);
} else {
return Duration4.invalid("unparsable", 'the input "' + text + `" can't be parsed as ISO 8601`);
}
};
Duration4.invalid = function invalid(reason, explanation) {
if (explanation === void 0) {
explanation = null;
}
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the Duration is invalid");
}
var invalid2 = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidDurationError2(invalid2);
} else {
return new Duration4({
invalid: invalid2
});
}
};
Duration4.normalizeUnit = function normalizeUnit3(unit) {
var normalized = {
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"
}[unit ? unit.toLowerCase() : unit];
if (!normalized)
throw new InvalidUnitError2(unit);
return normalized;
};
Duration4.isDuration = function isDuration(o) {
return o && o.isLuxonDuration || false;
};
var _proto = Duration4.prototype;
_proto.toFormat = function toFormat(fmt, opts) {
if (opts === void 0) {
opts = {};
}
var fmtOpts = Object.assign({}, opts, {
floor: opts.round !== false && opts.floor !== false
});
return this.isValid ? Formatter2.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID4;
};
_proto.toObject = function toObject(opts) {
if (opts === void 0) {
opts = {};
}
if (!this.isValid)
return {};
var base = Object.assign({}, this.values);
if (opts.includeConfig) {
base.conversionAccuracy = this.conversionAccuracy;
base.numberingSystem = this.loc.numberingSystem;
base.locale = this.loc.locale;
}
return base;
};
_proto.toISO = function toISO3() {
if (!this.isValid)
return null;
var s3 = "P";
if (this.years !== 0)
s3 += this.years + "Y";
if (this.months !== 0 || this.quarters !== 0)
s3 += this.months + this.quarters * 3 + "M";
if (this.weeks !== 0)
s3 += this.weeks + "W";
if (this.days !== 0)
s3 += this.days + "D";
if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)
s3 += "T";
if (this.hours !== 0)
s3 += this.hours + "H";
if (this.minutes !== 0)
s3 += this.minutes + "M";
if (this.seconds !== 0 || this.milliseconds !== 0)
s3 += roundTo2(this.seconds + this.milliseconds / 1e3, 3) + "S";
if (s3 === "P")
s3 += "T0S";
return s3;
};
_proto.toISOTime = function toISOTime2(opts) {
if (opts === void 0) {
opts = {};
}
if (!this.isValid)
return null;
var millis = this.toMillis();
if (millis < 0 || millis >= 864e5)
return null;
opts = Object.assign({
suppressMilliseconds: false,
suppressSeconds: false,
includePrefix: false,
format: "extended"
}, opts);
var value = this.shiftTo("hours", "minutes", "seconds", "milliseconds");
var fmt = opts.format === "basic" ? "hhmm" : "hh:mm";
if (!opts.suppressSeconds || value.seconds !== 0 || value.milliseconds !== 0) {
fmt += opts.format === "basic" ? "ss" : ":ss";
if (!opts.suppressMilliseconds || value.milliseconds !== 0) {
fmt += ".SSS";
}
}
var str = value.toFormat(fmt);
if (opts.includePrefix) {
str = "T" + str;
}
return str;
};
_proto.toJSON = function toJSON() {
return this.toISO();
};
_proto.toString = function toString() {
return this.toISO();
};
_proto.toMillis = function toMillis() {
return this.as("milliseconds");
};
_proto.valueOf = function valueOf() {
return this.toMillis();
};
_proto.plus = function plus(duration) {
if (!this.isValid)
return this;
var dur = friendlyDuration(duration), result = {};
for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits3), _step; !(_step = _iterator()).done; ) {
var k = _step.value;
if (hasOwnProperty2(dur.values, k) || hasOwnProperty2(this.values, k)) {
result[k] = dur.get(k) + this.get(k);
}
}
return clone3(this, {
values: result
}, true);
};
_proto.minus = function minus(duration) {
if (!this.isValid)
return this;
var dur = friendlyDuration(duration);
return this.plus(dur.negate());
};
_proto.mapUnits = function mapUnits(fn) {
if (!this.isValid)
return this;
var result = {};
for (var _i = 0, _Object$keys = Object.keys(this.values); _i < _Object$keys.length; _i++) {
var k = _Object$keys[_i];
result[k] = asNumber2(fn(this.values[k], k));
}
return clone3(this, {
values: result
}, true);
};
_proto.get = function get(unit) {
return this[Duration4.normalizeUnit(unit)];
};
_proto.set = function set2(values) {
if (!this.isValid)
return this;
var mixed = Object.assign(this.values, normalizeObject2(values, Duration4.normalizeUnit, []));
return clone3(this, {
values: mixed
});
};
_proto.reconfigure = function reconfigure(_temp) {
var _ref = _temp === void 0 ? {} : _temp, locale = _ref.locale, numberingSystem = _ref.numberingSystem, conversionAccuracy = _ref.conversionAccuracy;
var loc = this.loc.clone({
locale,
numberingSystem
}), opts = {
loc
};
if (conversionAccuracy) {
opts.conversionAccuracy = conversionAccuracy;
}
return clone3(this, opts);
};
_proto.as = function as(unit) {
return this.isValid ? this.shiftTo(unit).get(unit) : NaN;
};
_proto.normalize = function normalize() {
if (!this.isValid)
return this;
var vals = this.toObject();
normalizeValues2(this.matrix, vals);
return clone3(this, {
values: vals
}, true);
};
_proto.shiftTo = function shiftTo() {
for (var _len = arguments.length, units = new Array(_len), _key = 0; _key < _len; _key++) {
units[_key] = arguments[_key];
}
if (!this.isValid)
return this;
if (units.length === 0) {
return this;
}
units = units.map(function(u) {
return Duration4.normalizeUnit(u);
});
var built = {}, accumulated = {}, vals = this.toObject();
var lastUnit;
for (var _iterator2 = _createForOfIteratorHelperLoose(orderedUnits3), _step2; !(_step2 = _iterator2()).done; ) {
var k = _step2.value;
if (units.indexOf(k) >= 0) {
lastUnit = k;
var own = 0;
for (var ak in accumulated) {
own += this.matrix[ak][k] * accumulated[ak];
accumulated[ak] = 0;
}
if (isNumber2(vals[k])) {
own += vals[k];
}
var i = Math.trunc(own);
built[k] = i;
accumulated[k] = own - i;
for (var down in vals) {
if (orderedUnits3.indexOf(down) > orderedUnits3.indexOf(k)) {
convert(this.matrix, vals, down, built, k);
}
}
} else if (isNumber2(vals[k])) {
accumulated[k] = vals[k];
}
}
for (var key2 in accumulated) {
if (accumulated[key2] !== 0) {
built[lastUnit] += key2 === lastUnit ? accumulated[key2] : accumulated[key2] / this.matrix[lastUnit][key2];
}
}
return clone3(this, {
values: built
}, true).normalize();
};
_proto.negate = function negate() {
if (!this.isValid)
return this;
var negated = {};
for (var _i2 = 0, _Object$keys2 = Object.keys(this.values); _i2 < _Object$keys2.length; _i2++) {
var k = _Object$keys2[_i2];
negated[k] = -this.values[k];
}
return clone3(this, {
values: negated
}, true);
};
_proto.equals = function equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
if (!this.loc.equals(other.loc)) {
return false;
}
function eq(v1, v2) {
if (v1 === void 0 || v1 === 0)
return v2 === void 0 || v2 === 0;
return v1 === v2;
}
for (var _iterator3 = _createForOfIteratorHelperLoose(orderedUnits3), _step3; !(_step3 = _iterator3()).done; ) {
var u = _step3.value;
if (!eq(this.values[u], other.values[u])) {
return false;
}
}
return true;
};
_createClass(Duration4, [{
key: "locale",
get: function get() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
*
* @type {string}
*/
}, {
key: "numberingSystem",
get: function get() {
return this.isValid ? this.loc.numberingSystem : null;
}
}, {
key: "years",
get: function get() {
return this.isValid ? this.values.years || 0 : NaN;
}
/**
* Get the quarters.
* @type {number}
*/
}, {
key: "quarters",
get: function get() {
return this.isValid ? this.values.quarters || 0 : NaN;
}
/**
* Get the months.
* @type {number}
*/
}, {
key: "months",
get: function get() {
return this.isValid ? this.values.months || 0 : NaN;
}
/**
* Get the weeks
* @type {number}
*/
}, {
key: "weeks",
get: function get() {
return this.isValid ? this.values.weeks || 0 : NaN;
}
/**
* Get the days.
* @type {number}
*/
}, {
key: "days",
get: function get() {
return this.isValid ? this.values.days || 0 : NaN;
}
/**
* Get the hours.
* @type {number}
*/
}, {
key: "hours",
get: function get() {
return this.isValid ? this.values.hours || 0 : NaN;
}
/**
* Get the minutes.
* @type {number}
*/
}, {
key: "minutes",
get: function get() {
return this.isValid ? this.values.minutes || 0 : NaN;
}
/**
* Get the seconds.
* @return {number}
*/
}, {
key: "seconds",
get: function get() {
return this.isValid ? this.values.seconds || 0 : NaN;
}
/**
* Get the milliseconds.
* @return {number}
*/
}, {
key: "milliseconds",
get: function get() {
return this.isValid ? this.values.milliseconds || 0 : NaN;
}
/**
* Returns whether the Duration is invalid. Invalid durations are returned by diff operations
* on invalid DateTimes or Intervals.
* @return {boolean}
*/
}, {
key: "isValid",
get: function get() {
return this.invalid === null;
}
/**
* Returns an error code if this Duration became invalid, or null if the Duration is valid
* @return {string}
*/
}, {
key: "invalidReason",
get: function get() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Duration became invalid, or null if the Duration is valid
* @type {string}
*/
}, {
key: "invalidExplanation",
get: function get() {
return this.invalid ? this.invalid.explanation : null;
}
}]);
return Duration4;
}();
function friendlyDuration(durationish) {
if (isNumber2(durationish)) {
return Duration3.fromMillis(durationish);
} else if (Duration3.isDuration(durationish)) {
return durationish;
} else if (typeof durationish === "object") {
return Duration3.fromObject(durationish);
} else {
throw new InvalidArgumentError2("Unknown duration argument " + durationish + " of type " + typeof durationish);
}
}
var INVALID$1 = "Invalid Interval";
function validateStartEnd2(start, end) {
if (!start || !start.isValid) {
return Interval2.invalid("missing or invalid start");
} else if (!end || !end.isValid) {
return Interval2.invalid("missing or invalid end");
} else if (end < start) {
return Interval2.invalid("end before start", "The end of an interval must be after its start, but you had start=" + start.toISO() + " and end=" + end.toISO());
} else {
return null;
}
}
var Interval2 = /* @__PURE__ */ function() {
function Interval3(config) {
this.s = config.start;
this.e = config.end;
this.invalid = config.invalid || null;
this.isLuxonInterval = true;
}
Interval3.invalid = function invalid(reason, explanation) {
if (explanation === void 0) {
explanation = null;
}
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the Interval is invalid");
}
var invalid2 = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidIntervalError2(invalid2);
} else {
return new Interval3({
invalid: invalid2
});
}
};
Interval3.fromDateTimes = function fromDateTimes(start, end) {
var builtStart = friendlyDateTime2(start), builtEnd = friendlyDateTime2(end);
var validateError = validateStartEnd2(builtStart, builtEnd);
if (validateError == null) {
return new Interval3({
start: builtStart,
end: builtEnd
});
} else {
return validateError;
}
};
Interval3.after = function after(start, duration) {
var dur = friendlyDuration(duration), dt = friendlyDateTime2(start);
return Interval3.fromDateTimes(dt, dt.plus(dur));
};
Interval3.before = function before(end, duration) {
var dur = friendlyDuration(duration), dt = friendlyDateTime2(end);
return Interval3.fromDateTimes(dt.minus(dur), dt);
};
Interval3.fromISO = function fromISO(text, opts) {
var _split = (text || "").split("/", 2), s3 = _split[0], e = _split[1];
if (s3 && e) {
var start, startIsValid;
try {
start = DateTime2.fromISO(s3, opts);
startIsValid = start.isValid;
} catch (e2) {
startIsValid = false;
}
var end, endIsValid;
try {
end = DateTime2.fromISO(e, opts);
endIsValid = end.isValid;
} catch (e2) {
endIsValid = false;
}
if (startIsValid && endIsValid) {
return Interval3.fromDateTimes(start, end);
}
if (startIsValid) {
var dur = Duration3.fromISO(e, opts);
if (dur.isValid) {
return Interval3.after(start, dur);
}
} else if (endIsValid) {
var _dur = Duration3.fromISO(s3, opts);
if (_dur.isValid) {
return Interval3.before(end, _dur);
}
}
}
return Interval3.invalid("unparsable", 'the input "' + text + `" can't be parsed as ISO 8601`);
};
Interval3.isInterval = function isInterval(o) {
return o && o.isLuxonInterval || false;
};
var _proto = Interval3.prototype;
_proto.length = function length(unit) {
if (unit === void 0) {
unit = "milliseconds";
}
return this.isValid ? this.toDuration.apply(this, [unit]).get(unit) : NaN;
};
_proto.count = function count(unit) {
if (unit === void 0) {
unit = "milliseconds";
}
if (!this.isValid)
return NaN;
var start = this.start.startOf(unit), end = this.end.startOf(unit);
return Math.floor(end.diff(start, unit).get(unit)) + 1;
};
_proto.hasSame = function hasSame(unit) {
return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;
};
_proto.isEmpty = function isEmpty() {
return this.s.valueOf() === this.e.valueOf();
};
_proto.isAfter = function isAfter(dateTime) {
if (!this.isValid)
return false;
return this.s > dateTime;
};
_proto.isBefore = function isBefore(dateTime) {
if (!this.isValid)
return false;
return this.e <= dateTime;
};
_proto.contains = function contains(dateTime) {
if (!this.isValid)
return false;
return this.s <= dateTime && this.e > dateTime;
};
_proto.set = function set2(_temp) {
var _ref = _temp === void 0 ? {} : _temp, start = _ref.start, end = _ref.end;
if (!this.isValid)
return this;
return Interval3.fromDateTimes(start || this.s, end || this.e);
};
_proto.splitAt = function splitAt() {
var _this = this;
if (!this.isValid)
return [];
for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) {
dateTimes[_key] = arguments[_key];
}
var sorted = dateTimes.map(friendlyDateTime2).filter(function(d) {
return _this.contains(d);
}).sort(), results = [];
var s3 = this.s, i = 0;
while (s3 < this.e) {
var added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;
results.push(Interval3.fromDateTimes(s3, next));
s3 = next;
i += 1;
}
return results;
};
_proto.splitBy = function splitBy(duration) {
var dur = friendlyDuration(duration);
if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
return [];
}
var s3 = this.s, idx = 1, next;
var results = [];
while (s3 < this.e) {
var added = this.start.plus(dur.mapUnits(function(x) {
return x * idx;
}));
next = +added > +this.e ? this.e : added;
results.push(Interval3.fromDateTimes(s3, next));
s3 = next;
idx += 1;
}
return results;
};
_proto.divideEqually = function divideEqually(numberOfParts) {
if (!this.isValid)
return [];
return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);
};
_proto.overlaps = function overlaps(other) {
return this.e > other.s && this.s < other.e;
};
_proto.abutsStart = function abutsStart(other) {
if (!this.isValid)
return false;
return +this.e === +other.s;
};
_proto.abutsEnd = function abutsEnd(other) {
if (!this.isValid)
return false;
return +other.e === +this.s;
};
_proto.engulfs = function engulfs(other) {
if (!this.isValid)
return false;
return this.s <= other.s && this.e >= other.e;
};
_proto.equals = function equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
return this.s.equals(other.s) && this.e.equals(other.e);
};
_proto.intersection = function intersection(other) {
if (!this.isValid)
return this;
var s3 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e;
if (s3 >= e) {
return null;
} else {
return Interval3.fromDateTimes(s3, e);
}
};
_proto.union = function union(other) {
if (!this.isValid)
return this;
var s3 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;
return Interval3.fromDateTimes(s3, e);
};
Interval3.merge = function merge(intervals) {
var _intervals$sort$reduc = intervals.sort(function(a, b) {
return a.s - b.s;
}).reduce(function(_ref2, item) {
var sofar = _ref2[0], current2 = _ref2[1];
if (!current2) {
return [sofar, item];
} else if (current2.overlaps(item) || current2.abutsStart(item)) {
return [sofar, current2.union(item)];
} else {
return [sofar.concat([current2]), item];
}
}, [[], null]), found = _intervals$sort$reduc[0], final = _intervals$sort$reduc[1];
if (final) {
found.push(final);
}
return found;
};
Interval3.xor = function xor(intervals) {
var _Array$prototype;
var start = null, currentCount = 0;
var results = [], ends = intervals.map(function(i2) {
return [{
time: i2.s,
type: "s"
}, {
time: i2.e,
type: "e"
}];
}), flattened = (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, ends), arr = flattened.sort(function(a, b) {
return a.time - b.time;
});
for (var _iterator = _createForOfIteratorHelperLoose(arr), _step; !(_step = _iterator()).done; ) {
var i = _step.value;
currentCount += i.type === "s" ? 1 : -1;
if (currentCount === 1) {
start = i.time;
} else {
if (start && +start !== +i.time) {
results.push(Interval3.fromDateTimes(start, i.time));
}
start = null;
}
}
return Interval3.merge(results);
};
_proto.difference = function difference() {
var _this2 = this;
for (var _len2 = arguments.length, intervals = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
intervals[_key2] = arguments[_key2];
}
return Interval3.xor([this].concat(intervals)).map(function(i) {
return _this2.intersection(i);
}).filter(function(i) {
return i && !i.isEmpty();
});
};
_proto.toString = function toString() {
if (!this.isValid)
return INVALID$1;
return "[" + this.s.toISO() + " \u2013 " + this.e.toISO() + ")";
};
_proto.toISO = function toISO3(opts) {
if (!this.isValid)
return INVALID$1;
return this.s.toISO(opts) + "/" + this.e.toISO(opts);
};
_proto.toISODate = function toISODate2() {
if (!this.isValid)
return INVALID$1;
return this.s.toISODate() + "/" + this.e.toISODate();
};
_proto.toISOTime = function toISOTime2(opts) {
if (!this.isValid)
return INVALID$1;
return this.s.toISOTime(opts) + "/" + this.e.toISOTime(opts);
};
_proto.toFormat = function toFormat(dateFormat, _temp2) {
var _ref3 = _temp2 === void 0 ? {} : _temp2, _ref3$separator = _ref3.separator, separator = _ref3$separator === void 0 ? " \u2013 " : _ref3$separator;
if (!this.isValid)
return INVALID$1;
return "" + this.s.toFormat(dateFormat) + separator + this.e.toFormat(dateFormat);
};
_proto.toDuration = function toDuration(unit, opts) {
if (!this.isValid) {
return Duration3.invalid(this.invalidReason);
}
return this.e.diff(this.s, unit, opts);
};
_proto.mapEndpoints = function mapEndpoints(mapFn) {
return Interval3.fromDateTimes(mapFn(this.s), mapFn(this.e));
};
_createClass(Interval3, [{
key: "start",
get: function get() {
return this.isValid ? this.s : null;
}
/**
* Returns the end of the Interval
* @type {DateTime}
*/
}, {
key: "end",
get: function get() {
return this.isValid ? this.e : null;
}
/**
* Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
* @type {boolean}
*/
}, {
key: "isValid",
get: function get() {
return this.invalidReason === null;
}
/**
* Returns an error code if this Interval is invalid, or null if the Interval is valid
* @type {string}
*/
}, {
key: "invalidReason",
get: function get() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Interval became invalid, or null if the Interval is valid
* @type {string}
*/
}, {
key: "invalidExplanation",
get: function get() {
return this.invalid ? this.invalid.explanation : null;
}
}]);
return Interval3;
}();
var Info2 = /* @__PURE__ */ function() {
function Info3() {
}
Info3.hasDST = function hasDST(zone) {
if (zone === void 0) {
zone = Settings2.defaultZone;
}
var proto = DateTime2.now().setZone(zone).set({
month: 12
});
return !zone.universal && proto.offset !== proto.set({
month: 6
}).offset;
};
Info3.isValidIANAZone = function isValidIANAZone(zone) {
return IANAZone2.isValidSpecifier(zone) && IANAZone2.isValidZone(zone);
};
Info3.normalizeZone = function normalizeZone$1(input) {
return normalizeZone2(input, Settings2.defaultZone);
};
Info3.months = function months3(length, _temp) {
if (length === void 0) {
length = "long";
}
var _ref = _temp === void 0 ? {} : _temp, _ref$locale = _ref.locale, locale = _ref$locale === void 0 ? null : _ref$locale, _ref$numberingSystem = _ref.numberingSystem, numberingSystem = _ref$numberingSystem === void 0 ? null : _ref$numberingSystem, _ref$locObj = _ref.locObj, locObj = _ref$locObj === void 0 ? null : _ref$locObj, _ref$outputCalendar = _ref.outputCalendar, outputCalendar = _ref$outputCalendar === void 0 ? "gregory" : _ref$outputCalendar;
return (locObj || Locale2.create(locale, numberingSystem, outputCalendar)).months(length);
};
Info3.monthsFormat = function monthsFormat(length, _temp2) {
if (length === void 0) {
length = "long";
}
var _ref2 = _temp2 === void 0 ? {} : _temp2, _ref2$locale = _ref2.locale, locale = _ref2$locale === void 0 ? null : _ref2$locale, _ref2$numberingSystem = _ref2.numberingSystem, numberingSystem = _ref2$numberingSystem === void 0 ? null : _ref2$numberingSystem, _ref2$locObj = _ref2.locObj, locObj = _ref2$locObj === void 0 ? null : _ref2$locObj, _ref2$outputCalendar = _ref2.outputCalendar, outputCalendar = _ref2$outputCalendar === void 0 ? "gregory" : _ref2$outputCalendar;
return (locObj || Locale2.create(locale, numberingSystem, outputCalendar)).months(length, true);
};
Info3.weekdays = function weekdays3(length, _temp3) {
if (length === void 0) {
length = "long";
}
var _ref3 = _temp3 === void 0 ? {} : _temp3, _ref3$locale = _ref3.locale, locale = _ref3$locale === void 0 ? null : _ref3$locale, _ref3$numberingSystem = _ref3.numberingSystem, numberingSystem = _ref3$numberingSystem === void 0 ? null : _ref3$numberingSystem, _ref3$locObj = _ref3.locObj, locObj = _ref3$locObj === void 0 ? null : _ref3$locObj;
return (locObj || Locale2.create(locale, numberingSystem, null)).weekdays(length);
};
Info3.weekdaysFormat = function weekdaysFormat(length, _temp4) {
if (length === void 0) {
length = "long";
}
var _ref4 = _temp4 === void 0 ? {} : _temp4, _ref4$locale = _ref4.locale, locale = _ref4$locale === void 0 ? null : _ref4$locale, _ref4$numberingSystem = _ref4.numberingSystem, numberingSystem = _ref4$numberingSystem === void 0 ? null : _ref4$numberingSystem, _ref4$locObj = _ref4.locObj, locObj = _ref4$locObj === void 0 ? null : _ref4$locObj;
return (locObj || Locale2.create(locale, numberingSystem, null)).weekdays(length, true);
};
Info3.meridiems = function meridiems3(_temp5) {
var _ref5 = _temp5 === void 0 ? {} : _temp5, _ref5$locale = _ref5.locale, locale = _ref5$locale === void 0 ? null : _ref5$locale;
return Locale2.create(locale).meridiems();
};
Info3.eras = function eras3(length, _temp6) {
if (length === void 0) {
length = "short";
}
var _ref6 = _temp6 === void 0 ? {} : _temp6, _ref6$locale = _ref6.locale, locale = _ref6$locale === void 0 ? null : _ref6$locale;
return Locale2.create(locale, null, "gregory").eras(length);
};
Info3.features = function features() {
var intl = false, intlTokens = false, zones = false, relative = false;
if (hasIntl()) {
intl = true;
intlTokens = hasFormatToParts();
relative = hasRelative2();
try {
zones = new Intl.DateTimeFormat("en", {
timeZone: "America/New_York"
}).resolvedOptions().timeZone === "America/New_York";
} catch (e) {
zones = false;
}
}
return {
intl,
intlTokens,
zones,
relative
};
};
return Info3;
}();
function dayDiff2(earlier, later) {
var utcDayStart = function utcDayStart2(dt) {
return dt.toUTC(0, {
keepLocalTime: true
}).startOf("day").valueOf();
}, ms = utcDayStart(later) - utcDayStart(earlier);
return Math.floor(Duration3.fromMillis(ms).as("days"));
}
function highOrderDiffs2(cursor, later, units) {
var differs = [["years", function(a, b) {
return b.year - a.year;
}], ["quarters", function(a, b) {
return b.quarter - a.quarter;
}], ["months", function(a, b) {
return b.month - a.month + (b.year - a.year) * 12;
}], ["weeks", function(a, b) {
var days = dayDiff2(a, b);
return (days - days % 7) / 7;
}], ["days", dayDiff2]];
var results = {};
var lowestOrder, highWater;
for (var _i = 0, _differs = differs; _i < _differs.length; _i++) {
var _differs$_i = _differs[_i], unit = _differs$_i[0], differ = _differs$_i[1];
if (units.indexOf(unit) >= 0) {
var _cursor$plus;
lowestOrder = unit;
var delta = differ(cursor, later);
highWater = cursor.plus((_cursor$plus = {}, _cursor$plus[unit] = delta, _cursor$plus));
if (highWater > later) {
var _cursor$plus2;
cursor = cursor.plus((_cursor$plus2 = {}, _cursor$plus2[unit] = delta - 1, _cursor$plus2));
delta -= 1;
} else {
cursor = highWater;
}
results[unit] = delta;
}
}
return [cursor, results, highWater, lowestOrder];
}
function _diff(earlier, later, units, opts) {
var _highOrderDiffs = highOrderDiffs2(earlier, later, units), cursor = _highOrderDiffs[0], results = _highOrderDiffs[1], highWater = _highOrderDiffs[2], lowestOrder = _highOrderDiffs[3];
var remainingMillis = later - cursor;
var lowerOrderUnits = units.filter(function(u) {
return ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0;
});
if (lowerOrderUnits.length === 0) {
if (highWater < later) {
var _cursor$plus3;
highWater = cursor.plus((_cursor$plus3 = {}, _cursor$plus3[lowestOrder] = 1, _cursor$plus3));
}
if (highWater !== cursor) {
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
}
}
var duration = Duration3.fromObject(Object.assign(results, opts));
if (lowerOrderUnits.length > 0) {
var _Duration$fromMillis;
return (_Duration$fromMillis = Duration3.fromMillis(remainingMillis, opts)).shiftTo.apply(_Duration$fromMillis, lowerOrderUnits).plus(duration);
} else {
return duration;
}
}
var numberingSystems2 = {
arab: "[\u0660-\u0669]",
arabext: "[\u06F0-\u06F9]",
bali: "[\u1B50-\u1B59]",
beng: "[\u09E6-\u09EF]",
deva: "[\u0966-\u096F]",
fullwide: "[\uFF10-\uFF19]",
gujr: "[\u0AE6-\u0AEF]",
hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",
khmr: "[\u17E0-\u17E9]",
knda: "[\u0CE6-\u0CEF]",
laoo: "[\u0ED0-\u0ED9]",
limb: "[\u1946-\u194F]",
mlym: "[\u0D66-\u0D6F]",
mong: "[\u1810-\u1819]",
mymr: "[\u1040-\u1049]",
orya: "[\u0B66-\u0B6F]",
tamldec: "[\u0BE6-\u0BEF]",
telu: "[\u0C66-\u0C6F]",
thai: "[\u0E50-\u0E59]",
tibt: "[\u0F20-\u0F29]",
latn: "\\d"
};
var numberingSystemsUTF162 = {
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]
};
var hanidecChars2 = numberingSystems2.hanidec.replace(/[\[|\]]/g, "").split("");
function parseDigits2(str) {
var value = parseInt(str, 10);
if (isNaN(value)) {
value = "";
for (var i = 0; i < str.length; i++) {
var code = str.charCodeAt(i);
if (str[i].search(numberingSystems2.hanidec) !== -1) {
value += hanidecChars2.indexOf(str[i]);
} else {
for (var key2 in numberingSystemsUTF162) {
var _numberingSystemsUTF = numberingSystemsUTF162[key2], min = _numberingSystemsUTF[0], max = _numberingSystemsUTF[1];
if (code >= min && code <= max) {
value += code - min;
}
}
}
}
return parseInt(value, 10);
} else {
return value;
}
}
function digitRegex2(_ref, append) {
var numberingSystem = _ref.numberingSystem;
if (append === void 0) {
append = "";
}
return new RegExp("" + numberingSystems2[numberingSystem || "latn"] + append);
}
var MISSING_FTP2 = "missing Intl.DateTimeFormat.formatToParts support";
function intUnit2(regex, post) {
if (post === void 0) {
post = function post2(i) {
return i;
};
}
return {
regex,
deser: function deser(_ref) {
var s3 = _ref[0];
return post(parseDigits2(s3));
}
};
}
var NBSP2 = String.fromCharCode(160);
var spaceOrNBSP2 = "( |" + NBSP2 + ")";
var spaceOrNBSPRegExp2 = new RegExp(spaceOrNBSP2, "g");
function fixListRegex2(s3) {
return s3.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp2, spaceOrNBSP2);
}
function stripInsensitivities2(s3) {
return s3.replace(/\./g, "").replace(spaceOrNBSPRegExp2, " ").toLowerCase();
}
function oneOf2(strings, startIndex) {
if (strings === null) {
return null;
} else {
return {
regex: RegExp(strings.map(fixListRegex2).join("|")),
deser: function deser(_ref2) {
var s3 = _ref2[0];
return strings.findIndex(function(i) {
return stripInsensitivities2(s3) === stripInsensitivities2(i);
}) + startIndex;
}
};
}
}
function offset2(regex, groups) {
return {
regex,
deser: function deser(_ref3) {
var h = _ref3[1], m = _ref3[2];
return signedOffset2(h, m);
},
groups
};
}
function simple2(regex) {
return {
regex,
deser: function deser(_ref4) {
var s3 = _ref4[0];
return s3;
}
};
}
function escapeToken2(value) {
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function unitForToken2(token, loc) {
var one = digitRegex2(loc), two = digitRegex2(loc, "{2}"), three = digitRegex2(loc, "{3}"), four = digitRegex2(loc, "{4}"), six = digitRegex2(loc, "{6}"), oneOrTwo = digitRegex2(loc, "{1,2}"), oneToThree = digitRegex2(loc, "{1,3}"), oneToSix = digitRegex2(loc, "{1,6}"), oneToNine = digitRegex2(loc, "{1,9}"), twoToFour = digitRegex2(loc, "{2,4}"), fourToSix = digitRegex2(loc, "{4,6}"), literal = function literal2(t) {
return {
regex: RegExp(escapeToken2(t.val)),
deser: function deser(_ref5) {
var s3 = _ref5[0];
return s3;
},
literal: true
};
}, unitate = function unitate2(t) {
if (token.literal) {
return literal(t);
}
switch (t.val) {
case "G":
return oneOf2(loc.eras("short", false), 0);
case "GG":
return oneOf2(loc.eras("long", false), 0);
case "y":
return intUnit2(oneToSix);
case "yy":
return intUnit2(twoToFour, untruncateYear2);
case "yyyy":
return intUnit2(four);
case "yyyyy":
return intUnit2(fourToSix);
case "yyyyyy":
return intUnit2(six);
case "M":
return intUnit2(oneOrTwo);
case "MM":
return intUnit2(two);
case "MMM":
return oneOf2(loc.months("short", true, false), 1);
case "MMMM":
return oneOf2(loc.months("long", true, false), 1);
case "L":
return intUnit2(oneOrTwo);
case "LL":
return intUnit2(two);
case "LLL":
return oneOf2(loc.months("short", false, false), 1);
case "LLLL":
return oneOf2(loc.months("long", false, false), 1);
case "d":
return intUnit2(oneOrTwo);
case "dd":
return intUnit2(two);
case "o":
return intUnit2(oneToThree);
case "ooo":
return intUnit2(three);
case "HH":
return intUnit2(two);
case "H":
return intUnit2(oneOrTwo);
case "hh":
return intUnit2(two);
case "h":
return intUnit2(oneOrTwo);
case "mm":
return intUnit2(two);
case "m":
return intUnit2(oneOrTwo);
case "q":
return intUnit2(oneOrTwo);
case "qq":
return intUnit2(two);
case "s":
return intUnit2(oneOrTwo);
case "ss":
return intUnit2(two);
case "S":
return intUnit2(oneToThree);
case "SSS":
return intUnit2(three);
case "u":
return simple2(oneToNine);
case "a":
return oneOf2(loc.meridiems(), 0);
case "kkkk":
return intUnit2(four);
case "kk":
return intUnit2(twoToFour, untruncateYear2);
case "W":
return intUnit2(oneOrTwo);
case "WW":
return intUnit2(two);
case "E":
case "c":
return intUnit2(one);
case "EEE":
return oneOf2(loc.weekdays("short", false, false), 1);
case "EEEE":
return oneOf2(loc.weekdays("long", false, false), 1);
case "ccc":
return oneOf2(loc.weekdays("short", true, false), 1);
case "cccc":
return oneOf2(loc.weekdays("long", true, false), 1);
case "Z":
case "ZZ":
return offset2(new RegExp("([+-]" + oneOrTwo.source + ")(?::(" + two.source + "))?"), 2);
case "ZZZ":
return offset2(new RegExp("([+-]" + oneOrTwo.source + ")(" + two.source + ")?"), 2);
case "z":
return simple2(/[a-z_+-/]{1,256}?/i);
default:
return literal(t);
}
};
var unit = unitate(token) || {
invalidReason: MISSING_FTP2
};
unit.token = token;
return unit;
}
var partTypeStyleToTokenVal2 = {
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",
hour: {
numeric: "h",
"2-digit": "hh"
},
minute: {
numeric: "m",
"2-digit": "mm"
},
second: {
numeric: "s",
"2-digit": "ss"
}
};
function tokenForPart2(part, locale, formatOpts) {
var type = part.type, value = part.value;
if (type === "literal") {
return {
literal: true,
val: value
};
}
var style = formatOpts[type];
var val = partTypeStyleToTokenVal2[type];
if (typeof val === "object") {
val = val[style];
}
if (val) {
return {
literal: false,
val
};
}
return void 0;
}
function buildRegex2(units) {
var re = units.map(function(u) {
return u.regex;
}).reduce(function(f, r) {
return f + "(" + r.source + ")";
}, "");
return ["^" + re + "$", units];
}
function match2(input, regex, handlers) {
var matches = input.match(regex);
if (matches) {
var all = {};
var matchIndex = 1;
for (var i in handlers) {
if (hasOwnProperty2(handlers, i)) {
var h = handlers[i], groups = h.groups ? h.groups + 1 : 1;
if (!h.literal && h.token) {
all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));
}
matchIndex += groups;
}
}
return [matches, all];
} else {
return [matches, {}];
}
}
function dateTimeFromMatches2(matches) {
var toField = function toField2(token) {
switch (token) {
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;
}
};
var zone;
if (!isUndefined2(matches.Z)) {
zone = new FixedOffsetZone2(matches.Z);
} else if (!isUndefined2(matches.z)) {
zone = IANAZone2.create(matches.z);
} else {
zone = null;
}
if (!isUndefined2(matches.q)) {
matches.M = (matches.q - 1) * 3 + 1;
}
if (!isUndefined2(matches.h)) {
if (matches.h < 12 && matches.a === 1) {
matches.h += 12;
} else if (matches.h === 12 && matches.a === 0) {
matches.h = 0;
}
}
if (matches.G === 0 && matches.y) {
matches.y = -matches.y;
}
if (!isUndefined2(matches.u)) {
matches.S = parseMillis2(matches.u);
}
var vals = Object.keys(matches).reduce(function(r, k) {
var f = toField(k);
if (f) {
r[f] = matches[k];
}
return r;
}, {});
return [vals, zone];
}
var dummyDateTimeCache2 = null;
function getDummyDateTime2() {
if (!dummyDateTimeCache2) {
dummyDateTimeCache2 = DateTime2.fromMillis(1555555555555);
}
return dummyDateTimeCache2;
}
function maybeExpandMacroToken2(token, locale) {
if (token.literal) {
return token;
}
var formatOpts = Formatter2.macroTokenToFormatOpts(token.val);
if (!formatOpts) {
return token;
}
var formatter = Formatter2.create(locale, formatOpts);
var parts = formatter.formatDateTimeParts(getDummyDateTime2());
var tokens = parts.map(function(p) {
return tokenForPart2(p, locale, formatOpts);
});
if (tokens.includes(void 0)) {
return token;
}
return tokens;
}
function expandMacroTokens2(tokens, locale) {
var _Array$prototype;
return (_Array$prototype = Array.prototype).concat.apply(_Array$prototype, tokens.map(function(t) {
return maybeExpandMacroToken2(t, locale);
}));
}
function explainFromTokens2(locale, input, format) {
var tokens = expandMacroTokens2(Formatter2.parseFormat(format), locale), units = tokens.map(function(t) {
return unitForToken2(t, locale);
}), disqualifyingUnit = units.find(function(t) {
return t.invalidReason;
});
if (disqualifyingUnit) {
return {
input,
tokens,
invalidReason: disqualifyingUnit.invalidReason
};
} else {
var _buildRegex = buildRegex2(units), regexString = _buildRegex[0], handlers = _buildRegex[1], regex = RegExp(regexString, "i"), _match = match2(input, regex, handlers), rawMatches = _match[0], matches = _match[1], _ref6 = matches ? dateTimeFromMatches2(matches) : [null, null], result = _ref6[0], zone = _ref6[1];
if (hasOwnProperty2(matches, "a") && hasOwnProperty2(matches, "H")) {
throw new ConflictingSpecificationError2("Can't include meridiem when specifying 24-hour format");
}
return {
input,
tokens,
regex,
rawMatches,
matches,
result,
zone
};
}
}
function parseFromTokens2(locale, input, format) {
var _explainFromTokens = explainFromTokens2(locale, input, format), result = _explainFromTokens.result, zone = _explainFromTokens.zone, invalidReason = _explainFromTokens.invalidReason;
return [result, zone, invalidReason];
}
var nonLeapLadder2 = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
var leapLadder2 = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function unitOutOfRange2(unit, value) {
return new Invalid2("unit out of range", "you specified " + value + " (of type " + typeof value + ") as a " + unit + ", which is invalid");
}
function dayOfWeek2(year, month, day) {
var js = new Date(Date.UTC(year, month - 1, day)).getUTCDay();
return js === 0 ? 7 : js;
}
function computeOrdinal2(year, month, day) {
return day + (isLeapYear2(year) ? leapLadder2 : nonLeapLadder2)[month - 1];
}
function uncomputeOrdinal2(year, ordinal) {
var table = isLeapYear2(year) ? leapLadder2 : nonLeapLadder2, month0 = table.findIndex(function(i) {
return i < ordinal;
}), day = ordinal - table[month0];
return {
month: month0 + 1,
day
};
}
function gregorianToWeek2(gregObj) {
var year = gregObj.year, month = gregObj.month, day = gregObj.day, ordinal = computeOrdinal2(year, month, day), weekday = dayOfWeek2(year, month, day);
var weekNumber = Math.floor((ordinal - weekday + 10) / 7), weekYear;
if (weekNumber < 1) {
weekYear = year - 1;
weekNumber = weeksInWeekYear2(weekYear);
} else if (weekNumber > weeksInWeekYear2(year)) {
weekYear = year + 1;
weekNumber = 1;
} else {
weekYear = year;
}
return Object.assign({
weekYear,
weekNumber,
weekday
}, timeObject2(gregObj));
}
function weekToGregorian2(weekData) {
var weekYear = weekData.weekYear, weekNumber = weekData.weekNumber, weekday = weekData.weekday, weekdayOfJan4 = dayOfWeek2(weekYear, 1, 4), yearInDays = daysInYear2(weekYear);
var ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 3, year;
if (ordinal < 1) {
year = weekYear - 1;
ordinal += daysInYear2(year);
} else if (ordinal > yearInDays) {
year = weekYear + 1;
ordinal -= daysInYear2(weekYear);
} else {
year = weekYear;
}
var _uncomputeOrdinal = uncomputeOrdinal2(year, ordinal), month = _uncomputeOrdinal.month, day = _uncomputeOrdinal.day;
return Object.assign({
year,
month,
day
}, timeObject2(weekData));
}
function gregorianToOrdinal2(gregData) {
var year = gregData.year, month = gregData.month, day = gregData.day, ordinal = computeOrdinal2(year, month, day);
return Object.assign({
year,
ordinal
}, timeObject2(gregData));
}
function ordinalToGregorian2(ordinalData) {
var year = ordinalData.year, ordinal = ordinalData.ordinal, _uncomputeOrdinal2 = uncomputeOrdinal2(year, ordinal), month = _uncomputeOrdinal2.month, day = _uncomputeOrdinal2.day;
return Object.assign({
year,
month,
day
}, timeObject2(ordinalData));
}
function hasInvalidWeekData2(obj) {
var validYear = isInteger2(obj.weekYear), validWeek = integerBetween2(obj.weekNumber, 1, weeksInWeekYear2(obj.weekYear)), validWeekday = integerBetween2(obj.weekday, 1, 7);
if (!validYear) {
return unitOutOfRange2("weekYear", obj.weekYear);
} else if (!validWeek) {
return unitOutOfRange2("week", obj.week);
} else if (!validWeekday) {
return unitOutOfRange2("weekday", obj.weekday);
} else
return false;
}
function hasInvalidOrdinalData2(obj) {
var validYear = isInteger2(obj.year), validOrdinal = integerBetween2(obj.ordinal, 1, daysInYear2(obj.year));
if (!validYear) {
return unitOutOfRange2("year", obj.year);
} else if (!validOrdinal) {
return unitOutOfRange2("ordinal", obj.ordinal);
} else
return false;
}
function hasInvalidGregorianData2(obj) {
var validYear = isInteger2(obj.year), validMonth = integerBetween2(obj.month, 1, 12), validDay = integerBetween2(obj.day, 1, daysInMonth2(obj.year, obj.month));
if (!validYear) {
return unitOutOfRange2("year", obj.year);
} else if (!validMonth) {
return unitOutOfRange2("month", obj.month);
} else if (!validDay) {
return unitOutOfRange2("day", obj.day);
} else
return false;
}
function hasInvalidTimeData2(obj) {
var hour = obj.hour, minute = obj.minute, second = obj.second, millisecond = obj.millisecond;
var validHour = integerBetween2(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween2(minute, 0, 59), validSecond = integerBetween2(second, 0, 59), validMillisecond = integerBetween2(millisecond, 0, 999);
if (!validHour) {
return unitOutOfRange2("hour", hour);
} else if (!validMinute) {
return unitOutOfRange2("minute", minute);
} else if (!validSecond) {
return unitOutOfRange2("second", second);
} else if (!validMillisecond) {
return unitOutOfRange2("millisecond", millisecond);
} else
return false;
}
var INVALID$2 = "Invalid DateTime";
var MAX_DATE2 = 864e13;
function unsupportedZone2(zone) {
return new Invalid2("unsupported zone", 'the zone "' + zone.name + '" is not supported');
}
function possiblyCachedWeekData2(dt) {
if (dt.weekData === null) {
dt.weekData = gregorianToWeek2(dt.c);
}
return dt.weekData;
}
function clone$1(inst, alts) {
var current2 = {
ts: inst.ts,
zone: inst.zone,
c: inst.c,
o: inst.o,
loc: inst.loc,
invalid: inst.invalid
};
return new DateTime2(Object.assign({}, current2, alts, {
old: current2
}));
}
function fixOffset2(localTS, o, tz) {
var utcGuess = localTS - o * 60 * 1e3;
var o2 = tz.offset(utcGuess);
if (o === o2) {
return [utcGuess, o];
}
utcGuess -= (o2 - o) * 60 * 1e3;
var o3 = tz.offset(utcGuess);
if (o2 === o3) {
return [utcGuess, o2];
}
return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)];
}
function tsToObj2(ts, offset3) {
ts += offset3 * 60 * 1e3;
var d = new Date(ts);
return {
year: d.getUTCFullYear(),
month: d.getUTCMonth() + 1,
day: d.getUTCDate(),
hour: d.getUTCHours(),
minute: d.getUTCMinutes(),
second: d.getUTCSeconds(),
millisecond: d.getUTCMilliseconds()
};
}
function objToTS2(obj, offset3, zone) {
return fixOffset2(objToLocalTS2(obj), offset3, zone);
}
function adjustTime2(inst, dur) {
var oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = Object.assign({}, inst.c, {
year,
month,
day: Math.min(inst.c.day, daysInMonth2(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
}), millisToAdd = Duration3.fromObject({
years: dur.years - Math.trunc(dur.years),
quarters: dur.quarters - Math.trunc(dur.quarters),
months: dur.months - Math.trunc(dur.months),
weeks: dur.weeks - Math.trunc(dur.weeks),
days: dur.days - Math.trunc(dur.days),
hours: dur.hours,
minutes: dur.minutes,
seconds: dur.seconds,
milliseconds: dur.milliseconds
}).as("milliseconds"), localTS = objToLocalTS2(c);
var _fixOffset = fixOffset2(localTS, oPre, inst.zone), ts = _fixOffset[0], o = _fixOffset[1];
if (millisToAdd !== 0) {
ts += millisToAdd;
o = inst.zone.offset(ts);
}
return {
ts,
o
};
}
function parseDataToDateTime2(parsed, parsedZone, opts, format, text) {
var setZone = opts.setZone, zone = opts.zone;
if (parsed && Object.keys(parsed).length !== 0) {
var interpretationZone = parsedZone || zone, inst = DateTime2.fromObject(Object.assign(parsed, opts, {
zone: interpretationZone,
// setZone is a valid option in the calling methods, but not in fromObject
setZone: void 0
}));
return setZone ? inst : inst.setZone(zone);
} else {
return DateTime2.invalid(new Invalid2("unparsable", 'the input "' + text + `" can't be parsed as ` + format));
}
}
function toTechFormat2(dt, format, allowZ) {
if (allowZ === void 0) {
allowZ = true;
}
return dt.isValid ? Formatter2.create(Locale2.create("en-US"), {
allowZ,
forceSimple: true
}).formatDateTimeFromString(dt, format) : null;
}
function toTechTimeFormat(dt, _ref) {
var _ref$suppressSeconds = _ref.suppressSeconds, suppressSeconds = _ref$suppressSeconds === void 0 ? false : _ref$suppressSeconds, _ref$suppressMillisec = _ref.suppressMilliseconds, suppressMilliseconds = _ref$suppressMillisec === void 0 ? false : _ref$suppressMillisec, includeOffset = _ref.includeOffset, _ref$includePrefix = _ref.includePrefix, includePrefix = _ref$includePrefix === void 0 ? false : _ref$includePrefix, _ref$includeZone = _ref.includeZone, includeZone = _ref$includeZone === void 0 ? false : _ref$includeZone, _ref$spaceZone = _ref.spaceZone, spaceZone = _ref$spaceZone === void 0 ? false : _ref$spaceZone, _ref$format = _ref.format, format = _ref$format === void 0 ? "extended" : _ref$format;
var fmt = format === "basic" ? "HHmm" : "HH:mm";
if (!suppressSeconds || dt.second !== 0 || dt.millisecond !== 0) {
fmt += format === "basic" ? "ss" : ":ss";
if (!suppressMilliseconds || dt.millisecond !== 0) {
fmt += ".SSS";
}
}
if ((includeZone || includeOffset) && spaceZone) {
fmt += " ";
}
if (includeZone) {
fmt += "z";
} else if (includeOffset) {
fmt += format === "basic" ? "ZZZ" : "ZZ";
}
var str = toTechFormat2(dt, fmt);
if (includePrefix) {
str = "T" + str;
}
return str;
}
var defaultUnitValues2 = {
month: 1,
day: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultWeekUnitValues2 = {
weekNumber: 1,
weekday: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultOrdinalUnitValues2 = {
ordinal: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var orderedUnits$1 = ["year", "month", "day", "hour", "minute", "second", "millisecond"];
var orderedWeekUnits2 = ["weekYear", "weekNumber", "weekday", "hour", "minute", "second", "millisecond"];
var orderedOrdinalUnits2 = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function normalizeUnit2(unit) {
var normalized = {
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"
}[unit.toLowerCase()];
if (!normalized)
throw new InvalidUnitError2(unit);
return normalized;
}
function quickDT2(obj, zone) {
for (var _iterator = _createForOfIteratorHelperLoose(orderedUnits$1), _step; !(_step = _iterator()).done; ) {
var u = _step.value;
if (isUndefined2(obj[u])) {
obj[u] = defaultUnitValues2[u];
}
}
var invalid = hasInvalidGregorianData2(obj) || hasInvalidTimeData2(obj);
if (invalid) {
return DateTime2.invalid(invalid);
}
var tsNow = Settings2.now(), offsetProvis = zone.offset(tsNow), _objToTS = objToTS2(obj, offsetProvis, zone), ts = _objToTS[0], o = _objToTS[1];
return new DateTime2({
ts,
zone,
o
});
}
function diffRelative2(start, end, opts) {
var round = isUndefined2(opts.round) ? true : opts.round, format = function format2(c, unit2) {
c = roundTo2(c, round || opts.calendary ? 0 : 2, true);
var formatter = end.loc.clone(opts).relFormatter(opts);
return formatter.format(c, unit2);
}, differ = function differ2(unit2) {
if (opts.calendary) {
if (!end.hasSame(start, unit2)) {
return end.startOf(unit2).diff(start.startOf(unit2), unit2).get(unit2);
} else
return 0;
} else {
return end.diff(start, unit2).get(unit2);
}
};
if (opts.unit) {
return format(differ(opts.unit), opts.unit);
}
for (var _iterator2 = _createForOfIteratorHelperLoose(opts.units), _step2; !(_step2 = _iterator2()).done; ) {
var unit = _step2.value;
var count = differ(unit);
if (Math.abs(count) >= 1) {
return format(count, unit);
}
}
return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);
}
var DateTime2 = /* @__PURE__ */ function() {
function DateTime3(config) {
var zone = config.zone || Settings2.defaultZone;
var invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid2("invalid input") : null) || (!zone.isValid ? unsupportedZone2(zone) : null);
this.ts = isUndefined2(config.ts) ? Settings2.now() : config.ts;
var c = null, o = null;
if (!invalid) {
var unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
if (unchanged) {
var _ref2 = [config.old.c, config.old.o];
c = _ref2[0];
o = _ref2[1];
} else {
var ot = zone.offset(this.ts);
c = tsToObj2(this.ts, ot);
invalid = Number.isNaN(c.year) ? new Invalid2("invalid input") : null;
c = invalid ? null : c;
o = invalid ? null : ot;
}
}
this._zone = zone;
this.loc = config.loc || Locale2.create();
this.invalid = invalid;
this.weekData = null;
this.c = c;
this.o = o;
this.isLuxonDateTime = true;
}
DateTime3.now = function now4() {
return new DateTime3({});
};
DateTime3.local = function local(year, month, day, hour, minute, second, millisecond) {
if (isUndefined2(year)) {
return DateTime3.now();
} else {
return quickDT2({
year,
month,
day,
hour,
minute,
second,
millisecond
}, Settings2.defaultZone);
}
};
DateTime3.utc = function utc(year, month, day, hour, minute, second, millisecond) {
if (isUndefined2(year)) {
return new DateTime3({
ts: Settings2.now(),
zone: FixedOffsetZone2.utcInstance
});
} else {
return quickDT2({
year,
month,
day,
hour,
minute,
second,
millisecond
}, FixedOffsetZone2.utcInstance);
}
};
DateTime3.fromJSDate = function fromJSDate(date, options) {
if (options === void 0) {
options = {};
}
var ts = isDate2(date) ? date.valueOf() : NaN;
if (Number.isNaN(ts)) {
return DateTime3.invalid("invalid input");
}
var zoneToUse = normalizeZone2(options.zone, Settings2.defaultZone);
if (!zoneToUse.isValid) {
return DateTime3.invalid(unsupportedZone2(zoneToUse));
}
return new DateTime3({
ts,
zone: zoneToUse,
loc: Locale2.fromObject(options)
});
};
DateTime3.fromMillis = function fromMillis(milliseconds, options) {
if (options === void 0) {
options = {};
}
if (!isNumber2(milliseconds)) {
throw new InvalidArgumentError2("fromMillis requires a numerical input, but received a " + typeof milliseconds + " with value " + milliseconds);
} else if (milliseconds < -MAX_DATE2 || milliseconds > MAX_DATE2) {
return DateTime3.invalid("Timestamp out of range");
} else {
return new DateTime3({
ts: milliseconds,
zone: normalizeZone2(options.zone, Settings2.defaultZone),
loc: Locale2.fromObject(options)
});
}
};
DateTime3.fromSeconds = function fromSeconds(seconds, options) {
if (options === void 0) {
options = {};
}
if (!isNumber2(seconds)) {
throw new InvalidArgumentError2("fromSeconds requires a numerical input");
} else {
return new DateTime3({
ts: seconds * 1e3,
zone: normalizeZone2(options.zone, Settings2.defaultZone),
loc: Locale2.fromObject(options)
});
}
};
DateTime3.fromObject = function fromObject(obj) {
var zoneToUse = normalizeZone2(obj.zone, Settings2.defaultZone);
if (!zoneToUse.isValid) {
return DateTime3.invalid(unsupportedZone2(zoneToUse));
}
var tsNow = Settings2.now(), offsetProvis = zoneToUse.offset(tsNow), normalized = normalizeObject2(obj, normalizeUnit2, ["zone", "locale", "outputCalendar", "numberingSystem"]), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber, loc = Locale2.fromObject(obj);
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError2("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError2("Can't mix ordinal dates with month/day");
}
var useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;
var units, defaultValues, objNow = tsToObj2(tsNow, offsetProvis);
if (useWeekData) {
units = orderedWeekUnits2;
defaultValues = defaultWeekUnitValues2;
objNow = gregorianToWeek2(objNow);
} else if (containsOrdinal) {
units = orderedOrdinalUnits2;
defaultValues = defaultOrdinalUnitValues2;
objNow = gregorianToOrdinal2(objNow);
} else {
units = orderedUnits$1;
defaultValues = defaultUnitValues2;
}
var foundFirst = false;
for (var _iterator3 = _createForOfIteratorHelperLoose(units), _step3; !(_step3 = _iterator3()).done; ) {
var u = _step3.value;
var v = normalized[u];
if (!isUndefined2(v)) {
foundFirst = true;
} else if (foundFirst) {
normalized[u] = defaultValues[u];
} else {
normalized[u] = objNow[u];
}
}
var higherOrderInvalid = useWeekData ? hasInvalidWeekData2(normalized) : containsOrdinal ? hasInvalidOrdinalData2(normalized) : hasInvalidGregorianData2(normalized), invalid = higherOrderInvalid || hasInvalidTimeData2(normalized);
if (invalid) {
return DateTime3.invalid(invalid);
}
var gregorian = useWeekData ? weekToGregorian2(normalized) : containsOrdinal ? ordinalToGregorian2(normalized) : normalized, _objToTS2 = objToTS2(gregorian, offsetProvis, zoneToUse), tsFinal = _objToTS2[0], offsetFinal = _objToTS2[1], inst = new DateTime3({
ts: tsFinal,
zone: zoneToUse,
o: offsetFinal,
loc
});
if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
return DateTime3.invalid("mismatched weekday", "you can't specify both a weekday of " + normalized.weekday + " and a date of " + inst.toISO());
}
return inst;
};
DateTime3.fromISO = function fromISO(text, opts) {
if (opts === void 0) {
opts = {};
}
var _parseISODate = parseISODate2(text), vals = _parseISODate[0], parsedZone = _parseISODate[1];
return parseDataToDateTime2(vals, parsedZone, opts, "ISO 8601", text);
};
DateTime3.fromRFC2822 = function fromRFC2822(text, opts) {
if (opts === void 0) {
opts = {};
}
var _parseRFC2822Date = parseRFC2822Date2(text), vals = _parseRFC2822Date[0], parsedZone = _parseRFC2822Date[1];
return parseDataToDateTime2(vals, parsedZone, opts, "RFC 2822", text);
};
DateTime3.fromHTTP = function fromHTTP(text, opts) {
if (opts === void 0) {
opts = {};
}
var _parseHTTPDate = parseHTTPDate2(text), vals = _parseHTTPDate[0], parsedZone = _parseHTTPDate[1];
return parseDataToDateTime2(vals, parsedZone, opts, "HTTP", opts);
};
DateTime3.fromFormat = function fromFormat(text, fmt, opts) {
if (opts === void 0) {
opts = {};
}
if (isUndefined2(text) || isUndefined2(fmt)) {
throw new InvalidArgumentError2("fromFormat requires an input string and a format");
}
var _opts = opts, _opts$locale = _opts.locale, locale = _opts$locale === void 0 ? null : _opts$locale, _opts$numberingSystem = _opts.numberingSystem, numberingSystem = _opts$numberingSystem === void 0 ? null : _opts$numberingSystem, localeToUse = Locale2.fromOpts({
locale,
numberingSystem,
defaultToEN: true
}), _parseFromTokens = parseFromTokens2(localeToUse, text, fmt), vals = _parseFromTokens[0], parsedZone = _parseFromTokens[1], invalid = _parseFromTokens[2];
if (invalid) {
return DateTime3.invalid(invalid);
} else {
return parseDataToDateTime2(vals, parsedZone, opts, "format " + fmt, text);
}
};
DateTime3.fromString = function fromString(text, fmt, opts) {
if (opts === void 0) {
opts = {};
}
return DateTime3.fromFormat(text, fmt, opts);
};
DateTime3.fromSQL = function fromSQL(text, opts) {
if (opts === void 0) {
opts = {};
}
var _parseSQL = parseSQL2(text), vals = _parseSQL[0], parsedZone = _parseSQL[1];
return parseDataToDateTime2(vals, parsedZone, opts, "SQL", text);
};
DateTime3.invalid = function invalid(reason, explanation) {
if (explanation === void 0) {
explanation = null;
}
if (!reason) {
throw new InvalidArgumentError2("need to specify a reason the DateTime is invalid");
}
var invalid2 = reason instanceof Invalid2 ? reason : new Invalid2(reason, explanation);
if (Settings2.throwOnInvalid) {
throw new InvalidDateTimeError2(invalid2);
} else {
return new DateTime3({
invalid: invalid2
});
}
};
DateTime3.isDateTime = function isDateTime(o) {
return o && o.isLuxonDateTime || false;
};
var _proto = DateTime3.prototype;
_proto.get = function get(unit) {
return this[unit];
};
_proto.resolvedLocaleOpts = function resolvedLocaleOpts(opts) {
if (opts === void 0) {
opts = {};
}
var _Formatter$create$res = Formatter2.create(this.loc.clone(opts), opts).resolvedOptions(this), locale = _Formatter$create$res.locale, numberingSystem = _Formatter$create$res.numberingSystem, calendar = _Formatter$create$res.calendar;
return {
locale,
numberingSystem,
outputCalendar: calendar
};
};
_proto.toUTC = function toUTC(offset3, opts) {
if (offset3 === void 0) {
offset3 = 0;
}
if (opts === void 0) {
opts = {};
}
return this.setZone(FixedOffsetZone2.instance(offset3), opts);
};
_proto.toLocal = function toLocal() {
return this.setZone(Settings2.defaultZone);
};
_proto.setZone = function setZone(zone, _temp) {
var _ref3 = _temp === void 0 ? {} : _temp, _ref3$keepLocalTime = _ref3.keepLocalTime, keepLocalTime = _ref3$keepLocalTime === void 0 ? false : _ref3$keepLocalTime, _ref3$keepCalendarTim = _ref3.keepCalendarTime, keepCalendarTime = _ref3$keepCalendarTim === void 0 ? false : _ref3$keepCalendarTim;
zone = normalizeZone2(zone, Settings2.defaultZone);
if (zone.equals(this.zone)) {
return this;
} else if (!zone.isValid) {
return DateTime3.invalid(unsupportedZone2(zone));
} else {
var newTS = this.ts;
if (keepLocalTime || keepCalendarTime) {
var offsetGuess = zone.offset(this.ts);
var asObj = this.toObject();
var _objToTS3 = objToTS2(asObj, offsetGuess, zone);
newTS = _objToTS3[0];
}
return clone$1(this, {
ts: newTS,
zone
});
}
};
_proto.reconfigure = function reconfigure(_temp2) {
var _ref4 = _temp2 === void 0 ? {} : _temp2, locale = _ref4.locale, numberingSystem = _ref4.numberingSystem, outputCalendar = _ref4.outputCalendar;
var loc = this.loc.clone({
locale,
numberingSystem,
outputCalendar
});
return clone$1(this, {
loc
});
};
_proto.setLocale = function setLocale(locale) {
return this.reconfigure({
locale
});
};
_proto.set = function set2(values) {
if (!this.isValid)
return this;
var normalized = normalizeObject2(values, normalizeUnit2, []), settingWeekStuff = !isUndefined2(normalized.weekYear) || !isUndefined2(normalized.weekNumber) || !isUndefined2(normalized.weekday), containsOrdinal = !isUndefined2(normalized.ordinal), containsGregorYear = !isUndefined2(normalized.year), containsGregorMD = !isUndefined2(normalized.month) || !isUndefined2(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError2("Can't mix weekYear/weekNumber units with year/month/day or ordinals");
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError2("Can't mix ordinal dates with month/day");
}
var mixed;
if (settingWeekStuff) {
mixed = weekToGregorian2(Object.assign(gregorianToWeek2(this.c), normalized));
} else if (!isUndefined2(normalized.ordinal)) {
mixed = ordinalToGregorian2(Object.assign(gregorianToOrdinal2(this.c), normalized));
} else {
mixed = Object.assign(this.toObject(), normalized);
if (isUndefined2(normalized.day)) {
mixed.day = Math.min(daysInMonth2(mixed.year, mixed.month), mixed.day);
}
}
var _objToTS4 = objToTS2(mixed, this.o, this.zone), ts = _objToTS4[0], o = _objToTS4[1];
return clone$1(this, {
ts,
o
});
};
_proto.plus = function plus(duration) {
if (!this.isValid)
return this;
var dur = friendlyDuration(duration);
return clone$1(this, adjustTime2(this, dur));
};
_proto.minus = function minus(duration) {
if (!this.isValid)
return this;
var dur = friendlyDuration(duration).negate();
return clone$1(this, adjustTime2(this, dur));
};
_proto.startOf = function startOf(unit) {
if (!this.isValid)
return this;
var o = {}, normalizedUnit = Duration3.normalizeUnit(unit);
switch (normalizedUnit) {
case "years":
o.month = 1;
case "quarters":
case "months":
o.day = 1;
case "weeks":
case "days":
o.hour = 0;
case "hours":
o.minute = 0;
case "minutes":
o.second = 0;
case "seconds":
o.millisecond = 0;
break;
}
if (normalizedUnit === "weeks") {
o.weekday = 1;
}
if (normalizedUnit === "quarters") {
var q = Math.ceil(this.month / 3);
o.month = (q - 1) * 3 + 1;
}
return this.set(o);
};
_proto.endOf = function endOf(unit) {
var _this$plus;
return this.isValid ? this.plus((_this$plus = {}, _this$plus[unit] = 1, _this$plus)).startOf(unit).minus(1) : this;
};
_proto.toFormat = function toFormat(fmt, opts) {
if (opts === void 0) {
opts = {};
}
return this.isValid ? Formatter2.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID$2;
};
_proto.toLocaleString = function toLocaleString(opts) {
if (opts === void 0) {
opts = DATE_SHORT2;
}
return this.isValid ? Formatter2.create(this.loc.clone(opts), opts).formatDateTime(this) : INVALID$2;
};
_proto.toLocaleParts = function toLocaleParts(opts) {
if (opts === void 0) {
opts = {};
}
return this.isValid ? Formatter2.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];
};
_proto.toISO = function toISO3(opts) {
if (opts === void 0) {
opts = {};
}
if (!this.isValid) {
return null;
}
return this.toISODate(opts) + "T" + this.toISOTime(opts);
};
_proto.toISODate = function toISODate2(_temp3) {
var _ref5 = _temp3 === void 0 ? {} : _temp3, _ref5$format = _ref5.format, format = _ref5$format === void 0 ? "extended" : _ref5$format;
var fmt = format === "basic" ? "yyyyMMdd" : "yyyy-MM-dd";
if (this.year > 9999) {
fmt = "+" + fmt;
}
return toTechFormat2(this, fmt);
};
_proto.toISOWeekDate = function toISOWeekDate() {
return toTechFormat2(this, "kkkk-'W'WW-c");
};
_proto.toISOTime = function toISOTime2(_temp4) {
var _ref6 = _temp4 === void 0 ? {} : _temp4, _ref6$suppressMillise = _ref6.suppressMilliseconds, suppressMilliseconds = _ref6$suppressMillise === void 0 ? false : _ref6$suppressMillise, _ref6$suppressSeconds = _ref6.suppressSeconds, suppressSeconds = _ref6$suppressSeconds === void 0 ? false : _ref6$suppressSeconds, _ref6$includeOffset = _ref6.includeOffset, includeOffset = _ref6$includeOffset === void 0 ? true : _ref6$includeOffset, _ref6$includePrefix = _ref6.includePrefix, includePrefix = _ref6$includePrefix === void 0 ? false : _ref6$includePrefix, _ref6$format = _ref6.format, format = _ref6$format === void 0 ? "extended" : _ref6$format;
return toTechTimeFormat(this, {
suppressSeconds,
suppressMilliseconds,
includeOffset,
includePrefix,
format
});
};
_proto.toRFC2822 = function toRFC2822() {
return toTechFormat2(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
};
_proto.toHTTP = function toHTTP() {
return toTechFormat2(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
};
_proto.toSQLDate = function toSQLDate() {
return toTechFormat2(this, "yyyy-MM-dd");
};
_proto.toSQLTime = function toSQLTime(_temp5) {
var _ref7 = _temp5 === void 0 ? {} : _temp5, _ref7$includeOffset = _ref7.includeOffset, includeOffset = _ref7$includeOffset === void 0 ? true : _ref7$includeOffset, _ref7$includeZone = _ref7.includeZone, includeZone = _ref7$includeZone === void 0 ? false : _ref7$includeZone;
return toTechTimeFormat(this, {
includeOffset,
includeZone,
spaceZone: true
});
};
_proto.toSQL = function toSQL(opts) {
if (opts === void 0) {
opts = {};
}
if (!this.isValid) {
return null;
}
return this.toSQLDate() + " " + this.toSQLTime(opts);
};
_proto.toString = function toString() {
return this.isValid ? this.toISO() : INVALID$2;
};
_proto.valueOf = function valueOf() {
return this.toMillis();
};
_proto.toMillis = function toMillis() {
return this.isValid ? this.ts : NaN;
};
_proto.toSeconds = function toSeconds() {
return this.isValid ? this.ts / 1e3 : NaN;
};
_proto.toJSON = function toJSON() {
return this.toISO();
};
_proto.toBSON = function toBSON() {
return this.toJSDate();
};
_proto.toObject = function toObject(opts) {
if (opts === void 0) {
opts = {};
}
if (!this.isValid)
return {};
var base = Object.assign({}, this.c);
if (opts.includeConfig) {
base.outputCalendar = this.outputCalendar;
base.numberingSystem = this.loc.numberingSystem;
base.locale = this.loc.locale;
}
return base;
};
_proto.toJSDate = function toJSDate() {
return new Date(this.isValid ? this.ts : NaN);
};
_proto.diff = function diff(otherDateTime, unit, opts) {
if (unit === void 0) {
unit = "milliseconds";
}
if (opts === void 0) {
opts = {};
}
if (!this.isValid || !otherDateTime.isValid) {
return Duration3.invalid(this.invalid || otherDateTime.invalid, "created by diffing an invalid DateTime");
}
var durOpts = Object.assign({
locale: this.locale,
numberingSystem: this.numberingSystem
}, opts);
var units = maybeArray2(unit).map(Duration3.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = _diff(earlier, later, units, durOpts);
return otherIsLater ? diffed.negate() : diffed;
};
_proto.diffNow = function diffNow(unit, opts) {
if (unit === void 0) {
unit = "milliseconds";
}
if (opts === void 0) {
opts = {};
}
return this.diff(DateTime3.now(), unit, opts);
};
_proto.until = function until(otherDateTime) {
return this.isValid ? Interval2.fromDateTimes(this, otherDateTime) : this;
};
_proto.hasSame = function hasSame(otherDateTime, unit) {
if (!this.isValid)
return false;
var inputMs = otherDateTime.valueOf();
var otherZoneDateTime = this.setZone(otherDateTime.zone, {
keepLocalTime: true
});
return otherZoneDateTime.startOf(unit) <= inputMs && inputMs <= otherZoneDateTime.endOf(unit);
};
_proto.equals = function equals(other) {
return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);
};
_proto.toRelative = function toRelative(options) {
if (options === void 0) {
options = {};
}
if (!this.isValid)
return null;
var base = options.base || DateTime3.fromObject({
zone: this.zone
}), padding = options.padding ? this < base ? -options.padding : options.padding : 0;
var units = ["years", "months", "days", "hours", "minutes", "seconds"];
var unit = options.unit;
if (Array.isArray(options.unit)) {
units = options.unit;
unit = void 0;
}
return diffRelative2(base, this.plus(padding), Object.assign(options, {
numeric: "always",
units,
unit
}));
};
_proto.toRelativeCalendar = function toRelativeCalendar(options) {
if (options === void 0) {
options = {};
}
if (!this.isValid)
return null;
return diffRelative2(options.base || DateTime3.fromObject({
zone: this.zone
}), this, Object.assign(options, {
numeric: "auto",
units: ["years", "months", "days"],
calendary: true
}));
};
DateTime3.min = function min() {
for (var _len = arguments.length, dateTimes = new Array(_len), _key = 0; _key < _len; _key++) {
dateTimes[_key] = arguments[_key];
}
if (!dateTimes.every(DateTime3.isDateTime)) {
throw new InvalidArgumentError2("min requires all arguments be DateTimes");
}
return bestBy2(dateTimes, function(i) {
return i.valueOf();
}, Math.min);
};
DateTime3.max = function max() {
for (var _len2 = arguments.length, dateTimes = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
dateTimes[_key2] = arguments[_key2];
}
if (!dateTimes.every(DateTime3.isDateTime)) {
throw new InvalidArgumentError2("max requires all arguments be DateTimes");
}
return bestBy2(dateTimes, function(i) {
return i.valueOf();
}, Math.max);
};
DateTime3.fromFormatExplain = function fromFormatExplain(text, fmt, options) {
if (options === void 0) {
options = {};
}
var _options = options, _options$locale = _options.locale, locale = _options$locale === void 0 ? null : _options$locale, _options$numberingSys = _options.numberingSystem, numberingSystem = _options$numberingSys === void 0 ? null : _options$numberingSys, localeToUse = Locale2.fromOpts({
locale,
numberingSystem,
defaultToEN: true
});
return explainFromTokens2(localeToUse, text, fmt);
};
DateTime3.fromStringExplain = function fromStringExplain(text, fmt, options) {
if (options === void 0) {
options = {};
}
return DateTime3.fromFormatExplain(text, fmt, options);
};
_createClass(DateTime3, [{
key: "isValid",
get: function get() {
return this.invalid === null;
}
/**
* Returns an error code if this DateTime is invalid, or null if the DateTime is valid
* @type {string}
*/
}, {
key: "invalidReason",
get: function get() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
* @type {string}
*/
}, {
key: "invalidExplanation",
get: function get() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
*
* @type {string}
*/
}, {
key: "locale",
get: function get() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
*
* @type {string}
*/
}, {
key: "numberingSystem",
get: function get() {
return this.isValid ? this.loc.numberingSystem : null;
}
/**
* Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
*
* @type {string}
*/
}, {
key: "outputCalendar",
get: function get() {
return this.isValid ? this.loc.outputCalendar : null;
}
/**
* Get the time zone associated with this DateTime.
* @type {Zone}
*/
}, {
key: "zone",
get: function get() {
return this._zone;
}
/**
* Get the name of the time zone.
* @type {string}
*/
}, {
key: "zoneName",
get: function get() {
return this.isValid ? this.zone.name : null;
}
/**
* Get the year
* @example DateTime.local(2017, 5, 25).year //=> 2017
* @type {number}
*/
}, {
key: "year",
get: function get() {
return this.isValid ? this.c.year : NaN;
}
/**
* Get the quarter
* @example DateTime.local(2017, 5, 25).quarter //=> 2
* @type {number}
*/
}, {
key: "quarter",
get: function get() {
return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
}
/**
* Get the month (1-12).
* @example DateTime.local(2017, 5, 25).month //=> 5
* @type {number}
*/
}, {
key: "month",
get: function get() {
return this.isValid ? this.c.month : NaN;
}
/**
* Get the day of the month (1-30ish).
* @example DateTime.local(2017, 5, 25).day //=> 25
* @type {number}
*/
}, {
key: "day",
get: function get() {
return this.isValid ? this.c.day : NaN;
}
/**
* Get the hour of the day (0-23).
* @example DateTime.local(2017, 5, 25, 9).hour //=> 9
* @type {number}
*/
}, {
key: "hour",
get: function get() {
return this.isValid ? this.c.hour : NaN;
}
/**
* Get the minute of the hour (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
* @type {number}
*/
}, {
key: "minute",
get: function get() {
return this.isValid ? this.c.minute : NaN;
}
/**
* Get the second of the minute (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
* @type {number}
*/
}, {
key: "second",
get: function get() {
return this.isValid ? this.c.second : NaN;
}
/**
* Get the millisecond of the second (0-999).
* @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
* @type {number}
*/
}, {
key: "millisecond",
get: function get() {
return this.isValid ? this.c.millisecond : NaN;
}
/**
* Get the week year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 12, 31).weekYear //=> 2015
* @type {number}
*/
}, {
key: "weekYear",
get: function get() {
return this.isValid ? possiblyCachedWeekData2(this).weekYear : NaN;
}
/**
* Get the week number of the week year (1-52ish).
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2017, 5, 25).weekNumber //=> 21
* @type {number}
*/
}, {
key: "weekNumber",
get: function get() {
return this.isValid ? possiblyCachedWeekData2(this).weekNumber : NaN;
}
/**
* Get the day of the week.
* 1 is Monday and 7 is Sunday
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 11, 31).weekday //=> 4
* @type {number}
*/
}, {
key: "weekday",
get: function get() {
return this.isValid ? possiblyCachedWeekData2(this).weekday : NaN;
}
/**
* Get the ordinal (meaning the day of the year)
* @example DateTime.local(2017, 5, 25).ordinal //=> 145
* @type {number|DateTime}
*/
}, {
key: "ordinal",
get: function get() {
return this.isValid ? gregorianToOrdinal2(this.c).ordinal : NaN;
}
/**
* Get the human readable short month name, such as 'Oct'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthShort //=> Oct
* @type {string}
*/
}, {
key: "monthShort",
get: function get() {
return this.isValid ? Info2.months("short", {
locObj: this.loc
})[this.month - 1] : null;
}
/**
* Get the human readable long month name, such as 'October'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthLong //=> October
* @type {string}
*/
}, {
key: "monthLong",
get: function get() {
return this.isValid ? Info2.months("long", {
locObj: this.loc
})[this.month - 1] : null;
}
/**
* Get the human readable short weekday, such as 'Mon'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
* @type {string}
*/
}, {
key: "weekdayShort",
get: function get() {
return this.isValid ? Info2.weekdays("short", {
locObj: this.loc
})[this.weekday - 1] : null;
}
/**
* Get the human readable long weekday, such as 'Monday'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
* @type {string}
*/
}, {
key: "weekdayLong",
get: function get() {
return this.isValid ? Info2.weekdays("long", {
locObj: this.loc
})[this.weekday - 1] : null;
}
/**
* Get the UTC offset of this DateTime in minutes
* @example DateTime.now().offset //=> -240
* @example DateTime.utc().offset //=> 0
* @type {number}
*/
}, {
key: "offset",
get: function get() {
return this.isValid ? +this.o : NaN;
}
/**
* Get the short human name for the zone's current offset, for example "EST" or "EDT".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
}, {
key: "offsetNameShort",
get: function get() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "short",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
}, {
key: "offsetNameLong",
get: function get() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "long",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get whether this zone's offset ever changes, as in a DST.
* @type {boolean}
*/
}, {
key: "isOffsetFixed",
get: function get() {
return this.isValid ? this.zone.universal : null;
}
/**
* Get whether the DateTime is in a DST.
* @type {boolean}
*/
}, {
key: "isInDST",
get: function get() {
if (this.isOffsetFixed) {
return false;
} else {
return this.offset > this.set({
month: 1
}).offset || this.offset > this.set({
month: 5
}).offset;
}
}
/**
* Returns true if this DateTime is in a leap year, false otherwise
* @example DateTime.local(2016).isInLeapYear //=> true
* @example DateTime.local(2013).isInLeapYear //=> false
* @type {boolean}
*/
}, {
key: "isInLeapYear",
get: function get() {
return isLeapYear2(this.year);
}
/**
* Returns the number of days in this DateTime's month
* @example DateTime.local(2016, 2).daysInMonth //=> 29
* @example DateTime.local(2016, 3).daysInMonth //=> 31
* @type {number}
*/
}, {
key: "daysInMonth",
get: function get() {
return daysInMonth2(this.year, this.month);
}
/**
* Returns the number of days in this DateTime's year
* @example DateTime.local(2016).daysInYear //=> 366
* @example DateTime.local(2013).daysInYear //=> 365
* @type {number}
*/
}, {
key: "daysInYear",
get: function get() {
return this.isValid ? daysInYear2(this.year) : NaN;
}
/**
* Returns the number of weeks in this DateTime's year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2004).weeksInWeekYear //=> 53
* @example DateTime.local(2013).weeksInWeekYear //=> 52
* @type {number}
*/
}, {
key: "weeksInWeekYear",
get: function get() {
return this.isValid ? weeksInWeekYear2(this.weekYear) : NaN;
}
}], [{
key: "DATE_SHORT",
get: function get() {
return DATE_SHORT2;
}
/**
* {@link toLocaleString} format like 'Oct 14, 1983'
* @type {Object}
*/
}, {
key: "DATE_MED",
get: function get() {
return DATE_MED2;
}
/**
* {@link toLocaleString} format like 'Fri, Oct 14, 1983'
* @type {Object}
*/
}, {
key: "DATE_MED_WITH_WEEKDAY",
get: function get() {
return DATE_MED_WITH_WEEKDAY2;
}
/**
* {@link toLocaleString} format like 'October 14, 1983'
* @type {Object}
*/
}, {
key: "DATE_FULL",
get: function get() {
return DATE_FULL2;
}
/**
* {@link toLocaleString} format like 'Tuesday, October 14, 1983'
* @type {Object}
*/
}, {
key: "DATE_HUGE",
get: function get() {
return DATE_HUGE2;
}
/**
* {@link toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "TIME_SIMPLE",
get: function get() {
return TIME_SIMPLE2;
}
/**
* {@link toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "TIME_WITH_SECONDS",
get: function get() {
return TIME_WITH_SECONDS2;
}
/**
* {@link toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "TIME_WITH_SHORT_OFFSET",
get: function get() {
return TIME_WITH_SHORT_OFFSET2;
}
/**
* {@link toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "TIME_WITH_LONG_OFFSET",
get: function get() {
return TIME_WITH_LONG_OFFSET2;
}
/**
* {@link toLocaleString} format like '09:30', always 24-hour.
* @type {Object}
*/
}, {
key: "TIME_24_SIMPLE",
get: function get() {
return TIME_24_SIMPLE2;
}
/**
* {@link toLocaleString} format like '09:30:23', always 24-hour.
* @type {Object}
*/
}, {
key: "TIME_24_WITH_SECONDS",
get: function get() {
return TIME_24_WITH_SECONDS2;
}
/**
* {@link toLocaleString} format like '09:30:23 EDT', always 24-hour.
* @type {Object}
*/
}, {
key: "TIME_24_WITH_SHORT_OFFSET",
get: function get() {
return TIME_24_WITH_SHORT_OFFSET2;
}
/**
* {@link toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
* @type {Object}
*/
}, {
key: "TIME_24_WITH_LONG_OFFSET",
get: function get() {
return TIME_24_WITH_LONG_OFFSET2;
}
/**
* {@link toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_SHORT",
get: function get() {
return DATETIME_SHORT2;
}
/**
* {@link toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_SHORT_WITH_SECONDS",
get: function get() {
return DATETIME_SHORT_WITH_SECONDS2;
}
/**
* {@link toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_MED",
get: function get() {
return DATETIME_MED2;
}
/**
* {@link toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_MED_WITH_SECONDS",
get: function get() {
return DATETIME_MED_WITH_SECONDS2;
}
/**
* {@link toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_MED_WITH_WEEKDAY",
get: function get() {
return DATETIME_MED_WITH_WEEKDAY2;
}
/**
* {@link toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_FULL",
get: function get() {
return DATETIME_FULL2;
}
/**
* {@link toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_FULL_WITH_SECONDS",
get: function get() {
return DATETIME_FULL_WITH_SECONDS2;
}
/**
* {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_HUGE",
get: function get() {
return DATETIME_HUGE2;
}
/**
* {@link toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
}, {
key: "DATETIME_HUGE_WITH_SECONDS",
get: function get() {
return DATETIME_HUGE_WITH_SECONDS2;
}
}]);
return DateTime3;
}();
function friendlyDateTime2(dateTimeish) {
if (DateTime2.isDateTime(dateTimeish)) {
return dateTimeish;
} else if (dateTimeish && dateTimeish.valueOf && isNumber2(dateTimeish.valueOf())) {
return DateTime2.fromJSDate(dateTimeish);
} else if (dateTimeish && typeof dateTimeish === "object") {
return DateTime2.fromObject(dateTimeish);
} else {
throw new InvalidArgumentError2("Unknown datetime argument: " + dateTimeish + ", of type " + typeof dateTimeish);
}
}
var VERSION = "1.28.1";
exports.DateTime = DateTime2;
exports.Duration = Duration3;
exports.FixedOffsetZone = FixedOffsetZone2;
exports.IANAZone = IANAZone2;
exports.Info = Info2;
exports.Interval = Interval2;
exports.InvalidZone = InvalidZone2;
exports.LocalZone = LocalZone;
exports.Settings = Settings2;
exports.VERSION = VERSION;
exports.Zone = Zone2;
}
});
// node_modules/.pnpm/rrule@2.4.1/node_modules/rrule/dist/es5/rrule.js
var require_rrule = __commonJS({
"node_modules/.pnpm/rrule@2.4.1/node_modules/rrule/dist/es5/rrule.js"(exports, module2) {
(function webpackUniversalModuleDefinition(root, factory) {
if (typeof exports === "object" && typeof module2 === "object")
module2.exports = factory(require_luxon());
else if (typeof define === "function" && define.amd)
define(["luxon"], factory);
else if (typeof exports === "object")
exports["rrule"] = factory(require_luxon());
else
root["rrule"] = factory(root["luxon"]);
})(typeof self !== "undefined" ? self : exports, function(__WEBPACK_EXTERNAL_MODULE__2__) {
return (
/******/
function(modules) {
var installedModules = {};
function __webpack_require__(moduleId) {
if (installedModules[moduleId]) {
return installedModules[moduleId].exports;
}
var module3 = installedModules[moduleId] = {
/******/
i: moduleId,
/******/
l: false,
/******/
exports: {}
/******/
};
modules[moduleId].call(module3.exports, module3, module3.exports, __webpack_require__);
module3.l = true;
return module3.exports;
}
__webpack_require__.m = modules;
__webpack_require__.c = installedModules;
__webpack_require__.d = function(exports2, name, getter) {
if (!__webpack_require__.o(exports2, name)) {
Object.defineProperty(exports2, name, { enumerable: true, get: getter });
}
};
__webpack_require__.r = function(exports2) {
if (typeof Symbol !== "undefined" && Symbol.toStringTag) {
Object.defineProperty(exports2, Symbol.toStringTag, { value: "Module" });
}
Object.defineProperty(exports2, "__esModule", { value: true });
};
__webpack_require__.t = function(value, mode) {
if (mode & 1)
value = __webpack_require__(value);
if (mode & 8)
return value;
if (mode & 4 && typeof value === "object" && value && value.__esModule)
return value;
var ns = /* @__PURE__ */ Object.create(null);
__webpack_require__.r(ns);
Object.defineProperty(ns, "default", { enumerable: true, value });
if (mode & 2 && typeof value != "string")
for (var key2 in value)
__webpack_require__.d(ns, key2, function(key3) {
return value[key3];
}.bind(null, key2));
return ns;
};
__webpack_require__.n = function(module3) {
var getter = module3 && module3.__esModule ? (
/******/
function getDefault() {
return module3["default"];
}
) : (
/******/
function getModuleExports() {
return module3;
}
);
__webpack_require__.d(getter, "a", getter);
return getter;
};
__webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
};
__webpack_require__.p = "";
return __webpack_require__(__webpack_require__.s = 1);
}([
/* 0 */
/***/
function(module3, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.d(__webpack_exports__, "f", function() {
return isPresent;
});
__webpack_require__.d(__webpack_exports__, "e", function() {
return isNumber2;
});
__webpack_require__.d(__webpack_exports__, "d", function() {
return isArray;
});
__webpack_require__.d(__webpack_exports__, "j", function() {
return range;
});
__webpack_require__.d(__webpack_exports__, "k", function() {
return repeat;
});
__webpack_require__.d(__webpack_exports__, "m", function() {
return toArray;
});
__webpack_require__.d(__webpack_exports__, "h", function() {
return padStart2;
});
__webpack_require__.d(__webpack_exports__, "l", function() {
return split;
});
__webpack_require__.d(__webpack_exports__, "i", function() {
return pymod;
});
__webpack_require__.d(__webpack_exports__, "a", function() {
return divmod;
});
__webpack_require__.d(__webpack_exports__, "b", function() {
return empty;
});
__webpack_require__.d(__webpack_exports__, "g", function() {
return notEmpty;
});
__webpack_require__.d(__webpack_exports__, "c", function() {
return includes;
});
var isPresent = function(value) {
return value !== null && value !== void 0;
};
var isNumber2 = function(value) {
return typeof value === "number";
};
var isArray = Array.isArray;
var range = function(start, end) {
if (end === void 0) {
end = start;
}
if (arguments.length === 1) {
end = start;
start = 0;
}
var rang = [];
for (var i = start; i < end; i++)
rang.push(i);
return rang;
};
var clone3 = function(array) {
return [].concat(array);
};
var repeat = function(value, times) {
var i = 0;
var array = [];
if (isArray(value)) {
for (; i < times; i++)
array[i] = [].concat(value);
} else {
for (; i < times; i++)
array[i] = value;
}
return array;
};
var toArray = function(item) {
if (isArray(item)) {
return item;
}
return [item];
};
function padStart2(item, targetLength, padString) {
if (padString === void 0) {
padString = " ";
}
var str = String(item);
targetLength = targetLength >> 0;
if (str.length > targetLength) {
return String(str);
}
targetLength = targetLength - str.length;
if (targetLength > padString.length) {
padString += repeat(padString, targetLength / padString.length);
}
return padString.slice(0, targetLength) + String(str);
}
var split = function(str, sep, num) {
var splits = str.split(sep);
return num ? splits.slice(0, num).concat([splits.slice(num).join(sep)]) : splits;
};
var pymod = function(a, b) {
var r = a % b;
return r * b < 0 ? r + b : r;
};
var divmod = function(a, b) {
return { div: Math.floor(a / b), mod: pymod(a, b) };
};
var empty = function(obj) {
return !isPresent(obj) || obj.length === 0;
};
var notEmpty = function(obj) {
return !empty(obj);
};
var includes = function(arr, val) {
return notEmpty(arr) && arr.indexOf(val) !== -1;
};
},
/* 1 */
/***/
function(module3, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
var helpers = __webpack_require__(0);
var __extends = /* @__PURE__ */ function() {
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2)
if (b2.hasOwnProperty(p))
d2[p] = b2[p];
};
return extendStatics(d, b);
};
return function(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var dateutil_dateutil;
(function(dateutil) {
dateutil.MONTH_DAYS = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
dateutil.ONE_DAY = 1e3 * 60 * 60 * 24;
dateutil.MAXYEAR = 9999;
dateutil.ORDINAL_BASE = new Date(Date.UTC(1970, 0, 1));
dateutil.PY_WEEKDAYS = [6, 0, 1, 2, 3, 4, 5];
dateutil.getYearDay = function(date) {
var dateNoTime = new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate());
return Math.ceil((dateNoTime.valueOf() - new Date(date.getUTCFullYear(), 0, 1).valueOf()) / dateutil.ONE_DAY) + 1;
};
dateutil.isLeapYear = function(year) {
return year % 4 === 0 && year % 100 !== 0 || year % 400 === 0;
};
dateutil.tzOffset = function(date) {
return date.getTimezoneOffset() * 60 * 1e3;
};
dateutil.daysBetween = function(date1, date2) {
var date1ms = date1.getTime() - dateutil.tzOffset(date1);
var date2ms = date2.getTime() - dateutil.tzOffset(date2);
var differencems = date1ms - date2ms;
return Math.round(differencems / dateutil.ONE_DAY);
};
dateutil.toOrdinal = function(date) {
return dateutil.daysBetween(date, dateutil.ORDINAL_BASE);
};
dateutil.fromOrdinal = function(ordinal) {
return new Date(dateutil.ORDINAL_BASE.getTime() + ordinal * dateutil.ONE_DAY);
};
dateutil.getMonthDays = function(date) {
var month = date.getUTCMonth();
return month === 1 && dateutil.isLeapYear(date.getUTCFullYear()) ? 29 : dateutil.MONTH_DAYS[month];
};
dateutil.getWeekday = function(date) {
return dateutil.PY_WEEKDAYS[date.getUTCDay()];
};
dateutil.monthRange = function(year, month) {
var date = new Date(Date.UTC(year, month, 1));
return [dateutil.getWeekday(date), dateutil.getMonthDays(date)];
};
dateutil.combine = function(date, time) {
time = time || date;
return new Date(Date.UTC(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate(), time.getHours(), time.getMinutes(), time.getSeconds(), time.getMilliseconds()));
};
dateutil.clone = function(date) {
var dolly = new Date(date.getTime());
return dolly;
};
dateutil.cloneDates = function(dates) {
var clones = [];
for (var i = 0; i < dates.length; i++) {
clones.push(dateutil.clone(dates[i]));
}
return clones;
};
dateutil.sort = function(dates) {
dates.sort(function(a, b) {
return a.getTime() - b.getTime();
});
};
dateutil.timeToUntilString = function(time, utc) {
if (utc === void 0) {
utc = true;
}
var date = new Date(time);
return [
Object(helpers[
"h"
/* padStart */
])(date.getUTCFullYear().toString(), 4, "0"),
Object(helpers[
"h"
/* padStart */
])(date.getUTCMonth() + 1, 2, "0"),
Object(helpers[
"h"
/* padStart */
])(date.getUTCDate(), 2, "0"),
"T",
Object(helpers[
"h"
/* padStart */
])(date.getUTCHours(), 2, "0"),
Object(helpers[
"h"
/* padStart */
])(date.getUTCMinutes(), 2, "0"),
Object(helpers[
"h"
/* padStart */
])(date.getUTCSeconds(), 2, "0"),
utc ? "Z" : ""
].join("");
};
dateutil.untilStringToDate = function(until) {
var re = /^(\d{4})(\d{2})(\d{2})(T(\d{2})(\d{2})(\d{2})Z?)?$/;
var bits = re.exec(until);
if (!bits)
throw new Error("Invalid UNTIL value: " + until);
return new Date(Date.UTC(parseInt(bits[1], 10), parseInt(bits[2], 10) - 1, parseInt(bits[3], 10), parseInt(bits[5], 10) || 0, parseInt(bits[6], 10) || 0, parseInt(bits[7], 10) || 0));
};
var Time2 = (
/** @class */
function() {
function Time3(hour, minute, second, millisecond) {
this.hour = hour;
this.minute = minute;
this.second = second;
this.millisecond = millisecond || 0;
}
Time3.prototype.getHours = function() {
return this.hour;
};
Time3.prototype.getMinutes = function() {
return this.minute;
};
Time3.prototype.getSeconds = function() {
return this.second;
};
Time3.prototype.getMilliseconds = function() {
return this.millisecond;
};
Time3.prototype.getTime = function() {
return (this.hour * 60 * 60 + this.minute * 60 + this.second) * 1e3 + this.millisecond;
};
return Time3;
}()
);
dateutil.Time = Time2;
var DateTime2 = (
/** @class */
function(_super) {
__extends(DateTime3, _super);
function DateTime3(year, month, day, hour, minute, second, millisecond) {
var _this = _super.call(this, hour, minute, second, millisecond) || this;
_this.year = year;
_this.month = month;
_this.day = day;
return _this;
}
DateTime3.prototype.getWeekday = function() {
return dateutil.getWeekday(new Date(this.getTime()));
};
DateTime3.prototype.getTime = function() {
return new Date(Date.UTC(this.year, this.month - 1, this.day, this.hour, this.minute, this.second, this.millisecond)).getTime();
};
DateTime3.prototype.getDay = function() {
return this.day;
};
DateTime3.prototype.getMonth = function() {
return this.month;
};
DateTime3.prototype.getYear = function() {
return this.year;
};
DateTime3.prototype.addYears = function(years) {
this.year += years;
};
DateTime3.prototype.addMonths = function(months2) {
this.month += months2;
if (this.month > 12) {
var yearDiv = Math.floor(this.month / 12);
var monthMod = Object(helpers[
"i"
/* pymod */
])(this.month, 12);
this.month = monthMod;
this.year += yearDiv;
if (this.month === 0) {
this.month = 12;
--this.year;
}
}
};
DateTime3.prototype.addWeekly = function(days, wkst) {
if (wkst > this.getWeekday()) {
this.day += -(this.getWeekday() + 1 + (6 - wkst)) + days * 7;
} else {
this.day += -(this.getWeekday() - wkst) + days * 7;
}
this.fixDay();
};
DateTime3.prototype.addDaily = function(days) {
this.day += days;
this.fixDay();
};
DateTime3.prototype.addHours = function(hours, filtered, byhour) {
var fixday = false;
if (filtered) {
this.hour += Math.floor((23 - this.hour) / hours) * hours;
}
while (true) {
this.hour += hours;
var _a = Object(helpers[
"a"
/* divmod */
])(this.hour, 24), dayDiv = _a.div, hourMod = _a.mod;
if (dayDiv) {
this.hour = hourMod;
this.addDaily(dayDiv);
fixday = true;
}
if (Object(helpers[
"b"
/* empty */
])(byhour) || Object(helpers[
"c"
/* includes */
])(byhour, this.hour))
break;
}
return fixday;
};
DateTime3.prototype.addMinutes = function(minutes, filtered, byhour, byminute) {
var fixday = false;
if (filtered) {
this.minute += Math.floor((1439 - (this.hour * 60 + this.minute)) / minutes) * minutes;
}
while (true) {
this.minute += minutes;
var _a = Object(helpers[
"a"
/* divmod */
])(this.minute, 60), hourDiv = _a.div, minuteMod = _a.mod;
if (hourDiv) {
this.minute = minuteMod;
fixday = this.addHours(hourDiv, false, byhour);
}
if ((Object(helpers[
"b"
/* empty */
])(byhour) || Object(helpers[
"c"
/* includes */
])(byhour, this.hour)) && (Object(helpers[
"b"
/* empty */
])(byminute) || Object(helpers[
"c"
/* includes */
])(byminute, this.minute))) {
break;
}
}
return fixday;
};
DateTime3.prototype.addSeconds = function(seconds, filtered, byhour, byminute, bysecond) {
var fixday = false;
if (filtered) {
this.second += Math.floor((86399 - (this.hour * 3600 + this.minute * 60 + this.second)) / seconds) * seconds;
}
while (true) {
this.second += seconds;
var _a = Object(helpers[
"a"
/* divmod */
])(this.second, 60), minuteDiv = _a.div, secondMod = _a.mod;
if (minuteDiv) {
this.second = secondMod;
fixday = this.addMinutes(minuteDiv, false, byhour, byminute);
}
if ((Object(helpers[
"b"
/* empty */
])(byhour) || Object(helpers[
"c"
/* includes */
])(byhour, this.hour)) && (Object(helpers[
"b"
/* empty */
])(byminute) || Object(helpers[
"c"
/* includes */
])(byminute, this.minute)) && (Object(helpers[
"b"
/* empty */
])(bysecond) || Object(helpers[
"c"
/* includes */
])(bysecond, this.second))) {
break;
}
}
return fixday;
};
DateTime3.prototype.fixDay = function() {
if (this.day <= 28) {
return;
}
var daysinmonth = dateutil.monthRange(this.year, this.month - 1)[1];
if (this.day <= daysinmonth) {
return;
}
while (this.day > daysinmonth) {
this.day -= daysinmonth;
++this.month;
if (this.month === 13) {
this.month = 1;
++this.year;
if (this.year > dateutil.MAXYEAR) {
return;
}
}
daysinmonth = dateutil.monthRange(this.year, this.month - 1)[1];
}
};
return DateTime3;
}(Time2)
);
dateutil.DateTime = DateTime2;
})(dateutil_dateutil || (dateutil_dateutil = {}));
var esm_dateutil = dateutil_dateutil;
var M365MASK = Object(helpers[
"k"
/* repeat */
])(1, 31).concat(Object(helpers[
"k"
/* repeat */
])(2, 28), Object(helpers[
"k"
/* repeat */
])(3, 31), Object(helpers[
"k"
/* repeat */
])(4, 30), Object(helpers[
"k"
/* repeat */
])(5, 31), Object(helpers[
"k"
/* repeat */
])(6, 30), Object(helpers[
"k"
/* repeat */
])(7, 31), Object(helpers[
"k"
/* repeat */
])(8, 31), Object(helpers[
"k"
/* repeat */
])(9, 30), Object(helpers[
"k"
/* repeat */
])(10, 31), Object(helpers[
"k"
/* repeat */
])(11, 30), Object(helpers[
"k"
/* repeat */
])(12, 31), Object(helpers[
"k"
/* repeat */
])(1, 7));
var M366MASK = Object(helpers[
"k"
/* repeat */
])(1, 31).concat(Object(helpers[
"k"
/* repeat */
])(2, 29), Object(helpers[
"k"
/* repeat */
])(3, 31), Object(helpers[
"k"
/* repeat */
])(4, 30), Object(helpers[
"k"
/* repeat */
])(5, 31), Object(helpers[
"k"
/* repeat */
])(6, 30), Object(helpers[
"k"
/* repeat */
])(7, 31), Object(helpers[
"k"
/* repeat */
])(8, 31), Object(helpers[
"k"
/* repeat */
])(9, 30), Object(helpers[
"k"
/* repeat */
])(10, 31), Object(helpers[
"k"
/* repeat */
])(11, 30), Object(helpers[
"k"
/* repeat */
])(12, 31), Object(helpers[
"k"
/* repeat */
])(1, 7));
var M28 = Object(helpers[
"j"
/* range */
])(1, 29);
var M29 = Object(helpers[
"j"
/* range */
])(1, 30);
var M30 = Object(helpers[
"j"
/* range */
])(1, 31);
var M31 = Object(helpers[
"j"
/* range */
])(1, 32);
var MDAY366MASK = M31.concat(M29, M31, M30, M31, M30, M31, M31, M30, M31, M30, M31, M31.slice(0, 7));
var MDAY365MASK = M31.concat(M28, M31, M30, M31, M30, M31, M31, M30, M31, M30, M31, M31.slice(0, 7));
var NM28 = Object(helpers[
"j"
/* range */
])(-28, 0);
var NM29 = Object(helpers[
"j"
/* range */
])(-29, 0);
var NM30 = Object(helpers[
"j"
/* range */
])(-30, 0);
var NM31 = Object(helpers[
"j"
/* range */
])(-31, 0);
var NMDAY366MASK = NM31.concat(NM29, NM31, NM30, NM31, NM30, NM31, NM31, NM30, NM31, NM30, NM31, NM31.slice(0, 7));
var NMDAY365MASK = NM31.concat(NM28, NM31, NM30, NM31, NM30, NM31, NM31, NM30, NM31, NM30, NM31, NM31.slice(0, 7));
var M366RANGE = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366];
var M365RANGE = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365];
var WDAYMASK = function() {
var wdaymask = [];
for (var i = 0; i < 55; i++)
wdaymask = wdaymask.concat(Object(helpers[
"j"
/* range */
])(7));
return wdaymask;
}();
var iterinfo_Iterinfo = (
/** @class */
function() {
function Iterinfo(rrule) {
this.yearlen = 365;
this.nextyearlen = 365;
this.rrule = rrule;
this.mmask = null;
this.mrange = null;
this.mdaymask = null;
this.nmdaymask = null;
this.wdaymask = null;
this.wnomask = null;
this.nwdaymask = null;
this.eastermask = null;
}
Iterinfo.prototype.easter = function(y, offset2) {
if (offset2 === void 0) {
offset2 = 0;
}
var a = y % 19;
var b = Math.floor(y / 100);
var c = y % 100;
var d = Math.floor(b / 4);
var e = b % 4;
var f = Math.floor((b + 8) / 25);
var g = Math.floor((b - f + 1) / 3);
var h = Math.floor(19 * a + b - d - g + 15) % 30;
var i = Math.floor(c / 4);
var k = c % 4;
var l2 = Math.floor(32 + 2 * e + 2 * i - h - k) % 7;
var m = Math.floor((a + 11 * h + 22 * l2) / 451);
var month = Math.floor((h + l2 - 7 * m + 114) / 31);
var day = (h + l2 - 7 * m + 114) % 31 + 1;
var date = Date.UTC(y, month - 1, day + offset2);
var yearStart = Date.UTC(y, 0, 1);
return [Math.ceil((date - yearStart) / (1e3 * 60 * 60 * 24))];
};
Iterinfo.prototype.rebuild = function(year, month) {
var rr = this.rrule;
if (year !== this.lastyear) {
this.rebuildYear(year);
}
if (Object(helpers[
"g"
/* notEmpty */
])(rr.options.bynweekday) && (month !== this.lastmonth || year !== this.lastyear)) {
this.rebuildMonth(year, month);
}
if (Object(helpers[
"f"
/* isPresent */
])(rr.options.byeaster)) {
this.eastermask = this.easter(year, rr.options.byeaster);
}
};
Iterinfo.prototype.rebuildYear = function(year) {
var rr = this.rrule;
this.yearlen = esm_dateutil.isLeapYear(year) ? 366 : 365;
this.nextyearlen = esm_dateutil.isLeapYear(year + 1) ? 366 : 365;
var firstyday = new Date(Date.UTC(year, 0, 1));
this.yearordinal = esm_dateutil.toOrdinal(firstyday);
this.yearweekday = esm_dateutil.getWeekday(firstyday);
var wday = esm_dateutil.getWeekday(firstyday);
if (this.yearlen === 365) {
this.mmask = M365MASK;
this.mdaymask = MDAY365MASK;
this.nmdaymask = NMDAY365MASK;
this.wdaymask = WDAYMASK.slice(wday);
this.mrange = M365RANGE;
} else {
this.mmask = M366MASK;
this.mdaymask = MDAY366MASK;
this.nmdaymask = NMDAY366MASK;
this.wdaymask = WDAYMASK.slice(wday);
this.mrange = M366RANGE;
}
if (Object(helpers[
"b"
/* empty */
])(rr.options.byweekno)) {
this.wnomask = null;
} else {
this.wnomask = Object(helpers[
"k"
/* repeat */
])(0, this.yearlen + 7);
var no1wkst = void 0;
var firstwkst = void 0;
var wyearlen = void 0;
no1wkst = firstwkst = Object(helpers[
"i"
/* pymod */
])(7 - this.yearweekday + rr.options.wkst, 7);
if (no1wkst >= 4) {
no1wkst = 0;
wyearlen = this.yearlen + Object(helpers[
"i"
/* pymod */
])(this.yearweekday - rr.options.wkst, 7);
} else {
wyearlen = this.yearlen - no1wkst;
}
var div = Math.floor(wyearlen / 7);
var mod = Object(helpers[
"i"
/* pymod */
])(wyearlen, 7);
var numweeks = Math.floor(div + mod / 4);
for (var j = 0; j < rr.options.byweekno.length; j++) {
var i = void 0;
var n2 = rr.options.byweekno[j];
if (n2 < 0) {
n2 += numweeks + 1;
}
if (!(n2 > 0 && n2 <= numweeks)) {
continue;
}
if (n2 > 1) {
i = no1wkst + (n2 - 1) * 7;
if (no1wkst !== firstwkst) {
i -= 7 - firstwkst;
}
} else {
i = no1wkst;
}
for (var k = 0; k < 7; k++) {
this.wnomask[i] = 1;
i++;
if (this.wdaymask[i] === rr.options.wkst)
break;
}
}
if (Object(helpers[
"c"
/* includes */
])(rr.options.byweekno, 1)) {
var i = no1wkst + numweeks * 7;
if (no1wkst !== firstwkst)
i -= 7 - firstwkst;
if (i < this.yearlen) {
for (var j = 0; j < 7; j++) {
this.wnomask[i] = 1;
i += 1;
if (this.wdaymask[i] === rr.options.wkst)
break;
}
}
}
if (no1wkst) {
var lnumweeks = void 0;
if (!Object(helpers[
"c"
/* includes */
])(rr.options.byweekno, -1)) {
var lyearweekday = esm_dateutil.getWeekday(new Date(Date.UTC(year - 1, 0, 1)));
var lno1wkst = Object(helpers[
"i"
/* pymod */
])(7 - lyearweekday.valueOf() + rr.options.wkst, 7);
var lyearlen = esm_dateutil.isLeapYear(year - 1) ? 366 : 365;
if (lno1wkst >= 4) {
lno1wkst = 0;
lnumweeks = Math.floor(52 + Object(helpers[
"i"
/* pymod */
])(lyearlen + Object(helpers[
"i"
/* pymod */
])(lyearweekday - rr.options.wkst, 7), 7) / 4);
} else {
lnumweeks = Math.floor(52 + Object(helpers[
"i"
/* pymod */
])(this.yearlen - no1wkst, 7) / 4);
}
} else {
lnumweeks = -1;
}
if (Object(helpers[
"c"
/* includes */
])(rr.options.byweekno, lnumweeks)) {
for (var i = 0; i < no1wkst; i++)
this.wnomask[i] = 1;
}
}
}
};
Iterinfo.prototype.rebuildMonth = function(year, month) {
var rr = this.rrule;
var ranges = [];
if (rr.options.freq === esm_rrule.YEARLY) {
if (Object(helpers[
"g"
/* notEmpty */
])(rr.options.bymonth)) {
for (var j = 0; j < rr.options.bymonth.length; j++) {
month = rr.options.bymonth[j];
ranges.push(this.mrange.slice(month - 1, month + 1));
}
} else {
ranges = [[0, this.yearlen]];
}
} else if (rr.options.freq === esm_rrule.MONTHLY) {
ranges = [this.mrange.slice(month - 1, month + 1)];
}
if (Object(helpers[
"g"
/* notEmpty */
])(ranges)) {
this.nwdaymask = Object(helpers[
"k"
/* repeat */
])(0, this.yearlen);
for (var j = 0; j < ranges.length; j++) {
var rang = ranges[j];
var first = rang[0];
var last = rang[1];
last -= 1;
for (var k = 0; k < rr.options.bynweekday.length; k++) {
var i = void 0;
var wday = rr.options.bynweekday[k][0];
var n2 = rr.options.bynweekday[k][1];
if (n2 < 0) {
i = last + (n2 + 1) * 7;
i -= Object(helpers[
"i"
/* pymod */
])(this.wdaymask[i] - wday, 7);
} else {
i = first + (n2 - 1) * 7;
i += Object(helpers[
"i"
/* pymod */
])(7 - this.wdaymask[i] + wday, 7);
}
if (first <= i && i <= last)
this.nwdaymask[i] = 1;
}
}
}
this.lastyear = year;
this.lastmonth = month;
};
Iterinfo.prototype.ydayset = function() {
return [Object(helpers[
"j"
/* range */
])(this.yearlen), 0, this.yearlen];
};
Iterinfo.prototype.mdayset = function(_18, month, __) {
var start = this.mrange[month - 1];
var end = this.mrange[month];
var set2 = Object(helpers[
"k"
/* repeat */
])(null, this.yearlen);
for (var i = start; i < end; i++)
set2[i] = i;
return [set2, start, end];
};
Iterinfo.prototype.wdayset = function(year, month, day) {
var set2 = Object(helpers[
"k"
/* repeat */
])(null, this.yearlen + 7);
var i = esm_dateutil.toOrdinal(new Date(Date.UTC(year, month - 1, day))) - this.yearordinal;
var start = i;
for (var j = 0; j < 7; j++) {
set2[i] = i;
++i;
if (this.wdaymask[i] === this.rrule.options.wkst)
break;
}
return [set2, start, i];
};
Iterinfo.prototype.ddayset = function(year, month, day) {
var set2 = Object(helpers[
"k"
/* repeat */
])(null, this.yearlen);
var i = esm_dateutil.toOrdinal(new Date(Date.UTC(year, month - 1, day))) - this.yearordinal;
set2[i] = i;
return [set2, i, i + 1];
};
Iterinfo.prototype.htimeset = function(hour, minute, second, millisecond) {
var set2 = [];
var rr = this.rrule;
for (var i = 0; i < rr.options.byminute.length; i++) {
minute = rr.options.byminute[i];
for (var j = 0; j < rr.options.bysecond.length; j++) {
second = rr.options.bysecond[j];
set2.push(new esm_dateutil.Time(hour, minute, second, millisecond));
}
}
esm_dateutil.sort(set2);
return set2;
};
Iterinfo.prototype.mtimeset = function(hour, minute, second, millisecond) {
var set2 = [];
var rr = this.rrule;
for (var j = 0; j < rr.options.bysecond.length; j++) {
second = rr.options.bysecond[j];
set2.push(new esm_dateutil.Time(hour, minute, second, millisecond));
}
esm_dateutil.sort(set2);
return set2;
};
Iterinfo.prototype.stimeset = function(hour, minute, second, millisecond) {
return [new esm_dateutil.Time(hour, minute, second, millisecond)];
};
return Iterinfo;
}()
);
var iterinfo = iterinfo_Iterinfo;
var IterResult = (
/** @class */
function() {
function IterResult2(method, args) {
this.minDate = null;
this.maxDate = null;
this._result = [];
this.total = 0;
this.method = method;
this.args = args;
if (method === "between") {
this.maxDate = args.inc ? args.before : new Date(args.before.getTime() - 1);
this.minDate = args.inc ? args.after : new Date(args.after.getTime() + 1);
} else if (method === "before") {
this.maxDate = args.inc ? args.dt : new Date(args.dt.getTime() - 1);
} else if (method === "after") {
this.minDate = args.inc ? args.dt : new Date(args.dt.getTime() + 1);
}
}
IterResult2.prototype.accept = function(date) {
++this.total;
var tooEarly = this.minDate && date < this.minDate;
var tooLate = this.maxDate && date > this.maxDate;
if (this.method === "between") {
if (tooEarly)
return true;
if (tooLate)
return false;
} else if (this.method === "before") {
if (tooLate)
return false;
} else if (this.method === "after") {
if (tooEarly)
return true;
this.add(date);
return false;
}
return this.add(date);
};
IterResult2.prototype.add = function(date) {
this._result.push(date);
return true;
};
IterResult2.prototype.getValue = function() {
var res = this._result;
switch (this.method) {
case "all":
case "between":
return res;
case "before":
case "after":
return res.length ? res[res.length - 1] : null;
}
};
IterResult2.prototype.clone = function() {
return new IterResult2(this.method, this.args);
};
return IterResult2;
}()
);
var iterresult = IterResult;
var callbackiterresult_extends = /* @__PURE__ */ function() {
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2)
if (b2.hasOwnProperty(p))
d2[p] = b2[p];
};
return extendStatics(d, b);
};
return function(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var CallbackIterResult = (
/** @class */
function(_super) {
callbackiterresult_extends(CallbackIterResult2, _super);
function CallbackIterResult2(method, args, iterator) {
var _this = _super.call(this, method, args) || this;
_this.iterator = iterator;
return _this;
}
CallbackIterResult2.prototype.add = function(date) {
if (this.iterator(date, this._result.length)) {
this._result.push(date);
return true;
}
return false;
};
return CallbackIterResult2;
}(iterresult)
);
var callbackiterresult = CallbackIterResult;
var Frequency;
(function(Frequency2) {
Frequency2[Frequency2["YEARLY"] = 0] = "YEARLY";
Frequency2[Frequency2["MONTHLY"] = 1] = "MONTHLY";
Frequency2[Frequency2["WEEKLY"] = 2] = "WEEKLY";
Frequency2[Frequency2["DAILY"] = 3] = "DAILY";
Frequency2[Frequency2["HOURLY"] = 4] = "HOURLY";
Frequency2[Frequency2["MINUTELY"] = 5] = "MINUTELY";
Frequency2[Frequency2["SECONDLY"] = 6] = "SECONDLY";
})(Frequency || (Frequency = {}));
var WDAYS = ["MO", "TU", "WE", "TH", "FR", "SA", "SU"];
var Weekday = (
/** @class */
function() {
function Weekday2(weekday, n2) {
if (n2 === 0)
throw new Error("Can't create weekday with n == 0");
this.weekday = weekday;
this.n = n2;
}
Weekday2.prototype.nth = function(n2) {
return this.n === n2 ? this : new Weekday2(this.weekday, n2);
};
Weekday2.prototype.equals = function(other) {
return this.weekday === other.weekday && this.n === other.n;
};
Weekday2.prototype.toString = function() {
var s2 = WDAYS[this.weekday];
if (this.n)
s2 = (this.n > 0 ? "+" : "") + String(this.n) + s2;
return s2;
};
Weekday2.prototype.getJsWeekday = function() {
return this.weekday === 6 ? 0 : this.weekday + 1;
};
return Weekday2;
}()
);
function initializeOptions(options) {
var invalid = [];
var keys = Object.keys(options);
var initializedOptions = {};
keys.forEach(function(key2) {
initializedOptions[key2] = options[key2];
if (!Object(helpers[
"c"
/* includes */
])(rrule_defaultKeys, key2))
invalid.push(key2);
});
if (invalid.length) {
throw new Error("Invalid options: " + invalid.join(", "));
}
return initializedOptions;
}
function parseOptions(options) {
var opts = initializeOptions(options);
var keys = Object.keys(options);
rrule_defaultKeys.forEach(function(key2) {
if (!Object(helpers[
"c"
/* includes */
])(keys, key2))
opts[key2] = DEFAULT_OPTIONS[key2];
});
if (Object(helpers[
"f"
/* isPresent */
])(opts.byeaster))
opts.freq = esm_rrule.YEARLY;
if (!(Object(helpers[
"f"
/* isPresent */
])(opts.freq) && esm_rrule.FREQUENCIES[opts.freq])) {
throw new Error("Invalid frequency: " + opts.freq);
}
if (!opts.dtstart)
opts.dtstart = new Date((/* @__PURE__ */ new Date()).setMilliseconds(0));
var millisecondModulo = opts.dtstart.getTime() % 1e3;
if (!Object(helpers[
"f"
/* isPresent */
])(opts.wkst)) {
opts.wkst = esm_rrule.MO.weekday;
} else if (Object(helpers[
"e"
/* isNumber */
])(opts.wkst)) {
} else {
opts.wkst = opts.wkst.weekday;
}
if (Object(helpers[
"f"
/* isPresent */
])(opts.bysetpos)) {
if (Object(helpers[
"e"
/* isNumber */
])(opts.bysetpos))
opts.bysetpos = [opts.bysetpos];
for (var i = 0; i < opts.bysetpos.length; i++) {
var v = opts.bysetpos[i];
if (v === 0 || !(v >= -366 && v <= 366)) {
throw new Error("bysetpos must be between 1 and 366, or between -366 and -1");
}
}
}
if (!(Boolean(opts.byweekno) || Object(helpers[
"g"
/* notEmpty */
])(opts.byweekno) || Object(helpers[
"g"
/* notEmpty */
])(opts.byyearday) || Boolean(opts.bymonthday) || Object(helpers[
"g"
/* notEmpty */
])(opts.bymonthday) || Object(helpers[
"f"
/* isPresent */
])(opts.byweekday) || Object(helpers[
"f"
/* isPresent */
])(opts.byeaster))) {
switch (opts.freq) {
case esm_rrule.YEARLY:
if (!opts.bymonth)
opts.bymonth = opts.dtstart.getUTCMonth() + 1;
opts.bymonthday = opts.dtstart.getUTCDate();
break;
case esm_rrule.MONTHLY:
opts.bymonthday = opts.dtstart.getUTCDate();
break;
case esm_rrule.WEEKLY:
opts.byweekday = [esm_dateutil.getWeekday(opts.dtstart)];
break;
}
}
if (Object(helpers[
"f"
/* isPresent */
])(opts.bymonth) && !Object(helpers[
"d"
/* isArray */
])(opts.bymonth)) {
opts.bymonth = [opts.bymonth];
}
if (Object(helpers[
"f"
/* isPresent */
])(opts.byyearday) && !Object(helpers[
"d"
/* isArray */
])(opts.byyearday) && Object(helpers[
"e"
/* isNumber */
])(opts.byyearday)) {
opts.byyearday = [opts.byyearday];
}
if (!Object(helpers[
"f"
/* isPresent */
])(opts.bymonthday)) {
opts.bymonthday = [];
opts.bynmonthday = [];
} else if (Object(helpers[
"d"
/* isArray */
])(opts.bymonthday)) {
var bymonthday = [];
var bynmonthday = [];
for (var i = 0; i < opts.bymonthday.length; i++) {
var v = opts.bymonthday[i];
if (v > 0) {
bymonthday.push(v);
} else if (v < 0) {
bynmonthday.push(v);
}
}
opts.bymonthday = bymonthday;
opts.bynmonthday = bynmonthday;
} else if (opts.bymonthday < 0) {
opts.bynmonthday = [opts.bymonthday];
opts.bymonthday = [];
} else {
opts.bynmonthday = [];
opts.bymonthday = [opts.bymonthday];
}
if (Object(helpers[
"f"
/* isPresent */
])(opts.byweekno) && !Object(helpers[
"d"
/* isArray */
])(opts.byweekno)) {
opts.byweekno = [opts.byweekno];
}
if (!Object(helpers[
"f"
/* isPresent */
])(opts.byweekday)) {
opts.bynweekday = null;
} else if (Object(helpers[
"e"
/* isNumber */
])(opts.byweekday)) {
opts.byweekday = [opts.byweekday];
opts.bynweekday = null;
} else if (opts.byweekday instanceof Weekday) {
if (!opts.byweekday.n || opts.freq > esm_rrule.MONTHLY) {
opts.byweekday = [opts.byweekday.weekday];
opts.bynweekday = null;
} else {
opts.bynweekday = [[opts.byweekday.weekday, opts.byweekday.n]];
opts.byweekday = null;
}
} else {
var byweekday = [];
var bynweekday = [];
for (var i = 0; i < opts.byweekday.length; i++) {
var wday = opts.byweekday[i];
if (Object(helpers[
"e"
/* isNumber */
])(wday)) {
byweekday.push(wday);
continue;
}
var wd = wday;
if (!wd.n || opts.freq > esm_rrule.MONTHLY) {
byweekday.push(wd.weekday);
} else {
bynweekday.push([wd.weekday, wd.n]);
}
}
opts.byweekday = Object(helpers[
"g"
/* notEmpty */
])(byweekday) ? byweekday : null;
opts.bynweekday = Object(helpers[
"g"
/* notEmpty */
])(bynweekday) ? bynweekday : null;
}
if (!Object(helpers[
"f"
/* isPresent */
])(opts.byhour)) {
opts.byhour = opts.freq < esm_rrule.HOURLY ? [opts.dtstart.getUTCHours()] : null;
} else if (Object(helpers[
"e"
/* isNumber */
])(opts.byhour)) {
opts.byhour = [opts.byhour];
}
if (!Object(helpers[
"f"
/* isPresent */
])(opts.byminute)) {
opts.byminute = opts.freq < esm_rrule.MINUTELY ? [opts.dtstart.getUTCMinutes()] : null;
} else if (Object(helpers[
"e"
/* isNumber */
])(opts.byminute)) {
opts.byminute = [opts.byminute];
}
if (!Object(helpers[
"f"
/* isPresent */
])(opts.bysecond)) {
opts.bysecond = opts.freq < esm_rrule.SECONDLY ? [opts.dtstart.getUTCSeconds()] : null;
} else if (Object(helpers[
"e"
/* isNumber */
])(opts.bysecond)) {
opts.bysecond = [opts.bysecond];
}
var timeset;
if (opts.freq >= esm_rrule.HOURLY) {
timeset = null;
} else {
timeset = [];
for (var i = 0; i < opts.byhour.length; i++) {
var hour = opts.byhour[i];
for (var j = 0; j < opts.byminute.length; j++) {
var minute = opts.byminute[j];
for (var k = 0; k < opts.bysecond.length; k++) {
var second = opts.bysecond[k];
timeset.push(new esm_dateutil.Time(hour, minute, second, millisecondModulo));
}
}
}
esm_dateutil.sort(timeset);
}
return { parsedOptions: opts, timeset };
}
function parseString(rfcString) {
rfcString = rfcString.replace(/^\s+|\s+$/, "");
if (!rfcString.length)
return null;
var options = {};
var dtstartWithZone = /^DTSTART;TZID=(.+?):([^;]+)$/.exec(rfcString);
if (dtstartWithZone) {
var _18 = dtstartWithZone[0], tzid = dtstartWithZone[1], dtstart = dtstartWithZone[2];
options.tzid = tzid;
options.dtstart = esm_dateutil.untilStringToDate(dtstart);
return options;
}
var attrs = rfcString.split(";");
for (var i = 0; i < attrs.length; i++) {
var attr = attrs[i].split("=");
var key2 = attr[0];
var value = attr[1];
switch (key2) {
case "FREQ":
options.freq = Frequency[value];
break;
case "WKST":
options.wkst = Days[value];
break;
case "COUNT":
case "INTERVAL":
case "BYSETPOS":
case "BYMONTH":
case "BYMONTHDAY":
case "BYYEARDAY":
case "BYWEEKNO":
case "BYHOUR":
case "BYMINUTE":
case "BYSECOND":
var num = void 0;
if (value.indexOf(",") !== -1) {
var values = value.split(",");
num = values.map(function(val) {
if (/^[+-]?\d+$/.test(val.toString())) {
return Number(val);
} else {
return val;
}
});
} else if (/^[+-]?\d+$/.test(value)) {
num = Number(value);
} else {
num = value;
}
var optionKey = key2.toLowerCase();
options[optionKey] = num;
break;
case "BYDAY":
var n2 = void 0;
var wday = void 0;
var day = void 0;
var days = value.split(",");
options.byweekday = [];
for (var j = 0; j < days.length; j++) {
day = days[j];
if (day.length === 2) {
wday = Days[day];
options.byweekday.push(wday);
} else {
var parts = day.match(/^([+-]?\d)([A-Z]{2})$/);
n2 = Number(parts[1]);
var wdaypart = parts[2];
wday = Days[wdaypart].weekday;
options.byweekday.push(new Weekday(wday, n2));
}
}
break;
case "DTSTART":
options.dtstart = esm_dateutil.untilStringToDate(value);
break;
case "UNTIL":
options.until = esm_dateutil.untilStringToDate(value);
break;
case "BYEASTER":
options.byeaster = Number(value);
break;
default:
throw new Error("Unknown RRULE property '" + key2 + "'");
}
}
return options;
}
function optionsToString(options) {
var pairs = [];
var keys = Object.keys(options);
var defaultKeys = Object.keys(DEFAULT_OPTIONS);
for (var i = 0; i < keys.length; i++) {
if (keys[i] === "tzid")
continue;
if (!Object(helpers[
"c"
/* includes */
])(defaultKeys, keys[i]))
continue;
var key2 = keys[i].toUpperCase();
var value = options[keys[i]];
var outValue = "";
if (!Object(helpers[
"f"
/* isPresent */
])(value) || Object(helpers[
"d"
/* isArray */
])(value) && !value.length)
continue;
switch (key2) {
case "FREQ":
outValue = esm_rrule.FREQUENCIES[options.freq];
break;
case "WKST":
if (Object(helpers[
"e"
/* isNumber */
])(value)) {
outValue = new Weekday(value).toString();
} else {
outValue = value.toString();
}
break;
case "BYWEEKDAY":
key2 = "BYDAY";
var arrayValue = Object(helpers[
"m"
/* toArray */
])(value);
outValue = Object(helpers[
"m"
/* toArray */
])(value).map(function(wday) {
if (wday instanceof Weekday) {
return wday;
} else if (Object(helpers[
"d"
/* isArray */
])(wday)) {
return new Weekday(wday[0], wday[1]);
} else {
return new Weekday(wday);
}
}).toString();
break;
case "DTSTART":
case "UNTIL":
outValue = esm_dateutil.timeToUntilString(value, !options.tzid);
if (options.tzid) {
outValue = ";TZID=" + options.tzid + ":" + outValue;
}
break;
default:
if (Object(helpers[
"d"
/* isArray */
])(value)) {
var strValues = [];
for (var j = 0; j < value.length; j++) {
strValues[j] = String(value[j]);
}
outValue = strValues.toString();
} else {
outValue = String(value);
}
}
pairs.push([key2, outValue]);
}
var strings = [];
for (var i = 0; i < pairs.length; i++) {
var _a = pairs[i], key2 = _a[0], value = _a[1];
if (value.indexOf(";") === 0) {
strings.push("" + key2 + value);
} else {
strings.push(key2 + "=" + value.toString());
}
}
return strings.join(";");
}
var cache_Cache = (
/** @class */
function() {
function Cache() {
this.all = false;
this.before = [];
this.after = [];
this.between = [];
}
Cache.prototype._cacheAdd = function(what, value, args) {
if (value) {
value = value instanceof Date ? esm_dateutil.clone(value) : esm_dateutil.cloneDates(value);
}
if (what === "all") {
this.all = value;
} else {
args._value = value;
this[what].push(args);
}
};
Cache.prototype._cacheGet = function(what, args) {
var cached = false;
var argsKeys = args ? Object.keys(args) : [];
var findCacheDiff = function(item2) {
for (var i2 = 0; i2 < argsKeys.length; i2++) {
var key2 = argsKeys[i2];
if (String(args[key2]) !== String(item2[key2])) {
return true;
}
}
return false;
};
var cachedObject = this[what];
if (what === "all") {
cached = this.all;
} else if (Object(helpers[
"d"
/* isArray */
])(cachedObject)) {
for (var i = 0; i < cachedObject.length; i++) {
var item = cachedObject[i];
if (argsKeys.length && findCacheDiff(item))
continue;
cached = item._value;
break;
}
}
if (!cached && this.all) {
var iterResult = new iterresult(what, args);
for (var i = 0; i < this.all.length; i++) {
if (!iterResult.accept(this.all[i]))
break;
}
cached = iterResult.getValue();
this._cacheAdd(what, cached, args);
}
return Object(helpers[
"d"
/* isArray */
])(cached) ? esm_dateutil.cloneDates(cached) : cached instanceof Date ? esm_dateutil.clone(cached) : cached;
};
return Cache;
}()
);
var external_luxon_ = __webpack_require__(2);
var getnlp = function() {
if (!getnlp._nlp) {
getnlp._nlp = __webpack_require__(3);
}
return getnlp._nlp;
};
var Days = {
MO: new Weekday(0),
TU: new Weekday(1),
WE: new Weekday(2),
TH: new Weekday(3),
FR: new Weekday(4),
SA: new Weekday(5),
SU: new Weekday(6)
};
var DEFAULT_OPTIONS = {
freq: Frequency.YEARLY,
dtstart: null,
interval: 1,
wkst: Days.MO,
count: null,
until: null,
tzid: null,
bysetpos: null,
bymonth: null,
bymonthday: null,
bynmonthday: null,
byyearday: null,
byweekno: null,
byweekday: null,
bynweekday: null,
byhour: null,
byminute: null,
bysecond: null,
byeaster: null
};
var rrule_defaultKeys = Object.keys(DEFAULT_OPTIONS);
var rrule_RRule = (
/** @class */
function() {
function RRule(options, noCache) {
if (options === void 0) {
options = {};
}
if (noCache === void 0) {
noCache = false;
}
this._string = null;
this._cache = noCache ? null : new cache_Cache();
this.origOptions = initializeOptions(options);
var _a = parseOptions(options), parsedOptions = _a.parsedOptions, timeset = _a.timeset;
this.options = parsedOptions;
this.timeset = timeset;
}
RRule.parseText = function(text, language) {
return getnlp().parseText(text, language);
};
RRule.fromText = function(text, language) {
return getnlp().fromText(text, language);
};
RRule.fromString = function(str) {
return new RRule(RRule.parseString(str) || void 0);
};
RRule.prototype._cacheGet = function(what, args) {
if (!this._cache)
return false;
return this._cache._cacheGet(what, args);
};
RRule.prototype._cacheAdd = function(what, value, args) {
if (!this._cache)
return;
return this._cache._cacheAdd(what, value, args);
};
RRule.prototype.all = function(iterator) {
if (iterator) {
return this._iter(new callbackiterresult("all", {}, iterator));
} else {
var result = this._cacheGet("all");
if (result === false) {
result = this._iter(new iterresult("all", {}));
this._cacheAdd("all", result);
}
return result;
}
};
RRule.prototype.between = function(after, before, inc, iterator) {
if (inc === void 0) {
inc = false;
}
var args = {
before,
after,
inc
};
if (iterator) {
return this._iter(new callbackiterresult("between", args, iterator));
}
var result = this._cacheGet("between", args);
if (result === false) {
result = this._iter(new iterresult("between", args));
this._cacheAdd("between", result, args);
}
return result;
};
RRule.prototype.before = function(dt, inc) {
if (inc === void 0) {
inc = false;
}
var args = { dt, inc };
var result = this._cacheGet("before", args);
if (result === false) {
result = this._iter(new iterresult("before", args));
this._cacheAdd("before", result, args);
}
return result;
};
RRule.prototype.after = function(dt, inc) {
if (inc === void 0) {
inc = false;
}
var args = { dt, inc };
var result = this._cacheGet("after", args);
if (result === false) {
result = this._iter(new iterresult("after", args));
this._cacheAdd("after", result, args);
}
return result;
};
RRule.prototype.count = function() {
return this.all().length;
};
RRule.prototype.toString = function() {
return optionsToString(this.origOptions);
};
RRule.prototype.toText = function(gettext, language) {
return getnlp().toText(this, gettext, language);
};
RRule.prototype.isFullyConvertibleToText = function() {
return getnlp().isFullyConvertible(this);
};
RRule.prototype.clone = function() {
return new RRule(this.origOptions);
};
RRule.prototype._iter = function(iterResult) {
var _a, _b;
var dtstart = this.options.dtstart;
var date = new esm_dateutil.DateTime(dtstart.getUTCFullYear(), dtstart.getUTCMonth() + 1, dtstart.getUTCDate(), dtstart.getUTCHours(), dtstart.getUTCMinutes(), dtstart.getUTCSeconds(), dtstart.valueOf() % 1e3);
var _c = this.options, freq = _c.freq, interval = _c.interval, wkst = _c.wkst, until = _c.until, bymonth = _c.bymonth, byweekno = _c.byweekno, byyearday = _c.byyearday, byweekday = _c.byweekday, byeaster = _c.byeaster, bymonthday = _c.bymonthday, bynmonthday = _c.bynmonthday, bysetpos = _c.bysetpos, byhour = _c.byhour, byminute = _c.byminute, bysecond = _c.bysecond;
var ii = new iterinfo(this);
ii.rebuild(date.year, date.month);
var getdayset = (_a = {}, _a[RRule.YEARLY] = ii.ydayset, _a[RRule.MONTHLY] = ii.mdayset, _a[RRule.WEEKLY] = ii.wdayset, _a[RRule.DAILY] = ii.ddayset, _a[RRule.HOURLY] = ii.ddayset, _a[RRule.MINUTELY] = ii.ddayset, _a[RRule.SECONDLY] = ii.ddayset, _a)[freq];
var timeset;
var gettimeset;
if (freq < RRule.HOURLY) {
timeset = this.timeset;
} else {
gettimeset = (_b = {}, _b[RRule.HOURLY] = ii.htimeset, _b[RRule.MINUTELY] = ii.mtimeset, _b[RRule.SECONDLY] = ii.stimeset, _b)[freq];
if (freq >= RRule.HOURLY && Object(helpers[
"g"
/* notEmpty */
])(byhour) && !Object(helpers[
"c"
/* includes */
])(byhour, date.hour) || freq >= RRule.MINUTELY && Object(helpers[
"g"
/* notEmpty */
])(byminute) && !Object(helpers[
"c"
/* includes */
])(byminute, date.minute) || freq >= RRule.SECONDLY && Object(helpers[
"g"
/* notEmpty */
])(bysecond) && !Object(helpers[
"c"
/* includes */
])(bysecond, date.second)) {
timeset = [];
} else {
timeset = gettimeset.call(ii, date.hour, date.minute, date.second, date.millisecond);
}
}
var currentDay;
var count = this.options.count;
var pos;
while (true) {
var _d = getdayset.call(ii, date.year, date.month, date.day), dayset = _d[0], start = _d[1], end = _d[2];
var filtered = false;
for (var dayCounter = start; dayCounter < end; dayCounter++) {
currentDay = dayset[dayCounter];
filtered = isFiltered(bymonth, ii, currentDay, byweekno, byweekday, byeaster, bymonthday, bynmonthday, byyearday);
if (filtered)
dayset[currentDay] = null;
}
if (Object(helpers[
"g"
/* notEmpty */
])(bysetpos) && Object(helpers[
"g"
/* notEmpty */
])(timeset)) {
var daypos = void 0;
var timepos = void 0;
var poslist = [];
for (var j = 0; j < bysetpos.length; j++) {
pos = bysetpos[j];
if (pos < 0) {
daypos = Math.floor(pos / timeset.length);
timepos = Object(helpers[
"i"
/* pymod */
])(pos, timeset.length);
} else {
daypos = Math.floor((pos - 1) / timeset.length);
timepos = Object(helpers[
"i"
/* pymod */
])(pos - 1, timeset.length);
}
var tmp = [];
for (var k = start; k < end; k++) {
var val = dayset[k];
if (!Object(helpers[
"f"
/* isPresent */
])(val))
continue;
tmp.push(val);
}
var i = void 0;
if (daypos < 0) {
i = tmp.slice(daypos)[0];
} else {
i = tmp[daypos];
}
var time = timeset[timepos];
var date_1 = esm_dateutil.fromOrdinal(ii.yearordinal + i);
var res = esm_dateutil.combine(date_1, time);
if (!Object(helpers[
"c"
/* includes */
])(poslist, res))
poslist.push(res);
}
esm_dateutil.sort(poslist);
for (var j = 0; j < poslist.length; j++) {
var res = poslist[j];
if (until && res > until) {
return this.emitResult(iterResult);
}
if (res >= dtstart) {
var rezonedDate = this.rezoneIfNeeded(res);
if (!iterResult.accept(rezonedDate)) {
return this.emitResult(iterResult);
}
if (count) {
--count;
if (!count) {
return this.emitResult(iterResult);
}
}
}
}
} else {
for (var j = start; j < end; j++) {
currentDay = dayset[j];
if (!Object(helpers[
"f"
/* isPresent */
])(currentDay)) {
continue;
}
var date_2 = esm_dateutil.fromOrdinal(ii.yearordinal + currentDay);
for (var k = 0; k < timeset.length; k++) {
var time = timeset[k];
var res = esm_dateutil.combine(date_2, time);
if (until && res > until) {
return this.emitResult(iterResult);
}
if (res >= dtstart) {
var rezonedDate = this.rezoneIfNeeded(res);
if (!iterResult.accept(rezonedDate)) {
return this.emitResult(iterResult);
}
if (count) {
--count;
if (!count) {
return this.emitResult(iterResult);
}
}
}
}
}
}
if (freq === RRule.YEARLY) {
date.addYears(interval);
} else if (freq === RRule.MONTHLY) {
date.addMonths(interval);
} else if (freq === RRule.WEEKLY) {
date.addWeekly(interval, wkst);
} else if (freq === RRule.DAILY) {
date.addDaily(interval);
} else if (freq === RRule.HOURLY) {
date.addHours(interval, filtered, byhour);
timeset = gettimeset.call(ii, date.hour, date.minute, date.second);
} else if (freq === RRule.MINUTELY) {
if (date.addMinutes(interval, filtered, byhour, byminute)) {
filtered = false;
}
timeset = gettimeset.call(ii, date.hour, date.minute, date.second);
} else if (freq === RRule.SECONDLY) {
if (date.addSeconds(interval, filtered, byhour, byminute, bysecond)) {
filtered = false;
}
timeset = gettimeset.call(ii, date.hour, date.minute, date.second);
}
if (date.year > esm_dateutil.MAXYEAR) {
return this.emitResult(iterResult);
}
ii.rebuild(date.year, date.month);
}
};
RRule.prototype.emitResult = function(iterResult) {
this._len = iterResult.total;
return iterResult.getValue();
};
RRule.prototype.rezoneIfNeeded = function(date) {
var tzid = this.options.tzid;
if (!tzid) {
return date;
}
try {
var datetime = external_luxon_["DateTime"].fromJSDate(date);
var rezoned = datetime.setZone(tzid, { keepLocalTime: true });
return rezoned.toJSDate();
} catch (e) {
if (e instanceof TypeError) {
console.error("Using TZID without Luxon available is unsupported. Returned times are in UTC, not the requested time zone");
}
return date;
}
};
RRule.FREQUENCIES = [
"YEARLY",
"MONTHLY",
"WEEKLY",
"DAILY",
"HOURLY",
"MINUTELY",
"SECONDLY"
];
RRule.YEARLY = Frequency.YEARLY;
RRule.MONTHLY = Frequency.MONTHLY;
RRule.WEEKLY = Frequency.WEEKLY;
RRule.DAILY = Frequency.DAILY;
RRule.HOURLY = Frequency.HOURLY;
RRule.MINUTELY = Frequency.MINUTELY;
RRule.SECONDLY = Frequency.SECONDLY;
RRule.MO = Days.MO;
RRule.TU = Days.TU;
RRule.WE = Days.WE;
RRule.TH = Days.TH;
RRule.FR = Days.FR;
RRule.SA = Days.SA;
RRule.SU = Days.SU;
RRule.parseString = parseString;
RRule.optionsToString = optionsToString;
return RRule;
}()
);
var esm_rrule = rrule_RRule;
function isFiltered(bymonth, ii, currentDay, byweekno, byweekday, byeaster, bymonthday, bynmonthday, byyearday) {
return Object(helpers[
"g"
/* notEmpty */
])(bymonth) && !Object(helpers[
"c"
/* includes */
])(bymonth, ii.mmask[currentDay]) || Object(helpers[
"g"
/* notEmpty */
])(byweekno) && !ii.wnomask[currentDay] || Object(helpers[
"g"
/* notEmpty */
])(byweekday) && !Object(helpers[
"c"
/* includes */
])(byweekday, ii.wdaymask[currentDay]) || Object(helpers[
"g"
/* notEmpty */
])(ii.nwdaymask) && !ii.nwdaymask[currentDay] || byeaster !== null && !Object(helpers[
"c"
/* includes */
])(ii.eastermask, currentDay) || (Object(helpers[
"g"
/* notEmpty */
])(bymonthday) || Object(helpers[
"g"
/* notEmpty */
])(bynmonthday)) && !Object(helpers[
"c"
/* includes */
])(bymonthday, ii.mdaymask[currentDay]) && !Object(helpers[
"c"
/* includes */
])(bynmonthday, ii.nmdaymask[currentDay]) || Object(helpers[
"g"
/* notEmpty */
])(byyearday) && (currentDay < ii.yearlen && !Object(helpers[
"c"
/* includes */
])(byyearday, currentDay + 1) && !Object(helpers[
"c"
/* includes */
])(byyearday, -ii.yearlen + currentDay) || currentDay >= ii.yearlen && !Object(helpers[
"c"
/* includes */
])(byyearday, currentDay + 1 - ii.yearlen) && !Object(helpers[
"c"
/* includes */
])(byyearday, -ii.nextyearlen + currentDay - ii.yearlen));
}
var rruleset_extends = /* @__PURE__ */ function() {
var extendStatics = function(d, b) {
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
d2.__proto__ = b2;
} || function(d2, b2) {
for (var p in b2)
if (b2.hasOwnProperty(p))
d2[p] = b2[p];
};
return extendStatics(d, b);
};
return function(d, b) {
extendStatics(d, b);
function __() {
this.constructor = d;
}
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
}();
var rruleset_RRuleSet = (
/** @class */
function(_super) {
rruleset_extends(RRuleSet, _super);
function RRuleSet(noCache) {
if (noCache === void 0) {
noCache = false;
}
var _this = _super.call(this, {}, noCache) || this;
_this._rrule = [];
_this._rdate = [];
_this._exrule = [];
_this._exdate = [];
return _this;
}
RRuleSet.prototype.rrule = function(rrule) {
if (!(rrule instanceof esm_rrule)) {
throw new TypeError(String(rrule) + " is not RRule instance");
}
if (!Object(helpers[
"c"
/* includes */
])(this._rrule.map(String), String(rrule))) {
this._rrule.push(rrule);
}
};
RRuleSet.prototype.rdate = function(date) {
if (!(date instanceof Date)) {
throw new TypeError(String(date) + " is not Date instance");
}
if (!Object(helpers[
"c"
/* includes */
])(this._rdate.map(Number), Number(date))) {
this._rdate.push(date);
esm_dateutil.sort(this._rdate);
}
};
RRuleSet.prototype.exrule = function(rrule) {
if (!(rrule instanceof esm_rrule)) {
throw new TypeError(String(rrule) + " is not RRule instance");
}
if (!Object(helpers[
"c"
/* includes */
])(this._exrule.map(String), String(rrule))) {
this._exrule.push(rrule);
}
};
RRuleSet.prototype.exdate = function(date) {
if (!(date instanceof Date)) {
throw new TypeError(String(date) + " is not Date instance");
}
if (!Object(helpers[
"c"
/* includes */
])(this._exdate.map(Number), Number(date))) {
this._exdate.push(date);
esm_dateutil.sort(this._exdate);
}
};
RRuleSet.prototype.valueOf = function() {
var result = [];
if (this._rrule.length) {
this._rrule.forEach(function(rrule) {
result.push("RRULE:" + rrule);
});
}
if (this._rdate.length) {
result.push("RDATE:" + this._rdate.map(function(rdate) {
return esm_dateutil.timeToUntilString(rdate.valueOf());
}).join(","));
}
if (this._exrule.length) {
this._exrule.forEach(function(exrule) {
result.push("EXRULE:" + exrule);
});
}
if (this._exdate.length) {
result.push("EXDATE:" + this._exdate.map(function(exdate) {
return esm_dateutil.timeToUntilString(exdate.valueOf());
}).join(","));
}
return result;
};
RRuleSet.prototype.toString = function() {
return JSON.stringify(this.valueOf());
};
RRuleSet.prototype._iter = function(iterResult) {
var _exdateHash = {};
var _exrule = this._exrule;
var _accept = iterResult.accept;
function evalExdate(after, before) {
_exrule.forEach(function(rrule) {
rrule.between(after, before, true).forEach(function(date) {
_exdateHash[Number(date)] = true;
});
});
}
this._exdate.forEach(function(date) {
_exdateHash[Number(date)] = true;
});
iterResult.accept = function(date) {
var dt = Number(date);
if (!_exdateHash[dt]) {
evalExdate(new Date(dt - 1), new Date(dt + 1));
if (!_exdateHash[dt]) {
_exdateHash[dt] = true;
return _accept.call(this, date);
}
}
return true;
};
if (iterResult.method === "between") {
evalExdate(iterResult.args.after, iterResult.args.before);
iterResult.accept = function(date) {
var dt = Number(date);
if (!_exdateHash[dt]) {
_exdateHash[dt] = true;
return _accept.call(this, date);
}
return true;
};
}
for (var i = 0; i < this._rdate.length; i++) {
if (!iterResult.accept(new Date(this._rdate[i].valueOf())))
break;
}
this._rrule.forEach(function(rrule) {
rrule._iter(iterResult);
});
var res = iterResult._result;
esm_dateutil.sort(res);
switch (iterResult.method) {
case "all":
case "between":
return res;
case "before":
return res.length && res[res.length - 1] || null;
case "after":
return res.length && res[0] || null;
default:
return null;
}
};
RRuleSet.prototype.clone = function() {
var rrs = new RRuleSet(!!this._cache);
var i;
for (i = 0; i < this._rrule.length; i++) {
rrs.rrule(this._rrule[i].clone());
}
for (i = 0; i < this._rdate.length; i++) {
rrs.rdate(new Date(this._rdate[i].valueOf()));
}
for (i = 0; i < this._exrule.length; i++) {
rrs.exrule(this._exrule[i].clone());
}
for (i = 0; i < this._exdate.length; i++) {
rrs.exdate(new Date(this._exdate[i].valueOf()));
}
return rrs;
};
return RRuleSet;
}(esm_rrule)
);
var rruleset = rruleset_RRuleSet;
var rrulestr_RRuleStr = (
/** @class */
function() {
function RRuleStr() {
this._handle_BYDAY = this._handle_BYWEEKDAY;
this._handle_INTERVAL = this._handle_int;
this._handle_COUNT = this._handle_int;
this._handle_BYSETPOS = this._handle_int_list;
this._handle_BYMONTH = this._handle_int_list;
this._handle_BYMONTHDAY = this._handle_int_list;
this._handle_BYYEARDAY = this._handle_int_list;
this._handle_BYEASTER = this._handle_int_list;
this._handle_BYWEEKNO = this._handle_int_list;
this._handle_BYHOUR = this._handle_int_list;
this._handle_BYMINUTE = this._handle_int_list;
this._handle_BYSECOND = this._handle_int_list;
}
RRuleStr.prototype._handle_DTSTART = function(rrkwargs, _18, value, __) {
var parms = /^DTSTART(?:;TZID=([^:=]+))?(?::|=)(.*)/.exec(value);
var ___ = parms[0], tzid = parms[1], dtstart = parms[2];
rrkwargs["dtstart"] = esm_dateutil.untilStringToDate(dtstart);
if (tzid) {
rrkwargs["tzid"] = tzid;
}
};
RRuleStr.prototype._handle_int = function(rrkwargs, name, value) {
rrkwargs[name.toLowerCase()] = parseInt(value, 10);
};
RRuleStr.prototype._handle_int_list = function(rrkwargs, name, value) {
rrkwargs[name.toLowerCase()] = value.split(",").map(function(x) {
return parseInt(x, 10);
});
};
RRuleStr.prototype._handle_FREQ = function(rrkwargs, _18, value, __) {
rrkwargs["freq"] = RRuleStr._freq_map[value];
};
RRuleStr.prototype._handle_UNTIL = function(rrkwargs, _18, value, __) {
try {
rrkwargs["until"] = esm_dateutil.untilStringToDate(value);
} catch (error) {
throw new Error("invalid until date");
}
};
RRuleStr.prototype._handle_WKST = function(rrkwargs, _18, value, __) {
rrkwargs["wkst"] = RRuleStr._weekday_map[value];
};
RRuleStr.prototype._handle_BYWEEKDAY = function(rrkwargs, _18, value, __) {
var splt;
var i;
var j;
var n2;
var w;
var wday;
var l2 = [];
var wdays = value.split(",");
for (i = 0; i < wdays.length; i++) {
wday = wdays[i];
if (wday.indexOf("(") > -1) {
splt = wday.split("(");
w = splt[0];
n2 = parseInt(splt.slice(1, -1)[0], 10);
} else {
for (j = 0; j < wday.length; j++) {
if ("+-0123456789".indexOf(wday[j]) === -1)
break;
}
n2 = wday.slice(0, j) || null;
w = wday.slice(j);
if (n2)
n2 = parseInt(n2, 10);
}
var weekday = new Weekday(RRuleStr._weekday_map[w], n2);
l2.push(weekday);
}
rrkwargs["byweekday"] = l2;
};
RRuleStr.prototype._parseRfcRRule = function(line, options) {
if (options === void 0) {
options = {};
}
options.dtstart = options.dtstart || null;
options.cache = options.cache || false;
var name;
var value;
var parts;
var nameRegex = /^([A-Z]+):(.*)$/;
var nameParts = nameRegex.exec(line);
if (nameParts && nameParts.length >= 3) {
name = nameParts[1];
value = nameParts[2];
if (name !== "RRULE")
throw new Error("unknown parameter name " + name);
} else {
value = line;
}
var rrkwargs = {};
var dtstart = /DTSTART(?:;TZID=[^:]+:)?[^;]+/.exec(line);
if (dtstart && dtstart.length > 0) {
var dtstartClause = dtstart[0];
this._handle_DTSTART(rrkwargs, "DTSTART", dtstartClause);
}
var pairs = value.split(";");
for (var i = 0; i < pairs.length; i++) {
parts = pairs[i].split("=");
name = parts[0].toUpperCase();
if (/DTSTART|TZID/.test(name)) {
continue;
}
value = parts[1].toUpperCase();
var paramHandler = this["_handle_" + name];
if (typeof paramHandler !== "function") {
throw new Error("unknown parameter '" + name + "':" + value);
}
paramHandler(rrkwargs, name, value);
}
rrkwargs.dtstart = rrkwargs.dtstart || options.dtstart;
rrkwargs.tzid = rrkwargs.tzid || options.tzid;
return new esm_rrule(rrkwargs, !options.cache);
};
RRuleStr.prototype._parseRfc = function(s2, options) {
if (options.compatible) {
options.forceset = true;
options.unfold = true;
}
s2 = s2 && s2.trim();
if (!s2)
throw new Error("Invalid empty string");
var i = 0;
var line;
var lines;
if (options.unfold) {
lines = s2.split("\n");
while (i < lines.length) {
line = lines[i] = lines[i].replace(/\s+$/g, "");
if (!line) {
lines.splice(i, 1);
} else if (i > 0 && line[0] === " ") {
lines[i - 1] += line.slice(1);
lines.splice(i, 1);
} else {
i += 1;
}
}
} else {
lines = s2.split(/\s/);
}
var rrulevals = [];
var rdatevals = [];
var exrulevals = [];
var exdatevals = [];
var name;
var value;
var parts;
var dtstart;
var tzid;
var rset;
var j;
var k;
var datestrs;
var datestr;
if (!options.forceset && lines.length === 1 && (s2.indexOf(":") === -1 || s2.indexOf("RRULE:") === 0)) {
return this._parseRfcRRule(lines[0], {
cache: options.cache,
dtstart: options.dtstart
});
} else {
for (var i_1 = 0; i_1 < lines.length; i_1++) {
line = lines[i_1];
if (!line)
continue;
if (line.indexOf(":") === -1) {
name = "RRULE";
value = line;
} else {
parts = Object(helpers[
"l"
/* split */
])(line, ":", 1);
name = parts[0];
value = parts[1];
}
var parms = name.split(";");
if (!parms)
throw new Error("empty property name");
name = parms[0].toUpperCase();
parms = parms.slice(1);
if (name === "RRULE") {
for (j = 0; j < parms.length; j++) {
var parm = parms[j];
throw new Error("unsupported RRULE parm: " + parm);
}
rrulevals.push(value);
} else if (name === "RDATE") {
for (j = 0; j < parms.length; j++) {
var parm = parms[j];
if (parm !== "VALUE=DATE-TIME" && parm !== "VALUE=DATE") {
throw new Error("unsupported RDATE parm: " + parm);
}
}
rdatevals.push(value);
} else if (name === "EXRULE") {
for (j = 0; j < parms.length; j++) {
var parm = parms[j];
throw new Error("unsupported EXRULE parm: " + parm);
}
exrulevals.push(value);
} else if (name === "EXDATE") {
for (j = 0; j < parms.length; j++) {
var parm = parms[j];
if (parm !== "VALUE=DATE-TIME" && parm !== "VALUE=DATE") {
throw new Error("unsupported EXDATE parm: " + parm);
}
}
exdatevals.push(value);
} else if (name === "DTSTART") {
dtstart = esm_dateutil.untilStringToDate(value);
if (parms.length) {
var _a = parms[0].split("="), key2 = _a[0], value_1 = _a[1];
if (key2 === "TZID") {
tzid = value_1;
}
}
} else {
throw new Error("unsupported property: " + name);
}
}
if (options.forceset || rrulevals.length > 1 || rdatevals.length || exrulevals.length || exdatevals.length) {
rset = new rruleset(!options.cache);
for (j = 0; j < rrulevals.length; j++) {
rset.rrule(this._parseRfcRRule(rrulevals[j], {
// @ts-ignore
dtstart: options.dtstart || dtstart
}));
}
for (j = 0; j < rdatevals.length; j++) {
datestrs = rdatevals[j].split(",");
for (k = 0; k < datestrs.length; k++) {
datestr = datestrs[k];
rset.rdate(esm_dateutil.untilStringToDate(datestr));
}
}
for (j = 0; j < exrulevals.length; j++) {
rset.exrule(this._parseRfcRRule(exrulevals[j], {
// @ts-ignore
dtstart: options.dtstart || dtstart
}));
}
for (j = 0; j < exdatevals.length; j++) {
datestrs = exdatevals[j].split(",");
for (k = 0; k < datestrs.length; k++) {
datestr = datestrs[k];
rset.exdate(esm_dateutil.untilStringToDate(datestr));
}
}
if (options.compatible && options.dtstart)
rset.rdate(dtstart);
return rset;
} else {
return this._parseRfcRRule(rrulevals[0], {
// @ts-ignore
dtstart: options.dtstart || dtstart,
cache: options.cache,
// @ts-ignore
tzid: options.tzid || tzid
});
}
}
};
RRuleStr.prototype.parse = function(s2, options) {
if (options === void 0) {
options = {};
}
var invalid = [];
var keys = Object.keys(options);
var defaultKeys = Object.keys(RRuleStr.DEFAULT_OPTIONS);
keys.forEach(function(key2) {
if (!Object(helpers[
"c"
/* includes */
])(defaultKeys, key2))
invalid.push(key2);
}, this);
if (invalid.length) {
throw new Error("Invalid options: " + invalid.join(", "));
}
defaultKeys.forEach(function(key2) {
if (!Object(helpers[
"c"
/* includes */
])(keys, key2))
options[key2] = RRuleStr.DEFAULT_OPTIONS[key2];
});
return this._parseRfc(s2, options);
};
RRuleStr._weekday_map = {
MO: 0,
TU: 1,
WE: 2,
TH: 3,
FR: 4,
SA: 5,
SU: 6
};
RRuleStr._freq_map = {
YEARLY: esm_rrule.YEARLY,
MONTHLY: esm_rrule.MONTHLY,
WEEKLY: esm_rrule.WEEKLY,
DAILY: esm_rrule.DAILY,
HOURLY: esm_rrule.HOURLY,
MINUTELY: esm_rrule.MINUTELY,
SECONDLY: esm_rrule.SECONDLY
};
RRuleStr.DEFAULT_OPTIONS = {
dtstart: null,
cache: false,
unfold: false,
forceset: false,
compatible: false,
tzid: null
};
return RRuleStr;
}()
);
var rrulestr = rrulestr_RRuleStr;
__webpack_require__.d(__webpack_exports__, "rrulestr", function() {
return esm_rrulestr;
});
__webpack_require__.d(__webpack_exports__, "Frequency", function() {
return Frequency;
});
__webpack_require__.d(__webpack_exports__, "Weekday", function() {
return Weekday;
});
__webpack_require__.d(__webpack_exports__, "RRule", function() {
return esm_rrule;
});
__webpack_require__.d(__webpack_exports__, "RRuleSet", function() {
return rruleset;
});
var rruleStr = new rrulestr();
var esm_rrulestr = function() {
return rruleStr.parse.apply(rruleStr, arguments);
};
var esm = __webpack_exports__["default"] = esm_rrule;
},
/* 2 */
/***/
function(module3, exports2) {
module3.exports = __WEBPACK_EXTERNAL_MODULE__2__;
},
/* 3 */
/***/
function(module3, __webpack_exports__, __webpack_require__) {
"use strict";
__webpack_require__.r(__webpack_exports__);
var ENGLISH = {
dayNames: [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
monthNames: [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
tokens: {
"SKIP": /^[ \r\n\t]+|^\.$/,
"number": /^[1-9][0-9]*/,
"numberAsText": /^(one|two|three)/i,
"every": /^every/i,
"day(s)": /^days?/i,
"weekday(s)": /^weekdays?/i,
"week(s)": /^weeks?/i,
"hour(s)": /^hours?/i,
"minute(s)": /^minutes?/i,
"month(s)": /^months?/i,
"year(s)": /^years?/i,
"on": /^(on|in)/i,
"at": /^(at)/i,
"the": /^the/i,
"first": /^first/i,
"second": /^second/i,
"third": /^third/i,
"nth": /^([1-9][0-9]*)(\.|th|nd|rd|st)/i,
"last": /^last/i,
"for": /^for/i,
"time(s)": /^times?/i,
"until": /^(un)?til/i,
"monday": /^mo(n(day)?)?/i,
"tuesday": /^tu(e(s(day)?)?)?/i,
"wednesday": /^we(d(n(esday)?)?)?/i,
"thursday": /^th(u(r(sday)?)?)?/i,
"friday": /^fr(i(day)?)?/i,
"saturday": /^sa(t(urday)?)?/i,
"sunday": /^su(n(day)?)?/i,
"january": /^jan(uary)?/i,
"february": /^feb(ruary)?/i,
"march": /^mar(ch)?/i,
"april": /^apr(il)?/i,
"may": /^may/i,
"june": /^june?/i,
"july": /^july?/i,
"august": /^aug(ust)?/i,
"september": /^sep(t(ember)?)?/i,
"october": /^oct(ober)?/i,
"november": /^nov(ember)?/i,
"december": /^dec(ember)?/i,
"comma": /^(,\s*|(and|or)\s*)+/i
}
};
var i18n = ENGLISH;
var esm = __webpack_require__(1);
var helpers = __webpack_require__(0);
var contains = function(arr, val) {
return arr.indexOf(val) !== -1;
};
var defaultGetText = function(id) {
return id.toString();
};
var totext_ToText = (
/** @class */
function() {
function ToText(rrule, gettext, language) {
if (gettext === void 0) {
gettext = defaultGetText;
}
if (language === void 0) {
language = i18n;
}
this.text = [];
this.language = language || i18n;
this.gettext = gettext;
this.rrule = rrule;
this.options = rrule.options;
this.origOptions = rrule.origOptions;
if (this.origOptions.bymonthday) {
var bymonthday = [].concat(this.options.bymonthday);
var bynmonthday = [].concat(this.options.bynmonthday);
bymonthday.sort(function(a, b) {
return a - b;
});
bynmonthday.sort(function(a, b) {
return b - a;
});
this.bymonthday = bymonthday.concat(bynmonthday);
if (!this.bymonthday.length)
this.bymonthday = null;
}
if (Object(helpers[
"f"
/* isPresent */
])(this.origOptions.byweekday)) {
var byweekday = !Object(helpers[
"d"
/* isArray */
])(this.origOptions.byweekday) ? [this.origOptions.byweekday] : this.origOptions.byweekday;
var days = String(byweekday);
this.byweekday = {
allWeeks: byweekday.filter(function(weekday) {
return !weekday.n;
}),
someWeeks: byweekday.filter(function(weekday) {
return Boolean(weekday.n);
}),
isWeekdays: days.indexOf("MO") !== -1 && days.indexOf("TU") !== -1 && days.indexOf("WE") !== -1 && days.indexOf("TH") !== -1 && days.indexOf("FR") !== -1 && days.indexOf("SA") === -1 && days.indexOf("SU") === -1,
isEveryDay: days.indexOf("MO") !== -1 && days.indexOf("TU") !== -1 && days.indexOf("WE") !== -1 && days.indexOf("TH") !== -1 && days.indexOf("FR") !== -1 && days.indexOf("SA") !== -1 && days.indexOf("SU") !== -1
};
var sortWeekDays = function(a, b) {
return a.weekday - b.weekday;
};
this.byweekday.allWeeks.sort(sortWeekDays);
this.byweekday.someWeeks.sort(sortWeekDays);
if (!this.byweekday.allWeeks.length)
this.byweekday.allWeeks = null;
if (!this.byweekday.someWeeks.length)
this.byweekday.someWeeks = null;
} else {
this.byweekday = null;
}
}
ToText.isFullyConvertible = function(rrule) {
var canConvert = true;
if (!(rrule.options.freq in ToText.IMPLEMENTED))
return false;
if (rrule.origOptions.until && rrule.origOptions.count)
return false;
for (var key2 in rrule.origOptions) {
if (contains(["dtstart", "wkst", "freq"], key2))
return true;
if (!contains(ToText.IMPLEMENTED[rrule.options.freq], key2))
return false;
}
return canConvert;
};
ToText.prototype.isFullyConvertible = function() {
return ToText.isFullyConvertible(this.rrule);
};
ToText.prototype.toString = function() {
var gettext = this.gettext;
if (!(this.options.freq in ToText.IMPLEMENTED)) {
return gettext("RRule error: Unable to fully convert this rrule to text");
}
this.text = [gettext("every")];
this[esm["default"].FREQUENCIES[this.options.freq]]();
if (this.options.until) {
this.add(gettext("until"));
var until = this.options.until;
this.add(this.language.monthNames[until.getUTCMonth()]).add(until.getUTCDate() + ",").add(until.getUTCFullYear().toString());
} else if (this.options.count) {
this.add(gettext("for")).add(this.options.count.toString()).add(this.plural(this.options.count) ? gettext("times") : gettext("time"));
}
if (!this.isFullyConvertible())
this.add(gettext("(~ approximate)"));
return this.text.join("");
};
ToText.prototype.HOURLY = function() {
var gettext = this.gettext;
if (this.options.interval !== 1)
this.add(this.options.interval.toString());
this.add(this.plural(this.options.interval) ? gettext("hours") : gettext("hour"));
};
ToText.prototype.MINUTELY = function() {
var gettext = this.gettext;
if (this.options.interval !== 1)
this.add(this.options.interval.toString());
this.add(this.plural(this.options.interval) ? gettext("minutes") : gettext("minutes"));
};
ToText.prototype.DAILY = function() {
var gettext = this.gettext;
if (this.options.interval !== 1)
this.add(this.options.interval.toString());
if (this.byweekday && this.byweekday.isWeekdays) {
this.add(this.plural(this.options.interval) ? gettext("weekdays") : gettext("weekday"));
} else {
this.add(this.plural(this.options.interval) ? gettext("days") : gettext("day"));
}
if (this.origOptions.bymonth) {
this.add(gettext("in"));
this._bymonth();
}
if (this.bymonthday) {
this._bymonthday();
} else if (this.byweekday) {
this._byweekday();
} else if (this.origOptions.byhour) {
this._byhour();
}
};
ToText.prototype.WEEKLY = function() {
var gettext = this.gettext;
if (this.options.interval !== 1) {
this.add(this.options.interval.toString()).add(this.plural(this.options.interval) ? gettext("weeks") : gettext("week"));
}
if (this.byweekday && this.byweekday.isWeekdays) {
if (this.options.interval === 1) {
this.add(this.plural(this.options.interval) ? gettext("weekdays") : gettext("weekday"));
} else {
this.add(gettext("on")).add(gettext("weekdays"));
}
} else if (this.byweekday && this.byweekday.isEveryDay) {
this.add(this.plural(this.options.interval) ? gettext("days") : gettext("day"));
} else {
if (this.options.interval === 1)
this.add(gettext("week"));
if (this.origOptions.bymonth) {
this.add(gettext("in"));
this._bymonth();
}
if (this.bymonthday) {
this._bymonthday();
} else if (this.byweekday) {
this._byweekday();
}
}
};
ToText.prototype.MONTHLY = function() {
var gettext = this.gettext;
if (this.origOptions.bymonth) {
if (this.options.interval !== 1) {
this.add(this.options.interval.toString()).add(gettext("months"));
if (this.plural(this.options.interval))
this.add(gettext("in"));
} else {
}
this._bymonth();
} else {
if (this.options.interval !== 1)
this.add(this.options.interval.toString());
this.add(this.plural(this.options.interval) ? gettext("months") : gettext("month"));
}
if (this.bymonthday) {
this._bymonthday();
} else if (this.byweekday && this.byweekday.isWeekdays) {
this.add(gettext("on")).add(gettext("weekdays"));
} else if (this.byweekday) {
this._byweekday();
}
};
ToText.prototype.YEARLY = function() {
var gettext = this.gettext;
if (this.origOptions.bymonth) {
if (this.options.interval !== 1) {
this.add(this.options.interval.toString());
this.add(gettext("years"));
} else {
}
this._bymonth();
} else {
if (this.options.interval !== 1)
this.add(this.options.interval.toString());
this.add(this.plural(this.options.interval) ? gettext("years") : gettext("year"));
}
if (this.bymonthday) {
this._bymonthday();
} else if (this.byweekday) {
this._byweekday();
}
if (this.options.byyearday) {
this.add(gettext("on the")).add(this.list(this.options.byyearday, this.nth, gettext("and"))).add(gettext("day"));
}
if (this.options.byweekno) {
this.add(gettext("in")).add(this.plural(this.options.byweekno.length) ? gettext("weeks") : gettext("week")).add(this.list(this.options.byweekno, void 0, gettext("and")));
}
};
ToText.prototype._bymonthday = function() {
var gettext = this.gettext;
if (this.byweekday && this.byweekday.allWeeks) {
this.add(gettext("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext, gettext("or"))).add(gettext("the")).add(this.list(this.bymonthday, this.nth, gettext("or")));
} else {
this.add(gettext("on the")).add(this.list(this.bymonthday, this.nth, gettext("and")));
}
};
ToText.prototype._byweekday = function() {
var gettext = this.gettext;
if (this.byweekday.allWeeks && !this.byweekday.isWeekdays) {
this.add(gettext("on")).add(this.list(this.byweekday.allWeeks, this.weekdaytext));
}
if (this.byweekday.someWeeks) {
if (this.byweekday.allWeeks)
this.add(gettext("and"));
this.add(gettext("on the")).add(this.list(this.byweekday.someWeeks, this.weekdaytext, gettext("and")));
}
};
ToText.prototype._byhour = function() {
var gettext = this.gettext;
this.add(gettext("at")).add(this.list(this.origOptions.byhour, void 0, gettext("and")));
};
ToText.prototype._bymonth = function() {
this.add(this.list(this.options.bymonth, this.monthtext, this.gettext("and")));
};
ToText.prototype.nth = function(n2) {
n2 = parseInt(n2.toString(), 10);
var nth;
var npos;
var gettext = this.gettext;
if (n2 === -1)
return gettext("last");
npos = Math.abs(n2);
switch (npos) {
case 1:
case 21:
case 31:
nth = npos + gettext("st");
break;
case 2:
case 22:
nth = npos + gettext("nd");
break;
case 3:
case 23:
nth = npos + gettext("rd");
break;
default:
nth = npos + gettext("th");
}
return n2 < 0 ? nth + " " + gettext("last") : nth;
};
ToText.prototype.monthtext = function(m) {
return this.language.monthNames[m - 1];
};
ToText.prototype.weekdaytext = function(wday) {
var weekday = Object(helpers[
"e"
/* isNumber */
])(wday) ? (wday + 1) % 7 : wday.getJsWeekday();
return (wday.n ? this.nth(wday.n) + " " : "") + this.language.dayNames[weekday];
};
ToText.prototype.plural = function(n2) {
return n2 % 100 !== 1;
};
ToText.prototype.add = function(s2) {
this.text.push(" ");
this.text.push(s2);
return this;
};
ToText.prototype.list = function(arr, callback, finalDelim, delim) {
if (delim === void 0) {
delim = ",";
}
if (!Object(helpers[
"d"
/* isArray */
])(arr)) {
arr = [arr];
}
var delimJoin = function(array, delimiter, finalDelimiter) {
var list = "";
for (var i = 0; i < array.length; i++) {
if (i !== 0) {
if (i === array.length - 1) {
list += " " + finalDelimiter + " ";
} else {
list += delimiter + " ";
}
}
list += array[i];
}
return list;
};
callback = callback || function(o) {
return o.toString();
};
var self2 = this;
var realCallback = function(arg) {
return callback && callback.call(self2, arg);
};
if (finalDelim) {
return delimJoin(arr.map(realCallback), delim, finalDelim);
} else {
return arr.map(realCallback).join(delim + " ");
}
};
return ToText;
}()
);
var totext = totext_ToText;
var Parser = (
/** @class */
function() {
function Parser2(rules) {
this.done = true;
this.rules = rules;
}
Parser2.prototype.start = function(text) {
this.text = text;
this.done = false;
return this.nextSymbol();
};
Parser2.prototype.isDone = function() {
return this.done && this.symbol === null;
};
Parser2.prototype.nextSymbol = function() {
var best;
var bestSymbol;
var p = this;
this.symbol = null;
this.value = null;
do {
if (this.done)
return false;
var rule = void 0;
best = null;
for (var name_1 in this.rules) {
rule = this.rules[name_1];
var match2 = rule.exec(p.text);
if (match2) {
if (best === null || match2[0].length > best[0].length) {
best = match2;
bestSymbol = name_1;
}
}
}
if (best != null) {
this.text = this.text.substr(best[0].length);
if (this.text === "")
this.done = true;
}
if (best == null) {
this.done = true;
this.symbol = null;
this.value = null;
return;
}
} while (bestSymbol === "SKIP");
this.symbol = bestSymbol;
this.value = best;
return true;
};
Parser2.prototype.accept = function(name) {
if (this.symbol === name) {
if (this.value) {
var v = this.value;
this.nextSymbol();
return v;
}
this.nextSymbol();
return true;
}
return false;
};
Parser2.prototype.acceptNumber = function() {
return this.accept("number");
};
Parser2.prototype.expect = function(name) {
if (this.accept(name))
return true;
throw new Error("expected " + name + " but found " + this.symbol);
};
return Parser2;
}()
);
function parseText(text, language) {
if (language === void 0) {
language = i18n;
}
var options = {};
var ttr = new Parser(language.tokens);
if (!ttr.start(text))
return null;
S();
return options;
function S() {
ttr.expect("every");
var n2 = ttr.acceptNumber();
if (n2)
options.interval = parseInt(n2[0], 10);
if (ttr.isDone())
throw new Error("Unexpected end");
switch (ttr.symbol) {
case "day(s)":
options.freq = esm["default"].DAILY;
if (ttr.nextSymbol()) {
AT();
F();
}
break;
case "weekday(s)":
options.freq = esm["default"].WEEKLY;
options.byweekday = [
esm["default"].MO,
esm["default"].TU,
esm["default"].WE,
esm["default"].TH,
esm["default"].FR
];
ttr.nextSymbol();
F();
break;
case "week(s)":
options.freq = esm["default"].WEEKLY;
if (ttr.nextSymbol()) {
ON();
F();
}
break;
case "hour(s)":
options.freq = esm["default"].HOURLY;
if (ttr.nextSymbol()) {
ON();
F();
}
break;
case "minute(s)":
options.freq = esm["default"].MINUTELY;
if (ttr.nextSymbol()) {
ON();
F();
}
break;
case "month(s)":
options.freq = esm["default"].MONTHLY;
if (ttr.nextSymbol()) {
ON();
F();
}
break;
case "year(s)":
options.freq = esm["default"].YEARLY;
if (ttr.nextSymbol()) {
ON();
F();
}
break;
case "monday":
case "tuesday":
case "wednesday":
case "thursday":
case "friday":
case "saturday":
case "sunday":
options.freq = esm["default"].WEEKLY;
var key2 = ttr.symbol.substr(0, 2).toUpperCase();
options.byweekday = [esm["default"][key2]];
if (!ttr.nextSymbol())
return;
while (ttr.accept("comma")) {
if (ttr.isDone())
throw new Error("Unexpected end");
var wkd = decodeWKD();
if (!wkd) {
throw new Error("Unexpected symbol " + ttr.symbol + ", expected weekday");
}
options.byweekday.push(esm["default"][wkd]);
ttr.nextSymbol();
}
MDAYs();
F();
break;
case "january":
case "february":
case "march":
case "april":
case "may":
case "june":
case "july":
case "august":
case "september":
case "october":
case "november":
case "december":
options.freq = esm["default"].YEARLY;
options.bymonth = [decodeM()];
if (!ttr.nextSymbol())
return;
while (ttr.accept("comma")) {
if (ttr.isDone())
throw new Error("Unexpected end");
var m = decodeM();
if (!m) {
throw new Error("Unexpected symbol " + ttr.symbol + ", expected month");
}
options.bymonth.push(m);
ttr.nextSymbol();
}
ON();
F();
break;
default:
throw new Error("Unknown symbol");
}
}
function ON() {
var on = ttr.accept("on");
var the = ttr.accept("the");
if (!(on || the))
return;
do {
var nth = decodeNTH();
var wkd = decodeWKD();
var m = decodeM();
if (nth) {
if (wkd) {
ttr.nextSymbol();
if (!options.byweekday)
options.byweekday = [];
options.byweekday.push(esm["default"][wkd].nth(nth));
} else {
if (!options.bymonthday)
options.bymonthday = [];
options.bymonthday.push(nth);
ttr.accept("day(s)");
}
} else if (wkd) {
ttr.nextSymbol();
if (!options.byweekday)
options.byweekday = [];
options.byweekday.push(esm["default"][wkd]);
} else if (ttr.symbol === "weekday(s)") {
ttr.nextSymbol();
if (!options.byweekday) {
options.byweekday = [
esm["default"].MO,
esm["default"].TU,
esm["default"].WE,
esm["default"].TH,
esm["default"].FR
];
}
} else if (ttr.symbol === "week(s)") {
ttr.nextSymbol();
var n2 = ttr.acceptNumber();
if (!n2) {
throw new Error("Unexpected symbol " + ttr.symbol + ", expected week number");
}
options.byweekno = [parseInt(n2[0], 10)];
while (ttr.accept("comma")) {
n2 = ttr.acceptNumber();
if (!n2) {
throw new Error("Unexpected symbol " + ttr.symbol + "; expected monthday");
}
options.byweekno.push(parseInt(n2[0], 10));
}
} else if (m) {
ttr.nextSymbol();
if (!options.bymonth)
options.bymonth = [];
options.bymonth.push(m);
} else {
return;
}
} while (ttr.accept("comma") || ttr.accept("the") || ttr.accept("on"));
}
function AT() {
var at = ttr.accept("at");
if (!at)
return;
do {
var n2 = ttr.acceptNumber();
if (!n2) {
throw new Error("Unexpected symbol " + ttr.symbol + ", expected hour");
}
options.byhour = [parseInt(n2[0], 10)];
while (ttr.accept("comma")) {
n2 = ttr.acceptNumber();
if (!n2) {
throw new Error("Unexpected symbol " + ttr.symbol + "; expected hour");
}
options.byhour.push(parseInt(n2[0], 10));
}
} while (ttr.accept("comma") || ttr.accept("at"));
}
function decodeM() {
switch (ttr.symbol) {
case "january":
return 1;
case "february":
return 2;
case "march":
return 3;
case "april":
return 4;
case "may":
return 5;
case "june":
return 6;
case "july":
return 7;
case "august":
return 8;
case "september":
return 9;
case "october":
return 10;
case "november":
return 11;
case "december":
return 12;
default:
return false;
}
}
function decodeWKD() {
switch (ttr.symbol) {
case "monday":
case "tuesday":
case "wednesday":
case "thursday":
case "friday":
case "saturday":
case "sunday":
return ttr.symbol.substr(0, 2).toUpperCase();
default:
return false;
}
}
function decodeNTH() {
switch (ttr.symbol) {
case "last":
ttr.nextSymbol();
return -1;
case "first":
ttr.nextSymbol();
return 1;
case "second":
ttr.nextSymbol();
return ttr.accept("last") ? -2 : 2;
case "third":
ttr.nextSymbol();
return ttr.accept("last") ? -3 : 3;
case "nth":
var v = parseInt(ttr.value[1], 10);
if (v < -366 || v > 366)
throw new Error("Nth out of range: " + v);
ttr.nextSymbol();
return ttr.accept("last") ? -v : v;
default:
return false;
}
}
function MDAYs() {
ttr.accept("on");
ttr.accept("the");
var nth = decodeNTH();
if (!nth)
return;
options.bymonthday = [nth];
ttr.nextSymbol();
while (ttr.accept("comma")) {
nth = decodeNTH();
if (!nth) {
throw new Error("Unexpected symbol " + ttr.symbol + "; expected monthday");
}
options.bymonthday.push(nth);
ttr.nextSymbol();
}
}
function F() {
if (ttr.symbol === "until") {
var date = Date.parse(ttr.text);
if (!date)
throw new Error("Cannot parse until date:" + ttr.text);
options.until = new Date(date);
} else if (ttr.accept("for")) {
options.count = parseInt(ttr.value[0], 10);
ttr.expect("number");
}
}
}
__webpack_require__.d(__webpack_exports__, "fromText", function() {
return fromText;
});
__webpack_require__.d(__webpack_exports__, "isFullyConvertible", function() {
return isFullyConvertible;
});
__webpack_require__.d(__webpack_exports__, "toText", function() {
return toText;
});
__webpack_require__.d(__webpack_exports__, "parseText", function() {
return parseText;
});
var fromText = function(text, language) {
if (language === void 0) {
language = i18n;
}
return new esm["default"](parseText(text, language) || void 0);
};
var common = [
"count",
"until",
"interval",
"byweekday",
"bymonthday",
"bymonth"
];
totext.IMPLEMENTED = [];
totext.IMPLEMENTED[esm["default"].HOURLY] = common;
totext.IMPLEMENTED[esm["default"].MINUTELY] = common;
totext.IMPLEMENTED[esm["default"].DAILY] = ["byhour"].concat(common);
totext.IMPLEMENTED[esm["default"].WEEKLY] = common;
totext.IMPLEMENTED[esm["default"].MONTHLY] = common;
totext.IMPLEMENTED[esm["default"].YEARLY] = ["byweekno", "byyearday"].concat(common);
var toText = function(rrule, gettext, language) {
return new totext(rrule, gettext, language).toString();
};
var isFullyConvertible = totext.isFullyConvertible;
}
/******/
])
);
});
}
});
// node_modules/.pnpm/ical@0.8.0/node_modules/ical/node-ical.js
var require_node_ical = __commonJS({
"node_modules/.pnpm/ical@0.8.0/node_modules/ical/node-ical.js"(exports) {
var ical2 = require_ical();
var fs = require("fs");
exports.parseFile = function(filename) {
return ical2.parseICS(fs.readFileSync(filename, "utf8"));
};
var rrule = require_rrule().RRule;
ical2.objectHandlers["RRULE"] = function(val, params, curr, stack, line) {
curr.rrule = line;
return curr;
};
var originalEnd = ical2.objectHandlers["END"];
ical2.objectHandlers["END"] = function(val, params, curr, stack) {
if (val === "VEVENT" || val === "VTODO" || val === "VJOURNAL") {
if (curr.rrule) {
var rule = curr.rrule.replace("RRULE:", "");
if (rule.indexOf("DTSTART") === -1) {
if (curr.start.length === 8) {
var comps = /^(\d{4})(\d{2})(\d{2})$/.exec(curr.start);
if (comps) {
curr.start = new Date(comps[1], comps[2] - 1, comps[3]);
}
}
if (typeof curr.start.toISOString === "function") {
try {
rule += ";DTSTART=" + curr.start.toISOString().replace(/[-:]/g, "");
rule = rule.replace(/\.[0-9]{3}/, "");
} catch (error) {
console.error("ERROR when trying to convert to ISOString", error);
}
} else {
console.error("No toISOString function in curr.start", curr.start);
}
}
curr.rrule = rrule.fromString(rule);
}
}
return originalEnd.call(this, val, params, curr, stack);
};
}
});
// node_modules/.pnpm/ical@0.8.0/node_modules/ical/index.js
var require_ical2 = __commonJS({
"node_modules/.pnpm/ical@0.8.0/node_modules/ical/index.js"(exports, module2) {
module2.exports = require_ical();
var node = require_node_ical();
for (i in node) {
module2.exports[i] = node[i];
}
var i;
}
});
// src/main.ts
var main_exports = {};
__export(main_exports, {
DEFAULT_SETTINGS: () => DEFAULT_SETTINGS,
default: () => TimeRulerPlugin
});
module.exports = __toCommonJS(main_exports);
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/errors.js
var LuxonError = class extends Error {
};
var InvalidDateTimeError = class extends LuxonError {
constructor(reason) {
super(`Invalid DateTime: ${reason.toMessage()}`);
}
};
var InvalidIntervalError = class extends LuxonError {
constructor(reason) {
super(`Invalid Interval: ${reason.toMessage()}`);
}
};
var InvalidDurationError = class extends LuxonError {
constructor(reason) {
super(`Invalid Duration: ${reason.toMessage()}`);
}
};
var ConflictingSpecificationError = class extends LuxonError {
};
var InvalidUnitError = class extends LuxonError {
constructor(unit) {
super(`Invalid unit ${unit}`);
}
};
var InvalidArgumentError = class extends LuxonError {
};
var ZoneIsAbstractError = class extends LuxonError {
constructor() {
super("Zone is an abstract class");
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/formats.js
var n = "numeric";
var s = "short";
var l = "long";
var DATE_SHORT = {
year: n,
month: n,
day: n
};
var DATE_MED = {
year: n,
month: s,
day: n
};
var DATE_MED_WITH_WEEKDAY = {
year: n,
month: s,
day: n,
weekday: s
};
var DATE_FULL = {
year: n,
month: l,
day: n
};
var DATE_HUGE = {
year: n,
month: l,
day: n,
weekday: l
};
var TIME_SIMPLE = {
hour: n,
minute: n
};
var TIME_WITH_SECONDS = {
hour: n,
minute: n,
second: n
};
var TIME_WITH_SHORT_OFFSET = {
hour: n,
minute: n,
second: n,
timeZoneName: s
};
var TIME_WITH_LONG_OFFSET = {
hour: n,
minute: n,
second: n,
timeZoneName: l
};
var TIME_24_SIMPLE = {
hour: n,
minute: n,
hourCycle: "h23"
};
var TIME_24_WITH_SECONDS = {
hour: n,
minute: n,
second: n,
hourCycle: "h23"
};
var TIME_24_WITH_SHORT_OFFSET = {
hour: n,
minute: n,
second: n,
hourCycle: "h23",
timeZoneName: s
};
var TIME_24_WITH_LONG_OFFSET = {
hour: n,
minute: n,
second: n,
hourCycle: "h23",
timeZoneName: l
};
var DATETIME_SHORT = {
year: n,
month: n,
day: n,
hour: n,
minute: n
};
var DATETIME_SHORT_WITH_SECONDS = {
year: n,
month: n,
day: n,
hour: n,
minute: n,
second: n
};
var DATETIME_MED = {
year: n,
month: s,
day: n,
hour: n,
minute: n
};
var DATETIME_MED_WITH_SECONDS = {
year: n,
month: s,
day: n,
hour: n,
minute: n,
second: n
};
var DATETIME_MED_WITH_WEEKDAY = {
year: n,
month: s,
day: n,
weekday: s,
hour: n,
minute: n
};
var DATETIME_FULL = {
year: n,
month: l,
day: n,
hour: n,
minute: n,
timeZoneName: s
};
var DATETIME_FULL_WITH_SECONDS = {
year: n,
month: l,
day: n,
hour: n,
minute: n,
second: n,
timeZoneName: s
};
var DATETIME_HUGE = {
year: n,
month: l,
day: n,
weekday: l,
hour: n,
minute: n,
timeZoneName: l
};
var DATETIME_HUGE_WITH_SECONDS = {
year: n,
month: l,
day: n,
weekday: l,
hour: n,
minute: n,
second: n,
timeZoneName: l
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/zone.js
var Zone = class {
/**
* The type of zone
* @abstract
* @type {string}
*/
get type() {
throw new ZoneIsAbstractError();
}
/**
* The name of this zone.
* @abstract
* @type {string}
*/
get name() {
throw new ZoneIsAbstractError();
}
/**
* The IANA name of this zone.
* Defaults to `name` if not overwritten by a subclass.
* @abstract
* @type {string}
*/
get ianaName() {
return this.name;
}
/**
* Returns whether the offset is known to be fixed for the whole year.
* @abstract
* @type {boolean}
*/
get isUniversal() {
throw new ZoneIsAbstractError();
}
/**
* Returns the offset's common name (such as EST) at the specified timestamp
* @abstract
* @param {number} ts - Epoch milliseconds for which to get the name
* @param {Object} opts - Options to affect the format
* @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
* @param {string} opts.locale - What locale to return the offset name in.
* @return {string}
*/
offsetName(ts, opts) {
throw new ZoneIsAbstractError();
}
/**
* Returns the offset's value as a string
* @abstract
* @param {number} ts - Epoch milliseconds for which to get the offset
* @param {string} format - What style of offset to return.
* Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
* @return {string}
*/
formatOffset(ts, format) {
throw new ZoneIsAbstractError();
}
/**
* Return the offset in minutes for this zone at the specified timestamp.
* @abstract
* @param {number} ts - Epoch milliseconds for which to compute the offset
* @return {number}
*/
offset(ts) {
throw new ZoneIsAbstractError();
}
/**
* Return whether this Zone is equal to another zone
* @abstract
* @param {Zone} otherZone - the zone to compare
* @return {boolean}
*/
equals(otherZone) {
throw new ZoneIsAbstractError();
}
/**
* Return whether this Zone is valid.
* @abstract
* @type {boolean}
*/
get isValid() {
throw new ZoneIsAbstractError();
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/zones/systemZone.js
var singleton = null;
var SystemZone = class _SystemZone extends Zone {
/**
* Get a singleton instance of the local zone
* @return {SystemZone}
*/
static get instance() {
if (singleton === null) {
singleton = new _SystemZone();
}
return singleton;
}
/** @override **/
get type() {
return "system";
}
/** @override **/
get name() {
return new Intl.DateTimeFormat().resolvedOptions().timeZone;
}
/** @override **/
get isUniversal() {
return false;
}
/** @override **/
offsetName(ts, { format, locale }) {
return parseZoneInfo(ts, format, locale);
}
/** @override **/
formatOffset(ts, format) {
return formatOffset(this.offset(ts), format);
}
/** @override **/
offset(ts) {
return -new Date(ts).getTimezoneOffset();
}
/** @override **/
equals(otherZone) {
return otherZone.type === "system";
}
/** @override **/
get isValid() {
return true;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/zones/IANAZone.js
var dtfCache = /* @__PURE__ */ new Map();
function makeDTF(zoneName) {
let dtf = dtfCache.get(zoneName);
if (dtf === void 0) {
dtf = new Intl.DateTimeFormat("en-US", {
hour12: false,
timeZone: zoneName,
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit",
second: "2-digit",
era: "short"
});
dtfCache.set(zoneName, dtf);
}
return dtf;
}
var typeToPos = {
year: 0,
month: 1,
day: 2,
era: 3,
hour: 4,
minute: 5,
second: 6
};
function hackyOffset(dtf, date) {
const formatted = dtf.format(date).replace(/\u200E/g, ""), parsed = /(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(formatted), [, fMonth, fDay, fYear, fadOrBc, fHour, fMinute, fSecond] = parsed;
return [fYear, fMonth, fDay, fadOrBc, fHour, fMinute, fSecond];
}
function partsOffset(dtf, date) {
const formatted = dtf.formatToParts(date);
const filled = [];
for (let i = 0; i < formatted.length; i++) {
const { type, value } = formatted[i];
const pos = typeToPos[type];
if (type === "era") {
filled[pos] = value;
} else if (!isUndefined(pos)) {
filled[pos] = parseInt(value, 10);
}
}
return filled;
}
var ianaZoneCache = /* @__PURE__ */ new Map();
var IANAZone = class _IANAZone extends Zone {
/**
* @param {string} name - Zone name
* @return {IANAZone}
*/
static create(name) {
let zone = ianaZoneCache.get(name);
if (zone === void 0) {
ianaZoneCache.set(name, zone = new _IANAZone(name));
}
return zone;
}
/**
* Reset local caches. Should only be necessary in testing scenarios.
* @return {void}
*/
static resetCache() {
ianaZoneCache.clear();
dtfCache.clear();
}
/**
* Returns whether the provided string is a valid specifier. This only checks the string's format, not that the specifier identifies a known zone; see isValidZone for that.
* @param {string} s - The string to check validity on
* @example IANAZone.isValidSpecifier("America/New_York") //=> true
* @example IANAZone.isValidSpecifier("Sport~~blorp") //=> false
* @deprecated For backward compatibility, this forwards to isValidZone, better use `isValidZone()` directly instead.
* @return {boolean}
*/
static isValidSpecifier(s2) {
return this.isValidZone(s2);
}
/**
* Returns whether the provided string identifies a real zone
* @param {string} zone - The string to check
* @example IANAZone.isValidZone("America/New_York") //=> true
* @example IANAZone.isValidZone("Fantasia/Castle") //=> false
* @example IANAZone.isValidZone("Sport~~blorp") //=> false
* @return {boolean}
*/
static isValidZone(zone) {
if (!zone) {
return false;
}
try {
new Intl.DateTimeFormat("en-US", { timeZone: zone }).format();
return true;
} catch (e) {
return false;
}
}
constructor(name) {
super();
this.zoneName = name;
this.valid = _IANAZone.isValidZone(name);
}
/**
* The type of zone. `iana` for all instances of `IANAZone`.
* @override
* @type {string}
*/
get type() {
return "iana";
}
/**
* The name of this zone (i.e. the IANA zone name).
* @override
* @type {string}
*/
get name() {
return this.zoneName;
}
/**
* Returns whether the offset is known to be fixed for the whole year:
* Always returns false for all IANA zones.
* @override
* @type {boolean}
*/
get isUniversal() {
return false;
}
/**
* Returns the offset's common name (such as EST) at the specified timestamp
* @override
* @param {number} ts - Epoch milliseconds for which to get the name
* @param {Object} opts - Options to affect the format
* @param {string} opts.format - What style of offset to return. Accepts 'long' or 'short'.
* @param {string} opts.locale - What locale to return the offset name in.
* @return {string}
*/
offsetName(ts, { format, locale }) {
return parseZoneInfo(ts, format, locale, this.name);
}
/**
* Returns the offset's value as a string
* @override
* @param {number} ts - Epoch milliseconds for which to get the offset
* @param {string} format - What style of offset to return.
* Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
* @return {string}
*/
formatOffset(ts, format) {
return formatOffset(this.offset(ts), format);
}
/**
* Return the offset in minutes for this zone at the specified timestamp.
* @override
* @param {number} ts - Epoch milliseconds for which to compute the offset
* @return {number}
*/
offset(ts) {
if (!this.valid)
return NaN;
const date = new Date(ts);
if (isNaN(date))
return NaN;
const dtf = makeDTF(this.name);
let [year, month, day, adOrBc, hour, minute, second] = dtf.formatToParts ? partsOffset(dtf, date) : hackyOffset(dtf, date);
if (adOrBc === "BC") {
year = -Math.abs(year) + 1;
}
const adjustedHour = hour === 24 ? 0 : hour;
const asUTC = objToLocalTS({
year,
month,
day,
hour: adjustedHour,
minute,
second,
millisecond: 0
});
let asTS = +date;
const over = asTS % 1e3;
asTS -= over >= 0 ? over : 1e3 + over;
return (asUTC - asTS) / (60 * 1e3);
}
/**
* Return whether this Zone is equal to another zone
* @override
* @param {Zone} otherZone - the zone to compare
* @return {boolean}
*/
equals(otherZone) {
return otherZone.type === "iana" && otherZone.name === this.name;
}
/**
* Return whether this Zone is valid.
* @override
* @type {boolean}
*/
get isValid() {
return this.valid;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/locale.js
var intlLFCache = {};
function getCachedLF(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let dtf = intlLFCache[key2];
if (!dtf) {
dtf = new Intl.ListFormat(locString, opts);
intlLFCache[key2] = dtf;
}
return dtf;
}
var intlDTCache = /* @__PURE__ */ new Map();
function getCachedDTF(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let dtf = intlDTCache.get(key2);
if (dtf === void 0) {
dtf = new Intl.DateTimeFormat(locString, opts);
intlDTCache.set(key2, dtf);
}
return dtf;
}
var intlNumCache = /* @__PURE__ */ new Map();
function getCachedINF(locString, opts = {}) {
const key2 = JSON.stringify([locString, opts]);
let inf = intlNumCache.get(key2);
if (inf === void 0) {
inf = new Intl.NumberFormat(locString, opts);
intlNumCache.set(key2, inf);
}
return inf;
}
var intlRelCache = /* @__PURE__ */ new Map();
function getCachedRTF(locString, opts = {}) {
const { base, ...cacheKeyOpts } = opts;
const key2 = JSON.stringify([locString, cacheKeyOpts]);
let inf = intlRelCache.get(key2);
if (inf === void 0) {
inf = new Intl.RelativeTimeFormat(locString, opts);
intlRelCache.set(key2, inf);
}
return inf;
}
var sysLocaleCache = null;
function systemLocale() {
if (sysLocaleCache) {
return sysLocaleCache;
} else {
sysLocaleCache = new Intl.DateTimeFormat().resolvedOptions().locale;
return sysLocaleCache;
}
}
var intlResolvedOptionsCache = /* @__PURE__ */ new Map();
function getCachedIntResolvedOptions(locString) {
let opts = intlResolvedOptionsCache.get(locString);
if (opts === void 0) {
opts = new Intl.DateTimeFormat(locString).resolvedOptions();
intlResolvedOptionsCache.set(locString, opts);
}
return opts;
}
var weekInfoCache = /* @__PURE__ */ new Map();
function getCachedWeekInfo(locString) {
let data = weekInfoCache.get(locString);
if (!data) {
const locale = new Intl.Locale(locString);
data = "getWeekInfo" in locale ? locale.getWeekInfo() : locale.weekInfo;
if (!("minimalDays" in data)) {
data = { ...fallbackWeekSettings, ...data };
}
weekInfoCache.set(locString, data);
}
return data;
}
function parseLocaleString(localeStr) {
const xIndex = localeStr.indexOf("-x-");
if (xIndex !== -1) {
localeStr = localeStr.substring(0, xIndex);
}
const uIndex = localeStr.indexOf("-u-");
if (uIndex === -1) {
return [localeStr];
} else {
let options;
let selectedStr;
try {
options = getCachedDTF(localeStr).resolvedOptions();
selectedStr = localeStr;
} catch (e) {
const smaller = localeStr.substring(0, uIndex);
options = getCachedDTF(smaller).resolvedOptions();
selectedStr = smaller;
}
const { numberingSystem, calendar } = options;
return [selectedStr, numberingSystem, calendar];
}
}
function intlConfigString(localeStr, numberingSystem, outputCalendar) {
if (outputCalendar || numberingSystem) {
if (!localeStr.includes("-u-")) {
localeStr += "-u";
}
if (outputCalendar) {
localeStr += `-ca-${outputCalendar}`;
}
if (numberingSystem) {
localeStr += `-nu-${numberingSystem}`;
}
return localeStr;
} else {
return localeStr;
}
}
function mapMonths(f) {
const ms = [];
for (let i = 1; i <= 12; i++) {
const dt = DateTime.utc(2009, i, 1);
ms.push(f(dt));
}
return ms;
}
function mapWeekdays(f) {
const ms = [];
for (let i = 1; i <= 7; i++) {
const dt = DateTime.utc(2016, 11, 13 + i);
ms.push(f(dt));
}
return ms;
}
function listStuff(loc, length, englishFn, intlFn) {
const mode = loc.listingMode();
if (mode === "error") {
return null;
} else if (mode === "en") {
return englishFn(length);
} else {
return intlFn(length);
}
}
function supportsFastNumbers(loc) {
if (loc.numberingSystem && loc.numberingSystem !== "latn") {
return false;
} else {
return loc.numberingSystem === "latn" || !loc.locale || loc.locale.startsWith("en") || getCachedIntResolvedOptions(loc.locale).numberingSystem === "latn";
}
}
var PolyNumberFormatter = class {
constructor(intl, forceSimple, opts) {
this.padTo = opts.padTo || 0;
this.floor = opts.floor || false;
const { padTo, floor, ...otherOpts } = opts;
if (!forceSimple || Object.keys(otherOpts).length > 0) {
const intlOpts = { useGrouping: false, ...opts };
if (opts.padTo > 0)
intlOpts.minimumIntegerDigits = opts.padTo;
this.inf = getCachedINF(intl, intlOpts);
}
}
format(i) {
if (this.inf) {
const fixed = this.floor ? Math.floor(i) : i;
return this.inf.format(fixed);
} else {
const fixed = this.floor ? Math.floor(i) : roundTo(i, 3);
return padStart(fixed, this.padTo);
}
}
};
var PolyDateFormatter = class {
constructor(dt, intl, opts) {
this.opts = opts;
this.originalZone = void 0;
let z = void 0;
if (this.opts.timeZone) {
this.dt = dt;
} else if (dt.zone.type === "fixed") {
const gmtOffset = -1 * (dt.offset / 60);
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
z = offsetZ;
this.dt = dt;
} else {
z = "UTC";
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
this.originalZone = dt.zone;
}
} else if (dt.zone.type === "system") {
this.dt = dt;
} else if (dt.zone.type === "iana") {
this.dt = dt;
z = dt.zone.name;
} else {
z = "UTC";
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
this.originalZone = dt.zone;
}
const intlOpts = { ...this.opts };
intlOpts.timeZone = intlOpts.timeZone || z;
this.dtf = getCachedDTF(intl, intlOpts);
}
format() {
if (this.originalZone) {
return this.formatToParts().map(({ value }) => value).join("");
}
return this.dtf.format(this.dt.toJSDate());
}
formatToParts() {
const parts = this.dtf.formatToParts(this.dt.toJSDate());
if (this.originalZone) {
return parts.map((part) => {
if (part.type === "timeZoneName") {
const offsetName = this.originalZone.offsetName(this.dt.ts, {
locale: this.dt.locale,
format: this.opts.timeZoneName
});
return {
...part,
value: offsetName
};
} else {
return part;
}
});
}
return parts;
}
resolvedOptions() {
return this.dtf.resolvedOptions();
}
};
var PolyRelFormatter = class {
constructor(intl, isEnglish, opts) {
this.opts = { style: "long", ...opts };
if (!isEnglish && hasRelative()) {
this.rtf = getCachedRTF(intl, opts);
}
}
format(count, unit) {
if (this.rtf) {
return this.rtf.format(count, unit);
} else {
return formatRelativeTime(unit, count, this.opts.numeric, this.opts.style !== "long");
}
}
formatToParts(count, unit) {
if (this.rtf) {
return this.rtf.formatToParts(count, unit);
} else {
return [];
}
}
};
var fallbackWeekSettings = {
firstDay: 1,
minimalDays: 4,
weekend: [6, 7]
};
var Locale = class _Locale {
static fromOpts(opts) {
return _Locale.create(
opts.locale,
opts.numberingSystem,
opts.outputCalendar,
opts.weekSettings,
opts.defaultToEN
);
}
static create(locale, numberingSystem, outputCalendar, weekSettings, defaultToEN = false) {
const specifiedLocale = locale || Settings.defaultLocale;
const localeR = specifiedLocale || (defaultToEN ? "en-US" : systemLocale());
const numberingSystemR = numberingSystem || Settings.defaultNumberingSystem;
const outputCalendarR = outputCalendar || Settings.defaultOutputCalendar;
const weekSettingsR = validateWeekSettings(weekSettings) || Settings.defaultWeekSettings;
return new _Locale(localeR, numberingSystemR, outputCalendarR, weekSettingsR, specifiedLocale);
}
static resetCache() {
sysLocaleCache = null;
intlDTCache.clear();
intlNumCache.clear();
intlRelCache.clear();
intlResolvedOptionsCache.clear();
weekInfoCache.clear();
}
static fromObject({ locale, numberingSystem, outputCalendar, weekSettings } = {}) {
return _Locale.create(locale, numberingSystem, outputCalendar, weekSettings);
}
constructor(locale, numbering, outputCalendar, weekSettings, specifiedLocale) {
const [parsedLocale, parsedNumberingSystem, parsedOutputCalendar] = parseLocaleString(locale);
this.locale = parsedLocale;
this.numberingSystem = numbering || parsedNumberingSystem || null;
this.outputCalendar = outputCalendar || parsedOutputCalendar || null;
this.weekSettings = weekSettings;
this.intl = intlConfigString(this.locale, this.numberingSystem, this.outputCalendar);
this.weekdaysCache = { format: {}, standalone: {} };
this.monthsCache = { format: {}, standalone: {} };
this.meridiemCache = null;
this.eraCache = {};
this.specifiedLocale = specifiedLocale;
this.fastNumbersCached = null;
}
get fastNumbers() {
if (this.fastNumbersCached == null) {
this.fastNumbersCached = supportsFastNumbers(this);
}
return this.fastNumbersCached;
}
listingMode() {
const isActuallyEn = this.isEnglish();
const hasNoWeirdness = (this.numberingSystem === null || this.numberingSystem === "latn") && (this.outputCalendar === null || this.outputCalendar === "gregory");
return isActuallyEn && hasNoWeirdness ? "en" : "intl";
}
clone(alts) {
if (!alts || Object.getOwnPropertyNames(alts).length === 0) {
return this;
} else {
return _Locale.create(
alts.locale || this.specifiedLocale,
alts.numberingSystem || this.numberingSystem,
alts.outputCalendar || this.outputCalendar,
validateWeekSettings(alts.weekSettings) || this.weekSettings,
alts.defaultToEN || false
);
}
}
redefaultToEN(alts = {}) {
return this.clone({ ...alts, defaultToEN: true });
}
redefaultToSystem(alts = {}) {
return this.clone({ ...alts, defaultToEN: false });
}
months(length, format = false) {
return listStuff(this, length, months, () => {
const intl = format ? { month: length, day: "numeric" } : { month: length }, formatStr = format ? "format" : "standalone";
if (!this.monthsCache[formatStr][length]) {
this.monthsCache[formatStr][length] = mapMonths((dt) => this.extract(dt, intl, "month"));
}
return this.monthsCache[formatStr][length];
});
}
weekdays(length, format = false) {
return listStuff(this, length, weekdays, () => {
const intl = format ? { weekday: length, year: "numeric", month: "long", day: "numeric" } : { weekday: length }, formatStr = format ? "format" : "standalone";
if (!this.weekdaysCache[formatStr][length]) {
this.weekdaysCache[formatStr][length] = mapWeekdays(
(dt) => this.extract(dt, intl, "weekday")
);
}
return this.weekdaysCache[formatStr][length];
});
}
meridiems() {
return listStuff(
this,
void 0,
() => meridiems,
() => {
if (!this.meridiemCache) {
const intl = { hour: "numeric", hourCycle: "h12" };
this.meridiemCache = [DateTime.utc(2016, 11, 13, 9), DateTime.utc(2016, 11, 13, 19)].map(
(dt) => this.extract(dt, intl, "dayperiod")
);
}
return this.meridiemCache;
}
);
}
eras(length) {
return listStuff(this, length, eras, () => {
const intl = { era: length };
if (!this.eraCache[length]) {
this.eraCache[length] = [DateTime.utc(-40, 1, 1), DateTime.utc(2017, 1, 1)].map(
(dt) => this.extract(dt, intl, "era")
);
}
return this.eraCache[length];
});
}
extract(dt, intlOpts, field) {
const df = this.dtFormatter(dt, intlOpts), results = df.formatToParts(), matching = results.find((m) => m.type.toLowerCase() === field);
return matching ? matching.value : null;
}
numberFormatter(opts = {}) {
return new PolyNumberFormatter(this.intl, opts.forceSimple || this.fastNumbers, opts);
}
dtFormatter(dt, intlOpts = {}) {
return new PolyDateFormatter(dt, this.intl, intlOpts);
}
relFormatter(opts = {}) {
return new PolyRelFormatter(this.intl, this.isEnglish(), opts);
}
listFormatter(opts = {}) {
return getCachedLF(this.intl, opts);
}
isEnglish() {
return this.locale === "en" || this.locale.toLowerCase() === "en-us" || getCachedIntResolvedOptions(this.intl).locale.startsWith("en-us");
}
getWeekSettings() {
if (this.weekSettings) {
return this.weekSettings;
} else if (!hasLocaleWeekInfo()) {
return fallbackWeekSettings;
} else {
return getCachedWeekInfo(this.locale);
}
}
getStartOfWeek() {
return this.getWeekSettings().firstDay;
}
getMinDaysInFirstWeek() {
return this.getWeekSettings().minimalDays;
}
getWeekendDays() {
return this.getWeekSettings().weekend;
}
equals(other) {
return this.locale === other.locale && this.numberingSystem === other.numberingSystem && this.outputCalendar === other.outputCalendar;
}
toString() {
return `Locale(${this.locale}, ${this.numberingSystem}, ${this.outputCalendar})`;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/zones/fixedOffsetZone.js
var singleton2 = null;
var FixedOffsetZone = class _FixedOffsetZone extends Zone {
/**
* Get a singleton instance of UTC
* @return {FixedOffsetZone}
*/
static get utcInstance() {
if (singleton2 === null) {
singleton2 = new _FixedOffsetZone(0);
}
return singleton2;
}
/**
* Get an instance with a specified offset
* @param {number} offset - The offset in minutes
* @return {FixedOffsetZone}
*/
static instance(offset2) {
return offset2 === 0 ? _FixedOffsetZone.utcInstance : new _FixedOffsetZone(offset2);
}
/**
* Get an instance of FixedOffsetZone from a UTC offset string, like "UTC+6"
* @param {string} s - The offset string to parse
* @example FixedOffsetZone.parseSpecifier("UTC+6")
* @example FixedOffsetZone.parseSpecifier("UTC+06")
* @example FixedOffsetZone.parseSpecifier("UTC-6:00")
* @return {FixedOffsetZone}
*/
static parseSpecifier(s2) {
if (s2) {
const r = s2.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);
if (r) {
return new _FixedOffsetZone(signedOffset(r[1], r[2]));
}
}
return null;
}
constructor(offset2) {
super();
this.fixed = offset2;
}
/**
* The type of zone. `fixed` for all instances of `FixedOffsetZone`.
* @override
* @type {string}
*/
get type() {
return "fixed";
}
/**
* The name of this zone.
* All fixed zones' names always start with "UTC" (plus optional offset)
* @override
* @type {string}
*/
get name() {
return this.fixed === 0 ? "UTC" : `UTC${formatOffset(this.fixed, "narrow")}`;
}
/**
* The IANA name of this zone, i.e. `Etc/UTC` or `Etc/GMT+/-nn`
*
* @override
* @type {string}
*/
get ianaName() {
if (this.fixed === 0) {
return "Etc/UTC";
} else {
return `Etc/GMT${formatOffset(-this.fixed, "narrow")}`;
}
}
/**
* Returns the offset's common name at the specified timestamp.
*
* For fixed offset zones this equals to the zone name.
* @override
*/
offsetName() {
return this.name;
}
/**
* Returns the offset's value as a string
* @override
* @param {number} ts - Epoch milliseconds for which to get the offset
* @param {string} format - What style of offset to return.
* Accepts 'narrow', 'short', or 'techie'. Returning '+6', '+06:00', or '+0600' respectively
* @return {string}
*/
formatOffset(ts, format) {
return formatOffset(this.fixed, format);
}
/**
* Returns whether the offset is known to be fixed for the whole year:
* Always returns true for all fixed offset zones.
* @override
* @type {boolean}
*/
get isUniversal() {
return true;
}
/**
* Return the offset in minutes for this zone at the specified timestamp.
*
* For fixed offset zones, this is constant and does not depend on a timestamp.
* @override
* @return {number}
*/
offset() {
return this.fixed;
}
/**
* Return whether this Zone is equal to another zone (i.e. also fixed and same offset)
* @override
* @param {Zone} otherZone - the zone to compare
* @return {boolean}
*/
equals(otherZone) {
return otherZone.type === "fixed" && otherZone.fixed === this.fixed;
}
/**
* Return whether this Zone is valid:
* All fixed offset zones are valid.
* @override
* @type {boolean}
*/
get isValid() {
return true;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/zones/invalidZone.js
var InvalidZone = class extends Zone {
constructor(zoneName) {
super();
this.zoneName = zoneName;
}
/** @override **/
get type() {
return "invalid";
}
/** @override **/
get name() {
return this.zoneName;
}
/** @override **/
get isUniversal() {
return false;
}
/** @override **/
offsetName() {
return null;
}
/** @override **/
formatOffset() {
return "";
}
/** @override **/
offset() {
return NaN;
}
/** @override **/
equals() {
return false;
}
/** @override **/
get isValid() {
return false;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/zoneUtil.js
function normalizeZone(input, defaultZone2) {
let offset2;
if (isUndefined(input) || input === null) {
return defaultZone2;
} else if (input instanceof Zone) {
return input;
} else if (isString(input)) {
const lowered = input.toLowerCase();
if (lowered === "default")
return defaultZone2;
else if (lowered === "local" || lowered === "system")
return SystemZone.instance;
else if (lowered === "utc" || lowered === "gmt")
return FixedOffsetZone.utcInstance;
else
return FixedOffsetZone.parseSpecifier(lowered) || IANAZone.create(input);
} else if (isNumber(input)) {
return FixedOffsetZone.instance(input);
} else if (typeof input === "object" && "offset" in input && typeof input.offset === "function") {
return input;
} else {
return new InvalidZone(input);
}
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/digits.js
var numberingSystems = {
arab: "[\u0660-\u0669]",
arabext: "[\u06F0-\u06F9]",
bali: "[\u1B50-\u1B59]",
beng: "[\u09E6-\u09EF]",
deva: "[\u0966-\u096F]",
fullwide: "[\uFF10-\uFF19]",
gujr: "[\u0AE6-\u0AEF]",
hanidec: "[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",
khmr: "[\u17E0-\u17E9]",
knda: "[\u0CE6-\u0CEF]",
laoo: "[\u0ED0-\u0ED9]",
limb: "[\u1946-\u194F]",
mlym: "[\u0D66-\u0D6F]",
mong: "[\u1810-\u1819]",
mymr: "[\u1040-\u1049]",
orya: "[\u0B66-\u0B6F]",
tamldec: "[\u0BE6-\u0BEF]",
telu: "[\u0C66-\u0C6F]",
thai: "[\u0E50-\u0E59]",
tibt: "[\u0F20-\u0F29]",
latn: "\\d"
};
var numberingSystemsUTF16 = {
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]
};
var hanidecChars = numberingSystems.hanidec.replace(/[\[|\]]/g, "").split("");
function parseDigits(str) {
let value = parseInt(str, 10);
if (isNaN(value)) {
value = "";
for (let i = 0; i < str.length; i++) {
const code = str.charCodeAt(i);
if (str[i].search(numberingSystems.hanidec) !== -1) {
value += hanidecChars.indexOf(str[i]);
} else {
for (const key2 in numberingSystemsUTF16) {
const [min, max] = numberingSystemsUTF16[key2];
if (code >= min && code <= max) {
value += code - min;
}
}
}
}
return parseInt(value, 10);
} else {
return value;
}
}
var digitRegexCache = /* @__PURE__ */ new Map();
function resetDigitRegexCache() {
digitRegexCache.clear();
}
function digitRegex({ numberingSystem }, append = "") {
const ns = numberingSystem || "latn";
let appendCache = digitRegexCache.get(ns);
if (appendCache === void 0) {
appendCache = /* @__PURE__ */ new Map();
digitRegexCache.set(ns, appendCache);
}
let regex = appendCache.get(append);
if (regex === void 0) {
regex = new RegExp(`${numberingSystems[ns]}${append}`);
appendCache.set(append, regex);
}
return regex;
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/settings.js
var now2 = () => Date.now();
var defaultZone = "system";
var defaultLocale = null;
var defaultNumberingSystem = null;
var defaultOutputCalendar = null;
var twoDigitCutoffYear = 60;
var throwOnInvalid;
var defaultWeekSettings = null;
var Settings = class {
/**
* Get the callback for returning the current timestamp.
* @type {function}
*/
static get now() {
return now2;
}
/**
* Set the callback for returning the current timestamp.
* The function should return a number, which will be interpreted as an Epoch millisecond count
* @type {function}
* @example Settings.now = () => Date.now() + 3000 // pretend it is 3 seconds in the future
* @example Settings.now = () => 0 // always pretend it's Jan 1, 1970 at midnight in UTC time
*/
static set now(n2) {
now2 = n2;
}
/**
* Set the default time zone to create DateTimes in. Does not affect existing instances.
* Use the value "system" to reset this value to the system's time zone.
* @type {string}
*/
static set defaultZone(zone) {
defaultZone = zone;
}
/**
* Get the default time zone object currently used to create DateTimes. Does not affect existing instances.
* The default value is the system's time zone (the one set on the machine that runs this code).
* @type {Zone}
*/
static get defaultZone() {
return normalizeZone(defaultZone, SystemZone.instance);
}
/**
* Get the default locale to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultLocale() {
return defaultLocale;
}
/**
* Set the default locale to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultLocale(locale) {
defaultLocale = locale;
}
/**
* Get the default numbering system to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultNumberingSystem() {
return defaultNumberingSystem;
}
/**
* Set the default numbering system to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultNumberingSystem(numberingSystem) {
defaultNumberingSystem = numberingSystem;
}
/**
* Get the default output calendar to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static get defaultOutputCalendar() {
return defaultOutputCalendar;
}
/**
* Set the default output calendar to create DateTimes with. Does not affect existing instances.
* @type {string}
*/
static set defaultOutputCalendar(outputCalendar) {
defaultOutputCalendar = outputCalendar;
}
/**
* @typedef {Object} WeekSettings
* @property {number} firstDay
* @property {number} minimalDays
* @property {number[]} weekend
*/
/**
* @return {WeekSettings|null}
*/
static get defaultWeekSettings() {
return defaultWeekSettings;
}
/**
* Allows overriding the default locale week settings, i.e. the start of the week, the weekend and
* how many days are required in the first week of a year.
* Does not affect existing instances.
*
* @param {WeekSettings|null} weekSettings
*/
static set defaultWeekSettings(weekSettings) {
defaultWeekSettings = validateWeekSettings(weekSettings);
}
/**
* Get the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
* @type {number}
*/
static get twoDigitCutoffYear() {
return twoDigitCutoffYear;
}
/**
* Set the cutoff year for whether a 2-digit year string is interpreted in the current or previous century. Numbers higher than the cutoff will be considered to mean 19xx and numbers lower or equal to the cutoff will be considered 20xx.
* @type {number}
* @example Settings.twoDigitCutoffYear = 0 // all 'yy' are interpreted as 20th century
* @example Settings.twoDigitCutoffYear = 99 // all 'yy' are interpreted as 21st century
* @example Settings.twoDigitCutoffYear = 50 // '49' -> 2049; '50' -> 1950
* @example Settings.twoDigitCutoffYear = 1950 // interpreted as 50
* @example Settings.twoDigitCutoffYear = 2050 // ALSO interpreted as 50
*/
static set twoDigitCutoffYear(cutoffYear) {
twoDigitCutoffYear = cutoffYear % 100;
}
/**
* Get whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
* @type {boolean}
*/
static get throwOnInvalid() {
return throwOnInvalid;
}
/**
* Set whether Luxon will throw when it encounters invalid DateTimes, Durations, or Intervals
* @type {boolean}
*/
static set throwOnInvalid(t) {
throwOnInvalid = t;
}
/**
* Reset Luxon's global caches. Should only be necessary in testing scenarios.
* @return {void}
*/
static resetCaches() {
Locale.resetCache();
IANAZone.resetCache();
DateTime.resetCache();
resetDigitRegexCache();
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/invalid.js
var Invalid = class {
constructor(reason, explanation) {
this.reason = reason;
this.explanation = explanation;
}
toMessage() {
if (this.explanation) {
return `${this.reason}: ${this.explanation}`;
} else {
return this.reason;
}
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/conversions.js
var nonLeapLadder = [0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334];
var leapLadder = [0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335];
function unitOutOfRange(unit, value) {
return new Invalid(
"unit out of range",
`you specified ${value} (of type ${typeof value}) as a ${unit}, which is invalid`
);
}
function dayOfWeek(year, month, day) {
const d = new Date(Date.UTC(year, month - 1, day));
if (year < 100 && year >= 0) {
d.setUTCFullYear(d.getUTCFullYear() - 1900);
}
const js = d.getUTCDay();
return js === 0 ? 7 : js;
}
function computeOrdinal(year, month, day) {
return day + (isLeapYear(year) ? leapLadder : nonLeapLadder)[month - 1];
}
function uncomputeOrdinal(year, ordinal) {
const table = isLeapYear(year) ? leapLadder : nonLeapLadder, month0 = table.findIndex((i) => i < ordinal), day = ordinal - table[month0];
return { month: month0 + 1, day };
}
function isoWeekdayToLocal(isoWeekday, startOfWeek) {
return (isoWeekday - startOfWeek + 7) % 7 + 1;
}
function gregorianToWeek(gregObj, minDaysInFirstWeek = 4, startOfWeek = 1) {
const { year, month, day } = gregObj, ordinal = computeOrdinal(year, month, day), weekday = isoWeekdayToLocal(dayOfWeek(year, month, day), startOfWeek);
let weekNumber = Math.floor((ordinal - weekday + 14 - minDaysInFirstWeek) / 7), weekYear;
if (weekNumber < 1) {
weekYear = year - 1;
weekNumber = weeksInWeekYear(weekYear, minDaysInFirstWeek, startOfWeek);
} else if (weekNumber > weeksInWeekYear(year, minDaysInFirstWeek, startOfWeek)) {
weekYear = year + 1;
weekNumber = 1;
} else {
weekYear = year;
}
return { weekYear, weekNumber, weekday, ...timeObject(gregObj) };
}
function weekToGregorian(weekData, minDaysInFirstWeek = 4, startOfWeek = 1) {
const { weekYear, weekNumber, weekday } = weekData, weekdayOfJan4 = isoWeekdayToLocal(dayOfWeek(weekYear, 1, minDaysInFirstWeek), startOfWeek), yearInDays = daysInYear(weekYear);
let ordinal = weekNumber * 7 + weekday - weekdayOfJan4 - 7 + minDaysInFirstWeek, year;
if (ordinal < 1) {
year = weekYear - 1;
ordinal += daysInYear(year);
} else if (ordinal > yearInDays) {
year = weekYear + 1;
ordinal -= daysInYear(weekYear);
} else {
year = weekYear;
}
const { month, day } = uncomputeOrdinal(year, ordinal);
return { year, month, day, ...timeObject(weekData) };
}
function gregorianToOrdinal(gregData) {
const { year, month, day } = gregData;
const ordinal = computeOrdinal(year, month, day);
return { year, ordinal, ...timeObject(gregData) };
}
function ordinalToGregorian(ordinalData) {
const { year, ordinal } = ordinalData;
const { month, day } = uncomputeOrdinal(year, ordinal);
return { year, month, day, ...timeObject(ordinalData) };
}
function usesLocalWeekValues(obj, loc) {
const hasLocaleWeekData = !isUndefined(obj.localWeekday) || !isUndefined(obj.localWeekNumber) || !isUndefined(obj.localWeekYear);
if (hasLocaleWeekData) {
const hasIsoWeekData = !isUndefined(obj.weekday) || !isUndefined(obj.weekNumber) || !isUndefined(obj.weekYear);
if (hasIsoWeekData) {
throw new ConflictingSpecificationError(
"Cannot mix locale-based week fields with ISO-based week fields"
);
}
if (!isUndefined(obj.localWeekday))
obj.weekday = obj.localWeekday;
if (!isUndefined(obj.localWeekNumber))
obj.weekNumber = obj.localWeekNumber;
if (!isUndefined(obj.localWeekYear))
obj.weekYear = obj.localWeekYear;
delete obj.localWeekday;
delete obj.localWeekNumber;
delete obj.localWeekYear;
return {
minDaysInFirstWeek: loc.getMinDaysInFirstWeek(),
startOfWeek: loc.getStartOfWeek()
};
} else {
return { minDaysInFirstWeek: 4, startOfWeek: 1 };
}
}
function hasInvalidWeekData(obj, minDaysInFirstWeek = 4, startOfWeek = 1) {
const validYear = isInteger(obj.weekYear), validWeek = integerBetween(
obj.weekNumber,
1,
weeksInWeekYear(obj.weekYear, minDaysInFirstWeek, startOfWeek)
), validWeekday = integerBetween(obj.weekday, 1, 7);
if (!validYear) {
return unitOutOfRange("weekYear", obj.weekYear);
} else if (!validWeek) {
return unitOutOfRange("week", obj.weekNumber);
} else if (!validWeekday) {
return unitOutOfRange("weekday", obj.weekday);
} else
return false;
}
function hasInvalidOrdinalData(obj) {
const validYear = isInteger(obj.year), validOrdinal = integerBetween(obj.ordinal, 1, daysInYear(obj.year));
if (!validYear) {
return unitOutOfRange("year", obj.year);
} else if (!validOrdinal) {
return unitOutOfRange("ordinal", obj.ordinal);
} else
return false;
}
function hasInvalidGregorianData(obj) {
const validYear = isInteger(obj.year), validMonth = integerBetween(obj.month, 1, 12), validDay = integerBetween(obj.day, 1, daysInMonth(obj.year, obj.month));
if (!validYear) {
return unitOutOfRange("year", obj.year);
} else if (!validMonth) {
return unitOutOfRange("month", obj.month);
} else if (!validDay) {
return unitOutOfRange("day", obj.day);
} else
return false;
}
function hasInvalidTimeData(obj) {
const { hour, minute, second, millisecond } = obj;
const validHour = integerBetween(hour, 0, 23) || hour === 24 && minute === 0 && second === 0 && millisecond === 0, validMinute = integerBetween(minute, 0, 59), validSecond = integerBetween(second, 0, 59), validMillisecond = integerBetween(millisecond, 0, 999);
if (!validHour) {
return unitOutOfRange("hour", hour);
} else if (!validMinute) {
return unitOutOfRange("minute", minute);
} else if (!validSecond) {
return unitOutOfRange("second", second);
} else if (!validMillisecond) {
return unitOutOfRange("millisecond", millisecond);
} else
return false;
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/util.js
function isUndefined(o) {
return typeof o === "undefined";
}
function isNumber(o) {
return typeof o === "number";
}
function isInteger(o) {
return typeof o === "number" && o % 1 === 0;
}
function isString(o) {
return typeof o === "string";
}
function isDate(o) {
return Object.prototype.toString.call(o) === "[object Date]";
}
function hasRelative() {
try {
return typeof Intl !== "undefined" && !!Intl.RelativeTimeFormat;
} catch (e) {
return false;
}
}
function hasLocaleWeekInfo() {
try {
return typeof Intl !== "undefined" && !!Intl.Locale && ("weekInfo" in Intl.Locale.prototype || "getWeekInfo" in Intl.Locale.prototype);
} catch (e) {
return false;
}
}
function maybeArray(thing) {
return Array.isArray(thing) ? thing : [thing];
}
function bestBy(arr, by, compare) {
if (arr.length === 0) {
return void 0;
}
return arr.reduce((best, next) => {
const pair = [by(next), next];
if (!best) {
return pair;
} else if (compare(best[0], pair[0]) === best[0]) {
return best;
} else {
return pair;
}
}, null)[1];
}
function pick(obj, keys) {
return keys.reduce((a, k) => {
a[k] = obj[k];
return a;
}, {});
}
function hasOwnProperty(obj, prop) {
return Object.prototype.hasOwnProperty.call(obj, prop);
}
function validateWeekSettings(settings) {
if (settings == null) {
return null;
} else if (typeof settings !== "object") {
throw new InvalidArgumentError("Week settings must be an object");
} else {
if (!integerBetween(settings.firstDay, 1, 7) || !integerBetween(settings.minimalDays, 1, 7) || !Array.isArray(settings.weekend) || settings.weekend.some((v) => !integerBetween(v, 1, 7))) {
throw new InvalidArgumentError("Invalid week settings");
}
return {
firstDay: settings.firstDay,
minimalDays: settings.minimalDays,
weekend: Array.from(settings.weekend)
};
}
}
function integerBetween(thing, bottom, top) {
return isInteger(thing) && thing >= bottom && thing <= top;
}
function floorMod(x, n2) {
return x - n2 * Math.floor(x / n2);
}
function padStart(input, n2 = 2) {
const isNeg = input < 0;
let padded;
if (isNeg) {
padded = "-" + ("" + -input).padStart(n2, "0");
} else {
padded = ("" + input).padStart(n2, "0");
}
return padded;
}
function parseInteger(string) {
if (isUndefined(string) || string === null || string === "") {
return void 0;
} else {
return parseInt(string, 10);
}
}
function parseFloating(string) {
if (isUndefined(string) || string === null || string === "") {
return void 0;
} else {
return parseFloat(string);
}
}
function parseMillis(fraction) {
if (isUndefined(fraction) || fraction === null || fraction === "") {
return void 0;
} else {
const f = parseFloat("0." + fraction) * 1e3;
return Math.floor(f);
}
}
function roundTo(number, digits, towardZero = false) {
const factor = 10 ** digits, rounder = towardZero ? Math.trunc : Math.round;
return rounder(number * factor) / factor;
}
function isLeapYear(year) {
return year % 4 === 0 && (year % 100 !== 0 || year % 400 === 0);
}
function daysInYear(year) {
return isLeapYear(year) ? 366 : 365;
}
function daysInMonth(year, month) {
const modMonth = floorMod(month - 1, 12) + 1, modYear = year + (month - modMonth) / 12;
if (modMonth === 2) {
return isLeapYear(modYear) ? 29 : 28;
} else {
return [31, null, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31][modMonth - 1];
}
}
function objToLocalTS(obj) {
let d = Date.UTC(
obj.year,
obj.month - 1,
obj.day,
obj.hour,
obj.minute,
obj.second,
obj.millisecond
);
if (obj.year < 100 && obj.year >= 0) {
d = new Date(d);
d.setUTCFullYear(obj.year, obj.month - 1, obj.day);
}
return +d;
}
function firstWeekOffset(year, minDaysInFirstWeek, startOfWeek) {
const fwdlw = isoWeekdayToLocal(dayOfWeek(year, 1, minDaysInFirstWeek), startOfWeek);
return -fwdlw + minDaysInFirstWeek - 1;
}
function weeksInWeekYear(weekYear, minDaysInFirstWeek = 4, startOfWeek = 1) {
const weekOffset = firstWeekOffset(weekYear, minDaysInFirstWeek, startOfWeek);
const weekOffsetNext = firstWeekOffset(weekYear + 1, minDaysInFirstWeek, startOfWeek);
return (daysInYear(weekYear) - weekOffset + weekOffsetNext) / 7;
}
function untruncateYear(year) {
if (year > 99) {
return year;
} else
return year > Settings.twoDigitCutoffYear ? 1900 + year : 2e3 + year;
}
function parseZoneInfo(ts, offsetFormat, locale, timeZone = null) {
const date = new Date(ts), intlOpts = {
hourCycle: "h23",
year: "numeric",
month: "2-digit",
day: "2-digit",
hour: "2-digit",
minute: "2-digit"
};
if (timeZone) {
intlOpts.timeZone = timeZone;
}
const modified = { timeZoneName: offsetFormat, ...intlOpts };
const parsed = new Intl.DateTimeFormat(locale, modified).formatToParts(date).find((m) => m.type.toLowerCase() === "timezonename");
return parsed ? parsed.value : null;
}
function signedOffset(offHourStr, offMinuteStr) {
let offHour = parseInt(offHourStr, 10);
if (Number.isNaN(offHour)) {
offHour = 0;
}
const offMin = parseInt(offMinuteStr, 10) || 0, offMinSigned = offHour < 0 || Object.is(offHour, -0) ? -offMin : offMin;
return offHour * 60 + offMinSigned;
}
function asNumber(value) {
const numericValue = Number(value);
if (typeof value === "boolean" || value === "" || Number.isNaN(numericValue))
throw new InvalidArgumentError(`Invalid unit value ${value}`);
return numericValue;
}
function normalizeObject(obj, normalizer) {
const normalized = {};
for (const u in obj) {
if (hasOwnProperty(obj, u)) {
const v = obj[u];
if (v === void 0 || v === null)
continue;
normalized[normalizer(u)] = asNumber(v);
}
}
return normalized;
}
function formatOffset(offset2, format) {
const hours = Math.trunc(Math.abs(offset2 / 60)), minutes = Math.trunc(Math.abs(offset2 % 60)), sign = offset2 >= 0 ? "+" : "-";
switch (format) {
case "short":
return `${sign}${padStart(hours, 2)}:${padStart(minutes, 2)}`;
case "narrow":
return `${sign}${hours}${minutes > 0 ? `:${minutes}` : ""}`;
case "techie":
return `${sign}${padStart(hours, 2)}${padStart(minutes, 2)}`;
default:
throw new RangeError(`Value format ${format} is out of range for property format`);
}
}
function timeObject(obj) {
return pick(obj, ["hour", "minute", "second", "millisecond"]);
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/english.js
var monthsLong = [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
];
var monthsShort = [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
];
var monthsNarrow = ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"];
function months(length) {
switch (length) {
case "narrow":
return [...monthsNarrow];
case "short":
return [...monthsShort];
case "long":
return [...monthsLong];
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"];
case "2-digit":
return ["01", "02", "03", "04", "05", "06", "07", "08", "09", "10", "11", "12"];
default:
return null;
}
}
var weekdaysLong = [
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday",
"Sunday"
];
var weekdaysShort = ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"];
var weekdaysNarrow = ["M", "T", "W", "T", "F", "S", "S"];
function weekdays(length) {
switch (length) {
case "narrow":
return [...weekdaysNarrow];
case "short":
return [...weekdaysShort];
case "long":
return [...weekdaysLong];
case "numeric":
return ["1", "2", "3", "4", "5", "6", "7"];
default:
return null;
}
}
var meridiems = ["AM", "PM"];
var erasLong = ["Before Christ", "Anno Domini"];
var erasShort = ["BC", "AD"];
var erasNarrow = ["B", "A"];
function eras(length) {
switch (length) {
case "narrow":
return [...erasNarrow];
case "short":
return [...erasShort];
case "long":
return [...erasLong];
default:
return null;
}
}
function meridiemForDateTime(dt) {
return meridiems[dt.hour < 12 ? 0 : 1];
}
function weekdayForDateTime(dt, length) {
return weekdays(length)[dt.weekday - 1];
}
function monthForDateTime(dt, length) {
return months(length)[dt.month - 1];
}
function eraForDateTime(dt, length) {
return eras(length)[dt.year < 0 ? 0 : 1];
}
function formatRelativeTime(unit, count, numeric = "always", narrow = false) {
const units = {
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."]
};
const lastable = ["hours", "minutes", "seconds"].indexOf(unit) === -1;
if (numeric === "auto" && lastable) {
const isDay = unit === "days";
switch (count) {
case 1:
return isDay ? "tomorrow" : `next ${units[unit][0]}`;
case -1:
return isDay ? "yesterday" : `last ${units[unit][0]}`;
case 0:
return isDay ? "today" : `this ${units[unit][0]}`;
default:
}
}
const isInPast = Object.is(count, -0) || count < 0, fmtValue = Math.abs(count), singular = fmtValue === 1, lilUnits = units[unit], fmtUnit = narrow ? singular ? lilUnits[1] : lilUnits[2] || lilUnits[1] : singular ? units[unit][0] : unit;
return isInPast ? `${fmtValue} ${fmtUnit} ago` : `in ${fmtValue} ${fmtUnit}`;
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/formatter.js
function stringifyTokens(splits, tokenToString) {
let s2 = "";
for (const token of splits) {
if (token.literal) {
s2 += token.val;
} else {
s2 += tokenToString(token.val);
}
}
return s2;
}
var macroTokenToFormatOpts = {
D: DATE_SHORT,
DD: DATE_MED,
DDD: DATE_FULL,
DDDD: DATE_HUGE,
t: TIME_SIMPLE,
tt: TIME_WITH_SECONDS,
ttt: TIME_WITH_SHORT_OFFSET,
tttt: TIME_WITH_LONG_OFFSET,
T: TIME_24_SIMPLE,
TT: TIME_24_WITH_SECONDS,
TTT: TIME_24_WITH_SHORT_OFFSET,
TTTT: TIME_24_WITH_LONG_OFFSET,
f: DATETIME_SHORT,
ff: DATETIME_MED,
fff: DATETIME_FULL,
ffff: DATETIME_HUGE,
F: DATETIME_SHORT_WITH_SECONDS,
FF: DATETIME_MED_WITH_SECONDS,
FFF: DATETIME_FULL_WITH_SECONDS,
FFFF: DATETIME_HUGE_WITH_SECONDS
};
var Formatter = class _Formatter {
static create(locale, opts = {}) {
return new _Formatter(locale, opts);
}
static parseFormat(fmt) {
let current2 = null, currentFull = "", bracketed = false;
const splits = [];
for (let i = 0; i < fmt.length; i++) {
const c = fmt.charAt(i);
if (c === "'") {
if (currentFull.length > 0) {
splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
}
current2 = null;
currentFull = "";
bracketed = !bracketed;
} else if (bracketed) {
currentFull += c;
} else if (c === current2) {
currentFull += c;
} else {
if (currentFull.length > 0) {
splits.push({ literal: /^\s+$/.test(currentFull), val: currentFull });
}
currentFull = c;
current2 = c;
}
}
if (currentFull.length > 0) {
splits.push({ literal: bracketed || /^\s+$/.test(currentFull), val: currentFull });
}
return splits;
}
static macroTokenToFormatOpts(token) {
return macroTokenToFormatOpts[token];
}
constructor(locale, formatOpts) {
this.opts = formatOpts;
this.loc = locale;
this.systemLoc = null;
}
formatWithSystemDefault(dt, opts) {
if (this.systemLoc === null) {
this.systemLoc = this.loc.redefaultToSystem();
}
const df = this.systemLoc.dtFormatter(dt, { ...this.opts, ...opts });
return df.format();
}
dtFormatter(dt, opts = {}) {
return this.loc.dtFormatter(dt, { ...this.opts, ...opts });
}
formatDateTime(dt, opts) {
return this.dtFormatter(dt, opts).format();
}
formatDateTimeParts(dt, opts) {
return this.dtFormatter(dt, opts).formatToParts();
}
formatInterval(interval, opts) {
const df = this.dtFormatter(interval.start, opts);
return df.dtf.formatRange(interval.start.toJSDate(), interval.end.toJSDate());
}
resolvedOptions(dt, opts) {
return this.dtFormatter(dt, opts).resolvedOptions();
}
num(n2, p = 0) {
if (this.opts.forceSimple) {
return padStart(n2, p);
}
const opts = { ...this.opts };
if (p > 0) {
opts.padTo = p;
}
return this.loc.numberFormatter(opts).format(n2);
}
formatDateTimeFromString(dt, fmt) {
const knownEnglish = this.loc.listingMode() === "en", useDateTimeFormatter = this.loc.outputCalendar && this.loc.outputCalendar !== "gregory", string = (opts, extract) => this.loc.extract(dt, opts, extract), formatOffset2 = (opts) => {
if (dt.isOffsetFixed && dt.offset === 0 && opts.allowZ) {
return "Z";
}
return dt.isValid ? dt.zone.formatOffset(dt.ts, opts.format) : "";
}, meridiem = () => knownEnglish ? meridiemForDateTime(dt) : string({ hour: "numeric", hourCycle: "h12" }, "dayperiod"), month = (length, standalone) => knownEnglish ? monthForDateTime(dt, length) : string(standalone ? { month: length } : { month: length, day: "numeric" }, "month"), weekday = (length, standalone) => knownEnglish ? weekdayForDateTime(dt, length) : string(
standalone ? { weekday: length } : { weekday: length, month: "long", day: "numeric" },
"weekday"
), maybeMacro = (token) => {
const formatOpts = _Formatter.macroTokenToFormatOpts(token);
if (formatOpts) {
return this.formatWithSystemDefault(dt, formatOpts);
} else {
return token;
}
}, era = (length) => knownEnglish ? eraForDateTime(dt, length) : string({ era: length }, "era"), tokenToString = (token) => {
switch (token) {
case "S":
return this.num(dt.millisecond);
case "u":
case "SSS":
return this.num(dt.millisecond, 3);
case "s":
return this.num(dt.second);
case "ss":
return this.num(dt.second, 2);
case "uu":
return this.num(Math.floor(dt.millisecond / 10), 2);
case "uuu":
return this.num(Math.floor(dt.millisecond / 100));
case "m":
return this.num(dt.minute);
case "mm":
return this.num(dt.minute, 2);
case "h":
return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12);
case "hh":
return this.num(dt.hour % 12 === 0 ? 12 : dt.hour % 12, 2);
case "H":
return this.num(dt.hour);
case "HH":
return this.num(dt.hour, 2);
case "Z":
return formatOffset2({ format: "narrow", allowZ: this.opts.allowZ });
case "ZZ":
return formatOffset2({ format: "short", allowZ: this.opts.allowZ });
case "ZZZ":
return formatOffset2({ format: "techie", allowZ: this.opts.allowZ });
case "ZZZZ":
return dt.zone.offsetName(dt.ts, { format: "short", locale: this.loc.locale });
case "ZZZZZ":
return dt.zone.offsetName(dt.ts, { format: "long", locale: this.loc.locale });
case "z":
return dt.zoneName;
case "a":
return meridiem();
case "d":
return useDateTimeFormatter ? string({ day: "numeric" }, "day") : this.num(dt.day);
case "dd":
return useDateTimeFormatter ? string({ day: "2-digit" }, "day") : this.num(dt.day, 2);
case "c":
return this.num(dt.weekday);
case "ccc":
return weekday("short", true);
case "cccc":
return weekday("long", true);
case "ccccc":
return weekday("narrow", true);
case "E":
return this.num(dt.weekday);
case "EEE":
return weekday("short", false);
case "EEEE":
return weekday("long", false);
case "EEEEE":
return weekday("narrow", false);
case "L":
return useDateTimeFormatter ? string({ month: "numeric", day: "numeric" }, "month") : this.num(dt.month);
case "LL":
return useDateTimeFormatter ? string({ month: "2-digit", day: "numeric" }, "month") : this.num(dt.month, 2);
case "LLL":
return month("short", true);
case "LLLL":
return month("long", true);
case "LLLLL":
return month("narrow", true);
case "M":
return useDateTimeFormatter ? string({ month: "numeric" }, "month") : this.num(dt.month);
case "MM":
return useDateTimeFormatter ? string({ month: "2-digit" }, "month") : this.num(dt.month, 2);
case "MMM":
return month("short", false);
case "MMMM":
return month("long", false);
case "MMMMM":
return month("narrow", false);
case "y":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year);
case "yy":
return useDateTimeFormatter ? string({ year: "2-digit" }, "year") : this.num(dt.year.toString().slice(-2), 2);
case "yyyy":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 4);
case "yyyyyy":
return useDateTimeFormatter ? string({ year: "numeric" }, "year") : this.num(dt.year, 6);
case "G":
return era("short");
case "GG":
return era("long");
case "GGGGG":
return era("narrow");
case "kk":
return this.num(dt.weekYear.toString().slice(-2), 2);
case "kkkk":
return this.num(dt.weekYear, 4);
case "W":
return this.num(dt.weekNumber);
case "WW":
return this.num(dt.weekNumber, 2);
case "n":
return this.num(dt.localWeekNumber);
case "nn":
return this.num(dt.localWeekNumber, 2);
case "ii":
return this.num(dt.localWeekYear.toString().slice(-2), 2);
case "iiii":
return this.num(dt.localWeekYear, 4);
case "o":
return this.num(dt.ordinal);
case "ooo":
return this.num(dt.ordinal, 3);
case "q":
return this.num(dt.quarter);
case "qq":
return this.num(dt.quarter, 2);
case "X":
return this.num(Math.floor(dt.ts / 1e3));
case "x":
return this.num(dt.ts);
default:
return maybeMacro(token);
}
};
return stringifyTokens(_Formatter.parseFormat(fmt), tokenToString);
}
formatDurationFromString(dur, fmt) {
const tokenToField = (token) => {
switch (token[0]) {
case "S":
return "millisecond";
case "s":
return "second";
case "m":
return "minute";
case "h":
return "hour";
case "d":
return "day";
case "w":
return "week";
case "M":
return "month";
case "y":
return "year";
default:
return null;
}
}, tokenToString = (lildur) => (token) => {
const mapped = tokenToField(token);
if (mapped) {
return this.num(lildur.get(mapped), token.length);
} else {
return token;
}
}, tokens = _Formatter.parseFormat(fmt), realTokens = tokens.reduce(
(found, { literal, val }) => literal ? found : found.concat(val),
[]
), collapsed = dur.shiftTo(...realTokens.map(tokenToField).filter((t) => t));
return stringifyTokens(tokens, tokenToString(collapsed));
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/regexParser.js
var ianaRegex = /[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;
function combineRegexes(...regexes) {
const full = regexes.reduce((f, r) => f + r.source, "");
return RegExp(`^${full}$`);
}
function combineExtractors(...extractors) {
return (m) => extractors.reduce(
([mergedVals, mergedZone, cursor], ex) => {
const [val, zone, next] = ex(m, cursor);
return [{ ...mergedVals, ...val }, zone || mergedZone, next];
},
[{}, null, 1]
).slice(0, 2);
}
function parse(s2, ...patterns) {
if (s2 == null) {
return [null, null];
}
for (const [regex, extractor] of patterns) {
const m = regex.exec(s2);
if (m) {
return extractor(m);
}
}
return [null, null];
}
function simpleParse(...keys) {
return (match2, cursor) => {
const ret = {};
let i;
for (i = 0; i < keys.length; i++) {
ret[keys[i]] = parseInteger(match2[cursor + i]);
}
return [ret, null, cursor + i];
};
}
var offsetRegex = /(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/;
var isoExtendedZone = `(?:${offsetRegex.source}?(?:\\[(${ianaRegex.source})\\])?)?`;
var isoTimeBaseRegex = /(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/;
var isoTimeRegex = RegExp(`${isoTimeBaseRegex.source}${isoExtendedZone}`);
var isoTimeExtensionRegex = RegExp(`(?:T${isoTimeRegex.source})?`);
var isoYmdRegex = /([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/;
var isoWeekRegex = /(\d{4})-?W(\d\d)(?:-?(\d))?/;
var isoOrdinalRegex = /(\d{4})-?(\d{3})/;
var extractISOWeekData = simpleParse("weekYear", "weekNumber", "weekDay");
var extractISOOrdinalData = simpleParse("year", "ordinal");
var sqlYmdRegex = /(\d{4})-(\d\d)-(\d\d)/;
var sqlTimeRegex = RegExp(
`${isoTimeBaseRegex.source} ?(?:${offsetRegex.source}|(${ianaRegex.source}))?`
);
var sqlTimeExtensionRegex = RegExp(`(?: ${sqlTimeRegex.source})?`);
function int(match2, pos, fallback) {
const m = match2[pos];
return isUndefined(m) ? fallback : parseInteger(m);
}
function extractISOYmd(match2, cursor) {
const item = {
year: int(match2, cursor),
month: int(match2, cursor + 1, 1),
day: int(match2, cursor + 2, 1)
};
return [item, null, cursor + 3];
}
function extractISOTime(match2, cursor) {
const item = {
hours: int(match2, cursor, 0),
minutes: int(match2, cursor + 1, 0),
seconds: int(match2, cursor + 2, 0),
milliseconds: parseMillis(match2[cursor + 3])
};
return [item, null, cursor + 4];
}
function extractISOOffset(match2, cursor) {
const local = !match2[cursor] && !match2[cursor + 1], fullOffset = signedOffset(match2[cursor + 1], match2[cursor + 2]), zone = local ? null : FixedOffsetZone.instance(fullOffset);
return [{}, zone, cursor + 3];
}
function extractIANAZone(match2, cursor) {
const zone = match2[cursor] ? IANAZone.create(match2[cursor]) : null;
return [{}, zone, cursor + 1];
}
var isoTimeOnly = RegExp(`^T?${isoTimeBaseRegex.source}$`);
var isoDuration = /^-?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 extractISODuration(match2) {
const [s2, yearStr, monthStr, weekStr, dayStr, hourStr, minuteStr, secondStr, millisecondsStr] = match2;
const hasNegativePrefix = s2[0] === "-";
const negativeSeconds = secondStr && secondStr[0] === "-";
const maybeNegate = (num, force = false) => num !== void 0 && (force || num && hasNegativePrefix) ? -num : num;
return [
{
years: maybeNegate(parseFloating(yearStr)),
months: maybeNegate(parseFloating(monthStr)),
weeks: maybeNegate(parseFloating(weekStr)),
days: maybeNegate(parseFloating(dayStr)),
hours: maybeNegate(parseFloating(hourStr)),
minutes: maybeNegate(parseFloating(minuteStr)),
seconds: maybeNegate(parseFloating(secondStr), secondStr === "-0"),
milliseconds: maybeNegate(parseMillis(millisecondsStr), negativeSeconds)
}
];
}
var obsOffsets = {
GMT: 0,
EDT: -4 * 60,
EST: -5 * 60,
CDT: -5 * 60,
CST: -6 * 60,
MDT: -6 * 60,
MST: -7 * 60,
PDT: -7 * 60,
PST: -8 * 60
};
function fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr) {
const result = {
year: yearStr.length === 2 ? untruncateYear(parseInteger(yearStr)) : parseInteger(yearStr),
month: monthsShort.indexOf(monthStr) + 1,
day: parseInteger(dayStr),
hour: parseInteger(hourStr),
minute: parseInteger(minuteStr)
};
if (secondStr)
result.second = parseInteger(secondStr);
if (weekdayStr) {
result.weekday = weekdayStr.length > 3 ? weekdaysLong.indexOf(weekdayStr) + 1 : weekdaysShort.indexOf(weekdayStr) + 1;
}
return result;
}
var rfc2822 = /^(?:(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 extractRFC2822(match2) {
const [
,
weekdayStr,
dayStr,
monthStr,
yearStr,
hourStr,
minuteStr,
secondStr,
obsOffset,
milOffset,
offHourStr,
offMinuteStr
] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
let offset2;
if (obsOffset) {
offset2 = obsOffsets[obsOffset];
} else if (milOffset) {
offset2 = 0;
} else {
offset2 = signedOffset(offHourStr, offMinuteStr);
}
return [result, new FixedOffsetZone(offset2)];
}
function preprocessRFC2822(s2) {
return s2.replace(/\([^()]*\)|[\n\t]/g, " ").replace(/(\s\s+)/g, " ").trim();
}
var rfc1123 = /^(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$/;
var rfc850 = /^(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$/;
var ascii = /^(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 extractRFC1123Or850(match2) {
const [, weekdayStr, dayStr, monthStr, yearStr, hourStr, minuteStr, secondStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone.utcInstance];
}
function extractASCII(match2) {
const [, weekdayStr, monthStr, dayStr, hourStr, minuteStr, secondStr, yearStr] = match2, result = fromStrings(weekdayStr, yearStr, monthStr, dayStr, hourStr, minuteStr, secondStr);
return [result, FixedOffsetZone.utcInstance];
}
var isoYmdWithTimeExtensionRegex = combineRegexes(isoYmdRegex, isoTimeExtensionRegex);
var isoWeekWithTimeExtensionRegex = combineRegexes(isoWeekRegex, isoTimeExtensionRegex);
var isoOrdinalWithTimeExtensionRegex = combineRegexes(isoOrdinalRegex, isoTimeExtensionRegex);
var isoTimeCombinedRegex = combineRegexes(isoTimeRegex);
var extractISOYmdTimeAndOffset = combineExtractors(
extractISOYmd,
extractISOTime,
extractISOOffset,
extractIANAZone
);
var extractISOWeekTimeAndOffset = combineExtractors(
extractISOWeekData,
extractISOTime,
extractISOOffset,
extractIANAZone
);
var extractISOOrdinalDateAndTime = combineExtractors(
extractISOOrdinalData,
extractISOTime,
extractISOOffset,
extractIANAZone
);
var extractISOTimeAndOffset = combineExtractors(
extractISOTime,
extractISOOffset,
extractIANAZone
);
function parseISODate(s2) {
return parse(
s2,
[isoYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],
[isoWeekWithTimeExtensionRegex, extractISOWeekTimeAndOffset],
[isoOrdinalWithTimeExtensionRegex, extractISOOrdinalDateAndTime],
[isoTimeCombinedRegex, extractISOTimeAndOffset]
);
}
function parseRFC2822Date(s2) {
return parse(preprocessRFC2822(s2), [rfc2822, extractRFC2822]);
}
function parseHTTPDate(s2) {
return parse(
s2,
[rfc1123, extractRFC1123Or850],
[rfc850, extractRFC1123Or850],
[ascii, extractASCII]
);
}
function parseISODuration(s2) {
return parse(s2, [isoDuration, extractISODuration]);
}
var extractISOTimeOnly = combineExtractors(extractISOTime);
function parseISOTimeOnly(s2) {
return parse(s2, [isoTimeOnly, extractISOTimeOnly]);
}
var sqlYmdWithTimeExtensionRegex = combineRegexes(sqlYmdRegex, sqlTimeExtensionRegex);
var sqlTimeCombinedRegex = combineRegexes(sqlTimeRegex);
var extractISOTimeOffsetAndIANAZone = combineExtractors(
extractISOTime,
extractISOOffset,
extractIANAZone
);
function parseSQL(s2) {
return parse(
s2,
[sqlYmdWithTimeExtensionRegex, extractISOYmdTimeAndOffset],
[sqlTimeCombinedRegex, extractISOTimeOffsetAndIANAZone]
);
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/duration.js
var INVALID = "Invalid Duration";
var lowOrderMatrix = {
weeks: {
days: 7,
hours: 7 * 24,
minutes: 7 * 24 * 60,
seconds: 7 * 24 * 60 * 60,
milliseconds: 7 * 24 * 60 * 60 * 1e3
},
days: {
hours: 24,
minutes: 24 * 60,
seconds: 24 * 60 * 60,
milliseconds: 24 * 60 * 60 * 1e3
},
hours: { minutes: 60, seconds: 60 * 60, milliseconds: 60 * 60 * 1e3 },
minutes: { seconds: 60, milliseconds: 60 * 1e3 },
seconds: { milliseconds: 1e3 }
};
var casualMatrix = {
years: {
quarters: 4,
months: 12,
weeks: 52,
days: 365,
hours: 365 * 24,
minutes: 365 * 24 * 60,
seconds: 365 * 24 * 60 * 60,
milliseconds: 365 * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: 13,
days: 91,
hours: 91 * 24,
minutes: 91 * 24 * 60,
seconds: 91 * 24 * 60 * 60,
milliseconds: 91 * 24 * 60 * 60 * 1e3
},
months: {
weeks: 4,
days: 30,
hours: 30 * 24,
minutes: 30 * 24 * 60,
seconds: 30 * 24 * 60 * 60,
milliseconds: 30 * 24 * 60 * 60 * 1e3
},
...lowOrderMatrix
};
var daysInYearAccurate = 146097 / 400;
var daysInMonthAccurate = 146097 / 4800;
var accurateMatrix = {
years: {
quarters: 4,
months: 12,
weeks: daysInYearAccurate / 7,
days: daysInYearAccurate,
hours: daysInYearAccurate * 24,
minutes: daysInYearAccurate * 24 * 60,
seconds: daysInYearAccurate * 24 * 60 * 60,
milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3
},
quarters: {
months: 3,
weeks: daysInYearAccurate / 28,
days: daysInYearAccurate / 4,
hours: daysInYearAccurate * 24 / 4,
minutes: daysInYearAccurate * 24 * 60 / 4,
seconds: daysInYearAccurate * 24 * 60 * 60 / 4,
milliseconds: daysInYearAccurate * 24 * 60 * 60 * 1e3 / 4
},
months: {
weeks: daysInMonthAccurate / 7,
days: daysInMonthAccurate,
hours: daysInMonthAccurate * 24,
minutes: daysInMonthAccurate * 24 * 60,
seconds: daysInMonthAccurate * 24 * 60 * 60,
milliseconds: daysInMonthAccurate * 24 * 60 * 60 * 1e3
},
...lowOrderMatrix
};
var orderedUnits = [
"years",
"quarters",
"months",
"weeks",
"days",
"hours",
"minutes",
"seconds",
"milliseconds"
];
var reverseUnits = orderedUnits.slice(0).reverse();
function clone(dur, alts, clear = false) {
const conf = {
values: clear ? alts.values : { ...dur.values, ...alts.values || {} },
loc: dur.loc.clone(alts.loc),
conversionAccuracy: alts.conversionAccuracy || dur.conversionAccuracy,
matrix: alts.matrix || dur.matrix
};
return new Duration(conf);
}
function durationToMillis(matrix, vals) {
var _a;
let sum = (_a = vals.milliseconds) != null ? _a : 0;
for (const unit of reverseUnits.slice(1)) {
if (vals[unit]) {
sum += vals[unit] * matrix[unit]["milliseconds"];
}
}
return sum;
}
function normalizeValues(matrix, vals) {
const factor = durationToMillis(matrix, vals) < 0 ? -1 : 1;
orderedUnits.reduceRight((previous, current2) => {
if (!isUndefined(vals[current2])) {
if (previous) {
const previousVal = vals[previous] * factor;
const conv = matrix[current2][previous];
const rollUp = Math.floor(previousVal / conv);
vals[current2] += rollUp * factor;
vals[previous] -= rollUp * conv * factor;
}
return current2;
} else {
return previous;
}
}, null);
orderedUnits.reduce((previous, current2) => {
if (!isUndefined(vals[current2])) {
if (previous) {
const fraction = vals[previous] % 1;
vals[previous] -= fraction;
vals[current2] += fraction * matrix[previous][current2];
}
return current2;
} else {
return previous;
}
}, null);
}
function removeZeroes(vals) {
const newVals = {};
for (const [key2, value] of Object.entries(vals)) {
if (value !== 0) {
newVals[key2] = value;
}
}
return newVals;
}
var Duration = class _Duration {
/**
* @private
*/
constructor(config) {
const accurate = config.conversionAccuracy === "longterm" || false;
let matrix = accurate ? accurateMatrix : casualMatrix;
if (config.matrix) {
matrix = config.matrix;
}
this.values = config.values;
this.loc = config.loc || Locale.create();
this.conversionAccuracy = accurate ? "longterm" : "casual";
this.invalid = config.invalid || null;
this.matrix = matrix;
this.isLuxonDuration = true;
}
/**
* Create Duration from a number of milliseconds.
* @param {number} count of milliseconds
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @return {Duration}
*/
static fromMillis(count, opts) {
return _Duration.fromObject({ milliseconds: count }, opts);
}
/**
* Create a Duration from a JavaScript object with keys like 'years' and 'hours'.
* If this object is empty then a zero milliseconds duration is returned.
* @param {Object} obj - the object to create the DateTime from
* @param {number} obj.years
* @param {number} obj.quarters
* @param {number} obj.months
* @param {number} obj.weeks
* @param {number} obj.days
* @param {number} obj.hours
* @param {number} obj.minutes
* @param {number} obj.seconds
* @param {number} obj.milliseconds
* @param {Object} [opts=[]] - options for creating this Duration
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the custom conversion system to use
* @return {Duration}
*/
static fromObject(obj, opts = {}) {
if (obj == null || typeof obj !== "object") {
throw new InvalidArgumentError(
`Duration.fromObject: argument expected to be an object, got ${obj === null ? "null" : typeof obj}`
);
}
return new _Duration({
values: normalizeObject(obj, _Duration.normalizeUnit),
loc: Locale.fromObject(opts),
conversionAccuracy: opts.conversionAccuracy,
matrix: opts.matrix
});
}
/**
* Create a Duration from DurationLike.
*
* @param {Object | number | Duration} durationLike
* One of:
* - object with keys like 'years' and 'hours'.
* - number representing milliseconds
* - Duration instance
* @return {Duration}
*/
static fromDurationLike(durationLike) {
if (isNumber(durationLike)) {
return _Duration.fromMillis(durationLike);
} else if (_Duration.isDuration(durationLike)) {
return durationLike;
} else if (typeof durationLike === "object") {
return _Duration.fromObject(durationLike);
} else {
throw new InvalidArgumentError(
`Unknown duration argument ${durationLike} of type ${typeof durationLike}`
);
}
}
/**
* Create a Duration from an ISO 8601 duration string.
* @param {string} text - text to parse
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the preset conversion system to use
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations
* @example Duration.fromISO('P3Y6M1W4DT12H30M5S').toObject() //=> { years: 3, months: 6, weeks: 1, days: 4, hours: 12, minutes: 30, seconds: 5 }
* @example Duration.fromISO('PT23H').toObject() //=> { hours: 23 }
* @example Duration.fromISO('P5Y3M').toObject() //=> { years: 5, months: 3 }
* @return {Duration}
*/
static fromISO(text, opts) {
const [parsed] = parseISODuration(text);
if (parsed) {
return _Duration.fromObject(parsed, opts);
} else {
return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
}
/**
* Create a Duration from an ISO 8601 time string.
* @param {string} text - text to parse
* @param {Object} opts - options for parsing
* @param {string} [opts.locale='en-US'] - the locale to use
* @param {string} opts.numberingSystem - the numbering system to use
* @param {string} [opts.conversionAccuracy='casual'] - the preset conversion system to use
* @param {string} [opts.matrix=Object] - the conversion system to use
* @see https://en.wikipedia.org/wiki/ISO_8601#Times
* @example Duration.fromISOTime('11:22:33.444').toObject() //=> { hours: 11, minutes: 22, seconds: 33, milliseconds: 444 }
* @example Duration.fromISOTime('11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('T11:00').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @example Duration.fromISOTime('T1100').toObject() //=> { hours: 11, minutes: 0, seconds: 0 }
* @return {Duration}
*/
static fromISOTime(text, opts) {
const [parsed] = parseISOTimeOnly(text);
if (parsed) {
return _Duration.fromObject(parsed, opts);
} else {
return _Duration.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
}
/**
* Create an invalid Duration.
* @param {string} reason - simple string of why this datetime is invalid. Should not contain parameters or anything else data-dependent
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {Duration}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError("need to specify a reason the Duration is invalid");
}
const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
if (Settings.throwOnInvalid) {
throw new InvalidDurationError(invalid);
} else {
return new _Duration({ invalid });
}
}
/**
* @private
*/
static normalizeUnit(unit) {
const normalized = {
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"
}[unit ? unit.toLowerCase() : unit];
if (!normalized)
throw new InvalidUnitError(unit);
return normalized;
}
/**
* Check if an object is a Duration. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isDuration(o) {
return o && o.isLuxonDuration || false;
}
/**
* Get the locale of a Duration, such 'en-GB'
* @type {string}
*/
get locale() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a Duration, such 'beng'. The numbering system is used when formatting the Duration
*
* @type {string}
*/
get numberingSystem() {
return this.isValid ? this.loc.numberingSystem : null;
}
/**
* Returns a string representation of this Duration formatted according to the specified format string. You may use these tokens:
* * `S` for milliseconds
* * `s` for seconds
* * `m` for minutes
* * `h` for hours
* * `d` for days
* * `w` for weeks
* * `M` for months
* * `y` for years
* Notes:
* * Add padding by repeating the token, e.g. "yy" pads the years to two digits, "hhhh" pads the hours out to four digits
* * Tokens can be escaped by wrapping with single quotes.
* * The duration will be converted to the set of units in the format string using {@link Duration#shiftTo} and the Durations's conversion accuracy setting.
* @param {string} fmt - the format string
* @param {Object} opts - options
* @param {boolean} [opts.floor=true] - floor numerical values
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("y d s") //=> "1 6 2"
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("yy dd sss") //=> "01 06 002"
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toFormat("M S") //=> "12 518402000"
* @return {string}
*/
toFormat(fmt, opts = {}) {
const fmtOpts = {
...opts,
floor: opts.round !== false && opts.floor !== false
};
return this.isValid ? Formatter.create(this.loc, fmtOpts).formatDurationFromString(this, fmt) : INVALID;
}
/**
* Returns a string representation of a Duration with all units included.
* To modify its behavior, use `listStyle` and any Intl.NumberFormat option, though `unitDisplay` is especially relevant.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat#options
* @param {Object} opts - Formatting options. Accepts the same keys as the options parameter of the native `Intl.NumberFormat` constructor, as well as `listStyle`.
* @param {string} [opts.listStyle='narrow'] - How to format the merged list. Corresponds to the `style` property of the options parameter of the native `Intl.ListFormat` constructor.
* @example
* ```js
* var dur = Duration.fromObject({ days: 1, hours: 5, minutes: 6 })
* dur.toHuman() //=> '1 day, 5 hours, 6 minutes'
* dur.toHuman({ listStyle: "long" }) //=> '1 day, 5 hours, and 6 minutes'
* dur.toHuman({ unitDisplay: "short" }) //=> '1 day, 5 hr, 6 min'
* ```
*/
toHuman(opts = {}) {
if (!this.isValid)
return INVALID;
const l2 = orderedUnits.map((unit) => {
const val = this.values[unit];
if (isUndefined(val)) {
return null;
}
return this.loc.numberFormatter({ style: "unit", unitDisplay: "long", ...opts, unit: unit.slice(0, -1) }).format(val);
}).filter((n2) => n2);
return this.loc.listFormatter({ type: "conjunction", style: opts.listStyle || "narrow", ...opts }).format(l2);
}
/**
* Returns a JavaScript object with this Duration's values.
* @example Duration.fromObject({ years: 1, days: 6, seconds: 2 }).toObject() //=> { years: 1, days: 6, seconds: 2 }
* @return {Object}
*/
toObject() {
if (!this.isValid)
return {};
return { ...this.values };
}
/**
* Returns an ISO 8601-compliant string representation of this Duration.
* @see https://en.wikipedia.org/wiki/ISO_8601#Durations
* @example Duration.fromObject({ years: 3, seconds: 45 }).toISO() //=> 'P3YT45S'
* @example Duration.fromObject({ months: 4, seconds: 45 }).toISO() //=> 'P4MT45S'
* @example Duration.fromObject({ months: 5 }).toISO() //=> 'P5M'
* @example Duration.fromObject({ minutes: 5 }).toISO() //=> 'PT5M'
* @example Duration.fromObject({ milliseconds: 6 }).toISO() //=> 'PT0.006S'
* @return {string}
*/
toISO() {
if (!this.isValid)
return null;
let s2 = "P";
if (this.years !== 0)
s2 += this.years + "Y";
if (this.months !== 0 || this.quarters !== 0)
s2 += this.months + this.quarters * 3 + "M";
if (this.weeks !== 0)
s2 += this.weeks + "W";
if (this.days !== 0)
s2 += this.days + "D";
if (this.hours !== 0 || this.minutes !== 0 || this.seconds !== 0 || this.milliseconds !== 0)
s2 += "T";
if (this.hours !== 0)
s2 += this.hours + "H";
if (this.minutes !== 0)
s2 += this.minutes + "M";
if (this.seconds !== 0 || this.milliseconds !== 0)
s2 += roundTo(this.seconds + this.milliseconds / 1e3, 3) + "S";
if (s2 === "P")
s2 += "T0S";
return s2;
}
/**
* Returns an ISO 8601-compliant string representation of this Duration, formatted as a time of day.
* Note that this will return null if the duration is invalid, negative, or equal to or greater than 24 hours.
* @see https://en.wikipedia.org/wiki/ISO_8601#Times
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includePrefix=false] - include the `T` prefix
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example Duration.fromObject({ hours: 11 }).toISOTime() //=> '11:00:00.000'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressMilliseconds: true }) //=> '11:00:00'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ suppressSeconds: true }) //=> '11:00'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ includePrefix: true }) //=> 'T11:00:00.000'
* @example Duration.fromObject({ hours: 11 }).toISOTime({ format: 'basic' }) //=> '110000.000'
* @return {string}
*/
toISOTime(opts = {}) {
if (!this.isValid)
return null;
const millis = this.toMillis();
if (millis < 0 || millis >= 864e5)
return null;
opts = {
suppressMilliseconds: false,
suppressSeconds: false,
includePrefix: false,
format: "extended",
...opts,
includeOffset: false
};
const dateTime = DateTime.fromMillis(millis, { zone: "UTC" });
return dateTime.toISOTime(opts);
}
/**
* Returns an ISO 8601 representation of this Duration appropriate for use in JSON.
* @return {string}
*/
toJSON() {
return this.toISO();
}
/**
* Returns an ISO 8601 representation of this Duration appropriate for use in debugging.
* @return {string}
*/
toString() {
return this.toISO();
}
/**
* Returns a string representation of this Duration appropriate for the REPL.
* @return {string}
*/
[Symbol.for("nodejs.util.inspect.custom")]() {
if (this.isValid) {
return `Duration { values: ${JSON.stringify(this.values)} }`;
} else {
return `Duration { Invalid, reason: ${this.invalidReason} }`;
}
}
/**
* Returns an milliseconds value of this Duration.
* @return {number}
*/
toMillis() {
if (!this.isValid)
return NaN;
return durationToMillis(this.matrix, this.values);
}
/**
* Returns an milliseconds value of this Duration. Alias of {@link toMillis}
* @return {number}
*/
valueOf() {
return this.toMillis();
}
/**
* Make this Duration longer by the specified amount. Return a newly-constructed Duration.
* @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @return {Duration}
*/
plus(duration) {
if (!this.isValid)
return this;
const dur = _Duration.fromDurationLike(duration), result = {};
for (const k of orderedUnits) {
if (hasOwnProperty(dur.values, k) || hasOwnProperty(this.values, k)) {
result[k] = dur.get(k) + this.get(k);
}
}
return clone(this, { values: result }, true);
}
/**
* Make this Duration shorter by the specified amount. Return a newly-constructed Duration.
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @return {Duration}
*/
minus(duration) {
if (!this.isValid)
return this;
const dur = _Duration.fromDurationLike(duration);
return this.plus(dur.negate());
}
/**
* Scale this Duration by the specified amount. Return a newly-constructed Duration.
* @param {function} fn - The function to apply to each unit. Arity is 1 or 2: the value of the unit and, optionally, the unit name. Must return a number.
* @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits(x => x * 2) //=> { hours: 2, minutes: 60 }
* @example Duration.fromObject({ hours: 1, minutes: 30 }).mapUnits((x, u) => u === "hours" ? x * 2 : x) //=> { hours: 2, minutes: 30 }
* @return {Duration}
*/
mapUnits(fn) {
if (!this.isValid)
return this;
const result = {};
for (const k of Object.keys(this.values)) {
result[k] = asNumber(fn(this.values[k], k));
}
return clone(this, { values: result }, true);
}
/**
* Get the value of unit.
* @param {string} unit - a unit such as 'minute' or 'day'
* @example Duration.fromObject({years: 2, days: 3}).get('years') //=> 2
* @example Duration.fromObject({years: 2, days: 3}).get('months') //=> 0
* @example Duration.fromObject({years: 2, days: 3}).get('days') //=> 3
* @return {number}
*/
get(unit) {
return this[_Duration.normalizeUnit(unit)];
}
/**
* "Set" the values of specified units. Return a newly-constructed Duration.
* @param {Object} values - a mapping of units to numbers
* @example dur.set({ years: 2017 })
* @example dur.set({ hours: 8, minutes: 30 })
* @return {Duration}
*/
set(values) {
if (!this.isValid)
return this;
const mixed = { ...this.values, ...normalizeObject(values, _Duration.normalizeUnit) };
return clone(this, { values: mixed });
}
/**
* "Set" the locale and/or numberingSystem. Returns a newly-constructed Duration.
* @example dur.reconfigure({ locale: 'en-GB' })
* @return {Duration}
*/
reconfigure({ locale, numberingSystem, conversionAccuracy, matrix } = {}) {
const loc = this.loc.clone({ locale, numberingSystem });
const opts = { loc, matrix, conversionAccuracy };
return clone(this, opts);
}
/**
* Return the length of the duration in the specified unit.
* @param {string} unit - a unit such as 'minutes' or 'days'
* @example Duration.fromObject({years: 1}).as('days') //=> 365
* @example Duration.fromObject({years: 1}).as('months') //=> 12
* @example Duration.fromObject({hours: 60}).as('days') //=> 2.5
* @return {number}
*/
as(unit) {
return this.isValid ? this.shiftTo(unit).get(unit) : NaN;
}
/**
* Reduce this Duration to its canonical representation in its current units.
* Assuming the overall value of the Duration is positive, this means:
* - excessive values for lower-order units are converted to higher-order units (if possible, see first and second example)
* - negative lower-order units are converted to higher order units (there must be such a higher order unit, otherwise
* the overall value would be negative, see third example)
* - fractional values for higher-order units are converted to lower-order units (if possible, see fourth example)
*
* If the overall value is negative, the result of this method is equivalent to `this.negate().normalize().negate()`.
* @example Duration.fromObject({ years: 2, days: 5000 }).normalize().toObject() //=> { years: 15, days: 255 }
* @example Duration.fromObject({ days: 5000 }).normalize().toObject() //=> { days: 5000 }
* @example Duration.fromObject({ hours: 12, minutes: -45 }).normalize().toObject() //=> { hours: 11, minutes: 15 }
* @example Duration.fromObject({ years: 2.5, days: 0, hours: 0 }).normalize().toObject() //=> { years: 2, days: 182, hours: 12 }
* @return {Duration}
*/
normalize() {
if (!this.isValid)
return this;
const vals = this.toObject();
normalizeValues(this.matrix, vals);
return clone(this, { values: vals }, true);
}
/**
* Rescale units to its largest representation
* @example Duration.fromObject({ milliseconds: 90000 }).rescale().toObject() //=> { minutes: 1, seconds: 30 }
* @return {Duration}
*/
rescale() {
if (!this.isValid)
return this;
const vals = removeZeroes(this.normalize().shiftToAll().toObject());
return clone(this, { values: vals }, true);
}
/**
* Convert this Duration into its representation in a different set of units.
* @example Duration.fromObject({ hours: 1, seconds: 30 }).shiftTo('minutes', 'milliseconds').toObject() //=> { minutes: 60, milliseconds: 30000 }
* @return {Duration}
*/
shiftTo(...units) {
if (!this.isValid)
return this;
if (units.length === 0) {
return this;
}
units = units.map((u) => _Duration.normalizeUnit(u));
const built = {}, accumulated = {}, vals = this.toObject();
let lastUnit;
for (const k of orderedUnits) {
if (units.indexOf(k) >= 0) {
lastUnit = k;
let own = 0;
for (const ak in accumulated) {
own += this.matrix[ak][k] * accumulated[ak];
accumulated[ak] = 0;
}
if (isNumber(vals[k])) {
own += vals[k];
}
const i = Math.trunc(own);
built[k] = i;
accumulated[k] = (own * 1e3 - i * 1e3) / 1e3;
} else if (isNumber(vals[k])) {
accumulated[k] = vals[k];
}
}
for (const key2 in accumulated) {
if (accumulated[key2] !== 0) {
built[lastUnit] += key2 === lastUnit ? accumulated[key2] : accumulated[key2] / this.matrix[lastUnit][key2];
}
}
normalizeValues(this.matrix, built);
return clone(this, { values: built }, true);
}
/**
* Shift this Duration to all available units.
* Same as shiftTo("years", "months", "weeks", "days", "hours", "minutes", "seconds", "milliseconds")
* @return {Duration}
*/
shiftToAll() {
if (!this.isValid)
return this;
return this.shiftTo(
"years",
"months",
"weeks",
"days",
"hours",
"minutes",
"seconds",
"milliseconds"
);
}
/**
* Return the negative of this Duration.
* @example Duration.fromObject({ hours: 1, seconds: 30 }).negate().toObject() //=> { hours: -1, seconds: -30 }
* @return {Duration}
*/
negate() {
if (!this.isValid)
return this;
const negated = {};
for (const k of Object.keys(this.values)) {
negated[k] = this.values[k] === 0 ? 0 : -this.values[k];
}
return clone(this, { values: negated }, true);
}
/**
* Get the years.
* @type {number}
*/
get years() {
return this.isValid ? this.values.years || 0 : NaN;
}
/**
* Get the quarters.
* @type {number}
*/
get quarters() {
return this.isValid ? this.values.quarters || 0 : NaN;
}
/**
* Get the months.
* @type {number}
*/
get months() {
return this.isValid ? this.values.months || 0 : NaN;
}
/**
* Get the weeks
* @type {number}
*/
get weeks() {
return this.isValid ? this.values.weeks || 0 : NaN;
}
/**
* Get the days.
* @type {number}
*/
get days() {
return this.isValid ? this.values.days || 0 : NaN;
}
/**
* Get the hours.
* @type {number}
*/
get hours() {
return this.isValid ? this.values.hours || 0 : NaN;
}
/**
* Get the minutes.
* @type {number}
*/
get minutes() {
return this.isValid ? this.values.minutes || 0 : NaN;
}
/**
* Get the seconds.
* @return {number}
*/
get seconds() {
return this.isValid ? this.values.seconds || 0 : NaN;
}
/**
* Get the milliseconds.
* @return {number}
*/
get milliseconds() {
return this.isValid ? this.values.milliseconds || 0 : NaN;
}
/**
* Returns whether the Duration is invalid. Invalid durations are returned by diff operations
* on invalid DateTimes or Intervals.
* @return {boolean}
*/
get isValid() {
return this.invalid === null;
}
/**
* Returns an error code if this Duration became invalid, or null if the Duration is valid
* @return {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Duration became invalid, or null if the Duration is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Equality check
* Two Durations are equal iff they have the same units and the same values for each unit.
* @param {Duration} other
* @return {boolean}
*/
equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
if (!this.loc.equals(other.loc)) {
return false;
}
function eq(v1, v2) {
if (v1 === void 0 || v1 === 0)
return v2 === void 0 || v2 === 0;
return v1 === v2;
}
for (const u of orderedUnits) {
if (!eq(this.values[u], other.values[u])) {
return false;
}
}
return true;
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/interval.js
var INVALID2 = "Invalid Interval";
function validateStartEnd(start, end) {
if (!start || !start.isValid) {
return Interval.invalid("missing or invalid start");
} else if (!end || !end.isValid) {
return Interval.invalid("missing or invalid end");
} else if (end < start) {
return Interval.invalid(
"end before start",
`The end of an interval must be after its start, but you had start=${start.toISO()} and end=${end.toISO()}`
);
} else {
return null;
}
}
var Interval = class _Interval {
/**
* @private
*/
constructor(config) {
this.s = config.start;
this.e = config.end;
this.invalid = config.invalid || null;
this.isLuxonInterval = true;
}
/**
* Create an invalid Interval.
* @param {string} reason - simple string of why this Interval is invalid. Should not contain parameters or anything else data-dependent
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {Interval}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError("need to specify a reason the Interval is invalid");
}
const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
if (Settings.throwOnInvalid) {
throw new InvalidIntervalError(invalid);
} else {
return new _Interval({ invalid });
}
}
/**
* Create an Interval from a start DateTime and an end DateTime. Inclusive of the start but not the end.
* @param {DateTime|Date|Object} start
* @param {DateTime|Date|Object} end
* @return {Interval}
*/
static fromDateTimes(start, end) {
const builtStart = friendlyDateTime(start), builtEnd = friendlyDateTime(end);
const validateError = validateStartEnd(builtStart, builtEnd);
if (validateError == null) {
return new _Interval({
start: builtStart,
end: builtEnd
});
} else {
return validateError;
}
}
/**
* Create an Interval from a start DateTime and a Duration to extend to.
* @param {DateTime|Date|Object} start
* @param {Duration|Object|number} duration - the length of the Interval.
* @return {Interval}
*/
static after(start, duration) {
const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(start);
return _Interval.fromDateTimes(dt, dt.plus(dur));
}
/**
* Create an Interval from an end DateTime and a Duration to extend backwards to.
* @param {DateTime|Date|Object} end
* @param {Duration|Object|number} duration - the length of the Interval.
* @return {Interval}
*/
static before(end, duration) {
const dur = Duration.fromDurationLike(duration), dt = friendlyDateTime(end);
return _Interval.fromDateTimes(dt.minus(dur), dt);
}
/**
* Create an Interval from an ISO 8601 string.
* Accepts `<start>/<end>`, `<start>/<duration>`, and `<duration>/<end>` formats.
* @param {string} text - the ISO string to parse
* @param {Object} [opts] - options to pass {@link DateTime#fromISO} and optionally {@link Duration#fromISO}
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @return {Interval}
*/
static fromISO(text, opts) {
const [s2, e] = (text || "").split("/", 2);
if (s2 && e) {
let start, startIsValid;
try {
start = DateTime.fromISO(s2, opts);
startIsValid = start.isValid;
} catch (e2) {
startIsValid = false;
}
let end, endIsValid;
try {
end = DateTime.fromISO(e, opts);
endIsValid = end.isValid;
} catch (e2) {
endIsValid = false;
}
if (startIsValid && endIsValid) {
return _Interval.fromDateTimes(start, end);
}
if (startIsValid) {
const dur = Duration.fromISO(e, opts);
if (dur.isValid) {
return _Interval.after(start, dur);
}
} else if (endIsValid) {
const dur = Duration.fromISO(s2, opts);
if (dur.isValid) {
return _Interval.before(end, dur);
}
}
}
return _Interval.invalid("unparsable", `the input "${text}" can't be parsed as ISO 8601`);
}
/**
* Check if an object is an Interval. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isInterval(o) {
return o && o.isLuxonInterval || false;
}
/**
* Returns the start of the Interval
* @type {DateTime}
*/
get start() {
return this.isValid ? this.s : null;
}
/**
* Returns the end of the Interval
* @type {DateTime}
*/
get end() {
return this.isValid ? this.e : null;
}
/**
* Returns the last DateTime included in the interval (since end is not part of the interval)
* @type {DateTime}
*/
get lastDateTime() {
return this.isValid ? this.e ? this.e.minus(1) : null : null;
}
/**
* Returns whether this Interval's end is at least its start, meaning that the Interval isn't 'backwards'.
* @type {boolean}
*/
get isValid() {
return this.invalidReason === null;
}
/**
* Returns an error code if this Interval is invalid, or null if the Interval is valid
* @type {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this Interval became invalid, or null if the Interval is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Returns the length of the Interval in the specified unit.
* @param {string} unit - the unit (such as 'hours' or 'days') to return the length in.
* @return {number}
*/
length(unit = "milliseconds") {
return this.isValid ? this.toDuration(...[unit]).get(unit) : NaN;
}
/**
* Returns the count of minutes, hours, days, months, or years included in the Interval, even in part.
* Unlike {@link Interval#length} this counts sections of the calendar, not periods of time, e.g. specifying 'day'
* asks 'what dates are included in this interval?', not 'how many days long is this interval?'
* @param {string} [unit='milliseconds'] - the unit of time to count.
* @param {Object} opts - options
* @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; this operation will always use the locale of the start DateTime
* @return {number}
*/
count(unit = "milliseconds", opts) {
if (!this.isValid)
return NaN;
const start = this.start.startOf(unit, opts);
let end;
if (opts == null ? void 0 : opts.useLocaleWeeks) {
end = this.end.reconfigure({ locale: start.locale });
} else {
end = this.end;
}
end = end.startOf(unit, opts);
return Math.floor(end.diff(start, unit).get(unit)) + (end.valueOf() !== this.end.valueOf());
}
/**
* Returns whether this Interval's start and end are both in the same unit of time
* @param {string} unit - the unit of time to check sameness on
* @return {boolean}
*/
hasSame(unit) {
return this.isValid ? this.isEmpty() || this.e.minus(1).hasSame(this.s, unit) : false;
}
/**
* Return whether this Interval has the same start and end DateTimes.
* @return {boolean}
*/
isEmpty() {
return this.s.valueOf() === this.e.valueOf();
}
/**
* Return whether this Interval's start is after the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
isAfter(dateTime) {
if (!this.isValid)
return false;
return this.s > dateTime;
}
/**
* Return whether this Interval's end is before the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
isBefore(dateTime) {
if (!this.isValid)
return false;
return this.e <= dateTime;
}
/**
* Return whether this Interval contains the specified DateTime.
* @param {DateTime} dateTime
* @return {boolean}
*/
contains(dateTime) {
if (!this.isValid)
return false;
return this.s <= dateTime && this.e > dateTime;
}
/**
* "Sets" the start and/or end dates. Returns a newly-constructed Interval.
* @param {Object} values - the values to set
* @param {DateTime} values.start - the starting DateTime
* @param {DateTime} values.end - the ending DateTime
* @return {Interval}
*/
set({ start, end } = {}) {
if (!this.isValid)
return this;
return _Interval.fromDateTimes(start || this.s, end || this.e);
}
/**
* Split this Interval at each of the specified DateTimes
* @param {...DateTime} dateTimes - the unit of time to count.
* @return {Array}
*/
splitAt(...dateTimes) {
if (!this.isValid)
return [];
const sorted = dateTimes.map(friendlyDateTime).filter((d) => this.contains(d)).sort((a, b) => a.toMillis() - b.toMillis()), results = [];
let { s: s2 } = this, i = 0;
while (s2 < this.e) {
const added = sorted[i] || this.e, next = +added > +this.e ? this.e : added;
results.push(_Interval.fromDateTimes(s2, next));
s2 = next;
i += 1;
}
return results;
}
/**
* Split this Interval into smaller Intervals, each of the specified length.
* Left over time is grouped into a smaller interval
* @param {Duration|Object|number} duration - The length of each resulting interval.
* @return {Array}
*/
splitBy(duration) {
const dur = Duration.fromDurationLike(duration);
if (!this.isValid || !dur.isValid || dur.as("milliseconds") === 0) {
return [];
}
let { s: s2 } = this, idx = 1, next;
const results = [];
while (s2 < this.e) {
const added = this.start.plus(dur.mapUnits((x) => x * idx));
next = +added > +this.e ? this.e : added;
results.push(_Interval.fromDateTimes(s2, next));
s2 = next;
idx += 1;
}
return results;
}
/**
* Split this Interval into the specified number of smaller intervals.
* @param {number} numberOfParts - The number of Intervals to divide the Interval into.
* @return {Array}
*/
divideEqually(numberOfParts) {
if (!this.isValid)
return [];
return this.splitBy(this.length() / numberOfParts).slice(0, numberOfParts);
}
/**
* Return whether this Interval overlaps with the specified Interval
* @param {Interval} other
* @return {boolean}
*/
overlaps(other) {
return this.e > other.s && this.s < other.e;
}
/**
* Return whether this Interval's end is adjacent to the specified Interval's start.
* @param {Interval} other
* @return {boolean}
*/
abutsStart(other) {
if (!this.isValid)
return false;
return +this.e === +other.s;
}
/**
* Return whether this Interval's start is adjacent to the specified Interval's end.
* @param {Interval} other
* @return {boolean}
*/
abutsEnd(other) {
if (!this.isValid)
return false;
return +other.e === +this.s;
}
/**
* Returns true if this Interval fully contains the specified Interval, specifically if the intersect (of this Interval and the other Interval) is equal to the other Interval; false otherwise.
* @param {Interval} other
* @return {boolean}
*/
engulfs(other) {
if (!this.isValid)
return false;
return this.s <= other.s && this.e >= other.e;
}
/**
* Return whether this Interval has the same start and end as the specified Interval.
* @param {Interval} other
* @return {boolean}
*/
equals(other) {
if (!this.isValid || !other.isValid) {
return false;
}
return this.s.equals(other.s) && this.e.equals(other.e);
}
/**
* Return an Interval representing the intersection of this Interval and the specified Interval.
* Specifically, the resulting Interval has the maximum start time and the minimum end time of the two Intervals.
* Returns null if the intersection is empty, meaning, the intervals don't intersect.
* @param {Interval} other
* @return {Interval}
*/
intersection(other) {
if (!this.isValid)
return this;
const s2 = this.s > other.s ? this.s : other.s, e = this.e < other.e ? this.e : other.e;
if (s2 >= e) {
return null;
} else {
return _Interval.fromDateTimes(s2, e);
}
}
/**
* Return an Interval representing the union of this Interval and the specified Interval.
* Specifically, the resulting Interval has the minimum start time and the maximum end time of the two Intervals.
* @param {Interval} other
* @return {Interval}
*/
union(other) {
if (!this.isValid)
return this;
const s2 = this.s < other.s ? this.s : other.s, e = this.e > other.e ? this.e : other.e;
return _Interval.fromDateTimes(s2, e);
}
/**
* Merge an array of Intervals into an equivalent minimal set of Intervals.
* Combines overlapping and adjacent Intervals.
* The resulting array will contain the Intervals in ascending order, that is, starting with the earliest Interval
* and ending with the latest.
*
* @param {Array} intervals
* @return {Array}
*/
static merge(intervals) {
const [found, final] = intervals.sort((a, b) => a.s - b.s).reduce(
([sofar, current2], item) => {
if (!current2) {
return [sofar, item];
} else if (current2.overlaps(item) || current2.abutsStart(item)) {
return [sofar, current2.union(item)];
} else {
return [sofar.concat([current2]), item];
}
},
[[], null]
);
if (final) {
found.push(final);
}
return found;
}
/**
* Return an array of Intervals representing the spans of time that only appear in one of the specified Intervals.
* @param {Array} intervals
* @return {Array}
*/
static xor(intervals) {
let start = null, currentCount = 0;
const results = [], ends = intervals.map((i) => [
{ time: i.s, type: "s" },
{ time: i.e, type: "e" }
]), flattened = Array.prototype.concat(...ends), arr = flattened.sort((a, b) => a.time - b.time);
for (const i of arr) {
currentCount += i.type === "s" ? 1 : -1;
if (currentCount === 1) {
start = i.time;
} else {
if (start && +start !== +i.time) {
results.push(_Interval.fromDateTimes(start, i.time));
}
start = null;
}
}
return _Interval.merge(results);
}
/**
* Return an Interval representing the span of time in this Interval that doesn't overlap with any of the specified Intervals.
* @param {...Interval} intervals
* @return {Array}
*/
difference(...intervals) {
return _Interval.xor([this].concat(intervals)).map((i) => this.intersection(i)).filter((i) => i && !i.isEmpty());
}
/**
* Returns a string representation of this Interval appropriate for debugging.
* @return {string}
*/
toString() {
if (!this.isValid)
return INVALID2;
return `[${this.s.toISO()} \u2013 ${this.e.toISO()})`;
}
/**
* Returns a string representation of this Interval appropriate for the REPL.
* @return {string}
*/
[Symbol.for("nodejs.util.inspect.custom")]() {
if (this.isValid) {
return `Interval { start: ${this.s.toISO()}, end: ${this.e.toISO()} }`;
} else {
return `Interval { Invalid, reason: ${this.invalidReason} }`;
}
}
/**
* Returns a localized string representing this Interval. Accepts the same options as the
* Intl.DateTimeFormat constructor and any presets defined by Luxon, such as
* {@link DateTime.DATE_FULL} or {@link DateTime.TIME_SIMPLE}. The exact behavior of this method
* is browser-specific, but in general it will return an appropriate representation of the
* Interval in the assigned locale. Defaults to the system's locale if no locale has been
* specified.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {Object} [formatOpts=DateTime.DATE_SHORT] - Either a DateTime preset or
* Intl.DateTimeFormat constructor options.
* @param {Object} opts - Options to override the configuration of the start DateTime.
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(); //=> 11/7/2022 11/8/2022
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL); //=> November 7 8, 2022
* @example Interval.fromISO('2022-11-07T09:00Z/2022-11-08T09:00Z').toLocaleString(DateTime.DATE_FULL, { locale: 'fr-FR' }); //=> 78 novembre 2022
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString(DateTime.TIME_SIMPLE); //=> 6:00 8:00 PM
* @example Interval.fromISO('2022-11-07T17:00Z/2022-11-07T19:00Z').toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> Mon, Nov 07, 6:00 8:00 p
* @return {string}
*/
toLocaleString(formatOpts = DATE_SHORT, opts = {}) {
return this.isValid ? Formatter.create(this.s.loc.clone(opts), formatOpts).formatInterval(this) : INVALID2;
}
/**
* Returns an ISO 8601-compliant string representation of this Interval.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @param {Object} opts - The same options as {@link DateTime#toISO}
* @return {string}
*/
toISO(opts) {
if (!this.isValid)
return INVALID2;
return `${this.s.toISO(opts)}/${this.e.toISO(opts)}`;
}
/**
* Returns an ISO 8601-compliant string representation of date of this Interval.
* The time components are ignored.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @return {string}
*/
toISODate() {
if (!this.isValid)
return INVALID2;
return `${this.s.toISODate()}/${this.e.toISODate()}`;
}
/**
* Returns an ISO 8601-compliant string representation of time of this Interval.
* The date components are ignored.
* @see https://en.wikipedia.org/wiki/ISO_8601#Time_intervals
* @param {Object} opts - The same options as {@link DateTime#toISO}
* @return {string}
*/
toISOTime(opts) {
if (!this.isValid)
return INVALID2;
return `${this.s.toISOTime(opts)}/${this.e.toISOTime(opts)}`;
}
/**
* Returns a string representation of this Interval formatted according to the specified format
* string. **You may not want this.** See {@link Interval#toLocaleString} for a more flexible
* formatting tool.
* @param {string} dateFormat - The format string. This string formats the start and end time.
* See {@link DateTime#toFormat} for details.
* @param {Object} opts - Options.
* @param {string} [opts.separator = ' '] - A separator to place between the start and end
* representations.
* @return {string}
*/
toFormat(dateFormat, { separator = " \u2013 " } = {}) {
if (!this.isValid)
return INVALID2;
return `${this.s.toFormat(dateFormat)}${separator}${this.e.toFormat(dateFormat)}`;
}
/**
* Return a Duration representing the time spanned by this interval.
* @param {string|string[]} [unit=['milliseconds']] - the unit or units (such as 'hours' or 'days') to include in the duration.
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @example Interval.fromDateTimes(dt1, dt2).toDuration().toObject() //=> { milliseconds: 88489257 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration('days').toObject() //=> { days: 1.0241812152777778 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes']).toObject() //=> { hours: 24, minutes: 34.82095 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration(['hours', 'minutes', 'seconds']).toObject() //=> { hours: 24, minutes: 34, seconds: 49.257 }
* @example Interval.fromDateTimes(dt1, dt2).toDuration('seconds').toObject() //=> { seconds: 88489.257 }
* @return {Duration}
*/
toDuration(unit, opts) {
if (!this.isValid) {
return Duration.invalid(this.invalidReason);
}
return this.e.diff(this.s, unit, opts);
}
/**
* Run mapFn on the interval start and end, returning a new Interval from the resulting DateTimes
* @param {function} mapFn
* @return {Interval}
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.toUTC())
* @example Interval.fromDateTimes(dt1, dt2).mapEndpoints(endpoint => endpoint.plus({ hours: 2 }))
*/
mapEndpoints(mapFn) {
return _Interval.fromDateTimes(mapFn(this.s), mapFn(this.e));
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/info.js
var Info = class {
/**
* Return whether the specified zone contains a DST.
* @param {string|Zone} [zone='local'] - Zone to check. Defaults to the environment's local zone.
* @return {boolean}
*/
static hasDST(zone = Settings.defaultZone) {
const proto = DateTime.now().setZone(zone).set({ month: 12 });
return !zone.isUniversal && proto.offset !== proto.set({ month: 6 }).offset;
}
/**
* Return whether the specified zone is a valid IANA specifier.
* @param {string} zone - Zone to check
* @return {boolean}
*/
static isValidIANAZone(zone) {
return IANAZone.isValidZone(zone);
}
/**
* Converts the input into a {@link Zone} instance.
*
* * If `input` is already a Zone instance, it is returned unchanged.
* * If `input` is a string containing a valid time zone name, a Zone instance
* with that name is returned.
* * If `input` is a string that doesn't refer to a known time zone, a Zone
* instance with {@link Zone#isValid} == false is returned.
* * If `input is a number, a Zone instance with the specified fixed offset
* in minutes is returned.
* * If `input` is `null` or `undefined`, the default zone is returned.
* @param {string|Zone|number} [input] - the value to be converted
* @return {Zone}
*/
static normalizeZone(input) {
return normalizeZone(input, Settings.defaultZone);
}
/**
* Get the weekday on which the week starts according to the given locale.
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.locObj=null] - an existing locale object to use
* @returns {number} the start of the week, 1 for Monday through 7 for Sunday
*/
static getStartOfWeek({ locale = null, locObj = null } = {}) {
return (locObj || Locale.create(locale)).getStartOfWeek();
}
/**
* Get the minimum number of days necessary in a week before it is considered part of the next year according
* to the given locale.
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.locObj=null] - an existing locale object to use
* @returns {number}
*/
static getMinimumDaysInFirstWeek({ locale = null, locObj = null } = {}) {
return (locObj || Locale.create(locale)).getMinDaysInFirstWeek();
}
/**
* Get the weekdays, which are considered the weekend according to the given locale
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.locObj=null] - an existing locale object to use
* @returns {number[]} an array of weekdays, 1 for Monday through 7 for Sunday
*/
static getWeekendWeekdays({ locale = null, locObj = null } = {}) {
return (locObj || Locale.create(locale)).getWeekendDays().slice();
}
/**
* Return an array of standalone month names.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @param {string} [opts.outputCalendar='gregory'] - the calendar
* @example Info.months()[0] //=> 'January'
* @example Info.months('short')[0] //=> 'Jan'
* @example Info.months('numeric')[0] //=> '1'
* @example Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'
* @example Info.months('numeric', { locale: 'ar' })[0] //=> '١'
* @example Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'
* @return {Array}
*/
static months(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length);
}
/**
* Return an array of format month names.
* Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that
* changes the string.
* See {@link Info#months}
* @param {string} [length='long'] - the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @param {string} [opts.outputCalendar='gregory'] - the calendar
* @return {Array}
*/
static monthsFormat(length = "long", { locale = null, numberingSystem = null, locObj = null, outputCalendar = "gregory" } = {}) {
return (locObj || Locale.create(locale, numberingSystem, outputCalendar)).months(length, true);
}
/**
* Return an array of standalone week names.
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param {string} [length='long'] - the length of the weekday representation, such as "narrow", "short", "long".
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @example Info.weekdays()[0] //=> 'Monday'
* @example Info.weekdays('short')[0] //=> 'Mon'
* @example Info.weekdays('short', { locale: 'fr-CA' })[0] //=> 'lun.'
* @example Info.weekdays('short', { locale: 'ar' })[0] //=> 'الاثنين'
* @return {Array}
*/
static weekdays(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length);
}
/**
* Return an array of format week names.
* Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that
* changes the string.
* See {@link Info#weekdays}
* @param {string} [length='long'] - the length of the month representation, such as "narrow", "short", "long".
* @param {Object} opts - options
* @param {string} [opts.locale=null] - the locale code
* @param {string} [opts.numberingSystem=null] - the numbering system
* @param {string} [opts.locObj=null] - an existing locale object to use
* @return {Array}
*/
static weekdaysFormat(length = "long", { locale = null, numberingSystem = null, locObj = null } = {}) {
return (locObj || Locale.create(locale, numberingSystem, null)).weekdays(length, true);
}
/**
* Return an array of meridiems.
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @example Info.meridiems() //=> [ 'AM', 'PM' ]
* @example Info.meridiems({ locale: 'my' }) //=> [ 'နံနက်', 'ညနေ' ]
* @return {Array}
*/
static meridiems({ locale = null } = {}) {
return Locale.create(locale).meridiems();
}
/**
* Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.
* @param {string} [length='short'] - the length of the era representation, such as "short" or "long".
* @param {Object} opts - options
* @param {string} [opts.locale] - the locale code
* @example Info.eras() //=> [ 'BC', 'AD' ]
* @example Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]
* @example Info.eras('long', { locale: 'fr' }) //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]
* @return {Array}
*/
static eras(length = "short", { locale = null } = {}) {
return Locale.create(locale, null, "gregory").eras(length);
}
/**
* Return the set of available features in this environment.
* Some features of Luxon are not available in all environments. For example, on older browsers, relative time formatting support is not available. Use this function to figure out if that's the case.
* Keys:
* * `relative`: whether this environment supports relative time formatting
* * `localeWeek`: whether this environment supports different weekdays for the start of the week based on the locale
* @example Info.features() //=> { relative: false, localeWeek: true }
* @return {Object}
*/
static features() {
return { relative: hasRelative(), localeWeek: hasLocaleWeekInfo() };
}
};
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/diff.js
function dayDiff(earlier, later) {
const utcDayStart = (dt) => dt.toUTC(0, { keepLocalTime: true }).startOf("day").valueOf(), ms = utcDayStart(later) - utcDayStart(earlier);
return Math.floor(Duration.fromMillis(ms).as("days"));
}
function highOrderDiffs(cursor, later, units) {
const differs = [
["years", (a, b) => b.year - a.year],
["quarters", (a, b) => b.quarter - a.quarter + (b.year - a.year) * 4],
["months", (a, b) => b.month - a.month + (b.year - a.year) * 12],
[
"weeks",
(a, b) => {
const days = dayDiff(a, b);
return (days - days % 7) / 7;
}
],
["days", dayDiff]
];
const results = {};
const earlier = cursor;
let lowestOrder, highWater;
for (const [unit, differ] of differs) {
if (units.indexOf(unit) >= 0) {
lowestOrder = unit;
results[unit] = differ(cursor, later);
highWater = earlier.plus(results);
if (highWater > later) {
results[unit]--;
cursor = earlier.plus(results);
if (cursor > later) {
highWater = cursor;
results[unit]--;
cursor = earlier.plus(results);
}
} else {
cursor = highWater;
}
}
}
return [cursor, results, highWater, lowestOrder];
}
function diff_default(earlier, later, units, opts) {
let [cursor, results, highWater, lowestOrder] = highOrderDiffs(earlier, later, units);
const remainingMillis = later - cursor;
const lowerOrderUnits = units.filter(
(u) => ["hours", "minutes", "seconds", "milliseconds"].indexOf(u) >= 0
);
if (lowerOrderUnits.length === 0) {
if (highWater < later) {
highWater = cursor.plus({ [lowestOrder]: 1 });
}
if (highWater !== cursor) {
results[lowestOrder] = (results[lowestOrder] || 0) + remainingMillis / (highWater - cursor);
}
}
const duration = Duration.fromObject(results, opts);
if (lowerOrderUnits.length > 0) {
return Duration.fromMillis(remainingMillis, opts).shiftTo(...lowerOrderUnits).plus(duration);
} else {
return duration;
}
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/impl/tokenParser.js
var MISSING_FTP = "missing Intl.DateTimeFormat.formatToParts support";
function intUnit(regex, post = (i) => i) {
return { regex, deser: ([s2]) => post(parseDigits(s2)) };
}
var NBSP = String.fromCharCode(160);
var spaceOrNBSP = `[ ${NBSP}]`;
var spaceOrNBSPRegExp = new RegExp(spaceOrNBSP, "g");
function fixListRegex(s2) {
return s2.replace(/\./g, "\\.?").replace(spaceOrNBSPRegExp, spaceOrNBSP);
}
function stripInsensitivities(s2) {
return s2.replace(/\./g, "").replace(spaceOrNBSPRegExp, " ").toLowerCase();
}
function oneOf(strings, startIndex) {
if (strings === null) {
return null;
} else {
return {
regex: RegExp(strings.map(fixListRegex).join("|")),
deser: ([s2]) => strings.findIndex((i) => stripInsensitivities(s2) === stripInsensitivities(i)) + startIndex
};
}
}
function offset(regex, groups) {
return { regex, deser: ([, h, m]) => signedOffset(h, m), groups };
}
function simple(regex) {
return { regex, deser: ([s2]) => s2 };
}
function escapeToken(value) {
return value.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g, "\\$&");
}
function unitForToken(token, loc) {
const one = digitRegex(loc), two = digitRegex(loc, "{2}"), three = digitRegex(loc, "{3}"), four = digitRegex(loc, "{4}"), six = digitRegex(loc, "{6}"), oneOrTwo = digitRegex(loc, "{1,2}"), oneToThree = digitRegex(loc, "{1,3}"), oneToSix = digitRegex(loc, "{1,6}"), oneToNine = digitRegex(loc, "{1,9}"), twoToFour = digitRegex(loc, "{2,4}"), fourToSix = digitRegex(loc, "{4,6}"), literal = (t) => ({ regex: RegExp(escapeToken(t.val)), deser: ([s2]) => s2, literal: true }), unitate = (t) => {
if (token.literal) {
return literal(t);
}
switch (t.val) {
case "G":
return oneOf(loc.eras("short"), 0);
case "GG":
return oneOf(loc.eras("long"), 0);
case "y":
return intUnit(oneToSix);
case "yy":
return intUnit(twoToFour, untruncateYear);
case "yyyy":
return intUnit(four);
case "yyyyy":
return intUnit(fourToSix);
case "yyyyyy":
return intUnit(six);
case "M":
return intUnit(oneOrTwo);
case "MM":
return intUnit(two);
case "MMM":
return oneOf(loc.months("short", true), 1);
case "MMMM":
return oneOf(loc.months("long", true), 1);
case "L":
return intUnit(oneOrTwo);
case "LL":
return intUnit(two);
case "LLL":
return oneOf(loc.months("short", false), 1);
case "LLLL":
return oneOf(loc.months("long", false), 1);
case "d":
return intUnit(oneOrTwo);
case "dd":
return intUnit(two);
case "o":
return intUnit(oneToThree);
case "ooo":
return intUnit(three);
case "HH":
return intUnit(two);
case "H":
return intUnit(oneOrTwo);
case "hh":
return intUnit(two);
case "h":
return intUnit(oneOrTwo);
case "mm":
return intUnit(two);
case "m":
return intUnit(oneOrTwo);
case "q":
return intUnit(oneOrTwo);
case "qq":
return intUnit(two);
case "s":
return intUnit(oneOrTwo);
case "ss":
return intUnit(two);
case "S":
return intUnit(oneToThree);
case "SSS":
return intUnit(three);
case "u":
return simple(oneToNine);
case "uu":
return simple(oneOrTwo);
case "uuu":
return intUnit(one);
case "a":
return oneOf(loc.meridiems(), 0);
case "kkkk":
return intUnit(four);
case "kk":
return intUnit(twoToFour, untruncateYear);
case "W":
return intUnit(oneOrTwo);
case "WW":
return intUnit(two);
case "E":
case "c":
return intUnit(one);
case "EEE":
return oneOf(loc.weekdays("short", false), 1);
case "EEEE":
return oneOf(loc.weekdays("long", false), 1);
case "ccc":
return oneOf(loc.weekdays("short", true), 1);
case "cccc":
return oneOf(loc.weekdays("long", true), 1);
case "Z":
case "ZZ":
return offset(new RegExp(`([+-]${oneOrTwo.source})(?::(${two.source}))?`), 2);
case "ZZZ":
return offset(new RegExp(`([+-]${oneOrTwo.source})(${two.source})?`), 2);
case "z":
return simple(/[a-z_+-/]{1,256}?/i);
case " ":
return simple(/[^\S\n\r]/);
default:
return literal(t);
}
};
const unit = unitate(token) || {
invalidReason: MISSING_FTP
};
unit.token = token;
return unit;
}
var partTypeStyleToTokenVal = {
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 tokenForPart(part, formatOpts, resolvedOpts) {
const { type, value } = part;
if (type === "literal") {
const isSpace = /^\s+$/.test(value);
return {
literal: !isSpace,
val: isSpace ? " " : value
};
}
const style = formatOpts[type];
let actualType = type;
if (type === "hour") {
if (formatOpts.hour12 != null) {
actualType = formatOpts.hour12 ? "hour12" : "hour24";
} else if (formatOpts.hourCycle != null) {
if (formatOpts.hourCycle === "h11" || formatOpts.hourCycle === "h12") {
actualType = "hour12";
} else {
actualType = "hour24";
}
} else {
actualType = resolvedOpts.hour12 ? "hour12" : "hour24";
}
}
let val = partTypeStyleToTokenVal[actualType];
if (typeof val === "object") {
val = val[style];
}
if (val) {
return {
literal: false,
val
};
}
return void 0;
}
function buildRegex(units) {
const re = units.map((u) => u.regex).reduce((f, r) => `${f}(${r.source})`, "");
return [`^${re}$`, units];
}
function match(input, regex, handlers) {
const matches = input.match(regex);
if (matches) {
const all = {};
let matchIndex = 1;
for (const i in handlers) {
if (hasOwnProperty(handlers, i)) {
const h = handlers[i], groups = h.groups ? h.groups + 1 : 1;
if (!h.literal && h.token) {
all[h.token.val[0]] = h.deser(matches.slice(matchIndex, matchIndex + groups));
}
matchIndex += groups;
}
}
return [matches, all];
} else {
return [matches, {}];
}
}
function dateTimeFromMatches(matches) {
const toField = (token) => {
switch (token) {
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 zone = null;
let specificOffset;
if (!isUndefined(matches.z)) {
zone = IANAZone.create(matches.z);
}
if (!isUndefined(matches.Z)) {
if (!zone) {
zone = new FixedOffsetZone(matches.Z);
}
specificOffset = matches.Z;
}
if (!isUndefined(matches.q)) {
matches.M = (matches.q - 1) * 3 + 1;
}
if (!isUndefined(matches.h)) {
if (matches.h < 12 && matches.a === 1) {
matches.h += 12;
} else if (matches.h === 12 && matches.a === 0) {
matches.h = 0;
}
}
if (matches.G === 0 && matches.y) {
matches.y = -matches.y;
}
if (!isUndefined(matches.u)) {
matches.S = parseMillis(matches.u);
}
const vals = Object.keys(matches).reduce((r, k) => {
const f = toField(k);
if (f) {
r[f] = matches[k];
}
return r;
}, {});
return [vals, zone, specificOffset];
}
var dummyDateTimeCache = null;
function getDummyDateTime() {
if (!dummyDateTimeCache) {
dummyDateTimeCache = DateTime.fromMillis(1555555555555);
}
return dummyDateTimeCache;
}
function maybeExpandMacroToken(token, locale) {
if (token.literal) {
return token;
}
const formatOpts = Formatter.macroTokenToFormatOpts(token.val);
const tokens = formatOptsToTokens(formatOpts, locale);
if (tokens == null || tokens.includes(void 0)) {
return token;
}
return tokens;
}
function expandMacroTokens(tokens, locale) {
return Array.prototype.concat(...tokens.map((t) => maybeExpandMacroToken(t, locale)));
}
var TokenParser = class {
constructor(locale, format) {
this.locale = locale;
this.format = format;
this.tokens = expandMacroTokens(Formatter.parseFormat(format), locale);
this.units = this.tokens.map((t) => unitForToken(t, locale));
this.disqualifyingUnit = this.units.find((t) => t.invalidReason);
if (!this.disqualifyingUnit) {
const [regexString, handlers] = buildRegex(this.units);
this.regex = RegExp(regexString, "i");
this.handlers = handlers;
}
}
explainFromTokens(input) {
if (!this.isValid) {
return { input, tokens: this.tokens, invalidReason: this.invalidReason };
} else {
const [rawMatches, matches] = match(input, this.regex, this.handlers), [result, zone, specificOffset] = matches ? dateTimeFromMatches(matches) : [null, null, void 0];
if (hasOwnProperty(matches, "a") && hasOwnProperty(matches, "H")) {
throw new ConflictingSpecificationError(
"Can't include meridiem when specifying 24-hour format"
);
}
return {
input,
tokens: this.tokens,
regex: this.regex,
rawMatches,
matches,
result,
zone,
specificOffset
};
}
}
get isValid() {
return !this.disqualifyingUnit;
}
get invalidReason() {
return this.disqualifyingUnit ? this.disqualifyingUnit.invalidReason : null;
}
};
function explainFromTokens(locale, input, format) {
const parser = new TokenParser(locale, format);
return parser.explainFromTokens(input);
}
function parseFromTokens(locale, input, format) {
const { result, zone, specificOffset, invalidReason } = explainFromTokens(locale, input, format);
return [result, zone, specificOffset, invalidReason];
}
function formatOptsToTokens(formatOpts, locale) {
if (!formatOpts) {
return null;
}
const formatter = Formatter.create(locale, formatOpts);
const df = formatter.dtFormatter(getDummyDateTime());
const parts = df.formatToParts();
const resolvedOpts = df.resolvedOptions();
return parts.map((p) => tokenForPart(p, formatOpts, resolvedOpts));
}
// node_modules/.pnpm/luxon@3.6.1/node_modules/luxon/src/datetime.js
var INVALID3 = "Invalid DateTime";
var MAX_DATE = 864e13;
function unsupportedZone(zone) {
return new Invalid("unsupported zone", `the zone "${zone.name}" is not supported`);
}
function possiblyCachedWeekData(dt) {
if (dt.weekData === null) {
dt.weekData = gregorianToWeek(dt.c);
}
return dt.weekData;
}
function possiblyCachedLocalWeekData(dt) {
if (dt.localWeekData === null) {
dt.localWeekData = gregorianToWeek(
dt.c,
dt.loc.getMinDaysInFirstWeek(),
dt.loc.getStartOfWeek()
);
}
return dt.localWeekData;
}
function clone2(inst, alts) {
const current2 = {
ts: inst.ts,
zone: inst.zone,
c: inst.c,
o: inst.o,
loc: inst.loc,
invalid: inst.invalid
};
return new DateTime({ ...current2, ...alts, old: current2 });
}
function fixOffset(localTS, o, tz) {
let utcGuess = localTS - o * 60 * 1e3;
const o2 = tz.offset(utcGuess);
if (o === o2) {
return [utcGuess, o];
}
utcGuess -= (o2 - o) * 60 * 1e3;
const o3 = tz.offset(utcGuess);
if (o2 === o3) {
return [utcGuess, o2];
}
return [localTS - Math.min(o2, o3) * 60 * 1e3, Math.max(o2, o3)];
}
function tsToObj(ts, offset2) {
ts += offset2 * 60 * 1e3;
const d = new Date(ts);
return {
year: d.getUTCFullYear(),
month: d.getUTCMonth() + 1,
day: d.getUTCDate(),
hour: d.getUTCHours(),
minute: d.getUTCMinutes(),
second: d.getUTCSeconds(),
millisecond: d.getUTCMilliseconds()
};
}
function objToTS(obj, offset2, zone) {
return fixOffset(objToLocalTS(obj), offset2, zone);
}
function adjustTime(inst, dur) {
const oPre = inst.o, year = inst.c.year + Math.trunc(dur.years), month = inst.c.month + Math.trunc(dur.months) + Math.trunc(dur.quarters) * 3, c = {
...inst.c,
year,
month,
day: Math.min(inst.c.day, daysInMonth(year, month)) + Math.trunc(dur.days) + Math.trunc(dur.weeks) * 7
}, millisToAdd = Duration.fromObject({
years: dur.years - Math.trunc(dur.years),
quarters: dur.quarters - Math.trunc(dur.quarters),
months: dur.months - Math.trunc(dur.months),
weeks: dur.weeks - Math.trunc(dur.weeks),
days: dur.days - Math.trunc(dur.days),
hours: dur.hours,
minutes: dur.minutes,
seconds: dur.seconds,
milliseconds: dur.milliseconds
}).as("milliseconds"), localTS = objToLocalTS(c);
let [ts, o] = fixOffset(localTS, oPre, inst.zone);
if (millisToAdd !== 0) {
ts += millisToAdd;
o = inst.zone.offset(ts);
}
return { ts, o };
}
function parseDataToDateTime(parsed, parsedZone, opts, format, text, specificOffset) {
const { setZone, zone } = opts;
if (parsed && Object.keys(parsed).length !== 0 || parsedZone) {
const interpretationZone = parsedZone || zone, inst = DateTime.fromObject(parsed, {
...opts,
zone: interpretationZone,
specificOffset
});
return setZone ? inst : inst.setZone(zone);
} else {
return DateTime.invalid(
new Invalid("unparsable", `the input "${text}" can't be parsed as ${format}`)
);
}
}
function toTechFormat(dt, format, allowZ = true) {
return dt.isValid ? Formatter.create(Locale.create("en-US"), {
allowZ,
forceSimple: true
}).formatDateTimeFromString(dt, format) : null;
}
function toISODate(o, extended) {
const longFormat = o.c.year > 9999 || o.c.year < 0;
let c = "";
if (longFormat && o.c.year >= 0)
c += "+";
c += padStart(o.c.year, longFormat ? 6 : 4);
if (extended) {
c += "-";
c += padStart(o.c.month);
c += "-";
c += padStart(o.c.day);
} else {
c += padStart(o.c.month);
c += padStart(o.c.day);
}
return c;
}
function toISOTime(o, extended, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone) {
let c = padStart(o.c.hour);
if (extended) {
c += ":";
c += padStart(o.c.minute);
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
c += ":";
}
} else {
c += padStart(o.c.minute);
}
if (o.c.millisecond !== 0 || o.c.second !== 0 || !suppressSeconds) {
c += padStart(o.c.second);
if (o.c.millisecond !== 0 || !suppressMilliseconds) {
c += ".";
c += padStart(o.c.millisecond, 3);
}
}
if (includeOffset) {
if (o.isOffsetFixed && o.offset === 0 && !extendedZone) {
c += "Z";
} else if (o.o < 0) {
c += "-";
c += padStart(Math.trunc(-o.o / 60));
c += ":";
c += padStart(Math.trunc(-o.o % 60));
} else {
c += "+";
c += padStart(Math.trunc(o.o / 60));
c += ":";
c += padStart(Math.trunc(o.o % 60));
}
}
if (extendedZone) {
c += "[" + o.zone.ianaName + "]";
}
return c;
}
var defaultUnitValues = {
month: 1,
day: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultWeekUnitValues = {
weekNumber: 1,
weekday: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var defaultOrdinalUnitValues = {
ordinal: 1,
hour: 0,
minute: 0,
second: 0,
millisecond: 0
};
var orderedUnits2 = ["year", "month", "day", "hour", "minute", "second", "millisecond"];
var orderedWeekUnits = [
"weekYear",
"weekNumber",
"weekday",
"hour",
"minute",
"second",
"millisecond"
];
var orderedOrdinalUnits = ["year", "ordinal", "hour", "minute", "second", "millisecond"];
function normalizeUnit(unit) {
const normalized = {
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"
}[unit.toLowerCase()];
if (!normalized)
throw new InvalidUnitError(unit);
return normalized;
}
function normalizeUnitWithLocalWeeks(unit) {
switch (unit.toLowerCase()) {
case "localweekday":
case "localweekdays":
return "localWeekday";
case "localweeknumber":
case "localweeknumbers":
return "localWeekNumber";
case "localweekyear":
case "localweekyears":
return "localWeekYear";
default:
return normalizeUnit(unit);
}
}
function guessOffsetForZone(zone) {
if (zoneOffsetTs === void 0) {
zoneOffsetTs = Settings.now();
}
if (zone.type !== "iana") {
return zone.offset(zoneOffsetTs);
}
const zoneName = zone.name;
let offsetGuess = zoneOffsetGuessCache.get(zoneName);
if (offsetGuess === void 0) {
offsetGuess = zone.offset(zoneOffsetTs);
zoneOffsetGuessCache.set(zoneName, offsetGuess);
}
return offsetGuess;
}
function quickDT(obj, opts) {
const zone = normalizeZone(opts.zone, Settings.defaultZone);
if (!zone.isValid) {
return DateTime.invalid(unsupportedZone(zone));
}
const loc = Locale.fromObject(opts);
let ts, o;
if (!isUndefined(obj.year)) {
for (const u of orderedUnits2) {
if (isUndefined(obj[u])) {
obj[u] = defaultUnitValues[u];
}
}
const invalid = hasInvalidGregorianData(obj) || hasInvalidTimeData(obj);
if (invalid) {
return DateTime.invalid(invalid);
}
const offsetProvis = guessOffsetForZone(zone);
[ts, o] = objToTS(obj, offsetProvis, zone);
} else {
ts = Settings.now();
}
return new DateTime({ ts, zone, loc, o });
}
function diffRelative(start, end, opts) {
const round = isUndefined(opts.round) ? true : opts.round, format = (c, unit) => {
c = roundTo(c, round || opts.calendary ? 0 : 2, true);
const formatter = end.loc.clone(opts).relFormatter(opts);
return formatter.format(c, unit);
}, differ = (unit) => {
if (opts.calendary) {
if (!end.hasSame(start, unit)) {
return end.startOf(unit).diff(start.startOf(unit), unit).get(unit);
} else
return 0;
} else {
return end.diff(start, unit).get(unit);
}
};
if (opts.unit) {
return format(differ(opts.unit), opts.unit);
}
for (const unit of opts.units) {
const count = differ(unit);
if (Math.abs(count) >= 1) {
return format(count, unit);
}
}
return format(start > end ? -0 : 0, opts.units[opts.units.length - 1]);
}
function lastOpts(argList) {
let opts = {}, args;
if (argList.length > 0 && typeof argList[argList.length - 1] === "object") {
opts = argList[argList.length - 1];
args = Array.from(argList).slice(0, argList.length - 1);
} else {
args = Array.from(argList);
}
return [opts, args];
}
var zoneOffsetTs;
var zoneOffsetGuessCache = /* @__PURE__ */ new Map();
var DateTime = class _DateTime {
/**
* @access private
*/
constructor(config) {
const zone = config.zone || Settings.defaultZone;
let invalid = config.invalid || (Number.isNaN(config.ts) ? new Invalid("invalid input") : null) || (!zone.isValid ? unsupportedZone(zone) : null);
this.ts = isUndefined(config.ts) ? Settings.now() : config.ts;
let c = null, o = null;
if (!invalid) {
const unchanged = config.old && config.old.ts === this.ts && config.old.zone.equals(zone);
if (unchanged) {
[c, o] = [config.old.c, config.old.o];
} else {
const ot = isNumber(config.o) && !config.old ? config.o : zone.offset(this.ts);
c = tsToObj(this.ts, ot);
invalid = Number.isNaN(c.year) ? new Invalid("invalid input") : null;
c = invalid ? null : c;
o = invalid ? null : ot;
}
}
this._zone = zone;
this.loc = config.loc || Locale.create();
this.invalid = invalid;
this.weekData = null;
this.localWeekData = null;
this.c = c;
this.o = o;
this.isLuxonDateTime = true;
}
// CONSTRUCT
/**
* Create a DateTime for the current instant, in the system's time zone.
*
* Use Settings to override these default values if needed.
* @example DateTime.now().toISO() //~> now in the ISO format
* @return {DateTime}
*/
static now() {
return new _DateTime({});
}
/**
* Create a local DateTime
* @param {number} [year] - The calendar year. If omitted (as in, call `local()` with no arguments), the current time will be used
* @param {number} [month=1] - The month, 1-indexed
* @param {number} [day=1] - The day of the month, 1-indexed
* @param {number} [hour=0] - The hour of the day, in 24-hour time
* @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
* @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
* @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
* @example DateTime.local() //~> now
* @example DateTime.local({ zone: "America/New_York" }) //~> now, in US east coast time
* @example DateTime.local(2017) //~> 2017-01-01T00:00:00
* @example DateTime.local(2017, 3) //~> 2017-03-01T00:00:00
* @example DateTime.local(2017, 3, 12, { locale: "fr" }) //~> 2017-03-12T00:00:00, with a French locale
* @example DateTime.local(2017, 3, 12, 5) //~> 2017-03-12T05:00:00
* @example DateTime.local(2017, 3, 12, 5, { zone: "utc" }) //~> 2017-03-12T05:00:00, in UTC
* @example DateTime.local(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00
* @example DateTime.local(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10
* @example DateTime.local(2017, 3, 12, 5, 45, 10, 765) //~> 2017-03-12T05:45:10.765
* @return {DateTime}
*/
static local() {
const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args;
return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);
}
/**
* Create a DateTime in UTC
* @param {number} [year] - The calendar year. If omitted (as in, call `utc()` with no arguments), the current time will be used
* @param {number} [month=1] - The month, 1-indexed
* @param {number} [day=1] - The day of the month
* @param {number} [hour=0] - The hour of the day, in 24-hour time
* @param {number} [minute=0] - The minute of the hour, meaning a number between 0 and 59
* @param {number} [second=0] - The second of the minute, meaning a number between 0 and 59
* @param {number} [millisecond=0] - The millisecond of the second, meaning a number between 0 and 999
* @param {Object} options - configuration options for the DateTime
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} [options.outputCalendar] - the output calendar to set on the resulting DateTime instance
* @param {string} [options.numberingSystem] - the numbering system to set on the resulting DateTime instance
* @param {string} [options.weekSettings] - the week settings to set on the resulting DateTime instance
* @example DateTime.utc() //~> now
* @example DateTime.utc(2017) //~> 2017-01-01T00:00:00Z
* @example DateTime.utc(2017, 3) //~> 2017-03-01T00:00:00Z
* @example DateTime.utc(2017, 3, 12) //~> 2017-03-12T00:00:00Z
* @example DateTime.utc(2017, 3, 12, 5) //~> 2017-03-12T05:00:00Z
* @example DateTime.utc(2017, 3, 12, 5, 45) //~> 2017-03-12T05:45:00Z
* @example DateTime.utc(2017, 3, 12, 5, 45, { locale: "fr" }) //~> 2017-03-12T05:45:00Z with a French locale
* @example DateTime.utc(2017, 3, 12, 5, 45, 10) //~> 2017-03-12T05:45:10Z
* @example DateTime.utc(2017, 3, 12, 5, 45, 10, 765, { locale: "fr" }) //~> 2017-03-12T05:45:10.765Z with a French locale
* @return {DateTime}
*/
static utc() {
const [opts, args] = lastOpts(arguments), [year, month, day, hour, minute, second, millisecond] = args;
opts.zone = FixedOffsetZone.utcInstance;
return quickDT({ year, month, day, hour, minute, second, millisecond }, opts);
}
/**
* Create a DateTime from a JavaScript Date object. Uses the default zone.
* @param {Date} date - a JavaScript Date object
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @return {DateTime}
*/
static fromJSDate(date, options = {}) {
const ts = isDate(date) ? date.valueOf() : NaN;
if (Number.isNaN(ts)) {
return _DateTime.invalid("invalid input");
}
const zoneToUse = normalizeZone(options.zone, Settings.defaultZone);
if (!zoneToUse.isValid) {
return _DateTime.invalid(unsupportedZone(zoneToUse));
}
return new _DateTime({
ts,
zone: zoneToUse,
loc: Locale.fromObject(options)
});
}
/**
* Create a DateTime from a number of milliseconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
* @param {number} milliseconds - a number of milliseconds since 1970 UTC
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
* @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromMillis(milliseconds, options = {}) {
if (!isNumber(milliseconds)) {
throw new InvalidArgumentError(
`fromMillis requires a numerical input, but received a ${typeof milliseconds} with value ${milliseconds}`
);
} else if (milliseconds < -MAX_DATE || milliseconds > MAX_DATE) {
return _DateTime.invalid("Timestamp out of range");
} else {
return new _DateTime({
ts: milliseconds,
zone: normalizeZone(options.zone, Settings.defaultZone),
loc: Locale.fromObject(options)
});
}
}
/**
* Create a DateTime from a number of seconds since the epoch (meaning since 1 January 1970 00:00:00 UTC). Uses the default zone.
* @param {number} seconds - a number of seconds since 1970 UTC
* @param {Object} options - configuration options for the DateTime
* @param {string|Zone} [options.zone='local'] - the zone to place the DateTime into
* @param {string} [options.locale] - a locale to set on the resulting DateTime instance
* @param {string} options.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} options.numberingSystem - the numbering system to set on the resulting DateTime instance
* @param {string} options.weekSettings - the week settings to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromSeconds(seconds, options = {}) {
if (!isNumber(seconds)) {
throw new InvalidArgumentError("fromSeconds requires a numerical input");
} else {
return new _DateTime({
ts: seconds * 1e3,
zone: normalizeZone(options.zone, Settings.defaultZone),
loc: Locale.fromObject(options)
});
}
}
/**
* Create a DateTime from a JavaScript object with keys like 'year' and 'hour' with reasonable defaults.
* @param {Object} obj - the object to create the DateTime from
* @param {number} obj.year - a year, such as 1987
* @param {number} obj.month - a month, 1-12
* @param {number} obj.day - a day of the month, 1-31, depending on the month
* @param {number} obj.ordinal - day of the year, 1-365 or 366
* @param {number} obj.weekYear - an ISO week year
* @param {number} obj.weekNumber - an ISO week number, between 1 and 52 or 53, depending on the year
* @param {number} obj.weekday - an ISO weekday, 1-7, where 1 is Monday and 7 is Sunday
* @param {number} obj.localWeekYear - a week year, according to the locale
* @param {number} obj.localWeekNumber - a week number, between 1 and 52 or 53, depending on the year, according to the locale
* @param {number} obj.localWeekday - a weekday, 1-7, where 1 is the first and 7 is the last day of the week, according to the locale
* @param {number} obj.hour - hour of the day, 0-23
* @param {number} obj.minute - minute of the hour, 0-59
* @param {number} obj.second - second of the minute, 0-59
* @param {number} obj.millisecond - millisecond of the second, 0-999
* @param {Object} opts - options for creating this DateTime
* @param {string|Zone} [opts.zone='local'] - interpret the numbers in the context of a particular zone. Can take any value taken as the first argument to setZone()
* @param {string} [opts.locale='system\'s locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
* @example DateTime.fromObject({ year: 1982, month: 5, day: 25}).toISODate() //=> '1982-05-25'
* @example DateTime.fromObject({ year: 1982 }).toISODate() //=> '1982-01-01'
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }) //~> today at 10:26:06
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'utc' }),
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'local' })
* @example DateTime.fromObject({ hour: 10, minute: 26, second: 6 }, { zone: 'America/New_York' })
* @example DateTime.fromObject({ weekYear: 2016, weekNumber: 2, weekday: 3 }).toISODate() //=> '2016-01-13'
* @example DateTime.fromObject({ localWeekYear: 2022, localWeekNumber: 1, localWeekday: 1 }, { locale: "en-US" }).toISODate() //=> '2021-12-26'
* @return {DateTime}
*/
static fromObject(obj, opts = {}) {
obj = obj || {};
const zoneToUse = normalizeZone(opts.zone, Settings.defaultZone);
if (!zoneToUse.isValid) {
return _DateTime.invalid(unsupportedZone(zoneToUse));
}
const loc = Locale.fromObject(opts);
const normalized = normalizeObject(obj, normalizeUnitWithLocalWeeks);
const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, loc);
const tsNow = Settings.now(), offsetProvis = !isUndefined(opts.specificOffset) ? opts.specificOffset : zoneToUse.offset(tsNow), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError(
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
);
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");
}
const useWeekData = definiteWeekDef || normalized.weekday && !containsGregor;
let units, defaultValues, objNow = tsToObj(tsNow, offsetProvis);
if (useWeekData) {
units = orderedWeekUnits;
defaultValues = defaultWeekUnitValues;
objNow = gregorianToWeek(objNow, minDaysInFirstWeek, startOfWeek);
} else if (containsOrdinal) {
units = orderedOrdinalUnits;
defaultValues = defaultOrdinalUnitValues;
objNow = gregorianToOrdinal(objNow);
} else {
units = orderedUnits2;
defaultValues = defaultUnitValues;
}
let foundFirst = false;
for (const u of units) {
const v = normalized[u];
if (!isUndefined(v)) {
foundFirst = true;
} else if (foundFirst) {
normalized[u] = defaultValues[u];
} else {
normalized[u] = objNow[u];
}
}
const higherOrderInvalid = useWeekData ? hasInvalidWeekData(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? hasInvalidOrdinalData(normalized) : hasInvalidGregorianData(normalized), invalid = higherOrderInvalid || hasInvalidTimeData(normalized);
if (invalid) {
return _DateTime.invalid(invalid);
}
const gregorian = useWeekData ? weekToGregorian(normalized, minDaysInFirstWeek, startOfWeek) : containsOrdinal ? ordinalToGregorian(normalized) : normalized, [tsFinal, offsetFinal] = objToTS(gregorian, offsetProvis, zoneToUse), inst = new _DateTime({
ts: tsFinal,
zone: zoneToUse,
o: offsetFinal,
loc
});
if (normalized.weekday && containsGregor && obj.weekday !== inst.weekday) {
return _DateTime.invalid(
"mismatched weekday",
`you can't specify both a weekday of ${normalized.weekday} and a date of ${inst.toISO()}`
);
}
if (!inst.isValid) {
return _DateTime.invalid(inst.invalid);
}
return inst;
}
/**
* Create a DateTime from an ISO 8601 string
* @param {string} text - the ISO string
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the time to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} [opts.outputCalendar] - the output calendar to set on the resulting DateTime instance
* @param {string} [opts.numberingSystem] - the numbering system to set on the resulting DateTime instance
* @param {string} [opts.weekSettings] - the week settings to set on the resulting DateTime instance
* @example DateTime.fromISO('2016-05-25T09:08:34.123')
* @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00')
* @example DateTime.fromISO('2016-05-25T09:08:34.123+06:00', {setZone: true})
* @example DateTime.fromISO('2016-05-25T09:08:34.123', {zone: 'utc'})
* @example DateTime.fromISO('2016-W05-4')
* @return {DateTime}
*/
static fromISO(text, opts = {}) {
const [vals, parsedZone] = parseISODate(text);
return parseDataToDateTime(vals, parsedZone, opts, "ISO 8601", text);
}
/**
* Create a DateTime from an RFC 2822 string
* @param {string} text - the RFC 2822 string
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since the offset is always specified in the string itself, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
* @param {boolean} [opts.setZone=false] - override the zone with a fixed-offset zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
* @example DateTime.fromRFC2822('25 Nov 2016 13:23:12 GMT')
* @example DateTime.fromRFC2822('Fri, 25 Nov 2016 13:23:12 +0600')
* @example DateTime.fromRFC2822('25 Nov 2016 13:23 Z')
* @return {DateTime}
*/
static fromRFC2822(text, opts = {}) {
const [vals, parsedZone] = parseRFC2822Date(text);
return parseDataToDateTime(vals, parsedZone, opts, "RFC 2822", text);
}
/**
* Create a DateTime from an HTTP header date
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
* @param {string} text - the HTTP header date
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - convert the time to this zone. Since HTTP dates are always in UTC, this has no effect on the interpretation of string, merely the zone the resulting DateTime is expressed in.
* @param {boolean} [opts.setZone=false] - override the zone with the fixed-offset zone specified in the string. For HTTP dates, this is always UTC, so this option is equivalent to setting the `zone` option to 'utc', but this option is included for consistency with similar methods.
* @param {string} [opts.locale='system's locale'] - a locale to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @param {string} opts.numberingSystem - the numbering system to set on the resulting DateTime instance
* @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
* @example DateTime.fromHTTP('Sun, 06 Nov 1994 08:49:37 GMT')
* @example DateTime.fromHTTP('Sunday, 06-Nov-94 08:49:37 GMT')
* @example DateTime.fromHTTP('Sun Nov 6 08:49:37 1994')
* @return {DateTime}
*/
static fromHTTP(text, opts = {}) {
const [vals, parsedZone] = parseHTTPDate(text);
return parseDataToDateTime(vals, parsedZone, opts, "HTTP", opts);
}
/**
* Create a DateTime from an input string and format string.
* Defaults to en-US if no locale has been specified, regardless of the system's locale. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/parsing?id=table-of-tokens).
* @param {string} text - the string to parse
* @param {string} fmt - the format the string is expected to be in (see the link below for the formats)
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
* @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
* @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @return {DateTime}
*/
static fromFormat(text, fmt, opts = {}) {
if (isUndefined(text) || isUndefined(fmt)) {
throw new InvalidArgumentError("fromFormat requires an input string and a format");
}
const { locale = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({
locale,
numberingSystem,
defaultToEN: true
}), [vals, parsedZone, specificOffset, invalid] = parseFromTokens(localeToUse, text, fmt);
if (invalid) {
return _DateTime.invalid(invalid);
} else {
return parseDataToDateTime(vals, parsedZone, opts, `format ${fmt}`, text, specificOffset);
}
}
/**
* @deprecated use fromFormat instead
*/
static fromString(text, fmt, opts = {}) {
return _DateTime.fromFormat(text, fmt, opts);
}
/**
* Create a DateTime from a SQL date, time, or datetime
* Defaults to en-US if no locale has been specified, regardless of the system's locale
* @param {string} text - the string to parse
* @param {Object} opts - options to affect the creation
* @param {string|Zone} [opts.zone='local'] - use this zone if no offset is specified in the input string itself. Will also convert the DateTime to this zone
* @param {boolean} [opts.setZone=false] - override the zone with a zone specified in the string itself, if it specifies one
* @param {string} [opts.locale='en-US'] - a locale string to use when parsing. Will also set the DateTime to this locale
* @param {string} opts.numberingSystem - the numbering system to use when parsing. Will also set the resulting DateTime to this numbering system
* @param {string} opts.weekSettings - the week settings to set on the resulting DateTime instance
* @param {string} opts.outputCalendar - the output calendar to set on the resulting DateTime instance
* @example DateTime.fromSQL('2017-05-15')
* @example DateTime.fromSQL('2017-05-15 09:12:34')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342+06:00')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles')
* @example DateTime.fromSQL('2017-05-15 09:12:34.342 America/Los_Angeles', { setZone: true })
* @example DateTime.fromSQL('2017-05-15 09:12:34.342', { zone: 'America/Los_Angeles' })
* @example DateTime.fromSQL('09:12:34.342')
* @return {DateTime}
*/
static fromSQL(text, opts = {}) {
const [vals, parsedZone] = parseSQL(text);
return parseDataToDateTime(vals, parsedZone, opts, "SQL", text);
}
/**
* Create an invalid DateTime.
* @param {string} reason - simple string of why this DateTime is invalid. Should not contain parameters or anything else data-dependent.
* @param {string} [explanation=null] - longer explanation, may include parameters and other useful debugging information
* @return {DateTime}
*/
static invalid(reason, explanation = null) {
if (!reason) {
throw new InvalidArgumentError("need to specify a reason the DateTime is invalid");
}
const invalid = reason instanceof Invalid ? reason : new Invalid(reason, explanation);
if (Settings.throwOnInvalid) {
throw new InvalidDateTimeError(invalid);
} else {
return new _DateTime({ invalid });
}
}
/**
* Check if an object is an instance of DateTime. Works across context boundaries
* @param {object} o
* @return {boolean}
*/
static isDateTime(o) {
return o && o.isLuxonDateTime || false;
}
/**
* Produce the format string for a set of options
* @param formatOpts
* @param localeOpts
* @returns {string}
*/
static parseFormatForOpts(formatOpts, localeOpts = {}) {
const tokenList = formatOptsToTokens(formatOpts, Locale.fromObject(localeOpts));
return !tokenList ? null : tokenList.map((t) => t ? t.val : null).join("");
}
/**
* Produce the the fully expanded format token for the locale
* Does NOT quote characters, so quoted tokens will not round trip correctly
* @param fmt
* @param localeOpts
* @returns {string}
*/
static expandFormat(fmt, localeOpts = {}) {
const expanded = expandMacroTokens(Formatter.parseFormat(fmt), Locale.fromObject(localeOpts));
return expanded.map((t) => t.val).join("");
}
static resetCache() {
zoneOffsetTs = void 0;
zoneOffsetGuessCache.clear();
}
// INFO
/**
* Get the value of unit.
* @param {string} unit - a unit such as 'minute' or 'day'
* @example DateTime.local(2017, 7, 4).get('month'); //=> 7
* @example DateTime.local(2017, 7, 4).get('day'); //=> 4
* @return {number}
*/
get(unit) {
return this[unit];
}
/**
* Returns whether the DateTime is valid. Invalid DateTimes occur when:
* * The DateTime was created from invalid calendar information, such as the 13th month or February 30
* * The DateTime was created by an operation on another invalid date
* @type {boolean}
*/
get isValid() {
return this.invalid === null;
}
/**
* Returns an error code if this DateTime is invalid, or null if the DateTime is valid
* @type {string}
*/
get invalidReason() {
return this.invalid ? this.invalid.reason : null;
}
/**
* Returns an explanation of why this DateTime became invalid, or null if the DateTime is valid
* @type {string}
*/
get invalidExplanation() {
return this.invalid ? this.invalid.explanation : null;
}
/**
* Get the locale of a DateTime, such 'en-GB'. The locale is used when formatting the DateTime
*
* @type {string}
*/
get locale() {
return this.isValid ? this.loc.locale : null;
}
/**
* Get the numbering system of a DateTime, such 'beng'. The numbering system is used when formatting the DateTime
*
* @type {string}
*/
get numberingSystem() {
return this.isValid ? this.loc.numberingSystem : null;
}
/**
* Get the output calendar of a DateTime, such 'islamic'. The output calendar is used when formatting the DateTime
*
* @type {string}
*/
get outputCalendar() {
return this.isValid ? this.loc.outputCalendar : null;
}
/**
* Get the time zone associated with this DateTime.
* @type {Zone}
*/
get zone() {
return this._zone;
}
/**
* Get the name of the time zone.
* @type {string}
*/
get zoneName() {
return this.isValid ? this.zone.name : null;
}
/**
* Get the year
* @example DateTime.local(2017, 5, 25).year //=> 2017
* @type {number}
*/
get year() {
return this.isValid ? this.c.year : NaN;
}
/**
* Get the quarter
* @example DateTime.local(2017, 5, 25).quarter //=> 2
* @type {number}
*/
get quarter() {
return this.isValid ? Math.ceil(this.c.month / 3) : NaN;
}
/**
* Get the month (1-12).
* @example DateTime.local(2017, 5, 25).month //=> 5
* @type {number}
*/
get month() {
return this.isValid ? this.c.month : NaN;
}
/**
* Get the day of the month (1-30ish).
* @example DateTime.local(2017, 5, 25).day //=> 25
* @type {number}
*/
get day() {
return this.isValid ? this.c.day : NaN;
}
/**
* Get the hour of the day (0-23).
* @example DateTime.local(2017, 5, 25, 9).hour //=> 9
* @type {number}
*/
get hour() {
return this.isValid ? this.c.hour : NaN;
}
/**
* Get the minute of the hour (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30).minute //=> 30
* @type {number}
*/
get minute() {
return this.isValid ? this.c.minute : NaN;
}
/**
* Get the second of the minute (0-59).
* @example DateTime.local(2017, 5, 25, 9, 30, 52).second //=> 52
* @type {number}
*/
get second() {
return this.isValid ? this.c.second : NaN;
}
/**
* Get the millisecond of the second (0-999).
* @example DateTime.local(2017, 5, 25, 9, 30, 52, 654).millisecond //=> 654
* @type {number}
*/
get millisecond() {
return this.isValid ? this.c.millisecond : NaN;
}
/**
* Get the week year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 12, 31).weekYear //=> 2015
* @type {number}
*/
get weekYear() {
return this.isValid ? possiblyCachedWeekData(this).weekYear : NaN;
}
/**
* Get the week number of the week year (1-52ish).
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2017, 5, 25).weekNumber //=> 21
* @type {number}
*/
get weekNumber() {
return this.isValid ? possiblyCachedWeekData(this).weekNumber : NaN;
}
/**
* Get the day of the week.
* 1 is Monday and 7 is Sunday
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2014, 11, 31).weekday //=> 4
* @type {number}
*/
get weekday() {
return this.isValid ? possiblyCachedWeekData(this).weekday : NaN;
}
/**
* Returns true if this date is on a weekend according to the locale, false otherwise
* @returns {boolean}
*/
get isWeekend() {
return this.isValid && this.loc.getWeekendDays().includes(this.weekday);
}
/**
* Get the day of the week according to the locale.
* 1 is the first day of the week and 7 is the last day of the week.
* If the locale assigns Sunday as the first day of the week, then a date which is a Sunday will return 1,
* @returns {number}
*/
get localWeekday() {
return this.isValid ? possiblyCachedLocalWeekData(this).weekday : NaN;
}
/**
* Get the week number of the week year according to the locale. Different locales assign week numbers differently,
* because the week can start on different days of the week (see localWeekday) and because a different number of days
* is required for a week to count as the first week of a year.
* @returns {number}
*/
get localWeekNumber() {
return this.isValid ? possiblyCachedLocalWeekData(this).weekNumber : NaN;
}
/**
* Get the week year according to the locale. Different locales assign week numbers (and therefor week years)
* differently, see localWeekNumber.
* @returns {number}
*/
get localWeekYear() {
return this.isValid ? possiblyCachedLocalWeekData(this).weekYear : NaN;
}
/**
* Get the ordinal (meaning the day of the year)
* @example DateTime.local(2017, 5, 25).ordinal //=> 145
* @type {number|DateTime}
*/
get ordinal() {
return this.isValid ? gregorianToOrdinal(this.c).ordinal : NaN;
}
/**
* Get the human readable short month name, such as 'Oct'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthShort //=> Oct
* @type {string}
*/
get monthShort() {
return this.isValid ? Info.months("short", { locObj: this.loc })[this.month - 1] : null;
}
/**
* Get the human readable long month name, such as 'October'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).monthLong //=> October
* @type {string}
*/
get monthLong() {
return this.isValid ? Info.months("long", { locObj: this.loc })[this.month - 1] : null;
}
/**
* Get the human readable short weekday, such as 'Mon'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayShort //=> Mon
* @type {string}
*/
get weekdayShort() {
return this.isValid ? Info.weekdays("short", { locObj: this.loc })[this.weekday - 1] : null;
}
/**
* Get the human readable long weekday, such as 'Monday'.
* Defaults to the system's locale if no locale has been specified
* @example DateTime.local(2017, 10, 30).weekdayLong //=> Monday
* @type {string}
*/
get weekdayLong() {
return this.isValid ? Info.weekdays("long", { locObj: this.loc })[this.weekday - 1] : null;
}
/**
* Get the UTC offset of this DateTime in minutes
* @example DateTime.now().offset //=> -240
* @example DateTime.utc().offset //=> 0
* @type {number}
*/
get offset() {
return this.isValid ? +this.o : NaN;
}
/**
* Get the short human name for the zone's current offset, for example "EST" or "EDT".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
get offsetNameShort() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "short",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get the long human name for the zone's current offset, for example "Eastern Standard Time" or "Eastern Daylight Time".
* Defaults to the system's locale if no locale has been specified
* @type {string}
*/
get offsetNameLong() {
if (this.isValid) {
return this.zone.offsetName(this.ts, {
format: "long",
locale: this.locale
});
} else {
return null;
}
}
/**
* Get whether this zone's offset ever changes, as in a DST.
* @type {boolean}
*/
get isOffsetFixed() {
return this.isValid ? this.zone.isUniversal : null;
}
/**
* Get whether the DateTime is in a DST.
* @type {boolean}
*/
get isInDST() {
if (this.isOffsetFixed) {
return false;
} else {
return this.offset > this.set({ month: 1, day: 1 }).offset || this.offset > this.set({ month: 5 }).offset;
}
}
/**
* Get those DateTimes which have the same local time as this DateTime, but a different offset from UTC
* in this DateTime's zone. During DST changes local time can be ambiguous, for example
* `2023-10-29T02:30:00` in `Europe/Berlin` can have offset `+01:00` or `+02:00`.
* This method will return both possible DateTimes if this DateTime's local time is ambiguous.
* @returns {DateTime[]}
*/
getPossibleOffsets() {
if (!this.isValid || this.isOffsetFixed) {
return [this];
}
const dayMs = 864e5;
const minuteMs = 6e4;
const localTS = objToLocalTS(this.c);
const oEarlier = this.zone.offset(localTS - dayMs);
const oLater = this.zone.offset(localTS + dayMs);
const o1 = this.zone.offset(localTS - oEarlier * minuteMs);
const o2 = this.zone.offset(localTS - oLater * minuteMs);
if (o1 === o2) {
return [this];
}
const ts1 = localTS - o1 * minuteMs;
const ts2 = localTS - o2 * minuteMs;
const c1 = tsToObj(ts1, o1);
const c2 = tsToObj(ts2, o2);
if (c1.hour === c2.hour && c1.minute === c2.minute && c1.second === c2.second && c1.millisecond === c2.millisecond) {
return [clone2(this, { ts: ts1 }), clone2(this, { ts: ts2 })];
}
return [this];
}
/**
* Returns true if this DateTime is in a leap year, false otherwise
* @example DateTime.local(2016).isInLeapYear //=> true
* @example DateTime.local(2013).isInLeapYear //=> false
* @type {boolean}
*/
get isInLeapYear() {
return isLeapYear(this.year);
}
/**
* Returns the number of days in this DateTime's month
* @example DateTime.local(2016, 2).daysInMonth //=> 29
* @example DateTime.local(2016, 3).daysInMonth //=> 31
* @type {number}
*/
get daysInMonth() {
return daysInMonth(this.year, this.month);
}
/**
* Returns the number of days in this DateTime's year
* @example DateTime.local(2016).daysInYear //=> 366
* @example DateTime.local(2013).daysInYear //=> 365
* @type {number}
*/
get daysInYear() {
return this.isValid ? daysInYear(this.year) : NaN;
}
/**
* Returns the number of weeks in this DateTime's year
* @see https://en.wikipedia.org/wiki/ISO_week_date
* @example DateTime.local(2004).weeksInWeekYear //=> 53
* @example DateTime.local(2013).weeksInWeekYear //=> 52
* @type {number}
*/
get weeksInWeekYear() {
return this.isValid ? weeksInWeekYear(this.weekYear) : NaN;
}
/**
* Returns the number of weeks in this DateTime's local week year
* @example DateTime.local(2020, 6, {locale: 'en-US'}).weeksInLocalWeekYear //=> 52
* @example DateTime.local(2020, 6, {locale: 'de-DE'}).weeksInLocalWeekYear //=> 53
* @type {number}
*/
get weeksInLocalWeekYear() {
return this.isValid ? weeksInWeekYear(
this.localWeekYear,
this.loc.getMinDaysInFirstWeek(),
this.loc.getStartOfWeek()
) : NaN;
}
/**
* Returns the resolved Intl options for this DateTime.
* This is useful in understanding the behavior of formatting methods
* @param {Object} opts - the same options as toLocaleString
* @return {Object}
*/
resolvedLocaleOptions(opts = {}) {
const { locale, numberingSystem, calendar } = Formatter.create(
this.loc.clone(opts),
opts
).resolvedOptions(this);
return { locale, numberingSystem, outputCalendar: calendar };
}
// TRANSFORM
/**
* "Set" the DateTime's zone to UTC. Returns a newly-constructed DateTime.
*
* Equivalent to {@link DateTime#setZone}('utc')
* @param {number} [offset=0] - optionally, an offset from UTC in minutes
* @param {Object} [opts={}] - options to pass to `setZone()`
* @return {DateTime}
*/
toUTC(offset2 = 0, opts = {}) {
return this.setZone(FixedOffsetZone.instance(offset2), opts);
}
/**
* "Set" the DateTime's zone to the host's local zone. Returns a newly-constructed DateTime.
*
* Equivalent to `setZone('local')`
* @return {DateTime}
*/
toLocal() {
return this.setZone(Settings.defaultZone);
}
/**
* "Set" the DateTime's zone to specified zone. Returns a newly-constructed DateTime.
*
* By default, the setter keeps the underlying time the same (as in, the same timestamp), but the new instance will report different local times and consider DSTs when making computations, as with {@link DateTime#plus}. You may wish to use {@link DateTime#toLocal} and {@link DateTime#toUTC} which provide simple convenience wrappers for commonly used zones.
* @param {string|Zone} [zone='local'] - a zone identifier. As a string, that can be any IANA zone supported by the host environment, or a fixed-offset name of the form 'UTC+3', or the strings 'local' or 'utc'. You may also supply an instance of a {@link DateTime#Zone} class.
* @param {Object} opts - options
* @param {boolean} [opts.keepLocalTime=false] - If true, adjust the underlying time so that the local time stays the same, but in the target zone. You should rarely need this.
* @return {DateTime}
*/
setZone(zone, { keepLocalTime = false, keepCalendarTime = false } = {}) {
zone = normalizeZone(zone, Settings.defaultZone);
if (zone.equals(this.zone)) {
return this;
} else if (!zone.isValid) {
return _DateTime.invalid(unsupportedZone(zone));
} else {
let newTS = this.ts;
if (keepLocalTime || keepCalendarTime) {
const offsetGuess = zone.offset(this.ts);
const asObj = this.toObject();
[newTS] = objToTS(asObj, offsetGuess, zone);
}
return clone2(this, { ts: newTS, zone });
}
}
/**
* "Set" the locale, numberingSystem, or outputCalendar. Returns a newly-constructed DateTime.
* @param {Object} properties - the properties to set
* @example DateTime.local(2017, 5, 25).reconfigure({ locale: 'en-GB' })
* @return {DateTime}
*/
reconfigure({ locale, numberingSystem, outputCalendar } = {}) {
const loc = this.loc.clone({ locale, numberingSystem, outputCalendar });
return clone2(this, { loc });
}
/**
* "Set" the locale. Returns a newly-constructed DateTime.
* Just a convenient alias for reconfigure({ locale })
* @example DateTime.local(2017, 5, 25).setLocale('en-GB')
* @return {DateTime}
*/
setLocale(locale) {
return this.reconfigure({ locale });
}
/**
* "Set" the values of specified units. Returns a newly-constructed DateTime.
* You can only set units with this method; for "setting" metadata, see {@link DateTime#reconfigure} and {@link DateTime#setZone}.
*
* This method also supports setting locale-based week units, i.e. `localWeekday`, `localWeekNumber` and `localWeekYear`.
* They cannot be mixed with ISO-week units like `weekday`.
* @param {Object} values - a mapping of units to numbers
* @example dt.set({ year: 2017 })
* @example dt.set({ hour: 8, minute: 30 })
* @example dt.set({ weekday: 5 })
* @example dt.set({ year: 2005, ordinal: 234 })
* @return {DateTime}
*/
set(values) {
if (!this.isValid)
return this;
const normalized = normalizeObject(values, normalizeUnitWithLocalWeeks);
const { minDaysInFirstWeek, startOfWeek } = usesLocalWeekValues(normalized, this.loc);
const settingWeekStuff = !isUndefined(normalized.weekYear) || !isUndefined(normalized.weekNumber) || !isUndefined(normalized.weekday), containsOrdinal = !isUndefined(normalized.ordinal), containsGregorYear = !isUndefined(normalized.year), containsGregorMD = !isUndefined(normalized.month) || !isUndefined(normalized.day), containsGregor = containsGregorYear || containsGregorMD, definiteWeekDef = normalized.weekYear || normalized.weekNumber;
if ((containsGregor || containsOrdinal) && definiteWeekDef) {
throw new ConflictingSpecificationError(
"Can't mix weekYear/weekNumber units with year/month/day or ordinals"
);
}
if (containsGregorMD && containsOrdinal) {
throw new ConflictingSpecificationError("Can't mix ordinal dates with month/day");
}
let mixed;
if (settingWeekStuff) {
mixed = weekToGregorian(
{ ...gregorianToWeek(this.c, minDaysInFirstWeek, startOfWeek), ...normalized },
minDaysInFirstWeek,
startOfWeek
);
} else if (!isUndefined(normalized.ordinal)) {
mixed = ordinalToGregorian({ ...gregorianToOrdinal(this.c), ...normalized });
} else {
mixed = { ...this.toObject(), ...normalized };
if (isUndefined(normalized.day)) {
mixed.day = Math.min(daysInMonth(mixed.year, mixed.month), mixed.day);
}
}
const [ts, o] = objToTS(mixed, this.o, this.zone);
return clone2(this, { ts, o });
}
/**
* Add a period of time to this DateTime and return the resulting DateTime
*
* Adding hours, minutes, seconds, or milliseconds increases the timestamp by the right number of milliseconds. Adding days, months, or years shifts the calendar, accounting for DSTs and leap years along the way. Thus, `dt.plus({ hours: 24 })` may result in a different time than `dt.plus({ days: 1 })` if there's a DST shift in between.
* @param {Duration|Object|number} duration - The amount to add. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
* @example DateTime.now().plus(123) //~> in 123 milliseconds
* @example DateTime.now().plus({ minutes: 15 }) //~> in 15 minutes
* @example DateTime.now().plus({ days: 1 }) //~> this time tomorrow
* @example DateTime.now().plus({ days: -1 }) //~> this time yesterday
* @example DateTime.now().plus({ hours: 3, minutes: 13 }) //~> in 3 hr, 13 min
* @example DateTime.now().plus(Duration.fromObject({ hours: 3, minutes: 13 })) //~> in 3 hr, 13 min
* @return {DateTime}
*/
plus(duration) {
if (!this.isValid)
return this;
const dur = Duration.fromDurationLike(duration);
return clone2(this, adjustTime(this, dur));
}
/**
* Subtract a period of time to this DateTime and return the resulting DateTime
* See {@link DateTime#plus}
* @param {Duration|Object|number} duration - The amount to subtract. Either a Luxon Duration, a number of milliseconds, the object argument to Duration.fromObject()
@return {DateTime}
*/
minus(duration) {
if (!this.isValid)
return this;
const dur = Duration.fromDurationLike(duration).negate();
return clone2(this, adjustTime(this, dur));
}
/**
* "Set" this DateTime to the beginning of a unit of time.
* @param {string} unit - The unit to go to the beginning of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
* @param {Object} opts - options
* @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
* @example DateTime.local(2014, 3, 3).startOf('month').toISODate(); //=> '2014-03-01'
* @example DateTime.local(2014, 3, 3).startOf('year').toISODate(); //=> '2014-01-01'
* @example DateTime.local(2014, 3, 3).startOf('week').toISODate(); //=> '2014-03-03', weeks always start on Mondays
* @example DateTime.local(2014, 3, 3, 5, 30).startOf('day').toISOTime(); //=> '00:00.000-05:00'
* @example DateTime.local(2014, 3, 3, 5, 30).startOf('hour').toISOTime(); //=> '05:00:00.000-05:00'
* @return {DateTime}
*/
startOf(unit, { useLocaleWeeks = false } = {}) {
if (!this.isValid)
return this;
const o = {}, normalizedUnit = Duration.normalizeUnit(unit);
switch (normalizedUnit) {
case "years":
o.month = 1;
case "quarters":
case "months":
o.day = 1;
case "weeks":
case "days":
o.hour = 0;
case "hours":
o.minute = 0;
case "minutes":
o.second = 0;
case "seconds":
o.millisecond = 0;
break;
case "milliseconds":
break;
}
if (normalizedUnit === "weeks") {
if (useLocaleWeeks) {
const startOfWeek = this.loc.getStartOfWeek();
const { weekday } = this;
if (weekday < startOfWeek) {
o.weekNumber = this.weekNumber - 1;
}
o.weekday = startOfWeek;
} else {
o.weekday = 1;
}
}
if (normalizedUnit === "quarters") {
const q = Math.ceil(this.month / 3);
o.month = (q - 1) * 3 + 1;
}
return this.set(o);
}
/**
* "Set" this DateTime to the end (meaning the last millisecond) of a unit of time
* @param {string} unit - The unit to go to the end of. Can be 'year', 'quarter', 'month', 'week', 'day', 'hour', 'minute', 'second', or 'millisecond'.
* @param {Object} opts - options
* @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week
* @example DateTime.local(2014, 3, 3).endOf('month').toISO(); //=> '2014-03-31T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3).endOf('year').toISO(); //=> '2014-12-31T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3).endOf('week').toISO(); // => '2014-03-09T23:59:59.999-05:00', weeks start on Mondays
* @example DateTime.local(2014, 3, 3, 5, 30).endOf('day').toISO(); //=> '2014-03-03T23:59:59.999-05:00'
* @example DateTime.local(2014, 3, 3, 5, 30).endOf('hour').toISO(); //=> '2014-03-03T05:59:59.999-05:00'
* @return {DateTime}
*/
endOf(unit, opts) {
return this.isValid ? this.plus({ [unit]: 1 }).startOf(unit, opts).minus(1) : this;
}
// OUTPUT
/**
* Returns a string representation of this DateTime formatted according to the specified format string.
* **You may not want this.** See {@link DateTime#toLocaleString} for a more flexible formatting tool. For a table of tokens and their interpretations, see [here](https://moment.github.io/luxon/#/formatting?id=table-of-tokens).
* Defaults to en-US if no locale has been specified, regardless of the system's locale.
* @param {string} fmt - the format string
* @param {Object} opts - opts to override the configuration options on this DateTime
* @example DateTime.now().toFormat('yyyy LLL dd') //=> '2017 Apr 22'
* @example DateTime.now().setLocale('fr').toFormat('yyyy LLL dd') //=> '2017 avr. 22'
* @example DateTime.now().toFormat('yyyy LLL dd', { locale: "fr" }) //=> '2017 avr. 22'
* @example DateTime.now().toFormat("HH 'hours and' mm 'minutes'") //=> '20 hours and 55 minutes'
* @return {string}
*/
toFormat(fmt, opts = {}) {
return this.isValid ? Formatter.create(this.loc.redefaultToEN(opts)).formatDateTimeFromString(this, fmt) : INVALID3;
}
/**
* Returns a localized string representing this date. Accepts the same options as the Intl.DateTimeFormat constructor and any presets defined by Luxon, such as `DateTime.DATE_FULL` or `DateTime.TIME_SIMPLE`.
* The exact behavior of this method is browser-specific, but in general it will return an appropriate representation
* of the DateTime in the assigned locale.
* Defaults to the system's locale if no locale has been specified
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat
* @param formatOpts {Object} - Intl.DateTimeFormat constructor options and configuration options
* @param {Object} opts - opts to override the configuration options on this DateTime
* @example DateTime.now().toLocaleString(); //=> 4/20/2017
* @example DateTime.now().setLocale('en-gb').toLocaleString(); //=> '20/04/2017'
* @example DateTime.now().toLocaleString(DateTime.DATE_FULL); //=> 'April 20, 2017'
* @example DateTime.now().toLocaleString(DateTime.DATE_FULL, { locale: 'fr' }); //=> '28 août 2022'
* @example DateTime.now().toLocaleString(DateTime.TIME_SIMPLE); //=> '11:32 AM'
* @example DateTime.now().toLocaleString(DateTime.DATETIME_SHORT); //=> '4/20/2017, 11:32 AM'
* @example DateTime.now().toLocaleString({ weekday: 'long', month: 'long', day: '2-digit' }); //=> 'Thursday, April 20'
* @example DateTime.now().toLocaleString({ weekday: 'short', month: 'short', day: '2-digit', hour: '2-digit', minute: '2-digit' }); //=> 'Thu, Apr 20, 11:27 AM'
* @example DateTime.now().toLocaleString({ hour: '2-digit', minute: '2-digit', hourCycle: 'h23' }); //=> '11:32'
* @return {string}
*/
toLocaleString(formatOpts = DATE_SHORT, opts = {}) {
return this.isValid ? Formatter.create(this.loc.clone(opts), formatOpts).formatDateTime(this) : INVALID3;
}
/**
* Returns an array of format "parts", meaning individual tokens along with metadata. This is allows callers to post-process individual sections of the formatted output.
* Defaults to the system's locale if no locale has been specified
* @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat/formatToParts
* @param opts {Object} - Intl.DateTimeFormat constructor options, same as `toLocaleString`.
* @example DateTime.now().toLocaleParts(); //=> [
* //=> { type: 'day', value: '25' },
* //=> { type: 'literal', value: '/' },
* //=> { type: 'month', value: '05' },
* //=> { type: 'literal', value: '/' },
* //=> { type: 'year', value: '1982' }
* //=> ]
*/
toLocaleParts(opts = {}) {
return this.isValid ? Formatter.create(this.loc.clone(opts), opts).formatDateTimeParts(this) : [];
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.extendedZone=false] - add the time zone format extension
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc(1983, 5, 25).toISO() //=> '1982-05-25T00:00:00.000Z'
* @example DateTime.now().toISO() //=> '2017-04-22T20:47:05.335-04:00'
* @example DateTime.now().toISO({ includeOffset: false }) //=> '2017-04-22T20:47:05.335'
* @example DateTime.now().toISO({ format: 'basic' }) //=> '20170422T204705.335-0400'
* @return {string|null}
*/
toISO({
format = "extended",
suppressSeconds = false,
suppressMilliseconds = false,
includeOffset = true,
extendedZone = false
} = {}) {
if (!this.isValid) {
return null;
}
const ext = format === "extended";
let c = toISODate(this, ext);
c += "T";
c += toISOTime(this, ext, suppressSeconds, suppressMilliseconds, includeOffset, extendedZone);
return c;
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's date component
* @param {Object} opts - options
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc(1982, 5, 25).toISODate() //=> '1982-05-25'
* @example DateTime.utc(1982, 5, 25).toISODate({ format: 'basic' }) //=> '19820525'
* @return {string|null}
*/
toISODate({ format = "extended" } = {}) {
if (!this.isValid) {
return null;
}
return toISODate(this, format === "extended");
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's week date
* @example DateTime.utc(1982, 5, 25).toISOWeekDate() //=> '1982-W21-2'
* @return {string}
*/
toISOWeekDate() {
return toTechFormat(this, "kkkk-'W'WW-c");
}
/**
* Returns an ISO 8601-compliant string representation of this DateTime's time component
* @param {Object} opts - options
* @param {boolean} [opts.suppressMilliseconds=false] - exclude milliseconds from the format if they're 0
* @param {boolean} [opts.suppressSeconds=false] - exclude seconds from the format if they're 0
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.extendedZone=true] - add the time zone format extension
* @param {boolean} [opts.includePrefix=false] - include the `T` prefix
* @param {string} [opts.format='extended'] - choose between the basic and extended format
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime() //=> '07:34:19.361Z'
* @example DateTime.utc().set({ hour: 7, minute: 34, seconds: 0, milliseconds: 0 }).toISOTime({ suppressSeconds: true }) //=> '07:34Z'
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ format: 'basic' }) //=> '073419.361Z'
* @example DateTime.utc().set({ hour: 7, minute: 34 }).toISOTime({ includePrefix: true }) //=> 'T07:34:19.361Z'
* @return {string}
*/
toISOTime({
suppressMilliseconds = false,
suppressSeconds = false,
includeOffset = true,
includePrefix = false,
extendedZone = false,
format = "extended"
} = {}) {
if (!this.isValid) {
return null;
}
let c = includePrefix ? "T" : "";
return c + toISOTime(
this,
format === "extended",
suppressSeconds,
suppressMilliseconds,
includeOffset,
extendedZone
);
}
/**
* Returns an RFC 2822-compatible string representation of this DateTime
* @example DateTime.utc(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 +0000'
* @example DateTime.local(2014, 7, 13).toRFC2822() //=> 'Sun, 13 Jul 2014 00:00:00 -0400'
* @return {string}
*/
toRFC2822() {
return toTechFormat(this, "EEE, dd LLL yyyy HH:mm:ss ZZZ", false);
}
/**
* Returns a string representation of this DateTime appropriate for use in HTTP headers. The output is always expressed in GMT.
* Specifically, the string conforms to RFC 1123.
* @see https://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1
* @example DateTime.utc(2014, 7, 13).toHTTP() //=> 'Sun, 13 Jul 2014 00:00:00 GMT'
* @example DateTime.utc(2014, 7, 13, 19).toHTTP() //=> 'Sun, 13 Jul 2014 19:00:00 GMT'
* @return {string}
*/
toHTTP() {
return toTechFormat(this.toUTC(), "EEE, dd LLL yyyy HH:mm:ss 'GMT'");
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL Date
* @example DateTime.utc(2014, 7, 13).toSQLDate() //=> '2014-07-13'
* @return {string|null}
*/
toSQLDate() {
if (!this.isValid) {
return null;
}
return toISODate(this, true);
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL Time
* @param {Object} opts - options
* @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
* @example DateTime.utc().toSQL() //=> '05:15:16.345'
* @example DateTime.now().toSQL() //=> '05:15:16.345 -04:00'
* @example DateTime.now().toSQL({ includeOffset: false }) //=> '05:15:16.345'
* @example DateTime.now().toSQL({ includeZone: false }) //=> '05:15:16.345 America/New_York'
* @return {string}
*/
toSQLTime({ includeOffset = true, includeZone = false, includeOffsetSpace = true } = {}) {
let fmt = "HH:mm:ss.SSS";
if (includeZone || includeOffset) {
if (includeOffsetSpace) {
fmt += " ";
}
if (includeZone) {
fmt += "z";
} else if (includeOffset) {
fmt += "ZZ";
}
}
return toTechFormat(this, fmt, true);
}
/**
* Returns a string representation of this DateTime appropriate for use in SQL DateTime
* @param {Object} opts - options
* @param {boolean} [opts.includeZone=false] - include the zone, such as 'America/New_York'. Overrides includeOffset.
* @param {boolean} [opts.includeOffset=true] - include the offset, such as 'Z' or '-04:00'
* @param {boolean} [opts.includeOffsetSpace=true] - include the space between the time and the offset, such as '05:15:16.345 -04:00'
* @example DateTime.utc(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 Z'
* @example DateTime.local(2014, 7, 13).toSQL() //=> '2014-07-13 00:00:00.000 -04:00'
* @example DateTime.local(2014, 7, 13).toSQL({ includeOffset: false }) //=> '2014-07-13 00:00:00.000'
* @example DateTime.local(2014, 7, 13).toSQL({ includeZone: true }) //=> '2014-07-13 00:00:00.000 America/New_York'
* @return {string}
*/
toSQL(opts = {}) {
if (!this.isValid) {
return null;
}
return `${this.toSQLDate()} ${this.toSQLTime(opts)}`;
}
/**
* Returns a string representation of this DateTime appropriate for debugging
* @return {string}
*/
toString() {
return this.isValid ? this.toISO() : INVALID3;
}
/**
* Returns a string representation of this DateTime appropriate for the REPL.
* @return {string}
*/
[Symbol.for("nodejs.util.inspect.custom")]() {
if (this.isValid) {
return `DateTime { ts: ${this.toISO()}, zone: ${this.zone.name}, locale: ${this.locale} }`;
} else {
return `DateTime { Invalid, reason: ${this.invalidReason} }`;
}
}
/**
* Returns the epoch milliseconds of this DateTime. Alias of {@link DateTime#toMillis}
* @return {number}
*/
valueOf() {
return this.toMillis();
}
/**
* Returns the epoch milliseconds of this DateTime.
* @return {number}
*/
toMillis() {
return this.isValid ? this.ts : NaN;
}
/**
* Returns the epoch seconds (including milliseconds in the fractional part) of this DateTime.
* @return {number}
*/
toSeconds() {
return this.isValid ? this.ts / 1e3 : NaN;
}
/**
* Returns the epoch seconds (as a whole number) of this DateTime.
* @return {number}
*/
toUnixInteger() {
return this.isValid ? Math.floor(this.ts / 1e3) : NaN;
}
/**
* Returns an ISO 8601 representation of this DateTime appropriate for use in JSON.
* @return {string}
*/
toJSON() {
return this.toISO();
}
/**
* Returns a BSON serializable equivalent to this DateTime.
* @return {Date}
*/
toBSON() {
return this.toJSDate();
}
/**
* Returns a JavaScript object with this DateTime's year, month, day, and so on.
* @param opts - options for generating the object
* @param {boolean} [opts.includeConfig=false] - include configuration attributes in the output
* @example DateTime.now().toObject() //=> { year: 2017, month: 4, day: 22, hour: 20, minute: 49, second: 42, millisecond: 268 }
* @return {Object}
*/
toObject(opts = {}) {
if (!this.isValid)
return {};
const base = { ...this.c };
if (opts.includeConfig) {
base.outputCalendar = this.outputCalendar;
base.numberingSystem = this.loc.numberingSystem;
base.locale = this.loc.locale;
}
return base;
}
/**
* Returns a JavaScript Date equivalent to this DateTime.
* @return {Date}
*/
toJSDate() {
return new Date(this.isValid ? this.ts : NaN);
}
// COMPARE
/**
* Return the difference between two DateTimes as a Duration.
* @param {DateTime} otherDateTime - the DateTime to compare this one to
* @param {string|string[]} [unit=['milliseconds']] - the unit or array of units (such as 'hours' or 'days') to include in the duration.
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @example
* var i1 = DateTime.fromISO('1982-05-25T09:45'),
* i2 = DateTime.fromISO('1983-10-14T10:30');
* i2.diff(i1).toObject() //=> { milliseconds: 43807500000 }
* i2.diff(i1, 'hours').toObject() //=> { hours: 12168.75 }
* i2.diff(i1, ['months', 'days']).toObject() //=> { months: 16, days: 19.03125 }
* i2.diff(i1, ['months', 'days', 'hours']).toObject() //=> { months: 16, days: 19, hours: 0.75 }
* @return {Duration}
*/
diff(otherDateTime, unit = "milliseconds", opts = {}) {
if (!this.isValid || !otherDateTime.isValid) {
return Duration.invalid("created by diffing an invalid DateTime");
}
const durOpts = { locale: this.locale, numberingSystem: this.numberingSystem, ...opts };
const units = maybeArray(unit).map(Duration.normalizeUnit), otherIsLater = otherDateTime.valueOf() > this.valueOf(), earlier = otherIsLater ? this : otherDateTime, later = otherIsLater ? otherDateTime : this, diffed = diff_default(earlier, later, units, durOpts);
return otherIsLater ? diffed.negate() : diffed;
}
/**
* Return the difference between this DateTime and right now.
* See {@link DateTime#diff}
* @param {string|string[]} [unit=['milliseconds']] - the unit or units units (such as 'hours' or 'days') to include in the duration
* @param {Object} opts - options that affect the creation of the Duration
* @param {string} [opts.conversionAccuracy='casual'] - the conversion system to use
* @return {Duration}
*/
diffNow(unit = "milliseconds", opts = {}) {
return this.diff(_DateTime.now(), unit, opts);
}
/**
* Return an Interval spanning between this DateTime and another DateTime
* @param {DateTime} otherDateTime - the other end point of the Interval
* @return {Interval|DateTime}
*/
until(otherDateTime) {
return this.isValid ? Interval.fromDateTimes(this, otherDateTime) : this;
}
/**
* Return whether this DateTime is in the same unit of time as another DateTime.
* Higher-order units must also be identical for this function to return `true`.
* Note that time zones are **ignored** in this comparison, which compares the **local** calendar time. Use {@link DateTime#setZone} to convert one of the dates if needed.
* @param {DateTime} otherDateTime - the other DateTime
* @param {string} unit - the unit of time to check sameness on
* @param {Object} opts - options
* @param {boolean} [opts.useLocaleWeeks=false] - If true, use weeks based on the locale, i.e. use the locale-dependent start of the week; only the locale of this DateTime is used
* @example DateTime.now().hasSame(otherDT, 'day'); //~> true if otherDT is in the same current calendar day
* @return {boolean}
*/
hasSame(otherDateTime, unit, opts) {
if (!this.isValid)
return false;
const inputMs = otherDateTime.valueOf();
const adjustedToZone = this.setZone(otherDateTime.zone, { keepLocalTime: true });
return adjustedToZone.startOf(unit, opts) <= inputMs && inputMs <= adjustedToZone.endOf(unit, opts);
}
/**
* Equality check
* Two DateTimes are equal if and only if they represent the same millisecond, have the same zone and location, and are both valid.
* To compare just the millisecond values, use `+dt1 === +dt2`.
* @param {DateTime} other - the other DateTime
* @return {boolean}
*/
equals(other) {
return this.isValid && other.isValid && this.valueOf() === other.valueOf() && this.zone.equals(other.zone) && this.loc.equals(other.loc);
}
/**
* Returns a string representation of a this time relative to now, such as "in two days". Can only internationalize if your
* platform supports Intl.RelativeTimeFormat. Rounds down by default.
* @param {Object} options - options that affect the output
* @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
* @param {string} [options.style="long"] - the style of units, must be "long", "short", or "narrow"
* @param {string|string[]} options.unit - use a specific unit or array of units; if omitted, or an array, the method will pick the best unit. Use an array or one of "years", "quarters", "months", "weeks", "days", "hours", "minutes", or "seconds"
* @param {boolean} [options.round=true] - whether to round the numbers in the output.
* @param {number} [options.padding=0] - padding in milliseconds. This allows you to round up the result if it fits inside the threshold. Don't use in combination with {round: false} because the decimal output will include the padding.
* @param {string} options.locale - override the locale of this DateTime
* @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
* @example DateTime.now().plus({ days: 1 }).toRelative() //=> "in 1 day"
* @example DateTime.now().setLocale("es").toRelative({ days: 1 }) //=> "dentro de 1 día"
* @example DateTime.now().plus({ days: 1 }).toRelative({ locale: "fr" }) //=> "dans 23 heures"
* @example DateTime.now().minus({ days: 2 }).toRelative() //=> "2 days ago"
* @example DateTime.now().minus({ days: 2 }).toRelative({ unit: "hours" }) //=> "48 hours ago"
* @example DateTime.now().minus({ hours: 36 }).toRelative({ round: false }) //=> "1.5 days ago"
*/
toRelative(options = {}) {
if (!this.isValid)
return null;
const base = options.base || _DateTime.fromObject({}, { zone: this.zone }), padding = options.padding ? this < base ? -options.padding : options.padding : 0;
let units = ["years", "months", "days", "hours", "minutes", "seconds"];
let unit = options.unit;
if (Array.isArray(options.unit)) {
units = options.unit;
unit = void 0;
}
return diffRelative(base, this.plus(padding), {
...options,
numeric: "always",
units,
unit
});
}
/**
* Returns a string representation of this date relative to today, such as "yesterday" or "next month".
* Only internationalizes on platforms that supports Intl.RelativeTimeFormat.
* @param {Object} options - options that affect the output
* @param {DateTime} [options.base=DateTime.now()] - the DateTime to use as the basis to which this time is compared. Defaults to now.
* @param {string} options.locale - override the locale of this DateTime
* @param {string} options.unit - use a specific unit; if omitted, the method will pick the unit. Use one of "years", "quarters", "months", "weeks", or "days"
* @param {string} options.numberingSystem - override the numberingSystem of this DateTime. The Intl system may choose not to honor this
* @example DateTime.now().plus({ days: 1 }).toRelativeCalendar() //=> "tomorrow"
* @example DateTime.now().setLocale("es").plus({ days: 1 }).toRelative() //=> ""mañana"
* @example DateTime.now().plus({ days: 1 }).toRelativeCalendar({ locale: "fr" }) //=> "demain"
* @example DateTime.now().minus({ days: 2 }).toRelativeCalendar() //=> "2 days ago"
*/
toRelativeCalendar(options = {}) {
if (!this.isValid)
return null;
return diffRelative(options.base || _DateTime.fromObject({}, { zone: this.zone }), this, {
...options,
numeric: "auto",
units: ["years", "months", "days"],
calendary: true
});
}
/**
* Return the min of several date times
* @param {...DateTime} dateTimes - the DateTimes from which to choose the minimum
* @return {DateTime} the min DateTime, or undefined if called with no argument
*/
static min(...dateTimes) {
if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError("min requires all arguments be DateTimes");
}
return bestBy(dateTimes, (i) => i.valueOf(), Math.min);
}
/**
* Return the max of several date times
* @param {...DateTime} dateTimes - the DateTimes from which to choose the maximum
* @return {DateTime} the max DateTime, or undefined if called with no argument
*/
static max(...dateTimes) {
if (!dateTimes.every(_DateTime.isDateTime)) {
throw new InvalidArgumentError("max requires all arguments be DateTimes");
}
return bestBy(dateTimes, (i) => i.valueOf(), Math.max);
}
// MISC
/**
* Explain how a string would be parsed by fromFormat()
* @param {string} text - the string to parse
* @param {string} fmt - the format the string is expected to be in (see description)
* @param {Object} options - options taken by fromFormat()
* @return {Object}
*/
static fromFormatExplain(text, fmt, options = {}) {
const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({
locale,
numberingSystem,
defaultToEN: true
});
return explainFromTokens(localeToUse, text, fmt);
}
/**
* @deprecated use fromFormatExplain instead
*/
static fromStringExplain(text, fmt, options = {}) {
return _DateTime.fromFormatExplain(text, fmt, options);
}
/**
* Build a parser for `fmt` using the given locale. This parser can be passed
* to {@link DateTime.fromFormatParser} to a parse a date in this format. This
* can be used to optimize cases where many dates need to be parsed in a
* specific format.
*
* @param {String} fmt - the format the string is expected to be in (see
* description)
* @param {Object} options - options used to set locale and numberingSystem
* for parser
* @returns {TokenParser} - opaque object to be used
*/
static buildFormatParser(fmt, options = {}) {
const { locale = null, numberingSystem = null } = options, localeToUse = Locale.fromOpts({
locale,
numberingSystem,
defaultToEN: true
});
return new TokenParser(localeToUse, fmt);
}
/**
* Create a DateTime from an input string and format parser.
*
* The format parser must have been created with the same locale as this call.
*
* @param {String} text - the string to parse
* @param {TokenParser} formatParser - parser from {@link DateTime.buildFormatParser}
* @param {Object} opts - options taken by fromFormat()
* @returns {DateTime}
*/
static fromFormatParser(text, formatParser, opts = {}) {
if (isUndefined(text) || isUndefined(formatParser)) {
throw new InvalidArgumentError(
"fromFormatParser requires an input string and a format parser"
);
}
const { locale = null, numberingSystem = null } = opts, localeToUse = Locale.fromOpts({
locale,
numberingSystem,
defaultToEN: true
});
if (!localeToUse.equals(formatParser.locale)) {
throw new InvalidArgumentError(
`fromFormatParser called with a locale of ${localeToUse}, but the format parser was created for ${formatParser.locale}`
);
}
const { result, zone, specificOffset, invalidReason } = formatParser.explainFromTokens(text);
if (invalidReason) {
return _DateTime.invalid(invalidReason);
} else {
return parseDataToDateTime(
result,
zone,
opts,
`format ${formatParser.format}`,
text,
specificOffset
);
}
}
// FORMAT PRESETS
/**
* {@link DateTime#toLocaleString} format like 10/14/1983
* @type {Object}
*/
static get DATE_SHORT() {
return DATE_SHORT;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983'
* @type {Object}
*/
static get DATE_MED() {
return DATE_MED;
}
/**
* {@link DateTime#toLocaleString} format like 'Fri, Oct 14, 1983'
* @type {Object}
*/
static get DATE_MED_WITH_WEEKDAY() {
return DATE_MED_WITH_WEEKDAY;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983'
* @type {Object}
*/
static get DATE_FULL() {
return DATE_FULL;
}
/**
* {@link DateTime#toLocaleString} format like 'Tuesday, October 14, 1983'
* @type {Object}
*/
static get DATE_HUGE() {
return DATE_HUGE;
}
/**
* {@link DateTime#toLocaleString} format like '09:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_SIMPLE() {
return TIME_SIMPLE;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_SECONDS() {
return TIME_WITH_SECONDS;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_SHORT_OFFSET() {
return TIME_WITH_SHORT_OFFSET;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get TIME_WITH_LONG_OFFSET() {
return TIME_WITH_LONG_OFFSET;
}
/**
* {@link DateTime#toLocaleString} format like '09:30', always 24-hour.
* @type {Object}
*/
static get TIME_24_SIMPLE() {
return TIME_24_SIMPLE;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_SECONDS() {
return TIME_24_WITH_SECONDS;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 EDT', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_SHORT_OFFSET() {
return TIME_24_WITH_SHORT_OFFSET;
}
/**
* {@link DateTime#toLocaleString} format like '09:30:23 Eastern Daylight Time', always 24-hour.
* @type {Object}
*/
static get TIME_24_WITH_LONG_OFFSET() {
return TIME_24_WITH_LONG_OFFSET;
}
/**
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_SHORT() {
return DATETIME_SHORT;
}
/**
* {@link DateTime#toLocaleString} format like '10/14/1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_SHORT_WITH_SECONDS() {
return DATETIME_SHORT_WITH_SECONDS;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED() {
return DATETIME_MED;
}
/**
* {@link DateTime#toLocaleString} format like 'Oct 14, 1983, 9:30:33 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED_WITH_SECONDS() {
return DATETIME_MED_WITH_SECONDS;
}
/**
* {@link DateTime#toLocaleString} format like 'Fri, 14 Oct 1983, 9:30 AM'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_MED_WITH_WEEKDAY() {
return DATETIME_MED_WITH_WEEKDAY;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_FULL() {
return DATETIME_FULL;
}
/**
* {@link DateTime#toLocaleString} format like 'October 14, 1983, 9:30:33 AM EDT'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_FULL_WITH_SECONDS() {
return DATETIME_FULL_WITH_SECONDS;
}
/**
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_HUGE() {
return DATETIME_HUGE;
}
/**
* {@link DateTime#toLocaleString} format like 'Friday, October 14, 1983, 9:30:33 AM Eastern Daylight Time'. Only 12-hour if the locale is.
* @type {Object}
*/
static get DATETIME_HUGE_WITH_SECONDS() {
return DATETIME_HUGE_WITH_SECONDS;
}
};
function friendlyDateTime(dateTimeish) {
if (DateTime.isDateTime(dateTimeish)) {
return dateTimeish;
} else if (dateTimeish && dateTimeish.valueOf && isNumber(dateTimeish.valueOf())) {
return DateTime.fromJSDate(dateTimeish);
} else if (dateTimeish && typeof dateTimeish === "object") {
return DateTime.fromObject(dateTimeish);
} else {
throw new InvalidArgumentError(
`Unknown datetime argument: ${dateTimeish}, of type ${typeof dateTimeish}`
);
}
}
// src/main.ts
var import_obsidian8 = require("obsidian");
var import_obsidian_dataview3 = __toESM(require_lib());
// src/index.tsx
var import_lodash16 = __toESM(require_lodash());
var import_obsidian6 = require("obsidian");
var React3 = __toESM(require_react());
var import_client = __toESM(require_client());
// node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
var import_react3 = __toESM(require_react());
var import_react_dom = __toESM(require_react_dom());
// node_modules/.pnpm/@dnd-kit+utilities@3.2.2_react@18.3.1/node_modules/@dnd-kit/utilities/dist/utilities.esm.js
var import_react = __toESM(require_react());
var canUseDOM = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
function isWindow(element) {
const elementString = Object.prototype.toString.call(element);
return elementString === "[object Window]" || // In Electron context the Window object serializes to [object global]
elementString === "[object global]";
}
function isNode(node) {
return "nodeType" in node;
}
function getWindow(target) {
var _target$ownerDocument, _target$ownerDocument2;
if (!target) {
return window;
}
if (isWindow(target)) {
return target;
}
if (!isNode(target)) {
return window;
}
return (_target$ownerDocument = (_target$ownerDocument2 = target.ownerDocument) == null ? void 0 : _target$ownerDocument2.defaultView) != null ? _target$ownerDocument : window;
}
function isDocument(node) {
const {
Document
} = getWindow(node);
return node instanceof Document;
}
function isHTMLElement(node) {
if (isWindow(node)) {
return false;
}
return node instanceof getWindow(node).HTMLElement;
}
function isSVGElement(node) {
return node instanceof getWindow(node).SVGElement;
}
function getOwnerDocument(target) {
if (!target) {
return document;
}
if (isWindow(target)) {
return target.document;
}
if (!isNode(target)) {
return document;
}
if (isDocument(target)) {
return target;
}
if (isHTMLElement(target) || isSVGElement(target)) {
return target.ownerDocument;
}
return document;
}
var useIsomorphicLayoutEffect = canUseDOM ? import_react.useLayoutEffect : import_react.useEffect;
function useEvent(handler) {
const handlerRef = (0, import_react.useRef)(handler);
useIsomorphicLayoutEffect(() => {
handlerRef.current = handler;
});
return (0, import_react.useCallback)(function() {
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
args[_key] = arguments[_key];
}
return handlerRef.current == null ? void 0 : handlerRef.current(...args);
}, []);
}
function useInterval() {
const intervalRef = (0, import_react.useRef)(null);
const set2 = (0, import_react.useCallback)((listener, duration) => {
intervalRef.current = setInterval(listener, duration);
}, []);
const clear = (0, import_react.useCallback)(() => {
if (intervalRef.current !== null) {
clearInterval(intervalRef.current);
intervalRef.current = null;
}
}, []);
return [set2, clear];
}
function useLatestValue(value, dependencies) {
if (dependencies === void 0) {
dependencies = [value];
}
const valueRef = (0, import_react.useRef)(value);
useIsomorphicLayoutEffect(() => {
if (valueRef.current !== value) {
valueRef.current = value;
}
}, dependencies);
return valueRef;
}
function useLazyMemo(callback, dependencies) {
const valueRef = (0, import_react.useRef)();
return (0, import_react.useMemo)(
() => {
const newValue = callback(valueRef.current);
valueRef.current = newValue;
return newValue;
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[...dependencies]
);
}
function useNodeRef(onChange) {
const onChangeHandler = useEvent(onChange);
const node = (0, import_react.useRef)(null);
const setNodeRef = (0, import_react.useCallback)(
(element) => {
if (element !== node.current) {
onChangeHandler == null ? void 0 : onChangeHandler(element, node.current);
}
node.current = element;
},
//eslint-disable-next-line
[]
);
return [node, setNodeRef];
}
function usePrevious(value) {
const ref = (0, import_react.useRef)();
(0, import_react.useEffect)(() => {
ref.current = value;
}, [value]);
return ref.current;
}
var ids = {};
function useUniqueId(prefix2, value) {
return (0, import_react.useMemo)(() => {
if (value) {
return value;
}
const id = ids[prefix2] == null ? 0 : ids[prefix2] + 1;
ids[prefix2] = id;
return prefix2 + "-" + id;
}, [prefix2, value]);
}
function createAdjustmentFn(modifier) {
return function(object) {
for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
adjustments[_key - 1] = arguments[_key];
}
return adjustments.reduce((accumulator, adjustment) => {
const entries = Object.entries(adjustment);
for (const [key2, valueAdjustment] of entries) {
const value = accumulator[key2];
if (value != null) {
accumulator[key2] = value + modifier * valueAdjustment;
}
}
return accumulator;
}, {
...object
});
};
}
var add = /* @__PURE__ */ createAdjustmentFn(1);
var subtract = /* @__PURE__ */ createAdjustmentFn(-1);
function hasViewportRelativeCoordinates(event) {
return "clientX" in event && "clientY" in event;
}
function isKeyboardEvent(event) {
if (!event) {
return false;
}
const {
KeyboardEvent
} = getWindow(event.target);
return KeyboardEvent && event instanceof KeyboardEvent;
}
function isTouchEvent(event) {
if (!event) {
return false;
}
const {
TouchEvent: TouchEvent2
} = getWindow(event.target);
return TouchEvent2 && event instanceof TouchEvent2;
}
function getEventCoordinates(event) {
if (isTouchEvent(event)) {
if (event.touches && event.touches.length) {
const {
clientX: x,
clientY: y
} = event.touches[0];
return {
x,
y
};
} else if (event.changedTouches && event.changedTouches.length) {
const {
clientX: x,
clientY: y
} = event.changedTouches[0];
return {
x,
y
};
}
}
if (hasViewportRelativeCoordinates(event)) {
return {
x: event.clientX,
y: event.clientY
};
}
return null;
}
var CSS = /* @__PURE__ */ Object.freeze({
Translate: {
toString(transform) {
if (!transform) {
return;
}
const {
x,
y
} = transform;
return "translate3d(" + (x ? Math.round(x) : 0) + "px, " + (y ? Math.round(y) : 0) + "px, 0)";
}
},
Scale: {
toString(transform) {
if (!transform) {
return;
}
const {
scaleX,
scaleY
} = transform;
return "scaleX(" + scaleX + ") scaleY(" + scaleY + ")";
}
},
Transform: {
toString(transform) {
if (!transform) {
return;
}
return [CSS.Translate.toString(transform), CSS.Scale.toString(transform)].join(" ");
}
},
Transition: {
toString(_ref) {
let {
property,
duration,
easing
} = _ref;
return property + " " + duration + "ms " + easing;
}
}
});
var SELECTOR = "a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";
function findFirstFocusableNode(element) {
if (element.matches(SELECTOR)) {
return element;
}
return element.querySelector(SELECTOR);
}
// node_modules/.pnpm/@dnd-kit+accessibility@3.1.1_react@18.3.1/node_modules/@dnd-kit/accessibility/dist/accessibility.esm.js
var import_react2 = __toESM(require_react());
var hiddenStyles = {
display: "none"
};
function HiddenText(_ref) {
let {
id,
value
} = _ref;
return import_react2.default.createElement("div", {
id,
style: hiddenStyles
}, value);
}
function LiveRegion(_ref) {
let {
id,
announcement,
ariaLiveType = "assertive"
} = _ref;
const visuallyHidden = {
position: "fixed",
top: 0,
left: 0,
width: 1,
height: 1,
margin: -1,
border: 0,
padding: 0,
overflow: "hidden",
clip: "rect(0 0 0 0)",
clipPath: "inset(100%)",
whiteSpace: "nowrap"
};
return import_react2.default.createElement("div", {
id,
style: visuallyHidden,
role: "status",
"aria-live": ariaLiveType,
"aria-atomic": true
}, announcement);
}
function useAnnouncement() {
const [announcement, setAnnouncement] = (0, import_react2.useState)("");
const announce = (0, import_react2.useCallback)((value) => {
if (value != null) {
setAnnouncement(value);
}
}, []);
return {
announce,
announcement
};
}
// node_modules/.pnpm/@dnd-kit+core@6.3.1_react-dom@18.3.1_react@18.3.1__react@18.3.1/node_modules/@dnd-kit/core/dist/core.esm.js
var DndMonitorContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
function useDndMonitor(listener) {
const registerListener = (0, import_react3.useContext)(DndMonitorContext);
(0, import_react3.useEffect)(() => {
if (!registerListener) {
throw new Error("useDndMonitor must be used within a children of <DndContext>");
}
const unsubscribe = registerListener(listener);
return unsubscribe;
}, [listener, registerListener]);
}
function useDndMonitorProvider() {
const [listeners] = (0, import_react3.useState)(() => /* @__PURE__ */ new Set());
const registerListener = (0, import_react3.useCallback)((listener) => {
listeners.add(listener);
return () => listeners.delete(listener);
}, [listeners]);
const dispatch = (0, import_react3.useCallback)((_ref) => {
let {
type,
event
} = _ref;
listeners.forEach((listener) => {
var _listener$type;
return (_listener$type = listener[type]) == null ? void 0 : _listener$type.call(listener, event);
});
}, [listeners]);
return [dispatch, registerListener];
}
var defaultScreenReaderInstructions = {
draggable: "\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "
};
var defaultAnnouncements = {
onDragStart(_ref) {
let {
active
} = _ref;
return "Picked up draggable item " + active.id + ".";
},
onDragOver(_ref2) {
let {
active,
over
} = _ref2;
if (over) {
return "Draggable item " + active.id + " was moved over droppable area " + over.id + ".";
}
return "Draggable item " + active.id + " is no longer over a droppable area.";
},
onDragEnd(_ref3) {
let {
active,
over
} = _ref3;
if (over) {
return "Draggable item " + active.id + " was dropped over droppable area " + over.id;
}
return "Draggable item " + active.id + " was dropped.";
},
onDragCancel(_ref4) {
let {
active
} = _ref4;
return "Dragging was cancelled. Draggable item " + active.id + " was dropped.";
}
};
function Accessibility(_ref) {
let {
announcements = defaultAnnouncements,
container,
hiddenTextDescribedById,
screenReaderInstructions = defaultScreenReaderInstructions
} = _ref;
const {
announce,
announcement
} = useAnnouncement();
const liveRegionId = useUniqueId("DndLiveRegion");
const [mounted, setMounted] = (0, import_react3.useState)(false);
(0, import_react3.useEffect)(() => {
setMounted(true);
}, []);
useDndMonitor((0, import_react3.useMemo)(() => ({
onDragStart(_ref2) {
let {
active
} = _ref2;
announce(announcements.onDragStart({
active
}));
},
onDragMove(_ref3) {
let {
active,
over
} = _ref3;
if (announcements.onDragMove) {
announce(announcements.onDragMove({
active,
over
}));
}
},
onDragOver(_ref4) {
let {
active,
over
} = _ref4;
announce(announcements.onDragOver({
active,
over
}));
},
onDragEnd(_ref5) {
let {
active,
over
} = _ref5;
announce(announcements.onDragEnd({
active,
over
}));
},
onDragCancel(_ref6) {
let {
active,
over
} = _ref6;
announce(announcements.onDragCancel({
active,
over
}));
}
}), [announce, announcements]));
if (!mounted) {
return null;
}
const markup = import_react3.default.createElement(import_react3.default.Fragment, null, import_react3.default.createElement(HiddenText, {
id: hiddenTextDescribedById,
value: screenReaderInstructions.draggable
}), import_react3.default.createElement(LiveRegion, {
id: liveRegionId,
announcement
}));
return container ? (0, import_react_dom.createPortal)(markup, container) : markup;
}
var Action;
(function(Action2) {
Action2["DragStart"] = "dragStart";
Action2["DragMove"] = "dragMove";
Action2["DragEnd"] = "dragEnd";
Action2["DragCancel"] = "dragCancel";
Action2["DragOver"] = "dragOver";
Action2["RegisterDroppable"] = "registerDroppable";
Action2["SetDroppableDisabled"] = "setDroppableDisabled";
Action2["UnregisterDroppable"] = "unregisterDroppable";
})(Action || (Action = {}));
function noop() {
}
function useSensor(sensor, options) {
return (0, import_react3.useMemo)(
() => ({
sensor,
options: options != null ? options : {}
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
[sensor, options]
);
}
function useSensors() {
for (var _len = arguments.length, sensors = new Array(_len), _key = 0; _key < _len; _key++) {
sensors[_key] = arguments[_key];
}
return (0, import_react3.useMemo)(
() => [...sensors].filter((sensor) => sensor != null),
// eslint-disable-next-line react-hooks/exhaustive-deps
[...sensors]
);
}
var defaultCoordinates = /* @__PURE__ */ Object.freeze({
x: 0,
y: 0
});
function distanceBetween(p1, p2) {
return Math.sqrt(Math.pow(p1.x - p2.x, 2) + Math.pow(p1.y - p2.y, 2));
}
function getRelativeTransformOrigin(event, rect) {
const eventCoordinates = getEventCoordinates(event);
if (!eventCoordinates) {
return "0 0";
}
const transformOrigin = {
x: (eventCoordinates.x - rect.left) / rect.width * 100,
y: (eventCoordinates.y - rect.top) / rect.height * 100
};
return transformOrigin.x + "% " + transformOrigin.y + "%";
}
function sortCollisionsAsc(_ref, _ref2) {
let {
data: {
value: a
}
} = _ref;
let {
data: {
value: b
}
} = _ref2;
return a - b;
}
function sortCollisionsDesc(_ref3, _ref4) {
let {
data: {
value: a
}
} = _ref3;
let {
data: {
value: b
}
} = _ref4;
return b - a;
}
function cornersOfRectangle(_ref5) {
let {
left,
top,
height,
width
} = _ref5;
return [{
x: left,
y: top
}, {
x: left + width,
y: top
}, {
x: left,
y: top + height
}, {
x: left + width,
y: top + height
}];
}
function getFirstCollision(collisions, property) {
if (!collisions || collisions.length === 0) {
return null;
}
const [firstCollision] = collisions;
return property ? firstCollision[property] : firstCollision;
}
function getIntersectionRatio(entry, target) {
const top = Math.max(target.top, entry.top);
const left = Math.max(target.left, entry.left);
const right = Math.min(target.left + target.width, entry.left + entry.width);
const bottom = Math.min(target.top + target.height, entry.top + entry.height);
const width = right - left;
const height = bottom - top;
if (left < right && top < bottom) {
const targetArea = target.width * target.height;
const entryArea = entry.width * entry.height;
const intersectionArea = width * height;
const intersectionRatio = intersectionArea / (targetArea + entryArea - intersectionArea);
return Number(intersectionRatio.toFixed(4));
}
return 0;
}
var rectIntersection = (_ref) => {
let {
collisionRect,
droppableRects,
droppableContainers
} = _ref;
const collisions = [];
for (const droppableContainer of droppableContainers) {
const {
id
} = droppableContainer;
const rect = droppableRects.get(id);
if (rect) {
const intersectionRatio = getIntersectionRatio(rect, collisionRect);
if (intersectionRatio > 0) {
collisions.push({
id,
data: {
droppableContainer,
value: intersectionRatio
}
});
}
}
}
return collisions.sort(sortCollisionsDesc);
};
function isPointWithinRect(point, rect) {
const {
top,
left,
bottom,
right
} = rect;
return top <= point.y && point.y <= bottom && left <= point.x && point.x <= right;
}
var pointerWithin = (_ref) => {
let {
droppableContainers,
droppableRects,
pointerCoordinates
} = _ref;
if (!pointerCoordinates) {
return [];
}
const collisions = [];
for (const droppableContainer of droppableContainers) {
const {
id
} = droppableContainer;
const rect = droppableRects.get(id);
if (rect && isPointWithinRect(pointerCoordinates, rect)) {
const corners = cornersOfRectangle(rect);
const distances = corners.reduce((accumulator, corner) => {
return accumulator + distanceBetween(pointerCoordinates, corner);
}, 0);
const effectiveDistance = Number((distances / 4).toFixed(4));
collisions.push({
id,
data: {
droppableContainer,
value: effectiveDistance
}
});
}
}
return collisions.sort(sortCollisionsAsc);
};
function adjustScale(transform, rect1, rect2) {
return {
...transform,
scaleX: rect1 && rect2 ? rect1.width / rect2.width : 1,
scaleY: rect1 && rect2 ? rect1.height / rect2.height : 1
};
}
function getRectDelta(rect1, rect2) {
return rect1 && rect2 ? {
x: rect1.left - rect2.left,
y: rect1.top - rect2.top
} : defaultCoordinates;
}
function createRectAdjustmentFn(modifier) {
return function adjustClientRect(rect) {
for (var _len = arguments.length, adjustments = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
adjustments[_key - 1] = arguments[_key];
}
return adjustments.reduce((acc, adjustment) => ({
...acc,
top: acc.top + modifier * adjustment.y,
bottom: acc.bottom + modifier * adjustment.y,
left: acc.left + modifier * adjustment.x,
right: acc.right + modifier * adjustment.x
}), {
...rect
});
};
}
var getAdjustedRect = /* @__PURE__ */ createRectAdjustmentFn(1);
function parseTransform(transform) {
if (transform.startsWith("matrix3d(")) {
const transformArray = transform.slice(9, -1).split(/, /);
return {
x: +transformArray[12],
y: +transformArray[13],
scaleX: +transformArray[0],
scaleY: +transformArray[5]
};
} else if (transform.startsWith("matrix(")) {
const transformArray = transform.slice(7, -1).split(/, /);
return {
x: +transformArray[4],
y: +transformArray[5],
scaleX: +transformArray[0],
scaleY: +transformArray[3]
};
}
return null;
}
function inverseTransform(rect, transform, transformOrigin) {
const parsedTransform = parseTransform(transform);
if (!parsedTransform) {
return rect;
}
const {
scaleX,
scaleY,
x: translateX,
y: translateY
} = parsedTransform;
const x = rect.left - translateX - (1 - scaleX) * parseFloat(transformOrigin);
const y = rect.top - translateY - (1 - scaleY) * parseFloat(transformOrigin.slice(transformOrigin.indexOf(" ") + 1));
const w = scaleX ? rect.width / scaleX : rect.width;
const h = scaleY ? rect.height / scaleY : rect.height;
return {
width: w,
height: h,
top: y,
right: x + w,
bottom: y + h,
left: x
};
}
var defaultOptions = {
ignoreTransform: false
};
function getClientRect(element, options) {
if (options === void 0) {
options = defaultOptions;
}
let rect = element.getBoundingClientRect();
if (options.ignoreTransform) {
const {
transform,
transformOrigin
} = getWindow(element).getComputedStyle(element);
if (transform) {
rect = inverseTransform(rect, transform, transformOrigin);
}
}
const {
top,
left,
width,
height,
bottom,
right
} = rect;
return {
top,
left,
width,
height,
bottom,
right
};
}
function getTransformAgnosticClientRect(element) {
return getClientRect(element, {
ignoreTransform: true
});
}
function getWindowClientRect(element) {
const width = element.innerWidth;
const height = element.innerHeight;
return {
top: 0,
left: 0,
right: width,
bottom: height,
width,
height
};
}
function isFixed(node, computedStyle) {
if (computedStyle === void 0) {
computedStyle = getWindow(node).getComputedStyle(node);
}
return computedStyle.position === "fixed";
}
function isScrollable(element, computedStyle) {
if (computedStyle === void 0) {
computedStyle = getWindow(element).getComputedStyle(element);
}
const overflowRegex = /(auto|scroll|overlay)/;
const properties2 = ["overflow", "overflowX", "overflowY"];
return properties2.some((property) => {
const value = computedStyle[property];
return typeof value === "string" ? overflowRegex.test(value) : false;
});
}
function getScrollableAncestors(element, limit) {
const scrollParents = [];
function findScrollableAncestors(node) {
if (limit != null && scrollParents.length >= limit) {
return scrollParents;
}
if (!node) {
return scrollParents;
}
if (isDocument(node) && node.scrollingElement != null && !scrollParents.includes(node.scrollingElement)) {
scrollParents.push(node.scrollingElement);
return scrollParents;
}
if (!isHTMLElement(node) || isSVGElement(node)) {
return scrollParents;
}
if (scrollParents.includes(node)) {
return scrollParents;
}
const computedStyle = getWindow(element).getComputedStyle(node);
if (node !== element) {
if (isScrollable(node, computedStyle)) {
scrollParents.push(node);
}
}
if (isFixed(node, computedStyle)) {
return scrollParents;
}
return findScrollableAncestors(node.parentNode);
}
if (!element) {
return scrollParents;
}
return findScrollableAncestors(element);
}
function getFirstScrollableAncestor(node) {
const [firstScrollableAncestor] = getScrollableAncestors(node, 1);
return firstScrollableAncestor != null ? firstScrollableAncestor : null;
}
function getScrollableElement(element) {
if (!canUseDOM || !element) {
return null;
}
if (isWindow(element)) {
return element;
}
if (!isNode(element)) {
return null;
}
if (isDocument(element) || element === getOwnerDocument(element).scrollingElement) {
return window;
}
if (isHTMLElement(element)) {
return element;
}
return null;
}
function getScrollXCoordinate(element) {
if (isWindow(element)) {
return element.scrollX;
}
return element.scrollLeft;
}
function getScrollYCoordinate(element) {
if (isWindow(element)) {
return element.scrollY;
}
return element.scrollTop;
}
function getScrollCoordinates(element) {
return {
x: getScrollXCoordinate(element),
y: getScrollYCoordinate(element)
};
}
var Direction;
(function(Direction2) {
Direction2[Direction2["Forward"] = 1] = "Forward";
Direction2[Direction2["Backward"] = -1] = "Backward";
})(Direction || (Direction = {}));
function isDocumentScrollingElement(element) {
if (!canUseDOM || !element) {
return false;
}
return element === document.scrollingElement;
}
function getScrollPosition(scrollingContainer) {
const minScroll = {
x: 0,
y: 0
};
const dimensions = isDocumentScrollingElement(scrollingContainer) ? {
height: window.innerHeight,
width: window.innerWidth
} : {
height: scrollingContainer.clientHeight,
width: scrollingContainer.clientWidth
};
const maxScroll = {
x: scrollingContainer.scrollWidth - dimensions.width,
y: scrollingContainer.scrollHeight - dimensions.height
};
const isTop = scrollingContainer.scrollTop <= minScroll.y;
const isLeft = scrollingContainer.scrollLeft <= minScroll.x;
const isBottom = scrollingContainer.scrollTop >= maxScroll.y;
const isRight = scrollingContainer.scrollLeft >= maxScroll.x;
return {
isTop,
isLeft,
isBottom,
isRight,
maxScroll,
minScroll
};
}
var defaultThreshold = {
x: 0.2,
y: 0.2
};
function getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, _ref, acceleration, thresholdPercentage) {
let {
top,
left,
right,
bottom
} = _ref;
if (acceleration === void 0) {
acceleration = 10;
}
if (thresholdPercentage === void 0) {
thresholdPercentage = defaultThreshold;
}
const {
isTop,
isBottom,
isLeft,
isRight
} = getScrollPosition(scrollContainer);
const direction = {
x: 0,
y: 0
};
const speed = {
x: 0,
y: 0
};
const threshold = {
height: scrollContainerRect.height * thresholdPercentage.y,
width: scrollContainerRect.width * thresholdPercentage.x
};
if (!isTop && top <= scrollContainerRect.top + threshold.height) {
direction.y = Direction.Backward;
speed.y = acceleration * Math.abs((scrollContainerRect.top + threshold.height - top) / threshold.height);
} else if (!isBottom && bottom >= scrollContainerRect.bottom - threshold.height) {
direction.y = Direction.Forward;
speed.y = acceleration * Math.abs((scrollContainerRect.bottom - threshold.height - bottom) / threshold.height);
}
if (!isRight && right >= scrollContainerRect.right - threshold.width) {
direction.x = Direction.Forward;
speed.x = acceleration * Math.abs((scrollContainerRect.right - threshold.width - right) / threshold.width);
} else if (!isLeft && left <= scrollContainerRect.left + threshold.width) {
direction.x = Direction.Backward;
speed.x = acceleration * Math.abs((scrollContainerRect.left + threshold.width - left) / threshold.width);
}
return {
direction,
speed
};
}
function getScrollElementRect(element) {
if (element === document.scrollingElement) {
const {
innerWidth,
innerHeight
} = window;
return {
top: 0,
left: 0,
right: innerWidth,
bottom: innerHeight,
width: innerWidth,
height: innerHeight
};
}
const {
top,
left,
right,
bottom
} = element.getBoundingClientRect();
return {
top,
left,
right,
bottom,
width: element.clientWidth,
height: element.clientHeight
};
}
function getScrollOffsets(scrollableAncestors) {
return scrollableAncestors.reduce((acc, node) => {
return add(acc, getScrollCoordinates(node));
}, defaultCoordinates);
}
function getScrollXOffset(scrollableAncestors) {
return scrollableAncestors.reduce((acc, node) => {
return acc + getScrollXCoordinate(node);
}, 0);
}
function getScrollYOffset(scrollableAncestors) {
return scrollableAncestors.reduce((acc, node) => {
return acc + getScrollYCoordinate(node);
}, 0);
}
function scrollIntoViewIfNeeded(element, measure) {
if (measure === void 0) {
measure = getClientRect;
}
if (!element) {
return;
}
const {
top,
left,
bottom,
right
} = measure(element);
const firstScrollableAncestor = getFirstScrollableAncestor(element);
if (!firstScrollableAncestor) {
return;
}
if (bottom <= 0 || right <= 0 || top >= window.innerHeight || left >= window.innerWidth) {
element.scrollIntoView({
block: "center",
inline: "center"
});
}
}
var properties = [["x", ["left", "right"], getScrollXOffset], ["y", ["top", "bottom"], getScrollYOffset]];
var Rect = class {
constructor(rect, element) {
this.rect = void 0;
this.width = void 0;
this.height = void 0;
this.top = void 0;
this.bottom = void 0;
this.right = void 0;
this.left = void 0;
const scrollableAncestors = getScrollableAncestors(element);
const scrollOffsets = getScrollOffsets(scrollableAncestors);
this.rect = {
...rect
};
this.width = rect.width;
this.height = rect.height;
for (const [axis, keys, getScrollOffset] of properties) {
for (const key2 of keys) {
Object.defineProperty(this, key2, {
get: () => {
const currentOffsets = getScrollOffset(scrollableAncestors);
const scrollOffsetsDeltla = scrollOffsets[axis] - currentOffsets;
return this.rect[key2] + scrollOffsetsDeltla;
},
enumerable: true
});
}
}
Object.defineProperty(this, "rect", {
enumerable: false
});
}
};
var Listeners = class {
constructor(target) {
this.target = void 0;
this.listeners = [];
this.removeAll = () => {
this.listeners.forEach((listener) => {
var _this$target;
return (_this$target = this.target) == null ? void 0 : _this$target.removeEventListener(...listener);
});
};
this.target = target;
}
add(eventName, handler, options) {
var _this$target2;
(_this$target2 = this.target) == null ? void 0 : _this$target2.addEventListener(eventName, handler, options);
this.listeners.push([eventName, handler, options]);
}
};
function getEventListenerTarget(target) {
const {
EventTarget
} = getWindow(target);
return target instanceof EventTarget ? target : getOwnerDocument(target);
}
function hasExceededDistance(delta, measurement) {
const dx = Math.abs(delta.x);
const dy = Math.abs(delta.y);
if (typeof measurement === "number") {
return Math.sqrt(dx ** 2 + dy ** 2) > measurement;
}
if ("x" in measurement && "y" in measurement) {
return dx > measurement.x && dy > measurement.y;
}
if ("x" in measurement) {
return dx > measurement.x;
}
if ("y" in measurement) {
return dy > measurement.y;
}
return false;
}
var EventName;
(function(EventName2) {
EventName2["Click"] = "click";
EventName2["DragStart"] = "dragstart";
EventName2["Keydown"] = "keydown";
EventName2["ContextMenu"] = "contextmenu";
EventName2["Resize"] = "resize";
EventName2["SelectionChange"] = "selectionchange";
EventName2["VisibilityChange"] = "visibilitychange";
})(EventName || (EventName = {}));
function preventDefault(event) {
event.preventDefault();
}
function stopPropagation(event) {
event.stopPropagation();
}
var KeyboardCode;
(function(KeyboardCode2) {
KeyboardCode2["Space"] = "Space";
KeyboardCode2["Down"] = "ArrowDown";
KeyboardCode2["Right"] = "ArrowRight";
KeyboardCode2["Left"] = "ArrowLeft";
KeyboardCode2["Up"] = "ArrowUp";
KeyboardCode2["Esc"] = "Escape";
KeyboardCode2["Enter"] = "Enter";
KeyboardCode2["Tab"] = "Tab";
})(KeyboardCode || (KeyboardCode = {}));
var defaultKeyboardCodes = {
start: [KeyboardCode.Space, KeyboardCode.Enter],
cancel: [KeyboardCode.Esc],
end: [KeyboardCode.Space, KeyboardCode.Enter, KeyboardCode.Tab]
};
var defaultKeyboardCoordinateGetter = (event, _ref) => {
let {
currentCoordinates
} = _ref;
switch (event.code) {
case KeyboardCode.Right:
return {
...currentCoordinates,
x: currentCoordinates.x + 25
};
case KeyboardCode.Left:
return {
...currentCoordinates,
x: currentCoordinates.x - 25
};
case KeyboardCode.Down:
return {
...currentCoordinates,
y: currentCoordinates.y + 25
};
case KeyboardCode.Up:
return {
...currentCoordinates,
y: currentCoordinates.y - 25
};
}
return void 0;
};
var KeyboardSensor = class {
constructor(props) {
this.props = void 0;
this.autoScrollEnabled = false;
this.referenceCoordinates = void 0;
this.listeners = void 0;
this.windowListeners = void 0;
this.props = props;
const {
event: {
target
}
} = props;
this.props = props;
this.listeners = new Listeners(getOwnerDocument(target));
this.windowListeners = new Listeners(getWindow(target));
this.handleKeyDown = this.handleKeyDown.bind(this);
this.handleCancel = this.handleCancel.bind(this);
this.attach();
}
attach() {
this.handleStart();
this.windowListeners.add(EventName.Resize, this.handleCancel);
this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
setTimeout(() => this.listeners.add(EventName.Keydown, this.handleKeyDown));
}
handleStart() {
const {
activeNode,
onStart
} = this.props;
const node = activeNode.node.current;
if (node) {
scrollIntoViewIfNeeded(node);
}
onStart(defaultCoordinates);
}
handleKeyDown(event) {
if (isKeyboardEvent(event)) {
const {
active,
context,
options
} = this.props;
const {
keyboardCodes = defaultKeyboardCodes,
coordinateGetter = defaultKeyboardCoordinateGetter,
scrollBehavior = "smooth"
} = options;
const {
code
} = event;
if (keyboardCodes.end.includes(code)) {
this.handleEnd(event);
return;
}
if (keyboardCodes.cancel.includes(code)) {
this.handleCancel(event);
return;
}
const {
collisionRect
} = context.current;
const currentCoordinates = collisionRect ? {
x: collisionRect.left,
y: collisionRect.top
} : defaultCoordinates;
if (!this.referenceCoordinates) {
this.referenceCoordinates = currentCoordinates;
}
const newCoordinates = coordinateGetter(event, {
active,
context: context.current,
currentCoordinates
});
if (newCoordinates) {
const coordinatesDelta = subtract(newCoordinates, currentCoordinates);
const scrollDelta = {
x: 0,
y: 0
};
const {
scrollableAncestors
} = context.current;
for (const scrollContainer of scrollableAncestors) {
const direction = event.code;
const {
isTop,
isRight,
isLeft,
isBottom,
maxScroll,
minScroll
} = getScrollPosition(scrollContainer);
const scrollElementRect = getScrollElementRect(scrollContainer);
const clampedCoordinates = {
x: Math.min(direction === KeyboardCode.Right ? scrollElementRect.right - scrollElementRect.width / 2 : scrollElementRect.right, Math.max(direction === KeyboardCode.Right ? scrollElementRect.left : scrollElementRect.left + scrollElementRect.width / 2, newCoordinates.x)),
y: Math.min(direction === KeyboardCode.Down ? scrollElementRect.bottom - scrollElementRect.height / 2 : scrollElementRect.bottom, Math.max(direction === KeyboardCode.Down ? scrollElementRect.top : scrollElementRect.top + scrollElementRect.height / 2, newCoordinates.y))
};
const canScrollX = direction === KeyboardCode.Right && !isRight || direction === KeyboardCode.Left && !isLeft;
const canScrollY = direction === KeyboardCode.Down && !isBottom || direction === KeyboardCode.Up && !isTop;
if (canScrollX && clampedCoordinates.x !== newCoordinates.x) {
const newScrollCoordinates = scrollContainer.scrollLeft + coordinatesDelta.x;
const canScrollToNewCoordinates = direction === KeyboardCode.Right && newScrollCoordinates <= maxScroll.x || direction === KeyboardCode.Left && newScrollCoordinates >= minScroll.x;
if (canScrollToNewCoordinates && !coordinatesDelta.y) {
scrollContainer.scrollTo({
left: newScrollCoordinates,
behavior: scrollBehavior
});
return;
}
if (canScrollToNewCoordinates) {
scrollDelta.x = scrollContainer.scrollLeft - newScrollCoordinates;
} else {
scrollDelta.x = direction === KeyboardCode.Right ? scrollContainer.scrollLeft - maxScroll.x : scrollContainer.scrollLeft - minScroll.x;
}
if (scrollDelta.x) {
scrollContainer.scrollBy({
left: -scrollDelta.x,
behavior: scrollBehavior
});
}
break;
} else if (canScrollY && clampedCoordinates.y !== newCoordinates.y) {
const newScrollCoordinates = scrollContainer.scrollTop + coordinatesDelta.y;
const canScrollToNewCoordinates = direction === KeyboardCode.Down && newScrollCoordinates <= maxScroll.y || direction === KeyboardCode.Up && newScrollCoordinates >= minScroll.y;
if (canScrollToNewCoordinates && !coordinatesDelta.x) {
scrollContainer.scrollTo({
top: newScrollCoordinates,
behavior: scrollBehavior
});
return;
}
if (canScrollToNewCoordinates) {
scrollDelta.y = scrollContainer.scrollTop - newScrollCoordinates;
} else {
scrollDelta.y = direction === KeyboardCode.Down ? scrollContainer.scrollTop - maxScroll.y : scrollContainer.scrollTop - minScroll.y;
}
if (scrollDelta.y) {
scrollContainer.scrollBy({
top: -scrollDelta.y,
behavior: scrollBehavior
});
}
break;
}
}
this.handleMove(event, add(subtract(newCoordinates, this.referenceCoordinates), scrollDelta));
}
}
}
handleMove(event, coordinates) {
const {
onMove
} = this.props;
event.preventDefault();
onMove(coordinates);
}
handleEnd(event) {
const {
onEnd
} = this.props;
event.preventDefault();
this.detach();
onEnd();
}
handleCancel(event) {
const {
onCancel
} = this.props;
event.preventDefault();
this.detach();
onCancel();
}
detach() {
this.listeners.removeAll();
this.windowListeners.removeAll();
}
};
KeyboardSensor.activators = [{
eventName: "onKeyDown",
handler: (event, _ref, _ref2) => {
let {
keyboardCodes = defaultKeyboardCodes,
onActivation
} = _ref;
let {
active
} = _ref2;
const {
code
} = event.nativeEvent;
if (keyboardCodes.start.includes(code)) {
const activator = active.activatorNode.current;
if (activator && event.target !== activator) {
return false;
}
event.preventDefault();
onActivation == null ? void 0 : onActivation({
event: event.nativeEvent
});
return true;
}
return false;
}
}];
function isDistanceConstraint(constraint) {
return Boolean(constraint && "distance" in constraint);
}
function isDelayConstraint(constraint) {
return Boolean(constraint && "delay" in constraint);
}
var AbstractPointerSensor = class {
constructor(props, events2, listenerTarget) {
var _getEventCoordinates;
if (listenerTarget === void 0) {
listenerTarget = getEventListenerTarget(props.event.target);
}
this.props = void 0;
this.events = void 0;
this.autoScrollEnabled = true;
this.document = void 0;
this.activated = false;
this.initialCoordinates = void 0;
this.timeoutId = null;
this.listeners = void 0;
this.documentListeners = void 0;
this.windowListeners = void 0;
this.props = props;
this.events = events2;
const {
event
} = props;
const {
target
} = event;
this.props = props;
this.events = events2;
this.document = getOwnerDocument(target);
this.documentListeners = new Listeners(this.document);
this.listeners = new Listeners(listenerTarget);
this.windowListeners = new Listeners(getWindow(target));
this.initialCoordinates = (_getEventCoordinates = getEventCoordinates(event)) != null ? _getEventCoordinates : defaultCoordinates;
this.handleStart = this.handleStart.bind(this);
this.handleMove = this.handleMove.bind(this);
this.handleEnd = this.handleEnd.bind(this);
this.handleCancel = this.handleCancel.bind(this);
this.handleKeydown = this.handleKeydown.bind(this);
this.removeTextSelection = this.removeTextSelection.bind(this);
this.attach();
}
attach() {
const {
events: events2,
props: {
options: {
activationConstraint,
bypassActivationConstraint
}
}
} = this;
this.listeners.add(events2.move.name, this.handleMove, {
passive: false
});
this.listeners.add(events2.end.name, this.handleEnd);
if (events2.cancel) {
this.listeners.add(events2.cancel.name, this.handleCancel);
}
this.windowListeners.add(EventName.Resize, this.handleCancel);
this.windowListeners.add(EventName.DragStart, preventDefault);
this.windowListeners.add(EventName.VisibilityChange, this.handleCancel);
this.windowListeners.add(EventName.ContextMenu, preventDefault);
this.documentListeners.add(EventName.Keydown, this.handleKeydown);
if (activationConstraint) {
if (bypassActivationConstraint != null && bypassActivationConstraint({
event: this.props.event,
activeNode: this.props.activeNode,
options: this.props.options
})) {
return this.handleStart();
}
if (isDelayConstraint(activationConstraint)) {
this.timeoutId = setTimeout(this.handleStart, activationConstraint.delay);
this.handlePending(activationConstraint);
return;
}
if (isDistanceConstraint(activationConstraint)) {
this.handlePending(activationConstraint);
return;
}
}
this.handleStart();
}
detach() {
this.listeners.removeAll();
this.windowListeners.removeAll();
setTimeout(this.documentListeners.removeAll, 50);
if (this.timeoutId !== null) {
clearTimeout(this.timeoutId);
this.timeoutId = null;
}
}
handlePending(constraint, offset2) {
const {
active,
onPending
} = this.props;
onPending(active, constraint, this.initialCoordinates, offset2);
}
handleStart() {
const {
initialCoordinates
} = this;
const {
onStart
} = this.props;
if (initialCoordinates) {
this.activated = true;
this.documentListeners.add(EventName.Click, stopPropagation, {
capture: true
});
this.removeTextSelection();
this.documentListeners.add(EventName.SelectionChange, this.removeTextSelection);
onStart(initialCoordinates);
}
}
handleMove(event) {
var _getEventCoordinates2;
const {
activated,
initialCoordinates,
props
} = this;
const {
onMove,
options: {
activationConstraint
}
} = props;
if (!initialCoordinates) {
return;
}
const coordinates = (_getEventCoordinates2 = getEventCoordinates(event)) != null ? _getEventCoordinates2 : defaultCoordinates;
const delta = subtract(initialCoordinates, coordinates);
if (!activated && activationConstraint) {
if (isDistanceConstraint(activationConstraint)) {
if (activationConstraint.tolerance != null && hasExceededDistance(delta, activationConstraint.tolerance)) {
return this.handleCancel();
}
if (hasExceededDistance(delta, activationConstraint.distance)) {
return this.handleStart();
}
}
if (isDelayConstraint(activationConstraint)) {
if (hasExceededDistance(delta, activationConstraint.tolerance)) {
return this.handleCancel();
}
}
this.handlePending(activationConstraint, delta);
return;
}
if (event.cancelable) {
event.preventDefault();
}
onMove(coordinates);
}
handleEnd() {
const {
onAbort,
onEnd
} = this.props;
this.detach();
if (!this.activated) {
onAbort(this.props.active);
}
onEnd();
}
handleCancel() {
const {
onAbort,
onCancel
} = this.props;
this.detach();
if (!this.activated) {
onAbort(this.props.active);
}
onCancel();
}
handleKeydown(event) {
if (event.code === KeyboardCode.Esc) {
this.handleCancel();
}
}
removeTextSelection() {
var _this$document$getSel;
(_this$document$getSel = this.document.getSelection()) == null ? void 0 : _this$document$getSel.removeAllRanges();
}
};
var events = {
cancel: {
name: "pointercancel"
},
move: {
name: "pointermove"
},
end: {
name: "pointerup"
}
};
var PointerSensor = class extends AbstractPointerSensor {
constructor(props) {
const {
event
} = props;
const listenerTarget = getOwnerDocument(event.target);
super(props, events, listenerTarget);
}
};
PointerSensor.activators = [{
eventName: "onPointerDown",
handler: (_ref, _ref2) => {
let {
nativeEvent: event
} = _ref;
let {
onActivation
} = _ref2;
if (!event.isPrimary || event.button !== 0) {
return false;
}
onActivation == null ? void 0 : onActivation({
event
});
return true;
}
}];
var events$1 = {
move: {
name: "mousemove"
},
end: {
name: "mouseup"
}
};
var MouseButton;
(function(MouseButton2) {
MouseButton2[MouseButton2["RightClick"] = 2] = "RightClick";
})(MouseButton || (MouseButton = {}));
var MouseSensor = class extends AbstractPointerSensor {
constructor(props) {
super(props, events$1, getOwnerDocument(props.event.target));
}
};
MouseSensor.activators = [{
eventName: "onMouseDown",
handler: (_ref, _ref2) => {
let {
nativeEvent: event
} = _ref;
let {
onActivation
} = _ref2;
if (event.button === MouseButton.RightClick) {
return false;
}
onActivation == null ? void 0 : onActivation({
event
});
return true;
}
}];
var events$2 = {
cancel: {
name: "touchcancel"
},
move: {
name: "touchmove"
},
end: {
name: "touchend"
}
};
var TouchSensor = class extends AbstractPointerSensor {
constructor(props) {
super(props, events$2);
}
static setup() {
window.addEventListener(events$2.move.name, noop2, {
capture: false,
passive: false
});
return function teardown() {
window.removeEventListener(events$2.move.name, noop2);
};
function noop2() {
}
}
};
TouchSensor.activators = [{
eventName: "onTouchStart",
handler: (_ref, _ref2) => {
let {
nativeEvent: event
} = _ref;
let {
onActivation
} = _ref2;
const {
touches
} = event;
if (touches.length > 1) {
return false;
}
onActivation == null ? void 0 : onActivation({
event
});
return true;
}
}];
var AutoScrollActivator;
(function(AutoScrollActivator2) {
AutoScrollActivator2[AutoScrollActivator2["Pointer"] = 0] = "Pointer";
AutoScrollActivator2[AutoScrollActivator2["DraggableRect"] = 1] = "DraggableRect";
})(AutoScrollActivator || (AutoScrollActivator = {}));
var TraversalOrder;
(function(TraversalOrder2) {
TraversalOrder2[TraversalOrder2["TreeOrder"] = 0] = "TreeOrder";
TraversalOrder2[TraversalOrder2["ReversedTreeOrder"] = 1] = "ReversedTreeOrder";
})(TraversalOrder || (TraversalOrder = {}));
function useAutoScroller(_ref) {
let {
acceleration,
activator = AutoScrollActivator.Pointer,
canScroll,
draggingRect,
enabled,
interval = 5,
order = TraversalOrder.TreeOrder,
pointerCoordinates,
scrollableAncestors,
scrollableAncestorRects,
delta,
threshold
} = _ref;
const scrollIntent = useScrollIntent({
delta,
disabled: !enabled
});
const [setAutoScrollInterval, clearAutoScrollInterval] = useInterval();
const scrollSpeed = (0, import_react3.useRef)({
x: 0,
y: 0
});
const scrollDirection = (0, import_react3.useRef)({
x: 0,
y: 0
});
const rect = (0, import_react3.useMemo)(() => {
switch (activator) {
case AutoScrollActivator.Pointer:
return pointerCoordinates ? {
top: pointerCoordinates.y,
bottom: pointerCoordinates.y,
left: pointerCoordinates.x,
right: pointerCoordinates.x
} : null;
case AutoScrollActivator.DraggableRect:
return draggingRect;
}
}, [activator, draggingRect, pointerCoordinates]);
const scrollContainerRef = (0, import_react3.useRef)(null);
const autoScroll = (0, import_react3.useCallback)(() => {
const scrollContainer = scrollContainerRef.current;
if (!scrollContainer) {
return;
}
const scrollLeft = scrollSpeed.current.x * scrollDirection.current.x;
const scrollTop = scrollSpeed.current.y * scrollDirection.current.y;
scrollContainer.scrollBy(scrollLeft, scrollTop);
}, []);
const sortedScrollableAncestors = (0, import_react3.useMemo)(() => order === TraversalOrder.TreeOrder ? [...scrollableAncestors].reverse() : scrollableAncestors, [order, scrollableAncestors]);
(0, import_react3.useEffect)(
() => {
if (!enabled || !scrollableAncestors.length || !rect) {
clearAutoScrollInterval();
return;
}
for (const scrollContainer of sortedScrollableAncestors) {
if ((canScroll == null ? void 0 : canScroll(scrollContainer)) === false) {
continue;
}
const index = scrollableAncestors.indexOf(scrollContainer);
const scrollContainerRect = scrollableAncestorRects[index];
if (!scrollContainerRect) {
continue;
}
const {
direction,
speed
} = getScrollDirectionAndSpeed(scrollContainer, scrollContainerRect, rect, acceleration, threshold);
for (const axis of ["x", "y"]) {
if (!scrollIntent[axis][direction[axis]]) {
speed[axis] = 0;
direction[axis] = 0;
}
}
if (speed.x > 0 || speed.y > 0) {
clearAutoScrollInterval();
scrollContainerRef.current = scrollContainer;
setAutoScrollInterval(autoScroll, interval);
scrollSpeed.current = speed;
scrollDirection.current = direction;
return;
}
}
scrollSpeed.current = {
x: 0,
y: 0
};
scrollDirection.current = {
x: 0,
y: 0
};
clearAutoScrollInterval();
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[
acceleration,
autoScroll,
canScroll,
clearAutoScrollInterval,
enabled,
interval,
// eslint-disable-next-line react-hooks/exhaustive-deps
JSON.stringify(rect),
// eslint-disable-next-line react-hooks/exhaustive-deps
JSON.stringify(scrollIntent),
setAutoScrollInterval,
scrollableAncestors,
sortedScrollableAncestors,
scrollableAncestorRects,
// eslint-disable-next-line react-hooks/exhaustive-deps
JSON.stringify(threshold)
]
);
}
var defaultScrollIntent = {
x: {
[Direction.Backward]: false,
[Direction.Forward]: false
},
y: {
[Direction.Backward]: false,
[Direction.Forward]: false
}
};
function useScrollIntent(_ref2) {
let {
delta,
disabled
} = _ref2;
const previousDelta = usePrevious(delta);
return useLazyMemo((previousIntent) => {
if (disabled || !previousDelta || !previousIntent) {
return defaultScrollIntent;
}
const direction = {
x: Math.sign(delta.x - previousDelta.x),
y: Math.sign(delta.y - previousDelta.y)
};
return {
x: {
[Direction.Backward]: previousIntent.x[Direction.Backward] || direction.x === -1,
[Direction.Forward]: previousIntent.x[Direction.Forward] || direction.x === 1
},
y: {
[Direction.Backward]: previousIntent.y[Direction.Backward] || direction.y === -1,
[Direction.Forward]: previousIntent.y[Direction.Forward] || direction.y === 1
}
};
}, [disabled, delta, previousDelta]);
}
function useCachedNode(draggableNodes, id) {
const draggableNode = id != null ? draggableNodes.get(id) : void 0;
const node = draggableNode ? draggableNode.node.current : null;
return useLazyMemo((cachedNode) => {
var _ref;
if (id == null) {
return null;
}
return (_ref = node != null ? node : cachedNode) != null ? _ref : null;
}, [node, id]);
}
function useCombineActivators(sensors, getSyntheticHandler) {
return (0, import_react3.useMemo)(() => sensors.reduce((accumulator, sensor) => {
const {
sensor: Sensor
} = sensor;
const sensorActivators = Sensor.activators.map((activator) => ({
eventName: activator.eventName,
handler: getSyntheticHandler(activator.handler, sensor)
}));
return [...accumulator, ...sensorActivators];
}, []), [sensors, getSyntheticHandler]);
}
var MeasuringStrategy;
(function(MeasuringStrategy2) {
MeasuringStrategy2[MeasuringStrategy2["Always"] = 0] = "Always";
MeasuringStrategy2[MeasuringStrategy2["BeforeDragging"] = 1] = "BeforeDragging";
MeasuringStrategy2[MeasuringStrategy2["WhileDragging"] = 2] = "WhileDragging";
})(MeasuringStrategy || (MeasuringStrategy = {}));
var MeasuringFrequency;
(function(MeasuringFrequency2) {
MeasuringFrequency2["Optimized"] = "optimized";
})(MeasuringFrequency || (MeasuringFrequency = {}));
var defaultValue = /* @__PURE__ */ new Map();
function useDroppableMeasuring(containers, _ref) {
let {
dragging,
dependencies,
config
} = _ref;
const [queue, setQueue] = (0, import_react3.useState)(null);
const {
frequency,
measure,
strategy
} = config;
const containersRef = (0, import_react3.useRef)(containers);
const disabled = isDisabled();
const disabledRef = useLatestValue(disabled);
const measureDroppableContainers = (0, import_react3.useCallback)(function(ids2) {
if (ids2 === void 0) {
ids2 = [];
}
if (disabledRef.current) {
return;
}
setQueue((value) => {
if (value === null) {
return ids2;
}
return value.concat(ids2.filter((id) => !value.includes(id)));
});
}, [disabledRef]);
const timeoutId = (0, import_react3.useRef)(null);
const droppableRects = useLazyMemo((previousValue) => {
if (disabled && !dragging) {
return defaultValue;
}
if (!previousValue || previousValue === defaultValue || containersRef.current !== containers || queue != null) {
const map = /* @__PURE__ */ new Map();
for (let container of containers) {
if (!container) {
continue;
}
if (queue && queue.length > 0 && !queue.includes(container.id) && container.rect.current) {
map.set(container.id, container.rect.current);
continue;
}
const node = container.node.current;
const rect = node ? new Rect(measure(node), node) : null;
container.rect.current = rect;
if (rect) {
map.set(container.id, rect);
}
}
return map;
}
return previousValue;
}, [containers, queue, dragging, disabled, measure]);
(0, import_react3.useEffect)(() => {
containersRef.current = containers;
}, [containers]);
(0, import_react3.useEffect)(
() => {
if (disabled) {
return;
}
measureDroppableContainers();
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[dragging, disabled]
);
(0, import_react3.useEffect)(
() => {
if (queue && queue.length > 0) {
setQueue(null);
}
},
//eslint-disable-next-line react-hooks/exhaustive-deps
[JSON.stringify(queue)]
);
(0, import_react3.useEffect)(
() => {
if (disabled || typeof frequency !== "number" || timeoutId.current !== null) {
return;
}
timeoutId.current = setTimeout(() => {
measureDroppableContainers();
timeoutId.current = null;
}, frequency);
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[frequency, disabled, measureDroppableContainers, ...dependencies]
);
return {
droppableRects,
measureDroppableContainers,
measuringScheduled: queue != null
};
function isDisabled() {
switch (strategy) {
case MeasuringStrategy.Always:
return false;
case MeasuringStrategy.BeforeDragging:
return dragging;
default:
return !dragging;
}
}
}
function useInitialValue(value, computeFn) {
return useLazyMemo((previousValue) => {
if (!value) {
return null;
}
if (previousValue) {
return previousValue;
}
return typeof computeFn === "function" ? computeFn(value) : value;
}, [computeFn, value]);
}
function useInitialRect(node, measure) {
return useInitialValue(node, measure);
}
function useMutationObserver(_ref) {
let {
callback,
disabled
} = _ref;
const handleMutations = useEvent(callback);
const mutationObserver = (0, import_react3.useMemo)(() => {
if (disabled || typeof window === "undefined" || typeof window.MutationObserver === "undefined") {
return void 0;
}
const {
MutationObserver
} = window;
return new MutationObserver(handleMutations);
}, [handleMutations, disabled]);
(0, import_react3.useEffect)(() => {
return () => mutationObserver == null ? void 0 : mutationObserver.disconnect();
}, [mutationObserver]);
return mutationObserver;
}
function useResizeObserver(_ref) {
let {
callback,
disabled
} = _ref;
const handleResize = useEvent(callback);
const resizeObserver = (0, import_react3.useMemo)(
() => {
if (disabled || typeof window === "undefined" || typeof window.ResizeObserver === "undefined") {
return void 0;
}
const {
ResizeObserver
} = window;
return new ResizeObserver(handleResize);
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[disabled]
);
(0, import_react3.useEffect)(() => {
return () => resizeObserver == null ? void 0 : resizeObserver.disconnect();
}, [resizeObserver]);
return resizeObserver;
}
function defaultMeasure(element) {
return new Rect(getClientRect(element), element);
}
function useRect(element, measure, fallbackRect) {
if (measure === void 0) {
measure = defaultMeasure;
}
const [rect, setRect] = (0, import_react3.useState)(null);
function measureRect() {
setRect((currentRect) => {
if (!element) {
return null;
}
if (element.isConnected === false) {
var _ref;
return (_ref = currentRect != null ? currentRect : fallbackRect) != null ? _ref : null;
}
const newRect = measure(element);
if (JSON.stringify(currentRect) === JSON.stringify(newRect)) {
return currentRect;
}
return newRect;
});
}
const mutationObserver = useMutationObserver({
callback(records) {
if (!element) {
return;
}
for (const record of records) {
const {
type,
target
} = record;
if (type === "childList" && target instanceof HTMLElement && target.contains(element)) {
measureRect();
break;
}
}
}
});
const resizeObserver = useResizeObserver({
callback: measureRect
});
useIsomorphicLayoutEffect(() => {
measureRect();
if (element) {
resizeObserver == null ? void 0 : resizeObserver.observe(element);
mutationObserver == null ? void 0 : mutationObserver.observe(document.body, {
childList: true,
subtree: true
});
} else {
resizeObserver == null ? void 0 : resizeObserver.disconnect();
mutationObserver == null ? void 0 : mutationObserver.disconnect();
}
}, [element]);
return rect;
}
function useRectDelta(rect) {
const initialRect = useInitialValue(rect);
return getRectDelta(rect, initialRect);
}
var defaultValue$1 = [];
function useScrollableAncestors(node) {
const previousNode = (0, import_react3.useRef)(node);
const ancestors = useLazyMemo((previousValue) => {
if (!node) {
return defaultValue$1;
}
if (previousValue && previousValue !== defaultValue$1 && node && previousNode.current && node.parentNode === previousNode.current.parentNode) {
return previousValue;
}
return getScrollableAncestors(node);
}, [node]);
(0, import_react3.useEffect)(() => {
previousNode.current = node;
}, [node]);
return ancestors;
}
function useScrollOffsets(elements) {
const [scrollCoordinates, setScrollCoordinates] = (0, import_react3.useState)(null);
const prevElements = (0, import_react3.useRef)(elements);
const handleScroll = (0, import_react3.useCallback)((event) => {
const scrollingElement = getScrollableElement(event.target);
if (!scrollingElement) {
return;
}
setScrollCoordinates((scrollCoordinates2) => {
if (!scrollCoordinates2) {
return null;
}
scrollCoordinates2.set(scrollingElement, getScrollCoordinates(scrollingElement));
return new Map(scrollCoordinates2);
});
}, []);
(0, import_react3.useEffect)(() => {
const previousElements = prevElements.current;
if (elements !== previousElements) {
cleanup(previousElements);
const entries = elements.map((element) => {
const scrollableElement = getScrollableElement(element);
if (scrollableElement) {
scrollableElement.addEventListener("scroll", handleScroll, {
passive: true
});
return [scrollableElement, getScrollCoordinates(scrollableElement)];
}
return null;
}).filter((entry) => entry != null);
setScrollCoordinates(entries.length ? new Map(entries) : null);
prevElements.current = elements;
}
return () => {
cleanup(elements);
cleanup(previousElements);
};
function cleanup(elements2) {
elements2.forEach((element) => {
const scrollableElement = getScrollableElement(element);
scrollableElement == null ? void 0 : scrollableElement.removeEventListener("scroll", handleScroll);
});
}
}, [handleScroll, elements]);
return (0, import_react3.useMemo)(() => {
if (elements.length) {
return scrollCoordinates ? Array.from(scrollCoordinates.values()).reduce((acc, coordinates) => add(acc, coordinates), defaultCoordinates) : getScrollOffsets(elements);
}
return defaultCoordinates;
}, [elements, scrollCoordinates]);
}
function useScrollOffsetsDelta(scrollOffsets, dependencies) {
if (dependencies === void 0) {
dependencies = [];
}
const initialScrollOffsets = (0, import_react3.useRef)(null);
(0, import_react3.useEffect)(
() => {
initialScrollOffsets.current = null;
},
// eslint-disable-next-line react-hooks/exhaustive-deps
dependencies
);
(0, import_react3.useEffect)(() => {
const hasScrollOffsets = scrollOffsets !== defaultCoordinates;
if (hasScrollOffsets && !initialScrollOffsets.current) {
initialScrollOffsets.current = scrollOffsets;
}
if (!hasScrollOffsets && initialScrollOffsets.current) {
initialScrollOffsets.current = null;
}
}, [scrollOffsets]);
return initialScrollOffsets.current ? subtract(scrollOffsets, initialScrollOffsets.current) : defaultCoordinates;
}
function useSensorSetup(sensors) {
(0, import_react3.useEffect)(
() => {
if (!canUseDOM) {
return;
}
const teardownFns = sensors.map((_ref) => {
let {
sensor
} = _ref;
return sensor.setup == null ? void 0 : sensor.setup();
});
return () => {
for (const teardown of teardownFns) {
teardown == null ? void 0 : teardown();
}
};
},
// TO-DO: Sensors length could theoretically change which would not be a valid dependency
// eslint-disable-next-line react-hooks/exhaustive-deps
sensors.map((_ref2) => {
let {
sensor
} = _ref2;
return sensor;
})
);
}
function useSyntheticListeners(listeners, id) {
return (0, import_react3.useMemo)(() => {
return listeners.reduce((acc, _ref) => {
let {
eventName,
handler
} = _ref;
acc[eventName] = (event) => {
handler(event, id);
};
return acc;
}, {});
}, [listeners, id]);
}
function useWindowRect(element) {
return (0, import_react3.useMemo)(() => element ? getWindowClientRect(element) : null, [element]);
}
var defaultValue$2 = [];
function useRects(elements, measure) {
if (measure === void 0) {
measure = getClientRect;
}
const [firstElement] = elements;
const windowRect = useWindowRect(firstElement ? getWindow(firstElement) : null);
const [rects, setRects] = (0, import_react3.useState)(defaultValue$2);
function measureRects() {
setRects(() => {
if (!elements.length) {
return defaultValue$2;
}
return elements.map((element) => isDocumentScrollingElement(element) ? windowRect : new Rect(measure(element), element));
});
}
const resizeObserver = useResizeObserver({
callback: measureRects
});
useIsomorphicLayoutEffect(() => {
resizeObserver == null ? void 0 : resizeObserver.disconnect();
measureRects();
elements.forEach((element) => resizeObserver == null ? void 0 : resizeObserver.observe(element));
}, [elements]);
return rects;
}
function getMeasurableNode(node) {
if (!node) {
return null;
}
if (node.children.length > 1) {
return node;
}
const firstChild = node.children[0];
return isHTMLElement(firstChild) ? firstChild : node;
}
function useDragOverlayMeasuring(_ref) {
let {
measure
} = _ref;
const [rect, setRect] = (0, import_react3.useState)(null);
const handleResize = (0, import_react3.useCallback)((entries) => {
for (const {
target
} of entries) {
if (isHTMLElement(target)) {
setRect((rect2) => {
const newRect = measure(target);
return rect2 ? {
...rect2,
width: newRect.width,
height: newRect.height
} : newRect;
});
break;
}
}
}, [measure]);
const resizeObserver = useResizeObserver({
callback: handleResize
});
const handleNodeChange = (0, import_react3.useCallback)((element) => {
const node = getMeasurableNode(element);
resizeObserver == null ? void 0 : resizeObserver.disconnect();
if (node) {
resizeObserver == null ? void 0 : resizeObserver.observe(node);
}
setRect(node ? measure(node) : null);
}, [measure, resizeObserver]);
const [nodeRef, setRef] = useNodeRef(handleNodeChange);
return (0, import_react3.useMemo)(() => ({
nodeRef,
rect,
setRef
}), [rect, nodeRef, setRef]);
}
var defaultSensors = [{
sensor: PointerSensor,
options: {}
}, {
sensor: KeyboardSensor,
options: {}
}];
var defaultData = {
current: {}
};
var defaultMeasuringConfiguration = {
draggable: {
measure: getTransformAgnosticClientRect
},
droppable: {
measure: getTransformAgnosticClientRect,
strategy: MeasuringStrategy.WhileDragging,
frequency: MeasuringFrequency.Optimized
},
dragOverlay: {
measure: getClientRect
}
};
var DroppableContainersMap = class extends Map {
get(id) {
var _super$get;
return id != null ? (_super$get = super.get(id)) != null ? _super$get : void 0 : void 0;
}
toArray() {
return Array.from(this.values());
}
getEnabled() {
return this.toArray().filter((_ref) => {
let {
disabled
} = _ref;
return !disabled;
});
}
getNodeFor(id) {
var _this$get$node$curren, _this$get;
return (_this$get$node$curren = (_this$get = this.get(id)) == null ? void 0 : _this$get.node.current) != null ? _this$get$node$curren : void 0;
}
};
var defaultPublicContext = {
activatorEvent: null,
active: null,
activeNode: null,
activeNodeRect: null,
collisions: null,
containerNodeRect: null,
draggableNodes: /* @__PURE__ */ new Map(),
droppableRects: /* @__PURE__ */ new Map(),
droppableContainers: /* @__PURE__ */ new DroppableContainersMap(),
over: null,
dragOverlay: {
nodeRef: {
current: null
},
rect: null,
setRef: noop
},
scrollableAncestors: [],
scrollableAncestorRects: [],
measuringConfiguration: defaultMeasuringConfiguration,
measureDroppableContainers: noop,
windowRect: null,
measuringScheduled: false
};
var defaultInternalContext = {
activatorEvent: null,
activators: [],
active: null,
activeNodeRect: null,
ariaDescribedById: {
draggable: ""
},
dispatch: noop,
draggableNodes: /* @__PURE__ */ new Map(),
over: null,
measureDroppableContainers: noop
};
var InternalContext = /* @__PURE__ */ (0, import_react3.createContext)(defaultInternalContext);
var PublicContext = /* @__PURE__ */ (0, import_react3.createContext)(defaultPublicContext);
function getInitialState() {
return {
draggable: {
active: null,
initialCoordinates: {
x: 0,
y: 0
},
nodes: /* @__PURE__ */ new Map(),
translate: {
x: 0,
y: 0
}
},
droppable: {
containers: new DroppableContainersMap()
}
};
}
function reducer(state, action) {
switch (action.type) {
case Action.DragStart:
return {
...state,
draggable: {
...state.draggable,
initialCoordinates: action.initialCoordinates,
active: action.active
}
};
case Action.DragMove:
if (state.draggable.active == null) {
return state;
}
return {
...state,
draggable: {
...state.draggable,
translate: {
x: action.coordinates.x - state.draggable.initialCoordinates.x,
y: action.coordinates.y - state.draggable.initialCoordinates.y
}
}
};
case Action.DragEnd:
case Action.DragCancel:
return {
...state,
draggable: {
...state.draggable,
active: null,
initialCoordinates: {
x: 0,
y: 0
},
translate: {
x: 0,
y: 0
}
}
};
case Action.RegisterDroppable: {
const {
element
} = action;
const {
id
} = element;
const containers = new DroppableContainersMap(state.droppable.containers);
containers.set(id, element);
return {
...state,
droppable: {
...state.droppable,
containers
}
};
}
case Action.SetDroppableDisabled: {
const {
id,
key: key2,
disabled
} = action;
const element = state.droppable.containers.get(id);
if (!element || key2 !== element.key) {
return state;
}
const containers = new DroppableContainersMap(state.droppable.containers);
containers.set(id, {
...element,
disabled
});
return {
...state,
droppable: {
...state.droppable,
containers
}
};
}
case Action.UnregisterDroppable: {
const {
id,
key: key2
} = action;
const element = state.droppable.containers.get(id);
if (!element || key2 !== element.key) {
return state;
}
const containers = new DroppableContainersMap(state.droppable.containers);
containers.delete(id);
return {
...state,
droppable: {
...state.droppable,
containers
}
};
}
default: {
return state;
}
}
}
function RestoreFocus(_ref) {
let {
disabled
} = _ref;
const {
active,
activatorEvent,
draggableNodes
} = (0, import_react3.useContext)(InternalContext);
const previousActivatorEvent = usePrevious(activatorEvent);
const previousActiveId = usePrevious(active == null ? void 0 : active.id);
(0, import_react3.useEffect)(() => {
if (disabled) {
return;
}
if (!activatorEvent && previousActivatorEvent && previousActiveId != null) {
if (!isKeyboardEvent(previousActivatorEvent)) {
return;
}
if (document.activeElement === previousActivatorEvent.target) {
return;
}
const draggableNode = draggableNodes.get(previousActiveId);
if (!draggableNode) {
return;
}
const {
activatorNode,
node
} = draggableNode;
if (!activatorNode.current && !node.current) {
return;
}
requestAnimationFrame(() => {
for (const element of [activatorNode.current, node.current]) {
if (!element) {
continue;
}
const focusableNode = findFirstFocusableNode(element);
if (focusableNode) {
focusableNode.focus();
break;
}
}
});
}
}, [activatorEvent, disabled, draggableNodes, previousActiveId, previousActivatorEvent]);
return null;
}
function applyModifiers(modifiers, _ref) {
let {
transform,
...args
} = _ref;
return modifiers != null && modifiers.length ? modifiers.reduce((accumulator, modifier) => {
return modifier({
transform: accumulator,
...args
});
}, transform) : transform;
}
function useMeasuringConfiguration(config) {
return (0, import_react3.useMemo)(
() => ({
draggable: {
...defaultMeasuringConfiguration.draggable,
...config == null ? void 0 : config.draggable
},
droppable: {
...defaultMeasuringConfiguration.droppable,
...config == null ? void 0 : config.droppable
},
dragOverlay: {
...defaultMeasuringConfiguration.dragOverlay,
...config == null ? void 0 : config.dragOverlay
}
}),
// eslint-disable-next-line react-hooks/exhaustive-deps
[config == null ? void 0 : config.draggable, config == null ? void 0 : config.droppable, config == null ? void 0 : config.dragOverlay]
);
}
function useLayoutShiftScrollCompensation(_ref) {
let {
activeNode,
measure,
initialRect,
config = true
} = _ref;
const initialized = (0, import_react3.useRef)(false);
const {
x,
y
} = typeof config === "boolean" ? {
x: config,
y: config
} : config;
useIsomorphicLayoutEffect(() => {
const disabled = !x && !y;
if (disabled || !activeNode) {
initialized.current = false;
return;
}
if (initialized.current || !initialRect) {
return;
}
const node = activeNode == null ? void 0 : activeNode.node.current;
if (!node || node.isConnected === false) {
return;
}
const rect = measure(node);
const rectDelta = getRectDelta(rect, initialRect);
if (!x) {
rectDelta.x = 0;
}
if (!y) {
rectDelta.y = 0;
}
initialized.current = true;
if (Math.abs(rectDelta.x) > 0 || Math.abs(rectDelta.y) > 0) {
const firstScrollableAncestor = getFirstScrollableAncestor(node);
if (firstScrollableAncestor) {
firstScrollableAncestor.scrollBy({
top: rectDelta.y,
left: rectDelta.x
});
}
}
}, [activeNode, x, y, initialRect, measure]);
}
var ActiveDraggableContext = /* @__PURE__ */ (0, import_react3.createContext)({
...defaultCoordinates,
scaleX: 1,
scaleY: 1
});
var Status;
(function(Status2) {
Status2[Status2["Uninitialized"] = 0] = "Uninitialized";
Status2[Status2["Initializing"] = 1] = "Initializing";
Status2[Status2["Initialized"] = 2] = "Initialized";
})(Status || (Status = {}));
var DndContext = /* @__PURE__ */ (0, import_react3.memo)(function DndContext2(_ref) {
var _sensorContext$curren, _dragOverlay$nodeRef$, _dragOverlay$rect, _over$rect;
let {
id,
accessibility,
autoScroll = true,
children,
sensors = defaultSensors,
collisionDetection = rectIntersection,
measuring,
modifiers,
...props
} = _ref;
const store = (0, import_react3.useReducer)(reducer, void 0, getInitialState);
const [state, dispatch] = store;
const [dispatchMonitorEvent, registerMonitorListener] = useDndMonitorProvider();
const [status, setStatus] = (0, import_react3.useState)(Status.Uninitialized);
const isInitialized = status === Status.Initialized;
const {
draggable: {
active: activeId,
nodes: draggableNodes,
translate
},
droppable: {
containers: droppableContainers
}
} = state;
const node = activeId != null ? draggableNodes.get(activeId) : null;
const activeRects = (0, import_react3.useRef)({
initial: null,
translated: null
});
const active = (0, import_react3.useMemo)(() => {
var _node$data;
return activeId != null ? {
id: activeId,
// It's possible for the active node to unmount while dragging
data: (_node$data = node == null ? void 0 : node.data) != null ? _node$data : defaultData,
rect: activeRects
} : null;
}, [activeId, node]);
const activeRef = (0, import_react3.useRef)(null);
const [activeSensor, setActiveSensor] = (0, import_react3.useState)(null);
const [activatorEvent, setActivatorEvent] = (0, import_react3.useState)(null);
const latestProps = useLatestValue(props, Object.values(props));
const draggableDescribedById = useUniqueId("DndDescribedBy", id);
const enabledDroppableContainers = (0, import_react3.useMemo)(() => droppableContainers.getEnabled(), [droppableContainers]);
const measuringConfiguration = useMeasuringConfiguration(measuring);
const {
droppableRects,
measureDroppableContainers,
measuringScheduled
} = useDroppableMeasuring(enabledDroppableContainers, {
dragging: isInitialized,
dependencies: [translate.x, translate.y],
config: measuringConfiguration.droppable
});
const activeNode = useCachedNode(draggableNodes, activeId);
const activationCoordinates = (0, import_react3.useMemo)(() => activatorEvent ? getEventCoordinates(activatorEvent) : null, [activatorEvent]);
const autoScrollOptions = getAutoScrollerOptions();
const initialActiveNodeRect = useInitialRect(activeNode, measuringConfiguration.draggable.measure);
useLayoutShiftScrollCompensation({
activeNode: activeId != null ? draggableNodes.get(activeId) : null,
config: autoScrollOptions.layoutShiftCompensation,
initialRect: initialActiveNodeRect,
measure: measuringConfiguration.draggable.measure
});
const activeNodeRect = useRect(activeNode, measuringConfiguration.draggable.measure, initialActiveNodeRect);
const containerNodeRect = useRect(activeNode ? activeNode.parentElement : null);
const sensorContext = (0, import_react3.useRef)({
activatorEvent: null,
active: null,
activeNode,
collisionRect: null,
collisions: null,
droppableRects,
draggableNodes,
draggingNode: null,
draggingNodeRect: null,
droppableContainers,
over: null,
scrollableAncestors: [],
scrollAdjustedTranslate: null
});
const overNode = droppableContainers.getNodeFor((_sensorContext$curren = sensorContext.current.over) == null ? void 0 : _sensorContext$curren.id);
const dragOverlay = useDragOverlayMeasuring({
measure: measuringConfiguration.dragOverlay.measure
});
const draggingNode = (_dragOverlay$nodeRef$ = dragOverlay.nodeRef.current) != null ? _dragOverlay$nodeRef$ : activeNode;
const draggingNodeRect = isInitialized ? (_dragOverlay$rect = dragOverlay.rect) != null ? _dragOverlay$rect : activeNodeRect : null;
const usesDragOverlay = Boolean(dragOverlay.nodeRef.current && dragOverlay.rect);
const nodeRectDelta = useRectDelta(usesDragOverlay ? null : activeNodeRect);
const windowRect = useWindowRect(draggingNode ? getWindow(draggingNode) : null);
const scrollableAncestors = useScrollableAncestors(isInitialized ? overNode != null ? overNode : activeNode : null);
const scrollableAncestorRects = useRects(scrollableAncestors);
const modifiedTranslate = applyModifiers(modifiers, {
transform: {
x: translate.x - nodeRectDelta.x,
y: translate.y - nodeRectDelta.y,
scaleX: 1,
scaleY: 1
},
activatorEvent,
active,
activeNodeRect,
containerNodeRect,
draggingNodeRect,
over: sensorContext.current.over,
overlayNodeRect: dragOverlay.rect,
scrollableAncestors,
scrollableAncestorRects,
windowRect
});
const pointerCoordinates = activationCoordinates ? add(activationCoordinates, translate) : null;
const scrollOffsets = useScrollOffsets(scrollableAncestors);
const scrollAdjustment = useScrollOffsetsDelta(scrollOffsets);
const activeNodeScrollDelta = useScrollOffsetsDelta(scrollOffsets, [activeNodeRect]);
const scrollAdjustedTranslate = add(modifiedTranslate, scrollAdjustment);
const collisionRect = draggingNodeRect ? getAdjustedRect(draggingNodeRect, modifiedTranslate) : null;
const collisions = active && collisionRect ? collisionDetection({
active,
collisionRect,
droppableRects,
droppableContainers: enabledDroppableContainers,
pointerCoordinates
}) : null;
const overId = getFirstCollision(collisions, "id");
const [over, setOver] = (0, import_react3.useState)(null);
const appliedTranslate = usesDragOverlay ? modifiedTranslate : add(modifiedTranslate, activeNodeScrollDelta);
const transform = adjustScale(appliedTranslate, (_over$rect = over == null ? void 0 : over.rect) != null ? _over$rect : null, activeNodeRect);
const activeSensorRef = (0, import_react3.useRef)(null);
const instantiateSensor = (0, import_react3.useCallback)(
(event, _ref2) => {
let {
sensor: Sensor,
options
} = _ref2;
if (activeRef.current == null) {
return;
}
const activeNode2 = draggableNodes.get(activeRef.current);
if (!activeNode2) {
return;
}
const activatorEvent2 = event.nativeEvent;
const sensorInstance = new Sensor({
active: activeRef.current,
activeNode: activeNode2,
event: activatorEvent2,
options,
// Sensors need to be instantiated with refs for arguments that change over time
// otherwise they are frozen in time with the stale arguments
context: sensorContext,
onAbort(id2) {
const draggableNode = draggableNodes.get(id2);
if (!draggableNode) {
return;
}
const {
onDragAbort
} = latestProps.current;
const event2 = {
id: id2
};
onDragAbort == null ? void 0 : onDragAbort(event2);
dispatchMonitorEvent({
type: "onDragAbort",
event: event2
});
},
onPending(id2, constraint, initialCoordinates, offset2) {
const draggableNode = draggableNodes.get(id2);
if (!draggableNode) {
return;
}
const {
onDragPending
} = latestProps.current;
const event2 = {
id: id2,
constraint,
initialCoordinates,
offset: offset2
};
onDragPending == null ? void 0 : onDragPending(event2);
dispatchMonitorEvent({
type: "onDragPending",
event: event2
});
},
onStart(initialCoordinates) {
const id2 = activeRef.current;
if (id2 == null) {
return;
}
const draggableNode = draggableNodes.get(id2);
if (!draggableNode) {
return;
}
const {
onDragStart: onDragStart2
} = latestProps.current;
const event2 = {
activatorEvent: activatorEvent2,
active: {
id: id2,
data: draggableNode.data,
rect: activeRects
}
};
(0, import_react_dom.unstable_batchedUpdates)(() => {
onDragStart2 == null ? void 0 : onDragStart2(event2);
setStatus(Status.Initializing);
dispatch({
type: Action.DragStart,
initialCoordinates,
active: id2
});
dispatchMonitorEvent({
type: "onDragStart",
event: event2
});
setActiveSensor(activeSensorRef.current);
setActivatorEvent(activatorEvent2);
});
},
onMove(coordinates) {
dispatch({
type: Action.DragMove,
coordinates
});
},
onEnd: createHandler(Action.DragEnd),
onCancel: createHandler(Action.DragCancel)
});
activeSensorRef.current = sensorInstance;
function createHandler(type) {
return async function handler() {
const {
active: active2,
collisions: collisions2,
over: over2,
scrollAdjustedTranslate: scrollAdjustedTranslate2
} = sensorContext.current;
let event2 = null;
if (active2 && scrollAdjustedTranslate2) {
const {
cancelDrop
} = latestProps.current;
event2 = {
activatorEvent: activatorEvent2,
active: active2,
collisions: collisions2,
delta: scrollAdjustedTranslate2,
over: over2
};
if (type === Action.DragEnd && typeof cancelDrop === "function") {
const shouldCancel = await Promise.resolve(cancelDrop(event2));
if (shouldCancel) {
type = Action.DragCancel;
}
}
}
activeRef.current = null;
(0, import_react_dom.unstable_batchedUpdates)(() => {
dispatch({
type
});
setStatus(Status.Uninitialized);
setOver(null);
setActiveSensor(null);
setActivatorEvent(null);
activeSensorRef.current = null;
const eventName = type === Action.DragEnd ? "onDragEnd" : "onDragCancel";
if (event2) {
const handler2 = latestProps.current[eventName];
handler2 == null ? void 0 : handler2(event2);
dispatchMonitorEvent({
type: eventName,
event: event2
});
}
});
};
}
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[draggableNodes]
);
const bindActivatorToSensorInstantiator = (0, import_react3.useCallback)((handler, sensor) => {
return (event, active2) => {
const nativeEvent = event.nativeEvent;
const activeDraggableNode = draggableNodes.get(active2);
if (
// Another sensor is already instantiating
activeRef.current !== null || // No active draggable
!activeDraggableNode || // Event has already been captured
nativeEvent.dndKit || nativeEvent.defaultPrevented
) {
return;
}
const activationContext = {
active: activeDraggableNode
};
const shouldActivate = handler(event, sensor.options, activationContext);
if (shouldActivate === true) {
nativeEvent.dndKit = {
capturedBy: sensor.sensor
};
activeRef.current = active2;
instantiateSensor(event, sensor);
}
};
}, [draggableNodes, instantiateSensor]);
const activators = useCombineActivators(sensors, bindActivatorToSensorInstantiator);
useSensorSetup(sensors);
useIsomorphicLayoutEffect(() => {
if (activeNodeRect && status === Status.Initializing) {
setStatus(Status.Initialized);
}
}, [activeNodeRect, status]);
(0, import_react3.useEffect)(
() => {
const {
onDragMove
} = latestProps.current;
const {
active: active2,
activatorEvent: activatorEvent2,
collisions: collisions2,
over: over2
} = sensorContext.current;
if (!active2 || !activatorEvent2) {
return;
}
const event = {
active: active2,
activatorEvent: activatorEvent2,
collisions: collisions2,
delta: {
x: scrollAdjustedTranslate.x,
y: scrollAdjustedTranslate.y
},
over: over2
};
(0, import_react_dom.unstable_batchedUpdates)(() => {
onDragMove == null ? void 0 : onDragMove(event);
dispatchMonitorEvent({
type: "onDragMove",
event
});
});
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[scrollAdjustedTranslate.x, scrollAdjustedTranslate.y]
);
(0, import_react3.useEffect)(
() => {
const {
active: active2,
activatorEvent: activatorEvent2,
collisions: collisions2,
droppableContainers: droppableContainers2,
scrollAdjustedTranslate: scrollAdjustedTranslate2
} = sensorContext.current;
if (!active2 || activeRef.current == null || !activatorEvent2 || !scrollAdjustedTranslate2) {
return;
}
const {
onDragOver
} = latestProps.current;
const overContainer = droppableContainers2.get(overId);
const over2 = overContainer && overContainer.rect.current ? {
id: overContainer.id,
rect: overContainer.rect.current,
data: overContainer.data,
disabled: overContainer.disabled
} : null;
const event = {
active: active2,
activatorEvent: activatorEvent2,
collisions: collisions2,
delta: {
x: scrollAdjustedTranslate2.x,
y: scrollAdjustedTranslate2.y
},
over: over2
};
(0, import_react_dom.unstable_batchedUpdates)(() => {
setOver(over2);
onDragOver == null ? void 0 : onDragOver(event);
dispatchMonitorEvent({
type: "onDragOver",
event
});
});
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[overId]
);
useIsomorphicLayoutEffect(() => {
sensorContext.current = {
activatorEvent,
active,
activeNode,
collisionRect,
collisions,
droppableRects,
draggableNodes,
draggingNode,
draggingNodeRect,
droppableContainers,
over,
scrollableAncestors,
scrollAdjustedTranslate
};
activeRects.current = {
initial: draggingNodeRect,
translated: collisionRect
};
}, [active, activeNode, collisions, collisionRect, draggableNodes, draggingNode, draggingNodeRect, droppableRects, droppableContainers, over, scrollableAncestors, scrollAdjustedTranslate]);
useAutoScroller({
...autoScrollOptions,
delta: translate,
draggingRect: collisionRect,
pointerCoordinates,
scrollableAncestors,
scrollableAncestorRects
});
const publicContext = (0, import_react3.useMemo)(() => {
const context = {
active,
activeNode,
activeNodeRect,
activatorEvent,
collisions,
containerNodeRect,
dragOverlay,
draggableNodes,
droppableContainers,
droppableRects,
over,
measureDroppableContainers,
scrollableAncestors,
scrollableAncestorRects,
measuringConfiguration,
measuringScheduled,
windowRect
};
return context;
}, [active, activeNode, activeNodeRect, activatorEvent, collisions, containerNodeRect, dragOverlay, draggableNodes, droppableContainers, droppableRects, over, measureDroppableContainers, scrollableAncestors, scrollableAncestorRects, measuringConfiguration, measuringScheduled, windowRect]);
const internalContext = (0, import_react3.useMemo)(() => {
const context = {
activatorEvent,
activators,
active,
activeNodeRect,
ariaDescribedById: {
draggable: draggableDescribedById
},
dispatch,
draggableNodes,
over,
measureDroppableContainers
};
return context;
}, [activatorEvent, activators, active, activeNodeRect, dispatch, draggableDescribedById, draggableNodes, over, measureDroppableContainers]);
return import_react3.default.createElement(DndMonitorContext.Provider, {
value: registerMonitorListener
}, import_react3.default.createElement(InternalContext.Provider, {
value: internalContext
}, import_react3.default.createElement(PublicContext.Provider, {
value: publicContext
}, import_react3.default.createElement(ActiveDraggableContext.Provider, {
value: transform
}, children)), import_react3.default.createElement(RestoreFocus, {
disabled: (accessibility == null ? void 0 : accessibility.restoreFocus) === false
})), import_react3.default.createElement(Accessibility, {
...accessibility,
hiddenTextDescribedById: draggableDescribedById
}));
function getAutoScrollerOptions() {
const activeSensorDisablesAutoscroll = (activeSensor == null ? void 0 : activeSensor.autoScrollEnabled) === false;
const autoScrollGloballyDisabled = typeof autoScroll === "object" ? autoScroll.enabled === false : autoScroll === false;
const enabled = isInitialized && !activeSensorDisablesAutoscroll && !autoScrollGloballyDisabled;
if (typeof autoScroll === "object") {
return {
...autoScroll,
enabled
};
}
return {
enabled
};
}
});
var NullContext = /* @__PURE__ */ (0, import_react3.createContext)(null);
var defaultRole = "button";
var ID_PREFIX = "Draggable";
function useDraggable(_ref) {
let {
id,
data,
disabled = false,
attributes
} = _ref;
const key2 = useUniqueId(ID_PREFIX);
const {
activators,
activatorEvent,
active,
activeNodeRect,
ariaDescribedById,
draggableNodes,
over
} = (0, import_react3.useContext)(InternalContext);
const {
role = defaultRole,
roleDescription = "draggable",
tabIndex = 0
} = attributes != null ? attributes : {};
const isDragging = (active == null ? void 0 : active.id) === id;
const transform = (0, import_react3.useContext)(isDragging ? ActiveDraggableContext : NullContext);
const [node, setNodeRef] = useNodeRef();
const [activatorNode, setActivatorNodeRef] = useNodeRef();
const listeners = useSyntheticListeners(activators, id);
const dataRef = useLatestValue(data);
useIsomorphicLayoutEffect(
() => {
draggableNodes.set(id, {
id,
key: key2,
node,
activatorNode,
data: dataRef
});
return () => {
const node2 = draggableNodes.get(id);
if (node2 && node2.key === key2) {
draggableNodes.delete(id);
}
};
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[draggableNodes, id]
);
const memoizedAttributes = (0, import_react3.useMemo)(() => ({
role,
tabIndex,
"aria-disabled": disabled,
"aria-pressed": isDragging && role === defaultRole ? true : void 0,
"aria-roledescription": roleDescription,
"aria-describedby": ariaDescribedById.draggable
}), [disabled, role, tabIndex, isDragging, roleDescription, ariaDescribedById.draggable]);
return {
active,
activatorEvent,
activeNodeRect,
attributes: memoizedAttributes,
isDragging,
listeners: disabled ? void 0 : listeners,
node,
over,
setNodeRef,
setActivatorNodeRef,
transform
};
}
function useDndContext() {
return (0, import_react3.useContext)(PublicContext);
}
var ID_PREFIX$1 = "Droppable";
var defaultResizeObserverConfig = {
timeout: 25
};
function useDroppable(_ref) {
let {
data,
disabled = false,
id,
resizeObserverConfig
} = _ref;
const key2 = useUniqueId(ID_PREFIX$1);
const {
active,
dispatch,
over,
measureDroppableContainers
} = (0, import_react3.useContext)(InternalContext);
const previous = (0, import_react3.useRef)({
disabled
});
const resizeObserverConnected = (0, import_react3.useRef)(false);
const rect = (0, import_react3.useRef)(null);
const callbackId = (0, import_react3.useRef)(null);
const {
disabled: resizeObserverDisabled,
updateMeasurementsFor,
timeout: resizeObserverTimeout
} = {
...defaultResizeObserverConfig,
...resizeObserverConfig
};
const ids2 = useLatestValue(updateMeasurementsFor != null ? updateMeasurementsFor : id);
const handleResize = (0, import_react3.useCallback)(
() => {
if (!resizeObserverConnected.current) {
resizeObserverConnected.current = true;
return;
}
if (callbackId.current != null) {
clearTimeout(callbackId.current);
}
callbackId.current = setTimeout(() => {
measureDroppableContainers(Array.isArray(ids2.current) ? ids2.current : [ids2.current]);
callbackId.current = null;
}, resizeObserverTimeout);
},
//eslint-disable-next-line react-hooks/exhaustive-deps
[resizeObserverTimeout]
);
const resizeObserver = useResizeObserver({
callback: handleResize,
disabled: resizeObserverDisabled || !active
});
const handleNodeChange = (0, import_react3.useCallback)((newElement, previousElement) => {
if (!resizeObserver) {
return;
}
if (previousElement) {
resizeObserver.unobserve(previousElement);
resizeObserverConnected.current = false;
}
if (newElement) {
resizeObserver.observe(newElement);
}
}, [resizeObserver]);
const [nodeRef, setNodeRef] = useNodeRef(handleNodeChange);
const dataRef = useLatestValue(data);
(0, import_react3.useEffect)(() => {
if (!resizeObserver || !nodeRef.current) {
return;
}
resizeObserver.disconnect();
resizeObserverConnected.current = false;
resizeObserver.observe(nodeRef.current);
}, [nodeRef, resizeObserver]);
(0, import_react3.useEffect)(
() => {
dispatch({
type: Action.RegisterDroppable,
element: {
id,
key: key2,
disabled,
node: nodeRef,
rect,
data: dataRef
}
});
return () => dispatch({
type: Action.UnregisterDroppable,
key: key2,
id
});
},
// eslint-disable-next-line react-hooks/exhaustive-deps
[id]
);
(0, import_react3.useEffect)(() => {
if (disabled !== previous.current.disabled) {
dispatch({
type: Action.SetDroppableDisabled,
id,
key: key2,
disabled
});
previous.current.disabled = disabled;
}
}, [id, key2, disabled, dispatch]);
return {
active,
rect,
isOver: (over == null ? void 0 : over.id) === id,
node: nodeRef,
over,
setNodeRef
};
}
function AnimationManager(_ref) {
let {
animation,
children
} = _ref;
const [clonedChildren, setClonedChildren] = (0, import_react3.useState)(null);
const [element, setElement] = (0, import_react3.useState)(null);
const previousChildren = usePrevious(children);
if (!children && !clonedChildren && previousChildren) {
setClonedChildren(previousChildren);
}
useIsomorphicLayoutEffect(() => {
if (!element) {
return;
}
const key2 = clonedChildren == null ? void 0 : clonedChildren.key;
const id = clonedChildren == null ? void 0 : clonedChildren.props.id;
if (key2 == null || id == null) {
setClonedChildren(null);
return;
}
Promise.resolve(animation(id, element)).then(() => {
setClonedChildren(null);
});
}, [animation, clonedChildren, element]);
return import_react3.default.createElement(import_react3.default.Fragment, null, children, clonedChildren ? (0, import_react3.cloneElement)(clonedChildren, {
ref: setElement
}) : null);
}
var defaultTransform = {
x: 0,
y: 0,
scaleX: 1,
scaleY: 1
};
function NullifiedContextProvider(_ref) {
let {
children
} = _ref;
return import_react3.default.createElement(InternalContext.Provider, {
value: defaultInternalContext
}, import_react3.default.createElement(ActiveDraggableContext.Provider, {
value: defaultTransform
}, children));
}
var baseStyles = {
position: "fixed",
touchAction: "none"
};
var defaultTransition = (activatorEvent) => {
const isKeyboardActivator = isKeyboardEvent(activatorEvent);
return isKeyboardActivator ? "transform 250ms ease" : void 0;
};
var PositionedOverlay = /* @__PURE__ */ (0, import_react3.forwardRef)((_ref, ref) => {
let {
as,
activatorEvent,
adjustScale: adjustScale2,
children,
className,
rect,
style,
transform,
transition = defaultTransition
} = _ref;
if (!rect) {
return null;
}
const scaleAdjustedTransform = adjustScale2 ? transform : {
...transform,
scaleX: 1,
scaleY: 1
};
const styles = {
...baseStyles,
width: rect.width,
height: rect.height,
top: rect.top,
left: rect.left,
transform: CSS.Transform.toString(scaleAdjustedTransform),
transformOrigin: adjustScale2 && activatorEvent ? getRelativeTransformOrigin(activatorEvent, rect) : void 0,
transition: typeof transition === "function" ? transition(activatorEvent) : transition,
...style
};
return import_react3.default.createElement(as, {
className,
style: styles,
ref
}, children);
});
var defaultDropAnimationSideEffects = (options) => (_ref) => {
let {
active,
dragOverlay
} = _ref;
const originalStyles = {};
const {
styles,
className
} = options;
if (styles != null && styles.active) {
for (const [key2, value] of Object.entries(styles.active)) {
if (value === void 0) {
continue;
}
originalStyles[key2] = active.node.style.getPropertyValue(key2);
active.node.style.setProperty(key2, value);
}
}
if (styles != null && styles.dragOverlay) {
for (const [key2, value] of Object.entries(styles.dragOverlay)) {
if (value === void 0) {
continue;
}
dragOverlay.node.style.setProperty(key2, value);
}
}
if (className != null && className.active) {
active.node.classList.add(className.active);
}
if (className != null && className.dragOverlay) {
dragOverlay.node.classList.add(className.dragOverlay);
}
return function cleanup() {
for (const [key2, value] of Object.entries(originalStyles)) {
active.node.style.setProperty(key2, value);
}
if (className != null && className.active) {
active.node.classList.remove(className.active);
}
};
};
var defaultKeyframeResolver = (_ref2) => {
let {
transform: {
initial,
final
}
} = _ref2;
return [{
transform: CSS.Transform.toString(initial)
}, {
transform: CSS.Transform.toString(final)
}];
};
var defaultDropAnimationConfiguration = {
duration: 250,
easing: "ease",
keyframes: defaultKeyframeResolver,
sideEffects: /* @__PURE__ */ defaultDropAnimationSideEffects({
styles: {
active: {
opacity: "0"
}
}
})
};
function useDropAnimation(_ref3) {
let {
config,
draggableNodes,
droppableContainers,
measuringConfiguration
} = _ref3;
return useEvent((id, node) => {
if (config === null) {
return;
}
const activeDraggable = draggableNodes.get(id);
if (!activeDraggable) {
return;
}
const activeNode = activeDraggable.node.current;
if (!activeNode) {
return;
}
const measurableNode = getMeasurableNode(node);
if (!measurableNode) {
return;
}
const {
transform
} = getWindow(node).getComputedStyle(node);
const parsedTransform = parseTransform(transform);
if (!parsedTransform) {
return;
}
const animation = typeof config === "function" ? config : createDefaultDropAnimation(config);
scrollIntoViewIfNeeded(activeNode, measuringConfiguration.draggable.measure);
return animation({
active: {
id,
data: activeDraggable.data,
node: activeNode,
rect: measuringConfiguration.draggable.measure(activeNode)
},
draggableNodes,
dragOverlay: {
node,
rect: measuringConfiguration.dragOverlay.measure(measurableNode)
},
droppableContainers,
measuringConfiguration,
transform: parsedTransform
});
});
}
function createDefaultDropAnimation(options) {
const {
duration,
easing,
sideEffects,
keyframes
} = {
...defaultDropAnimationConfiguration,
...options
};
return (_ref4) => {
let {
active,
dragOverlay,
transform,
...rest
} = _ref4;
if (!duration) {
return;
}
const delta = {
x: dragOverlay.rect.left - active.rect.left,
y: dragOverlay.rect.top - active.rect.top
};
const scale = {
scaleX: transform.scaleX !== 1 ? active.rect.width * transform.scaleX / dragOverlay.rect.width : 1,
scaleY: transform.scaleY !== 1 ? active.rect.height * transform.scaleY / dragOverlay.rect.height : 1
};
const finalTransform = {
x: transform.x - delta.x,
y: transform.y - delta.y,
...scale
};
const animationKeyframes = keyframes({
...rest,
active,
dragOverlay,
transform: {
initial: transform,
final: finalTransform
}
});
const [firstKeyframe] = animationKeyframes;
const lastKeyframe = animationKeyframes[animationKeyframes.length - 1];
if (JSON.stringify(firstKeyframe) === JSON.stringify(lastKeyframe)) {
return;
}
const cleanup = sideEffects == null ? void 0 : sideEffects({
active,
dragOverlay,
...rest
});
const animation = dragOverlay.node.animate(animationKeyframes, {
duration,
easing,
fill: "forwards"
});
return new Promise((resolve) => {
animation.onfinish = () => {
cleanup == null ? void 0 : cleanup();
resolve();
};
});
};
}
var key = 0;
function useKey(id) {
return (0, import_react3.useMemo)(() => {
if (id == null) {
return;
}
key++;
return key;
}, [id]);
}
var DragOverlay = /* @__PURE__ */ import_react3.default.memo((_ref) => {
let {
adjustScale: adjustScale2 = false,
children,
dropAnimation: dropAnimationConfig,
style,
transition,
modifiers,
wrapperElement = "div",
className,
zIndex = 999
} = _ref;
const {
activatorEvent,
active,
activeNodeRect,
containerNodeRect,
draggableNodes,
droppableContainers,
dragOverlay,
over,
measuringConfiguration,
scrollableAncestors,
scrollableAncestorRects,
windowRect
} = useDndContext();
const transform = (0, import_react3.useContext)(ActiveDraggableContext);
const key2 = useKey(active == null ? void 0 : active.id);
const modifiedTransform = applyModifiers(modifiers, {
activatorEvent,
active,
activeNodeRect,
containerNodeRect,
draggingNodeRect: dragOverlay.rect,
over,
overlayNodeRect: dragOverlay.rect,
scrollableAncestors,
scrollableAncestorRects,
transform,
windowRect
});
const initialRect = useInitialValue(activeNodeRect);
const dropAnimation = useDropAnimation({
config: dropAnimationConfig,
draggableNodes,
droppableContainers,
measuringConfiguration
});
const ref = initialRect ? dragOverlay.setRef : void 0;
return import_react3.default.createElement(NullifiedContextProvider, null, import_react3.default.createElement(AnimationManager, {
animation: dropAnimation
}, active && key2 ? import_react3.default.createElement(PositionedOverlay, {
key: key2,
id: active.id,
ref,
as: wrapperElement,
activatorEvent,
adjustScale: adjustScale2,
className,
transition,
rect: initialRect,
style: {
zIndex,
...style
},
transform: modifiedTransform
}, children) : null));
});
// src/components/App.tsx
var import_jquery = __toESM(require_jquery());
var import_lodash14 = __toESM(require_lodash());
var import_obsidian4 = require("obsidian");
var import_obsidian_dataview2 = __toESM(require_lib());
var import_react20 = __toESM(require_react());
// src/assets/assets.ts
var import_lodash = __toESM(require_lodash());
// src/assets/pop.mp3
var pop_default = "data:audio/mpeg;base64,SUQzAwAAAAACLENPTU0AAAB5AAAAAAAAACAwMDAwMDAwMCAwMDAwMDIxMCAwMDAwMDk1RiAwMDAwMDAwMDAwMDBDQzkxIDAwMDAwMDAwIDAwMDA1MUEyIDAwMDAwMDAwIDAwMDAwMDAwIDAwMDAwMDAwIDAwMDAwMDAwIDAwMDAwMDAwIDAwMDAwMDAwQ09NTQAAAHkAAABYWFgAIDAwMDAwMDAwIDAwMDAwMjEwIDAwMDAwOTVGIDAwMDAwMDAwMDAwMENDOTEgMDAwMDAwMDAgMDAwMDUxQTIgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDAgMDAwMDAwMDBUWFhYAAAAHAAAAFNvZnR3YXJlAExvZ2ljIFBybyBYIDEwLjYuM//7kEQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA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var timerSnd = new Audio(timer_default);
var sounds = {
pop: popSnd,
start: startSnd,
timer: timerSnd
};
for (let sound of import_lodash.default.values(sounds)) {
sound.autoplay = true;
sound.pause();
sound.currentTime = 0;
}
// node_modules/.pnpm/immer@10.1.1/node_modules/immer/dist/immer.mjs
var NOTHING = Symbol.for("immer-nothing");
var DRAFTABLE = Symbol.for("immer-draftable");
var DRAFT_STATE = Symbol.for("immer-state");
var errors = true ? [
// All error codes, starting by 0:
function(plugin) {
return `The plugin for '${plugin}' has not been loaded into Immer. To enable the plugin, import and call \`enable${plugin}()\` when initializing your application.`;
},
function(thing) {
return `produce can only be called on things that are draftable: plain objects, arrays, Map, Set or classes that are marked with '[immerable]: true'. Got '${thing}'`;
},
"This object has been frozen and should not be mutated",
function(data) {
return "Cannot use a proxy that has been revoked. Did you pass an object from inside an immer function to an async process? " + data;
},
"An immer producer returned a new value *and* modified its draft. Either return a new value *or* modify the draft.",
"Immer forbids circular references",
"The first or second argument to `produce` must be a function",
"The third argument to `produce` must be a function or undefined",
"First argument to `createDraft` must be a plain object, an array, or an immerable object",
"First argument to `finishDraft` must be a draft returned by `createDraft`",
function(thing) {
return `'current' expects a draft, got: ${thing}`;
},
"Object.defineProperty() cannot be used on an Immer draft",
"Object.setPrototypeOf() cannot be used on an Immer draft",
"Immer only supports deleting array indices",
"Immer only supports setting array indices and the 'length' property",
function(thing) {
return `'original' expects a draft, got: ${thing}`;
}
// Note: if more errors are added, the errorOffset in Patches.ts should be increased
// See Patches.ts for additional errors
] : [];
function die(error, ...args) {
if (true) {
const e = errors[error];
const msg = typeof e === "function" ? e.apply(null, args) : e;
throw new Error(`[Immer] ${msg}`);
}
throw new Error(
`[Immer] minified error nr: ${error}. Full error at: https://bit.ly/3cXEKWf`
);
}
var getPrototypeOf = Object.getPrototypeOf;
function isDraft(value) {
return !!value && !!value[DRAFT_STATE];
}
function isDraftable(value) {
var _a;
if (!value)
return false;
return isPlainObject(value) || Array.isArray(value) || !!value[DRAFTABLE] || !!((_a = value.constructor) == null ? void 0 : _a[DRAFTABLE]) || isMap(value) || isSet(value);
}
var objectCtorString = Object.prototype.constructor.toString();
function isPlainObject(value) {
if (!value || typeof value !== "object")
return false;
const proto = getPrototypeOf(value);
if (proto === null) {
return true;
}
const Ctor = Object.hasOwnProperty.call(proto, "constructor") && proto.constructor;
if (Ctor === Object)
return true;
return typeof Ctor == "function" && Function.toString.call(Ctor) === objectCtorString;
}
function each(obj, iter) {
if (getArchtype(obj) === 0) {
Reflect.ownKeys(obj).forEach((key2) => {
iter(key2, obj[key2], obj);
});
} else {
obj.forEach((entry, index) => iter(index, entry, obj));
}
}
function getArchtype(thing) {
const state = thing[DRAFT_STATE];
return state ? state.type_ : Array.isArray(thing) ? 1 : isMap(thing) ? 2 : isSet(thing) ? 3 : 0;
}
function has(thing, prop) {
return getArchtype(thing) === 2 ? thing.has(prop) : Object.prototype.hasOwnProperty.call(thing, prop);
}
function set(thing, propOrOldValue, value) {
const t = getArchtype(thing);
if (t === 2)
thing.set(propOrOldValue, value);
else if (t === 3) {
thing.add(value);
} else
thing[propOrOldValue] = value;
}
function is(x, y) {
if (x === y) {
return x !== 0 || 1 / x === 1 / y;
} else {
return x !== x && y !== y;
}
}
function isMap(target) {
return target instanceof Map;
}
function isSet(target) {
return target instanceof Set;
}
function latest(state) {
return state.copy_ || state.base_;
}
function shallowCopy(base, strict) {
if (isMap(base)) {
return new Map(base);
}
if (isSet(base)) {
return new Set(base);
}
if (Array.isArray(base))
return Array.prototype.slice.call(base);
const isPlain = isPlainObject(base);
if (strict === true || strict === "class_only" && !isPlain) {
const descriptors = Object.getOwnPropertyDescriptors(base);
delete descriptors[DRAFT_STATE];
let keys = Reflect.ownKeys(descriptors);
for (let i = 0; i < keys.length; i++) {
const key2 = keys[i];
const desc = descriptors[key2];
if (desc.writable === false) {
desc.writable = true;
desc.configurable = true;
}
if (desc.get || desc.set)
descriptors[key2] = {
configurable: true,
writable: true,
// could live with !!desc.set as well here...
enumerable: desc.enumerable,
value: base[key2]
};
}
return Object.create(getPrototypeOf(base), descriptors);
} else {
const proto = getPrototypeOf(base);
if (proto !== null && isPlain) {
return { ...base };
}
const obj = Object.create(proto);
return Object.assign(obj, base);
}
}
function freeze(obj, deep = false) {
if (isFrozen(obj) || isDraft(obj) || !isDraftable(obj))
return obj;
if (getArchtype(obj) > 1) {
obj.set = obj.add = obj.clear = obj.delete = dontMutateFrozenCollections;
}
Object.freeze(obj);
if (deep)
Object.entries(obj).forEach(([key2, value]) => freeze(value, true));
return obj;
}
function dontMutateFrozenCollections() {
die(2);
}
function isFrozen(obj) {
return Object.isFrozen(obj);
}
var plugins = {};
function getPlugin(pluginKey) {
const plugin = plugins[pluginKey];
if (!plugin) {
die(0, pluginKey);
}
return plugin;
}
var currentScope;
function getCurrentScope() {
return currentScope;
}
function createScope(parent_, immer_) {
return {
drafts_: [],
parent_,
immer_,
// Whenever the modified draft contains a draft from another scope, we
// need to prevent auto-freezing so the unowned draft can be finalized.
canAutoFreeze_: true,
unfinalizedDrafts_: 0
};
}
function usePatchesInScope(scope, patchListener) {
if (patchListener) {
getPlugin("Patches");
scope.patches_ = [];
scope.inversePatches_ = [];
scope.patchListener_ = patchListener;
}
}
function revokeScope(scope) {
leaveScope(scope);
scope.drafts_.forEach(revokeDraft);
scope.drafts_ = null;
}
function leaveScope(scope) {
if (scope === currentScope) {
currentScope = scope.parent_;
}
}
function enterScope(immer2) {
return currentScope = createScope(currentScope, immer2);
}
function revokeDraft(draft) {
const state = draft[DRAFT_STATE];
if (state.type_ === 0 || state.type_ === 1)
state.revoke_();
else
state.revoked_ = true;
}
function processResult(result, scope) {
scope.unfinalizedDrafts_ = scope.drafts_.length;
const baseDraft = scope.drafts_[0];
const isReplaced = result !== void 0 && result !== baseDraft;
if (isReplaced) {
if (baseDraft[DRAFT_STATE].modified_) {
revokeScope(scope);
die(4);
}
if (isDraftable(result)) {
result = finalize(scope, result);
if (!scope.parent_)
maybeFreeze(scope, result);
}
if (scope.patches_) {
getPlugin("Patches").generateReplacementPatches_(
baseDraft[DRAFT_STATE].base_,
result,
scope.patches_,
scope.inversePatches_
);
}
} else {
result = finalize(scope, baseDraft, []);
}
revokeScope(scope);
if (scope.patches_) {
scope.patchListener_(scope.patches_, scope.inversePatches_);
}
return result !== NOTHING ? result : void 0;
}
function finalize(rootScope, value, path2) {
if (isFrozen(value))
return value;
const state = value[DRAFT_STATE];
if (!state) {
each(
value,
(key2, childValue) => finalizeProperty(rootScope, state, value, key2, childValue, path2)
);
return value;
}
if (state.scope_ !== rootScope)
return value;
if (!state.modified_) {
maybeFreeze(rootScope, state.base_, true);
return state.base_;
}
if (!state.finalized_) {
state.finalized_ = true;
state.scope_.unfinalizedDrafts_--;
const result = state.copy_;
let resultEach = result;
let isSet2 = false;
if (state.type_ === 3) {
resultEach = new Set(result);
result.clear();
isSet2 = true;
}
each(
resultEach,
(key2, childValue) => finalizeProperty(rootScope, state, result, key2, childValue, path2, isSet2)
);
maybeFreeze(rootScope, result, false);
if (path2 && rootScope.patches_) {
getPlugin("Patches").generatePatches_(
state,
path2,
rootScope.patches_,
rootScope.inversePatches_
);
}
}
return state.copy_;
}
function finalizeProperty(rootScope, parentState, targetObject, prop, childValue, rootPath, targetIsSet) {
if (childValue === targetObject)
die(5);
if (isDraft(childValue)) {
const path2 = rootPath && parentState && parentState.type_ !== 3 && // Set objects are atomic since they have no keys.
!has(parentState.assigned_, prop) ? rootPath.concat(prop) : void 0;
const res = finalize(rootScope, childValue, path2);
set(targetObject, prop, res);
if (isDraft(res)) {
rootScope.canAutoFreeze_ = false;
} else
return;
} else if (targetIsSet) {
targetObject.add(childValue);
}
if (isDraftable(childValue) && !isFrozen(childValue)) {
if (!rootScope.immer_.autoFreeze_ && rootScope.unfinalizedDrafts_ < 1) {
return;
}
finalize(rootScope, childValue);
if ((!parentState || !parentState.scope_.parent_) && typeof prop !== "symbol" && Object.prototype.propertyIsEnumerable.call(targetObject, prop))
maybeFreeze(rootScope, childValue);
}
}
function maybeFreeze(scope, value, deep = false) {
if (!scope.parent_ && scope.immer_.autoFreeze_ && scope.canAutoFreeze_) {
freeze(value, deep);
}
}
function createProxyProxy(base, parent) {
const isArray = Array.isArray(base);
const state = {
type_: isArray ? 1 : 0,
// Track which produce call this is associated with.
scope_: parent ? parent.scope_ : getCurrentScope(),
// True for both shallow and deep changes.
modified_: false,
// Used during finalization.
finalized_: false,
// Track which properties have been assigned (true) or deleted (false).
assigned_: {},
// The parent draft state.
parent_: parent,
// The base state.
base_: base,
// The base proxy.
draft_: null,
// set below
// The base copy with any updated values.
copy_: null,
// Called by the `produce` function.
revoke_: null,
isManual_: false
};
let target = state;
let traps = objectTraps;
if (isArray) {
target = [state];
traps = arrayTraps;
}
const { revoke, proxy } = Proxy.revocable(target, traps);
state.draft_ = proxy;
state.revoke_ = revoke;
return proxy;
}
var objectTraps = {
get(state, prop) {
if (prop === DRAFT_STATE)
return state;
const source = latest(state);
if (!has(source, prop)) {
return readPropFromProto(state, source, prop);
}
const value = source[prop];
if (state.finalized_ || !isDraftable(value)) {
return value;
}
if (value === peek(state.base_, prop)) {
prepareCopy(state);
return state.copy_[prop] = createProxy(value, state);
}
return value;
},
has(state, prop) {
return prop in latest(state);
},
ownKeys(state) {
return Reflect.ownKeys(latest(state));
},
set(state, prop, value) {
const desc = getDescriptorFromProto(latest(state), prop);
if (desc == null ? void 0 : desc.set) {
desc.set.call(state.draft_, value);
return true;
}
if (!state.modified_) {
const current2 = peek(latest(state), prop);
const currentState = current2 == null ? void 0 : current2[DRAFT_STATE];
if (currentState && currentState.base_ === value) {
state.copy_[prop] = value;
state.assigned_[prop] = false;
return true;
}
if (is(value, current2) && (value !== void 0 || has(state.base_, prop)))
return true;
prepareCopy(state);
markChanged(state);
}
if (state.copy_[prop] === value && // special case: handle new props with value 'undefined'
(value !== void 0 || prop in state.copy_) || // special case: NaN
Number.isNaN(value) && Number.isNaN(state.copy_[prop]))
return true;
state.copy_[prop] = value;
state.assigned_[prop] = true;
return true;
},
deleteProperty(state, prop) {
if (peek(state.base_, prop) !== void 0 || prop in state.base_) {
state.assigned_[prop] = false;
prepareCopy(state);
markChanged(state);
} else {
delete state.assigned_[prop];
}
if (state.copy_) {
delete state.copy_[prop];
}
return true;
},
// Note: We never coerce `desc.value` into an Immer draft, because we can't make
// the same guarantee in ES5 mode.
getOwnPropertyDescriptor(state, prop) {
const owner = latest(state);
const desc = Reflect.getOwnPropertyDescriptor(owner, prop);
if (!desc)
return desc;
return {
writable: true,
configurable: state.type_ !== 1 || prop !== "length",
enumerable: desc.enumerable,
value: owner[prop]
};
},
defineProperty() {
die(11);
},
getPrototypeOf(state) {
return getPrototypeOf(state.base_);
},
setPrototypeOf() {
die(12);
}
};
var arrayTraps = {};
each(objectTraps, (key2, fn) => {
arrayTraps[key2] = function() {
arguments[0] = arguments[0][0];
return fn.apply(this, arguments);
};
});
arrayTraps.deleteProperty = function(state, prop) {
if (isNaN(parseInt(prop)))
die(13);
return arrayTraps.set.call(this, state, prop, void 0);
};
arrayTraps.set = function(state, prop, value) {
if (prop !== "length" && isNaN(parseInt(prop)))
die(14);
return objectTraps.set.call(this, state[0], prop, value, state[0]);
};
function peek(draft, prop) {
const state = draft[DRAFT_STATE];
const source = state ? latest(state) : draft;
return source[prop];
}
function readPropFromProto(state, source, prop) {
var _a;
const desc = getDescriptorFromProto(source, prop);
return desc ? `value` in desc ? desc.value : (
// This is a very special case, if the prop is a getter defined by the
// prototype, we should invoke it with the draft as context!
(_a = desc.get) == null ? void 0 : _a.call(state.draft_)
) : void 0;
}
function getDescriptorFromProto(source, prop) {
if (!(prop in source))
return void 0;
let proto = getPrototypeOf(source);
while (proto) {
const desc = Object.getOwnPropertyDescriptor(proto, prop);
if (desc)
return desc;
proto = getPrototypeOf(proto);
}
return void 0;
}
function markChanged(state) {
if (!state.modified_) {
state.modified_ = true;
if (state.parent_) {
markChanged(state.parent_);
}
}
}
function prepareCopy(state) {
if (!state.copy_) {
state.copy_ = shallowCopy(
state.base_,
state.scope_.immer_.useStrictShallowCopy_
);
}
}
var Immer2 = class {
constructor(config) {
this.autoFreeze_ = true;
this.useStrictShallowCopy_ = false;
this.produce = (base, recipe, patchListener) => {
if (typeof base === "function" && typeof recipe !== "function") {
const defaultBase = recipe;
recipe = base;
const self2 = this;
return function curriedProduce(base2 = defaultBase, ...args) {
return self2.produce(base2, (draft) => recipe.call(this, draft, ...args));
};
}
if (typeof recipe !== "function")
die(6);
if (patchListener !== void 0 && typeof patchListener !== "function")
die(7);
let result;
if (isDraftable(base)) {
const scope = enterScope(this);
const proxy = createProxy(base, void 0);
let hasError = true;
try {
result = recipe(proxy);
hasError = false;
} finally {
if (hasError)
revokeScope(scope);
else
leaveScope(scope);
}
usePatchesInScope(scope, patchListener);
return processResult(result, scope);
} else if (!base || typeof base !== "object") {
result = recipe(base);
if (result === void 0)
result = base;
if (result === NOTHING)
result = void 0;
if (this.autoFreeze_)
freeze(result, true);
if (patchListener) {
const p = [];
const ip = [];
getPlugin("Patches").generateReplacementPatches_(base, result, p, ip);
patchListener(p, ip);
}
return result;
} else
die(1, base);
};
this.produceWithPatches = (base, recipe) => {
if (typeof base === "function") {
return (state, ...args) => this.produceWithPatches(state, (draft) => base(draft, ...args));
}
let patches, inversePatches;
const result = this.produce(base, recipe, (p, ip) => {
patches = p;
inversePatches = ip;
});
return [result, patches, inversePatches];
};
if (typeof (config == null ? void 0 : config.autoFreeze) === "boolean")
this.setAutoFreeze(config.autoFreeze);
if (typeof (config == null ? void 0 : config.useStrictShallowCopy) === "boolean")
this.setUseStrictShallowCopy(config.useStrictShallowCopy);
}
createDraft(base) {
if (!isDraftable(base))
die(8);
if (isDraft(base))
base = current(base);
const scope = enterScope(this);
const proxy = createProxy(base, void 0);
proxy[DRAFT_STATE].isManual_ = true;
leaveScope(scope);
return proxy;
}
finishDraft(draft, patchListener) {
const state = draft && draft[DRAFT_STATE];
if (!state || !state.isManual_)
die(9);
const { scope_: scope } = state;
usePatchesInScope(scope, patchListener);
return processResult(void 0, scope);
}
/**
* Pass true to automatically freeze all copies created by Immer.
*
* By default, auto-freezing is enabled.
*/
setAutoFreeze(value) {
this.autoFreeze_ = value;
}
/**
* Pass true to enable strict shallow copy.
*
* By default, immer does not copy the object descriptors such as getter, setter and non-enumrable properties.
*/
setUseStrictShallowCopy(value) {
this.useStrictShallowCopy_ = value;
}
applyPatches(base, patches) {
let i;
for (i = patches.length - 1; i >= 0; i--) {
const patch = patches[i];
if (patch.path.length === 0 && patch.op === "replace") {
base = patch.value;
break;
}
}
if (i > -1) {
patches = patches.slice(i + 1);
}
const applyPatchesImpl = getPlugin("Patches").applyPatches_;
if (isDraft(base)) {
return applyPatchesImpl(base, patches);
}
return this.produce(
base,
(draft) => applyPatchesImpl(draft, patches)
);
}
};
function createProxy(value, parent) {
const draft = isMap(value) ? getPlugin("MapSet").proxyMap_(value, parent) : isSet(value) ? getPlugin("MapSet").proxySet_(value, parent) : createProxyProxy(value, parent);
const scope = parent ? parent.scope_ : getCurrentScope();
scope.drafts_.push(draft);
return draft;
}
function current(value) {
if (!isDraft(value))
die(10, value);
return currentImpl(value);
}
function currentImpl(value) {
if (!isDraftable(value) || isFrozen(value))
return value;
const state = value[DRAFT_STATE];
let copy;
if (state) {
if (!state.modified_)
return state.base_;
state.finalized_ = true;
copy = shallowCopy(value, state.scope_.immer_.useStrictShallowCopy_);
} else {
copy = shallowCopy(value, true);
}
each(copy, (key2, childValue) => {
set(copy, key2, currentImpl(childValue));
});
if (state) {
state.finalized_ = false;
}
return copy;
}
var immer = new Immer2();
var produce = immer.produce;
var produceWithPatches = immer.produceWithPatches.bind(
immer
);
var setAutoFreeze = immer.setAutoFreeze.bind(immer);
var setUseStrictShallowCopy = immer.setUseStrictShallowCopy.bind(immer);
var applyPatches = immer.applyPatches.bind(immer);
var createDraft = immer.createDraft.bind(immer);
var finishDraft = immer.finishDraft.bind(immer);
// src/app/store.ts
var import_react5 = __toESM(require_react());
// node_modules/.pnpm/zustand@4.5.6_@types+react@18.3.20_immer@10.1.1_react@18.3.1/node_modules/zustand/esm/traditional.mjs
var import_react4 = __toESM(require_react(), 1);
var import_with_selector = __toESM(require_with_selector(), 1);
// node_modules/.pnpm/zustand@4.5.6_@types+react@18.3.20_immer@10.1.1_react@18.3.1/node_modules/zustand/esm/vanilla.mjs
var import_meta = {};
var createStoreImpl = (createState) => {
let state;
const listeners = /* @__PURE__ */ new Set();
const setState = (partial, replace) => {
const nextState = typeof partial === "function" ? partial(state) : partial;
if (!Object.is(nextState, state)) {
const previousState = state;
state = (replace != null ? replace : typeof nextState !== "object" || nextState === null) ? nextState : Object.assign({}, state, nextState);
listeners.forEach((listener) => listener(state, previousState));
}
};
const getState = () => state;
const getInitialState2 = () => initialState;
const subscribe = (listener) => {
listeners.add(listener);
return () => listeners.delete(listener);
};
const destroy = () => {
if ((import_meta.env ? import_meta.env.MODE : void 0) !== "production") {
console.warn(
"[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."
);
}
listeners.clear();
};
const api = { setState, getState, getInitialState: getInitialState2, subscribe, destroy };
const initialState = state = createState(setState, getState, api);
return api;
};
var createStore = (createState) => createState ? createStoreImpl(createState) : createStoreImpl;
// node_modules/.pnpm/zustand@4.5.6_@types+react@18.3.20_immer@10.1.1_react@18.3.1/node_modules/zustand/esm/traditional.mjs
var { useDebugValue } = import_react4.default;
var { useSyncExternalStoreWithSelector } = import_with_selector.default;
var identity = (arg) => arg;
function useStoreWithEqualityFn(api, selector = identity, equalityFn) {
const slice = useSyncExternalStoreWithSelector(
api.subscribe,
api.getState,
api.getServerState || api.getInitialState,
selector,
equalityFn
);
useDebugValue(slice);
return slice;
}
var createWithEqualityFnImpl = (createState, defaultEqualityFn) => {
const api = createStore(createState);
const useBoundStoreWithEqualityFn = (selector, equalityFn = defaultEqualityFn) => useStoreWithEqualityFn(api, selector, equalityFn);
Object.assign(useBoundStoreWithEqualityFn, api);
return useBoundStoreWithEqualityFn;
};
var createWithEqualityFn = (createState, defaultEqualityFn) => createState ? createWithEqualityFnImpl(createState, defaultEqualityFn) : createWithEqualityFnImpl;
// src/types/enums.ts
var import_lodash2 = __toESM(require_lodash());
var priorityKeyToNumber = {
lowest: 5 /* LOWEST */,
low: 4 /* LOW */,
medium: 2 /* MEDIUM */,
high: 1 /* HIGH */,
highest: 0 /* HIGHEST */,
default: 3 /* DEFAULT */
};
var simplePriorityToNumber = {
"...": 5 /* LOWEST */,
"?": 4 /* LOW */,
"-": 3 /* DEFAULT */,
"!": 2 /* MEDIUM */,
"!!": 1 /* HIGH */,
"!!!": 0 /* HIGHEST */
};
var priorityNumberToSimplePriority = import_lodash2.default.invert(simplePriorityToNumber);
var priorityNumberToKey = import_lodash2.default.invert(priorityKeyToNumber);
var keyToTasksEmoji = {
reminder: "\u23F0",
scheduled: "\u23F3",
due: "\u{1F4C5}",
start: "\u{1F6EB}",
completion: "\u2705",
created: "\u2795",
repeat: "\u{1F501}",
low: "\u{1F53D}",
medium: "\u{1F53C}",
high: "\u23EB",
highest: "\u{1F53A}",
lowest: "\u23EC"
};
var TasksEmojiToKey = import_lodash2.default.invert(keyToTasksEmoji);
var dataViewKeys = [
"annotated",
"children",
"header",
"line",
"lineCount",
"link",
"list",
"outlinks",
"parent",
"path",
"position",
"real",
"section",
"status",
"subtasks",
"symbol",
"tags",
"task",
"text"
];
var sTaskKeys = [
"checked",
"completed",
// boolean
"fullyCompleted",
"created",
"due",
"completion",
"start",
"scheduled",
"length",
"priority"
];
var fullCalendarKeys = [
"startTime",
"endTime",
"date",
"completed",
// date
"type",
"allDay",
"title"
];
var tasksKeys = [
"start",
"completion",
"scheduled",
"priority",
"due",
"created",
"repeat"
];
var timeRulerKeys = ["duration", "query"];
var RESERVED_FIELDS = dataViewKeys.concat(
sTaskKeys,
fullCalendarKeys,
tasksKeys,
timeRulerKeys
);
var isTaskProps = (data) => !data.type || !["heading", "delete"].includes(data.type);
// src/app/store.ts
var useAppStore = createWithEqualityFn(() => ({
tasks: {},
events: {},
apis: {},
dragData: null,
findingTask: null,
inScroll: 0,
searchStatus: false,
viewMode: "hour",
dragMode: "normal",
fileOrder: [],
dailyNoteInfo: {
format: "YYYY-MM-DD",
folder: "",
template: ""
},
newTask: null,
collapsed: {},
settings: {
dayStartEnd: [0, 24],
groupBy: "path",
muted: false,
timerEvent: "notification",
twentyFourHourFormat: false,
showCompleted: false,
extendBlocks: false,
hideTimes: false,
borders: false,
viewMode: "day",
scheduledSubtasks: false
},
showingPastDates: false,
searchWithinWeeks: [-1, 1],
childWidth: 1,
timer: {
negative: false,
maxSeconds: null,
startISO: void 0,
playing: false
},
recreateWindow: 0,
dragOffset: 0
}));
var useAppStoreRef = (callback) => {
const storeValue = useAppStore(callback);
const storeValueRef = (0, import_react5.useRef)(storeValue);
storeValueRef.current = storeValue;
return [storeValue, storeValueRef];
};
var modify = (modifier) => useAppStore.setState(produce(modifier));
var setters = {
set: (newState) => modify(() => newState),
patchTasks: async (ids2, task) => {
const obsidianAPI = getters.getObsidianAPI();
for (let id of ids2) {
const savedTask = { ...getters.getTask(id), ...task };
if (task.scheduled === "DELETE" /* DELETE */)
delete savedTask.scheduled;
await obsidianAPI.saveTask(savedTask);
}
if (task.completion)
obsidianAPI.playComplete();
},
patchCollapsed: async (ids2, collapsed) => {
modify((state) => {
for (let id of ids2) {
state.collapsed[id] = collapsed;
}
});
},
updateFileOrder: (file, beforeFile) => {
const obsidianAPI = getters.getObsidianAPI();
obsidianAPI.updateFileOrder(file, beforeFile);
},
patchTimer: (timer) => {
modify((state) => {
state.timer = { ...state.timer, ...timer };
});
}
};
var getters = {
getEvent: (id) => useAppStore.getState().events[id],
getTask: (id) => useAppStore.getState().tasks[id],
getObsidianAPI: () => useAppStore.getState().apis.obsidian,
getCalendarAPI: () => useAppStore.getState().apis.calendar,
get: (key2) => useAppStore.getState()[key2],
getApp: () => useAppStore.getState().apis.obsidian.app
};
// src/services/dragging.ts
var import_lodash10 = __toESM(require_lodash());
// src/services/util.ts
var import_lodash9 = __toESM(require_lodash());
var import_moment = __toESM(require_moment());
var import_react14 = __toESM(require_react());
// src/components/Block.tsx
var import_lodash8 = __toESM(require_lodash());
var import_react13 = __toESM(require_react());
var import_react_dom2 = __toESM(require_react_dom());
// node_modules/.pnpm/zustand@4.5.6_@types+react@18.3.20_immer@10.1.1_react@18.3.1/node_modules/zustand/esm/shallow.mjs
function shallow$1(objA, objB) {
if (Object.is(objA, objB)) {
return true;
}
if (typeof objA !== "object" || objA === null || typeof objB !== "object" || objB === null) {
return false;
}
if (objA instanceof Map && objB instanceof Map) {
if (objA.size !== objB.size)
return false;
for (const [key2, value] of objA) {
if (!Object.is(value, objB.get(key2))) {
return false;
}
}
return true;
}
if (objA instanceof Set && objB instanceof Set) {
if (objA.size !== objB.size)
return false;
for (const value of objA) {
if (!objB.has(value)) {
return false;
}
}
return true;
}
const keysA = Object.keys(objA);
if (keysA.length !== Object.keys(objB).length) {
return false;
}
for (const keyA of keysA) {
if (!Object.prototype.hasOwnProperty.call(objB, keyA) || !Object.is(objA[keyA], objB[keyA])) {
return false;
}
}
return true;
}
// src/components/Button.tsx
var import_react7 = __toESM(require_react());
// src/components/Logo.tsx
var import_obsidian = require("obsidian");
var import_react6 = __toESM(require_react());
// node_modules/.pnpm/tiny-invariant@1.3.3/node_modules/tiny-invariant/dist/esm/tiny-invariant.js
var isProduction = false;
var prefix = "Invariant failed";
function invariant(condition, message) {
if (condition) {
return;
}
if (isProduction) {
throw new Error(prefix);
}
var provided = typeof message === "function" ? message() : message;
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
throw new Error(value);
}
// src/components/Logo.tsx
var import_jsx_runtime = __toESM(require_jsx_runtime());
function Logo({ src, className = "", title = "" }) {
const frame = (0, import_react6.useRef)(null);
(0, import_react6.useLayoutEffect)(() => {
invariant(frame.current);
(0, import_obsidian.setIcon)(frame.current, src);
}, [src]);
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
"div",
{
className: `flex select-none flex-col items-center justify-center ${className} ${!className.includes("h-") ? "h-full" : ""} ${!className.includes("w-") ? "w-full" : ""}`,
ref: frame
}
);
}
// src/components/Button.tsx
var import_jsx_runtime2 = __toESM(require_jsx_runtime());
var Button = (0, import_react7.forwardRef)(({ className, src, children, ...rest }, ref) => {
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
"div",
{
className: `transition-colors duration-300 clickable-icon whitespace-nowrap font-menu text-sm ${className}`,
...rest,
ref,
children: src ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Logo, { src }) : children != null ? children : null
}
);
});
var Button_default = Button;
// src/components/Droppable.tsx
var import_react8 = __toESM(require_react());
function Droppable({
children,
id,
data,
ref
}) {
const { isOver, setNodeRef } = useDroppable({
id,
data
});
return (0, import_react8.cloneElement)(children, {
ref: ref ? (node) => {
ref(node);
setNodeRef(node);
} : setNodeRef,
className: `${children.props.className} rounded-icon ${isOver ? "!bg-selection" : ""}`
});
}
// src/components/Group.tsx
var import_lodash6 = __toESM(require_lodash());
// src/components/Task.tsx
var import_lodash5 = __toESM(require_lodash());
// src/services/obsidianApi.ts
var import_lodash4 = __toESM(require_lodash());
var import_obsidian2 = require("obsidian");
var import_obsidian_dataview = __toESM(require_lib());
// src/services/parser.ts
var import_lodash3 = __toESM(require_lodash());
var ISO_MATCH = "\\d{4}-\\d{2}-\\d{2}(T\\d{2}:\\d{2})?";
var TASKS_EMOJI_SEARCH = new RegExp(
`[${import_lodash3.default.values(keyToTasksEmoji).join("")}] ?(${ISO_MATCH})?`,
"giu"
);
var TASKS_REPEAT_SEARCH = new RegExp(
`${keyToTasksEmoji.repeat} ?([a-zA-Z0-9 ]+)`,
"iu"
);
var SIMPLE_SCHEDULED_DATE = /^(\d{4}-\d{2}-\d{2}) /u;
var SIMPLE_SCHEDULED_TIME = /^(\d{1,2}(:\d{1,2})?( ?- ?\d{1,2}(:\d{1,2})?)?)/u;
var SIMPLE_PRIORITY = / (\?|!{1,3})$/u;
var SIMPLE_DUE = / ?> ?(\d{4}-\d{2}-\d{2})/u;
var KANBAN_DATE = / ?@\{(\d{4}-\d{2}-\d{2})\}/u;
var KANBAN_TIME = / ?@@\{(\d{2}:\d{2})\}/u;
function textToTask(item, dailyNoteInfo2, defaultFormat) {
var _a, _b, _c, _d, _e;
const { main: mainFormat } = detectFieldFormat(item.text, defaultFormat);
const INLINE_FIELD_SEARCH = /[\[\(][^\]\)]+:: [^\]\)]+[\]\)] */gu;
const HASHTAG_SEARCH = /#[^\s]+\s?/gu;
const MD_LINK_LINE_SEARCH = /\[\[.*?\|(.*?)\]\]/gu;
const LINK_SEARCH = /\[(.*?)\]\(.*?\)/gu;
const REMINDER_MATCH = new RegExp(
` ?${keyToTasksEmoji.reminder} ?(${ISO_MATCH}( \\d{2}:\\d{2})?)|\\(@(\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2})?)\\)|@\\{(\\d{4}-\\d{2}-\\d{2}( \\d{2}:\\d{2})?)\\}`,
"u"
);
const BLOCK_REFERENCE = /\^[a-z0-9]+$/u;
const titleLine = (_b = (_a = item.text.match(/(.*?)(\n|$)/u)) == null ? void 0 : _a[1]) != null ? _b : "";
let originalTitle = titleLine.replace(BLOCK_REFERENCE, "").replace(INLINE_FIELD_SEARCH, "").replace(HASHTAG_SEARCH, "").replace(REMINDER_MATCH, "");
if (mainFormat === "simple") {
originalTitle = originalTitle.replace(SIMPLE_SCHEDULED_DATE, "").replace(SIMPLE_SCHEDULED_TIME, "").replace(SIMPLE_DUE, "").replace(SIMPLE_PRIORITY, "");
} else if (mainFormat === "tasks") {
originalTitle = originalTitle.replace(TASKS_REPEAT_SEARCH, "").replace(TASKS_EMOJI_SEARCH, "");
} else if (mainFormat === "kanban") {
originalTitle = originalTitle.replace(KANBAN_DATE, "").replace(KANBAN_TIME, "");
}
let title = originalTitle.replace(MD_LINK_LINE_SEARCH, "$1").replace(LINK_SEARCH, "[$1]").replace(/^\s+/u, "").replace(/\s+$/u, "");
let notes = item.text.includes("\n") ? (_c = item.text.match(/\n((.|\n)*$)/)) == null ? void 0 : _c[1] : void 0;
if (notes)
notes = notes.replace(LINK_SEARCH, "[$1]");
const extraFields = import_lodash3.default.mapValues(
import_lodash3.default.omit(item, RESERVED_FIELDS),
(x) => x.toString()
);
const parseId = (task) => {
return task.section.path.replace(/\.md$/, "") + "::" + task.line;
};
const parseScheduledAndLength = () => {
var _a2, _b2, _c2, _d2, _e2, _f;
let rawScheduled = item.scheduled;
let rawLength = item.length || item.duration;
let duration;
let scheduled2;
if (rawLength && Duration.isDuration(rawLength))
duration = { hour: rawLength.hours, minute: rawLength.minutes };
let isDate2 = true;
if (rawScheduled) {
const hasTime = /scheduled:: ?\d{4}-\d{2}-\d{2}T/.test(item.text);
if (hasTime)
isDate2 = false;
}
if (!rawScheduled) {
const inlineDate = (_c2 = (_a2 = new RegExp(`${keyToTasksEmoji.scheduled} ?(${ISO_MATCH})`)) == null ? void 0 : _a2[1]) != null ? _c2 : (_b2 = titleLine.match(SIMPLE_SCHEDULED_DATE)) == null ? void 0 : _b2[1];
if (inlineDate) {
rawScheduled = DateTime.fromISO(inlineDate);
if (!isDateISO(inlineDate))
isDate2 = false;
}
}
if (!rawScheduled) {
const kanbanDate = (_d2 = titleLine.match(KANBAN_DATE)) == null ? void 0 : _d2[1];
if (kanbanDate) {
rawScheduled = DateTime.fromISO(kanbanDate);
const kanbanTime = (_e2 = titleLine.match(KANBAN_TIME)) == null ? void 0 : _e2[1];
if (kanbanTime) {
const [hours, minutes] = kanbanTime.split(":");
rawScheduled = rawScheduled.set({
hour: Number(hours),
minute: Number(minutes)
});
isDate2 = false;
}
}
}
if (!rawScheduled && !(typeof item.parent === "number")) {
let titleDate = item.date;
const parsedPathDate = parseDateFromPath(item.path, dailyNoteInfo2);
if (parsedPathDate)
titleDate = parsedPathDate.toISOString(false).slice(0, 10);
if (titleDate)
rawScheduled = DateTime.fromISO(titleDate);
}
if (rawScheduled) {
let hour, minute = 0;
let endHour, endMinute = 0;
if (item["startTime"] && typeof item["startTime"] === "string") {
const splitStartTime = item["startTime"].split(":");
hour = parseInt(splitStartTime[0]);
minute = parseInt(splitStartTime[1]);
if (item["endTime"]) {
const splitEndTime = item["endTime"].split(":");
endHour = parseInt(splitEndTime[0]);
if (splitEndTime[1])
endMinute = parseInt(splitEndTime[1]);
}
} else {
const titleWithoutDate = titleLine.replace(SIMPLE_SCHEDULED_DATE, "");
const simpleScheduledTime = (_f = titleWithoutDate.match(
SIMPLE_SCHEDULED_TIME
)) == null ? void 0 : _f[1];
if (simpleScheduledTime) {
const fullTime = simpleScheduledTime.split(/ ?- ?/);
const [hourString, minuteString] = fullTime[0].split(":");
hour = parseInt(hourString);
if (minuteString)
minute = parseInt(minuteString);
const endTime = fullTime[1];
if (endTime) {
const splitEndTime = endTime.split(":");
endHour = parseInt(splitEndTime[0]);
if (splitEndTime[1])
endMinute = parseInt(splitEndTime[1]);
}
}
}
if (hour !== void 0 && !isNaN(hour) && minute !== void 0 && !isNaN(minute)) {
rawScheduled = rawScheduled.set({ hour, minute });
isDate2 = false;
if (endHour !== void 0 && endMinute !== void 0 && !isNaN(endHour) && !isNaN(endMinute)) {
let endTime = rawScheduled.set({ hour: endHour, minute: endMinute });
if (endTime < rawScheduled)
endTime = endTime.plus({ day: 1 });
rawLength = endTime.diff(rawScheduled).shiftTo("hour", "minute");
duration = { hour: rawLength.hours, minute: rawLength.minutes };
}
}
}
if (!DateTime.isDateTime(rawScheduled))
scheduled2 = void 0;
else {
scheduled2 = isDate2 ? rawScheduled.toISODate() : toISO(rawScheduled);
}
return { scheduled: scheduled2, length: duration };
};
const parseDateKey = (key2) => {
var _a2, _b2;
let date = item[key2];
if (DateTime.isDateTime(date)) {
date = date.equals(date.startOf("day")) ? item[key2].toISODate() : toISO(date);
}
if (!date) {
date = (_a2 = item.text.match(
new RegExp(`${keyToTasksEmoji[key2]} ?(${ISO_MATCH})`)
)) == null ? void 0 : _a2[1];
}
if (!date && key2 === "due") {
date = (_b2 = titleLine.match(SIMPLE_DUE)) == null ? void 0 : _b2[1];
}
if (!(typeof date === "string"))
return void 0;
return date;
};
const parseReminder = () => {
var _a2, _b2, _c2, _d2;
const tasksReminders = new RegExp(
`${keyToTasksEmoji.reminder} ?(${ISO_MATCH}( \\d{2}:\\d{2})?)`
);
const nativeReminders = new RegExp(
/\(@(\d{4}-\d{2}-\d{2}( \d{2}:\d{2})?)\)/
);
const reminder2 = (_d2 = (_c2 = (_a2 = item.text.match(tasksReminders)) == null ? void 0 : _a2[1]) != null ? _c2 : (_b2 = item.text.match(nativeReminders)) == null ? void 0 : _b2[1]) != null ? _d2 : void 0;
if (reminder2)
title = title.replace(reminder2, "");
return reminder2;
};
const parsePriority = () => {
var _a2, _b2;
let priority2 = item["priority"];
if (typeof priority2 === "number")
return priority2;
else if (typeof priority2 === "string") {
priority2 = priority2.toLowerCase();
return (_a2 = priorityKeyToNumber[priority2]) != null ? _a2 : 3 /* DEFAULT */;
} else {
for (let emoji of [
keyToTasksEmoji.highest,
keyToTasksEmoji.high,
keyToTasksEmoji.medium,
keyToTasksEmoji.low,
keyToTasksEmoji.lowest
]) {
if (item.text.includes(emoji))
return priorityKeyToNumber[TasksEmojiToKey[emoji]];
}
const priorityMatch = (_b2 = titleLine.match(SIMPLE_PRIORITY)) == null ? void 0 : _b2[1];
if (priorityMatch)
return simplePriorityToNumber[priorityMatch];
}
return 3 /* DEFAULT */;
};
const parseRepeat = () => {
var _a2, _b2;
return (_b2 = item["repeat"]) != null ? _b2 : (_a2 = titleLine.match(TASKS_REPEAT_SEARCH)) == null ? void 0 : _a2[1];
};
const parseQuery = () => {
if (!item.query)
return void 0;
if (!item.query.includes('"') && !/(^|\s)#|WHERE/.test(item.query))
return `"${item.query}"`;
return item.query;
};
const { length, scheduled } = parseScheduledAndLength();
const due = parseDateKey("due");
const completion = item.completed ? parseDateKey("completion") : void 0;
const start = parseDateKey("start");
const created = parseDateKey("created");
const repeat = parseRepeat();
const priority = parsePriority();
const reminder = parseReminder();
const query = parseQuery();
let filteredTags = [...item.tags];
let links = item.outlinks.map((x) => `"${x.path}"`);
const textString = item.text;
let firstBracket = textString.indexOf("[[");
let secondBracket = textString.indexOf("]]", firstBracket);
while (firstBracket !== -1 && secondBracket !== -1) {
const inLink = item.text.slice(firstBracket, secondBracket);
filteredTags = filteredTags.filter((tag) => !inLink.includes(tag));
firstBracket = textString.indexOf("[[", secondBracket);
secondBracket = textString.indexOf("]]", firstBracket);
}
return {
id: parseId(item),
page: false,
children: (_d = item.children.flatMap(
(child) => child.completed ? [] : parseId(child)
)) != null ? _d : [],
type: "task",
status: item.status,
fieldFormat: mainFormat,
reminder,
due,
scheduled,
duration: length,
tags: filteredTags,
title,
originalTitle,
originalText: item.text,
notes,
repeat,
extraFields: import_lodash3.default.keys(extraFields).length > 0 ? extraFields : void 0,
position: item.position,
path: item.path + (item.section.subpath ? "#" + item.section.subpath : ""),
priority,
completion,
start,
created,
blockReference: (_e = titleLine.match(BLOCK_REFERENCE)) == null ? void 0 : _e[0],
completed: item.completed,
query,
links
};
}
function pageToTask(item, defaultFieldFormat) {
var _a, _b, _c;
const testDateTime = (prop) => DateTime.isDateTime(prop) ? !prop.minute && !prop.hour ? prop.toISODate() : toISO(prop) : void 0;
const testDuration = (prop) => Duration.isDuration(prop) ? { hour: prop.hours, minute: prop.minutes } : void 0;
const parseScheduledAndLength = () => {
var _a2;
let scheduled2 = testDateTime(item.scheduled);
let length2 = testDuration(
item.length || item.duration
);
let isDate2 = false;
let startHours = void 0, startMinutes = void 0;
const date = testDateTime(item.date);
if (date) {
if (item.allDay) {
isDate2 = true;
scheduled2 = date;
} else if (typeof item.startTime === "string") {
let [sampleHours, sampleMinutes] = (_a2 = item.startTime) == null ? void 0 : _a2.split(":");
if (sampleHours !== void 0 && sampleMinutes !== void 0) {
startHours = parseInt(sampleHours);
startMinutes = parseInt(sampleMinutes);
}
if (typeof item.endTime === "string" && startHours !== void 0 && startMinutes !== void 0) {
let [sampleEndHours, sampleEndMinutes] = item.endTime.split(":");
if (sampleHours !== void 0 && sampleMinutes !== void 0) {
const endHours = parseInt(sampleEndHours);
const endMinutes = parseInt(sampleEndMinutes);
const endTime = DateTime.fromISO(date).set({
hour: endHours,
minute: endMinutes
});
const startTime = DateTime.fromISO(date).set({
hour: startHours,
minute: startMinutes
});
const durationLength = endTime.diff(startTime).shiftTo("hour", "minute");
length2 = {
hour: durationLength.hours,
minute: durationLength.minutes
};
scheduled2 = toISO(startTime);
}
}
}
}
if (isDate2 && scheduled2)
scheduled2 = scheduled2.slice(0, 10);
return { scheduled: scheduled2, length: length2 };
};
const { scheduled, length } = parseScheduledAndLength();
const fieldFormat = item.date || item.startTime ? "full-calendar" : "dataview";
return {
id: item.file.path,
completed: item.completed ? true : false,
originalText: item.file.name,
path: item.file.path,
priority: typeof item.priority === "string" ? (_a = priorityKeyToNumber[item.priority.toLowerCase()]) != null ? _a : 3 /* DEFAULT */ : 3 /* DEFAULT */,
children: [],
page: true,
type: "task",
status: item.completed ? "x" : " ",
reminder: testDateTime(item.reminder),
due: testDateTime(item.due),
scheduled,
duration: length,
tags: [...item.file.tags],
title: item.file.name,
originalTitle: item.file.name,
notes: "",
repeat: typeof item.repeat === "string" ? item.repeat : void 0,
extraFields: void 0,
position: {
start: { line: 0, col: 0, offset: 0 },
end: { line: 0, col: 0, offset: 0 }
},
completion: item.completed ? (_b = testDateTime(item.completion)) != null ? _b : item.file.mtime.toISODate() : void 0,
start: testDateTime(item.start),
created: testDateTime(item.created),
blockReference: void 0,
fieldFormat,
query: (_c = item.query) != null ? _c : void 0,
links: []
};
}
var detectFieldFormat = (text, defaultFormat) => {
const parseMain = () => {
if (SIMPLE_SCHEDULED_DATE.test(text) || SIMPLE_DUE.test(text))
return "simple";
for (let emoji of Object.keys(TasksEmojiToKey)) {
if (text.contains(emoji))
return "tasks";
}
if (KANBAN_DATE.test(text))
return "kanban";
if (/\[allDay:: |\[date:: |\[startTime:: |\[endTime:: /.test(text))
return "full-calendar";
if (/\[scheduled:: |\[due:: /.test(text))
return "dataview";
return defaultFormat;
};
const parseReminder = () => {
if (text.contains(keyToTasksEmoji.reminder))
return "tasks";
return "native";
};
const parseScheduled = () => {
if (KANBAN_DATE.test(text))
return "kanban";
return "default";
};
return {
main: parseMain(),
reminder: parseReminder(),
scheduled: parseScheduled()
};
};
function taskToText(task, defaultFieldFormat) {
const dailyNoteInfo2 = getters.get("dailyNoteInfo");
let draft = `- [${task.completed ? "x" : task.status}] ${task.originalTitle.replace(/\s+$/, "")} ${task.tags.length > 0 ? task.tags.join(" ") + " " : ""}`;
if (task.extraFields) {
import_lodash3.default.sortBy(import_lodash3.default.entries(task.extraFields), 0).forEach(([key2, value]) => {
draft += `[${key2}:: ${value}]`;
});
}
const { main, reminder } = detectFieldFormat(
task.originalText,
defaultFieldFormat
);
const formatReminder = () => {
if (!task.reminder)
return "";
switch (reminder) {
case "kanban":
return ` @{${task.reminder}}`;
case "native":
return ` (@${task.reminder})`;
case "tasks":
return ` ${keyToTasksEmoji.reminder} ${task.reminder}`;
}
};
switch (main) {
case "simple":
if (task.scheduled) {
let date = parseDateFromPath(
parseFileFromPath(task.path),
dailyNoteInfo2
);
let scheduledDate = task.scheduled.slice(0, 10);
const includeDate = !date || date.toISOString(false).slice(0, 10) !== scheduledDate;
let scheduledTime = task.scheduled.slice(11, 16).replace(/^0/, "");
if (scheduledTime && task.duration && task.duration.hour + task.duration.minute > 0) {
const end = DateTime.fromISO(task.scheduled).plus(task.duration);
scheduledTime += ` - ${end.toFormat("HH:mm").replace(/^0/, "")}`;
}
const checkbox = draft.slice(0, 6);
draft = checkbox + (includeDate ? scheduledDate + " " : "") + scheduledTime + " " + draft.slice(6).replace(/^\s+/, "");
}
if (task.due)
draft += ` > ${task.due}`;
if (hasPriority(task)) {
draft += ` ${priorityNumberToSimplePriority[task.priority]}`;
}
if ((!task.scheduled || isDateISO(task.scheduled)) && task.duration && task.duration.hour + task.duration.minute > 0) {
draft += ` [duration:: ${task.duration.hour ? `${task.duration.hour}h` : ""}${task.duration.minute ? `${task.duration.minute}m` : ""}]`;
}
if (task.repeat)
draft += ` [repeat:: ${task.repeat}]`;
if (task.start)
draft += ` [start:: ${task.start}]`;
if (task.created)
draft += ` [created:: ${task.created}]`;
if (task.query)
draft += ` [query:: ${task.query}]`;
if (task.completion)
draft += ` [completion:: ${task.completion}]`;
break;
case "kanban":
if (task.scheduled) {
if (isDateISO(task.scheduled))
draft += ` @{${task.scheduled}}`;
else {
draft += ` @{${task.scheduled.slice(
0,
10
)}} @@{${task.scheduled.slice(11, 16)}}`;
}
}
draft += formatReminder();
if (task.due)
draft += ` [due:: ${task.due}]`;
if (task.duration && task.duration.hour + task.duration.minute > 0) {
draft += ` [duration:: ${task.duration.hour ? `${task.duration.hour}h` : ""}${task.duration.minute ? `${task.duration.minute}m` : ""}]`;
}
if (task.repeat)
draft += ` [repeat:: ${task.repeat}]`;
if (task.start)
draft += ` [start:: ${task.start}]`;
if (task.created)
draft += ` [created:: ${task.created}]`;
if (hasPriority(task)) {
draft += ` [priority:: ${priorityNumberToKey[task.priority]}]`;
}
if (task.query)
draft += ` [query:: ${task.query}]`;
if (task.completion)
draft += ` [completion:: ${task.completion}]`;
break;
case "dataview":
if (task.scheduled)
draft += ` [scheduled:: ${task.scheduled}]`;
draft += formatReminder();
if (task.due)
draft += ` [due:: ${task.due}]`;
if (task.duration && task.duration.hour + task.duration.minute > 0) {
draft += ` [duration:: ${task.duration.hour ? `${task.duration.hour}h` : ""}${task.duration.minute ? `${task.duration.minute}m` : ""}]`;
}
if (task.repeat)
draft += ` [repeat:: ${task.repeat}]`;
if (task.start)
draft += ` [start:: ${task.start}]`;
if (task.created)
draft += ` [created:: ${task.created}]`;
if (hasPriority(task))
draft += ` [priority:: ${priorityNumberToKey[task.priority]}]`;
if (task.query)
draft += ` [query:: ${task.query}]`;
if (task.completion)
draft += ` [completion:: ${task.completion}]`;
break;
case "full-calendar":
if (task.scheduled) {
draft += ` [date:: ${task.scheduled.slice(0, 10)}]`;
if (!isDateISO(task.scheduled))
draft += ` [startTime:: ${task.scheduled.slice(11)}]`;
else
draft += " [allDay:: true]";
}
draft += formatReminder();
if (task.due)
draft += ` [due:: ${task.due}]`;
if (task.duration && task.duration.hour + task.duration.minute > 0 && task.scheduled) {
const endTime = DateTime.fromISO(task.scheduled).plus(task.duration);
draft += ` [endTime:: ${endTime.hour}:${endTime.minute}]`;
}
if (task.repeat)
draft += ` [repeat:: ${task.repeat}]`;
if (task.start)
draft += ` [start:: ${task.start}]`;
if (task.created)
draft += ` [created:: ${task.created}]`;
if (hasPriority(task))
draft += ` [priority:: ${priorityNumberToKey[task.priority]}]`;
if (task.query)
draft += ` [query:: ${task.query}]`;
if (task.completion)
draft += ` [completion:: ${task.completion}]`;
break;
case "tasks":
if (task.duration && task.duration.hour + task.duration.minute > 0)
draft += ` [duration:: ${task.duration.hour ? `${task.duration.hour}h` : ""}${task.duration.minute ? `${task.duration.minute}m` : ""}]`;
if (task.scheduled && !isDateISO(task.scheduled)) {
draft += ` [startTime:: ${task.scheduled.slice(11)}]`;
}
draft += formatReminder();
if (hasPriority(task))
draft += ` ${keyToTasksEmoji[priorityNumberToKey[task.priority]]}`;
if (task.repeat)
draft += ` ${keyToTasksEmoji.repeat} ${task.repeat}`;
if (task.start)
draft += ` ${keyToTasksEmoji.start} ${task.start}`;
if (task.scheduled)
draft += ` ${keyToTasksEmoji.scheduled} ${task.scheduled.slice(0, 10)}`;
if (task.due)
draft += ` ${keyToTasksEmoji.due} ${task.due}`;
if (task.created)
draft += ` ${keyToTasksEmoji.created} ${task.created}`;
if (task.query)
draft += ` [query:: ${task.query}]`;
if (task.completion)
draft += ` ${keyToTasksEmoji.completion} ${task.completion}`;
break;
}
if (task.blockReference)
draft += " " + task.blockReference;
return draft;
}
function taskToPage(task, frontmatter) {
if (task.fieldFormat === "full-calendar") {
if (task.scheduled) {
if (isDateISO(task.scheduled)) {
frontmatter.allDay = true;
frontmatter.date = task.scheduled;
delete frontmatter["startTime"];
delete frontmatter["endTime"];
} else {
delete frontmatter["allDay"];
frontmatter.date = task.scheduled.slice(0, 10);
frontmatter.startTime = task.scheduled.slice(11, 16);
if (task.duration) {
const endTime = DateTime.fromISO(task.scheduled).plus(task.duration);
frontmatter.endTime = toISO(endTime).slice(11, 16);
}
}
} else {
delete frontmatter["startTime"];
delete frontmatter["endTime"];
delete frontmatter["allDay"];
delete frontmatter["date"];
}
} else {
setProperty(frontmatter, "scheduled", task["scheduled"]);
if (task.duration && task.duration.hour + task.duration.minute) {
setProperty(
frontmatter,
"length",
`${task.duration.hour}h${task.duration.minute}m`
);
}
}
for (let property of [
"due",
"reminder",
"completed",
"completion",
"query",
"reminder"
]) {
setProperty(frontmatter, property, task[property]);
}
if (task.priority !== 3 /* DEFAULT */) {
setProperty(frontmatter, "priority", priorityNumberToKey[task.priority]);
}
}
var propertyIndex = {
completed: ["complete", "completed", "Complete", "Completed"],
scheduled: ["scheduled", "Scheduled", "date", "Date"],
due: ["due", "Due", "deadline", "Deadline"],
reminder: ["reminder", "Reminder"],
completion: ["Completion", "completion"],
query: ["Query", "query"],
length: ["Length", "length"],
priority: ["priority", "Priority"]
};
function setProperty(page, property, value) {
for (let index of propertyIndex[property]) {
if (page[index] !== void 0) {
page[index] = value;
return;
}
}
page[property] = value;
}
function getProperty(page, property) {
for (let index of propertyIndex[property]) {
if (page[index] !== void 0)
return page[index];
}
}
// src/services/obsidianApi.ts
var dv;
var ObsidianAPI = class extends import_obsidian2.Component {
constructor(settings, setSetting, app) {
super();
this.getSetting = (setting) => this.settings[setting];
this.createNewTask = (newTask, selectedHeading, dailyNoteInfo2) => {
if (!selectedHeading || selectedHeading.startsWith("Daily")) {
const date = !newTask.scheduled ? DateTime.now().toISODate() : DateTime.fromISO(newTask.scheduled).toISODate();
let path2 = parsePathFromDate(date, dailyNoteInfo2);
if (selectedHeading && selectedHeading.includes("#"))
path2 += "#" + splitHeading(selectedHeading)[1];
this.createTaskInPath(path2, newTask, getters.get("showingPastDates"));
} else {
this.createTaskInPath(
selectedHeading,
newTask,
getters.get("showingPastDates")
);
}
};
dv = (0, import_obsidian_dataview.getAPI)();
this.settings = settings;
this.setSetting = setSetting;
this.app = app;
}
playComplete() {
if (this.settings.muted)
return;
sounds.pop.currentTime = 0;
sounds.pop.play();
}
reload() {
const excludePaths = this.app.vault.getConfig("userIgnoreFilters");
if (!excludePaths)
return;
this.excludePaths = new RegExp(
excludePaths.map((x) => `^${import_lodash4.default.escapeRegExp(x)}`).join("|")
);
}
searchTasks(path, dailyNoteInfo, completed = false, dateBounds) {
const now = DateTime.now();
const customStatuses = new RegExp(
`[${(0, import_lodash4.escapeRegExp)(this.settings.customStatus.statuses)}]`
);
let taskSearch;
let pageSearch;
const testDateBounds = (task) => {
var _a;
const taskDate = (_a = task.scheduled) != null ? _a : task.completion;
if (!DateTime.isDateTime(taskDate))
return true;
const dateString = toISO(taskDate);
return completed ? dateString >= dateBounds[0] : dateString <= dateBounds[1];
};
try {
let basicSearch = dv.pages(
`"${path.replace(/"/g, '\\"')}" and (${this.settings.search || '""'})`
);
taskSearch = basicSearch["file"]["tasks"].where(
(task) => {
const tested = (this.settings.showCompleted || completed && task.completed || !completed && !task.completed) && customStatuses.test(task.status) === this.settings.customStatus.include && !(this.excludePaths && this.excludePaths.test(task.path)) && !(task.start && DateTime.isDateTime(task.start) && now < task.start) && testDateBounds(task);
return tested;
}
);
pageSearch = basicSearch.where((page) => {
const pageCompleted = getProperty(page, "completed");
return (pageCompleted === false || pageCompleted === null || (completed || this.settings.showCompleted) && pageCompleted === true) && !(this.excludePaths && this.excludePaths.test(page.file.path)) && !(page.start && DateTime.isDateTime(page.start) && now < page.start) && testDateBounds(page);
});
} catch (e) {
new import_obsidian2.Notice(
"Invalid Dataview query: " + this.settings.search + ". Please fix."
);
throw e;
}
if (this.settings.filterFunction) {
try {
const filter = eval(this.settings.filterFunction);
taskSearch = filter(taskSearch);
} catch (err) {
console.error(err);
new import_obsidian2.Notice(
"Time Ruler: Error in custom search filter function (check console); fix in settings."
);
throw err;
}
}
if (this.settings.taskSearch) {
taskSearch = taskSearch.filter(
(item) => item.text.contains(this.settings.taskSearch)
);
}
const processedTasks = pageSearch.map((page) => pageToTask(page, this.settings.fieldFormat)).concat(
taskSearch.map(
(task) => textToTask(task, dailyNoteInfo, this.settings.fieldFormat)
)
).array();
const tasksDict = import_lodash4.default.fromPairs(processedTasks.map((task) => [task.id, task]));
for (let task of processedTasks) {
if (task.page)
continue;
if (!task.children)
continue;
for (let child of task.children) {
if (!tasksDict[child])
continue;
tasksDict[child].parent = task.id;
}
}
for (let task of processedTasks) {
if (!task.page)
continue;
task.children = [];
for (let child of processedTasks.filter(
(child2) => child2.id !== task.id && parseFileFromPath(task.path) === parseFileFromPath(child2.path) && !child2.parent
)) {
child.parent = task.id;
task.children.push(child.id);
}
}
return processedTasks;
}
forgetTasks(path2) {
const newTasks = { ...getters.get("tasks") };
for (let [title, task] of Object.entries(newTasks).filter(
([title2, task2]) => task2.path.includes(path2)
)) {
delete newTasks[title];
}
setters.set({ tasks: newTasks });
}
loadTasks(path2, completed2) {
if (!dv.index.initialized) {
return;
}
const dailyNoteInfo2 = getters.get("dailyNoteInfo");
const searchWithinWeeks = getters.get("searchWithinWeeks");
const showingPastDates = getters.get("showingPastDates");
const dateBounds2 = showingPastDates ? [
DateTime.now().minus({ weeks: searchWithinWeeks[1] }).toISODate(),
DateTime.now().plus({ days: 1 }).toISODate()
] : [
DateTime.now().minus({ days: 1 }).toISODate(),
DateTime.now().plus({ weeks: searchWithinWeeks[1] }).toISODate()
];
const tasks = this.searchTasks(path2, dailyNoteInfo2, completed2, dateBounds2);
this.updateTasks([...tasks], path2, completed2);
}
updateTasks(processedTasks2, path2, completed2) {
const updatedTasks = {
...getters.get("tasks")
};
const newFiles = import_lodash4.default.uniq(
processedTasks2.map((task) => parseFileFromPath(task.path))
).filter((heading) => !this.settings.fileOrder.includes(heading)).sort();
if (newFiles.length > 0) {
const newHeadingOrder = [...this.settings.fileOrder];
for (let heading of newFiles) {
const afterFile = newHeadingOrder.findIndex(
(otherHeading) => otherHeading > heading
);
if (afterFile === -1)
newHeadingOrder.push(heading);
else
newHeadingOrder.splice(afterFile, 0, heading);
}
this.setSetting({
fileOrder: newHeadingOrder
});
}
let updated = false;
const updatedIds = processedTasks2.map((task) => task.id);
const pathName = path2.replace(".md", "");
const showCompleted = getters.get("settings").showCompleted;
for (let { id } of Object.values(updatedTasks).filter(
(task) => task.id.startsWith(pathName) && (showCompleted || task.completed === completed2) && !updatedIds.includes(task.id)
)) {
updated = true;
delete updatedTasks[id];
}
for (let task of processedTasks2) {
if (!import_lodash4.default.isEqual(task, updatedTasks[task.id])) {
updated = true;
updatedTasks[task.id] = task;
}
}
if (!updated)
return;
const queries = import_lodash4.default.sortBy(
import_lodash4.default.filter(
updatedTasks,
(task) => !task.completed && !!(task.query || task.links.length > 0)
),
(task) => {
var _a;
return (_a = getParentScheduled(task, updatedTasks)) != null ? _a : "99999";
}
);
const queriedIds = import_lodash4.default.groupBy(
import_lodash4.default.keys(updatedTasks),
(id) => updatedTasks[id].queryParent
);
const alreadyQueried = /* @__PURE__ */ new Set();
for (const task of queries) {
const queriedTasks = task.query ? queryTasks(task.id, task.query, updatedTasks) : [];
const queryChildren = [];
for (let queriedTask of queriedTasks) {
if (alreadyQueried.has(queriedTask.id)) {
continue;
}
alreadyQueried.add(queriedTask.id);
queryChildren.push(queriedTask.id);
if (queriedTask.queryParent === task.id)
continue;
alreadyQueried.add(queriedTask.id);
updatedTasks[queriedTask.id] = {
...updatedTasks[queriedTask.id],
queryParent: task.id
};
}
if (queriedIds[task.id]) {
const unQueriedIds = import_lodash4.default.difference(
queriedIds[task.id],
queriedTasks.map((x) => x.id)
);
for (let unQueriedId of unQueriedIds) {
updatedTasks[unQueriedId] = {
...updatedTasks[unQueriedId],
queryParent: void 0
};
}
}
updatedTasks[task.id] = {
...updatedTasks[task.id],
queryChildren
};
}
setters.set({ tasks: updatedTasks, fileOrder: this.settings.fileOrder });
}
updateFileOrder(file, before) {
const beforeIndex = this.settings.fileOrder.indexOf(before);
if (beforeIndex === -1)
throw new Error("file not in headings list");
const newFileOrder = [...this.settings.fileOrder];
import_lodash4.default.pull(newFileOrder, file);
newFileOrder.splice(beforeIndex, 0, file);
this.setSetting({ fileOrder: newFileOrder });
setters.set({ fileOrder: newFileOrder });
}
async moveTask(task, selectedHeading) {
if (task.page) {
alert("Moving pages isn't supported.");
return;
}
const file = await this.getFile(task.path);
invariant(file);
const fileText = await this.app.vault.read(file);
const lines = fileText.split("\n");
const followingLines = lines.slice(task.position.start.line + 1);
const nextLine = followingLines.findIndex((line) => !line.startsWith(" "));
const copyLines = lines.splice(
task.position.start.line,
(nextLine === -1 ? followingLines.length : nextLine) + 1
);
await this.app.vault.modify(file, lines.join("\n"));
const { filePath, position } = await this.findPosition(selectedHeading);
const moveFile = await this.getFile(filePath);
invariant(moveFile);
const copyTask = { ...task, path: filePath };
const textTask = taskToText(copyTask, this.settings.fieldFormat);
const pasteLines = [textTask].concat(copyLines.slice(1));
await this.app.vault.process(moveFile, (text) => {
const lines2 = text.split("\n");
lines2.splice(position.start.line, 0, ...pasteLines);
return lines2.join("\n");
});
openTask({ ...task, path: filePath, position });
}
async createFileFromPath(path2) {
let [fileName] = path2.split("#");
if (!fileName.endsWith(".md"))
fileName += ".md";
let file = this.app.vault.getAbstractFileByPath(fileName);
const dailyNoteInfo2 = getters.get("dailyNoteInfo");
if (!(file instanceof import_obsidian2.TFile)) {
let starterText = "";
if (parseDateFromPath(path2, dailyNoteInfo2) && dailyNoteInfo2.template) {
const templateFile = await this.getFile(
dailyNoteInfo2.template + (dailyNoteInfo2.template.endsWith(".md") ? "" : ".md")
);
if (templateFile) {
starterText = await this.app.vault.read(templateFile);
}
}
file = await this.app.vault.create(fileName, starterText);
}
if (!(file instanceof import_obsidian2.TFile)) {
new import_obsidian2.Notice(`Time Ruler: failed to create file ${fileName}`);
throw new Error(`Time Ruler: failed to create file ${fileName}`);
}
return file;
}
async findPosition(path2) {
let filePath = parseFileFromPath(path2);
let heading = path2.split("#")[1];
let position = {
start: { col: 0, line: 0, offset: 0 },
end: { col: 0, line: 0, offset: 0 }
};
const file = await this.createFileFromPath(path2);
const text = await this.app.vault.read(file);
const lines = text.split("\n");
let targetLine;
if (heading) {
targetLine = lines.findIndex(
(line) => new RegExp(`#+ ${import_lodash4.default.escapeRegExp(heading)}$`).test(line)
) + 1;
if (this.settings.addTaskToEnd) {
targetLine = lines.findIndex(
(line, i) => i > targetLine && /^#+ /.test(line)
);
if (targetLine === -1)
targetLine = lines.length;
else {
while (/^\s*$/.test(lines[targetLine - 1]) && targetLine > 1)
targetLine--;
}
}
position.start.line = targetLine;
position.end.line = targetLine;
} else {
let i = 0;
while (lines[i] !== void 0 && lines[i] === "") {
i++;
}
if (this.settings.addTaskToEnd) {
const firstHeading = lines.findIndex((line) => /^#+ /.test(line));
if (firstHeading === -1)
targetLine = lines.length;
else
targetLine = firstHeading;
} else if (lines[i] === "---" && lines.find((line) => line === "---", i + 1)) {
targetLine = lines.indexOf("---", i + 1) + 1;
} else
targetLine = 0;
position = {
start: { col: 0, line: targetLine, offset: 0 },
end: { col: 0, line: targetLine, offset: 0 }
};
}
return { position, filePath };
}
async createTaskInPath(path2, dropData, completed2 = false) {
const { position, filePath: fileName } = await this.findPosition(path2);
const defaultTask = {
page: false,
children: [],
title: "",
originalTitle: "",
originalText: "",
tags: [],
priority: 3 /* DEFAULT */,
id: "",
type: "task",
path: fileName,
position,
status: " ",
fieldFormat: this.settings.fieldFormat,
completed: completed2,
links: [],
...dropData
};
await this.saveTask(defaultTask, true);
openTask(defaultTask);
setters.set({ newTask: void 0 });
}
async getFile(path2) {
let abstractFile = this.app.vault.getAbstractFileByPath(
parseFileFromPath(path2)
);
if (!abstractFile || !(abstractFile instanceof import_obsidian2.TFile)) {
await this.app.vault.create(parseFileFromPath(path2), "");
abstractFile = this.app.vault.getAbstractFileByPath(
parseFileFromPath(path2)
);
}
if (abstractFile && abstractFile instanceof import_obsidian2.TFile)
return abstractFile;
else
return void 0;
}
async deleteTasks(ids2) {
const tasks = getters.get("tasks");
const deletedTaskGroups = ids2.map((id) => tasks[id]);
const files = import_lodash4.default.groupBy(
deletedTaskGroups,
(task) => parseFileFromPath(task.path)
);
const updatedTasks = {};
for (let [filePath, deletedTasks] of import_lodash4.default.entries(files)) {
const file = await this.getFile(filePath);
invariant(file);
const fileText = await this.app.vault.read(file);
const lines = fileText.split("\n");
for (let task of import_lodash4.default.sortBy(
deletedTasks,
(task2) => task2.position.start.line * -1
)) {
lines.splice(
task.position.start.line,
task.position.end.line + 1 - task.position.start.line
);
if (task.query) {
for (let queriedTask of import_lodash4.default.filter(
getters.get("tasks"),
(queriedTask2) => queriedTask2.queryParent === task.id
)) {
updatedTasks[queriedTask.id] = import_lodash4.default.omit(queriedTask, "queryParent");
}
}
}
await this.app.vault.modify(file, lines.join("\n"));
}
setters.set(updatedTasks);
}
async saveTask(task, newTask) {
var _a, _b, _c;
const file = await this.getFile(task.path);
if (!file)
return;
if (task.page) {
this.app.fileManager.processFrontMatter(file, (frontmatter) => {
taskToPage(task, frontmatter);
});
} else {
const fileText = await this.app.vault.read(file);
const lines = fileText.split("\n");
let thisLine = (_a = lines[task.position.start.line]) != null ? _a : "";
const newText = ((_c = (_b = thisLine.match(/^\s*/)) == null ? void 0 : _b[0]) != null ? _c : "") + taskToText(task, this.settings.fieldFormat);
if (newTask) {
lines.splice(task.position.start.line, 0, newText);
} else {
lines[task.position.start.line] = newText;
}
await this.app.vault.modify(file, lines.join("\n"));
}
}
async onload() {
this.registerEvent(
// @ts-ignore
this.app.workspace.on("layout-change", (cb) => {
setters.set({ recreateWindow: getters.get("recreateWindow") + 1 });
})
);
this.registerEvent(
// @ts-ignore
this.app.workspace.on("resize", (cb) => {
setters.set({ recreateWindow: getters.get("recreateWindow") + 1 });
})
);
this.registerEvent(
this.app.metadataCache.on(
// @ts-ignore
"dataview:metadata-change",
(...args) => {
switch (args[0]) {
case "update":
this.loadTasks(args[1].path, getters.get("showingPastDates"));
break;
case "rename":
this.forgetTasks(args[2]);
this.loadTasks(args[1].path, getters.get("showingPastDates"));
break;
}
}
)
);
}
};
async function getDailyNoteInfo() {
try {
let { folder, format, template } = await this.app.vault.readConfigJson("daily-notes").catch(() => {
return { folder: void 0, format: void 0 };
});
if (!folder)
folder = "/";
if (!folder.endsWith("/"))
folder += "/";
if (!format)
format = "YYYY-MM-DD";
if (!template)
template = "";
return {
format,
folder,
template
};
} catch (err) {
console.warn(err);
return {
format: "YYYY-MM-DD",
folder: "/",
template: ""
};
}
}
async function openTask(task) {
await this.app.workspace.openLinkText(parseFileFromPath(task.path), "");
const mdView = this.app.workspace.getActiveViewOfType(import_obsidian2.MarkdownView);
if (!mdView)
return;
let cmEditor = mdView.editor;
cmEditor.setSelection(
{
line: task.position.end.line,
ch: task.position.end.col
},
{
line: task.position.end.line,
ch: task.position.end.col
}
);
cmEditor.focus();
if (import_obsidian2.Platform.isMobile) {
getters.getApp()["mobileNavbar"].show();
}
}
function openTaskInRuler(id) {
const task = getters.getTask(id);
if (!task) {
new import_obsidian2.Notice("Task not loaded in Time Ruler");
return;
}
const scheduled = getParentScheduled(task, getters.get("tasks"));
if (scheduled) {
const showingPastDates = getters.get("showingPastDates");
const searchWithinWeeks = getters.get("searchWithinWeeks");
const weeksAhead = Math.ceil(
DateTime.now().diff(DateTime.fromISO(scheduled)).as("weeks")
);
if (showingPastDates || weeksAhead > searchWithinWeeks[1]) {
}
setters.set({
showingPastDates: task.completed,
searchWithinWeeks: [
searchWithinWeeks[0],
import_lodash4.default.max([weeksAhead, searchWithinWeeks[1]])
]
});
}
setTimeout(async () => {
const now3 = toISO(DateTime.now());
const showingPastDates = getters.get("showingPastDates");
let section = !scheduled ? "unscheduled" : scheduled < now3 && scheduled !== now3.slice(0, 10) && !showingPastDates ? "now" : scheduled.slice(0, 10);
await scrollToSection(section);
let tries = 0;
const findTask = () => {
tries++;
if (tries > 10) {
throw new Error(`Task not found: ${id} in section ${section}`);
}
const foundTask = document.querySelector(`[data-id="${id}"]`);
if (!foundTask) {
setTimeout(findTask, 250);
return;
}
foundTask.scrollIntoView({
inline: "center",
block: "center",
behavior: "smooth"
});
foundTask.addClass("!bg-accent");
setTimeout(() => foundTask.removeClass("!bg-accent"), 1500);
setTimeout(() => setters.set({ findingTask: null }));
};
findTask();
});
}
// src/components/Task.tsx
var import_react9 = __toESM(require_react());
var import_jsx_runtime3 = __toESM(require_jsx_runtime());
function Task({
dragContainer,
startISO,
subtasks,
renderType,
dragging,
...task
}) {
var _a, _b, _c, _d, _e, _f, _g;
const completeTask = () => {
setters.patchTasks([task.id], {
completion: toISO(roundMinutes(DateTime.now()), true),
completed: true
});
};
subtasks = useAppStore((state) => {
var _a2;
const taskDate = parseTaskDate2(task, state.tasks);
let newSubtasks = import_lodash5.default.flatMap(
subtasks != null ? subtasks : task.children.concat((_a2 = task.queryChildren) != null ? _a2 : []).map((id) => state.tasks[id]),
(subtask) => {
if (!subtask)
return [];
if (!subtask.scheduled && !subtask.due && !state.settings.scheduledSubtasks)
return [];
if (subtask.due && !task.scheduled)
return [];
if (!nestedScheduled(taskDate, parseTaskDate2(subtask, state.tasks))) {
return [];
}
if (subtask.completed !== state.showingPastDates)
return [];
return subtask;
}
);
if (!state.settings.scheduledSubtasks && task.scheduled)
newSubtasks = newSubtasks.filter((task2) => task2.scheduled);
return newSubtasks;
});
const dragData = {
dragType: "task",
renderType,
dragContainer,
...task
};
const {
setNodeRef,
attributes,
listeners,
transform,
isDragging,
node,
activatorEvent
} = useDraggable({
id: `${task.id}::${renderType}::${dragContainer}`,
data: dragData
});
let dragOffsetRef = (0, import_react9.useRef)(0);
(0, import_react9.useEffect)(() => {
if (!isDragging || !activatorEvent)
return;
const target = activatorEvent.target;
let taskElement = target;
while (taskElement && !taskElement.hasAttribute("data-task") && taskElement.parentElement) {
taskElement = taskElement.parentElement;
}
if (taskElement && taskElement.hasAttribute("data-task")) {
const rect = taskElement.getBoundingClientRect();
if (activatorEvent instanceof MouseEvent) {
const dragOffset = rect.right - activatorEvent.clientX;
if (dragOffset !== dragOffsetRef.current) {
dragOffsetRef.current = dragOffset;
setters.set({
dragOffset
});
}
} else if (activatorEvent instanceof TouchEvent) {
const dragOffset = rect.right - activatorEvent.touches[0].clientX;
if (dragOffset !== dragOffsetRef.current) {
dragOffsetRef.current = dragOffset;
setters.set({
dragOffset
});
}
}
}
}, [isDragging]);
const isLink = renderType && ["parent", "deadline"].includes(renderType);
const isCalendar = useAppStore((state) => state.settings.viewMode === "week");
const smallText = isLink || isCalendar;
if (!startISO)
startISO = task.scheduled;
const collapsed = useAppStore((state) => {
var _a2;
return (_a2 = state.collapsed[task.id]) != null ? _a2 : false;
});
const lengthDragData = {
dragType: "task-length",
id: task.id,
start: (_a = task == null ? void 0 : task.scheduled) != null ? _a : "",
end: (_b = task == null ? void 0 : task.scheduled) != null ? _b : ""
};
const {
setNodeRef: setLengthNodeRef,
attributes: lengthAttributes,
listeners: lengthListeners
} = useDraggable({
id: `${task.id}::${renderType}::length::${dragContainer}`,
data: lengthDragData
});
const deadlineDragData = {
dragType: "due",
task
};
const {
setNodeRef: setDeadlineNodeRef,
attributes: deadlineAttributes,
listeners: deadlineListeners
} = useDraggable({
id: `${task.id}::${renderType}::deadline::${dragContainer}`,
data: deadlineDragData
});
const dailyNoteInfo2 = useAppStore((state) => state.dailyNoteInfo);
const groupBy = useAppStore((state) => state.settings.groupBy);
if (!task)
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {});
const childWidth = useAppStore((state) => state.childWidth);
const [isWide, setIsWide] = (0, import_react9.useState)(false);
(0, import_react9.useEffect)(() => {
const tR = document.getElementById("#time-ruler");
if (!tR)
return;
const width = tR.clientWidth / childWidth;
if (width > 400 && !isWide)
setIsWide(true);
else if (width < 400 && isWide)
setIsWide(false);
}, [childWidth, isWide]);
const showingPastDates = useAppStore((state) => state.showingPastDates);
const today = getToday();
const now3 = DateTime.now().toISO();
const hasLengthDrag = task.scheduled && !isDateISO(task.scheduled) && !(showingPastDates ? task.scheduled > today : task.scheduled < now3);
const computedStyle = getComputedStyle(document.body);
const lineHeightNormal = computedStyle.getPropertyValue("--line-height-normal").trim();
const taskTitle = () => {
const title = task.title || "";
const regex = /\[\[(.*?)\]\]/g;
if (!regex.test(title)) {
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: title });
}
regex.lastIndex = 0;
const parts = [];
let lastIndex = 0;
let match2 = null;
while ((match2 = regex.exec(title)) !== null) {
if (match2.index > lastIndex) {
parts.push(
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: title.substring(lastIndex, match2.index) }, match2.index)
);
}
const linkText = match2[1];
parts.push(
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"span",
{
className: "text-accent",
onClick: (ev) => {
ev.stopPropagation();
getters.get("apis").obsidian.app.workspace.openLinkText(linkText, task.path);
},
children: linkText
},
match2.index + "-link"
)
);
lastIndex = regex.lastIndex;
}
if (lastIndex < title.length) {
parts.push(/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: title.substring(lastIndex) }, lastIndex));
}
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, { children: parts });
};
const isMobile = (0, import_react9.useMemo)(() => getters.getObsidianAPI().app.isMobile, []);
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"div",
{
className: `relative rounded-icon transition-colors duration-300 w-full min-h-line`,
"data-id": isLink ? "" : task.id,
"data-task": task.status === " " ? "" : task.status,
children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"div",
{
className: `pt-0.5 selectable group flex items-start rounded-icon pr-2 font-sans overflow-hidden ${smallText ? "text-sm" : ""}`,
ref: setNodeRef,
children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "flex h-line w-indent flex-none items-center justify-center", children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
Button_default,
{
onPointerDown: () => false,
onClick: () => completeTask(),
className: `task-list-item-checkbox selectable flex flex-none items-center justify-center rounded-checkbox border border-solid border-faint p-0 text-xs shadow-none hover:border-normal cursor-pointer ${isLink ? "h-2 w-2" : isMobile ? "h-5 w-5" : "h-4 w-4"} ${task.completed ? "bg-faint" : "bg-transparent"}`,
"data-task": task.status === " " ? "" : task.status,
children: task.status === "x" ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_jsx_runtime3.Fragment, {}) : task.status
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"div",
{
className: "flex w-full h-full cursor-grab",
...attributes,
...listeners,
children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `flex w-full h-full`, children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full mr-4", children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
style: { maxHeight: `calc( ${lineHeightNormal}em * 2 )` },
className: `w-fit max-w-full cursor-pointer overflow-hidden text-ellipsis ${((_c = task.title) == null ? void 0 : _c.split(" ").find((x) => x.length > 20)) ? "break-all" : "break-words"} leading-line whitespace-normal ${[0 /* HIGHEST */].includes(task.priority) ? "text-accent" : renderType === "deadline" ? "" : task.priority === 4 /* LOW */ || isLink || task.status === "x" || !task.title ? "text-faint" : ""}`,
onMouseDown: () => {
openTask(task);
return false;
},
onClick: () => false,
onMouseUp: () => false,
children: taskTitle()
}
),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: "h-full w-0 grow",
...attributes,
...listeners
}
)
] }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
"div",
{
className: `h-line w-fit items-center space-x-1 font-menu child:my-1 justify-end flex`,
...attributes,
...listeners,
children: [
task.priority !== 3 /* DEFAULT */ && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "task-priority whitespace-nowrap rounded-full px-1 font-menu text-xs font-bold text-accent", children: priorityNumberToSimplePriority[task.priority] }),
!task.completed && task.reminder && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "task-reminder ml-2 flex items-center whitespace-nowrap font-menu text-xs text-normal", children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Logo, { src: "alarm-clock", className: "mr-1" }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: `${DateTime.fromISO(
task.reminder.slice(0, 10)
).toFormat("M/d")}${task.reminder.slice(10)}` })
] })
]
}
)
] }),
!dragging && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex h-full", children: [
hasLengthDrag && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: `mt-1 task-duration cursor-ns-resize whitespace-nowrap font-menu text-xs text-accent group-hover:bg-selection group-hover:rounded-full group-hover:px-2 ${!task.duration ? "hidden group-hover:block" : ""}`,
ref: setLengthNodeRef,
...lengthAttributes,
...lengthListeners,
children: !task.duration ? "length" : `${((_d = task.duration) == null ? void 0 : _d.hour) ? `${(_e = task.duration) == null ? void 0 : _e.hour}h` : ""}${((_f = task.duration) == null ? void 0 : _f.minute) ? `${(_g = task.duration) == null ? void 0 : _g.minute}m` : ""}`
}
),
!task.completed && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
ref: setDeadlineNodeRef,
...deadlineAttributes,
...deadlineListeners,
className: `mt-1 task-due ml-2 cursor-grab whitespace-nowrap font-menu text-xs text-accent hover:underline group-hover:bg-selection group-hover:rounded-full group-hover:px-2 ${!task.due ? "hidden group-hover:block" : ""}`,
children: !task.due ? "due" : `${Math.ceil(
DateTime.fromISO(task.due).diff(
DateTime.fromISO(
startISO != null ? startISO : (/* @__PURE__ */ new Date()).toISOString().slice(0, 10)
)
).shiftTo("days").days
)}d`
}
)
] }),
!task.completed && task.reminder && !dragging && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "task-reminder ml-2 flex items-center whitespace-nowrap font-menu text-xs text-normal", children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Logo, { src: "alarm-clock", className: "mr-1" }),
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { children: `${DateTime.fromISO(task.reminder.slice(0, 10)).toFormat(
"M/d"
)}${task.reminder.slice(10)}` })
] })
]
}
)
]
}
),
task.tags.length > 0 && groupBy !== "tags" && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "no-scrollbar flex space-x-2 overflow-x-auto pl-indent text-xs child:whitespace-nowrap", children: task.tags.map((tag) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: "cm-hashtag cm-hashtag-end cm-hashtag-begin !h-fit !text-xs",
children: tag.replace("#", "")
},
tag
)) }),
!isLink && task.notes && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "task-description break-words pl-indent pr-2 text-xs text-faint", children: task.notes }),
subtasks && subtasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "flex w-full overflow-hidden", children: [
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: `min-w-[20px] grow min-h-[12px] flex items-center justify-end ${collapsed ? "pl-indent pr-2" : "pl-[8px] py-2"}`,
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: "h-full w-full transition-colors duration-200 hover:bg-selection rounded-icon flex items-center justify-center cursor-pointer",
onClick: () => setters.patchCollapsed([task.id], !collapsed),
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
"div",
{
className: `${collapsed ? "h-0 w-full border-t" : "w-0 h-full border-l"} border-0 border-solid border-faint opacity-50`
}
)
}
)
}
),
!collapsed && subtasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
Block,
{
dragContainer: `${dragContainer}::${task.id}`,
hidePaths: [getHeading2(task, dailyNoteInfo2, groupBy), task.path],
startISO,
tasks: subtasks,
events: [],
type: "child",
parentId: task.id,
blocks: []
}
)
] })
]
}
);
}
// src/components/Group.tsx
var import_jsx_runtime4 = __toESM(require_jsx_runtime());
var UNGROUPED = "__ungrouped";
function Group({
headingPath,
tasks,
type,
hidePaths,
dragContainer,
startISO
}) {
var _a;
const dragData = {
dragType: "group",
tasks,
type,
headingPath,
hidePaths,
dragContainer
};
const { setNodeRef, attributes, listeners, setActivatorNodeRef } = useDraggable({
id: `${headingPath}::${dragContainer}::${type}`,
data: dragData
});
const [myContainer, heading] = splitHeading(headingPath);
let formattedContainer = myContainer.slice(
myContainer.includes("/") ? myContainer.lastIndexOf("/") + 1 : 0
);
if (formattedContainer.length > 25)
formattedContainer = formattedContainer.slice(0, 25) + "...";
formattedContainer = formattedContainer.replace(".md", "");
const collapsed = useAppStore(
(state) => {
var _a2;
return (_a2 = state.collapsed[headingPath]) != null ? _a2 : false;
}
);
const dragging = useAppStore(
(state) => state.dragData && state.dragData.dragType === "group" && !import_lodash6.default.keys(simplePriorityToNumber).includes(heading) && parseFileFromPath(state.dragData.headingPath) !== parseFileFromPath(headingPath)
);
const groupBySetting = useAppStore((state) => state.settings.groupBy);
const groupedTasks = import_lodash6.default.groupBy(tasks, (task) => {
if (type === "upcoming")
return UNGROUPED;
return getSubHeading(task, groupBySetting, hidePaths);
});
const sortedTasks = import_lodash6.default.sortBy(Object.entries(groupedTasks), 0).map(
([heading2, tasks2]) => [
heading2,
type === "upcoming" ? import_lodash6.default.sortBy(tasks2, "due", "priority") : import_lodash6.default.sortBy(
tasks2,
"path",
"position.start.line"
// 'priority',
// (task) => (task.due ? `0::${task.due}` : '1')
)
]
);
const isPriority = import_lodash6.default.keys(simplePriorityToNumber).includes(heading);
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
"div",
{
ref: !isPriority ? setNodeRef : void 0,
className: `w-full overflow-hidden time-ruler-group`,
"data-id": `${headingPath}::${dragContainer}::${type}`,
children: [
headingPath && headingPath !== UNGROUPED && !hidePaths.includes(headingPath) && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
dragging ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Droppable,
{
data: {
type: "heading",
heading: headingPath
},
id: `${dragContainer}::${headingPath}::droppable`,
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-2 w-full rounded-icon" })
}
) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "h-2 w-full rounded-icon" }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
"div",
{
className: `selectable flex rounded-icon font-menu text-xs group w-full`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-indent flex-none px-1", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Button_default,
{
className: "group-hover:opacity-100 opacity-0 transition-opacity duration-200 h-4 py-0.5 flex-none cursor-pointer",
src: collapsed ? "chevron-right" : "chevron-down",
onClick: () => {
setters.patchCollapsed([headingPath], !collapsed);
return false;
},
onPointerDown: () => false
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
"div",
{
className: `w-full flex items-center ${!isPriority ? "cursor-grab" : ""}`,
...!isPriority ? { ...attributes, ...listeners, ref: setActivatorNodeRef } : void 0,
children: [
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
"div",
{
className: `w-fit flex-none max-w-[50%] text-normal truncate`,
children: heading
}
),
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("hr", { className: "border-t border-t-faint opacity-50 mx-2 h-0 my-0 w-full" }),
myContainer && !hidePaths.includes(myContainer) && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "w-fit flex-none text-right pr-2", children: formattedContainer })
]
}
)
]
}
)
] }),
!collapsed && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
(_a = sortedTasks.find(([heading2]) => heading2 === UNGROUPED)) == null ? void 0 : _a[1].map((task) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Task,
{
dragContainer,
startISO,
...task
},
task.path + task.id
)),
sortedTasks.filter(([heading2]) => heading2 !== UNGROUPED).map(([heading2, tasks2]) => {
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
Group,
{
headingPath: heading2,
dragContainer,
hidePaths: [...hidePaths, headingPath],
tasks: tasks2,
type
},
heading2
);
})
] })
]
}
);
}
// src/components/Hours.tsx
var import_react11 = __toESM(require_react());
// src/components/Minutes.tsx
var import_react10 = __toESM(require_react());
var import_jsx_runtime5 = __toESM(require_jsx_runtime());
function Minutes({
startISO,
endISO,
chopEnd,
chopStart,
dragContainer
}) {
const dayEnd = useAppStore((state) => state.settings.dayStartEnd[1]);
const times = [];
const givenStart = DateTime.fromISO(startISO);
const givenEnd = DateTime.fromISO(endISO);
const type = useAppStore(
(state) => state.settings.viewMode === "week" ? "hours" : "minutes"
);
let start = roundMinutes(givenStart);
let end = roundMinutes(givenEnd);
let dayEndTime = start.set({ hour: dayEnd });
if (dayEnd < 12 && start.get("hour") >= dayEnd)
dayEndTime = dayEndTime.plus({ days: 1 });
const now3 = roundMinutes(DateTime.now());
end = DateTime.min(end, dayEndTime);
const modifier = {
minutes: { minutes: 15 },
hours: { hours: 1 }
};
if (chopStart && !(start <= now3 && end > now3))
start = start.plus(modifier[type]);
if (chopEnd)
end = end.minus(modifier[type]);
while (start <= end) {
times.push(start.plus({}));
start = start.plus(
type === "minutes" ? { minute: 15 } : type === "hours" ? { hour: 1 } : { day: 1 }
);
}
const startISOs = times.map((time) => toISO(time));
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: times.map((time, i) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Time, { ...{ type, time, dragContainer } }, startISOs[i])) });
}
function Time({ time, type, dragContainer }) {
const minutes = time.minute;
const hours = time.hour;
const iso = toISO(time);
const { isOver, setNodeRef } = useDroppable({
id: dragContainer + "::" + iso + "::scheduled",
data: { scheduled: iso }
});
const dragData = {
dragType: "time",
start: iso
};
const {
setNodeRef: setDragNodeRef,
attributes,
listeners
} = useDraggable({
id: `${time}::time::${dragContainer}`,
data: dragData
});
const isDraggingTime = useAppStore(
(state) => {
var _a;
return isLengthType((_a = state.dragData) == null ? void 0 : _a.dragType);
}
);
(0, import_react10.useEffect)(() => {
if (isDraggingTime && isOver) {
setters.set({
dragData: { ...getters.get("dragData"), end: iso }
});
}
}, [isOver, isDraggingTime]);
const selectedClassName = useAppStore((state) => {
var _a;
if (!state.dragData || !isLengthType((_a = state.dragData) == null ? void 0 : _a.dragType) || !state.dragData["end"])
return "";
return `${state.dragData["start"] <= iso && state.dragData["end"] >= iso ? "border-0 border-l-2 border-solid border-l-accent" : ""}`;
});
const hourDisplay = useHourDisplay(hours);
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
"div",
{
className: `flex h-[16px] items-center justify-end relative`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
"div",
{
className: `flex text-sm absolute right-12 h-4 items-center bg-selection rounded-icon px-2 text-accent !z-50 justify-center ${isOver ? "block" : "hidden"}`,
children: [
hours,
":",
String(minutes).padStart(2, "0")
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
"div",
{
className: `w-10 h-full flex flex-none items-center justify-end ${selectedClassName}`,
...attributes,
...listeners,
ref: (node) => {
setNodeRef(node);
setDragNodeRef(node);
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"hr",
{
className: `my-0 border-0 border-t hover:border-accent border-faint ${type === "hours" ? hours % 6 === 0 ? "w-6" : hours % 3 === 0 ? "w-4" : "w-1" : minutes === 0 ? hours % 3 === 0 ? "w-6" : "w-4" : minutes % 30 === 0 ? "w-2" : "w-1"}`
}
),
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
"div",
{
className: `ml-1 h-full flex-none font-menu text-xs w-4 hover:text-accent text-muted`,
children: type === "minutes" && minutes === 0 || type === "hours" && hours % 3 === 0 ? hourDisplay : ""
}
)
]
}
)
]
},
iso
);
}
// src/components/Hours.tsx
var import_jsx_runtime6 = __toESM(require_jsx_runtime());
function Hours({
startISO,
endISO,
blocks,
chopStart = false,
dragContainer = "",
noExtension = false
}) {
var _a, _b, _c, _d, _e, _f;
const formattedBlocks = [];
const extendBlocks = useAppStore((state) => state.settings.extendBlocks);
for (let i = 0; i < blocks.length; i++) {
let nestedBlocks = [];
const thisBlock = blocks[i];
const thisEndISO = getEndISO(thisBlock);
while (blocks[i + 1] && blocks[i + 1].startISO < thisEndISO) {
nestedBlocks.push(blocks[i + 1]);
i++;
}
formattedBlocks.push({
...thisBlock,
endISO: extendBlocks && thisEndISO === thisBlock.startISO ? (_b = (_a = blocks[i + 1]) == null ? void 0 : _a.startISO) != null ? _b : endISO : thisEndISO,
blocks: nestedBlocks
});
}
const hideTimes = useAppStore(
(state) => state.settings.hideTimes || state.settings.viewMode === "week"
);
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: `pb-1 relative ${hideTimes ? "space-y-1" : ""}`, children: [
!hideTimes && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
Minutes,
{
dragContainer: dragContainer + "::" + startISO,
startISO,
endISO: (_d = (_c = formattedBlocks[0]) == null ? void 0 : _c.startISO) != null ? _d : endISO,
chopEnd: true,
chopStart: chopStart || startISO === ((_f = (_e = formattedBlocks[0]) == null ? void 0 : _e.startISO) != null ? _f : endISO)
}
),
formattedBlocks.map(
({
startISO: blockStartISO,
endISO: blockEndISO,
tasks,
events: events2,
blocks: blocks2
}, i) => {
var _a2, _b2, _c2;
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react11.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
Block,
{
startISO: blockStartISO,
endISO: blockEndISO,
tasks,
events: events2,
blocks: blocks2,
dragContainer: dragContainer + "::" + blockStartISO,
type: "event"
}
),
!hideTimes && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
Minutes,
{
dragContainer: dragContainer + "::" + blockStartISO,
startISO: blockEndISO,
endISO: (_c2 = (_b2 = formattedBlocks[i + 1]) == null ? void 0 : _b2.startISO) != null ? _c2 : endISO,
chopEnd: true,
chopStart: blockStartISO === blockEndISO
}
)
] }, `${blockStartISO}::${(_a2 = events2[0]) == null ? void 0 : _a2.id}`);
}
)
] });
}
// src/components/Unscheduled.tsx
var import_lodash7 = __toESM(require_lodash());
var import_react12 = __toESM(require_react());
var import_jsx_runtime7 = __toESM(require_jsx_runtime());
var Unscheduled = (0, import_react12.memo)(_Unscheduled, () => true);
var Unscheduled_default = Unscheduled;
var COLLAPSE_UNSCHEDULED = "tr-collapse-unscheduled";
function _Unscheduled() {
const showCompleted = useAppStore((state) => state.settings.showCompleted);
const showingPastDates = useAppStore((state) => state.showingPastDates);
const tasks = useAppStore(
(state) => import_lodash7.default.filter(
state.tasks,
(task) => (showCompleted || (showingPastDates ? task.completed : !task.completed)) && !task.parent && !task.queryParent && !parseTaskDate2(task, state.tasks) && !task.due
)
);
const childWidth = useAppStore(
(state) => (state.settings.viewMode === "week" || state.settings.viewMode === "hour") && state.childWidth > 1 ? state.childWidth : 1
);
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: `h-0 grow flex flex-col w-full`, children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "flex items-center space-x-1 group flex-none", children: [
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"div",
{
className: "w-indent flex-none pr-1",
id: COLLAPSE_UNSCHEDULED
}
),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Droppable, { id: "unscheduled-timespan", data: { scheduled: "" }, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "font-menu", children: "Unscheduled" }) })
] }),
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
"div",
{
className: `h-0 grow w-full flex-none mt-1 rounded-icon unscheduled child:h-full child:child:h-full ${[
"",
"child:child:child:child:w-full",
"child:child:child:child:w-1/2",
"child:child:child:child:w-1/3",
"child:child:child:child:w-1/4"
][childWidth]}`,
"data-auto-scroll": "x",
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
Block,
{
startISO: void 0,
blocks: [],
events: [],
type: "unscheduled",
dragContainer: "unscheduled",
tasks
}
)
}
)
] });
}
// src/components/Block.tsx
var import_jsx_runtime8 = __toESM(require_jsx_runtime());
var UNGROUPED2 = "__ungrouped";
function Block({
hidePaths = [],
tasks,
type,
id,
dragContainer,
startISO,
endISO,
parentId,
events: events2,
dragging,
blocks,
title
}) {
var _a, _b, _c, _d;
let showingTasks = useAppStore((state) => {
const children = import_lodash8.default.flatMap(tasks, (task) => getChildren(task, state.tasks));
return tasks.filter((task) => !children.includes(task.id));
}, shallow$1);
const topLevel = import_lodash8.default.sortBy(showingTasks, "id");
const groupedTasks = useAppStore((state) => {
return import_lodash8.default.groupBy(
topLevel,
(task) => getHeading2(
task,
state.dailyNoteInfo,
type === "upcoming" ? false : state.settings.groupBy,
hidePaths
)
);
});
const sortedGroups = useAppStore((state) => {
switch (state.settings.groupBy) {
case false:
return import_lodash8.default.entries(groupedTasks);
default:
return import_lodash8.default.sortBy(
import_lodash8.default.entries(groupedTasks),
([group]) => group === UNGROUPED2 ? 0 : 1,
"1.0.priority",
([group, _tasks]) => {
return state.fileOrder.indexOf(parseFileFromPath(group));
},
"1.0.position.start.line"
);
}
}, shallow$1);
const dragData = {
dragType: "block",
hidePaths,
tasks: showingTasks,
type,
id,
dragContainer,
startISO,
endISO,
blocks: [],
parentId,
events: events2
};
const { setNodeRef, attributes, listeners, setActivatorNodeRef } = useDraggable({
id: `${id}::${startISO}::${type}::${dragContainer}`,
data: dragData
});
const twentyFourHourFormat = useAppStore(
(state) => state.settings.twentyFourHourFormat
);
const formatStart = (date) => {
const isDate2 = isDateISO(date);
return isDate2 ? "all day" : DateTime.fromISO(date).toFormat(twentyFourHourFormat ? "T" : "t");
};
const hideTimes = useAppStore(
(state) => state.settings.hideTimes || state.settings.viewMode === "week"
);
const draggable = tasks.length > 0;
const showingPastDates = useAppStore((state) => state.showingPastDates);
const firstEndISO = ((_a = blocks[0]) == null ? void 0 : _a.startISO) || endISO;
const firstStartISO = showingPastDates || !startISO ? startISO : import_lodash8.default.max([startISO, toISO(roundMinutes(DateTime.now()))]);
const [unscheduledPortal, setUnscheduledPortal] = (0, import_react13.useState)(null);
(0, import_react13.useEffect)(() => {
if (type === "unscheduled") {
setUnscheduledPortal(
document.getElementById(COLLAPSE_UNSCHEDULED)
);
}
}, []);
const collapsed = useAppStore((state) => {
if (sortedGroups.length === 0)
return false;
for (let heading of sortedGroups) {
if (!state.collapsed[heading[0]])
return false;
}
return true;
});
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
type === "unscheduled" && unscheduledPortal && (0, import_react_dom2.createPortal)(
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
Button_default,
{
className: "flex-none w-full opacity-0 group-hover:opacity-100 transition-opacity duration-300",
src: collapsed ? "chevron-right" : "chevron-down",
onClick: () => {
setters.patchCollapsed(import_lodash8.default.map(sortedGroups, 0), !collapsed);
return false;
}
}
),
unscheduledPortal
),
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
"div",
{
id,
"data-role": "block",
className: `relative w-full rounded-icon ${type !== "child" ? "bg-code pb-2" : ""} ${type === "event" ? "mt-1" : ""}`,
ref: draggable ? setNodeRef : void 0,
children: [
!["child", "unscheduled"].includes(type) && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
Droppable,
{
data: { scheduled: startISO != null ? startISO : "" },
id: `${dragContainer}::${type}::${startISO}::${(_d = (_b = tasks[0]) == null ? void 0 : _b.id) != null ? _d : (_c = events2 == null ? void 0 : events2[0]) == null ? void 0 : _c.id}`,
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
"div",
{
className: `selectable flex rounded-icon font-menu text-xs w-full py-0.5 group`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-indent flex-none px-1", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
Button_default,
{
className: "group-hover:opacity-100 opacity-0 transition-opacity duration-200 h-4 py-0.5 flex-none",
src: !collapsed ? "chevron-down" : "chevron-right",
onClick: () => {
setters.patchCollapsed(
sortedGroups.map((x) => x[0]),
!collapsed
);
return false;
},
onPointerDown: () => false
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "w-full flex", children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `w-fit flex-none max-w-[80%] mr-2`, children: events2.map(({ title: title2, id: id2 }) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { children: title2.slice(0, 40) + (title2.length > 40 ? "..." : "") }, id2)) }),
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
"div",
{
className: "w-full flex items-center cursor-grab pr-2",
...attributes,
...listeners,
ref: setActivatorNodeRef,
children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("hr", { className: "border-t border-t-faint opacity-50 h-0 my-0 w-full" }),
startISO && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ml-2 whitespace-nowrap flex-none", children: title != null ? title : formatStart(startISO) }),
hideTimes && startISO && endISO && !isDateISO(startISO) && DateTime.fromISO(startISO).diff(
DateTime.fromISO(endISO)
) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_jsx_runtime8.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ml-2 text-faint flex-none", children: ">" }),
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "ml-2 whitespace-nowrap text-muted flex-none", children: formatStart(endISO) })
] })
]
}
)
] })
]
}
)
}
),
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex relative w-full", children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
"div",
{
className: `time-ruler-groups w-full relative z-10 h-fit ${type === "event" ? "pt-1 pl-1 pb-1" : ""}`,
children: sortedGroups.map(([path2, tasks2]) => {
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
Group,
{
...{
headingPath: path2,
tasks: tasks2,
type,
hidePaths,
dragContainer: `${dragContainer}::${startISO}`,
startISO
}
},
path2
);
})
}
),
!hideTimes && firstStartISO && firstEndISO && firstStartISO < firstEndISO && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-10 flex-none", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
Minutes,
{
startISO: firstStartISO,
endISO: firstEndISO,
dragContainer,
chopStart: true,
chopEnd: true
}
) })
] }),
events2[0] && (events2[0].location || events2[0].notes) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "py-2 pl-indent text-xs", children: [
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full truncate", children: events2[0].location }),
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "w-full truncate text-muted", children: events2[0].notes })
] }),
blocks.length > 0 && blocks[0].startISO && endISO && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Hours, { ...{ endISO, blocks }, startISO: blocks[0].startISO })
]
}
)
] });
}
// src/services/util.ts
function roundMinutes(date) {
return date.set({
minute: Math.floor(date.minute) - Math.floor(date.minute) % 15,
second: 0,
millisecond: 0
});
}
var isDateISO = (isoString) => isoString.length === 10;
var getEndISO = ({ tasks, events: events2, startISO, endISO }) => {
invariant(startISO, endISO);
let startTime = DateTime.fromISO(startISO);
for (let event of events2) {
const length = DateTime.fromISO(event.endISO).diff(
DateTime.fromISO(event.startISO)
);
startTime = startTime.plus(length);
}
for (let task of tasks) {
if (!task.duration)
continue;
const length = Duration.fromDurationLike(task.duration);
startTime = startTime.plus(length);
}
return import_lodash9.default.max([toISO(startTime), endISO]);
};
var parseFolderFromPath = (path2) => {
if (path2.endsWith("/"))
path2 = path2.slice(0, path2.length - 1);
if (path2.includes("/"))
path2 = path2.slice(0, path2.lastIndexOf("/"));
if (!path2.includes("/"))
return path2;
return path2.slice(path2.lastIndexOf("/") + 1);
};
var parseFileFromPath = (path2) => {
if (path2.includes("#"))
path2 = path2.slice(0, path2.indexOf("#"));
if (path2.includes(">"))
path2 = path2.slice(0, path2.indexOf(">"));
if (path2.includes("::"))
path2 = path2.slice(0, path2.indexOf("::"));
if (path2 === "Daily") {
path2 = parsePathFromDate((/* @__PURE__ */ new Date()).toISOString().slice(0, 10));
}
if (!path2.endsWith(".md"))
path2 += ".md";
return path2;
};
var parsePathFromDate = (date, dailyNoteInfo2) => {
if (!dailyNoteInfo2)
dailyNoteInfo2 = getters.get("dailyNoteInfo");
const formattedDate = (0, import_moment.default)(date).format(dailyNoteInfo2.format);
return dailyNoteInfo2.folder + formattedDate + ".md";
};
var parseDateFromPath = (path2, dailyNoteInfo2) => {
const date = (0, import_moment.default)(
parseFileFromPath(path2.replace(dailyNoteInfo2.folder, "")).replace(
".md",
""
),
dailyNoteInfo2.format,
true
);
if (!date.isValid())
return false;
return date;
};
var splitHeading = (heading) => {
return heading.includes(">") ? heading.split(">", 2) : heading.includes("#") ? heading.split("#", 2) : heading.includes("/") ? [
heading.slice(0, heading.lastIndexOf("/")),
heading.slice(heading.lastIndexOf("/") + 1)
] : ["", heading];
};
var getSubHeading = (task, groupBy, hidePaths) => {
switch (groupBy) {
case "hybrid":
case "path":
case "priority":
if (!task.path.includes("#"))
return UNGROUPED2;
const slicedPath = task.path.slice(task.path.indexOf("#") + 1);
if (hidePaths.find((path2) => path2.includes(slicedPath)))
return UNGROUPED2;
return slicedPath;
case "tags":
return UNGROUPED2;
}
};
var getHeading2 = ({
path: path2,
page,
priority,
tags
}, dailyNoteInfo2, groupBy, hidePaths = []) => {
var _a, _b;
path2 = path2.replace(".md", "");
let heading = path2;
if (groupBy === "priority" || groupBy === "hybrid" && priority !== 3 /* DEFAULT */) {
heading = priorityNumberToSimplePriority[priority];
} else if (groupBy === "tags") {
heading = [...tags].map((x) => x.replace("#", "")).sort().join(", ");
} else if (groupBy === "path" || groupBy === "hybrid") {
if (page) {
heading = parseFolderFromPath(path2);
} else {
const file = parseFileFromPath(heading);
const date = parseDateFromPath(file, dailyNoteInfo2);
if (date)
heading = "Daily" + ((_b = (_a = heading.match(/#.+$/)) == null ? void 0 : _a[0]) != null ? _b : "");
else
heading = file.replace(".md", "");
}
} else
heading = UNGROUPED2;
if (hidePaths.find((path3) => path3.includes(heading)))
heading = UNGROUPED2;
return heading;
};
var convertSearchToRegExp = (search) => new RegExp(
search.split("").map((letter) => import_lodash9.default.escapeRegExp(letter)).join(".*?"),
"i"
);
var isLengthType = (type) => type && type === "task-length" || type === "time";
var parseTaskDate2 = (task, tasks) => {
let currentParent = task;
const parseDate = (task2) => task2.scheduled || task2.completion;
while (currentParent.parent) {
const nextScheduled = parseDate(tasks[currentParent.parent]);
if (!nextScheduled || nextScheduled < parseDate(currentParent))
break;
currentParent = tasks[currentParent.parent];
}
return parseDate(currentParent);
};
var toISO = (date, isDate2) => {
const d = date.toISO({
suppressMilliseconds: true,
suppressSeconds: true,
includeOffset: false
});
if (isDate2)
return d.slice(0, 10);
else
return d;
};
var useHourDisplay = (hours) => {
const twentyFourHourFormat = useAppStore(
(state) => state.settings.twentyFourHourFormat
);
const hourDisplay = twentyFourHourFormat ? hours : [12, 0].includes(hours) ? "12" : hours % 12;
return hourDisplay;
};
var useChildWidth = () => {
const [_childWidth, childWidthRef] = useAppStoreRef(
(state) => state.childWidth
);
const recreateWindow = useAppStore((state) => state.recreateWindow);
const setChildWidth = (newChildWidth) => {
if (newChildWidth !== childWidthRef.current)
setters.set({ childWidth: newChildWidth });
};
const [viewMode, viewModeRef] = useAppStoreRef(
(state) => state.settings.viewMode
);
const childWidthToClass = [
"",
"child:w-full",
"child:w-1/2",
"child:w-1/3",
"child:w-1/4"
];
(0, import_react14.useEffect)(() => {
function outputSize() {
const timeRuler = document.querySelector("#time-ruler");
if (!timeRuler) {
window.setTimeout(outputSize, 500);
return;
}
invariant(timeRuler);
const width = timeRuler.clientWidth;
const newChildWidth = width < 500 ? 1 : width < 800 ? 2 : width < 1200 ? 3 : 4;
setChildWidth(newChildWidth);
}
outputSize();
}, [recreateWindow, viewMode]);
const appChildWidth = viewMode === "hour" ? 1 : childWidthRef.current;
const appChildClass = childWidthToClass[appChildWidth];
return {
childWidth: appChildWidth,
childClass: appChildClass
};
};
var scrolling = false;
var scrollToSection = async (id) => {
let scrollTimeout = null;
return new Promise((resolve) => {
const child = document.getElementById(`time-ruler-${id}`);
if (!child) {
(0, import_lodash9.reject)("child not found");
return;
}
child.scrollIntoView({
inline: "start",
behavior: "smooth"
});
setTimeout(() => {
resolve();
scrollTimeout = null;
scrolling = false;
}, 500);
});
};
var queryTasks = (id, query, tasks) => {
var _a, _b;
const paths = (_a = query.match(/\"[^\"]+\"/g)) == null ? void 0 : _a.map((x) => x.slice(1, -1));
if (paths) {
for (let path2 of paths)
query = query.replace(`"${path2}"`, "");
}
const tags = (_b = query.match(/#([\w-]+)/g)) == null ? void 0 : _b.map((x) => x.slice(1));
const fields = query.split(/ ?WHERE ?/)[1];
let fieldTests = [];
const NOT_EXIST = "NOT_EXIST";
const EXIST = "EXIST";
if (fields) {
fieldTests = fields.split(/ ?(AND|OR|&|\|) ?/).flatMap((test) => {
var _a2;
const matches = test.match(/(.+?) ?(!=|<=|>=|=|<|>) ?(.+)/);
let value = test.startsWith("!") ? NOT_EXIST : !matches ? EXIST : matches[3];
let parsedValue = value;
let key2 = matches ? matches[1] : test;
if (matches && matches[1] === "priority") {
if (simplePriorityToNumber[value] !== void 0)
parsedValue = simplePriorityToNumber[value];
else if (priorityKeyToNumber[value] !== void 0)
parsedValue = priorityKeyToNumber[value];
} else if (value === "true")
parsedValue = true;
else if (value === "false")
parsedValue = false;
else
parsedValue = value;
return {
key: key2,
comparison: (_a2 = matches == null ? void 0 : matches[2]) != null ? _a2 : "=",
value: parsedValue
};
});
}
if (!paths && !tags && !fieldTests.length)
return [];
const testField = (test, task) => {
var _a2, _b2;
let value = (_b2 = task[test.key]) != null ? _b2 : (_a2 = task.extraFields) == null ? void 0 : _a2[test.key];
if (test.value === EXIST)
return !!value;
if (test.value === NOT_EXIST)
return !value;
if (value === void 0)
return false;
switch (test.comparison) {
case "=":
return test.value === value;
case "!=":
return test.value !== value;
case "<":
return test.value < value;
case "<=":
return test.value <= value;
case ">":
return test.value > value;
case ">=":
return test.value >= value;
}
};
return import_lodash9.default.filter(import_lodash9.default.values(tasks), (subtask) => {
const thisScheduled = getParentScheduled(tasks[id], tasks);
const scheduled = getParentScheduled(subtask, tasks);
if (subtask.completed || subtask.id === id || !nestedScheduled(thisScheduled, scheduled))
return false;
if (paths && paths.map((path2) => subtask.path.includes(path2)).includes(false))
return false;
if (tags && tags.map((tag) => subtask.tags.includes(tag)).includes(false))
return false;
if (fieldTests && fieldTests.map((field) => testField(field, subtask)).includes(false))
return false;
return true;
});
};
var getChildren = (task, tasks) => !task ? [] : task.children.flatMap((id) => [id, ...getChildren(tasks[id], tasks)]).concat(task.queryChildren ? task.queryChildren : []);
var getParentScheduled = (task, tasks) => {
var _a, _b;
if (parseTaskDate2(task, tasks))
return parseTaskDate2(task, tasks);
let parent = (_a = task.parent) != null ? _a : task.queryParent;
while (parent) {
task = tasks[parent];
if (parseTaskDate2(task, tasks))
return parseTaskDate2(task, tasks);
parent = (_b = task.parent) != null ? _b : task.queryParent;
}
return void 0;
};
var nestedScheduled = (parentScheduled, childScheduled) => {
const now3 = getToday();
if (parentScheduled && parentScheduled < now3)
parentScheduled = now3;
if (childScheduled && childScheduled < now3)
childScheduled = now3;
return !parentScheduled && childScheduled ? false : parentScheduled && childScheduled && parentScheduled < childScheduled ? false : true;
};
var getToday = () => {
return getStartDate(DateTime.now());
};
var getStartDate = (time) => {
const dayEnd = getters.get("settings").dayStartEnd[1];
if (dayEnd < 12 && time.hour < dayEnd)
return time.minus({ days: 1 }).toISODate();
else
return time.toISODate();
};
var hasPriority = (task) => task.priority !== void 0 && task.priority !== 3 /* DEFAULT */;
// src/services/dragging.ts
var onDragEnd = async (ev, activeDragRef) => {
var _a, _b;
const dropData = (_a = ev.over) == null ? void 0 : _a.data.current;
const dragData = activeDragRef.current;
const dragMode = getters.get("dragMode");
if (ev.active.id === ((_b = ev.over) == null ? void 0 : _b.id)) {
setters.set({ dragData: null });
return;
}
if ((dragData == null ? void 0 : dragData.dragType) === "task" && (dropData == null ? void 0 : dropData.type) === "move") {
setters.set({ newTask: { task: dragData, type: "move" } });
} else if (dropData && dragData) {
if (!isTaskProps(dropData)) {
switch (dropData.type) {
case "heading":
if (dragData.dragType !== "group")
break;
setters.updateFileOrder(
parseFileFromPath(dragData.headingPath),
parseFileFromPath(dropData.heading)
);
break;
case "delete":
const tasks = getters.get("tasks");
let draggedTasks = dragData.dragType === "block" || dragData.dragType === "group" ? dragData.tasks : dragData.dragType === "task" ? [dragData] : [];
const children = import_lodash10.default.sortBy(
import_lodash10.default.uniq(
import_lodash10.default.flatMap(draggedTasks, (task) => [
task.id,
...getChildren(task, tasks)
])
),
"id"
);
if (children.length > 1) {
if (!confirm(`Delete ${children.length} tasks and children?`))
break;
}
await getters.getObsidianAPI().deleteTasks(children.reverse());
break;
}
} else {
switch (dragData.dragType) {
case "new_button":
setters.set({
newTask: { task: { scheduled: dropData.scheduled }, type: "new" }
});
break;
case "time":
case "task-length":
if (!dropData.scheduled)
return;
const { hours, minutes } = DateTime.fromISO(dropData.scheduled).diff(DateTime.fromISO(dragData.start)).shiftTo("hours", "minutes").toObject();
if (dragData.dragType === "task-length") {
setters.patchTasks([dragData.id], {
duration: { hour: hours, minute: minutes }
});
} else {
setters.set({
newTask: {
task: {
scheduled: dragData.start,
duration: { hour: hours, minute: minutes }
},
type: "new"
}
});
}
break;
case "block":
case "group":
setters.patchTasks(
dragData.tasks.map((x) => x.id),
dropData
);
break;
case "task":
setters.patchTasks([dragData.id], dropData);
break;
case "due":
setters.patchTasks([dragData.task.id], { due: dropData.scheduled });
break;
}
}
}
setters.set({ dragData: null });
};
var onDragStart = (ev) => {
setters.set({ dragData: ev.active.data.current });
};
// src/services/autoScroll.ts
var import_obsidian3 = require("obsidian");
var import_react15 = __toESM(require_react());
var useAutoScroll = () => {
const dragging = useAppStore((state) => !!state.dragData);
let scrolling2 = (0, import_react15.useRef)(false);
let timeout = (0, import_react15.useRef)(null);
const WAIT_TIME = 500;
(0, import_react15.useEffect)(() => {
const scrollBy = (el, object) => {
scrolling2.current = true;
timeout.current = null;
el.scrollBy({ ...object, behavior: "smooth" });
setTimeout(() => {
scrolling2.current = false;
}, 750);
};
const autoScroll = (ev) => {
if (scrolling2.current)
return;
let pos = { x: 0, y: 0 };
if (ev instanceof TouchEvent) {
pos.x = ev.touches[0].clientX;
pos.y = ev.touches[0].clientY;
} else if (ev instanceof MouseEvent) {
pos.x = ev.clientX;
pos.y = ev.clientY;
}
const tr = document.getElementById("time-ruler");
invariant(tr);
let found = false;
for (let el of tr.findAll('[data-auto-scroll="y"]')) {
const { left, right, top, bottom, height } = el.getBoundingClientRect();
if (pos.x < left || pos.x > right || pos.y < top || pos.y > bottom)
continue;
const MARGIN = 10;
if (pos.y < top + MARGIN) {
found = true;
if (!timeout.current)
timeout.current = setTimeout(
() => scrollBy(el, { top: -height }),
WAIT_TIME
);
break;
} else if (pos.y > bottom - MARGIN) {
found = true;
if (!timeout.current)
timeout.current = setTimeout(
() => scrollBy(el, { top: height }),
WAIT_TIME
);
break;
}
}
if (!found) {
for (let el of tr.findAll('[data-auto-scroll="x"]')) {
const { left, width, top, bottom, right } = el.getBoundingClientRect();
if (pos.x < left || pos.x > right || pos.y < top || pos.y > bottom)
continue;
const MARGIN = 10;
if (pos.x < left + MARGIN) {
found = true;
if (!timeout.current)
timeout.current = setTimeout(
() => scrollBy(el, { left: -width }),
WAIT_TIME
);
break;
} else if (pos.x > right - MARGIN) {
found = true;
if (!timeout.current)
timeout.current = setTimeout(
() => scrollBy(el, { left: width }),
WAIT_TIME
);
break;
}
}
}
if (!found && timeout.current) {
clearTimeout(timeout.current);
timeout.current = null;
}
};
if (dragging)
window.addEventListener(
import_obsidian3.Platform.isMobile ? "touchmove" : "mousemove",
autoScroll
);
return () => {
window.removeEventListener(
import_obsidian3.Platform.isMobile ? "touchmove" : "mousemove",
autoScroll
);
};
}, [dragging]);
};
// src/components/Day.tsx
var import_lodash11 = __toESM(require_lodash());
var import_react17 = __toESM(require_react());
// src/components/Timer.tsx
var import_react16 = __toESM(require_react());
var import_react_timer_hook = __toESM(require_dist());
var import_jsx_runtime9 = __toESM(require_jsx_runtime());
function Timer() {
const pauseExpiration = (0, import_react16.useRef)(true);
const { negative, startISO, maxSeconds, playing } = useAppStore(
(state) => state.timer
);
const muted = useAppStore((state) => state.settings.muted);
const timer = (0, import_react_timer_hook.useTimer)({
expiryTimestamp: startISO ? new Date(startISO) : /* @__PURE__ */ new Date(),
onExpire: () => {
if (pauseExpiration.current)
return;
setInput("");
timer.pause();
stopwatch.totalSeconds = 0;
stopwatch.start();
},
autoStart: false
});
const stopwatch = (0, import_react_timer_hook.useStopwatch)({
autoStart: false,
offsetTimestamp: startISO ? new Date(startISO) : /* @__PURE__ */ new Date()
});
(0, import_react16.useEffect)(() => {
pauseExpiration.current = false;
if (!startISO)
return;
if (playing && maxSeconds)
timer.restart(new Date(startISO), true);
else if (playing) {
const seconds2 = DateTime.now().diff(DateTime.fromISO(startISO)).shiftTo("seconds").seconds;
stopwatch.reset(DateTime.now().plus({ seconds: seconds2 }).toJSDate(), true);
}
}, []);
(0, import_react16.useEffect)(() => {
const newPlaying = stopwatch.isRunning || timer.isRunning;
if (newPlaying !== playing)
setters.patchTimer({ playing: newPlaying });
}, [stopwatch.isRunning, timer.isRunning]);
const [input, setInput] = (0, import_react16.useState)("");
const seconds = maxSeconds ? timer.seconds : stopwatch.seconds;
const minutes = maxSeconds ? timer.minutes : stopwatch.minutes;
const hours = maxSeconds ? timer.hours : stopwatch.hours;
const currentTime = maxSeconds ? timer.totalSeconds : stopwatch.totalSeconds;
const start = () => {
setters.patchTimer({ negative: false });
let hours2 = 0;
let minutes2 = 0;
if (!input) {
setters.patchTimer({
maxSeconds: null,
startISO: (/* @__PURE__ */ new Date()).toISOString()
});
stopwatch.start();
} else {
if (input.includes(":")) {
const split = input.split(":").map((x) => parseInt(x));
hours2 = split[0];
minutes2 = split[1];
} else {
minutes2 = parseFloat(input);
}
const endDate = DateTime.now().plus({ minutes: minutes2, hours: hours2 }).toJSDate();
timer.restart(endDate);
setters.patchTimer({
maxSeconds: minutes2 * 60 + hours2 * 60 * 60,
startISO: endDate.toISOString()
});
}
playSound();
};
const reset = () => {
setters.patchTimer({ negative: false });
if (maxSeconds) {
setters.patchTimer({
maxSeconds: null
});
timer.restart(/* @__PURE__ */ new Date(), false);
} else {
stopwatch.reset(void 0, false);
}
setInput("");
};
const addTime = (minutes2) => {
if (maxSeconds) {
const currentTime2 = DateTime.now().plus({ seconds: timer.totalSeconds }).plus({ minutes: minutes2 });
timer.restart(currentTime2.toJSDate(), true);
setters.patchTimer({
maxSeconds: maxSeconds + minutes2 * 60,
startISO: currentTime2.toJSDate().toISOString()
});
} else {
const currentTime2 = DateTime.now().plus({
seconds: stopwatch.totalSeconds
}).plus({ minutes: minutes2 });
stopwatch.reset(currentTime2.toJSDate(), true);
setters.patchTimer({ startISO: currentTime2.toJSDate().toISOString() });
}
};
let width = 0;
if (!maxSeconds) {
const CYCLE_SEC = 60;
const modulus = currentTime % CYCLE_SEC / CYCLE_SEC;
width = modulus * 100;
} else {
width = currentTime / maxSeconds * 100;
}
const change = (ev) => {
if (/\d*(:\d*)?/.test(ev.target.value)) {
setInput(ev.target.value);
}
};
const playSound = () => {
if (!playing && !muted) {
sounds.start.play();
}
};
const togglePlaying = () => {
if (currentTime <= 0)
start();
else {
playing ? maxSeconds ? timer.pause() : stopwatch.pause() : maxSeconds ? timer.resume() : stopwatch.start();
playSound();
}
};
const borders = useAppStore((state) => state.settings.borders);
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
"div",
{
className: `relative my-1 flex w-full items-center justify-center rounded-icon font-menu text-sm child:relative child:h-full py-0.5 h-12 flex-none ${borders ? "border-solid border-divider border-[1px]" : ""} ${negative ? "bg-red-800/50" : "bg-code"}`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
"div",
{
className: `!absolute left-0 top-0 h-full flex-none rounded-icon ${width === 0 ? "" : "transition-width duration-1000 ease-linear"} ${negative ? "bg-red-500/20" : "bg-selection"}`,
style: {
width: `${width}%`
}
}
),
!playing && currentTime <= 0 ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
"input",
{
type: "number",
value: input,
placeholder: "mins",
onKeyDown: (ev) => ev.key === "Enter" && start(),
onChange: change,
className: "w-[4em] !border-none bg-transparent text-center !shadow-none"
}
) : /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("pre", { className: "my-0 mr-1 !h-fit", children: `${negative ? "-" : ""}${hours > 0 ? hours + ":" : ""}${hours > 0 ? String(minutes).padStart(2, "0") : minutes}:${String(
seconds
).padStart(2, "0")}` }),
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
Button_default,
{
className: "p-0.5",
onClick: togglePlaying,
src: playing ? "pause" : "play",
title: "timer or stopwatch"
}
),
playing && /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button_default, { onClick: () => addTime(5), children: "+5" }),
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button_default, { onClick: () => addTime(-5), children: "-5" })
] }),
!playing && currentTime > 0 && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(Button_default, { onClick: reset, src: "rotate-cw", className: "p-0.5" })
]
}
);
}
// src/components/Day.tsx
var import_jsx_runtime10 = __toESM(require_jsx_runtime());
function Day({
startISO,
endISO,
type,
dragContainer,
isNow
}) {
var _a, _b;
const showingPastDates = useAppStore((state) => state.showingPastDates);
const now3 = toISO(roundMinutes(DateTime.now()));
const startDate = getStartDate(DateTime.fromISO(startISO));
const endDate = getStartDate(DateTime.fromISO(startISO).plus({ day: 1 }));
const showCompleted = useAppStore((state) => state.settings.showCompleted);
const id = startDate;
const [allDay, blocksByTime, pastTasks, upcoming] = useAppStore((state) => {
const allDay2 = {
startISO: startDate,
endISO: startDate,
blocks: [],
tasks: [],
events: []
};
const pastTasks2 = {
startISO: startDate,
endISO: startDate,
blocks: [],
tasks: [],
events: []
};
const upcoming2 = {
startISO: startDate,
endISO: startDate,
blocks: [],
tasks: [],
events: []
};
const blocksByTime2 = {};
import_lodash11.default.forEach(state.tasks, (task) => {
const scheduled = parseTaskDate2(task, state.tasks);
const isShown = (task.due || scheduled) && !task.queryParent && (showCompleted && scheduled === startDate || task.completed === showingPastDates);
if (!isShown)
return;
const scheduledPast = !isNow || !scheduled ? false : showingPastDates ? scheduled >= endDate : scheduled < startDate;
const scheduledForToday = !scheduled ? false : isDateISO(scheduled) ? scheduled === startDate : (isNow ? scheduled > startDate : scheduled >= startISO) && scheduled < endISO;
const dueToday = !showingPastDates && (!task.due ? false : isNow || task.due >= startDate) && (!task.scheduled || task.scheduled < startDate);
if (scheduledPast) {
invariant(scheduled);
pastTasks2.tasks.push(task);
} else if (scheduledForToday) {
invariant(scheduled);
if (isDateISO(scheduled) || scheduled < startDate || scheduled > endISO) {
allDay2.tasks.push(task);
} else {
if (blocksByTime2[scheduled])
blocksByTime2[scheduled].tasks.push(task);
else
blocksByTime2[scheduled] = {
startISO: scheduled,
endISO: scheduled,
tasks: [task],
events: [],
blocks: []
};
}
} else if (dueToday) {
upcoming2.tasks.push(task);
}
});
for (let event of import_lodash11.default.filter(state.events, (event2) => {
const shouldInclude = isDateISO(event2.startISO) ? event2.startISO <= startDate && event2.endISO > startDate : event2.startISO < endISO && event2.endISO > startISO && (showingPastDates ? event2.startISO <= now3 : event2.endISO >= now3);
return shouldInclude;
})) {
if (isDateISO(event.startISO))
allDay2.events.push(event);
else if (blocksByTime2[event.startISO])
blocksByTime2[event.startISO].events.push(event);
else
blocksByTime2[event.startISO] = {
startISO: event.startISO,
endISO: event.endISO,
tasks: [],
events: [event],
blocks: []
};
}
return [allDay2, blocksByTime2, pastTasks2, upcoming2];
}, shallow$1);
let blocks = import_lodash11.default.map(import_lodash11.default.sortBy(import_lodash11.default.entries(blocksByTime), 0), 1);
const viewMode = useAppStore((state) => state.settings.viewMode);
const calendarMode = viewMode === "week";
let title = DateTime.fromISO(startISO || endISO).toFormat(
calendarMode ? "EEE d" : "EEE, MMM d"
);
const collapsed = useAppStore((state) => state.collapsed[id]);
const foundTaskInAllDay = useAppStore((state) => {
return state.findingTask && allDay.tasks.find((task) => task.id === state.findingTask) ? state.findingTask : null;
});
const expandIfFound = () => {
if (foundTaskInAllDay && collapsed) {
setters.patchCollapsed([id], false);
const foundTask = allDay.tasks.find(
(task) => task.id === foundTaskInAllDay
);
if (!foundTask)
return;
setters.set({ findingTask: null });
setTimeout(() => openTaskInRuler(foundTask.id));
}
};
(0, import_react17.useEffect)(expandIfFound, [foundTaskInAllDay]);
const allDayFrame = (0, import_react17.useRef)(null);
const wide = useAppStore((state) => state.childWidth > 1);
const TR_NOW = "TR::NOW";
const focus = useAppStore((state) => isNow && state.collapsed[TR_NOW]);
if (focus) {
endISO = (_b = (_a = blocks.find(({ startISO: startISO2 }) => startISO2 && startISO2 > now3)) == null ? void 0 : _a.endISO) != null ? _b : now3;
blocks = blocks.filter(({ startISO: startISO2 }) => startISO2 && startISO2 <= now3);
}
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: `flex flex-col overflow-hidden relative`, children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex items-center group relative z-10", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Droppable,
{
data: { scheduled: startDate },
id: dragContainer + "::" + startISO + "::timeline",
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "flex items-center grow", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "flex-none w-indent pr-1", children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Button_default,
{
className: "flex-none w-full",
src: collapsed ? "chevron-right" : "chevron-down",
onClick: () => {
setters.patchCollapsed([id], !collapsed);
return false;
}
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
"div",
{
className: "font-menu w-full cursor-pointer hover:underline",
onClick: async () => {
const dailyNoteInfo2 = getters.get("dailyNoteInfo");
const path2 = parsePathFromDate(startDate, dailyNoteInfo2);
const thisNote = getters.getApp().vault.getAbstractFileByPath(path2);
if (!thisNote) {
await getters.getObsidianAPI().createFileFromPath(path2);
}
getters.getApp().workspace.openLinkText(
parsePathFromDate(startDate, dailyNoteInfo2),
""
);
},
children: title || ""
}
)
] })
}
) }),
isNow && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(Timer, {}),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
className: `rounded-icon ${{
hour: wide ? "h-0 grow flex space-x-2 child:h-full child:flex-1 child:w-full justify-center child:max-w-xl" : "h-0 grow flex flex-col",
day: "overflow-y-auto",
week: "overflow-y-auto"
}[viewMode]}`,
"data-auto-scroll": calendarMode ? "y" : void 0,
children: [
allDay.tasks.length + allDay.events.length + pastTasks.tasks.length + upcoming.tasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
className: `relative w-full child:mb-1 overflow-x-hidden rounded-icon mt-1 ${{
hour: wide ? "!h-full" : "max-h-[50%] flex-none overflow-y-auto resize-y",
day: "h-fit",
week: "h-fit"
}[viewMode]} ${collapsed ? "hidden" : "block"}`,
"data-auto-scroll": calendarMode ? void 0 : "y",
ref: allDayFrame,
children: [
pastTasks.tasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Block,
{
type: "all-day",
title: "past",
events: [],
tasks: pastTasks.tasks,
startISO: startDate,
endISO: startDate,
dragContainer: dragContainer + "-past",
blocks: []
}
),
allDay.events.map((event) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Block,
{
type: "event",
events: [event],
id: event.id,
tasks: [],
startISO: startDate,
endISO: startDate,
dragContainer,
blocks: []
},
event.id
)),
allDay.tasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Block,
{
type: "all-day",
title: "today",
events: [],
tasks: allDay.tasks,
startISO: startDate,
endISO: startDate,
dragContainer: dragContainer + "-allDay",
blocks: []
}
),
upcoming.tasks.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Block,
{
type: "upcoming",
title: "upcoming",
events: [],
tasks: upcoming.tasks,
startISO: startDate,
endISO: startDate,
dragContainer: dragContainer + "-upcoming",
blocks: []
}
)
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
className: `flex flex-col ${{
hour: "h-0 grow overflow-y-auto",
day: "h-fit",
week: "h-fit"
}[viewMode]} ${isNow && focus ? "border border-solid border-accent rounded-lg px-1" : ""}`,
children: [
isNow && /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "w-full flex flex-none h-6 mt-1 items-center", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Droppable,
{
id: `${dragContainer}::now`,
data: {
scheduled: now3
},
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "h-full grow flex font-menu items-center space-x-2 pl-indent", children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "text-xs text-accent", children: "Now" }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)("hr", { className: "w-full border-selection" })
] })
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Button_default,
{
className: `ml-1 ${isNow && focus ? "bg-accent" : ""}`,
src: focus ? "minimize-2" : "maximize-2",
title: "focus on now",
onClick: () => {
if (!focus) {
setters.patchCollapsed([id], true);
}
setters.patchCollapsed([TR_NOW], !focus);
}
}
)
] }),
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
"div",
{
className: `overflow-x-hidden rounded-icon mt-1 h-full`,
"data-auto-scroll": calendarMode ? void 0 : "y",
children: [
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Hours,
{
...{
startISO,
endISO,
type,
blocks,
dragContainer
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
Droppable,
{
data: { scheduled: startISO },
id: `${dragContainer}::${startISO}::timeline::end`,
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: "h-0 grow" })
}
)
]
}
)
]
}
)
]
}
)
] });
}
// src/components/NewTask.tsx
var import_lodash12 = __toESM(require_lodash());
var import_react18 = __toESM(require_react());
var import_jsx_runtime11 = __toESM(require_jsx_runtime());
function NewTask({ dragContainer }) {
var _a, _b;
const data = {
dragType: "new_button"
};
const { attributes, listeners, setNodeRef } = useDraggable({
id: `new_task_button::${dragContainer}`,
data
});
const newTaskData = useAppStore((state) => state.newTask);
const newTask = newTaskData ? newTaskData.task : false;
const newTaskMode = newTaskData ? newTaskData.type : void 0;
const frame = (0, import_react18.useRef)(null);
const inputFrame = (0, import_react18.useRef)(null);
const inputRef = (0, import_react18.useRef)(null);
const checkShowing = (ev) => {
invariant(frame.current);
const els = document.elementsFromPoint(ev.clientX, ev.clientY);
if (!els.includes(frame.current)) {
setters.set({ newTask: null });
}
};
(0, import_react18.useEffect)(() => {
window.removeEventListener("mousedown", checkShowing);
if (newTask) {
window.addEventListener("mousedown", checkShowing);
setTimeout(() => {
var _a2;
return (_a2 = inputFrame.current) == null ? void 0 : _a2.focus();
});
}
return () => window.removeEventListener("mousedown", checkShowing);
}, [!!newTask]);
const [search, setSearch] = (0, import_react18.useState)("");
const dailyNoteInfo2 = useAppStore((state) => state.dailyNoteInfo);
const allHeadings = useAppStore((state) => {
if (!newTask)
return [];
return import_lodash12.default.uniq(
import_lodash12.default.flatMap(state.tasks, (task) => {
if (task.completed || task.page)
return [];
return task.path.replace(".md", "");
}).concat(["Daily"])
).sort();
}, shallow$1);
const searchExp = convertSearchToRegExp(search);
const filteredHeadings = allHeadings.filter(
(heading) => searchExp.test(heading)
);
(0, import_react18.useEffect)(() => {
setSearch("");
}, [newTask]);
const draggingTask = useAppStore(
(state) => state.dragData && ["task", "group", "block"].includes(state.dragData.dragType) ? state.dragData : void 0
);
const checkForClick = () => {
if (!getters.get("dragData") && !getters.get("newTask")) {
setters.set({ newTask: { task: { scheduled: void 0 }, type: "new" } });
}
window.removeEventListener("mouseup", checkForClick);
};
const calendarMode = useAppStore(
(state) => state.settings.viewMode === "week"
);
const [focus, setFocus] = (0, import_react18.useState)(false);
(0, import_react18.useEffect)(() => {
const onFocus = (ev) => {
if (ev.key === "Tab") {
ev.stopPropagation();
inputRef.current.focus();
}
};
if (focus) {
window.addEventListener("keydown", onFocus, { capture: true });
}
return () => {
window.removeEventListener("keydown", onFocus);
};
}, [focus]);
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: `relative z-30 ${calendarMode ? "" : "flex pl-2"}`, children: [
draggingTask ? /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Droppable, { id: `delete-task`, data: { type: "delete" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
Button_default,
{
src: "x",
className: `!rounded-full ${calendarMode ? "h-8 w-8 mb-2" : "h-10 w-10 mr-2"} bg-red-900 flex-none`
}
) }),
draggingTask.dragType === "task" && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(Droppable, { id: `move-task`, data: { type: "move" }, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
Button_default,
{
src: "move-right",
className: `!rounded-full ${calendarMode ? "h-8 w-8" : "h-10 w-10"} bg-blue-900 flex-none`
}
) })
] }) : /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_jsx_runtime11.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
Button_default,
{
...attributes,
...listeners,
onMouseDown: () => {
window.addEventListener("mouseup", checkForClick);
},
ref: setNodeRef,
className: `relative flex-none cursor-grab !rounded-full bg-accent child:invert ${calendarMode ? "h-8 w-8" : "h-10 w-10"}`,
src: "plus"
}
) }),
newTaskData && newTask && newTaskMode && /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "fixed left-0 top-0 z-40 !mx-0 flex h-full w-full items-center justify-center p-8 space-y-2 ", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
"div",
{
className: "flex h-full max-h-[50vh] w-full flex-col space-y-1 overflow-y-auto overflow-x-hidden rounded-icon border border-solid border-faint bg-code p-2 max-w-2xl backdrop-blur",
ref: frame,
children: [
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "flex items-center", children: [
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "pl-2 font-menu text-lg font-bold mr-2", children: newTaskMode === "new" ? "New Task" : "Move Task" }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-sm text-faint", children: (_a = newTask.scheduled) != null ? _a : "Unscheduled" }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "grow" }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
Button_default,
{
src: "check",
onClick: () => getters.getObsidianAPI().createNewTask(newTask, null, dailyNoteInfo2)
}
)
] }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
"input",
{
ref: inputFrame,
className: "w-full rounded-icon border border-solid border-faint bg-transparent font-menu font-light backdrop-blur !text-base px-1 py-2",
value: (_b = newTask.originalTitle) != null ? _b : "",
placeholder: "title...",
onChange: (ev) => setters.set({
newTask: {
task: { ...newTask, originalTitle: ev.target.value },
type: newTaskMode
}
}),
onFocus: () => setFocus(true),
onBlur: () => setFocus(false),
onKeyDown: (ev) => {
if (ev.key === "Tab") {
ev.preventDefault();
}
if (ev.key === "Enter")
getters.getObsidianAPI().createNewTask(newTask, null, dailyNoteInfo2);
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
"input",
{
placeholder: "search files...",
className: "w-full rounded-icon border border-solid border-faint bg-transparent p-1 font-menu backdrop-blur",
value: search,
ref: inputRef,
onChange: (ev) => setSearch(ev.target.value),
onKeyDown: (ev) => {
if (ev.key === "Enter") {
getters.getObsidianAPI().createNewTask(newTask, filteredHeadings[0], dailyNoteInfo2);
}
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "h-0 w-full grow space-y-1 overflow-y-auto text-sm", children: filteredHeadings.map((path2) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
NewTaskHeading,
{
headingPath: path2,
newTaskData
},
path2
)) })
]
}
) })
] });
}
function NewTaskHeading({
headingPath,
newTaskData
}) {
const dailyNoteInfo2 = useAppStore((state) => state.dailyNoteInfo);
const [myContainer, title] = splitHeading(headingPath);
const newTask = newTaskData.task;
const newTaskType = newTaskData.type;
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
"div",
{
onMouseDown: async () => {
const api = getters.getObsidianAPI();
if (newTaskType === "move") {
await api.moveTask(newTask, headingPath);
} else {
api.createNewTask(newTask, headingPath, dailyNoteInfo2);
}
setTimeout(() => setters.set({ newTask: null }));
},
className: `flex items-center w-full selectable cursor-pointer rounded-icon px-2 hover:underline ${headingPath.includes("#") ? "text-muted" : "font-bold text-accent"}`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "grow mr-2 whitespace-nowrap", children: title.slice(0, 30) + (title.length > 30 ? "..." : "") }),
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "text-faint text-xs whitespace-nowrap text-right", children: (myContainer.length > 30 ? "..." : "") + myContainer.slice(Math.max(0, myContainer.length - 30)) })
]
},
headingPath
);
}
// src/components/Search.tsx
var import_lodash13 = __toESM(require_lodash());
var import_react19 = __toESM(require_react());
var import_react_dom3 = __toESM(require_react_dom());
var import_jsx_runtime12 = __toESM(require_jsx_runtime());
function Search() {
const tasks = useAppStore((state) => state.tasks);
const showingPastDates = useAppStore((state) => state.showingPastDates);
const showCompleted = useAppStore((state) => state.settings.showCompleted);
const allTasks = (0, import_react19.useMemo)(
() => import_lodash13.default.sortBy(
import_lodash13.default.values(tasks).filter(
(task) => showCompleted || task.completed === showingPastDates
),
"id"
).map((task) => {
var _a;
return [
[
(task.page ? parseFolderFromPath(task.path) : task.path) + task.title,
task.tags.map((x) => "#" + x).join(" "),
(_a = task.notes) != null ? _a : "",
priorityNumberToKey[task.priority],
task.status
],
task
];
}),
[tasks]
);
const [search, setSearch] = (0, import_react19.useState)("");
const searchExp = convertSearchToRegExp(search);
const splitSearch = search.split("");
const foundTasks = import_lodash13.default.sortBy(
allTasks.filter(
([strings]) => strings.find((string) => !search || string && searchExp.test(string))
),
([_matches, task]) => {
let total = 0;
let index = 0;
const title = task.title.toLowerCase();
let notFound = 0;
for (let char of splitSearch) {
const newIndex = title.indexOf(char, index);
if (newIndex !== -1) {
total += newIndex;
index = newIndex;
} else
notFound += 1;
}
return notFound * 25 + total;
}
);
const input = (0, import_react19.useRef)(null);
(0, import_react19.useEffect)(() => {
var _a;
return (_a = input.current) == null ? void 0 : _a.focus();
}, []);
return (0, import_react_dom3.createPortal)(
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "modal-container mod-dim", children: [
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
"div",
{
className: "modal-bg",
onClick: () => setters.set({ searchStatus: false })
}
),
/* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "prompt", children: [
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "prompt-input-container", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
"input",
{
className: "prompt-input",
style: { fontFamily: "var(--font-interface)" },
value: search,
onChange: (ev) => setSearch(ev.target.value),
onKeyDown: (ev) => {
if (ev.key === "Escape")
setters.set({ searchStatus: false });
else if (ev.key === "Enter") {
if (foundTasks[0])
openTaskInRuler(foundTasks[0][1].id);
setters.set({ searchStatus: false });
}
},
ref: input
}
) }),
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "prompt-results", children: foundTasks.map(([_strings, task]) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
"div",
{
"data-info": task.id,
className: "clickable-icon suggestion-item mod-complex",
onClick: () => {
openTaskInRuler(task.id);
setters.set({ searchStatus: false });
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
"div",
{
className: "suggestion-content",
style: {
color: "var(--text-normal)",
overflow: "hidden",
textOverflow: "ellipsis",
whiteSpace: "nowrap"
},
children: task.title
}
),
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
"div",
{
className: "suggestion-aux",
style: {
overflow: "hidden",
textOverflow: "ellipsis",
maxWidth: "40%",
whiteSpace: "nowrap",
fontSize: "0.875rem",
color: "var(--text-faint)",
flex: "none"
},
children: (task.page ? parseFolderFromPath(task.path) : task.path).replace(".md", "")
}
)
]
},
task.id
)) }),
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "prompt-instructions" })
] })
] }),
document.querySelector(".app-container")
);
}
// src/components/App.tsx
var import_jsx_runtime13 = __toESM(require_jsx_runtime());
function App2({ apis }) {
const reload = async () => {
const dv2 = (0, import_obsidian_dataview2.getAPI)();
invariant(dv2, "please install Dataview to use Time Ruler.");
if (!dv2.index.initialized) {
getters.getApp().metadataCache.on("dataview:index-ready", () => {
reload();
});
return;
}
apis.obsidian.reload();
const dailyNoteInfo2 = await getDailyNoteInfo();
const settings = {
muted: apis.obsidian.getSetting("muted"),
twentyFourHourFormat: apis.obsidian.getSetting("twentyFourHourFormat"),
groupBy: apis.obsidian.getSetting("groupBy"),
dayStartEnd: apis.obsidian.getSetting("dayStartEnd"),
showCompleted: apis.obsidian.getSetting("showCompleted"),
extendBlocks: apis.obsidian.getSetting("extendBlocks"),
hideTimes: apis.obsidian.getSetting("hideTimes"),
borders: apis.obsidian.getSetting("borders"),
viewMode: apis.obsidian.getSetting("viewMode"),
timerEvent: apis.obsidian.getSetting("timerEvent"),
scheduledSubtasks: apis.obsidian.getSetting("scheduledSubtasks")
};
setters.set({
apis,
dailyNoteInfo: dailyNoteInfo2,
settings
});
apis.calendar.loadEvents();
apis.obsidian.loadTasks("", getters.get("showingPastDates"));
};
(0, import_react20.useEffect)(() => {
reload();
}, [apis]);
const [now3, setNow] = (0, import_react20.useState)(DateTime.now());
(0, import_react20.useEffect)(() => {
const update = () => {
setNow(DateTime.now());
};
const interval = window.setInterval(update, 6e4);
const checkTimer = () => {
const { startISO, maxSeconds, playing } = getters.get("timer");
if (playing && startISO && maxSeconds && (/* @__PURE__ */ new Date()).toISOString() >= startISO) {
setters.patchTimer({
maxSeconds: null,
startISO: (/* @__PURE__ */ new Date()).toISOString(),
negative: true,
playing: true
});
if (getters.getApp().isMobile) {
sounds.timer.play();
new import_obsidian4.Notice("Timer complete");
} else {
switch (getters.get("settings").timerEvent) {
case "notification":
new Notification("Timer complete");
break;
case "sound":
sounds.timer.play();
new import_obsidian4.Notice("Timer complete");
break;
}
}
}
};
const timerInterval = window.setInterval(checkTimer, 1e3);
return () => {
window.clearInterval(interval);
window.clearInterval(timerInterval);
};
}, []);
(0, import_react20.useEffect)(() => {
const timeout = setTimeout(() => {
scrollToSection(getToday());
}, 1e3);
return () => {
clearTimeout(timeout);
};
}, []);
const showingPastDates = useAppStore((state) => state.showingPastDates);
const today = DateTime.fromISO(getToday());
const [weeksShownState, setWeeksShown] = (0, import_react20.useState)(1);
const viewMode = useAppStore((state) => state.settings.viewMode);
const calendarMode = viewMode === "week";
const datesShown = weeksShownState * 7 * (showingPastDates ? -1 : 1);
(0, import_react20.useEffect)(() => {
if (calendarMode) {
setWeeksShown(4);
} else {
setWeeksShown(1);
}
}, [calendarMode]);
(0, import_react20.useEffect)(() => {
var _a;
(_a = getters.getObsidianAPI()) == null ? void 0 : _a.loadTasks("", showingPastDates);
}, [weeksShownState, showingPastDates]);
const dayStart = useAppStore((state) => state.settings.dayStartEnd[0]);
const showCompleted = useAppStore((state) => state.settings.showCompleted);
const times = [
{ type: "unscheduled" },
{
startISO: showingPastDates || showCompleted ? toISO(today.startOf("day").plus({ hours: dayStart })) : toISO(now3),
endISO: showingPastDates ? toISO(now3) : toISO(today.plus({ days: 1, hours: dayStart })),
type: "minutes",
dragContainer: "app",
isNow: true
},
...import_lodash14.default.range(showingPastDates ? -1 : 1, datesShown).map((i) => ({
startISO: toISO(today.plus({ days: i, hours: dayStart })),
endISO: toISO(today.plus({ days: i + 1, hours: dayStart })),
type: "minutes",
dragContainer: "app"
}))
];
if (showingPastDates)
times.reverse();
const searchWithinWeeks = useAppStore((state) => state.searchWithinWeeks);
(0, import_react20.useEffect)(() => {
var _a;
(_a = getters.getObsidianAPI()) == null ? void 0 : _a.loadTasks("", showingPastDates);
}, [searchWithinWeeks, showingPastDates]);
(0, import_react20.useEffect)(() => {
if (showingPastDates && -weeksShownState < searchWithinWeeks[0]) {
setters.set({
searchWithinWeeks: [-weeksShownState, searchWithinWeeks[1]]
});
}
if (!showingPastDates && weeksShownState > searchWithinWeeks[1]) {
setters.set({
searchWithinWeeks: [searchWithinWeeks[0], weeksShownState]
});
}
}, [showingPastDates, weeksShownState]);
const [activeDrag, activeDragRef] = useAppStoreRef((state) => state.dragData);
useAutoScroll();
const measuringConfig = {
draggable: {
measure: (el) => {
const parentRect = (0, import_jquery.default)("#time-ruler").parent()[0].getBoundingClientRect();
const rect = el.getBoundingClientRect();
return {
...rect,
left: rect.left - parentRect.left,
top: rect.top - parentRect.top
};
}
},
dragOverlay: {
measure: (el) => {
const parentRect = (0, import_jquery.default)("#time-ruler").parent()[0].getBoundingClientRect();
const rect = el.getBoundingClientRect();
return {
...rect,
left: rect.left - parentRect.left,
top: rect.top - parentRect.top
};
}
}
};
const getDragElement = () => {
if (!activeDrag)
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, {});
switch (activeDrag.dragType) {
case "task":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Task, { ...activeDrag, dragging: true });
case "task-length":
case "time":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, {});
case "group":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Group, { ...activeDrag });
case "block":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Block, { ...activeDrag, dragging: true });
case "new_button":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NewTask, { dragContainer: "activeDrag" });
case "due":
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "h-line p-2 text-accent", children: "due" });
}
};
const scroller = (0, import_react20.useRef)(null);
const [scrollViews, setScrollViews] = (0, import_react20.useState)([-1, 1]);
const { childWidth, childClass } = useChildWidth();
const trueChildWidth = useAppStore((state) => state.childWidth);
const updateScroll = () => {
if (!scroller.current)
return;
const scrollWidth = scroller.current.getBoundingClientRect().width;
const unscheduledWidth = scrollWidth;
if (scrollWidth === 0)
return;
const scrolledToChild = scroller.current.scrollLeft > 0 ? (scroller.current.scrollLeft - unscheduledWidth) / (scrollWidth / childWidth) + 1 : 0;
const leftLevel = Math.floor(scrolledToChild);
const rightLevel = Math.ceil(scrolledToChild + childWidth);
if (leftLevel !== scrollViews[0] || rightLevel !== scrollViews[1]) {
setScrollViews([leftLevel, rightLevel]);
}
};
(0, import_react20.useEffect)(updateScroll, [childWidth, calendarMode]);
(0, import_react20.useEffect)(() => {
updateScroll();
}, []);
(0, import_react20.useEffect)(() => {
var _a;
const childNodes = (_a = (0, import_jquery.default)("#time-ruler-times")[0]) == null ? void 0 : _a.childNodes;
if (!childNodes)
return;
const firstElement = childNodes.item(
showingPastDates ? childNodes.length - 2 : 1
);
(0, import_jquery.default)("#time-ruler-times").scrollLeft(firstElement.offsetLeft);
}, [calendarMode, showingPastDates]);
const sensors = useSensors(
...import_obsidian4.Platform.isMobile ? [
useSensor(TouchSensor, {
activationConstraint: {
delay: 250,
tolerance: 5
}
})
] : [
useSensor(PointerSensor, {
activationConstraint: { delay: 100, tolerance: 50 }
}),
useSensor(MouseSensor, {
activationConstraint: { delay: 100, tolerance: 50 }
})
]
);
(0, import_react20.useEffect)(() => {
var _a, _b, _c, _d;
(_b = (_a = (0, import_jquery.default)("#time-ruler").parent()[0]) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty("overflow", "clip", "important");
(_d = (_c = (0, import_jquery.default)("#time-ruler").parent()[0]) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty("padding", "4px 8px 8px", "important");
}, []);
const borders = useAppStore((state) => state.settings.borders);
const frameClass = `p-0.5 child:p-1 child:bg-primary child:rounded-icon child:h-full child:w-full ${borders ? "child:border-solid child:border-divider child:border-[1px]" : ""}`;
const searchStatus = useAppStore((state) => state.searchStatus);
const dragOffset = useAppStore((state) => state.dragOffset);
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
DndContext,
{
onDragStart,
onDragEnd: (ev) => onDragEnd(ev, activeDragRef),
onDragCancel: () => setters.set({ dragData: null }),
collisionDetection: pointerWithin,
measuring: measuringConfig,
sensors,
autoScroll: false,
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
id: "time-ruler",
style: {
height: "100%",
width: "100%",
display: "flex",
flexDirection: "column",
overflow: "hidden",
backgroundColor: "var(--background-secondary)"
},
className: `time-ruler-container sidebar-color`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
DragOverlay,
{
dropAnimation: null,
className: "backdrop-blur opacity-50",
style: {
width: (activeDrag == null ? void 0 : activeDrag.dragType) === "due" ? void 0 : `calc((100% - 48px) / ${trueChildWidth})`,
marginLeft: (activeDrag == null ? void 0 : activeDrag.dragType) === "task" ? `${Math.floor(dragOffset)}px` : ""
},
children: getDragElement()
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Buttons,
{
...{
times,
datesShown,
setWeeksShown,
weeksShownState,
setupStore: reload,
showingPastDates
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
"div",
{
className: `flex h-full w-full snap-mandatory rounded-icon text-base child:flex-none child:snap-start ${childClass} !overflow-x-auto overflow-y-clip child:h-full snap-x`,
id: "time-ruler-times",
"data-auto-scroll": calendarMode ? "y" : "x",
ref: scroller,
onScroll: updateScroll,
children: times.map((time, i) => {
const isShowing = i >= scrollViews[0] && i <= scrollViews[1];
return time.type === "unscheduled" ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
"div",
{
id: "time-ruler-unscheduled",
className: `${frameClass} !w-full flex-none`,
children: isShowing && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Unscheduled_default, {})
},
"unscheduled"
) : /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react20.Fragment, { children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
"div",
{
id: `time-ruler-${getStartDate(
DateTime.fromISO(time.startISO)
)}`,
className: frameClass,
children: isShowing && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Day, { ...time })
}
),
calendarMode && DateTime.fromISO(time.startISO).weekday === 7 ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "!h-0 !w-1" }) : null
] }, time.startISO + "::" + time.type);
})
}
)
]
}
)
}
),
searchStatus && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Search, {})
] });
}
var Buttons = ({
times,
weeksShownState,
setWeeksShown,
setupStore,
showingPastDates
}) => {
const now3 = DateTime.now();
const viewMode = useAppStore((state) => state.settings.viewMode);
const calendarMode = viewMode === "week";
(0, import_react20.useEffect)(() => {
var _a;
(_a = (0, import_jquery.default)(`#time-ruler-${getToday()}`)[0]) == null ? void 0 : _a.scrollIntoView();
}, [viewMode, showingPastDates]);
const nextButton = /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex", children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
onClick: () => setWeeksShown(weeksShownState + (calendarMode ? 4 : 1)),
src: "chevron-right"
}
),
weeksShownState > (calendarMode ? 4 : 0) && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
className: `force-hover rounded-icon`,
onClick: () => setWeeksShown(weeksShownState - (calendarMode ? 4 : 1)),
src: "chevron-left"
}
)
] });
const [showingModal, setShowingModal] = (0, import_react20.useState)(false);
const modalFrame = (0, import_react20.useRef)(null);
const checkShowing = (ev) => {
invariant(modalFrame.current);
const els = document.elementsFromPoint(ev.clientX, ev.clientY);
if (!els.includes(modalFrame.current)) {
setShowingModal(false);
}
};
(0, import_react20.useEffect)(() => {
window.removeEventListener("click", checkShowing);
if (showingModal) {
window.addEventListener("click", checkShowing);
}
return () => window.removeEventListener("click", checkShowing);
}, [showingModal]);
const today = getStartDate(now3);
const yesterday = getStartDate(now3.minus({ days: 1 }));
const tomorrow = getStartDate(now3.plus({ days: 1 }));
const renderButton = (time, i) => {
const start = time.type === "unscheduled" ? void 0 : getStartDate(DateTime.fromISO(time.startISO));
const thisDate = start ? DateTime.fromISO(start) : void 0;
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Droppable,
{
id: (time.type === "unscheduled" ? "unscheduled" : start) + "::button",
data: {
scheduled: start
},
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
className: "h-[28px]",
onClick: () => scrollToSection(
time.type === "unscheduled" ? "unscheduled" : start
),
children: time.type === "unscheduled" ? "None" : thisDate.toFormat("EEE MMM d")
}
)
},
time.type === "unscheduled" ? "unscheduled" : time.startISO
);
};
const hideTimes = useAppStore((state) => state.settings.hideTimes);
const childWidth = useAppStore((state) => state.childWidth);
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_jsx_runtime13.Fragment, { children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: `flex w-full items-center space-x-1 rounded-icon`, children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
className: `${calendarMode ? "" : "flex justify-center h-full space-x-1 items-center"}`,
children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "group relative", children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
src: "more-horizontal",
onClick: (ev) => {
setShowingModal(!showingModal);
ev.stopPropagation();
}
}
),
showingModal && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
"div",
{
className: "tr-menu",
ref: modalFrame,
onClick: () => setShowingModal(false),
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-center", children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
className: "clickable-icon w-full",
onClick: () => {
setters.set({ showingPastDates: !showingPastDates });
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Logo,
{
src: showingPastDates ? "chevron-right" : "chevron-left",
className: "w-6 flex-none"
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "whitespace-nowrap", children: showingPastDates ? "Future" : "Past" })
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
className: "clickable-icon w-full",
onClick: async () => {
setupStore();
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Logo, { src: "rotate-cw", className: "w-6 flex-none" }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { className: "whitespace-nowrap", children: "Reload" })
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
className: "clickable-icon w-full",
onClick: () => {
getters.getObsidianAPI().setSetting({
hideTimes: !hideTimes
});
},
children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Logo, { src: "kanban", className: "w-6 flex-none rotate-90" }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("span", { className: "whitespace-nowrap", children: [
hideTimes ? "Show" : "Hide",
" Times"
] })
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-muted my-1 w-fit", children: "Group By" }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex w-fit", children: [
["path", "Path", "folder-tree"],
["priority", "Priority", "alert-circle"],
["hybrid", "Hybrid", "arrow-down-narrow-wide"],
["tags", "Tags", "hash"],
[false, "None", "x"]
].map(
([groupBy, title, src]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-center", children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
src,
title,
className: `${getters.getApp().isMobile ? "!w-8 !h-8" : "!w-6 !h-6"} !p-0 flex-none`,
onClick: () => {
getters.getObsidianAPI().setSetting({
groupBy
});
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-xs text-faint", children: title })
] }, title)
) }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-muted my-1 w-fit", children: "Layout" }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "flex w-fit", children: [
["hour", "Hours", "square"],
["day", "Days", "gallery-horizontal"],
["week", "Weeks", "layout-grid"]
].map(
([viewMode2, title, src]) => /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "flex flex-col items-center", children: [
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
src,
title,
className: `${getters.getApp().isMobile ? "!w-8 !h-8" : "!w-6 !h-6"} !p-0 flex-none`,
onClick: () => {
getters.getObsidianAPI().setSetting({
viewMode: viewMode2
});
}
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "text-xs text-faint", children: title })
] }, title)
) })
] })
}
)
] }),
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
Button_default,
{
src: "search",
className: `${calendarMode ? "mb-2" : ""}`,
onClick: () => setters.set({ searchStatus: true })
}
),
calendarMode && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NewTask, { dragContainer: "buttons" })
]
}
),
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
"div",
{
className: `no-scrollbar flex w-full snap-mandatory rounded-icon pb-0.5 child:snap-start overflow-x-auto ${calendarMode ? `overflow-y-auto snap-y flex-wrap h-[152px] ${childWidth > 1 ? "*:w-[14.2%] *:!justify-start" : ""}` : "overflow-x-auto snap-x space-x-2 items-center"}`,
"data-auto-scroll": calendarMode ? "y" : "x",
children: [
times.map((time, i) => {
return renderButton(time, i);
}),
nextButton
]
}
),
!calendarMode && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(NewTask, { dragContainer: "buttons" })
] }) });
};
// src/services/calendarApi.ts
var import_ical = __toESM(require_ical2());
var import_lodash15 = __toESM(require_lodash());
var import_obsidian5 = require("obsidian");
var reportedOffline = false;
var CalendarAPI = class extends import_obsidian5.Component {
constructor(settings, removeCalendar) {
super();
this.settings = settings;
this.removeCalendar = removeCalendar;
}
async loadEvents() {
if (!window.navigator.onLine) {
console.warn("Time Ruler: Calendars offline.");
return;
}
const events2 = {};
let i = 0;
let offline = false;
const searchWithinWeeks = getters.get("searchWithinWeeks");
const showingPastDates = getters.get("showingPastDates");
const dateBounds2 = showingPastDates ? [
DateTime.now().minus({ weeks: searchWithinWeeks[1] }),
DateTime.now().plus({ days: 1 })
] : [
DateTime.now().minus({ days: 1 }),
DateTime.now().plus({ weeks: searchWithinWeeks[1] })
];
const calendarLoads = this.settings.calendars.map(async (calendar) => {
var _a, _b, _c, _d;
try {
const data = await (0, import_obsidian5.request)(calendar);
const icsEvents = import_ical.default.parseICS(data);
const calendarName = (_b = (_a = data.match(/CALNAME:(.*)/)) == null ? void 0 : _a[1]) != null ? _b : "Default";
for (let [id, event] of import_lodash15.default.entries(icsEvents)) {
if (!event.start || !event.end || event.type !== "VEVENT")
continue;
if (event.rrule) {
var dates = event.rrule.between(
dateBounds2[0].toJSDate(),
dateBounds2[1].toJSDate()
);
if (dates.length > 0) {
const timeDifference = event.start.getTimezoneOffset() - dates[0].getTimezoneOffset();
dates.forEach((x) => {
x.setTime(x.getTime() - timeDifference * 60 * 1e3);
});
}
if (event.recurrences != void 0) {
for (var r in event.recurrences) {
const dateTime = DateTime.fromJSDate(new Date(r)).setZone(
"local"
);
if (dateTime < dateBounds2[1] && dateTime >= dateBounds2[0]) {
dates.push(new Date(r));
}
}
}
let duration = DateTime.fromJSDate(event.end).toMillis() - DateTime.fromJSDate(event.start).toMillis();
for (let date of dates) {
const dateLookupKey = date.toISOString().substring(0, 10);
let start, end;
if (event.recurrences != void 0 && event.recurrences[dateLookupKey] != void 0) {
const currentEvent = event.recurrences[dateLookupKey];
start = DateTime.fromJSDate(currentEvent.start).setZone("local");
let curDuration = DateTime.fromJSDate(currentEvent.end).toMillis() - start.toMillis();
end = start.plus({ millisecond: curDuration }).setZone("local");
} else if (
// If there's no recurrence override, check for an exception date. Exception dates represent exceptions to the rule.
event.exdate != void 0 && event.exdate[dateLookupKey] != void 0
) {
continue;
} else {
start = DateTime.fromJSDate(date).setZone("local");
end = start.plus({ milliseconds: duration });
}
const startString = event.start["dateOnly"] ? start.toISODate() : toISO(start.setZone("local"));
const endString = event.start["dateOnly"] ? end.toISODate() : toISO(end.setZone("local"));
const thisId = `${id}-${startString}`;
const props = {
id: thisId,
title: (_c = event.summary) != null ? _c : "",
startISO: startString,
endISO: endString,
type: "event",
calendarId: `${i}`,
calendarName,
color: "",
notes: event.description,
location: event.location
};
events2[thisId] = props;
}
} else {
let end = DateTime.fromJSDate(event.end).setZone("local");
if (end < dateBounds2[0])
continue;
let start = DateTime.fromJSDate(event.start).setZone("local");
if (start > dateBounds2[1])
continue;
const startString = event.start["dateOnly"] ? start.toISODate() : toISO(start);
const endString = event.start["dateOnly"] ? end.toISODate() : toISO(end);
const props = {
id,
title: (_d = event.summary) != null ? _d : "",
startISO: startString,
endISO: endString,
type: "event",
calendarId: `${i}`,
calendarName,
color: "",
notes: event.description,
location: event.location
};
events2[id] = props;
}
}
i++;
} catch (err) {
console.error(err);
offline = true;
}
if (offline && !reportedOffline) {
reportedOffline = true;
new import_obsidian5.Notice("Time Ruler: calendars offline.");
}
});
await Promise.all(calendarLoads);
setters.set({ events: events2 });
}
};
// src/index.tsx
var import_jsx_runtime14 = __toESM(require_jsx_runtime());
var TIME_RULER_VIEW = "time-ruler-view";
var TimeRulerView = class extends import_obsidian6.ItemView {
constructor(leaf, plugin) {
super(leaf);
this.plugin = plugin;
this.navigation = false;
this.icon = "ruler";
}
getViewType() {
return TIME_RULER_VIEW;
}
getDisplayText() {
return "Time Ruler";
}
async onOpen() {
this.obsidianAPI = new ObsidianAPI(
this.plugin.settings,
(settings) => {
for (let key2 of import_lodash16.default.keys(settings)) {
this.plugin.settings[key2] = settings[key2];
}
this.plugin.saveSettings();
setters.set({
settings: { ...this.plugin.settings }
});
},
this.app
);
this.calendarLinkAPI = new CalendarAPI(this.plugin.settings, (calendar) => {
import_lodash16.default.pull(this.plugin.settings.calendars, calendar);
this.plugin.saveSettings();
});
this.obsidianAPI.load();
this.calendarLinkAPI.load();
this.root = (0, import_client.createRoot)(this.containerEl.children[1]);
this.root.render(
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(React3.StrictMode, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
App2,
{
apis: {
obsidian: this.obsidianAPI,
calendar: this.calendarLinkAPI
}
}
) })
);
}
async onClose() {
this.root.unmount();
this.obsidianAPI.unload();
this.calendarLinkAPI.unload();
}
};
// src/plugin/SettingsTab.tsx
var import_jquery2 = __toESM(require_jquery());
var import_lodash17 = __toESM(require_lodash());
var import_obsidian7 = require("obsidian");
var import_react21 = __toESM(require_react());
var import_client2 = __toESM(require_client());
var import_jsx_runtime15 = __toESM(require_jsx_runtime());
var WEBCAL = "webcal";
function Calendars({
plugin,
names,
updateCalendars
}) {
(0, import_react21.useEffect)(() => {
(0, import_jquery2.default)(frameRef.current).find("button").each((_i, el) => (0, import_obsidian7.setIcon)(el, "x"));
});
const frameRef = (0, import_react21.useRef)(null);
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { ref: frameRef, style: { paddingBottom: "8px" }, children: plugin.settings.calendars.map((calendar) => /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
"div",
{
style: { display: "flex", alignItems: "center", marginTop: "4px" },
children: [
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
"button",
{
style: { marginRight: "4px" },
onClick: () => {
if (!confirm("Remove this calendar?"))
return;
plugin.settings.calendars = import_lodash17.default.pull(
[...plugin.settings.calendars],
calendar
);
plugin.saveSettings();
updateCalendars();
},
"data-role": "time-ruler-delete"
}
),
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { children: names[calendar] })
]
},
calendar
)) });
}
var SettingsTab = class extends import_obsidian7.PluginSettingTab {
constructor(plugin, app) {
super(app, plugin);
this.plugin = plugin;
this.names = {};
}
updateCalendars() {
this.root.render(
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
Calendars,
{
plugin: this.plugin,
names: this.names,
updateCalendars: () => this.updateCalendars()
}
)
);
}
async addCalendarName(calendar) {
var _a, _b;
const data = await (0, import_obsidian7.request)(calendar);
const name = (_b = (_a = data.match(/CALNAME:(.*)/)) == null ? void 0 : _a[1]) != null ? _b : "Default";
this.names[calendar] = name;
}
async display() {
let { containerEl } = this;
containerEl.empty();
new import_obsidian7.Setting(containerEl).setDesc(
"Reload the Time Ruler view for changes to take effect."
);
const format = new import_obsidian7.Setting(containerEl).setName("Preferred Field Format").setDesc(
"Choose which style of inline fields to use as a default (parses scheduled date/time, due, priority, completion, reminder, and start)."
);
format.addDropdown((dropdown) => {
dropdown.addOptions({
dataview: "Dataview",
"full-calendar": "Full Calendar",
tasks: "Tasks",
simple: "Day Planner"
});
dropdown.setValue(this.plugin.settings.fieldFormat);
dropdown.onChange((value) => {
this.plugin.settings.fieldFormat = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Muted").setDesc("Turn off playing sounds on task completion.").addToggle((toggle) => {
toggle.setValue(this.plugin.settings.muted);
toggle.onChange((value) => {
this.plugin.settings.muted = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Timer Event").setDesc("Toggle the event triggered on timer end.").addDropdown((dropdown) => {
dropdown.addOptions({
notification: "Notification",
sound: "Sound"
});
dropdown.setValue(this.plugin.settings.timerEvent);
dropdown.onChange((value) => {
this.plugin.settings.timerEvent = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Borders").setDesc("Toggle borders around days.").addToggle((toggle) => {
toggle.setValue(this.plugin.settings.borders);
toggle.onChange((value) => {
this.plugin.settings.borders = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("24 Hour Format").setDesc(
"Toggle between AM/PM hours and 24-hour format in the Time Ruler."
).addToggle((toggle) => {
toggle.setValue(this.plugin.settings.twentyFourHourFormat).onChange((value) => {
this.plugin.settings.twentyFourHourFormat = value;
this.plugin.saveSettings();
});
});
const dayStartEnd = new import_obsidian7.Setting(containerEl).setName("Day Start & End").setDesc("Choose the boundaries of the Time Ruler hour tick-marks.");
const hourStart = createSpan();
hourStart.setText("start");
dayStartEnd.controlEl.appendChild(hourStart);
dayStartEnd.addDropdown((component) => {
let options = {};
for (let i = 0; i < 13; i++) {
options[`${i}`] = `${i}:00`;
}
component.addOptions(options).setValue(String(this.plugin.settings.dayStartEnd[0])).onChange((newValue) => {
this.plugin.settings.dayStartEnd = [
parseInt(newValue),
this.plugin.settings.dayStartEnd[1]
];
this.plugin.saveSettings();
});
});
const hourEnd = createSpan();
hourEnd.setText("end");
dayStartEnd.controlEl.appendChild(hourEnd);
dayStartEnd.addDropdown((component) => {
let options = {};
for (let i = 0; i < 24; i++) {
options[`${i}`] = `${i}:00`;
}
component.addOptions(options).setValue(String(this.plugin.settings.dayStartEnd[1])).onChange((newValue) => {
this.plugin.settings.dayStartEnd = [
this.plugin.settings.dayStartEnd[0],
parseInt(newValue)
];
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Extend Blocks to Next").setDesc(
"Extend blocks without defined length to the start of the next block."
).addToggle(
(toggle) => toggle.setValue(this.plugin.settings.extendBlocks).onChange((value) => {
this.plugin.settings.extendBlocks = value;
this.plugin.saveSettings();
})
);
new import_obsidian7.Setting(containerEl).setName("Show Unscheduled Subtasks").setDesc("Show subtasks without a set scheduled date.").addToggle(
(toggle) => toggle.setValue(this.plugin.settings.scheduledSubtasks).onChange((value) => {
this.plugin.settings.scheduledSubtasks = value;
this.plugin.saveSettings();
})
);
new import_obsidian7.Setting(containerEl).setName("Custom Filter").setDesc(
`Enable a custom Dataview filter to filter tasks (at the document level) which is passed to dv.pages('<custom filter>')`
).addText((text) => {
text.setPlaceholder(`dv.pages('<custom filter>')`).setValue(this.plugin.settings.search).onChange((value) => {
this.plugin.settings.search = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Filter Function").setDesc(
`Provide a filter function that takes a task DataArray from dv.pages()['file']['tasks'] and returns the filtered array.`
).addTextArea((text) => {
text.setPlaceholder(
`example: (tasks) => tasks.where(task => task["customProperty"] === true)`
).setValue(this.plugin.settings.filterFunction).onChange((value) => {
this.plugin.settings.filterFunction = value;
this.plugin.saveSettings();
}).inputEl.style.setProperty("width", "100%");
}).controlEl.style.setProperty("width", "100%");
new import_obsidian7.Setting(containerEl).setName("Task Filter").setDesc("Only include tasks which match the following search.").addText(
(text) => text.setPlaceholder("Match text in tasks").setValue(this.plugin.settings.taskSearch).onChange((value) => {
this.plugin.settings.taskSearch = value;
this.plugin.saveSettings();
})
);
const customStatuses2 = new import_obsidian7.Setting(containerEl).setName("Custom Statuses").setDesc(
"Include only, or exclude certain, characters between the double brackets [ ] of a task. Write characters with no separation."
);
customStatuses2.controlEl.appendChild((0, import_jquery2.default)(
/*html*/
`<span>Exclude</span>`
)[0]);
customStatuses2.addToggle(
(toggle) => toggle.setValue(this.plugin.settings.customStatus.include).setTooltip("Exclude the current value")
);
customStatuses2.controlEl.appendChild((0, import_jquery2.default)(
/*html*/
`<span>Include</span>`
)[0]);
customStatuses2.addText((text) => {
text.setValue(this.plugin.settings.customStatus.statuses).setPlaceholder("Statuses").onChange((value) => {
this.plugin.settings.customStatus.statuses = value;
this.plugin.saveSettings();
});
});
new import_obsidian7.Setting(containerEl).setName("Show Completed").setDesc("Show completed tasks").addToggle(
(toggle) => toggle.setValue(this.plugin.settings.showCompleted).onChange((value) => {
this.plugin.settings.showCompleted = value;
this.plugin.saveSettings();
})
);
new import_obsidian7.Setting(containerEl).setName("Add Tasks to End").setDesc("Toggle adding new tasks to the start or end of headings/files.").addToggle(
(toggle) => toggle.setValue(this.plugin.settings.addTaskToEnd).onChange((value) => {
this.plugin.settings.addTaskToEnd = value;
this.plugin.saveSettings();
})
);
new import_obsidian7.Setting(containerEl).setName("Open in Main Tab").setDesc("Toggle opening Time Ruler in the main view vs. the sidebar.").addToggle(
(toggle) => toggle.setValue(this.plugin.settings.openInMain).onChange((value) => {
this.plugin.settings.openInMain = value;
this.plugin.saveSettings();
})
);
let newCalendarLink;
new import_obsidian7.Setting(containerEl).setName("Calendars").setDesc("View readonly calendars in Time Ruler.").addText((text) => {
newCalendarLink = text;
text.inputEl.style.width = "100%";
text.setPlaceholder("Calendar Share Link (iCal format)");
}).addButton((button) => {
button.setIcon("plus");
button.onClick(async () => {
let newValue = newCalendarLink.getValue();
if (newValue.startsWith(WEBCAL)) {
newValue = "https" + newValue.slice(WEBCAL.length);
}
try {
await this.addCalendarName(newValue);
const newCalendars = [...this.plugin.settings.calendars];
newCalendars.push(newValue);
this.plugin.settings.calendars = import_lodash17.default.uniq(newCalendars);
this.plugin.saveSettings();
newCalendarLink.setValue("");
this.updateCalendars();
} catch (err) {
new import_obsidian7.Notice("Time Ruler: Error creating calendar - " + err.message);
}
});
});
this.calendarDisplay = containerEl.appendChild(createEl("div"));
this.root = (0, import_client2.createRoot)(this.calendarDisplay);
await Promise.all(
this.plugin.settings.calendars.map(
(calendar) => this.addCalendarName(calendar)
)
);
this.updateCalendars();
}
};
// src/main.ts
var DEFAULT_SETTINGS = {
calendars: [],
fieldFormat: "dataview",
muted: false,
timerEvent: "notification",
inbox: null,
search: "",
taskSearch: "",
fileOrder: [],
customStatus: {
include: false,
statuses: "-"
},
showCompleted: false,
groupBy: "path",
dayStartEnd: [0, 24],
twentyFourHourFormat: false,
filterFunction: "",
addTaskToEnd: false,
extendBlocks: false,
hideTimes: false,
borders: true,
viewMode: "day",
scheduledSubtasks: true,
openInMain: false
};
var TimeRulerPlugin = class extends import_obsidian8.Plugin {
constructor(app, manifest) {
super(app, manifest);
this.saveSettings = this.saveSettings.bind(this);
}
async onload() {
await this.loadSettings();
this.addSettingTab(new SettingsTab(this, this.app));
this.registerView(TIME_RULER_VIEW, (leaf) => new TimeRulerView(leaf, this));
this.addCommand({
icon: "ruler",
callback: () => this.activateView(this.settings.openInMain),
id: "activate-view",
name: "Open Time Ruler"
});
this.addCommand({
icon: "ruler",
callback: () => this.activateView(true),
id: "activate-view-main",
name: "Open Time Ruler in Main Tab"
});
this.addCommand({
icon: "ruler",
callback: () => this.activateView(false),
id: "activate-view-sidebar",
name: "Open Time Ruler in Sidebar"
});
this.addRibbonIcon("ruler", "Open Time Ruler", () => {
this.activateView(this.settings.openInMain);
});
this.registerEvent(
this.app.workspace.on(
"editor-menu",
(menu, _18, context) => this.openMenu(menu, context)
)
);
this.addCommand({
id: "find-task",
name: "Reveal in Time Ruler",
icon: "ruler",
checkCallback: () => {
this.app.workspace.getActiveFile();
},
editorCallback: (_18, context) => this.jumpToTask(context)
});
}
async jumpToTask(context) {
var _a;
invariant(context.file);
let path2 = context.file.path.replace(".md", "");
if (!path2)
return;
invariant(context.editor);
const cursor = context.editor.getCursor();
if (!cursor)
return;
const line = context.editor.getLine(cursor.line);
if (!line || !/ *- \[ \] /.test(line)) {
new import_obsidian8.Notice("cursor is not on task");
return;
}
const leaf = (_a = this.app.workspace.getLeavesOfType(TIME_RULER_VIEW)) == null ? void 0 : _a[0];
if (!leaf) {
await this.activateView();
} else {
this.app.workspace.revealLeaf(leaf);
}
openTaskInRuler(path2 + "::" + cursor.line);
}
openMenu(menu, context) {
var _a;
const cursor = (_a = context.editor) == null ? void 0 : _a.getCursor();
if (!cursor || !(context instanceof import_obsidian8.MarkdownView))
return;
const line = context.editor.getLine(cursor.line);
if (!line || !/ *- \[ \] /.test(line))
return;
menu.addItem(
(item) => item.setIcon("ruler").setTitle("Reveal in Time Ruler").onClick(() => this.jumpToTask(context))
);
menu.addItem((menu2) => {
const submenu = menu2.setTitle("Do").setIcon("ruler").setSubmenu();
submenu.addItem(
(item) => item.setTitle("Today").onClick(() => this.editTask(context, cursor.line, "today"))
);
submenu.addItem(
(item) => item.setTitle("Tomorrow").onClick(() => this.editTask(context, cursor.line, "tomorrow"))
);
submenu.addItem(
(item) => item.setTitle("Now").onClick(() => this.editTask(context, cursor.line, "now"))
);
submenu.addItem(
(item) => item.setTitle("Next week").onClick(() => this.editTask(context, cursor.line, "next-week"))
);
if (line.match(new RegExp(ISO_MATCH))) {
submenu.addItem(
(item) => item.setTitle("Unschedule").onClick(() => this.editTask(context, cursor.line, "unschedule"))
);
}
});
}
async editTask(context, line, modification) {
invariant(context.file);
const id = context.file.path.replace(".md", "") + "::" + line;
let scheduled;
switch (modification) {
case "now":
scheduled = toISO(roundMinutes(DateTime.now()));
break;
case "today":
scheduled = toISO(roundMinutes(DateTime.now()), true);
break;
case "tomorrow":
scheduled = toISO(roundMinutes(DateTime.now().plus({ day: 1 })), true);
break;
case "next-week":
scheduled = toISO(roundMinutes(DateTime.now().plus({ week: 1 })), true);
break;
case "unschedule":
scheduled = "";
break;
}
setters.patchTasks([id], { scheduled });
}
async activateView(main) {
let dataViewPlugin = (0, import_obsidian_dataview3.getAPI)(this.app);
if (!dataViewPlugin) {
dataViewPlugin = await new Promise((resolve) => {
setTimeout(() => resolve((0, import_obsidian_dataview3.getAPI)(this.app)), 350);
});
if (!dataViewPlugin) {
new import_obsidian8.Notice("Please enable the DataView plugin for Time Ruler to work.");
return;
}
}
this.app.workspace.detachLeavesOfType(TIME_RULER_VIEW);
const leaf = main ? this.app.workspace.getLeaf(true) : this.app.workspace.getRightLeaf(false);
invariant(leaf);
await leaf.setViewState({
type: TIME_RULER_VIEW,
active: true
});
this.app.workspace.revealLeaf(leaf);
}
async loadSettings() {
this.settings = { ...DEFAULT_SETTINGS, ...await this.loadData() };
}
saveSettings() {
this.saveData(this.settings);
}
};
/*! Bundled license information:
lodash/lodash.js:
(**
* @license
* Lodash <https://lodash.com/>
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
* Released under MIT license <https://lodash.com/license>
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
*)
react/cjs/react.development.js:
(**
* @license React
* react.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
scheduler/cjs/scheduler.development.js:
(**
* @license React
* scheduler.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
react-dom/cjs/react-dom.development.js:
(**
* @license React
* react-dom.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
(**
* Checks if an event is supported in the current execution environment.
*
* NOTE: This will not work correctly for non-generic events such as `change`,
* `reset`, `load`, `error`, and `select`.
*
* Borrows from Modernizr.
*
* @param {string} eventNameSuffix Event name, e.g. "click".
* @return {boolean} True if the event is supported.
* @internal
* @license Modernizr 3.0.0pre (Custom Build) | MIT
*)
jquery/dist/jquery.js:
(*!
* jQuery JavaScript Library v3.7.1
* https://jquery.com/
*
* Copyright OpenJS Foundation and other contributors
* Released under the MIT license
* https://jquery.org/license
*
* Date: 2023-08-28T13:37Z
*)
use-sync-external-store/cjs/use-sync-external-store-shim.development.js:
(**
* @license React
* use-sync-external-store-shim.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js:
(**
* @license React
* use-sync-external-store-shim/with-selector.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
moment/moment.js:
(*! moment.js *)
(*! version : 2.30.1 *)
(*! authors : Tim Wood, Iskren Chernev, Moment.js contributors *)
(*! license : MIT *)
(*! momentjs.com *)
react/cjs/react-jsx-runtime.development.js:
(**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*)
rrule/dist/es5/rrule.js:
(*!
* rrule.js - Library for working with recurrence rules for calendar dates.
* https://github.com/jakubroztocil/rrule
*
* Copyright 2010, Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence.
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE
*
* Based on:
* python-dateutil - Extensions to the standard Python datetime module.
* Copyright (c) 2003-2011 - Gustavo Niemeyer <gustavo@niemeyer.net>
* Copyright (c) 2012 - Tomi Pieviläinen <tomi.pievilainen@iki.fi>
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE
*
*)
(*!
* rrule.js - Library for working with recurrence rules for calendar dates.
* https://github.com/jakubroztocil/rrule
*
* Copyright 2010, Jakub Roztocil and Lars Schoning
* Licenced under the BSD licence.
* https://github.com/jakubroztocil/rrule/blob/master/LICENCE
*
*)
*/
/* nosourcemap */