UNPKG

react-price-animation

Version:

A component for animating numbers and prices in React.

862 lines (858 loc) 28.9 kB
import './style.css'; import * as _r from "react"; import { useRef as ke, useEffect as Se } from "react"; function Rr(t) { if (t.__esModule) return t; var a = t.default; if (typeof a == "function") { var i = function o() { return this instanceof o ? Reflect.construct(a, arguments, this.constructor) : a.apply(this, arguments); }; i.prototype = a.prototype; } else i = {}; return Object.defineProperty(i, "__esModule", { value: !0 }), Object.keys(t).forEach(function(o) { var d = Object.getOwnPropertyDescriptor(t, o); Object.defineProperty(i, o, d.get ? d : { enumerable: !0, get: function() { return t[o]; } }); }), i; } var ne = { exports: {} }, Y = {}; const $e = /* @__PURE__ */ Rr(_r); /** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var Ce; function Or() { if (Ce) return Y; Ce = 1; var t = $e, a = Symbol.for("react.element"), i = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, d = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, p = { key: !0, ref: !0, __self: !0, __source: !0 }; function h(E, c, _) { var b, y = {}, R = null, x = null; _ !== void 0 && (R = "" + _), c.key !== void 0 && (R = "" + c.key), c.ref !== void 0 && (x = c.ref); for (b in c) o.call(c, b) && !p.hasOwnProperty(b) && (y[b] = c[b]); if (E && E.defaultProps) for (b in c = E.defaultProps, c) y[b] === void 0 && (y[b] = c[b]); return { $$typeof: a, type: E, key: R, ref: x, props: y, _owner: d.current }; } return Y.Fragment = i, Y.jsx = h, Y.jsxs = h, Y; } var $ = {}; /** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var xe; function jr() { return xe || (xe = 1, process.env.NODE_ENV !== "production" && function() { var t = $e, a = Symbol.for("react.element"), i = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), p = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), E = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), _ = Symbol.for("react.suspense"), b = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), R = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), W = Symbol.iterator, K = "@@iterator"; function N(e) { if (e === null || typeof e != "object") return null; var r = W && e[W] || e[K]; return typeof r == "function" ? r : null; } var k = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; function O(e) { { for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), u = 1; u < r; u++) n[u - 1] = arguments[u]; Ne("error", e, n); } } function Ne(e, r, n) { { var u = k.ReactDebugCurrentFrame, l = u.getStackAddendum(); l !== "" && (r += "%s", n = n.concat([l])); var v = n.map(function(f) { return String(f); }); v.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, v); } } var Le = !1, Me = !1, Ue = !1, qe = !1, Be = !1, ae; ae = Symbol.for("react.module.reference"); function Ke(e) { return !!(typeof e == "string" || typeof e == "function" || e === o || e === p || Be || e === d || e === _ || e === b || qe || e === x || Le || Me || Ue || typeof e == "object" && e !== null && (e.$$typeof === R || e.$$typeof === y || e.$$typeof === h || e.$$typeof === E || e.$$typeof === c || // 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 === ae || e.getModuleId !== void 0)); } function Je(e, r, n) { var u = e.displayName; if (u) return u; var l = r.displayName || r.name || ""; return l !== "" ? n + "(" + l + ")" : n; } function ie(e) { return e.displayName || "Context"; } function P(e) { if (e == null) return null; if (typeof e.tag == "number" && O("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; if (typeof e == "string") return e; switch (e) { case o: return "Fragment"; case i: return "Portal"; case p: return "Profiler"; case d: return "StrictMode"; case _: return "Suspense"; case b: return "SuspenseList"; } if (typeof e == "object") switch (e.$$typeof) { case E: var r = e; return ie(r) + ".Consumer"; case h: var n = e; return ie(n._context) + ".Provider"; case c: return Je(e, e.render, "ForwardRef"); case y: var u = e.displayName || null; return u !== null ? u : P(e.type) || "Memo"; case R: { var l = e, v = l._payload, f = l._init; try { return P(f(v)); } catch { return null; } } } return null; } var S = Object.assign, F = 0, oe, ue, se, fe, le, ce, de; function ve() { } ve.__reactDisabledLog = !0; function ze() { { if (F === 0) { oe = console.log, ue = console.info, se = console.warn, fe = console.error, le = console.group, ce = console.groupCollapsed, de = console.groupEnd; var e = { configurable: !0, enumerable: !0, value: ve, writable: !0 }; Object.defineProperties(console, { info: e, log: e, warn: e, error: e, group: e, groupCollapsed: e, groupEnd: e }); } F++; } } function Ge() { { if (F--, F === 0) { var e = { configurable: !0, enumerable: !0, writable: !0 }; Object.defineProperties(console, { log: S({}, e, { value: oe }), info: S({}, e, { value: ue }), warn: S({}, e, { value: se }), error: S({}, e, { value: fe }), group: S({}, e, { value: le }), groupCollapsed: S({}, e, { value: ce }), groupEnd: S({}, e, { value: de }) }); } F < 0 && O("disabledDepth fell below zero. This is a bug in React. Please file an issue."); } } var J = k.ReactCurrentDispatcher, z; function L(e, r, n) { { if (z === void 0) try { throw Error(); } catch (l) { var u = l.stack.trim().match(/\n( *(at )?)/); z = u && u[1] || ""; } return ` ` + z + e; } } var G = !1, M; { var Xe = typeof WeakMap == "function" ? WeakMap : Map; M = new Xe(); } function pe(e, r) { if (!e || G) return ""; { var n = M.get(e); if (n !== void 0) return n; } var u; G = !0; var l = Error.prepareStackTrace; Error.prepareStackTrace = void 0; var v; v = J.current, J.current = null, ze(); try { if (r) { var f = function() { throw Error(); }; if (Object.defineProperty(f.prototype, "props", { set: function() { throw Error(); } }), typeof Reflect == "object" && Reflect.construct) { try { Reflect.construct(f, []); } catch (T) { u = T; } Reflect.construct(e, [], f); } else { try { f.call(); } catch (T) { u = T; } e.call(f.prototype); } } else { try { throw Error(); } catch (T) { u = T; } e(); } } catch (T) { if (T && u && typeof T.stack == "string") { for (var s = T.stack.split(` `), j = u.stack.split(` `), g = s.length - 1, m = j.length - 1; g >= 1 && m >= 0 && s[g] !== j[m]; ) m--; for (; g >= 1 && m >= 0; g--, m--) if (s[g] !== j[m]) { if (g !== 1 || m !== 1) do if (g--, m--, m < 0 || s[g] !== j[m]) { var w = ` ` + s[g].replace(" at new ", " at "); return e.displayName && w.includes("<anonymous>") && (w = w.replace("<anonymous>", e.displayName)), typeof e == "function" && M.set(e, w), w; } while (g >= 1 && m >= 0); break; } } } finally { G = !1, J.current = v, Ge(), Error.prepareStackTrace = l; } var D = e ? e.displayName || e.name : "", C = D ? L(D) : ""; return typeof e == "function" && M.set(e, C), C; } function He(e, r, n) { return pe(e, !1); } function Ze(e) { var r = e.prototype; return !!(r && r.isReactComponent); } function U(e, r, n) { if (e == null) return ""; if (typeof e == "function") return pe(e, Ze(e)); if (typeof e == "string") return L(e); switch (e) { case _: return L("Suspense"); case b: return L("SuspenseList"); } if (typeof e == "object") switch (e.$$typeof) { case c: return He(e.render); case y: return U(e.type, r, n); case R: { var u = e, l = u._payload, v = u._init; try { return U(v(l), r, n); } catch { } } } return ""; } var I = Object.prototype.hasOwnProperty, ge = {}, ye = k.ReactDebugCurrentFrame; function q(e) { if (e) { var r = e._owner, n = U(e.type, e._source, r ? r.type : null); ye.setExtraStackFrame(n); } else ye.setExtraStackFrame(null); } function Qe(e, r, n, u, l) { { var v = Function.call.bind(I); for (var f in e) if (v(e, f)) { var s = void 0; try { if (typeof e[f] != "function") { var j = Error((u || "React class") + ": " + n + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."); throw j.name = "Invariant Violation", j; } s = e[f](r, f, u, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"); } catch (g) { s = g; } s && !(s instanceof Error) && (q(l), O("%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).", u || "React class", n, f, typeof s), q(null)), s instanceof Error && !(s.message in ge) && (ge[s.message] = !0, q(l), O("Failed %s type: %s", n, s.message), q(null)); } } } var er = Array.isArray; function X(e) { return er(e); } function rr(e) { { var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object"; return n; } } function tr(e) { try { return me(e), !1; } catch { return !0; } } function me(e) { return "" + e; } function he(e) { if (tr(e)) return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", rr(e)), me(e); } var V = k.ReactCurrentOwner, nr = { key: !0, ref: !0, __self: !0, __source: !0 }, be, Ee, H; H = {}; function ar(e) { if (I.call(e, "ref")) { var r = Object.getOwnPropertyDescriptor(e, "ref").get; if (r && r.isReactWarning) return !1; } return e.ref !== void 0; } function ir(e) { if (I.call(e, "key")) { var r = Object.getOwnPropertyDescriptor(e, "key").get; if (r && r.isReactWarning) return !1; } return e.key !== void 0; } function or(e, r) { if (typeof e.ref == "string" && V.current && r && V.current.stateNode !== r) { var n = P(V.current.type); H[n] || (O('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(V.current.type), e.ref), H[n] = !0); } } function ur(e, r) { { var n = function() { be || (be = !0, O("%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)); }; n.isReactWarning = !0, Object.defineProperty(e, "key", { get: n, configurable: !0 }); } } function sr(e, r) { { var n = function() { Ee || (Ee = !0, O("%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)); }; n.isReactWarning = !0, Object.defineProperty(e, "ref", { get: n, configurable: !0 }); } } var fr = function(e, r, n, u, l, v, f) { var s = { // This tag allows us to uniquely identify this as a React Element $$typeof: a, // Built-in properties that belong on the element type: e, key: r, ref: n, props: f, // Record the component responsible for creating this element. _owner: v }; return s._store = {}, Object.defineProperty(s._store, "validated", { configurable: !1, enumerable: !1, writable: !0, value: !1 }), Object.defineProperty(s, "_self", { configurable: !1, enumerable: !1, writable: !1, value: u }), Object.defineProperty(s, "_source", { configurable: !1, enumerable: !1, writable: !1, value: l }), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s; }; function lr(e, r, n, u, l) { { var v, f = {}, s = null, j = null; n !== void 0 && (he(n), s = "" + n), ir(r) && (he(r.key), s = "" + r.key), ar(r) && (j = r.ref, or(r, l)); for (v in r) I.call(r, v) && !nr.hasOwnProperty(v) && (f[v] = r[v]); if (e && e.defaultProps) { var g = e.defaultProps; for (v in g) f[v] === void 0 && (f[v] = g[v]); } if (s || j) { var m = typeof e == "function" ? e.displayName || e.name || "Unknown" : e; s && ur(f, m), j && sr(f, m); } return fr(e, s, j, l, u, V.current, f); } } var Z = k.ReactCurrentOwner, _e = k.ReactDebugCurrentFrame; function A(e) { if (e) { var r = e._owner, n = U(e.type, e._source, r ? r.type : null); _e.setExtraStackFrame(n); } else _e.setExtraStackFrame(null); } var Q; Q = !1; function ee(e) { return typeof e == "object" && e !== null && e.$$typeof === a; } function Re() { { if (Z.current) { var e = P(Z.current.type); if (e) return ` Check the render method of \`` + e + "`."; } return ""; } } function cr(e) { { if (e !== void 0) { var r = e.fileName.replace(/^.*[\\\/]/, ""), n = e.lineNumber; return ` Check your code at ` + r + ":" + n + "."; } return ""; } } var Oe = {}; function dr(e) { { var r = Re(); if (!r) { var n = typeof e == "string" ? e : e.displayName || e.name; n && (r = ` Check the top-level render call using <` + n + ">."); } return r; } } function je(e, r) { { if (!e._store || e._store.validated || e.key != null) return; e._store.validated = !0; var n = dr(r); if (Oe[n]) return; Oe[n] = !0; var u = ""; e && e._owner && e._owner !== Z.current && (u = " It was passed a child from " + P(e._owner.type) + "."), A(e), O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, u), A(null); } } function Te(e, r) { { if (typeof e != "object") return; if (X(e)) for (var n = 0; n < e.length; n++) { var u = e[n]; ee(u) && je(u, r); } else if (ee(e)) e._store && (e._store.validated = !0); else if (e) { var l = N(e); if (typeof l == "function" && l !== e.entries) for (var v = l.call(e), f; !(f = v.next()).done; ) ee(f.value) && je(f.value, r); } } } function vr(e) { { var r = e.type; if (r == null || typeof r == "string") return; var n; if (typeof r == "function") n = r.propTypes; else if (typeof r == "object" && (r.$$typeof === c || // Note: Memo only checks outer props here. // Inner props are checked in the reconciler. r.$$typeof === y)) n = r.propTypes; else return; if (n) { var u = P(r); Qe(n, e.props, "prop", u, e); } else if (r.PropTypes !== void 0 && !Q) { Q = !0; var l = P(r); O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", l || "Unknown"); } typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead."); } } function pr(e) { { for (var r = Object.keys(e.props), n = 0; n < r.length; n++) { var u = r[n]; if (u !== "children" && u !== "key") { A(e), O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", u), A(null); break; } } e.ref !== null && (A(e), O("Invalid attribute `ref` supplied to `React.Fragment`."), A(null)); } } var we = {}; function Pe(e, r, n, u, l, v) { { var f = Ke(e); if (!f) { var s = ""; (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " 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(l); j ? s += j : s += Re(); var g; e === null ? g = "null" : X(e) ? g = "array" : e !== void 0 && e.$$typeof === a ? (g = "<" + (P(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : g = typeof e, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", g, s); } var m = lr(e, r, n, l, v); if (m == null) return m; if (f) { var w = r.children; if (w !== void 0) if (u) if (X(w)) { for (var D = 0; D < w.length; D++) Te(w[D], e); Object.freeze && Object.freeze(w); } else O("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 Te(w, e); } if (I.call(r, "key")) { var C = P(e), T = Object.keys(r).filter(function(Er) { return Er !== "key"; }), re = T.length > 0 ? "{key: someKey, " + T.join(": ..., ") + ": ...}" : "{key: someKey}"; if (!we[C + re]) { var br = T.length > 0 ? "{" + T.join(": ..., ") + ": ...}" : "{}"; O(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`, re, C, br, C), we[C + re] = !0; } } return e === o ? pr(m) : vr(m), m; } } function gr(e, r, n) { return Pe(e, r, n, !0); } function yr(e, r, n) { return Pe(e, r, n, !1); } var mr = yr, hr = gr; $.Fragment = o, $.jsx = mr, $.jsxs = hr; }()), $; } process.env.NODE_ENV === "production" ? ne.exports = Or() : ne.exports = jr(); var B = ne.exports; function Ae(t) { var a = t.match(/^var\((.*)\)$/); return a ? a[1] : t; } function Tr(t, a) { var i = t; for (var o of a) { if (!(o in i)) throw new Error("Path ".concat(a.join(" -> "), " does not exist in object")); i = i[o]; } return i; } function We(t, a) { var i = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : [], o = {}; for (var d in t) { var p = t[d], h = [...i, d]; typeof p == "string" || typeof p == "number" || p == null ? o[d] = a(p, h) : typeof p == "object" && !Array.isArray(p) ? o[d] = We(p, a, h) : console.warn('Skipping invalid key "'.concat(h.join("."), '". Should be a string, number, null or object. Received: "').concat(Array.isArray(p) ? "Array" : typeof p, '"')); } return o; } function De(t, a) { var i = {}; if (typeof a == "object") { var o = t; We(a, (E, c) => { if (E != null) { var _ = Tr(o, c); i[Ae(_)] = String(E); } }); } else { var d = t; for (var p in d) { var h = d[p]; h != null && (i[Ae(p)] = h); } } return Object.defineProperty(i, "toString", { value: function() { return Object.keys(this).map((c) => "".concat(c, ":").concat(this[c])).join(";"); }, writable: !1 }), i; } function wr(t, a) { if (typeof t != "object" || !t) return t; var i = t[Symbol.toPrimitive]; if (i !== void 0) { var o = i.call(t, a || "default"); if (typeof o != "object") return o; throw new TypeError("@@toPrimitive must return a primitive value."); } return (a === "string" ? String : Number)(t); } function Pr(t) { var a = wr(t, "string"); return typeof a == "symbol" ? a : String(a); } function kr(t, a, i) { return a = Pr(a), a in t ? Object.defineProperty(t, a, { value: i, enumerable: !0, configurable: !0, writable: !0 }) : t[a] = i, t; } function Fe(t, a) { var i = Object.keys(t); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(t); a && (o = o.filter(function(d) { return Object.getOwnPropertyDescriptor(t, d).enumerable; })), i.push.apply(i, o); } return i; } function Ie(t) { for (var a = 1; a < arguments.length; a++) { var i = arguments[a] != null ? arguments[a] : {}; a % 2 ? Fe(Object(i), !0).forEach(function(o) { kr(t, o, i[o]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) : Fe(Object(i)).forEach(function(o) { Object.defineProperty(t, o, Object.getOwnPropertyDescriptor(i, o)); }); } return t; } function Ve(t, a) { var i = {}; for (var o in t) i[o] = a(t[o], o); return i; } var Sr = (t, a, i) => { for (var o of Object.keys(t)) { var d; if (t[o] !== ((d = a[o]) !== null && d !== void 0 ? d : i[o])) return !1; } return !0; }, Cr = (t) => { var a = (i) => { var o = t.defaultClassName, d = Ie(Ie({}, t.defaultVariants), i); for (var p in d) { var h, E = (h = d[p]) !== null && h !== void 0 ? h : t.defaultVariants[p]; if (E != null) { var c = E; typeof c == "boolean" && (c = c === !0 ? "true" : "false"); var _ = ( // @ts-expect-error t.variantClassNames[p][c] ); _ && (o += " " + _); } } for (var [b, y] of t.compoundVariants) Sr(b, d, t.defaultVariants) && (o += " " + y); return o; }; return a.variants = () => Object.keys(t.variantClassNames), a.classNames = { get base() { return t.defaultClassName.split(" ")[0]; }, get variants() { return Ve(t.variantClassNames, (i) => Ve(i, (o) => o.split(" ")[0])); } }, a; }, xr = { height: "var(--prefix_kc7kd30)" }, Ar = { delay: "var(--prefix_kc7kd31)", translateY: "var(--prefix_kc7kd32)", fromTranslateY: "var(--prefix_kc7kd33)" }, Dr = "prefix_kc7kd3g", te = Cr({ defaultClassName: "prefix_kc7kd3h", variantClassNames: { number: { 0: "prefix_kc7kd3i", 1: "prefix_kc7kd3j", 2: "prefix_kc7kd3k", 3: "prefix_kc7kd3l", 4: "prefix_kc7kd3m", 5: "prefix_kc7kd3n", 6: "prefix_kc7kd3o", 7: "prefix_kc7kd3p", 8: "prefix_kc7kd3q", 9: "prefix_kc7kd3r" }, delay: { delay: "prefix_kc7kd3s" }, change: { change: "prefix_kc7kd3t", noChange: "prefix_kc7kd3u" } }, defaultVariants: {}, compoundVariants: [] }); const Ye = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], Fr = [...Ye, ...Ye]; function $r({ number: t = 12345, delay: a = 0.15, height: i = "20px", startDirection: o = "right", comma: d = !0, initialAnimation: p = !0, ...h }) { const E = ke(!0), c = ke(t); if (Se(() => { c.current = t, E.current = !1; }, [t]), Se(() => { const y = document.getElementById("element"); if (y) { y.style.willChange = "transform", y.classList.add("animate"); const R = setTimeout(() => { y.style.willChange = "auto"; }, 200); return () => clearTimeout(R); } }, [t]), t && !Ir(t)) return /* @__PURE__ */ B.jsx("p", { children: "'숫자 or 123,000 같은 문자 형식만 가능합니다.'" }); const _ = typeof t == "string" ? t.replace(/,/g, "") : t.toString(), b = typeof c.current == "string" ? c.current.replace(/,/g, "") : c.current.toString(); return /* @__PURE__ */ B.jsx("div", { ...h, children: _.split("").map((y, R) => { const x = y === b[R], W = Number(y), K = Number(b[R]); return /* @__PURE__ */ B.jsx( "span", { id: "element", className: Dr, style: De(xr, { height: i }), children: Fr.map((N, k) => /* @__PURE__ */ B.jsx( "span", { className: E.current && p ? te({ number: parseInt(y), delay: "delay" }) : te(x ? { change: "noChange", delay: "delay" } : { change: "change", delay: "delay" }), style: De(Ar, { delay: o == "left" ? `${a * R}s` : `${a * (_.length - R)}s`, translateY: `${-W * 100}%`, fromTranslateY: `${-K * 100}%` }), children: d ? Vr(_, N, R) : N }, `${_}-${R}-${k}` )) }, `${_}-${R}` ); }) }, t); } function Ir(t) { return typeof t == "number" || /^\d{1,3}(,\d{3})*$/.test(t) || /^\d+$/.test(t); } function Vr(t, a, i) { return t.length < 4 || t.length - 1 == i ? a : t.length % 3 == 1 && i % 3 == 0 ? `${a},` : t.length % 3 == 2 && i % 3 == 1 ? `${a},` : (t.length % 3 == 3 || t.length % 3 == 0) && i % 3 == 2 ? `${a},` : a; } export { $r as Count };