react-contribution-calendar
Advanced tools
Comparing version 1.3.2 to 1.3.3
import './styles/style.css'; | ||
import Je, { useRef as _r, useState as Rr, useEffect as Dr } from "react"; | ||
var Ee = { exports: {} }, z = {}; | ||
import qe, { useRef as Rr, useState as Tr, useEffect as Sr } from "react"; | ||
var De = { exports: {} }, z = {}; | ||
/** | ||
@@ -13,17 +13,17 @@ * @license React | ||
*/ | ||
var We; | ||
function Sr() { | ||
if (We) | ||
var Ve; | ||
function wr() { | ||
if (Ve) | ||
return z; | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, u = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function p(s, o, b) { | ||
var c, d = {}, _ = null, T = null; | ||
b !== void 0 && (_ = "" + b), o.key !== void 0 && (_ = "" + o.key), o.ref !== void 0 && (T = o.ref); | ||
Ve = 1; | ||
var r = qe, n = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, d = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, v = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function p(s, o, g) { | ||
var c, u = {}, _ = null, T = null; | ||
g !== void 0 && (_ = "" + g), o.key !== void 0 && (_ = "" + o.key), o.ref !== void 0 && (T = o.ref); | ||
for (c in o) | ||
a.call(o, c) && !v.hasOwnProperty(c) && (d[c] = o[c]); | ||
a.call(o, c) && !v.hasOwnProperty(c) && (u[c] = o[c]); | ||
if (s && s.defaultProps) | ||
for (c in o = s.defaultProps, o) | ||
d[c] === void 0 && (d[c] = o[c]); | ||
return { $$typeof: l, type: s, key: _, ref: T, props: d, _owner: u.current }; | ||
u[c] === void 0 && (u[c] = o[c]); | ||
return { $$typeof: n, type: s, key: _, ref: T, props: u, _owner: d.current }; | ||
} | ||
@@ -42,53 +42,53 @@ return z.Fragment = i, z.jsx = p, z.jsxs = p, z; | ||
*/ | ||
var Le; | ||
function Tr() { | ||
return Le || (Le = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), u = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), h = Symbol.iterator, w = "@@iterator"; | ||
function F(e) { | ||
var Be; | ||
function xr() { | ||
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() { | ||
var r = qe, n = Symbol.for("react.element"), i = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), v = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), s = Symbol.for("react.context"), o = Symbol.for("react.forward_ref"), g = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), T = Symbol.for("react.offscreen"), y = Symbol.iterator, S = "@@iterator"; | ||
function C(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = h && e[h] || e[w]; | ||
return typeof r == "function" ? r : null; | ||
var t = y && e[y] || e[S]; | ||
return typeof t == "function" ? t : null; | ||
} | ||
var C = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function D(e) { | ||
var O = r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function R(e) { | ||
{ | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), f = 1; f < r; f++) | ||
n[f - 1] = arguments[f]; | ||
J("error", e, n); | ||
for (var t = arguments.length, l = new Array(t > 1 ? t - 1 : 0), f = 1; f < t; f++) | ||
l[f - 1] = arguments[f]; | ||
J("error", e, l); | ||
} | ||
} | ||
function J(e, r, n) { | ||
function J(e, t, l) { | ||
{ | ||
var f = C.ReactDebugCurrentFrame, m = f.getStackAddendum(); | ||
m !== "" && (r += "%s", n = n.concat([m])); | ||
var R = n.map(function(g) { | ||
return String(g); | ||
var f = O.ReactDebugCurrentFrame, m = f.getStackAddendum(); | ||
m !== "" && (t += "%s", l = l.concat([m])); | ||
var D = l.map(function(b) { | ||
return String(b); | ||
}); | ||
R.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, R); | ||
D.unshift("Warning: " + t), Function.prototype.apply.call(console[e], console, D); | ||
} | ||
} | ||
var H = !1, se = !1, G = !1, fe = !1, ce = !1, K; | ||
K = Symbol.for("react.module.reference"); | ||
function ue(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === v || ce || e === u || e === b || e === c || fe || e === T || H || se || G || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === d || e.$$typeof === p || e.$$typeof === s || e.$$typeof === o || // This needs to include all possible module reference object | ||
var G = !1, K = !1, ue = !1, de = !1, ve = !1, X; | ||
X = Symbol.for("react.module.reference"); | ||
function I(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === v || ve || e === d || e === g || e === c || de || e === T || G || K || ue || typeof e == "object" && e !== null && (e.$$typeof === _ || e.$$typeof === u || e.$$typeof === p || e.$$typeof === s || e.$$typeof === o || // 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. | ||
e.$$typeof === K || e.getModuleId !== void 0)); | ||
e.$$typeof === X || e.getModuleId !== void 0)); | ||
} | ||
function I(e, r, n) { | ||
function Se(e, t, l) { | ||
var f = e.displayName; | ||
if (f) | ||
return f; | ||
var m = r.displayName || r.name || ""; | ||
return m !== "" ? n + "(" + m + ")" : n; | ||
var m = t.displayName || t.name || ""; | ||
return m !== "" ? l + "(" + m + ")" : l; | ||
} | ||
function P(e) { | ||
function Z(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function S(e) { | ||
function w(e) { | ||
if (e == null) | ||
return null; | ||
if (typeof e.tag == "number" && D("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
if (typeof e.tag == "number" && R("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function") | ||
return e.displayName || e.name || null; | ||
@@ -104,5 +104,5 @@ if (typeof e == "string") | ||
return "Profiler"; | ||
case u: | ||
case d: | ||
return "StrictMode"; | ||
case b: | ||
case g: | ||
return "Suspense"; | ||
@@ -115,16 +115,16 @@ case c: | ||
case s: | ||
var r = e; | ||
return P(r) + ".Consumer"; | ||
var t = e; | ||
return Z(t) + ".Consumer"; | ||
case p: | ||
var n = e; | ||
return P(n._context) + ".Provider"; | ||
var l = e; | ||
return Z(l._context) + ".Provider"; | ||
case o: | ||
return I(e, e.render, "ForwardRef"); | ||
case d: | ||
return Se(e, e.render, "ForwardRef"); | ||
case u: | ||
var f = e.displayName || null; | ||
return f !== null ? f : S(e.type) || "Memo"; | ||
return f !== null ? f : w(e.type) || "Memo"; | ||
case _: { | ||
var m = e, R = m._payload, g = m._init; | ||
var m = e, D = m._payload, b = m._init; | ||
try { | ||
return S(g(R)); | ||
return w(b(D)); | ||
} catch { | ||
@@ -137,14 +137,14 @@ return null; | ||
} | ||
var $ = Object.assign, O = 0, M, X, Z, Q, ee, De, Se; | ||
function Te() { | ||
var x = Object.assign, M = 0, P, $, Q, ee, re, te, we; | ||
function xe() { | ||
} | ||
Te.__reactDisabledLog = !0; | ||
function Ke() { | ||
xe.__reactDisabledLog = !0; | ||
function Ze() { | ||
{ | ||
if (O === 0) { | ||
M = console.log, X = console.info, Z = console.warn, Q = console.error, ee = console.group, De = console.groupCollapsed, Se = console.groupEnd; | ||
if (M === 0) { | ||
P = console.log, $ = console.info, Q = console.warn, ee = console.error, re = console.group, te = console.groupCollapsed, we = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: Te, | ||
value: xe, | ||
writable: !0 | ||
@@ -162,8 +162,8 @@ }; | ||
} | ||
O++; | ||
M++; | ||
} | ||
} | ||
function Xe() { | ||
function Qe() { | ||
{ | ||
if (O--, O === 0) { | ||
if (M--, M === 0) { | ||
var e = { | ||
@@ -175,32 +175,32 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: $({}, e, { | ||
value: M | ||
log: x({}, e, { | ||
value: P | ||
}), | ||
info: $({}, e, { | ||
value: X | ||
info: x({}, e, { | ||
value: $ | ||
}), | ||
warn: $({}, e, { | ||
value: Z | ||
}), | ||
error: $({}, e, { | ||
warn: x({}, e, { | ||
value: Q | ||
}), | ||
group: $({}, e, { | ||
error: x({}, e, { | ||
value: ee | ||
}), | ||
groupCollapsed: $({}, e, { | ||
value: De | ||
group: x({}, e, { | ||
value: re | ||
}), | ||
groupEnd: $({}, e, { | ||
value: Se | ||
groupCollapsed: x({}, e, { | ||
value: te | ||
}), | ||
groupEnd: x({}, e, { | ||
value: we | ||
}) | ||
}); | ||
} | ||
O < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
M < 0 && R("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var de = C.ReactCurrentDispatcher, ve; | ||
function re(e, r, n) { | ||
var pe = O.ReactCurrentDispatcher, he; | ||
function ne(e, t, l) { | ||
{ | ||
if (ve === void 0) | ||
if (he === void 0) | ||
try { | ||
@@ -210,33 +210,33 @@ throw Error(); | ||
var f = m.stack.trim().match(/\n( *(at )?)/); | ||
ve = f && f[1] || ""; | ||
he = f && f[1] || ""; | ||
} | ||
return ` | ||
` + ve + e; | ||
` + he + e; | ||
} | ||
} | ||
var pe = !1, te; | ||
var ye = !1, le; | ||
{ | ||
var Ze = typeof WeakMap == "function" ? WeakMap : Map; | ||
te = new Ze(); | ||
var er = typeof WeakMap == "function" ? WeakMap : Map; | ||
le = new er(); | ||
} | ||
function we(e, r) { | ||
if (!e || pe) | ||
function Fe(e, t) { | ||
if (!e || ye) | ||
return ""; | ||
{ | ||
var n = te.get(e); | ||
if (n !== void 0) | ||
return n; | ||
var l = le.get(e); | ||
if (l !== void 0) | ||
return l; | ||
} | ||
var f; | ||
pe = !0; | ||
ye = !0; | ||
var m = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var R; | ||
R = de.current, de.current = null, Ke(); | ||
var D; | ||
D = pe.current, pe.current = null, Ze(); | ||
try { | ||
if (r) { | ||
var g = function() { | ||
if (t) { | ||
var b = function() { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(g.prototype, "props", { | ||
if (Object.defineProperty(b.prototype, "props", { | ||
set: function() { | ||
@@ -247,14 +247,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(g, []); | ||
Reflect.construct(b, []); | ||
} catch (N) { | ||
f = N; | ||
} | ||
Reflect.construct(e, [], g); | ||
Reflect.construct(e, [], b); | ||
} else { | ||
try { | ||
g.call(); | ||
b.call(); | ||
} catch (N) { | ||
f = N; | ||
} | ||
e.call(g.prototype); | ||
e.call(b.prototype); | ||
} | ||
@@ -271,16 +271,16 @@ } else { | ||
if (N && f && typeof N.stack == "string") { | ||
for (var y = N.stack.split(` | ||
for (var h = N.stack.split(` | ||
`), k = f.stack.split(` | ||
`), x = y.length - 1, j = k.length - 1; x >= 1 && j >= 0 && y[x] !== k[j]; ) | ||
`), F = h.length - 1, j = k.length - 1; F >= 1 && j >= 0 && h[F] !== k[j]; ) | ||
j--; | ||
for (; x >= 1 && j >= 0; x--, j--) | ||
if (y[x] !== k[j]) { | ||
if (x !== 1 || j !== 1) | ||
for (; F >= 1 && j >= 0; F--, j--) | ||
if (h[F] !== k[j]) { | ||
if (F !== 1 || j !== 1) | ||
do | ||
if (x--, j--, j < 0 || y[x] !== k[j]) { | ||
if (F--, j--, j < 0 || h[F] !== k[j]) { | ||
var A = ` | ||
` + y[x].replace(" at new ", " at "); | ||
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && te.set(e, A), A; | ||
` + h[F].replace(" at new ", " at "); | ||
return e.displayName && A.includes("<anonymous>") && (A = A.replace("<anonymous>", e.displayName)), typeof e == "function" && le.set(e, A), A; | ||
} | ||
while (x >= 1 && j >= 0); | ||
while (F >= 1 && j >= 0); | ||
break; | ||
@@ -290,26 +290,26 @@ } | ||
} finally { | ||
pe = !1, de.current = R, Xe(), Error.prepareStackTrace = m; | ||
ye = !1, pe.current = D, Qe(), Error.prepareStackTrace = m; | ||
} | ||
var W = e ? e.displayName || e.name : "", Ye = W ? re(W) : ""; | ||
return typeof e == "function" && te.set(e, Ye), Ye; | ||
var W = e ? e.displayName || e.name : "", Le = W ? ne(W) : ""; | ||
return typeof e == "function" && le.set(e, Le), Le; | ||
} | ||
function Qe(e, r, n) { | ||
return we(e, !1); | ||
function rr(e, t, l) { | ||
return Fe(e, !1); | ||
} | ||
function er(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
function tr(e) { | ||
var t = e.prototype; | ||
return !!(t && t.isReactComponent); | ||
} | ||
function ne(e, r, n) { | ||
function ae(e, t, l) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return we(e, er(e)); | ||
return Fe(e, tr(e)); | ||
if (typeof e == "string") | ||
return re(e); | ||
return ne(e); | ||
switch (e) { | ||
case b: | ||
return re("Suspense"); | ||
case g: | ||
return ne("Suspense"); | ||
case c: | ||
return re("SuspenseList"); | ||
return ne("SuspenseList"); | ||
} | ||
@@ -319,9 +319,9 @@ if (typeof e == "object") | ||
case o: | ||
return Qe(e.render); | ||
case d: | ||
return ne(e.type, r, n); | ||
return rr(e.render); | ||
case u: | ||
return ae(e.type, t, l); | ||
case _: { | ||
var f = e, m = f._payload, R = f._init; | ||
var f = e, m = f._payload, D = f._init; | ||
try { | ||
return ne(R(m), r, n); | ||
return ae(D(m), t, l); | ||
} catch { | ||
@@ -333,42 +333,42 @@ } | ||
} | ||
var le = Object.prototype.hasOwnProperty, xe = {}, je = C.ReactDebugCurrentFrame; | ||
function ae(e) { | ||
var oe = Object.prototype.hasOwnProperty, je = {}, Ce = O.ReactDebugCurrentFrame; | ||
function ie(e) { | ||
if (e) { | ||
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null); | ||
je.setExtraStackFrame(n); | ||
var t = e._owner, l = ae(e.type, e._source, t ? t.type : null); | ||
Ce.setExtraStackFrame(l); | ||
} else | ||
je.setExtraStackFrame(null); | ||
Ce.setExtraStackFrame(null); | ||
} | ||
function rr(e, r, n, f, m) { | ||
function nr(e, t, l, f, m) { | ||
{ | ||
var R = Function.call.bind(le); | ||
for (var g in e) | ||
if (R(e, g)) { | ||
var y = void 0; | ||
var D = Function.call.bind(oe); | ||
for (var b in e) | ||
if (D(e, b)) { | ||
var h = void 0; | ||
try { | ||
if (typeof e[g] != "function") { | ||
var k = Error((f || "React class") + ": " + n + " type `" + g + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[g] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
if (typeof e[b] != "function") { | ||
var k = Error((f || "React class") + ": " + l + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw k.name = "Invariant Violation", k; | ||
} | ||
y = e[g](r, g, f, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (x) { | ||
y = x; | ||
h = e[b](t, b, f, l, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (F) { | ||
h = F; | ||
} | ||
y && !(y instanceof Error) && (ae(m), D("%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).", f || "React class", n, g, typeof y), ae(null)), y instanceof Error && !(y.message in xe) && (xe[y.message] = !0, ae(m), D("Failed %s type: %s", n, y.message), ae(null)); | ||
h && !(h instanceof Error) && (ie(m), R("%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).", f || "React class", l, b, typeof h), ie(null)), h instanceof Error && !(h.message in je) && (je[h.message] = !0, ie(m), R("Failed %s type: %s", l, h.message), ie(null)); | ||
} | ||
} | ||
} | ||
var tr = Array.isArray; | ||
function ye(e) { | ||
return tr(e); | ||
var lr = Array.isArray; | ||
function ge(e) { | ||
return lr(e); | ||
} | ||
function nr(e) { | ||
function ar(e) { | ||
{ | ||
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
return n; | ||
var t = typeof Symbol == "function" && Symbol.toStringTag, l = t && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
return l; | ||
} | ||
} | ||
function lr(e) { | ||
function or(e) { | ||
try { | ||
return Fe(e), !1; | ||
return Oe(e), !1; | ||
} catch { | ||
@@ -378,10 +378,10 @@ return !0; | ||
} | ||
function Fe(e) { | ||
function Oe(e) { | ||
return "" + e; | ||
} | ||
function Ce(e) { | ||
if (lr(e)) | ||
return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", nr(e)), Fe(e); | ||
function ke(e) { | ||
if (or(e)) | ||
return R("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ar(e)), Oe(e); | ||
} | ||
var U = C.ReactCurrentOwner, ar = { | ||
var U = O.ReactCurrentOwner, ir = { | ||
key: !0, | ||
@@ -391,8 +391,8 @@ ref: !0, | ||
__source: !0 | ||
}, Oe, ke, he; | ||
he = {}; | ||
function or(e) { | ||
if (le.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
if (r && r.isReactWarning) | ||
}, Pe, Ae, be; | ||
be = {}; | ||
function sr(e) { | ||
if (oe.call(e, "ref")) { | ||
var t = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
if (t && t.isReactWarning) | ||
return !1; | ||
@@ -402,6 +402,6 @@ } | ||
} | ||
function ir(e) { | ||
if (le.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
if (r && r.isReactWarning) | ||
function fr(e) { | ||
if (oe.call(e, "key")) { | ||
var t = Object.getOwnPropertyDescriptor(e, "key").get; | ||
if (t && t.isReactWarning) | ||
return !1; | ||
@@ -411,15 +411,15 @@ } | ||
} | ||
function sr(e, r) { | ||
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) { | ||
var n = S(U.current.type); | ||
he[n] || (D('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', S(U.current.type), e.ref), he[n] = !0); | ||
function cr(e, t) { | ||
if (typeof e.ref == "string" && U.current && t && U.current.stateNode !== t) { | ||
var l = w(U.current.type); | ||
be[l] || (R('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', w(U.current.type), e.ref), be[l] = !0); | ||
} | ||
} | ||
function fr(e, r) { | ||
function ur(e, t) { | ||
{ | ||
var n = function() { | ||
Oe || (Oe = !0, D("%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)", r)); | ||
var l = function() { | ||
Pe || (Pe = !0, R("%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)", t)); | ||
}; | ||
n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
get: n, | ||
l.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
get: l, | ||
configurable: !0 | ||
@@ -429,9 +429,9 @@ }); | ||
} | ||
function cr(e, r) { | ||
function dr(e, t) { | ||
{ | ||
var n = function() { | ||
ke || (ke = !0, D("%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)", r)); | ||
var l = function() { | ||
Ae || (Ae = !0, R("%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)", t)); | ||
}; | ||
n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
get: n, | ||
l.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
get: l, | ||
configurable: !0 | ||
@@ -441,15 +441,15 @@ }); | ||
} | ||
var ur = function(e, r, n, f, m, R, g) { | ||
var y = { | ||
var vr = function(e, t, l, f, m, D, b) { | ||
var h = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
$$typeof: l, | ||
$$typeof: n, | ||
// Built-in properties that belong on the element | ||
type: e, | ||
key: r, | ||
ref: n, | ||
props: g, | ||
key: t, | ||
ref: l, | ||
props: b, | ||
// Record the component responsible for creating this element. | ||
_owner: R | ||
_owner: D | ||
}; | ||
return y._store = {}, Object.defineProperty(y._store, "validated", { | ||
return h._store = {}, Object.defineProperty(h._store, "validated", { | ||
configurable: !1, | ||
@@ -459,3 +459,3 @@ enumerable: !1, | ||
value: !1 | ||
}), Object.defineProperty(y, "_self", { | ||
}), Object.defineProperty(h, "_self", { | ||
configurable: !1, | ||
@@ -465,3 +465,3 @@ enumerable: !1, | ||
value: f | ||
}), Object.defineProperty(y, "_source", { | ||
}), Object.defineProperty(h, "_source", { | ||
configurable: !1, | ||
@@ -471,39 +471,39 @@ enumerable: !1, | ||
value: m | ||
}), Object.freeze && (Object.freeze(y.props), Object.freeze(y)), y; | ||
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h; | ||
}; | ||
function dr(e, r, n, f, m) { | ||
function pr(e, t, l, f, m) { | ||
{ | ||
var R, g = {}, y = null, k = null; | ||
n !== void 0 && (Ce(n), y = "" + n), ir(r) && (Ce(r.key), y = "" + r.key), or(r) && (k = r.ref, sr(r, m)); | ||
for (R in r) | ||
le.call(r, R) && !ar.hasOwnProperty(R) && (g[R] = r[R]); | ||
var D, b = {}, h = null, k = null; | ||
l !== void 0 && (ke(l), h = "" + l), fr(t) && (ke(t.key), h = "" + t.key), sr(t) && (k = t.ref, cr(t, m)); | ||
for (D in t) | ||
oe.call(t, D) && !ir.hasOwnProperty(D) && (b[D] = t[D]); | ||
if (e && e.defaultProps) { | ||
var x = e.defaultProps; | ||
for (R in x) | ||
g[R] === void 0 && (g[R] = x[R]); | ||
var F = e.defaultProps; | ||
for (D in F) | ||
b[D] === void 0 && (b[D] = F[D]); | ||
} | ||
if (y || k) { | ||
if (h || k) { | ||
var j = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
y && fr(g, j), k && cr(g, j); | ||
h && ur(b, j), k && dr(b, j); | ||
} | ||
return ur(e, y, k, m, f, U.current, g); | ||
return vr(e, h, k, m, f, U.current, b); | ||
} | ||
} | ||
var ge = C.ReactCurrentOwner, Pe = C.ReactDebugCurrentFrame; | ||
var me = O.ReactCurrentOwner, $e = O.ReactDebugCurrentFrame; | ||
function Y(e) { | ||
if (e) { | ||
var r = e._owner, n = ne(e.type, e._source, r ? r.type : null); | ||
Pe.setExtraStackFrame(n); | ||
var t = e._owner, l = ae(e.type, e._source, t ? t.type : null); | ||
$e.setExtraStackFrame(l); | ||
} else | ||
Pe.setExtraStackFrame(null); | ||
$e.setExtraStackFrame(null); | ||
} | ||
var be; | ||
be = !1; | ||
function me(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
var Ee; | ||
Ee = !1; | ||
function _e(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === n; | ||
} | ||
function Ae() { | ||
function Me() { | ||
{ | ||
if (ge.current) { | ||
var e = S(ge.current.type); | ||
if (me.current) { | ||
var e = w(me.current.type); | ||
if (e) | ||
@@ -517,9 +517,9 @@ return ` | ||
} | ||
function vr(e) { | ||
function hr(e) { | ||
{ | ||
if (e !== void 0) { | ||
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber; | ||
var t = e.fileName.replace(/^.*[\\\/]/, ""), l = e.lineNumber; | ||
return ` | ||
Check your code at ` + r + ":" + n + "."; | ||
Check your code at ` + t + ":" + l + "."; | ||
} | ||
@@ -529,16 +529,16 @@ return ""; | ||
} | ||
var $e = {}; | ||
function pr(e) { | ||
var Ne = {}; | ||
function yr(e) { | ||
{ | ||
var r = Ae(); | ||
if (!r) { | ||
var n = typeof e == "string" ? e : e.displayName || e.name; | ||
n && (r = ` | ||
var t = Me(); | ||
if (!t) { | ||
var l = typeof e == "string" ? e : e.displayName || e.name; | ||
l && (t = ` | ||
Check the top-level render call using <` + n + ">."); | ||
Check the top-level render call using <` + l + ">."); | ||
} | ||
return r; | ||
return t; | ||
} | ||
} | ||
function Me(e, r) { | ||
function Ie(e, t) { | ||
{ | ||
@@ -548,112 +548,112 @@ if (!e._store || e._store.validated || e.key != null) | ||
e._store.validated = !0; | ||
var n = pr(r); | ||
if ($e[n]) | ||
var l = yr(t); | ||
if (Ne[l]) | ||
return; | ||
$e[n] = !0; | ||
Ne[l] = !0; | ||
var f = ""; | ||
e && e._owner && e._owner !== ge.current && (f = " It was passed a child from " + S(e._owner.type) + "."), Y(e), D('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, f), Y(null); | ||
e && e._owner && e._owner !== me.current && (f = " It was passed a child from " + w(e._owner.type) + "."), Y(e), R('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', l, f), Y(null); | ||
} | ||
} | ||
function Ne(e, r) { | ||
function Ye(e, t) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (ye(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var f = e[n]; | ||
me(f) && Me(f, r); | ||
if (ge(e)) | ||
for (var l = 0; l < e.length; l++) { | ||
var f = e[l]; | ||
_e(f) && Ie(f, t); | ||
} | ||
else if (me(e)) | ||
else if (_e(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var m = F(e); | ||
var m = C(e); | ||
if (typeof m == "function" && m !== e.entries) | ||
for (var R = m.call(e), g; !(g = R.next()).done; ) | ||
me(g.value) && Me(g.value, r); | ||
for (var D = m.call(e), b; !(b = D.next()).done; ) | ||
_e(b.value) && Ie(b.value, t); | ||
} | ||
} | ||
} | ||
function yr(e) { | ||
function gr(e) { | ||
{ | ||
var r = e.type; | ||
if (r == null || typeof r == "string") | ||
var t = e.type; | ||
if (t == null || typeof t == "string") | ||
return; | ||
var n; | ||
if (typeof r == "function") | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === o || // Note: Memo only checks outer props here. | ||
var l; | ||
if (typeof t == "function") | ||
l = t.propTypes; | ||
else if (typeof t == "object" && (t.$$typeof === o || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === d)) | ||
n = r.propTypes; | ||
t.$$typeof === u)) | ||
l = t.propTypes; | ||
else | ||
return; | ||
if (n) { | ||
var f = S(r); | ||
rr(n, e.props, "prop", f, e); | ||
} else if (r.PropTypes !== void 0 && !be) { | ||
be = !0; | ||
var m = S(r); | ||
D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown"); | ||
if (l) { | ||
var f = w(t); | ||
nr(l, e.props, "prop", f, e); | ||
} else if (t.PropTypes !== void 0 && !Ee) { | ||
Ee = !0; | ||
var m = w(t); | ||
R("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && D("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
typeof t.getDefaultProps == "function" && !t.getDefaultProps.isReactClassApproved && R("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
} | ||
function hr(e) { | ||
function br(e) { | ||
{ | ||
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
var f = r[n]; | ||
for (var t = Object.keys(e.props), l = 0; l < t.length; l++) { | ||
var f = t[l]; | ||
if (f !== "children" && f !== "key") { | ||
Y(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), Y(null); | ||
Y(e), R("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", f), Y(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (Y(e), D("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
e.ref !== null && (Y(e), R("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
} | ||
} | ||
function Ie(e, r, n, f, m, R) { | ||
function We(e, t, l, f, m, D) { | ||
{ | ||
var g = ue(e); | ||
if (!g) { | ||
var y = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (y += " 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 k = vr(m); | ||
k ? y += k : y += Ae(); | ||
var x; | ||
e === null ? x = "null" : ye(e) ? x = "array" : e !== void 0 && e.$$typeof === l ? (x = "<" + (S(e.type) || "Unknown") + " />", y = " Did you accidentally export a JSX literal instead of a component?") : x = typeof e, D("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", x, y); | ||
var b = I(e); | ||
if (!b) { | ||
var h = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " 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 k = hr(m); | ||
k ? h += k : h += Me(); | ||
var F; | ||
e === null ? F = "null" : ge(e) ? F = "array" : e !== void 0 && e.$$typeof === n ? (F = "<" + (w(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : F = typeof e, R("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", F, h); | ||
} | ||
var j = dr(e, r, n, m, R); | ||
var j = pr(e, t, l, m, D); | ||
if (j == null) | ||
return j; | ||
if (g) { | ||
var A = r.children; | ||
if (b) { | ||
var A = t.children; | ||
if (A !== void 0) | ||
if (f) | ||
if (ye(A)) { | ||
if (ge(A)) { | ||
for (var W = 0; W < A.length; W++) | ||
Ne(A[W], e); | ||
Ye(A[W], e); | ||
Object.freeze && Object.freeze(A); | ||
} else | ||
D("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."); | ||
R("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 | ||
Ne(A, e); | ||
Ye(A, e); | ||
} | ||
return e === a ? hr(j) : yr(j), j; | ||
return e === a ? br(j) : gr(j), j; | ||
} | ||
} | ||
function gr(e, r, n) { | ||
return Ie(e, r, n, !0); | ||
function mr(e, t, l) { | ||
return We(e, t, l, !0); | ||
} | ||
function br(e, r, n) { | ||
return Ie(e, r, n, !1); | ||
function Er(e, t, l) { | ||
return We(e, t, l, !1); | ||
} | ||
var mr = br, Er = gr; | ||
q.Fragment = a, q.jsx = mr, q.jsxs = Er; | ||
var _r = Er, Dr = mr; | ||
q.Fragment = a, q.jsx = _r, q.jsxs = Dr; | ||
}()), q; | ||
} | ||
process.env.NODE_ENV === "production" ? Ee.exports = Sr() : Ee.exports = Tr(); | ||
var E = Ee.exports; | ||
function _e({ children: t, textColor: l, style: i, colSpan: a, hide: u, ...v }) { | ||
return /* @__PURE__ */ E.jsx("td", { className: "calendar-label", style: i, colSpan: a, ...v, children: u ? void 0 : /* @__PURE__ */ E.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
process.env.NODE_ENV === "production" ? De.exports = wr() : De.exports = xr(); | ||
var E = De.exports; | ||
function Re({ children: r, textColor: n, style: i, colSpan: a, hide: d, ...v }) { | ||
return /* @__PURE__ */ E.jsx("td", { className: "calendar-label", style: i, colSpan: a, ...v, children: d ? void 0 : /* @__PURE__ */ E.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: n }, children: r }) }); | ||
} | ||
const wr = { | ||
const Fr = { | ||
// light themes | ||
@@ -899,4 +899,4 @@ empty: { | ||
} | ||
}, xr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], jr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
}, jr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Cr = (r = /* @__PURE__ */ new Date()) => { | ||
const n = { | ||
Sun: "Sunday", | ||
@@ -922,3 +922,3 @@ Mon: "Monday", | ||
Dec: "December" | ||
}, a = t.toString().split(" "); | ||
}, a = r.toString().split(" "); | ||
return { | ||
@@ -928,48 +928,48 @@ year: a[3], | ||
day: parseInt(a[2], 10), | ||
date: l[a[0]] | ||
date: n[a[0]] | ||
}; | ||
}, Jr = (t) => t.reduce((l, i) => l + i, 0), Fr = (t) => { | ||
const l = jr(new Date(t)); | ||
return `${l.date}, ${l.month} ${l.day}, ${l.year}`; | ||
}, Be = (t, l, i) => `${t}-${String(l + 1).padStart(2, "0")}-${String(i).padStart(2, "0")}`, Cr = (t, l, i) => `${t}-${String(l).padStart(2, "0")}-${String(i).padStart(2, "0")}`, oe = (t) => ({ year: +t.slice(0, 4), month: +t.slice(5, 7), day: +t.slice(8, 10) }), L = (t) => +t.slice(0, 4), Ve = (t) => +t.slice(5, 7), Ur = (t) => +t.slice(8, 10), Or = (t = V()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, Re = (t = V()) => [31, Or(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], kr = (t) => new Date(t).getDay(), B = (t = V()) => new Date(t, 0, 1).getDay(), zr = (t) => new Date(t).getDay(), V = () => (/* @__PURE__ */ new Date()).getFullYear(), qr = (t = V(), l, i) => { | ||
const a = Re(t), u = B(t), v = []; | ||
let p = u; | ||
}, qr = (r) => r.reduce((n, i) => n + i, 0), Or = (r) => { | ||
const n = Cr(new Date(r)); | ||
return `${n.date}, ${n.month} ${n.day}, ${n.year}`; | ||
}, Je = (r, n, i) => `${r}-${String(n + 1).padStart(2, "0")}-${String(i).padStart(2, "0")}`, kr = (r, n, i) => `${r}-${String(n).padStart(2, "0")}-${String(i).padStart(2, "0")}`, se = (r) => ({ year: +r.slice(0, 4), month: +r.slice(5, 7), day: +r.slice(8, 10) }), L = (r) => +r.slice(0, 4), Ue = (r) => +r.slice(5, 7), Hr = (r) => +r.slice(8, 10), Pr = (r = B()) => r % 4 === 0 && r % 100 !== 0 || r % 400 === 0, Te = (r = B()) => [31, Pr(r) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Ar = (r) => new Date(r).getDay(), V = (r = B()) => new Date(r, 0, 1).getDay(), Gr = (r) => new Date(r).getDay(), B = () => (/* @__PURE__ */ new Date()).getFullYear(), Kr = (r = B(), n, i) => { | ||
const a = Te(r), d = V(r), v = []; | ||
let p = d; | ||
for (let s = 0; s < 12; s++) { | ||
const o = a[s]; | ||
let b = 0; | ||
let g = 0; | ||
for (let c = 0; c < o; c++) | ||
p === 0 && b++, p = (p + 1) % 7; | ||
s === 0 && u !== 0 && b++, v.push(b); | ||
p === 0 && g++, p = (p + 1) % 7; | ||
s === 0 && d !== 0 && g++, v.push(g); | ||
} | ||
return t !== l && u !== 0 && l !== i && (v[0] -= 1), v; | ||
}, Pr = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
return t.forEach((i) => { | ||
return r !== n && d !== 0 && n !== i && (v[0] -= 1), v; | ||
}, $r = (r) => { | ||
const n = /* @__PURE__ */ new Map(); | ||
return r.forEach((i) => { | ||
Object.keys(i).forEach((a) => { | ||
l.set(a, i[a]); | ||
n.set(a, i[a]); | ||
}); | ||
}), l; | ||
}, Ue = (t) => typeof t == "string" ? wr[t] : t, Ar = (t, l) => { | ||
}), n; | ||
}, He = (r) => typeof r == "string" ? Fr[r] : r, Mr = (r, n) => { | ||
let i = 0; | ||
for (let a = t; a <= l; ++a) | ||
i += ze(t, a === t); | ||
for (let a = r; a <= n; ++a) | ||
i += Ge(r, a === r); | ||
return new Array(7).fill(0).map(() => new Array(i).fill(0)); | ||
}, $r = (t, l) => { | ||
}, Nr = (r, n) => { | ||
let i = 0; | ||
for (let a = t; a <= l; ++a) | ||
i += ze(t, a === t); | ||
for (let a = r; a <= n; ++a) | ||
i += Ge(r, a === r); | ||
return new Array(7).fill("").map(() => new Array(i).fill("")); | ||
}, ze = (t, l) => { | ||
const i = B(t); | ||
return l || i === 0 ? 53 : 52; | ||
}, Mr = (t, l, i) => { | ||
const a = L(t), u = L(l), v = Ar(a, u); | ||
}, Ge = (r, n) => { | ||
const i = V(r); | ||
return n || i === 0 ? 53 : 52; | ||
}, Ir = (r, n, i) => { | ||
const a = L(r), d = L(n), v = Mr(a, d); | ||
let p = 0, s = 1; | ||
for (let o = a; o <= u; ++o) { | ||
const b = i ? B(o) : (B(o) + 6) % 7, c = Re(o); | ||
let d = 0, _ = 1, T = b; | ||
for (; d < 12; ) { | ||
for (let h = 0; h < c[d]; ++h) | ||
for (let o = a; o <= d; ++o) { | ||
const g = i ? V(o) : (V(o) + 6) % 7, c = Te(o); | ||
let u = 0, _ = 1, T = g; | ||
for (; u < 12; ) { | ||
for (let y = 0; y < c[u]; ++y) | ||
v[T % 7][~~(T / 7) + p] = s, T++, _++, s++; | ||
_ > c[d] && (_ = 1, d++); | ||
_ > c[u] && (_ = 1, u++); | ||
} | ||
@@ -979,14 +979,14 @@ p += ~~(T / 7); | ||
return v; | ||
}, qe = (t, l, i) => { | ||
const a = L(t), u = L(l), v = $r(a, u); | ||
}, Ke = (r, n, i) => { | ||
const a = L(r), d = L(n), v = Nr(a, d); | ||
let p = 0; | ||
for (let s = a; s <= u; ++s) { | ||
const o = i ? B(s) : (B(s) + 6) % 7, b = Re(s); | ||
let c = 0, d = 1, _ = o; | ||
for (let s = a; s <= d; ++s) { | ||
const o = i ? V(s) : (V(s) + 6) % 7, g = Te(s); | ||
let c = 0, u = 1, _ = o; | ||
for (; c < 12; ) { | ||
for (let T = 0; T < b[c]; ++T) { | ||
const h = Cr(s, c + 1, d); | ||
v[_ % 7][~~(_ / 7) + p] = h, _++, d++; | ||
for (let T = 0; T < g[c]; ++T) { | ||
const y = kr(s, c + 1, u); | ||
v[_ % 7][~~(_ / 7) + p] = y, _++, u++; | ||
} | ||
d > b[c] && (d = 1, c++); | ||
u > g[c] && (u = 1, c++); | ||
} | ||
@@ -996,41 +996,38 @@ p += ~~(_ / 7); | ||
return v; | ||
}, ie = (t, l, i) => { | ||
const a = `${t}-01-01`, u = Nr(a, l), v = Mr(a, l, i); | ||
}, fe = (r, n, i) => { | ||
const a = `${r}-01-01`, d = Yr(a, n), v = Ir(a, n, i); | ||
for (let p = 0; p < v.length; ++p) | ||
for (let s = 0; s < v[p].length; ++s) | ||
if (u === v[p][s]) | ||
if (d === v[p][s]) | ||
return { row: p, col: s }; | ||
return { row: 0, col: 0 }; | ||
}, Nr = (t, l) => { | ||
const i = new Date(t); | ||
return (new Date(l).getTime() - i.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, He = (t, l, i, a) => { | ||
const { row: u, col: v } = ie( | ||
L(t), | ||
t, | ||
}, Yr = (r, n) => Math.abs(new Date(r).getTime() - new Date(n).getTime()) / (1e3 * 60 * 60 * 24) + 1, Xe = (r, n, i, a) => { | ||
const { row: d, col: v } = fe( | ||
L(r), | ||
r, | ||
a | ||
), { col: p } = ie(L(t), l, a), s = [], o = []; | ||
let b = -1, c = 0; | ||
for (let d = v; d <= p; ++d) | ||
d === v ? c = Ve(i[u][d]) - 1 : c = Ve(i[0][d]) - 1, c !== b && (s.push(xr[c]), b = c, o.push(0)), o[o.length - 1]++; | ||
), { col: p } = fe(L(r), n, a), s = [], o = []; | ||
let g = -1, c = 0; | ||
for (let u = v; u <= p; ++u) | ||
u === v ? c = Ue(i[d][u]) - 1 : c = Ue(i[0][u]) - 1, c !== g && (s.push(jr[c]), g = c, o.push(0)), o[o.length - 1]++; | ||
return { months: s, colSpans: o }; | ||
}; | ||
function Ir({ start: t, end: l, textColor: i, startsOnSunday: a, cy: u }) { | ||
const v = qe(t, l, a), { day: p } = oe(t), { year: s, month: o, day: b } = oe(l), c = kr(`${s}-${o}-01`), { months: d, colSpans: _ } = He(t, l, v, a); | ||
function Wr({ start: r, end: n, textColor: i, startsOnSunday: a, cy: d }) { | ||
const v = Ke(r, n, a), { day: p } = se(r), { year: s, month: o, day: g } = se(n), c = Ar(`${s}-${o}-01`), { months: u, colSpans: _ } = Xe(r, n, v, a); | ||
return /* @__PURE__ */ E.jsx("thead", { children: /* @__PURE__ */ E.jsxs("tr", { children: [ | ||
/* @__PURE__ */ E.jsx(_e, { className: "day-of-the-week", textColor: i, style: { fontSize: u }, colSpan: 1, children: " " }), | ||
d.map((T, h) => { | ||
let w = _[h]; | ||
_.length === 1 && _[0] === 1 ? w++ : d.length > 1 && b < 10 && c !== 0 && h === d.length - 2 ? w-- : d.length > 1 && b < 10 && c !== 0 && h === d.length - 1 && w++; | ||
const F = h === 0 && d.length > 1 && w <= 1 && p >= 21; | ||
/* @__PURE__ */ E.jsx(Re, { className: "day-of-the-week", textColor: i, style: { fontSize: d }, colSpan: 1, children: " " }), | ||
u.map((T, y) => { | ||
let S = _[y]; | ||
_.length === 1 && _[0] === 1 ? S++ : u.length > 1 && g < 14 && c !== 0 && y === u.length - 2 ? S-- : (u.length > 1 && g < 14 && c !== 0 && y === u.length - 1 || u.length > 1 && g < 14 && y === u.length - 1) && S++; | ||
const C = y === 0 && u.length > 1 && S <= 1 && p >= 21; | ||
return /* @__PURE__ */ E.jsx( | ||
_e, | ||
Re, | ||
{ | ||
textColor: i, | ||
style: { fontSize: u }, | ||
colSpan: w, | ||
hide: F, | ||
style: { fontSize: d }, | ||
colSpan: S, | ||
hide: C, | ||
children: T | ||
}, | ||
h | ||
y | ||
); | ||
@@ -1040,8 +1037,8 @@ }) | ||
} | ||
function Yr({ | ||
cx: t, | ||
theme: l, | ||
function Lr({ | ||
cx: r, | ||
theme: n, | ||
themeProps: i, | ||
dataLevel: a, | ||
style: u, | ||
style: d, | ||
dataTooltip: v, | ||
@@ -1051,36 +1048,36 @@ tooltipSize: p, | ||
}) { | ||
const o = _r(null), [b, c] = Rr(-10), d = (h) => { | ||
if (!h) | ||
const o = Rr(null), [g, c] = Tr(-10), u = (y) => { | ||
if (!y) | ||
return 0; | ||
let w = 0; | ||
return h.childNodes.forEach((F) => { | ||
F.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(F).display !== "none" && w++; | ||
}), w; | ||
}, _ = (h) => { | ||
if (!h || !h.parentNode) | ||
let S = 0; | ||
return y.childNodes.forEach((C) => { | ||
C.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(C).display !== "none" && S++; | ||
}), S; | ||
}, _ = (y) => { | ||
if (!y || !y.parentNode) | ||
return -1; | ||
const w = Array.from(h.parentNode.childNodes); | ||
let F = 0; | ||
for (let C = 0; C < h.cellIndex; C++) | ||
w[C].style.display !== "none" && F++; | ||
return F; | ||
const S = Array.from(y.parentNode.childNodes); | ||
let C = 0; | ||
for (let O = 0; O < y.cellIndex; O++) | ||
S[O].style.display !== "none" && C++; | ||
return C; | ||
}; | ||
Dr(() => { | ||
const h = () => { | ||
var w; | ||
Sr(() => { | ||
const y = () => { | ||
var S; | ||
if (o.current) { | ||
const F = d((w = o.current) == null ? void 0 : w.parentNode), C = _(o.current); | ||
if (F) { | ||
let D = -10; | ||
C / F > 0.33 ? D = Math.max(~~(o.current.cellIndex * -9 * t) / F, -9 * t) : D = Math.max(~~o.current.cellIndex * -30 * t / F, -10), c(D); | ||
const C = u((S = o.current) == null ? void 0 : S.parentNode), O = _(o.current); | ||
if (C) { | ||
let R = -10; | ||
O / C > 0.33 ? R = Math.max(~~(o.current.cellIndex * -9 * r) / C, -9 * r) : R = Math.max(~~o.current.cellIndex * -30 * r / C, -10), c(R); | ||
} | ||
} | ||
}; | ||
return o.current && o.current.addEventListener("mouseover", h), () => { | ||
o.current && o.current.removeEventListener("mouseover", h); | ||
return o.current && o.current.addEventListener("mouseover", y), () => { | ||
o.current && o.current.removeEventListener("mouseover", y); | ||
}; | ||
}, []); | ||
const T = (h) => { | ||
const w = typeof h == "string" ? !1 : h.isTextTheme || !1; | ||
return h === "emoji_positive" || h === "emoji_negative" || w; | ||
const T = (y) => { | ||
const S = typeof y == "string" ? !1 : y.isTextTheme || !1; | ||
return y === "emoji_positive" || y === "emoji_negative" || S; | ||
}; | ||
@@ -1093,6 +1090,6 @@ return /* @__PURE__ */ E.jsx( | ||
style: { | ||
...u, | ||
outline: T(l) ? "transparent" : "1px solid rgba(27, 31, 35, 0.06)", | ||
backgroundColor: T(l) ? "transparent" : i[`level${a}`], | ||
"--tooltip-offset": `${b}px`, | ||
...d, | ||
outline: T(n) ? "transparent" : "1px solid rgba(27, 31, 35, 0.06)", | ||
backgroundColor: T(n) ? "transparent" : i[`level${a}`], | ||
"--tooltip-offset": `${g}px`, | ||
fontSize: p | ||
@@ -1103,12 +1100,12 @@ }, | ||
...s, | ||
children: T(l) ? i[`level${a}`] : void 0 | ||
children: T(n) ? i[`level${a}`] : void 0 | ||
} | ||
); | ||
} | ||
function Wr({ | ||
data: t, | ||
start: l, | ||
function Vr({ | ||
data: r, | ||
start: n, | ||
end: i, | ||
daysOfTheWeek: a, | ||
textColor: u, | ||
textColor: d, | ||
startsOnSunday: v, | ||
@@ -1118,14 +1115,14 @@ includeBoundary: p, | ||
cy: o, | ||
cr: b, | ||
cr: g, | ||
theme: c, | ||
onClick: d | ||
onClick: u | ||
}) { | ||
const { year: _, day: T } = oe(l), { day: h } = oe(i), { row: w, col: F } = ie(_, l, v), { row: C, col: D } = ie(_, i, v), J = qe(l, i, v), { colSpans: H } = He(l, i, J, v), se = v ? a : (() => { | ||
const P = [...a]; | ||
return P.push(P.shift() || ""), P; | ||
})(), G = Ue(c), fe = Pr(t), ce = (P, S) => S == D + 1 && H[H.length - 1] === 1, K = (P, S) => S < F || S > D, ue = (P, S) => S === F && P < w || S === D && P > C, I = () => F === D || h - T <= 7; | ||
return /* @__PURE__ */ E.jsx("tbody", { children: se.map((P, S) => /* @__PURE__ */ E.jsxs("tr", { children: [ | ||
/* @__PURE__ */ E.jsx(_e, { tabIndex: 0, textColor: u, style: { textAlign: "left", fontSize: o, lineHeight: 0 }, children: P }), | ||
J[S].map(($, O) => { | ||
if (D === 0 && O === 1) | ||
const { year: _, day: T } = se(n), { day: y } = se(i), { row: S, col: C } = fe(_, n, v), { row: O, col: R } = fe(_, i, v), J = Ke(n, i, v), { colSpans: G } = Xe(n, i, J, v), K = He(c), ue = $r(r), de = (w, x) => x == R + 1 && G[G.length - 1] === 1, ve = (w, x) => x < C || x > R, X = (w, x) => x === C && w < S || x === R && w > O, I = () => C === R || y - T <= 7, Z = v ? a : (() => { | ||
const w = [...a]; | ||
return w.push(w.shift() || ""), w; | ||
})(); | ||
return /* @__PURE__ */ E.jsx("tbody", { children: Z.map((w, x) => /* @__PURE__ */ E.jsxs("tr", { children: [ | ||
/* @__PURE__ */ E.jsx(Re, { tabIndex: 0, textColor: d, style: { textAlign: "left", fontSize: o, lineHeight: 0 }, children: w }), | ||
J[x].map((M, P) => { | ||
if (R === 0 && P === 1) | ||
return /* @__PURE__ */ E.jsx( | ||
@@ -1139,3 +1136,3 @@ "td", | ||
outline: "none", | ||
borderRadius: b, | ||
borderRadius: g, | ||
outlineOffset: "-1px", | ||
@@ -1145,7 +1142,7 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
O | ||
P | ||
); | ||
if (ce(S, O)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "block" } }, O); | ||
if (ue(S, O)) | ||
if (de(x, P)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "block" } }, P); | ||
if (X(x, P)) | ||
return /* @__PURE__ */ E.jsx( | ||
@@ -1158,4 +1155,4 @@ "td", | ||
height: I() ? o : 0, | ||
outline: p ? `1px solid ${G.level0}` : "none", | ||
borderRadius: b, | ||
outline: p ? `1px solid ${K.level0}` : "none", | ||
borderRadius: g, | ||
outlineOffset: "-1px", | ||
@@ -1165,58 +1162,73 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
O | ||
P | ||
); | ||
if (K(S, O)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "none" } }, O); | ||
const M = fe.get($), X = Fr($), Z = (Q) => { | ||
const ee = { | ||
date: $, | ||
data: M == null ? void 0 : M.data | ||
if (ve(x, P)) | ||
return /* @__PURE__ */ E.jsx("td", { style: { padding: "0", display: "none" } }, P); | ||
const $ = ue.get(M), Q = Or(M), ee = (re) => { | ||
const te = { | ||
date: M, | ||
data: $ == null ? void 0 : $.data | ||
}; | ||
d && d(Q, ee); | ||
u && u(re, te); | ||
}; | ||
return /* @__PURE__ */ E.jsx( | ||
Yr, | ||
Lr, | ||
{ | ||
cx: s, | ||
tabIndex: -1, | ||
style: { width: s, height: o, borderRadius: b }, | ||
dataLevel: M !== void 0 ? M.level : 0, | ||
"data-content": JSON.stringify(M == null ? void 0 : M.data), | ||
dataTooltip: X, | ||
style: { width: s, height: o, borderRadius: g }, | ||
dataLevel: $ !== void 0 ? $.level : 0, | ||
"data-content": JSON.stringify($ == null ? void 0 : $.data), | ||
dataTooltip: Q, | ||
tooltipSize: o, | ||
theme: c, | ||
themeProps: G, | ||
onClick: Z | ||
themeProps: K, | ||
onClick: ee | ||
}, | ||
O | ||
P | ||
); | ||
}) | ||
] }, `${P}-${S}`)) }); | ||
] }, `${w}-${x}`)) }); | ||
} | ||
const Lr = (t, l) => { | ||
const i = new Error(l); | ||
return i.name = t, i; | ||
}; | ||
var Ge = /* @__PURE__ */ ((t) => (t.Number = "Number Error", t.String = "String Error", t))(Ge || {}); | ||
function Br({ textColor: t, cx: l, cy: i, theme: a }) { | ||
const u = Ue(a), v = `4px ${l + 72}px 0 0`, p = (o) => { | ||
const b = typeof o == "string" ? !1 : o.isTextTheme || !1; | ||
return o === "emoji_positive" || o === "emoji_negative" || b; | ||
}, s = (o, b) => p(o) ? { width: l, height: i, fontSize: l } : { width: l, height: i, backgroundColor: u[`level${b}`], outline: "1px solid #1b1f230f" }; | ||
function Br({ textColor: r, cx: n, cy: i, theme: a }) { | ||
const d = He(a), v = `4px ${n + 72}px 0 0`, p = (o) => { | ||
const g = typeof o == "string" ? !1 : o.isTextTheme || !1; | ||
return o === "emoji_positive" || o === "emoji_negative" || g; | ||
}, s = (o, g) => p(o) ? { width: n, height: i, fontSize: n } : { width: n, height: i, backgroundColor: d[`level${g}`], outline: "1px solid #1b1f230f" }; | ||
return /* @__PURE__ */ E.jsx("div", { className: "description", style: { padding: v }, children: /* @__PURE__ */ E.jsxs("div", { className: "themes", children: [ | ||
/* @__PURE__ */ E.jsx("span", { style: { color: t, fontSize: l }, children: "Less" }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 0) }, children: p(a) ? u.level0 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 1) }, children: p(a) ? u.level1 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 2) }, children: p(a) ? u.level2 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 3) }, children: p(a) ? u.level3 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 4) }, children: p(a) ? u.level4 : void 0 }), | ||
/* @__PURE__ */ E.jsx("span", { style: { color: t, fontSize: l }, children: "More" }) | ||
/* @__PURE__ */ E.jsx("span", { style: { color: r, fontSize: n }, children: "Less" }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 0) }, children: p(a) ? d.level0 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 1) }, children: p(a) ? d.level1 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 2) }, children: p(a) ? d.level2 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 3) }, children: p(a) ? d.level3 : void 0 }), | ||
/* @__PURE__ */ E.jsx("div", { className: "cell", style: { ...s(a, 4) }, children: p(a) ? d.level4 : void 0 }), | ||
/* @__PURE__ */ E.jsx("span", { style: { color: r, fontSize: n }, children: "More" }) | ||
] }) }); | ||
} | ||
function Hr({ | ||
data: t = [], | ||
start: l = Be(V(), 0, 1), | ||
end: i = Be(V(), 11, 31), | ||
const ce = (r, n) => { | ||
const i = new Error(n); | ||
return i.name = r, i; | ||
}; | ||
var H = /* @__PURE__ */ ((r) => (r.Number = "Number Error", r.String = "String Error", r.Date = "Date Error", r))(H || {}); | ||
const ze = (r) => { | ||
if (!/^\d{4}-\d{2}-\d{2}$/.test(r)) | ||
throw ce(H.Date, `Invalid date string ${r}. The date string should be 'YYYY-MM-DD' format.`); | ||
try { | ||
return new Date(r).toISOString().slice(0, 10) === r; | ||
} catch { | ||
throw ce(H.Date, `Invalid date string ${r}. Please check the date.`); | ||
} | ||
}, Jr = (r, n) => { | ||
if (r > n) | ||
throw ce(H.Date, "The starting date should be earlier than the ending date."); | ||
}, Ur = (r) => { | ||
if (r.length !== 7) | ||
throw ce(H.Number, "The length of the `daysOfTheWeek` should be exact 7."); | ||
}; | ||
function Xr({ | ||
data: r = [], | ||
start: n = Je(B(), 0, 1), | ||
end: i = Je(B(), 11, 31), | ||
daysOfTheWeek: a = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"], | ||
textColor: u = "#1f2328", | ||
textColor: d = "#1f2328", | ||
startsOnSunday: v = !0, | ||
@@ -1226,22 +1238,20 @@ includeBoundary: p = !0, | ||
cy: o = 10, | ||
cr: b = 2, | ||
cr: g = 2, | ||
theme: c = "grass", | ||
onCellClick: d = (h, w) => console.log(w), | ||
onCellClick: u = (y, S) => console.log(S), | ||
scroll: _ = !1, | ||
style: T | ||
}) { | ||
const h = `0 ${s + 70}px 0 ${s + 10}px`; | ||
if (a.length !== 7) | ||
throw Lr(Ge.Number, "The length of the `daysOfTheWeek` should be exact 7."); | ||
return /* @__PURE__ */ E.jsxs("div", { className: "container", style: T, children: [ | ||
/* @__PURE__ */ E.jsx("div", { className: "calendar", style: { padding: h, overflowX: _ ? "scroll" : "clip" }, children: /* @__PURE__ */ E.jsxs("table", { children: [ | ||
/* @__PURE__ */ E.jsx(Ir, { start: l, end: i, textColor: u, startsOnSunday: v, cy: o }), | ||
const y = `0 ${s + 70}px 0 ${s + 10}px`; | ||
return ze(n), ze(i), Jr(n, i), Ur(a), /* @__PURE__ */ E.jsxs("div", { className: "container", style: T, children: [ | ||
/* @__PURE__ */ E.jsx("div", { className: "calendar", style: { padding: y, overflowX: _ ? "scroll" : "clip" }, children: /* @__PURE__ */ E.jsxs("table", { children: [ | ||
/* @__PURE__ */ E.jsx(Wr, { start: n, end: i, textColor: d, startsOnSunday: v, cy: o }), | ||
/* @__PURE__ */ E.jsx( | ||
Wr, | ||
Vr, | ||
{ | ||
data: t, | ||
start: l, | ||
data: r, | ||
start: n, | ||
end: i, | ||
daysOfTheWeek: a, | ||
textColor: u, | ||
textColor: d, | ||
startsOnSunday: v, | ||
@@ -1251,33 +1261,33 @@ includeBoundary: p, | ||
cy: o, | ||
cr: b, | ||
cr: g, | ||
theme: c, | ||
onClick: d | ||
onClick: u | ||
} | ||
) | ||
] }) }), | ||
/* @__PURE__ */ E.jsx(Br, { textColor: u, cx: s, cy: o, theme: c }) | ||
/* @__PURE__ */ E.jsx(Br, { textColor: d, cx: s, cy: o, theme: c }) | ||
] }); | ||
} | ||
export { | ||
Hr as ContributionCalendar, | ||
Ue as createTheme, | ||
Jr as getArraySum, | ||
qr as getColumnSpansForYears, | ||
V as getCurrentYear, | ||
jr as getDateDetails, | ||
Be as getDateString, | ||
Fr as getDateTooltip, | ||
qe as getDayArray, | ||
kr as getDayIndexFromDateString, | ||
zr as getDayIndexOfMonth, | ||
Nr as getDaysBetween, | ||
B as getFirstDayIndexOfYear, | ||
He as getMonthsAndColSpans, | ||
ie as getRowAndColumnIndexFromDate, | ||
Or as isLeapYear, | ||
oe as parseDateFromDateString, | ||
Ur as parseDayFromDateString, | ||
Pr as parseInputData, | ||
Ve as parseMonthFromDateString, | ||
Xr as ContributionCalendar, | ||
He as createTheme, | ||
qr as getArraySum, | ||
Kr as getColumnSpansForYears, | ||
B as getCurrentYear, | ||
Cr as getDateDetails, | ||
Je as getDateString, | ||
Or as getDateTooltip, | ||
Ke as getDayArray, | ||
Ar as getDayIndexFromDateString, | ||
Gr as getDayIndexOfMonth, | ||
Yr as getDaysBetween, | ||
V as getFirstDayIndexOfYear, | ||
Xe as getMonthsAndColSpans, | ||
fe as getRowAndColumnIndexFromDate, | ||
Pr as isLeapYear, | ||
se as parseDateFromDateString, | ||
Hr as parseDayFromDateString, | ||
$r as parseInputData, | ||
Ue as parseMonthFromDateString, | ||
L as parseYearFromDateString | ||
}; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.3.2 | ||
// Type definitions for react-contribution-calendar 1.3.3 | ||
// Project: https://github.com/encaffeine/react-contribution-calendar | ||
@@ -199,3 +199,3 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark> | ||
* | ||
* @version 1.3.2 | ||
* @version 1.3.3 | ||
* @see {@link https://github.com/encaffeine/react-contribution-calendar#apis} | ||
@@ -202,0 +202,0 @@ */ |
{ | ||
"name": "react-contribution-calendar", | ||
"description": "A GitHub-like contribution calendar component for React", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"type": "module", | ||
@@ -45,12 +45,12 @@ "main": "./dist/index.js", | ||
"devDependencies": { | ||
"@types/node": "^20.5.0", | ||
"@types/react": "^18.2.20", | ||
"@types/node": "^20.5.9", | ||
"@types/react": "^18.2.21", | ||
"@types/react-dom": "^18.2.7", | ||
"@typescript-eslint/eslint-plugin": "^6.4.0", | ||
"@typescript-eslint/parser": "^6.4.0", | ||
"@typescript-eslint/eslint-plugin": "^6.5.0", | ||
"@typescript-eslint/parser": "^6.5.0", | ||
"@vitejs/plugin-react": "^4.0.4", | ||
"@vitejs/plugin-react-swc": "^3.3.2", | ||
"eslint": "^8.47.0", | ||
"eslint": "^8.48.0", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.33.1", | ||
"eslint-plugin-react": "^7.33.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
@@ -61,5 +61,5 @@ "eslint-plugin-react-refresh": "^0.4.3", | ||
"react-dom": "^18.2.0", | ||
"typescript": "^5.1.6", | ||
"typescript": "^5.2.2", | ||
"vite": "^4.4.9", | ||
"vite-plugin-dts": "^3.5.2", | ||
"vite-plugin-dts": "^3.5.3", | ||
"vite-plugin-libcss": "^1.1.1", | ||
@@ -66,0 +66,0 @@ "vite-tsconfig-paths": "^4.2.0" |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
86701
1671