PageSourceSearch

https://bepa.kr/share/2022/js/lib/timeago/timeago.min.js

js bepa.kr collected 2026-10-05 01:24:57 UTC 4,474 bytes, 108 lines download raw bytes

1!(function (e, n) {
2    "object" == typeof module && module.exports ? (module.exports = n(e)) : (e.timeago = n(e));
3})("undefined" != typeof window ? window : this, function () {
4    var e = function (e) {
5        var n = {},
6            t = 0,
7            r = "en",
8            o = [60, 60, 24, 7, 365 / 7 / 12, 12],
9            a = 6,
10            i = {
11                en: [
12                    ["just now", "a while"],
13                    ["%s seconds ago", "in %s seconds"],
14                    ["1 minute ago", "in 1 minute"],
15                    ["%s minutes ago", "in %s minutes"],
16                    ["1 hour ago", "in 1 hour"],
17                    ["%s hours ago", "in %s hours"],
18                    ["1 day ago", "in 1 day"],
19                    ["%s days ago", "in %s days"],
20                    ["1 week ago", "in 1 week"],
21                    ["%s weeks ago", "in %s weeks"],
22                    ["1 month ago", "in 1 month"],
23                    ["%s months ago", "in %s months"],
24                    ["1 year ago", "in 1 year"],
25                    ["%s years ago", "in %s years"],
26                ],
27                ko: [
28                    ["방금", "곧"],
29                    ["%s초 전", "%s초 후"],
30                    ["1분 전", "1분 후"],
31                    ["%s분 전", "%s분 후"],
32                    ["1시간 전", "1시간 후"],
33                    ["%s시간 전", "%s시간 후"],
34                    ["1일 전", "1일 후"],
35                    ["%s일 전", "%s일 후"],
36                    ["1주일 전", "1주일 후"],
37                    ["%s주일 전", "%s주일 후"],
38                    ["1개월 전", "1개월 후"],
39                    ["%s개월 전", "%s개월 후"],
40                    ["1년 전", "1년 후"],
41                    ["%s년 전", "%s년 후"],
42                ],
43            },
44            s = function (n) {
45                var t = new Date();
46                return e && (t = d(e)), (t.getTime() - d(n).getTime()) / 1e3;
47            },
48            u = function (e, n) {
49                i[n] || (n = r);
50                var t = (i[n], 0),
51                    s = 0;
52                for (e < 0 && (t = 1), e = Math.abs(e); e >= o[s] && s < a; s++) e /= o[s];
53                return (e = g(e)), (s *= 2), e > (0 === s ? 9 : 1) && (s += 1), i[n][s][t].replace("%s", e);
54            },
55            c = function (e, n) {
56                return u(s(e), n);
57            },
58            f = function (e, n) {
59                i[e] = n;
60            },
61            d = function (e) {
62                if (e instanceof Date) return e;
63                if (isNaN(e)) {
64                    if (/^\d+$/.test(e)) return new Date(g(e, 10));
65                    var n = (e || "").trim();
66                    return (
67                        (n = n.replace(/\.\d+/, "")),
68                        (n = n.replace(/-/, "/").replace(/-/, "/")),
69                        (n = n.replace(/T/, " ").replace(/Z/, " UTC")),
70                        (n = n.replace(/([\+\-]\d\d)\:?(\d\d)/, " $1$2")),
71                        new Date(n)
72                    );
73                }
74                return new Date(g(e));
75            },
76            g = function (e) {
77                return parseInt(e);
78            },
79            m = function (e, n) {
80                return (e %= n), (e = e ? n - e : n), g(e);
81            },
82            l = function (e) {
83                for (var n = 1, t = 0, r = e; e >= o[t] && t < a; t++) (e /= o[t]), (n *= o[t]);
84                return m(r, n);
85            },
86            h = function (e, t, r, o) {
87                var a = s(t);
88                (e.innerHTML = u(a, r)),
89                    (n["k" + o] = setTimeout(function () {
90                        h(e, t, r, o);
91                    }, 1e3 * l(a)));
92            },
93            w = "data-timeago",
94            p = function (e) {
95                return e.getAttribute ? e.getAttribute(w) : e.attr ? e.attr(w) : void 0;
96            },
97            v = function (e, n) {
98                void 0 === e.length && (e = [e]);
99                for (var r = 0; r < e.length; r++) t++, h(e[r], p(e[r]), n, t);
100            },
101            y = function () {
102                for (var e in n) clearTimeout(n[e]);
103                n = {};
104            };
105        return { format: c, register: f, render: v, cancel: y };
106    };
107    return e;
108});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.