@loaders.gl/video 3.2.4 → 3.2.5
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/dist.min.js +18 -18
- package/dist/es5/lib/gifshot/gifshot.js +18 -18
- package/dist/es5/lib/gifshot/gifshot.js.map +1 -1
- package/dist/es5/video-loader.js +1 -1
- package/dist/esm/lib/gifshot/gifshot.js +18 -18
- package/dist/esm/lib/gifshot/gifshot.js.map +1 -1
- package/dist/esm/video-loader.js +1 -1
- package/dist/lib/gifshot/gifshot.js +26 -26
- package/package.json +4 -4
- package/src/lib/gifshot/gifshot.ts +26 -26
- package/dist/es5/lib/utils/globals.js +0 -33
- package/dist/es5/lib/utils/globals.js.map +0 -1
- package/dist/esm/lib/utils/globals.js +0 -16
- package/dist/esm/lib/utils/globals.js.map +0 -1
- package/dist/lib/utils/globals.d.ts +0 -10
- package/dist/lib/utils/globals.d.ts.map +0 -1
- package/dist/lib/utils/globals.js +0 -25
- package/src/lib/utils/globals.ts +0 -25
package/dist/esm/video-loader.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import parseVideo from './lib/parsers/parse-video';
|
|
2
|
-
const VERSION = typeof "3.2.
|
|
2
|
+
const VERSION = typeof "3.2.5" !== 'undefined' ? "3.2.5" : 'latest';
|
|
3
3
|
const EXTENSIONS = ['mp4'];
|
|
4
4
|
const MIME_TYPES = ['video/mp4'];
|
|
5
5
|
const DEFAULT_LOADER_OPTIONS = {
|
|
@@ -17,7 +17,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
17
17
|
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
18
18
|
*/
|
|
19
19
|
var utils = {
|
|
20
|
-
URL:
|
|
20
|
+
URL: globalThis.URL || globalThis.webkitURL || globalThis.mozURL || globalThis.msURL,
|
|
21
21
|
getUserMedia: (function () {
|
|
22
22
|
const getUserMedia = navigator.getUserMedia ||
|
|
23
23
|
navigator.webkitGetUserMedia ||
|
|
@@ -25,11 +25,11 @@ var utils = {
|
|
|
25
25
|
navigator.msGetUserMedia;
|
|
26
26
|
return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
|
|
27
27
|
})(),
|
|
28
|
-
requestAnimFrame:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
28
|
+
requestAnimFrame: globalThis.requestAnimationFrame ||
|
|
29
|
+
globalThis.webkitRequestAnimationFrame ||
|
|
30
|
+
globalThis.mozRequestAnimationFrame ||
|
|
31
|
+
globalThis.oRequestAnimationFrame ||
|
|
32
|
+
globalThis.msRequestAnimationFrame,
|
|
33
33
|
requestTimeout: function requestTimeout(callback, delay) {
|
|
34
34
|
callback = callback || utils.noop;
|
|
35
35
|
delay = delay || 0;
|
|
@@ -47,13 +47,13 @@ var utils = {
|
|
|
47
47
|
handle.value = requestAnimFrame(loop);
|
|
48
48
|
return handle;
|
|
49
49
|
},
|
|
50
|
-
Blob:
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
50
|
+
Blob: globalThis.Blob ||
|
|
51
|
+
globalThis.BlobBuilder ||
|
|
52
|
+
globalThis.WebKitBlobBuilder ||
|
|
53
|
+
globalThis.MozBlobBuilder ||
|
|
54
|
+
globalThis.MSBlobBuilder,
|
|
55
55
|
btoa: (function () {
|
|
56
|
-
const btoa =
|
|
56
|
+
const btoa = globalThis.btoa ||
|
|
57
57
|
function (input) {
|
|
58
58
|
let output = '';
|
|
59
59
|
let i = 0;
|
|
@@ -85,7 +85,7 @@ var utils = {
|
|
|
85
85
|
}
|
|
86
86
|
return output;
|
|
87
87
|
};
|
|
88
|
-
return btoa ? btoa.bind(
|
|
88
|
+
return btoa ? btoa.bind(globalThis) : utils.noop;
|
|
89
89
|
})(),
|
|
90
90
|
isObject: function isObject(obj) {
|
|
91
91
|
return obj && Object.prototype.toString.call(obj) === '[object Object]';
|
|
@@ -111,16 +111,16 @@ var utils = {
|
|
|
111
111
|
return el && el.getContext && el.getContext('2d');
|
|
112
112
|
},
|
|
113
113
|
webworkers: function webworkers() {
|
|
114
|
-
return
|
|
114
|
+
return globalThis.Worker;
|
|
115
115
|
},
|
|
116
116
|
blob: function blob() {
|
|
117
117
|
return utils.Blob;
|
|
118
118
|
},
|
|
119
119
|
Uint8Array: function Uint8Array() {
|
|
120
|
-
return
|
|
120
|
+
return globalThis.Uint8Array;
|
|
121
121
|
},
|
|
122
122
|
Uint32Array: function Uint32Array() {
|
|
123
|
-
return
|
|
123
|
+
return globalThis.Uint32Array;
|
|
124
124
|
},
|
|
125
125
|
videoCodecs: (function () {
|
|
126
126
|
const testEl = document.createElement('video');
|
|
@@ -314,23 +314,23 @@ var error = {
|
|
|
314
314
|
},
|
|
315
315
|
{
|
|
316
316
|
condition: utils.isFunction(utils.URL),
|
|
317
|
-
errorCode: '
|
|
318
|
-
errorMsg: 'The
|
|
317
|
+
errorCode: 'globalThis.URL',
|
|
318
|
+
errorMsg: 'The globalThis.URL API is not supported in your browser'
|
|
319
319
|
},
|
|
320
320
|
{
|
|
321
321
|
condition: utils.isSupported.blob(),
|
|
322
|
-
errorCode: '
|
|
323
|
-
errorMsg: 'The
|
|
322
|
+
errorCode: 'globalThis.Blob',
|
|
323
|
+
errorMsg: 'The globalThis.Blob File API is not supported in your browser'
|
|
324
324
|
},
|
|
325
325
|
{
|
|
326
326
|
condition: utils.isSupported.Uint8Array(),
|
|
327
|
-
errorCode: '
|
|
328
|
-
errorMsg: 'The
|
|
327
|
+
errorCode: 'globalThis.Uint8Array',
|
|
328
|
+
errorMsg: 'The globalThis.Uint8Array function constructor is not supported in your browser'
|
|
329
329
|
},
|
|
330
330
|
{
|
|
331
331
|
condition: utils.isSupported.Uint32Array(),
|
|
332
|
-
errorCode: '
|
|
333
|
-
errorMsg: 'The
|
|
332
|
+
errorCode: 'globalThis.Uint32Array',
|
|
333
|
+
errorMsg: 'The globalThis.Uint32Array function constructor is not supported in your browser'
|
|
334
334
|
}
|
|
335
335
|
],
|
|
336
336
|
messages: {
|
|
@@ -1665,7 +1665,7 @@ function existingImages() {
|
|
|
1665
1665
|
let imagesLength = obj.imagesLength;
|
|
1666
1666
|
const skipObj = {
|
|
1667
1667
|
getUserMedia: true,
|
|
1668
|
-
'
|
|
1668
|
+
'globalThis.URL': true
|
|
1669
1669
|
};
|
|
1670
1670
|
const errorObj = error.validate(skipObj);
|
|
1671
1671
|
const loadedImages = [];
|
|
@@ -2264,7 +2264,7 @@ function existingVideo() {
|
|
|
2264
2264
|
const options = obj.options;
|
|
2265
2265
|
const skipObj = {
|
|
2266
2266
|
getUserMedia: true,
|
|
2267
|
-
'
|
|
2267
|
+
'globalThis.URL': true
|
|
2268
2268
|
};
|
|
2269
2269
|
const errorObj = error.validate(skipObj);
|
|
2270
2270
|
const loadedImages = 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@loaders.gl/video",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.5",
|
|
4
4
|
"description": "Framework-independent loaders and writers for video (MP4, WEBM, ...)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -32,9 +32,9 @@
|
|
|
32
32
|
"build-bundle": "esbuild src/bundle.ts --bundle --outfile=dist/dist.min.js"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@loaders.gl/loader-utils": "3.2.
|
|
36
|
-
"@loaders.gl/worker-utils": "3.2.
|
|
35
|
+
"@loaders.gl/loader-utils": "3.2.5",
|
|
36
|
+
"@loaders.gl/worker-utils": "3.2.5",
|
|
37
37
|
"gifshot": "^0.4.5"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "1c084200e8b87479d06526c7107e75c6bff8968b"
|
|
40
40
|
}
|
|
@@ -16,7 +16,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
|
|
|
16
16
|
* Copyrights licensed under the MIT License. See the accompanying LICENSE file for terms.
|
|
17
17
|
*/
|
|
18
18
|
var utils = {
|
|
19
|
-
URL:
|
|
19
|
+
URL: globalThis.URL || globalThis.webkitURL || globalThis.mozURL || globalThis.msURL,
|
|
20
20
|
getUserMedia: (function () {
|
|
21
21
|
const getUserMedia =
|
|
22
22
|
navigator.getUserMedia ||
|
|
@@ -26,11 +26,11 @@ var utils = {
|
|
|
26
26
|
return getUserMedia ? getUserMedia.bind(navigator) : getUserMedia;
|
|
27
27
|
})(),
|
|
28
28
|
requestAnimFrame:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
globalThis.requestAnimationFrame ||
|
|
30
|
+
globalThis.webkitRequestAnimationFrame ||
|
|
31
|
+
globalThis.mozRequestAnimationFrame ||
|
|
32
|
+
globalThis.oRequestAnimationFrame ||
|
|
33
|
+
globalThis.msRequestAnimationFrame,
|
|
34
34
|
requestTimeout: function requestTimeout(callback, delay) {
|
|
35
35
|
callback = callback || utils.noop;
|
|
36
36
|
delay = delay || 0;
|
|
@@ -49,14 +49,14 @@ var utils = {
|
|
|
49
49
|
return handle;
|
|
50
50
|
},
|
|
51
51
|
Blob:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
52
|
+
globalThis.Blob ||
|
|
53
|
+
globalThis.BlobBuilder ||
|
|
54
|
+
globalThis.WebKitBlobBuilder ||
|
|
55
|
+
globalThis.MozBlobBuilder ||
|
|
56
|
+
globalThis.MSBlobBuilder,
|
|
57
57
|
btoa: (function () {
|
|
58
58
|
const btoa =
|
|
59
|
-
|
|
59
|
+
globalThis.btoa ||
|
|
60
60
|
function (input) {
|
|
61
61
|
let output = '';
|
|
62
62
|
let i = 0;
|
|
@@ -87,7 +87,7 @@ var utils = {
|
|
|
87
87
|
}
|
|
88
88
|
return output;
|
|
89
89
|
};
|
|
90
|
-
return btoa ? btoa.bind(
|
|
90
|
+
return btoa ? btoa.bind(globalThis) : utils.noop;
|
|
91
91
|
})(),
|
|
92
92
|
isObject: function isObject(obj) {
|
|
93
93
|
return obj && Object.prototype.toString.call(obj) === '[object Object]';
|
|
@@ -113,16 +113,16 @@ var utils = {
|
|
|
113
113
|
return el && el.getContext && el.getContext('2d');
|
|
114
114
|
},
|
|
115
115
|
webworkers: function webworkers() {
|
|
116
|
-
return
|
|
116
|
+
return globalThis.Worker;
|
|
117
117
|
},
|
|
118
118
|
blob: function blob() {
|
|
119
119
|
return utils.Blob;
|
|
120
120
|
},
|
|
121
121
|
Uint8Array: function Uint8Array() {
|
|
122
|
-
return
|
|
122
|
+
return globalThis.Uint8Array;
|
|
123
123
|
},
|
|
124
124
|
Uint32Array: function Uint32Array() {
|
|
125
|
-
return
|
|
125
|
+
return globalThis.Uint32Array;
|
|
126
126
|
},
|
|
127
127
|
videoCodecs: (function () {
|
|
128
128
|
const testEl = document.createElement('video');
|
|
@@ -310,23 +310,23 @@ var error = {
|
|
|
310
310
|
},
|
|
311
311
|
{
|
|
312
312
|
condition: utils.isFunction(utils.URL),
|
|
313
|
-
errorCode: '
|
|
314
|
-
errorMsg: 'The
|
|
313
|
+
errorCode: 'globalThis.URL',
|
|
314
|
+
errorMsg: 'The globalThis.URL API is not supported in your browser'
|
|
315
315
|
},
|
|
316
316
|
{
|
|
317
317
|
condition: utils.isSupported.blob(),
|
|
318
|
-
errorCode: '
|
|
319
|
-
errorMsg: 'The
|
|
318
|
+
errorCode: 'globalThis.Blob',
|
|
319
|
+
errorMsg: 'The globalThis.Blob File API is not supported in your browser'
|
|
320
320
|
},
|
|
321
321
|
{
|
|
322
322
|
condition: utils.isSupported.Uint8Array(),
|
|
323
|
-
errorCode: '
|
|
324
|
-
errorMsg: 'The
|
|
323
|
+
errorCode: 'globalThis.Uint8Array',
|
|
324
|
+
errorMsg: 'The globalThis.Uint8Array function constructor is not supported in your browser'
|
|
325
325
|
},
|
|
326
326
|
{
|
|
327
327
|
condition: utils.isSupported.Uint32Array(),
|
|
328
|
-
errorCode: '
|
|
329
|
-
errorMsg: 'The
|
|
328
|
+
errorCode: 'globalThis.Uint32Array',
|
|
329
|
+
errorMsg: 'The globalThis.Uint32Array function constructor is not supported in your browser'
|
|
330
330
|
}
|
|
331
331
|
],
|
|
332
332
|
messages: {
|
|
@@ -1643,7 +1643,7 @@ function existingImages() {
|
|
|
1643
1643
|
let imagesLength = obj.imagesLength;
|
|
1644
1644
|
const skipObj = {
|
|
1645
1645
|
getUserMedia: true,
|
|
1646
|
-
'
|
|
1646
|
+
'globalThis.URL': true
|
|
1647
1647
|
};
|
|
1648
1648
|
const errorObj = error.validate(skipObj);
|
|
1649
1649
|
const loadedImages = [];
|
|
@@ -2242,7 +2242,7 @@ function existingVideo() {
|
|
|
2242
2242
|
const options = obj.options;
|
|
2243
2243
|
const skipObj = {
|
|
2244
2244
|
getUserMedia: true,
|
|
2245
|
-
'
|
|
2245
|
+
'globalThis.URL': true
|
|
2246
2246
|
};
|
|
2247
2247
|
const errorObj = error.validate(skipObj);
|
|
2248
2248
|
const loadedImages = 0;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.nodeVersion = exports.isWorker = exports.isBrowser = exports.document = exports.global = exports.window = exports.self = void 0;
|
|
9
|
-
|
|
10
|
-
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
11
|
-
|
|
12
|
-
var globals = {
|
|
13
|
-
self: typeof self !== 'undefined' && self,
|
|
14
|
-
window: typeof window !== 'undefined' && window,
|
|
15
|
-
global: typeof global !== 'undefined' && global,
|
|
16
|
-
document: typeof document !== 'undefined' && document
|
|
17
|
-
};
|
|
18
|
-
var self_ = globals.self || globals.window || globals.global;
|
|
19
|
-
exports.self = self_;
|
|
20
|
-
var window_ = globals.window || globals.self || globals.global;
|
|
21
|
-
exports.window = window_;
|
|
22
|
-
var global_ = globals.global || globals.self || globals.window;
|
|
23
|
-
exports.global = global_;
|
|
24
|
-
var document_ = globals.document || {};
|
|
25
|
-
exports.document = document_;
|
|
26
|
-
var isBrowser = (typeof process === "undefined" ? "undefined" : (0, _typeof2.default)(process)) !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
27
|
-
exports.isBrowser = isBrowser;
|
|
28
|
-
var isWorker = typeof importScripts === 'function';
|
|
29
|
-
exports.isWorker = isWorker;
|
|
30
|
-
var matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
31
|
-
var nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
32
|
-
exports.nodeVersion = nodeVersion;
|
|
33
|
-
//# sourceMappingURL=globals.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/utils/globals.ts"],"names":["globals","self","window","global","document","self_","window_","global_","document_","isBrowser","process","String","browser","isWorker","importScripts","matches","version","exec","nodeVersion","parseFloat"],"mappings":";;;;;;;;;;;AACA,IAAMA,OAAO,GAAG;AACdC,EAAAA,IAAI,EAAE,OAAOA,IAAP,KAAgB,WAAhB,IAA+BA,IADvB;AAEdC,EAAAA,MAAM,EAAE,OAAOA,MAAP,KAAkB,WAAlB,IAAiCA,MAF3B;AAGdC,EAAAA,MAAM,EAAE,OAAOA,MAAP,KAAkB,WAAlB,IAAiCA,MAH3B;AAIdC,EAAAA,QAAQ,EAAE,OAAOA,QAAP,KAAoB,WAApB,IAAmCA;AAJ/B,CAAhB;AAOA,IAAMC,KAAK,GAAGL,OAAO,CAACC,IAAR,IAAgBD,OAAO,CAACE,MAAxB,IAAkCF,OAAO,CAACG,MAAxD;;AACA,IAAMG,OAAO,GAAGN,OAAO,CAACE,MAAR,IAAkBF,OAAO,CAACC,IAA1B,IAAkCD,OAAO,CAACG,MAA1D;;AACA,IAAMI,OAAO,GAAGP,OAAO,CAACG,MAAR,IAAkBH,OAAO,CAACC,IAA1B,IAAkCD,OAAO,CAACE,MAA1D;;AACA,IAAMM,SAAS,GAAGR,OAAO,CAACI,QAAR,IAAoB,EAAtC;;AAIO,IAAMK,SAAS,GAEpB,QAAOC,OAAP,uDAAOA,OAAP,OAAmB,QAAnB,IAA+BC,MAAM,CAACD,OAAD,CAAN,KAAoB,kBAAnD,IAAyEA,OAAO,CAACE,OAF5E;;AAIA,IAAMC,QAAQ,GAAG,OAAOC,aAAP,KAAyB,UAA1C;;AAGP,IAAMC,OAAO,GACX,OAAOL,OAAP,KAAmB,WAAnB,IAAkCA,OAAO,CAACM,OAA1C,IAAqD,YAAYC,IAAZ,CAAiBP,OAAO,CAACM,OAAzB,CADvD;AAEO,IAAME,WAAW,GAAIH,OAAO,IAAII,UAAU,CAACJ,OAAO,CAAC,CAAD,CAAR,CAAtB,IAAuC,CAA3D","sourcesContent":["/* eslint-disable no-restricted-globals */\nconst globals = {\n self: typeof self !== 'undefined' && self,\n window: typeof window !== 'undefined' && window,\n global: typeof global !== 'undefined' && global,\n document: typeof document !== 'undefined' && document\n};\n\nconst self_ = globals.self || globals.window || globals.global;\nconst window_ = globals.window || globals.self || globals.global;\nconst global_ = globals.global || globals.self || globals.window;\nconst document_ = globals.document || {};\n\nexport {self_ as self, window_ as window, global_ as global, document_ as document};\n\nexport const isBrowser =\n // @ts-ignore\n typeof process !== 'object' || String(process) !== '[object process]' || process.browser;\n\nexport const isWorker = typeof importScripts === 'function';\n\n// Extract node major version\nconst matches =\n typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);\nexport const nodeVersion = (matches && parseFloat(matches[1])) || 0;\n"],"file":"globals.js"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const globals = {
|
|
2
|
-
self: typeof self !== 'undefined' && self,
|
|
3
|
-
window: typeof window !== 'undefined' && window,
|
|
4
|
-
global: typeof global !== 'undefined' && global,
|
|
5
|
-
document: typeof document !== 'undefined' && document
|
|
6
|
-
};
|
|
7
|
-
const self_ = globals.self || globals.window || globals.global;
|
|
8
|
-
const window_ = globals.window || globals.self || globals.global;
|
|
9
|
-
const global_ = globals.global || globals.self || globals.window;
|
|
10
|
-
const document_ = globals.document || {};
|
|
11
|
-
export { self_ as self, window_ as window, global_ as global, document_ as document };
|
|
12
|
-
export const isBrowser = typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
13
|
-
export const isWorker = typeof importScripts === 'function';
|
|
14
|
-
const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
15
|
-
export const nodeVersion = matches && parseFloat(matches[1]) || 0;
|
|
16
|
-
//# sourceMappingURL=globals.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/utils/globals.ts"],"names":["globals","self","window","global","document","self_","window_","global_","document_","isBrowser","process","String","browser","isWorker","importScripts","matches","version","exec","nodeVersion","parseFloat"],"mappings":"AACA,MAAMA,OAAO,GAAG;AACdC,EAAAA,IAAI,EAAE,OAAOA,IAAP,KAAgB,WAAhB,IAA+BA,IADvB;AAEdC,EAAAA,MAAM,EAAE,OAAOA,MAAP,KAAkB,WAAlB,IAAiCA,MAF3B;AAGdC,EAAAA,MAAM,EAAE,OAAOA,MAAP,KAAkB,WAAlB,IAAiCA,MAH3B;AAIdC,EAAAA,QAAQ,EAAE,OAAOA,QAAP,KAAoB,WAApB,IAAmCA;AAJ/B,CAAhB;AAOA,MAAMC,KAAK,GAAGL,OAAO,CAACC,IAAR,IAAgBD,OAAO,CAACE,MAAxB,IAAkCF,OAAO,CAACG,MAAxD;AACA,MAAMG,OAAO,GAAGN,OAAO,CAACE,MAAR,IAAkBF,OAAO,CAACC,IAA1B,IAAkCD,OAAO,CAACG,MAA1D;AACA,MAAMI,OAAO,GAAGP,OAAO,CAACG,MAAR,IAAkBH,OAAO,CAACC,IAA1B,IAAkCD,OAAO,CAACE,MAA1D;AACA,MAAMM,SAAS,GAAGR,OAAO,CAACI,QAAR,IAAoB,EAAtC;AAEA,SAAQC,KAAK,IAAIJ,IAAjB,EAAuBK,OAAO,IAAIJ,MAAlC,EAA0CK,OAAO,IAAIJ,MAArD,EAA6DK,SAAS,IAAIJ,QAA1E;AAEA,OAAO,MAAMK,SAAS,GAEpB,OAAOC,OAAP,KAAmB,QAAnB,IAA+BC,MAAM,CAACD,OAAD,CAAN,KAAoB,kBAAnD,IAAyEA,OAAO,CAACE,OAF5E;AAIP,OAAO,MAAMC,QAAQ,GAAG,OAAOC,aAAP,KAAyB,UAA1C;AAGP,MAAMC,OAAO,GACX,OAAOL,OAAP,KAAmB,WAAnB,IAAkCA,OAAO,CAACM,OAA1C,IAAqD,YAAYC,IAAZ,CAAiBP,OAAO,CAACM,OAAzB,CADvD;AAEA,OAAO,MAAME,WAAW,GAAIH,OAAO,IAAII,UAAU,CAACJ,OAAO,CAAC,CAAD,CAAR,CAAtB,IAAuC,CAA3D","sourcesContent":["/* eslint-disable no-restricted-globals */\nconst globals = {\n self: typeof self !== 'undefined' && self,\n window: typeof window !== 'undefined' && window,\n global: typeof global !== 'undefined' && global,\n document: typeof document !== 'undefined' && document\n};\n\nconst self_ = globals.self || globals.window || globals.global;\nconst window_ = globals.window || globals.self || globals.global;\nconst global_ = globals.global || globals.self || globals.window;\nconst document_ = globals.document || {};\n\nexport {self_ as self, window_ as window, global_ as global, document_ as document};\n\nexport const isBrowser =\n // @ts-ignore\n typeof process !== 'object' || String(process) !== '[object process]' || process.browser;\n\nexport const isWorker = typeof importScripts === 'function';\n\n// Extract node major version\nconst matches =\n typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);\nexport const nodeVersion = (matches && parseFloat(matches[1])) || 0;\n"],"file":"globals.js"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
declare const self_: false | (Window & typeof globalThis) | (NodeJS.Global & typeof globalThis);
|
|
3
|
-
declare const window_: false | (Window & typeof globalThis) | (NodeJS.Global & typeof globalThis);
|
|
4
|
-
declare const global_: false | (Window & typeof globalThis) | (NodeJS.Global & typeof globalThis);
|
|
5
|
-
declare const document_: {};
|
|
6
|
-
export { self_ as self, window_ as window, global_ as global, document_ as document };
|
|
7
|
-
export declare const isBrowser: any;
|
|
8
|
-
export declare const isWorker: boolean;
|
|
9
|
-
export declare const nodeVersion: number;
|
|
10
|
-
//# sourceMappingURL=globals.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"globals.d.ts","sourceRoot":"","sources":["../../../src/lib/utils/globals.ts"],"names":[],"mappings":";AAQA,QAAA,MAAM,KAAK,4EAAmD,CAAC;AAC/D,QAAA,MAAM,OAAO,4EAAmD,CAAC;AACjE,QAAA,MAAM,OAAO,4EAAmD,CAAC;AACjE,QAAA,MAAM,SAAS,IAAyB,CAAC;AAEzC,OAAO,EAAC,KAAK,IAAI,IAAI,EAAE,OAAO,IAAI,MAAM,EAAE,OAAO,IAAI,MAAM,EAAE,SAAS,IAAI,QAAQ,EAAC,CAAC;AAEpF,eAAO,MAAM,SAAS,KAEoE,CAAC;AAE3F,eAAO,MAAM,QAAQ,SAAsC,CAAC;AAK5D,eAAO,MAAM,WAAW,QAA2C,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.nodeVersion = exports.isWorker = exports.isBrowser = exports.document = exports.global = exports.window = exports.self = void 0;
|
|
4
|
-
/* eslint-disable no-restricted-globals */
|
|
5
|
-
const globals = {
|
|
6
|
-
self: typeof self !== 'undefined' && self,
|
|
7
|
-
window: typeof window !== 'undefined' && window,
|
|
8
|
-
global: typeof global !== 'undefined' && global,
|
|
9
|
-
document: typeof document !== 'undefined' && document
|
|
10
|
-
};
|
|
11
|
-
const self_ = globals.self || globals.window || globals.global;
|
|
12
|
-
exports.self = self_;
|
|
13
|
-
const window_ = globals.window || globals.self || globals.global;
|
|
14
|
-
exports.window = window_;
|
|
15
|
-
const global_ = globals.global || globals.self || globals.window;
|
|
16
|
-
exports.global = global_;
|
|
17
|
-
const document_ = globals.document || {};
|
|
18
|
-
exports.document = document_;
|
|
19
|
-
exports.isBrowser =
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
22
|
-
exports.isWorker = typeof importScripts === 'function';
|
|
23
|
-
// Extract node major version
|
|
24
|
-
const matches = typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
25
|
-
exports.nodeVersion = (matches && parseFloat(matches[1])) || 0;
|
package/src/lib/utils/globals.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-restricted-globals */
|
|
2
|
-
const globals = {
|
|
3
|
-
self: typeof self !== 'undefined' && self,
|
|
4
|
-
window: typeof window !== 'undefined' && window,
|
|
5
|
-
global: typeof global !== 'undefined' && global,
|
|
6
|
-
document: typeof document !== 'undefined' && document
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
const self_ = globals.self || globals.window || globals.global;
|
|
10
|
-
const window_ = globals.window || globals.self || globals.global;
|
|
11
|
-
const global_ = globals.global || globals.self || globals.window;
|
|
12
|
-
const document_ = globals.document || {};
|
|
13
|
-
|
|
14
|
-
export {self_ as self, window_ as window, global_ as global, document_ as document};
|
|
15
|
-
|
|
16
|
-
export const isBrowser =
|
|
17
|
-
// @ts-ignore
|
|
18
|
-
typeof process !== 'object' || String(process) !== '[object process]' || process.browser;
|
|
19
|
-
|
|
20
|
-
export const isWorker = typeof importScripts === 'function';
|
|
21
|
-
|
|
22
|
-
// Extract node major version
|
|
23
|
-
const matches =
|
|
24
|
-
typeof process !== 'undefined' && process.version && /v([0-9]*)/.exec(process.version);
|
|
25
|
-
export const nodeVersion = (matches && parseFloat(matches[1])) || 0;
|