@primoui/utils 1.2.3 → 1.3.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/dist/index.js CHANGED
@@ -1,121 +1,115 @@
1
- import f from "@sindresorhus/slugify";
2
- const B = (t, e) => {
1
+ import d from "@sindresorhus/slugify";
2
+ const z = (t, e) => {
3
3
  const r = e - t + 1;
4
- return Array.from({ length: r }, (n, o) => o + t);
5
- }, p = async (t) => new Promise((e) => setTimeout(e, t)), L = ({ key: t, metaKey: e }) => `${e ? "⌘" : ""}${t.toUpperCase()}`, g = (t) => t.replace(/<[^>]*>?/gm, ""), d = (t, e = " ") => t.replace(/\n+/g, e), F = (t, e = 250) => {
4
+ return Array.from({ length: r }, (n, s) => s + t);
5
+ }, y = async (t) => new Promise((e) => setTimeout(e, t)), H = ({ key: t, metaKey: e }) => `${e ? "⌘" : ""}${t.toUpperCase()}`, w = (t) => t.replace(/<[^>]*>?/gm, ""), b = (t, e = " ") => t.replace(/\n+/g, e), J = (t, e = 250) => {
6
6
  if (!t)
7
7
  return null;
8
- const r = d(g(t)), n = r.slice(0, e).trim();
8
+ const r = b(w(t)), n = r.slice(0, e).trim();
9
9
  return n.length < r.length ? `${n}...` : n;
10
- }, x = (t, e = !1) => f(t, {
10
+ }, V = (t, e = !1) => d(t, {
11
11
  decamelize: e,
12
12
  customReplacements: [
13
13
  ["#", "sharp"],
14
14
  ["+", "plus"]
15
15
  ]
16
- }), j = (t) => t.length === 25 && t[0] === "c";
17
- function y(t) {
18
- return !!t;
19
- }
20
- const k = (t, e = 0) => {
16
+ }), K = (t) => t.length === 25 && t[0] === "c", U = (t) => !!t, Z = (t, e = 0) => {
21
17
  const r = (t || "").trim();
22
18
  if (r.length === 0 || r.length === 1 || r.length === 2)
23
19
  return r.toUpperCase();
24
- const o = r.split(" ").filter(y).map((s) => s.charAt(0).toUpperCase()).join("");
25
- return e > 0 ? o.slice(0, e) : o;
26
- }, A = (t) => new Promise((e, r) => {
20
+ const s = r.split(" ").filter(U).map((o) => o.charAt(0).toUpperCase()).join("");
21
+ return e > 0 ? s.slice(0, e) : s;
22
+ }, Q = (t) => new Promise((e, r) => {
27
23
  const n = new FileReader();
28
- n.readAsDataURL(t), n.onload = () => e(n.result), n.onerror = (o) => r(o);
29
- }), b = (t, e) => {
24
+ n.readAsDataURL(t), n.onload = () => e(n.result), n.onerror = (s) => r(s);
25
+ }), S = (t, e) => {
30
26
  const r = [];
31
27
  for (let n = 0; n < t.length; n += e)
32
28
  r.push(t.slice(n, n + e));
33
29
  return r;
34
- }, H = (t, e, r = !1) => {
30
+ }, _ = (t, e, r = !1) => {
35
31
  Object.getOwnPropertyDescriptor(
36
32
  HTMLInputElement.prototype,
37
33
  "value"
38
34
  )?.set?.call(t, e), r && t?.dispatchEvent(new Event("input", { bubbles: !0 }));
39
- }, W = (t, e = 3, r = "and") => t.slice(0, e).join(", ").replace(/, ([^,]*)$/, ` ${r} $1`), J = async (t) => {
35
+ }, G = (t, e = 3, r = "and") => t.slice(0, e).join(", ").replace(/, ([^,]*)$/, ` ${r} $1`), Y = async (t) => {
40
36
  try {
41
37
  return { data: await t, error: null };
42
38
  } catch (e) {
43
39
  return { data: null, error: e };
44
40
  }
45
- };
46
- function w(t) {
41
+ }, M = (t) => {
47
42
  if (t !== null) {
48
43
  if (t?.constructor.name === "Object")
49
44
  for (const e in t)
50
- t[e] = w(t[e]);
45
+ t[e] = M(t[e]);
51
46
  return t;
52
47
  }
53
- }
54
- const S = async (t, e, r) => {
55
- const { batchSize: n, concurrency: o = n, delay: s = 0 } = r;
48
+ }, P = async (t, e, r) => {
49
+ const { batchSize: n, concurrency: s = n, delay: o = 0 } = r;
56
50
  if (t.length === 0) return [];
57
- const a = [], c = b(t, n);
58
- for (const [u, i] of c.entries()) {
59
- console.log(`Processing batch ${u + 1}/${c.length} (${i.length} items)`);
60
- const h = await M(i, e, o);
61
- a.push(...h), s > 0 && u < c.length - 1 && (console.log(`Waiting ${s}ms before next batch...`), await p(s));
51
+ const a = [], c = S(t, n);
52
+ for (const [u, l] of c.entries()) {
53
+ console.log(`Processing batch ${u + 1}/${c.length} (${l.length} items)`);
54
+ const g = await E(l, e, s);
55
+ a.push(...g), o > 0 && u < c.length - 1 && (console.log(`Waiting ${o}ms before next batch...`), await y(o));
62
56
  }
63
57
  return a;
64
- }, V = async (t, e, r) => {
58
+ }, q = async (t, e, r) => {
65
59
  const { onError: n } = r;
66
- return S(t, async (s) => {
60
+ return P(t, async (o) => {
67
61
  try {
68
- return await e(s);
62
+ return await e(o);
69
63
  } catch (a) {
70
64
  const c = a instanceof Error ? a : new Error(String(a));
71
- return n?.(c, s), c;
65
+ return n?.(c, o), c;
72
66
  }
73
67
  }, r);
74
- }, M = async (t, e, r) => {
68
+ }, E = async (t, e, r) => {
75
69
  if (r >= t.length)
76
70
  return Promise.all(t.map(e));
77
- const n = [], o = [];
78
- for (const s of t) {
79
- const a = e(s).then((c) => {
71
+ const n = [], s = [];
72
+ for (const o of t) {
73
+ const a = e(o).then((c) => {
80
74
  n.push(c);
81
75
  });
82
- o.push(a), o.length >= r && (await Promise.race(o), o.splice(0, o.length - o.filter((c) => c !== a).length));
76
+ s.push(a), s.length >= r && (await Promise.race(s), s.splice(0, s.length - s.filter((c) => c !== a).length));
83
77
  }
84
- return await Promise.all(o), n;
85
- }, z = (t) => {
86
- const e = t.replace("#", "").substring(0, 6), r = Number.parseInt(e.substring(0, 2), 16), n = Number.parseInt(e.substring(2, 4), 16), o = Number.parseInt(e.substring(4, 6), 16);
87
- return r * 0.299 + n * 0.587 + o * 0.114 > 186;
88
- }, K = (t) => {
78
+ return await Promise.all(s), n;
79
+ }, X = (t) => {
80
+ const e = t.replace("#", "").substring(0, 6), r = Number.parseInt(e.substring(0, 2), 16), n = Number.parseInt(e.substring(2, 4), 16), s = Number.parseInt(e.substring(4, 6), 16);
81
+ return r * 0.299 + n * 0.587 + s * 0.114 > 186;
82
+ }, tt = (t) => {
89
83
  const e = document.getElementById(t || "");
90
84
  if (!e) return;
91
- const r = window.getComputedStyle(e), n = Number.parseFloat(r.scrollMarginTop), o = Math.floor(window.scrollY + e.getBoundingClientRect().top - n);
92
- return { id: t, top: o };
93
- }, E = (t) => typeof t == "object" && t !== null && "message" in t && typeof t.message == "string", U = (t) => {
94
- if (E(t)) return t;
85
+ const r = window.getComputedStyle(e), n = Number.parseFloat(r.scrollMarginTop), s = Math.floor(window.scrollY + e.getBoundingClientRect().top - n);
86
+ return { id: t, top: s };
87
+ }, R = (t) => typeof t == "object" && t !== null && "message" in t && typeof t.message == "string", v = (t) => {
88
+ if (R(t)) return t;
95
89
  try {
96
90
  return new Error(JSON.stringify(t));
97
91
  } catch {
98
92
  return new Error(String(t));
99
93
  }
100
- }, Y = (t) => U(t).message, G = (t, e) => {
94
+ }, et = (t) => v(t).message, rt = (t, e) => {
101
95
  document.addEventListener(t, e);
102
- }, Z = (t, e) => {
96
+ }, nt = (t, e) => {
103
97
  document.removeEventListener(t, e);
104
- }, q = (t, e) => {
98
+ }, st = (t, e) => {
105
99
  const r = new CustomEvent(t, { detail: e });
106
100
  document.dispatchEvent(r);
107
- }, Q = () => {
101
+ }, ot = () => {
108
102
  const t = new KeyboardEvent("keydown", { key: "Escape" });
109
103
  document.dispatchEvent(t);
110
- }, X = (t, e = "compact", r = "en-US") => new Intl.NumberFormat(r, { notation: e }).format(t), _ = (t, e = "USD") => new Intl.NumberFormat("en-US", {
104
+ }, ct = (t, e = "compact", r = "en-US") => new Intl.NumberFormat(r, { notation: e }).format(t), at = (t, e = "USD") => new Intl.NumberFormat("en-US", {
111
105
  style: "currency",
112
106
  currency: e
113
- }).format(t).replace(/\D00(?=\D*$)/, ""), tt = (t, e = "month") => l(t / (e === "year" ? 12 : 1), 2), l = (t, e = 0) => t.toFixed(e < 0 ? 0 : e).replace(/\.0+$/, ""), et = (t, e = 0) => {
107
+ }).format(t).replace(/\D00(?=\D*$)/, ""), it = (t, e = "month") => h(t / (e === "year" ? 12 : 1), 2), h = (t, e = 0) => t.toFixed(e < 0 ? 0 : e).replace(/\.0+$/, ""), ut = (t, e = 0) => {
114
108
  if (t === 0)
115
109
  return "0 Bytes";
116
110
  const r = 1024, n = Math.floor(Math.log(t) / Math.log(r));
117
- return `${l(t / r ** n, e)} ${["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][n]}`;
118
- }, rt = (t) => {
111
+ return `${h(t / r ** n, e)} ${["Bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"][n]}`;
112
+ }, lt = (t) => {
119
113
  const [, e] = t.split("/");
120
114
  let r;
121
115
  switch (e) {
@@ -125,142 +119,208 @@ const S = async (t, e, r) => {
125
119
  r = e;
126
120
  }
127
121
  return r?.toUpperCase();
128
- }, nt = (t) => t ? `${t.includes("localhost") ? "http" : "https"}://${t}` : "", ot = (t) => t ? t.replace(/^https?:\/\//, "") : "", st = (t) => t ? t.replace(/\/$/, "") : "", ct = (t) => t ? t.includes("http") : !1, at = (t) => {
122
+ }, N = /^https?:\/\/(?:www\.)?(?:[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,63}\b|localhost(?::\d+)?|127\.0\.0\.1(?::\d+)?)(?:[-a-zA-Z0-9()@:%_+.~#?&/=]*)$/, D = (t) => {
123
+ if (!t || typeof t != "string" || !N.test(t)) return !1;
124
+ try {
125
+ return new URL(t), !0;
126
+ } catch {
127
+ return !1;
128
+ }
129
+ }, m = (t, e) => t ? t.startsWith("http://") || t.startsWith("https://") ? t : `${e !== void 0 ? e ? "https" : "http" : L(t) ? "http" : "https"}://${t}` : "", I = (t) => t?.replace(/^https?:\/\//, "") ?? "", i = (t) => {
130
+ if (!t) return "";
131
+ let e = t.trim();
132
+ if (e.includes("?") || e.includes("#"))
133
+ try {
134
+ const r = new URL(e);
135
+ return r.pathname.length > 1 && r.pathname.endsWith("/") && (r.pathname = r.pathname.slice(0, -1)), r.toString();
136
+ } catch {
137
+ return e.length > 1 && e.endsWith("/") ? e.slice(0, -1) : e;
138
+ }
139
+ return e.length > 1 && e.endsWith("/") && (e = e.slice(0, -1)), e;
140
+ }, O = (t) => {
129
141
  try {
130
142
  const e = new URL(t);
131
143
  return `${e.protocol}//${e.host}`;
132
- } catch (e) {
133
- return console.error(e), t;
144
+ } catch {
145
+ return t;
146
+ }
147
+ }, $ = (t) => {
148
+ try {
149
+ if (!D(t)) return t;
150
+ const e = new URL(t).hostname;
151
+ return e.startsWith("www.") ? e.slice(4) : e;
152
+ } catch {
153
+ return t;
134
154
  }
135
- }, ut = (t) => N(t) ? new URL(t).hostname.replace("www.", "") : t, N = (t) => {
155
+ }, ht = (t) => t ? /^https?:\/\//.test(t) : !1, L = (t) => {
136
156
  if (!t) return !1;
137
157
  try {
138
- return new URL(t), !0;
158
+ const r = new URL(m(t)).hostname;
159
+ return r === "localhost" || r === "127.0.0.1" || r.endsWith(".localhost");
139
160
  } catch {
140
- return !1;
161
+ return t.includes("localhost") || t.includes("127.0.0.1");
162
+ }
163
+ }, mt = (t, ...e) => {
164
+ if (!t) return "";
165
+ let r = i(t);
166
+ for (const n of e) {
167
+ if (!n) continue;
168
+ const s = n.replace(/^\/+|\/+$/g, "");
169
+ s && (r += `/${s}`);
170
+ }
171
+ return r;
172
+ }, p = (t) => {
173
+ try {
174
+ const e = new URL(t), r = {};
175
+ return e.searchParams.forEach((n, s) => {
176
+ r[s] = n;
177
+ }), r;
178
+ } catch {
179
+ return {};
180
+ }
181
+ }, T = (t, e) => {
182
+ try {
183
+ const r = new URL(t);
184
+ Object.entries(e).forEach(([s, o]) => {
185
+ r.searchParams.set(s, String(o));
186
+ });
187
+ let n = r.toString();
188
+ return n = n.replace(/\/\?/, "?"), n;
189
+ } catch {
190
+ return t;
191
+ }
192
+ }, B = (t) => {
193
+ if (!t) return "";
194
+ try {
195
+ const e = new URL(t);
196
+ return e.search = "", i(e.toString());
197
+ } catch {
198
+ const e = t.indexOf("?");
199
+ return e !== -1 ? t.substring(0, e) : t;
141
200
  }
142
- }, it = (t, e, r) => e !== void 0 && r !== void 0 ? Math.min(Math.max(t, e), r) : e !== void 0 ? Math.max(t, e) : r !== void 0 ? Math.min(t, r) : t, lt = (t) => {
201
+ }, pt = m, ft = I, gt = i, dt = i, yt = O, wt = $, bt = B, Ut = p, St = T, Mt = (t, e, r) => e !== void 0 && r !== void 0 ? Math.min(Math.max(t, e), r) : e !== void 0 ? Math.max(t, e) : r !== void 0 ? Math.min(t, r) : t, Pt = (t) => {
143
202
  if (t == null) return;
144
203
  const e = Number.parseFloat(t.toString());
145
204
  return Number.isNaN(e) ? void 0 : e;
146
- }, mt = (t, e = 2) => {
205
+ }, Et = (t, e = 2) => {
147
206
  const r = Math.pow(10, e);
148
207
  return Math.round((t + Number.EPSILON) * r) / r;
149
- }, ht = (t = {}) => t.constructor === Object && !Object.entries(t).length, ft = (t) => (e, r) => {
150
- const n = t.indexOf(Object.keys(e)[0] ?? ""), o = t.indexOf(Object.keys(r)[0] ?? "");
151
- return n === -1 && o === -1 ? 0 : n === -1 ? 1 : o === -1 ? -1 : n - o;
152
- }, pt = (t, e) => Object.keys(t).sort(e).reduce((r, n) => ({ ...r, [n]: t[n] }), {});
153
- function gt(t, e) {
208
+ }, Rt = (t = {}) => t.constructor === Object && !Object.entries(t).length, vt = (t) => (e, r) => {
209
+ const n = t.indexOf(Object.keys(e)[0] ?? ""), s = t.indexOf(Object.keys(r)[0] ?? "");
210
+ return n === -1 && s === -1 ? 0 : n === -1 ? 1 : s === -1 ? -1 : n - s;
211
+ }, Nt = (t, e) => Object.keys(t).sort(e).reduce((r, n) => ({ ...r, [n]: t[n] }), {}), Dt = (t, e) => {
154
212
  const r = {};
155
213
  for (const n of e)
156
214
  n in t && (r[n] = t[n]);
157
215
  return r;
158
- }
159
- const P = (t) => Object.fromEntries(new URL(t).searchParams), v = (t, e) => {
160
- const r = new URLSearchParams(t);
161
- for (const [n, o] of Object.entries(e))
162
- o ? r.set(n, o) : r.delete(n);
163
- return r.toString();
164
- }, dt = (t, e) => {
165
- if (!t.startsWith("http")) return t;
166
- const r = new URL(t), n = v(r.search, e);
167
- return r.search = n, r.toString();
168
- }, O = (t) => Math.max(t && !Number.isNaN(Number(t)) ? Number.parseInt(t || "1", 10) : 1, 1), yt = (t, e) => {
169
- const { page: r, ...n } = P(t), s = (O(r) - 1) * e;
170
- return { take: e, skip: s, ...n };
171
- }, bt = (t, e, r) => (t.set("page", r.toString()), `${e}?${t.toString()}`), wt = (t) => {
216
+ }, C = (t) => Math.max(t && !Number.isNaN(Number(t)) ? Number.parseInt(t || "1", 10) : 1, 1), It = (t, e) => {
217
+ const { page: r, ...n } = p(t), o = (C(r) - 1) * e;
218
+ return { take: e, skip: o, ...n };
219
+ }, Ot = (t, e, r) => (t.set("page", r.toString()), `${e}?${t.toString()}`), $t = (t) => {
172
220
  try {
173
221
  return JSON.parse(t);
174
222
  } catch {
175
223
  return t;
176
224
  }
177
- }, St = (t) => typeof t == "object" ? JSON.stringify(t) : t, Mt = () => Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0"), Et = (t = 16) => {
225
+ }, Lt = (t) => typeof t == "object" ? JSON.stringify(t) : t, Tt = () => Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0"), Bt = (t = 16) => {
178
226
  const e = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
179
227
  return Array.from({ length: t }, () => e[Math.floor(Math.random() * e.length)]).join("");
180
- }, Ut = (t, e) => Math.floor(Math.random() * (e - t + 1)) + t, Nt = (t) => Array.from({ length: t }, () => Math.floor(Math.random() * 10)).join(""), Pt = (t) => {
228
+ }, Ct = (t, e) => Math.floor(Math.random() * (e - t + 1)) + t, xt = (t) => Array.from({ length: t }, () => Math.floor(Math.random() * 10)).join(""), Ft = (t) => {
181
229
  const e = Math.floor(Math.random() * t.length);
182
230
  return t[e];
183
- }, vt = (t) => {
231
+ }, jt = (t) => {
184
232
  const e = Object.keys(t), r = e[Math.floor(e.length * Math.random())];
185
233
  return t[r];
186
- }, Ot = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toUpperCase() + t.slice(1), Rt = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toLowerCase() + t.slice(1), m = (t, e) => new Intl.DateTimeFormat(t, { dateStyle: e }), R = (t, e) => new Intl.DateTimeFormat(t, { timeStyle: e }), D = (t, e, r) => new Intl.DateTimeFormat(t, { dateStyle: e, timeStyle: r }), I = (t, e = "medium", r = "en-US") => m(r, e).format(new Date(t)), $ = (t, e = "short", r = "en-US") => R(r, e).format(new Date(t)), T = (t, e = "medium", r = "short", n = "en-US") => D(n, e, r).format(new Date(t)), Dt = (t, e, r = "medium", n = "short", o = "en-US") => {
234
+ }, kt = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toUpperCase() + t.slice(1), Wt = (t) => typeof t != "string" ? "" : t.length === 0 ? t : t[0]?.toLowerCase() + t.slice(1), f = (t, e) => new Intl.DateTimeFormat(t, { dateStyle: e }), x = (t, e) => new Intl.DateTimeFormat(t, { timeStyle: e }), F = (t, e, r) => new Intl.DateTimeFormat(t, { dateStyle: e, timeStyle: r }), j = (t, e = "medium", r = "en-US") => f(r, e).format(new Date(t)), k = (t, e = "short", r = "en-US") => x(r, e).format(new Date(t)), W = (t, e = "medium", r = "short", n = "en-US") => F(n, e, r).format(new Date(t)), At = (t, e, r = "medium", n = "short", s = "en-US") => {
187
235
  switch (e) {
188
236
  case "date":
189
- return I(t, r, o);
237
+ return j(t, r, s);
190
238
  case "time":
191
- return $(t, n, o);
239
+ return k(t, n, s);
192
240
  default:
193
- return T(t, r, n, o);
241
+ return W(t, r, n, s);
194
242
  }
195
- }, It = (t, e, r = "medium", n = "en-US") => m(n, r).formatRange(new Date(t), new Date(e)), $t = (t, e = 265) => t ? Math.ceil(t.trim().split(/\s+/).length / e) : 0;
243
+ }, zt = (t, e, r = "medium", n = "en-US") => f(n, r).formatRange(new Date(t), new Date(e)), Ht = (t, e = 265) => t ? Math.ceil(t.trim().split(/\s+/).length / e) : 0;
196
244
  export {
197
- nt as addHttp,
198
- dt as addSearchParams,
199
- d as convertNewlines,
200
- et as formatBytes,
201
- _ as formatCurrency,
202
- I as formatDate,
203
- Dt as formatDateOrTime,
204
- It as formatDateRange,
205
- T as formatDateTime,
206
- tt as formatIntervalAmount,
207
- rt as formatMimeType,
208
- X as formatNumber,
209
- $ as formatTime,
210
- l as formatToDecimals,
211
- O as getCurrentPage,
212
- K as getElementPosition,
213
- Y as getErrorMessage,
214
- F as getExcerpt,
215
- k as getInitials,
216
- bt as getPageLink,
217
- yt as getPageParams,
218
- Mt as getRandomColor,
219
- Nt as getRandomDigits,
220
- Pt as getRandomElement,
221
- Ut as getRandomNumber,
222
- vt as getRandomProperty,
223
- Et as getRandomString,
224
- $t as getReadTime,
225
- P as getSearchParams,
226
- L as getShortcutLabel,
227
- ut as getUrlHostname,
228
- j as isCuid,
229
- ht as isEmptyObject,
230
- E as isErrorWithMessage,
231
- ct as isExternalUrl,
232
- z as isLightColor,
233
- y as isTruthy,
234
- N as isValidUrl,
235
- W as joinAsSentence,
236
- it as keepNumberInRange,
237
- Rt as lcFirst,
238
- wt as maybeParseJson,
239
- St as maybeStringifyJson,
240
- w as nullsToUndefined,
241
- lt as parseNumericValue,
242
- gt as pickFromObject,
243
- mt as preciseRound,
244
- S as processBatch,
245
- V as processBatchWithErrorHandling,
246
- q as publish,
247
- Q as publishEscape,
248
- B as range,
249
- ot as removeHttp,
250
- st as removeTrailingSlash,
251
- H as setInputValue,
252
- p as sleep,
253
- x as slugify,
254
- pt as sortObject,
255
- ft as sortObjectKeys,
256
- b as splitArrayIntoChunks,
257
- g as stripHtml,
258
- at as stripURLSubpath,
259
- G as subscribe,
260
- A as toBase64,
261
- U as toErrorWithMessage,
262
- J as tryCatch,
263
- Ot as ucFirst,
264
- Z as unsubscribe
245
+ pt as addHttp,
246
+ m as addProtocol,
247
+ St as addSearchParams,
248
+ b as convertNewlines,
249
+ ut as formatBytes,
250
+ at as formatCurrency,
251
+ j as formatDate,
252
+ At as formatDateOrTime,
253
+ zt as formatDateRange,
254
+ W as formatDateTime,
255
+ it as formatIntervalAmount,
256
+ lt as formatMimeType,
257
+ ct as formatNumber,
258
+ k as formatTime,
259
+ h as formatToDecimals,
260
+ O as getBaseUrl,
261
+ C as getCurrentPage,
262
+ $ as getDomain,
263
+ tt as getElementPosition,
264
+ et as getErrorMessage,
265
+ J as getExcerpt,
266
+ Z as getInitials,
267
+ Ot as getPageLink,
268
+ It as getPageParams,
269
+ p as getQueryParams,
270
+ Tt as getRandomColor,
271
+ xt as getRandomDigits,
272
+ Ft as getRandomElement,
273
+ Ct as getRandomNumber,
274
+ jt as getRandomProperty,
275
+ Bt as getRandomString,
276
+ Ht as getReadTime,
277
+ Ut as getSearchParams,
278
+ H as getShortcutLabel,
279
+ wt as getUrlHostname,
280
+ K as isCuid,
281
+ Rt as isEmptyObject,
282
+ R as isErrorWithMessage,
283
+ ht as isExternalUrl,
284
+ X as isLightColor,
285
+ L as isLocalhostUrl,
286
+ U as isTruthy,
287
+ D as isValidUrl,
288
+ G as joinAsSentence,
289
+ mt as joinUrlPaths,
290
+ Mt as keepNumberInRange,
291
+ Wt as lcFirst,
292
+ $t as maybeParseJson,
293
+ Lt as maybeStringifyJson,
294
+ i as normalizeUrl,
295
+ M as nullsToUndefined,
296
+ Pt as parseNumericValue,
297
+ Dt as pickFromObject,
298
+ Et as preciseRound,
299
+ P as processBatch,
300
+ q as processBatchWithErrorHandling,
301
+ st as publish,
302
+ ot as publishEscape,
303
+ z as range,
304
+ ft as removeHttp,
305
+ I as removeProtocol,
306
+ B as removeQueryParams,
307
+ bt as removeSearchParams,
308
+ gt as removeTrailingSlash,
309
+ _ as setInputValue,
310
+ T as setQueryParams,
311
+ y as sleep,
312
+ V as slugify,
313
+ Nt as sortObject,
314
+ vt as sortObjectKeys,
315
+ S as splitArrayIntoChunks,
316
+ w as stripHtml,
317
+ dt as stripTrailingSlash,
318
+ yt as stripURLSubpath,
319
+ rt as subscribe,
320
+ Q as toBase64,
321
+ v as toErrorWithMessage,
322
+ Y as tryCatch,
323
+ kt as ucFirst,
324
+ nt as unsubscribe
265
325
  };
266
326
  //# sourceMappingURL=index.js.map