yummies 7.14.2 → 7.15.1

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/date-time.js CHANGED
@@ -1,351 +1,896 @@
1
- import { i as __toESM, r as __require, t as __commonJSMin } from "./chunk-YKewjYmz.js";
2
1
  import { typeGuard } from "yummies/type-guard";
3
2
  import { format } from "yummies/format";
4
- import dayjs from "dayjs";
5
3
  import { ms, unitsToMs } from "yummies/ms";
6
4
  import { declension } from "yummies/text";
7
- //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/duration.js
8
- var require_duration = /* @__PURE__ */ __commonJSMin(((exports, module) => {
9
- (function(t, s) {
10
- "object" == typeof exports && "undefined" != typeof module ? module.exports = s() : "function" == typeof define && define.amd ? define(s) : (t = "undefined" != typeof globalThis ? globalThis : t || self).dayjs_plugin_duration = s();
11
- })(exports, (function() {
12
- "use strict";
13
- var t, s, n = 1e3, i = 6e4, e = 36e5, r = 864e5, o = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, u = 31536e6, d = 2628e6, a = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/, h = {
14
- years: u,
15
- months: d,
16
- days: r,
17
- hours: e,
18
- minutes: i,
19
- seconds: n,
20
- milliseconds: 1,
21
- weeks: 6048e5
22
- }, c = function(t) {
23
- return t instanceof g;
24
- }, f = function(t, s, n) {
25
- return new g(t, n, s.$l);
26
- }, m = function(t) {
27
- return s.p(t) + "s";
28
- }, l = function(t) {
29
- return t < 0;
30
- }, $ = function(t) {
31
- return l(t) ? Math.ceil(t) : Math.floor(t);
32
- }, y = function(t) {
33
- return Math.abs(t);
34
- }, v = function(t, s) {
35
- return t ? l(t) ? {
36
- negative: !0,
37
- format: "" + y(t) + s
38
- } : {
39
- negative: !1,
40
- format: "" + t + s
41
- } : {
42
- negative: !1,
43
- format: ""
44
- };
45
- }, g = function() {
46
- function l(t, s, n) {
47
- var i = this;
48
- if (this.$d = {}, this.$l = n, void 0 === t && (this.$ms = 0, this.parseFromMilliseconds()), s) return f(t * h[m(s)], this);
49
- if ("number" == typeof t) return this.$ms = t, this.parseFromMilliseconds(), this;
50
- if ("object" == typeof t) return Object.keys(t).forEach((function(s) {
51
- i.$d[m(s)] = t[s];
52
- })), this.calMilliseconds(), this;
53
- if ("string" == typeof t) {
54
- var e = t.match(a);
55
- if (e) {
56
- var r = e.slice(2).map((function(t) {
57
- return null != t ? Number(t) : 0;
58
- }));
59
- return this.$d.years = r[0], this.$d.months = r[1], this.$d.weeks = r[2], this.$d.days = r[3], this.$d.hours = r[4], this.$d.minutes = r[5], this.$d.seconds = r[6], this.calMilliseconds(), this;
60
- }
61
- }
62
- return this;
63
- }
64
- var y = l.prototype;
65
- return y.calMilliseconds = function() {
66
- var t = this;
67
- this.$ms = Object.keys(this.$d).reduce((function(s, n) {
68
- return s + (t.$d[n] || 0) * h[n];
69
- }), 0);
70
- }, y.parseFromMilliseconds = function() {
71
- var t = this.$ms;
72
- this.$d.years = $(t / u), t %= u, this.$d.months = $(t / d), t %= d, this.$d.days = $(t / r), t %= r, this.$d.hours = $(t / e), t %= e, this.$d.minutes = $(t / i), t %= i, this.$d.seconds = $(t / n), t %= n, this.$d.milliseconds = t;
73
- }, y.toISOString = function() {
74
- var t = v(this.$d.years, "Y"), s = v(this.$d.months, "M"), n = +this.$d.days || 0;
75
- this.$d.weeks && (n += 7 * this.$d.weeks);
76
- var i = v(n, "D"), e = v(this.$d.hours, "H"), r = v(this.$d.minutes, "M"), o = this.$d.seconds || 0;
77
- this.$d.milliseconds && (o += this.$d.milliseconds / 1e3, o = Math.round(1e3 * o) / 1e3);
78
- var u = v(o, "S"), d = t.negative || s.negative || i.negative || e.negative || r.negative || u.negative, a = e.format || r.format || u.format ? "T" : "", h = (d ? "-" : "") + "P" + t.format + s.format + i.format + a + e.format + r.format + u.format;
79
- return "P" === h || "-P" === h ? "P0D" : h;
80
- }, y.toJSON = function() {
81
- return this.toISOString();
82
- }, y.format = function(t) {
83
- var n = t || "YYYY-MM-DDTHH:mm:ss", i = {
84
- Y: this.$d.years,
85
- YY: s.s(this.$d.years, 2, "0"),
86
- YYYY: s.s(this.$d.years, 4, "0"),
87
- M: this.$d.months,
88
- MM: s.s(this.$d.months, 2, "0"),
89
- D: this.$d.days,
90
- DD: s.s(this.$d.days, 2, "0"),
91
- H: this.$d.hours,
92
- HH: s.s(this.$d.hours, 2, "0"),
93
- m: this.$d.minutes,
94
- mm: s.s(this.$d.minutes, 2, "0"),
95
- s: this.$d.seconds,
96
- ss: s.s(this.$d.seconds, 2, "0"),
97
- SSS: s.s(this.$d.milliseconds, 3, "0")
98
- };
99
- return n.replace(o, (function(t, s) {
100
- return s || String(i[t]);
101
- }));
102
- }, y.as = function(t) {
103
- return this.$ms / h[m(t)];
104
- }, y.get = function(t) {
105
- var s = this.$ms, n = m(t);
106
- return "milliseconds" === n ? s %= 1e3 : s = "weeks" === n ? $(s / h[n]) : this.$d[n], s || 0;
107
- }, y.add = function(t, s, n) {
108
- var i;
109
- return i = s ? t * h[m(s)] : c(t) ? t.$ms : f(t, this).$ms, f(this.$ms + i * (n ? -1 : 1), this);
110
- }, y.subtract = function(t, s) {
111
- return this.add(t, s, !0);
112
- }, y.locale = function(t) {
113
- var s = this.clone();
114
- return s.$l = t, s;
115
- }, y.clone = function() {
116
- return f(this.$ms, this);
117
- }, y.humanize = function(s) {
118
- return t().add(this.$ms, "ms").locale(this.$l).fromNow(!s);
119
- }, y.valueOf = function() {
120
- return this.asMilliseconds();
121
- }, y.milliseconds = function() {
122
- return this.get("milliseconds");
123
- }, y.asMilliseconds = function() {
124
- return this.as("milliseconds");
125
- }, y.seconds = function() {
126
- return this.get("seconds");
127
- }, y.asSeconds = function() {
128
- return this.as("seconds");
129
- }, y.minutes = function() {
130
- return this.get("minutes");
131
- }, y.asMinutes = function() {
132
- return this.as("minutes");
133
- }, y.hours = function() {
134
- return this.get("hours");
135
- }, y.asHours = function() {
136
- return this.as("hours");
137
- }, y.days = function() {
138
- return this.get("days");
139
- }, y.asDays = function() {
140
- return this.as("days");
141
- }, y.weeks = function() {
142
- return this.get("weeks");
143
- }, y.asWeeks = function() {
144
- return this.as("weeks");
145
- }, y.months = function() {
146
- return this.get("months");
147
- }, y.asMonths = function() {
148
- return this.as("months");
149
- }, y.years = function() {
150
- return this.get("years");
151
- }, y.asYears = function() {
152
- return this.as("years");
153
- }, l;
154
- }(), p = function(t, s, n) {
155
- return t.add(s.years() * n, "y").add(s.months() * n, "M").add(s.days() * n, "d").add(s.hours() * n, "h").add(s.minutes() * n, "m").add(s.seconds() * n, "s").add(s.milliseconds() * n, "ms");
5
+ var SECONDS_A_HOUR = 3600;
6
+ var SECONDS_A_DAY = SECONDS_A_HOUR * 24;
7
+ var SECONDS_A_WEEK = SECONDS_A_DAY * 7;
8
+ var MILLISECONDS_A_SECOND = 1e3;
9
+ var MILLISECONDS_A_MINUTE = 60 * MILLISECONDS_A_SECOND;
10
+ var MILLISECONDS_A_HOUR = SECONDS_A_HOUR * MILLISECONDS_A_SECOND;
11
+ var MILLISECONDS_A_DAY = SECONDS_A_DAY * MILLISECONDS_A_SECOND;
12
+ var MILLISECONDS_A_WEEK = SECONDS_A_WEEK * MILLISECONDS_A_SECOND;
13
+ var MS = "millisecond";
14
+ var S = "second";
15
+ var MIN = "minute";
16
+ var H = "hour";
17
+ var W = "week";
18
+ var M = "month";
19
+ var Q = "quarter";
20
+ var Y = "year";
21
+ var DATE = "date";
22
+ var INVALID_DATE_STRING = "Invalid Date";
23
+ var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/;
24
+ var REGEX_FORMAT = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
25
+ //#endregion
26
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/locale/en.js
27
+ var en_default = {
28
+ name: "en",
29
+ weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
30
+ months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
31
+ ordinal: function ordinal(n) {
32
+ var s = [
33
+ "th",
34
+ "st",
35
+ "nd",
36
+ "rd"
37
+ ];
38
+ var v = n % 100;
39
+ return "[" + n + (s[(v - 20) % 10] || s[v] || s[0]) + "]";
40
+ }
41
+ };
42
+ //#endregion
43
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/utils.js
44
+ var padStart = function padStart(string, length, pad) {
45
+ var s = String(string);
46
+ if (!s || s.length >= length) return string;
47
+ return "" + Array(length + 1 - s.length).join(pad) + string;
48
+ };
49
+ var utils_default = {
50
+ s: padStart,
51
+ z: function padZoneStr(instance) {
52
+ var negMinutes = -instance.utcOffset();
53
+ var minutes = Math.abs(negMinutes);
54
+ var hourOffset = Math.floor(minutes / 60);
55
+ var minuteOffset = minutes % 60;
56
+ return (negMinutes <= 0 ? "+" : "-") + padStart(hourOffset, 2, "0") + ":" + padStart(minuteOffset, 2, "0");
57
+ },
58
+ m: function monthDiff(a, b) {
59
+ if (a.date() < b.date()) return -monthDiff(b, a);
60
+ var wholeMonthDiff = (b.year() - a.year()) * 12 + (b.month() - a.month());
61
+ var anchor = a.clone().add(wholeMonthDiff, M);
62
+ var c = b - anchor < 0;
63
+ var anchor2 = a.clone().add(wholeMonthDiff + (c ? -1 : 1), M);
64
+ return +(-(wholeMonthDiff + (b - anchor) / (c ? anchor - anchor2 : anchor2 - anchor)) || 0);
65
+ },
66
+ a: function absFloor(n) {
67
+ return n < 0 ? Math.ceil(n) || 0 : Math.floor(n);
68
+ },
69
+ p: function prettyUnit(u) {
70
+ return {
71
+ M: "month",
72
+ y: "year",
73
+ w: "week",
74
+ d: "day",
75
+ D: "date",
76
+ h: "hour",
77
+ m: "minute",
78
+ s: "second",
79
+ ms: "millisecond",
80
+ Q: "quarter"
81
+ }[u] || String(u || "").toLowerCase().replace(/s$/, "");
82
+ },
83
+ u: function isUndefined(s) {
84
+ return s === void 0;
85
+ }
86
+ };
87
+ //#endregion
88
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/index.js
89
+ var L = "en";
90
+ var Ls = {};
91
+ Ls[L] = en_default;
92
+ var IS_DAYJS = "$isDayjsObject";
93
+ var isDayjs = function isDayjs(d) {
94
+ return d instanceof Dayjs || !!(d && d[IS_DAYJS]);
95
+ };
96
+ var parseLocale = function parseLocale(preset, object, isLocal) {
97
+ var l;
98
+ if (!preset) return L;
99
+ if (typeof preset === "string") {
100
+ var presetLower = preset.toLowerCase();
101
+ if (Ls[presetLower]) l = presetLower;
102
+ if (object) {
103
+ Ls[presetLower] = object;
104
+ l = presetLower;
105
+ }
106
+ var presetSplit = preset.split("-");
107
+ if (!l && presetSplit.length > 1) return parseLocale(presetSplit[0]);
108
+ } else {
109
+ var name = preset.name;
110
+ Ls[name] = preset;
111
+ l = name;
112
+ }
113
+ if (!isLocal && l) L = l;
114
+ return l || !isLocal && L;
115
+ };
116
+ var dayjs = function dayjs(date, c) {
117
+ if (isDayjs(date)) return date.clone();
118
+ var cfg = typeof c === "object" ? c : {};
119
+ cfg.date = date;
120
+ cfg.args = arguments;
121
+ return new Dayjs(cfg);
122
+ };
123
+ var wrapper$1 = function wrapper(date, instance) {
124
+ return dayjs(date, {
125
+ locale: instance.$L,
126
+ utc: instance.$u,
127
+ x: instance.$x,
128
+ $offset: instance.$offset
129
+ });
130
+ };
131
+ var Utils = utils_default;
132
+ Utils.l = parseLocale;
133
+ Utils.i = isDayjs;
134
+ Utils.w = wrapper$1;
135
+ var parseDate = function parseDate(cfg) {
136
+ var date = cfg.date, utc = cfg.utc;
137
+ if (date === null) return /* @__PURE__ */ new Date(NaN);
138
+ if (Utils.u(date)) return /* @__PURE__ */ new Date();
139
+ if (date instanceof Date) return new Date(date);
140
+ if (typeof date === "string" && !/Z$/i.test(date)) {
141
+ var d = date.match(REGEX_PARSE);
142
+ if (d) {
143
+ var m = d[2] - 1 || 0;
144
+ var ms = (d[7] || "0").substring(0, 3);
145
+ if (utc) return new Date(Date.UTC(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms));
146
+ return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);
147
+ }
148
+ }
149
+ return new Date(date);
150
+ };
151
+ var Dayjs = /* @__PURE__ */ function() {
152
+ function Dayjs(cfg) {
153
+ this.$L = parseLocale(cfg.locale, null, true);
154
+ this.parse(cfg);
155
+ this.$x = this.$x || cfg.x || {};
156
+ this[IS_DAYJS] = true;
157
+ }
158
+ var _proto = Dayjs.prototype;
159
+ _proto.parse = function parse(cfg) {
160
+ this.$d = parseDate(cfg);
161
+ this.init();
162
+ };
163
+ _proto.init = function init() {
164
+ var $d = this.$d;
165
+ this.$y = $d.getFullYear();
166
+ this.$M = $d.getMonth();
167
+ this.$D = $d.getDate();
168
+ this.$W = $d.getDay();
169
+ this.$H = $d.getHours();
170
+ this.$m = $d.getMinutes();
171
+ this.$s = $d.getSeconds();
172
+ this.$ms = $d.getMilliseconds();
173
+ };
174
+ _proto.$utils = function $utils() {
175
+ return Utils;
176
+ };
177
+ _proto.isValid = function isValid() {
178
+ return !(this.$d.toString() === INVALID_DATE_STRING);
179
+ };
180
+ _proto.isSame = function isSame(that, units) {
181
+ var other = dayjs(that);
182
+ return this.startOf(units) <= other && other <= this.endOf(units);
183
+ };
184
+ _proto.isAfter = function isAfter(that, units) {
185
+ return dayjs(that) < this.startOf(units);
186
+ };
187
+ _proto.isBefore = function isBefore(that, units) {
188
+ return this.endOf(units) < dayjs(that);
189
+ };
190
+ _proto.$g = function $g(input, get, set) {
191
+ if (Utils.u(input)) return this[get];
192
+ return this.set(set, input);
193
+ };
194
+ _proto.unix = function unix() {
195
+ return Math.floor(this.valueOf() / 1e3);
196
+ };
197
+ _proto.valueOf = function valueOf() {
198
+ return this.$d.getTime();
199
+ };
200
+ _proto.startOf = function startOf(units, _startOf) {
201
+ var _this = this;
202
+ var isStartOf = !Utils.u(_startOf) ? _startOf : true;
203
+ var unit = Utils.p(units);
204
+ var instanceFactory = function instanceFactory(d, m) {
205
+ var ins = Utils.w(_this.$u ? Date.UTC(_this.$y, m, d) : new Date(_this.$y, m, d), _this);
206
+ return isStartOf ? ins : ins.endOf("day");
156
207
  };
157
- return function(n, i, e) {
158
- t = e, s = e().$utils(), e.duration = function(t, s) {
159
- return f(t, { $l: e.locale() }, s);
160
- }, e.isDuration = c;
161
- var r = i.prototype.add, o = i.prototype.subtract;
162
- i.prototype.add = function(t, s) {
163
- return c(t) ? p(this, t, 1) : r.bind(this)(t, s);
164
- }, i.prototype.subtract = function(t, s) {
165
- return c(t) ? p(this, t, -1) : o.bind(this)(t, s);
166
- };
208
+ var instanceFactorySet = function instanceFactorySet(method, slice) {
209
+ return Utils.w(_this.toDate()[method].apply(_this.toDate("s"), (isStartOf ? [
210
+ 0,
211
+ 0,
212
+ 0,
213
+ 0
214
+ ] : [
215
+ 23,
216
+ 59,
217
+ 59,
218
+ 999
219
+ ]).slice(slice)), _this);
167
220
  };
168
- }));
169
- }));
170
- //#endregion
171
- //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/plugin/relativeTime.js
172
- var require_relativeTime = /* @__PURE__ */ __commonJSMin(((exports, module) => {
173
- (function(r, e) {
174
- "object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define(e) : (r = "undefined" != typeof globalThis ? globalThis : r || self).dayjs_plugin_relativeTime = e();
175
- })(exports, (function() {
176
- "use strict";
177
- return function(r, e, t) {
178
- r = r || {};
179
- var n = e.prototype, o = {
180
- future: "in %s",
181
- past: "%s ago",
182
- s: "a few seconds",
183
- m: "a minute",
184
- mm: "%d minutes",
185
- h: "an hour",
186
- hh: "%d hours",
187
- d: "a day",
188
- dd: "%d days",
189
- M: "a month",
190
- MM: "%d months",
191
- y: "a year",
192
- yy: "%d years"
193
- };
194
- function i(r, e, t, o) {
195
- return n.fromToBase(r, e, t, o);
221
+ var $W = this.$W, $M = this.$M, $D = this.$D;
222
+ var utcPad = "set" + (this.$u ? "UTC" : "");
223
+ switch (unit) {
224
+ case Y: return isStartOf ? instanceFactory(1, 0) : instanceFactory(31, 11);
225
+ case M: return isStartOf ? instanceFactory(1, $M) : instanceFactory(0, $M + 1);
226
+ case W:
227
+ var weekStart = this.$locale().weekStart || 0;
228
+ var gap = ($W < weekStart ? $W + 7 : $W) - weekStart;
229
+ return instanceFactory(isStartOf ? $D - gap : $D + (6 - gap), $M);
230
+ case "day":
231
+ case DATE: return instanceFactorySet(utcPad + "Hours", 0);
232
+ case H: return instanceFactorySet(utcPad + "Minutes", 1);
233
+ case MIN: return instanceFactorySet(utcPad + "Seconds", 2);
234
+ case S: return instanceFactorySet(utcPad + "Milliseconds", 3);
235
+ default: return this.clone();
236
+ }
237
+ };
238
+ _proto.endOf = function endOf(arg) {
239
+ return this.startOf(arg, false);
240
+ };
241
+ _proto.$set = function $set(units, _int) {
242
+ var _C$D$C$DATE$C$M$C$Y$C;
243
+ var unit = Utils.p(units);
244
+ var utcPad = "set" + (this.$u ? "UTC" : "");
245
+ var name = (_C$D$C$DATE$C$M$C$Y$C = {}, _C$D$C$DATE$C$M$C$Y$C["day"] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[DATE] = utcPad + "Date", _C$D$C$DATE$C$M$C$Y$C[M] = utcPad + "Month", _C$D$C$DATE$C$M$C$Y$C[Y] = utcPad + "FullYear", _C$D$C$DATE$C$M$C$Y$C[H] = utcPad + "Hours", _C$D$C$DATE$C$M$C$Y$C[MIN] = utcPad + "Minutes", _C$D$C$DATE$C$M$C$Y$C[S] = utcPad + "Seconds", _C$D$C$DATE$C$M$C$Y$C[MS] = utcPad + "Milliseconds", _C$D$C$DATE$C$M$C$Y$C)[unit];
246
+ var arg = unit === "day" ? this.$D + (_int - this.$W) : _int;
247
+ if (unit === "month" || unit === "year") {
248
+ var date = this.clone().set(DATE, 1);
249
+ date.$d[name](arg);
250
+ date.init();
251
+ this.$d = date.set(DATE, Math.min(this.$D, date.daysInMonth())).$d;
252
+ } else if (name) this.$d[name](arg);
253
+ this.init();
254
+ return this;
255
+ };
256
+ _proto.set = function set(string, _int2) {
257
+ return this.clone().$set(string, _int2);
258
+ };
259
+ _proto.get = function get(unit) {
260
+ return this[Utils.p(unit)]();
261
+ };
262
+ _proto.add = function add(number, units) {
263
+ var _this2 = this, _C$MIN$C$H$C$S$unit;
264
+ number = Number(number);
265
+ var unit = Utils.p(units);
266
+ var instanceFactorySet = function instanceFactorySet(n) {
267
+ var d = dayjs(_this2);
268
+ return Utils.w(d.date(d.date() + Math.round(n * number)), _this2);
269
+ };
270
+ if (unit === "month") return this.set(M, this.$M + number);
271
+ if (unit === "year") return this.set(Y, this.$y + number);
272
+ if (unit === "day") return instanceFactorySet(1);
273
+ if (unit === "week") return instanceFactorySet(7);
274
+ var step = (_C$MIN$C$H$C$S$unit = {}, _C$MIN$C$H$C$S$unit["minute"] = 6e4, _C$MIN$C$H$C$S$unit["hour"] = 36e5, _C$MIN$C$H$C$S$unit["second"] = 1e3, _C$MIN$C$H$C$S$unit)[unit] || 1;
275
+ var nextTimeStamp = this.$d.getTime() + number * step;
276
+ return Utils.w(nextTimeStamp, this);
277
+ };
278
+ _proto.subtract = function subtract(number, string) {
279
+ return this.add(number * -1, string);
280
+ };
281
+ _proto.format = function format(formatStr) {
282
+ var _this3 = this;
283
+ var locale = this.$locale();
284
+ if (!this.isValid()) return locale.invalidDate || "Invalid Date";
285
+ var str = formatStr || "YYYY-MM-DDTHH:mm:ssZ";
286
+ var zoneStr = Utils.z(this);
287
+ var $H = this.$H, $m = this.$m, $M = this.$M;
288
+ var weekdays = locale.weekdays, months = locale.months, meridiem = locale.meridiem;
289
+ var getShort = function getShort(arr, index, full, length) {
290
+ return arr && (arr[index] || arr(_this3, str)) || full[index].slice(0, length);
291
+ };
292
+ var get$H = function get$H(num) {
293
+ return Utils.s($H % 12 || 12, num, "0");
294
+ };
295
+ var meridiemFunc = meridiem || function(hour, minute, isLowercase) {
296
+ var m = hour < 12 ? "AM" : "PM";
297
+ return isLowercase ? m.toLowerCase() : m;
298
+ };
299
+ var matches = function matches(match) {
300
+ switch (match) {
301
+ case "YY": return String(_this3.$y).slice(-2);
302
+ case "YYYY": return Utils.s(_this3.$y, 4, "0");
303
+ case "M": return $M + 1;
304
+ case "MM": return Utils.s($M + 1, 2, "0");
305
+ case "MMM": return getShort(locale.monthsShort, $M, months, 3);
306
+ case "MMMM": return getShort(months, $M);
307
+ case "D": return _this3.$D;
308
+ case "DD": return Utils.s(_this3.$D, 2, "0");
309
+ case "d": return String(_this3.$W);
310
+ case "dd": return getShort(locale.weekdaysMin, _this3.$W, weekdays, 2);
311
+ case "ddd": return getShort(locale.weekdaysShort, _this3.$W, weekdays, 3);
312
+ case "dddd": return weekdays[_this3.$W];
313
+ case "H": return String($H);
314
+ case "HH": return Utils.s($H, 2, "0");
315
+ case "h": return get$H(1);
316
+ case "hh": return get$H(2);
317
+ case "a": return meridiemFunc($H, $m, true);
318
+ case "A": return meridiemFunc($H, $m, false);
319
+ case "m": return String($m);
320
+ case "mm": return Utils.s($m, 2, "0");
321
+ case "s": return String(_this3.$s);
322
+ case "ss": return Utils.s(_this3.$s, 2, "0");
323
+ case "SSS": return Utils.s(_this3.$ms, 3, "0");
324
+ case "Z": return zoneStr;
325
+ default: break;
196
326
  }
197
- t.en.relativeTime = o, n.fromToBase = function(e, n, i, d, u) {
198
- for (var f, a, s, l = i.$locale().relativeTime || o, h = r.thresholds || [
199
- {
200
- l: "s",
201
- r: 44,
202
- d: "second"
203
- },
204
- {
205
- l: "m",
206
- r: 89
207
- },
208
- {
209
- l: "mm",
210
- r: 44,
211
- d: "minute"
212
- },
213
- {
214
- l: "h",
215
- r: 89
216
- },
217
- {
218
- l: "hh",
219
- r: 21,
220
- d: "hour"
221
- },
222
- {
223
- l: "d",
224
- r: 35
225
- },
226
- {
227
- l: "dd",
228
- r: 25,
229
- d: "day"
230
- },
231
- {
232
- l: "M",
233
- r: 45
234
- },
235
- {
236
- l: "MM",
237
- r: 10,
238
- d: "month"
239
- },
240
- {
241
- l: "y",
242
- r: 17
243
- },
244
- {
245
- l: "yy",
246
- d: "year"
247
- }
248
- ], m = h.length, c = 0; c < m; c += 1) {
249
- var y = h[c];
250
- y.d && (f = d ? t(e).diff(i, y.d, !0) : i.diff(e, y.d, !0));
251
- var p = (r.rounding || Math.round)(Math.abs(f));
252
- if (s = f > 0, p <= y.r || !y.r) {
253
- p <= 1 && c > 0 && (y = h[c - 1]);
254
- var v = l[y.l];
255
- u && (p = u("" + p)), a = "string" == typeof v ? v.replace("%d", p) : v(p, n, y.l, s);
256
- break;
257
- }
258
- }
259
- if (n) return a;
260
- var M = s ? l.future : l.past;
261
- return "function" == typeof M ? M(a) : M.replace("%s", a);
262
- }, n.to = function(r, e) {
263
- return i(r, e, this, !0);
264
- }, n.from = function(r, e) {
265
- return i(r, e, this);
266
- };
267
- var d = function(r) {
268
- return r.$u ? t.utc() : t();
269
- };
270
- n.toNow = function(r) {
271
- return this.to(d(this), r);
272
- }, n.fromNow = function(r) {
273
- return this.from(d(this), r);
274
- };
327
+ return null;
275
328
  };
276
- }));
277
- }));
329
+ return str.replace(REGEX_FORMAT, function(match, $1) {
330
+ return $1 || matches(match) || zoneStr.replace(":", "");
331
+ });
332
+ };
333
+ _proto.utcOffset = function utcOffset() {
334
+ return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
335
+ };
336
+ _proto.diff = function diff(input, units, _float) {
337
+ var _this4 = this;
338
+ var unit = Utils.p(units);
339
+ var that = dayjs(input);
340
+ var zoneDelta = (that.utcOffset() - this.utcOffset()) * MILLISECONDS_A_MINUTE;
341
+ var diff = this - that;
342
+ var getMonth = function getMonth() {
343
+ return Utils.m(_this4, that);
344
+ };
345
+ var result;
346
+ switch (unit) {
347
+ case Y:
348
+ result = getMonth() / 12;
349
+ break;
350
+ case M:
351
+ result = getMonth();
352
+ break;
353
+ case Q:
354
+ result = getMonth() / 3;
355
+ break;
356
+ case W:
357
+ result = (diff - zoneDelta) / MILLISECONDS_A_WEEK;
358
+ break;
359
+ case "day":
360
+ result = (diff - zoneDelta) / MILLISECONDS_A_DAY;
361
+ break;
362
+ case H:
363
+ result = diff / MILLISECONDS_A_HOUR;
364
+ break;
365
+ case MIN:
366
+ result = diff / MILLISECONDS_A_MINUTE;
367
+ break;
368
+ case S:
369
+ result = diff / MILLISECONDS_A_SECOND;
370
+ break;
371
+ default:
372
+ result = diff;
373
+ break;
374
+ }
375
+ return _float ? result : Utils.a(result);
376
+ };
377
+ _proto.daysInMonth = function daysInMonth() {
378
+ return this.endOf(M).$D;
379
+ };
380
+ _proto.$locale = function $locale() {
381
+ return Ls[this.$L];
382
+ };
383
+ _proto.locale = function locale(preset, object) {
384
+ if (!preset) return this.$L;
385
+ var that = this.clone();
386
+ var nextLocaleName = parseLocale(preset, object, true);
387
+ if (nextLocaleName) that.$L = nextLocaleName;
388
+ return that;
389
+ };
390
+ _proto.clone = function clone() {
391
+ return Utils.w(this.$d, this);
392
+ };
393
+ _proto.toDate = function toDate() {
394
+ return new Date(this.valueOf());
395
+ };
396
+ _proto.toJSON = function toJSON() {
397
+ return this.isValid() ? this.toISOString() : null;
398
+ };
399
+ _proto.toISOString = function toISOString() {
400
+ return this.$d.toISOString();
401
+ };
402
+ _proto.toString = function toString() {
403
+ return this.$d.toUTCString();
404
+ };
405
+ return Dayjs;
406
+ }();
407
+ var proto = Dayjs.prototype;
408
+ dayjs.prototype = proto;
409
+ [
410
+ ["$ms", MS],
411
+ ["$s", S],
412
+ ["$m", MIN],
413
+ ["$H", H],
414
+ ["$W", "day"],
415
+ ["$M", M],
416
+ ["$y", Y],
417
+ ["$D", DATE]
418
+ ].forEach(function(g) {
419
+ proto[g[1]] = function(input) {
420
+ return this.$g(input, g[0], g[1]);
421
+ };
422
+ });
423
+ dayjs.extend = function(plugin, option) {
424
+ if (!plugin.$i) {
425
+ plugin(option, Dayjs, dayjs);
426
+ plugin.$i = true;
427
+ }
428
+ return dayjs;
429
+ };
430
+ dayjs.locale = parseLocale;
431
+ dayjs.isDayjs = isDayjs;
432
+ dayjs.unix = function(timestamp) {
433
+ return dayjs(timestamp * 1e3);
434
+ };
435
+ dayjs.en = Ls[L];
436
+ dayjs.Ls = Ls;
437
+ dayjs.p = {};
278
438
  //#endregion
279
- //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/locale/ru.js
280
- var require_ru = /* @__PURE__ */ __commonJSMin(((exports, module) => {
281
- (function(_, t) {
282
- "object" == typeof exports && "undefined" != typeof module ? module.exports = t(__require("dayjs")) : "function" == typeof define && define.amd ? define(["dayjs"], t) : (_ = "undefined" != typeof globalThis ? globalThis : _ || self).dayjs_locale_ru = t(_.dayjs);
283
- })(exports, (function(_) {
284
- "use strict";
285
- function t(_) {
286
- return _ && "object" == typeof _ && "default" in _ ? _ : { default: _ };
439
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/plugin/duration/index.js
440
+ var MILLISECONDS_A_YEAR = MILLISECONDS_A_DAY * 365;
441
+ var MILLISECONDS_A_MONTH = MILLISECONDS_A_YEAR / 12;
442
+ var durationRegex = /^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;
443
+ var unitToMS = {
444
+ years: MILLISECONDS_A_YEAR,
445
+ months: MILLISECONDS_A_MONTH,
446
+ days: MILLISECONDS_A_DAY,
447
+ hours: MILLISECONDS_A_HOUR,
448
+ minutes: MILLISECONDS_A_MINUTE,
449
+ seconds: MILLISECONDS_A_SECOND,
450
+ milliseconds: 1,
451
+ weeks: MILLISECONDS_A_WEEK
452
+ };
453
+ var isDuration = function isDuration(d) {
454
+ return d instanceof Duration;
455
+ };
456
+ var $d;
457
+ var $u;
458
+ var wrapper = function wrapper(input, instance, unit) {
459
+ return new Duration(input, unit, instance.$l);
460
+ };
461
+ var prettyUnit = function prettyUnit(unit) {
462
+ return $u.p(unit) + "s";
463
+ };
464
+ var isNegative = function isNegative(number) {
465
+ return number < 0;
466
+ };
467
+ var roundNumber = function roundNumber(number) {
468
+ return isNegative(number) ? Math.ceil(number) : Math.floor(number);
469
+ };
470
+ var absolute = function absolute(number) {
471
+ return Math.abs(number);
472
+ };
473
+ var getNumberUnitFormat = function getNumberUnitFormat(number, unit) {
474
+ if (!number) return {
475
+ negative: false,
476
+ format: ""
477
+ };
478
+ if (isNegative(number)) return {
479
+ negative: true,
480
+ format: "" + absolute(number) + unit
481
+ };
482
+ return {
483
+ negative: false,
484
+ format: "" + number + unit
485
+ };
486
+ };
487
+ var Duration = /* @__PURE__ */ function() {
488
+ function Duration(input, unit, locale) {
489
+ var _this = this;
490
+ this.$d = {};
491
+ this.$l = locale;
492
+ if (input === void 0) {
493
+ this.$ms = 0;
494
+ this.parseFromMilliseconds();
287
495
  }
288
- var e = t(_), n = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_"), s = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_"), r = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_"), o = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_"), i = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
289
- function d(_, t, e) {
290
- var n, s;
291
- return "m" === e ? t ? "минута" : "минуту" : _ + " " + (n = +_, s = {
292
- mm: t ? "минута_минуты_минут" : "минуту_минуты_минут",
293
- hh: "час_часа_часов",
294
- dd: "день_дня_дней",
295
- MM: "месяц_месяца_месяцев",
296
- yy: "год_года_лет"
297
- }[e].split("_"), n % 10 == 1 && n % 100 != 11 ? s[0] : n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? s[1] : s[2]);
496
+ if (unit) return wrapper(input * unitToMS[prettyUnit(unit)], this);
497
+ if (typeof input === "number") {
498
+ this.$ms = input;
499
+ this.parseFromMilliseconds();
500
+ return this;
298
501
  }
299
- var u = function(_, t) {
300
- return i.test(t) ? n[_.month()] : s[_.month()];
301
- };
302
- u.s = s, u.f = n;
303
- var a = function(_, t) {
304
- return i.test(t) ? r[_.month()] : o[_.month()];
502
+ if (typeof input === "object") {
503
+ Object.keys(input).forEach(function(k) {
504
+ _this.$d[prettyUnit(k)] = input[k];
505
+ });
506
+ this.calMilliseconds();
507
+ return this;
508
+ }
509
+ if (typeof input === "string") {
510
+ var d = input.match(durationRegex);
511
+ if (d) {
512
+ var numberD = d.slice(2).map(function(value) {
513
+ return value != null ? Number(value) : 0;
514
+ });
515
+ this.$d.years = numberD[0];
516
+ this.$d.months = numberD[1];
517
+ this.$d.weeks = numberD[2];
518
+ this.$d.days = numberD[3];
519
+ this.$d.hours = numberD[4];
520
+ this.$d.minutes = numberD[5];
521
+ this.$d.seconds = numberD[6];
522
+ this.calMilliseconds();
523
+ return this;
524
+ }
525
+ }
526
+ return this;
527
+ }
528
+ var _proto = Duration.prototype;
529
+ _proto.calMilliseconds = function calMilliseconds() {
530
+ var _this2 = this;
531
+ this.$ms = Object.keys(this.$d).reduce(function(total, unit) {
532
+ return total + (_this2.$d[unit] || 0) * unitToMS[unit];
533
+ }, 0);
534
+ };
535
+ _proto.parseFromMilliseconds = function parseFromMilliseconds() {
536
+ var $ms = this.$ms;
537
+ this.$d.years = roundNumber($ms / MILLISECONDS_A_YEAR);
538
+ $ms %= MILLISECONDS_A_YEAR;
539
+ this.$d.months = roundNumber($ms / MILLISECONDS_A_MONTH);
540
+ $ms %= MILLISECONDS_A_MONTH;
541
+ this.$d.days = roundNumber($ms / MILLISECONDS_A_DAY);
542
+ $ms %= MILLISECONDS_A_DAY;
543
+ this.$d.hours = roundNumber($ms / MILLISECONDS_A_HOUR);
544
+ $ms %= MILLISECONDS_A_HOUR;
545
+ this.$d.minutes = roundNumber($ms / MILLISECONDS_A_MINUTE);
546
+ $ms %= MILLISECONDS_A_MINUTE;
547
+ this.$d.seconds = roundNumber($ms / MILLISECONDS_A_SECOND);
548
+ $ms %= MILLISECONDS_A_SECOND;
549
+ this.$d.milliseconds = $ms;
550
+ };
551
+ _proto.toISOString = function toISOString() {
552
+ var Y = getNumberUnitFormat(this.$d.years, "Y");
553
+ var M = getNumberUnitFormat(this.$d.months, "M");
554
+ var days = +this.$d.days || 0;
555
+ if (this.$d.weeks) days += this.$d.weeks * 7;
556
+ var D = getNumberUnitFormat(days, "D");
557
+ var H = getNumberUnitFormat(this.$d.hours, "H");
558
+ var m = getNumberUnitFormat(this.$d.minutes, "M");
559
+ var seconds = this.$d.seconds || 0;
560
+ if (this.$d.milliseconds) {
561
+ seconds += this.$d.milliseconds / 1e3;
562
+ seconds = Math.round(seconds * 1e3) / 1e3;
563
+ }
564
+ var S = getNumberUnitFormat(seconds, "S");
565
+ var negativeMode = Y.negative || M.negative || D.negative || H.negative || m.negative || S.negative;
566
+ var T = H.format || m.format || S.format ? "T" : "";
567
+ var result = (negativeMode ? "-" : "") + "P" + Y.format + M.format + D.format + T + H.format + m.format + S.format;
568
+ return result === "P" || result === "-P" ? "P0D" : result;
569
+ };
570
+ _proto.toJSON = function toJSON() {
571
+ return this.toISOString();
572
+ };
573
+ _proto.format = function format(formatStr) {
574
+ var str = formatStr || "YYYY-MM-DDTHH:mm:ss";
575
+ var matches = {
576
+ Y: this.$d.years,
577
+ YY: $u.s(this.$d.years, 2, "0"),
578
+ YYYY: $u.s(this.$d.years, 4, "0"),
579
+ M: this.$d.months,
580
+ MM: $u.s(this.$d.months, 2, "0"),
581
+ D: this.$d.days,
582
+ DD: $u.s(this.$d.days, 2, "0"),
583
+ H: this.$d.hours,
584
+ HH: $u.s(this.$d.hours, 2, "0"),
585
+ m: this.$d.minutes,
586
+ mm: $u.s(this.$d.minutes, 2, "0"),
587
+ s: this.$d.seconds,
588
+ ss: $u.s(this.$d.seconds, 2, "0"),
589
+ SSS: $u.s(this.$d.milliseconds, 3, "0")
305
590
  };
306
- a.s = o, a.f = r;
307
- var m = {
308
- name: "ru",
309
- weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),
310
- weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"),
311
- weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"),
312
- months: u,
313
- monthsShort: a,
314
- weekStart: 1,
315
- yearStart: 4,
316
- formats: {
317
- LT: "H:mm",
318
- LTS: "H:mm:ss",
319
- L: "DD.MM.YYYY",
320
- LL: "D MMMM YYYY г.",
321
- LLL: "D MMMM YYYY г., H:mm",
322
- LLLL: "dddd, D MMMM YYYY г., H:mm"
591
+ return str.replace(REGEX_FORMAT, function(match, $1) {
592
+ return $1 || String(matches[match]);
593
+ });
594
+ };
595
+ _proto.as = function as(unit) {
596
+ return this.$ms / unitToMS[prettyUnit(unit)];
597
+ };
598
+ _proto.get = function get(unit) {
599
+ var base = this.$ms;
600
+ var pUnit = prettyUnit(unit);
601
+ if (pUnit === "milliseconds") base %= 1e3;
602
+ else if (pUnit === "weeks") base = roundNumber(base / unitToMS[pUnit]);
603
+ else base = this.$d[pUnit];
604
+ return base || 0;
605
+ };
606
+ _proto.add = function add(input, unit, isSubtract) {
607
+ var another;
608
+ if (unit) another = input * unitToMS[prettyUnit(unit)];
609
+ else if (isDuration(input)) another = input.$ms;
610
+ else another = wrapper(input, this).$ms;
611
+ return wrapper(this.$ms + another * (isSubtract ? -1 : 1), this);
612
+ };
613
+ _proto.subtract = function subtract(input, unit) {
614
+ return this.add(input, unit, true);
615
+ };
616
+ _proto.locale = function locale(l) {
617
+ var that = this.clone();
618
+ that.$l = l;
619
+ return that;
620
+ };
621
+ _proto.clone = function clone() {
622
+ return wrapper(this.$ms, this);
623
+ };
624
+ _proto.humanize = function humanize(withSuffix) {
625
+ return $d().add(this.$ms, "ms").locale(this.$l).fromNow(!withSuffix);
626
+ };
627
+ _proto.valueOf = function valueOf() {
628
+ return this.asMilliseconds();
629
+ };
630
+ _proto.milliseconds = function milliseconds() {
631
+ return this.get("milliseconds");
632
+ };
633
+ _proto.asMilliseconds = function asMilliseconds() {
634
+ return this.as("milliseconds");
635
+ };
636
+ _proto.seconds = function seconds() {
637
+ return this.get("seconds");
638
+ };
639
+ _proto.asSeconds = function asSeconds() {
640
+ return this.as("seconds");
641
+ };
642
+ _proto.minutes = function minutes() {
643
+ return this.get("minutes");
644
+ };
645
+ _proto.asMinutes = function asMinutes() {
646
+ return this.as("minutes");
647
+ };
648
+ _proto.hours = function hours() {
649
+ return this.get("hours");
650
+ };
651
+ _proto.asHours = function asHours() {
652
+ return this.as("hours");
653
+ };
654
+ _proto.days = function days() {
655
+ return this.get("days");
656
+ };
657
+ _proto.asDays = function asDays() {
658
+ return this.as("days");
659
+ };
660
+ _proto.weeks = function weeks() {
661
+ return this.get("weeks");
662
+ };
663
+ _proto.asWeeks = function asWeeks() {
664
+ return this.as("weeks");
665
+ };
666
+ _proto.months = function months() {
667
+ return this.get("months");
668
+ };
669
+ _proto.asMonths = function asMonths() {
670
+ return this.as("months");
671
+ };
672
+ _proto.years = function years() {
673
+ return this.get("years");
674
+ };
675
+ _proto.asYears = function asYears() {
676
+ return this.as("years");
677
+ };
678
+ return Duration;
679
+ }();
680
+ var manipulateDuration = function manipulateDuration(date, duration, k) {
681
+ return date.add(duration.years() * k, "y").add(duration.months() * k, "M").add(duration.days() * k, "d").add(duration.hours() * k, "h").add(duration.minutes() * k, "m").add(duration.seconds() * k, "s").add(duration.milliseconds() * k, "ms");
682
+ };
683
+ var duration_default = (function(option, Dayjs, dayjs) {
684
+ $d = dayjs;
685
+ $u = dayjs().$utils();
686
+ dayjs.duration = function(input, unit) {
687
+ return wrapper(input, { $l: dayjs.locale() }, unit);
688
+ };
689
+ dayjs.isDuration = isDuration;
690
+ var oldAdd = Dayjs.prototype.add;
691
+ var oldSubtract = Dayjs.prototype.subtract;
692
+ Dayjs.prototype.add = function(value, unit) {
693
+ if (isDuration(value)) return manipulateDuration(this, value, 1);
694
+ return oldAdd.bind(this)(value, unit);
695
+ };
696
+ Dayjs.prototype.subtract = function(value, unit) {
697
+ if (isDuration(value)) return manipulateDuration(this, value, -1);
698
+ return oldSubtract.bind(this)(value, unit);
699
+ };
700
+ });
701
+ //#endregion
702
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/plugin/relativeTime/index.js
703
+ var relativeTime_default = (function(o, c, d) {
704
+ o = o || {};
705
+ var proto = c.prototype;
706
+ var relObj = {
707
+ future: "in %s",
708
+ past: "%s ago",
709
+ s: "a few seconds",
710
+ m: "a minute",
711
+ mm: "%d minutes",
712
+ h: "an hour",
713
+ hh: "%d hours",
714
+ d: "a day",
715
+ dd: "%d days",
716
+ M: "a month",
717
+ MM: "%d months",
718
+ y: "a year",
719
+ yy: "%d years"
720
+ };
721
+ d.en.relativeTime = relObj;
722
+ proto.fromToBase = function(input, withoutSuffix, instance, isFrom, postFormat) {
723
+ var loc = instance.$locale().relativeTime || relObj;
724
+ var T = o.thresholds || [
725
+ {
726
+ l: "s",
727
+ r: 44,
728
+ d: "second"
729
+ },
730
+ {
731
+ l: "m",
732
+ r: 89
323
733
  },
324
- relativeTime: {
325
- future: "через %s",
326
- past: "%s назад",
327
- s: "несколько секунд",
328
- m: d,
329
- mm: d,
330
- h: "час",
331
- hh: d,
332
- d: "день",
333
- dd: d,
334
- M: "месяц",
335
- MM: d,
336
- y: "год",
337
- yy: d
734
+ {
735
+ l: "mm",
736
+ r: 44,
737
+ d: "minute"
338
738
  },
339
- ordinal: function(_) {
340
- return _;
739
+ {
740
+ l: "h",
741
+ r: 89
341
742
  },
342
- meridiem: function(_) {
343
- return _ < 4 ? "ночи" : _ < 12 ? "утра" : _ < 17 ? "дня" : "вечера";
743
+ {
744
+ l: "hh",
745
+ r: 21,
746
+ d: "hour"
747
+ },
748
+ {
749
+ l: "d",
750
+ r: 35
751
+ },
752
+ {
753
+ l: "dd",
754
+ r: 25,
755
+ d: "day"
756
+ },
757
+ {
758
+ l: "M",
759
+ r: 45
760
+ },
761
+ {
762
+ l: "MM",
763
+ r: 10,
764
+ d: "month"
765
+ },
766
+ {
767
+ l: "y",
768
+ r: 17
769
+ },
770
+ {
771
+ l: "yy",
772
+ d: "year"
344
773
  }
345
- };
346
- return e.default.locale(m, null, !0), m;
347
- }));
348
- }));
774
+ ];
775
+ var Tl = T.length;
776
+ var result;
777
+ var out;
778
+ var isFuture;
779
+ for (var i = 0; i < Tl; i += 1) {
780
+ var t = T[i];
781
+ if (t.d) result = isFrom ? d(input).diff(instance, t.d, true) : instance.diff(input, t.d, true);
782
+ var abs = (o.rounding || Math.round)(Math.abs(result));
783
+ isFuture = result > 0;
784
+ if (abs <= t.r || !t.r) {
785
+ if (abs <= 1 && i > 0) t = T[i - 1];
786
+ var format = loc[t.l];
787
+ if (postFormat) abs = postFormat("" + abs);
788
+ if (typeof format === "string") out = format.replace("%d", abs);
789
+ else out = format(abs, withoutSuffix, t.l, isFuture);
790
+ break;
791
+ }
792
+ }
793
+ if (withoutSuffix) return out;
794
+ var pastOrFuture = isFuture ? loc.future : loc.past;
795
+ if (typeof pastOrFuture === "function") return pastOrFuture(out);
796
+ return pastOrFuture.replace("%s", out);
797
+ };
798
+ function fromTo(input, withoutSuffix, instance, isFrom) {
799
+ return proto.fromToBase(input, withoutSuffix, instance, isFrom);
800
+ }
801
+ proto.to = function(input, withoutSuffix) {
802
+ return fromTo(input, withoutSuffix, this, true);
803
+ };
804
+ proto.from = function(input, withoutSuffix) {
805
+ return fromTo(input, withoutSuffix, this);
806
+ };
807
+ var makeNow = function makeNow(thisDay) {
808
+ return thisDay.$u ? d.utc() : d();
809
+ };
810
+ proto.toNow = function(withoutSuffix) {
811
+ return this.to(makeNow(this), withoutSuffix);
812
+ };
813
+ proto.fromNow = function(withoutSuffix) {
814
+ return this.from(makeNow(this), withoutSuffix);
815
+ };
816
+ });
817
+ //#endregion
818
+ //#region node_modules/.pnpm/dayjs@1.11.20/node_modules/dayjs/esm/locale/ru.js
819
+ var monthFormat = "января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря".split("_");
820
+ var monthStandalone = "январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь".split("_");
821
+ var monthShortFormat = "янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.".split("_");
822
+ var monthShortStandalone = "янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.".split("_");
823
+ var MONTHS_IN_FORMAT = /D[oD]?(\[[^[\]]*\]|\s)+MMMM?/;
824
+ function plural(word, num) {
825
+ var forms = word.split("_");
826
+ return num % 10 === 1 && num % 100 !== 11 ? forms[0] : num % 10 >= 2 && num % 10 <= 4 && (num % 100 < 10 || num % 100 >= 20) ? forms[1] : forms[2];
827
+ }
828
+ function relativeTimeWithPlural(number, withoutSuffix, key) {
829
+ var format = {
830
+ mm: withoutSuffix ? "минута_минуты_минут" : "минуту_минуты_минут",
831
+ hh: "час_часа_часов",
832
+ dd: "день_дня_дней",
833
+ MM: "месяц_месяца_месяцев",
834
+ yy: "год_года_лет"
835
+ };
836
+ if (key === "m") return withoutSuffix ? "минута" : "минуту";
837
+ return number + " " + plural(format[key], +number);
838
+ }
839
+ var months = function months(dayjsInstance, format) {
840
+ if (MONTHS_IN_FORMAT.test(format)) return monthFormat[dayjsInstance.month()];
841
+ return monthStandalone[dayjsInstance.month()];
842
+ };
843
+ months.s = monthStandalone;
844
+ months.f = monthFormat;
845
+ var monthsShort = function monthsShort(dayjsInstance, format) {
846
+ if (MONTHS_IN_FORMAT.test(format)) return monthShortFormat[dayjsInstance.month()];
847
+ return monthShortStandalone[dayjsInstance.month()];
848
+ };
849
+ monthsShort.s = monthShortStandalone;
850
+ monthsShort.f = monthShortFormat;
851
+ var locale = {
852
+ name: "ru",
853
+ weekdays: "воскресенье_понедельник_вторник_среда_четверг_пятница_суббота".split("_"),
854
+ weekdaysShort: "вск_пнд_втр_срд_чтв_птн_сбт".split("_"),
855
+ weekdaysMin: "вс_пн_вт_ср_чт_пт_сб".split("_"),
856
+ months,
857
+ monthsShort,
858
+ weekStart: 1,
859
+ yearStart: 4,
860
+ formats: {
861
+ LT: "H:mm",
862
+ LTS: "H:mm:ss",
863
+ L: "DD.MM.YYYY",
864
+ LL: "D MMMM YYYY г.",
865
+ LLL: "D MMMM YYYY г., H:mm",
866
+ LLLL: "dddd, D MMMM YYYY г., H:mm"
867
+ },
868
+ relativeTime: {
869
+ future: "через %s",
870
+ past: "%s назад",
871
+ s: "несколько секунд",
872
+ m: relativeTimeWithPlural,
873
+ mm: relativeTimeWithPlural,
874
+ h: "час",
875
+ hh: relativeTimeWithPlural,
876
+ d: "день",
877
+ dd: relativeTimeWithPlural,
878
+ M: "месяц",
879
+ MM: relativeTimeWithPlural,
880
+ y: "год",
881
+ yy: relativeTimeWithPlural
882
+ },
883
+ ordinal: function ordinal(n) {
884
+ return n;
885
+ },
886
+ meridiem: function meridiem(hour) {
887
+ if (hour < 4) return "ночи";
888
+ else if (hour < 12) return "утра";
889
+ else if (hour < 17) return "дня";
890
+ return "вечера";
891
+ }
892
+ };
893
+ dayjs.locale(locale, null, true);
349
894
  //#endregion
350
895
  //#region src/date-time.ts
351
896
  /**
@@ -364,11 +909,8 @@ var require_ru = /* @__PURE__ */ __commonJSMin(((exports, module) => {
364
909
  * import { formatDate } from "yummies/date-time";
365
910
  * ```
366
911
  */
367
- var import_duration = /* @__PURE__ */ __toESM(require_duration(), 1);
368
- var import_relativeTime = /* @__PURE__ */ __toESM(require_relativeTime(), 1);
369
- require_ru();
370
- dayjs.extend(import_relativeTime.default);
371
- dayjs.extend(import_duration.default);
912
+ dayjs.extend(relativeTime_default);
913
+ dayjs.extend(duration_default);
372
914
  dayjs.locale("ru");
373
915
  var toLibFormat = (value) => {
374
916
  let result = null;