native-fn 1.0.47 → 1.0.49
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/native.cjs +150 -70
- package/dist/native.min.cjs +1 -1
- package/dist/native.min.mjs +1 -1
- package/dist/native.mjs +150 -70
- package/dist/native.umd.js +150 -70
- package/dist/native.umd.min.js +1 -1
- package/dist/plugin/app/index.cjs +170 -69
- package/dist/plugin/app/index.min.cjs +1 -1
- package/dist/plugin/app/index.min.mjs +1 -1
- package/dist/plugin/app/index.mjs +170 -69
- package/dist/plugin/app/index.umd.js +170 -69
- package/dist/plugin/app/index.umd.min.js +1 -1
- package/dist/plugin/app/src/types/platform.d.ts +3 -1
- package/dist/plugin/camera/index.cjs +149 -69
- package/dist/plugin/camera/index.min.cjs +1 -1
- package/dist/plugin/camera/index.min.mjs +1 -1
- package/dist/plugin/camera/index.mjs +149 -69
- package/dist/plugin/camera/index.umd.js +149 -69
- package/dist/plugin/camera/index.umd.min.js +1 -1
- package/dist/plugin/camera/src/types/platform.d.ts +3 -1
- package/dist/plugin/clipboard/src/types/platform.d.ts +3 -1
- package/dist/plugin/fullscreen/index.cjs +149 -69
- package/dist/plugin/fullscreen/index.min.cjs +1 -1
- package/dist/plugin/fullscreen/index.min.mjs +1 -1
- package/dist/plugin/fullscreen/index.mjs +149 -69
- package/dist/plugin/fullscreen/index.umd.js +149 -69
- package/dist/plugin/fullscreen/index.umd.min.js +1 -1
- package/dist/plugin/fullscreen/src/types/platform.d.ts +3 -1
- package/dist/plugin/theme/index.cjs +149 -69
- package/dist/plugin/theme/index.min.cjs +1 -1
- package/dist/plugin/theme/index.min.mjs +1 -1
- package/dist/plugin/theme/index.mjs +149 -69
- package/dist/plugin/theme/index.umd.js +149 -69
- package/dist/plugin/theme/index.umd.min.js +1 -1
- package/dist/plugin/theme/src/types/platform.d.ts +3 -1
- package/dist/src/types/platform.d.ts +3 -1
- package/package.json +1 -1
|
@@ -9,9 +9,11 @@ export declare interface PlatformInstance {
|
|
|
9
9
|
browserVersion: string;
|
|
10
10
|
renderer: string;
|
|
11
11
|
userAgent: string;
|
|
12
|
-
isWebview: boolean;
|
|
13
12
|
isStandalone: boolean;
|
|
14
13
|
isMobile: boolean;
|
|
15
14
|
isDesktop: boolean;
|
|
15
|
+
isWebview: boolean;
|
|
16
16
|
isNodeJS: boolean;
|
|
17
|
+
isElectron: boolean;
|
|
18
|
+
isReactNative: boolean;
|
|
17
19
|
}
|
|
@@ -39,6 +39,7 @@ var Browsers;
|
|
|
39
39
|
Browsers["IE"] = "IE";
|
|
40
40
|
Browsers["SamsungInternet"] = "SamsungInternet";
|
|
41
41
|
})(Browsers || (Browsers = {}));
|
|
42
|
+
var userAgent = typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string' ? navigator.userAgent : '';
|
|
42
43
|
var Platform = {
|
|
43
44
|
device: Devices.Unknown,
|
|
44
45
|
os: OS.Unknown,
|
|
@@ -48,12 +49,14 @@ var Platform = {
|
|
|
48
49
|
browser: Browsers.Unknown,
|
|
49
50
|
browserVersion: '',
|
|
50
51
|
renderer: getRenderer(),
|
|
51
|
-
userAgent:
|
|
52
|
-
isWebview: false,
|
|
52
|
+
userAgent: userAgent,
|
|
53
53
|
isMobile: false,
|
|
54
54
|
isDesktop: false,
|
|
55
55
|
isStandalone: false,
|
|
56
|
-
|
|
56
|
+
isWebview: /; ?wv|applewebkit(?!.*safari)/i.test(userAgent),
|
|
57
|
+
isNodeJS: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined,
|
|
58
|
+
isElectron: typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.electron !== undefined,
|
|
59
|
+
isReactNative: typeof navigator !== 'undefined' && navigator.product === 'ReactNative'
|
|
57
60
|
};
|
|
58
61
|
var OS_RESOLVER_MAP = [
|
|
59
62
|
[/windows nt (6\.[23]); arm/i, OS.Windows, resolveWindowsVersion],
|
|
@@ -140,6 +143,137 @@ function resolveUnderscoreVersion(string) {
|
|
|
140
143
|
return '';
|
|
141
144
|
return string.replace(/_/g, '.');
|
|
142
145
|
}
|
|
146
|
+
function resolveSemanticWindowsVersion(version, defaultValue) {
|
|
147
|
+
if (version.major === 10 && version.minor === 0 && version.build >= 22000)
|
|
148
|
+
return '11';
|
|
149
|
+
if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
150
|
+
return '10';
|
|
151
|
+
if (version.major === 6 && version.minor === 3)
|
|
152
|
+
return '8.1';
|
|
153
|
+
if (version.major === 6 && version.minor === 2)
|
|
154
|
+
return '8';
|
|
155
|
+
if (version.major === 6 && version.minor === 1)
|
|
156
|
+
return '7';
|
|
157
|
+
if (version.major === 6 && version.minor === 0)
|
|
158
|
+
return 'Vista';
|
|
159
|
+
if (version.major === 5 && version.minor === 1)
|
|
160
|
+
return 'XP';
|
|
161
|
+
if (version.major === 5 && version.minor === 2)
|
|
162
|
+
return 'XP';
|
|
163
|
+
if (version.major === 5 && version.minor === 0)
|
|
164
|
+
return '2000';
|
|
165
|
+
if (version.major === 4 && version.minor === 90)
|
|
166
|
+
return 'ME';
|
|
167
|
+
if (version.major === 4 && version.minor === 0)
|
|
168
|
+
return 'NT 4.0';
|
|
169
|
+
if (version.major === 3 && version.minor === 51)
|
|
170
|
+
return 'NT 3.11';
|
|
171
|
+
return defaultValue;
|
|
172
|
+
}
|
|
173
|
+
function resolveSemanticDarwinVersion(version, defaultValue) {
|
|
174
|
+
if (version.major >= 24)
|
|
175
|
+
return '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
176
|
+
if (version.major === 23)
|
|
177
|
+
return '14.' + version.minor + '.' + version.build;
|
|
178
|
+
if (version.major === 22)
|
|
179
|
+
return '13.' + version.minor + '.' + version.build;
|
|
180
|
+
if (version.major === 21)
|
|
181
|
+
return '12.' + version.minor + '.' + version.build;
|
|
182
|
+
if (version.major === 20)
|
|
183
|
+
return '11.' + version.minor + '.' + version.build;
|
|
184
|
+
if (version.major === 19)
|
|
185
|
+
return '10.15.' + version.minor;
|
|
186
|
+
if (version.major === 18)
|
|
187
|
+
return '10.14.' + version.minor;
|
|
188
|
+
if (version.major === 17)
|
|
189
|
+
return '10.13.' + version.minor;
|
|
190
|
+
if (version.major === 16)
|
|
191
|
+
return '10.12.' + version.minor;
|
|
192
|
+
if (version.major === 15)
|
|
193
|
+
return '10.11.' + version.minor;
|
|
194
|
+
if (version.major === 14)
|
|
195
|
+
return '10.10.' + version.minor;
|
|
196
|
+
if (version.major === 13)
|
|
197
|
+
return '10.9.' + version.minor;
|
|
198
|
+
if (version.major >= 5 && version.major <= 12)
|
|
199
|
+
return '10.' + (version.major - 4) + '.' + version.minor;
|
|
200
|
+
return defaultValue;
|
|
201
|
+
}
|
|
202
|
+
function resolveSemanticAndroidVersion(version, defaultValue) {
|
|
203
|
+
if (version.major >= 36)
|
|
204
|
+
return '16';
|
|
205
|
+
if (version.major === 35)
|
|
206
|
+
return '15';
|
|
207
|
+
if (version.major === 34)
|
|
208
|
+
return '14';
|
|
209
|
+
if (version.major === 33)
|
|
210
|
+
return '13';
|
|
211
|
+
if (version.major === 32)
|
|
212
|
+
return '12.1';
|
|
213
|
+
if (version.major === 31)
|
|
214
|
+
return '12';
|
|
215
|
+
if (version.major === 30)
|
|
216
|
+
return '11';
|
|
217
|
+
if (version.major === 29)
|
|
218
|
+
return '10';
|
|
219
|
+
if (version.major === 28)
|
|
220
|
+
return '9';
|
|
221
|
+
if (version.major === 27)
|
|
222
|
+
return '8.1';
|
|
223
|
+
if (version.major === 26)
|
|
224
|
+
return '8.0';
|
|
225
|
+
if (version.major === 25)
|
|
226
|
+
return '7.1';
|
|
227
|
+
if (version.major === 24)
|
|
228
|
+
return '7.0';
|
|
229
|
+
if (version.major === 23)
|
|
230
|
+
return '6.0';
|
|
231
|
+
if (version.major === 22)
|
|
232
|
+
return '5.1';
|
|
233
|
+
if (version.major === 21)
|
|
234
|
+
return '5.0';
|
|
235
|
+
if (version.major === 20)
|
|
236
|
+
return '4.4W';
|
|
237
|
+
if (version.major === 19)
|
|
238
|
+
return '4.4';
|
|
239
|
+
if (version.major === 18)
|
|
240
|
+
return '4.3';
|
|
241
|
+
if (version.major === 17)
|
|
242
|
+
return '4.2';
|
|
243
|
+
if (version.major === 16)
|
|
244
|
+
return '4.1';
|
|
245
|
+
if (version.major === 15)
|
|
246
|
+
return '4.0.3';
|
|
247
|
+
if (version.major === 14)
|
|
248
|
+
return '4.0';
|
|
249
|
+
if (version.major === 13)
|
|
250
|
+
return '3.2';
|
|
251
|
+
if (version.major === 12)
|
|
252
|
+
return '3.1';
|
|
253
|
+
if (version.major === 11)
|
|
254
|
+
return '3.0';
|
|
255
|
+
if (version.major === 10)
|
|
256
|
+
return '2.3.3';
|
|
257
|
+
if (version.major === 9)
|
|
258
|
+
return '2.3';
|
|
259
|
+
if (version.major === 8)
|
|
260
|
+
return '2.2';
|
|
261
|
+
if (version.major === 7)
|
|
262
|
+
return '2.1';
|
|
263
|
+
if (version.major === 6)
|
|
264
|
+
return '2.0.1';
|
|
265
|
+
if (version.major === 5)
|
|
266
|
+
return '2.0';
|
|
267
|
+
if (version.major === 4)
|
|
268
|
+
return '1.6';
|
|
269
|
+
if (version.major === 3)
|
|
270
|
+
return '1.5';
|
|
271
|
+
if (version.major === 2)
|
|
272
|
+
return '1.1';
|
|
273
|
+
if (version.major === 1)
|
|
274
|
+
return '1.0';
|
|
275
|
+
return defaultValue;
|
|
276
|
+
}
|
|
143
277
|
function resolveVersion(string, resolver) {
|
|
144
278
|
if (typeof resolver === 'function')
|
|
145
279
|
return resolver(string);
|
|
@@ -156,11 +290,6 @@ function normalizeBrand(entry) {
|
|
|
156
290
|
return { brand: entry, version: '' };
|
|
157
291
|
return { brand: entry.brand, version: entry.version };
|
|
158
292
|
}
|
|
159
|
-
function getUserAgent() {
|
|
160
|
-
if (typeof navigator !== 'undefined' && typeof navigator.userAgent === 'string')
|
|
161
|
-
return navigator.userAgent;
|
|
162
|
-
return '';
|
|
163
|
-
}
|
|
164
293
|
function getRenderer() {
|
|
165
294
|
if (typeof globalThis.document === 'undefined')
|
|
166
295
|
return '';
|
|
@@ -191,10 +320,7 @@ function getIsStandalone(os) {
|
|
|
191
320
|
function getIsWebview() {
|
|
192
321
|
return /; ?wv|applewebkit(?!.*safari)/i.test(Platform.userAgent);
|
|
193
322
|
}
|
|
194
|
-
function
|
|
195
|
-
return typeof globalThis.process !== 'undefined' && typeof globalThis.process.versions !== 'undefined' && globalThis.process.versions.node !== undefined;
|
|
196
|
-
}
|
|
197
|
-
function getNodeOSVersion(string) {
|
|
323
|
+
function getSemanticVersion(string) {
|
|
198
324
|
var parts = string.split('.');
|
|
199
325
|
return {
|
|
200
326
|
major: parseInt(parts[0] || '0'),
|
|
@@ -242,95 +368,49 @@ for (var i = 0; i < BROWSER_RESOLVER_MAP.length; i++) {
|
|
|
242
368
|
break;
|
|
243
369
|
}
|
|
244
370
|
}
|
|
245
|
-
if (
|
|
371
|
+
if (Platform.isReactNative) {
|
|
246
372
|
try {
|
|
247
373
|
var reactNative = require('react-native');
|
|
248
374
|
var platform = reactNative.Platform;
|
|
249
375
|
var os = platform.OS;
|
|
376
|
+
var release = '' + platform.Version;
|
|
377
|
+
var version = getSemanticVersion(release);
|
|
250
378
|
switch (os) {
|
|
251
379
|
case 'android':
|
|
252
380
|
Platform.os = OS.Android;
|
|
381
|
+
Platform.osVersion = resolveSemanticAndroidVersion(version, release);
|
|
253
382
|
break;
|
|
254
383
|
case 'ios':
|
|
255
384
|
Platform.os = OS.iOS;
|
|
385
|
+
Platform.osVersion = release;
|
|
256
386
|
break;
|
|
257
387
|
case 'windows':
|
|
258
388
|
Platform.os = OS.Windows;
|
|
389
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
259
390
|
break;
|
|
260
391
|
case 'macos':
|
|
261
392
|
Platform.os = OS.MacOS;
|
|
393
|
+
Platform.osVersion = release;
|
|
262
394
|
break;
|
|
263
395
|
}
|
|
264
396
|
}
|
|
265
397
|
catch (_) {
|
|
266
398
|
}
|
|
267
399
|
}
|
|
268
|
-
|
|
400
|
+
if (Platform.isNodeJS) {
|
|
269
401
|
try {
|
|
270
402
|
var os = require('os');
|
|
271
403
|
var platform = os.platform();
|
|
272
404
|
var release = os.release();
|
|
273
|
-
var version =
|
|
405
|
+
var version = getSemanticVersion(release);
|
|
274
406
|
switch (platform) {
|
|
275
407
|
case 'win32':
|
|
276
408
|
Platform.os = OS.Windows;
|
|
277
|
-
|
|
278
|
-
Platform.osVersion = '11';
|
|
279
|
-
else if (version.major === 10 && version.minor === 0 && version.build < 22000)
|
|
280
|
-
Platform.osVersion = '10';
|
|
281
|
-
else if (version.major === 6 && version.minor === 3)
|
|
282
|
-
Platform.osVersion = '8.1';
|
|
283
|
-
else if (version.major === 6 && version.minor === 2)
|
|
284
|
-
Platform.osVersion = '8';
|
|
285
|
-
else if (version.major === 6 && version.minor === 1)
|
|
286
|
-
Platform.osVersion = '7';
|
|
287
|
-
else if (version.major === 6 && version.minor === 0)
|
|
288
|
-
Platform.osVersion = 'Vista';
|
|
289
|
-
else if (version.major === 5 && version.minor === 1)
|
|
290
|
-
Platform.osVersion = 'XP';
|
|
291
|
-
else if (version.major === 5 && version.minor === 2)
|
|
292
|
-
Platform.osVersion = 'XP';
|
|
293
|
-
else if (version.major === 5 && version.minor === 0)
|
|
294
|
-
Platform.osVersion = '2000';
|
|
295
|
-
else if (version.major === 4 && version.minor === 90)
|
|
296
|
-
Platform.osVersion = 'ME';
|
|
297
|
-
else if (version.major === 4 && version.minor === 0)
|
|
298
|
-
Platform.osVersion = 'NT 4.0';
|
|
299
|
-
else if (version.major === 3 && version.minor === 51)
|
|
300
|
-
Platform.osVersion = 'NT 3.11';
|
|
301
|
-
else
|
|
302
|
-
Platform.osVersion = release;
|
|
409
|
+
Platform.osVersion = resolveSemanticWindowsVersion(version, release);
|
|
303
410
|
break;
|
|
304
411
|
case 'darwin':
|
|
305
412
|
Platform.os = OS.MacOS;
|
|
306
|
-
|
|
307
|
-
Platform.osVersion = '' + (version.major - 9) + '.' + version.minor + '.' + version.build;
|
|
308
|
-
else if (version.major === 23)
|
|
309
|
-
Platform.osVersion = '14.' + version.minor + '.' + version.build;
|
|
310
|
-
else if (version.major === 22)
|
|
311
|
-
Platform.osVersion = '13.' + version.minor + '.' + version.build;
|
|
312
|
-
else if (version.major === 21)
|
|
313
|
-
Platform.osVersion = '12.' + version.minor + '.' + version.build;
|
|
314
|
-
else if (version.major === 20)
|
|
315
|
-
Platform.osVersion = '11.' + version.minor + '.' + version.build;
|
|
316
|
-
else if (version.major === 19)
|
|
317
|
-
Platform.osVersion = '10.15.' + version.minor;
|
|
318
|
-
else if (version.major === 18)
|
|
319
|
-
Platform.osVersion = '10.14.' + version.minor;
|
|
320
|
-
else if (version.major === 17)
|
|
321
|
-
Platform.osVersion = '10.13.' + version.minor;
|
|
322
|
-
else if (version.major === 16)
|
|
323
|
-
Platform.osVersion = '10.12.' + version.minor;
|
|
324
|
-
else if (version.major === 15)
|
|
325
|
-
Platform.osVersion = '10.11.' + version.minor;
|
|
326
|
-
else if (version.major === 14)
|
|
327
|
-
Platform.osVersion = '10.10.' + version.minor;
|
|
328
|
-
else if (version.major === 13)
|
|
329
|
-
Platform.osVersion = '10.9.' + version.minor;
|
|
330
|
-
else if (version.major >= 5 && version.major <= 12)
|
|
331
|
-
Platform.osVersion = '10.' + (version.major - 4) + '.' + version.minor;
|
|
332
|
-
else
|
|
333
|
-
Platform.osVersion = release;
|
|
413
|
+
Platform.osVersion = resolveSemanticDarwinVersion(version, release);
|
|
334
414
|
break;
|
|
335
415
|
case 'android':
|
|
336
416
|
Platform.os = OS.Android;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var m=0;m<a.length;m++){var f=(g=a[m])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(f))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(m=0;m<s.length;m++){f=(g=s[m])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(m=0;m<l.length;m++){f=(g=l[m])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,a=0;a<i.length;a++){var s=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function a(r,o){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():a()})):void t()}catch(e){if(!T())return void a()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),j={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};module.exports=j;
|
|
1
|
+
"use strict";var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};module.exports=y;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e,n,r,i;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(i||(i={}));var o,t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:i.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:"undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",isWebview:!1,isMobile:!1,isDesktop:!1,isStandalone:!1,isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,i.Chrome],[/webview.+edge\/([\w.]+)/i,i.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,i.Edge],[/opera mini\/([-\w.]+)/i,i.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,i.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,i.Opera],[/opios[\/ ]+([\w.]+)/i,i.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,i.Opera],[/\bopr\/([\w.]+)/i,i.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,i.IE],[/(?:ms|\()ie ([\w.]+)/i,i.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,i.IE],[/\bfocus\/([\w.]+)/i,i.Firefox],[/\bopt\/([\w.]+)/i,i.Opera],[/coast\/([\w.]+)/i,i.Opera],[/fxios\/([\w.-]+)/i,i.Firefox],[/samsungbrowser\/([\w.]+)/i,i.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,i.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,i.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,i.Chrome],[/chrome\/([\w.]+) mobile/i,i.Chrome],[/chrome\/v?([\w.]+)/i,i.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,i.Safari],[/version\/([\w.,]+) .*safari/i,i.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,i.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,i.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,i.Firefox],[/firefox\/([\w.]+)/i,i.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}for(var m=0;m<a.length;m++){var f=(g=a[m])[0],b=g[1],w=g[2];if(null!==(h=t.userAgent.match(f))){t.os=b,t.osVersion=d(h[1],w),b===e.iOS||b===e.Android?t.device=n.Mobile:b!==e.Windows&&b!==e.MacOS||(t.device=n.Desktop);break}}for(m=0;m<s.length;m++){f=(g=s[m])[0];var v=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.engine=v,t.engineVersion=d(h[1],w);break}}for(m=0;m<l.length;m++){f=(g=l[m])[0];var g,h,p=g[1];w=g[2];if(null!==(h=t.userAgent.match(f))){t.browser=p,t.browserVersion=d(h[1],w);break}}if("undefined"!=typeof navigator&&"ReactNative"===navigator.product)try{switch(b=(k=require("react-native").Platform).OS){case"android":t.os=e.Android;break;case"ios":t.os=e.iOS;break;case"windows":t.os=e.Windows;break;case"macos":t.os=e.MacOS}}catch(e){}else if(t.isNodeJS)try{var k=(b=require("os")).platform(),E=b.release(),F=(o=E.split("."),{major:parseInt(o[0]||"0"),minor:parseInt(o[1]||"0"),build:parseInt(o[2]||"0")});switch(k){case"win32":t.os=e.Windows,t.osVersion=10===F.major&&0===F.minor&&F.build>=22e3?"11":10===F.major&&0===F.minor&&F.build<22e3?"10":6===F.major&&3===F.minor?"8.1":6===F.major&&2===F.minor?"8":6===F.major&&1===F.minor?"7":6===F.major&&0===F.minor?"Vista":5===F.major&&1===F.minor||5===F.major&&2===F.minor?"XP":5===F.major&&0===F.minor?"2000":4===F.major&&90===F.minor?"ME":4===F.major&&0===F.minor?"NT 4.0":3===F.major&&51===F.minor?"NT 3.11":E;break;case"darwin":t.os=e.MacOS,t.osVersion=F.major>=24?F.major-9+"."+F.minor+"."+F.build:23===F.major?"14."+F.minor+"."+F.build:22===F.major?"13."+F.minor+"."+F.build:21===F.major?"12."+F.minor+"."+F.build:20===F.major?"11."+F.minor+"."+F.build:19===F.major?"10.15."+F.minor:18===F.major?"10.14."+F.minor:17===F.major?"10.13."+F.minor:16===F.major?"10.12."+F.minor:15===F.major?"10.11."+F.minor:14===F.major?"10.10."+F.minor:13===F.major?"10.9."+F.minor:F.major>=5&&F.major<=12?"10."+(F.major-4)+"."+F.minor:E;break;case"android":t.os=e.Android,t.osVersion=E;break;case"linux":/android/i.test(E)&&(t.os=e.Android,t.osVersion=E)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,i=n.fullVersionList||n.brands||[],o=n.platformVersion,a=0;a<i.length;a++){var s=null==(r=i[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof o&&(t.os===e.Windows&&parseInt(o.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=o)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var S={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function T(){return e.iOS===t.os}var x=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return S.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var i=n[r];if((o=S[i]).enabled in globalThis.document||o.element in globalThis.document||o.exit in globalThis.document)return"webkit"===i&&"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}if("webkitCurrentFullScreenElement"in globalThis.document){var o={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:S.webkit.events};return"webkitRequestFullScreen"in e&&(o.request="webkitRequestFullScreen"),o}return null}(),n=null,r=!1;function i(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function o(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==o()}function a(r,o){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,o);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){T()?u():a()})):void t()}catch(e){if(!T())return void a()}}function u(){if(T()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,i(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,i){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){i()})):void r()}}if(T()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}o()?i():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,o,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),T())i(),new MutationObserver((function(){i()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function o(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!T())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var i=n[r];if(i.webkitSupportsFullscreen||"webkitEnterFullscreen"in i)return!0}return!1}var o=document[e.enabled];return"boolean"==typeof o?o:void 0!==document[e.element]}()},get element(){return o()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function i(n){e(n)}document.addEventListener(r,i,!1),n.push((function(){document.removeEventListener(r,i,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),j={installed:!1,name:"Fullscreen",module:x,Constants:{},Errors:{}};export{j as default};
|
|
1
|
+
var e,n,r,o;!function(e){e.Unknown="Unknown",e.Android="Android",e.iOS="iOS",e.Windows="Windows",e.MacOS="MacOS"}(e||(e={})),function(e){e.Unknown="Unknown",e.Mobile="Mobile",e.Desktop="Desktop"}(n||(n={})),function(e){e.Unknown="Unknown",e.EdgeHTML="EdgeHTML",e.ArkWeb="ArkWeb",e.Blink="Blink",e.Presto="Presto",e.WebKit="WebKit",e.Trident="Trident",e.NetFront="NetFront",e.KHTML="KHTML",e.Tasman="Tasman",e.Gecko="Gecko"}(r||(r={})),function(e){e.Unknown="Unknown",e.Chrome="Chrome",e.Safari="Safari",e.Edge="Edge",e.Firefox="Firefox",e.Opera="Opera",e.IE="IE",e.SamsungInternet="SamsungInternet"}(o||(o={}));var i="undefined"!=typeof navigator&&"string"==typeof navigator.userAgent?navigator.userAgent:"",t={device:n.Unknown,os:e.Unknown,osVersion:"",engine:r.Unknown,engineVersion:"",browser:o.Unknown,browserVersion:"",renderer:function(){if(void 0===globalThis.document)return"";var e=globalThis.document.createElement("canvas");if("function"!=typeof e.getContext)return"";var n=e.getContext("webgl2")||e.getContext("experimental-webgl")||e.getContext("webgl");if(null===n)return"";if(n instanceof WebGLRenderingContext||"getParameter"in n&&"function"==typeof n.getParameter){var r=n.getExtension("WEBGL_debug_renderer_info");return null===r?n.getParameter(n.RENDERER):n.getParameter(r.UNMASKED_RENDERER_WEBGL)}return""}(),userAgent:i,isMobile:!1,isDesktop:!1,isStandalone:!1,isWebview:/; ?wv|applewebkit(?!.*safari)/i.test(i),isNodeJS:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.node,isElectron:void 0!==globalThis.process&&void 0!==globalThis.process.versions&&void 0!==globalThis.process.versions.electron,isReactNative:"undefined"!=typeof navigator&&"ReactNative"===navigator.product},a=[[/windows nt (6\.[23]); arm/i,e.Windows,u],[/windows (?:phone|mobile|iot)(?: os)?[\/ ]?([\d.]*( se)?)/i,e.Windows,u],[/windows[\/ ](1[01]|2000|3\.1|7|8(\.1)?|9[58]|me|server 20\d\d( r2)?|vista|xp)/i,e.Windows,u],[/windows nt ?([\d.)]*)(?!.+xbox)/i,e.Windows,u],[/\bwin(?=3| ?9|n)(?:nt| 9x )?([\d.;]*)/i,e.Windows,u],[/windows ce\/?([\d.]*)/i,e.Windows,u],[/[adehimnop]{4,7}\b(?:.*os (\w+) like mac|; opera)/i,e.iOS,c],[/(?:ios;fbsv|ios(?=.+ip(?:ad|hone))|ip(?:ad|hone)(?: |.+i(?:pad)?)os)[\/ ]([\w.]+)/i,e.iOS,c],[/cfnetwork\/.+darwin/i,e.iOS,c],[/mac os x ?([\w. ]*)/i,e.MacOS,c],[/(?:macintosh|mac_powerpc\b)(?!.+(haiku|morphos))/i,e.MacOS,c],[/droid ([\w.]+)\b.+(android[- ]x86)/i,e.Android],[/android\w*[-\/.; ]?([\d.]*)/i,e.Android]],s=[[/windows.+ edge\/([\w.]+)/i,r.EdgeHTML],[/arkweb\/([\w.]+)/i,r.ArkWeb],[/webkit\/537\.36.+chrome\/(?!27)([\w.]+)/i,r.Blink],[/presto\/([\w.]+)/i,r.Presto],[/webkit\/([\w.]+)/i,r.WebKit],[/trident\/([\w.]+)/i,r.Trident],[/netfront\/([\w.]+)/i,r.NetFront],[/khtml[\/ ]\(?([\w.]+)/i,r.KHTML],[/tasman[\/ ]\(?([\w.]+)/i,r.Tasman],[/rv:([\w.]{1,9})\b.+gecko/i,r.Gecko]],l=[[/\b(?:crmo|crios)\/([\w.]+)/i,o.Chrome],[/webview.+edge\/([\w.]+)/i,o.Edge],[/edg(?:e|ios|a)?\/([\w.]+)/i,o.Edge],[/opera mini\/([-\w.]+)/i,o.Opera],[/opera [mobileta]{3,6}\b.+version\/([-\w.]+)/i,o.Opera],[/opera(?:.+version\/|[\/ ]+)([\w.]+)/i,o.Opera],[/opios[\/ ]+([\w.]+)/i,o.Opera],[/\bop(?:rg)?x\/([\w.]+)/i,o.Opera],[/\bopr\/([\w.]+)/i,o.Opera],[/iemobile(?:browser|boat|jet)[\/ ]?([\d.]*)/i,o.IE],[/(?:ms|\()ie ([\w.]+)/i,o.IE],[/trident.+rv[: ]([\w.]{1,9})\b.+like gecko/i,o.IE],[/\bfocus\/([\w.]+)/i,o.Firefox],[/\bopt\/([\w.]+)/i,o.Opera],[/coast\/([\w.]+)/i,o.Opera],[/fxios\/([\w.-]+)/i,o.Firefox],[/samsungbrowser\/([\w.]+)/i,o.SamsungInternet],[/headlesschrome(?:\/([\w.]+)| )/i,o.Chrome],[/wv\).+chrome\/([\w.]+).+edgw\//i,o.Edge],[/ wv\).+(chrome)\/([\w.]+)/i,o.Chrome],[/chrome\/([\w.]+) mobile/i,o.Chrome],[/chrome\/v?([\w.]+)/i,o.Chrome],[/version\/([\w.,]+) .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/iphone .*mobile(?:\/\w+ | ?)safari/i,o.Safari],[/version\/([\w.,]+) .*safari/i,o.Safari],[/webkit.+?(?:mobile ?safari|safari)(\/[\w.]+)/i,o.Safari,"1"],[/(?:mobile|tablet);.*firefox\/([\w.-]+)/i,o.Firefox],[/mobile vr; rv:([\w.]+)\).+firefox/i,o.Firefox],[/firefox\/([\w.]+)/i,o.Firefox]];function u(e){if(void 0===e)return"";var n={"4.90":"ME","NT3.51":"NT 3.11","NT4.0":"NT 4.0","NT 5.0":"2000","NT 5.1":"XP","NT 5.2":"XP","NT 6.0":"Vista","NT 6.1":"7","NT 6.2":"8","NT 6.3":"8.1","NT 6.4":"10","NT 10.0":"10",ARM:"RT"}[e];return void 0!==n?n:e}function c(e){return void 0===e?"":e.replace(/_/g,".")}function m(e,n){return 10===e.major&&0===e.minor&&e.build>=22e3?"11":10===e.major&&0===e.minor&&e.build<22e3?"10":6===e.major&&3===e.minor?"8.1":6===e.major&&2===e.minor?"8":6===e.major&&1===e.minor?"7":6===e.major&&0===e.minor?"Vista":5===e.major&&1===e.minor||5===e.major&&2===e.minor?"XP":5===e.major&&0===e.minor?"2000":4===e.major&&90===e.minor?"ME":4===e.major&&0===e.minor?"NT 4.0":3===e.major&&51===e.minor?"NT 3.11":n}function d(e,n){return"function"==typeof n?n(e):"string"==typeof n?n:void 0===e?"":e}function f(e){var n=e.split(".");return{major:parseInt(n[0]||"0"),minor:parseInt(n[1]||"0"),build:parseInt(n[2]||"0")}}for(var b=0;b<a.length;b++){var w=(p=a[b])[0],v=p[1],g=p[2];if(null!==(k=t.userAgent.match(w))){t.os=v,t.osVersion=d(k[1],g),v===e.iOS||v===e.Android?t.device=n.Mobile:v!==e.Windows&&v!==e.MacOS||(t.device=n.Desktop);break}}for(b=0;b<s.length;b++){w=(p=s[b])[0];var h=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.engine=h,t.engineVersion=d(k[1],g);break}}for(b=0;b<l.length;b++){w=(p=l[b])[0];var p,k,E=p[1];g=p[2];if(null!==(k=t.userAgent.match(w))){t.browser=E,t.browserVersion=d(k[1],g);break}}if(t.isReactNative)try{v=(S=require("react-native").Platform).OS;var j=f(F=""+S.Version);switch(v){case"android":t.os=e.Android,t.osVersion=function(e,n){return e.major>=36?"16":35===e.major?"15":34===e.major?"14":33===e.major?"13":32===e.major?"12.1":31===e.major?"12":30===e.major?"11":29===e.major?"10":28===e.major?"9":27===e.major?"8.1":26===e.major?"8.0":25===e.major?"7.1":24===e.major?"7.0":23===e.major?"6.0":22===e.major?"5.1":21===e.major?"5.0":20===e.major?"4.4W":19===e.major?"4.4":18===e.major?"4.3":17===e.major?"4.2":16===e.major?"4.1":15===e.major?"4.0.3":14===e.major?"4.0":13===e.major?"3.2":12===e.major?"3.1":11===e.major?"3.0":10===e.major?"2.3.3":9===e.major?"2.3":8===e.major?"2.2":7===e.major?"2.1":6===e.major?"2.0.1":5===e.major?"2.0":4===e.major?"1.6":3===e.major?"1.5":2===e.major?"1.1":1===e.major?"1.0":n}(j,F);break;case"ios":t.os=e.iOS,t.osVersion=F;break;case"windows":t.os=e.Windows,t.osVersion=m(j,F);break;case"macos":t.os=e.MacOS,t.osVersion=F}}catch(e){}if(t.isNodeJS)try{var F,S=(v=require("os")).platform();j=f(F=v.release());switch(S){case"win32":t.os=e.Windows,t.osVersion=m(j,F);break;case"darwin":t.os=e.MacOS,t.osVersion=function(e,n){return e.major>=24?e.major-9+"."+e.minor+"."+e.build:23===e.major?"14."+e.minor+"."+e.build:22===e.major?"13."+e.minor+"."+e.build:21===e.major?"12."+e.minor+"."+e.build:20===e.major?"11."+e.minor+"."+e.build:19===e.major?"10.15."+e.minor:18===e.major?"10.14."+e.minor:17===e.major?"10.13."+e.minor:16===e.major?"10.12."+e.minor:15===e.major?"10.11."+e.minor:14===e.major?"10.10."+e.minor:13===e.major?"10.9."+e.minor:e.major>=5&&e.major<=12?"10."+(e.major-4)+"."+e.minor:n}(j,F);break;case"android":t.os=e.Android,t.osVersion=F;break;case"linux":/android/i.test(F)&&(t.os=e.Android,t.osVersion=F)}}catch(e){}void 0!==navigator.userAgentData&&void 0!==navigator.userAgentData.getHighEntropyValues&&navigator.userAgentData.getHighEntropyValues(["brands","fullVersionList","mobile","model","platform","platformVersion","architecture","formFactors","bitness","uaFullVersion","wow64"]).then((function(n){for(var r,o=n.fullVersionList||n.brands||[],i=n.platformVersion,a=0;a<o.length;a++){var s=null==(r=o[a])?{brand:"",version:""}:"string"==typeof r?{brand:r,version:""}:{brand:r.brand,version:r.version},l=s.brand,u=s.version;/not.a.brand/i.test(l)||"Chromium"===l&&(t.engineVersion=u)}"string"==typeof i&&(t.os===e.Windows&&parseInt(i.replace(/[^\d.]/g,"").split(".")[0],10)>=13?t.osVersion="11":t.osVersion=i)})),t.isMobile=t.device===n.Mobile,t.isDesktop=t.device===n.Desktop,t.isWebview=/; ?wv|applewebkit(?!.*safari)/i.test(t.userAgent),t.isStandalone=function(n){return"matchMedia"in globalThis&&(n===e.iOS?"standalone"in navigator&&!!navigator.standalone:globalThis.matchMedia("(display-mode: standalone)").matches)}(t.os);var T={standard:{enabled:"fullscreenEnabled",element:"fullscreenElement",request:"requestFullscreen",exit:"exitFullscreen",events:{change:"fullscreenchange",error:"fullscreenerror"}},webkit:{enabled:"webkitFullscreenEnabled",element:"webkitFullscreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:{change:"webkitfullscreenchange",error:"webkitfullscreenerror"}},moz:{enabled:"mozFullScreenEnabled",element:"mozFullScreenElement",request:"mozRequestFullScreen",exit:"mozCancelFullScreen",events:{change:"mozfullscreenchange",error:"mozfullscreenerror"}},ms:{enabled:"msFullscreenEnabled",element:"msFullscreenElement",request:"msRequestFullscreen",exit:"msExitFullscreen",events:{change:"MSFullscreenChange",error:"MSFullscreenError"}}};function x(){return e.iOS===t.os}var M=function(){var e=function(){var e=globalThis.document.documentElement;if("fullscreenEnabled"in globalThis.document||"exitFullscreen"in globalThis.document)return T.standard;for(var n=["webkit","moz","ms"],r=0;r<n.length;r++){var o=n[r];if((i=T[o]).enabled in globalThis.document||i.element in globalThis.document||i.exit in globalThis.document)return"webkit"===o&&"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}if("webkitCurrentFullScreenElement"in globalThis.document){var i={enabled:"webkitFullscreenEnabled",element:"webkitCurrentFullScreenElement",request:"webkitRequestFullscreen",exit:"webkitExitFullscreen",events:T.webkit.events};return"webkitRequestFullScreen"in e&&(i.request="webkitRequestFullScreen"),i}return null}(),n=null,r=!1;function o(){document.querySelectorAll("video").forEach((function(e){function n(){document.dispatchEvent(new Event("fullscreenchange"))}e.__fsBridged__||!("webkitEnterFullscreen"in e)&&!("onwebkitbeginfullscreen"in e)||(e.addEventListener("webkitbeginfullscreen",n,!1),e.addEventListener("webkitendfullscreen",n,!1),e.__fsBridged__=!0)}))}function i(){if(null===e)return n&&n.webkitDisplayingFullscreen?n:null;var r=document[e.element];return null!=r?r:null}function t(){return null!==i()}function a(r,i){return new Promise((function(t,a){if(null!==e){var s=r[e.request];if("function"==typeof s)try{var l=s.call(r,i);return void 0!==l&&"function"==typeof l.then?void l.then((function(){t()})).catch((function(){x()?u():a()})):void t()}catch(e){if(!x())return void a()}}function u(){if(x()&&"VIDEO"===r.tagName.toUpperCase()){var e=r;if(e.webkitSupportsFullscreen&&"function"==typeof e.webkitEnterFullscreen)return n=e,o(),e.webkitEnterFullscreen(),void t()}a()}u()}))}function s(){return new Promise((function(r,o){if(null!==e){var t=document[e.exit];if("function"==typeof t){var a=t.call(document);return void 0!==a&&"function"==typeof a.then?void a.then((function(){r()})).catch((function(){o()})):void r()}}if(x()&&null!==n){if("function"==typeof n.webkitExitFullscreen&&!0===n.webkitDisplayingFullscreen)return n.webkitExitFullscreen(),n=null,void r();for(var s=document.querySelectorAll("video"),l=0;l<s.length;l++){var u=s[l];if("function"==typeof u.webkitExitFullscreen&&!0===u.webkitDisplayingFullscreen)return u.webkitExitFullscreen(),void r()}}i()?o():r()}))}return function(){if(!r){r=!0;var e=!1;if(["webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"].forEach((function(e){globalThis.document.addEventListener(e,i,!1)})),["webkitfullscreenerror","mozfullscreenerror","MSFullscreenError"].forEach((function(e){globalThis.document.addEventListener(e,t,!1)})),x())o(),new MutationObserver((function(){o()})).observe(globalThis.document.documentElement,{childList:!0,subtree:!0})}function n(n){e||(e=!0,globalThis.document.dispatchEvent(new Event(n,{bubbles:!0,cancelable:!1})),Promise.resolve().then((function(){e=!1})))}function i(){n("fullscreenchange")}function t(){n("fullscreenerror")}}(),{get enabled(){return function(){if(null===e){if(!x())return!1;for(var n=document.querySelectorAll("video"),r=0;r<n.length;r++){var o=n[r];if(o.webkitSupportsFullscreen||"webkitEnterFullscreen"in o)return!0}return!1}var i=document[e.enabled];return"boolean"==typeof i?i:void 0!==document[e.element]}()},get element(){return i()},get isFullscreen(){return t()},request:a,exit:s,toggle:function(e,n){return t()?s():a(e,n)},onChange:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenchange"),function(){n.forEach((function(e){e()}))}},onError:function(e){var n=[];return function(r){function o(n){e(n)}document.addEventListener(r,o,!1),n.push((function(){document.removeEventListener(r,o,!1)}))}("fullscreenerror"),function(){n.forEach((function(e){e()}))}}}}(),y={installed:!1,name:"Fullscreen",module:M,Constants:{},Errors:{}};export{y as default};
|