react-contribution-calendar
Advanced tools
Comparing version 1.2.5 to 1.2.6-alpha.0
import './styles/style.css'; | ||
import Je, { useRef as gr, useState as mr, useEffect as Er } from "react"; | ||
var be = { exports: {} }, q = {}; | ||
var ye = { exports: {} }, q = {}; | ||
/** | ||
@@ -18,14 +18,14 @@ * @license React | ||
We = 1; | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, y = { key: !0, ref: !0, __self: !0, __source: !0 }; | ||
function h(a, c, m) { | ||
var f, u = {}, R = null, g = null; | ||
m !== void 0 && (R = "" + m), c.key !== void 0 && (R = "" + c.key), c.ref !== void 0 && (g = c.ref); | ||
for (f in c) | ||
i.call(c, f) && !y.hasOwnProperty(f) && (u[f] = c[f]); | ||
if (a && a.defaultProps) | ||
for (f in c = a.defaultProps, c) | ||
u[f] === void 0 && (u[f] = c[f]); | ||
return { $$typeof: l, type: a, key: R, ref: g, props: u, _owner: d.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 q.Fragment = o, q.jsx = h, q.jsxs = h, q; | ||
return q.Fragment = o, q.jsx = i, q.jsxs = i, q; | ||
} | ||
@@ -45,31 +45,31 @@ var z = {}; | ||
return Be || (Be = 1, process.env.NODE_ENV !== "production" && function() { | ||
var t = Je, l = Symbol.for("react.element"), o = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), y = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), a = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), u = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), D = Symbol.iterator, _ = "@@iterator"; | ||
function k(e) { | ||
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 = D && e[D] || e[_]; | ||
var r = R && e[R] || e[O]; | ||
return typeof r == "function" ? r : null; | ||
} | ||
var w = 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]; | ||
ae("error", e, n); | ||
le("error", e, n); | ||
} | ||
} | ||
function ae(e, r, n) { | ||
function le(e, r, n) { | ||
{ | ||
var s = w.ReactDebugCurrentFrame, b = s.getStackAddendum(); | ||
b !== "" && (r += "%s", n = n.concat([b])); | ||
var E = n.map(function(p) { | ||
return String(p); | ||
var s = k.ReactDebugCurrentFrame, g = s.getStackAddendum(); | ||
g !== "" && (r += "%s", n = n.concat([g])); | ||
var _ = n.map(function(y) { | ||
return String(y); | ||
}); | ||
E.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, E); | ||
_.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, _); | ||
} | ||
} | ||
var Ee = !1, H = !1, oe = !1, ie = !1, se = !1, $; | ||
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 === i || e === y || se || e === d || e === m || e === f || ie || e === g || Ee || H || oe || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === u || e.$$typeof === h || e.$$typeof === a || e.$$typeof === c || // This needs to include all possible module reference object | ||
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 | ||
@@ -80,8 +80,8 @@ // we don't know which Flight build this will end up being used | ||
} | ||
function A(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; | ||
} | ||
@@ -91,6 +91,6 @@ function Y(e) { | ||
} | ||
function C(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; | ||
@@ -100,13 +100,13 @@ if (typeof e == "string") | ||
switch (e) { | ||
case i: | ||
case a: | ||
return "Fragment"; | ||
case o: | ||
return "Portal"; | ||
case y: | ||
case b: | ||
return "Profiler"; | ||
case d: | ||
case h: | ||
return "StrictMode"; | ||
case m: | ||
case E: | ||
return "Suspense"; | ||
case f: | ||
case c: | ||
return "SuspenseList"; | ||
@@ -116,17 +116,17 @@ } | ||
switch (e.$$typeof) { | ||
case a: | ||
case u: | ||
var r = e; | ||
return Y(r) + ".Consumer"; | ||
case h: | ||
case i: | ||
var n = e; | ||
return Y(n._context) + ".Provider"; | ||
case c: | ||
return A(e, e.render, "ForwardRef"); | ||
case u: | ||
case d: | ||
return P(e, e.render, "ForwardRef"); | ||
case f: | ||
var s = e.displayName || null; | ||
return s !== null ? s : C(e.type) || "Memo"; | ||
case R: { | ||
var b = e, E = b._payload, p = b._init; | ||
return s !== null ? s : w(e.type) || "Memo"; | ||
case m: { | ||
var g = e, _ = g._payload, y = g._init; | ||
try { | ||
return C(p(E)); | ||
return w(y(_)); | ||
} catch { | ||
@@ -139,6 +139,6 @@ return null; | ||
} | ||
var O = Object.assign, N = 0, G, K, X, _e, Re, De, Se; | ||
function Te() { | ||
var F = Object.assign, N = 0, G, K, X, _e, Re, De, Se; | ||
function xe() { | ||
} | ||
Te.__reactDisabledLog = !0; | ||
xe.__reactDisabledLog = !0; | ||
function ze() { | ||
@@ -151,3 +151,3 @@ { | ||
enumerable: !0, | ||
value: Te, | ||
value: xe, | ||
writable: !0 | ||
@@ -177,21 +177,21 @@ }; | ||
Object.defineProperties(console, { | ||
log: O({}, e, { | ||
log: F({}, e, { | ||
value: G | ||
}), | ||
info: O({}, e, { | ||
info: F({}, e, { | ||
value: K | ||
}), | ||
warn: O({}, e, { | ||
warn: F({}, e, { | ||
value: X | ||
}), | ||
error: O({}, e, { | ||
error: F({}, e, { | ||
value: _e | ||
}), | ||
group: O({}, e, { | ||
group: F({}, e, { | ||
value: Re | ||
}), | ||
groupCollapsed: O({}, e, { | ||
groupCollapsed: F({}, e, { | ||
value: De | ||
}), | ||
groupEnd: O({}, e, { | ||
groupEnd: F({}, e, { | ||
value: Se | ||
@@ -201,20 +201,20 @@ }) | ||
} | ||
N < 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 fe = w.ReactCurrentDispatcher, ce; | ||
var se = k.ReactCurrentDispatcher, fe; | ||
function Z(e, r, n) { | ||
{ | ||
if (ce === void 0) | ||
if (fe === void 0) | ||
try { | ||
throw Error(); | ||
} catch (b) { | ||
var s = b.stack.trim().match(/\n( *(at )?)/); | ||
ce = s && s[1] || ""; | ||
} catch (g) { | ||
var s = g.stack.trim().match(/\n( *(at )?)/); | ||
fe = s && s[1] || ""; | ||
} | ||
return ` | ||
` + ce + e; | ||
` + fe + e; | ||
} | ||
} | ||
var ue = !1, Q; | ||
var ce = !1, Q; | ||
{ | ||
@@ -224,4 +224,4 @@ var Ge = typeof WeakMap == "function" ? WeakMap : Map; | ||
} | ||
function xe(e, r) { | ||
if (!e || ue) | ||
function Te(e, r) { | ||
if (!e || ce) | ||
return ""; | ||
@@ -234,13 +234,13 @@ { | ||
var s; | ||
ue = !0; | ||
var b = Error.prepareStackTrace; | ||
ce = !0; | ||
var g = Error.prepareStackTrace; | ||
Error.prepareStackTrace = void 0; | ||
var E; | ||
E = fe.current, fe.current = null, ze(); | ||
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() { | ||
@@ -251,14 +251,14 @@ throw Error(); | ||
try { | ||
Reflect.construct(p, []); | ||
Reflect.construct(y, []); | ||
} catch (I) { | ||
s = I; | ||
} | ||
Reflect.construct(e, [], p); | ||
Reflect.construct(e, [], y); | ||
} else { | ||
try { | ||
p.call(); | ||
y.call(); | ||
} catch (I) { | ||
s = I; | ||
} | ||
e.call(p.prototype); | ||
e.call(y.prototype); | ||
} | ||
@@ -276,15 +276,15 @@ } else { | ||
for (var v = I.stack.split(` | ||
`), j = s.stack.split(` | ||
`), T = v.length - 1, x = j.length - 1; T >= 1 && x >= 0 && v[T] !== j[x]; ) | ||
x--; | ||
for (; T >= 1 && x >= 0; T--, x--) | ||
if (v[T] !== j[x]) { | ||
if (T !== 1 || x !== 1) | ||
`), 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--, x--, x < 0 || v[T] !== j[x]) { | ||
var P = ` | ||
` + v[T].replace(" at new ", " at "); | ||
return e.displayName && P.includes("<anonymous>") && (P = P.replace("<anonymous>", e.displayName)), typeof e == "function" && Q.set(e, P), P; | ||
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 && x >= 0); | ||
while (D >= 1 && S >= 0); | ||
break; | ||
@@ -294,3 +294,3 @@ } | ||
} finally { | ||
ue = !1, fe.current = E, He(), Error.prepareStackTrace = b; | ||
ce = !1, se.current = _, He(), Error.prepareStackTrace = g; | ||
} | ||
@@ -301,3 +301,3 @@ var B = e ? e.displayName || e.name : "", Ye = B ? Z(B) : ""; | ||
function Ke(e, r, n) { | ||
return xe(e, !1); | ||
return Te(e, !1); | ||
} | ||
@@ -312,9 +312,9 @@ function Xe(e) { | ||
if (typeof e == "function") | ||
return xe(e, Xe(e)); | ||
return Te(e, Xe(e)); | ||
if (typeof e == "string") | ||
return Z(e); | ||
switch (e) { | ||
case m: | ||
case E: | ||
return Z("Suspense"); | ||
case f: | ||
case c: | ||
return Z("SuspenseList"); | ||
@@ -324,10 +324,10 @@ } | ||
switch (e.$$typeof) { | ||
case c: | ||
case d: | ||
return Ke(e.render); | ||
case u: | ||
case f: | ||
return ee(e.type, r, n); | ||
case R: { | ||
var s = e, b = s._payload, E = s._init; | ||
case m: { | ||
var s = e, g = s._payload, _ = s._init; | ||
try { | ||
return ee(E(b), r, n); | ||
return ee(_(g), r, n); | ||
} catch { | ||
@@ -339,3 +339,3 @@ } | ||
} | ||
var re = Object.prototype.hasOwnProperty, we = {}, Fe = w.ReactDebugCurrentFrame; | ||
var re = Object.prototype.hasOwnProperty, we = {}, Fe = k.ReactDebugCurrentFrame; | ||
function te(e) { | ||
@@ -348,18 +348,18 @@ if (e) { | ||
} | ||
function Ze(e, r, n, s, b) { | ||
function Ze(e, r, n, s, g) { | ||
{ | ||
var E = Function.call.bind(re); | ||
for (var p in e) | ||
if (E(e, p)) { | ||
var _ = Function.call.bind(re); | ||
for (var y in e) | ||
if (_(e, y)) { | ||
var v = void 0; | ||
try { | ||
if (typeof e[p] != "function") { | ||
var j = Error((s || "React class") + ": " + n + " 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 j.name = "Invariant Violation", j; | ||
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; | ||
} | ||
v = e[p](r, p, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (T) { | ||
v = T; | ||
v = e[y](r, y, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); | ||
} catch (D) { | ||
v = D; | ||
} | ||
v && !(v instanceof Error) && (te(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, p, typeof v), te(null)), v instanceof Error && !(v.message in we) && (we[v.message] = !0, te(b), S("Failed %s type: %s", n, v.message), te(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)); | ||
} | ||
@@ -369,3 +369,3 @@ } | ||
var Qe = Array.isArray; | ||
function ve(e) { | ||
function ue(e) { | ||
return Qe(e); | ||
@@ -391,5 +391,5 @@ } | ||
if (rr(e)) | ||
return S("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); | ||
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 U = w.ReactCurrentOwner, tr = { | ||
var U = k.ReactCurrentOwner, tr = { | ||
key: !0, | ||
@@ -419,4 +419,4 @@ ref: !0, | ||
if (typeof e.ref == "string" && U.current && r && U.current.stateNode !== r) { | ||
var n = C(U.current.type); | ||
de[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', C(U.current.type), e.ref), de[n] = !0); | ||
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); | ||
} | ||
@@ -427,3 +427,3 @@ } | ||
var n = function() { | ||
je || (je = !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)); | ||
}; | ||
@@ -439,3 +439,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "key", { | ||
var n = function() { | ||
ke || (ke = !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)); | ||
}; | ||
@@ -448,3 +448,3 @@ n.isReactWarning = !0, Object.defineProperty(e, "ref", { | ||
} | ||
var sr = function(e, r, n, s, b, E, p) { | ||
var sr = function(e, r, n, s, g, _, y) { | ||
var v = { | ||
@@ -457,5 +457,5 @@ // This tag allows us to uniquely identify this as a React Element | ||
ref: n, | ||
props: p, | ||
props: y, | ||
// Record the component responsible for creating this element. | ||
_owner: E | ||
_owner: _ | ||
}; | ||
@@ -476,24 +476,24 @@ return v._store = {}, Object.defineProperty(v._store, "validated", { | ||
writable: !1, | ||
value: b | ||
value: g | ||
}), Object.freeze && (Object.freeze(v.props), Object.freeze(v)), v; | ||
}; | ||
function fr(e, r, n, s, b) { | ||
function fr(e, r, n, s, g) { | ||
{ | ||
var E, p = {}, v = null, j = null; | ||
n !== void 0 && (Oe(n), v = "" + n), lr(r) && (Oe(r.key), v = "" + r.key), nr(r) && (j = r.ref, ar(r, b)); | ||
for (E in r) | ||
re.call(r, E) && !tr.hasOwnProperty(E) && (p[E] = r[E]); | ||
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) | ||
re.call(r, _) && !tr.hasOwnProperty(_) && (y[_] = r[_]); | ||
if (e && e.defaultProps) { | ||
var T = e.defaultProps; | ||
for (E in T) | ||
p[E] === void 0 && (p[E] = T[E]); | ||
var D = e.defaultProps; | ||
for (_ in D) | ||
y[_] === void 0 && (y[_] = D[_]); | ||
} | ||
if (v || j) { | ||
var x = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; | ||
v && or(p, x), j && ir(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 sr(e, v, j, b, s, U.current, p); | ||
return sr(e, v, C, g, s, U.current, y); | ||
} | ||
} | ||
var pe = w.ReactCurrentOwner, Pe = w.ReactDebugCurrentFrame; | ||
var ve = k.ReactCurrentOwner, Pe = k.ReactDebugCurrentFrame; | ||
function W(e) { | ||
@@ -506,5 +506,5 @@ if (e) { | ||
} | ||
var he; | ||
he = !1; | ||
function ye(e) { | ||
var pe; | ||
pe = !1; | ||
function he(e) { | ||
return typeof e == "object" && e !== null && e.$$typeof === l; | ||
@@ -514,4 +514,4 @@ } | ||
{ | ||
if (pe.current) { | ||
var e = C(pe.current.type); | ||
if (ve.current) { | ||
var e = w(ve.current.type); | ||
if (e) | ||
@@ -559,3 +559,3 @@ return ` | ||
var s = ""; | ||
e && e._owner && e._owner !== pe.current && (s = " It was passed a child from " + C(e._owner.type) + "."), W(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), W(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); | ||
} | ||
@@ -567,18 +567,18 @@ } | ||
return; | ||
if (ve(e)) | ||
if (ue(e)) | ||
for (var n = 0; n < e.length; n++) { | ||
var s = e[n]; | ||
ye(s) && Ie(s, r); | ||
he(s) && Ie(s, r); | ||
} | ||
else if (ye(e)) | ||
else if (he(e)) | ||
e._store && (e._store.validated = !0); | ||
else if (e) { | ||
var b = k(e); | ||
if (typeof b == "function" && b !== e.entries) | ||
for (var E = b.call(e), p; !(p = E.next()).done; ) | ||
ye(p.value) && Ie(p.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 vr(e) { | ||
function dr(e) { | ||
{ | ||
@@ -591,5 +591,5 @@ var r = e.type; | ||
n = r.propTypes; | ||
else if (typeof r == "object" && (r.$$typeof === c || // 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; | ||
@@ -599,13 +599,13 @@ else | ||
if (n) { | ||
var s = C(r); | ||
var s = w(r); | ||
Ze(n, e.props, "prop", s, e); | ||
} else if (r.PropTypes !== void 0 && !he) { | ||
he = !0; | ||
var b = C(r); | ||
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", b || "Unknown"); | ||
} 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 dr(e) { | ||
function vr(e) { | ||
{ | ||
@@ -615,37 +615,37 @@ for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { | ||
if (s !== "children" && s !== "key") { | ||
W(e), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), W(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 && (W(e), S("Invalid attribute `ref` supplied to `React.Fragment`."), W(null)); | ||
e.ref !== null && (W(e), T("Invalid attribute `ref` supplied to `React.Fragment`."), W(null)); | ||
} | ||
} | ||
function Ne(e, r, n, s, b, E) { | ||
function Ne(e, r, n, s, g, _) { | ||
{ | ||
var p = M(e); | ||
if (!p) { | ||
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 j = cr(b); | ||
j ? v += j : v += Ae(); | ||
var T; | ||
e === null ? T = "null" : ve(e) ? T = "array" : e !== void 0 && e.$$typeof === l ? (T = "<" + (C(e.type) || "Unknown") + " />", v = " 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, v); | ||
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 x = fr(e, r, n, b, E); | ||
if (x == null) | ||
return x; | ||
if (p) { | ||
var P = r.children; | ||
if (P !== void 0) | ||
var S = fr(e, r, n, g, _); | ||
if (S == null) | ||
return S; | ||
if (y) { | ||
var j = r.children; | ||
if (j !== void 0) | ||
if (s) | ||
if (ve(P)) { | ||
for (var B = 0; B < P.length; B++) | ||
$e(P[B], e); | ||
Object.freeze && Object.freeze(P); | ||
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 | ||
$e(P, e); | ||
$e(j, e); | ||
} | ||
return e === i ? dr(x) : vr(x), x; | ||
return e === a ? vr(S) : dr(S), S; | ||
} | ||
@@ -660,12 +660,12 @@ } | ||
var yr = hr, br = pr; | ||
z.Fragment = i, z.jsx = yr, z.jsxs = br; | ||
z.Fragment = a, z.jsx = yr, z.jsxs = br; | ||
}()), z; | ||
} | ||
process.env.NODE_ENV === "production" ? be.exports = _r() : be.exports = Rr(); | ||
var F = be.exports; | ||
function ge({ children: t, textColor: l, style: o, colSpan: i, hide: d, ...y }) { | ||
return /* @__PURE__ */ F.jsx("td", { className: "calendar-label", style: o, colSpan: i, ...y, children: d ? void 0 : /* @__PURE__ */ F.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 Dr = { | ||
// light themes | ||
//light themes | ||
empty: { | ||
@@ -783,17 +783,3 @@ level0: "#ffffff", | ||
}, | ||
emoji_positive: { | ||
level0: "🫥", | ||
level1: "😢", | ||
level2: "😞", | ||
level3: "🙂", | ||
level4: "😃" | ||
}, | ||
emoji_negative: { | ||
level0: "😃", | ||
level1: "🙂", | ||
level2: "😕", | ||
level3: "😢", | ||
level4: "🫥" | ||
}, | ||
// dark themes | ||
//dark themes | ||
dark_empty: { | ||
@@ -911,3 +897,3 @@ level0: "#000000", | ||
} | ||
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], Tr = (t = /* @__PURE__ */ new Date()) => { | ||
}, Sr = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"], xr = (t = /* @__PURE__ */ new Date()) => { | ||
const l = { | ||
@@ -934,28 +920,28 @@ Sun: "Sunday", | ||
Dec: "December" | ||
}, i = t.toString().split(" "); | ||
}, a = t.toString().split(" "); | ||
return { | ||
year: i[3], | ||
month: o[i[1]], | ||
day: parseInt(i[2], 10), | ||
date: l[i[0]] | ||
year: a[3], | ||
month: o[a[1]], | ||
day: parseInt(a[2], 10), | ||
date: l[a[0]] | ||
}; | ||
}, Br = (t) => t.reduce((l, o) => l + o, 0), xr = (t) => { | ||
const l = Tr(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}`; | ||
}, 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")}`, ne = (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 i = me(t), d = V(t), y = []; | ||
let h = d; | ||
for (let a = 0; a < 12; a++) { | ||
const c = i[a]; | ||
let m = 0; | ||
for (let f = 0; f < c; f++) | ||
h === 0 && m++, h = (h + 1) % 7; | ||
a === 0 && d !== 0 && m++, y.push(m); | ||
}, 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 < d; c++) | ||
i === 0 && E++, i = (i + 1) % 7; | ||
u === 0 && h !== 0 && E++, b.push(E); | ||
} | ||
return t !== l && d !== 0 && l !== o && (y[0] -= 1), y; | ||
return t !== l && h !== 0 && l !== o && (b[0] -= 1), b; | ||
}, Or = (t) => { | ||
const l = /* @__PURE__ */ new Map(); | ||
return t.forEach((o) => { | ||
Object.keys(o).forEach((i) => { | ||
l.set(i, o[i]); | ||
Object.keys(o).forEach((a) => { | ||
l.set(a, o[a]); | ||
}); | ||
@@ -965,9 +951,9 @@ }), l; | ||
let o = 0; | ||
for (let i = t; i <= l; ++i) | ||
o += Ue(t, i === t); | ||
for (let a = t; a <= l; ++a) | ||
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 i = t; i <= l; ++i) | ||
o += Ue(t, i === t); | ||
for (let a = t; a <= l; ++a) | ||
o += Ue(t, a === t); | ||
return new Array(7).fill("").map(() => new Array(o).fill("")); | ||
@@ -978,37 +964,37 @@ }, Ue = (t, l) => { | ||
}, Ar = (t, l, o) => { | ||
const i = L(t), d = L(l), y = kr(i, d); | ||
let h = 0, a = 1; | ||
for (let c = i; c <= d; ++c) { | ||
const m = o ? V(c) : (V(c) + 6) % 7, f = me(c); | ||
let u = 0, R = 1, g = m; | ||
for (; u < 12; ) { | ||
for (let D = 0; D < f[u]; ++D) | ||
y[g % 7][~~(g / 7) + h] = a, g++, R++, a++; | ||
R > f[u] && (R = 1, u++); | ||
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++); | ||
} | ||
h += ~~(g / 7); | ||
i += ~~(p / 7); | ||
} | ||
return y; | ||
return b; | ||
}, qe = (t, l, o) => { | ||
const i = L(t), d = L(l), y = Pr(i, d); | ||
let h = 0; | ||
for (let a = i; a <= d; ++a) { | ||
const c = o ? V(a) : (V(a) + 6) % 7, m = me(a); | ||
let f = 0, u = 1, R = c; | ||
for (; f < 12; ) { | ||
for (let g = 0; g < m[f]; ++g) { | ||
const D = wr(a, f + 1, u); | ||
y[R % 7][~~(R / 7) + h] = D, R++, u++; | ||
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 p = 0; p < E[c]; ++p) { | ||
const R = wr(u, c + 1, f); | ||
b[m % 7][~~(m / 7) + i] = R, m++, f++; | ||
} | ||
u > m[f] && (u = 1, f++); | ||
f > E[c] && (f = 1, c++); | ||
} | ||
h += ~~(R / 7); | ||
i += ~~(m / 7); | ||
} | ||
return y; | ||
}, le = (t, l, o) => { | ||
const i = `${t}-01-01`, d = Mr(i, l), y = Ar(i, l, o); | ||
for (let h = 0; h < y.length; ++h) | ||
for (let a = 0; a < y[h].length; ++a) | ||
if (d === y[h][a]) | ||
return { row: h, col: a }; | ||
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 }; | ||
@@ -1018,92 +1004,69 @@ }, Mr = (t, l) => { | ||
return (new Date(l).getTime() - o.getTime()) / (1e3 * 60 * 60 * 24) + 1; | ||
}, Ir = (t, l, o, i) => { | ||
const { row: d, col: y } = le( | ||
}, Ir = (t, l, o, a) => { | ||
const { row: h, col: b } = ne( | ||
L(t), | ||
t, | ||
i | ||
), { col: h } = le(L(t), l, i), a = [], c = []; | ||
let m = -1, f = 0; | ||
for (let u = y; u <= h; ++u) | ||
u === y ? f = Ve(o[d][u]) - 1 : f = Ve(o[0][u]) - 1, f !== m && (a.push(Sr[f]), m = f, c.push(0)), c[c.length - 1]++; | ||
return { months: a, colSpans: c }; | ||
a | ||
), { col: i } = ne(L(t), l, a), u = [], d = []; | ||
let E = -1, c = 0; | ||
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 $r({ start: t, end: l, textColor: o, startsOnSunday: i, cy: d }) { | ||
const y = qe(t, l, i), { day: h } = ne(t), { year: a, month: c, day: m } = ne(l), f = Cr(`${a}-${c}-01`), { months: u, colSpans: R } = Ir(t, l, y, i); | ||
return /* @__PURE__ */ F.jsx("thead", { children: /* @__PURE__ */ F.jsxs("tr", { children: [ | ||
/* @__PURE__ */ F.jsx(ge, { textColor: o, style: { width: "4em", fontSize: d }, colSpan: 1, children: " " }), | ||
u.map((g, D) => { | ||
let _ = R[D]; | ||
R.length === 1 && R[0] === 1 ? _++ : u.length > 1 && m < 10 && f !== 0 && D === u.length - 2 ? _-- : u.length > 1 && m < 10 && f !== 0 && D === u.length - 1 && _++; | ||
const k = D === 0 && u.length > 1 && _ === 1 && h >= 19; | ||
return /* @__PURE__ */ F.jsx( | ||
ge, | ||
{ | ||
textColor: o, | ||
style: { fontSize: d }, | ||
colSpan: _, | ||
hide: k, | ||
children: g | ||
}, | ||
D | ||
); | ||
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: o, | ||
style: i, | ||
dataTooltip: d, | ||
tooltipSize: y, | ||
...h | ||
}) { | ||
const a = gr(null), [c, m] = mr(-10), f = (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 D = 0; | ||
return g.childNodes.forEach((_) => { | ||
_.nodeType === Node.ELEMENT_NODE && window.getComputedStyle(_).display !== "none" && D++; | ||
}), D; | ||
}, 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 D = Array.from(g.parentNode.childNodes); | ||
let _ = 0; | ||
for (let k = 0; k < g.cellIndex; k++) | ||
D[k].style.display !== "none" && _++; | ||
return _; | ||
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; | ||
}; | ||
Er(() => { | ||
const g = () => { | ||
var D; | ||
if (a.current) { | ||
const _ = f((D = a.current) == null ? void 0 : D.parentNode), k = u(a.current); | ||
if (_) { | ||
let w = -10; | ||
const S = k / _; | ||
S > 0.9 ? w = Math.max(~~(a.current.cellIndex * -150) / _, -150) : S > 0.8 ? w = Math.max(~~(a.current.cellIndex * -130) / _, -140) : S > 0.66 ? w = Math.max(~~(a.current.cellIndex * -120) / _, -120) : S > 0.33 ? w = Math.max(~~(a.current.cellIndex * -100) / _, -100) : S > 0.2 ? w = Math.max(~~(a.current.cellIndex * -70) / _, -70) : w = Math.max(~~(a.current.cellIndex * -50) * 5 / _, -50), m(w); | ||
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 a.current && a.current.addEventListener("mouseover", g), () => { | ||
a.current && a.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__ */ F.jsx( | ||
}, []), /* @__PURE__ */ x.jsx( | ||
"td", | ||
{ | ||
ref: a, | ||
ref: i, | ||
className: "calendar-cell top half-arrow", | ||
style: { | ||
...i, | ||
backgroundColor: R(t) ? "transparent" : l[`level${o}`], | ||
"--tooltip-offset": `${c}px`, | ||
fontSize: y | ||
...o, | ||
backgroundColor: t[`level${l}`], | ||
"--tooltip-offset": `${u}px`, | ||
fontSize: h | ||
}, | ||
"data-tooltip": d, | ||
"data-level": o, | ||
...h, | ||
children: R(t) ? l[`level${o}`] : void 0 | ||
"data-tooltip": a, | ||
"data-level": l, | ||
...b | ||
} | ||
@@ -1116,17 +1079,17 @@ ); | ||
end: o, | ||
textColor: i, | ||
startsOnSunday: d, | ||
includeBoundary: y, | ||
cx: h, | ||
cy: a, | ||
cr: c, | ||
theme: m, | ||
onClick: f | ||
textColor: a, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
}) { | ||
const { year: u, day: R } = ne(l), { day: g } = ne(o), { row: D, col: _ } = le(u, l, d), { row: k, col: w } = le(u, o, d), S = d ? ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"] : ["Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun"], ae = qe(l, o, d), H = ((M) => jr(M))(m), oe = Or(t), ie = (M, A) => A < _ || A > w, se = (M, A) => A === _ && M < D || A === w && M > k, $ = () => _ === w || g - R <= 7; | ||
return /* @__PURE__ */ F.jsx("tbody", { children: S.map((M, A) => /* @__PURE__ */ F.jsxs("tr", { children: [ | ||
/* @__PURE__ */ F.jsx(ge, { tabIndex: 0, textColor: i, style: { textAlign: "right", fontSize: a, lineHeight: 0 }, children: M }), | ||
ae[A].map((Y, C) => { | ||
if (w === 0 && C === 1) | ||
return /* @__PURE__ */ F.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", | ||
@@ -1136,6 +1099,6 @@ { | ||
padding: 0, | ||
width: $() ? h : 0, | ||
height: $() ? a : 0, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: "none", | ||
borderRadius: c, | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
@@ -1145,8 +1108,8 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
C | ||
w | ||
); | ||
if (ie(A, C)) | ||
return /* @__PURE__ */ F.jsx("td", { style: { padding: "0", display: "none" } }, C); | ||
if (se(A, C)) | ||
return /* @__PURE__ */ F.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", | ||
@@ -1156,6 +1119,6 @@ { | ||
padding: 0, | ||
width: $() ? h : 0, | ||
height: $() ? a : 0, | ||
outline: y ? `1px solid ${H.level0}` : "none", | ||
borderRadius: c, | ||
width: $() ? i : 0, | ||
height: $() ? u : 0, | ||
outline: b ? `1px solid ${H.level0}` : "none", | ||
borderRadius: d, | ||
outlineOffset: "-1px", | ||
@@ -1165,25 +1128,24 @@ shapeRendering: "geometricPrecision" | ||
}, | ||
C | ||
w | ||
); | ||
const O = oe.get(Y), N = xr(Y), G = (K) => { | ||
const F = ae.get(Y), N = Tr(Y), G = (K) => { | ||
const X = { | ||
date: Y, | ||
data: O == null ? void 0 : O.data | ||
data: F == null ? void 0 : F.data | ||
}; | ||
f && f(K, X); | ||
c && c(K, X); | ||
}; | ||
return /* @__PURE__ */ F.jsx( | ||
return /* @__PURE__ */ x.jsx( | ||
Nr, | ||
{ | ||
tabIndex: -1, | ||
style: { width: h, height: a, borderRadius: c }, | ||
dataLevel: O !== void 0 ? O.level : 0, | ||
"data-content": JSON.stringify(O == null ? void 0 : O.data), | ||
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: a, | ||
theme: m, | ||
tooltipSize: u, | ||
themeProps: H, | ||
onClick: G | ||
}, | ||
C | ||
w | ||
); | ||
@@ -1197,16 +1159,16 @@ }) | ||
end: o = Le(J(), 11, 31), | ||
textColor: i = "#000", | ||
startsOnSunday: d = !0, | ||
includeBoundary: y = !0, | ||
cx: h = 10, | ||
cy: a = 10, | ||
cr: c = 2, | ||
theme: m = "grass", | ||
onCellClick: f = () => { | ||
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__ */ F.jsx("div", { className: "container", style: u, children: /* @__PURE__ */ F.jsxs("table", { children: [ | ||
/* @__PURE__ */ F.jsx($r, { start: l, end: o, textColor: i, startsOnSunday: d, cy: a }), | ||
/* @__PURE__ */ F.jsx( | ||
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, | ||
@@ -1217,10 +1179,10 @@ { | ||
end: o, | ||
textColor: i, | ||
startsOnSunday: d, | ||
includeBoundary: y, | ||
cx: h, | ||
cy: a, | ||
cr: c, | ||
theme: m, | ||
onClick: f | ||
textColor: a, | ||
startsOnSunday: h, | ||
includeBoundary: b, | ||
cx: i, | ||
cy: u, | ||
cr: d, | ||
theme: E, | ||
onClick: c | ||
} | ||
@@ -1236,5 +1198,5 @@ ) | ||
J as getCurrentYear, | ||
Tr as getDateDetails, | ||
xr as getDateDetails, | ||
Le as getDateString, | ||
xr as getDateTooltip, | ||
Tr as getDateTooltip, | ||
qe as getDayArray, | ||
@@ -1246,5 +1208,5 @@ Cr as getDayIndexFromDateString, | ||
Ir as getMonthsAndColSpans, | ||
le as getRowAndColumnIndexFromDate, | ||
ne as getRowAndColumnIndexFromDate, | ||
Fr as isLeapYear, | ||
ne as parseDateFromDateString, | ||
ge as parseDateFromDateString, | ||
Lr as parseDayFromDateString, | ||
@@ -1251,0 +1213,0 @@ Or as parseInputData, |
@@ -1,2 +0,2 @@ | ||
// Type definitions for react-contribution-calendar 1.2.5 | ||
// 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.5 | ||
* @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.5", | ||
"version": "1.2.6-alpha.0", | ||
"type": "module", | ||
@@ -66,2 +66,2 @@ "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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
77787
1481
3