icms-api 0.0.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/LICENSE +21 -0
- package/dist/icms-api.cjs.js +13 -0
- package/dist/icms-api.cjs.js.map +1 -0
- package/dist/icms-api.es.js +2899 -0
- package/dist/icms-api.es.js.map +1 -0
- package/dist/icms-api.umd.js +13 -0
- package/dist/icms-api.umd.js.map +1 -0
- package/dist/types/client.d.ts +4 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/router.d.ts +6 -0
- package/dist/types/server.d.ts +129 -0
- package/dist/types/types/cms-base.d.ts +150 -0
- package/dist/types/types/cms-message.d.ts +53 -0
- package/dist/types/types/cms-news.d.ts +14 -0
- package/dist/types/types/cms-product.d.ts +29 -0
- package/dist/types/types/cms.d.ts +3 -0
- package/dist/types/types/site.d.ts +293 -0
- package/package.json +59 -0
|
@@ -0,0 +1,2899 @@
|
|
|
1
|
+
import Yt from "pino";
|
|
2
|
+
import $t from "pino-pretty";
|
|
3
|
+
import Jt from "js-md5";
|
|
4
|
+
import ne from "crypto-js";
|
|
5
|
+
import "h3";
|
|
6
|
+
var or = {
|
|
7
|
+
TYPE_MGT: 0,
|
|
8
|
+
TYPE_C: 1,
|
|
9
|
+
TYPE_B: 2
|
|
10
|
+
}, ir = $t({
|
|
11
|
+
colorize: !0,
|
|
12
|
+
destination: process.stdout,
|
|
13
|
+
translateTime: "SYS:yyyy-mm-dd HH:MM:ss",
|
|
14
|
+
ignore: "pid,hostname",
|
|
15
|
+
messageFormat: "{msg}",
|
|
16
|
+
singleLine: !0
|
|
17
|
+
}), L = Yt({
|
|
18
|
+
name: process.env.APP_NAME ?? "iBoot",
|
|
19
|
+
level: process.env.APP_ENV === "production" ? "info" : "debug",
|
|
20
|
+
nestedKey: "payload"
|
|
21
|
+
}, ir), ct = (e) => Array.isArray(e) || typeof e == "object" && Object.prototype.toString.call(e) === "[object Array]", lt = (e) => {
|
|
22
|
+
let t = e || 32, n = "";
|
|
23
|
+
for (let e = 0; e < t; e++) n += "ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678".charAt(Math.floor(Math.random() * 48));
|
|
24
|
+
return n;
|
|
25
|
+
}, tt = (e, t) => {
|
|
26
|
+
let n = {};
|
|
27
|
+
return e.split("&").forEach((e) => {
|
|
28
|
+
let r = e.split("=");
|
|
29
|
+
r[1] && (!t || t.indexOf(r[0]) == -1) && (n[r[0]] = r[1]);
|
|
30
|
+
}), n;
|
|
31
|
+
}, we = (e) => !e || e == "" || e.length == 0 ? "" : encodeURIComponent(e).replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\'/g, "%27").replace(/\!/g, "%21").replace(/\~/g, "%7E"), Ee = { exports: {} }, Te = {}, Ie = {}, Ae = {}, dt;
|
|
32
|
+
function sr() {
|
|
33
|
+
return dt || (dt = 1, (function(e) {
|
|
34
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "detectDomainLocale", {
|
|
35
|
+
enumerable: !0,
|
|
36
|
+
get: function() {
|
|
37
|
+
return t;
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
function t(e, t, n) {
|
|
41
|
+
if (e) {
|
|
42
|
+
n &&= n.toLowerCase();
|
|
43
|
+
for (let i of e) {
|
|
44
|
+
var r;
|
|
45
|
+
if (t === i.domain?.split(":", 1)[0].toLowerCase() || n === i.defaultLocale.toLowerCase() || (r = i.locales) != null && r.some((e) => e.toLowerCase() === n)) return i;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
})(Ae)), Ae;
|
|
50
|
+
}
|
|
51
|
+
var Oe = {}, xe = {}, ft;
|
|
52
|
+
function ar() {
|
|
53
|
+
return ft || (ft = 1, (function(e) {
|
|
54
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removeTrailingSlash", {
|
|
55
|
+
enumerable: !0,
|
|
56
|
+
get: function() {
|
|
57
|
+
return t;
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
function t(e) {
|
|
61
|
+
return e.replace(/\/$/, "") || "/";
|
|
62
|
+
}
|
|
63
|
+
})(xe)), xe;
|
|
64
|
+
}
|
|
65
|
+
var Ne = {}, Ce = {}, ht;
|
|
66
|
+
function rt() {
|
|
67
|
+
return ht || (ht = 1, (function(e) {
|
|
68
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "parsePath", {
|
|
69
|
+
enumerable: !0,
|
|
70
|
+
get: function() {
|
|
71
|
+
return t;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
function t(e) {
|
|
75
|
+
let t = e.indexOf("#"), n = e.indexOf("?"), r = n > -1 && (t < 0 || n < t);
|
|
76
|
+
return r || t > -1 ? {
|
|
77
|
+
pathname: e.substring(0, r ? n : t),
|
|
78
|
+
query: r ? e.substring(n, t > -1 ? t : void 0) : "",
|
|
79
|
+
hash: t > -1 ? e.slice(t) : ""
|
|
80
|
+
} : {
|
|
81
|
+
pathname: e,
|
|
82
|
+
query: "",
|
|
83
|
+
hash: ""
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
})(Ce)), Ce;
|
|
87
|
+
}
|
|
88
|
+
var pt;
|
|
89
|
+
function Ht() {
|
|
90
|
+
return pt || (pt = 1, (function(e) {
|
|
91
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathPrefix", {
|
|
92
|
+
enumerable: !0,
|
|
93
|
+
get: function() {
|
|
94
|
+
return n;
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
let t = rt();
|
|
98
|
+
function n(e, n) {
|
|
99
|
+
if (!e.startsWith("/") || !n) return e;
|
|
100
|
+
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
101
|
+
return "" + n + r + i + a;
|
|
102
|
+
}
|
|
103
|
+
})(Ne)), Ne;
|
|
104
|
+
}
|
|
105
|
+
var Le = {}, mt;
|
|
106
|
+
function ur() {
|
|
107
|
+
return mt || (mt = 1, (function(e) {
|
|
108
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addPathSuffix", {
|
|
109
|
+
enumerable: !0,
|
|
110
|
+
get: function() {
|
|
111
|
+
return n;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
114
|
+
let t = rt();
|
|
115
|
+
function n(e, n) {
|
|
116
|
+
if (!e.startsWith("/") || !n) return e;
|
|
117
|
+
let { pathname: r, query: i, hash: a } = (0, t.parsePath)(e);
|
|
118
|
+
return "" + r + n + i + a;
|
|
119
|
+
}
|
|
120
|
+
})(Le)), Le;
|
|
121
|
+
}
|
|
122
|
+
var ke = {}, Ue = {}, _t;
|
|
123
|
+
function nt() {
|
|
124
|
+
return _t || (_t = 1, (function(e) {
|
|
125
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "pathHasPrefix", {
|
|
126
|
+
enumerable: !0,
|
|
127
|
+
get: function() {
|
|
128
|
+
return n;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
let t = rt();
|
|
132
|
+
function n(e, n) {
|
|
133
|
+
if (typeof e != "string") return !1;
|
|
134
|
+
let { pathname: r } = (0, t.parsePath)(e);
|
|
135
|
+
return r === n || r.startsWith(n + "/");
|
|
136
|
+
}
|
|
137
|
+
})(Ue)), Ue;
|
|
138
|
+
}
|
|
139
|
+
var bt;
|
|
140
|
+
function cr() {
|
|
141
|
+
return bt || (bt = 1, (function(e) {
|
|
142
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "addLocale", {
|
|
143
|
+
enumerable: !0,
|
|
144
|
+
get: function() {
|
|
145
|
+
return r;
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
let t = Ht(), n = nt();
|
|
149
|
+
function r(e, r, i, a) {
|
|
150
|
+
if (!r || r === i) return e;
|
|
151
|
+
let o = e.toLowerCase();
|
|
152
|
+
return !a && ((0, n.pathHasPrefix)(o, "/api") || (0, n.pathHasPrefix)(o, "/" + r.toLowerCase())) ? e : (0, t.addPathPrefix)(e, "/" + r);
|
|
153
|
+
}
|
|
154
|
+
})(ke)), ke;
|
|
155
|
+
}
|
|
156
|
+
var gt;
|
|
157
|
+
function lr() {
|
|
158
|
+
return gt || (gt = 1, (function(e) {
|
|
159
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "formatNextPathnameInfo", {
|
|
160
|
+
enumerable: !0,
|
|
161
|
+
get: function() {
|
|
162
|
+
return a;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
let t = ar(), n = Ht(), r = ur(), i = cr();
|
|
166
|
+
function a(e) {
|
|
167
|
+
let a = (0, i.addLocale)(e.pathname, e.locale, e.buildId ? void 0 : e.defaultLocale, e.ignorePrefix);
|
|
168
|
+
return (e.buildId || !e.trailingSlash) && (a = (0, t.removeTrailingSlash)(a)), e.buildId && (a = (0, r.addPathSuffix)((0, n.addPathPrefix)(a, "/_next/data/" + e.buildId), e.pathname === "/" ? "index.json" : ".json")), a = (0, n.addPathPrefix)(a, e.basePath), !e.buildId && e.trailingSlash ? a.endsWith("/") ? a : (0, r.addPathSuffix)(a, "/") : (0, t.removeTrailingSlash)(a);
|
|
169
|
+
}
|
|
170
|
+
})(Oe)), Oe;
|
|
171
|
+
}
|
|
172
|
+
var De = {}, wt;
|
|
173
|
+
function dr() {
|
|
174
|
+
return wt || (wt = 1, (function(e) {
|
|
175
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getHostname", {
|
|
176
|
+
enumerable: !0,
|
|
177
|
+
get: function() {
|
|
178
|
+
return t;
|
|
179
|
+
}
|
|
180
|
+
});
|
|
181
|
+
function t(e, t) {
|
|
182
|
+
let n;
|
|
183
|
+
if (t?.host && !Array.isArray(t.host)) n = t.host.toString().split(":", 1)[0];
|
|
184
|
+
else if (e.hostname) n = e.hostname;
|
|
185
|
+
else return;
|
|
186
|
+
return n.toLowerCase();
|
|
187
|
+
}
|
|
188
|
+
})(De)), De;
|
|
189
|
+
}
|
|
190
|
+
var Me = {}, je = {}, Et;
|
|
191
|
+
function fr() {
|
|
192
|
+
return Et || (Et = 1, (function(e) {
|
|
193
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "normalizeLocalePath", {
|
|
194
|
+
enumerable: !0,
|
|
195
|
+
get: function() {
|
|
196
|
+
return t;
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
function t(e, t) {
|
|
200
|
+
let n, r = e.split("/");
|
|
201
|
+
return (t || []).some((t) => r[1] && r[1].toLowerCase() === t.toLowerCase() ? (n = t, r.splice(1, 1), e = r.join("/") || "/", !0) : !1), {
|
|
202
|
+
pathname: e,
|
|
203
|
+
detectedLocale: n
|
|
204
|
+
};
|
|
205
|
+
}
|
|
206
|
+
})(je)), je;
|
|
207
|
+
}
|
|
208
|
+
var qe = {}, vt;
|
|
209
|
+
function hr() {
|
|
210
|
+
return vt || (vt = 1, (function(e) {
|
|
211
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "removePathPrefix", {
|
|
212
|
+
enumerable: !0,
|
|
213
|
+
get: function() {
|
|
214
|
+
return n;
|
|
215
|
+
}
|
|
216
|
+
});
|
|
217
|
+
let t = nt();
|
|
218
|
+
function n(e, n) {
|
|
219
|
+
if (!(0, t.pathHasPrefix)(e, n)) return e;
|
|
220
|
+
let r = e.slice(n.length);
|
|
221
|
+
return r.startsWith("/") ? r : "/" + r;
|
|
222
|
+
}
|
|
223
|
+
})(qe)), qe;
|
|
224
|
+
}
|
|
225
|
+
var Rt;
|
|
226
|
+
function pr() {
|
|
227
|
+
return Rt || (Rt = 1, (function(e) {
|
|
228
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "getNextPathnameInfo", {
|
|
229
|
+
enumerable: !0,
|
|
230
|
+
get: function() {
|
|
231
|
+
return i;
|
|
232
|
+
}
|
|
233
|
+
});
|
|
234
|
+
let t = fr(), n = hr(), r = nt();
|
|
235
|
+
function i(e, i) {
|
|
236
|
+
let { basePath: a, i18n: o, trailingSlash: s } = i.nextConfig ?? {}, c = {
|
|
237
|
+
pathname: e,
|
|
238
|
+
trailingSlash: e === "/" ? s : e.endsWith("/")
|
|
239
|
+
};
|
|
240
|
+
a && (0, r.pathHasPrefix)(c.pathname, a) && (c.pathname = (0, n.removePathPrefix)(c.pathname, a), c.basePath = a);
|
|
241
|
+
let l = c.pathname;
|
|
242
|
+
if (c.pathname.startsWith("/_next/data/") && c.pathname.endsWith(".json")) {
|
|
243
|
+
let e = c.pathname.replace(/^\/_next\/data\//, "").replace(/\.json$/, "").split("/");
|
|
244
|
+
c.buildId = e[0], l = e[1] === "index" ? "/" : "/" + e.slice(1).join("/"), i.parseData === !0 && (c.pathname = l);
|
|
245
|
+
}
|
|
246
|
+
if (o) {
|
|
247
|
+
let e = i.i18nProvider ? i.i18nProvider.analyze(c.pathname) : (0, t.normalizeLocalePath)(c.pathname, o.locales);
|
|
248
|
+
c.locale = e.detectedLocale, c.pathname = e.pathname ?? c.pathname, !e.detectedLocale && c.buildId && (e = i.i18nProvider ? i.i18nProvider.analyze(l) : (0, t.normalizeLocalePath)(l, o.locales), e.detectedLocale && (c.locale = e.detectedLocale));
|
|
249
|
+
}
|
|
250
|
+
return c;
|
|
251
|
+
}
|
|
252
|
+
})(Me)), Me;
|
|
253
|
+
}
|
|
254
|
+
var Pt;
|
|
255
|
+
function Ft() {
|
|
256
|
+
return Pt || (Pt = 1, (function(e) {
|
|
257
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextURL", {
|
|
258
|
+
enumerable: !0,
|
|
259
|
+
get: function() {
|
|
260
|
+
return c;
|
|
261
|
+
}
|
|
262
|
+
});
|
|
263
|
+
let t = sr(), n = lr(), r = dr(), i = pr(), a = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
|
|
264
|
+
function o(e, t) {
|
|
265
|
+
return new URL(String(e).replace(a, "localhost"), t && String(t).replace(a, "localhost"));
|
|
266
|
+
}
|
|
267
|
+
let s = /* @__PURE__ */ Symbol("NextURLInternal");
|
|
268
|
+
class c {
|
|
269
|
+
constructor(e, t, n) {
|
|
270
|
+
let r, i;
|
|
271
|
+
typeof t == "object" && "pathname" in t || typeof t == "string" ? (r = t, i = n || {}) : i = n || t || {}, this[s] = {
|
|
272
|
+
url: o(e, r ?? i.base),
|
|
273
|
+
options: i,
|
|
274
|
+
basePath: ""
|
|
275
|
+
}, this.analyze();
|
|
276
|
+
}
|
|
277
|
+
analyze() {
|
|
278
|
+
var e, n, a, o;
|
|
279
|
+
let c = (0, i.getNextPathnameInfo)(this[s].url.pathname, {
|
|
280
|
+
nextConfig: this[s].options.nextConfig,
|
|
281
|
+
parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,
|
|
282
|
+
i18nProvider: this[s].options.i18nProvider
|
|
283
|
+
}), l = (0, r.getHostname)(this[s].url, this[s].options.headers);
|
|
284
|
+
this[s].domainLocale = this[s].options.i18nProvider ? this[s].options.i18nProvider.detectDomainLocale(l) : (0, t.detectDomainLocale)((n = this[s].options.nextConfig) == null || (e = n.i18n) == null ? void 0 : e.domains, l);
|
|
285
|
+
let u = this[s].domainLocale?.defaultLocale || ((o = this[s].options.nextConfig) == null || (a = o.i18n) == null ? void 0 : a.defaultLocale);
|
|
286
|
+
this[s].url.pathname = c.pathname, this[s].defaultLocale = u, this[s].basePath = c.basePath ?? "", this[s].buildId = c.buildId, this[s].locale = c.locale ?? u, this[s].trailingSlash = c.trailingSlash;
|
|
287
|
+
}
|
|
288
|
+
formatPathname() {
|
|
289
|
+
return (0, n.formatNextPathnameInfo)({
|
|
290
|
+
basePath: this[s].basePath,
|
|
291
|
+
buildId: this[s].buildId,
|
|
292
|
+
defaultLocale: this[s].options.forceLocale ? void 0 : this[s].defaultLocale,
|
|
293
|
+
locale: this[s].locale,
|
|
294
|
+
pathname: this[s].url.pathname,
|
|
295
|
+
trailingSlash: this[s].trailingSlash
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
formatSearch() {
|
|
299
|
+
return this[s].url.search;
|
|
300
|
+
}
|
|
301
|
+
get buildId() {
|
|
302
|
+
return this[s].buildId;
|
|
303
|
+
}
|
|
304
|
+
set buildId(e) {
|
|
305
|
+
this[s].buildId = e;
|
|
306
|
+
}
|
|
307
|
+
get locale() {
|
|
308
|
+
return this[s].locale ?? "";
|
|
309
|
+
}
|
|
310
|
+
set locale(e) {
|
|
311
|
+
var t, n;
|
|
312
|
+
if (!this[s].locale || !(!((n = this[s].options.nextConfig) == null || (t = n.i18n) == null) && t.locales.includes(e))) throw TypeError(`The NextURL configuration includes no locale "${e}"`);
|
|
313
|
+
this[s].locale = e;
|
|
314
|
+
}
|
|
315
|
+
get defaultLocale() {
|
|
316
|
+
return this[s].defaultLocale;
|
|
317
|
+
}
|
|
318
|
+
get domainLocale() {
|
|
319
|
+
return this[s].domainLocale;
|
|
320
|
+
}
|
|
321
|
+
get searchParams() {
|
|
322
|
+
return this[s].url.searchParams;
|
|
323
|
+
}
|
|
324
|
+
get host() {
|
|
325
|
+
return this[s].url.host;
|
|
326
|
+
}
|
|
327
|
+
set host(e) {
|
|
328
|
+
this[s].url.host = e;
|
|
329
|
+
}
|
|
330
|
+
get hostname() {
|
|
331
|
+
return this[s].url.hostname;
|
|
332
|
+
}
|
|
333
|
+
set hostname(e) {
|
|
334
|
+
this[s].url.hostname = e;
|
|
335
|
+
}
|
|
336
|
+
get port() {
|
|
337
|
+
return this[s].url.port;
|
|
338
|
+
}
|
|
339
|
+
set port(e) {
|
|
340
|
+
this[s].url.port = e;
|
|
341
|
+
}
|
|
342
|
+
get protocol() {
|
|
343
|
+
return this[s].url.protocol;
|
|
344
|
+
}
|
|
345
|
+
set protocol(e) {
|
|
346
|
+
this[s].url.protocol = e;
|
|
347
|
+
}
|
|
348
|
+
get href() {
|
|
349
|
+
let e = this.formatPathname(), t = this.formatSearch();
|
|
350
|
+
return `${this.protocol}//${this.host}${e}${t}${this.hash}`;
|
|
351
|
+
}
|
|
352
|
+
set href(e) {
|
|
353
|
+
this[s].url = o(e), this.analyze();
|
|
354
|
+
}
|
|
355
|
+
get origin() {
|
|
356
|
+
return this[s].url.origin;
|
|
357
|
+
}
|
|
358
|
+
get pathname() {
|
|
359
|
+
return this[s].url.pathname;
|
|
360
|
+
}
|
|
361
|
+
set pathname(e) {
|
|
362
|
+
this[s].url.pathname = e;
|
|
363
|
+
}
|
|
364
|
+
get hash() {
|
|
365
|
+
return this[s].url.hash;
|
|
366
|
+
}
|
|
367
|
+
set hash(e) {
|
|
368
|
+
this[s].url.hash = e;
|
|
369
|
+
}
|
|
370
|
+
get search() {
|
|
371
|
+
return this[s].url.search;
|
|
372
|
+
}
|
|
373
|
+
set search(e) {
|
|
374
|
+
this[s].url.search = e;
|
|
375
|
+
}
|
|
376
|
+
get password() {
|
|
377
|
+
return this[s].url.password;
|
|
378
|
+
}
|
|
379
|
+
set password(e) {
|
|
380
|
+
this[s].url.password = e;
|
|
381
|
+
}
|
|
382
|
+
get username() {
|
|
383
|
+
return this[s].url.username;
|
|
384
|
+
}
|
|
385
|
+
set username(e) {
|
|
386
|
+
this[s].url.username = e;
|
|
387
|
+
}
|
|
388
|
+
get basePath() {
|
|
389
|
+
return this[s].basePath;
|
|
390
|
+
}
|
|
391
|
+
set basePath(e) {
|
|
392
|
+
this[s].basePath = e.startsWith("/") ? e : `/${e}`;
|
|
393
|
+
}
|
|
394
|
+
toString() {
|
|
395
|
+
return this.href;
|
|
396
|
+
}
|
|
397
|
+
toJSON() {
|
|
398
|
+
return this.href;
|
|
399
|
+
}
|
|
400
|
+
[/* @__PURE__ */ Symbol.for("edge-runtime.inspect.custom")]() {
|
|
401
|
+
return {
|
|
402
|
+
href: this.href,
|
|
403
|
+
origin: this.origin,
|
|
404
|
+
protocol: this.protocol,
|
|
405
|
+
username: this.username,
|
|
406
|
+
password: this.password,
|
|
407
|
+
host: this.host,
|
|
408
|
+
hostname: this.hostname,
|
|
409
|
+
port: this.port,
|
|
410
|
+
pathname: this.pathname,
|
|
411
|
+
search: this.search,
|
|
412
|
+
searchParams: this.searchParams,
|
|
413
|
+
hash: this.hash
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
clone() {
|
|
417
|
+
return new c(String(this), this[s].options);
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
})(Ie)), Ie;
|
|
421
|
+
}
|
|
422
|
+
var He = {}, Fe = {}, yt;
|
|
423
|
+
function mr() {
|
|
424
|
+
return yt || (yt = 1, (function(e) {
|
|
425
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
426
|
+
function t(e, t) {
|
|
427
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
428
|
+
enumerable: !0,
|
|
429
|
+
get: t[n]
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
t(e, {
|
|
433
|
+
ACTION_SUFFIX: function() {
|
|
434
|
+
return c;
|
|
435
|
+
},
|
|
436
|
+
APP_DIR_ALIAS: function() {
|
|
437
|
+
return D;
|
|
438
|
+
},
|
|
439
|
+
CACHE_ONE_YEAR: function() {
|
|
440
|
+
return b;
|
|
441
|
+
},
|
|
442
|
+
DOT_NEXT_ALIAS: function() {
|
|
443
|
+
return T;
|
|
444
|
+
},
|
|
445
|
+
ESLINT_DEFAULT_DIRS: function() {
|
|
446
|
+
return vn;
|
|
447
|
+
},
|
|
448
|
+
GSP_NO_RETURNED_VALUE: function() {
|
|
449
|
+
return B;
|
|
450
|
+
},
|
|
451
|
+
GSSP_COMPONENT_MEMBER_ERROR: function() {
|
|
452
|
+
return H;
|
|
453
|
+
},
|
|
454
|
+
GSSP_NO_RETURNED_VALUE: function() {
|
|
455
|
+
return gn;
|
|
456
|
+
},
|
|
457
|
+
INSTRUMENTATION_HOOK_FILENAME: function() {
|
|
458
|
+
return C;
|
|
459
|
+
},
|
|
460
|
+
MIDDLEWARE_FILENAME: function() {
|
|
461
|
+
return x;
|
|
462
|
+
},
|
|
463
|
+
MIDDLEWARE_LOCATION_REGEXP: function() {
|
|
464
|
+
return S;
|
|
465
|
+
},
|
|
466
|
+
NEXT_BODY_SUFFIX: function() {
|
|
467
|
+
return d;
|
|
468
|
+
},
|
|
469
|
+
NEXT_CACHE_IMPLICIT_TAG_ID: function() {
|
|
470
|
+
return y;
|
|
471
|
+
},
|
|
472
|
+
NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
|
|
473
|
+
return m;
|
|
474
|
+
},
|
|
475
|
+
NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
|
|
476
|
+
return h;
|
|
477
|
+
},
|
|
478
|
+
NEXT_CACHE_SOFT_TAGS_HEADER: function() {
|
|
479
|
+
return p;
|
|
480
|
+
},
|
|
481
|
+
NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
|
|
482
|
+
return v;
|
|
483
|
+
},
|
|
484
|
+
NEXT_CACHE_TAGS_HEADER: function() {
|
|
485
|
+
return f;
|
|
486
|
+
},
|
|
487
|
+
NEXT_CACHE_TAG_MAX_ITEMS: function() {
|
|
488
|
+
return g;
|
|
489
|
+
},
|
|
490
|
+
NEXT_CACHE_TAG_MAX_LENGTH: function() {
|
|
491
|
+
return _;
|
|
492
|
+
},
|
|
493
|
+
NEXT_DATA_SUFFIX: function() {
|
|
494
|
+
return l;
|
|
495
|
+
},
|
|
496
|
+
NEXT_INTERCEPTION_MARKER_PREFIX: function() {
|
|
497
|
+
return r;
|
|
498
|
+
},
|
|
499
|
+
NEXT_META_SUFFIX: function() {
|
|
500
|
+
return u;
|
|
501
|
+
},
|
|
502
|
+
NEXT_QUERY_PARAM_PREFIX: function() {
|
|
503
|
+
return n;
|
|
504
|
+
},
|
|
505
|
+
NON_STANDARD_NODE_ENV: function() {
|
|
506
|
+
return G;
|
|
507
|
+
},
|
|
508
|
+
PAGES_DIR_ALIAS: function() {
|
|
509
|
+
return w;
|
|
510
|
+
},
|
|
511
|
+
PRERENDER_REVALIDATE_HEADER: function() {
|
|
512
|
+
return i;
|
|
513
|
+
},
|
|
514
|
+
PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
|
|
515
|
+
return a;
|
|
516
|
+
},
|
|
517
|
+
PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
|
|
518
|
+
return N;
|
|
519
|
+
},
|
|
520
|
+
ROOT_DIR_ALIAS: function() {
|
|
521
|
+
return E;
|
|
522
|
+
},
|
|
523
|
+
RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
|
|
524
|
+
return j;
|
|
525
|
+
},
|
|
526
|
+
RSC_ACTION_ENCRYPTION_ALIAS: function() {
|
|
527
|
+
return hn;
|
|
528
|
+
},
|
|
529
|
+
RSC_ACTION_PROXY_ALIAS: function() {
|
|
530
|
+
return A;
|
|
531
|
+
},
|
|
532
|
+
RSC_ACTION_VALIDATE_ALIAS: function() {
|
|
533
|
+
return k;
|
|
534
|
+
},
|
|
535
|
+
RSC_MOD_REF_PROXY_ALIAS: function() {
|
|
536
|
+
return O;
|
|
537
|
+
},
|
|
538
|
+
RSC_PREFETCH_SUFFIX: function() {
|
|
539
|
+
return o;
|
|
540
|
+
},
|
|
541
|
+
RSC_SUFFIX: function() {
|
|
542
|
+
return s;
|
|
543
|
+
},
|
|
544
|
+
SERVER_PROPS_EXPORT_ERROR: function() {
|
|
545
|
+
return z;
|
|
546
|
+
},
|
|
547
|
+
SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
|
|
548
|
+
return F;
|
|
549
|
+
},
|
|
550
|
+
SERVER_PROPS_SSG_CONFLICT: function() {
|
|
551
|
+
return I;
|
|
552
|
+
},
|
|
553
|
+
SERVER_RUNTIME: function() {
|
|
554
|
+
return yn;
|
|
555
|
+
},
|
|
556
|
+
SSG_FALLBACK_EXPORT_ERROR: function() {
|
|
557
|
+
return _n;
|
|
558
|
+
},
|
|
559
|
+
SSG_GET_INITIAL_PROPS_CONFLICT: function() {
|
|
560
|
+
return P;
|
|
561
|
+
},
|
|
562
|
+
STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
|
|
563
|
+
return R;
|
|
564
|
+
},
|
|
565
|
+
UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
|
|
566
|
+
return V;
|
|
567
|
+
},
|
|
568
|
+
WEBPACK_LAYERS: function() {
|
|
569
|
+
return q;
|
|
570
|
+
},
|
|
571
|
+
WEBPACK_RESOURCE_QUERIES: function() {
|
|
572
|
+
return bn;
|
|
573
|
+
}
|
|
574
|
+
});
|
|
575
|
+
let n = "nxtP", r = "nxtI", i = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", o = ".prefetch.rsc", s = ".rsc", c = ".action", l = ".json", u = ".meta", d = ".body", f = "x-next-cache-tags", p = "x-next-cache-soft-tags", m = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", g = 128, _ = 256, v = 1024, y = "_N_T_", b = 31536e3, x = "middleware", S = `(?:src/)?${x}`, C = "instrumentation", w = "private-next-pages", T = "private-dot-next", E = "private-next-root-dir", D = "private-next-app-dir", O = "private-next-rsc-mod-ref-proxy", k = "private-next-rsc-action-validate", A = "private-next-rsc-server-reference", hn = "private-next-rsc-action-encryption", j = "private-next-rsc-action-client-wrapper", N = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", P = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", F = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", I = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", R = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", z = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", B = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", gn = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", V = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", H = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", G = "You are using a non-standard \"NODE_ENV\" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env", _n = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", vn = [
|
|
576
|
+
"app",
|
|
577
|
+
"pages",
|
|
578
|
+
"components",
|
|
579
|
+
"lib",
|
|
580
|
+
"src"
|
|
581
|
+
], yn = {
|
|
582
|
+
edge: "edge",
|
|
583
|
+
experimentalEdge: "experimental-edge",
|
|
584
|
+
nodejs: "nodejs"
|
|
585
|
+
}, K = {
|
|
586
|
+
shared: "shared",
|
|
587
|
+
reactServerComponents: "rsc",
|
|
588
|
+
serverSideRendering: "ssr",
|
|
589
|
+
actionBrowser: "action-browser",
|
|
590
|
+
api: "api",
|
|
591
|
+
middleware: "middleware",
|
|
592
|
+
instrument: "instrument",
|
|
593
|
+
edgeAsset: "edge-asset",
|
|
594
|
+
appPagesBrowser: "app-pages-browser",
|
|
595
|
+
appMetadataRoute: "app-metadata-route",
|
|
596
|
+
appRouteHandler: "app-route-handler"
|
|
597
|
+
}, q = {
|
|
598
|
+
...K,
|
|
599
|
+
GROUP: {
|
|
600
|
+
serverOnly: [
|
|
601
|
+
K.reactServerComponents,
|
|
602
|
+
K.actionBrowser,
|
|
603
|
+
K.appMetadataRoute,
|
|
604
|
+
K.appRouteHandler,
|
|
605
|
+
K.instrument
|
|
606
|
+
],
|
|
607
|
+
clientOnly: [K.serverSideRendering, K.appPagesBrowser],
|
|
608
|
+
nonClientServerTarget: [K.middleware, K.api],
|
|
609
|
+
app: [
|
|
610
|
+
K.reactServerComponents,
|
|
611
|
+
K.actionBrowser,
|
|
612
|
+
K.appMetadataRoute,
|
|
613
|
+
K.appRouteHandler,
|
|
614
|
+
K.serverSideRendering,
|
|
615
|
+
K.appPagesBrowser,
|
|
616
|
+
K.shared,
|
|
617
|
+
K.instrument
|
|
618
|
+
]
|
|
619
|
+
}
|
|
620
|
+
}, bn = {
|
|
621
|
+
edgeSSREntry: "__next_edge_ssr_entry__",
|
|
622
|
+
metadata: "__next_metadata__",
|
|
623
|
+
metadataRoute: "__next_metadata_route__",
|
|
624
|
+
metadataImageMeta: "__next_metadata_image_meta__"
|
|
625
|
+
};
|
|
626
|
+
})(Fe)), Fe;
|
|
627
|
+
}
|
|
628
|
+
var St;
|
|
629
|
+
function Bt() {
|
|
630
|
+
return St || (St = 1, (function(e) {
|
|
631
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
632
|
+
function t(e, t) {
|
|
633
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
634
|
+
enumerable: !0,
|
|
635
|
+
get: t[n]
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
t(e, {
|
|
639
|
+
fromNodeOutgoingHttpHeaders: function() {
|
|
640
|
+
return r;
|
|
641
|
+
},
|
|
642
|
+
normalizeNextQueryParam: function() {
|
|
643
|
+
return s;
|
|
644
|
+
},
|
|
645
|
+
splitCookiesString: function() {
|
|
646
|
+
return i;
|
|
647
|
+
},
|
|
648
|
+
toNodeOutgoingHttpHeaders: function() {
|
|
649
|
+
return a;
|
|
650
|
+
},
|
|
651
|
+
validateURL: function() {
|
|
652
|
+
return o;
|
|
653
|
+
}
|
|
654
|
+
});
|
|
655
|
+
let n = mr();
|
|
656
|
+
function r(e) {
|
|
657
|
+
let t = new Headers();
|
|
658
|
+
for (let [n, r] of Object.entries(e)) {
|
|
659
|
+
let e = Array.isArray(r) ? r : [r];
|
|
660
|
+
for (let r of e) typeof r > "u" || (typeof r == "number" && (r = r.toString()), t.append(n, r));
|
|
661
|
+
}
|
|
662
|
+
return t;
|
|
663
|
+
}
|
|
664
|
+
function i(e) {
|
|
665
|
+
var t = [], n = 0, r, i, a, o, s;
|
|
666
|
+
function c() {
|
|
667
|
+
for (; n < e.length && /\s/.test(e.charAt(n));) n += 1;
|
|
668
|
+
return n < e.length;
|
|
669
|
+
}
|
|
670
|
+
function l() {
|
|
671
|
+
return i = e.charAt(n), i !== "=" && i !== ";" && i !== ",";
|
|
672
|
+
}
|
|
673
|
+
for (; n < e.length;) {
|
|
674
|
+
for (r = n, s = !1; c();) if (i = e.charAt(n), i === ",") {
|
|
675
|
+
for (a = n, n += 1, c(), o = n; n < e.length && l();) n += 1;
|
|
676
|
+
n < e.length && e.charAt(n) === "=" ? (s = !0, n = o, t.push(e.substring(r, a)), r = n) : n = a + 1;
|
|
677
|
+
} else n += 1;
|
|
678
|
+
(!s || n >= e.length) && t.push(e.substring(r, e.length));
|
|
679
|
+
}
|
|
680
|
+
return t;
|
|
681
|
+
}
|
|
682
|
+
function a(e) {
|
|
683
|
+
let t = {}, n = [];
|
|
684
|
+
if (e) for (let [r, a] of e.entries()) r.toLowerCase() === "set-cookie" ? (n.push(...i(a)), t[r] = n.length === 1 ? n[0] : n) : t[r] = a;
|
|
685
|
+
return t;
|
|
686
|
+
}
|
|
687
|
+
function o(e) {
|
|
688
|
+
try {
|
|
689
|
+
return String(new URL(String(e)));
|
|
690
|
+
} catch (t) {
|
|
691
|
+
throw Error(`URL is malformed "${String(e)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, { cause: t });
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
function s(e, t) {
|
|
695
|
+
let r = [n.NEXT_QUERY_PARAM_PREFIX, n.NEXT_INTERCEPTION_MARKER_PREFIX];
|
|
696
|
+
for (let n of r) e !== n && e.startsWith(n) && t(e.substring(n.length));
|
|
697
|
+
}
|
|
698
|
+
})(He)), He;
|
|
699
|
+
}
|
|
700
|
+
var Be = {}, Tt;
|
|
701
|
+
function _r() {
|
|
702
|
+
return Tt || (Tt = 1, (function(e) {
|
|
703
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
704
|
+
function t(e, t) {
|
|
705
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
706
|
+
enumerable: !0,
|
|
707
|
+
get: t[n]
|
|
708
|
+
});
|
|
709
|
+
}
|
|
710
|
+
t(e, {
|
|
711
|
+
PageSignatureError: function() {
|
|
712
|
+
return n;
|
|
713
|
+
},
|
|
714
|
+
RemovedPageError: function() {
|
|
715
|
+
return r;
|
|
716
|
+
},
|
|
717
|
+
RemovedUAError: function() {
|
|
718
|
+
return i;
|
|
719
|
+
}
|
|
720
|
+
});
|
|
721
|
+
class n extends Error {
|
|
722
|
+
constructor({ page: e }) {
|
|
723
|
+
super(`The middleware "${e}" accepts an async API directly with the form:
|
|
724
|
+
|
|
725
|
+
export function middleware(request, event) {
|
|
726
|
+
return NextResponse.redirect('/new-location')
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
Read more: https://nextjs.org/docs/messages/middleware-new-signature
|
|
730
|
+
`);
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
class r extends Error {
|
|
734
|
+
constructor() {
|
|
735
|
+
super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ");
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
class i extends Error {
|
|
739
|
+
constructor() {
|
|
740
|
+
super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ");
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
})(Be)), Be;
|
|
744
|
+
}
|
|
745
|
+
var Ge = {}, Xe, It;
|
|
746
|
+
function br() {
|
|
747
|
+
if (It) return Xe;
|
|
748
|
+
It = 1;
|
|
749
|
+
var e = Object.defineProperty, t = Object.getOwnPropertyDescriptor, n = Object.getOwnPropertyNames, r = Object.prototype.hasOwnProperty, i = (t, n) => {
|
|
750
|
+
for (var r in n) e(t, r, {
|
|
751
|
+
get: n[r],
|
|
752
|
+
enumerable: !0
|
|
753
|
+
});
|
|
754
|
+
}, a = (i, a, o, s) => {
|
|
755
|
+
if (a && typeof a == "object" || typeof a == "function") for (let c of n(a)) !r.call(i, c) && c !== o && e(i, c, {
|
|
756
|
+
get: () => a[c],
|
|
757
|
+
enumerable: !(s = t(a, c)) || s.enumerable
|
|
758
|
+
});
|
|
759
|
+
return i;
|
|
760
|
+
}, o = (t) => a(e({}, "__esModule", { value: !0 }), t), s = {};
|
|
761
|
+
i(s, {
|
|
762
|
+
RequestCookies: () => _,
|
|
763
|
+
ResponseCookies: () => v,
|
|
764
|
+
parseCookie: () => l,
|
|
765
|
+
parseSetCookie: () => u,
|
|
766
|
+
stringifyCookie: () => c
|
|
767
|
+
}), Xe = o(s);
|
|
768
|
+
function c(e) {
|
|
769
|
+
let t = [
|
|
770
|
+
"path" in e && e.path && `Path=${e.path}`,
|
|
771
|
+
"expires" in e && (e.expires || e.expires === 0) && `Expires=${(typeof e.expires == "number" ? new Date(e.expires) : e.expires).toUTCString()}`,
|
|
772
|
+
"maxAge" in e && typeof e.maxAge == "number" && `Max-Age=${e.maxAge}`,
|
|
773
|
+
"domain" in e && e.domain && `Domain=${e.domain}`,
|
|
774
|
+
"secure" in e && e.secure && "Secure",
|
|
775
|
+
"httpOnly" in e && e.httpOnly && "HttpOnly",
|
|
776
|
+
"sameSite" in e && e.sameSite && `SameSite=${e.sameSite}`,
|
|
777
|
+
"partitioned" in e && e.partitioned && "Partitioned",
|
|
778
|
+
"priority" in e && e.priority && `Priority=${e.priority}`
|
|
779
|
+
].filter(Boolean), n = `${e.name}=${encodeURIComponent(e.value ?? "")}`;
|
|
780
|
+
return t.length === 0 ? n : `${n}; ${t.join("; ")}`;
|
|
781
|
+
}
|
|
782
|
+
function l(e) {
|
|
783
|
+
let t = /* @__PURE__ */ new Map();
|
|
784
|
+
for (let n of e.split(/; */)) {
|
|
785
|
+
if (!n) continue;
|
|
786
|
+
let e = n.indexOf("=");
|
|
787
|
+
if (e === -1) {
|
|
788
|
+
t.set(n, "true");
|
|
789
|
+
continue;
|
|
790
|
+
}
|
|
791
|
+
let [r, i] = [n.slice(0, e), n.slice(e + 1)];
|
|
792
|
+
try {
|
|
793
|
+
t.set(r, decodeURIComponent(i ?? "true"));
|
|
794
|
+
} catch {}
|
|
795
|
+
}
|
|
796
|
+
return t;
|
|
797
|
+
}
|
|
798
|
+
function u(e) {
|
|
799
|
+
if (!e) return;
|
|
800
|
+
let [[t, n], ...r] = l(e), { domain: i, expires: a, httponly: o, maxage: s, path: c, samesite: u, secure: f, partitioned: m, priority: g } = Object.fromEntries(r.map(([e, t]) => [e.toLowerCase(), t]));
|
|
801
|
+
return d({
|
|
802
|
+
name: t,
|
|
803
|
+
value: decodeURIComponent(n),
|
|
804
|
+
domain: i,
|
|
805
|
+
...a && { expires: new Date(a) },
|
|
806
|
+
...o && { httpOnly: !0 },
|
|
807
|
+
...typeof s == "string" && { maxAge: Number(s) },
|
|
808
|
+
path: c,
|
|
809
|
+
...u && { sameSite: p(u) },
|
|
810
|
+
...f && { secure: !0 },
|
|
811
|
+
...g && { priority: h(g) },
|
|
812
|
+
...m && { partitioned: !0 }
|
|
813
|
+
});
|
|
814
|
+
}
|
|
815
|
+
function d(e) {
|
|
816
|
+
let t = {};
|
|
817
|
+
for (let n in e) e[n] && (t[n] = e[n]);
|
|
818
|
+
return t;
|
|
819
|
+
}
|
|
820
|
+
var f = [
|
|
821
|
+
"strict",
|
|
822
|
+
"lax",
|
|
823
|
+
"none"
|
|
824
|
+
];
|
|
825
|
+
function p(e) {
|
|
826
|
+
return e = e.toLowerCase(), f.includes(e) ? e : void 0;
|
|
827
|
+
}
|
|
828
|
+
var m = [
|
|
829
|
+
"low",
|
|
830
|
+
"medium",
|
|
831
|
+
"high"
|
|
832
|
+
];
|
|
833
|
+
function h(e) {
|
|
834
|
+
return e = e.toLowerCase(), m.includes(e) ? e : void 0;
|
|
835
|
+
}
|
|
836
|
+
function g(e) {
|
|
837
|
+
if (!e) return [];
|
|
838
|
+
var t = [], n = 0, r, i, a, o, s;
|
|
839
|
+
function c() {
|
|
840
|
+
for (; n < e.length && /\s/.test(e.charAt(n));) n += 1;
|
|
841
|
+
return n < e.length;
|
|
842
|
+
}
|
|
843
|
+
function l() {
|
|
844
|
+
return i = e.charAt(n), i !== "=" && i !== ";" && i !== ",";
|
|
845
|
+
}
|
|
846
|
+
for (; n < e.length;) {
|
|
847
|
+
for (r = n, s = !1; c();) if (i = e.charAt(n), i === ",") {
|
|
848
|
+
for (a = n, n += 1, c(), o = n; n < e.length && l();) n += 1;
|
|
849
|
+
n < e.length && e.charAt(n) === "=" ? (s = !0, n = o, t.push(e.substring(r, a)), r = n) : n = a + 1;
|
|
850
|
+
} else n += 1;
|
|
851
|
+
(!s || n >= e.length) && t.push(e.substring(r, e.length));
|
|
852
|
+
}
|
|
853
|
+
return t;
|
|
854
|
+
}
|
|
855
|
+
var _ = class {
|
|
856
|
+
constructor(e) {
|
|
857
|
+
this._parsed = /* @__PURE__ */ new Map(), this._headers = e;
|
|
858
|
+
let t = e.get("cookie");
|
|
859
|
+
if (t) {
|
|
860
|
+
let e = l(t);
|
|
861
|
+
for (let [t, n] of e) this._parsed.set(t, {
|
|
862
|
+
name: t,
|
|
863
|
+
value: n
|
|
864
|
+
});
|
|
865
|
+
}
|
|
866
|
+
}
|
|
867
|
+
[Symbol.iterator]() {
|
|
868
|
+
return this._parsed[Symbol.iterator]();
|
|
869
|
+
}
|
|
870
|
+
get size() {
|
|
871
|
+
return this._parsed.size;
|
|
872
|
+
}
|
|
873
|
+
get(...e) {
|
|
874
|
+
let t = typeof e[0] == "string" ? e[0] : e[0].name;
|
|
875
|
+
return this._parsed.get(t);
|
|
876
|
+
}
|
|
877
|
+
getAll(...e) {
|
|
878
|
+
let t = Array.from(this._parsed);
|
|
879
|
+
if (!e.length) return t.map(([e, t]) => t);
|
|
880
|
+
let n = typeof e[0] == "string" ? e[0] : e[0]?.name;
|
|
881
|
+
return t.filter(([e]) => e === n).map(([e, t]) => t);
|
|
882
|
+
}
|
|
883
|
+
has(e) {
|
|
884
|
+
return this._parsed.has(e);
|
|
885
|
+
}
|
|
886
|
+
set(...e) {
|
|
887
|
+
let [t, n] = e.length === 1 ? [e[0].name, e[0].value] : e, r = this._parsed;
|
|
888
|
+
return r.set(t, {
|
|
889
|
+
name: t,
|
|
890
|
+
value: n
|
|
891
|
+
}), this._headers.set("cookie", Array.from(r).map(([e, t]) => c(t)).join("; ")), this;
|
|
892
|
+
}
|
|
893
|
+
delete(e) {
|
|
894
|
+
let t = this._parsed, n = Array.isArray(e) ? e.map((e) => t.delete(e)) : t.delete(e);
|
|
895
|
+
return this._headers.set("cookie", Array.from(t).map(([e, t]) => c(t)).join("; ")), n;
|
|
896
|
+
}
|
|
897
|
+
clear() {
|
|
898
|
+
return this.delete(Array.from(this._parsed.keys())), this;
|
|
899
|
+
}
|
|
900
|
+
[/* @__PURE__ */ Symbol.for("edge-runtime.inspect.custom")]() {
|
|
901
|
+
return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
|
902
|
+
}
|
|
903
|
+
toString() {
|
|
904
|
+
return [...this._parsed.values()].map((e) => `${e.name}=${encodeURIComponent(e.value)}`).join("; ");
|
|
905
|
+
}
|
|
906
|
+
}, v = class {
|
|
907
|
+
constructor(e) {
|
|
908
|
+
this._parsed = /* @__PURE__ */ new Map(), this._headers = e;
|
|
909
|
+
let t = e.getSetCookie?.call(e) ?? e.get("set-cookie") ?? [], n = Array.isArray(t) ? t : g(t);
|
|
910
|
+
for (let e of n) {
|
|
911
|
+
let t = u(e);
|
|
912
|
+
t && this._parsed.set(t.name, t);
|
|
913
|
+
}
|
|
914
|
+
}
|
|
915
|
+
get(...e) {
|
|
916
|
+
let t = typeof e[0] == "string" ? e[0] : e[0].name;
|
|
917
|
+
return this._parsed.get(t);
|
|
918
|
+
}
|
|
919
|
+
getAll(...e) {
|
|
920
|
+
let t = Array.from(this._parsed.values());
|
|
921
|
+
if (!e.length) return t;
|
|
922
|
+
let n = typeof e[0] == "string" ? e[0] : e[0]?.name;
|
|
923
|
+
return t.filter((e) => e.name === n);
|
|
924
|
+
}
|
|
925
|
+
has(e) {
|
|
926
|
+
return this._parsed.has(e);
|
|
927
|
+
}
|
|
928
|
+
set(...e) {
|
|
929
|
+
let [t, n, r] = e.length === 1 ? [
|
|
930
|
+
e[0].name,
|
|
931
|
+
e[0].value,
|
|
932
|
+
e[0]
|
|
933
|
+
] : e, i = this._parsed;
|
|
934
|
+
return i.set(t, b({
|
|
935
|
+
name: t,
|
|
936
|
+
value: n,
|
|
937
|
+
...r
|
|
938
|
+
})), y(i, this._headers), this;
|
|
939
|
+
}
|
|
940
|
+
delete(...e) {
|
|
941
|
+
let [t, n, r] = typeof e[0] == "string" ? [e[0]] : [
|
|
942
|
+
e[0].name,
|
|
943
|
+
e[0].path,
|
|
944
|
+
e[0].domain
|
|
945
|
+
];
|
|
946
|
+
return this.set({
|
|
947
|
+
name: t,
|
|
948
|
+
path: n,
|
|
949
|
+
domain: r,
|
|
950
|
+
value: "",
|
|
951
|
+
expires: /* @__PURE__ */ new Date(0)
|
|
952
|
+
});
|
|
953
|
+
}
|
|
954
|
+
[/* @__PURE__ */ Symbol.for("edge-runtime.inspect.custom")]() {
|
|
955
|
+
return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
|
|
956
|
+
}
|
|
957
|
+
toString() {
|
|
958
|
+
return [...this._parsed.values()].map(c).join("; ");
|
|
959
|
+
}
|
|
960
|
+
};
|
|
961
|
+
function y(e, t) {
|
|
962
|
+
t.delete("set-cookie");
|
|
963
|
+
for (let [, n] of e) {
|
|
964
|
+
let e = c(n);
|
|
965
|
+
t.append("set-cookie", e);
|
|
966
|
+
}
|
|
967
|
+
}
|
|
968
|
+
function b(e = {
|
|
969
|
+
name: "",
|
|
970
|
+
value: ""
|
|
971
|
+
}) {
|
|
972
|
+
return typeof e.expires == "number" && (e.expires = new Date(e.expires)), e.maxAge && (e.expires = new Date(Date.now() + e.maxAge * 1e3)), (e.path === null || e.path === void 0) && (e.path = "/"), e;
|
|
973
|
+
}
|
|
974
|
+
return Xe;
|
|
975
|
+
}
|
|
976
|
+
var At;
|
|
977
|
+
function Qe() {
|
|
978
|
+
return At || (At = 1, (function(e) {
|
|
979
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
980
|
+
function t(e, t) {
|
|
981
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
982
|
+
enumerable: !0,
|
|
983
|
+
get: t[n]
|
|
984
|
+
});
|
|
985
|
+
}
|
|
986
|
+
t(e, {
|
|
987
|
+
RequestCookies: function() {
|
|
988
|
+
return n.RequestCookies;
|
|
989
|
+
},
|
|
990
|
+
ResponseCookies: function() {
|
|
991
|
+
return n.ResponseCookies;
|
|
992
|
+
},
|
|
993
|
+
stringifyCookie: function() {
|
|
994
|
+
return n.stringifyCookie;
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
let n = br();
|
|
998
|
+
})(Ge)), Ge;
|
|
999
|
+
}
|
|
1000
|
+
var Ot;
|
|
1001
|
+
function gr() {
|
|
1002
|
+
return Ot || (Ot = 1, (function(e) {
|
|
1003
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
1004
|
+
function t(e, t) {
|
|
1005
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
1006
|
+
enumerable: !0,
|
|
1007
|
+
get: t[n]
|
|
1008
|
+
});
|
|
1009
|
+
}
|
|
1010
|
+
t(e, {
|
|
1011
|
+
INTERNALS: function() {
|
|
1012
|
+
return o;
|
|
1013
|
+
},
|
|
1014
|
+
NextRequest: function() {
|
|
1015
|
+
return s;
|
|
1016
|
+
}
|
|
1017
|
+
});
|
|
1018
|
+
let n = Ft(), r = Bt(), i = _r(), a = Qe(), o = /* @__PURE__ */ Symbol("internal request");
|
|
1019
|
+
class s extends Request {
|
|
1020
|
+
constructor(e, t = {}) {
|
|
1021
|
+
let i = typeof e != "string" && "url" in e ? e.url : String(e);
|
|
1022
|
+
(0, r.validateURL)(i), e instanceof Request ? super(e, t) : super(i, t);
|
|
1023
|
+
let s = new n.NextURL(i, {
|
|
1024
|
+
headers: (0, r.toNodeOutgoingHttpHeaders)(this.headers),
|
|
1025
|
+
nextConfig: t.nextConfig
|
|
1026
|
+
});
|
|
1027
|
+
this[o] = {
|
|
1028
|
+
cookies: new a.RequestCookies(this.headers),
|
|
1029
|
+
geo: t.geo || {},
|
|
1030
|
+
ip: t.ip,
|
|
1031
|
+
nextUrl: s,
|
|
1032
|
+
url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? i : s.toString()
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
[/* @__PURE__ */ Symbol.for("edge-runtime.inspect.custom")]() {
|
|
1036
|
+
return {
|
|
1037
|
+
cookies: this.cookies,
|
|
1038
|
+
geo: this.geo,
|
|
1039
|
+
ip: this.ip,
|
|
1040
|
+
nextUrl: this.nextUrl,
|
|
1041
|
+
url: this.url,
|
|
1042
|
+
bodyUsed: this.bodyUsed,
|
|
1043
|
+
cache: this.cache,
|
|
1044
|
+
credentials: this.credentials,
|
|
1045
|
+
destination: this.destination,
|
|
1046
|
+
headers: Object.fromEntries(this.headers),
|
|
1047
|
+
integrity: this.integrity,
|
|
1048
|
+
keepalive: this.keepalive,
|
|
1049
|
+
method: this.method,
|
|
1050
|
+
mode: this.mode,
|
|
1051
|
+
redirect: this.redirect,
|
|
1052
|
+
referrer: this.referrer,
|
|
1053
|
+
referrerPolicy: this.referrerPolicy,
|
|
1054
|
+
signal: this.signal
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
get cookies() {
|
|
1058
|
+
return this[o].cookies;
|
|
1059
|
+
}
|
|
1060
|
+
get geo() {
|
|
1061
|
+
return this[o].geo;
|
|
1062
|
+
}
|
|
1063
|
+
get ip() {
|
|
1064
|
+
return this[o].ip;
|
|
1065
|
+
}
|
|
1066
|
+
get nextUrl() {
|
|
1067
|
+
return this[o].nextUrl;
|
|
1068
|
+
}
|
|
1069
|
+
get page() {
|
|
1070
|
+
throw new i.RemovedPageError();
|
|
1071
|
+
}
|
|
1072
|
+
get ua() {
|
|
1073
|
+
throw new i.RemovedUAError();
|
|
1074
|
+
}
|
|
1075
|
+
get url() {
|
|
1076
|
+
return this[o].url;
|
|
1077
|
+
}
|
|
1078
|
+
}
|
|
1079
|
+
})(Te)), Te;
|
|
1080
|
+
}
|
|
1081
|
+
var We = {}, ze = {}, xt;
|
|
1082
|
+
function wr() {
|
|
1083
|
+
return xt || (xt = 1, (function(e) {
|
|
1084
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ReflectAdapter", {
|
|
1085
|
+
enumerable: !0,
|
|
1086
|
+
get: function() {
|
|
1087
|
+
return t;
|
|
1088
|
+
}
|
|
1089
|
+
});
|
|
1090
|
+
class t {
|
|
1091
|
+
static get(e, t, n) {
|
|
1092
|
+
let r = Reflect.get(e, t, n);
|
|
1093
|
+
return typeof r == "function" ? r.bind(e) : r;
|
|
1094
|
+
}
|
|
1095
|
+
static set(e, t, n, r) {
|
|
1096
|
+
return Reflect.set(e, t, n, r);
|
|
1097
|
+
}
|
|
1098
|
+
static has(e, t) {
|
|
1099
|
+
return Reflect.has(e, t);
|
|
1100
|
+
}
|
|
1101
|
+
static deleteProperty(e, t) {
|
|
1102
|
+
return Reflect.deleteProperty(e, t);
|
|
1103
|
+
}
|
|
1104
|
+
}
|
|
1105
|
+
})(ze)), ze;
|
|
1106
|
+
}
|
|
1107
|
+
var Nt;
|
|
1108
|
+
function Er() {
|
|
1109
|
+
return Nt || (Nt = 1, (function(e) {
|
|
1110
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "NextResponse", {
|
|
1111
|
+
enumerable: !0,
|
|
1112
|
+
get: function() {
|
|
1113
|
+
return l;
|
|
1114
|
+
}
|
|
1115
|
+
});
|
|
1116
|
+
let t = Qe(), n = Ft(), r = Bt(), i = wr(), a = Qe(), o = /* @__PURE__ */ Symbol("internal response"), s = /* @__PURE__ */ new Set([
|
|
1117
|
+
301,
|
|
1118
|
+
302,
|
|
1119
|
+
303,
|
|
1120
|
+
307,
|
|
1121
|
+
308
|
|
1122
|
+
]);
|
|
1123
|
+
function c(e, t) {
|
|
1124
|
+
var n;
|
|
1125
|
+
if (!(e == null || (n = e.request) == null) && n.headers) {
|
|
1126
|
+
if (!(e.request.headers instanceof Headers)) throw Error("request.headers must be an instance of Headers");
|
|
1127
|
+
let n = [];
|
|
1128
|
+
for (let [r, i] of e.request.headers) t.set("x-middleware-request-" + r, i), n.push(r);
|
|
1129
|
+
t.set("x-middleware-override-headers", n.join(","));
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
class l extends Response {
|
|
1133
|
+
constructor(e, s = {}) {
|
|
1134
|
+
super(e, s);
|
|
1135
|
+
let l = this.headers, u = new a.ResponseCookies(l);
|
|
1136
|
+
this[o] = {
|
|
1137
|
+
cookies: new Proxy(u, { get(e, n, r) {
|
|
1138
|
+
switch (n) {
|
|
1139
|
+
case "delete":
|
|
1140
|
+
case "set": return (...r) => {
|
|
1141
|
+
let i = Reflect.apply(e[n], e, r), o = new Headers(l);
|
|
1142
|
+
return i instanceof a.ResponseCookies && l.set("x-middleware-set-cookie", i.getAll().map((e) => (0, t.stringifyCookie)(e)).join(",")), c(s, o), i;
|
|
1143
|
+
};
|
|
1144
|
+
default: return i.ReflectAdapter.get(e, n, r);
|
|
1145
|
+
}
|
|
1146
|
+
} }),
|
|
1147
|
+
url: s.url ? new n.NextURL(s.url, {
|
|
1148
|
+
headers: (0, r.toNodeOutgoingHttpHeaders)(l),
|
|
1149
|
+
nextConfig: s.nextConfig
|
|
1150
|
+
}) : void 0
|
|
1151
|
+
};
|
|
1152
|
+
}
|
|
1153
|
+
[/* @__PURE__ */ Symbol.for("edge-runtime.inspect.custom")]() {
|
|
1154
|
+
return {
|
|
1155
|
+
cookies: this.cookies,
|
|
1156
|
+
url: this.url,
|
|
1157
|
+
body: this.body,
|
|
1158
|
+
bodyUsed: this.bodyUsed,
|
|
1159
|
+
headers: Object.fromEntries(this.headers),
|
|
1160
|
+
ok: this.ok,
|
|
1161
|
+
redirected: this.redirected,
|
|
1162
|
+
status: this.status,
|
|
1163
|
+
statusText: this.statusText,
|
|
1164
|
+
type: this.type
|
|
1165
|
+
};
|
|
1166
|
+
}
|
|
1167
|
+
get cookies() {
|
|
1168
|
+
return this[o].cookies;
|
|
1169
|
+
}
|
|
1170
|
+
static json(e, t) {
|
|
1171
|
+
let n = Response.json(e, t);
|
|
1172
|
+
return new l(n.body, n);
|
|
1173
|
+
}
|
|
1174
|
+
static redirect(e, t) {
|
|
1175
|
+
let n = typeof t == "number" ? t : t?.status ?? 307;
|
|
1176
|
+
if (!s.has(n)) throw RangeError("Failed to execute \"redirect\" on \"response\": Invalid status code");
|
|
1177
|
+
let i = typeof t == "object" ? t : {}, a = new Headers(i?.headers);
|
|
1178
|
+
return a.set("Location", (0, r.validateURL)(e)), new l(null, {
|
|
1179
|
+
...i,
|
|
1180
|
+
headers: a,
|
|
1181
|
+
status: n
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
static rewrite(e, t) {
|
|
1185
|
+
let n = new Headers(t?.headers);
|
|
1186
|
+
return n.set("x-middleware-rewrite", (0, r.validateURL)(e)), c(t, n), new l(null, {
|
|
1187
|
+
...t,
|
|
1188
|
+
headers: n
|
|
1189
|
+
});
|
|
1190
|
+
}
|
|
1191
|
+
static next(e) {
|
|
1192
|
+
let t = new Headers(e?.headers);
|
|
1193
|
+
return t.set("x-middleware-next", "1"), c(e, t), new l(null, {
|
|
1194
|
+
...e,
|
|
1195
|
+
headers: t
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
}
|
|
1199
|
+
})(We)), We;
|
|
1200
|
+
}
|
|
1201
|
+
var Ve = {}, Ct;
|
|
1202
|
+
function vr() {
|
|
1203
|
+
return Ct || (Ct = 1, (function(e) {
|
|
1204
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "ImageResponse", {
|
|
1205
|
+
enumerable: !0,
|
|
1206
|
+
get: function() {
|
|
1207
|
+
return t;
|
|
1208
|
+
}
|
|
1209
|
+
});
|
|
1210
|
+
function t() {
|
|
1211
|
+
throw Error("ImageResponse moved from \"next/server\" to \"next/og\" since Next.js 14, please import from \"next/og\" instead");
|
|
1212
|
+
}
|
|
1213
|
+
})(Ve)), Ve;
|
|
1214
|
+
}
|
|
1215
|
+
var Ke = {}, Ye = { exports: {} }, Lt;
|
|
1216
|
+
function Rr() {
|
|
1217
|
+
return Lt || (Lt = 1, (() => {
|
|
1218
|
+
var e = { 226: function(e, t) {
|
|
1219
|
+
(function(n, r) {
|
|
1220
|
+
var i = "1.0.35", a = "", o = "?", s = "function", c = "undefined", l = "object", u = "string", d = "major", f = "model", p = "name", m = "type", h = "vendor", g = "version", _ = "architecture", v = "console", y = "mobile", b = "tablet", x = "smarttv", S = "wearable", C = "embedded", w = 350, T = "Amazon", E = "Apple", D = "ASUS", O = "BlackBerry", k = "Browser", A = "Chrome", hn = "Edge", j = "Firefox", N = "Google", P = "Huawei", F = "LG", I = "Microsoft", R = "Motorola", z = "Opera", B = "Samsung", gn = "Sharp", V = "Sony", H = "Xiaomi", G = "Zebra", _n = "Facebook", vn = "Chromium OS", yn = "Mac OS", K = function(e, t) {
|
|
1221
|
+
var n = {};
|
|
1222
|
+
for (var r in e) t[r] && t[r].length % 2 == 0 ? n[r] = t[r].concat(e[r]) : n[r] = e[r];
|
|
1223
|
+
return n;
|
|
1224
|
+
}, q = function(e) {
|
|
1225
|
+
for (var t = {}, n = 0; n < e.length; n++) t[e[n].toUpperCase()] = e[n];
|
|
1226
|
+
return t;
|
|
1227
|
+
}, bn = function(e, t) {
|
|
1228
|
+
return typeof e === u ? J(t).indexOf(J(e)) !== -1 : !1;
|
|
1229
|
+
}, J = function(e) {
|
|
1230
|
+
return e.toLowerCase();
|
|
1231
|
+
}, xn = function(e) {
|
|
1232
|
+
return typeof e === u ? e.replace(/[^\d\.]/g, a).split(".")[0] : r;
|
|
1233
|
+
}, Sn = function(e, t) {
|
|
1234
|
+
if (typeof e === u) return e = e.replace(/^\s\s*/, a), typeof t === c ? e : e.substring(0, w);
|
|
1235
|
+
}, X = function(e, t) {
|
|
1236
|
+
for (var n = 0, i, a, o, c, u, d; n < t.length && !u;) {
|
|
1237
|
+
var f = t[n], p = t[n + 1];
|
|
1238
|
+
for (i = a = 0; i < f.length && !u && f[i];) if (u = f[i++].exec(e), u) for (o = 0; o < p.length; o++) d = u[++a], c = p[o], typeof c === l && c.length > 0 ? c.length === 2 ? typeof c[1] == s ? this[c[0]] = c[1].call(this, d) : this[c[0]] = c[1] : c.length === 3 ? typeof c[1] === s && !(c[1].exec && c[1].test) ? this[c[0]] = d ? c[1].call(this, d, c[2]) : r : this[c[0]] = d ? d.replace(c[1], c[2]) : r : c.length === 4 && (this[c[0]] = d ? c[3].call(this, d.replace(c[1], c[2])) : r) : this[c] = d || r;
|
|
1239
|
+
n += 2;
|
|
1240
|
+
}
|
|
1241
|
+
}, Cn = function(e, t) {
|
|
1242
|
+
for (var n in t) if (typeof t[n] === l && t[n].length > 0) {
|
|
1243
|
+
for (var i = 0; i < t[n].length; i++) if (bn(t[n][i], e)) return n === o ? r : n;
|
|
1244
|
+
} else if (bn(t[n], e)) return n === o ? r : n;
|
|
1245
|
+
return e;
|
|
1246
|
+
}, wn = {
|
|
1247
|
+
"1.0": "/8",
|
|
1248
|
+
1.2: "/1",
|
|
1249
|
+
1.3: "/3",
|
|
1250
|
+
"2.0": "/412",
|
|
1251
|
+
"2.0.2": "/416",
|
|
1252
|
+
"2.0.3": "/417",
|
|
1253
|
+
"2.0.4": "/419",
|
|
1254
|
+
"?": "/"
|
|
1255
|
+
}, Tn = {
|
|
1256
|
+
ME: "4.90",
|
|
1257
|
+
"NT 3.11": "NT3.51",
|
|
1258
|
+
"NT 4.0": "NT4.0",
|
|
1259
|
+
2e3: "NT 5.0",
|
|
1260
|
+
XP: ["NT 5.1", "NT 5.2"],
|
|
1261
|
+
Vista: "NT 6.0",
|
|
1262
|
+
7: "NT 6.1",
|
|
1263
|
+
8: "NT 6.2",
|
|
1264
|
+
8.1: "NT 6.3",
|
|
1265
|
+
10: ["NT 6.4", "NT 10.0"],
|
|
1266
|
+
RT: "ARM"
|
|
1267
|
+
}, En = {
|
|
1268
|
+
browser: [
|
|
1269
|
+
[/\b(?:crmo|crios)\/([\w\.]+)/i],
|
|
1270
|
+
[g, [p, "Chrome"]],
|
|
1271
|
+
[/edg(?:e|ios|a)?\/([\w\.]+)/i],
|
|
1272
|
+
[g, [p, "Edge"]],
|
|
1273
|
+
[
|
|
1274
|
+
/(opera mini)\/([-\w\.]+)/i,
|
|
1275
|
+
/(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i,
|
|
1276
|
+
/(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i
|
|
1277
|
+
],
|
|
1278
|
+
[p, g],
|
|
1279
|
+
[/opios[\/ ]+([\w\.]+)/i],
|
|
1280
|
+
[g, [p, z + " Mini"]],
|
|
1281
|
+
[/\bopr\/([\w\.]+)/i],
|
|
1282
|
+
[g, [p, z]],
|
|
1283
|
+
[
|
|
1284
|
+
/(kindle)\/([\w\.]+)/i,
|
|
1285
|
+
/(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i,
|
|
1286
|
+
/(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i,
|
|
1287
|
+
/(ba?idubrowser)[\/ ]?([\w\.]+)/i,
|
|
1288
|
+
/(?:ms|\()(ie) ([\w\.]+)/i,
|
|
1289
|
+
/(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i,
|
|
1290
|
+
/(heytap|ovi)browser\/([\d\.]+)/i,
|
|
1291
|
+
/(weibo)__([\d\.]+)/i
|
|
1292
|
+
],
|
|
1293
|
+
[p, g],
|
|
1294
|
+
[/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i],
|
|
1295
|
+
[g, [p, "UC" + k]],
|
|
1296
|
+
[/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i],
|
|
1297
|
+
[g, [p, "WeChat(Win) Desktop"]],
|
|
1298
|
+
[/micromessenger\/([\w\.]+)/i],
|
|
1299
|
+
[g, [p, "WeChat"]],
|
|
1300
|
+
[/konqueror\/([\w\.]+)/i],
|
|
1301
|
+
[g, [p, "Konqueror"]],
|
|
1302
|
+
[/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i],
|
|
1303
|
+
[g, [p, "IE"]],
|
|
1304
|
+
[/ya(?:search)?browser\/([\w\.]+)/i],
|
|
1305
|
+
[g, [p, "Yandex"]],
|
|
1306
|
+
[/(avast|avg)\/([\w\.]+)/i],
|
|
1307
|
+
[[
|
|
1308
|
+
p,
|
|
1309
|
+
/(.+)/,
|
|
1310
|
+
"$1 Secure " + k
|
|
1311
|
+
], g],
|
|
1312
|
+
[/\bfocus\/([\w\.]+)/i],
|
|
1313
|
+
[g, [p, j + " Focus"]],
|
|
1314
|
+
[/\bopt\/([\w\.]+)/i],
|
|
1315
|
+
[g, [p, z + " Touch"]],
|
|
1316
|
+
[/coc_coc\w+\/([\w\.]+)/i],
|
|
1317
|
+
[g, [p, "Coc Coc"]],
|
|
1318
|
+
[/dolfin\/([\w\.]+)/i],
|
|
1319
|
+
[g, [p, "Dolphin"]],
|
|
1320
|
+
[/coast\/([\w\.]+)/i],
|
|
1321
|
+
[g, [p, z + " Coast"]],
|
|
1322
|
+
[/miuibrowser\/([\w\.]+)/i],
|
|
1323
|
+
[g, [p, "MIUI " + k]],
|
|
1324
|
+
[/fxios\/([-\w\.]+)/i],
|
|
1325
|
+
[g, [p, j]],
|
|
1326
|
+
[/\bqihu|(qi?ho?o?|360)browser/i],
|
|
1327
|
+
[[p, "360 " + k]],
|
|
1328
|
+
[/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i],
|
|
1329
|
+
[[
|
|
1330
|
+
p,
|
|
1331
|
+
/(.+)/,
|
|
1332
|
+
"$1 " + k
|
|
1333
|
+
], g],
|
|
1334
|
+
[/(comodo_dragon)\/([\w\.]+)/i],
|
|
1335
|
+
[[
|
|
1336
|
+
p,
|
|
1337
|
+
/_/g,
|
|
1338
|
+
" "
|
|
1339
|
+
], g],
|
|
1340
|
+
[
|
|
1341
|
+
/(electron)\/([\w\.]+) safari/i,
|
|
1342
|
+
/(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i,
|
|
1343
|
+
/m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i
|
|
1344
|
+
],
|
|
1345
|
+
[p, g],
|
|
1346
|
+
[
|
|
1347
|
+
/(metasr)[\/ ]?([\w\.]+)/i,
|
|
1348
|
+
/(lbbrowser)/i,
|
|
1349
|
+
/\[(linkedin)app\]/i
|
|
1350
|
+
],
|
|
1351
|
+
[p],
|
|
1352
|
+
[/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i],
|
|
1353
|
+
[[p, _n], g],
|
|
1354
|
+
[
|
|
1355
|
+
/(kakao(?:talk|story))[\/ ]([\w\.]+)/i,
|
|
1356
|
+
/(naver)\(.*?(\d+\.[\w\.]+).*\)/i,
|
|
1357
|
+
/safari (line)\/([\w\.]+)/i,
|
|
1358
|
+
/\b(line)\/([\w\.]+)\/iab/i,
|
|
1359
|
+
/(chromium|instagram)[\/ ]([-\w\.]+)/i
|
|
1360
|
+
],
|
|
1361
|
+
[p, g],
|
|
1362
|
+
[/\bgsa\/([\w\.]+) .*safari\//i],
|
|
1363
|
+
[g, [p, "GSA"]],
|
|
1364
|
+
[/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i],
|
|
1365
|
+
[g, [p, "TikTok"]],
|
|
1366
|
+
[/headlesschrome(?:\/([\w\.]+)| )/i],
|
|
1367
|
+
[g, [p, A + " Headless"]],
|
|
1368
|
+
[/ wv\).+(chrome)\/([\w\.]+)/i],
|
|
1369
|
+
[[p, A + " WebView"], g],
|
|
1370
|
+
[/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i],
|
|
1371
|
+
[g, [p, "Android " + k]],
|
|
1372
|
+
[/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i],
|
|
1373
|
+
[p, g],
|
|
1374
|
+
[/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i],
|
|
1375
|
+
[g, [p, "Mobile Safari"]],
|
|
1376
|
+
[/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i],
|
|
1377
|
+
[g, p],
|
|
1378
|
+
[/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i],
|
|
1379
|
+
[p, [
|
|
1380
|
+
g,
|
|
1381
|
+
Cn,
|
|
1382
|
+
wn
|
|
1383
|
+
]],
|
|
1384
|
+
[/(webkit|khtml)\/([\w\.]+)/i],
|
|
1385
|
+
[p, g],
|
|
1386
|
+
[/(navigator|netscape\d?)\/([-\w\.]+)/i],
|
|
1387
|
+
[[p, "Netscape"], g],
|
|
1388
|
+
[/mobile vr; rv:([\w\.]+)\).+firefox/i],
|
|
1389
|
+
[g, [p, j + " Reality"]],
|
|
1390
|
+
[
|
|
1391
|
+
/ekiohf.+(flow)\/([\w\.]+)/i,
|
|
1392
|
+
/(swiftfox)/i,
|
|
1393
|
+
/(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i,
|
|
1394
|
+
/(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i,
|
|
1395
|
+
/(firefox)\/([\w\.]+)/i,
|
|
1396
|
+
/(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i,
|
|
1397
|
+
/(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i,
|
|
1398
|
+
/(links) \(([\w\.]+)/i,
|
|
1399
|
+
/panasonic;(viera)/i
|
|
1400
|
+
],
|
|
1401
|
+
[p, g],
|
|
1402
|
+
[/(cobalt)\/([\w\.]+)/i],
|
|
1403
|
+
[p, [
|
|
1404
|
+
g,
|
|
1405
|
+
/master.|lts./,
|
|
1406
|
+
""
|
|
1407
|
+
]]
|
|
1408
|
+
],
|
|
1409
|
+
cpu: [
|
|
1410
|
+
[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i],
|
|
1411
|
+
[[_, "amd64"]],
|
|
1412
|
+
[/(ia32(?=;))/i],
|
|
1413
|
+
[[_, J]],
|
|
1414
|
+
[/((?:i[346]|x)86)[;\)]/i],
|
|
1415
|
+
[[_, "ia32"]],
|
|
1416
|
+
[/\b(aarch64|arm(v?8e?l?|_?64))\b/i],
|
|
1417
|
+
[[_, "arm64"]],
|
|
1418
|
+
[/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i],
|
|
1419
|
+
[[_, "armhf"]],
|
|
1420
|
+
[/windows (ce|mobile); ppc;/i],
|
|
1421
|
+
[[_, "arm"]],
|
|
1422
|
+
[/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i],
|
|
1423
|
+
[[
|
|
1424
|
+
_,
|
|
1425
|
+
/ower/,
|
|
1426
|
+
a,
|
|
1427
|
+
J
|
|
1428
|
+
]],
|
|
1429
|
+
[/(sun4\w)[;\)]/i],
|
|
1430
|
+
[[_, "sparc"]],
|
|
1431
|
+
[/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i],
|
|
1432
|
+
[[_, J]]
|
|
1433
|
+
],
|
|
1434
|
+
device: [
|
|
1435
|
+
[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i],
|
|
1436
|
+
[
|
|
1437
|
+
f,
|
|
1438
|
+
[h, B],
|
|
1439
|
+
[m, b]
|
|
1440
|
+
],
|
|
1441
|
+
[
|
|
1442
|
+
/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i,
|
|
1443
|
+
/samsung[- ]([-\w]+)/i,
|
|
1444
|
+
/sec-(sgh\w+)/i
|
|
1445
|
+
],
|
|
1446
|
+
[
|
|
1447
|
+
f,
|
|
1448
|
+
[h, B],
|
|
1449
|
+
[m, y]
|
|
1450
|
+
],
|
|
1451
|
+
[/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i],
|
|
1452
|
+
[
|
|
1453
|
+
f,
|
|
1454
|
+
[h, E],
|
|
1455
|
+
[m, y]
|
|
1456
|
+
],
|
|
1457
|
+
[
|
|
1458
|
+
/\((ipad);[-\w\),; ]+apple/i,
|
|
1459
|
+
/applecoremedia\/[\w\.]+ \((ipad)/i,
|
|
1460
|
+
/\b(ipad)\d\d?,\d\d?[;\]].+ios/i
|
|
1461
|
+
],
|
|
1462
|
+
[
|
|
1463
|
+
f,
|
|
1464
|
+
[h, E],
|
|
1465
|
+
[m, b]
|
|
1466
|
+
],
|
|
1467
|
+
[/(macintosh);/i],
|
|
1468
|
+
[f, [h, E]],
|
|
1469
|
+
[/\b(sh-?[altvz]?\d\d[a-ekm]?)/i],
|
|
1470
|
+
[
|
|
1471
|
+
f,
|
|
1472
|
+
[h, gn],
|
|
1473
|
+
[m, y]
|
|
1474
|
+
],
|
|
1475
|
+
[/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i],
|
|
1476
|
+
[
|
|
1477
|
+
f,
|
|
1478
|
+
[h, P],
|
|
1479
|
+
[m, b]
|
|
1480
|
+
],
|
|
1481
|
+
[/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i],
|
|
1482
|
+
[
|
|
1483
|
+
f,
|
|
1484
|
+
[h, P],
|
|
1485
|
+
[m, y]
|
|
1486
|
+
],
|
|
1487
|
+
[
|
|
1488
|
+
/\b(poco[\w ]+)(?: bui|\))/i,
|
|
1489
|
+
/\b; (\w+) build\/hm\1/i,
|
|
1490
|
+
/\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i,
|
|
1491
|
+
/\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i,
|
|
1492
|
+
/\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i
|
|
1493
|
+
],
|
|
1494
|
+
[
|
|
1495
|
+
[
|
|
1496
|
+
f,
|
|
1497
|
+
/_/g,
|
|
1498
|
+
" "
|
|
1499
|
+
],
|
|
1500
|
+
[h, H],
|
|
1501
|
+
[m, y]
|
|
1502
|
+
],
|
|
1503
|
+
[/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i],
|
|
1504
|
+
[
|
|
1505
|
+
[
|
|
1506
|
+
f,
|
|
1507
|
+
/_/g,
|
|
1508
|
+
" "
|
|
1509
|
+
],
|
|
1510
|
+
[h, H],
|
|
1511
|
+
[m, b]
|
|
1512
|
+
],
|
|
1513
|
+
[/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i],
|
|
1514
|
+
[
|
|
1515
|
+
f,
|
|
1516
|
+
[h, "OPPO"],
|
|
1517
|
+
[m, y]
|
|
1518
|
+
],
|
|
1519
|
+
[/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i],
|
|
1520
|
+
[
|
|
1521
|
+
f,
|
|
1522
|
+
[h, "Vivo"],
|
|
1523
|
+
[m, y]
|
|
1524
|
+
],
|
|
1525
|
+
[/\b(rmx[12]\d{3})(?: bui|;|\))/i],
|
|
1526
|
+
[
|
|
1527
|
+
f,
|
|
1528
|
+
[h, "Realme"],
|
|
1529
|
+
[m, y]
|
|
1530
|
+
],
|
|
1531
|
+
[
|
|
1532
|
+
/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i,
|
|
1533
|
+
/\bmot(?:orola)?[- ](\w*)/i,
|
|
1534
|
+
/((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i
|
|
1535
|
+
],
|
|
1536
|
+
[
|
|
1537
|
+
f,
|
|
1538
|
+
[h, R],
|
|
1539
|
+
[m, y]
|
|
1540
|
+
],
|
|
1541
|
+
[/\b(mz60\d|xoom[2 ]{0,2}) build\//i],
|
|
1542
|
+
[
|
|
1543
|
+
f,
|
|
1544
|
+
[h, R],
|
|
1545
|
+
[m, b]
|
|
1546
|
+
],
|
|
1547
|
+
[/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i],
|
|
1548
|
+
[
|
|
1549
|
+
f,
|
|
1550
|
+
[h, F],
|
|
1551
|
+
[m, b]
|
|
1552
|
+
],
|
|
1553
|
+
[
|
|
1554
|
+
/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i,
|
|
1555
|
+
/\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i,
|
|
1556
|
+
/\blg-?([\d\w]+) bui/i
|
|
1557
|
+
],
|
|
1558
|
+
[
|
|
1559
|
+
f,
|
|
1560
|
+
[h, F],
|
|
1561
|
+
[m, y]
|
|
1562
|
+
],
|
|
1563
|
+
[/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i],
|
|
1564
|
+
[
|
|
1565
|
+
f,
|
|
1566
|
+
[h, "Lenovo"],
|
|
1567
|
+
[m, b]
|
|
1568
|
+
],
|
|
1569
|
+
[/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i],
|
|
1570
|
+
[
|
|
1571
|
+
[
|
|
1572
|
+
f,
|
|
1573
|
+
/_/g,
|
|
1574
|
+
" "
|
|
1575
|
+
],
|
|
1576
|
+
[h, "Nokia"],
|
|
1577
|
+
[m, y]
|
|
1578
|
+
],
|
|
1579
|
+
[/(pixel c)\b/i],
|
|
1580
|
+
[
|
|
1581
|
+
f,
|
|
1582
|
+
[h, N],
|
|
1583
|
+
[m, b]
|
|
1584
|
+
],
|
|
1585
|
+
[/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i],
|
|
1586
|
+
[
|
|
1587
|
+
f,
|
|
1588
|
+
[h, N],
|
|
1589
|
+
[m, y]
|
|
1590
|
+
],
|
|
1591
|
+
[/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i],
|
|
1592
|
+
[
|
|
1593
|
+
f,
|
|
1594
|
+
[h, V],
|
|
1595
|
+
[m, y]
|
|
1596
|
+
],
|
|
1597
|
+
[/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i],
|
|
1598
|
+
[
|
|
1599
|
+
[f, "Xperia Tablet"],
|
|
1600
|
+
[h, V],
|
|
1601
|
+
[m, b]
|
|
1602
|
+
],
|
|
1603
|
+
[/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i],
|
|
1604
|
+
[
|
|
1605
|
+
f,
|
|
1606
|
+
[h, "OnePlus"],
|
|
1607
|
+
[m, y]
|
|
1608
|
+
],
|
|
1609
|
+
[
|
|
1610
|
+
/(alexa)webm/i,
|
|
1611
|
+
/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i,
|
|
1612
|
+
/(kf[a-z]+)( bui|\)).+silk\//i
|
|
1613
|
+
],
|
|
1614
|
+
[
|
|
1615
|
+
f,
|
|
1616
|
+
[h, T],
|
|
1617
|
+
[m, b]
|
|
1618
|
+
],
|
|
1619
|
+
[/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i],
|
|
1620
|
+
[
|
|
1621
|
+
[
|
|
1622
|
+
f,
|
|
1623
|
+
/(.+)/g,
|
|
1624
|
+
"Fire Phone $1"
|
|
1625
|
+
],
|
|
1626
|
+
[h, T],
|
|
1627
|
+
[m, y]
|
|
1628
|
+
],
|
|
1629
|
+
[/(playbook);[-\w\),; ]+(rim)/i],
|
|
1630
|
+
[
|
|
1631
|
+
f,
|
|
1632
|
+
h,
|
|
1633
|
+
[m, b]
|
|
1634
|
+
],
|
|
1635
|
+
[/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i],
|
|
1636
|
+
[
|
|
1637
|
+
f,
|
|
1638
|
+
[h, O],
|
|
1639
|
+
[m, y]
|
|
1640
|
+
],
|
|
1641
|
+
[/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i],
|
|
1642
|
+
[
|
|
1643
|
+
f,
|
|
1644
|
+
[h, D],
|
|
1645
|
+
[m, b]
|
|
1646
|
+
],
|
|
1647
|
+
[/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i],
|
|
1648
|
+
[
|
|
1649
|
+
f,
|
|
1650
|
+
[h, D],
|
|
1651
|
+
[m, y]
|
|
1652
|
+
],
|
|
1653
|
+
[/(nexus 9)/i],
|
|
1654
|
+
[
|
|
1655
|
+
f,
|
|
1656
|
+
[h, "HTC"],
|
|
1657
|
+
[m, b]
|
|
1658
|
+
],
|
|
1659
|
+
[
|
|
1660
|
+
/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i,
|
|
1661
|
+
/(zte)[- ]([\w ]+?)(?: bui|\/|\))/i,
|
|
1662
|
+
/(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i
|
|
1663
|
+
],
|
|
1664
|
+
[
|
|
1665
|
+
h,
|
|
1666
|
+
[
|
|
1667
|
+
f,
|
|
1668
|
+
/_/g,
|
|
1669
|
+
" "
|
|
1670
|
+
],
|
|
1671
|
+
[m, y]
|
|
1672
|
+
],
|
|
1673
|
+
[/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i],
|
|
1674
|
+
[
|
|
1675
|
+
f,
|
|
1676
|
+
[h, "Acer"],
|
|
1677
|
+
[m, b]
|
|
1678
|
+
],
|
|
1679
|
+
[/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i],
|
|
1680
|
+
[
|
|
1681
|
+
f,
|
|
1682
|
+
[h, "Meizu"],
|
|
1683
|
+
[m, y]
|
|
1684
|
+
],
|
|
1685
|
+
[
|
|
1686
|
+
/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i,
|
|
1687
|
+
/(hp) ([\w ]+\w)/i,
|
|
1688
|
+
/(asus)-?(\w+)/i,
|
|
1689
|
+
/(microsoft); (lumia[\w ]+)/i,
|
|
1690
|
+
/(lenovo)[-_ ]?([-\w]+)/i,
|
|
1691
|
+
/(jolla)/i,
|
|
1692
|
+
/(oppo) ?([\w ]+) bui/i
|
|
1693
|
+
],
|
|
1694
|
+
[
|
|
1695
|
+
h,
|
|
1696
|
+
f,
|
|
1697
|
+
[m, y]
|
|
1698
|
+
],
|
|
1699
|
+
[
|
|
1700
|
+
/(kobo)\s(ereader|touch)/i,
|
|
1701
|
+
/(archos) (gamepad2?)/i,
|
|
1702
|
+
/(hp).+(touchpad(?!.+tablet)|tablet)/i,
|
|
1703
|
+
/(kindle)\/([\w\.]+)/i,
|
|
1704
|
+
/(nook)[\w ]+build\/(\w+)/i,
|
|
1705
|
+
/(dell) (strea[kpr\d ]*[\dko])/i,
|
|
1706
|
+
/(le[- ]+pan)[- ]+(\w{1,9}) bui/i,
|
|
1707
|
+
/(trinity)[- ]*(t\d{3}) bui/i,
|
|
1708
|
+
/(gigaset)[- ]+(q\w{1,9}) bui/i,
|
|
1709
|
+
/(vodafone) ([\w ]+)(?:\)| bui)/i
|
|
1710
|
+
],
|
|
1711
|
+
[
|
|
1712
|
+
h,
|
|
1713
|
+
f,
|
|
1714
|
+
[m, b]
|
|
1715
|
+
],
|
|
1716
|
+
[/(surface duo)/i],
|
|
1717
|
+
[
|
|
1718
|
+
f,
|
|
1719
|
+
[h, I],
|
|
1720
|
+
[m, b]
|
|
1721
|
+
],
|
|
1722
|
+
[/droid [\d\.]+; (fp\du?)(?: b|\))/i],
|
|
1723
|
+
[
|
|
1724
|
+
f,
|
|
1725
|
+
[h, "Fairphone"],
|
|
1726
|
+
[m, y]
|
|
1727
|
+
],
|
|
1728
|
+
[/(u304aa)/i],
|
|
1729
|
+
[
|
|
1730
|
+
f,
|
|
1731
|
+
[h, "AT&T"],
|
|
1732
|
+
[m, y]
|
|
1733
|
+
],
|
|
1734
|
+
[/\bsie-(\w*)/i],
|
|
1735
|
+
[
|
|
1736
|
+
f,
|
|
1737
|
+
[h, "Siemens"],
|
|
1738
|
+
[m, y]
|
|
1739
|
+
],
|
|
1740
|
+
[/\b(rct\w+) b/i],
|
|
1741
|
+
[
|
|
1742
|
+
f,
|
|
1743
|
+
[h, "RCA"],
|
|
1744
|
+
[m, b]
|
|
1745
|
+
],
|
|
1746
|
+
[/\b(venue[\d ]{2,7}) b/i],
|
|
1747
|
+
[
|
|
1748
|
+
f,
|
|
1749
|
+
[h, "Dell"],
|
|
1750
|
+
[m, b]
|
|
1751
|
+
],
|
|
1752
|
+
[/\b(q(?:mv|ta)\w+) b/i],
|
|
1753
|
+
[
|
|
1754
|
+
f,
|
|
1755
|
+
[h, "Verizon"],
|
|
1756
|
+
[m, b]
|
|
1757
|
+
],
|
|
1758
|
+
[/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i],
|
|
1759
|
+
[
|
|
1760
|
+
f,
|
|
1761
|
+
[h, "Barnes & Noble"],
|
|
1762
|
+
[m, b]
|
|
1763
|
+
],
|
|
1764
|
+
[/\b(tm\d{3}\w+) b/i],
|
|
1765
|
+
[
|
|
1766
|
+
f,
|
|
1767
|
+
[h, "NuVision"],
|
|
1768
|
+
[m, b]
|
|
1769
|
+
],
|
|
1770
|
+
[/\b(k88) b/i],
|
|
1771
|
+
[
|
|
1772
|
+
f,
|
|
1773
|
+
[h, "ZTE"],
|
|
1774
|
+
[m, b]
|
|
1775
|
+
],
|
|
1776
|
+
[/\b(nx\d{3}j) b/i],
|
|
1777
|
+
[
|
|
1778
|
+
f,
|
|
1779
|
+
[h, "ZTE"],
|
|
1780
|
+
[m, y]
|
|
1781
|
+
],
|
|
1782
|
+
[/\b(gen\d{3}) b.+49h/i],
|
|
1783
|
+
[
|
|
1784
|
+
f,
|
|
1785
|
+
[h, "Swiss"],
|
|
1786
|
+
[m, y]
|
|
1787
|
+
],
|
|
1788
|
+
[/\b(zur\d{3}) b/i],
|
|
1789
|
+
[
|
|
1790
|
+
f,
|
|
1791
|
+
[h, "Swiss"],
|
|
1792
|
+
[m, b]
|
|
1793
|
+
],
|
|
1794
|
+
[/\b((zeki)?tb.*\b) b/i],
|
|
1795
|
+
[
|
|
1796
|
+
f,
|
|
1797
|
+
[h, "Zeki"],
|
|
1798
|
+
[m, b]
|
|
1799
|
+
],
|
|
1800
|
+
[/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i],
|
|
1801
|
+
[
|
|
1802
|
+
[h, "Dragon Touch"],
|
|
1803
|
+
f,
|
|
1804
|
+
[m, b]
|
|
1805
|
+
],
|
|
1806
|
+
[/\b(ns-?\w{0,9}) b/i],
|
|
1807
|
+
[
|
|
1808
|
+
f,
|
|
1809
|
+
[h, "Insignia"],
|
|
1810
|
+
[m, b]
|
|
1811
|
+
],
|
|
1812
|
+
[/\b((nxa|next)-?\w{0,9}) b/i],
|
|
1813
|
+
[
|
|
1814
|
+
f,
|
|
1815
|
+
[h, "NextBook"],
|
|
1816
|
+
[m, b]
|
|
1817
|
+
],
|
|
1818
|
+
[/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i],
|
|
1819
|
+
[
|
|
1820
|
+
[h, "Voice"],
|
|
1821
|
+
f,
|
|
1822
|
+
[m, y]
|
|
1823
|
+
],
|
|
1824
|
+
[/\b(lvtel\-)?(v1[12]) b/i],
|
|
1825
|
+
[
|
|
1826
|
+
[h, "LvTel"],
|
|
1827
|
+
f,
|
|
1828
|
+
[m, y]
|
|
1829
|
+
],
|
|
1830
|
+
[/\b(ph-1) /i],
|
|
1831
|
+
[
|
|
1832
|
+
f,
|
|
1833
|
+
[h, "Essential"],
|
|
1834
|
+
[m, y]
|
|
1835
|
+
],
|
|
1836
|
+
[/\b(v(100md|700na|7011|917g).*\b) b/i],
|
|
1837
|
+
[
|
|
1838
|
+
f,
|
|
1839
|
+
[h, "Envizen"],
|
|
1840
|
+
[m, b]
|
|
1841
|
+
],
|
|
1842
|
+
[/\b(trio[-\w\. ]+) b/i],
|
|
1843
|
+
[
|
|
1844
|
+
f,
|
|
1845
|
+
[h, "MachSpeed"],
|
|
1846
|
+
[m, b]
|
|
1847
|
+
],
|
|
1848
|
+
[/\btu_(1491) b/i],
|
|
1849
|
+
[
|
|
1850
|
+
f,
|
|
1851
|
+
[h, "Rotor"],
|
|
1852
|
+
[m, b]
|
|
1853
|
+
],
|
|
1854
|
+
[/(shield[\w ]+) b/i],
|
|
1855
|
+
[
|
|
1856
|
+
f,
|
|
1857
|
+
[h, "Nvidia"],
|
|
1858
|
+
[m, b]
|
|
1859
|
+
],
|
|
1860
|
+
[/(sprint) (\w+)/i],
|
|
1861
|
+
[
|
|
1862
|
+
h,
|
|
1863
|
+
f,
|
|
1864
|
+
[m, y]
|
|
1865
|
+
],
|
|
1866
|
+
[/(kin\.[onetw]{3})/i],
|
|
1867
|
+
[
|
|
1868
|
+
[
|
|
1869
|
+
f,
|
|
1870
|
+
/\./g,
|
|
1871
|
+
" "
|
|
1872
|
+
],
|
|
1873
|
+
[h, I],
|
|
1874
|
+
[m, y]
|
|
1875
|
+
],
|
|
1876
|
+
[/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i],
|
|
1877
|
+
[
|
|
1878
|
+
f,
|
|
1879
|
+
[h, G],
|
|
1880
|
+
[m, b]
|
|
1881
|
+
],
|
|
1882
|
+
[/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i],
|
|
1883
|
+
[
|
|
1884
|
+
f,
|
|
1885
|
+
[h, G],
|
|
1886
|
+
[m, y]
|
|
1887
|
+
],
|
|
1888
|
+
[/smart-tv.+(samsung)/i],
|
|
1889
|
+
[h, [m, x]],
|
|
1890
|
+
[/hbbtv.+maple;(\d+)/i],
|
|
1891
|
+
[
|
|
1892
|
+
[
|
|
1893
|
+
f,
|
|
1894
|
+
/^/,
|
|
1895
|
+
"SmartTV"
|
|
1896
|
+
],
|
|
1897
|
+
[h, B],
|
|
1898
|
+
[m, x]
|
|
1899
|
+
],
|
|
1900
|
+
[/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i],
|
|
1901
|
+
[[h, F], [m, x]],
|
|
1902
|
+
[/(apple) ?tv/i],
|
|
1903
|
+
[
|
|
1904
|
+
h,
|
|
1905
|
+
[f, E + " TV"],
|
|
1906
|
+
[m, x]
|
|
1907
|
+
],
|
|
1908
|
+
[/crkey/i],
|
|
1909
|
+
[
|
|
1910
|
+
[f, A + "cast"],
|
|
1911
|
+
[h, N],
|
|
1912
|
+
[m, x]
|
|
1913
|
+
],
|
|
1914
|
+
[/droid.+aft(\w)( bui|\))/i],
|
|
1915
|
+
[
|
|
1916
|
+
f,
|
|
1917
|
+
[h, T],
|
|
1918
|
+
[m, x]
|
|
1919
|
+
],
|
|
1920
|
+
[/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i],
|
|
1921
|
+
[
|
|
1922
|
+
f,
|
|
1923
|
+
[h, gn],
|
|
1924
|
+
[m, x]
|
|
1925
|
+
],
|
|
1926
|
+
[/(bravia[\w ]+)( bui|\))/i],
|
|
1927
|
+
[
|
|
1928
|
+
f,
|
|
1929
|
+
[h, V],
|
|
1930
|
+
[m, x]
|
|
1931
|
+
],
|
|
1932
|
+
[/(mitv-\w{5}) bui/i],
|
|
1933
|
+
[
|
|
1934
|
+
f,
|
|
1935
|
+
[h, H],
|
|
1936
|
+
[m, x]
|
|
1937
|
+
],
|
|
1938
|
+
[/Hbbtv.*(technisat) (.*);/i],
|
|
1939
|
+
[
|
|
1940
|
+
h,
|
|
1941
|
+
f,
|
|
1942
|
+
[m, x]
|
|
1943
|
+
],
|
|
1944
|
+
[/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i],
|
|
1945
|
+
[
|
|
1946
|
+
[h, Sn],
|
|
1947
|
+
[f, Sn],
|
|
1948
|
+
[m, x]
|
|
1949
|
+
],
|
|
1950
|
+
[/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i],
|
|
1951
|
+
[[m, x]],
|
|
1952
|
+
[/(ouya)/i, /(nintendo) ([wids3utch]+)/i],
|
|
1953
|
+
[
|
|
1954
|
+
h,
|
|
1955
|
+
f,
|
|
1956
|
+
[m, v]
|
|
1957
|
+
],
|
|
1958
|
+
[/droid.+; (shield) bui/i],
|
|
1959
|
+
[
|
|
1960
|
+
f,
|
|
1961
|
+
[h, "Nvidia"],
|
|
1962
|
+
[m, v]
|
|
1963
|
+
],
|
|
1964
|
+
[/(playstation [345portablevi]+)/i],
|
|
1965
|
+
[
|
|
1966
|
+
f,
|
|
1967
|
+
[h, V],
|
|
1968
|
+
[m, v]
|
|
1969
|
+
],
|
|
1970
|
+
[/\b(xbox(?: one)?(?!; xbox))[\); ]/i],
|
|
1971
|
+
[
|
|
1972
|
+
f,
|
|
1973
|
+
[h, I],
|
|
1974
|
+
[m, v]
|
|
1975
|
+
],
|
|
1976
|
+
[/((pebble))app/i],
|
|
1977
|
+
[
|
|
1978
|
+
h,
|
|
1979
|
+
f,
|
|
1980
|
+
[m, S]
|
|
1981
|
+
],
|
|
1982
|
+
[/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i],
|
|
1983
|
+
[
|
|
1984
|
+
f,
|
|
1985
|
+
[h, E],
|
|
1986
|
+
[m, S]
|
|
1987
|
+
],
|
|
1988
|
+
[/droid.+; (glass) \d/i],
|
|
1989
|
+
[
|
|
1990
|
+
f,
|
|
1991
|
+
[h, N],
|
|
1992
|
+
[m, S]
|
|
1993
|
+
],
|
|
1994
|
+
[/droid.+; (wt63?0{2,3})\)/i],
|
|
1995
|
+
[
|
|
1996
|
+
f,
|
|
1997
|
+
[h, G],
|
|
1998
|
+
[m, S]
|
|
1999
|
+
],
|
|
2000
|
+
[/(quest( 2| pro)?)/i],
|
|
2001
|
+
[
|
|
2002
|
+
f,
|
|
2003
|
+
[h, _n],
|
|
2004
|
+
[m, S]
|
|
2005
|
+
],
|
|
2006
|
+
[/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i],
|
|
2007
|
+
[h, [m, C]],
|
|
2008
|
+
[/(aeobc)\b/i],
|
|
2009
|
+
[
|
|
2010
|
+
f,
|
|
2011
|
+
[h, T],
|
|
2012
|
+
[m, C]
|
|
2013
|
+
],
|
|
2014
|
+
[/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i],
|
|
2015
|
+
[f, [m, y]],
|
|
2016
|
+
[/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i],
|
|
2017
|
+
[f, [m, b]],
|
|
2018
|
+
[/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i],
|
|
2019
|
+
[[m, b]],
|
|
2020
|
+
[/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i],
|
|
2021
|
+
[[m, y]],
|
|
2022
|
+
[/(android[-\w\. ]{0,9});.+buil/i],
|
|
2023
|
+
[f, [h, "Generic"]]
|
|
2024
|
+
],
|
|
2025
|
+
engine: [
|
|
2026
|
+
[/windows.+ edge\/([\w\.]+)/i],
|
|
2027
|
+
[g, [p, hn + "HTML"]],
|
|
2028
|
+
[/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i],
|
|
2029
|
+
[g, [p, "Blink"]],
|
|
2030
|
+
[
|
|
2031
|
+
/(presto)\/([\w\.]+)/i,
|
|
2032
|
+
/(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i,
|
|
2033
|
+
/ekioh(flow)\/([\w\.]+)/i,
|
|
2034
|
+
/(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i,
|
|
2035
|
+
/(icab)[\/ ]([23]\.[\d\.]+)/i,
|
|
2036
|
+
/\b(libweb)/i
|
|
2037
|
+
],
|
|
2038
|
+
[p, g],
|
|
2039
|
+
[/rv\:([\w\.]{1,9})\b.+(gecko)/i],
|
|
2040
|
+
[g, p]
|
|
2041
|
+
],
|
|
2042
|
+
os: [
|
|
2043
|
+
[/microsoft (windows) (vista|xp)/i],
|
|
2044
|
+
[p, g],
|
|
2045
|
+
[
|
|
2046
|
+
/(windows) nt 6\.2; (arm)/i,
|
|
2047
|
+
/(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i,
|
|
2048
|
+
/(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i
|
|
2049
|
+
],
|
|
2050
|
+
[p, [
|
|
2051
|
+
g,
|
|
2052
|
+
Cn,
|
|
2053
|
+
Tn
|
|
2054
|
+
]],
|
|
2055
|
+
[/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i],
|
|
2056
|
+
[[p, "Windows"], [
|
|
2057
|
+
g,
|
|
2058
|
+
Cn,
|
|
2059
|
+
Tn
|
|
2060
|
+
]],
|
|
2061
|
+
[
|
|
2062
|
+
/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i,
|
|
2063
|
+
/ios;fbsv\/([\d\.]+)/i,
|
|
2064
|
+
/cfnetwork\/.+darwin/i
|
|
2065
|
+
],
|
|
2066
|
+
[[
|
|
2067
|
+
g,
|
|
2068
|
+
/_/g,
|
|
2069
|
+
"."
|
|
2070
|
+
], [p, "iOS"]],
|
|
2071
|
+
[/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i],
|
|
2072
|
+
[[p, yn], [
|
|
2073
|
+
g,
|
|
2074
|
+
/_/g,
|
|
2075
|
+
"."
|
|
2076
|
+
]],
|
|
2077
|
+
[/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i],
|
|
2078
|
+
[g, p],
|
|
2079
|
+
[
|
|
2080
|
+
/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i,
|
|
2081
|
+
/(blackberry)\w*\/([\w\.]*)/i,
|
|
2082
|
+
/(tizen|kaios)[\/ ]([\w\.]+)/i,
|
|
2083
|
+
/\((series40);/i
|
|
2084
|
+
],
|
|
2085
|
+
[p, g],
|
|
2086
|
+
[/\(bb(10);/i],
|
|
2087
|
+
[g, [p, O]],
|
|
2088
|
+
[/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i],
|
|
2089
|
+
[g, [p, "Symbian"]],
|
|
2090
|
+
[/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i],
|
|
2091
|
+
[g, [p, j + " OS"]],
|
|
2092
|
+
[/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i],
|
|
2093
|
+
[g, [p, "webOS"]],
|
|
2094
|
+
[/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i],
|
|
2095
|
+
[g, [p, "watchOS"]],
|
|
2096
|
+
[/crkey\/([\d\.]+)/i],
|
|
2097
|
+
[g, [p, A + "cast"]],
|
|
2098
|
+
[/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i],
|
|
2099
|
+
[[p, vn], g],
|
|
2100
|
+
[
|
|
2101
|
+
/panasonic;(viera)/i,
|
|
2102
|
+
/(netrange)mmh/i,
|
|
2103
|
+
/(nettv)\/(\d+\.[\w\.]+)/i,
|
|
2104
|
+
/(nintendo|playstation) ([wids345portablevuch]+)/i,
|
|
2105
|
+
/(xbox); +xbox ([^\);]+)/i,
|
|
2106
|
+
/\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i,
|
|
2107
|
+
/(mint)[\/\(\) ]?(\w*)/i,
|
|
2108
|
+
/(mageia|vectorlinux)[; ]/i,
|
|
2109
|
+
/([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i,
|
|
2110
|
+
/(hurd|linux) ?([\w\.]*)/i,
|
|
2111
|
+
/(gnu) ?([\w\.]*)/i,
|
|
2112
|
+
/\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i,
|
|
2113
|
+
/(haiku) (\w+)/i
|
|
2114
|
+
],
|
|
2115
|
+
[p, g],
|
|
2116
|
+
[/(sunos) ?([\w\.\d]*)/i],
|
|
2117
|
+
[[p, "Solaris"], g],
|
|
2118
|
+
[
|
|
2119
|
+
/((?:open)?solaris)[-\/ ]?([\w\.]*)/i,
|
|
2120
|
+
/(aix) ((\d)(?=\.|\)| )[\w\.])*/i,
|
|
2121
|
+
/\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i,
|
|
2122
|
+
/(unix) ?([\w\.]*)/i
|
|
2123
|
+
],
|
|
2124
|
+
[p, g]
|
|
2125
|
+
]
|
|
2126
|
+
}, Z = function(e, t) {
|
|
2127
|
+
if (typeof e === l && (t = e, e = r), !(this instanceof Z)) return new Z(e, t).getResult();
|
|
2128
|
+
var i = typeof n !== c && n.navigator ? n.navigator : r, o = e || (i && i.userAgent ? i.userAgent : a), v = i && i.userAgentData ? i.userAgentData : r, x = t ? K(En, t) : En, S = i && i.userAgent == o;
|
|
2129
|
+
return this.getBrowser = function() {
|
|
2130
|
+
var e = {};
|
|
2131
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.browser), e[d] = xn(e[g]), S && i && i.brave && typeof i.brave.isBrave == s && (e[p] = "Brave"), e;
|
|
2132
|
+
}, this.getCPU = function() {
|
|
2133
|
+
var e = {};
|
|
2134
|
+
return e[_] = r, X.call(e, o, x.cpu), e;
|
|
2135
|
+
}, this.getDevice = function() {
|
|
2136
|
+
var e = {};
|
|
2137
|
+
return e[h] = r, e[f] = r, e[m] = r, X.call(e, o, x.device), S && !e[m] && v && v.mobile && (e[m] = y), S && e[f] == "Macintosh" && i && typeof i.standalone !== c && i.maxTouchPoints && i.maxTouchPoints > 2 && (e[f] = "iPad", e[m] = b), e;
|
|
2138
|
+
}, this.getEngine = function() {
|
|
2139
|
+
var e = {};
|
|
2140
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.engine), e;
|
|
2141
|
+
}, this.getOS = function() {
|
|
2142
|
+
var e = {};
|
|
2143
|
+
return e[p] = r, e[g] = r, X.call(e, o, x.os), S && !e[p] && v && v.platform != "Unknown" && (e[p] = v.platform.replace(/chrome os/i, vn).replace(/macos/i, yn)), e;
|
|
2144
|
+
}, this.getResult = function() {
|
|
2145
|
+
return {
|
|
2146
|
+
ua: this.getUA(),
|
|
2147
|
+
browser: this.getBrowser(),
|
|
2148
|
+
engine: this.getEngine(),
|
|
2149
|
+
os: this.getOS(),
|
|
2150
|
+
device: this.getDevice(),
|
|
2151
|
+
cpu: this.getCPU()
|
|
2152
|
+
};
|
|
2153
|
+
}, this.getUA = function() {
|
|
2154
|
+
return o;
|
|
2155
|
+
}, this.setUA = function(e) {
|
|
2156
|
+
return o = typeof e === u && e.length > w ? Sn(e, w) : e, this;
|
|
2157
|
+
}, this.setUA(o), this;
|
|
2158
|
+
};
|
|
2159
|
+
Z.VERSION = i, Z.BROWSER = q([
|
|
2160
|
+
p,
|
|
2161
|
+
g,
|
|
2162
|
+
d
|
|
2163
|
+
]), Z.CPU = q([_]), Z.DEVICE = q([
|
|
2164
|
+
f,
|
|
2165
|
+
h,
|
|
2166
|
+
m,
|
|
2167
|
+
v,
|
|
2168
|
+
y,
|
|
2169
|
+
x,
|
|
2170
|
+
b,
|
|
2171
|
+
S,
|
|
2172
|
+
C
|
|
2173
|
+
]), Z.ENGINE = Z.OS = q([p, g]), typeof t === c ? typeof n !== c && (n.UAParser = Z) : (e.exports && (t = e.exports = Z), t.UAParser = Z);
|
|
2174
|
+
var Q = typeof n !== c && (n.jQuery || n.Zepto);
|
|
2175
|
+
if (Q && !Q.ua) {
|
|
2176
|
+
var $ = new Z();
|
|
2177
|
+
Q.ua = $.getResult(), Q.ua.get = function() {
|
|
2178
|
+
return $.getUA();
|
|
2179
|
+
}, Q.ua.set = function(e) {
|
|
2180
|
+
$.setUA(e);
|
|
2181
|
+
var t = $.getResult();
|
|
2182
|
+
for (var n in t) Q.ua[n] = t[n];
|
|
2183
|
+
};
|
|
2184
|
+
}
|
|
2185
|
+
})(typeof window == "object" ? window : this);
|
|
2186
|
+
} }, t = {};
|
|
2187
|
+
function n(r) {
|
|
2188
|
+
var i = t[r];
|
|
2189
|
+
if (i !== void 0) return i.exports;
|
|
2190
|
+
var a = t[r] = { exports: {} }, o = !0;
|
|
2191
|
+
try {
|
|
2192
|
+
e[r].call(a.exports, a, a.exports, n), o = !1;
|
|
2193
|
+
} finally {
|
|
2194
|
+
o && delete t[r];
|
|
2195
|
+
}
|
|
2196
|
+
return a.exports;
|
|
2197
|
+
}
|
|
2198
|
+
typeof n < "u" && (n.ab = {}.dirname + "/"), Ye.exports = n(226);
|
|
2199
|
+
})()), Ye.exports;
|
|
2200
|
+
}
|
|
2201
|
+
var kt;
|
|
2202
|
+
function Ut() {
|
|
2203
|
+
return kt || (kt = 1, (function(e) {
|
|
2204
|
+
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
2205
|
+
function t(e, t) {
|
|
2206
|
+
for (var n in t) Object.defineProperty(e, n, {
|
|
2207
|
+
enumerable: !0,
|
|
2208
|
+
get: t[n]
|
|
2209
|
+
});
|
|
2210
|
+
}
|
|
2211
|
+
t(e, {
|
|
2212
|
+
isBot: function() {
|
|
2213
|
+
return i;
|
|
2214
|
+
},
|
|
2215
|
+
userAgent: function() {
|
|
2216
|
+
return o;
|
|
2217
|
+
},
|
|
2218
|
+
userAgentFromString: function() {
|
|
2219
|
+
return a;
|
|
2220
|
+
}
|
|
2221
|
+
});
|
|
2222
|
+
let n = /* @__PURE__ */ r(Rr());
|
|
2223
|
+
function r(e) {
|
|
2224
|
+
return e && e.__esModule ? e : { default: e };
|
|
2225
|
+
}
|
|
2226
|
+
function i(e) {
|
|
2227
|
+
return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e);
|
|
2228
|
+
}
|
|
2229
|
+
function a(e) {
|
|
2230
|
+
return {
|
|
2231
|
+
...(0, n.default)(e),
|
|
2232
|
+
isBot: e === void 0 ? !1 : i(e)
|
|
2233
|
+
};
|
|
2234
|
+
}
|
|
2235
|
+
function o({ headers: e }) {
|
|
2236
|
+
return a(e.get("user-agent") || void 0);
|
|
2237
|
+
}
|
|
2238
|
+
})(Ke)), Ke;
|
|
2239
|
+
}
|
|
2240
|
+
var $e = {}, Dt;
|
|
2241
|
+
function Pr() {
|
|
2242
|
+
return Dt || (Dt = 1, (function(e) {
|
|
2243
|
+
Object.defineProperty(e, "__esModule", { value: !0 }), Object.defineProperty(e, "URLPattern", {
|
|
2244
|
+
enumerable: !0,
|
|
2245
|
+
get: function() {
|
|
2246
|
+
return t;
|
|
2247
|
+
}
|
|
2248
|
+
});
|
|
2249
|
+
let t = typeof URLPattern > "u" ? void 0 : URLPattern;
|
|
2250
|
+
})($e)), $e;
|
|
2251
|
+
}
|
|
2252
|
+
var Mt;
|
|
2253
|
+
function yr() {
|
|
2254
|
+
return Mt || (Mt = 1, (function(e, t) {
|
|
2255
|
+
let n = {
|
|
2256
|
+
NextRequest: gr().NextRequest,
|
|
2257
|
+
NextResponse: Er().NextResponse,
|
|
2258
|
+
ImageResponse: vr().ImageResponse,
|
|
2259
|
+
userAgentFromString: Ut().userAgentFromString,
|
|
2260
|
+
userAgent: Ut().userAgent,
|
|
2261
|
+
URLPattern: Pr().URLPattern
|
|
2262
|
+
};
|
|
2263
|
+
e.exports = n, t.NextRequest = n.NextRequest, t.NextResponse = n.NextResponse, t.ImageResponse = n.ImageResponse, t.userAgentFromString = n.userAgentFromString, t.userAgent = n.userAgent, t.URLPattern = n.URLPattern;
|
|
2264
|
+
})(Ee, Ee.exports)), Ee.exports;
|
|
2265
|
+
}
|
|
2266
|
+
yr();
|
|
2267
|
+
var Ze = /* @__PURE__ */ ((e) => (e[e.login = 0] = "login", e[e.logout = 1] = "logout", e))(Ze || {}), Je = {
|
|
2268
|
+
login: "login",
|
|
2269
|
+
logout: "logout",
|
|
2270
|
+
unknown: ""
|
|
2271
|
+
}, W = "Content-Type", M = {
|
|
2272
|
+
applicationJson: "application/json",
|
|
2273
|
+
multipartFormData: "multipart/form-data",
|
|
2274
|
+
applicationXwwwFormUrlencoded: "application/x-www-form-urlencoded"
|
|
2275
|
+
}, zr = class {
|
|
2276
|
+
config;
|
|
2277
|
+
http;
|
|
2278
|
+
adapter;
|
|
2279
|
+
constructor({ config: e, adapter: t, storage: n }) {
|
|
2280
|
+
this.config = e;
|
|
2281
|
+
let r = Or(n.headers);
|
|
2282
|
+
(!r.deviceId || r.deviceId.trim().length === 0) && (r = xr(n.cookies)), this.http = new kr({
|
|
2283
|
+
...r,
|
|
2284
|
+
userType: e.userType,
|
|
2285
|
+
helloURL: e.helloURL
|
|
2286
|
+
}), this.adapter = t;
|
|
2287
|
+
}
|
|
2288
|
+
async handleRequest(e) {
|
|
2289
|
+
try {
|
|
2290
|
+
let t = await this.adapter.parseRequest(e), n = await this.processRequest(t);
|
|
2291
|
+
return this.adapter.createResponse(n);
|
|
2292
|
+
} catch (e) {
|
|
2293
|
+
L.error({ error: e?.toString() || "Internal server error" }, "ROUTE ERROR");
|
|
2294
|
+
let t = this.createErrorResponse(500, e?.toString() || "Internal server error");
|
|
2295
|
+
return this.adapter.createResponse(t);
|
|
2296
|
+
}
|
|
2297
|
+
}
|
|
2298
|
+
async processRequest(e) {
|
|
2299
|
+
let t = e.url.searchParams, n = t.get("m") ?? "unknown", r = {
|
|
2300
|
+
...Je,
|
|
2301
|
+
...this.config.APIMAP
|
|
2302
|
+
}[n], i = e.cookies;
|
|
2303
|
+
if (this.http.setHttpOptsToCookies(i), !r || r.length === 0) return this.createErrorResponse(404, "API not found", i);
|
|
2304
|
+
let a;
|
|
2305
|
+
if ((r.startsWith("admin/") || r.startsWith("api/")) && (a = Nr(i), L.debug(a, "token"), !a || a.username.length === 0 || a.token.length === 0)) return this.createErrorResponse(409, "Authentication required", i);
|
|
2306
|
+
L.debug({ "content-type": e.contentType }, "Content-Type"), L.debug({
|
|
2307
|
+
hostUrl: r,
|
|
2308
|
+
token: a ? { ...a } : ""
|
|
2309
|
+
}, "processRequest");
|
|
2310
|
+
let s = e.method;
|
|
2311
|
+
if (s === "GET") {
|
|
2312
|
+
let n = tt(t.toString(), ["m"]), i = await this.http.get({
|
|
2313
|
+
url: r,
|
|
2314
|
+
data: n,
|
|
2315
|
+
token: a
|
|
2316
|
+
});
|
|
2317
|
+
return this.createResponse({
|
|
2318
|
+
url: r,
|
|
2319
|
+
result: i,
|
|
2320
|
+
config: this.config,
|
|
2321
|
+
req: e
|
|
2322
|
+
});
|
|
2323
|
+
} else if (s === "POST") {
|
|
2324
|
+
let t, n = e.contentType;
|
|
2325
|
+
if (n.includes(M.applicationJson) || n.includes(M.applicationXwwwFormUrlencoded)) e.body && (t = { ...e.body });
|
|
2326
|
+
else if (n.includes(M.multipartFormData)) {
|
|
2327
|
+
let r = n.match(/boundary=([^\s;]+)/);
|
|
2328
|
+
if (!r || !e.requestFormData) return this.createErrorResponse(411, "Missing boundary in form data", i);
|
|
2329
|
+
let a = e.requestFormData.buffer;
|
|
2330
|
+
t = {
|
|
2331
|
+
boundary: r[1],
|
|
2332
|
+
buffer: Buffer.from(a)
|
|
2333
|
+
};
|
|
2334
|
+
let o = e.requestFormData.formData;
|
|
2335
|
+
if (o) for (let [e, n] of Object.entries(o)) e !== "file" && (t[e] = n);
|
|
2336
|
+
} else return this.createErrorResponse(410, "Unsupported content type", i);
|
|
2337
|
+
let o = await this.http.post({
|
|
2338
|
+
url: r,
|
|
2339
|
+
data: t,
|
|
2340
|
+
token: a
|
|
2341
|
+
});
|
|
2342
|
+
return this.createResponse({
|
|
2343
|
+
url: r,
|
|
2344
|
+
result: o,
|
|
2345
|
+
config: this.config,
|
|
2346
|
+
req: e
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
return this.createErrorResponse(405, "Method not allowed, only supported GET or POST", i);
|
|
2350
|
+
}
|
|
2351
|
+
createResponse({ url: e, result: t, config: n, req: r }) {
|
|
2352
|
+
let i = {};
|
|
2353
|
+
i[W] = M.applicationJson;
|
|
2354
|
+
let a = {
|
|
2355
|
+
status: t.success ? 200 : t.code,
|
|
2356
|
+
headers: i,
|
|
2357
|
+
cookies: this.setCookies(r.cookies),
|
|
2358
|
+
body: t,
|
|
2359
|
+
context: r.context
|
|
2360
|
+
};
|
|
2361
|
+
if (t.success) {
|
|
2362
|
+
switch (e) {
|
|
2363
|
+
case Je[Ze[0]]:
|
|
2364
|
+
let e = t.data;
|
|
2365
|
+
Cr(e, a);
|
|
2366
|
+
break;
|
|
2367
|
+
case Je[Ze[1]]:
|
|
2368
|
+
a.cleanCookies = (e) => Lr(e);
|
|
2369
|
+
break;
|
|
2370
|
+
}
|
|
2371
|
+
n.onHandlerSuccess && n.onHandlerSuccess({
|
|
2372
|
+
url: e,
|
|
2373
|
+
data: t.data,
|
|
2374
|
+
req: r,
|
|
2375
|
+
res: a
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
return a;
|
|
2379
|
+
}
|
|
2380
|
+
createErrorResponse(e, t, n) {
|
|
2381
|
+
let r = {};
|
|
2382
|
+
return r[W] = M.applicationJson, {
|
|
2383
|
+
status: e,
|
|
2384
|
+
headers: r,
|
|
2385
|
+
cookies: n ? this.setCookies(n) : {},
|
|
2386
|
+
body: {
|
|
2387
|
+
code: e,
|
|
2388
|
+
success: !1,
|
|
2389
|
+
msg: t
|
|
2390
|
+
}
|
|
2391
|
+
};
|
|
2392
|
+
}
|
|
2393
|
+
setCookies(e) {
|
|
2394
|
+
let t = {};
|
|
2395
|
+
return Object.entries(e).forEach(([e, n]) => {
|
|
2396
|
+
t[e] = { value: n };
|
|
2397
|
+
}), t;
|
|
2398
|
+
}
|
|
2399
|
+
}, Tr = "zh-CN", U = {
|
|
2400
|
+
IBOOT_DEVICE_ID: "dvid",
|
|
2401
|
+
IBOOT_LANG: "lang",
|
|
2402
|
+
IBOOT_WEBSITE_ID: "wid",
|
|
2403
|
+
IBOOT_WEBSITE_NO: "wno",
|
|
2404
|
+
IBOOT_TOKEN: "token",
|
|
2405
|
+
IBOOT_USER: "user"
|
|
2406
|
+
}, Y = {
|
|
2407
|
+
DEVICE_ID: "Device-Id",
|
|
2408
|
+
LANG: "Lang",
|
|
2409
|
+
WEBSITE_ID: "Website-Id",
|
|
2410
|
+
WEBSITE_NO: "Website-No"
|
|
2411
|
+
}, Or = (e) => {
|
|
2412
|
+
if (e.get) {
|
|
2413
|
+
let t = e.get(Y.DEVICE_ID), n = e.get(Y.LANG), r = e.get(Y.WEBSITE_ID), i = e.get(Y.WEBSITE_NO), a = {};
|
|
2414
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2415
|
+
}
|
|
2416
|
+
throw Error("The get method of IStorage has not been implemented.");
|
|
2417
|
+
}, Jr = (e, t) => {
|
|
2418
|
+
if (e.set) t.deviceId && e.set(Y.DEVICE_ID, t.deviceId), t.lang && e.set(Y.LANG, t.lang), t.websiteId && e.set(Y.WEBSITE_ID, t.websiteId), t.websiteNo && e.set(Y.WEBSITE_NO, t.websiteNo);
|
|
2419
|
+
else throw Error("The set method of IStorage has not been implemented.");
|
|
2420
|
+
}, xr = (e) => {
|
|
2421
|
+
if (e.get) {
|
|
2422
|
+
let t = e.get(U.IBOOT_DEVICE_ID), n = e.get(U.IBOOT_LANG), r = e.get(U.IBOOT_WEBSITE_ID), i = e.get(U.IBOOT_WEBSITE_NO), a = {};
|
|
2423
|
+
return t && t.length > 0 && (a.deviceId = t), n && n.length > 0 && (a.lang = n), r && r.length > 0 && (a.websiteId = r), i && i.length > 0 && (a.websiteNo = i), a;
|
|
2424
|
+
}
|
|
2425
|
+
throw Error("The get method of ICookies has not been implemented.");
|
|
2426
|
+
}, Nr = (e) => {
|
|
2427
|
+
if (e.get) {
|
|
2428
|
+
let t = e[U.IBOOT_USER];
|
|
2429
|
+
if (t && t.length > 0) {
|
|
2430
|
+
let n = JSON.parse(t), r = n.username, i = n.userType.toString(), a = e[U.IBOOT_TOKEN];
|
|
2431
|
+
if (a) return {
|
|
2432
|
+
username: r,
|
|
2433
|
+
utype: i,
|
|
2434
|
+
token: a
|
|
2435
|
+
};
|
|
2436
|
+
}
|
|
2437
|
+
}
|
|
2438
|
+
}, qt = () => ({
|
|
2439
|
+
path: "/",
|
|
2440
|
+
secure: process.env.APP_ENV === "production",
|
|
2441
|
+
httpOnly: !0,
|
|
2442
|
+
sameSite: "strict"
|
|
2443
|
+
}), ve = {
|
|
2444
|
+
maxAge: -1,
|
|
2445
|
+
httpOnly: !0,
|
|
2446
|
+
path: "/"
|
|
2447
|
+
}, Cr = (e, t) => {
|
|
2448
|
+
let { id: n, name: r, username: i, nickname: a, headImg: o, token: s, lastLoginTime: c, deviceId: l, userType: u, mustChangePwd: d } = e, f = {
|
|
2449
|
+
id: n,
|
|
2450
|
+
name: r,
|
|
2451
|
+
username: i,
|
|
2452
|
+
nickname: a || r,
|
|
2453
|
+
headImg: o,
|
|
2454
|
+
lastLoginTime: c,
|
|
2455
|
+
deviceId: l,
|
|
2456
|
+
userType: u,
|
|
2457
|
+
accountType: 0,
|
|
2458
|
+
needToReview: !1,
|
|
2459
|
+
socketOnline: !1,
|
|
2460
|
+
mustChangePwd: d
|
|
2461
|
+
};
|
|
2462
|
+
t.cookies[U.IBOOT_TOKEN] = {
|
|
2463
|
+
value: s,
|
|
2464
|
+
options: qt()
|
|
2465
|
+
}, t.cookies[U.IBOOT_USER] = {
|
|
2466
|
+
value: JSON.stringify(f),
|
|
2467
|
+
options: qt()
|
|
2468
|
+
};
|
|
2469
|
+
}, Lr = (e) => {
|
|
2470
|
+
if (!e.set) throw Error("cookies set function is undefined");
|
|
2471
|
+
if (e.set(U.IBOOT_TOKEN, "", ve), e.set(U.IBOOT_USER, "", ve), !e.delete) throw Error("cookies delete function is undefined");
|
|
2472
|
+
e.delete(U.IBOOT_TOKEN, ve), e.delete(U.IBOOT_USER, ve);
|
|
2473
|
+
}, kr = class {
|
|
2474
|
+
baseUrl;
|
|
2475
|
+
helloMethod;
|
|
2476
|
+
apiKey;
|
|
2477
|
+
userType;
|
|
2478
|
+
userFrom;
|
|
2479
|
+
deviceId;
|
|
2480
|
+
version = "1";
|
|
2481
|
+
lang;
|
|
2482
|
+
websiteId;
|
|
2483
|
+
websiteNo;
|
|
2484
|
+
constructor(e) {
|
|
2485
|
+
process.env.APP_ENV === "production" || L.warn("This is currently a development environment!"), this.baseUrl = process.env.APP_BASEURL, this.apiKey = process.env.APP_APIKEY, this.userFrom = process.env.APP_USERFROM ?? "1", this.helloMethod = e.helloURL ?? "", this.userType = e.userType ?? or.TYPE_MGT, this.deviceId = e.deviceId ?? lt(10), this.lang = e.lang ?? Tr, this.websiteId = e.websiteId, this.websiteNo = e.websiteNo;
|
|
2486
|
+
}
|
|
2487
|
+
encrypt(e) {
|
|
2488
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2489
|
+
return ne.AES.encrypt(e, t).toString();
|
|
2490
|
+
}
|
|
2491
|
+
decrypt(e) {
|
|
2492
|
+
let t = ne.enc.Utf8.parse(this.apiKey);
|
|
2493
|
+
return ne.AES.decrypt(e, t, { mode: ne.mode.ECB }).toString(ne.enc.Utf8);
|
|
2494
|
+
}
|
|
2495
|
+
setHttpOptsToCookies = (e) => {
|
|
2496
|
+
this.deviceId && this.deviceId.length > 0 && (e[U.IBOOT_DEVICE_ID] = this.deviceId), this.websiteId && this.websiteId.length > 0 && (e[U.IBOOT_WEBSITE_ID] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (e[U.IBOOT_WEBSITE_NO] = this.websiteNo), this.lang && this.lang.length > 0 && (e[U.IBOOT_LANG] = this.lang);
|
|
2497
|
+
};
|
|
2498
|
+
convertUrlParameter(e) {
|
|
2499
|
+
let t = [];
|
|
2500
|
+
for (let n in e) {
|
|
2501
|
+
let r = e[n];
|
|
2502
|
+
if (r && typeof r == "string") r = r.trim();
|
|
2503
|
+
else if (r && typeof r == "object") {
|
|
2504
|
+
if (ct(r)) {
|
|
2505
|
+
if (r.length === 0) continue;
|
|
2506
|
+
for (let e = 0; e < r.length; e++) {
|
|
2507
|
+
let i = r[e];
|
|
2508
|
+
for (let r in i) {
|
|
2509
|
+
let a = i[r] ?? void 0;
|
|
2510
|
+
if (a) {
|
|
2511
|
+
if (typeof a == "object") ct(a) && a.forEach((i, a) => {
|
|
2512
|
+
if (i) for (let o in i) {
|
|
2513
|
+
let s = i[o];
|
|
2514
|
+
if (s && s.toString().length > 0) {
|
|
2515
|
+
let i = `[${e.toString()}].${r + `[${a.toString()}].${o}`}=${we(s)}`;
|
|
2516
|
+
t.push(n + i);
|
|
2517
|
+
}
|
|
2518
|
+
}
|
|
2519
|
+
});
|
|
2520
|
+
else if (a.toString().length > 0) {
|
|
2521
|
+
let i = `[${e.toString()}].${r}=${we(a.toString())}`;
|
|
2522
|
+
t.push(n + i);
|
|
2523
|
+
}
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2526
|
+
}
|
|
2527
|
+
} else for (let e in r) {
|
|
2528
|
+
let i = r[e];
|
|
2529
|
+
if (i != null && i != "" && i.length != 0) {
|
|
2530
|
+
let r = `.${e}=${we(i)}`;
|
|
2531
|
+
t.push(n + r);
|
|
2532
|
+
}
|
|
2533
|
+
}
|
|
2534
|
+
continue;
|
|
2535
|
+
} else r && typeof r == "function" && (r = null);
|
|
2536
|
+
r != null && r != "" && r.length != 0 && t.push(n + "=" + we(r));
|
|
2537
|
+
}
|
|
2538
|
+
return t && t.join("&");
|
|
2539
|
+
}
|
|
2540
|
+
async sign(e) {
|
|
2541
|
+
let t = "&key=" + await this.helloIboot(), r = [];
|
|
2542
|
+
for (let t in e) r.push(t);
|
|
2543
|
+
r.sort((e, t) => e.toLowerCase().localeCompare(t.toLowerCase()));
|
|
2544
|
+
let i = [];
|
|
2545
|
+
r.forEach((t) => {
|
|
2546
|
+
let n = e[t];
|
|
2547
|
+
typeof n == "object" && (n = JSON.stringify(n)), i.push(t + "=" + n);
|
|
2548
|
+
});
|
|
2549
|
+
let a = i.join("&"), s = Jt.md5((a + t).toLocaleUpperCase()), c = {
|
|
2550
|
+
params: a,
|
|
2551
|
+
md5: s
|
|
2552
|
+
};
|
|
2553
|
+
return L.debug(c, "API_SIGN"), s;
|
|
2554
|
+
}
|
|
2555
|
+
assemblyParameter(e, t) {
|
|
2556
|
+
let n = e ?? {};
|
|
2557
|
+
return n.timestamp = Date.now() + "", n.echostr = lt(10), n.version = this.version, n.deviceId = this.deviceId, n.webid = this.websiteId, n.apiKey = this.apiKey, t && t.length > 0 && (n.username = t), n;
|
|
2558
|
+
}
|
|
2559
|
+
async assemblyHeader({ urlParams: e, token: t }) {
|
|
2560
|
+
let n = {
|
|
2561
|
+
"Res-Type": "json",
|
|
2562
|
+
"Device-Id": this.deviceId,
|
|
2563
|
+
"User-Type": t?.utype.toString() ?? this.userType.toString(),
|
|
2564
|
+
"User-From": this.userFrom,
|
|
2565
|
+
"Api-Key": this.apiKey
|
|
2566
|
+
};
|
|
2567
|
+
n[W] = M.applicationXwwwFormUrlencoded, this.lang && this.lang.length > 0 && (n.Lang = this.lang), this.websiteId && this.websiteId.length > 0 && (n["Web-Id"] = this.websiteId), this.websiteNo && this.websiteNo.length > 0 && (n["Web-No"] = this.websiteNo), t && (t.token && t.token.length > 0 && t.username && t.username.length > 0 && (n.Authorization = t.token, n.Username = t.username), t.xcsrf && (n[t.xcsrf.csrfHeader] = t.xcsrf.csrfToken));
|
|
2568
|
+
let r = tt(e);
|
|
2569
|
+
return n.Sign = await this.sign(r), n;
|
|
2570
|
+
}
|
|
2571
|
+
async helloIboot() {
|
|
2572
|
+
if (this.helloMethod.length <= 0) return this.apiKey;
|
|
2573
|
+
let e = this.getApiUrl(this.helloMethod), t = {
|
|
2574
|
+
"Res-Type": "json",
|
|
2575
|
+
"Api-Key": this.apiKey
|
|
2576
|
+
};
|
|
2577
|
+
t[W] = M.applicationXwwwFormUrlencoded;
|
|
2578
|
+
let n = {
|
|
2579
|
+
url: e,
|
|
2580
|
+
headers: t
|
|
2581
|
+
};
|
|
2582
|
+
L.debug(n, "HELLO");
|
|
2583
|
+
let r = await fetch(e, {
|
|
2584
|
+
method: "GET",
|
|
2585
|
+
headers: t,
|
|
2586
|
+
credentials: "include",
|
|
2587
|
+
cache: "force-cache"
|
|
2588
|
+
});
|
|
2589
|
+
if (r.ok) {
|
|
2590
|
+
let e = await r.json();
|
|
2591
|
+
return L.debug(e.data, "HELLO RESULT"), e.data;
|
|
2592
|
+
}
|
|
2593
|
+
throw Error("hello iBoot error!");
|
|
2594
|
+
}
|
|
2595
|
+
getApiUrl(e) {
|
|
2596
|
+
return `${this.baseUrl}/${e}`;
|
|
2597
|
+
}
|
|
2598
|
+
async csrf() {
|
|
2599
|
+
let e = await this.get({ url: "guest/csrf" });
|
|
2600
|
+
if (e.success) {
|
|
2601
|
+
let t = e.data;
|
|
2602
|
+
if (t) return t.csrfToken.toString();
|
|
2603
|
+
}
|
|
2604
|
+
}
|
|
2605
|
+
async get({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2606
|
+
let i = this.assemblyParameter(t), a = this.convertUrlParameter(i), s = await this.assemblyHeader({
|
|
2607
|
+
urlParams: a,
|
|
2608
|
+
token: n
|
|
2609
|
+
}), c = `${this.getApiUrl(e)}?${a.toString()}`, l = {
|
|
2610
|
+
url: c,
|
|
2611
|
+
headers: s
|
|
2612
|
+
};
|
|
2613
|
+
L.info(l, "GET");
|
|
2614
|
+
let u = await fetch(c, {
|
|
2615
|
+
method: "GET",
|
|
2616
|
+
headers: s,
|
|
2617
|
+
credentials: "include",
|
|
2618
|
+
cache: r
|
|
2619
|
+
});
|
|
2620
|
+
if (u.ok) {
|
|
2621
|
+
let e = Object.fromEntries(u.headers.entries()), t = {
|
|
2622
|
+
...await u.json(),
|
|
2623
|
+
headers: e
|
|
2624
|
+
};
|
|
2625
|
+
return L.debug(t, "GET_RESULT"), t;
|
|
2626
|
+
}
|
|
2627
|
+
let d = {
|
|
2628
|
+
code: u.status,
|
|
2629
|
+
success: !1,
|
|
2630
|
+
msg: u.statusText
|
|
2631
|
+
};
|
|
2632
|
+
return L.error(d), d;
|
|
2633
|
+
}
|
|
2634
|
+
async post({ url: e, data: t, token: n, cache: r = "default" }) {
|
|
2635
|
+
let i = t ? { ...t } : {}, a = i.buffer ?? void 0, s = i.boundary ?? void 0;
|
|
2636
|
+
a && delete i.buffer, s && delete i.boundary;
|
|
2637
|
+
let c = this.assemblyParameter(i), l = this.convertUrlParameter(c), u = await this.assemblyHeader({
|
|
2638
|
+
urlParams: l,
|
|
2639
|
+
token: n
|
|
2640
|
+
});
|
|
2641
|
+
a && s && (u["Content-Type"] = `multipart/form-data; boundary=${s}`);
|
|
2642
|
+
let d = this.getApiUrl(e), f = {
|
|
2643
|
+
url: d,
|
|
2644
|
+
headers: u,
|
|
2645
|
+
params: c
|
|
2646
|
+
};
|
|
2647
|
+
L.info(f, "POST");
|
|
2648
|
+
let p = a ? `${d}?${l}` : d, m = await fetch(p, {
|
|
2649
|
+
method: "POST",
|
|
2650
|
+
headers: u,
|
|
2651
|
+
body: a || l,
|
|
2652
|
+
credentials: "include",
|
|
2653
|
+
cache: r
|
|
2654
|
+
});
|
|
2655
|
+
if (m.ok) {
|
|
2656
|
+
let e = Object.fromEntries(m.headers.entries()), t = {
|
|
2657
|
+
...await m.json(),
|
|
2658
|
+
headers: e
|
|
2659
|
+
};
|
|
2660
|
+
return L.debug(t, "POST_RESULT"), t;
|
|
2661
|
+
}
|
|
2662
|
+
let h = {
|
|
2663
|
+
code: m.status,
|
|
2664
|
+
success: !1,
|
|
2665
|
+
msg: m.statusText
|
|
2666
|
+
};
|
|
2667
|
+
return L.error(h), h;
|
|
2668
|
+
}
|
|
2669
|
+
async stream({ url: e, data: t, token: n }) {
|
|
2670
|
+
t = t ? { ...t } : {};
|
|
2671
|
+
let r = t.buffer ?? void 0, i = t.boundary ?? void 0;
|
|
2672
|
+
r && delete t.buffer, i && delete t.boundary;
|
|
2673
|
+
let a = this.assemblyParameter(t), s = this.convertUrlParameter(a), c = await this.assemblyHeader({
|
|
2674
|
+
urlParams: s,
|
|
2675
|
+
token: n
|
|
2676
|
+
});
|
|
2677
|
+
r && i && (c["Content-Type"] = `multipart/form-data; boundary=${i}`), c.Connection = "keep-alive", c["X-Accel-Buffering"] = "no", c["Cache-Control"] = "no-cache";
|
|
2678
|
+
let l = this.getApiUrl(e);
|
|
2679
|
+
try {
|
|
2680
|
+
let e = r ? `${l}?${s}` : l, t = {
|
|
2681
|
+
url: l,
|
|
2682
|
+
headers: c,
|
|
2683
|
+
params: a
|
|
2684
|
+
};
|
|
2685
|
+
L.info(t, "STREAM");
|
|
2686
|
+
let n = await fetch(e, {
|
|
2687
|
+
method: "POST",
|
|
2688
|
+
headers: c,
|
|
2689
|
+
body: r || s.toString(),
|
|
2690
|
+
credentials: "include"
|
|
2691
|
+
});
|
|
2692
|
+
if (!n.ok) throw Error(`HTTP error! status: ${n.status}`);
|
|
2693
|
+
if (!n.body) throw Error("No response body");
|
|
2694
|
+
let i = Object.fromEntries(n.headers.entries());
|
|
2695
|
+
return new Response(n.body, { headers: i });
|
|
2696
|
+
} catch (e) {
|
|
2697
|
+
throw e;
|
|
2698
|
+
}
|
|
2699
|
+
}
|
|
2700
|
+
}, baseUrl = {
|
|
2701
|
+
site: "guest/site/",
|
|
2702
|
+
shop: "guest/site/shop/"
|
|
2703
|
+
}, buildEmptyPageInfo = ({ pageNo: e, pageSize: t }) => ({
|
|
2704
|
+
total: 0,
|
|
2705
|
+
pageNo: e,
|
|
2706
|
+
pageSize: t,
|
|
2707
|
+
pageCount: 0,
|
|
2708
|
+
first: !0,
|
|
2709
|
+
last: !0,
|
|
2710
|
+
content: []
|
|
2711
|
+
});
|
|
2712
|
+
const helloURL = `${baseUrl.site}helloIBoot`;
|
|
2713
|
+
var ICMSServer = class {
|
|
2714
|
+
http;
|
|
2715
|
+
constructor(e) {
|
|
2716
|
+
this.http = new kr({
|
|
2717
|
+
deviceId: e?.deviceId,
|
|
2718
|
+
lang: e?.lang,
|
|
2719
|
+
websiteId: e?.websiteId,
|
|
2720
|
+
websiteNo: e?.websiteNo,
|
|
2721
|
+
userType: or.TYPE_C,
|
|
2722
|
+
helloURL
|
|
2723
|
+
}), console.log("env >>> ", process.env.NODE_ENV);
|
|
2724
|
+
}
|
|
2725
|
+
async helloWebsite(e) {
|
|
2726
|
+
let t = baseUrl.site + "helloWebsite", n = await this.http.get({ url: t });
|
|
2727
|
+
if (n.success) {
|
|
2728
|
+
let t = n.headers;
|
|
2729
|
+
if (e && t) {
|
|
2730
|
+
let n = t["device-id"], r = t.lang, i = t["web-id"], a = t["web-no"], o = {};
|
|
2731
|
+
n && n.length > 0 && (o.deviceId = n), r && r.length > 0 && (o.lang = r), i && i.length > 0 && (o.websiteId = i), a && a.length > 0 && (o.websiteNo = a), Jr(e, o);
|
|
2732
|
+
}
|
|
2733
|
+
}
|
|
2734
|
+
}
|
|
2735
|
+
async loadI18nList() {
|
|
2736
|
+
let e = baseUrl.site + "i18nList", t = await this.http.get({ url: e });
|
|
2737
|
+
return t.success ? t.data ?? [] : [];
|
|
2738
|
+
}
|
|
2739
|
+
async loadWebsite(e) {
|
|
2740
|
+
let t = baseUrl.site + "currentWebSite", n = await this.http.get({
|
|
2741
|
+
url: t,
|
|
2742
|
+
data: {
|
|
2743
|
+
showNav: e?.showNav ?? "true",
|
|
2744
|
+
showFriendLink: e?.showFriendLink ?? "false"
|
|
2745
|
+
}
|
|
2746
|
+
});
|
|
2747
|
+
if (n.success) {
|
|
2748
|
+
let t = n.data, r = t.seoProps;
|
|
2749
|
+
return {
|
|
2750
|
+
website: t,
|
|
2751
|
+
metadata: {
|
|
2752
|
+
title: r?.title,
|
|
2753
|
+
description: r?.description,
|
|
2754
|
+
keywords: r?.keywords,
|
|
2755
|
+
authors: {
|
|
2756
|
+
url: "https://www.icms.xin",
|
|
2757
|
+
name: "iCMS"
|
|
2758
|
+
}
|
|
2759
|
+
},
|
|
2760
|
+
i18nSites: e?.showI18NList ? await this.loadI18nList() : []
|
|
2761
|
+
};
|
|
2762
|
+
}
|
|
2763
|
+
throw Error(n.msg);
|
|
2764
|
+
}
|
|
2765
|
+
async loadChannels(e) {
|
|
2766
|
+
let t = baseUrl.site + "getChannelListByNo", n = await this.http.get({
|
|
2767
|
+
url: t,
|
|
2768
|
+
data: { ...e }
|
|
2769
|
+
});
|
|
2770
|
+
if (n.success) return n.data ?? [];
|
|
2771
|
+
throw Error(n.msg);
|
|
2772
|
+
}
|
|
2773
|
+
async loadChannelById(e) {
|
|
2774
|
+
let t = baseUrl.site + "getChannelById", n = await this.http.get({
|
|
2775
|
+
url: t,
|
|
2776
|
+
data: { ...e }
|
|
2777
|
+
});
|
|
2778
|
+
if (n.success) return n.data;
|
|
2779
|
+
throw Error(n.msg);
|
|
2780
|
+
}
|
|
2781
|
+
async loadChannelByNo(e) {
|
|
2782
|
+
let t = baseUrl.site + "getChannelByNo", n = await this.http.get({
|
|
2783
|
+
url: t,
|
|
2784
|
+
data: { ...e }
|
|
2785
|
+
});
|
|
2786
|
+
if (n.success) return n.data;
|
|
2787
|
+
throw Error(n.msg);
|
|
2788
|
+
}
|
|
2789
|
+
async loadChannelByUri(e) {
|
|
2790
|
+
let t = baseUrl.site + "getChannelByUrl", n = await this.http.get({
|
|
2791
|
+
url: t,
|
|
2792
|
+
data: { ...e }
|
|
2793
|
+
});
|
|
2794
|
+
if (n.success) return n.data;
|
|
2795
|
+
throw Error(n.msg);
|
|
2796
|
+
}
|
|
2797
|
+
async loadProductDetail(e) {
|
|
2798
|
+
let t = baseUrl.site + "getProduct", n = await this.http.get({
|
|
2799
|
+
url: t,
|
|
2800
|
+
data: { proId: e }
|
|
2801
|
+
});
|
|
2802
|
+
if (n.success) return n.data;
|
|
2803
|
+
throw Error(n.msg);
|
|
2804
|
+
}
|
|
2805
|
+
async loadProductPageInfo(e) {
|
|
2806
|
+
let t = baseUrl.site + "searchProductForPage", n = await this.http.get({
|
|
2807
|
+
url: t,
|
|
2808
|
+
data: { ...e }
|
|
2809
|
+
});
|
|
2810
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2811
|
+
pageNo: e.pageNo,
|
|
2812
|
+
pageSize: e.pageSize
|
|
2813
|
+
});
|
|
2814
|
+
throw Error(n.msg);
|
|
2815
|
+
}
|
|
2816
|
+
async loadProductPageInfoByGroup(e) {
|
|
2817
|
+
let t = baseUrl.site + "searchProductForPageByGroup", n = await this.http.get({
|
|
2818
|
+
url: t,
|
|
2819
|
+
data: { ...e }
|
|
2820
|
+
});
|
|
2821
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2822
|
+
pageNo: e.pageNo,
|
|
2823
|
+
pageSize: e.pageSize
|
|
2824
|
+
});
|
|
2825
|
+
throw Error(n.msg);
|
|
2826
|
+
}
|
|
2827
|
+
async loadProductListByGroupId(e) {
|
|
2828
|
+
let t = baseUrl.site + "searchProductByGroup", n = await this.http.get({
|
|
2829
|
+
url: t,
|
|
2830
|
+
data: { ...e }
|
|
2831
|
+
});
|
|
2832
|
+
if (n.success) return n.data ?? [];
|
|
2833
|
+
throw Error(n.msg);
|
|
2834
|
+
}
|
|
2835
|
+
async loadNewsDetail(e) {
|
|
2836
|
+
let t = baseUrl.site + "getNewsDetail", n = await this.http.get({
|
|
2837
|
+
url: t,
|
|
2838
|
+
data: { newId: e }
|
|
2839
|
+
});
|
|
2840
|
+
if (n.success) return n.data;
|
|
2841
|
+
throw Error(n.msg);
|
|
2842
|
+
}
|
|
2843
|
+
async loadNewsPageInfo(e) {
|
|
2844
|
+
let t = baseUrl.site + "searchNewsForPage", n = await this.http.get({
|
|
2845
|
+
url: t,
|
|
2846
|
+
data: { ...e }
|
|
2847
|
+
});
|
|
2848
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2849
|
+
pageNo: e.pageNo,
|
|
2850
|
+
pageSize: e.pageSize
|
|
2851
|
+
});
|
|
2852
|
+
throw Error(n.msg);
|
|
2853
|
+
}
|
|
2854
|
+
async loadNewsPageInfoByGroupId(e) {
|
|
2855
|
+
let t = baseUrl.site + "searchNewsForPageByGroup", n = await this.http.get({
|
|
2856
|
+
url: t,
|
|
2857
|
+
data: { ...e }
|
|
2858
|
+
});
|
|
2859
|
+
if (n.success) return n.data ?? buildEmptyPageInfo({
|
|
2860
|
+
pageNo: e.pageNo,
|
|
2861
|
+
pageSize: e.pageSize
|
|
2862
|
+
});
|
|
2863
|
+
throw Error(n.msg);
|
|
2864
|
+
}
|
|
2865
|
+
async loadNewsListByGroupId(e) {
|
|
2866
|
+
let t = baseUrl.site + "searchNewsByGroup", n = await this.http.get({
|
|
2867
|
+
url: t,
|
|
2868
|
+
data: { ...e }
|
|
2869
|
+
});
|
|
2870
|
+
if (n.success) return n.data ?? [];
|
|
2871
|
+
throw Error(n.msg);
|
|
2872
|
+
}
|
|
2873
|
+
async loadReviewList(e) {
|
|
2874
|
+
let t = baseUrl.site + "getReviewList", n = await this.http.get({
|
|
2875
|
+
url: t,
|
|
2876
|
+
data: {
|
|
2877
|
+
...e,
|
|
2878
|
+
rowCount: e.rowCount ?? 20
|
|
2879
|
+
}
|
|
2880
|
+
});
|
|
2881
|
+
if (n.success) return n.data ?? [];
|
|
2882
|
+
throw Error(n.msg);
|
|
2883
|
+
}
|
|
2884
|
+
}, APIMAP = {};
|
|
2885
|
+
const icmsRouter = async ({ request: e, routeAdapter: t, storage: n }) => {
|
|
2886
|
+
let r = xr(n.cookies), a = new ICMSServer(r);
|
|
2887
|
+
return (!r.websiteId || r.websiteId.trim().length === 0) && await a.helloWebsite(n.headers), await new zr({
|
|
2888
|
+
config: {
|
|
2889
|
+
userType: or.TYPE_B,
|
|
2890
|
+
APIMAP,
|
|
2891
|
+
helloURL
|
|
2892
|
+
},
|
|
2893
|
+
adapter: t,
|
|
2894
|
+
storage: n
|
|
2895
|
+
}).handleRequest(e);
|
|
2896
|
+
};
|
|
2897
|
+
export { ICMSServer, helloURL, icmsRouter };
|
|
2898
|
+
|
|
2899
|
+
//# sourceMappingURL=icms-api.es.js.map
|