@gpustack/core-ui 1.0.32 → 1.0.34
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/charts.d.ts +7 -0
- package/dist/charts.es.js +859 -0
- package/dist/{useIntl-ClqxSZNY.js → classnames-1RsQ5HaB.js} +12 -35
- package/dist/{editor-wrap-BYfIcvle.js → editor-wrap-DV6LD3QO.js} +1 -1
- package/dist/{excel-reader-Bgm6Gd2H.js → excel-reader-Dm-T5v37.js} +2 -2
- package/dist/excel.es.js +1 -1
- package/dist/file-readers.es.js +3 -3
- package/dist/{highlight-code-DrKwSNa-.js → highlight-code-DFrfrxgM.js} +78 -75
- package/dist/index.css +1 -1
- package/dist/index.es.js +4979 -5859
- package/dist/lib/components/form/wrapper/index.d.ts +5 -5
- package/dist/lib/components/index.d.ts +1 -8
- package/dist/lib/components/page-container/header-slot.d.ts +14 -0
- package/dist/lib/components/page-container/index.d.ts +1 -15
- package/dist/lib/components/table/components/layout.d.ts +5 -5
- package/dist/lib-BIUIGY5e.js +2 -0
- package/dist/{mammoth-3bu5V8Au.js → mammoth-D6zSLJGM.js} +1 -1
- package/dist/markdown.es.js +8 -8
- package/dist/useCoreUIContext-_TAsecw_.js +29 -0
- package/dist/{utils-KsqXE63M.js → utils-B4OCyMbr.js} +523 -520
- package/dist/utils.es.js +4 -4
- package/dist/{word-reader-CSmNlWcx.js → word-reader-DZfu7nOd.js} +4 -4
- package/dist/yaml-editor.es.js +19 -19
- package/package.json +12 -8
- package/dist/lib-EFH8CfCi.js +0 -2
- /package/dist/{epubjs-DKV8rhQU.js → epubjs-DDuu_UAH.js} +0 -0
- /package/dist/{jszip-1lXK4oQn.js → jszip-CYj7myrF.js} +0 -0
- /package/dist/{lodash-i3XVVuwG.js → lodash-CFrt21kh.js} +0 -0
- /package/dist/{pdfjs-dist-DwiA-2_8.js → pdfjs-dist-CHJ4PZaN.js} +0 -0
- /package/dist/{xlsx-DLkyLHwb.js → xlsx-CkHo9SHP.js} +0 -0
|
@@ -1,26 +1,349 @@
|
|
|
1
1
|
import { i as e, o as t, r as n } from "./rolldown-runtime-BETGA6I9.js";
|
|
2
|
-
import {
|
|
3
|
-
import { a, i as
|
|
4
|
-
import { t as u } from "./
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import { t as r } from "./lodash-CFrt21kh.js";
|
|
3
|
+
import { a as i, i as a, n as o, r as s, t as c } from "./word-reader-DZfu7nOd.js";
|
|
4
|
+
import { n as l, t as u } from "./excel-reader-Dm-T5v37.js";
|
|
5
|
+
import { message as d } from "antd";
|
|
6
|
+
import { saveAs as ee } from "file-saver";
|
|
7
|
+
//#region node_modules/.pnpm/decode-uri-component@0.4.1/node_modules/decode-uri-component/index.js
|
|
8
|
+
var te = "%[a-f0-9]{2}", f = RegExp("(" + te + ")|([^%]+?)", "gi"), p = RegExp("(" + te + ")+", "gi");
|
|
9
|
+
function m(e, t) {
|
|
10
|
+
try {
|
|
11
|
+
return [decodeURIComponent(e.join(""))];
|
|
12
|
+
} catch {}
|
|
13
|
+
if (e.length === 1) return e;
|
|
14
|
+
t ||= 1;
|
|
15
|
+
let n = e.slice(0, t), r = e.slice(t);
|
|
16
|
+
return Array.prototype.concat.call([], m(n), m(r));
|
|
17
|
+
}
|
|
18
|
+
function ne(e) {
|
|
19
|
+
try {
|
|
20
|
+
return decodeURIComponent(e);
|
|
21
|
+
} catch {
|
|
22
|
+
let t = e.match(f) || [];
|
|
23
|
+
for (let n = 1; n < t.length; n++) e = m(t, n).join(""), t = e.match(f) || [];
|
|
24
|
+
return e;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function re(e) {
|
|
28
|
+
let t = {
|
|
29
|
+
"%FE%FF": "��",
|
|
30
|
+
"%FF%FE": "��"
|
|
31
|
+
}, n = p.exec(e);
|
|
32
|
+
for (; n;) {
|
|
33
|
+
try {
|
|
34
|
+
t[n[0]] = decodeURIComponent(n[0]);
|
|
35
|
+
} catch {
|
|
36
|
+
let e = ne(n[0]);
|
|
37
|
+
e !== n[0] && (t[n[0]] = e);
|
|
38
|
+
}
|
|
39
|
+
n = p.exec(e);
|
|
40
|
+
}
|
|
41
|
+
t["%C2"] = "�";
|
|
42
|
+
let r = Object.keys(t);
|
|
43
|
+
for (let n of r) e = e.replace(new RegExp(n, "g"), t[n]);
|
|
44
|
+
return e;
|
|
45
|
+
}
|
|
46
|
+
function ie(e) {
|
|
47
|
+
if (typeof e != "string") throw TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
|
|
48
|
+
try {
|
|
49
|
+
return decodeURIComponent(e);
|
|
50
|
+
} catch {
|
|
51
|
+
return re(e);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
//#region node_modules/.pnpm/filter-obj@5.1.0/node_modules/filter-obj/index.js
|
|
56
|
+
function ae(e, t) {
|
|
57
|
+
let n = {};
|
|
58
|
+
if (Array.isArray(t)) for (let r of t) {
|
|
59
|
+
let t = Object.getOwnPropertyDescriptor(e, r);
|
|
60
|
+
t?.enumerable && Object.defineProperty(n, r, t);
|
|
61
|
+
}
|
|
62
|
+
else for (let r of Reflect.ownKeys(e)) {
|
|
63
|
+
let i = Object.getOwnPropertyDescriptor(e, r);
|
|
64
|
+
if (i.enumerable) {
|
|
65
|
+
let a = e[r];
|
|
66
|
+
t(r, a, e) && Object.defineProperty(n, r, i);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
return n;
|
|
70
|
+
}
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region node_modules/.pnpm/split-on-first@3.0.0/node_modules/split-on-first/index.js
|
|
73
|
+
function h(e, t) {
|
|
74
|
+
if (!(typeof e == "string" && typeof t == "string")) throw TypeError("Expected the arguments to be of type `string`");
|
|
75
|
+
if (e === "" || t === "") return [];
|
|
76
|
+
let n = e.indexOf(t);
|
|
77
|
+
return n === -1 ? [] : [e.slice(0, n), e.slice(n + t.length)];
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/base.js
|
|
81
|
+
var oe = /* @__PURE__ */ n({
|
|
82
|
+
exclude: () => ge,
|
|
83
|
+
extract: () => b,
|
|
84
|
+
parse: () => x,
|
|
85
|
+
parseUrl: () => S,
|
|
86
|
+
pick: () => w,
|
|
87
|
+
stringify: () => he,
|
|
88
|
+
stringifyUrl: () => C
|
|
89
|
+
}), se = (e) => e == null, ce = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), g = Symbol("encodeFragmentIdentifier");
|
|
90
|
+
function le(e) {
|
|
91
|
+
switch (e.arrayFormat) {
|
|
92
|
+
case "index": return (t) => (n, r) => {
|
|
93
|
+
let i = n.length;
|
|
94
|
+
return r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [
|
|
95
|
+
_(t, e),
|
|
96
|
+
"[",
|
|
97
|
+
i,
|
|
98
|
+
"]"
|
|
99
|
+
].join("")] : [...n, [
|
|
100
|
+
_(t, e),
|
|
101
|
+
"[",
|
|
102
|
+
_(i, e),
|
|
103
|
+
"]=",
|
|
104
|
+
_(r, e)
|
|
105
|
+
].join("")];
|
|
106
|
+
};
|
|
107
|
+
case "bracket": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [_(t, e), "[]"].join("")] : [...n, [
|
|
108
|
+
_(t, e),
|
|
109
|
+
"[]=",
|
|
110
|
+
_(r, e)
|
|
111
|
+
].join("")];
|
|
112
|
+
case "colon-list-separator": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [_(t, e), ":list="].join("")] : [...n, [
|
|
113
|
+
_(t, e),
|
|
114
|
+
":list=",
|
|
115
|
+
_(r, e)
|
|
116
|
+
].join("")];
|
|
117
|
+
case "comma":
|
|
118
|
+
case "separator":
|
|
119
|
+
case "bracket-separator": {
|
|
120
|
+
let t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
|
|
121
|
+
return (n) => (r, i) => i === void 0 || e.skipNull && i === null || e.skipEmptyString && i === "" ? r : (i = i === null ? "" : i, r.length === 0 ? [[
|
|
122
|
+
_(n, e),
|
|
123
|
+
t,
|
|
124
|
+
_(i, e)
|
|
125
|
+
].join("")] : [[r, _(i, e)].join(e.arrayFormatSeparator)]);
|
|
126
|
+
}
|
|
127
|
+
default: return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, _(t, e)] : [...n, [
|
|
128
|
+
_(t, e),
|
|
129
|
+
"=",
|
|
130
|
+
_(r, e)
|
|
131
|
+
].join("")];
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
function ue(e) {
|
|
135
|
+
let t;
|
|
136
|
+
switch (e.arrayFormat) {
|
|
137
|
+
case "index": return (e, n, r) => {
|
|
138
|
+
if (t = /\[(\d*)]$/.exec(e), e = e.replace(/\[\d*]$/, ""), !t) {
|
|
139
|
+
r[e] = n;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
r[e] === void 0 && (r[e] = {}), r[e][t[1]] = n;
|
|
143
|
+
};
|
|
144
|
+
case "bracket": return (e, n, r) => {
|
|
145
|
+
if (t = /(\[])$/.exec(e), e = e.replace(/\[]$/, ""), !t) {
|
|
146
|
+
r[e] = n;
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (r[e] === void 0) {
|
|
150
|
+
r[e] = [n];
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
r[e] = [...r[e], n];
|
|
154
|
+
};
|
|
155
|
+
case "colon-list-separator": return (e, n, r) => {
|
|
156
|
+
if (t = /(:list)$/.exec(e), e = e.replace(/:list$/, ""), !t) {
|
|
157
|
+
r[e] = n;
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
if (r[e] === void 0) {
|
|
161
|
+
r[e] = [n];
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
r[e] = [...r[e], n];
|
|
165
|
+
};
|
|
166
|
+
case "comma":
|
|
167
|
+
case "separator": return (t, n, r) => {
|
|
168
|
+
r[t] = typeof n == "string" && n.includes(e.arrayFormatSeparator) ? n.split(e.arrayFormatSeparator).map((t) => v(t, e)) : n === null ? n : v(n, e);
|
|
169
|
+
};
|
|
170
|
+
case "bracket-separator": return (t, n, r) => {
|
|
171
|
+
let i = /(\[])$/.test(t);
|
|
172
|
+
if (t = t.replace(/\[]$/, ""), !i) {
|
|
173
|
+
r[t] = n && v(n, e);
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
let a = n === null ? [] : v(n, e).split(e.arrayFormatSeparator);
|
|
177
|
+
if (r[t] === void 0) {
|
|
178
|
+
r[t] = a;
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
r[t] = [...r[t], ...a];
|
|
182
|
+
};
|
|
183
|
+
default: return (e, t, n) => {
|
|
184
|
+
if (n[e] === void 0) {
|
|
185
|
+
n[e] = t;
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
n[e] = [...[n[e]].flat(), t];
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
function de(e) {
|
|
193
|
+
if (typeof e != "string" || e.length !== 1) throw TypeError("arrayFormatSeparator must be single character string");
|
|
194
|
+
}
|
|
195
|
+
function _(e, t) {
|
|
196
|
+
return t.encode ? t.strict ? ce(e) : encodeURIComponent(e) : e;
|
|
197
|
+
}
|
|
198
|
+
function v(e, t) {
|
|
199
|
+
return t.decode ? ie(e) : e;
|
|
200
|
+
}
|
|
201
|
+
function fe(e) {
|
|
202
|
+
return Array.isArray(e) ? e.sort() : typeof e == "object" ? fe(Object.keys(e)).sort((e, t) => Number(e) - Number(t)).map((t) => e[t]) : e;
|
|
203
|
+
}
|
|
204
|
+
function pe(e) {
|
|
205
|
+
let t = e.indexOf("#");
|
|
206
|
+
return t !== -1 && (e = e.slice(0, t)), e;
|
|
207
|
+
}
|
|
208
|
+
function me(e) {
|
|
209
|
+
let t = "", n = e.indexOf("#");
|
|
210
|
+
return n !== -1 && (t = e.slice(n)), t;
|
|
211
|
+
}
|
|
212
|
+
function y(e, t, n) {
|
|
213
|
+
return n === "string" && typeof e == "string" ? e : typeof n == "function" && typeof e == "string" ? n(e) : n === "boolean" && e === null ? !0 : n === "boolean" && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : n === "boolean" && e !== null && (e.toLowerCase() === "1" || e.toLowerCase() === "0") ? e.toLowerCase() === "1" : n === "string[]" && t.arrayFormat !== "none" && typeof e == "string" ? [e] : n === "number[]" && t.arrayFormat !== "none" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? [Number(e)] : n === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
|
|
214
|
+
}
|
|
215
|
+
function b(e) {
|
|
216
|
+
e = pe(e);
|
|
217
|
+
let t = e.indexOf("?");
|
|
218
|
+
return t === -1 ? "" : e.slice(t + 1);
|
|
219
|
+
}
|
|
220
|
+
function x(e, t) {
|
|
221
|
+
t = {
|
|
222
|
+
decode: !0,
|
|
223
|
+
sort: !0,
|
|
224
|
+
arrayFormat: "none",
|
|
225
|
+
arrayFormatSeparator: ",",
|
|
226
|
+
parseNumbers: !1,
|
|
227
|
+
parseBooleans: !1,
|
|
228
|
+
types: Object.create(null),
|
|
229
|
+
...t
|
|
230
|
+
}, de(t.arrayFormatSeparator);
|
|
231
|
+
let n = ue(t), r = Object.create(null);
|
|
232
|
+
if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e)) return r;
|
|
233
|
+
for (let i of e.split("&")) {
|
|
234
|
+
if (i === "") continue;
|
|
235
|
+
let e = t.decode ? i.replaceAll("+", " ") : i, [a, o] = h(e, "=");
|
|
236
|
+
a === void 0 && (a = e), o = o === void 0 ? null : [
|
|
237
|
+
"comma",
|
|
238
|
+
"separator",
|
|
239
|
+
"bracket-separator"
|
|
240
|
+
].includes(t.arrayFormat) ? o : v(o, t), n(v(a, t), o, r);
|
|
241
|
+
}
|
|
242
|
+
for (let [e, n] of Object.entries(r)) if (typeof n == "object" && n && t.types[e] !== "string") for (let [r, i] of Object.entries(n)) {
|
|
243
|
+
let a = t.types[e], o = typeof a == "function" ? a : a ? a.replace("[]", "") : void 0;
|
|
244
|
+
n[r] = y(i, t, o);
|
|
245
|
+
}
|
|
246
|
+
else typeof n == "object" && n && t.types[e] === "string" ? r[e] = Object.values(n).join(t.arrayFormatSeparator) : r[e] = y(n, t, t.types[e]);
|
|
247
|
+
return t.sort === !1 ? r : (t.sort === !0 ? Object.keys(r).sort() : Object.keys(r).sort(t.sort)).reduce((e, t) => {
|
|
248
|
+
let n = r[t];
|
|
249
|
+
return e[t] = n && typeof n == "object" && !Array.isArray(n) ? fe(n) : n, e;
|
|
250
|
+
}, Object.create(null));
|
|
251
|
+
}
|
|
252
|
+
function he(e, t) {
|
|
253
|
+
if (!e) return "";
|
|
254
|
+
t = {
|
|
255
|
+
encode: !0,
|
|
256
|
+
strict: !0,
|
|
257
|
+
arrayFormat: "none",
|
|
258
|
+
arrayFormatSeparator: ",",
|
|
259
|
+
...t
|
|
260
|
+
}, de(t.arrayFormatSeparator);
|
|
261
|
+
let n = (n) => t.skipNull && se(e[n]) || t.skipEmptyString && e[n] === "", r = le(t), i = {};
|
|
262
|
+
for (let [t, r] of Object.entries(e)) n(t) || (i[t] = r);
|
|
263
|
+
let a = Object.keys(i);
|
|
264
|
+
return t.sort !== !1 && a.sort(t.sort), a.map((n) => {
|
|
265
|
+
let i = e[n];
|
|
266
|
+
if (t.replacer && (i = t.replacer(n, i), i === void 0) || i === void 0) return "";
|
|
267
|
+
if (i === null) return _(n, t);
|
|
268
|
+
if (Array.isArray(i)) {
|
|
269
|
+
if (i.length === 0 && t.arrayFormat === "bracket-separator") return _(n, t) + "[]";
|
|
270
|
+
let e = i;
|
|
271
|
+
return t.replacer && (e = i.map((e, r) => t.replacer(`${n}[${r}]`, e)).filter((e) => e !== void 0)), e.reduce(r(n), []).join("&");
|
|
272
|
+
}
|
|
273
|
+
return _(n, t) + "=" + _(i, t);
|
|
274
|
+
}).filter((e) => e.length > 0).join("&");
|
|
275
|
+
}
|
|
276
|
+
function S(e, t) {
|
|
277
|
+
t = {
|
|
278
|
+
decode: !0,
|
|
279
|
+
...t
|
|
280
|
+
};
|
|
281
|
+
let [n, r] = h(e, "#");
|
|
282
|
+
return n === void 0 && (n = e), {
|
|
283
|
+
url: n?.split("?")?.[0] ?? "",
|
|
284
|
+
query: x(b(e), t),
|
|
285
|
+
...t && t.parseFragmentIdentifier && r ? { fragmentIdentifier: v(r, t) } : {}
|
|
286
|
+
};
|
|
287
|
+
}
|
|
288
|
+
function C(e, t) {
|
|
289
|
+
t = {
|
|
290
|
+
encode: !0,
|
|
291
|
+
strict: !0,
|
|
292
|
+
[g]: !0,
|
|
293
|
+
...t
|
|
294
|
+
};
|
|
295
|
+
let n = pe(e.url).split("?")[0] || "", r = he({
|
|
296
|
+
...x(b(e.url), {
|
|
297
|
+
sort: !1,
|
|
298
|
+
...t
|
|
299
|
+
}),
|
|
300
|
+
...e.query
|
|
301
|
+
}, t);
|
|
302
|
+
r &&= `?${r}`;
|
|
303
|
+
let i = me(e.url);
|
|
304
|
+
if (typeof e.fragmentIdentifier == "string") {
|
|
305
|
+
let r = new URL(n);
|
|
306
|
+
r.hash = e.fragmentIdentifier, i = t[g] ? r.hash : `#${e.fragmentIdentifier}`;
|
|
307
|
+
}
|
|
308
|
+
return `${n}${r}${i}`;
|
|
309
|
+
}
|
|
310
|
+
function w(e, t, n) {
|
|
311
|
+
n = {
|
|
312
|
+
parseFragmentIdentifier: !0,
|
|
313
|
+
[g]: !1,
|
|
314
|
+
...n
|
|
315
|
+
};
|
|
316
|
+
let { url: r, query: i, fragmentIdentifier: a } = S(e, n);
|
|
317
|
+
return C({
|
|
318
|
+
url: r,
|
|
319
|
+
query: ae(i, t),
|
|
320
|
+
fragmentIdentifier: a
|
|
321
|
+
}, n);
|
|
322
|
+
}
|
|
323
|
+
function ge(e, t, n) {
|
|
324
|
+
return w(e, Array.isArray(t) ? (e) => !t.includes(e) : (e, n) => !t(e, n), n);
|
|
325
|
+
}
|
|
326
|
+
//#endregion
|
|
327
|
+
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/index.js
|
|
328
|
+
var T = oe;
|
|
329
|
+
//#endregion
|
|
7
330
|
//#region node_modules/.pnpm/tinycolor2@1.6.0/node_modules/tinycolor2/esm/tinycolor.js
|
|
8
|
-
function
|
|
331
|
+
function E(e) {
|
|
9
332
|
"@babel/helpers - typeof";
|
|
10
|
-
return
|
|
333
|
+
return E = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
|
|
11
334
|
return typeof e;
|
|
12
335
|
} : function(e) {
|
|
13
336
|
return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
|
|
14
|
-
},
|
|
337
|
+
}, E(e);
|
|
15
338
|
}
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (e ||= "", t ||= {}, e instanceof
|
|
19
|
-
if (!(this instanceof
|
|
20
|
-
var n =
|
|
339
|
+
var _e = /^\s+/, ve = /\s+$/;
|
|
340
|
+
function D(e, t) {
|
|
341
|
+
if (e ||= "", t ||= {}, e instanceof D) return e;
|
|
342
|
+
if (!(this instanceof D)) return new D(e, t);
|
|
343
|
+
var n = ye(e);
|
|
21
344
|
this._originalInput = e, this._r = n.r, this._g = n.g, this._b = n.b, this._a = n.a, this._roundA = Math.round(100 * this._a) / 100, this._format = t.format || n.format, this._gradientType = t.gradientType, this._r < 1 && (this._r = Math.round(this._r)), this._g < 1 && (this._g = Math.round(this._g)), this._b < 1 && (this._b = Math.round(this._b)), this._ok = n.ok;
|
|
22
345
|
}
|
|
23
|
-
|
|
346
|
+
D.prototype = {
|
|
24
347
|
isDark: function() {
|
|
25
348
|
return this.getBrightness() < 128;
|
|
26
349
|
},
|
|
@@ -48,10 +371,10 @@ p.prototype = {
|
|
|
48
371
|
return .2126 * i + .7152 * a + .0722 * o;
|
|
49
372
|
},
|
|
50
373
|
setAlpha: function(e) {
|
|
51
|
-
return this._a =
|
|
374
|
+
return this._a = P(e), this._roundA = Math.round(100 * this._a) / 100, this;
|
|
52
375
|
},
|
|
53
376
|
toHsv: function() {
|
|
54
|
-
var e =
|
|
377
|
+
var e = k(this._r, this._g, this._b);
|
|
55
378
|
return {
|
|
56
379
|
h: e.h * 360,
|
|
57
380
|
s: e.s,
|
|
@@ -60,11 +383,11 @@ p.prototype = {
|
|
|
60
383
|
};
|
|
61
384
|
},
|
|
62
385
|
toHsvString: function() {
|
|
63
|
-
var e =
|
|
386
|
+
var e = k(this._r, this._g, this._b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.v * 100);
|
|
64
387
|
return this._a == 1 ? "hsv(" + t + ", " + n + "%, " + r + "%)" : "hsva(" + t + ", " + n + "%, " + r + "%, " + this._roundA + ")";
|
|
65
388
|
},
|
|
66
389
|
toHsl: function() {
|
|
67
|
-
var e =
|
|
390
|
+
var e = O(this._r, this._g, this._b);
|
|
68
391
|
return {
|
|
69
392
|
h: e.h * 360,
|
|
70
393
|
s: e.s,
|
|
@@ -73,17 +396,17 @@ p.prototype = {
|
|
|
73
396
|
};
|
|
74
397
|
},
|
|
75
398
|
toHslString: function() {
|
|
76
|
-
var e =
|
|
399
|
+
var e = O(this._r, this._g, this._b), t = Math.round(e.h * 360), n = Math.round(e.s * 100), r = Math.round(e.l * 100);
|
|
77
400
|
return this._a == 1 ? "hsl(" + t + ", " + n + "%, " + r + "%)" : "hsla(" + t + ", " + n + "%, " + r + "%, " + this._roundA + ")";
|
|
78
401
|
},
|
|
79
402
|
toHex: function(e) {
|
|
80
|
-
return
|
|
403
|
+
return A(this._r, this._g, this._b, e);
|
|
81
404
|
},
|
|
82
405
|
toHexString: function(e) {
|
|
83
406
|
return "#" + this.toHex(e);
|
|
84
407
|
},
|
|
85
408
|
toHex8: function(e) {
|
|
86
|
-
return
|
|
409
|
+
return Ce(this._r, this._g, this._b, this._a, e);
|
|
87
410
|
},
|
|
88
411
|
toHex8String: function(e) {
|
|
89
412
|
return "#" + this.toHex8(e);
|
|
@@ -101,23 +424,23 @@ p.prototype = {
|
|
|
101
424
|
},
|
|
102
425
|
toPercentageRgb: function() {
|
|
103
426
|
return {
|
|
104
|
-
r: Math.round(
|
|
105
|
-
g: Math.round(
|
|
106
|
-
b: Math.round(
|
|
427
|
+
r: Math.round(F(this._r, 255) * 100) + "%",
|
|
428
|
+
g: Math.round(F(this._g, 255) * 100) + "%",
|
|
429
|
+
b: Math.round(F(this._b, 255) * 100) + "%",
|
|
107
430
|
a: this._a
|
|
108
431
|
};
|
|
109
432
|
},
|
|
110
433
|
toPercentageRgbString: function() {
|
|
111
|
-
return this._a == 1 ? "rgb(" + Math.round(
|
|
434
|
+
return this._a == 1 ? "rgb(" + Math.round(F(this._r, 255) * 100) + "%, " + Math.round(F(this._g, 255) * 100) + "%, " + Math.round(F(this._b, 255) * 100) + "%)" : "rgba(" + Math.round(F(this._r, 255) * 100) + "%, " + Math.round(F(this._g, 255) * 100) + "%, " + Math.round(F(this._b, 255) * 100) + "%, " + this._roundA + ")";
|
|
112
435
|
},
|
|
113
436
|
toName: function() {
|
|
114
|
-
return this._a === 0 ? "transparent" : this._a < 1 ? !1 :
|
|
437
|
+
return this._a === 0 ? "transparent" : this._a < 1 ? !1 : Fe[A(this._r, this._g, this._b, !0)] || !1;
|
|
115
438
|
},
|
|
116
439
|
toFilter: function(e) {
|
|
117
|
-
var t = "#" +
|
|
440
|
+
var t = "#" + j(this._r, this._g, this._b, this._a), n = t, r = this._gradientType ? "GradientType = 1, " : "";
|
|
118
441
|
if (e) {
|
|
119
|
-
var i =
|
|
120
|
-
n = "#" +
|
|
442
|
+
var i = D(e);
|
|
443
|
+
n = "#" + j(i._r, i._g, i._b, i._a);
|
|
121
444
|
}
|
|
122
445
|
return "progid:DXImageTransform.Microsoft.gradient(" + r + "startColorstr=" + t + ",endColorstr=" + n + ")";
|
|
123
446
|
},
|
|
@@ -128,69 +451,69 @@ p.prototype = {
|
|
|
128
451
|
return !t && r && (e === "hex" || e === "hex6" || e === "hex3" || e === "hex4" || e === "hex8" || e === "name") ? e === "name" && this._a === 0 ? this.toName() : this.toRgbString() : (e === "rgb" && (n = this.toRgbString()), e === "prgb" && (n = this.toPercentageRgbString()), (e === "hex" || e === "hex6") && (n = this.toHexString()), e === "hex3" && (n = this.toHexString(!0)), e === "hex4" && (n = this.toHex8String(!0)), e === "hex8" && (n = this.toHex8String()), e === "name" && (n = this.toName()), e === "hsl" && (n = this.toHslString()), e === "hsv" && (n = this.toHsvString()), n || this.toHexString());
|
|
129
452
|
},
|
|
130
453
|
clone: function() {
|
|
131
|
-
return
|
|
454
|
+
return D(this.toString());
|
|
132
455
|
},
|
|
133
456
|
_applyModification: function(e, t) {
|
|
134
457
|
var n = e.apply(null, [this].concat([].slice.call(t)));
|
|
135
458
|
return this._r = n._r, this._g = n._g, this._b = n._b, this.setAlpha(n._a), this;
|
|
136
459
|
},
|
|
137
460
|
lighten: function() {
|
|
138
|
-
return this._applyModification(
|
|
461
|
+
return this._applyModification(De, arguments);
|
|
139
462
|
},
|
|
140
463
|
brighten: function() {
|
|
141
|
-
return this._applyModification(
|
|
464
|
+
return this._applyModification(Oe, arguments);
|
|
142
465
|
},
|
|
143
466
|
darken: function() {
|
|
144
|
-
return this._applyModification(
|
|
467
|
+
return this._applyModification(ke, arguments);
|
|
145
468
|
},
|
|
146
469
|
desaturate: function() {
|
|
147
|
-
return this._applyModification(
|
|
470
|
+
return this._applyModification(we, arguments);
|
|
148
471
|
},
|
|
149
472
|
saturate: function() {
|
|
150
|
-
return this._applyModification(
|
|
473
|
+
return this._applyModification(Te, arguments);
|
|
151
474
|
},
|
|
152
475
|
greyscale: function() {
|
|
153
|
-
return this._applyModification(
|
|
476
|
+
return this._applyModification(Ee, arguments);
|
|
154
477
|
},
|
|
155
478
|
spin: function() {
|
|
156
|
-
return this._applyModification(
|
|
479
|
+
return this._applyModification(Ae, arguments);
|
|
157
480
|
},
|
|
158
481
|
_applyCombination: function(e, t) {
|
|
159
482
|
return e.apply(null, [this].concat([].slice.call(t)));
|
|
160
483
|
},
|
|
161
484
|
analogous: function() {
|
|
162
|
-
return this._applyCombination(
|
|
485
|
+
return this._applyCombination(Ne, arguments);
|
|
163
486
|
},
|
|
164
487
|
complement: function() {
|
|
165
|
-
return this._applyCombination(
|
|
488
|
+
return this._applyCombination(je, arguments);
|
|
166
489
|
},
|
|
167
490
|
monochromatic: function() {
|
|
168
|
-
return this._applyCombination(
|
|
491
|
+
return this._applyCombination(Pe, arguments);
|
|
169
492
|
},
|
|
170
493
|
splitcomplement: function() {
|
|
171
|
-
return this._applyCombination(
|
|
494
|
+
return this._applyCombination(Me, arguments);
|
|
172
495
|
},
|
|
173
496
|
triad: function() {
|
|
174
|
-
return this._applyCombination(
|
|
497
|
+
return this._applyCombination(M, [3]);
|
|
175
498
|
},
|
|
176
499
|
tetrad: function() {
|
|
177
|
-
return this._applyCombination(
|
|
500
|
+
return this._applyCombination(M, [4]);
|
|
178
501
|
}
|
|
179
|
-
},
|
|
180
|
-
if (
|
|
502
|
+
}, D.fromRatio = function(e, t) {
|
|
503
|
+
if (E(e) == "object") {
|
|
181
504
|
var n = {};
|
|
182
|
-
for (var r in e) e.hasOwnProperty(r) && (r === "a" ? n[r] = e[r] : n[r] =
|
|
505
|
+
for (var r in e) e.hasOwnProperty(r) && (r === "a" ? n[r] = e[r] : n[r] = z(e[r]));
|
|
183
506
|
e = n;
|
|
184
507
|
}
|
|
185
|
-
return
|
|
508
|
+
return D(e, t);
|
|
186
509
|
};
|
|
187
|
-
function
|
|
510
|
+
function ye(e) {
|
|
188
511
|
var t = {
|
|
189
512
|
r: 0,
|
|
190
513
|
g: 0,
|
|
191
514
|
b: 0
|
|
192
515
|
}, n = 1, r = null, i = null, a = null, o = !1, s = !1;
|
|
193
|
-
return typeof e == "string" && (e =
|
|
516
|
+
return typeof e == "string" && (e = ze(e)), E(e) == "object" && (U(e.r) && U(e.g) && U(e.b) ? (t = be(e.r, e.g, e.b), o = !0, s = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : U(e.h) && U(e.s) && U(e.v) ? (r = z(e.s), i = z(e.v), t = Se(e.h, r, i), o = !0, s = "hsv") : U(e.h) && U(e.s) && U(e.l) && (r = z(e.s), a = z(e.l), t = xe(e.h, r, a), o = !0, s = "hsl"), e.hasOwnProperty("a") && (n = e.a)), n = P(n), {
|
|
194
517
|
ok: o,
|
|
195
518
|
format: e.format || s,
|
|
196
519
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -199,15 +522,15 @@ function re(e) {
|
|
|
199
522
|
a: n
|
|
200
523
|
};
|
|
201
524
|
}
|
|
202
|
-
function
|
|
525
|
+
function be(e, t, n) {
|
|
203
526
|
return {
|
|
204
|
-
r:
|
|
205
|
-
g:
|
|
206
|
-
b:
|
|
527
|
+
r: F(e, 255) * 255,
|
|
528
|
+
g: F(t, 255) * 255,
|
|
529
|
+
b: F(n, 255) * 255
|
|
207
530
|
};
|
|
208
531
|
}
|
|
209
|
-
function
|
|
210
|
-
e =
|
|
532
|
+
function O(e, t, n) {
|
|
533
|
+
e = F(e, 255), t = F(t, 255), n = F(n, 255);
|
|
211
534
|
var r = Math.max(e, t, n), i = Math.min(e, t, n), a, o, s = (r + i) / 2;
|
|
212
535
|
if (r == i) a = o = 0;
|
|
213
536
|
else {
|
|
@@ -231,9 +554,9 @@ function m(e, t, n) {
|
|
|
231
554
|
l: s
|
|
232
555
|
};
|
|
233
556
|
}
|
|
234
|
-
function
|
|
557
|
+
function xe(e, t, n) {
|
|
235
558
|
var r, i, a;
|
|
236
|
-
e =
|
|
559
|
+
e = F(e, 360), t = F(t, 100), n = F(n, 100);
|
|
237
560
|
function o(e, t, n) {
|
|
238
561
|
return n < 0 && (n += 1), n > 1 && --n, n < 1 / 6 ? e + (t - e) * 6 * n : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
239
562
|
}
|
|
@@ -248,8 +571,8 @@ function ae(e, t, n) {
|
|
|
248
571
|
b: a * 255
|
|
249
572
|
};
|
|
250
573
|
}
|
|
251
|
-
function
|
|
252
|
-
e =
|
|
574
|
+
function k(e, t, n) {
|
|
575
|
+
e = F(e, 255), t = F(t, 255), n = F(n, 255);
|
|
253
576
|
var r = Math.max(e, t, n), i = Math.min(e, t, n), a, o, s = r, c = r - i;
|
|
254
577
|
if (o = r === 0 ? 0 : c / r, r == i) a = 0;
|
|
255
578
|
else {
|
|
@@ -272,8 +595,8 @@ function h(e, t, n) {
|
|
|
272
595
|
v: s
|
|
273
596
|
};
|
|
274
597
|
}
|
|
275
|
-
function
|
|
276
|
-
e =
|
|
598
|
+
function Se(e, t, n) {
|
|
599
|
+
e = F(e, 360) * 6, t = F(t, 100), n = F(n, 100);
|
|
277
600
|
var r = Math.floor(e), i = e - r, a = n * (1 - t), o = n * (1 - i * t), s = n * (1 - (1 - i) * t), c = r % 6, l = [
|
|
278
601
|
n,
|
|
279
602
|
o,
|
|
@@ -302,131 +625,131 @@ function oe(e, t, n) {
|
|
|
302
625
|
b: d * 255
|
|
303
626
|
};
|
|
304
627
|
}
|
|
305
|
-
function
|
|
628
|
+
function A(e, t, n, r) {
|
|
306
629
|
var i = [
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
630
|
+
R(Math.round(e).toString(16)),
|
|
631
|
+
R(Math.round(t).toString(16)),
|
|
632
|
+
R(Math.round(n).toString(16))
|
|
310
633
|
];
|
|
311
634
|
return r && i[0].charAt(0) == i[0].charAt(1) && i[1].charAt(0) == i[1].charAt(1) && i[2].charAt(0) == i[2].charAt(1) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) : i.join("");
|
|
312
635
|
}
|
|
313
|
-
function
|
|
636
|
+
function Ce(e, t, n, r, i) {
|
|
314
637
|
var a = [
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
638
|
+
R(Math.round(e).toString(16)),
|
|
639
|
+
R(Math.round(t).toString(16)),
|
|
640
|
+
R(Math.round(n).toString(16)),
|
|
641
|
+
R(B(r))
|
|
319
642
|
];
|
|
320
643
|
return i && a[0].charAt(0) == a[0].charAt(1) && a[1].charAt(0) == a[1].charAt(1) && a[2].charAt(0) == a[2].charAt(1) && a[3].charAt(0) == a[3].charAt(1) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
|
|
321
644
|
}
|
|
322
|
-
function
|
|
645
|
+
function j(e, t, n, r) {
|
|
323
646
|
return [
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
647
|
+
R(B(r)),
|
|
648
|
+
R(Math.round(e).toString(16)),
|
|
649
|
+
R(Math.round(t).toString(16)),
|
|
650
|
+
R(Math.round(n).toString(16))
|
|
328
651
|
].join("");
|
|
329
652
|
}
|
|
330
|
-
|
|
331
|
-
return !e || !t ? !1 :
|
|
332
|
-
},
|
|
333
|
-
return
|
|
653
|
+
D.equals = function(e, t) {
|
|
654
|
+
return !e || !t ? !1 : D(e).toRgbString() == D(t).toRgbString();
|
|
655
|
+
}, D.random = function() {
|
|
656
|
+
return D.fromRatio({
|
|
334
657
|
r: Math.random(),
|
|
335
658
|
g: Math.random(),
|
|
336
659
|
b: Math.random()
|
|
337
660
|
});
|
|
338
661
|
};
|
|
339
|
-
function
|
|
662
|
+
function we(e, t) {
|
|
340
663
|
t = t === 0 ? 0 : t || 10;
|
|
341
|
-
var n =
|
|
342
|
-
return n.s -= t / 100, n.s =
|
|
664
|
+
var n = D(e).toHsl();
|
|
665
|
+
return n.s -= t / 100, n.s = I(n.s), D(n);
|
|
343
666
|
}
|
|
344
|
-
function
|
|
667
|
+
function Te(e, t) {
|
|
345
668
|
t = t === 0 ? 0 : t || 10;
|
|
346
|
-
var n =
|
|
347
|
-
return n.s += t / 100, n.s =
|
|
669
|
+
var n = D(e).toHsl();
|
|
670
|
+
return n.s += t / 100, n.s = I(n.s), D(n);
|
|
348
671
|
}
|
|
349
|
-
function
|
|
350
|
-
return
|
|
672
|
+
function Ee(e) {
|
|
673
|
+
return D(e).desaturate(100);
|
|
351
674
|
}
|
|
352
|
-
function
|
|
675
|
+
function De(e, t) {
|
|
353
676
|
t = t === 0 ? 0 : t || 10;
|
|
354
|
-
var n =
|
|
355
|
-
return n.l += t / 100, n.l =
|
|
677
|
+
var n = D(e).toHsl();
|
|
678
|
+
return n.l += t / 100, n.l = I(n.l), D(n);
|
|
356
679
|
}
|
|
357
|
-
function
|
|
680
|
+
function Oe(e, t) {
|
|
358
681
|
t = t === 0 ? 0 : t || 10;
|
|
359
|
-
var n =
|
|
360
|
-
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))),
|
|
682
|
+
var n = D(e).toRgb();
|
|
683
|
+
return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), D(n);
|
|
361
684
|
}
|
|
362
|
-
function
|
|
685
|
+
function ke(e, t) {
|
|
363
686
|
t = t === 0 ? 0 : t || 10;
|
|
364
|
-
var n =
|
|
365
|
-
return n.l -= t / 100, n.l =
|
|
687
|
+
var n = D(e).toHsl();
|
|
688
|
+
return n.l -= t / 100, n.l = I(n.l), D(n);
|
|
366
689
|
}
|
|
367
|
-
function
|
|
368
|
-
var n =
|
|
369
|
-
return n.h = r < 0 ? 360 + r : r,
|
|
690
|
+
function Ae(e, t) {
|
|
691
|
+
var n = D(e).toHsl(), r = (n.h + t) % 360;
|
|
692
|
+
return n.h = r < 0 ? 360 + r : r, D(n);
|
|
370
693
|
}
|
|
371
|
-
function
|
|
372
|
-
var t =
|
|
373
|
-
return t.h = (t.h + 180) % 360,
|
|
694
|
+
function je(e) {
|
|
695
|
+
var t = D(e).toHsl();
|
|
696
|
+
return t.h = (t.h + 180) % 360, D(t);
|
|
374
697
|
}
|
|
375
|
-
function
|
|
698
|
+
function M(e, t) {
|
|
376
699
|
if (isNaN(t) || t <= 0) throw Error("Argument to polyad must be a positive number");
|
|
377
|
-
for (var n =
|
|
700
|
+
for (var n = D(e).toHsl(), r = [D(e)], i = 360 / t, a = 1; a < t; a++) r.push(D({
|
|
378
701
|
h: (n.h + a * i) % 360,
|
|
379
702
|
s: n.s,
|
|
380
703
|
l: n.l
|
|
381
704
|
}));
|
|
382
705
|
return r;
|
|
383
706
|
}
|
|
384
|
-
function
|
|
385
|
-
var t =
|
|
707
|
+
function Me(e) {
|
|
708
|
+
var t = D(e).toHsl(), n = t.h;
|
|
386
709
|
return [
|
|
387
|
-
|
|
388
|
-
|
|
710
|
+
D(e),
|
|
711
|
+
D({
|
|
389
712
|
h: (n + 72) % 360,
|
|
390
713
|
s: t.s,
|
|
391
714
|
l: t.l
|
|
392
715
|
}),
|
|
393
|
-
|
|
716
|
+
D({
|
|
394
717
|
h: (n + 216) % 360,
|
|
395
718
|
s: t.s,
|
|
396
719
|
l: t.l
|
|
397
720
|
})
|
|
398
721
|
];
|
|
399
722
|
}
|
|
400
|
-
function
|
|
723
|
+
function Ne(e, t, n) {
|
|
401
724
|
t ||= 6, n ||= 30;
|
|
402
|
-
var r =
|
|
403
|
-
for (r.h = (r.h - (i * t >> 1) + 720) % 360; --t;) r.h = (r.h + i) % 360, a.push(
|
|
725
|
+
var r = D(e).toHsl(), i = 360 / n, a = [D(e)];
|
|
726
|
+
for (r.h = (r.h - (i * t >> 1) + 720) % 360; --t;) r.h = (r.h + i) % 360, a.push(D(r));
|
|
404
727
|
return a;
|
|
405
728
|
}
|
|
406
|
-
function
|
|
729
|
+
function Pe(e, t) {
|
|
407
730
|
t ||= 6;
|
|
408
|
-
for (var n =
|
|
731
|
+
for (var n = D(e).toHsv(), r = n.h, i = n.s, a = n.v, o = [], s = 1 / t; t--;) o.push(D({
|
|
409
732
|
h: r,
|
|
410
733
|
s: i,
|
|
411
734
|
v: a
|
|
412
735
|
})), a = (a + s) % 1;
|
|
413
736
|
return o;
|
|
414
737
|
}
|
|
415
|
-
|
|
738
|
+
D.mix = function(e, t, n) {
|
|
416
739
|
n = n === 0 ? 0 : n || 50;
|
|
417
|
-
var r =
|
|
418
|
-
return
|
|
740
|
+
var r = D(e).toRgb(), i = D(t).toRgb(), a = n / 100;
|
|
741
|
+
return D({
|
|
419
742
|
r: (i.r - r.r) * a + r.r,
|
|
420
743
|
g: (i.g - r.g) * a + r.g,
|
|
421
744
|
b: (i.b - r.b) * a + r.b,
|
|
422
745
|
a: (i.a - r.a) * a + r.a
|
|
423
746
|
});
|
|
424
|
-
},
|
|
425
|
-
var n =
|
|
747
|
+
}, D.readability = function(e, t) {
|
|
748
|
+
var n = D(e), r = D(t);
|
|
426
749
|
return (Math.max(n.getLuminance(), r.getLuminance()) + .05) / (Math.min(n.getLuminance(), r.getLuminance()) + .05);
|
|
427
|
-
},
|
|
428
|
-
var r =
|
|
429
|
-
switch (i =
|
|
750
|
+
}, D.isReadable = function(e, t, n) {
|
|
751
|
+
var r = D.readability(e, t), i, a = !1;
|
|
752
|
+
switch (i = Be(n), i.level + i.size) {
|
|
430
753
|
case "AAsmall":
|
|
431
754
|
case "AAAlarge":
|
|
432
755
|
a = r >= 4.5;
|
|
@@ -439,16 +762,16 @@ p.mix = function(e, t, n) {
|
|
|
439
762
|
break;
|
|
440
763
|
}
|
|
441
764
|
return a;
|
|
442
|
-
},
|
|
765
|
+
}, D.mostReadable = function(e, t, n) {
|
|
443
766
|
var r = null, i = 0, a, o, s, c;
|
|
444
767
|
n ||= {}, o = n.includeFallbackColors, s = n.level, c = n.size;
|
|
445
|
-
for (var l = 0; l < t.length; l++) a =
|
|
446
|
-
return
|
|
768
|
+
for (var l = 0; l < t.length; l++) a = D.readability(e, t[l]), a > i && (i = a, r = D(t[l]));
|
|
769
|
+
return D.isReadable(e, r, {
|
|
447
770
|
level: s,
|
|
448
771
|
size: c
|
|
449
|
-
}) || !o ? r : (n.includeFallbackColors = !1,
|
|
772
|
+
}) || !o ? r : (n.includeFallbackColors = !1, D.mostReadable(e, ["#fff", "#000"], n));
|
|
450
773
|
};
|
|
451
|
-
var
|
|
774
|
+
var N = D.names = {
|
|
452
775
|
aliceblue: "f0f8ff",
|
|
453
776
|
antiquewhite: "faebd7",
|
|
454
777
|
aqua: "0ff",
|
|
@@ -598,45 +921,45 @@ var y = p.names = {
|
|
|
598
921
|
whitesmoke: "f5f5f5",
|
|
599
922
|
yellow: "ff0",
|
|
600
923
|
yellowgreen: "9acd32"
|
|
601
|
-
},
|
|
602
|
-
function
|
|
924
|
+
}, Fe = D.hexNames = Ie(N);
|
|
925
|
+
function Ie(e) {
|
|
603
926
|
var t = {};
|
|
604
927
|
for (var n in e) e.hasOwnProperty(n) && (t[e[n]] = n);
|
|
605
928
|
return t;
|
|
606
929
|
}
|
|
607
|
-
function
|
|
930
|
+
function P(e) {
|
|
608
931
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
609
932
|
}
|
|
610
|
-
function
|
|
611
|
-
|
|
612
|
-
var n =
|
|
933
|
+
function F(e, t) {
|
|
934
|
+
Le(e) && (e = "100%");
|
|
935
|
+
var n = Re(e);
|
|
613
936
|
return e = Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(e * t, 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : e % t / parseFloat(t);
|
|
614
937
|
}
|
|
615
|
-
function
|
|
938
|
+
function I(e) {
|
|
616
939
|
return Math.min(1, Math.max(0, e));
|
|
617
940
|
}
|
|
618
|
-
function
|
|
941
|
+
function L(e) {
|
|
619
942
|
return parseInt(e, 16);
|
|
620
943
|
}
|
|
621
|
-
function
|
|
944
|
+
function Le(e) {
|
|
622
945
|
return typeof e == "string" && e.indexOf(".") != -1 && parseFloat(e) === 1;
|
|
623
946
|
}
|
|
624
|
-
function
|
|
947
|
+
function Re(e) {
|
|
625
948
|
return typeof e == "string" && e.indexOf("%") != -1;
|
|
626
949
|
}
|
|
627
|
-
function
|
|
950
|
+
function R(e) {
|
|
628
951
|
return e.length == 1 ? "0" + e : "" + e;
|
|
629
952
|
}
|
|
630
|
-
function
|
|
953
|
+
function z(e) {
|
|
631
954
|
return e <= 1 && (e = e * 100 + "%"), e;
|
|
632
955
|
}
|
|
633
|
-
function
|
|
956
|
+
function B(e) {
|
|
634
957
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
635
958
|
}
|
|
636
|
-
function
|
|
637
|
-
return
|
|
959
|
+
function V(e) {
|
|
960
|
+
return L(e) / 255;
|
|
638
961
|
}
|
|
639
|
-
var
|
|
962
|
+
var H = function() {
|
|
640
963
|
var e = "(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)", t = "[\\s|\\(]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")\\s*\\)?", n = "[\\s|\\(]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")[,|\\s]+(" + e + ")\\s*\\)?";
|
|
641
964
|
return {
|
|
642
965
|
CSS_UNIT: new RegExp(e),
|
|
@@ -652,13 +975,13 @@ var O = function() {
|
|
|
652
975
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
653
976
|
};
|
|
654
977
|
}();
|
|
655
|
-
function
|
|
656
|
-
return !!
|
|
978
|
+
function U(e) {
|
|
979
|
+
return !!H.CSS_UNIT.exec(e);
|
|
657
980
|
}
|
|
658
|
-
function
|
|
659
|
-
e = e.replace(
|
|
981
|
+
function ze(e) {
|
|
982
|
+
e = e.replace(_e, "").replace(ve, "").toLowerCase();
|
|
660
983
|
var t = !1;
|
|
661
|
-
if (
|
|
984
|
+
if (N[e]) e = N[e], t = !0;
|
|
662
985
|
else if (e == "transparent") return {
|
|
663
986
|
r: 0,
|
|
664
987
|
g: 0,
|
|
@@ -667,58 +990,58 @@ function Ce(e) {
|
|
|
667
990
|
format: "name"
|
|
668
991
|
};
|
|
669
992
|
var n;
|
|
670
|
-
return (n =
|
|
993
|
+
return (n = H.rgb.exec(e)) ? {
|
|
671
994
|
r: n[1],
|
|
672
995
|
g: n[2],
|
|
673
996
|
b: n[3]
|
|
674
|
-
} : (n =
|
|
997
|
+
} : (n = H.rgba.exec(e)) ? {
|
|
675
998
|
r: n[1],
|
|
676
999
|
g: n[2],
|
|
677
1000
|
b: n[3],
|
|
678
1001
|
a: n[4]
|
|
679
|
-
} : (n =
|
|
1002
|
+
} : (n = H.hsl.exec(e)) ? {
|
|
680
1003
|
h: n[1],
|
|
681
1004
|
s: n[2],
|
|
682
1005
|
l: n[3]
|
|
683
|
-
} : (n =
|
|
1006
|
+
} : (n = H.hsla.exec(e)) ? {
|
|
684
1007
|
h: n[1],
|
|
685
1008
|
s: n[2],
|
|
686
1009
|
l: n[3],
|
|
687
1010
|
a: n[4]
|
|
688
|
-
} : (n =
|
|
1011
|
+
} : (n = H.hsv.exec(e)) ? {
|
|
689
1012
|
h: n[1],
|
|
690
1013
|
s: n[2],
|
|
691
1014
|
v: n[3]
|
|
692
|
-
} : (n =
|
|
1015
|
+
} : (n = H.hsva.exec(e)) ? {
|
|
693
1016
|
h: n[1],
|
|
694
1017
|
s: n[2],
|
|
695
1018
|
v: n[3],
|
|
696
1019
|
a: n[4]
|
|
697
|
-
} : (n =
|
|
698
|
-
r:
|
|
699
|
-
g:
|
|
700
|
-
b:
|
|
701
|
-
a:
|
|
1020
|
+
} : (n = H.hex8.exec(e)) ? {
|
|
1021
|
+
r: L(n[1]),
|
|
1022
|
+
g: L(n[2]),
|
|
1023
|
+
b: L(n[3]),
|
|
1024
|
+
a: V(n[4]),
|
|
702
1025
|
format: t ? "name" : "hex8"
|
|
703
|
-
} : (n =
|
|
704
|
-
r:
|
|
705
|
-
g:
|
|
706
|
-
b:
|
|
1026
|
+
} : (n = H.hex6.exec(e)) ? {
|
|
1027
|
+
r: L(n[1]),
|
|
1028
|
+
g: L(n[2]),
|
|
1029
|
+
b: L(n[3]),
|
|
707
1030
|
format: t ? "name" : "hex"
|
|
708
|
-
} : (n =
|
|
709
|
-
r:
|
|
710
|
-
g:
|
|
711
|
-
b:
|
|
712
|
-
a:
|
|
1031
|
+
} : (n = H.hex4.exec(e)) ? {
|
|
1032
|
+
r: L(n[1] + "" + n[1]),
|
|
1033
|
+
g: L(n[2] + "" + n[2]),
|
|
1034
|
+
b: L(n[3] + "" + n[3]),
|
|
1035
|
+
a: V(n[4] + "" + n[4]),
|
|
713
1036
|
format: t ? "name" : "hex8"
|
|
714
|
-
} : (n =
|
|
715
|
-
r:
|
|
716
|
-
g:
|
|
717
|
-
b:
|
|
1037
|
+
} : (n = H.hex3.exec(e)) ? {
|
|
1038
|
+
r: L(n[1] + "" + n[1]),
|
|
1039
|
+
g: L(n[2] + "" + n[2]),
|
|
1040
|
+
b: L(n[3] + "" + n[3]),
|
|
718
1041
|
format: t ? "name" : "hex"
|
|
719
1042
|
} : !1;
|
|
720
1043
|
}
|
|
721
|
-
function
|
|
1044
|
+
function Be(e) {
|
|
722
1045
|
var t, n;
|
|
723
1046
|
return e ||= {
|
|
724
1047
|
level: "AA",
|
|
@@ -730,329 +1053,9 @@ function we(e) {
|
|
|
730
1053
|
}
|
|
731
1054
|
//#endregion
|
|
732
1055
|
//#region src/lib/utils/download-stream.ts
|
|
733
|
-
var
|
|
734
|
-
|
|
735
|
-
},
|
|
736
|
-
function P(e, t) {
|
|
737
|
-
try {
|
|
738
|
-
return [decodeURIComponent(e.join(""))];
|
|
739
|
-
} catch {}
|
|
740
|
-
if (e.length === 1) return e;
|
|
741
|
-
t ||= 1;
|
|
742
|
-
let n = e.slice(0, t), r = e.slice(t);
|
|
743
|
-
return Array.prototype.concat.call([], P(n), P(r));
|
|
744
|
-
}
|
|
745
|
-
function Te(e) {
|
|
746
|
-
try {
|
|
747
|
-
return decodeURIComponent(e);
|
|
748
|
-
} catch {
|
|
749
|
-
let t = e.match(M) || [];
|
|
750
|
-
for (let n = 1; n < t.length; n++) e = P(t, n).join(""), t = e.match(M) || [];
|
|
751
|
-
return e;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
function Ee(e) {
|
|
755
|
-
let t = {
|
|
756
|
-
"%FE%FF": "��",
|
|
757
|
-
"%FF%FE": "��"
|
|
758
|
-
}, n = N.exec(e);
|
|
759
|
-
for (; n;) {
|
|
760
|
-
try {
|
|
761
|
-
t[n[0]] = decodeURIComponent(n[0]);
|
|
762
|
-
} catch {
|
|
763
|
-
let e = Te(n[0]);
|
|
764
|
-
e !== n[0] && (t[n[0]] = e);
|
|
765
|
-
}
|
|
766
|
-
n = N.exec(e);
|
|
767
|
-
}
|
|
768
|
-
t["%C2"] = "�";
|
|
769
|
-
let r = Object.keys(t);
|
|
770
|
-
for (let n of r) e = e.replace(new RegExp(n, "g"), t[n]);
|
|
771
|
-
return e;
|
|
772
|
-
}
|
|
773
|
-
function De(e) {
|
|
774
|
-
if (typeof e != "string") throw TypeError("Expected `encodedURI` to be of type `string`, got `" + typeof e + "`");
|
|
775
|
-
try {
|
|
776
|
-
return decodeURIComponent(e);
|
|
777
|
-
} catch {
|
|
778
|
-
return Ee(e);
|
|
779
|
-
}
|
|
780
|
-
}
|
|
781
|
-
//#endregion
|
|
782
|
-
//#region node_modules/.pnpm/filter-obj@5.1.0/node_modules/filter-obj/index.js
|
|
783
|
-
function Oe(e, t) {
|
|
784
|
-
let n = {};
|
|
785
|
-
if (Array.isArray(t)) for (let r of t) {
|
|
786
|
-
let t = Object.getOwnPropertyDescriptor(e, r);
|
|
787
|
-
t?.enumerable && Object.defineProperty(n, r, t);
|
|
788
|
-
}
|
|
789
|
-
else for (let r of Reflect.ownKeys(e)) {
|
|
790
|
-
let i = Object.getOwnPropertyDescriptor(e, r);
|
|
791
|
-
if (i.enumerable) {
|
|
792
|
-
let a = e[r];
|
|
793
|
-
t(r, a, e) && Object.defineProperty(n, r, i);
|
|
794
|
-
}
|
|
795
|
-
}
|
|
796
|
-
return n;
|
|
797
|
-
}
|
|
798
|
-
//#endregion
|
|
799
|
-
//#region node_modules/.pnpm/split-on-first@3.0.0/node_modules/split-on-first/index.js
|
|
800
|
-
function F(e, t) {
|
|
801
|
-
if (!(typeof e == "string" && typeof t == "string")) throw TypeError("Expected the arguments to be of type `string`");
|
|
802
|
-
if (e === "" || t === "") return [];
|
|
803
|
-
let n = e.indexOf(t);
|
|
804
|
-
return n === -1 ? [] : [e.slice(0, n), e.slice(n + t.length)];
|
|
805
|
-
}
|
|
806
|
-
//#endregion
|
|
807
|
-
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/base.js
|
|
808
|
-
var ke = /* @__PURE__ */ n({
|
|
809
|
-
exclude: () => Le,
|
|
810
|
-
extract: () => H,
|
|
811
|
-
parse: () => U,
|
|
812
|
-
parseUrl: () => G,
|
|
813
|
-
pick: () => Ie,
|
|
814
|
-
stringify: () => W,
|
|
815
|
-
stringifyUrl: () => K
|
|
816
|
-
}), Ae = (e) => e == null, je = (e) => encodeURIComponent(e).replaceAll(/[!'()*]/g, (e) => `%${e.charCodeAt(0).toString(16).toUpperCase()}`), I = Symbol("encodeFragmentIdentifier");
|
|
817
|
-
function Me(e) {
|
|
818
|
-
switch (e.arrayFormat) {
|
|
819
|
-
case "index": return (t) => (n, r) => {
|
|
820
|
-
let i = n.length;
|
|
821
|
-
return r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [
|
|
822
|
-
R(t, e),
|
|
823
|
-
"[",
|
|
824
|
-
i,
|
|
825
|
-
"]"
|
|
826
|
-
].join("")] : [...n, [
|
|
827
|
-
R(t, e),
|
|
828
|
-
"[",
|
|
829
|
-
R(i, e),
|
|
830
|
-
"]=",
|
|
831
|
-
R(r, e)
|
|
832
|
-
].join("")];
|
|
833
|
-
};
|
|
834
|
-
case "bracket": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [R(t, e), "[]"].join("")] : [...n, [
|
|
835
|
-
R(t, e),
|
|
836
|
-
"[]=",
|
|
837
|
-
R(r, e)
|
|
838
|
-
].join("")];
|
|
839
|
-
case "colon-list-separator": return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, [R(t, e), ":list="].join("")] : [...n, [
|
|
840
|
-
R(t, e),
|
|
841
|
-
":list=",
|
|
842
|
-
R(r, e)
|
|
843
|
-
].join("")];
|
|
844
|
-
case "comma":
|
|
845
|
-
case "separator":
|
|
846
|
-
case "bracket-separator": {
|
|
847
|
-
let t = e.arrayFormat === "bracket-separator" ? "[]=" : "=";
|
|
848
|
-
return (n) => (r, i) => i === void 0 || e.skipNull && i === null || e.skipEmptyString && i === "" ? r : (i = i === null ? "" : i, r.length === 0 ? [[
|
|
849
|
-
R(n, e),
|
|
850
|
-
t,
|
|
851
|
-
R(i, e)
|
|
852
|
-
].join("")] : [[r, R(i, e)].join(e.arrayFormatSeparator)]);
|
|
853
|
-
}
|
|
854
|
-
default: return (t) => (n, r) => r === void 0 || e.skipNull && r === null || e.skipEmptyString && r === "" ? n : r === null ? [...n, R(t, e)] : [...n, [
|
|
855
|
-
R(t, e),
|
|
856
|
-
"=",
|
|
857
|
-
R(r, e)
|
|
858
|
-
].join("")];
|
|
859
|
-
}
|
|
860
|
-
}
|
|
861
|
-
function Ne(e) {
|
|
862
|
-
let t;
|
|
863
|
-
switch (e.arrayFormat) {
|
|
864
|
-
case "index": return (e, n, r) => {
|
|
865
|
-
if (t = /\[(\d*)]$/.exec(e), e = e.replace(/\[\d*]$/, ""), !t) {
|
|
866
|
-
r[e] = n;
|
|
867
|
-
return;
|
|
868
|
-
}
|
|
869
|
-
r[e] === void 0 && (r[e] = {}), r[e][t[1]] = n;
|
|
870
|
-
};
|
|
871
|
-
case "bracket": return (e, n, r) => {
|
|
872
|
-
if (t = /(\[])$/.exec(e), e = e.replace(/\[]$/, ""), !t) {
|
|
873
|
-
r[e] = n;
|
|
874
|
-
return;
|
|
875
|
-
}
|
|
876
|
-
if (r[e] === void 0) {
|
|
877
|
-
r[e] = [n];
|
|
878
|
-
return;
|
|
879
|
-
}
|
|
880
|
-
r[e] = [...r[e], n];
|
|
881
|
-
};
|
|
882
|
-
case "colon-list-separator": return (e, n, r) => {
|
|
883
|
-
if (t = /(:list)$/.exec(e), e = e.replace(/:list$/, ""), !t) {
|
|
884
|
-
r[e] = n;
|
|
885
|
-
return;
|
|
886
|
-
}
|
|
887
|
-
if (r[e] === void 0) {
|
|
888
|
-
r[e] = [n];
|
|
889
|
-
return;
|
|
890
|
-
}
|
|
891
|
-
r[e] = [...r[e], n];
|
|
892
|
-
};
|
|
893
|
-
case "comma":
|
|
894
|
-
case "separator": return (t, n, r) => {
|
|
895
|
-
r[t] = typeof n == "string" && n.includes(e.arrayFormatSeparator) ? n.split(e.arrayFormatSeparator).map((t) => z(t, e)) : n === null ? n : z(n, e);
|
|
896
|
-
};
|
|
897
|
-
case "bracket-separator": return (t, n, r) => {
|
|
898
|
-
let i = /(\[])$/.test(t);
|
|
899
|
-
if (t = t.replace(/\[]$/, ""), !i) {
|
|
900
|
-
r[t] = n && z(n, e);
|
|
901
|
-
return;
|
|
902
|
-
}
|
|
903
|
-
let a = n === null ? [] : z(n, e).split(e.arrayFormatSeparator);
|
|
904
|
-
if (r[t] === void 0) {
|
|
905
|
-
r[t] = a;
|
|
906
|
-
return;
|
|
907
|
-
}
|
|
908
|
-
r[t] = [...r[t], ...a];
|
|
909
|
-
};
|
|
910
|
-
default: return (e, t, n) => {
|
|
911
|
-
if (n[e] === void 0) {
|
|
912
|
-
n[e] = t;
|
|
913
|
-
return;
|
|
914
|
-
}
|
|
915
|
-
n[e] = [...[n[e]].flat(), t];
|
|
916
|
-
};
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
function L(e) {
|
|
920
|
-
if (typeof e != "string" || e.length !== 1) throw TypeError("arrayFormatSeparator must be single character string");
|
|
921
|
-
}
|
|
922
|
-
function R(e, t) {
|
|
923
|
-
return t.encode ? t.strict ? je(e) : encodeURIComponent(e) : e;
|
|
924
|
-
}
|
|
925
|
-
function z(e, t) {
|
|
926
|
-
return t.decode ? De(e) : e;
|
|
927
|
-
}
|
|
928
|
-
function B(e) {
|
|
929
|
-
return Array.isArray(e) ? e.sort() : typeof e == "object" ? B(Object.keys(e)).sort((e, t) => Number(e) - Number(t)).map((t) => e[t]) : e;
|
|
930
|
-
}
|
|
931
|
-
function V(e) {
|
|
932
|
-
let t = e.indexOf("#");
|
|
933
|
-
return t !== -1 && (e = e.slice(0, t)), e;
|
|
934
|
-
}
|
|
935
|
-
function Pe(e) {
|
|
936
|
-
let t = "", n = e.indexOf("#");
|
|
937
|
-
return n !== -1 && (t = e.slice(n)), t;
|
|
938
|
-
}
|
|
939
|
-
function Fe(e, t, n) {
|
|
940
|
-
return n === "string" && typeof e == "string" ? e : typeof n == "function" && typeof e == "string" ? n(e) : n === "boolean" && e === null ? !0 : n === "boolean" && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : n === "boolean" && e !== null && (e.toLowerCase() === "1" || e.toLowerCase() === "0") ? e.toLowerCase() === "1" : n === "string[]" && t.arrayFormat !== "none" && typeof e == "string" ? [e] : n === "number[]" && t.arrayFormat !== "none" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? [Number(e)] : n === "number" && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : t.parseBooleans && e !== null && (e.toLowerCase() === "true" || e.toLowerCase() === "false") ? e.toLowerCase() === "true" : t.parseNumbers && !Number.isNaN(Number(e)) && typeof e == "string" && e.trim() !== "" ? Number(e) : e;
|
|
941
|
-
}
|
|
942
|
-
function H(e) {
|
|
943
|
-
e = V(e);
|
|
944
|
-
let t = e.indexOf("?");
|
|
945
|
-
return t === -1 ? "" : e.slice(t + 1);
|
|
946
|
-
}
|
|
947
|
-
function U(e, t) {
|
|
948
|
-
t = {
|
|
949
|
-
decode: !0,
|
|
950
|
-
sort: !0,
|
|
951
|
-
arrayFormat: "none",
|
|
952
|
-
arrayFormatSeparator: ",",
|
|
953
|
-
parseNumbers: !1,
|
|
954
|
-
parseBooleans: !1,
|
|
955
|
-
types: Object.create(null),
|
|
956
|
-
...t
|
|
957
|
-
}, L(t.arrayFormatSeparator);
|
|
958
|
-
let n = Ne(t), r = Object.create(null);
|
|
959
|
-
if (typeof e != "string" || (e = e.trim().replace(/^[?#&]/, ""), !e)) return r;
|
|
960
|
-
for (let i of e.split("&")) {
|
|
961
|
-
if (i === "") continue;
|
|
962
|
-
let e = t.decode ? i.replaceAll("+", " ") : i, [a, o] = F(e, "=");
|
|
963
|
-
a === void 0 && (a = e), o = o === void 0 ? null : [
|
|
964
|
-
"comma",
|
|
965
|
-
"separator",
|
|
966
|
-
"bracket-separator"
|
|
967
|
-
].includes(t.arrayFormat) ? o : z(o, t), n(z(a, t), o, r);
|
|
968
|
-
}
|
|
969
|
-
for (let [e, n] of Object.entries(r)) if (typeof n == "object" && n && t.types[e] !== "string") for (let [r, i] of Object.entries(n)) {
|
|
970
|
-
let a = t.types[e], o = typeof a == "function" ? a : a ? a.replace("[]", "") : void 0;
|
|
971
|
-
n[r] = Fe(i, t, o);
|
|
972
|
-
}
|
|
973
|
-
else typeof n == "object" && n && t.types[e] === "string" ? r[e] = Object.values(n).join(t.arrayFormatSeparator) : r[e] = Fe(n, t, t.types[e]);
|
|
974
|
-
return t.sort === !1 ? r : (t.sort === !0 ? Object.keys(r).sort() : Object.keys(r).sort(t.sort)).reduce((e, t) => {
|
|
975
|
-
let n = r[t];
|
|
976
|
-
return e[t] = n && typeof n == "object" && !Array.isArray(n) ? B(n) : n, e;
|
|
977
|
-
}, Object.create(null));
|
|
978
|
-
}
|
|
979
|
-
function W(e, t) {
|
|
980
|
-
if (!e) return "";
|
|
981
|
-
t = {
|
|
982
|
-
encode: !0,
|
|
983
|
-
strict: !0,
|
|
984
|
-
arrayFormat: "none",
|
|
985
|
-
arrayFormatSeparator: ",",
|
|
986
|
-
...t
|
|
987
|
-
}, L(t.arrayFormatSeparator);
|
|
988
|
-
let n = (n) => t.skipNull && Ae(e[n]) || t.skipEmptyString && e[n] === "", r = Me(t), i = {};
|
|
989
|
-
for (let [t, r] of Object.entries(e)) n(t) || (i[t] = r);
|
|
990
|
-
let a = Object.keys(i);
|
|
991
|
-
return t.sort !== !1 && a.sort(t.sort), a.map((n) => {
|
|
992
|
-
let i = e[n];
|
|
993
|
-
if (t.replacer && (i = t.replacer(n, i), i === void 0) || i === void 0) return "";
|
|
994
|
-
if (i === null) return R(n, t);
|
|
995
|
-
if (Array.isArray(i)) {
|
|
996
|
-
if (i.length === 0 && t.arrayFormat === "bracket-separator") return R(n, t) + "[]";
|
|
997
|
-
let e = i;
|
|
998
|
-
return t.replacer && (e = i.map((e, r) => t.replacer(`${n}[${r}]`, e)).filter((e) => e !== void 0)), e.reduce(r(n), []).join("&");
|
|
999
|
-
}
|
|
1000
|
-
return R(n, t) + "=" + R(i, t);
|
|
1001
|
-
}).filter((e) => e.length > 0).join("&");
|
|
1002
|
-
}
|
|
1003
|
-
function G(e, t) {
|
|
1004
|
-
t = {
|
|
1005
|
-
decode: !0,
|
|
1006
|
-
...t
|
|
1007
|
-
};
|
|
1008
|
-
let [n, r] = F(e, "#");
|
|
1009
|
-
return n === void 0 && (n = e), {
|
|
1010
|
-
url: n?.split("?")?.[0] ?? "",
|
|
1011
|
-
query: U(H(e), t),
|
|
1012
|
-
...t && t.parseFragmentIdentifier && r ? { fragmentIdentifier: z(r, t) } : {}
|
|
1013
|
-
};
|
|
1014
|
-
}
|
|
1015
|
-
function K(e, t) {
|
|
1016
|
-
t = {
|
|
1017
|
-
encode: !0,
|
|
1018
|
-
strict: !0,
|
|
1019
|
-
[I]: !0,
|
|
1020
|
-
...t
|
|
1021
|
-
};
|
|
1022
|
-
let n = V(e.url).split("?")[0] || "", r = W({
|
|
1023
|
-
...U(H(e.url), {
|
|
1024
|
-
sort: !1,
|
|
1025
|
-
...t
|
|
1026
|
-
}),
|
|
1027
|
-
...e.query
|
|
1028
|
-
}, t);
|
|
1029
|
-
r &&= `?${r}`;
|
|
1030
|
-
let i = Pe(e.url);
|
|
1031
|
-
if (typeof e.fragmentIdentifier == "string") {
|
|
1032
|
-
let r = new URL(n);
|
|
1033
|
-
r.hash = e.fragmentIdentifier, i = t[I] ? r.hash : `#${e.fragmentIdentifier}`;
|
|
1034
|
-
}
|
|
1035
|
-
return `${n}${r}${i}`;
|
|
1036
|
-
}
|
|
1037
|
-
function Ie(e, t, n) {
|
|
1038
|
-
n = {
|
|
1039
|
-
parseFragmentIdentifier: !0,
|
|
1040
|
-
[I]: !1,
|
|
1041
|
-
...n
|
|
1042
|
-
};
|
|
1043
|
-
let { url: r, query: i, fragmentIdentifier: a } = G(e, n);
|
|
1044
|
-
return K({
|
|
1045
|
-
url: r,
|
|
1046
|
-
query: Oe(i, t),
|
|
1047
|
-
fragmentIdentifier: a
|
|
1048
|
-
}, n);
|
|
1049
|
-
}
|
|
1050
|
-
function Le(e, t, n) {
|
|
1051
|
-
return Ie(e, Array.isArray(t) ? (e) => !t.includes(e) : (e, n) => !t(e, n), n);
|
|
1052
|
-
}
|
|
1053
|
-
//#endregion
|
|
1054
|
-
//#region node_modules/.pnpm/query-string@9.3.1/node_modules/query-string/index.js
|
|
1055
|
-
var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
1056
|
+
var W = (e, t) => {
|
|
1057
|
+
ee(e, t);
|
|
1058
|
+
}, G = /* @__PURE__ */ t(r(), 1), K = (e) => {
|
|
1056
1059
|
let t = [];
|
|
1057
1060
|
if (!e) return {
|
|
1058
1061
|
results: t,
|
|
@@ -1078,7 +1081,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1078
1081
|
results: t,
|
|
1079
1082
|
remaining: r
|
|
1080
1083
|
};
|
|
1081
|
-
},
|
|
1084
|
+
}, q = async (e) => {
|
|
1082
1085
|
try {
|
|
1083
1086
|
return {
|
|
1084
1087
|
error: !0,
|
|
@@ -1090,9 +1093,9 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1090
1093
|
message: e.statusText
|
|
1091
1094
|
};
|
|
1092
1095
|
}
|
|
1093
|
-
},
|
|
1096
|
+
}, J = async (e) => {
|
|
1094
1097
|
let t = e.method || "POST", n = e.url;
|
|
1095
|
-
e.params && (n = `${n}?${
|
|
1098
|
+
e.params && (n = `${n}?${T.stringify(e.params)}`);
|
|
1096
1099
|
let r = await fetch(n, {
|
|
1097
1100
|
method: t,
|
|
1098
1101
|
body: t === "POST" ? JSON.stringify(e.data) : null,
|
|
@@ -1105,7 +1108,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1105
1108
|
return r.ok ? {
|
|
1106
1109
|
reader: r?.body?.getReader(),
|
|
1107
1110
|
decoder: new TextDecoder("utf-8", { fatal: !0 })
|
|
1108
|
-
} : await
|
|
1111
|
+
} : await q(r);
|
|
1109
1112
|
}, Y = (e) => {
|
|
1110
1113
|
let t = new FormData(), n = (e, n) => {
|
|
1111
1114
|
n instanceof File ? t.append(e, n) : typeof n == "object" && n ? t.append(e, JSON.stringify(n)) : n != null && t.append(e, n);
|
|
@@ -1121,7 +1124,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1121
1124
|
return n.ok ? {
|
|
1122
1125
|
reader: n?.body?.getReader(),
|
|
1123
1126
|
decoder: new TextDecoder("utf-8", { fatal: !0 })
|
|
1124
|
-
} : await
|
|
1127
|
+
} : await q(n);
|
|
1125
1128
|
}, He = async (e, t, n, r = 200) => {
|
|
1126
1129
|
class i {
|
|
1127
1130
|
buffer = [];
|
|
@@ -1138,7 +1141,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1138
1141
|
return this.buffer;
|
|
1139
1142
|
}
|
|
1140
1143
|
}
|
|
1141
|
-
let a = new i(), o = (0,
|
|
1144
|
+
let a = new i(), o = (0, G.throttle)(() => {
|
|
1142
1145
|
a.flush();
|
|
1143
1146
|
}, r), s = !0, c = "";
|
|
1144
1147
|
for (; s;) {
|
|
@@ -1153,7 +1156,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1153
1156
|
let e = c.slice(7).trim(), t = JSON.parse(e);
|
|
1154
1157
|
a.add({ error: t }), c = "";
|
|
1155
1158
|
} else {
|
|
1156
|
-
let { results: e, remaining: t } =
|
|
1159
|
+
let { results: e, remaining: t } = K(c);
|
|
1157
1160
|
e.forEach((e) => {
|
|
1158
1161
|
a.add(e);
|
|
1159
1162
|
}), c = t;
|
|
@@ -1164,7 +1167,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1164
1167
|
}
|
|
1165
1168
|
if (n) {
|
|
1166
1169
|
if (c += t.decode(), c) {
|
|
1167
|
-
let { results: e, remaining: t } =
|
|
1170
|
+
let { results: e, remaining: t } = K(c);
|
|
1168
1171
|
e.forEach((e) => a.add(e));
|
|
1169
1172
|
}
|
|
1170
1173
|
a.flush(), s = !1;
|
|
@@ -1230,7 +1233,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1230
1233
|
return this.buffer;
|
|
1231
1234
|
}
|
|
1232
1235
|
}
|
|
1233
|
-
let o = new a(n), s = (0,
|
|
1236
|
+
let o = new a(n), s = (0, G.throttle)(async () => {
|
|
1234
1237
|
o.flush();
|
|
1235
1238
|
}, r);
|
|
1236
1239
|
for (;;) {
|
|
@@ -1269,7 +1272,7 @@ var Re = ke, q = /* @__PURE__ */ t(u(), 1), ze = (e) => {
|
|
|
1269
1272
|
}), o.addEventListener("ended", () => {
|
|
1270
1273
|
URL.revokeObjectURL(o.src);
|
|
1271
1274
|
}), o.addEventListener("error", () => {
|
|
1272
|
-
URL.revokeObjectURL(s),
|
|
1275
|
+
URL.revokeObjectURL(s), d.error("Failed to load audio metadata invalid file"), r(/* @__PURE__ */ Error("Failed to load audio metadata invalid file"));
|
|
1273
1276
|
});
|
|
1274
1277
|
}), Ke = async (e) => new Promise((t, n) => {
|
|
1275
1278
|
let r = new FileReader();
|
|
@@ -1303,10 +1306,10 @@ var Je = /* @__PURE__ */ n({
|
|
|
1303
1306
|
convertFileToBase64: () => Ge,
|
|
1304
1307
|
cosineSimilarity: () => it,
|
|
1305
1308
|
createFormData: () => Y,
|
|
1306
|
-
downloadFile: () =>
|
|
1307
|
-
errorHandler: () =>
|
|
1308
|
-
exportJsonToExcel: () =>
|
|
1309
|
-
fetchChunkedData: () =>
|
|
1309
|
+
downloadFile: () => W,
|
|
1310
|
+
errorHandler: () => q,
|
|
1311
|
+
exportJsonToExcel: () => u,
|
|
1312
|
+
fetchChunkedData: () => J,
|
|
1310
1313
|
fetchChunkedDataPostFormData: () => Ve,
|
|
1311
1314
|
formatLargeNumber: () => $,
|
|
1312
1315
|
formatNumber: () => tt,
|
|
@@ -1325,14 +1328,14 @@ var Je = /* @__PURE__ */ n({
|
|
|
1325
1328
|
platformCall: () => $e,
|
|
1326
1329
|
readAudioFile: () => Ke,
|
|
1327
1330
|
readBlob: () => rt,
|
|
1328
|
-
readEpubContent: () =>
|
|
1329
|
-
readExcelContent: () =>
|
|
1330
|
-
readHtmlContent: () =>
|
|
1331
|
+
readEpubContent: () => i,
|
|
1332
|
+
readExcelContent: () => l,
|
|
1333
|
+
readHtmlContent: () => o,
|
|
1331
1334
|
readLargeStreamData: () => We,
|
|
1332
|
-
readPDFContent: () =>
|
|
1333
|
-
readPptxContent: () =>
|
|
1335
|
+
readPDFContent: () => a,
|
|
1336
|
+
readPptxContent: () => s,
|
|
1334
1337
|
readStreamData: () => He,
|
|
1335
|
-
readWordContent: () =>
|
|
1338
|
+
readWordContent: () => c
|
|
1336
1339
|
}), Ye = (e) => Array.isArray(e) ? e.length > 0 : !!e || e === 0 || e === !1, Xe = (e) => Array.isArray(e) ? e.length > 0 : !!e || e === 0 || e === !1 || e === null, Ze = async (e, t) => Promise.allSettled(e.map((e) => t(e))), Q = (e, t = 1, n = !1) => {
|
|
1337
1340
|
if (!e) return n ? "" : 0;
|
|
1338
1341
|
let r = 1024, i = [
|
|
@@ -1349,7 +1352,7 @@ var Je = /* @__PURE__ */ n({
|
|
|
1349
1352
|
2
|
|
1350
1353
|
], o = e, s = 0;
|
|
1351
1354
|
for (; o >= r && s < i.length - 1;) o /= r, s++;
|
|
1352
|
-
return `${
|
|
1355
|
+
return `${G.default.round(o, a[s])} ${i[s]}`;
|
|
1353
1356
|
}, Qe = (e) => {
|
|
1354
1357
|
let { sizeInBytes: t, allowEmpty: n = !1, defaultUnit: r = "B" } = e;
|
|
1355
1358
|
if (!t) return n ? "" : 0;
|
|
@@ -1367,7 +1370,7 @@ var Je = /* @__PURE__ */ n({
|
|
|
1367
1370
|
2
|
|
1368
1371
|
], s = t, c = a.indexOf(r);
|
|
1369
1372
|
for (; s >= i && c < a.length - 1;) s /= i, c++;
|
|
1370
|
-
return `${
|
|
1373
|
+
return `${G.default.round(s, o[c])} ${a[c]}`;
|
|
1371
1374
|
}, $e = () => {
|
|
1372
1375
|
let e = navigator.userAgent;
|
|
1373
1376
|
return {
|
|
@@ -1431,7 +1434,7 @@ var lt = (e, t) => {
|
|
|
1431
1434
|
return null;
|
|
1432
1435
|
}
|
|
1433
1436
|
}, ut = () => window.navigator.onLine, dt = ({ color: e, alpha1: t, alpha2: n }) => {
|
|
1434
|
-
let r =
|
|
1437
|
+
let r = D(e), i = t || r.getAlpha(), a = n || r.getAlpha();
|
|
1435
1438
|
return [r.setAlpha(i).toRgbString(), r.setAlpha(a).toRgbString()];
|
|
1436
1439
|
}, ft = (e) => {
|
|
1437
1440
|
if (!e || !e.trim()) return [];
|
|
@@ -1452,4 +1455,4 @@ var lt = (e, t) => {
|
|
|
1452
1455
|
return n;
|
|
1453
1456
|
};
|
|
1454
1457
|
//#endregion
|
|
1455
|
-
export {
|
|
1458
|
+
export { W as A, Ke as C, Ve as D, J as E, We as O, X as S, q as T, $e as _, $ as a, qe as b, dt as c, ot as d, Ye as f, ft as g, nt as h, it as i, T as j, He as k, st as l, ut as m, Q as n, tt as o, Xe as p, Qe as r, et as s, lt as t, Ze as u, rt as v, Y as w, Ge as x, Je as y };
|