javascript-time-ago 2.3.5 → 2.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -0
- package/README.md +19 -13
- package/bin/generate-locale-messages.js +5 -1
- package/bundle/javascript-time-ago.js +1 -1
- package/bundle/javascript-time-ago.js.map +1 -1
- package/bundle/javascript-time-ago.min.js +1 -1
- package/bundle/javascript-time-ago.min.js.map +1 -1
- package/commonjs/TimeAgo.js +1 -1
- package/commonjs/TimeAgo.js.map +1 -1
- package/commonjs/TimeAgo.test.js +6 -6
- package/commonjs/TimeAgo.test.js.map +1 -1
- package/commonjs/style/twitter.test.js +3 -3
- package/commonjs/style/twitter.test.js.map +1 -1
- package/index.d.ts +129 -0
- package/locale/af/index.js +3 -1
- package/locale/am/index.js +3 -1
- package/locale/ar/index.js +3 -1
- package/locale/ar-AE/index.js +3 -1
- package/locale/as/index.js +3 -1
- package/locale/ast/index.js +3 -1
- package/locale/az/index.js +3 -1
- package/locale/be/index.js +3 -1
- package/locale/bg/index.js +3 -1
- package/locale/bn/index.js +3 -1
- package/locale/br/index.js +3 -1
- package/locale/bs/index.js +3 -1
- package/locale/bs-Cyrl/index.js +3 -1
- package/locale/ca/index.js +3 -1
- package/locale/ccp/index.js +3 -1
- package/locale/ce/index.js +3 -1
- package/locale/chr/index.js +3 -1
- package/locale/cs/index.js +3 -1
- package/locale/cy/index.js +3 -1
- package/locale/da/index.js +3 -1
- package/locale/da.json +19 -0
- package/locale/de/index.js +3 -1
- package/locale/dsb/index.js +3 -1
- package/locale/dz/index.js +3 -1
- package/locale/ee/index.js +3 -1
- package/locale/el/index.js +3 -1
- package/locale/en/index.js +3 -1
- package/locale/en-001/index.js +3 -1
- package/locale/en-150/index.js +3 -1
- package/locale/en-AG/index.js +3 -1
- package/locale/en-AI/index.js +3 -1
- package/locale/en-AT/index.js +3 -1
- package/locale/en-AU/index.js +3 -1
- package/locale/en-BB/index.js +3 -1
- package/locale/en-BE/index.js +3 -1
- package/locale/en-BM/index.js +3 -1
- package/locale/en-BS/index.js +3 -1
- package/locale/en-BW/index.js +3 -1
- package/locale/en-BZ/index.js +3 -1
- package/locale/en-CA/index.js +3 -1
- package/locale/en-CC/index.js +3 -1
- package/locale/en-CH/index.js +3 -1
- package/locale/en-CK/index.js +3 -1
- package/locale/en-CM/index.js +3 -1
- package/locale/en-CX/index.js +3 -1
- package/locale/en-CY/index.js +3 -1
- package/locale/en-DE/index.js +3 -1
- package/locale/en-DG/index.js +3 -1
- package/locale/en-DK/index.js +3 -1
- package/locale/en-DM/index.js +3 -1
- package/locale/en-ER/index.js +3 -1
- package/locale/en-FI/index.js +3 -1
- package/locale/en-FJ/index.js +3 -1
- package/locale/en-FK/index.js +3 -1
- package/locale/en-FM/index.js +3 -1
- package/locale/en-GB/index.js +3 -1
- package/locale/en-GD/index.js +3 -1
- package/locale/en-GG/index.js +3 -1
- package/locale/en-GH/index.js +3 -1
- package/locale/en-GI/index.js +3 -1
- package/locale/en-GM/index.js +3 -1
- package/locale/en-GY/index.js +3 -1
- package/locale/en-HK/index.js +3 -1
- package/locale/en-IE/index.js +3 -1
- package/locale/en-IL/index.js +3 -1
- package/locale/en-IM/index.js +3 -1
- package/locale/en-IN/index.js +3 -1
- package/locale/en-IO/index.js +3 -1
- package/locale/en-JE/index.js +3 -1
- package/locale/en-JM/index.js +3 -1
- package/locale/en-KE/index.js +3 -1
- package/locale/en-KI/index.js +3 -1
- package/locale/en-KN/index.js +3 -1
- package/locale/en-KY/index.js +3 -1
- package/locale/en-LC/index.js +3 -1
- package/locale/en-LR/index.js +3 -1
- package/locale/en-LS/index.js +3 -1
- package/locale/en-MG/index.js +3 -1
- package/locale/en-MO/index.js +3 -1
- package/locale/en-MS/index.js +3 -1
- package/locale/en-MT/index.js +3 -1
- package/locale/en-MU/index.js +3 -1
- package/locale/en-MW/index.js +3 -1
- package/locale/en-MY/index.js +3 -1
- package/locale/en-NA/index.js +3 -1
- package/locale/en-NF/index.js +3 -1
- package/locale/en-NG/index.js +3 -1
- package/locale/en-NL/index.js +3 -1
- package/locale/en-NR/index.js +3 -1
- package/locale/en-NU/index.js +3 -1
- package/locale/en-NZ/index.js +3 -1
- package/locale/en-PG/index.js +3 -1
- package/locale/en-PH/index.js +3 -1
- package/locale/en-PK/index.js +3 -1
- package/locale/en-PN/index.js +3 -1
- package/locale/en-PW/index.js +3 -1
- package/locale/en-RW/index.js +3 -1
- package/locale/en-SB/index.js +3 -1
- package/locale/en-SC/index.js +3 -1
- package/locale/en-SD/index.js +3 -1
- package/locale/en-SE/index.js +3 -1
- package/locale/en-SG/index.js +3 -1
- package/locale/en-SH/index.js +3 -1
- package/locale/en-SI/index.js +3 -1
- package/locale/en-SL/index.js +3 -1
- package/locale/en-SS/index.js +3 -1
- package/locale/en-SX/index.js +3 -1
- package/locale/en-SZ/index.js +3 -1
- package/locale/en-TC/index.js +3 -1
- package/locale/en-TK/index.js +3 -1
- package/locale/en-TO/index.js +3 -1
- package/locale/en-TT/index.js +3 -1
- package/locale/en-TV/index.js +3 -1
- package/locale/en-TZ/index.js +3 -1
- package/locale/en-UG/index.js +3 -1
- package/locale/en-VC/index.js +3 -1
- package/locale/en-VG/index.js +3 -1
- package/locale/en-VU/index.js +3 -1
- package/locale/en-WS/index.js +3 -1
- package/locale/en-ZA/index.js +3 -1
- package/locale/en-ZM/index.js +3 -1
- package/locale/en-ZW/index.js +3 -1
- package/locale/es/index.js +3 -1
- package/locale/es-AR/index.js +3 -1
- package/locale/es-MX/index.js +3 -1
- package/locale/es-PY/index.js +3 -1
- package/locale/es-SV/index.js +3 -1
- package/locale/es-US/index.js +3 -1
- package/locale/es.json +19 -7
- package/locale/et/index.js +3 -1
- package/locale/eu/index.js +3 -1
- package/locale/fa/index.js +3 -1
- package/locale/fi/index.js +3 -1
- package/locale/fil/index.js +3 -1
- package/locale/fo/index.js +3 -1
- package/locale/fr/index.js +3 -1
- package/locale/fr-CA/index.js +3 -1
- package/locale/fr.json +11 -5
- package/locale/fur/index.js +3 -1
- package/locale/fy/index.js +3 -1
- package/locale/ga/index.js +3 -1
- package/locale/gd/index.js +3 -1
- package/locale/gl/index.js +3 -1
- package/locale/gu/index.js +3 -1
- package/locale/he/index.js +3 -1
- package/locale/hi/index.js +3 -1
- package/locale/hi.json +2 -8
- package/locale/hr/index.js +3 -1
- package/locale/hsb/index.js +3 -1
- package/locale/hu/index.js +3 -1
- package/locale/hy/index.js +3 -1
- package/locale/ia/index.js +3 -1
- package/locale/id/index.js +3 -1
- package/locale/is/index.js +3 -1
- package/locale/it/index.js +3 -1
- package/locale/it.json +19 -0
- package/locale/ja/index.js +3 -1
- package/locale/jgo/index.js +3 -1
- package/locale/jv/index.js +3 -1
- package/locale/ka/index.js +3 -1
- package/locale/kea/index.js +3 -1
- package/locale/kk/index.js +3 -1
- package/locale/kl/index.js +3 -1
- package/locale/km/index.js +3 -1
- package/locale/kn/index.js +3 -1
- package/locale/ko/index.js +3 -1
- package/locale/kok/index.js +3 -1
- package/locale/ksh/index.js +3 -1
- package/locale/ku/index.js +3 -1
- package/locale/ky/index.js +3 -1
- package/locale/lb/index.js +3 -1
- package/locale/lkt/index.js +3 -1
- package/locale/lo/index.js +3 -1
- package/locale/lt/index.js +3 -1
- package/locale/lv/index.js +3 -1
- package/locale/mk/index.js +3 -1
- package/locale/ml/index.js +3 -1
- package/locale/mn/index.js +3 -1
- package/locale/mr/index.js +3 -1
- package/locale/ms/index.js +3 -1
- package/locale/mt/index.js +3 -1
- package/locale/my/index.js +3 -1
- package/locale/mzn/index.js +3 -1
- package/locale/nb/index.js +3 -1
- package/locale/ne/index.js +3 -1
- package/locale/nl/index.js +3 -1
- package/locale/nl.json +16 -0
- package/locale/nn/index.js +3 -1
- package/locale/or/index.js +3 -1
- package/locale/pa/index.js +3 -1
- package/locale/pl/index.js +3 -1
- package/locale/ps/index.js +3 -1
- package/locale/pt/index.js +3 -1
- package/locale/pt-AO/index.js +3 -1
- package/locale/pt-CH/index.js +3 -1
- package/locale/pt-CV/index.js +3 -1
- package/locale/pt-GQ/index.js +3 -1
- package/locale/pt-GW/index.js +3 -1
- package/locale/pt-LU/index.js +3 -1
- package/locale/pt-MO/index.js +3 -1
- package/locale/pt-MZ/index.js +3 -1
- package/locale/pt-PT/index.js +3 -1
- package/locale/pt-ST/index.js +3 -1
- package/locale/pt-TL/index.js +3 -1
- package/locale/qu/index.js +3 -1
- package/locale/ro/index.js +3 -1
- package/locale/ro.json +56 -0
- package/locale/ru/index.js +3 -1
- package/locale/ru.json +2 -8
- package/locale/sah/index.js +3 -1
- package/locale/sd/index.js +3 -1
- package/locale/se/index.js +3 -1
- package/locale/se-FI/index.js +3 -1
- package/locale/si/index.js +3 -1
- package/locale/sk/index.js +3 -1
- package/locale/sl/index.js +3 -1
- package/locale/so/index.js +3 -1
- package/locale/sq/index.js +3 -1
- package/locale/sr/index.js +3 -1
- package/locale/sr-Latn/index.js +3 -1
- package/locale/sv/index.js +3 -1
- package/locale/sv.json +13 -0
- package/locale/sw/index.js +3 -1
- package/locale/ta/index.js +3 -1
- package/locale/te/index.js +3 -1
- package/locale/th/index.js +3 -1
- package/locale/ti/index.js +3 -1
- package/locale/tk/index.js +3 -1
- package/locale/to/index.js +3 -1
- package/locale/tr/index.js +3 -1
- package/locale/ug/index.js +3 -1
- package/locale/uk/index.js +3 -1
- package/locale/ur/index.js +3 -1
- package/locale/ur-IN/index.js +3 -1
- package/locale/uz/index.js +3 -1
- package/locale/uz-Cyrl/index.js +3 -1
- package/locale/vi/index.js +3 -1
- package/locale/wae/index.js +3 -1
- package/locale/yi/index.js +3 -1
- package/locale/yue/index.js +3 -1
- package/locale/yue-Hans/index.js +3 -1
- package/locale/zh/index.js +3 -1
- package/locale/zh-Hans-HK/index.js +3 -1
- package/locale/zh-Hans-MO/index.js +3 -1
- package/locale/zh-Hans-SG/index.js +3 -1
- package/locale/zh-Hant/index.js +3 -1
- package/locale/zh-Hant-HK/index.js +3 -1
- package/locale/zh-Hant-MO/index.js +3 -1
- package/locale/zu/index.js +3 -1
- package/locale-more-styles/da/mini.json +18 -0
- package/locale-more-styles/es/mini.json +19 -7
- package/locale-more-styles/fr/mini.json +11 -5
- package/locale-more-styles/hi/mini.json +2 -8
- package/locale-more-styles/it/mini.json +18 -0
- package/locale-more-styles/nl/mini.json +15 -0
- package/locale-more-styles/ro/long-time.json +30 -0
- package/locale-more-styles/ro/mini.json +18 -0
- package/locale-more-styles/ro/now.json +7 -0
- package/locale-more-styles/ru/mini.json +2 -8
- package/locale-more-styles/sv/mini.json +12 -0
- package/modules/TimeAgo.js +1 -1
- package/modules/TimeAgo.js.map +1 -1
- package/modules/TimeAgo.test.js +6 -6
- package/modules/TimeAgo.test.js.map +1 -1
- package/modules/style/twitter.test.js +3 -3
- package/modules/style/twitter.test.js.map +1 -1
- package/package.json +1 -1
- package/index.d.ts.test +0 -47
package/CHANGELOG.md
CHANGED
|
@@ -33,6 +33,11 @@ TO DO: "time" style should use "round" scale instead of "approximate".
|
|
|
33
33
|
TO DO: if `style` is passed as an object then maybe it should be passed as part of `options` (and document that in the "Custom" section of the readme).
|
|
34
34
|
-->
|
|
35
35
|
|
|
36
|
+
2.3.6 / 25.05.2021
|
|
37
|
+
==================
|
|
38
|
+
|
|
39
|
+
* [Added](https://github.com/catamphetamine/javascript-time-ago/pull/47) `mini` style (aka `twitter` style) for some locales: `da`, `sv`, `nl`, `it`, `fr`, `es`. By [@trustpilot](https://github.com/trustpilot).
|
|
40
|
+
|
|
36
41
|
2.3.5 / 12.05.2021
|
|
37
42
|
==================
|
|
38
43
|
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ If you're not using a bundler then use a [standalone version from a CDN](#cdn).
|
|
|
37
37
|
import TimeAgo from 'javascript-time-ago'
|
|
38
38
|
|
|
39
39
|
// English.
|
|
40
|
-
import en from 'javascript-time-ago/locale/en'
|
|
40
|
+
import en from 'javascript-time-ago/locale/en.json'
|
|
41
41
|
|
|
42
42
|
TimeAgo.addDefaultLocale(en)
|
|
43
43
|
|
|
@@ -68,9 +68,9 @@ The `locale` argument of `new TimeAgo(locale)` constructor is matched against th
|
|
|
68
68
|
The "default language" is `"en"` by default, and can be set either by calling `addDefaultLocale()`:
|
|
69
69
|
|
|
70
70
|
```js
|
|
71
|
-
import ru from 'javascript-time-ago/locale/ru'
|
|
72
|
-
import de from 'javascript-time-ago/locale/de'
|
|
73
|
-
import es from 'javascript-time-ago/locale/es'
|
|
71
|
+
import ru from 'javascript-time-ago/locale/ru.json'
|
|
72
|
+
import de from 'javascript-time-ago/locale/de.json'
|
|
73
|
+
import es from 'javascript-time-ago/locale/es.json'
|
|
74
74
|
|
|
75
75
|
TimeAgo.addLocale(ru)
|
|
76
76
|
TimeAgo.addLocale(de)
|
|
@@ -80,9 +80,9 @@ TimeAgo.addDefaultLocale(es)
|
|
|
80
80
|
or by calling `setDefaultLocale()`:
|
|
81
81
|
|
|
82
82
|
```js
|
|
83
|
-
import ru from 'javascript-time-ago/locale/ru'
|
|
84
|
-
import de from 'javascript-time-ago/locale/de'
|
|
85
|
-
import es from 'javascript-time-ago/locale/es'
|
|
83
|
+
import ru from 'javascript-time-ago/locale/ru.json'
|
|
84
|
+
import de from 'javascript-time-ago/locale/de.json'
|
|
85
|
+
import es from 'javascript-time-ago/locale/es.json'
|
|
86
86
|
|
|
87
87
|
TimeAgo.addLocale(ru)
|
|
88
88
|
TimeAgo.addLocale(de)
|
|
@@ -115,7 +115,7 @@ An example of using Russian language:
|
|
|
115
115
|
import TimeAgo from 'javascript-time-ago'
|
|
116
116
|
|
|
117
117
|
// Russian.
|
|
118
|
-
import ru from 'javascript-time-ago/locale/ru'
|
|
118
|
+
import ru from 'javascript-time-ago/locale/ru.json'
|
|
119
119
|
|
|
120
120
|
TimeAgo.addDefaultLocale(ru)
|
|
121
121
|
|
|
@@ -251,7 +251,7 @@ timeAgo.format(Date.now() - 12 * 30 * 24 * 60 * 60 * 1000, 'mini')
|
|
|
251
251
|
// 1 year ago → "1yr"
|
|
252
252
|
```
|
|
253
253
|
|
|
254
|
-
For best compatibility, `mini.json` labels should be defined
|
|
254
|
+
For best compatibility, `mini.json` labels should be [defined](https://github.com/catamphetamine/javascript-time-ago/tree/master/locale-more-styles) for a locale, otherwise you might [end up with](https://github.com/catamphetamine/javascript-time-ago/issues/49) labels like `"-1m"` for "one minute ago" for some languages. Send `mini.json` pull requests for the missing languages if you speak those.
|
|
255
255
|
|
|
256
256
|
### Mini (now)
|
|
257
257
|
|
|
@@ -431,7 +431,7 @@ New labels can be added by calling `TimeAgo.addLabels()` function.
|
|
|
431
431
|
|
|
432
432
|
```js
|
|
433
433
|
import TimeAgo from 'javascript-time-ago'
|
|
434
|
-
import en from 'javascript-time-ago/locale/en'
|
|
434
|
+
import en from 'javascript-time-ago/locale/en.json'
|
|
435
435
|
import { round } from 'javascript-time-ago/locale/steps'
|
|
436
436
|
|
|
437
437
|
TimeAgo.addDefaultLocale(en)
|
|
@@ -536,7 +536,7 @@ minTime(
|
|
|
536
536
|
|
|
537
537
|
##### `formatAs`
|
|
538
538
|
|
|
539
|
-
A time measurement unit, the labels for which are used to generate the output of a step. If the time unit isn't supported by the language, then the step is ignored. The time units supported in all languages are: `second`, `minute`, `hour`, `day`, `week`, `
|
|
539
|
+
A time measurement unit, the labels for which are used to generate the output of a step. If the time unit isn't supported by the language, then the step is ignored. The time units supported in all languages are: `second`, `minute`, `hour`, `day`, `week`, `month`, `quarter`, `year`. For [some languages](https://github.com/catamphetamine/javascript-time-ago/tree/master/locale-more-styles), this library also defines `now` unit (`"just now"`).
|
|
540
540
|
|
|
541
541
|
##### `format()`
|
|
542
542
|
|
|
@@ -701,11 +701,13 @@ When a `step` has `formatAs` configured, then `getTimeToNextUpdate()` function i
|
|
|
701
701
|
getTimeToNextUpdate(
|
|
702
702
|
date: number, // The date argument, converted to a timestamp.
|
|
703
703
|
{
|
|
704
|
-
getTimeToNextUpdateForUnit(unit: string): number
|
|
704
|
+
getTimeToNextUpdateForUnit(unit: string): number?,
|
|
705
705
|
// Returns "time to next update" for a time unit.
|
|
706
706
|
// This is what the library calls internally
|
|
707
707
|
// when `formatAs` is configured for a `step`.
|
|
708
|
-
// Example: `getTimeToNextUpdateForUnit('minute')
|
|
708
|
+
// Example: `getTimeToNextUpdateForUnit('minute')`.
|
|
709
|
+
// Can return `undefined` in edge cases:
|
|
710
|
+
// for example, when `unit` is "now".
|
|
709
711
|
|
|
710
712
|
now: number, // The current date timestamp.
|
|
711
713
|
|
|
@@ -862,6 +864,10 @@ async function initIntl() {
|
|
|
862
864
|
initIntl().then(...)
|
|
863
865
|
```
|
|
864
866
|
|
|
867
|
+
## TypeScript
|
|
868
|
+
|
|
869
|
+
This library comes with TypeScript "typings". If you happen to find any bugs in those, create an issue.
|
|
870
|
+
|
|
865
871
|
<!--
|
|
866
872
|
## Contributing
|
|
867
873
|
|
|
@@ -52,7 +52,11 @@ for (const locale of getAllLocales()) {
|
|
|
52
52
|
const localeDirectory = path.join(localesDirectory, locale)
|
|
53
53
|
fs.outputFileSync(
|
|
54
54
|
path.join(localeDirectory, 'index.js'),
|
|
55
|
-
`
|
|
55
|
+
`
|
|
56
|
+
var localeData = require('../${locale}.json')
|
|
57
|
+
exports = module.exports = localeData
|
|
58
|
+
exports['default'] = localeData
|
|
59
|
+
`.trim()
|
|
56
60
|
)
|
|
57
61
|
}
|
|
58
62
|
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).TimeAgo={})}(this,(function(t){"use strict";var e="en",r={},n={};function o(){return e}function a(t){return r[t]?t:n[t.toLowerCase()]?n[t.toLowerCase()]:void 0}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.localeMatcher||"lookup";switch(r){case"lookup":case"best fit":return u(t);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function u(t){var e=a(t);if(e)return e;for(var r=t.split("-");t.length>1;){r.pop();var n=a(t=r.join("-"));if(n)return n}}var l={af:function(t){return 1==t?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var e=String(t).split("."),r=Number(e[0])==t&&e[0].slice(-2);return 0==t?"zero":1==t?"one":2==t?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ast:function(t){var e=!String(t).split(".")[1];return 1==t&&e?"one":"other"},be:function(t){var e=String(t).split("."),r=Number(e[0])==t,n=r&&e[0].slice(-1),o=r&&e[0].slice(-2);return 1==n&&11!=o?"one":n>=2&&n<=4&&(o<12||o>14)?"few":r&&0==n||n>=5&&n<=9||o>=11&&o<=14?"many":"other"},br:function(t){var e=String(t).split("."),r=Number(e[0])==t,n=r&&e[0].slice(-1),o=r&&e[0].slice(-2),a=r&&e[0].slice(-6);return 1==n&&11!=o&&71!=o&&91!=o?"one":2==n&&12!=o&&72!=o&&92!=o?"two":(3==n||4==n||9==n)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=t&&r&&0==a?"many":"other"},bs:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=r.slice(-2),u=n.slice(-1),l=n.slice(-2);return o&&1==a&&11!=i||1==u&&11!=l?"one":o&&a>=2&&a<=4&&(i<12||i>14)||u>=2&&u<=4&&(l<12||l>14)?"few":"other"},cs:function(t){var e=String(t).split("."),r=e[0],n=!e[1];return 1==t&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},cy:function(t){return 0==t?"zero":1==t?"one":2==t?"two":3==t?"few":6==t?"many":"other"},da:function(t){var e=String(t).split("."),r=e[0],n=Number(e[0])==t;return 1!=t&&(n||0!=r&&1!=r)?"other":"one"},dsb:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-2),i=n.slice(-2);return o&&1==a||1==i?"one":o&&2==a||2==i?"two":o&&(3==a||4==a)||3==i||4==i?"few":"other"},dz:function(t){return"other"},fil:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=n.slice(-1);return o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=i&&6!=i&&9!=i?"one":"other"},fr:function(t){return t>=0&&t<2?"one":"other"},ga:function(t){var e=String(t).split("."),r=Number(e[0])==t;return 1==t?"one":2==t?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var e=String(t).split("."),r=Number(e[0])==t;return 1==t||11==t?"one":2==t||12==t?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=Number(e[0])==t,a=o&&e[0].slice(-1);return 1==t&&n?"one":2==r&&n?"two":n&&(t<0||t>10)&&o&&0==a?"many":"other"},is:function(t){var e=String(t).split("."),r=e[0],n=Number(e[0])==t,o=r.slice(-1),a=r.slice(-2);return n&&1==o&&11!=a||!n?"one":"other"},ksh:function(t){return 0==t?"zero":1==t?"one":"other"},lt:function(t){var e=String(t).split("."),r=e[1]||"",n=Number(e[0])==t,o=n&&e[0].slice(-1),a=n&&e[0].slice(-2);return 1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(t){var e=String(t).split("."),r=e[1]||"",n=r.length,o=Number(e[0])==t,a=o&&e[0].slice(-1),i=o&&e[0].slice(-2),u=r.slice(-2),l=r.slice(-1);return o&&0==a||i>=11&&i<=19||2==n&&u>=11&&u<=19?"zero":1==a&&11!=i||2==n&&1==l&&11!=u||2!=n&&1==l?"one":"other"},mk:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=r.slice(-2),u=n.slice(-1),l=n.slice(-2);return o&&1==a&&11!=i||1==u&&11!=l?"one":"other"},mt:function(t){var e=String(t).split("."),r=Number(e[0])==t&&e[0].slice(-2);return 1==t?"one":0==t||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"},pa:function(t){return 0==t||1==t?"one":"other"},pl:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-1),a=r.slice(-2);return 1==t&&n?"one":n&&o>=2&&o<=4&&(a<12||a>14)?"few":n&&1!=r&&(0==o||1==o)||n&&o>=5&&o<=9||n&&a>=12&&a<=14?"many":"other"},pt:function(t){var e=String(t).split(".")[0];return 0==e||1==e?"one":"other"},ro:function(t){var e=String(t).split("."),r=!e[1],n=Number(e[0])==t&&e[0].slice(-2);return 1==t&&r?"one":!r||0==t||1!=t&&n>=1&&n<=19?"few":"other"},ru:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-1),a=r.slice(-2);return n&&1==o&&11!=a?"one":n&&o>=2&&o<=4&&(a<12||a>14)?"few":n&&0==o||n&&o>=5&&o<=9||n&&a>=11&&a<=14?"many":"other"},se:function(t){return 1==t?"one":2==t?"two":"other"},si:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"";return 0==t||1==t||0==r&&1==n?"one":"other"},sl:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-2);return n&&1==o?"one":n&&2==o?"two":n&&(3==o||4==o)||!n?"few":"other"}};function f(t){return"pt-PT"===t?t:function(t){var e=t.match(c);if(!e)throw new TypeError("Invalid locale: ".concat(t));return e[1]}(t)}l.as=l.am,l.az=l.af,l.bg=l.af,l.bn=l.am,l.ca=l.ast,l.ce=l.af,l.chr=l.af,l.de=l.ast,l.ee=l.af,l.el=l.af,l.en=l.ast,l.es=l.af,l.et=l.ast,l.eu=l.af,l.fa=l.am,l.fi=l.ast,l.fo=l.af,l.fur=l.af,l.fy=l.ast,l.gl=l.ast,l.gu=l.am,l.hi=l.am,l.hr=l.bs,l.hsb=l.dsb,l.hu=l.af,l.hy=l.fr,l.ia=l.ast,l.id=l.dz,l.it=l.ast,l.ja=l.dz,l.jgo=l.af,l.jv=l.dz,l.ka=l.af,l.kea=l.dz,l.kk=l.af,l.kl=l.af,l.km=l.dz,l.kn=l.am,l.ko=l.dz,l.ku=l.af,l.ky=l.af,l.lb=l.af,l.lkt=l.dz,l.lo=l.dz,l.ml=l.af,l.mn=l.af,l.mr=l.am,l.ms=l.dz,l.my=l.dz,l.nb=l.af,l.ne=l.af,l.nl=l.ast,l.nn=l.af,l.or=l.af,l.ps=l.af,l["pt-PT"]=l.ast,l.sah=l.dz,l.sd=l.af,l.sk=l.cs,l.so=l.af,l.sq=l.af,l.sr=l.bs,l.sv=l.ast,l.sw=l.ast,l.ta=l.af,l.te=l.af,l.th=l.dz,l.ti=l.pa,l.tk=l.af,l.to=l.dz,l.tr=l.af,l.ug=l.af,l.uk=l.ru,l.ur=l.ast,l.uz=l.af,l.vi=l.dz,l.wae=l.af,l.yi=l.ast,l.yue=l.dz,l.zh=l.dz,l.zu=l.am;var c=/^([a-z0-9]+)/i;function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=t.supportedLocalesOf(e);if(0===n.length)throw new RangeError("Unsupported locale: "+e);if(r&&"cardinal"!==r.type)throw new RangeError('Only "cardinal" "type" is supported');this.$=l[f(n[0])]}var e,r,n;return e=t,n=[{key:"supportedLocalesOf",value:function(t){return"string"==typeof t&&(t=[t]),t.filter((function(t){return l[f(t)]}))}}],(r=[{key:"select",value:function(t){return this.$(t)}}])&&s(e.prototype,r),n&&s(e,n),t}();function h(t){return(h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function y(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){d(t,e,r[e])}))}return t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var w=["second","minute","hour","day","week","month","quarter","year"],g=["auto","always"],O=["long","short","narrow"],S=["lookup","best fit"],j=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,t),d(this,"numeric","always"),d(this,"style","long"),d(this,"localeMatcher","lookup");var n=r.numeric,a=r.style,u=r.localeMatcher;if(void 0!==n){if(g.indexOf(n)<0)throw new RangeError('Invalid "numeric" option: '.concat(n));this.numeric=n}if(void 0!==a){if(O.indexOf(a)<0)throw new RangeError('Invalid "style" option: '.concat(a));this.style=a}if(void 0!==u){if(S.indexOf(u)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(u));this.localeMatcher=u}if("string"==typeof e&&(e=[e]),e.push(o()),this.locale=t.supportedLocalesOf(e,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");m.supportedLocalesOf(this.locale).length>0?this.pluralRules=new m(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),"undefined"!=typeof Intl&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=i(this.locale,{localeMatcher:this.localeMatcher})}var e,n,a;return e=t,(n=[{key:"format",value:function(){var t=T(arguments),e=p(t,2),r=e[0],n=e[1];return this.getRule(r,n).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"formatToParts",value:function(){var t=T(arguments),e=p(t,2),r=e[0],n=e[1],o=this.getRule(r,n),a=o.indexOf("{0}");if(a<0)return[{type:"literal",value:o}];var i=[];return a>0&&i.push({type:"literal",value:o.slice(0,a)}),i=i.concat(this.formatNumberToParts(Math.abs(r)).map((function(t){return y({},t,{unit:n})}))),a+"{0}".length<o.length-1&&i.push({type:"literal",value:o.slice(a+"{0}".length)}),i}},{key:"getRule",value:function(t,e){var n,o=(n=this.locale,r[n])[this.style][e];if("auto"===this.numeric)if(-2===t||-1===t){var a=o["previous".concat(-1===t?"":"-"+Math.abs(t))];if(a)return a}else if(1===t||2===t){var i=o["next".concat(1===t?"":"-"+Math.abs(t))];if(i)return i}else if(0===t&&o.current)return o.current;var u,l=o[(u=t,u<0||0===u&&function(t){return 1/t==-1/0}(u)?"past":"future")];return"string"==typeof l?l:l[this.pluralRules&&this.pluralRules.select(Math.abs(t))||"other"]||l.other}},{key:"formatNumber",value:function(t){return this.numberFormat?this.numberFormat.format(t):String(t)}},{key:"formatNumberToParts",value:function(t){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(t):[{type:"integer",value:this.formatNumber(t)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}])&&v(e.prototype,n),a&&v(e,a),t}();j.supportedLocalesOf=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t)t=[t];else if(!Array.isArray(t))throw new TypeError('Invalid "locales" argument');return t.filter((function(t){return i(t,e)}))},j.addLocale=function(t){if(!t)throw new Error("No locale data passed");r[t.locale]=t,n[t.locale.toLowerCase()]=t.locale},j.setDefaultLocale=function(t){e=t},j.getDefaultLocale=o,j.PluralRules=m;var A='Invalid "unit" argument';function k(t){if("symbol"===h(t))throw new TypeError(A);if("string"!=typeof t)throw new RangeError("".concat(A,": ").concat(t));if("s"===t[t.length-1]&&(t=t.slice(0,t.length-1)),w.indexOf(t)<0)throw new RangeError("".concat(A,": ").concat(t));return t}function P(t){if(t=Number(t),Number.isFinite&&!Number.isFinite(t))throw new RangeError("".concat('Invalid "number" argument',": ").concat(t));return t}function T(t){if(t.length<2)throw new TypeError('"unit" argument is required');return[P(t[0]),k(t[1])]}function F(t){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function N(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var E=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="cache")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"get",value:function(){for(var t=this.cache,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var o=0;o<r.length;o++){var a=r[o];if("object"!==F(t))return;t=t[a]}return t}},{key:"put",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.pop(),o=e.pop(),a=this.cache,i=0;i<e.length;i++){var u=e[i];"object"!==F(a[u])&&(a[u]={}),a=a[u]}return a[o]=n}}])&&N(e.prototype,r),n&&N(e,n),t}();function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e){var r=t,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(e(i))return i;for(var u=i.split("-");u.length>1;)if(u.pop(),e(i=u.join("-")))return i}throw new Error("No locale data has been registered for any of the locales: ".concat(t.join(", ")))}var D=60,I=3600,x=86400,L=7*x,z=2630016,C=31556952;function U(t){switch(t){case"second":return 1;case"minute":return D;case"hour":return I;case"day":return x;case"week":return L;case"month":return z;case"year":return C}}function _(t){return void 0!==t.factor?t.factor:U(t.unit||t.formatAs)||1}function Y(t){switch(t){case"floor":return Math.floor;default:return Math.round}}function q(t){switch(t){case"floor":return 1;default:return.5}}function V(t){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function J(t,e){var r,n=e.prevStep,o=e.timestamp,a=e.now,i=e.future,u=e.round;return n&&(n.id||n.unit)&&(r=t["threshold_for_".concat(n.id||n.unit)]),void 0===r&&void 0!==t.threshold&&"function"==typeof(r=t.threshold)&&(r=r(a,i)),void 0===r&&(r=t.minTime),"object"===V(r)&&(r=n&&n.id&&void 0!==r[n.id]?r[n.id]:r.default),"function"==typeof r&&(r=r(o,{future:i,getMinTimeForUnit:function(t,e){return $(t,e||n&&n.formatAs,{round:u})}})),void 0===r&&t.test&&(r=t.test(o,{now:a,future:i})?0:9007199254740991),void 0===r&&(n?t.formatAs&&n.formatAs&&(r=$(t.formatAs,n.formatAs,{round:u})):r=0),void 0===r&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(t,null,2)),r}function $(t,e,r){var n,o=r.round,a=U(t);if(n=U("now"===e?t:e),void 0!==a&&void 0!==n)return a-n*(1-q(o))}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){G(t,e,r[e])}))}return t}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function H(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.units,u=r.getNextStep,l=function(t,e,r){var n=r.now,o=r.future,a=r.round;if(0===t.length)return;var i=K(t,e,{now:n,future:o||e<0,round:a});if(-1===i)return;var u=t[i];if(u.granularity){if(0===Y(a)(Math.abs(e)/_(u)/u.granularity)*u.granularity&&i>0)return t[i-1]}return u}(t=function(t,e){return t.filter((function(t){var r=t.unit,n=t.formatAs;return!(r=r||n)||e.indexOf(r)>=0}))}(t,i),e,{now:n,future:o,round:a});return u?l?[t[t.indexOf(l)-1],l,t[t.indexOf(l)+1]]:[void 0,void 0,t[0]]:l}function K(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=J(t[n],B({prevStep:t[n-1],timestamp:r.now-1e3*e},r));return void 0===o||Math.abs(e)<o?n-1:n===t.length-1?n:K(t,e,r,n+1)}function Q(t,e,r){var n=r.now,o=r.round;if(U(t)){var a=1e3*U(t),i=e>n,u=Math.abs(e-n),l=Y(o)(u/a)*a;return i?l>0?u-l+function(t,e){return(1-q(t))*e+1}(o,a):u-l+1:-(u-l)+function(t,e){return q(t)*e}(o,a)}}var W=31536e9;function X(t,e,r){var n=r.prevStep,o=r.nextStep,a=r.now,i=r.future,u=r.round,l=t.getTime?t.getTime():t,f=function(t){return Q(t,l,{now:a,round:u})},c=function(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.prevStep;if(t){var u=function(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.prevStep,u=J(t,{timestamp:e,now:n,future:o,round:a,prevStep:i});if(void 0===u)return;return o?e-1e3*u+1:0===u&&e===n?W:e+1e3*u}(t,e,{now:n,future:o,round:a,prevStep:i});if(void 0===u)return;return u-n}return o?e-n+1:W}(i?e:o,l,{future:i,now:a,round:u,prevStep:i?n:e});if(void 0!==c){var s;if(e&&(e.getTimeToNextUpdate&&(s=e.getTimeToNextUpdate(l,{getTimeToNextUpdateForUnit:f,getRoundFunction:Y,now:a,future:i,round:u})),void 0===s)){var m=e.unit||e.formatAs;m&&(s=f(m))}return void 0===s?c:Math.min(s,c)}}var Z={};function tt(t){return Z[t]}function et(t){if(!t)throw new Error("[javascript-time-ago] No locale data passed.");Z[t.locale]=t}var rt={steps:[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],labels:"long"};function nt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ot=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){nt(t,e,r[e])}))}return t}({},rt,{steps:rt.steps.filter((function(t){return"second"!==t.formatAs}))}),at=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:D,unit:"minute"},{threshold:150,granularity:5,factor:D,unit:"minute"},{threshold:1350,factor:1800,unit:"half-hour"},{threshold:2550,threshold_for_minute:3150,factor:I,unit:"hour"},{threshold:73800,factor:x,unit:"day"},{threshold:475200,factor:L,unit:"week"},{threshold:2116800,factor:z,unit:"month"},{threshold:27615168,factor:C,unit:"year"}],it={gradation:at,flavour:"long",units:["now","minute","hour","day","week","month","year"]},ut={gradation:at,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function lt(t){return t instanceof Date?t:new Date(t)}var ft=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],ct={},st={minTime:function(t,e){e.future;return(0,e.getMinTimeForUnit)("day")},format:function(t,e){return ct[e]||(ct[e]={}),ct[e].dayMonth||(ct[e].dayMonth=new Intl.DateTimeFormat(e,{month:"short",day:"numeric"})),ct[e].dayMonth.format(lt(t))}},mt={minTime:function(t,e){return e.future?(t-(new Date(new Date(t).getFullYear(),0).getTime()-1))/1e3:(new Date(new Date(t).getFullYear()+1,0).getTime()-t)/1e3},format:function(t,e){return ct[e]||(ct[e]={}),ct[e].dayMonthYear||(ct[e].dayMonthYear=new Intl.DateTimeFormat(e,{year:"numeric",month:"short",day:"numeric"})),ct[e].dayMonthYear.format(lt(t))}};"object"===("undefined"==typeof Intl?"undefined":M(Intl))&&"function"==typeof Intl.DateTimeFormat?ft.push(st,mt):ft.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});var ht={steps:ft,labels:["mini","short-time","narrow","short"]};function yt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){yt(t,e,r[e])}))}return t}({},ht,{steps:[{formatAs:"now"}].concat(ht.steps)});function bt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){bt(t,e,r[e])}))}return t}({},ht,{steps:ht.steps.filter((function(t){return"second"!==t.formatAs}))});function dt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var wt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){dt(t,e,r[e])}))}return t}({},vt,{steps:[{formatAs:"now"}].concat(vt.steps)});function gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Ot(t,e,r[e])}))}return t}function Ot(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var St=gt({},ht,{steps:ht.steps.filter((function(t){return"second"!==t.formatAs})).map((function(t){return"minute"===t.formatAs?gt({},t,{minTime:D}):t}))}),jt={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function At(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var kt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){At(t,e,r[e])}))}return t}({},jt,{steps:[{formatAs:"now"}].concat(jt.steps)});function Pt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Tt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Pt(t,e,r[e])}))}return t}({},jt,{steps:jt.steps.filter((function(t){return"second"!==t.formatAs}))});function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Nt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Ft(t,e,r[e])}))}return t}({},Tt,{steps:[{formatAs:"now"}].concat(Tt.steps)});function Et(t){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var It,xt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.polyfill;Rt(this,t),"string"==typeof e&&(e=[e]),this.locale=R(e.concat(t.getDefaultLocale()),tt),"undefined"!=typeof Intl&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),!1===n?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=j,this.IntlPluralRules=j.PluralRules),this.relativeTimeFormatCache=new E,this.pluralRulesCache=new E}var e,r,n;return e=t,(r=[{key:"format",value:function(t,e,r){var n;r||(e&&"string"!=typeof(n=e)&&!Ct(n)?(r=e,e=void 0):r={}),e||(e=ot),"string"==typeof e&&(e=function(t){switch(t){case"default":case"round":return rt;case"round-minute":return ot;case"approximate":return it;case"time":case"approximate-time":return ut;case"mini":return jt;case"mini-now":return kt;case"mini-minute":return Tt;case"mini-minute-now":return Nt;case"twitter":return ht;case"twitter-now":return pt;case"twitter-minute":return vt;case"twitter-minute-now":return wt;case"twitter-first-minute":return St;default:return it}}(e));var o,a=function(t){if(t.constructor===Date||"object"===Et(e=t)&&"function"==typeof e.getTime)return t.getTime();var e;if("number"==typeof t)return t;throw new Error("Unsupported relative time formatter input: ".concat(Et(t),", ").concat(t))}(t),i=this.getLabels(e.flavour||e.labels),u=i.labels,l=i.labelsType;void 0!==e.now&&(o=e.now),void 0===o&&void 0!==r.now&&(o=r.now),void 0===o&&(o=Date.now());var f=(o-a)/1e3,c=r.future||f<0,s=function(t,e,r,n){var o=t.now||e&&e.now;return o?"string"==typeof o?o:n?o.future:o.past:r&&r.second&&r.second.current?r.second.current:void 0}(u,tt(this.locale).now,tt(this.locale).long,c);if(e.custom){var m=e.custom({now:o,date:new Date(a),time:a,elapsed:f,locale:this.locale});if(void 0!==m)return m}var h=function(t,e,r){var n=Object.keys(e);return r&&n.push("now"),t&&(n=t.filter((function(t){return"now"===t||n.indexOf(t)>=0}))),n}(e.units,u,s),y=r.round||e.round,p=Mt(H(e.gradation||e.steps||ot.steps,f,{now:o,units:h,round:y,future:c,getNextStep:!0}),3),b=p[0],v=p[1],d=p[2],w=this.formatDateForStep(a,v,f,{labels:u,labelsType:l,nowLabel:s,now:o,future:c,round:y})||"";return r.getTimeToNextUpdate?[w,X(a,v,{nextStep:d,prevStep:b,now:o,future:c,round:y})]:w}},{key:"formatDateForStep",value:function(t,e,r,n){var o=this,a=n.labels,i=n.labelsType,u=n.nowLabel,l=n.now,f=n.future,c=n.round;if(e){if(e.format)return e.format(t,this.locale,{formatAs:function(t,e){return o.formatValue(e,t,{labels:a,future:f})},now:l,future:f});var s=e.unit||e.formatAs;if(!s)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(e)));if("now"===s)return u;var m=Math.abs(r)/_(e);e.granularity&&(m=Y(c)(m/e.granularity)*e.granularity);var h=-1*Math.sign(r)*Y(c)(m);switch(0===h&&(h=f?0:-0),i){case"long":case"short":case"narrow":return this.getFormatter(i).format(h,s);default:return this.formatValue(h,s,{labels:a,future:f})}}}},{key:"formatValue",value:function(t,e,r){var n=r.labels,o=r.future;return this.getFormattingRule(n,e,t,{future:o}).replace("{0}",this.formatNumber(Math.abs(t)))}},{key:"getFormattingRule",value:function(t,e,r,n){var o=n.future;if(this.locale,"string"==typeof(t=t[e]))return t;var a=t[0===r?o?"future":"past":r<0?"past":"future"]||t;return"string"==typeof a?a:a[this.getPluralRules().select(Math.abs(r))]||a.other}},{key:"formatNumber",value:function(t){return this.numberFormat?this.numberFormat.format(t):String(t)}},{key:"getFormatter",value:function(t){return this.relativeTimeFormatCache.get(this.locale,t)||this.relativeTimeFormatCache.put(this.locale,t,new this.IntlRelativeTimeFormat(this.locale,{style:t}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"==typeof t&&(t=[t]),t=(t=t.map((function(t){switch(t){case"tiny":case"mini-time":return"mini";default:return t}}))).concat("long");var e=tt(this.locale),r=t,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(e[i])return{labelsType:i,labels:e[i]}}}}])&&Dt(e.prototype,r),n&&Dt(e,n),t}(),Lt="en";xt.getDefaultLocale=function(){return Lt},xt.setDefaultLocale=function(t){return Lt=t},xt.addDefaultLocale=function(t){if(It)throw new Error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");It=!0,xt.setDefaultLocale(t.locale),xt.addLocale(t)},xt.addLocale=function(t){et(t),j.addLocale(t)},xt.locale=xt.addLocale,xt.addLabels=function(t,e,r){var n=tt(t);n||(et({locale:t}),n=tt(t)),n[e]=r};var zt={}.constructor;function Ct(t){return function(t){return void 0!==Et(t)&&null!==t&&t.constructor===zt}(t)&&(Array.isArray(t.steps)||Array.isArray(t.gradation)||Array.isArray(t.flavour)||"string"==typeof t.flavour||Array.isArray(t.labels)||"string"==typeof t.labels||Array.isArray(t.units)||"function"==typeof t.custom)}t.default=xt,t.isStyleObject=Ct,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).TimeAgo={})}(this,(function(t){"use strict";var e="en",r={},n={};function o(){return e}function a(t){return r[t]?t:n[t.toLowerCase()]?n[t.toLowerCase()]:void 0}function i(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.localeMatcher||"lookup";switch(r){case"lookup":case"best fit":return u(t);default:throw new RangeError('Invalid "localeMatcher" option: '.concat(r))}}function u(t){var e=a(t);if(e)return e;for(var r=t.split("-");t.length>1;){r.pop();var n=a(t=r.join("-"));if(n)return n}}var l={af:function(t){return 1==t?"one":"other"},am:function(t){return t>=0&&t<=1?"one":"other"},ar:function(t){var e=String(t).split("."),r=Number(e[0])==t&&e[0].slice(-2);return 0==t?"zero":1==t?"one":2==t?"two":r>=3&&r<=10?"few":r>=11&&r<=99?"many":"other"},ast:function(t){var e=!String(t).split(".")[1];return 1==t&&e?"one":"other"},be:function(t){var e=String(t).split("."),r=Number(e[0])==t,n=r&&e[0].slice(-1),o=r&&e[0].slice(-2);return 1==n&&11!=o?"one":n>=2&&n<=4&&(o<12||o>14)?"few":r&&0==n||n>=5&&n<=9||o>=11&&o<=14?"many":"other"},br:function(t){var e=String(t).split("."),r=Number(e[0])==t,n=r&&e[0].slice(-1),o=r&&e[0].slice(-2),a=r&&e[0].slice(-6);return 1==n&&11!=o&&71!=o&&91!=o?"one":2==n&&12!=o&&72!=o&&92!=o?"two":(3==n||4==n||9==n)&&(o<10||o>19)&&(o<70||o>79)&&(o<90||o>99)?"few":0!=t&&r&&0==a?"many":"other"},bs:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=r.slice(-2),u=n.slice(-1),l=n.slice(-2);return o&&1==a&&11!=i||1==u&&11!=l?"one":o&&a>=2&&a<=4&&(i<12||i>14)||u>=2&&u<=4&&(l<12||l>14)?"few":"other"},cs:function(t){var e=String(t).split("."),r=e[0],n=!e[1];return 1==t&&n?"one":r>=2&&r<=4&&n?"few":n?"other":"many"},cy:function(t){return 0==t?"zero":1==t?"one":2==t?"two":3==t?"few":6==t?"many":"other"},da:function(t){var e=String(t).split("."),r=e[0],n=Number(e[0])==t;return 1!=t&&(n||0!=r&&1!=r)?"other":"one"},dsb:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-2),i=n.slice(-2);return o&&1==a||1==i?"one":o&&2==a||2==i?"two":o&&(3==a||4==a)||3==i||4==i?"few":"other"},dz:function(t){return"other"},fil:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=n.slice(-1);return o&&(1==r||2==r||3==r)||o&&4!=a&&6!=a&&9!=a||!o&&4!=i&&6!=i&&9!=i?"one":"other"},fr:function(t){return t>=0&&t<2?"one":"other"},ga:function(t){var e=String(t).split("."),r=Number(e[0])==t;return 1==t?"one":2==t?"two":r&&t>=3&&t<=6?"few":r&&t>=7&&t<=10?"many":"other"},gd:function(t){var e=String(t).split("."),r=Number(e[0])==t;return 1==t||11==t?"one":2==t||12==t?"two":r&&t>=3&&t<=10||r&&t>=13&&t<=19?"few":"other"},he:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=Number(e[0])==t,a=o&&e[0].slice(-1);return 1==t&&n?"one":2==r&&n?"two":n&&(t<0||t>10)&&o&&0==a?"many":"other"},is:function(t){var e=String(t).split("."),r=e[0],n=Number(e[0])==t,o=r.slice(-1),a=r.slice(-2);return n&&1==o&&11!=a||!n?"one":"other"},ksh:function(t){return 0==t?"zero":1==t?"one":"other"},lt:function(t){var e=String(t).split("."),r=e[1]||"",n=Number(e[0])==t,o=n&&e[0].slice(-1),a=n&&e[0].slice(-2);return 1==o&&(a<11||a>19)?"one":o>=2&&o<=9&&(a<11||a>19)?"few":0!=r?"many":"other"},lv:function(t){var e=String(t).split("."),r=e[1]||"",n=r.length,o=Number(e[0])==t,a=o&&e[0].slice(-1),i=o&&e[0].slice(-2),u=r.slice(-2),l=r.slice(-1);return o&&0==a||i>=11&&i<=19||2==n&&u>=11&&u<=19?"zero":1==a&&11!=i||2==n&&1==l&&11!=u||2!=n&&1==l?"one":"other"},mk:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"",o=!e[1],a=r.slice(-1),i=r.slice(-2),u=n.slice(-1),l=n.slice(-2);return o&&1==a&&11!=i||1==u&&11!=l?"one":"other"},mt:function(t){var e=String(t).split("."),r=Number(e[0])==t&&e[0].slice(-2);return 1==t?"one":0==t||r>=2&&r<=10?"few":r>=11&&r<=19?"many":"other"},pa:function(t){return 0==t||1==t?"one":"other"},pl:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-1),a=r.slice(-2);return 1==t&&n?"one":n&&o>=2&&o<=4&&(a<12||a>14)?"few":n&&1!=r&&(0==o||1==o)||n&&o>=5&&o<=9||n&&a>=12&&a<=14?"many":"other"},pt:function(t){var e=String(t).split(".")[0];return 0==e||1==e?"one":"other"},ro:function(t){var e=String(t).split("."),r=!e[1],n=Number(e[0])==t&&e[0].slice(-2);return 1==t&&r?"one":!r||0==t||1!=t&&n>=1&&n<=19?"few":"other"},ru:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-1),a=r.slice(-2);return n&&1==o&&11!=a?"one":n&&o>=2&&o<=4&&(a<12||a>14)?"few":n&&0==o||n&&o>=5&&o<=9||n&&a>=11&&a<=14?"many":"other"},se:function(t){return 1==t?"one":2==t?"two":"other"},si:function(t){var e=String(t).split("."),r=e[0],n=e[1]||"";return 0==t||1==t||0==r&&1==n?"one":"other"},sl:function(t){var e=String(t).split("."),r=e[0],n=!e[1],o=r.slice(-2);return n&&1==o?"one":n&&2==o?"two":n&&(3==o||4==o)||!n?"few":"other"}};function f(t){return"pt-PT"===t?t:function(t){var e=t.match(c);if(!e)throw new TypeError("Invalid locale: ".concat(t));return e[1]}(t)}l.as=l.am,l.az=l.af,l.bg=l.af,l.bn=l.am,l.ca=l.ast,l.ce=l.af,l.chr=l.af,l.de=l.ast,l.ee=l.af,l.el=l.af,l.en=l.ast,l.es=l.af,l.et=l.ast,l.eu=l.af,l.fa=l.am,l.fi=l.ast,l.fo=l.af,l.fur=l.af,l.fy=l.ast,l.gl=l.ast,l.gu=l.am,l.hi=l.am,l.hr=l.bs,l.hsb=l.dsb,l.hu=l.af,l.hy=l.fr,l.ia=l.ast,l.id=l.dz,l.it=l.ast,l.ja=l.dz,l.jgo=l.af,l.jv=l.dz,l.ka=l.af,l.kea=l.dz,l.kk=l.af,l.kl=l.af,l.km=l.dz,l.kn=l.am,l.ko=l.dz,l.ku=l.af,l.ky=l.af,l.lb=l.af,l.lkt=l.dz,l.lo=l.dz,l.ml=l.af,l.mn=l.af,l.mr=l.am,l.ms=l.dz,l.my=l.dz,l.nb=l.af,l.ne=l.af,l.nl=l.ast,l.nn=l.af,l.or=l.af,l.ps=l.af,l["pt-PT"]=l.ast,l.sah=l.dz,l.sd=l.af,l.sk=l.cs,l.so=l.af,l.sq=l.af,l.sr=l.bs,l.sv=l.ast,l.sw=l.ast,l.ta=l.af,l.te=l.af,l.th=l.dz,l.ti=l.pa,l.tk=l.af,l.to=l.dz,l.tr=l.af,l.ug=l.af,l.uk=l.ru,l.ur=l.ast,l.uz=l.af,l.vi=l.dz,l.wae=l.af,l.yi=l.ast,l.yue=l.dz,l.zh=l.dz,l.zu=l.am;var c=/^([a-z0-9]+)/i;function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var m=function(){function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t);var n=t.supportedLocalesOf(e);if(0===n.length)throw new RangeError("Unsupported locale: "+e);if(r&&"cardinal"!==r.type)throw new RangeError('Only "cardinal" "type" is supported');this.$=l[f(n[0])]}var e,r,n;return e=t,n=[{key:"supportedLocalesOf",value:function(t){return"string"==typeof t&&(t=[t]),t.filter((function(t){return l[f(t)]}))}}],(r=[{key:"select",value:function(t){return this.$(t)}}])&&s(e.prototype,r),n&&s(e,n),t}();function y(t){return(y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function h(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){d(t,e,r[e])}))}return t}function p(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function b(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function v(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function d(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var g=["second","minute","hour","day","week","month","quarter","year"],w=["auto","always"],O=["long","short","narrow"],S=["lookup","best fit"],j=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};b(this,t),d(this,"numeric","always"),d(this,"style","long"),d(this,"localeMatcher","lookup");var n=r.numeric,a=r.style,u=r.localeMatcher;if(void 0!==n){if(w.indexOf(n)<0)throw new RangeError('Invalid "numeric" option: '.concat(n));this.numeric=n}if(void 0!==a){if(O.indexOf(a)<0)throw new RangeError('Invalid "style" option: '.concat(a));this.style=a}if(void 0!==u){if(S.indexOf(u)<0)throw new RangeError('Invalid "localeMatcher" option: '.concat(u));this.localeMatcher=u}if("string"==typeof e&&(e=[e]),e.push(o()),this.locale=t.supportedLocalesOf(e,{localeMatcher:this.localeMatcher})[0],!this.locale)throw new Error("No supported locale was found");m.supportedLocalesOf(this.locale).length>0?this.pluralRules=new m(this.locale):console.warn('"'.concat(this.locale,'" locale is not supported')),"undefined"!=typeof Intl&&Intl.NumberFormat?(this.numberFormat=new Intl.NumberFormat(this.locale),this.numberingSystem=this.numberFormat.resolvedOptions().numberingSystem):this.numberingSystem="latn",this.locale=i(this.locale,{localeMatcher:this.localeMatcher})}var e,n,a;return e=t,(n=[{key:"format",value:function(){var t=T(arguments),e=p(t,2),r=e[0],n=e[1];return this.getRule(r,n).replace("{0}",this.formatNumber(Math.abs(r)))}},{key:"formatToParts",value:function(){var t=T(arguments),e=p(t,2),r=e[0],n=e[1],o=this.getRule(r,n),a=o.indexOf("{0}");if(a<0)return[{type:"literal",value:o}];var i=[];return a>0&&i.push({type:"literal",value:o.slice(0,a)}),i=i.concat(this.formatNumberToParts(Math.abs(r)).map((function(t){return h({},t,{unit:n})}))),a+"{0}".length<o.length-1&&i.push({type:"literal",value:o.slice(a+"{0}".length)}),i}},{key:"getRule",value:function(t,e){var n,o=(n=this.locale,r[n])[this.style][e];if("auto"===this.numeric)if(-2===t||-1===t){var a=o["previous".concat(-1===t?"":"-"+Math.abs(t))];if(a)return a}else if(1===t||2===t){var i=o["next".concat(1===t?"":"-"+Math.abs(t))];if(i)return i}else if(0===t&&o.current)return o.current;var u,l=o[(u=t,u<0||0===u&&function(t){return 1/t==-1/0}(u)?"past":"future")];return"string"==typeof l?l:l[this.pluralRules&&this.pluralRules.select(Math.abs(t))||"other"]||l.other}},{key:"formatNumber",value:function(t){return this.numberFormat?this.numberFormat.format(t):String(t)}},{key:"formatNumberToParts",value:function(t){return this.numberFormat&&this.numberFormat.formatToParts?this.numberFormat.formatToParts(t):[{type:"integer",value:this.formatNumber(t)}]}},{key:"resolvedOptions",value:function(){return{locale:this.locale,style:this.style,numeric:this.numeric,numberingSystem:this.numberingSystem}}}])&&v(e.prototype,n),a&&v(e,a),t}();j.supportedLocalesOf=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if("string"==typeof t)t=[t];else if(!Array.isArray(t))throw new TypeError('Invalid "locales" argument');return t.filter((function(t){return i(t,e)}))},j.addLocale=function(t){if(!t)throw new Error("No locale data passed");r[t.locale]=t,n[t.locale.toLowerCase()]=t.locale},j.setDefaultLocale=function(t){e=t},j.getDefaultLocale=o,j.PluralRules=m;var A='Invalid "unit" argument';function k(t){if("symbol"===y(t))throw new TypeError(A);if("string"!=typeof t)throw new RangeError("".concat(A,": ").concat(t));if("s"===t[t.length-1]&&(t=t.slice(0,t.length-1)),g.indexOf(t)<0)throw new RangeError("".concat(A,": ").concat(t));return t}function P(t){if(t=Number(t),Number.isFinite&&!Number.isFinite(t))throw new RangeError("".concat('Invalid "number" argument',": ").concat(t));return t}function T(t){if(t.length<2)throw new TypeError('"unit" argument is required');return[P(t[0]),k(t[1])]}function F(t){return(F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function N(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var E=function(){function t(){var e,r,n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),n={},(r="cache")in(e=this)?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n}var e,r,n;return e=t,(r=[{key:"get",value:function(){for(var t=this.cache,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];for(var o=0;o<r.length;o++){var a=r[o];if("object"!==F(t))return;t=t[a]}return t}},{key:"put",value:function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];for(var n=e.pop(),o=e.pop(),a=this.cache,i=0;i<e.length;i++){var u=e[i];"object"!==F(a[u])&&(a[u]={}),a=a[u]}return a[o]=n}}])&&N(e.prototype,r),n&&N(e,n),t}();function M(t){return(M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function R(t,e){var r=t,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(e(i))return i;for(var u=i.split("-");u.length>1;)if(u.pop(),e(i=u.join("-")))return i}throw new Error("No locale data has been registered for any of the locales: ".concat(t.join(", ")))}var D=60,I=3600,x=86400,L=7*x,z=2630016,C=31556952;function U(t){switch(t){case"second":return 1;case"minute":return D;case"hour":return I;case"day":return x;case"week":return L;case"month":return z;case"year":return C}}function _(t){return void 0!==t.factor?t.factor:U(t.unit||t.formatAs)||1}function Y(t){switch(t){case"floor":return Math.floor;default:return Math.round}}function q(t){switch(t){case"floor":return 1;default:return.5}}function V(t){return(V="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function J(t,e){var r,n=e.prevStep,o=e.timestamp,a=e.now,i=e.future,u=e.round;return n&&(n.id||n.unit)&&(r=t["threshold_for_".concat(n.id||n.unit)]),void 0===r&&void 0!==t.threshold&&"function"==typeof(r=t.threshold)&&(r=r(a,i)),void 0===r&&(r=t.minTime),"object"===V(r)&&(r=n&&n.id&&void 0!==r[n.id]?r[n.id]:r.default),"function"==typeof r&&(r=r(o,{future:i,getMinTimeForUnit:function(t,e){return $(t,e||n&&n.formatAs,{round:u})}})),void 0===r&&t.test&&(r=t.test(o,{now:a,future:i})?0:9007199254740991),void 0===r&&(n?t.formatAs&&n.formatAs&&(r=$(t.formatAs,n.formatAs,{round:u})):r=0),void 0===r&&console.warn("[javascript-time-ago] A step should specify `minTime`:\n"+JSON.stringify(t,null,2)),r}function $(t,e,r){var n,o=r.round,a=U(t);if(n=U("now"===e?t:e),void 0!==a&&void 0!==n)return a-n*(1-q(o))}function B(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){G(t,e,r[e])}))}return t}function G(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function H(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.units,u=r.getNextStep,l=function(t,e,r){var n=r.now,o=r.future,a=r.round;if(0===t.length)return;var i=K(t,e,{now:n,future:o||e<0,round:a});if(-1===i)return;var u=t[i];if(u.granularity){if(0===Y(a)(Math.abs(e)/_(u)/u.granularity)*u.granularity&&i>0)return t[i-1]}return u}(t=function(t,e){return t.filter((function(t){var r=t.unit,n=t.formatAs;return!(r=r||n)||e.indexOf(r)>=0}))}(t,i),e,{now:n,future:o,round:a});return u?l?[t[t.indexOf(l)-1],l,t[t.indexOf(l)+1]]:[void 0,void 0,t[0]]:l}function K(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,o=J(t[n],B({prevStep:t[n-1],timestamp:r.now-1e3*e},r));return void 0===o||Math.abs(e)<o?n-1:n===t.length-1?n:K(t,e,r,n+1)}function Q(t,e,r){var n=r.now,o=r.round;if(U(t)){var a=1e3*U(t),i=e>n,u=Math.abs(e-n),l=Y(o)(u/a)*a;return i?l>0?u-l+function(t,e){return(1-q(t))*e+1}(o,a):u-l+1:-(u-l)+function(t,e){return q(t)*e}(o,a)}}var W=31536e9;function X(t,e,r){var n=r.prevStep,o=r.nextStep,a=r.now,i=r.future,u=r.round,l=t.getTime?t.getTime():t,f=function(t){return Q(t,l,{now:a,round:u})},c=function(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.prevStep;if(t){var u=function(t,e,r){var n=r.now,o=r.future,a=r.round,i=r.prevStep,u=J(t,{timestamp:e,now:n,future:o,round:a,prevStep:i});if(void 0===u)return;return o?e-1e3*u+1:0===u&&e===n?W:e+1e3*u}(t,e,{now:n,future:o,round:a,prevStep:i});if(void 0===u)return;return u-n}return o?e-n+1:W}(i?e:o,l,{future:i,now:a,round:u,prevStep:i?n:e});if(void 0!==c){var s;if(e&&(e.getTimeToNextUpdate&&(s=e.getTimeToNextUpdate(l,{getTimeToNextUpdateForUnit:f,getRoundFunction:Y,now:a,future:i,round:u})),void 0===s)){var m=e.unit||e.formatAs;m&&(s=f(m))}return void 0===s?c:Math.min(s,c)}}var Z={};function tt(t){return Z[t]}function et(t){if(!t)throw new Error("[javascript-time-ago] No locale data passed.");Z[t.locale]=t}var rt={steps:[{formatAs:"now"},{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"}],labels:"long"};function nt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var ot=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){nt(t,e,r[e])}))}return t}({},rt,{steps:rt.steps.filter((function(t){return"second"!==t.formatAs}))}),at=[{factor:1,unit:"now"},{threshold:1,threshold_for_now:45.5,factor:1,unit:"second"},{threshold:45.5,factor:D,unit:"minute"},{threshold:150,granularity:5,factor:D,unit:"minute"},{threshold:1350,factor:1800,unit:"half-hour"},{threshold:2550,threshold_for_minute:3150,factor:I,unit:"hour"},{threshold:73800,factor:x,unit:"day"},{threshold:475200,factor:L,unit:"week"},{threshold:2116800,factor:z,unit:"month"},{threshold:27615168,factor:C,unit:"year"}],it={gradation:at,flavour:"long",units:["now","minute","hour","day","week","month","year"]},ut={gradation:at,flavour:"long-time",units:["now","minute","hour","day","week","month","year"]};function lt(t){return t instanceof Date?t:new Date(t)}var ft=[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"}],ct={},st={minTime:function(t,e){e.future;return(0,e.getMinTimeForUnit)("day")},format:function(t,e){return ct[e]||(ct[e]={}),ct[e].dayMonth||(ct[e].dayMonth=new Intl.DateTimeFormat(e,{month:"short",day:"numeric"})),ct[e].dayMonth.format(lt(t))}},mt={minTime:function(t,e){return e.future?(t-(new Date(new Date(t).getFullYear(),0).getTime()-1))/1e3:(new Date(new Date(t).getFullYear()+1,0).getTime()-t)/1e3},format:function(t,e){return ct[e]||(ct[e]={}),ct[e].dayMonthYear||(ct[e].dayMonthYear=new Intl.DateTimeFormat(e,{year:"numeric",month:"short",day:"numeric"})),ct[e].dayMonthYear.format(lt(t))}};"object"===("undefined"==typeof Intl?"undefined":M(Intl))&&"function"==typeof Intl.DateTimeFormat?ft.push(st,mt):ft.push({formatAs:"day"},{formatAs:"week"},{formatAs:"month"},{formatAs:"year"});var yt={steps:ft,labels:["mini","short-time","narrow","short"]};function ht(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var pt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){ht(t,e,r[e])}))}return t}({},yt,{steps:[{formatAs:"now"}].concat(yt.steps)});function bt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var vt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){bt(t,e,r[e])}))}return t}({},yt,{steps:yt.steps.filter((function(t){return"second"!==t.formatAs}))});function dt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var gt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){dt(t,e,r[e])}))}return t}({},vt,{steps:[{formatAs:"now"}].concat(vt.steps)});function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Ot(t,e,r[e])}))}return t}function Ot(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var St=wt({},yt,{steps:yt.steps.filter((function(t){return"second"!==t.formatAs})).map((function(t){return"minute"===t.formatAs?wt({},t,{minTime:D}):t}))}),jt={steps:[{formatAs:"second"},{formatAs:"minute"},{formatAs:"hour"},{formatAs:"day"},{formatAs:"month"},{formatAs:"year"}],labels:["mini","short-time","narrow","short"]};function At(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var kt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){At(t,e,r[e])}))}return t}({},jt,{steps:[{formatAs:"now"}].concat(jt.steps)});function Pt(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Tt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Pt(t,e,r[e])}))}return t}({},jt,{steps:jt.steps.filter((function(t){return"second"!==t.formatAs}))});function Ft(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var Nt=function(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter((function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable})))),n.forEach((function(e){Ft(t,e,r[e])}))}return t}({},Tt,{steps:[{formatAs:"now"}].concat(Tt.steps)});function Et(t){return(Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function Mt(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,a=void 0;try{for(var i,u=t[Symbol.iterator]();!(n=(i=u.next()).done)&&(r.push(i.value),!e||r.length!==e);n=!0);}catch(t){o=!0,a=t}finally{try{n||null==u.return||u.return()}finally{if(o)throw a}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function Rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var It,xt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.polyfill;Rt(this,t),"string"==typeof e&&(e=[e]),this.locale=R(e.concat(t.getDefaultLocale()),tt),"undefined"!=typeof Intl&&Intl.NumberFormat&&(this.numberFormat=new Intl.NumberFormat(this.locale)),!1===n?(this.IntlRelativeTimeFormat=Intl.RelativeTimeFormat,this.IntlPluralRules=Intl.PluralRules):(this.IntlRelativeTimeFormat=j,this.IntlPluralRules=j.PluralRules),this.relativeTimeFormatCache=new E,this.pluralRulesCache=new E}var e,r,n;return e=t,(r=[{key:"format",value:function(t,e,r){var n;r||(e&&"string"!=typeof(n=e)&&!Ct(n)?(r=e,e=void 0):r={}),e||(e=ot),"string"==typeof e&&(e=function(t){switch(t){case"default":case"round":return rt;case"round-minute":return ot;case"approximate":return it;case"time":case"approximate-time":return ut;case"mini":return jt;case"mini-now":return kt;case"mini-minute":return Tt;case"mini-minute-now":return Nt;case"twitter":return yt;case"twitter-now":return pt;case"twitter-minute":return vt;case"twitter-minute-now":return gt;case"twitter-first-minute":return St;default:return it}}(e));var o,a=function(t){if(t.constructor===Date||"object"===Et(e=t)&&"function"==typeof e.getTime)return t.getTime();var e;if("number"==typeof t)return t;throw new Error("Unsupported relative time formatter input: ".concat(Et(t),", ").concat(t))}(t),i=this.getLabels(e.flavour||e.labels),u=i.labels,l=i.labelsType;void 0!==e.now&&(o=e.now),void 0===o&&void 0!==r.now&&(o=r.now),void 0===o&&(o=Date.now());var f=(o-a)/1e3,c=r.future||f<0,s=function(t,e,r,n){var o=t.now||e&&e.now;return o?"string"==typeof o?o:n?o.future:o.past:r&&r.second&&r.second.current?r.second.current:void 0}(u,tt(this.locale).now,tt(this.locale).long,c);if(e.custom){var m=e.custom({now:o,date:new Date(a),time:a,elapsed:f,locale:this.locale});if(void 0!==m)return m}var y=function(t,e,r){var n=Object.keys(e);return r&&n.push("now"),t&&(n=t.filter((function(t){return"now"===t||n.indexOf(t)>=0}))),n}(e.units,u,s),h=r.round||e.round,p=Mt(H(e.gradation||e.steps||ot.steps,f,{now:o,units:y,round:h,future:c,getNextStep:!0}),3),b=p[0],v=p[1],d=p[2],g=this.formatDateForStep(a,v,f,{labels:u,labelsType:l,nowLabel:s,now:o,future:c,round:h})||"";return r.getTimeToNextUpdate?[g,X(a,v,{nextStep:d,prevStep:b,now:o,future:c,round:h})]:g}},{key:"formatDateForStep",value:function(t,e,r,n){var o=this,a=n.labels,i=n.labelsType,u=n.nowLabel,l=n.now,f=n.future,c=n.round;if(e){if(e.format)return e.format(t,this.locale,{formatAs:function(t,e){return o.formatValue(e,t,{labels:a,future:f})},now:l,future:f});var s=e.unit||e.formatAs;if(!s)throw new Error("[javascript-time-ago] Each step must define either `formatAs` or `format()`. Step: ".concat(JSON.stringify(e)));if("now"===s)return u;var m=Math.abs(r)/_(e);e.granularity&&(m=Y(c)(m/e.granularity)*e.granularity);var y=-1*Math.sign(r)*Y(c)(m);switch(0===y&&(y=f?0:-0),i){case"long":case"short":case"narrow":return this.getFormatter(i).format(y,s);default:return this.formatValue(y,s,{labels:a,future:f})}}}},{key:"formatValue",value:function(t,e,r){var n=r.labels,o=r.future;return this.getFormattingRule(n,e,t,{future:o}).replace("{0}",this.formatNumber(Math.abs(t)))}},{key:"getFormattingRule",value:function(t,e,r,n){var o=n.future;if(this.locale,"string"==typeof(t=t[e]))return t;var a=t[0===r?o?"future":"past":r<0?"past":"future"]||t;return"string"==typeof a?a:a[this.getPluralRules().select(Math.abs(r))]||a.other}},{key:"formatNumber",value:function(t){return this.numberFormat?this.numberFormat.format(t):String(t)}},{key:"getFormatter",value:function(t){return this.relativeTimeFormatCache.get(this.locale,t)||this.relativeTimeFormatCache.put(this.locale,t,new this.IntlRelativeTimeFormat(this.locale,{style:t}))}},{key:"getPluralRules",value:function(){return this.pluralRulesCache.get(this.locale)||this.pluralRulesCache.put(this.locale,new this.IntlPluralRules(this.locale))}},{key:"getLabels",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];"string"==typeof t&&(t=[t]),t=(t=t.map((function(t){switch(t){case"tiny":case"mini-time":return"mini";default:return t}}))).concat("long");var e=tt(this.locale),r=t,n=Array.isArray(r),o=0;for(r=n?r:r[Symbol.iterator]();;){var a;if(n){if(o>=r.length)break;a=r[o++]}else{if((o=r.next()).done)break;a=o.value}var i=a;if(e[i])return{labelsType:i,labels:e[i]}}}}])&&Dt(e.prototype,r),n&&Dt(e,n),t}(),Lt="en";xt.getDefaultLocale=function(){return Lt},xt.setDefaultLocale=function(t){return Lt=t},xt.addDefaultLocale=function(t){if(It)return console.error("[javascript-time-ago] `TimeAgo.addDefaultLocale()` can only be called once. To add other locales, use `TimeAgo.addLocale()`.");It=!0,xt.setDefaultLocale(t.locale),xt.addLocale(t)},xt.addLocale=function(t){et(t),j.addLocale(t)},xt.locale=xt.addLocale,xt.addLabels=function(t,e,r){var n=tt(t);n||(et({locale:t}),n=tt(t)),n[e]=r};var zt={}.constructor;function Ct(t){return function(t){return void 0!==Et(t)&&null!==t&&t.constructor===zt}(t)&&(Array.isArray(t.steps)||Array.isArray(t.gradation)||Array.isArray(t.flavour)||"string"==typeof t.flavour||Array.isArray(t.labels)||"string"==typeof t.labels||Array.isArray(t.units)||"function"==typeof t.custom)}t.default=xt,t.isStyleObject=Ct,Object.defineProperty(t,"__esModule",{value:!0})}));
|
|
2
2
|
//# sourceMappingURL=javascript-time-ago.js.map
|