replicas-cli 0.2.235 → 0.2.238

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.
Files changed (34) hide show
  1. package/dist/bowser-LNTEZM7F.mjs +2822 -0
  2. package/dist/chunk-GFYYBNVD.mjs +1058 -0
  3. package/dist/chunk-JD4YWBM3.mjs +581 -0
  4. package/dist/chunk-MNYGWPEL.mjs +2883 -0
  5. package/dist/chunk-NSGUCXRX.mjs +2101 -0
  6. package/dist/chunk-Q4H42355.mjs +439 -0
  7. package/dist/chunk-YXYUVLIU.mjs +1498 -0
  8. package/dist/{dist-es-FTV27CJE.mjs → dist-es-5WXCQCPW.mjs} +4 -3
  9. package/dist/{dist-es-76ZS5ZGX.mjs → dist-es-JEMIHEYU.mjs} +47 -51
  10. package/dist/{dist-es-MVWFIO2N.mjs → dist-es-KEPB4XGD.mjs} +9 -10
  11. package/dist/{dist-es-DRC4RUDF.mjs → dist-es-Q57UUSDX.mjs} +22 -34
  12. package/dist/{dist-es-TKQAVPOM.mjs → dist-es-RN7CGM2B.mjs} +25 -23
  13. package/dist/{dist-es-PGBT2GSM.mjs → dist-es-SCGGKOX2.mjs} +27 -32
  14. package/dist/{dist-es-X7XEFTLU.mjs → dist-es-ZDCSDOKR.mjs} +10 -11
  15. package/dist/event-streams-UPDOZQOC.mjs +1274 -0
  16. package/dist/index.mjs +190 -171
  17. package/dist/{loadSso-PADWQIUG.mjs → loadSso-ABHII4GO.mjs} +84 -61
  18. package/dist/{signin-4DZRTUJH.mjs → signin-PHZQKMQ4.mjs} +94 -82
  19. package/dist/{sso-oidc-VICR4TNH.mjs → sso-oidc-YWYT5VLS.mjs} +102 -63
  20. package/dist/{sts-WJPOT3CH.mjs → sts-LQIL7WOF.mjs} +4964 -5055
  21. package/package.json +1 -1
  22. package/dist/chunk-4KZFIKR3.mjs +0 -5730
  23. package/dist/chunk-6E4PAXC5.mjs +0 -65
  24. package/dist/chunk-75QHZ6FC.mjs +0 -52
  25. package/dist/chunk-AEKGTTWT.mjs +0 -42
  26. package/dist/chunk-CEE3Y7RM.mjs +0 -14
  27. package/dist/chunk-H57WOA7R.mjs +0 -883
  28. package/dist/chunk-HMKFI7SL.mjs +0 -242
  29. package/dist/chunk-K7B6G3FP.mjs +0 -175
  30. package/dist/chunk-KHHYAMUK.mjs +0 -164
  31. package/dist/chunk-S6VA5TIO.mjs +0 -44
  32. package/dist/chunk-W27BU2E4.mjs +0 -1038
  33. package/dist/chunk-YZ62XZX5.mjs +0 -29
  34. package/dist/event-streams-S7HDVT33.mjs +0 -255
@@ -0,0 +1,2822 @@
1
+ #!/usr/bin/env bun
2
+ import "./chunk-FFDYI4OH.mjs";
3
+
4
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/constants.js
5
+ var BROWSER_ALIASES_MAP = {
6
+ AmazonBot: "amazonbot",
7
+ "Amazon Silk": "amazon_silk",
8
+ "Android Browser": "android",
9
+ BaiduSpider: "baiduspider",
10
+ Bada: "bada",
11
+ BingCrawler: "bingcrawler",
12
+ Brave: "brave",
13
+ BlackBerry: "blackberry",
14
+ "ChatGPT-User": "chatgpt_user",
15
+ Chrome: "chrome",
16
+ ClaudeBot: "claudebot",
17
+ Chromium: "chromium",
18
+ Diffbot: "diffbot",
19
+ DuckDuckBot: "duckduckbot",
20
+ DuckDuckGo: "duckduckgo",
21
+ Electron: "electron",
22
+ Epiphany: "epiphany",
23
+ FacebookExternalHit: "facebookexternalhit",
24
+ Firefox: "firefox",
25
+ Focus: "focus",
26
+ Generic: "generic",
27
+ "Google Search": "google_search",
28
+ Googlebot: "googlebot",
29
+ GPTBot: "gptbot",
30
+ "Internet Explorer": "ie",
31
+ InternetArchiveCrawler: "internetarchivecrawler",
32
+ "K-Meleon": "k_meleon",
33
+ LibreWolf: "librewolf",
34
+ Linespider: "linespider",
35
+ Maxthon: "maxthon",
36
+ "Meta-ExternalAds": "meta_externalads",
37
+ "Meta-ExternalAgent": "meta_externalagent",
38
+ "Meta-ExternalFetcher": "meta_externalfetcher",
39
+ "Meta-WebIndexer": "meta_webindexer",
40
+ "Microsoft Edge": "edge",
41
+ "MZ Browser": "mz",
42
+ "NAVER Whale Browser": "naver",
43
+ "OAI-SearchBot": "oai_searchbot",
44
+ Omgilibot: "omgilibot",
45
+ Opera: "opera",
46
+ "Opera Coast": "opera_coast",
47
+ "Pale Moon": "pale_moon",
48
+ PerplexityBot: "perplexitybot",
49
+ "Perplexity-User": "perplexity_user",
50
+ PhantomJS: "phantomjs",
51
+ PingdomBot: "pingdombot",
52
+ Puffin: "puffin",
53
+ QQ: "qq",
54
+ QQLite: "qqlite",
55
+ QupZilla: "qupzilla",
56
+ Roku: "roku",
57
+ Safari: "safari",
58
+ Sailfish: "sailfish",
59
+ "Samsung Internet for Android": "samsung_internet",
60
+ SlackBot: "slackbot",
61
+ SeaMonkey: "seamonkey",
62
+ Sleipnir: "sleipnir",
63
+ "Sogou Browser": "sogou",
64
+ Swing: "swing",
65
+ Tizen: "tizen",
66
+ "UC Browser": "uc",
67
+ Vivaldi: "vivaldi",
68
+ "WebOS Browser": "webos",
69
+ WeChat: "wechat",
70
+ YahooSlurp: "yahooslurp",
71
+ "Yandex Browser": "yandex",
72
+ YandexBot: "yandexbot",
73
+ YouBot: "youbot"
74
+ };
75
+ var BROWSER_MAP = {
76
+ amazonbot: "AmazonBot",
77
+ amazon_silk: "Amazon Silk",
78
+ android: "Android Browser",
79
+ baiduspider: "BaiduSpider",
80
+ bada: "Bada",
81
+ bingcrawler: "BingCrawler",
82
+ blackberry: "BlackBerry",
83
+ brave: "Brave",
84
+ chatgpt_user: "ChatGPT-User",
85
+ chrome: "Chrome",
86
+ claudebot: "ClaudeBot",
87
+ chromium: "Chromium",
88
+ diffbot: "Diffbot",
89
+ duckduckbot: "DuckDuckBot",
90
+ duckduckgo: "DuckDuckGo",
91
+ edge: "Microsoft Edge",
92
+ electron: "Electron",
93
+ epiphany: "Epiphany",
94
+ facebookexternalhit: "FacebookExternalHit",
95
+ firefox: "Firefox",
96
+ focus: "Focus",
97
+ generic: "Generic",
98
+ google_search: "Google Search",
99
+ googlebot: "Googlebot",
100
+ gptbot: "GPTBot",
101
+ ie: "Internet Explorer",
102
+ internetarchivecrawler: "InternetArchiveCrawler",
103
+ k_meleon: "K-Meleon",
104
+ librewolf: "LibreWolf",
105
+ linespider: "Linespider",
106
+ maxthon: "Maxthon",
107
+ meta_externalads: "Meta-ExternalAds",
108
+ meta_externalagent: "Meta-ExternalAgent",
109
+ meta_externalfetcher: "Meta-ExternalFetcher",
110
+ meta_webindexer: "Meta-WebIndexer",
111
+ mz: "MZ Browser",
112
+ naver: "NAVER Whale Browser",
113
+ oai_searchbot: "OAI-SearchBot",
114
+ omgilibot: "Omgilibot",
115
+ opera: "Opera",
116
+ opera_coast: "Opera Coast",
117
+ pale_moon: "Pale Moon",
118
+ perplexitybot: "PerplexityBot",
119
+ perplexity_user: "Perplexity-User",
120
+ phantomjs: "PhantomJS",
121
+ pingdombot: "PingdomBot",
122
+ puffin: "Puffin",
123
+ qq: "QQ Browser",
124
+ qqlite: "QQ Browser Lite",
125
+ qupzilla: "QupZilla",
126
+ roku: "Roku",
127
+ safari: "Safari",
128
+ sailfish: "Sailfish",
129
+ samsung_internet: "Samsung Internet for Android",
130
+ seamonkey: "SeaMonkey",
131
+ slackbot: "SlackBot",
132
+ sleipnir: "Sleipnir",
133
+ sogou: "Sogou Browser",
134
+ swing: "Swing",
135
+ tizen: "Tizen",
136
+ uc: "UC Browser",
137
+ vivaldi: "Vivaldi",
138
+ webos: "WebOS Browser",
139
+ wechat: "WeChat",
140
+ yahooslurp: "YahooSlurp",
141
+ yandex: "Yandex Browser",
142
+ yandexbot: "YandexBot",
143
+ youbot: "YouBot"
144
+ };
145
+ var PLATFORMS_MAP = {
146
+ bot: "bot",
147
+ desktop: "desktop",
148
+ mobile: "mobile",
149
+ tablet: "tablet",
150
+ tv: "tv"
151
+ };
152
+ var OS_MAP = {
153
+ Android: "Android",
154
+ Bada: "Bada",
155
+ BlackBerry: "BlackBerry",
156
+ ChromeOS: "Chrome OS",
157
+ HarmonyOS: "HarmonyOS",
158
+ iOS: "iOS",
159
+ Linux: "Linux",
160
+ MacOS: "macOS",
161
+ PlayStation4: "PlayStation 4",
162
+ Roku: "Roku",
163
+ Tizen: "Tizen",
164
+ WebOS: "WebOS",
165
+ Windows: "Windows",
166
+ WindowsPhone: "Windows Phone"
167
+ };
168
+ var ENGINE_MAP = {
169
+ Blink: "Blink",
170
+ EdgeHTML: "EdgeHTML",
171
+ Gecko: "Gecko",
172
+ Presto: "Presto",
173
+ Trident: "Trident",
174
+ WebKit: "WebKit"
175
+ };
176
+
177
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/utils.js
178
+ var Utils = class _Utils {
179
+ /**
180
+ * Get first matched item for a string
181
+ * @param {RegExp} regexp
182
+ * @param {String} ua
183
+ * @return {Array|{index: number, input: string}|*|boolean|string}
184
+ */
185
+ static getFirstMatch(regexp, ua) {
186
+ const match = ua.match(regexp);
187
+ return match && match.length > 0 && match[1] || "";
188
+ }
189
+ /**
190
+ * Get second matched item for a string
191
+ * @param regexp
192
+ * @param {String} ua
193
+ * @return {Array|{index: number, input: string}|*|boolean|string}
194
+ */
195
+ static getSecondMatch(regexp, ua) {
196
+ const match = ua.match(regexp);
197
+ return match && match.length > 1 && match[2] || "";
198
+ }
199
+ /**
200
+ * Match a regexp and return a constant or undefined
201
+ * @param {RegExp} regexp
202
+ * @param {String} ua
203
+ * @param {*} _const Any const that will be returned if regexp matches the string
204
+ * @return {*}
205
+ */
206
+ static matchAndReturnConst(regexp, ua, _const) {
207
+ if (regexp.test(ua)) {
208
+ return _const;
209
+ }
210
+ return void 0;
211
+ }
212
+ static getWindowsVersionName(version) {
213
+ switch (version) {
214
+ case "NT":
215
+ return "NT";
216
+ case "XP":
217
+ return "XP";
218
+ case "NT 5.0":
219
+ return "2000";
220
+ case "NT 5.1":
221
+ return "XP";
222
+ case "NT 5.2":
223
+ return "2003";
224
+ case "NT 6.0":
225
+ return "Vista";
226
+ case "NT 6.1":
227
+ return "7";
228
+ case "NT 6.2":
229
+ return "8";
230
+ case "NT 6.3":
231
+ return "8.1";
232
+ case "NT 10.0":
233
+ return "10";
234
+ default:
235
+ return void 0;
236
+ }
237
+ }
238
+ /**
239
+ * Get macOS version name
240
+ * 10.5 - Leopard
241
+ * 10.6 - Snow Leopard
242
+ * 10.7 - Lion
243
+ * 10.8 - Mountain Lion
244
+ * 10.9 - Mavericks
245
+ * 10.10 - Yosemite
246
+ * 10.11 - El Capitan
247
+ * 10.12 - Sierra
248
+ * 10.13 - High Sierra
249
+ * 10.14 - Mojave
250
+ * 10.15 - Catalina
251
+ * 11 - Big Sur
252
+ * 12 - Monterey
253
+ * 13 - Ventura
254
+ * 14 - Sonoma
255
+ * 15 - Sequoia
256
+ *
257
+ * @example
258
+ * getMacOSVersionName("10.14") // 'Mojave'
259
+ *
260
+ * @param {string} version
261
+ * @return {string} versionName
262
+ */
263
+ static getMacOSVersionName(version) {
264
+ const v = version.split(".").splice(0, 2).map((s) => parseInt(s, 10) || 0);
265
+ v.push(0);
266
+ const major = v[0];
267
+ const minor = v[1];
268
+ if (major === 10) {
269
+ switch (minor) {
270
+ case 5:
271
+ return "Leopard";
272
+ case 6:
273
+ return "Snow Leopard";
274
+ case 7:
275
+ return "Lion";
276
+ case 8:
277
+ return "Mountain Lion";
278
+ case 9:
279
+ return "Mavericks";
280
+ case 10:
281
+ return "Yosemite";
282
+ case 11:
283
+ return "El Capitan";
284
+ case 12:
285
+ return "Sierra";
286
+ case 13:
287
+ return "High Sierra";
288
+ case 14:
289
+ return "Mojave";
290
+ case 15:
291
+ return "Catalina";
292
+ default:
293
+ return void 0;
294
+ }
295
+ }
296
+ switch (major) {
297
+ case 11:
298
+ return "Big Sur";
299
+ case 12:
300
+ return "Monterey";
301
+ case 13:
302
+ return "Ventura";
303
+ case 14:
304
+ return "Sonoma";
305
+ case 15:
306
+ return "Sequoia";
307
+ default:
308
+ return void 0;
309
+ }
310
+ }
311
+ /**
312
+ * Get Android version name
313
+ * 1.5 - Cupcake
314
+ * 1.6 - Donut
315
+ * 2.0 - Eclair
316
+ * 2.1 - Eclair
317
+ * 2.2 - Froyo
318
+ * 2.x - Gingerbread
319
+ * 3.x - Honeycomb
320
+ * 4.0 - Ice Cream Sandwich
321
+ * 4.1 - Jelly Bean
322
+ * 4.4 - KitKat
323
+ * 5.x - Lollipop
324
+ * 6.x - Marshmallow
325
+ * 7.x - Nougat
326
+ * 8.x - Oreo
327
+ * 9.x - Pie
328
+ *
329
+ * @example
330
+ * getAndroidVersionName("7.0") // 'Nougat'
331
+ *
332
+ * @param {string} version
333
+ * @return {string} versionName
334
+ */
335
+ static getAndroidVersionName(version) {
336
+ const v = version.split(".").splice(0, 2).map((s) => parseInt(s, 10) || 0);
337
+ v.push(0);
338
+ if (v[0] === 1 && v[1] < 5) return void 0;
339
+ if (v[0] === 1 && v[1] < 6) return "Cupcake";
340
+ if (v[0] === 1 && v[1] >= 6) return "Donut";
341
+ if (v[0] === 2 && v[1] < 2) return "Eclair";
342
+ if (v[0] === 2 && v[1] === 2) return "Froyo";
343
+ if (v[0] === 2 && v[1] > 2) return "Gingerbread";
344
+ if (v[0] === 3) return "Honeycomb";
345
+ if (v[0] === 4 && v[1] < 1) return "Ice Cream Sandwich";
346
+ if (v[0] === 4 && v[1] < 4) return "Jelly Bean";
347
+ if (v[0] === 4 && v[1] >= 4) return "KitKat";
348
+ if (v[0] === 5) return "Lollipop";
349
+ if (v[0] === 6) return "Marshmallow";
350
+ if (v[0] === 7) return "Nougat";
351
+ if (v[0] === 8) return "Oreo";
352
+ if (v[0] === 9) return "Pie";
353
+ return void 0;
354
+ }
355
+ /**
356
+ * Get version precisions count
357
+ *
358
+ * @example
359
+ * getVersionPrecision("1.10.3") // 3
360
+ *
361
+ * @param {string} version
362
+ * @return {number}
363
+ */
364
+ static getVersionPrecision(version) {
365
+ return version.split(".").length;
366
+ }
367
+ /**
368
+ * Calculate browser version weight
369
+ *
370
+ * @example
371
+ * compareVersions('1.10.2.1', '1.8.2.1.90') // 1
372
+ * compareVersions('1.010.2.1', '1.09.2.1.90'); // 1
373
+ * compareVersions('1.10.2.1', '1.10.2.1'); // 0
374
+ * compareVersions('1.10.2.1', '1.0800.2'); // -1
375
+ * compareVersions('1.10.2.1', '1.10', true); // 0
376
+ *
377
+ * @param {String} versionA versions versions to compare
378
+ * @param {String} versionB versions versions to compare
379
+ * @param {boolean} [isLoose] enable loose comparison
380
+ * @return {Number} comparison result: -1 when versionA is lower,
381
+ * 1 when versionA is bigger, 0 when both equal
382
+ */
383
+ /* eslint consistent-return: 1 */
384
+ static compareVersions(versionA, versionB, isLoose = false) {
385
+ const versionAPrecision = _Utils.getVersionPrecision(versionA);
386
+ const versionBPrecision = _Utils.getVersionPrecision(versionB);
387
+ let precision = Math.max(versionAPrecision, versionBPrecision);
388
+ let lastPrecision = 0;
389
+ const chunks = _Utils.map([versionA, versionB], (version) => {
390
+ const delta = precision - _Utils.getVersionPrecision(version);
391
+ const _version = version + new Array(delta + 1).join(".0");
392
+ return _Utils.map(_version.split("."), (chunk) => new Array(20 - chunk.length).join("0") + chunk).reverse();
393
+ });
394
+ if (isLoose) {
395
+ lastPrecision = precision - Math.min(versionAPrecision, versionBPrecision);
396
+ }
397
+ precision -= 1;
398
+ while (precision >= lastPrecision) {
399
+ if (chunks[0][precision] > chunks[1][precision]) {
400
+ return 1;
401
+ }
402
+ if (chunks[0][precision] === chunks[1][precision]) {
403
+ if (precision === lastPrecision) {
404
+ return 0;
405
+ }
406
+ precision -= 1;
407
+ } else if (chunks[0][precision] < chunks[1][precision]) {
408
+ return -1;
409
+ }
410
+ }
411
+ return void 0;
412
+ }
413
+ /**
414
+ * Array::map polyfill
415
+ *
416
+ * @param {Array} arr
417
+ * @param {Function} iterator
418
+ * @return {Array}
419
+ */
420
+ static map(arr, iterator) {
421
+ const result = [];
422
+ let i;
423
+ if (Array.prototype.map) {
424
+ return Array.prototype.map.call(arr, iterator);
425
+ }
426
+ for (i = 0; i < arr.length; i += 1) {
427
+ result.push(iterator(arr[i]));
428
+ }
429
+ return result;
430
+ }
431
+ /**
432
+ * Array::find polyfill
433
+ *
434
+ * @param {Array} arr
435
+ * @param {Function} predicate
436
+ * @return {Array}
437
+ */
438
+ static find(arr, predicate) {
439
+ let i;
440
+ let l;
441
+ if (Array.prototype.find) {
442
+ return Array.prototype.find.call(arr, predicate);
443
+ }
444
+ for (i = 0, l = arr.length; i < l; i += 1) {
445
+ const value = arr[i];
446
+ if (predicate(value, i)) {
447
+ return value;
448
+ }
449
+ }
450
+ return void 0;
451
+ }
452
+ /**
453
+ * Object::assign polyfill
454
+ *
455
+ * @param {Object} obj
456
+ * @param {Object} ...objs
457
+ * @return {Object}
458
+ */
459
+ static assign(obj, ...assigners) {
460
+ const result = obj;
461
+ let i;
462
+ let l;
463
+ if (Object.assign) {
464
+ return Object.assign(obj, ...assigners);
465
+ }
466
+ for (i = 0, l = assigners.length; i < l; i += 1) {
467
+ const assigner = assigners[i];
468
+ if (typeof assigner === "object" && assigner !== null) {
469
+ const keys = Object.keys(assigner);
470
+ keys.forEach((key) => {
471
+ result[key] = assigner[key];
472
+ });
473
+ }
474
+ }
475
+ return obj;
476
+ }
477
+ /**
478
+ * Get short version/alias for a browser name
479
+ *
480
+ * @example
481
+ * getBrowserAlias('Microsoft Edge') // edge
482
+ *
483
+ * @param {string} browserName
484
+ * @return {string}
485
+ */
486
+ static getBrowserAlias(browserName) {
487
+ return BROWSER_ALIASES_MAP[browserName];
488
+ }
489
+ /**
490
+ * Get browser name for a short version/alias
491
+ *
492
+ * @example
493
+ * getBrowserTypeByAlias('edge') // Microsoft Edge
494
+ *
495
+ * @param {string} browserAlias
496
+ * @return {string}
497
+ */
498
+ static getBrowserTypeByAlias(browserAlias) {
499
+ return BROWSER_MAP[browserAlias] || "";
500
+ }
501
+ };
502
+
503
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/parser-browsers.js
504
+ var commonVersionIdentifier = /version\/(\d+(\.?_?\d+)+)/i;
505
+ var browsersList = [
506
+ /* GPTBot */
507
+ {
508
+ test: [/gptbot/i],
509
+ describe(ua) {
510
+ const browser = {
511
+ name: "GPTBot"
512
+ };
513
+ const version = Utils.getFirstMatch(/gptbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
514
+ if (version) {
515
+ browser.version = version;
516
+ }
517
+ return browser;
518
+ }
519
+ },
520
+ /* ChatGPT-User */
521
+ {
522
+ test: [/chatgpt-user/i],
523
+ describe(ua) {
524
+ const browser = {
525
+ name: "ChatGPT-User"
526
+ };
527
+ const version = Utils.getFirstMatch(/chatgpt-user\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
528
+ if (version) {
529
+ browser.version = version;
530
+ }
531
+ return browser;
532
+ }
533
+ },
534
+ /* OAI-SearchBot */
535
+ {
536
+ test: [/oai-searchbot/i],
537
+ describe(ua) {
538
+ const browser = {
539
+ name: "OAI-SearchBot"
540
+ };
541
+ const version = Utils.getFirstMatch(/oai-searchbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
542
+ if (version) {
543
+ browser.version = version;
544
+ }
545
+ return browser;
546
+ }
547
+ },
548
+ /* ClaudeBot */
549
+ {
550
+ test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i],
551
+ describe(ua) {
552
+ const browser = {
553
+ name: "ClaudeBot"
554
+ };
555
+ const version = Utils.getFirstMatch(/(?:claudebot|claude-web|claude-user|claude-searchbot)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
556
+ if (version) {
557
+ browser.version = version;
558
+ }
559
+ return browser;
560
+ }
561
+ },
562
+ /* Omgilibot */
563
+ {
564
+ test: [/omgilibot/i, /webzio-extended/i],
565
+ describe(ua) {
566
+ const browser = {
567
+ name: "Omgilibot"
568
+ };
569
+ const version = Utils.getFirstMatch(/(?:omgilibot|webzio-extended)\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
570
+ if (version) {
571
+ browser.version = version;
572
+ }
573
+ return browser;
574
+ }
575
+ },
576
+ /* Diffbot */
577
+ {
578
+ test: [/diffbot/i],
579
+ describe(ua) {
580
+ const browser = {
581
+ name: "Diffbot"
582
+ };
583
+ const version = Utils.getFirstMatch(/diffbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
584
+ if (version) {
585
+ browser.version = version;
586
+ }
587
+ return browser;
588
+ }
589
+ },
590
+ /* PerplexityBot */
591
+ {
592
+ test: [/perplexitybot/i],
593
+ describe(ua) {
594
+ const browser = {
595
+ name: "PerplexityBot"
596
+ };
597
+ const version = Utils.getFirstMatch(/perplexitybot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
598
+ if (version) {
599
+ browser.version = version;
600
+ }
601
+ return browser;
602
+ }
603
+ },
604
+ /* Perplexity-User */
605
+ {
606
+ test: [/perplexity-user/i],
607
+ describe(ua) {
608
+ const browser = {
609
+ name: "Perplexity-User"
610
+ };
611
+ const version = Utils.getFirstMatch(/perplexity-user\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
612
+ if (version) {
613
+ browser.version = version;
614
+ }
615
+ return browser;
616
+ }
617
+ },
618
+ /* YouBot */
619
+ {
620
+ test: [/youbot/i],
621
+ describe(ua) {
622
+ const browser = {
623
+ name: "YouBot"
624
+ };
625
+ const version = Utils.getFirstMatch(/youbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
626
+ if (version) {
627
+ browser.version = version;
628
+ }
629
+ return browser;
630
+ }
631
+ },
632
+ /* Meta-WebIndexer */
633
+ {
634
+ test: [/meta-webindexer/i],
635
+ describe(ua) {
636
+ const browser = {
637
+ name: "Meta-WebIndexer"
638
+ };
639
+ const version = Utils.getFirstMatch(/meta-webindexer\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
640
+ if (version) {
641
+ browser.version = version;
642
+ }
643
+ return browser;
644
+ }
645
+ },
646
+ /* Meta-ExternalAds */
647
+ {
648
+ test: [/meta-externalads/i],
649
+ describe(ua) {
650
+ const browser = {
651
+ name: "Meta-ExternalAds"
652
+ };
653
+ const version = Utils.getFirstMatch(/meta-externalads\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
654
+ if (version) {
655
+ browser.version = version;
656
+ }
657
+ return browser;
658
+ }
659
+ },
660
+ /* Meta-ExternalAgent */
661
+ {
662
+ test: [/meta-externalagent/i],
663
+ describe(ua) {
664
+ const browser = {
665
+ name: "Meta-ExternalAgent"
666
+ };
667
+ const version = Utils.getFirstMatch(/meta-externalagent\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
668
+ if (version) {
669
+ browser.version = version;
670
+ }
671
+ return browser;
672
+ }
673
+ },
674
+ /* Meta-ExternalFetcher */
675
+ {
676
+ test: [/meta-externalfetcher/i],
677
+ describe(ua) {
678
+ const browser = {
679
+ name: "Meta-ExternalFetcher"
680
+ };
681
+ const version = Utils.getFirstMatch(/meta-externalfetcher\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
682
+ if (version) {
683
+ browser.version = version;
684
+ }
685
+ return browser;
686
+ }
687
+ },
688
+ /* Googlebot */
689
+ {
690
+ test: [/googlebot/i],
691
+ describe(ua) {
692
+ const browser = {
693
+ name: "Googlebot"
694
+ };
695
+ const version = Utils.getFirstMatch(/googlebot\/(\d+(\.\d+))/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
696
+ if (version) {
697
+ browser.version = version;
698
+ }
699
+ return browser;
700
+ }
701
+ },
702
+ /* Linespider */
703
+ {
704
+ test: [/linespider/i],
705
+ describe(ua) {
706
+ const browser = {
707
+ name: "Linespider"
708
+ };
709
+ const version = Utils.getFirstMatch(/(?:linespider)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
710
+ if (version) {
711
+ browser.version = version;
712
+ }
713
+ return browser;
714
+ }
715
+ },
716
+ /* AmazonBot */
717
+ {
718
+ test: [/amazonbot/i],
719
+ describe(ua) {
720
+ const browser = {
721
+ name: "AmazonBot"
722
+ };
723
+ const version = Utils.getFirstMatch(/amazonbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
724
+ if (version) {
725
+ browser.version = version;
726
+ }
727
+ return browser;
728
+ }
729
+ },
730
+ /* BingCrawler */
731
+ {
732
+ test: [/bingbot/i],
733
+ describe(ua) {
734
+ const browser = {
735
+ name: "BingCrawler"
736
+ };
737
+ const version = Utils.getFirstMatch(/bingbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
738
+ if (version) {
739
+ browser.version = version;
740
+ }
741
+ return browser;
742
+ }
743
+ },
744
+ /* BaiduSpider */
745
+ {
746
+ test: [/baiduspider/i],
747
+ describe(ua) {
748
+ const browser = {
749
+ name: "BaiduSpider"
750
+ };
751
+ const version = Utils.getFirstMatch(/baiduspider\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
752
+ if (version) {
753
+ browser.version = version;
754
+ }
755
+ return browser;
756
+ }
757
+ },
758
+ /* DuckDuckBot */
759
+ {
760
+ test: [/duckduckbot/i],
761
+ describe(ua) {
762
+ const browser = {
763
+ name: "DuckDuckBot"
764
+ };
765
+ const version = Utils.getFirstMatch(/duckduckbot\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
766
+ if (version) {
767
+ browser.version = version;
768
+ }
769
+ return browser;
770
+ }
771
+ },
772
+ /* InternetArchiveCrawler */
773
+ {
774
+ test: [/ia_archiver/i],
775
+ describe(ua) {
776
+ const browser = {
777
+ name: "InternetArchiveCrawler"
778
+ };
779
+ const version = Utils.getFirstMatch(/ia_archiver\/(\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
780
+ if (version) {
781
+ browser.version = version;
782
+ }
783
+ return browser;
784
+ }
785
+ },
786
+ /* FacebookExternalHit */
787
+ {
788
+ test: [/facebookexternalhit/i, /facebookcatalog/i],
789
+ describe() {
790
+ return {
791
+ name: "FacebookExternalHit"
792
+ };
793
+ }
794
+ },
795
+ /* SlackBot */
796
+ {
797
+ test: [/slackbot/i, /slack-imgProxy/i],
798
+ describe(ua) {
799
+ const browser = {
800
+ name: "SlackBot"
801
+ };
802
+ const version = Utils.getFirstMatch(/(?:slackbot|slack-imgproxy)(?:-[-\w]+)?[\s/](\d+(\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
803
+ if (version) {
804
+ browser.version = version;
805
+ }
806
+ return browser;
807
+ }
808
+ },
809
+ /* YahooSlurp */
810
+ {
811
+ test: [/yahoo!?[\s/]*slurp/i],
812
+ describe() {
813
+ return {
814
+ name: "YahooSlurp"
815
+ };
816
+ }
817
+ },
818
+ /* YandexBot */
819
+ {
820
+ test: [/yandexbot/i, /yandexmobilebot/i],
821
+ describe() {
822
+ return {
823
+ name: "YandexBot"
824
+ };
825
+ }
826
+ },
827
+ /* PingdomBot */
828
+ {
829
+ test: [/pingdom/i],
830
+ describe() {
831
+ return {
832
+ name: "PingdomBot"
833
+ };
834
+ }
835
+ },
836
+ /* Opera < 13.0 */
837
+ {
838
+ test: [/opera/i],
839
+ describe(ua) {
840
+ const browser = {
841
+ name: "Opera"
842
+ };
843
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, ua);
844
+ if (version) {
845
+ browser.version = version;
846
+ }
847
+ return browser;
848
+ }
849
+ },
850
+ /* Opera > 13.0 */
851
+ {
852
+ test: [/opr\/|opios/i],
853
+ describe(ua) {
854
+ const browser = {
855
+ name: "Opera"
856
+ };
857
+ const version = Utils.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
858
+ if (version) {
859
+ browser.version = version;
860
+ }
861
+ return browser;
862
+ }
863
+ },
864
+ {
865
+ test: [/SamsungBrowser/i],
866
+ describe(ua) {
867
+ const browser = {
868
+ name: "Samsung Internet for Android"
869
+ };
870
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
871
+ if (version) {
872
+ browser.version = version;
873
+ }
874
+ return browser;
875
+ }
876
+ },
877
+ {
878
+ test: [/Whale/i],
879
+ describe(ua) {
880
+ const browser = {
881
+ name: "NAVER Whale Browser"
882
+ };
883
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, ua);
884
+ if (version) {
885
+ browser.version = version;
886
+ }
887
+ return browser;
888
+ }
889
+ },
890
+ {
891
+ test: [/PaleMoon/i],
892
+ describe(ua) {
893
+ const browser = {
894
+ name: "Pale Moon"
895
+ };
896
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:PaleMoon)[\s/](\d+(?:\.\d+)+)/i, ua);
897
+ if (version) {
898
+ browser.version = version;
899
+ }
900
+ return browser;
901
+ }
902
+ },
903
+ {
904
+ test: [/MZBrowser/i],
905
+ describe(ua) {
906
+ const browser = {
907
+ name: "MZ Browser"
908
+ };
909
+ const version = Utils.getFirstMatch(/(?:MZBrowser)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
910
+ if (version) {
911
+ browser.version = version;
912
+ }
913
+ return browser;
914
+ }
915
+ },
916
+ {
917
+ test: [/focus/i],
918
+ describe(ua) {
919
+ const browser = {
920
+ name: "Focus"
921
+ };
922
+ const version = Utils.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
923
+ if (version) {
924
+ browser.version = version;
925
+ }
926
+ return browser;
927
+ }
928
+ },
929
+ {
930
+ test: [/swing/i],
931
+ describe(ua) {
932
+ const browser = {
933
+ name: "Swing"
934
+ };
935
+ const version = Utils.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
936
+ if (version) {
937
+ browser.version = version;
938
+ }
939
+ return browser;
940
+ }
941
+ },
942
+ {
943
+ test: [/coast/i],
944
+ describe(ua) {
945
+ const browser = {
946
+ name: "Opera Coast"
947
+ };
948
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, ua);
949
+ if (version) {
950
+ browser.version = version;
951
+ }
952
+ return browser;
953
+ }
954
+ },
955
+ {
956
+ test: [/opt\/\d+(?:.?_?\d+)+/i],
957
+ describe(ua) {
958
+ const browser = {
959
+ name: "Opera Touch"
960
+ };
961
+ const version = Utils.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
962
+ if (version) {
963
+ browser.version = version;
964
+ }
965
+ return browser;
966
+ }
967
+ },
968
+ {
969
+ test: [/yabrowser/i],
970
+ describe(ua) {
971
+ const browser = {
972
+ name: "Yandex Browser"
973
+ };
974
+ const version = Utils.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
975
+ if (version) {
976
+ browser.version = version;
977
+ }
978
+ return browser;
979
+ }
980
+ },
981
+ {
982
+ test: [/ucbrowser/i],
983
+ describe(ua) {
984
+ const browser = {
985
+ name: "UC Browser"
986
+ };
987
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
988
+ if (version) {
989
+ browser.version = version;
990
+ }
991
+ return browser;
992
+ }
993
+ },
994
+ {
995
+ test: [/Maxthon|mxios/i],
996
+ describe(ua) {
997
+ const browser = {
998
+ name: "Maxthon"
999
+ };
1000
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
1001
+ if (version) {
1002
+ browser.version = version;
1003
+ }
1004
+ return browser;
1005
+ }
1006
+ },
1007
+ {
1008
+ test: [/epiphany/i],
1009
+ describe(ua) {
1010
+ const browser = {
1011
+ name: "Epiphany"
1012
+ };
1013
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, ua);
1014
+ if (version) {
1015
+ browser.version = version;
1016
+ }
1017
+ return browser;
1018
+ }
1019
+ },
1020
+ {
1021
+ test: [/puffin/i],
1022
+ describe(ua) {
1023
+ const browser = {
1024
+ name: "Puffin"
1025
+ };
1026
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, ua);
1027
+ if (version) {
1028
+ browser.version = version;
1029
+ }
1030
+ return browser;
1031
+ }
1032
+ },
1033
+ {
1034
+ test: [/sleipnir/i],
1035
+ describe(ua) {
1036
+ const browser = {
1037
+ name: "Sleipnir"
1038
+ };
1039
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, ua);
1040
+ if (version) {
1041
+ browser.version = version;
1042
+ }
1043
+ return browser;
1044
+ }
1045
+ },
1046
+ {
1047
+ test: [/k-meleon/i],
1048
+ describe(ua) {
1049
+ const browser = {
1050
+ name: "K-Meleon"
1051
+ };
1052
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, ua);
1053
+ if (version) {
1054
+ browser.version = version;
1055
+ }
1056
+ return browser;
1057
+ }
1058
+ },
1059
+ {
1060
+ test: [/micromessenger/i],
1061
+ describe(ua) {
1062
+ const browser = {
1063
+ name: "WeChat"
1064
+ };
1065
+ const version = Utils.getFirstMatch(/(?:micromessenger)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
1066
+ if (version) {
1067
+ browser.version = version;
1068
+ }
1069
+ return browser;
1070
+ }
1071
+ },
1072
+ {
1073
+ test: [/qqbrowser/i],
1074
+ describe(ua) {
1075
+ const browser = {
1076
+ name: /qqbrowserlite/i.test(ua) ? "QQ Browser Lite" : "QQ Browser"
1077
+ };
1078
+ const version = Utils.getFirstMatch(/(?:qqbrowserlite|qqbrowser)[/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
1079
+ if (version) {
1080
+ browser.version = version;
1081
+ }
1082
+ return browser;
1083
+ }
1084
+ },
1085
+ {
1086
+ test: [/msie|trident/i],
1087
+ describe(ua) {
1088
+ const browser = {
1089
+ name: "Internet Explorer"
1090
+ };
1091
+ const version = Utils.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\d+)+)/i, ua);
1092
+ if (version) {
1093
+ browser.version = version;
1094
+ }
1095
+ return browser;
1096
+ }
1097
+ },
1098
+ {
1099
+ test: [/\sedg\//i],
1100
+ describe(ua) {
1101
+ const browser = {
1102
+ name: "Microsoft Edge"
1103
+ };
1104
+ const version = Utils.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i, ua);
1105
+ if (version) {
1106
+ browser.version = version;
1107
+ }
1108
+ return browser;
1109
+ }
1110
+ },
1111
+ {
1112
+ test: [/edg([ea]|ios)/i],
1113
+ describe(ua) {
1114
+ const browser = {
1115
+ name: "Microsoft Edge"
1116
+ };
1117
+ const version = Utils.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?_?\d+)+)/i, ua);
1118
+ if (version) {
1119
+ browser.version = version;
1120
+ }
1121
+ return browser;
1122
+ }
1123
+ },
1124
+ {
1125
+ test: [/vivaldi/i],
1126
+ describe(ua) {
1127
+ const browser = {
1128
+ name: "Vivaldi"
1129
+ };
1130
+ const version = Utils.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i, ua);
1131
+ if (version) {
1132
+ browser.version = version;
1133
+ }
1134
+ return browser;
1135
+ }
1136
+ },
1137
+ {
1138
+ test: [/seamonkey/i],
1139
+ describe(ua) {
1140
+ const browser = {
1141
+ name: "SeaMonkey"
1142
+ };
1143
+ const version = Utils.getFirstMatch(/seamonkey\/(\d+(\.?_?\d+)+)/i, ua);
1144
+ if (version) {
1145
+ browser.version = version;
1146
+ }
1147
+ return browser;
1148
+ }
1149
+ },
1150
+ {
1151
+ test: [/sailfish/i],
1152
+ describe(ua) {
1153
+ const browser = {
1154
+ name: "Sailfish"
1155
+ };
1156
+ const version = Utils.getFirstMatch(/sailfish\s?browser\/(\d+(\.\d+)?)/i, ua);
1157
+ if (version) {
1158
+ browser.version = version;
1159
+ }
1160
+ return browser;
1161
+ }
1162
+ },
1163
+ {
1164
+ test: [/silk/i],
1165
+ describe(ua) {
1166
+ const browser = {
1167
+ name: "Amazon Silk"
1168
+ };
1169
+ const version = Utils.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i, ua);
1170
+ if (version) {
1171
+ browser.version = version;
1172
+ }
1173
+ return browser;
1174
+ }
1175
+ },
1176
+ {
1177
+ test: [/phantom/i],
1178
+ describe(ua) {
1179
+ const browser = {
1180
+ name: "PhantomJS"
1181
+ };
1182
+ const version = Utils.getFirstMatch(/phantomjs\/(\d+(\.?_?\d+)+)/i, ua);
1183
+ if (version) {
1184
+ browser.version = version;
1185
+ }
1186
+ return browser;
1187
+ }
1188
+ },
1189
+ {
1190
+ test: [/slimerjs/i],
1191
+ describe(ua) {
1192
+ const browser = {
1193
+ name: "SlimerJS"
1194
+ };
1195
+ const version = Utils.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)+)/i, ua);
1196
+ if (version) {
1197
+ browser.version = version;
1198
+ }
1199
+ return browser;
1200
+ }
1201
+ },
1202
+ {
1203
+ test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
1204
+ describe(ua) {
1205
+ const browser = {
1206
+ name: "BlackBerry"
1207
+ };
1208
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, ua);
1209
+ if (version) {
1210
+ browser.version = version;
1211
+ }
1212
+ return browser;
1213
+ }
1214
+ },
1215
+ {
1216
+ test: [/(web|hpw)[o0]s/i],
1217
+ describe(ua) {
1218
+ const browser = {
1219
+ name: "WebOS Browser"
1220
+ };
1221
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua) || Utils.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, ua);
1222
+ if (version) {
1223
+ browser.version = version;
1224
+ }
1225
+ return browser;
1226
+ }
1227
+ },
1228
+ {
1229
+ test: [/bada/i],
1230
+ describe(ua) {
1231
+ const browser = {
1232
+ name: "Bada"
1233
+ };
1234
+ const version = Utils.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i, ua);
1235
+ if (version) {
1236
+ browser.version = version;
1237
+ }
1238
+ return browser;
1239
+ }
1240
+ },
1241
+ {
1242
+ test: [/tizen/i],
1243
+ describe(ua) {
1244
+ const browser = {
1245
+ name: "Tizen"
1246
+ };
1247
+ const version = Utils.getFirstMatch(/(?:tizen\s?)?browser\/(\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
1248
+ if (version) {
1249
+ browser.version = version;
1250
+ }
1251
+ return browser;
1252
+ }
1253
+ },
1254
+ {
1255
+ test: [/qupzilla/i],
1256
+ describe(ua) {
1257
+ const browser = {
1258
+ name: "QupZilla"
1259
+ };
1260
+ const version = Utils.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
1261
+ if (version) {
1262
+ browser.version = version;
1263
+ }
1264
+ return browser;
1265
+ }
1266
+ },
1267
+ {
1268
+ test: [/librewolf/i],
1269
+ describe(ua) {
1270
+ const browser = {
1271
+ name: "LibreWolf"
1272
+ };
1273
+ const version = Utils.getFirstMatch(/(?:librewolf)[\s/](\d+(\.?_?\d+)+)/i, ua);
1274
+ if (version) {
1275
+ browser.version = version;
1276
+ }
1277
+ return browser;
1278
+ }
1279
+ },
1280
+ {
1281
+ test: [/firefox|iceweasel|fxios/i],
1282
+ describe(ua) {
1283
+ const browser = {
1284
+ name: "Firefox"
1285
+ };
1286
+ const version = Utils.getFirstMatch(/(?:firefox|iceweasel|fxios)[\s/](\d+(\.?_?\d+)+)/i, ua);
1287
+ if (version) {
1288
+ browser.version = version;
1289
+ }
1290
+ return browser;
1291
+ }
1292
+ },
1293
+ {
1294
+ test: [/electron/i],
1295
+ describe(ua) {
1296
+ const browser = {
1297
+ name: "Electron"
1298
+ };
1299
+ const version = Utils.getFirstMatch(/(?:electron)\/(\d+(\.?_?\d+)+)/i, ua);
1300
+ if (version) {
1301
+ browser.version = version;
1302
+ }
1303
+ return browser;
1304
+ }
1305
+ },
1306
+ {
1307
+ test: [/sogoumobilebrowser/i, /metasr/i, /se 2\.[x]/i],
1308
+ describe(ua) {
1309
+ const browser = {
1310
+ name: "Sogou Browser"
1311
+ };
1312
+ const sogouMobileVersion = Utils.getFirstMatch(/(?:sogoumobilebrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
1313
+ const chromiumVersion = Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, ua);
1314
+ const seVersion = Utils.getFirstMatch(/se ([\d.]+)x/i, ua);
1315
+ const version = sogouMobileVersion || chromiumVersion || seVersion;
1316
+ if (version) {
1317
+ browser.version = version;
1318
+ }
1319
+ return browser;
1320
+ }
1321
+ },
1322
+ {
1323
+ test: [/MiuiBrowser/i],
1324
+ describe(ua) {
1325
+ const browser = {
1326
+ name: "Miui"
1327
+ };
1328
+ const version = Utils.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+(\.?_?\d+)+)/i, ua);
1329
+ if (version) {
1330
+ browser.version = version;
1331
+ }
1332
+ return browser;
1333
+ }
1334
+ },
1335
+ /* DuckDuckGo Browser */
1336
+ {
1337
+ test(parser) {
1338
+ if (parser.hasBrand("DuckDuckGo")) {
1339
+ return true;
1340
+ }
1341
+ return parser.test(/\sDdg\/[\d.]+$/i);
1342
+ },
1343
+ describe(ua, parser) {
1344
+ const browser = {
1345
+ name: "DuckDuckGo"
1346
+ };
1347
+ if (parser) {
1348
+ const hintsVersion = parser.getBrandVersion("DuckDuckGo");
1349
+ if (hintsVersion) {
1350
+ browser.version = hintsVersion;
1351
+ return browser;
1352
+ }
1353
+ }
1354
+ const uaVersion = Utils.getFirstMatch(/\sDdg\/([\d.]+)$/i, ua);
1355
+ if (uaVersion) {
1356
+ browser.version = uaVersion;
1357
+ }
1358
+ return browser;
1359
+ }
1360
+ },
1361
+ /* Brave Browser */
1362
+ {
1363
+ test(parser) {
1364
+ return parser.hasBrand("Brave");
1365
+ },
1366
+ describe(ua, parser) {
1367
+ const browser = {
1368
+ name: "Brave"
1369
+ };
1370
+ if (parser) {
1371
+ const hintsVersion = parser.getBrandVersion("Brave");
1372
+ if (hintsVersion) {
1373
+ browser.version = hintsVersion;
1374
+ return browser;
1375
+ }
1376
+ }
1377
+ return browser;
1378
+ }
1379
+ },
1380
+ {
1381
+ test: [/chromium/i],
1382
+ describe(ua) {
1383
+ const browser = {
1384
+ name: "Chromium"
1385
+ };
1386
+ const version = Utils.getFirstMatch(/(?:chromium)[\s/](\d+(\.?_?\d+)+)/i, ua) || Utils.getFirstMatch(commonVersionIdentifier, ua);
1387
+ if (version) {
1388
+ browser.version = version;
1389
+ }
1390
+ return browser;
1391
+ }
1392
+ },
1393
+ {
1394
+ test: [/chrome|crios|crmo/i],
1395
+ describe(ua) {
1396
+ const browser = {
1397
+ name: "Chrome"
1398
+ };
1399
+ const version = Utils.getFirstMatch(/(?:chrome|crios|crmo)\/(\d+(\.?_?\d+)+)/i, ua);
1400
+ if (version) {
1401
+ browser.version = version;
1402
+ }
1403
+ return browser;
1404
+ }
1405
+ },
1406
+ {
1407
+ test: [/GSA/i],
1408
+ describe(ua) {
1409
+ const browser = {
1410
+ name: "Google Search"
1411
+ };
1412
+ const version = Utils.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)+)/i, ua);
1413
+ if (version) {
1414
+ browser.version = version;
1415
+ }
1416
+ return browser;
1417
+ }
1418
+ },
1419
+ /* Android Browser */
1420
+ {
1421
+ test(parser) {
1422
+ const notLikeAndroid = !parser.test(/like android/i);
1423
+ const butAndroid = parser.test(/android/i);
1424
+ return notLikeAndroid && butAndroid;
1425
+ },
1426
+ describe(ua) {
1427
+ const browser = {
1428
+ name: "Android Browser"
1429
+ };
1430
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua);
1431
+ if (version) {
1432
+ browser.version = version;
1433
+ }
1434
+ return browser;
1435
+ }
1436
+ },
1437
+ /* PlayStation 4 */
1438
+ {
1439
+ test: [/playstation 4/i],
1440
+ describe(ua) {
1441
+ const browser = {
1442
+ name: "PlayStation 4"
1443
+ };
1444
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua);
1445
+ if (version) {
1446
+ browser.version = version;
1447
+ }
1448
+ return browser;
1449
+ }
1450
+ },
1451
+ /* Safari */
1452
+ {
1453
+ test: [/safari|applewebkit/i],
1454
+ describe(ua) {
1455
+ const browser = {
1456
+ name: "Safari"
1457
+ };
1458
+ const version = Utils.getFirstMatch(commonVersionIdentifier, ua);
1459
+ if (version) {
1460
+ browser.version = version;
1461
+ }
1462
+ return browser;
1463
+ }
1464
+ },
1465
+ /* Something else */
1466
+ {
1467
+ test: [/.*/i],
1468
+ describe(ua) {
1469
+ const regexpWithoutDeviceSpec = /^(.*)\/(.*) /;
1470
+ const regexpWithDeviceSpec = /^(.*)\/(.*)[ \t]\((.*)/;
1471
+ const hasDeviceSpec = ua.search("\\(") !== -1;
1472
+ const regexp = hasDeviceSpec ? regexpWithDeviceSpec : regexpWithoutDeviceSpec;
1473
+ return {
1474
+ name: Utils.getFirstMatch(regexp, ua),
1475
+ version: Utils.getSecondMatch(regexp, ua)
1476
+ };
1477
+ }
1478
+ }
1479
+ ];
1480
+ var parser_browsers_default = browsersList;
1481
+
1482
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/parser-os.js
1483
+ var parser_os_default = [
1484
+ /* Roku */
1485
+ {
1486
+ test: [/Roku\/DVP/],
1487
+ describe(ua) {
1488
+ const version = Utils.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i, ua);
1489
+ return {
1490
+ name: OS_MAP.Roku,
1491
+ version
1492
+ };
1493
+ }
1494
+ },
1495
+ /* Windows Phone */
1496
+ {
1497
+ test: [/windows phone/i],
1498
+ describe(ua) {
1499
+ const version = Utils.getFirstMatch(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i, ua);
1500
+ return {
1501
+ name: OS_MAP.WindowsPhone,
1502
+ version
1503
+ };
1504
+ }
1505
+ },
1506
+ /* Windows */
1507
+ {
1508
+ test: [/windows /i],
1509
+ describe(ua) {
1510
+ const version = Utils.getFirstMatch(/Windows ((NT|XP)( \d\d?.\d)?)/i, ua);
1511
+ const versionName = Utils.getWindowsVersionName(version);
1512
+ return {
1513
+ name: OS_MAP.Windows,
1514
+ version,
1515
+ versionName
1516
+ };
1517
+ }
1518
+ },
1519
+ /* Firefox on iPad */
1520
+ {
1521
+ test: [/Macintosh(.*?) FxiOS(.*?)\//],
1522
+ describe(ua) {
1523
+ const result = {
1524
+ name: OS_MAP.iOS
1525
+ };
1526
+ const version = Utils.getSecondMatch(/(Version\/)(\d[\d.]+)/, ua);
1527
+ if (version) {
1528
+ result.version = version;
1529
+ }
1530
+ return result;
1531
+ }
1532
+ },
1533
+ /* macOS */
1534
+ {
1535
+ test: [/macintosh/i],
1536
+ describe(ua) {
1537
+ const version = Utils.getFirstMatch(/mac os x (\d+(\.?_?\d+)+)/i, ua).replace(/[_\s]/g, ".");
1538
+ const versionName = Utils.getMacOSVersionName(version);
1539
+ const os = {
1540
+ name: OS_MAP.MacOS,
1541
+ version
1542
+ };
1543
+ if (versionName) {
1544
+ os.versionName = versionName;
1545
+ }
1546
+ return os;
1547
+ }
1548
+ },
1549
+ /* iOS */
1550
+ {
1551
+ test: [/(ipod|iphone|ipad)/i],
1552
+ describe(ua) {
1553
+ const version = Utils.getFirstMatch(/os (\d+([_\s]\d+)*) like mac os x/i, ua).replace(/[_\s]/g, ".");
1554
+ return {
1555
+ name: OS_MAP.iOS,
1556
+ version
1557
+ };
1558
+ }
1559
+ },
1560
+ /* HarmonyOS */
1561
+ {
1562
+ test: [/OpenHarmony/i],
1563
+ describe(ua) {
1564
+ const version = Utils.getFirstMatch(/OpenHarmony\s+(\d+(\.\d+)*)/i, ua);
1565
+ return {
1566
+ name: OS_MAP.HarmonyOS,
1567
+ version
1568
+ };
1569
+ }
1570
+ },
1571
+ /* Android */
1572
+ {
1573
+ test(parser) {
1574
+ const notLikeAndroid = !parser.test(/like android/i);
1575
+ const butAndroid = parser.test(/android/i);
1576
+ return notLikeAndroid && butAndroid;
1577
+ },
1578
+ describe(ua) {
1579
+ const version = Utils.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i, ua);
1580
+ const versionName = Utils.getAndroidVersionName(version);
1581
+ const os = {
1582
+ name: OS_MAP.Android,
1583
+ version
1584
+ };
1585
+ if (versionName) {
1586
+ os.versionName = versionName;
1587
+ }
1588
+ return os;
1589
+ }
1590
+ },
1591
+ /* WebOS */
1592
+ {
1593
+ test: [/(web|hpw)[o0]s/i],
1594
+ describe(ua) {
1595
+ const version = Utils.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\d+)*)/i, ua);
1596
+ const os = {
1597
+ name: OS_MAP.WebOS
1598
+ };
1599
+ if (version && version.length) {
1600
+ os.version = version;
1601
+ }
1602
+ return os;
1603
+ }
1604
+ },
1605
+ /* BlackBerry */
1606
+ {
1607
+ test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
1608
+ describe(ua) {
1609
+ const version = Utils.getFirstMatch(/rim\stablet\sos\s(\d+(\.\d+)*)/i, ua) || Utils.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, ua) || Utils.getFirstMatch(/\bbb(\d+)/i, ua);
1610
+ return {
1611
+ name: OS_MAP.BlackBerry,
1612
+ version
1613
+ };
1614
+ }
1615
+ },
1616
+ /* Bada */
1617
+ {
1618
+ test: [/bada/i],
1619
+ describe(ua) {
1620
+ const version = Utils.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, ua);
1621
+ return {
1622
+ name: OS_MAP.Bada,
1623
+ version
1624
+ };
1625
+ }
1626
+ },
1627
+ /* Tizen */
1628
+ {
1629
+ test: [/tizen/i],
1630
+ describe(ua) {
1631
+ const version = Utils.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, ua);
1632
+ return {
1633
+ name: OS_MAP.Tizen,
1634
+ version
1635
+ };
1636
+ }
1637
+ },
1638
+ /* Linux */
1639
+ {
1640
+ test: [/linux/i],
1641
+ describe() {
1642
+ return {
1643
+ name: OS_MAP.Linux
1644
+ };
1645
+ }
1646
+ },
1647
+ /* Chrome OS */
1648
+ {
1649
+ test: [/CrOS/],
1650
+ describe() {
1651
+ return {
1652
+ name: OS_MAP.ChromeOS
1653
+ };
1654
+ }
1655
+ },
1656
+ /* Playstation 4 */
1657
+ {
1658
+ test: [/PlayStation 4/],
1659
+ describe(ua) {
1660
+ const version = Utils.getFirstMatch(/PlayStation 4[/\s](\d+(\.\d+)*)/i, ua);
1661
+ return {
1662
+ name: OS_MAP.PlayStation4,
1663
+ version
1664
+ };
1665
+ }
1666
+ }
1667
+ ];
1668
+
1669
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/parser-platforms.js
1670
+ var parser_platforms_default = [
1671
+ /* Googlebot */
1672
+ {
1673
+ test: [/googlebot/i],
1674
+ describe() {
1675
+ return {
1676
+ type: PLATFORMS_MAP.bot,
1677
+ vendor: "Google"
1678
+ };
1679
+ }
1680
+ },
1681
+ /* LineSpider */
1682
+ {
1683
+ test: [/linespider/i],
1684
+ describe() {
1685
+ return {
1686
+ type: PLATFORMS_MAP.bot,
1687
+ vendor: "Line"
1688
+ };
1689
+ }
1690
+ },
1691
+ /* AmazonBot */
1692
+ {
1693
+ test: [/amazonbot/i],
1694
+ describe() {
1695
+ return {
1696
+ type: PLATFORMS_MAP.bot,
1697
+ vendor: "Amazon"
1698
+ };
1699
+ }
1700
+ },
1701
+ /* GPTBot */
1702
+ {
1703
+ test: [/gptbot/i],
1704
+ describe() {
1705
+ return {
1706
+ type: PLATFORMS_MAP.bot,
1707
+ vendor: "OpenAI"
1708
+ };
1709
+ }
1710
+ },
1711
+ /* ChatGPT-User */
1712
+ {
1713
+ test: [/chatgpt-user/i],
1714
+ describe() {
1715
+ return {
1716
+ type: PLATFORMS_MAP.bot,
1717
+ vendor: "OpenAI"
1718
+ };
1719
+ }
1720
+ },
1721
+ /* OAI-SearchBot */
1722
+ {
1723
+ test: [/oai-searchbot/i],
1724
+ describe() {
1725
+ return {
1726
+ type: PLATFORMS_MAP.bot,
1727
+ vendor: "OpenAI"
1728
+ };
1729
+ }
1730
+ },
1731
+ /* Baidu */
1732
+ {
1733
+ test: [/baiduspider/i],
1734
+ describe() {
1735
+ return {
1736
+ type: PLATFORMS_MAP.bot,
1737
+ vendor: "Baidu"
1738
+ };
1739
+ }
1740
+ },
1741
+ /* Bingbot */
1742
+ {
1743
+ test: [/bingbot/i],
1744
+ describe() {
1745
+ return {
1746
+ type: PLATFORMS_MAP.bot,
1747
+ vendor: "Bing"
1748
+ };
1749
+ }
1750
+ },
1751
+ /* DuckDuckBot */
1752
+ {
1753
+ test: [/duckduckbot/i],
1754
+ describe() {
1755
+ return {
1756
+ type: PLATFORMS_MAP.bot,
1757
+ vendor: "DuckDuckGo"
1758
+ };
1759
+ }
1760
+ },
1761
+ /* ClaudeBot */
1762
+ {
1763
+ test: [/claudebot/i, /claude-web/i, /claude-user/i, /claude-searchbot/i],
1764
+ describe() {
1765
+ return {
1766
+ type: PLATFORMS_MAP.bot,
1767
+ vendor: "Anthropic"
1768
+ };
1769
+ }
1770
+ },
1771
+ /* Omgilibot */
1772
+ {
1773
+ test: [/omgilibot/i, /webzio-extended/i],
1774
+ describe() {
1775
+ return {
1776
+ type: PLATFORMS_MAP.bot,
1777
+ vendor: "Webz.io"
1778
+ };
1779
+ }
1780
+ },
1781
+ /* Diffbot */
1782
+ {
1783
+ test: [/diffbot/i],
1784
+ describe() {
1785
+ return {
1786
+ type: PLATFORMS_MAP.bot,
1787
+ vendor: "Diffbot"
1788
+ };
1789
+ }
1790
+ },
1791
+ /* PerplexityBot */
1792
+ {
1793
+ test: [/perplexitybot/i],
1794
+ describe() {
1795
+ return {
1796
+ type: PLATFORMS_MAP.bot,
1797
+ vendor: "Perplexity AI"
1798
+ };
1799
+ }
1800
+ },
1801
+ /* Perplexity-User */
1802
+ {
1803
+ test: [/perplexity-user/i],
1804
+ describe() {
1805
+ return {
1806
+ type: PLATFORMS_MAP.bot,
1807
+ vendor: "Perplexity AI"
1808
+ };
1809
+ }
1810
+ },
1811
+ /* YouBot */
1812
+ {
1813
+ test: [/youbot/i],
1814
+ describe() {
1815
+ return {
1816
+ type: PLATFORMS_MAP.bot,
1817
+ vendor: "You.com"
1818
+ };
1819
+ }
1820
+ },
1821
+ /* Internet Archive Crawler */
1822
+ {
1823
+ test: [/ia_archiver/i],
1824
+ describe() {
1825
+ return {
1826
+ type: PLATFORMS_MAP.bot,
1827
+ vendor: "Internet Archive"
1828
+ };
1829
+ }
1830
+ },
1831
+ /* Meta-WebIndexer */
1832
+ {
1833
+ test: [/meta-webindexer/i],
1834
+ describe() {
1835
+ return {
1836
+ type: PLATFORMS_MAP.bot,
1837
+ vendor: "Meta"
1838
+ };
1839
+ }
1840
+ },
1841
+ /* Meta-ExternalAds */
1842
+ {
1843
+ test: [/meta-externalads/i],
1844
+ describe() {
1845
+ return {
1846
+ type: PLATFORMS_MAP.bot,
1847
+ vendor: "Meta"
1848
+ };
1849
+ }
1850
+ },
1851
+ /* Meta-ExternalAgent */
1852
+ {
1853
+ test: [/meta-externalagent/i],
1854
+ describe() {
1855
+ return {
1856
+ type: PLATFORMS_MAP.bot,
1857
+ vendor: "Meta"
1858
+ };
1859
+ }
1860
+ },
1861
+ /* Meta-ExternalFetcher */
1862
+ {
1863
+ test: [/meta-externalfetcher/i],
1864
+ describe() {
1865
+ return {
1866
+ type: PLATFORMS_MAP.bot,
1867
+ vendor: "Meta"
1868
+ };
1869
+ }
1870
+ },
1871
+ /* Meta Web Crawler */
1872
+ {
1873
+ test: [/facebookexternalhit/i, /facebookcatalog/i],
1874
+ describe() {
1875
+ return {
1876
+ type: PLATFORMS_MAP.bot,
1877
+ vendor: "Meta"
1878
+ };
1879
+ }
1880
+ },
1881
+ /* SlackBot */
1882
+ {
1883
+ test: [/slackbot/i, /slack-imgProxy/i],
1884
+ describe() {
1885
+ return {
1886
+ type: PLATFORMS_MAP.bot,
1887
+ vendor: "Slack"
1888
+ };
1889
+ }
1890
+ },
1891
+ /* Yahoo! Slurp */
1892
+ {
1893
+ test: [/yahoo/i],
1894
+ describe() {
1895
+ return {
1896
+ type: PLATFORMS_MAP.bot,
1897
+ vendor: "Yahoo"
1898
+ };
1899
+ }
1900
+ },
1901
+ /* Yandex */
1902
+ {
1903
+ test: [/yandexbot/i, /yandexmobilebot/i],
1904
+ describe() {
1905
+ return {
1906
+ type: PLATFORMS_MAP.bot,
1907
+ vendor: "Yandex"
1908
+ };
1909
+ }
1910
+ },
1911
+ /* Pingdom */
1912
+ {
1913
+ test: [/pingdom/i],
1914
+ describe() {
1915
+ return {
1916
+ type: PLATFORMS_MAP.bot,
1917
+ vendor: "Pingdom"
1918
+ };
1919
+ }
1920
+ },
1921
+ /* Huawei */
1922
+ {
1923
+ test: [/huawei/i],
1924
+ describe(ua) {
1925
+ const model = Utils.getFirstMatch(/(can-l01)/i, ua) && "Nova";
1926
+ const platform = {
1927
+ type: PLATFORMS_MAP.mobile,
1928
+ vendor: "Huawei"
1929
+ };
1930
+ if (model) {
1931
+ platform.model = model;
1932
+ }
1933
+ return platform;
1934
+ }
1935
+ },
1936
+ /* Nexus Tablet */
1937
+ {
1938
+ test: [/nexus\s*(?:7|8|9|10).*/i],
1939
+ describe() {
1940
+ return {
1941
+ type: PLATFORMS_MAP.tablet,
1942
+ vendor: "Nexus"
1943
+ };
1944
+ }
1945
+ },
1946
+ /* iPad */
1947
+ {
1948
+ test: [/ipad/i],
1949
+ describe() {
1950
+ return {
1951
+ type: PLATFORMS_MAP.tablet,
1952
+ vendor: "Apple",
1953
+ model: "iPad"
1954
+ };
1955
+ }
1956
+ },
1957
+ /* Firefox on iPad */
1958
+ {
1959
+ test: [/Macintosh(.*?) FxiOS(.*?)\//],
1960
+ describe() {
1961
+ return {
1962
+ type: PLATFORMS_MAP.tablet,
1963
+ vendor: "Apple",
1964
+ model: "iPad"
1965
+ };
1966
+ }
1967
+ },
1968
+ /* Amazon Kindle Fire */
1969
+ {
1970
+ test: [/kftt build/i],
1971
+ describe() {
1972
+ return {
1973
+ type: PLATFORMS_MAP.tablet,
1974
+ vendor: "Amazon",
1975
+ model: "Kindle Fire HD 7"
1976
+ };
1977
+ }
1978
+ },
1979
+ /* Another Amazon Tablet with Silk */
1980
+ {
1981
+ test: [/silk/i],
1982
+ describe() {
1983
+ return {
1984
+ type: PLATFORMS_MAP.tablet,
1985
+ vendor: "Amazon"
1986
+ };
1987
+ }
1988
+ },
1989
+ /* Tablet */
1990
+ {
1991
+ test: [/tablet(?! pc)/i],
1992
+ describe() {
1993
+ return {
1994
+ type: PLATFORMS_MAP.tablet
1995
+ };
1996
+ }
1997
+ },
1998
+ /* iPod/iPhone */
1999
+ {
2000
+ test(parser) {
2001
+ const iDevice = parser.test(/ipod|iphone/i);
2002
+ const likeIDevice = parser.test(/like (ipod|iphone)/i);
2003
+ return iDevice && !likeIDevice;
2004
+ },
2005
+ describe(ua) {
2006
+ const model = Utils.getFirstMatch(/(ipod|iphone)/i, ua);
2007
+ return {
2008
+ type: PLATFORMS_MAP.mobile,
2009
+ vendor: "Apple",
2010
+ model
2011
+ };
2012
+ }
2013
+ },
2014
+ /* Nexus Mobile */
2015
+ {
2016
+ test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
2017
+ describe() {
2018
+ return {
2019
+ type: PLATFORMS_MAP.mobile,
2020
+ vendor: "Nexus"
2021
+ };
2022
+ }
2023
+ },
2024
+ /* Nokia */
2025
+ {
2026
+ test: [/Nokia/i],
2027
+ describe(ua) {
2028
+ const model = Utils.getFirstMatch(/Nokia\s+([0-9]+(\.[0-9]+)?)/i, ua);
2029
+ const platform = {
2030
+ type: PLATFORMS_MAP.mobile,
2031
+ vendor: "Nokia"
2032
+ };
2033
+ if (model) {
2034
+ platform.model = model;
2035
+ }
2036
+ return platform;
2037
+ }
2038
+ },
2039
+ /* Mobile */
2040
+ {
2041
+ test: [/[^-]mobi/i],
2042
+ describe() {
2043
+ return {
2044
+ type: PLATFORMS_MAP.mobile
2045
+ };
2046
+ }
2047
+ },
2048
+ /* BlackBerry */
2049
+ {
2050
+ test(parser) {
2051
+ return parser.getBrowserName(true) === "blackberry";
2052
+ },
2053
+ describe() {
2054
+ return {
2055
+ type: PLATFORMS_MAP.mobile,
2056
+ vendor: "BlackBerry"
2057
+ };
2058
+ }
2059
+ },
2060
+ /* Bada */
2061
+ {
2062
+ test(parser) {
2063
+ return parser.getBrowserName(true) === "bada";
2064
+ },
2065
+ describe() {
2066
+ return {
2067
+ type: PLATFORMS_MAP.mobile
2068
+ };
2069
+ }
2070
+ },
2071
+ /* Windows Phone */
2072
+ {
2073
+ test(parser) {
2074
+ return parser.getBrowserName() === "windows phone";
2075
+ },
2076
+ describe() {
2077
+ return {
2078
+ type: PLATFORMS_MAP.mobile,
2079
+ vendor: "Microsoft"
2080
+ };
2081
+ }
2082
+ },
2083
+ /* Android Tablet */
2084
+ {
2085
+ test(parser) {
2086
+ const osMajorVersion = Number(String(parser.getOSVersion()).split(".")[0]);
2087
+ return parser.getOSName(true) === "android" && osMajorVersion >= 3;
2088
+ },
2089
+ describe() {
2090
+ return {
2091
+ type: PLATFORMS_MAP.tablet
2092
+ };
2093
+ }
2094
+ },
2095
+ /* Android Mobile */
2096
+ {
2097
+ test(parser) {
2098
+ return parser.getOSName(true) === "android";
2099
+ },
2100
+ describe() {
2101
+ return {
2102
+ type: PLATFORMS_MAP.mobile
2103
+ };
2104
+ }
2105
+ },
2106
+ /* Smart TV */
2107
+ {
2108
+ test: [/smart-?tv|smarttv/i],
2109
+ describe() {
2110
+ return {
2111
+ type: PLATFORMS_MAP.tv
2112
+ };
2113
+ }
2114
+ },
2115
+ /* NetCast (LG Smart TV) */
2116
+ {
2117
+ test: [/netcast/i],
2118
+ describe() {
2119
+ return {
2120
+ type: PLATFORMS_MAP.tv
2121
+ };
2122
+ }
2123
+ },
2124
+ /* desktop */
2125
+ {
2126
+ test(parser) {
2127
+ return parser.getOSName(true) === "macos";
2128
+ },
2129
+ describe() {
2130
+ return {
2131
+ type: PLATFORMS_MAP.desktop,
2132
+ vendor: "Apple"
2133
+ };
2134
+ }
2135
+ },
2136
+ /* Windows */
2137
+ {
2138
+ test(parser) {
2139
+ return parser.getOSName(true) === "windows";
2140
+ },
2141
+ describe() {
2142
+ return {
2143
+ type: PLATFORMS_MAP.desktop
2144
+ };
2145
+ }
2146
+ },
2147
+ /* Linux */
2148
+ {
2149
+ test(parser) {
2150
+ return parser.getOSName(true) === "linux";
2151
+ },
2152
+ describe() {
2153
+ return {
2154
+ type: PLATFORMS_MAP.desktop
2155
+ };
2156
+ }
2157
+ },
2158
+ /* PlayStation 4 */
2159
+ {
2160
+ test(parser) {
2161
+ return parser.getOSName(true) === "playstation 4";
2162
+ },
2163
+ describe() {
2164
+ return {
2165
+ type: PLATFORMS_MAP.tv
2166
+ };
2167
+ }
2168
+ },
2169
+ /* Roku */
2170
+ {
2171
+ test(parser) {
2172
+ return parser.getOSName(true) === "roku";
2173
+ },
2174
+ describe() {
2175
+ return {
2176
+ type: PLATFORMS_MAP.tv
2177
+ };
2178
+ }
2179
+ }
2180
+ ];
2181
+
2182
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/parser-engines.js
2183
+ var parser_engines_default = [
2184
+ /* EdgeHTML */
2185
+ {
2186
+ test(parser) {
2187
+ return parser.getBrowserName(true) === "microsoft edge";
2188
+ },
2189
+ describe(ua) {
2190
+ const isBlinkBased = /\sedg\//i.test(ua);
2191
+ if (isBlinkBased) {
2192
+ return {
2193
+ name: ENGINE_MAP.Blink
2194
+ };
2195
+ }
2196
+ const version = Utils.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i, ua);
2197
+ return {
2198
+ name: ENGINE_MAP.EdgeHTML,
2199
+ version
2200
+ };
2201
+ }
2202
+ },
2203
+ /* Trident */
2204
+ {
2205
+ test: [/trident/i],
2206
+ describe(ua) {
2207
+ const engine = {
2208
+ name: ENGINE_MAP.Trident
2209
+ };
2210
+ const version = Utils.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i, ua);
2211
+ if (version) {
2212
+ engine.version = version;
2213
+ }
2214
+ return engine;
2215
+ }
2216
+ },
2217
+ /* Presto */
2218
+ {
2219
+ test(parser) {
2220
+ return parser.test(/presto/i);
2221
+ },
2222
+ describe(ua) {
2223
+ const engine = {
2224
+ name: ENGINE_MAP.Presto
2225
+ };
2226
+ const version = Utils.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i, ua);
2227
+ if (version) {
2228
+ engine.version = version;
2229
+ }
2230
+ return engine;
2231
+ }
2232
+ },
2233
+ /* Gecko */
2234
+ {
2235
+ test(parser) {
2236
+ const isGecko = parser.test(/gecko/i);
2237
+ const likeGecko = parser.test(/like gecko/i);
2238
+ return isGecko && !likeGecko;
2239
+ },
2240
+ describe(ua) {
2241
+ const engine = {
2242
+ name: ENGINE_MAP.Gecko
2243
+ };
2244
+ const version = Utils.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i, ua);
2245
+ if (version) {
2246
+ engine.version = version;
2247
+ }
2248
+ return engine;
2249
+ }
2250
+ },
2251
+ /* Blink */
2252
+ {
2253
+ test: [/(apple)?webkit\/537\.36/i],
2254
+ describe() {
2255
+ return {
2256
+ name: ENGINE_MAP.Blink
2257
+ };
2258
+ }
2259
+ },
2260
+ /* WebKit */
2261
+ {
2262
+ test: [/(apple)?webkit/i],
2263
+ describe(ua) {
2264
+ const engine = {
2265
+ name: ENGINE_MAP.WebKit
2266
+ };
2267
+ const version = Utils.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i, ua);
2268
+ if (version) {
2269
+ engine.version = version;
2270
+ }
2271
+ return engine;
2272
+ }
2273
+ }
2274
+ ];
2275
+
2276
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/parser.js
2277
+ var Parser = class {
2278
+ /**
2279
+ * Create instance of Parser
2280
+ *
2281
+ * @param {String} UA User-Agent string
2282
+ * @param {Boolean|ClientHints} [skipParsingOrHints=false] Either a boolean to skip parsing,
2283
+ * or a ClientHints object containing User-Agent Client Hints data
2284
+ * @param {ClientHints} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
2285
+ *
2286
+ * @throw {Error} in case of empty UA String
2287
+ *
2288
+ * @constructor
2289
+ */
2290
+ constructor(UA, skipParsingOrHints = false, clientHints = null) {
2291
+ if (UA === void 0 || UA === null || UA === "") {
2292
+ throw new Error("UserAgent parameter can't be empty");
2293
+ }
2294
+ this._ua = UA;
2295
+ let skipParsing = false;
2296
+ if (typeof skipParsingOrHints === "boolean") {
2297
+ skipParsing = skipParsingOrHints;
2298
+ this._hints = clientHints;
2299
+ } else if (skipParsingOrHints != null && typeof skipParsingOrHints === "object") {
2300
+ this._hints = skipParsingOrHints;
2301
+ } else {
2302
+ this._hints = null;
2303
+ }
2304
+ this.parsedResult = {};
2305
+ if (skipParsing !== true) {
2306
+ this.parse();
2307
+ }
2308
+ }
2309
+ /**
2310
+ * Get Client Hints data
2311
+ * @return {ClientHints|null}
2312
+ *
2313
+ * @public
2314
+ * @example
2315
+ * const parser = Bowser.getParser(UA, clientHints);
2316
+ * const hints = parser.getHints();
2317
+ * console.log(hints.platform); // 'Windows'
2318
+ * console.log(hints.mobile); // false
2319
+ */
2320
+ getHints() {
2321
+ return this._hints;
2322
+ }
2323
+ /**
2324
+ * Check if a brand exists in Client Hints brands array
2325
+ * @param {string} brandName The brand name to check for
2326
+ * @return {boolean}
2327
+ *
2328
+ * @public
2329
+ * @example
2330
+ * const parser = Bowser.getParser(UA, clientHints);
2331
+ * if (parser.hasBrand('Google Chrome')) {
2332
+ * console.log('Chrome detected!');
2333
+ * }
2334
+ */
2335
+ hasBrand(brandName) {
2336
+ if (!this._hints || !Array.isArray(this._hints.brands)) {
2337
+ return false;
2338
+ }
2339
+ const brandLower = brandName.toLowerCase();
2340
+ return this._hints.brands.some(
2341
+ (b) => b.brand && b.brand.toLowerCase() === brandLower
2342
+ );
2343
+ }
2344
+ /**
2345
+ * Get brand version from Client Hints
2346
+ * @param {string} brandName The brand name to get version for
2347
+ * @return {string|undefined}
2348
+ *
2349
+ * @public
2350
+ * @example
2351
+ * const parser = Bowser.getParser(UA, clientHints);
2352
+ * const version = parser.getBrandVersion('Google Chrome');
2353
+ * console.log(version); // '131'
2354
+ */
2355
+ getBrandVersion(brandName) {
2356
+ if (!this._hints || !Array.isArray(this._hints.brands)) {
2357
+ return void 0;
2358
+ }
2359
+ const brandLower = brandName.toLowerCase();
2360
+ const brand = this._hints.brands.find(
2361
+ (b) => b.brand && b.brand.toLowerCase() === brandLower
2362
+ );
2363
+ return brand ? brand.version : void 0;
2364
+ }
2365
+ /**
2366
+ * Get UserAgent string of current Parser instance
2367
+ * @return {String} User-Agent String of the current <Parser> object
2368
+ *
2369
+ * @public
2370
+ */
2371
+ getUA() {
2372
+ return this._ua;
2373
+ }
2374
+ /**
2375
+ * Test a UA string for a regexp
2376
+ * @param {RegExp} regex
2377
+ * @return {Boolean}
2378
+ */
2379
+ test(regex) {
2380
+ return regex.test(this._ua);
2381
+ }
2382
+ /**
2383
+ * Get parsed browser object
2384
+ * @return {Object}
2385
+ */
2386
+ parseBrowser() {
2387
+ this.parsedResult.browser = {};
2388
+ const browserDescriptor = Utils.find(parser_browsers_default, (_browser) => {
2389
+ if (typeof _browser.test === "function") {
2390
+ return _browser.test(this);
2391
+ }
2392
+ if (Array.isArray(_browser.test)) {
2393
+ return _browser.test.some((condition) => this.test(condition));
2394
+ }
2395
+ throw new Error("Browser's test function is not valid");
2396
+ });
2397
+ if (browserDescriptor) {
2398
+ this.parsedResult.browser = browserDescriptor.describe(this.getUA(), this);
2399
+ }
2400
+ return this.parsedResult.browser;
2401
+ }
2402
+ /**
2403
+ * Get parsed browser object
2404
+ * @return {Object}
2405
+ *
2406
+ * @public
2407
+ */
2408
+ getBrowser() {
2409
+ if (this.parsedResult.browser) {
2410
+ return this.parsedResult.browser;
2411
+ }
2412
+ return this.parseBrowser();
2413
+ }
2414
+ /**
2415
+ * Get browser's name
2416
+ * @return {String} Browser's name or an empty string
2417
+ *
2418
+ * @public
2419
+ */
2420
+ getBrowserName(toLowerCase) {
2421
+ if (toLowerCase) {
2422
+ return String(this.getBrowser().name).toLowerCase() || "";
2423
+ }
2424
+ return this.getBrowser().name || "";
2425
+ }
2426
+ /**
2427
+ * Get browser's version
2428
+ * @return {String} version of browser
2429
+ *
2430
+ * @public
2431
+ */
2432
+ getBrowserVersion() {
2433
+ return this.getBrowser().version;
2434
+ }
2435
+ /**
2436
+ * Get OS
2437
+ * @return {Object}
2438
+ *
2439
+ * @example
2440
+ * this.getOS();
2441
+ * {
2442
+ * name: 'macOS',
2443
+ * version: '10.11.12'
2444
+ * }
2445
+ */
2446
+ getOS() {
2447
+ if (this.parsedResult.os) {
2448
+ return this.parsedResult.os;
2449
+ }
2450
+ return this.parseOS();
2451
+ }
2452
+ /**
2453
+ * Parse OS and save it to this.parsedResult.os
2454
+ * @return {*|{}}
2455
+ */
2456
+ parseOS() {
2457
+ this.parsedResult.os = {};
2458
+ const os = Utils.find(parser_os_default, (_os) => {
2459
+ if (typeof _os.test === "function") {
2460
+ return _os.test(this);
2461
+ }
2462
+ if (Array.isArray(_os.test)) {
2463
+ return _os.test.some((condition) => this.test(condition));
2464
+ }
2465
+ throw new Error("Browser's test function is not valid");
2466
+ });
2467
+ if (os) {
2468
+ this.parsedResult.os = os.describe(this.getUA());
2469
+ }
2470
+ return this.parsedResult.os;
2471
+ }
2472
+ /**
2473
+ * Get OS name
2474
+ * @param {Boolean} [toLowerCase] return lower-cased value
2475
+ * @return {String} name of the OS — macOS, Windows, Linux, etc.
2476
+ */
2477
+ getOSName(toLowerCase) {
2478
+ const { name } = this.getOS();
2479
+ if (toLowerCase) {
2480
+ return String(name).toLowerCase() || "";
2481
+ }
2482
+ return name || "";
2483
+ }
2484
+ /**
2485
+ * Get OS version
2486
+ * @return {String} full version with dots ('10.11.12', '5.6', etc)
2487
+ */
2488
+ getOSVersion() {
2489
+ return this.getOS().version;
2490
+ }
2491
+ /**
2492
+ * Get parsed platform
2493
+ * @return {{}}
2494
+ */
2495
+ getPlatform() {
2496
+ if (this.parsedResult.platform) {
2497
+ return this.parsedResult.platform;
2498
+ }
2499
+ return this.parsePlatform();
2500
+ }
2501
+ /**
2502
+ * Get platform name
2503
+ * @param {Boolean} [toLowerCase=false]
2504
+ * @return {*}
2505
+ */
2506
+ getPlatformType(toLowerCase = false) {
2507
+ const { type } = this.getPlatform();
2508
+ if (toLowerCase) {
2509
+ return String(type).toLowerCase() || "";
2510
+ }
2511
+ return type || "";
2512
+ }
2513
+ /**
2514
+ * Get parsed platform
2515
+ * @return {{}}
2516
+ */
2517
+ parsePlatform() {
2518
+ this.parsedResult.platform = {};
2519
+ const platform = Utils.find(parser_platforms_default, (_platform) => {
2520
+ if (typeof _platform.test === "function") {
2521
+ return _platform.test(this);
2522
+ }
2523
+ if (Array.isArray(_platform.test)) {
2524
+ return _platform.test.some((condition) => this.test(condition));
2525
+ }
2526
+ throw new Error("Browser's test function is not valid");
2527
+ });
2528
+ if (platform) {
2529
+ this.parsedResult.platform = platform.describe(this.getUA());
2530
+ }
2531
+ return this.parsedResult.platform;
2532
+ }
2533
+ /**
2534
+ * Get parsed engine
2535
+ * @return {{}}
2536
+ */
2537
+ getEngine() {
2538
+ if (this.parsedResult.engine) {
2539
+ return this.parsedResult.engine;
2540
+ }
2541
+ return this.parseEngine();
2542
+ }
2543
+ /**
2544
+ * Get engines's name
2545
+ * @return {String} Engines's name or an empty string
2546
+ *
2547
+ * @public
2548
+ */
2549
+ getEngineName(toLowerCase) {
2550
+ if (toLowerCase) {
2551
+ return String(this.getEngine().name).toLowerCase() || "";
2552
+ }
2553
+ return this.getEngine().name || "";
2554
+ }
2555
+ /**
2556
+ * Get parsed platform
2557
+ * @return {{}}
2558
+ */
2559
+ parseEngine() {
2560
+ this.parsedResult.engine = {};
2561
+ const engine = Utils.find(parser_engines_default, (_engine) => {
2562
+ if (typeof _engine.test === "function") {
2563
+ return _engine.test(this);
2564
+ }
2565
+ if (Array.isArray(_engine.test)) {
2566
+ return _engine.test.some((condition) => this.test(condition));
2567
+ }
2568
+ throw new Error("Browser's test function is not valid");
2569
+ });
2570
+ if (engine) {
2571
+ this.parsedResult.engine = engine.describe(this.getUA());
2572
+ }
2573
+ return this.parsedResult.engine;
2574
+ }
2575
+ /**
2576
+ * Parse full information about the browser
2577
+ * @returns {Parser}
2578
+ */
2579
+ parse() {
2580
+ this.parseBrowser();
2581
+ this.parseOS();
2582
+ this.parsePlatform();
2583
+ this.parseEngine();
2584
+ return this;
2585
+ }
2586
+ /**
2587
+ * Get parsed result
2588
+ * @return {ParsedResult}
2589
+ */
2590
+ getResult() {
2591
+ return Utils.assign({}, this.parsedResult);
2592
+ }
2593
+ /**
2594
+ * Check if parsed browser matches certain conditions
2595
+ *
2596
+ * @param {Object} checkTree It's one or two layered object,
2597
+ * which can include a platform or an OS on the first layer
2598
+ * and should have browsers specs on the bottom-laying layer
2599
+ *
2600
+ * @returns {Boolean|undefined} Whether the browser satisfies the set conditions or not.
2601
+ * Returns `undefined` when the browser is no described in the checkTree object.
2602
+ *
2603
+ * @example
2604
+ * const browser = Bowser.getParser(window.navigator.userAgent);
2605
+ * if (browser.satisfies({chrome: '>118.01.1322' }))
2606
+ * // or with os
2607
+ * if (browser.satisfies({windows: { chrome: '>118.01.1322' } }))
2608
+ * // or with platforms
2609
+ * if (browser.satisfies({desktop: { chrome: '>118.01.1322' } }))
2610
+ */
2611
+ satisfies(checkTree) {
2612
+ const platformsAndOSes = {};
2613
+ let platformsAndOSCounter = 0;
2614
+ const browsers = {};
2615
+ let browsersCounter = 0;
2616
+ const allDefinitions = Object.keys(checkTree);
2617
+ allDefinitions.forEach((key) => {
2618
+ const currentDefinition = checkTree[key];
2619
+ if (typeof currentDefinition === "string") {
2620
+ browsers[key] = currentDefinition;
2621
+ browsersCounter += 1;
2622
+ } else if (typeof currentDefinition === "object") {
2623
+ platformsAndOSes[key] = currentDefinition;
2624
+ platformsAndOSCounter += 1;
2625
+ }
2626
+ });
2627
+ if (platformsAndOSCounter > 0) {
2628
+ const platformsAndOSNames = Object.keys(platformsAndOSes);
2629
+ const OSMatchingDefinition = Utils.find(platformsAndOSNames, (name) => this.isOS(name));
2630
+ if (OSMatchingDefinition) {
2631
+ const osResult = this.satisfies(platformsAndOSes[OSMatchingDefinition]);
2632
+ if (osResult !== void 0) {
2633
+ return osResult;
2634
+ }
2635
+ }
2636
+ const platformMatchingDefinition = Utils.find(
2637
+ platformsAndOSNames,
2638
+ (name) => this.isPlatform(name)
2639
+ );
2640
+ if (platformMatchingDefinition) {
2641
+ const platformResult = this.satisfies(platformsAndOSes[platformMatchingDefinition]);
2642
+ if (platformResult !== void 0) {
2643
+ return platformResult;
2644
+ }
2645
+ }
2646
+ }
2647
+ if (browsersCounter > 0) {
2648
+ const browserNames = Object.keys(browsers);
2649
+ const matchingDefinition = Utils.find(browserNames, (name) => this.isBrowser(name, true));
2650
+ if (matchingDefinition !== void 0) {
2651
+ return this.compareVersion(browsers[matchingDefinition]);
2652
+ }
2653
+ }
2654
+ return void 0;
2655
+ }
2656
+ /**
2657
+ * Check if the browser name equals the passed string
2658
+ * @param {string} browserName The string to compare with the browser name
2659
+ * @param [includingAlias=false] The flag showing whether alias will be included into comparison
2660
+ * @returns {boolean}
2661
+ */
2662
+ isBrowser(browserName, includingAlias = false) {
2663
+ const defaultBrowserName = this.getBrowserName().toLowerCase();
2664
+ let browserNameLower = browserName.toLowerCase();
2665
+ const alias = Utils.getBrowserTypeByAlias(browserNameLower);
2666
+ if (includingAlias && alias) {
2667
+ browserNameLower = alias.toLowerCase();
2668
+ }
2669
+ return browserNameLower === defaultBrowserName;
2670
+ }
2671
+ compareVersion(version) {
2672
+ let expectedResults = [0];
2673
+ let comparableVersion = version;
2674
+ let isLoose = false;
2675
+ const currentBrowserVersion = this.getBrowserVersion();
2676
+ if (typeof currentBrowserVersion !== "string") {
2677
+ return void 0;
2678
+ }
2679
+ if (version[0] === ">" || version[0] === "<") {
2680
+ comparableVersion = version.substr(1);
2681
+ if (version[1] === "=") {
2682
+ isLoose = true;
2683
+ comparableVersion = version.substr(2);
2684
+ } else {
2685
+ expectedResults = [];
2686
+ }
2687
+ if (version[0] === ">") {
2688
+ expectedResults.push(1);
2689
+ } else {
2690
+ expectedResults.push(-1);
2691
+ }
2692
+ } else if (version[0] === "=") {
2693
+ comparableVersion = version.substr(1);
2694
+ } else if (version[0] === "~") {
2695
+ isLoose = true;
2696
+ comparableVersion = version.substr(1);
2697
+ }
2698
+ return expectedResults.indexOf(
2699
+ Utils.compareVersions(currentBrowserVersion, comparableVersion, isLoose)
2700
+ ) > -1;
2701
+ }
2702
+ /**
2703
+ * Check if the OS name equals the passed string
2704
+ * @param {string} osName The string to compare with the OS name
2705
+ * @returns {boolean}
2706
+ */
2707
+ isOS(osName) {
2708
+ return this.getOSName(true) === String(osName).toLowerCase();
2709
+ }
2710
+ /**
2711
+ * Check if the platform type equals the passed string
2712
+ * @param {string} platformType The string to compare with the platform type
2713
+ * @returns {boolean}
2714
+ */
2715
+ isPlatform(platformType) {
2716
+ return this.getPlatformType(true) === String(platformType).toLowerCase();
2717
+ }
2718
+ /**
2719
+ * Check if the engine name equals the passed string
2720
+ * @param {string} engineName The string to compare with the engine name
2721
+ * @returns {boolean}
2722
+ */
2723
+ isEngine(engineName) {
2724
+ return this.getEngineName(true) === String(engineName).toLowerCase();
2725
+ }
2726
+ /**
2727
+ * Is anything? Check if the browser is called "anything",
2728
+ * the OS called "anything" or the platform called "anything"
2729
+ * @param {String} anything
2730
+ * @param [includingAlias=false] The flag showing whether alias will be included into comparison
2731
+ * @returns {Boolean}
2732
+ */
2733
+ is(anything, includingAlias = false) {
2734
+ return this.isBrowser(anything, includingAlias) || this.isOS(anything) || this.isPlatform(anything);
2735
+ }
2736
+ /**
2737
+ * Check if any of the given values satisfies this.is(anything)
2738
+ * @param {String[]} anythings
2739
+ * @returns {Boolean}
2740
+ */
2741
+ some(anythings = []) {
2742
+ return anythings.some((anything) => this.is(anything));
2743
+ }
2744
+ };
2745
+ var parser_default = Parser;
2746
+
2747
+ // ../node_modules/.bun/bowser@2.14.1/node_modules/bowser/src/bowser.js
2748
+ var Bowser = class {
2749
+ /**
2750
+ * Creates a {@link Parser} instance
2751
+ *
2752
+ * @param {String} UA UserAgent string
2753
+ * @param {Boolean|Object} [skipParsingOrHints=false] Either a boolean to skip parsing,
2754
+ * or a ClientHints object (navigator.userAgentData)
2755
+ * @param {Object} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
2756
+ * @returns {Parser}
2757
+ * @throws {Error} when UA is not a String
2758
+ *
2759
+ * @example
2760
+ * const parser = Bowser.getParser(window.navigator.userAgent);
2761
+ * const result = parser.getResult();
2762
+ *
2763
+ * @example
2764
+ * // With User-Agent Client Hints
2765
+ * const parser = Bowser.getParser(
2766
+ * window.navigator.userAgent,
2767
+ * window.navigator.userAgentData
2768
+ * );
2769
+ */
2770
+ static getParser(UA, skipParsingOrHints = false, clientHints = null) {
2771
+ if (typeof UA !== "string") {
2772
+ throw new Error("UserAgent should be a string");
2773
+ }
2774
+ return new parser_default(UA, skipParsingOrHints, clientHints);
2775
+ }
2776
+ /**
2777
+ * Creates a {@link Parser} instance and runs {@link Parser.getResult} immediately
2778
+ *
2779
+ * @param {String} UA UserAgent string
2780
+ * @param {Object} [clientHints] User-Agent Client Hints data (navigator.userAgentData)
2781
+ * @return {ParsedResult}
2782
+ *
2783
+ * @example
2784
+ * const result = Bowser.parse(window.navigator.userAgent);
2785
+ *
2786
+ * @example
2787
+ * // With User-Agent Client Hints
2788
+ * const result = Bowser.parse(
2789
+ * window.navigator.userAgent,
2790
+ * window.navigator.userAgentData
2791
+ * );
2792
+ */
2793
+ static parse(UA, clientHints = null) {
2794
+ return new parser_default(UA, clientHints).getResult();
2795
+ }
2796
+ static get BROWSER_MAP() {
2797
+ return BROWSER_MAP;
2798
+ }
2799
+ static get ENGINE_MAP() {
2800
+ return ENGINE_MAP;
2801
+ }
2802
+ static get OS_MAP() {
2803
+ return OS_MAP;
2804
+ }
2805
+ static get PLATFORMS_MAP() {
2806
+ return PLATFORMS_MAP;
2807
+ }
2808
+ };
2809
+ var bowser_default = Bowser;
2810
+ export {
2811
+ bowser_default as default
2812
+ };
2813
+ /*! Bundled license information:
2814
+
2815
+ bowser/src/bowser.js:
2816
+ (*!
2817
+ * Bowser - a browser detector
2818
+ * https://github.com/bowser-js/bowser
2819
+ * MIT License | (c) Dustin Diaz 2012-2015
2820
+ * MIT License | (c) Denis Demchenko 2015-2019
2821
+ *)
2822
+ */