react-chrono
Version:
A Modern Timeline component for React
1,246 lines (1,245 loc) • 259 kB
JavaScript
import { jsx as m, jsxs as le, Fragment as $e } from "react/jsx-runtime";
import te, { useRef as V, useEffect as Z, useMemo as k, useState as ie, useCallback as O, createContext as Rn, useContext as qn, memo as be, forwardRef as xt, startTransition as Fn, useLayoutEffect as Hn, Children as $n, Component as Bn } from "react";
import Vt from "react-dom";
function Vn(e) {
const n = {
// Core props remain the same
items: e.items || [],
mode: Jn(e.mode),
children: e.children,
theme: e.theme,
activeItemIndex: e.activeItemIndex,
allowDynamicUpdate: e.allowDynamicUpdate,
id: e.uniqueId,
onItemSelected: e.onItemSelected,
onScrollEnd: e.onScrollEnd,
onThemeChange: e.onThemeChange,
onRestartSlideshow: e.onRestartSlideshow
};
return Wn(e) && (n.layout = {
cardWidth: e.cardWidth,
cardHeight: e.cardHeight,
pointSize: e.timelinePointDimension,
lineWidth: e.lineWidth,
itemWidth: e.itemWidth,
responsive: e.responsiveBreakPoint !== void 0 || e.enableBreakPoint !== void 0 ? {
...e.responsiveBreakPoint !== void 0 && {
breakpoint: e.responsiveBreakPoint
},
...e.enableBreakPoint !== void 0 && {
enabled: e.enableBreakPoint
}
} : void 0,
positioning: At(e.cardPositionHorizontal) !== void 0 || e.flipLayout !== void 0 ? {
...At(e.cardPositionHorizontal) !== void 0 && {
cardPosition: At(
e.cardPositionHorizontal
)
},
...e.flipLayout !== void 0 && {
flipLayout: e.flipLayout
}
} : void 0,
timelineHeight: e.timelineHeight
}), jn(e) && (n.interaction = {
...e.disableNavOnKey === !0 && {
keyboardNavigation: !1
},
...e.disableClickOnCircle === !0 && { pointClick: !1 },
...e.disableAutoScrollOnClick === !0 && {
autoScroll: !1
},
...e.focusActiveItemOnLoad !== void 0 && {
focusOnLoad: e.focusActiveItemOnLoad
},
...e.highlightCardsOnHover !== void 0 && {
cardHover: e.highlightCardsOnHover
},
...e.disableInteraction !== void 0 && {
disabled: e.disableInteraction
}
}), Gn(e) && (n.content = {
allowHTML: e.parseDetailsAsHTML,
readMore: e.useReadMore,
textOverlay: e.textOverlay,
dateFormat: e.titleDateFormat,
compactText: e.textDensity === "HIGH",
semanticTags: e.semanticTags ? {
...e.semanticTags.cardTitle && {
title: e.semanticTags.cardTitle
},
...e.semanticTags.cardSubtitle && {
subtitle: e.semanticTags.cardSubtitle
}
} : void 0
}), Un(e) && (n.display = {
borderless: e.borderLessCards,
cardsDisabled: e.cardLess,
pointsDisabled: e.disableTimelinePoint,
pointShape: e.timelinePointShape,
allCardsVisible: e.showAllCardsHorizontal,
toolbar: e.disableToolbar === !0 || e.toolbarPosition !== void 0 ? {
...e.disableToolbar === !0 && { enabled: !1 },
...e.toolbarPosition !== void 0 && {
position: e.toolbarPosition
}
} : void 0,
scrollable: e.scrollable
}), Kn(e) && (n.media = {
...e.mediaHeight !== void 0 && {
height: e.mediaHeight
},
...e.mediaSettings?.align !== void 0 && {
align: e.mediaSettings.align
},
...e.mediaSettings?.fit !== void 0 && {
fit: e.mediaSettings.fit
}
}), Zn(e) && (n.animation = {
slideshow: {
...e.slideShow !== void 0 && {
enabled: e.slideShow
},
...e.slideItemDuration !== void 0 && {
duration: e.slideItemDuration
},
...e.slideShowType !== void 0 && {
type: Qn(e.slideShowType)
},
...e.showProgressOnSlideshow !== void 0 && {
showProgress: e.showProgressOnSlideshow
},
...e.showOverallSlideshowProgress !== void 0 && {
showOverallProgress: e.showOverallSlideshowProgress
}
}
}), Xn(e) && (n.style = {
...e.classNames !== void 0 && {
classNames: e.classNames
},
...e.fontSizes !== void 0 && {
fontSizes: e.fontSizes
}
}), Yn(e) && (n.accessibility = {
...e.buttonTexts !== void 0 && {
buttonTexts: e.buttonTexts
}
}), (e.darkMode !== void 0 || e.enableDarkToggle !== void 0) && (n.darkMode = {
...e.darkMode !== void 0 && {
enabled: e.darkMode
},
...e.enableDarkToggle !== void 0 && {
showToggle: e.enableDarkToggle
}
}), n;
}
function Pn(e) {
const n = [];
e.timelinePointDimension !== void 0 && n.push(
"timelinePointDimension is deprecated. Use layout.pointSize instead."
), e.cardPositionHorizontal !== void 0 && n.push(
"cardPositionHorizontal is deprecated. Use layout.positioning.cardPosition instead."
), e.disableNavOnKey !== void 0 && n.push(
"disableNavOnKey is deprecated. Use interaction.keyboardNavigation instead."
), e.disableClickOnCircle !== void 0 && n.push(
"disableClickOnCircle is deprecated. Use interaction.pointClick instead."
), e.disableAutoScrollOnClick !== void 0 && n.push(
"disableAutoScrollOnClick is deprecated. Use interaction.autoScroll instead."
), e.parseDetailsAsHTML !== void 0 && n.push(
"parseDetailsAsHTML is deprecated. Use content.allowHTML instead."
), e.textDensity !== void 0 && n.push(
"textDensity is deprecated. Use content.compactText instead."
), e.borderLessCards !== void 0 && n.push(
"borderLessCards is deprecated. Use display.borderless instead."
), e.cardLess !== void 0 && n.push(
"cardLess is deprecated. Use display.cardsDisabled instead."
), e.showAllCardsHorizontal !== void 0 && n.push(
"showAllCardsHorizontal is deprecated. Use display.allCardsVisible instead."
), e.noUniqueId !== void 0 && n.push(
"noUniqueId is deprecated and no longer needed. Use the id prop if you need custom IDs."
), e.isChild !== void 0 && n.push(
"isChild is an internal prop and should not be used directly."
), process.env.NODE_ENV === "development" && n.length > 0 && console.warn(
`React Chrono: Deprecated props detected. Please migrate to the new grouped prop structure:
` + n.map((r) => ` • ${r}`).join(`
`) + `
For migration guide, visit: https://github.com/prabhuignoto/react-chrono/blob/master/MIGRATION.md`
);
}
function Wn(e) {
return !!(e.cardWidth || e.cardHeight || e.timelinePointDimension || e.lineWidth || e.itemWidth || e.responsiveBreakPoint || e.enableBreakPoint || e.cardPositionHorizontal || e.flipLayout);
}
function jn(e) {
return e.disableNavOnKey !== void 0 || e.disableClickOnCircle !== void 0 || e.disableAutoScrollOnClick !== void 0 || e.focusActiveItemOnLoad !== void 0 || e.highlightCardsOnHover !== void 0 || e.disableInteraction !== void 0;
}
function Gn(e) {
return !!(e.parseDetailsAsHTML !== void 0 || e.useReadMore !== void 0 || e.textOverlay !== void 0 || e.titleDateFormat || e.textDensity || e.semanticTags);
}
function Un(e) {
return !!(e.borderLessCards !== void 0 || e.cardLess !== void 0 || e.disableTimelinePoint !== void 0 || e.timelinePointShape || e.showAllCardsHorizontal !== void 0 || e.disableToolbar !== void 0 || e.toolbarPosition || e.scrollable !== void 0);
}
function Kn(e) {
return !!(e.mediaHeight || e.mediaSettings);
}
function Zn(e) {
return !!(e.slideShow !== void 0 || e.slideItemDuration || e.slideShowType || e.showProgressOnSlideshow !== void 0 || e.showOverallSlideshowProgress !== void 0);
}
function Xn(e) {
return !!(e.classNames || e.fontSizes);
}
function Yn(e) {
return !!e.buttonTexts;
}
function Jn(e) {
switch (e) {
case "VERTICAL":
return "vertical";
case "HORIZONTAL":
return "horizontal";
case "VERTICAL_ALTERNATING":
return "alternating";
case "HORIZONTAL_ALL":
return "horizontal-all";
default:
return "alternating";
}
}
function At(e) {
switch (e) {
case "TOP":
return "top";
case "BOTTOM":
return "bottom";
default:
return;
}
}
function Qn(e) {
switch (e) {
case "slide_in":
case "slide_from_sides":
return "slide";
case "reveal":
return "reveal";
default:
return "fade";
}
}
function Pt(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var gt = { exports: {} }, he = {}, pt = { exports: {} }, Pe = {}, tr;
function Er() {
if (tr) return Pe;
tr = 1;
function e() {
var t = {};
return t["align-content"] = !1, t["align-items"] = !1, t["align-self"] = !1, t["alignment-adjust"] = !1, t["alignment-baseline"] = !1, t.all = !1, t["anchor-point"] = !1, t.animation = !1, t["animation-delay"] = !1, t["animation-direction"] = !1, t["animation-duration"] = !1, t["animation-fill-mode"] = !1, t["animation-iteration-count"] = !1, t["animation-name"] = !1, t["animation-play-state"] = !1, t["animation-timing-function"] = !1, t.azimuth = !1, t["backface-visibility"] = !1, t.background = !0, t["background-attachment"] = !0, t["background-clip"] = !0, t["background-color"] = !0, t["background-image"] = !0, t["background-origin"] = !0, t["background-position"] = !0, t["background-repeat"] = !0, t["background-size"] = !0, t["baseline-shift"] = !1, t.binding = !1, t.bleed = !1, t["bookmark-label"] = !1, t["bookmark-level"] = !1, t["bookmark-state"] = !1, t.border = !0, t["border-bottom"] = !0, t["border-bottom-color"] = !0, t["border-bottom-left-radius"] = !0, t["border-bottom-right-radius"] = !0, t["border-bottom-style"] = !0, t["border-bottom-width"] = !0, t["border-collapse"] = !0, t["border-color"] = !0, t["border-image"] = !0, t["border-image-outset"] = !0, t["border-image-repeat"] = !0, t["border-image-slice"] = !0, t["border-image-source"] = !0, t["border-image-width"] = !0, t["border-left"] = !0, t["border-left-color"] = !0, t["border-left-style"] = !0, t["border-left-width"] = !0, t["border-radius"] = !0, t["border-right"] = !0, t["border-right-color"] = !0, t["border-right-style"] = !0, t["border-right-width"] = !0, t["border-spacing"] = !0, t["border-style"] = !0, t["border-top"] = !0, t["border-top-color"] = !0, t["border-top-left-radius"] = !0, t["border-top-right-radius"] = !0, t["border-top-style"] = !0, t["border-top-width"] = !0, t["border-width"] = !0, t.bottom = !1, t["box-decoration-break"] = !0, t["box-shadow"] = !0, t["box-sizing"] = !0, t["box-snap"] = !0, t["box-suppress"] = !0, t["break-after"] = !0, t["break-before"] = !0, t["break-inside"] = !0, t["caption-side"] = !1, t.chains = !1, t.clear = !0, t.clip = !1, t["clip-path"] = !1, t["clip-rule"] = !1, t.color = !0, t["color-interpolation-filters"] = !0, t["column-count"] = !1, t["column-fill"] = !1, t["column-gap"] = !1, t["column-rule"] = !1, t["column-rule-color"] = !1, t["column-rule-style"] = !1, t["column-rule-width"] = !1, t["column-span"] = !1, t["column-width"] = !1, t.columns = !1, t.contain = !1, t.content = !1, t["counter-increment"] = !1, t["counter-reset"] = !1, t["counter-set"] = !1, t.crop = !1, t.cue = !1, t["cue-after"] = !1, t["cue-before"] = !1, t.cursor = !1, t.direction = !1, t.display = !0, t["display-inside"] = !0, t["display-list"] = !0, t["display-outside"] = !0, t["dominant-baseline"] = !1, t.elevation = !1, t["empty-cells"] = !1, t.filter = !1, t.flex = !1, t["flex-basis"] = !1, t["flex-direction"] = !1, t["flex-flow"] = !1, t["flex-grow"] = !1, t["flex-shrink"] = !1, t["flex-wrap"] = !1, t.float = !1, t["float-offset"] = !1, t["flood-color"] = !1, t["flood-opacity"] = !1, t["flow-from"] = !1, t["flow-into"] = !1, t.font = !0, t["font-family"] = !0, t["font-feature-settings"] = !0, t["font-kerning"] = !0, t["font-language-override"] = !0, t["font-size"] = !0, t["font-size-adjust"] = !0, t["font-stretch"] = !0, t["font-style"] = !0, t["font-synthesis"] = !0, t["font-variant"] = !0, t["font-variant-alternates"] = !0, t["font-variant-caps"] = !0, t["font-variant-east-asian"] = !0, t["font-variant-ligatures"] = !0, t["font-variant-numeric"] = !0, t["font-variant-position"] = !0, t["font-weight"] = !0, t.grid = !1, t["grid-area"] = !1, t["grid-auto-columns"] = !1, t["grid-auto-flow"] = !1, t["grid-auto-rows"] = !1, t["grid-column"] = !1, t["grid-column-end"] = !1, t["grid-column-start"] = !1, t["grid-row"] = !1, t["grid-row-end"] = !1, t["grid-row-start"] = !1, t["grid-template"] = !1, t["grid-template-areas"] = !1, t["grid-template-columns"] = !1, t["grid-template-rows"] = !1, t["hanging-punctuation"] = !1, t.height = !0, t.hyphens = !1, t.icon = !1, t["image-orientation"] = !1, t["image-resolution"] = !1, t["ime-mode"] = !1, t["initial-letters"] = !1, t["inline-box-align"] = !1, t["justify-content"] = !1, t["justify-items"] = !1, t["justify-self"] = !1, t.left = !1, t["letter-spacing"] = !0, t["lighting-color"] = !0, t["line-box-contain"] = !1, t["line-break"] = !1, t["line-grid"] = !1, t["line-height"] = !1, t["line-snap"] = !1, t["line-stacking"] = !1, t["line-stacking-ruby"] = !1, t["line-stacking-shift"] = !1, t["line-stacking-strategy"] = !1, t["list-style"] = !0, t["list-style-image"] = !0, t["list-style-position"] = !0, t["list-style-type"] = !0, t.margin = !0, t["margin-bottom"] = !0, t["margin-left"] = !0, t["margin-right"] = !0, t["margin-top"] = !0, t["marker-offset"] = !1, t["marker-side"] = !1, t.marks = !1, t.mask = !1, t["mask-box"] = !1, t["mask-box-outset"] = !1, t["mask-box-repeat"] = !1, t["mask-box-slice"] = !1, t["mask-box-source"] = !1, t["mask-box-width"] = !1, t["mask-clip"] = !1, t["mask-image"] = !1, t["mask-origin"] = !1, t["mask-position"] = !1, t["mask-repeat"] = !1, t["mask-size"] = !1, t["mask-source-type"] = !1, t["mask-type"] = !1, t["max-height"] = !0, t["max-lines"] = !1, t["max-width"] = !0, t["min-height"] = !0, t["min-width"] = !0, t["move-to"] = !1, t["nav-down"] = !1, t["nav-index"] = !1, t["nav-left"] = !1, t["nav-right"] = !1, t["nav-up"] = !1, t["object-fit"] = !1, t["object-position"] = !1, t.opacity = !1, t.order = !1, t.orphans = !1, t.outline = !1, t["outline-color"] = !1, t["outline-offset"] = !1, t["outline-style"] = !1, t["outline-width"] = !1, t.overflow = !1, t["overflow-wrap"] = !1, t["overflow-x"] = !1, t["overflow-y"] = !1, t.padding = !0, t["padding-bottom"] = !0, t["padding-left"] = !0, t["padding-right"] = !0, t["padding-top"] = !0, t.page = !1, t["page-break-after"] = !1, t["page-break-before"] = !1, t["page-break-inside"] = !1, t["page-policy"] = !1, t.pause = !1, t["pause-after"] = !1, t["pause-before"] = !1, t.perspective = !1, t["perspective-origin"] = !1, t.pitch = !1, t["pitch-range"] = !1, t["play-during"] = !1, t.position = !1, t["presentation-level"] = !1, t.quotes = !1, t["region-fragment"] = !1, t.resize = !1, t.rest = !1, t["rest-after"] = !1, t["rest-before"] = !1, t.richness = !1, t.right = !1, t.rotation = !1, t["rotation-point"] = !1, t["ruby-align"] = !1, t["ruby-merge"] = !1, t["ruby-position"] = !1, t["shape-image-threshold"] = !1, t["shape-outside"] = !1, t["shape-margin"] = !1, t.size = !1, t.speak = !1, t["speak-as"] = !1, t["speak-header"] = !1, t["speak-numeral"] = !1, t["speak-punctuation"] = !1, t["speech-rate"] = !1, t.stress = !1, t["string-set"] = !1, t["tab-size"] = !1, t["table-layout"] = !1, t["text-align"] = !0, t["text-align-last"] = !0, t["text-combine-upright"] = !0, t["text-decoration"] = !0, t["text-decoration-color"] = !0, t["text-decoration-line"] = !0, t["text-decoration-skip"] = !0, t["text-decoration-style"] = !0, t["text-emphasis"] = !0, t["text-emphasis-color"] = !0, t["text-emphasis-position"] = !0, t["text-emphasis-style"] = !0, t["text-height"] = !0, t["text-indent"] = !0, t["text-justify"] = !0, t["text-orientation"] = !0, t["text-overflow"] = !0, t["text-shadow"] = !0, t["text-space-collapse"] = !0, t["text-transform"] = !0, t["text-underline-position"] = !0, t["text-wrap"] = !0, t.top = !1, t.transform = !1, t["transform-origin"] = !1, t["transform-style"] = !1, t.transition = !1, t["transition-delay"] = !1, t["transition-duration"] = !1, t["transition-property"] = !1, t["transition-timing-function"] = !1, t["unicode-bidi"] = !1, t["vertical-align"] = !1, t.visibility = !1, t["voice-balance"] = !1, t["voice-duration"] = !1, t["voice-family"] = !1, t["voice-pitch"] = !1, t["voice-range"] = !1, t["voice-rate"] = !1, t["voice-stress"] = !1, t["voice-volume"] = !1, t.volume = !1, t["white-space"] = !1, t.widows = !1, t.width = !0, t["will-change"] = !1, t["word-break"] = !0, t["word-spacing"] = !0, t["word-wrap"] = !0, t["wrap-flow"] = !1, t["wrap-through"] = !1, t["writing-mode"] = !1, t["z-index"] = !1, t;
}
function n(t, s, c) {
}
function r(t, s, c) {
}
var i = /javascript\s*\:/img;
function a(t, s) {
return i.test(s) ? "" : s;
}
return Pe.whiteList = e(), Pe.getDefaultWhiteList = e, Pe.onAttr = n, Pe.onIgnoreAttr = r, Pe.safeAttrValue = a, Pe;
}
var It, rr;
function Nr() {
return rr || (rr = 1, It = {
indexOf: function(e, n) {
var r, i;
if (Array.prototype.indexOf)
return e.indexOf(n);
for (r = 0, i = e.length; r < i; r++)
if (e[r] === n)
return r;
return -1;
},
forEach: function(e, n, r) {
var i, a;
if (Array.prototype.forEach)
return e.forEach(n, r);
for (i = 0, a = e.length; i < a; i++)
n.call(r, e[i], i, e);
},
trim: function(e) {
return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, "");
},
trimRight: function(e) {
return String.prototype.trimRight ? e.trimRight() : e.replace(/(\s*$)/g, "");
}
}), It;
}
var Lt, nr;
function ei() {
if (nr) return Lt;
nr = 1;
var e = Nr();
function n(r, i) {
r = e.trimRight(r), r[r.length - 1] !== ";" && (r += ";");
var a = r.length, t = !1, s = 0, c = 0, d = "";
function f() {
if (!t) {
var l = e.trim(r.slice(s, c)), u = l.indexOf(":");
if (u !== -1) {
var p = e.trim(l.slice(0, u)), b = e.trim(l.slice(u + 1));
if (p) {
var x = i(s, d.length, p, b, l);
x && (d += x + "; ");
}
}
}
s = c + 1;
}
for (; c < a; c++) {
var g = r[c];
if (g === "/" && r[c + 1] === "*") {
var o = r.indexOf("*/", c + 2);
if (o === -1) break;
c = o + 1, s = c + 1, t = !1;
} else g === "(" ? t = !0 : g === ")" ? t = !1 : g === ";" ? t || f() : g === `
` && f();
}
return e.trim(d);
}
return Lt = n, Lt;
}
var Et, ir;
function ti() {
if (ir) return Et;
ir = 1;
var e = Er(), n = ei();
Nr();
function r(t) {
return t == null;
}
function i(t) {
var s = {};
for (var c in t)
s[c] = t[c];
return s;
}
function a(t) {
t = i(t || {}), t.whiteList = t.whiteList || e.whiteList, t.onAttr = t.onAttr || e.onAttr, t.onIgnoreAttr = t.onIgnoreAttr || e.onIgnoreAttr, t.safeAttrValue = t.safeAttrValue || e.safeAttrValue, this.options = t;
}
return a.prototype.process = function(t) {
if (t = t || "", t = t.toString(), !t) return "";
var s = this, c = s.options, d = c.whiteList, f = c.onAttr, g = c.onIgnoreAttr, o = c.safeAttrValue, l = n(t, function(u, p, b, x, h) {
var v = d[b], _ = !1;
if (v === !0 ? _ = v : typeof v == "function" ? _ = v(x) : v instanceof RegExp && (_ = v.test(x)), _ !== !0 && (_ = !1), x = o(b, x), !!x) {
var S = {
position: p,
sourcePosition: u,
source: h,
isWhite: _
};
if (_) {
var N = f(b, x, S);
return r(N) ? b + ":" + x : N;
} else {
var N = g(b, x, S);
if (!r(N))
return N;
}
}
});
return l;
}, Et = a, Et;
}
var ar;
function Ft() {
return ar || (ar = 1, (function(e, n) {
var r = Er(), i = ti();
function a(s, c) {
var d = new i(c);
return d.process(s);
}
n = e.exports = a, n.FilterCSS = i;
for (var t in r) n[t] = r[t];
typeof window < "u" && (window.filterCSS = e.exports);
})(pt, pt.exports)), pt.exports;
}
var Nt, or;
function Wt() {
return or || (or = 1, Nt = {
indexOf: function(e, n) {
var r, i;
if (Array.prototype.indexOf)
return e.indexOf(n);
for (r = 0, i = e.length; r < i; r++)
if (e[r] === n)
return r;
return -1;
},
forEach: function(e, n, r) {
var i, a;
if (Array.prototype.forEach)
return e.forEach(n, r);
for (i = 0, a = e.length; i < a; i++)
n.call(r, e[i], i, e);
},
trim: function(e) {
return String.prototype.trim ? e.trim() : e.replace(/(^\s*)|(\s*$)/g, "");
},
spaceIndex: function(e) {
var n = /\s|\n|\t/, r = n.exec(e);
return r ? r.index : -1;
}
}), Nt;
}
var sr;
function Or() {
if (sr) return he;
sr = 1;
var e = Ft().FilterCSS, n = Ft().getDefaultWhiteList, r = Wt();
function i() {
return {
a: ["target", "href", "title"],
abbr: ["title"],
address: [],
area: ["shape", "coords", "href", "alt"],
article: [],
aside: [],
audio: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"preload",
"src"
],
b: [],
bdi: ["dir"],
bdo: ["dir"],
big: [],
blockquote: ["cite"],
br: [],
caption: [],
center: [],
cite: [],
code: [],
col: ["align", "valign", "span", "width"],
colgroup: ["align", "valign", "span", "width"],
dd: [],
del: ["datetime"],
details: ["open"],
div: [],
dl: [],
dt: [],
em: [],
figcaption: [],
figure: [],
font: ["color", "size", "face"],
footer: [],
h1: [],
h2: [],
h3: [],
h4: [],
h5: [],
h6: [],
header: [],
hr: [],
i: [],
img: ["src", "alt", "title", "width", "height", "loading"],
ins: ["datetime"],
kbd: [],
li: [],
mark: [],
nav: [],
ol: [],
p: [],
pre: [],
s: [],
section: [],
small: [],
span: [],
sub: [],
summary: [],
sup: [],
strong: [],
strike: [],
table: ["width", "border", "align", "valign"],
tbody: ["align", "valign"],
td: ["width", "rowspan", "colspan", "align", "valign"],
tfoot: ["align", "valign"],
th: ["width", "rowspan", "colspan", "align", "valign"],
thead: ["align", "valign"],
tr: ["rowspan", "align", "valign"],
tt: [],
u: [],
ul: [],
video: [
"autoplay",
"controls",
"crossorigin",
"loop",
"muted",
"playsinline",
"poster",
"preload",
"src",
"height",
"width"
]
};
}
var a = new e();
function t(y, C, w) {
}
function s(y, C, w) {
}
function c(y, C, w) {
}
function d(y, C, w) {
}
function f(y) {
return y.replace(o, "<").replace(l, ">");
}
function g(y, C, w, L) {
if (w = E(w), C === "href" || C === "src") {
if (w = r.trim(w), w === "#") return "#";
if (!(w.substr(0, 7) === "http://" || w.substr(0, 8) === "https://" || w.substr(0, 7) === "mailto:" || w.substr(0, 4) === "tel:" || w.substr(0, 11) === "data:image/" || w.substr(0, 6) === "ftp://" || w.substr(0, 2) === "./" || w.substr(0, 3) === "../" || w[0] === "#" || w[0] === "/"))
return "";
} else if (C === "background") {
if (v.lastIndex = 0, v.test(w))
return "";
} else if (C === "style") {
if (_.lastIndex = 0, _.test(w) || (S.lastIndex = 0, S.test(w) && (v.lastIndex = 0, v.test(w))))
return "";
L !== !1 && (L = L || a, w = L.process(w));
}
return w = M(w), w;
}
var o = /</g, l = />/g, u = /"/g, p = /"/g, b = /&#([a-zA-Z0-9]*);?/gim, x = /:?/gim, h = /&newline;?/gim, v = /((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi, _ = /e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi, S = /u\s*r\s*l\s*\(.*/gi;
function N(y) {
return y.replace(u, """);
}
function A(y) {
return y.replace(p, '"');
}
function R(y) {
return y.replace(b, function(w, L) {
return L[0] === "x" || L[0] === "X" ? String.fromCharCode(parseInt(L.substr(1), 16)) : String.fromCharCode(parseInt(L, 10));
});
}
function I(y) {
return y.replace(x, ":").replace(h, " ");
}
function $(y) {
for (var C = "", w = 0, L = y.length; w < L; w++)
C += y.charCodeAt(w) < 32 ? " " : y.charAt(w);
return r.trim(C);
}
function E(y) {
return y = A(y), y = R(y), y = I(y), y = $(y), y;
}
function M(y) {
return y = N(y), y = f(y), y;
}
function q() {
return "";
}
function j(y, C) {
typeof C != "function" && (C = function() {
});
var w = !Array.isArray(y);
function L(G) {
return w ? !0 : r.indexOf(y, G) !== -1;
}
var F = [], P = !1;
return {
onIgnoreTag: function(G, J, U) {
if (L(G))
if (U.isClosing) {
var X = "[/removed]", D = U.position + X.length;
return F.push([
P !== !1 ? P : U.position,
D
]), P = !1, X;
} else
return P || (P = U.position), "[removed]";
else
return C(G, J, U);
},
remove: function(G) {
var J = "", U = 0;
return r.forEach(F, function(X) {
J += G.slice(U, X[0]), U = X[1];
}), J += G.slice(U), J;
}
};
}
function T(y) {
for (var C = "", w = 0; w < y.length; ) {
var L = y.indexOf("<!--", w);
if (L === -1) {
C += y.slice(w);
break;
}
C += y.slice(w, L);
var F = y.indexOf("-->", L);
if (F === -1)
break;
w = F + 3;
}
return C;
}
function z(y) {
var C = y.split("");
return C = C.filter(function(w) {
var L = w.charCodeAt(0);
return L === 127 ? !1 : L <= 31 ? L === 10 || L === 13 : !0;
}), C.join("");
}
return he.whiteList = i(), he.getDefaultWhiteList = i, he.onTag = t, he.onIgnoreTag = s, he.onTagAttr = c, he.onIgnoreTagAttr = d, he.safeAttrValue = g, he.escapeHtml = f, he.escapeQuote = N, he.unescapeQuote = A, he.escapeHtmlEntities = R, he.escapeDangerHtml5Entities = I, he.clearNonPrintableCharacter = $, he.friendlyAttrValue = E, he.escapeAttrValue = M, he.onIgnoreTagStripAll = q, he.StripTagBody = j, he.stripCommentTag = T, he.stripBlankChar = z, he.attributeWrapSign = '"', he.cssFilter = a, he.getDefaultCSSWhiteList = n, he;
}
var bt = {}, lr;
function Mr() {
if (lr) return bt;
lr = 1;
var e = Wt();
function n(o) {
var l = e.spaceIndex(o), u;
return l === -1 ? u = o.slice(1, -1) : u = o.slice(1, l + 1), u = e.trim(u).toLowerCase(), u.slice(0, 1) === "/" && (u = u.slice(1)), u.slice(-1) === "/" && (u = u.slice(0, -1)), u;
}
function r(o) {
return o.slice(0, 2) === "</";
}
function i(o, l, u) {
var p = "", b = 0, x = !1, h = !1, v = 0, _ = o.length, S = "", N = "";
e: for (v = 0; v < _; v++) {
var A = o.charAt(v);
if (x === !1) {
if (A === "<") {
x = v;
continue;
}
} else if (h === !1) {
if (A === "<") {
p += u(o.slice(b, v)), x = v, b = v;
continue;
}
if (A === ">" || v === _ - 1) {
p += u(o.slice(b, x)), N = o.slice(x, v + 1), S = n(N), p += l(
x,
p.length,
S,
N,
r(N)
), b = v + 1, x = !1;
continue;
}
if (A === '"' || A === "'")
for (var R = 1, I = o.charAt(v - R); I.trim() === "" || I === "="; ) {
if (I === "=") {
h = A;
continue e;
}
I = o.charAt(v - ++R);
}
} else if (A === h) {
h = !1;
continue;
}
}
return b < _ && (p += u(o.substr(b))), p;
}
var a = /[^a-zA-Z0-9\\_:.-]/gim;
function t(o, l) {
var u = 0, p = 0, b = [], x = !1, h = o.length;
function v(R, I) {
if (R = e.trim(R), R = R.replace(a, "").toLowerCase(), !(R.length < 1)) {
var $ = l(R, I || "");
$ && b.push($);
}
}
for (var _ = 0; _ < h; _++) {
var S = o.charAt(_), N, A;
if (x === !1 && S === "=") {
x = o.slice(u, _), u = _ + 1, p = o.charAt(u) === '"' || o.charAt(u) === "'" ? u : c(o, _ + 1);
continue;
}
if (x !== !1 && _ === p) {
if (A = o.indexOf(S, _ + 1), A === -1)
break;
N = e.trim(o.slice(p + 1, A)), v(x, N), x = !1, _ = A, u = _ + 1;
continue;
}
if (/\s|\n|\t/.test(S))
if (o = o.replace(/\s|\n|\t/g, " "), x === !1)
if (A = s(o, _), A === -1) {
N = e.trim(o.slice(u, _)), v(N), x = !1, u = _ + 1;
continue;
} else {
_ = A - 1;
continue;
}
else if (A = d(o, _ - 1), A === -1) {
N = e.trim(o.slice(u, _)), N = g(N), v(x, N), x = !1, u = _ + 1;
continue;
} else
continue;
}
return u < o.length && (x === !1 ? v(o.slice(u)) : v(x, g(e.trim(o.slice(u))))), e.trim(b.join(" "));
}
function s(o, l) {
for (; l < o.length; l++) {
var u = o[l];
if (u !== " ")
return u === "=" ? l : -1;
}
}
function c(o, l) {
for (; l < o.length; l++) {
var u = o[l];
if (u !== " ")
return u === "'" || u === '"' ? l : -1;
}
}
function d(o, l) {
for (; l > 0; l--) {
var u = o[l];
if (u !== " ")
return u === "=" ? l : -1;
}
}
function f(o) {
return o[0] === '"' && o[o.length - 1] === '"' || o[0] === "'" && o[o.length - 1] === "'";
}
function g(o) {
return f(o) ? o.substr(1, o.length - 2) : o;
}
return bt.parseTag = i, bt.parseAttr = t, bt;
}
var Ot, cr;
function ri() {
if (cr) return Ot;
cr = 1;
var e = Ft().FilterCSS, n = Or(), r = Mr(), i = r.parseTag, a = r.parseAttr, t = Wt();
function s(o) {
return o == null;
}
function c(o) {
var l = t.spaceIndex(o);
if (l === -1)
return {
html: "",
closing: o[o.length - 2] === "/"
};
o = t.trim(o.slice(l + 1, -1));
var u = o[o.length - 1] === "/";
return u && (o = t.trim(o.slice(0, -1))), {
html: o,
closing: u
};
}
function d(o) {
var l = {};
for (var u in o)
l[u] = o[u];
return l;
}
function f(o) {
var l = {};
for (var u in o)
Array.isArray(o[u]) ? l[u.toLowerCase()] = o[u].map(function(p) {
return p.toLowerCase();
}) : l[u.toLowerCase()] = o[u];
return l;
}
function g(o) {
o = d(o || {}), o.stripIgnoreTag && (o.onIgnoreTag && console.error(
'Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'
), o.onIgnoreTag = n.onIgnoreTagStripAll), o.whiteList || o.allowList ? o.whiteList = f(o.whiteList || o.allowList) : o.whiteList = n.whiteList, this.attributeWrapSign = o.singleQuotedAttributeValue === !0 ? "'" : n.attributeWrapSign, o.onTag = o.onTag || n.onTag, o.onTagAttr = o.onTagAttr || n.onTagAttr, o.onIgnoreTag = o.onIgnoreTag || n.onIgnoreTag, o.onIgnoreTagAttr = o.onIgnoreTagAttr || n.onIgnoreTagAttr, o.safeAttrValue = o.safeAttrValue || n.safeAttrValue, o.escapeHtml = o.escapeHtml || n.escapeHtml, this.options = o, o.css === !1 ? this.cssFilter = !1 : (o.css = o.css || {}, this.cssFilter = new e(o.css));
}
return g.prototype.process = function(o) {
if (o = o || "", o = o.toString(), !o) return "";
var l = this, u = l.options, p = u.whiteList, b = u.onTag, x = u.onIgnoreTag, h = u.onTagAttr, v = u.onIgnoreTagAttr, _ = u.safeAttrValue, S = u.escapeHtml, N = l.attributeWrapSign, A = l.cssFilter;
u.stripBlankChar && (o = n.stripBlankChar(o)), u.allowCommentTag || (o = n.stripCommentTag(o));
var R = !1;
u.stripIgnoreTagBody && (R = n.StripTagBody(
u.stripIgnoreTagBody,
x
), x = R.onIgnoreTag);
var I = i(
o,
function($, E, M, q, j) {
var T = {
sourcePosition: $,
position: E,
isClosing: j,
isWhite: Object.prototype.hasOwnProperty.call(p, M)
}, z = b(M, q, T);
if (!s(z)) return z;
if (T.isWhite) {
if (T.isClosing)
return "</" + M + ">";
var y = c(q), C = p[M], w = a(y.html, function(L, F) {
var P = t.indexOf(C, L) !== -1, G = h(M, L, F, P);
return s(G) ? P ? (F = _(M, L, F, A), F ? L + "=" + N + F + N : L) : (G = v(M, L, F, P), s(G) ? void 0 : G) : G;
});
return q = "<" + M, w && (q += " " + w), y.closing && (q += " /"), q += ">", q;
} else
return z = x(M, q, T), s(z) ? S(q) : z;
},
S
);
return R && (I = R.remove(I)), I;
}, Ot = g, Ot;
}
var ur;
function ni() {
return ur || (ur = 1, (function(e, n) {
var r = Or(), i = Mr(), a = ri();
function t(c, d) {
var f = new a(d);
return f.process(c);
}
n = e.exports = t, n.filterXSS = t, n.FilterXSS = a, (function() {
for (var c in r)
n[c] = r[c];
for (var d in i)
n[d] = i[d];
})(), typeof window < "u" && (window.filterXSS = e.exports);
function s() {
return typeof self < "u" && typeof DedicatedWorkerGlobalScope < "u" && self instanceof DedicatedWorkerGlobalScope;
}
s() && (self.filterXSS = e.exports);
})(gt, gt.exports)), gt.exports;
}
var ii = ni();
const Ht = /* @__PURE__ */ Pt(ii), Dr = {
cardBgColor: "#ffffff",
cardDetailsBackGround: "#ffffff",
cardDetailsColor: "#004980",
// electric-700
cardMediaBgColor: "#f8fafc",
cardSubtitleColor: "#0061b3",
// electric-600
cardTitleColor: "#0079e6",
// electric-500
detailsColor: "#004980",
// electric-700
iconBackgroundColor: "#0079e6",
// electric-500
nestedCardBgColor: "#f8fafc",
nestedCardDetailsBackGround: "#f8fafc",
nestedCardDetailsColor: "#004980",
// electric-700
nestedCardSubtitleColor: "#0061b3",
// electric-600
nestedCardTitleColor: "#00314d",
// electric-800
primary: "#0079e6",
// electric-500
secondary: "#ffdf00",
titleColor: "#0079e6",
// electric-500
titleColorActive: "#0079e6",
// electric-500
toolbarBgColor: "#f1f5f9",
toolbarBtnBgColor: "#ffffff",
toolbarTextColor: "#00314d",
// electric-800
timelineBgColor: "#ffffff",
// Light mode styling
iconColor: "#0079e6",
// electric-500
buttonHoverBgColor: "#e6f1ff",
// electric-50
buttonActiveBgColor: "#0079e6",
// electric-500
buttonActiveIconColor: "#ffffff",
buttonBorderColor: "#b3d9ff",
// electric-100
buttonHoverBorderColor: "#0079e6",
// electric-500
buttonActiveBorderColor: "#0079e6",
// electric-500
shadowColor: "rgba(0, 121, 230, 0.1)",
glowColor: "rgba(0, 121, 230, 0.2)",
searchHighlightColor: "rgba(0, 121, 230, 0.2)",
darkToggleActiveBgColor: "#0079e6",
// electric-500
darkToggleActiveIconColor: "#ffffff",
darkToggleActiveBorderColor: "#0079e6",
// electric-500
darkToggleGlowColor: "rgba(0, 121, 230, 0.2)"
}, ai = {
cardBgColor: "#1f2937",
cardDetailsBackGround: "#1f2937",
cardDetailsColor: "#f3f4f6",
cardMediaBgColor: "#111827",
cardSubtitleColor: "#d1d5db",
cardTitleColor: "#60a5fa",
detailsColor: "#f3f4f6",
iconBackgroundColor: "#3b82f6",
nestedCardBgColor: "#111827",
nestedCardDetailsBackGround: "#111827",
nestedCardDetailsColor: "#f3f4f6",
nestedCardSubtitleColor: "#d1d5db",
nestedCardTitleColor: "#f9fafb",
primary: "#3b82f6",
secondary: "#fbbf24",
titleColor: "#60a5fa",
titleColorActive: "#60a5fa",
toolbarBgColor: "#111827",
toolbarBtnBgColor: "#374151",
toolbarTextColor: "#f3f4f6",
timelineBgColor: "#111827",
// Dark mode styling - our enhanced colors as defaults
iconColor: "#93c5fd",
buttonHoverBgColor: "#4b5563",
buttonActiveBgColor: "#fbbf24",
buttonActiveIconColor: "#1f2937",
buttonBorderColor: "rgba(255, 255, 255, 0.1)",
buttonHoverBorderColor: "#3b82f6",
buttonActiveBorderColor: "#3b82f6",
shadowColor: "rgba(0, 0, 0, 0.4)",
glowColor: "rgba(59, 130, 246, 0.4)",
searchHighlightColor: "rgba(96, 165, 250, 0.4)",
darkToggleActiveBgColor: "#1e40af",
darkToggleActiveIconColor: "#e2e8f0",
darkToggleActiveBorderColor: "#3b82f6",
darkToggleGlowColor: "rgba(59, 130, 246, 0.4)"
}, oi = Object.freeze({
card: "rc-card",
cardMedia: "rc-card-media",
cardSubTitle: "rc-card-subtitle",
cardText: "rc-card-text",
cardTitle: "rc-card-title",
controls: "rc-controls",
title: "rc-title"
}), si = Object.freeze({
changeDensity: "Change density",
changeDensityOptions: Object.freeze({
high: Object.freeze({
helpText: "Show more items at once",
text: "High"
}),
low: Object.freeze({
helpText: "Show fewer items at once",
text: "Low"
})
}),
changeLayout: "Change layout",
changeLayoutOptions: Object.freeze({
alternating: Object.freeze({
helpText: "Show cards in a vertical layout with alternating fashion",
text: "Alternating"
}),
horizontal: Object.freeze({
helpText: "Show cards in a horizontal layout",
text: "Horizontal"
}),
horizontal_all: Object.freeze({
helpText: "Show all cards in a horizontal layout",
text: "Show all cards"
}),
vertical: Object.freeze({
helpText: "Show cards in a vertical layout",
text: "Vertical"
})
}),
dark: "Switch to Dark Mode",
first: "Go to First",
jumpTo: "Jump to",
last: "Go to Last",
light: "Switch to Light Mode",
next: "Next",
play: "Play Slideshow",
previous: "Previous",
stop: "Stop Slideshow",
searchPlaceholder: "Search Timeline",
searchAriaLabel: "Search timeline content",
clearSearch: "Clear Search",
previousMatch: "Previous Match",
nextMatch: "Next Match",
timelinePoint: "Timeline point"
}), li = /^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/, yt = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", ci = 7, jt = (e, n) => {
if (typeof e != "string" || typeof n != "number")
return `rgba(0, 0, 0, ${Math.max(0, Math.min(1, n || 0))})`;
if (!li.test(e))
return console.warn("Invalid hex color provided:", e), `rgba(0, 0, 0, ${Math.max(0, Math.min(1, n))})`;
let r = e;
e.length === 4 && (r = "#" + e[1] + e[1] + e[2] + e[2] + e[3] + e[3]);
const i = parseInt(r.slice(1), 16), a = i >> 16 & 255, t = i >> 8 & 255, s = i & 255, c = Math.max(0, Math.min(1, n));
return `rgba(${a}, ${t}, ${s}, ${c})`;
}, ui = (e) => e ? ai : Dr, di = () => oi, fi = () => si, mi = (e) => {
switch (e) {
case "VERTICAL_ALTERNATING":
return "slide_from_sides";
case "HORIZONTAL":
case "VERTICAL":
default:
return "reveal";
}
}, at = () => {
if (typeof window < "u" && window.crypto?.getRandomValues)
try {
const a = new Uint8Array(ci);
return window.crypto.getRandomValues(a), Array.from(
a,
(t) => yt[t % yt.length]
).join("");
} catch (a) {
console.error("Error generating unique ID:", a);
}
const e = Date.now().toString(36), n = typeof performance < "u" && performance.now ? performance.now().toString().replace(".", "") : Date.now().toString(), r = parseInt(n.slice(-6), 10), i = Array.from({ length: 8 }, (a, t) => {
const d = Math.pow(2, 32), f = (1664525 * (r + t) + 1013904223) % d;
return yt[f % yt.length];
}).join("");
return `id-${e}-${i}`;
};
function hi(e) {
return /^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/.test(e);
}
function dr(e) {
try {
return new URL(e), !0;
} catch {
return !1;
}
}
function vi(e) {
const n = [];
!e.items || !Array.isArray(e.items) ? n.push({ path: ["items"], message: "Items must be an array" }) : e.items.length === 0 ? n.push({
path: ["items"],
message: "At least one timeline item is required"
}) : e.items.forEach((t, s) => {
t.url && typeof t.url == "string" && !dr(t.url) && n.push({
path: ["items", s.toString(), "url"],
message: "Invalid URL format"
}), t.media?.source?.url && !dr(t.media.source.url) && n.push({
path: ["items", s.toString(), "media", "source", "url"],
message: "Invalid media URL format"
});
});
const r = ["VERTICAL", "HORIZONTAL", "VERTICAL_ALTERNATING"];
return e.mode && !r.includes(e.mode) && n.push({
path: ["mode"],
message: `Mode must be one of: ${r.join(", ")}`
}), [
"cardHeight",
"cardWidth",
"itemWidth",
"lineWidth",
"slideItemDuration",
"activeItemIndex"
].forEach((t) => {
const s = e[t];
s !== void 0 && (typeof s != "number" || s < 0) && n.push({
path: [t],
message: `${t} must be a positive number`
});
}), e.theme && typeof e.theme == "object" && [
"primary",
"secondary",
"cardBgColor",
"cardForeColor",
"titleColor",
"titleColorActive"
].forEach((s) => {
const c = e.theme[s];
c && typeof c == "string" && !hi(c) && n.push({
path: ["theme", s],
message: `${s} must be a valid hex color (e.g., #ff0000 or #f00)`
});
}), [
"slideShow",
"flipLayout",
"cardLess",
"hideControls",
"disableNavOnKey"
].forEach((t) => {
const s = e[t];
s !== void 0 && typeof s != "boolean" && n.push({ path: [t], message: `${t} must be a boolean` });
}), n;
}
function gi(e) {
const n = vi(e);
return n.length === 0 ? { success: !0, data: e } : { success: !1, errors: n };
}
var _t = { exports: {} }, pi = _t.exports, fr;
function bi() {
return fr || (fr = 1, (function(e, n) {
(function(r, i) {
e.exports = i();
})(pi, (function() {
var r = 1e3, i = 6e4, a = 36e5, t = "millisecond", s = "second", c = "minute", d = "hour", f = "day", g = "week", o = "month", l = "quarter", u = "year", p = "date", b = "Invalid Date", x = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, h = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, v = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(T) {
var z = ["th", "st", "nd", "rd"], y = T % 100;
return "[" + T + (z[(y - 20) % 10] || z[y] || z[0]) + "]";
} }, _ = function(T, z, y) {
var C = String(T);
return !C || C.length >= z ? T : "" + Array(z + 1 - C.length).join(y) + T;
}, S = { s: _, z: function(T) {
var z = -T.utcOffset(), y = Math.abs(z), C = Math.floor(y / 60), w = y % 60;
return (z <= 0 ? "+" : "-") + _(C, 2, "0") + ":" + _(w, 2, "0");
}, m: function T(z, y) {
if (z.date() < y.date()) return -T(y, z);
var C = 12 * (y.year() - z.year()) + (y.month() - z.month()), w = z.clone().add(C, o), L = y - w < 0, F = z.clone().add(C + (L ? -1 : 1), o);
return +(-(C + (y - w) / (L ? w - F : F - w)) || 0);
}, a: function(T) {
return T < 0 ? Math.ceil(T) || 0 : Math.floor(T);
}, p: function(T) {
return { M: o, y: u, w: g, d: f, D: p, h: d, m: c, s, ms: t, Q: l }[T] || String(T || "").toLowerCase().replace(/s$/, "");
}, u: function(T) {
return T === void 0;
} }, N = "en", A = {};
A[N] = v;
var R = "$isDayjsObject", I = function(T) {
return T instanceof q || !(!T || !T[R]);
}, $ = function T(z, y, C) {
var w;
if (!z) return N;
if (typeof z == "string") {
var L = z.toLowerCase();
A[L] && (w = L), y && (A[L] = y, w = L);
var F = z.split("-");
if (!w && F.length > 1) return T(F[0]);
} else {
var P = z.name;
A[P] = z, w = P;
}
return !C && w && (N = w), w || !C && N;
}, E = function(T, z) {
if (I(T)) return T.clone();
var y = typeof z == "object" ? z : {};
return y.date = T, y.args = arguments, new q(y);
}, M = S;
M.l = $, M.i = I, M.w = function(T, z) {
return E(T, { locale: z.$L, utc: z.$u, x: z.$x, $offset: z.$offset });
};
var q = (function() {
function T(y) {
this.$L = $(y.locale, null, !0), this.parse(y), this.$x = this.$x || y.x || {}, this[R] = !0;
}
var z = T.prototype;
return z.parse = function(y) {
this.$d = (function(C) {
var w = C.date, L = C.utc;
if (w === null) return /* @__PURE__ */ new Date(NaN);
if (M.u(w)) return /* @__PURE__ */ new Date();
if (w instanceof Date) return new Date(w);
if (typeof w == "string" && !/Z$/i.test(w)) {
var F = w.match(x);
if (F) {
var P = F[2] - 1 || 0, G = (F[7] || "0").substring(0, 3);
return L ? new Date(Date.UTC(F[1], P, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, G)) : new Date(F[1], P, F[3] || 1, F[4] || 0, F[5] || 0, F[6] || 0, G);
}
}
return new Date(w);
})(y), this.init();
}, z.init = function() {
var y = this.$d;
this.$y = y.getFullYear(), this.$M = y.getMonth(), this.$D = y.getDate(), this.$W = y.getDay(), this.$H = y.getHours(), this.$m = y.getMinutes(), this.$s = y.getSeconds(), this.$ms = y.getMilliseconds();
}, z.$utils = function() {
return M;
}, z.isValid = function() {
return this.$d.toString() !== b;
}, z.isSame = function(y, C) {
var w = E(y);
return this.startOf(C) <= w && w <= this.endOf(C);
}, z.isAfter = function(y, C) {
return E(y) < this.startOf(C);
}, z.isBefore = function(y, C) {
return this.endOf(C) < E(y);
}, z.$g = function(y, C, w) {
return M.u(y) ? this[C] : this.set(w, y);
}, z.unix = function() {
return Math.floor(this.valueOf() / 1e3);
}, z.valueOf = function() {
return this.$d.getTime();
}, z.startOf = function(y, C) {
var w = this, L = !!M.u(C) || C, F = M.p(y), P = function(re, ee) {
var ae = M.w(w.$u ? Date.UTC(w.$y, ee, re) : new Date(w.$y, ee, re), w);
return L ? ae : ae.endOf(f);
}, G = function(re, ee) {
return M.w(w.toDate()[re].apply(w.toDate("s"), (L ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ee)), w);
}, J = this.$W, U = this.$M, X = this.$D, D = "set" + (this.$u ? "UTC" : "");
switch (F) {
case u:
return L ? P(1, 0) : P(31, 11);
case o:
return L ? P(1, U) : P(0, U + 1);
case g:
var B = this.$locale().weekStart || 0, K = (J < B ? J + 7 : J) - B;
return P(L ? X - K : X + (6 - K), U);
case f:
case p:
return G(D + "Hours", 0);
case d:
return G(D + "Minutes", 1);
case c:
return G(D + "Seconds", 2);
case s:
return G(D + "Milliseconds", 3);
default:
return this.clone();
}
}, z.endOf = function(y) {
return this.startOf(y, !1);
}, z.$set = function(y, C) {
var w, L = M.p(y), F = "set" + (this.$u ? "UTC" : ""), P = (w = {}, w[f] = F + "Date", w[p] = F + "Date", w[o] = F + "Month", w[u] = F + "FullYear", w[d] = F + "Hours", w[c] = F + "Minutes", w[s] = F + "Seconds", w[t] = F + "Milliseconds", w)[L], G = L === f ? this.$D + (C - this.$W) : C;
if (L === o || L === u) {
var J = this.clone().set(p, 1);
J.$d[P](G), J.init(), this.$d = J.set(p, Math.min(this.$D, J.daysInMonth())).$d;
} else P && this.$d[P](G);
return this.init(), this;
}, z.set = function(y, C) {
return this.clone().$set(y, C);
}, z.get = function(y) {
return this[M.p(y)]();
}, z.add = function(y, C) {
var w, L = this;
y = Number(y);
var F = M.p(C), P = function(U) {
var X = E(L);
return M.w(X.date(X.date() + Math.round(U * y)), L);
};
if (F === o) return this.set(o, this.$M + y);
if (F === u) return this.set(u, this.$y + y);
if (F === f) return P(1);
if (F === g) return P(7);
var G = (w = {}, w[c] = i, w[d] = a, w[s] = r, w)[F] || 1, J = this.$d.getTime() + y * G;
return M.w(J, this);
}, z.subtract = function(y, C) {
return this.add(-1 * y, C);
}, z.format = function(y) {
var C = this, w = this.$locale();
if (!this.isValid()) return w.invalidDate || b;
var L = y || "YYYY-MM-DDTHH:mm:ssZ", F = M.z(this), P = this.$H, G = this.$m, J = this.$M, U = w.weekdays, X = w.months, D = w.meridiem, B = function(ee, ae, Q, se) {
return ee && (ee[ae] || ee(C, L)) || Q[ae].slice(0, se);
}, K = function(ee) {
return M.s(P % 12 || 12, ee, "0");
}, re = D || function(ee, ae, Q) {
var se = ee < 12 ? "AM" : "PM";
return Q ? se.toLowerCase() : se;
};
return L.replace(h, (function(ee, ae) {
return ae || (function(Q) {
switch (Q) {
case "YY":
return String(C.$y).slice(-2);
case "YYYY":
return M.s(C.$y, 4, "0");
case "M":
return J + 1;
case "MM":
return M.s(J + 1, 2, "0");
case "MMM":
return B(w.monthsShort, J, X, 3);
case "MMMM":
return B(X, J);
case "D":
return C.$D;
case "DD":
return M.s(C.$D, 2, "0");
case "d":
return String(C.$W);
case "dd":
return