react-contribution-calendar
Advanced tools
Comparing version 1.2.6 to 1.2.7
import './styles/style.css'; | ||
import Je, { useRef as Er, useState as _r, useEffect as Rr } from "react"; | ||
var me = { exports: {} }, U = {}; | ||
import Je, { useRef as gr, useState as mr, useEffect as Er } from "react"; | ||
var ye = { exports: {} }, q = {}; | ||
/** | ||
@@ -14,18 +14,18 @@ * @license React | ||
var We; | ||
function Dr() { | ||
function _r() { | ||
if (We) | ||
return U; | ||
return q; | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), i = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, h = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function p(o, f, E) { | ||
var c, u = {}, R = null, g = null; | ||
E !== void 0 && (R = "" + E), f.key !== void 0 && (R = "" + f.key), f.ref !== void 0 && (g = f.ref); | ||
for (c in f) | ||
a.call(f, c) && !h.hasOwnProperty(c) && (u[c] = f[c]); | ||
if (o && o.defaultProps) | ||
for (c in f = o.defaultProps, f) | ||
u[c] === void 0 && (u[c] = f[c]); | ||
return { $$typeof: l, type: o, key: R, ref: g, props: u, _owner: v.current }; | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, h = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { 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) | ||
a.call(d, c) && !b.hasOwnProperty(c) && (f[c] = d[c]); | ||
if (u && u.defaultProps) | ||
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 U.Fragment = i, U.jsx = p, U.jsxs = p, U; | ||
return q.Fragment = o, q.jsx = i, q.jsxs = i, q; | ||
} | ||
@@ -42,24 +42,24 @@ var z = {}; | ||
*/ | ||
var Le; | ||
function Sr() { | ||
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"), v = Symbol.for("react.strict_mode"), h = Symbol.for("react.profiler"), p = Symbol.for("react.provider"), o = Symbol.for("react.context"), f = Symbol.for("react.forward_ref"), E = Symbol.for("react.suspense"), c = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), x = Symbol.iterator, D = "@@iterator"; | ||
var Be; | ||
function Rr() { | ||
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), h = Symbol.for("react.strict_mode"), b = 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 = x && e[x] || e[D]; | ||
var r = R && e[R] || e[O]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var F = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function S(e) { | ||
var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; | ||
function T(e) { | ||
{ | ||
for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++) | ||
n[s - 1] = arguments[s]; | ||
q("error", e, n); | ||
le("error", e, n); | ||
} | ||
} | ||
function q(e, r, n) { | ||
function le(e, r, n) { | ||
{ | ||
var s = F.ReactDebugCurrentFrame, b = s.getStackAddendum(); | ||
b !== "" && (r += "%s", n = n.concat([b])); | ||
var s = k.ReactDebugCurrentFrame, g = s.getStackAddendum(); | ||
g !== "" && (r += "%s", n = n.concat([g])); | ||
var _ = n.map(function(y) { | ||
@@ -71,25 +71,25 @@ return String(y); | ||
} | ||
var ie = !1, H = !1, se = !1, ce = !1, fe = !1, G; | ||
G = Symbol.for("react.module.reference"); | ||
function N(e) { | ||
return !!(typeof e == "string" || typeof e == "function" || e === a || e === h || fe || e === v || e === E || e === c || ce || e === g || ie || H || se || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === u || e.$$typeof === p || e.$$typeof === o || e.$$typeof === f || // 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 === a || e === b || 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 === G || e.getModuleId !== void 0)); | ||
e.$$typeof === $ || e.getModuleId !== void 0)); | ||
} | ||
function $(e, r, n) { | ||
function P(e, r, n) { | ||
var s = e.displayName; | ||
if (s) | ||
return s; | ||
var b = r.displayName || r.name || ""; | ||
return b !== "" ? n + "(" + b + ")" : n; | ||
var g = r.displayName || r.name || ""; | ||
return g !== "" ? n + "(" + g + ")" : n; | ||
} | ||
function j(e) { | ||
function Y(e) { | ||
return e.displayName || "Context"; | ||
} | ||
function P(e) { | ||
function w(e) { | ||
if (e == null) | ||
return null; | ||
if (typeof e.tag == "number" && S("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; | ||
@@ -101,7 +101,7 @@ if (typeof e == "string") | ||
return "Fragment"; | ||
case i: | ||
case o: | ||
return "Portal"; | ||
case b: | ||
return "Profiler"; | ||
case h: | ||
return "Profiler"; | ||
case v: | ||
return "StrictMode"; | ||
@@ -115,17 +115,17 @@ case E: | ||
switch (e.$$typeof) { | ||
case o: | ||
case u: | ||
var r = e; | ||
return j(r) + ".Consumer"; | ||
case p: | ||
return Y(r) + ".Consumer"; | ||
case i: | ||
var n = e; | ||
return j(n._context) + ".Provider"; | ||
return Y(n._context) + ".Provider"; | ||
case d: | ||
return P(e, e.render, "ForwardRef"); | ||
case f: | ||
return $(e, e.render, "ForwardRef"); | ||
case u: | ||
var s = e.displayName || null; | ||
return s !== null ? s : P(e.type) || "Memo"; | ||
case R: { | ||
var b = e, _ = b._payload, y = b._init; | ||
return s !== null ? s : w(e.type) || "Memo"; | ||
case m: { | ||
var g = e, _ = g._payload, y = g._init; | ||
try { | ||
return P(y(_)); | ||
return w(y(_)); | ||
} catch { | ||
@@ -138,10 +138,10 @@ return null; | ||
} | ||
var C = Object.assign, O = 0, K, X, Z, Q, Re, De, Se; | ||
var F = Object.assign, N = 0, G, K, X, _e, Re, De, Se; | ||
function xe() { | ||
} | ||
xe.__reactDisabledLog = !0; | ||
function Ge() { | ||
function ze() { | ||
{ | ||
if (O === 0) { | ||
K = console.log, X = console.info, Z = console.warn, Q = console.error, Re = console.group, De = console.groupCollapsed, Se = 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 = { | ||
@@ -163,8 +163,8 @@ configurable: !0, | ||
} | ||
O++; | ||
N++; | ||
} | ||
} | ||
function Ke() { | ||
function He() { | ||
{ | ||
if (O--, O === 0) { | ||
if (N--, N === 0) { | ||
var e = { | ||
@@ -176,21 +176,21 @@ configurable: !0, | ||
Object.defineProperties(console, { | ||
log: C({}, e, { | ||
log: F({}, e, { | ||
value: G | ||
}), | ||
info: F({}, e, { | ||
value: K | ||
}), | ||
info: C({}, e, { | ||
warn: F({}, e, { | ||
value: X | ||
}), | ||
warn: C({}, e, { | ||
value: Z | ||
error: F({}, e, { | ||
value: _e | ||
}), | ||
error: C({}, e, { | ||
value: Q | ||
}), | ||
group: C({}, e, { | ||
group: F({}, e, { | ||
value: Re | ||
}), | ||
groupCollapsed: C({}, e, { | ||
groupCollapsed: F({}, e, { | ||
value: De | ||
}), | ||
groupEnd: C({}, e, { | ||
groupEnd: F({}, e, { | ||
value: Se | ||
@@ -200,29 +200,29 @@ }) | ||
} | ||
O < 0 && S("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 ue = F.ReactCurrentDispatcher, de; | ||
function ee(e, r, n) { | ||
var se = k.ReactCurrentDispatcher, fe; | ||
function Z(e, r, n) { | ||
{ | ||
if (de === void 0) | ||
if (fe === void 0) | ||
try { | ||
throw Error(); | ||
} catch (b) { | ||
var s = b.stack.trim().match(/\n( *(at )?)/); | ||
de = s && s[1] || ""; | ||
} catch (g) { | ||
var s = g.stack.trim().match(/\n( *(at )?)/); | ||
fe = s && s[1] || ""; | ||
} | ||
return ` | ||
` + de + e; | ||
` + fe + e; | ||
} | ||
} | ||
var ve = !1, re; | ||
var ce = !1, Q; | ||
{ | ||
var Xe = typeof WeakMap == "function" ? WeakMap : Map; | ||
re = new Xe(); | ||
var Ge = typeof WeakMap == "function" ? WeakMap : Map; | ||
Q = new Ge(); | ||
} | ||
function Te(e, r) { | ||
if (!e || ve) | ||
if (!e || ce) | ||
return ""; | ||
{ | ||
var n = re.get(e); | ||
var n = Q.get(e); | ||
if (n !== void 0) | ||
@@ -232,7 +232,7 @@ return n; | ||
var s; | ||
ve = !0; | ||
var b = Error.prepareStackTrace; | ||
ce = !0; | ||
var g = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var _; | ||
_ = ue.current, ue.current = null, Ge(); | ||
_ = se.current, se.current = null, ze(); | ||
try { | ||
@@ -272,16 +272,16 @@ if (r) { | ||
if (I && s && typeof I.stack == "string") { | ||
for (var d = I.stack.split(` | ||
`), k = s.stack.split(` | ||
`), T = d.length - 1, w = k.length - 1; T >= 1 && w >= 0 && d[T] !== k[w]; ) | ||
w--; | ||
for (; T >= 1 && w >= 0; T--, w--) | ||
if (d[T] !== k[w]) { | ||
if (T !== 1 || w !== 1) | ||
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 (T--, w--, w < 0 || d[T] !== k[w]) { | ||
var M = ` | ||
` + d[T].replace(" at new ", " at "); | ||
return e.displayName && M.includes("<anonymous>") && (M = M.replace("<anonymous>", e.displayName)), typeof e == "function" && re.set(e, M), M; | ||
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 (T >= 1 && w >= 0); | ||
while (D >= 1 && S >= 0); | ||
break; | ||
@@ -291,37 +291,37 @@ } | ||
} finally { | ||
ve = !1, ue.current = _, Ke(), Error.prepareStackTrace = b; | ||
ce = !1, se.current = _, He(), Error.prepareStackTrace = g; | ||
} | ||
var W = e ? e.displayName || e.name : "", Ye = W ? ee(W) : ""; | ||
return typeof e == "function" && re.set(e, Ye), Ye; | ||
var B = e ? e.displayName || e.name : "", Ye = B ? Z(B) : ""; | ||
return typeof e == "function" && Q.set(e, Ye), Ye; | ||
} | ||
function Ze(e, r, n) { | ||
function Ke(e, r, n) { | ||
return Te(e, !1); | ||
} | ||
function Qe(e) { | ||
function Xe(e) { | ||
var r = e.prototype; | ||
return !!(r && r.isReactComponent); | ||
} | ||
function te(e, r, n) { | ||
function ee(e, r, n) { | ||
if (e == null) | ||
return ""; | ||
if (typeof e == "function") | ||
return Te(e, Qe(e)); | ||
return Te(e, Xe(e)); | ||
if (typeof e == "string") | ||
return ee(e); | ||
return Z(e); | ||
switch (e) { | ||
case E: | ||
return ee("Suspense"); | ||
return Z("Suspense"); | ||
case c: | ||
return ee("SuspenseList"); | ||
return Z("SuspenseList"); | ||
} | ||
if (typeof e == "object") | ||
switch (e.$$typeof) { | ||
case d: | ||
return Ke(e.render); | ||
case f: | ||
return Ze(e.render); | ||
case u: | ||
return te(e.type, r, n); | ||
case R: { | ||
var s = e, b = s._payload, _ = s._init; | ||
return ee(e.type, r, n); | ||
case m: { | ||
var s = e, g = s._payload, _ = s._init; | ||
try { | ||
return te(_(b), r, n); | ||
return ee(_(g), r, n); | ||
} catch { | ||
@@ -333,34 +333,34 @@ } | ||
} | ||
var ne = Object.prototype.hasOwnProperty, Fe = {}, we = F.ReactDebugCurrentFrame; | ||
function le(e) { | ||
var re = Object.prototype.hasOwnProperty, we = {}, Fe = k.ReactDebugCurrentFrame; | ||
function te(e) { | ||
if (e) { | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
we.setExtraStackFrame(n); | ||
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 er(e, r, n, s, b) { | ||
function Ze(e, r, n, s, g) { | ||
{ | ||
var _ = Function.call.bind(ne); | ||
var _ = Function.call.bind(re); | ||
for (var y in e) | ||
if (_(e, y)) { | ||
var d = void 0; | ||
var v = void 0; | ||
try { | ||
if (typeof e[y] != "function") { | ||
var k = 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 k.name = "Invariant Violation", k; | ||
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[y](r, y, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (T) { | ||
d = T; | ||
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) && (le(b), S("%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 d), le(null)), d instanceof Error && !(d.message in Fe) && (Fe[d.message] = !0, le(b), S("Failed %s type: %s", n, d.message), le(null)); | ||
v && !(v instanceof Error) && (te(g), 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(g), T("Failed %s type: %s", n, v.message), te(null)); | ||
} | ||
} | ||
} | ||
var rr = Array.isArray; | ||
function pe(e) { | ||
return rr(e); | ||
var Qe = Array.isArray; | ||
function ue(e) { | ||
return Qe(e); | ||
} | ||
function tr(e) { | ||
function er(e) { | ||
{ | ||
@@ -371,3 +371,3 @@ var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; | ||
} | ||
function nr(e) { | ||
function rr(e) { | ||
try { | ||
@@ -382,7 +382,7 @@ return Ce(e), !1; | ||
} | ||
function je(e) { | ||
if (nr(e)) | ||
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), Ce(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 J = F.ReactCurrentOwner, lr = { | ||
var U = k.ReactCurrentOwner, tr = { | ||
key: !0, | ||
@@ -392,6 +392,6 @@ ref: !0, | ||
__source: !0 | ||
}, ke, Oe, ye; | ||
ye = {}; | ||
function ar(e) { | ||
if (ne.call(e, "ref")) { | ||
}, je, ke, de; | ||
de = {}; | ||
function nr(e) { | ||
if (re.call(e, "ref")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "ref").get; | ||
@@ -403,4 +403,4 @@ if (r && r.isReactWarning) | ||
} | ||
function or(e) { | ||
if (ne.call(e, "key")) { | ||
function lr(e) { | ||
if (re.call(e, "key")) { | ||
var r = Object.getOwnPropertyDescriptor(e, "key").get; | ||
@@ -412,12 +412,12 @@ if (r && r.isReactWarning) | ||
} | ||
function ir(e, r) { | ||
if (typeof e.ref == "string" && J.current && r && J.current.stateNode !== r) { | ||
var n = P(J.current.type); | ||
ye[n] || (S('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', P(J.current.type), e.ref), ye[n] = !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 sr(e, r) { | ||
function or(e, r) { | ||
{ | ||
var n = function() { | ||
ke || (ke = !0, S("%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)); | ||
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)); | ||
}; | ||
@@ -430,6 +430,6 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
} | ||
function cr(e, r) { | ||
function ir(e, r) { | ||
{ | ||
var n = function() { | ||
Oe || (Oe = !0, S("%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)); | ||
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)); | ||
}; | ||
@@ -442,4 +442,4 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var fr = function(e, r, n, s, b, _, y) { | ||
var d = { | ||
var sr = function(e, r, n, s, g, _, y) { | ||
var v = { | ||
// This tag allows us to uniquely identify this as a React Element | ||
@@ -455,3 +455,3 @@ $$typeof: l, | ||
}; | ||
return d._store = {}, Object.defineProperty(d._store, "validated", { | ||
return v._store = {}, Object.defineProperty(v._store, "validated", { | ||
configurable: !1, | ||
@@ -461,3 +461,3 @@ enumerable: !1, | ||
value: !1 | ||
}), Object.defineProperty(d, "_self", { | ||
}), Object.defineProperty(v, "_self", { | ||
configurable: !1, | ||
@@ -467,31 +467,31 @@ enumerable: !1, | ||
value: s | ||
}), Object.defineProperty(d, "_source", { | ||
}), Object.defineProperty(v, "_source", { | ||
configurable: !1, | ||
enumerable: !1, | ||
writable: !1, | ||
value: b | ||
}), Object.freeze && (Object.freeze(d.props), Object.freeze(d)), d; | ||
value: g | ||
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v; | ||
}; | ||
function ur(e, r, n, s, b) { | ||
function fr(e, r, n, s, g) { | ||
{ | ||
var _, y = {}, d = null, k = null; | ||
n !== void 0 && (je(n), d = "" + n), or(r) && (je(r.key), d = "" + r.key), ar(r) && (k = r.ref, ir(r, b)); | ||
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, g)); | ||
for (_ in r) | ||
ne.call(r, _) && !lr.hasOwnProperty(_) && (y[_] = r[_]); | ||
re.call(r, _) && !tr.hasOwnProperty(_) && (y[_] = r[_]); | ||
if (e && e.defaultProps) { | ||
var T = e.defaultProps; | ||
for (_ in T) | ||
y[_] === void 0 && (y[_] = T[_]); | ||
var D = e.defaultProps; | ||
for (_ in D) | ||
y[_] === void 0 && (y[_] = D[_]); | ||
} | ||
if (d || k) { | ||
var w = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
d && sr(y, w), k && cr(y, w); | ||
if (v || C) { | ||
var S = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
v && or(y, S), C && ir(y, S); | ||
} | ||
return fr(e, d, k, b, s, J.current, y); | ||
return sr(e, v, C, g, s, U.current, y); | ||
} | ||
} | ||
var he = F.ReactCurrentOwner, Pe = F.ReactDebugCurrentFrame; | ||
function Y(e) { | ||
var ve = k.ReactCurrentOwner, Pe = k.ReactDebugCurrentFrame; | ||
function W(e) { | ||
if (e) { | ||
var r = e._owner, n = te(e.type, e._source, r ? r.type : null); | ||
var r = e._owner, n = ee(e.type, e._source, r ? r.type : null); | ||
Pe.setExtraStackFrame(n); | ||
@@ -501,5 +501,5 @@ } else | ||
} | ||
var be; | ||
be = !1; | ||
function ge(e) { | ||
var pe; | ||
pe = !1; | ||
function he(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
@@ -509,4 +509,4 @@ } | ||
{ | ||
if (he.current) { | ||
var e = P(he.current.type); | ||
if (ve.current) { | ||
var e = w(ve.current.type); | ||
if (e) | ||
@@ -520,3 +520,3 @@ return ` | ||
} | ||
function dr(e) { | ||
function cr(e) { | ||
{ | ||
@@ -533,3 +533,3 @@ if (e !== void 0) { | ||
var Me = {}; | ||
function vr(e) { | ||
function ur(e) { | ||
{ | ||
@@ -546,3 +546,3 @@ var r = Ae(); | ||
} | ||
function $e(e, r) { | ||
function Ie(e, r) { | ||
{ | ||
@@ -552,3 +552,3 @@ if (!e._store || e._store.validated || e.key != null) | ||
e._store.validated = !0; | ||
var n = vr(r); | ||
var n = ur(r); | ||
if (Me[n]) | ||
@@ -558,25 +558,25 @@ return; | ||
var s = ""; | ||
e && e._owner && e._owner !== he.current && (s = " It was passed a child from " + P(e._owner.type) + "."), Y(e), S('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), Y(null); | ||
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 (pe(e)) | ||
if (ue(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var s = e[n]; | ||
ge(s) && $e(s, r); | ||
he(s) && Ie(s, r); | ||
} | ||
else if (ge(e)) | ||
else if (he(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var b = A(e); | ||
if (typeof b == "function" && b !== e.entries) | ||
for (var _ = b.call(e), y; !(y = _.next()).done; ) | ||
ge(y.value) && $e(y.value, r); | ||
var g = A(e); | ||
if (typeof g == "function" && g !== e.entries) | ||
for (var _ = g.call(e), y; !(y = _.next()).done; ) | ||
he(y.value) && Ie(y.value, r); | ||
} | ||
} | ||
} | ||
function pr(e) { | ||
function dr(e) { | ||
{ | ||
@@ -589,5 +589,5 @@ var r = e.type; | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === f || // Note: Memo only checks outer props here. | ||
else if (typeof r == "object" && (r.$$typeof === d || // Note: Memo only checks outer props here. | ||
// Inner props are checked in the reconciler. | ||
r.$$typeof === u)) | ||
r.$$typeof === f)) | ||
n = r.propTypes; | ||
@@ -597,13 +597,13 @@ else | ||
if (n) { | ||
var s = P(r); | ||
er(n, e.props, "prop", s, e); | ||
} else if (r.PropTypes !== void 0 && !be) { | ||
be = !0; | ||
var b = P(r); | ||
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown"); | ||
var s = w(r); | ||
Ze(n, e.props, "prop", s, e); | ||
} else if (r.PropTypes !== void 0 && !pe) { | ||
pe = !0; | ||
var g = w(r); | ||
T("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", g || "Unknown"); | ||
} | ||
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && S("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."); | ||
} | ||
} | ||
function yr(e) { | ||
function vr(e) { | ||
{ | ||
@@ -613,56 +613,56 @@ for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
if (s !== "children" && s !== "key") { | ||
Y(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), Y(null); | ||
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 && (Y(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null)); | ||
e.ref !== null && (W(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), W(null)); | ||
} | ||
} | ||
function Ne(e, r, n, s, b, _) { | ||
function Ne(e, r, n, s, g, _) { | ||
{ | ||
var y = N(e); | ||
var y = M(e); | ||
if (!y) { | ||
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 k = dr(b); | ||
k ? d += k : d += Ae(); | ||
var T; | ||
e === null ? T = "null" : pe(e) ? T = "array" : e !== void 0 && e.$$typeof === l ? (T = "<" + (P(e.type) || "Unknown") + " />", d = " Did you accidentally export a JSX literal instead of a component?") : T = typeof e, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", T, d); | ||
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(g); | ||
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 w = ur(e, r, n, b, _); | ||
if (w == null) | ||
return w; | ||
var S = fr(e, r, n, g, _); | ||
if (S == null) | ||
return S; | ||
if (y) { | ||
var M = r.children; | ||
if (M !== void 0) | ||
var j = r.children; | ||
if (j !== void 0) | ||
if (s) | ||
if (pe(M)) { | ||
for (var W = 0; W < M.length; W++) | ||
Ie(M[W], e); | ||
Object.freeze && Object.freeze(M); | ||
if (ue(j)) { | ||
for (var B = 0; B < j.length; B++) | ||
$e(j[B], e); | ||
Object.freeze && Object.freeze(j); | ||
} else | ||
S("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(M, e); | ||
$e(j, e); | ||
} | ||
return e === a ? yr(w) : pr(w), w; | ||
return e === a ? vr(S) : dr(S), S; | ||
} | ||
} | ||
function hr(e, r, n) { | ||
function pr(e, r, n) { | ||
return Ne(e, r, n, !0); | ||
} | ||
function br(e, r, n) { | ||
function hr(e, r, n) { | ||
return Ne(e, r, n, !1); | ||
} | ||
var gr = br, mr = hr; | ||
z.Fragment = a, z.jsx = gr, z.jsxs = mr; | ||
var yr = hr, br = pr; | ||
z.Fragment = a, z.jsx = yr, z.jsxs = br; | ||
}()), z; | ||
} | ||
process.env.NODE_ENV === "production" ? me.exports = Dr() : me.exports = Sr(); | ||
var m = me.exports; | ||
function Ee({ children: t, textColor: l, style: i, colSpan: a, hide: v, ...h }) { | ||
return /* @__PURE__ */ m.jsx("td", { className: "calendar-label", style: i, colSpan: a, ...h, children: v ? void 0 : /* @__PURE__ */ m.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
process.env.NODE_ENV === "production" ? ye.exports = _r() : ye.exports = Rr(); | ||
var x = ye.exports; | ||
function be({ children: t, textColor: l, cy: o, style: a, colSpan: h, ...b }) { | ||
return /* @__PURE__ */ x.jsx("td", { className: "calendar-label", style: a, colSpan: h, ...b, children: /* @__PURE__ */ x.jsx("span", { className: "calendar-label-text", "aria-hidden": "true", style: { color: l }, children: t }) }); | ||
} | ||
const xr = { | ||
// light themes | ||
const Dr = { | ||
//light themes | ||
empty: { | ||
@@ -780,17 +780,3 @@ level0: "#ffffff", | ||
}, | ||
emoji_positive: { | ||
level0: "🫥", | ||
level1: "😢", | ||
level2: "😞", | ||
level3: "🙂", | ||
level4: "😃" | ||
}, | ||
emoji_negative: { | ||
level0: "😃", | ||
level1: "🙂", | ||
level2: "😕", | ||
level3: "😢", | ||
level4: "🫥" | ||
}, | ||
// dark themes | ||
//dark themes | ||
dark_empty: { | ||
@@ -908,3 +894,3 @@ level0: "#000000", | ||
} | ||
}, Tr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Fr = (t = /* @__PURE__ */ new Date()) => { | ||
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
@@ -918,3 +904,3 @@ Sun: "Sunday", | ||
Sat: "Saturday" | ||
}, i = { | ||
}, o = { | ||
Jan: "January", | ||
@@ -935,171 +921,147 @@ Feb: "February", | ||
year: a[3], | ||
month: i[a[1]], | ||
month: o[a[1]], | ||
day: parseInt(a[2], 10), | ||
date: l[a[0]] | ||
}; | ||
}, Br = (t) => t.reduce((l, i) => l + i, 0), wr = (t) => { | ||
const l = Fr(new Date(t)); | ||
}, Br = (t) => t.reduce((l, o) => l + o, 0), Tr = (t) => { | ||
const l = xr(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")}`, ae = (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), Vr = (t) => +t.slice(8, 10), jr = (t = V()) => t % 4 === 0 && t % 100 !== 0 || t % 400 === 0, _e = (t = V()) => [31, jr(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(), Jr = (t) => new Date(t).getDay(), V = () => (/* @__PURE__ */ new Date()).getFullYear(), Ur = (t = V(), l, i) => { | ||
const a = _e(t), v = B(t), h = []; | ||
let p = v; | ||
for (let o = 0; o < 12; o++) { | ||
const f = a[o]; | ||
}, Le = (t, l, o) => `${t}-${String(l + 1).padStart(2, "0")}-${String(o).padStart(2, "0")}`, wr = (t, l, o) => `${t}-${String(l).padStart(2, "0")}-${String(o).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, o) => { | ||
const a = me(t), h = V(t), b = []; | ||
let i = h; | ||
for (let u = 0; u < 12; u++) { | ||
const d = a[u]; | ||
let E = 0; | ||
for (let c = 0; c < f; c++) | ||
p === 0 && E++, p = (p + 1) % 7; | ||
o === 0 && v !== 0 && E++, h.push(E); | ||
for (let c = 0; c < d; c++) | ||
i === 0 && E++, i = (i + 1) % 7; | ||
u === 0 && h !== 0 && E++, b.push(E); | ||
} | ||
return t !== l && v !== 0 && l !== i && (h[0] -= 1), h; | ||
return t !== l && h !== 0 && l !== o && (b[0] -= 1), b; | ||
}, Or = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
return t.forEach((i) => { | ||
Object.keys(i).forEach((a) => { | ||
l.set(a, i[a]); | ||
return t.forEach((o) => { | ||
Object.keys(o).forEach((a) => { | ||
l.set(a, o[a]); | ||
}); | ||
}), l; | ||
}, Ue = (t) => typeof t == "string" ? xr[t] : t, Pr = (t, l) => { | ||
let i = 0; | ||
}, jr = (t) => typeof t == "string" ? Dr[t] : t, kr = (t, l) => { | ||
let o = 0; | ||
for (let a = t; a <= l; ++a) | ||
i += ze(t, a === t); | ||
return new Array(7).fill(0).map(() => new Array(i).fill(0)); | ||
}, Ar = (t, l) => { | ||
let i = 0; | ||
o += Ue(t, a === t); | ||
return new Array(7).fill(0).map(() => new Array(o).fill(0)); | ||
}, Pr = (t, l) => { | ||
let o = 0; | ||
for (let a = t; a <= l; ++a) | ||
i += ze(t, a === t); | ||
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), v = L(l), h = Pr(a, v); | ||
let p = 0, o = 1; | ||
for (let f = a; f <= v; ++f) { | ||
const E = i ? B(f) : (B(f) + 6) % 7, c = _e(f); | ||
let u = 0, R = 1, g = E; | ||
for (; u < 12; ) { | ||
for (let x = 0; x < c[u]; ++x) | ||
h[g % 7][~~(g / 7) + p] = o, g++, R++, o++; | ||
R > c[u] && (R = 1, u++); | ||
o += Ue(t, a === t); | ||
return new Array(7).fill("").map(() => new Array(o).fill("")); | ||
}, Ue = (t, l) => { | ||
const o = V(t); | ||
return l || o === 0 ? 53 : 52; | ||
}, Ar = (t, l, o) => { | ||
const a = L(t), h = L(l), b = kr(a, h); | ||
let i = 0, u = 1; | ||
for (let d = a; d <= h; ++d) { | ||
const E = o ? V(d) : (V(d) + 6) % 7, c = me(d); | ||
let f = 0, m = 1, p = E; | ||
for (; f < 12; ) { | ||
for (let R = 0; R < c[f]; ++R) | ||
b[p % 7][~~(p / 7) + i] = u, p++, m++, u++; | ||
m > c[f] && (m = 1, f++); | ||
} | ||
p += ~~(g / 7); | ||
i += ~~(p / 7); | ||
} | ||
return h; | ||
}, qe = (t, l, i) => { | ||
const a = L(t), v = L(l), h = Ar(a, v); | ||
let p = 0; | ||
for (let o = a; o <= v; ++o) { | ||
const f = i ? B(o) : (B(o) + 6) % 7, E = _e(o); | ||
let c = 0, u = 1, R = f; | ||
return b; | ||
}, qe = (t, l, o) => { | ||
const a = L(t), h = L(l), b = Pr(a, h); | ||
let i = 0; | ||
for (let u = a; u <= h; ++u) { | ||
const d = o ? V(u) : (V(u) + 6) % 7, E = me(u); | ||
let c = 0, f = 1, m = d; | ||
for (; c < 12; ) { | ||
for (let g = 0; g < E[c]; ++g) { | ||
const x = Cr(o, c + 1, u); | ||
h[R % 7][~~(R / 7) + p] = x, R++, u++; | ||
for (let p = 0; p < E[c]; ++p) { | ||
const R = wr(u, c + 1, f); | ||
b[m % 7][~~(m / 7) + i] = R, m++, f++; | ||
} | ||
u > E[c] && (u = 1, c++); | ||
f > E[c] && (f = 1, c++); | ||
} | ||
p += ~~(R / 7); | ||
i += ~~(m / 7); | ||
} | ||
return h; | ||
}, oe = (t, l, i) => { | ||
const a = `${t}-01-01`, v = $r(a, l), h = Mr(a, l, i); | ||
for (let p = 0; p < h.length; ++p) | ||
for (let o = 0; o < h[p].length; ++o) | ||
if (v === h[p][o]) | ||
return { row: p, col: o }; | ||
return b; | ||
}, ne = (t, l, o) => { | ||
const a = `${t}-01-01`, h = Mr(a, l), b = Ar(a, l, o); | ||
for (let i = 0; i < b.length; ++i) | ||
for (let u = 0; u < b[i].length; ++u) | ||
if (h === b[i][u]) | ||
return { row: i, col: u }; | ||
return { row: 0, col: 0 }; | ||
}, $r = (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: v, col: h } = oe( | ||
}, Mr = (t, l) => { | ||
const o = new Date(t); | ||
return (new Date(l).getTime() - o.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, Ir = (t, l, o, a) => { | ||
const { row: h, col: b } = ne( | ||
L(t), | ||
t, | ||
a | ||
), { col: p } = oe(L(t), l, a), o = [], f = []; | ||
), { col: i } = ne(L(t), l, a), u = [], d = []; | ||
let E = -1, c = 0; | ||
for (let u = h; u <= p; ++u) | ||
u === h ? c = Ve(i[v][u]) - 1 : c = Ve(i[0][u]) - 1, c !== E && (o.push(Tr[c]), E = c, f.push(0)), f[f.length - 1]++; | ||
return { months: o, colSpans: f }; | ||
for (let f = b; f <= i; ++f) | ||
f === b ? c = Ve(o[h][f]) - 1 : c = Ve(o[0][f]) - 1, c !== E && (u.push(Sr[c]), E = c, d.push(0)), d[d.length - 1]++; | ||
return { months: u, colSpans: d }; | ||
}; | ||
function Ir({ start: t, end: l, textColor: i, startsOnSunday: a, cy: v }) { | ||
const h = qe(t, l, a), { day: p } = ae(t), { year: o, month: f, day: E } = ae(l), c = kr(`${o}-${f}-01`), { months: u, colSpans: R } = He(t, l, h, a); | ||
return /* @__PURE__ */ m.jsx("thead", { children: /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { textColor: i, style: { fontSize: v }, colSpan: 1, children: " " }), | ||
u.map((g, x) => { | ||
let D = R[x]; | ||
R.length === 1 && R[0] === 1 ? D++ : u.length > 1 && E < 10 && c !== 0 && x === u.length - 2 ? D-- : u.length > 1 && E < 10 && c !== 0 && x === u.length - 1 && D++; | ||
const A = x === 0 && u.length > 1 && D <= 1 && p >= 21; | ||
return /* @__PURE__ */ m.jsx( | ||
Ee, | ||
{ | ||
textColor: i, | ||
style: { fontSize: v }, | ||
colSpan: D, | ||
hide: A, | ||
children: g | ||
}, | ||
x | ||
); | ||
function $r({ start: t, end: l, textColor: o, startsOnSunday: a, cy: h }) { | ||
const b = qe(t, l, a), { year: i, month: u, day: d } = ge(l), E = Cr(`${i}-${u}-01`), { months: c, colSpans: f } = Ir(t, l, b, a); | ||
return /* @__PURE__ */ x.jsx("thead", { children: /* @__PURE__ */ x.jsxs("tr", { children: [ | ||
/* @__PURE__ */ x.jsx(be, { textColor: o, 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: o, style: { fontSize: h }, colSpan: R, children: m }, p); | ||
}) | ||
] }) }); | ||
} | ||
function Nr({ | ||
theme: t, | ||
themeProps: l, | ||
dataLevel: i, | ||
style: a, | ||
dataTooltip: v, | ||
tooltipSize: h, | ||
...p | ||
}) { | ||
const o = Er(null), [f, E] = _r(-10), c = (g) => { | ||
if (!g) | ||
function Nr({ themeProps: t, dataLevel: l, style: o, dataTooltip: a, tooltipSize: h, ...b }) { | ||
const i = gr(null), [u, d] = mr(-10), E = (f) => { | ||
if (!f) | ||
return 0; | ||
let x = 0; | ||
return g.childNodes.forEach((D) => { | ||
D.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(D).display !== "none" && x++; | ||
}), x; | ||
}, u = (g) => { | ||
if (!g || !g.parentNode) | ||
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 x = Array.from(g.parentNode.childNodes); | ||
let D = 0; | ||
for (let A = 0; A < g.cellIndex; A++) | ||
x[A].style.display !== "none" && D++; | ||
return D; | ||
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; | ||
}; | ||
Rr(() => { | ||
const g = () => { | ||
var x; | ||
if (o.current) { | ||
const D = c((x = o.current) == null ? void 0 : x.parentNode), A = u(o.current); | ||
if (D) { | ||
let F = -10; | ||
const S = A / D; | ||
S > 0.9 ? F = Math.max(~~(o.current.cellIndex * -150) / D, -150) : S > 0.8 ? F = Math.max(~~(o.current.cellIndex * -130) / D, -140) : S > 0.66 ? F = Math.max(~~(o.current.cellIndex * -120) / D, -120) : S > 0.33 ? F = Math.max(~~(o.current.cellIndex * -100) / D, -100) : S > 0.2 ? F = Math.max(~~(o.current.cellIndex * -70) / D, -70) : F = Math.max(~~(o.current.cellIndex * -50) * 5 / D, -50), E(F); | ||
return Er(() => { | ||
const 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 o.current && o.current.addEventListener("mouseover", g), () => { | ||
o.current && o.current.removeEventListener("mouseover", g); | ||
return i.current && i.current.addEventListener("mouseover", f), () => { | ||
i.current && i.current.removeEventListener("mouseover", f); | ||
}; | ||
}, []); | ||
const R = (g) => g === "emoji_positive" || g === "emoji_negative"; | ||
return /* @__PURE__ */ m.jsx( | ||
}, []), /* @__PURE__ */ x.jsx( | ||
"td", | ||
{ | ||
ref: o, | ||
ref: i, | ||
className: "calendar-cell top half-arrow", | ||
style: { | ||
...a, | ||
outline: R(t) ? "transparent" : "1px solid rgba(27, 31, 35, 0.06)", | ||
backgroundColor: R(t) ? "transparent" : l[`level${i}`], | ||
"--tooltip-offset": `${f}px`, | ||
...o, | ||
backgroundColor: t[`level${l}`], | ||
"--tooltip-offset": `${u}px`, | ||
fontSize: h | ||
}, | ||
"data-tooltip": v, | ||
"data-level": i, | ||
...p, | ||
children: R(t) ? l[`level${i}`] : void 0 | ||
"data-tooltip": a, | ||
"data-level": l, | ||
...b | ||
} | ||
@@ -1111,18 +1073,18 @@ ); | ||
start: l, | ||
end: i, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: v, | ||
includeBoundary: h, | ||
cx: p, | ||
cy: o, | ||
cr: f, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
}) { | ||
const { year: u, day: R } = ae(l), { day: g } = ae(i), { row: x, col: D } = oe(u, l, v), { row: A, col: F } = oe(u, i, v), S = qe(l, i, v), { colSpans: q } = He(l, i, S, v), ie = v ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], H = Ue(E), se = Or(t), ce = ($, j) => j == F + 1 && q[q.length - 1] === 1, fe = ($, j) => j < D || j > F, G = ($, j) => j === D && $ < x || j === F && $ > A, N = () => D === F || g - R <= 7; | ||
return /* @__PURE__ */ m.jsx("tbody", { children: ie.map(($, j) => /* @__PURE__ */ m.jsxs("tr", { children: [ | ||
/* @__PURE__ */ m.jsx(Ee, { tabIndex: 0, textColor: a, style: { textAlign: "left", fontSize: o, lineHeight: 0 }, children: $ }), | ||
S[j].map((P, C) => { | ||
if (F === 0 && C === 1) | ||
return /* @__PURE__ */ m.jsx( | ||
const { year: f, day: m } = ge(l), { day: p } = ge(o), { row: R, col: O } = ne(f, l, h), { row: A, col: k } = ne(f, o, h), T = h ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], le = qe(l, o, 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: a, style: { textAlign: "right", fontSize: u, lineHeight: 0 }, children: M }), | ||
le[P].map((Y, w) => { | ||
if (k === 0 && w === 1) | ||
return /* @__PURE__ */ x.jsx( | ||
"td", | ||
@@ -1132,6 +1094,6 @@ { | ||
padding: 0, | ||
width: N() ? p : 0, | ||
height: N() ? o : 0, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: "none", | ||
borderRadius: f, | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
@@ -1141,8 +1103,8 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
C | ||
w | ||
); | ||
if (ce(j, C)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "block" } }, C); | ||
if (G(j, C)) | ||
return /* @__PURE__ */ m.jsx( | ||
if (oe(P, w)) | ||
return /* @__PURE__ */ x.jsx("td", { style: { padding: "0", display: "none" } }, w); | ||
if (ie(P, w)) | ||
return /* @__PURE__ */ x.jsx( | ||
"td", | ||
@@ -1152,6 +1114,6 @@ { | ||
padding: 0, | ||
width: N() ? p : 0, | ||
height: N() ? o : 0, | ||
outline: h ? `1px solid ${H.level0}` : "none", | ||
borderRadius: f, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: b ? `1px solid ${H.level0}` : "none", | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
@@ -1161,100 +1123,82 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
C | ||
w | ||
); | ||
if (fe(j, C)) | ||
return /* @__PURE__ */ m.jsx("td", { style: { padding: "0", display: "none" } }, C); | ||
const O = se.get(P), K = wr(P), X = (Z) => { | ||
const Q = { | ||
date: P, | ||
data: O == null ? void 0 : O.data | ||
const F = ae.get(Y), N = Tr(Y), G = (K) => { | ||
const X = { | ||
date: Y, | ||
data: F == null ? void 0 : F.data | ||
}; | ||
c && c(Z, Q); | ||
c && c(K, X); | ||
}; | ||
return /* @__PURE__ */ m.jsx( | ||
return /* @__PURE__ */ x.jsx( | ||
Nr, | ||
{ | ||
tabIndex: -1, | ||
style: { width: p, height: o, borderRadius: f }, | ||
dataLevel: O !== void 0 ? O.level : 0, | ||
"data-content": JSON.stringify(O == null ? void 0 : O.data), | ||
dataTooltip: K, | ||
tooltipSize: o, | ||
theme: E, | ||
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: X | ||
onClick: G | ||
}, | ||
C | ||
w | ||
); | ||
}) | ||
] }, $)) }); | ||
] }, M)) }); | ||
} | ||
function Wr({ textColor: t, cx: l, theme: i }) { | ||
const a = Ue(i); | ||
return /* @__PURE__ */ m.jsx("div", { className: "description", children: /* @__PURE__ */ m.jsxs("div", { className: "themes", children: [ | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "Less" }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { backgroundColor: a.level0 } }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { backgroundColor: a.level1 } }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { backgroundColor: a.level2 } }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { backgroundColor: a.level3 } }), | ||
/* @__PURE__ */ m.jsx("div", { className: "cell", style: { backgroundColor: a.level4 } }), | ||
/* @__PURE__ */ m.jsx("span", { style: { color: t, fontSize: l }, children: "More" }) | ||
] }) }); | ||
} | ||
function zr({ | ||
function Ur({ | ||
data: t = [], | ||
start: l = Be(V(), 0, 1), | ||
end: i = Be(V(), 11, 31), | ||
textColor: a = "#1f2328", | ||
startsOnSunday: v = !0, | ||
includeBoundary: h = !0, | ||
cx: p = 10, | ||
cy: o = 10, | ||
cr: f = 2, | ||
start: l = Le(J(), 0, 1), | ||
end: o = Le(J(), 11, 31), | ||
textColor: a = "#000", | ||
startsOnSunday: h = !0, | ||
includeBoundary: b = !0, | ||
cx: i = 10, | ||
cy: u = 10, | ||
cr: d = 2, | ||
theme: E = "grass", | ||
onCellClick: c = () => { | ||
}, | ||
style: u | ||
style: f | ||
}) { | ||
return /* @__PURE__ */ m.jsxs("div", { className: "container", style: u, children: [ | ||
/* @__PURE__ */ m.jsx("div", { className: "calendar", style: u, children: /* @__PURE__ */ m.jsxs("table", { children: [ | ||
/* @__PURE__ */ m.jsx(Ir, { start: l, end: i, textColor: a, startsOnSunday: v, cy: o }), | ||
/* @__PURE__ */ m.jsx( | ||
Yr, | ||
{ | ||
data: t, | ||
start: l, | ||
end: i, | ||
textColor: a, | ||
startsOnSunday: v, | ||
includeBoundary: h, | ||
cx: p, | ||
cy: o, | ||
cr: f, | ||
theme: E, | ||
onClick: c | ||
} | ||
) | ||
] }) }), | ||
/* @__PURE__ */ m.jsx(Wr, { textColor: a, cx: p, theme: E }) | ||
] }); | ||
return /* @__PURE__ */ x.jsx("div", { className: "container", style: f, children: /* @__PURE__ */ x.jsxs("table", { children: [ | ||
/* @__PURE__ */ x.jsx($r, { start: l, end: o, textColor: a, startsOnSunday: h, cy: u }), | ||
/* @__PURE__ */ x.jsx( | ||
Yr, | ||
{ | ||
data: t, | ||
start: l, | ||
end: o, | ||
textColor: a, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
} | ||
) | ||
] }) }); | ||
} | ||
export { | ||
zr as ContributionCalendar, | ||
Ue as createTheme, | ||
Ur as ContributionCalendar, | ||
jr as createTheme, | ||
Br as getArraySum, | ||
Ur as getColumnSpansForYears, | ||
V as getCurrentYear, | ||
Fr as getDateDetails, | ||
Be as getDateString, | ||
wr as getDateTooltip, | ||
Jr as getColumnSpansForYears, | ||
J as getCurrentYear, | ||
xr as getDateDetails, | ||
Le as getDateString, | ||
Tr as getDateTooltip, | ||
qe as getDayArray, | ||
kr as getDayIndexFromDateString, | ||
Jr as getDayIndexOfMonth, | ||
$r as getDaysBetween, | ||
B as getFirstDayIndexOfYear, | ||
He as getMonthsAndColSpans, | ||
oe as getRowAndColumnIndexFromDate, | ||
jr as isLeapYear, | ||
ae as parseDateFromDateString, | ||
Vr as parseDayFromDateString, | ||
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, | ||
@@ -1261,0 +1205,0 @@ Ve as parseMonthFromDateString, |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.2.6 | ||
// Type definitions for react-contribution-calendar 1.2.3 | ||
// Project: https://github.com/seiwon-yaehee/react-contribution-calendar | ||
@@ -36,3 +36,3 @@ // Definitions by: Seiwon Park <https://github.com/SeiwonPark> | ||
/** | ||
* The text color of calendar indexes for months and dates, defaults to `#1F2328`. | ||
* The text color of calendar indexes for months and dates, defaults to `#000`. | ||
*/ | ||
@@ -111,3 +111,3 @@ textColor?: string | ||
* | ||
* @version 1.2.6 | ||
* @version 1.2.3 | ||
* @see {@link https://github.com/seiwon-yaehee/react-contribution-calendar#apis} | ||
@@ -114,0 +114,0 @@ */ |
{ | ||
"name": "react-contribution-calendar", | ||
"description": "A GitHub-like contribution calendar component for React", | ||
"version": "1.2.6", | ||
"version": "1.2.7", | ||
"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
77802
1481