react-contribution-calendar
Advanced tools
Comparing version 1.2.2 to 1.2.3
1018
dist/index.js
import './styles/style.css'; | ||
import Ve, { useRef as hr, useState as gr, useEffect as mr } from "react"; | ||
var pe = { exports: {} }, G = {}; | ||
import Je, { useRef as gr, useState as mr, useEffect as Er } from "react"; | ||
var ye = { exports: {} }, q = {}; | ||
/** | ||
@@ -13,21 +13,21 @@ * @license React | ||
*/ | ||
var Ye; | ||
function Er() { | ||
if (Ye) | ||
return G; | ||
Ye = 1; | ||
var n = Ve, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, b = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function s(u, c, _) { | ||
var v, f = {}, E = null, y = null; | ||
_ !== void 0 && (E = "" + _), c.key !== void 0 && (E = "" + c.key), c.ref !== void 0 && (y = c.ref); | ||
for (v in c) | ||
a.call(c, v) && !g.hasOwnProperty(v) && (f[v] = c[v]); | ||
var We; | ||
function _r() { | ||
if (We) | ||
return q; | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function i(u, d, E) { | ||
var c, f = {}, m = null, p = null; | ||
E !== void 0 && (m = "" + E), d.key !== void 0 && (m = "" + d.key), d.ref !== void 0 && (p = d.ref); | ||
for (c in d) | ||
o.call(d, c) && !g.hasOwnProperty(c) && (f[c] = d[c]); | ||
if (u && u.defaultProps) | ||
for (v in c = u.defaultProps, c) | ||
f[v] === void 0 && (f[v] = c[v]); | ||
return { $$typeof: l, type: u, key: E, ref: y, props: f, _owner: b.current }; | ||
for (c in d = u.defaultProps, d) | ||
f[c] === void 0 && (f[c] = d[c]); | ||
return { $$typeof: l, type: u, key: m, ref: p, props: f, _owner: h.current }; | ||
} | ||
return G.Fragment = o, G.jsx = s, G.jsxs = s, G; | ||
return q.Fragment = a, q.jsx = i, q.jsxs = i, q; | ||
} | ||
var H = {}; | ||
var z = {}; | ||
/** | ||
@@ -42,53 +42,53 @@ * @license React | ||
*/ | ||
var We; | ||
function _r() { | ||
return We || (We = 1, process.env.NODE_ENV !== "production" && function() { | ||
var n = Ve, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), b = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), u = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), S = Symbol.iterator, F = "@@iterator"; | ||
function k(e) { | ||
var Be; | ||
function Rr() { | ||
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), p = Symbol.for("react.offscreen"), R = Symbol.iterator, O = "@@iterator"; | ||
function A(e) { | ||
if (e === null || typeof e != "object") | ||
return null; | ||
var r = S && e[S] || e[F]; | ||
var r = R && e[R] || e[O]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var $ = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function D(e) { | ||
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function T(e) { | ||
{ | ||
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), i = 1; i < r; i++) | ||
t[i - 1] = arguments[i]; | ||
z("error", e, t); | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++) | ||
n[s - 1] = arguments[s]; | ||
le("error", e, n); | ||
} | ||
} | ||
function z(e, r, t) { | ||
function le(e, r, n) { | ||
{ | ||
var i = $.ReactDebugCurrentFrame, h = i.getStackAddendum(); | ||
h !== "" && (r += "%s", t = t.concat([h])); | ||
var m = t.map(function(p) { | ||
return String(p); | ||
var s = k.ReactDebugCurrentFrame, b = s.getStackAddendum(); | ||
b !== "" && (r += "%s", n = n.concat([b])); | ||
var _ = n.map(function(y) { | ||
return String(y); | ||
}); | ||
m.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, m); | ||
_.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _); | ||
} | ||
} | ||
var ne = !1, le = !1, ae = !1, P = !1, O = !1, B; | ||
B = Symbol.for("react.module.reference"); | ||
function N(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === g || O || e === b || e === _ || e === v || P || e === y || ne || le || ae || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === f || e.$$typeof === s || e.$$typeof === u || e.$$typeof === c || // This needs to include all possible module reference object | ||
var Ee = !1, H = !1, ae = !1, oe = !1, ie = !1, $; | ||
$ = Symbol.for("react.module.reference"); | ||
function M(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === o || e === g || ie || e === h || e === E || e === c || oe || e === p || Ee || H || ae || typeof e == "object" && e !== null && (e.$$typeof === m || e.$$typeof === f || e.$$typeof === i || e.$$typeof === u || e.$$typeof === d || // 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 === B || e.getModuleId !== void 0)); | ||
e.$$typeof === $ || e.getModuleId !== void 0)); | ||
} | ||
function A(e, r, t) { | ||
var i = e.displayName; | ||
if (i) | ||
return i; | ||
var h = r.displayName || r.name || ""; | ||
return h !== "" ? t + "(" + h + ")" : t; | ||
function P(e, r, n) { | ||
var s = e.displayName; | ||
if (s) | ||
return s; | ||
var b = r.displayName || r.name || ""; | ||
return b !== "" ? n + "(" + b + ")" : n; | ||
} | ||
function K(e) { | ||
function Y(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function j(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" && T("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; | ||
@@ -98,13 +98,13 @@ if (typeof e == "string") | ||
switch (e) { | ||
case o: | ||
return "Fragment"; | ||
case a: | ||
return "Fragment"; | ||
case o: | ||
return "Portal"; | ||
case g: | ||
return "Profiler"; | ||
case b: | ||
case h: | ||
return "StrictMode"; | ||
case _: | ||
case E: | ||
return "Suspense"; | ||
case v: | ||
case c: | ||
return "SuspenseList"; | ||
@@ -116,15 +116,15 @@ } | ||
var r = e; | ||
return K(r) + ".Consumer"; | ||
case s: | ||
var t = e; | ||
return K(t._context) + ".Provider"; | ||
case c: | ||
return A(e, e.render, "ForwardRef"); | ||
return Y(r) + ".Consumer"; | ||
case i: | ||
var n = e; | ||
return Y(n._context) + ".Provider"; | ||
case d: | ||
return P(e, e.render, "ForwardRef"); | ||
case f: | ||
var i = e.displayName || null; | ||
return i !== null ? i : j(e.type) || "Memo"; | ||
case E: { | ||
var h = e, m = h._payload, p = h._init; | ||
var s = e.displayName || null; | ||
return s !== null ? s : w(e.type) || "Memo"; | ||
case m: { | ||
var b = e, _ = b._payload, y = b._init; | ||
try { | ||
return j(p(m)); | ||
return w(y(_)); | ||
} catch { | ||
@@ -137,14 +137,14 @@ return null; | ||
} | ||
var M = Object.assign, Y = 0, he, ge, me, Ee, _e, Re, xe; | ||
function Te() { | ||
var F = Object.assign, N = 0, G, K, X, _e, Re, De, Se; | ||
function xe() { | ||
} | ||
Te.__reactDisabledLog = !0; | ||
function qe() { | ||
xe.__reactDisabledLog = !0; | ||
function ze() { | ||
{ | ||
if (Y === 0) { | ||
he = console.log, ge = console.info, me = console.warn, Ee = console.error, _e = console.group, Re = console.groupCollapsed, xe = console.groupEnd; | ||
if (N === 0) { | ||
G = console.log, K = console.info, X = console.warn, _e = console.error, Re = console.group, De = console.groupCollapsed, Se = console.groupEnd; | ||
var e = { | ||
configurable: !0, | ||
enumerable: !0, | ||
value: Te, | ||
value: xe, | ||
writable: !0 | ||
@@ -162,8 +162,8 @@ }; | ||
} | ||
Y++; | ||
N++; | ||
} | ||
} | ||
function Ge() { | ||
function He() { | ||
{ | ||
if (Y--, Y === 0) { | ||
if (N--, N === 0) { | ||
var e = { | ||
@@ -175,67 +175,67 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: M({}, e, { | ||
value: he | ||
log: F({}, e, { | ||
value: G | ||
}), | ||
info: M({}, e, { | ||
value: ge | ||
info: F({}, e, { | ||
value: K | ||
}), | ||
warn: M({}, e, { | ||
value: me | ||
warn: F({}, e, { | ||
value: X | ||
}), | ||
error: M({}, e, { | ||
value: Ee | ||
}), | ||
group: M({}, e, { | ||
error: F({}, e, { | ||
value: _e | ||
}), | ||
groupCollapsed: M({}, e, { | ||
group: F({}, e, { | ||
value: Re | ||
}), | ||
groupEnd: M({}, e, { | ||
value: xe | ||
groupCollapsed: F({}, e, { | ||
value: De | ||
}), | ||
groupEnd: F({}, e, { | ||
value: Se | ||
}) | ||
}); | ||
} | ||
Y < 0 && D("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
N < 0 && T("disabledDepth fell below zero. This is a bug in React. Please file an issue."); | ||
} | ||
} | ||
var oe = $.ReactCurrentDispatcher, ie; | ||
function X(e, r, t) { | ||
var se = k.ReactCurrentDispatcher, fe; | ||
function Z(e, r, n) { | ||
{ | ||
if (ie === void 0) | ||
if (fe === void 0) | ||
try { | ||
throw Error(); | ||
} catch (h) { | ||
var i = h.stack.trim().match(/\n( *(at )?)/); | ||
ie = i && i[1] || ""; | ||
} catch (b) { | ||
var s = b.stack.trim().match(/\n( *(at )?)/); | ||
fe = s && s[1] || ""; | ||
} | ||
return ` | ||
` + ie + e; | ||
` + fe + e; | ||
} | ||
} | ||
var se = !1, Z; | ||
var ce = !1, Q; | ||
{ | ||
var He = typeof WeakMap == "function" ? WeakMap : Map; | ||
Z = new He(); | ||
var Ge = typeof WeakMap == "function" ? WeakMap : Map; | ||
Q = new Ge(); | ||
} | ||
function Se(e, r) { | ||
if (!e || se) | ||
function Te(e, r) { | ||
if (!e || ce) | ||
return ""; | ||
{ | ||
var t = Z.get(e); | ||
if (t !== void 0) | ||
return t; | ||
var n = Q.get(e); | ||
if (n !== void 0) | ||
return n; | ||
} | ||
var i; | ||
se = !0; | ||
var h = Error.prepareStackTrace; | ||
var s; | ||
ce = !0; | ||
var b = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var m; | ||
m = oe.current, oe.current = null, qe(); | ||
var _; | ||
_ = se.current, se.current = null, ze(); | ||
try { | ||
if (r) { | ||
var p = function() { | ||
var y = function() { | ||
throw Error(); | ||
}; | ||
if (Object.defineProperty(p.prototype, "props", { | ||
if (Object.defineProperty(y.prototype, "props", { | ||
set: function() { | ||
@@ -246,14 +246,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(p, []); | ||
Reflect.construct(y, []); | ||
} catch (I) { | ||
i = I; | ||
s = I; | ||
} | ||
Reflect.construct(e, [], p); | ||
Reflect.construct(e, [], y); | ||
} else { | ||
try { | ||
p.call(); | ||
y.call(); | ||
} catch (I) { | ||
i = I; | ||
s = I; | ||
} | ||
e.call(p.prototype); | ||
e.call(y.prototype); | ||
} | ||
@@ -264,3 +264,3 @@ } else { | ||
} catch (I) { | ||
i = I; | ||
s = I; | ||
} | ||
@@ -270,17 +270,17 @@ e(); | ||
} catch (I) { | ||
if (I && i && typeof I.stack == "string") { | ||
for (var d = I.stack.split(` | ||
`), w = i.stack.split(` | ||
`), R = d.length - 1, x = w.length - 1; R >= 1 && x >= 0 && d[R] !== w[x]; ) | ||
x--; | ||
for (; R >= 1 && x >= 0; R--, x--) | ||
if (d[R] !== w[x]) { | ||
if (R !== 1 || x !== 1) | ||
if (I && s && typeof I.stack == "string") { | ||
for (var v = I.stack.split(` | ||
`), C = s.stack.split(` | ||
`), D = v.length - 1, S = C.length - 1; D >= 1 && S >= 0 && v[D] !== C[S]; ) | ||
S--; | ||
for (; D >= 1 && S >= 0; D--, S--) | ||
if (v[D] !== C[S]) { | ||
if (D !== 1 || S !== 1) | ||
do | ||
if (R--, x--, x < 0 || d[R] !== w[x]) { | ||
var C = ` | ||
` + d[R].replace(" at new ", " at "); | ||
return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && Z.set(e, C), C; | ||
if (D--, S--, S < 0 || v[D] !== C[S]) { | ||
var j = ` | ||
` + v[D].replace(" at new ", " at "); | ||
return e.displayName && j.includes("<anonymous>") && (j = j.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, j), j; | ||
} | ||
while (R >= 1 && x >= 0); | ||
while (D >= 1 && S >= 0); | ||
break; | ||
@@ -290,37 +290,37 @@ } | ||
} finally { | ||
se = !1, oe.current = m, Ge(), Error.prepareStackTrace = h; | ||
ce = !1, se.current = _, He(), Error.prepareStackTrace = b; | ||
} | ||
var V = e ? e.displayName || e.name : "", Ne = V ? X(V) : ""; | ||
return typeof e == "function" && Z.set(e, Ne), Ne; | ||
var B = e ? e.displayName || e.name : "", Ye = B ? Z(B) : ""; | ||
return typeof e == "function" && Q.set(e, Ye), Ye; | ||
} | ||
function ze(e, r, t) { | ||
return Se(e, !1); | ||
function Ke(e, r, n) { | ||
return Te(e, !1); | ||
} | ||
function Ke(e) { | ||
function Xe(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
} | ||
function Q(e, r, t) { | ||
function ee(e, r, n) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return Se(e, Ke(e)); | ||
return Te(e, Xe(e)); | ||
if (typeof e == "string") | ||
return X(e); | ||
return Z(e); | ||
switch (e) { | ||
case _: | ||
return X("Suspense"); | ||
case v: | ||
return X("SuspenseList"); | ||
case E: | ||
return Z("Suspense"); | ||
case c: | ||
return Z("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case c: | ||
return ze(e.render); | ||
case d: | ||
return Ke(e.render); | ||
case f: | ||
return Q(e.type, r, t); | ||
case E: { | ||
var i = e, h = i._payload, m = i._init; | ||
return ee(e.type, r, n); | ||
case m: { | ||
var s = e, b = s._payload, _ = s._init; | ||
try { | ||
return Q(m(h), r, t); | ||
return ee(_(b), r, n); | ||
} catch { | ||
@@ -332,42 +332,42 @@ } | ||
} | ||
var ee = Object.prototype.hasOwnProperty, De = {}, we = $.ReactDebugCurrentFrame; | ||
function re(e) { | ||
var re = Object.prototype.hasOwnProperty, we = {}, Fe = k.ReactDebugCurrentFrame; | ||
function te(e) { | ||
if (e) { | ||
var r = e._owner, t = Q(e.type, e._source, r ? r.type : null); | ||
we.setExtraStackFrame(t); | ||
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null); | ||
Fe.setExtraStackFrame(n); | ||
} else | ||
we.setExtraStackFrame(null); | ||
Fe.setExtraStackFrame(null); | ||
} | ||
function Xe(e, r, t, i, h) { | ||
function Ze(e, r, n, s, b) { | ||
{ | ||
var m = Function.call.bind(ee); | ||
for (var p in e) | ||
if (m(e, p)) { | ||
var d = void 0; | ||
var _ = Function.call.bind(re); | ||
for (var y in e) | ||
if (_(e, y)) { | ||
var v = void 0; | ||
try { | ||
if (typeof e[p] != "function") { | ||
var w = Error((i || "React class") + ": " + t + " type `" + p + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[p] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw w.name = "Invariant Violation", w; | ||
if (typeof e[y] != "function") { | ||
var C = Error((s || "React class") + ": " + n + " type `" + y + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[y] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); | ||
throw C.name = "Invariant Violation", C; | ||
} | ||
d = e[p](r, p, i, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (R) { | ||
d = R; | ||
v = e[y](r, y, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (D) { | ||
v = D; | ||
} | ||
d && !(d instanceof Error) && (re(h), 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).", i || "React class", t, p, typeof d), re(null)), d instanceof Error && !(d.message in De) && (De[d.message] = !0, re(h), D("Failed %s type: %s", t, d.message), re(null)); | ||
v && !(v instanceof Error) && (te(b), T("%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).", s || "React class", n, y, typeof v), te(null)), v instanceof Error && !(v.message in we) && (we[v.message] = !0, te(b), T("Failed %s type: %s", n, v.message), te(null)); | ||
} | ||
} | ||
} | ||
var Ze = Array.isArray; | ||
function fe(e) { | ||
return Ze(e); | ||
var Qe = Array.isArray; | ||
function ue(e) { | ||
return Qe(e); | ||
} | ||
function Qe(e) { | ||
function er(e) { | ||
{ | ||
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
return t; | ||
var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
return n; | ||
} | ||
} | ||
function er(e) { | ||
function rr(e) { | ||
try { | ||
return Fe(e), !1; | ||
return Ce(e), !1; | ||
} catch { | ||
@@ -377,10 +377,10 @@ return !0; | ||
} | ||
function Fe(e) { | ||
function Ce(e) { | ||
return "" + e; | ||
} | ||
function Ce(e) { | ||
if (er(e)) | ||
return D("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Qe(e)), Fe(e); | ||
function Oe(e) { | ||
if (rr(e)) | ||
return T("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", er(e)), Ce(e); | ||
} | ||
var q = $.ReactCurrentOwner, rr = { | ||
var U = k.ReactCurrentOwner, tr = { | ||
key: !0, | ||
@@ -390,6 +390,6 @@ ref: !0, | ||
__source: !0 | ||
}, Oe, je, ce; | ||
ce = {}; | ||
function tr(e) { | ||
if (ee.call(e, "ref")) { | ||
}, je, ke, de; | ||
de = {}; | ||
function nr(e) { | ||
if (re.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -401,4 +401,4 @@ if (r && r.isReactWarning) | ||
} | ||
function nr(e) { | ||
if (ee.call(e, "key")) { | ||
function lr(e) { | ||
if (re.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -410,15 +410,15 @@ if (r && r.isReactWarning) | ||
} | ||
function lr(e, r) { | ||
if (typeof e.ref == "string" && q.current && r && q.current.stateNode !== r) { | ||
var t = j(q.current.type); | ||
ce[t] || (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', j(q.current.type), e.ref), ce[t] = !0); | ||
function ar(e, r) { | ||
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) { | ||
var n = w(U.current.type); | ||
de[n] || (T('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), de[n] = !0); | ||
} | ||
} | ||
function ar(e, r) { | ||
function or(e, r) { | ||
{ | ||
var t = 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 n = function() { | ||
je || (je = !0, T("%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)); | ||
}; | ||
t.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
get: t, | ||
n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
get: n, | ||
configurable: !0 | ||
@@ -428,9 +428,9 @@ }); | ||
} | ||
function or(e, r) { | ||
function ir(e, r) { | ||
{ | ||
var t = function() { | ||
je || (je = !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 n = function() { | ||
ke || (ke = !0, T("%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)); | ||
}; | ||
t.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
get: t, | ||
n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
get: n, | ||
configurable: !0 | ||
@@ -440,4 +440,4 @@ }); | ||
} | ||
var ir = function(e, r, t, i, h, m, p) { | ||
var d = { | ||
var sr = function(e, r, n, s, b, _, y) { | ||
var v = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
@@ -448,8 +448,8 @@ $$typeof: l, | ||
key: r, | ||
ref: t, | ||
props: p, | ||
ref: n, | ||
props: y, | ||
// Record the component responsible for creating this element. | ||
_owner: m | ||
_owner: _ | ||
}; | ||
return d._store = {}, Object.defineProperty(d._store, "validated", { | ||
return v._store = {}, Object.defineProperty(v._store, "validated", { | ||
configurable: !1, | ||
@@ -459,49 +459,49 @@ enumerable: !1, | ||
value: !1 | ||
}), Object.defineProperty(d, "_self", { | ||
}), Object.defineProperty(v, "_self", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: i | ||
}), Object.defineProperty(d, "_source", { | ||
value: s | ||
}), Object.defineProperty(v, "_source", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: h | ||
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d; | ||
value: b | ||
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v; | ||
}; | ||
function sr(e, r, t, i, h) { | ||
function fr(e, r, n, s, b) { | ||
{ | ||
var m, p = {}, d = null, w = null; | ||
t !== void 0 && (Ce(t), d = "" + t), nr(r) && (Ce(r.key), d = "" + r.key), tr(r) && (w = r.ref, lr(r, h)); | ||
for (m in r) | ||
ee.call(r, m) && !rr.hasOwnProperty(m) && (p[m] = r[m]); | ||
var _, y = {}, v = null, C = null; | ||
n !== void 0 && (Oe(n), v = "" + n), lr(r) && (Oe(r.key), v = "" + r.key), nr(r) && (C = r.ref, ar(r, b)); | ||
for (_ in r) | ||
re.call(r, _) && !tr.hasOwnProperty(_) && (y[_] = r[_]); | ||
if (e && e.defaultProps) { | ||
var R = e.defaultProps; | ||
for (m in R) | ||
p[m] === void 0 && (p[m] = R[m]); | ||
var D = e.defaultProps; | ||
for (_ in D) | ||
y[_] === void 0 && (y[_] = D[_]); | ||
} | ||
if (d || w) { | ||
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
d && ar(p, x), w && or(p, x); | ||
if (v || C) { | ||
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
v && or(y, S), C && ir(y, S); | ||
} | ||
return ir(e, d, w, h, i, q.current, p); | ||
return sr(e, v, C, b, s, U.current, y); | ||
} | ||
} | ||
var ue = $.ReactCurrentOwner, ke = $.ReactDebugCurrentFrame; | ||
function L(e) { | ||
var ve = k.ReactCurrentOwner, Pe = k.ReactDebugCurrentFrame; | ||
function W(e) { | ||
if (e) { | ||
var r = e._owner, t = Q(e.type, e._source, r ? r.type : null); | ||
ke.setExtraStackFrame(t); | ||
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null); | ||
Pe.setExtraStackFrame(n); | ||
} else | ||
ke.setExtraStackFrame(null); | ||
Pe.setExtraStackFrame(null); | ||
} | ||
var ve; | ||
ve = !1; | ||
function de(e) { | ||
var pe; | ||
pe = !1; | ||
function he(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
} | ||
function Pe() { | ||
function Ae() { | ||
{ | ||
if (ue.current) { | ||
var e = j(ue.current.type); | ||
if (ve.current) { | ||
var e = w(ve.current.type); | ||
if (e) | ||
@@ -515,9 +515,9 @@ return ` | ||
} | ||
function fr(e) { | ||
function cr(e) { | ||
{ | ||
if (e !== void 0) { | ||
var r = e.fileName.replace(/^.*[\\\/]/, ""), t = e.lineNumber; | ||
var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber; | ||
return ` | ||
Check your code at ` + r + ":" + t + "."; | ||
Check your code at ` + r + ":" + n + "."; | ||
} | ||
@@ -527,11 +527,11 @@ return ""; | ||
} | ||
var Ae = {}; | ||
function cr(e) { | ||
var Me = {}; | ||
function ur(e) { | ||
{ | ||
var r = Pe(); | ||
var r = Ae(); | ||
if (!r) { | ||
var t = typeof e == "string" ? e : e.displayName || e.name; | ||
t && (r = ` | ||
var n = typeof e == "string" ? e : e.displayName || e.name; | ||
n && (r = ` | ||
Check the top-level render call using <` + t + ">."); | ||
Check the top-level render call using <` + n + ">."); | ||
} | ||
@@ -541,3 +541,3 @@ return r; | ||
} | ||
function Me(e, r) { | ||
function Ie(e, r) { | ||
{ | ||
@@ -547,30 +547,30 @@ if (!e._store || e._store.validated || e.key != null) | ||
e._store.validated = !0; | ||
var t = cr(r); | ||
if (Ae[t]) | ||
var n = ur(r); | ||
if (Me[n]) | ||
return; | ||
Ae[t] = !0; | ||
var i = ""; | ||
e && e._owner && e._owner !== ue.current && (i = " It was passed a child from " + j(e._owner.type) + "."), L(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.', t, i), L(null); | ||
Me[n] = !0; | ||
var s = ""; | ||
e && e._owner && e._owner !== ve.current && (s = " It was passed a child from " + w(e._owner.type) + "."), W(e), T('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, s), W(null); | ||
} | ||
} | ||
function Ie(e, r) { | ||
function $e(e, r) { | ||
{ | ||
if (typeof e != "object") | ||
return; | ||
if (fe(e)) | ||
for (var t = 0; t < e.length; t++) { | ||
var i = e[t]; | ||
de(i) && Me(i, r); | ||
if (ue(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var s = e[n]; | ||
he(s) && Ie(s, r); | ||
} | ||
else if (de(e)) | ||
else if (he(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var h = k(e); | ||
if (typeof h == "function" && h !== e.entries) | ||
for (var m = h.call(e), p; !(p = m.next()).done; ) | ||
de(p.value) && Me(p.value, r); | ||
var b = A(e); | ||
if (typeof b == "function" && b !== e.entries) | ||
for (var _ = b.call(e), y; !(y = _.next()).done; ) | ||
he(y.value) && Ie(y.value, r); | ||
} | ||
} | ||
} | ||
function ur(e) { | ||
function dr(e) { | ||
{ | ||
@@ -580,20 +580,20 @@ var r = e.type; | ||
return; | ||
var t; | ||
var n; | ||
if (typeof r == "function") | ||
t = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here. | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === f)) | ||
t = r.propTypes; | ||
n = r.propTypes; | ||
else | ||
return; | ||
if (t) { | ||
var i = j(r); | ||
Xe(t, e.props, "prop", i, e); | ||
} else if (r.PropTypes !== void 0 && !ve) { | ||
ve = !0; | ||
var h = j(r); | ||
D("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", h || "Unknown"); | ||
if (n) { | ||
var s = w(r); | ||
Ze(n, e.props, "prop", s, e); | ||
} else if (r.PropTypes !== void 0 && !pe) { | ||
pe = !0; | ||
var b = w(r); | ||
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "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 r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && T("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); | ||
} | ||
@@ -603,58 +603,58 @@ } | ||
{ | ||
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) { | ||
var i = r[t]; | ||
if (i !== "children" && i !== "key") { | ||
L(e), D("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", i), L(null); | ||
for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
var s = r[n]; | ||
if (s !== "children" && s !== "key") { | ||
W(e), T("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), W(null); | ||
break; | ||
} | ||
} | ||
e.ref !== null && (L(e), D("Invalid attribute `ref` supplied to `React.Fragment`."), L(null)); | ||
e.ref !== null && (W(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), W(null)); | ||
} | ||
} | ||
function $e(e, r, t, i, h, m) { | ||
function Ne(e, r, n, s, b, _) { | ||
{ | ||
var p = N(e); | ||
if (!p) { | ||
var d = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (d += " 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 w = fr(h); | ||
w ? d += w : d += Pe(); | ||
var R; | ||
e === null ? R = "null" : fe(e) ? R = "array" : e !== void 0 && e.$$typeof === l ? (R = "<" + (j(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : R = 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", R, d); | ||
var y = M(e); | ||
if (!y) { | ||
var v = ""; | ||
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (v += " 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 C = cr(b); | ||
C ? v += C : v += Ae(); | ||
var D; | ||
e === null ? D = "null" : ue(e) ? D = "array" : e !== void 0 && e.$$typeof === l ? (D = "<" + (w(e.type) || "Unknown") + " />", v = " Did you accidentally export a JSX literal instead of a component?") : D = typeof e, T("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", D, v); | ||
} | ||
var x = sr(e, r, t, h, m); | ||
if (x == null) | ||
return x; | ||
if (p) { | ||
var C = r.children; | ||
if (C !== void 0) | ||
if (i) | ||
if (fe(C)) { | ||
for (var V = 0; V < C.length; V++) | ||
Ie(C[V], e); | ||
Object.freeze && Object.freeze(C); | ||
var S = fr(e, r, n, b, _); | ||
if (S == null) | ||
return S; | ||
if (y) { | ||
var j = r.children; | ||
if (j !== void 0) | ||
if (s) | ||
if (ue(j)) { | ||
for (var B = 0; B < j.length; B++) | ||
$e(j[B], e); | ||
Object.freeze && Object.freeze(j); | ||
} 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."); | ||
T("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 | ||
Ie(C, e); | ||
$e(j, e); | ||
} | ||
return e === a ? vr(x) : ur(x), x; | ||
return e === o ? vr(S) : dr(S), S; | ||
} | ||
} | ||
function dr(e, r, t) { | ||
return $e(e, r, t, !0); | ||
function pr(e, r, n) { | ||
return Ne(e, r, n, !0); | ||
} | ||
function pr(e, r, t) { | ||
return $e(e, r, t, !1); | ||
function hr(e, r, n) { | ||
return Ne(e, r, n, !1); | ||
} | ||
var br = pr, yr = dr; | ||
H.Fragment = a, H.jsx = br, H.jsxs = yr; | ||
}()), H; | ||
var yr = hr, br = pr; | ||
z.Fragment = o, z.jsx = yr, z.jsxs = br; | ||
}()), z; | ||
} | ||
process.env.NODE_ENV === "production" ? pe.exports = Er() : pe.exports = _r(); | ||
var T = pe.exports; | ||
function be({ children: n, textColor: l, style: o, colSpan: a, ...b }) { | ||
return /* @__PURE__ */ T.jsx("td", { className: "calendar-label", style: o, colSpan: a, ...b, children: /* @__PURE__ */ T.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: n }) }); | ||
process.env.NODE_ENV === "production" ? ye.exports = _r() : ye.exports = Rr(); | ||
var x = ye.exports; | ||
function be({ children: t, textColor: l, style: a, colSpan: o, ...h }) { | ||
return /* @__PURE__ */ x.jsx("td", { className: "calendar-label", style: a, colSpan: o, ...h, children: /* @__PURE__ */ x.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
} | ||
const Rr = { | ||
const Dr = { | ||
//light themes | ||
@@ -886,3 +886,3 @@ empty: { | ||
} | ||
}, xr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Tr = (n = /* @__PURE__ */ new Date()) => { | ||
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
@@ -896,3 +896,3 @@ Sun: "Sunday", | ||
Sat: "Saturday" | ||
}, o = { | ||
}, a = { | ||
Jan: "January", | ||
@@ -910,144 +910,148 @@ Feb: "February", | ||
Dec: "December" | ||
}, a = n.toString().split(" "); | ||
}, o = t.toString().split(" "); | ||
return { | ||
year: a[3], | ||
month: o[a[1]], | ||
day: parseInt(a[2], 10), | ||
date: l[a[0]] | ||
year: o[3], | ||
month: a[o[1]], | ||
day: parseInt(o[2], 10), | ||
date: l[o[0]] | ||
}; | ||
}, Sr = (n) => { | ||
const l = Tr(new Date(n)); | ||
}, Br = (t) => t.reduce((l, a) => l + a, 0), Tr = (t) => { | ||
const l = xr(new Date(t)); | ||
return `${l.date}, ${l.month} ${l.day}, ${l.year}`; | ||
}, Be = (n, l, o) => `${n}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`, Dr = (n, l, o) => `${n}-${String(l).padStart(2, "0")}-${String(o).padStart(2, "0")}`, W = (n) => +n.slice(0, 4), Le = (n) => +n.slice(5, 7), Yr = (n) => +n.slice(8, 10), wr = (n = U()) => n % 4 === 0 && n % 100 !== 0 || n % 400 === 0, ye = (n = U()) => [31, wr(n) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], J = (n = U()) => new Date(n, 0, 1).getDay(), Wr = (n) => new Date(n).getDay(), U = () => (/* @__PURE__ */ new Date()).getFullYear(), Br = (n = U(), l, o) => { | ||
const a = ye(n), b = J(n), g = []; | ||
let s = b; | ||
}, Le = (t, l, a) => `${t}-${String(l + 1).padStart(2, "0")}-${String(a).padStart(2, "0")}`, wr = (t, l, a) => `${t}-${String(l).padStart(2, "0")}-${String(a).padStart(2, "0")}`, ge = (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), Lr = (t) => +t.slice(8, 10), Fr = (t = J()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, me = (t = J()) => [31, Fr(t) ? 29 : 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31], Cr = (t) => new Date(t).getDay(), V = (t = J()) => new Date(t, 0, 1).getDay(), Vr = (t) => new Date(t).getDay(), J = () => (/* @__PURE__ */ new Date()).getFullYear(), Jr = (t = J(), l, a) => { | ||
const o = me(t), h = V(t), g = []; | ||
let i = h; | ||
for (let u = 0; u < 12; u++) { | ||
const c = a[u]; | ||
let _ = 0; | ||
for (let v = 0; v < c; v++) | ||
s === 0 && _++, s = (s + 1) % 7; | ||
u === 0 && b !== 0 && _++, g.push(_); | ||
const d = o[u]; | ||
let E = 0; | ||
for (let c = 0; c < d; c++) | ||
i === 0 && E++, i = (i + 1) % 7; | ||
u === 0 && h !== 0 && E++, g.push(E); | ||
} | ||
return n !== l && b !== 0 && l !== o && (g[0] -= 1), g; | ||
}, Fr = (n) => { | ||
return t !== l && h !== 0 && l !== a && (g[0] -= 1), g; | ||
}, Or = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
return n.forEach((o) => { | ||
Object.keys(o).forEach((a) => { | ||
l.set(a, o[a]); | ||
return t.forEach((a) => { | ||
Object.keys(a).forEach((o) => { | ||
l.set(o, a[o]); | ||
}); | ||
}), l; | ||
}, Cr = (n) => typeof n == "string" ? Rr[n] : n, Or = (n, l) => { | ||
let o = 0; | ||
for (let a = n; a <= l; ++a) | ||
o += Je(n, a === n); | ||
return new Array(7).fill(0).map(() => new Array(o).fill(0)); | ||
}, jr = (n, l) => { | ||
let o = 0; | ||
for (let a = n; a <= l; ++a) | ||
o += Je(n, a === n); | ||
return new Array(7).fill("").map(() => new Array(o).fill("")); | ||
}, Je = (n, l) => { | ||
const o = J(n); | ||
return l || o === 0 ? 53 : 52; | ||
}, kr = (n, l, o) => { | ||
const a = W(n), b = W(l), g = Or(a, b); | ||
let s = 0, u = 1; | ||
for (let c = a; c <= b; ++c) { | ||
const _ = o ? J(c) : (J(c) + 6) % 7, v = ye(c); | ||
let f = 0, E = 1, y = _; | ||
}, jr = (t) => typeof t == "string" ? Dr[t] : t, kr = (t, l) => { | ||
let a = 0; | ||
for (let o = t; o <= l; ++o) | ||
a += Ue(t, o === t); | ||
return new Array(7).fill(0).map(() => new Array(a).fill(0)); | ||
}, Pr = (t, l) => { | ||
let a = 0; | ||
for (let o = t; o <= l; ++o) | ||
a += Ue(t, o === t); | ||
return new Array(7).fill("").map(() => new Array(a).fill("")); | ||
}, Ue = (t, l) => { | ||
const a = V(t); | ||
return l || a === 0 ? 53 : 52; | ||
}, Ar = (t, l, a) => { | ||
const o = L(t), h = L(l), g = kr(o, h); | ||
let i = 0, u = 1; | ||
for (let d = o; d <= h; ++d) { | ||
const E = a ? V(d) : (V(d) + 6) % 7, c = me(d); | ||
let f = 0, m = 1, p = E; | ||
for (; f < 12; ) { | ||
for (let S = 0; S < v[f]; ++S) | ||
g[y % 7][~~(y / 7) + s] = u, y++, E++, u++; | ||
E > v[f] && (E = 1, f++); | ||
for (let R = 0; R < c[f]; ++R) | ||
g[p % 7][~~(p / 7) + i] = u, p++, m++, u++; | ||
m > c[f] && (m = 1, f++); | ||
} | ||
s += ~~(y / 7); | ||
i += ~~(p / 7); | ||
} | ||
return g; | ||
}, Ue = (n, l, o) => { | ||
const a = W(n), b = W(l), g = jr(a, b); | ||
let s = 0; | ||
for (let u = a; u <= b; ++u) { | ||
const c = o ? J(u) : (J(u) + 6) % 7, _ = ye(u); | ||
let v = 0, f = 1, E = c; | ||
for (; v < 12; ) { | ||
for (let y = 0; y < _[v]; ++y) { | ||
const S = Dr(u, v + 1, f); | ||
g[E % 7][~~(E / 7) + s] = S, E++, f++; | ||
}, qe = (t, l, a) => { | ||
const o = L(t), h = L(l), g = Pr(o, h); | ||
let i = 0; | ||
for (let u = o; u <= h; ++u) { | ||
const d = a ? V(u) : (V(u) + 6) % 7, E = me(u); | ||
let c = 0, f = 1, m = d; | ||
for (; c < 12; ) { | ||
for (let p = 0; p < E[c]; ++p) { | ||
const R = wr(u, c + 1, f); | ||
g[m % 7][~~(m / 7) + i] = R, m++, f++; | ||
} | ||
f > _[v] && (f = 1, v++); | ||
f > E[c] && (f = 1, c++); | ||
} | ||
s += ~~(E / 7); | ||
i += ~~(m / 7); | ||
} | ||
return g; | ||
}, te = (n, l, o) => { | ||
const a = `${n}-01-01`, b = Pr(a, l), g = kr(a, l, o); | ||
for (let s = 0; s < g.length; ++s) | ||
for (let u = 0; u < g[s].length; ++u) | ||
if (b === g[s][u]) | ||
return { row: s, col: u }; | ||
}, ne = (t, l, a) => { | ||
const o = `${t}-01-01`, h = Mr(o, l), g = Ar(o, l, a); | ||
for (let i = 0; i < g.length; ++i) | ||
for (let u = 0; u < g[i].length; ++u) | ||
if (h === g[i][u]) | ||
return { row: i, col: u }; | ||
return { row: 0, col: 0 }; | ||
}, Pr = (n, l) => { | ||
const o = new Date(n); | ||
return (new Date(l).getTime() - o.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, Ar = (n, l, o, a) => { | ||
const { row: b, col: g } = te( | ||
W(n), | ||
n, | ||
a | ||
), { col: s } = te(W(n), l, a), u = [], c = []; | ||
let _ = -1, v = 0; | ||
for (let f = g; f <= s; ++f) | ||
f === g ? v = Le(o[b][f]) - 1 : v = Le(o[0][f]) - 1, v !== _ && (u.push(xr[v]), _ = v, c.push(0)), c[c.length - 1]++; | ||
return { months: u, colSpans: c }; | ||
}, Mr = (t, l) => { | ||
const a = new Date(t); | ||
return (new Date(l).getTime() - a.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, Ir = (t, l, a, o) => { | ||
const { row: h, col: g } = ne( | ||
L(t), | ||
t, | ||
o | ||
), { col: i } = ne(L(t), l, o), u = [], d = []; | ||
let E = -1, c = 0; | ||
for (let f = g; f <= i; ++f) | ||
f === g ? c = Ve(a[h][f]) - 1 : c = Ve(a[0][f]) - 1, c !== E && (u.push(Sr[c]), E = c, d.push(0)), d[d.length - 1]++; | ||
return { months: u, colSpans: d }; | ||
}; | ||
function Mr({ start: n, end: l, textColor: o, startsOnSunday: a }) { | ||
const b = Ue(n, l, a), { months: g, colSpans: s } = Ar(n, l, b, a); | ||
return /* @__PURE__ */ T.jsx("thead", { children: /* @__PURE__ */ T.jsxs("tr", { children: [ | ||
/* @__PURE__ */ T.jsx(be, { textColor: o, style: { width: "3.5em" }, colSpan: 1, children: " " }), | ||
g.map((u, c) => /* @__PURE__ */ T.jsx(be, { textColor: o, colSpan: s[c], children: u }, c)) | ||
function $r({ start: t, end: l, textColor: a, startsOnSunday: o, cy: h }) { | ||
const g = qe(t, l, o), { year: i, month: u, day: d } = ge(l), E = Cr(`${i}-${u}-01`), { months: c, colSpans: f } = Ir(t, l, g, o); | ||
return /* @__PURE__ */ x.jsx("thead", { children: /* @__PURE__ */ x.jsxs("tr", { children: [ | ||
/* @__PURE__ */ x.jsx(be, { textColor: a, style: { width: "4em", fontSize: h }, colSpan: 1, children: " " }), | ||
c.map((m, p) => { | ||
let R = f[p]; | ||
return f.length === 1 && f[0] === 1 ? R++ : c.length > 1 && d < 10 && E !== 0 && p === c.length - 2 ? R-- : c.length > 1 && d < 10 && E !== 0 && p === c.length - 1 && R++, /* @__PURE__ */ x.jsx(be, { textColor: a, style: { fontSize: h }, colSpan: R, children: m }, p); | ||
}) | ||
] }) }); | ||
} | ||
function Ir({ themeProps: n, dataLevel: l, style: o, children: a, dataTooltip: b, ...g }) { | ||
const s = hr(null), [u, c] = gr(-10), _ = (f) => { | ||
function Nr({ themeProps: t, dataLevel: l, style: a, dataTooltip: o, tooltipSize: h, ...g }) { | ||
const i = gr(null), [u, d] = mr(-10), E = (f) => { | ||
if (!f) | ||
return 0; | ||
let E = 0; | ||
return f.childNodes.forEach((y) => { | ||
y.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(y).display !== "none" && E++; | ||
}), E; | ||
}, v = (f) => { | ||
let m = 0; | ||
return f.childNodes.forEach((p) => { | ||
p.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(p).display !== "none" && m++; | ||
}), m; | ||
}, c = (f) => { | ||
if (!f || !f.parentNode) | ||
return -1; | ||
const E = Array.from(f.parentNode.childNodes); | ||
let y = 0; | ||
for (let S = 0; S < f.cellIndex; S++) | ||
E[S].style.display !== "none" && y++; | ||
return y; | ||
const m = Array.from(f.parentNode.childNodes); | ||
let p = 0; | ||
for (let R = 0; R < f.cellIndex; R++) | ||
m[R].style.display !== "none" && p++; | ||
return p; | ||
}; | ||
return mr(() => { | ||
return Er(() => { | ||
const f = () => { | ||
var E; | ||
if (s.current) { | ||
const y = _((E = s.current) == null ? void 0 : E.parentNode), S = v(s.current); | ||
if (y) { | ||
let F = -10; | ||
const k = S / y; | ||
k > 0.9 ? F = Math.max(~~(s.current.cellIndex * -140) / y, -160) : k > 0.8 ? F = Math.max(~~(s.current.cellIndex * -130) / y, -130) : k > 0.66 ? F = Math.max(~~(s.current.cellIndex * -110) / y, -120) : k > 0.5 ? F = Math.max(~~(s.current.cellIndex * -90) / y, -110) : k > 0.33 ? F = Math.max(~~(s.current.cellIndex * -40) / y, -90) : k > 0.2 ? F = Math.min(~~(s.current.cellIndex * -15) / y, -40) : F = Math.min(~~(s.current.cellIndex * -7) / y, -10), c(F); | ||
var m; | ||
if (i.current) { | ||
const p = E((m = i.current) == null ? void 0 : m.parentNode), R = c(i.current); | ||
if (p) { | ||
let O = -10; | ||
const A = R / p; | ||
A > 0.9 ? O = Math.max(~~(i.current.cellIndex * -150) / p, -150) : A > 0.8 ? O = Math.max(~~(i.current.cellIndex * -130) / p, -140) : A > 0.66 ? O = Math.max(~~(i.current.cellIndex * -120) / p, -120) : A > 0.5 ? O = Math.max(~~(i.current.cellIndex * -100) / p, -100) : A > 0.33 ? O = Math.max(~~(i.current.cellIndex * -50) / p, -50) : A > 0.2 ? O = Math.min(~~(i.current.cellIndex * -20) / p, -30) : O = Math.min(~~(i.current.cellIndex * -7) / p, -10), d(O); | ||
} | ||
} | ||
}; | ||
return s.current && s.current.addEventListener("mouseover", f), () => { | ||
s.current && s.current.removeEventListener("mouseover", f); | ||
return i.current && i.current.addEventListener("mouseover", f), () => { | ||
i.current && i.current.removeEventListener("mouseover", f); | ||
}; | ||
}, []), /* @__PURE__ */ T.jsx( | ||
}, []), /* @__PURE__ */ x.jsx( | ||
"td", | ||
{ | ||
ref: s, | ||
ref: i, | ||
className: "calendar-cell top half-arrow", | ||
style: { | ||
...o, | ||
backgroundColor: n[`level${l}`], | ||
"--tooltip-offset": `${u}px` | ||
...a, | ||
backgroundColor: t[`level${l}`], | ||
"--tooltip-offset": `${u}px`, | ||
fontSize: h | ||
}, | ||
"data-tooltip": b, | ||
"data-tooltip": o, | ||
"data-level": l, | ||
@@ -1058,23 +1062,21 @@ ...g | ||
} | ||
function $r({ | ||
data: n, | ||
function Yr({ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: b, | ||
end: a, | ||
textColor: o, | ||
startsOnSunday: h, | ||
includeBoundary: g, | ||
cx: s, | ||
cx: i, | ||
cy: u, | ||
cr: c, | ||
theme: _, | ||
onClick: v | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
}) { | ||
const f = W(l), { row: E, col: y } = te(f, l, b), { row: S, col: F } = te(f, o, b), k = b ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], $ = Ue(l, o, b), z = ((P) => Cr(P))(_), ne = Fr(n), le = (P, O) => O < y || O > F, ae = (P, O) => O === y && P < E || O === F && P > S; | ||
return /* @__PURE__ */ T.jsx("tbody", { children: k.map((P, O) => /* @__PURE__ */ T.jsxs("tr", { children: [ | ||
/* @__PURE__ */ T.jsx(be, { tabIndex: 0, textColor: a, style: { textAlign: "inherit" }, children: P }), | ||
$[O].map((B, N) => { | ||
if (le(O, N)) | ||
return /* @__PURE__ */ T.jsx("td", { style: { padding: "0", display: "none" } }, N); | ||
if (ae(O, N)) | ||
return /* @__PURE__ */ T.jsx( | ||
const { year: f, day: m } = ge(l), { day: p } = ge(a), { row: R, col: O } = ne(f, l, h), { row: A, col: k } = ne(f, a, h), T = h ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], le = qe(l, a, h), H = ((M) => jr(M))(E), ae = Or(t), oe = (M, P) => P < O || P > k, ie = (M, P) => P === O && M < R || P === k && M > A, $ = () => O === k || p - m <= 7; | ||
return /* @__PURE__ */ x.jsx("tbody", { children: T.map((M, P) => /* @__PURE__ */ x.jsxs("tr", { children: [ | ||
/* @__PURE__ */ x.jsx(be, { tabIndex: 0, textColor: o, style: { textAlign: "right", fontSize: u, lineHeight: 0 }, children: M }), | ||
le[P].map((Y, w) => { | ||
if (k === 0 && w === 1) | ||
return /* @__PURE__ */ x.jsx( | ||
"td", | ||
@@ -1084,4 +1086,6 @@ { | ||
padding: 0, | ||
outline: g ? `1px solid ${z.level0}` : "none", | ||
borderRadius: c, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: "none", | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
@@ -1091,58 +1095,77 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
N | ||
w | ||
); | ||
const A = ne.get(B), K = Sr(B), j = (M) => { | ||
const Y = { | ||
date: B, | ||
data: A == null ? void 0 : A.data | ||
if (oe(P, w)) | ||
return /* @__PURE__ */ x.jsx("td", { style: { padding: "0", display: "none" } }, w); | ||
if (ie(P, w)) | ||
return /* @__PURE__ */ x.jsx( | ||
"td", | ||
{ | ||
style: { | ||
padding: 0, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: g ? `1px solid ${H.level0}` : "none", | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
shapeRendering: "geometricPrecision" | ||
} | ||
}, | ||
w | ||
); | ||
const F = ae.get(Y), N = Tr(Y), G = (K) => { | ||
const X = { | ||
date: Y, | ||
data: F == null ? void 0 : F.data | ||
}; | ||
v && v(M, Y); | ||
c && c(K, X); | ||
}; | ||
return /* @__PURE__ */ T.jsx( | ||
Ir, | ||
return /* @__PURE__ */ x.jsx( | ||
Nr, | ||
{ | ||
tabIndex: -1, | ||
style: { width: s, height: u, borderRadius: c }, | ||
dataLevel: A !== void 0 ? A.level : 0, | ||
"data-content": JSON.stringify(A == null ? void 0 : A.data), | ||
dataTooltip: K, | ||
themeProps: z, | ||
onClick: j | ||
style: { width: i, height: u, borderRadius: d }, | ||
dataLevel: F !== void 0 ? F.level : 0, | ||
"data-content": JSON.stringify(F == null ? void 0 : F.data), | ||
dataTooltip: N, | ||
tooltipSize: u, | ||
themeProps: H, | ||
onClick: G | ||
}, | ||
N | ||
w | ||
); | ||
}) | ||
] }, P)) }); | ||
] }, M)) }); | ||
} | ||
function Lr({ | ||
data: n = [], | ||
start: l = Be(U(), 0, 1), | ||
end: o = Be(U(), 11, 31), | ||
textColor: a = "#000", | ||
startsOnSunday: b = !0, | ||
function Ur({ | ||
data: t = [], | ||
start: l = Le(J(), 0, 1), | ||
end: a = Le(J(), 11, 31), | ||
textColor: o = "#000", | ||
startsOnSunday: h = !0, | ||
includeBoundary: g = !0, | ||
cx: s = 10, | ||
cx: i = 10, | ||
cy: u = 10, | ||
cr: c = 2, | ||
theme: _ = "grass", | ||
onCellClick: v = () => { | ||
cr: d = 2, | ||
theme: E = "grass", | ||
onCellClick: c = () => { | ||
}, | ||
style: f | ||
}) { | ||
return /* @__PURE__ */ T.jsx("div", { className: "container", style: f, children: /* @__PURE__ */ T.jsxs("table", { children: [ | ||
/* @__PURE__ */ T.jsx(Mr, { start: l, end: o, textColor: a, startsOnSunday: b }), | ||
/* @__PURE__ */ T.jsx( | ||
$r, | ||
return /* @__PURE__ */ x.jsx("div", { className: "container", style: f, children: /* @__PURE__ */ x.jsxs("table", { children: [ | ||
/* @__PURE__ */ x.jsx($r, { start: l, end: a, textColor: o, startsOnSunday: h, cy: u }), | ||
/* @__PURE__ */ x.jsx( | ||
Yr, | ||
{ | ||
data: n, | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: b, | ||
end: a, | ||
textColor: o, | ||
startsOnSunday: h, | ||
includeBoundary: g, | ||
cx: s, | ||
cx: i, | ||
cy: u, | ||
cr: c, | ||
theme: _, | ||
onClick: v | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
} | ||
@@ -1153,20 +1176,23 @@ ) | ||
export { | ||
Lr as ContributionCalendar, | ||
Cr as createTheme, | ||
Br as getColumnSpansForYears, | ||
U as getCurrentYear, | ||
Tr as getDateDetails, | ||
Be as getDateString, | ||
Sr as getDateTooltip, | ||
Ue as getDayArray, | ||
Wr as getDayIndexOfMonth, | ||
Pr as getDaysBetween, | ||
J as getFirstDayIndexOfYear, | ||
Ar as getMonthsAndColSpans, | ||
te as getRowAndColumnIndexFromDate, | ||
wr as isLeapYear, | ||
Yr as parseDayFromDateString, | ||
Fr as parseInputData, | ||
Le as parseMonthFromDateString, | ||
W as parseYearFromDateString | ||
Ur as ContributionCalendar, | ||
jr as createTheme, | ||
Br as getArraySum, | ||
Jr as getColumnSpansForYears, | ||
J as getCurrentYear, | ||
xr as getDateDetails, | ||
Le as getDateString, | ||
Tr as getDateTooltip, | ||
qe as getDayArray, | ||
Cr as getDayIndexFromDateString, | ||
Vr as getDayIndexOfMonth, | ||
Mr as getDaysBetween, | ||
V as getFirstDayIndexOfYear, | ||
Ir as getMonthsAndColSpans, | ||
ne as getRowAndColumnIndexFromDate, | ||
Fr as isLeapYear, | ||
ge as parseDateFromDateString, | ||
Lr as parseDayFromDateString, | ||
Or as parseInputData, | ||
Ve as parseMonthFromDateString, | ||
L as parseYearFromDateString | ||
}; |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.2.2 | ||
// Type definitions for react-contribution-calendar 1.2.3 | ||
// Project: https://github.com/seiwon-yaehee/react-contribution-calendar | ||
@@ -110,3 +110,3 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark> | ||
* | ||
* @version 1.2.2 | ||
* @version 1.2.3 | ||
* @see {@link https://github.com/seiwon-yaehee/react-contribution-calendar#apis} | ||
@@ -113,0 +113,0 @@ */ |
{ | ||
"name": "react-contribution-calendar", | ||
"description": "A GitHub-like contribution calendar component for React", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"type": "module", | ||
@@ -6,0 +6,0 @@ "main": "./dist/index.js", |
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
76156
1481