@loaders.gl/core 3.4.13 → 3.4.15
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 +106 -104
- package/dist/es5/bundle.js +1 -1
- package/dist/es5/bundle.js.map +1 -1
- package/dist/es5/index.js +55 -55
- package/dist/es5/iterators/batch-iterators/timed-batch-iterator.js +14 -86
- package/dist/es5/iterators/batch-iterators/timed-batch-iterator.js.map +1 -1
- package/dist/es5/iterators/make-iterator/make-array-buffer-iterator.js +17 -33
- package/dist/es5/iterators/make-iterator/make-array-buffer-iterator.js.map +1 -1
- package/dist/es5/iterators/make-iterator/make-blob-iterator.js +10 -39
- package/dist/es5/iterators/make-iterator/make-blob-iterator.js.map +1 -1
- package/dist/es5/iterators/make-iterator/make-iterator.js +1 -1
- package/dist/es5/iterators/make-iterator/make-iterator.js.map +1 -1
- package/dist/es5/iterators/make-iterator/make-stream-iterator.js +24 -119
- package/dist/es5/iterators/make-iterator/make-stream-iterator.js.map +1 -1
- package/dist/es5/iterators/make-iterator/make-string-iterator.js +11 -30
- package/dist/es5/iterators/make-iterator/make-string-iterator.js.map +1 -1
- package/dist/es5/iterators/make-stream/make-dom-stream.js +22 -54
- package/dist/es5/iterators/make-stream/make-dom-stream.js.map +1 -1
- package/dist/es5/iterators/make-stream/make-node-stream.js +50 -152
- package/dist/es5/iterators/make-stream/make-node-stream.js.map +1 -1
- package/dist/es5/javascript-utils/is-type.js +18 -56
- package/dist/es5/javascript-utils/is-type.js.map +1 -1
- package/dist/es5/lib/api/encode.js +54 -203
- package/dist/es5/lib/api/encode.js.map +1 -1
- package/dist/es5/lib/api/load-in-batches.js +9 -41
- package/dist/es5/lib/api/load-in-batches.js.map +1 -1
- package/dist/es5/lib/api/load.js +15 -48
- package/dist/es5/lib/api/load.js.map +1 -1
- package/dist/es5/lib/api/loader-options.js +2 -2
- package/dist/es5/lib/api/parse-in-batches.js +71 -259
- package/dist/es5/lib/api/parse-in-batches.js.map +1 -1
- package/dist/es5/lib/api/parse-sync.js +9 -11
- package/dist/es5/lib/api/parse-sync.js.map +1 -1
- package/dist/es5/lib/api/parse.js +62 -125
- package/dist/es5/lib/api/parse.js.map +1 -1
- package/dist/es5/lib/api/register-loaders.js +8 -25
- package/dist/es5/lib/api/register-loaders.js.map +1 -1
- package/dist/es5/lib/api/save.js +4 -28
- package/dist/es5/lib/api/save.js.map +1 -1
- package/dist/es5/lib/api/select-loader.js +76 -170
- package/dist/es5/lib/api/select-loader.js.map +1 -1
- package/dist/es5/lib/fetch/fetch-error-message.js +13 -44
- package/dist/es5/lib/fetch/fetch-error-message.js.map +1 -1
- package/dist/es5/lib/fetch/fetch-file.js +10 -37
- package/dist/es5/lib/fetch/fetch-file.js.map +1 -1
- package/dist/es5/lib/fetch/read-array-buffer.js +19 -65
- package/dist/es5/lib/fetch/read-array-buffer.js.map +1 -1
- package/dist/es5/lib/fetch/read-file.js +2 -2
- package/dist/es5/lib/fetch/read-file.js.map +1 -1
- package/dist/es5/lib/fetch/write-file.js +8 -29
- package/dist/es5/lib/fetch/write-file.js.map +1 -1
- package/dist/es5/lib/filesystems/browser-filesystem.js +78 -227
- package/dist/es5/lib/filesystems/browser-filesystem.js.map +1 -1
- package/dist/es5/lib/filesystems/read-array-buffer.js +6 -33
- package/dist/es5/lib/filesystems/read-array-buffer.js.map +1 -1
- package/dist/es5/lib/init.js +1 -1
- package/dist/es5/lib/init.js.map +1 -1
- package/dist/es5/lib/loader-utils/check-errors.js +11 -39
- package/dist/es5/lib/loader-utils/check-errors.js.map +1 -1
- package/dist/es5/lib/loader-utils/get-data.js +62 -187
- package/dist/es5/lib/loader-utils/get-data.js.map +1 -1
- package/dist/es5/lib/loader-utils/get-fetch-function.js +3 -5
- package/dist/es5/lib/loader-utils/get-fetch-function.js.map +1 -1
- package/dist/es5/lib/loader-utils/loader-context.js +8 -12
- package/dist/es5/lib/loader-utils/loader-context.js.map +1 -1
- package/dist/es5/lib/loader-utils/loggers.js +37 -67
- package/dist/es5/lib/loader-utils/loggers.js.map +1 -1
- package/dist/es5/lib/loader-utils/normalize-loader.js +9 -9
- package/dist/es5/lib/loader-utils/normalize-loader.js.map +1 -1
- package/dist/es5/lib/loader-utils/option-defaults.js +2 -2
- package/dist/es5/lib/loader-utils/option-defaults.js.map +1 -1
- package/dist/es5/lib/loader-utils/option-utils.js +43 -59
- package/dist/es5/lib/loader-utils/option-utils.js.map +1 -1
- package/dist/es5/lib/progress/fetch-progress.js +49 -125
- package/dist/es5/lib/progress/fetch-progress.js.map +1 -1
- package/dist/es5/lib/utils/log.js +1 -1
- package/dist/es5/lib/utils/log.js.map +1 -1
- package/dist/es5/lib/utils/mime-type-utils.js +4 -4
- package/dist/es5/lib/utils/mime-type-utils.js.map +1 -1
- package/dist/es5/lib/utils/resource-utils.js +8 -8
- package/dist/es5/lib/utils/resource-utils.js.map +1 -1
- package/dist/es5/lib/utils/response-utils.js +71 -171
- package/dist/es5/lib/utils/response-utils.js.map +1 -1
- package/dist/es5/lib/utils/url-utils.js +2 -2
- package/dist/es5/lib/utils/url-utils.js.map +1 -1
- package/dist/es5/null-loader.js +14 -100
- package/dist/es5/null-loader.js.map +1 -1
- package/dist/esm/lib/init.js +1 -1
- package/dist/esm/null-loader.js +1 -1
- package/dist/null-worker.js +1 -1
- package/package.json +5 -5
- package/src/.DS_Store +0 -0
- package/src/lib/.DS_Store +0 -0
package/dist/dist.min.js
CHANGED
|
@@ -863,7 +863,7 @@
|
|
|
863
863
|
}
|
|
864
864
|
});
|
|
865
865
|
|
|
866
|
-
//
|
|
866
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js
|
|
867
867
|
function getHiResTimestamp() {
|
|
868
868
|
let timestamp;
|
|
869
869
|
if (typeof window !== "undefined" && window.performance) {
|
|
@@ -877,14 +877,14 @@
|
|
|
877
877
|
return timestamp;
|
|
878
878
|
}
|
|
879
879
|
var init_hi_res_timestamp = __esm({
|
|
880
|
-
"
|
|
880
|
+
"../../node_modules/@probe.gl/stats/dist/esm/utils/hi-res-timestamp.js"() {
|
|
881
881
|
}
|
|
882
882
|
});
|
|
883
883
|
|
|
884
|
-
//
|
|
884
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js
|
|
885
885
|
var Stat;
|
|
886
886
|
var init_stat = __esm({
|
|
887
|
-
"
|
|
887
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stat.js"() {
|
|
888
888
|
init_defineProperty();
|
|
889
889
|
init_hi_res_timestamp();
|
|
890
890
|
Stat = class {
|
|
@@ -892,12 +892,12 @@
|
|
|
892
892
|
_defineProperty(this, "name", void 0);
|
|
893
893
|
_defineProperty(this, "type", void 0);
|
|
894
894
|
_defineProperty(this, "sampleSize", 1);
|
|
895
|
-
_defineProperty(this, "time", 0);
|
|
896
|
-
_defineProperty(this, "count", 0);
|
|
897
|
-
_defineProperty(this, "samples", 0);
|
|
898
|
-
_defineProperty(this, "lastTiming", 0);
|
|
899
|
-
_defineProperty(this, "lastSampleTime", 0);
|
|
900
|
-
_defineProperty(this, "lastSampleCount", 0);
|
|
895
|
+
_defineProperty(this, "time", void 0);
|
|
896
|
+
_defineProperty(this, "count", void 0);
|
|
897
|
+
_defineProperty(this, "samples", void 0);
|
|
898
|
+
_defineProperty(this, "lastTiming", void 0);
|
|
899
|
+
_defineProperty(this, "lastSampleTime", void 0);
|
|
900
|
+
_defineProperty(this, "lastSampleCount", void 0);
|
|
901
901
|
_defineProperty(this, "_count", 0);
|
|
902
902
|
_defineProperty(this, "_time", 0);
|
|
903
903
|
_defineProperty(this, "_samples", 0);
|
|
@@ -907,20 +907,6 @@
|
|
|
907
907
|
this.type = type;
|
|
908
908
|
this.reset();
|
|
909
909
|
}
|
|
910
|
-
reset() {
|
|
911
|
-
this.time = 0;
|
|
912
|
-
this.count = 0;
|
|
913
|
-
this.samples = 0;
|
|
914
|
-
this.lastTiming = 0;
|
|
915
|
-
this.lastSampleTime = 0;
|
|
916
|
-
this.lastSampleCount = 0;
|
|
917
|
-
this._count = 0;
|
|
918
|
-
this._time = 0;
|
|
919
|
-
this._samples = 0;
|
|
920
|
-
this._startTime = 0;
|
|
921
|
-
this._timerPending = false;
|
|
922
|
-
return this;
|
|
923
|
-
}
|
|
924
910
|
setSampleSize(samples) {
|
|
925
911
|
this.sampleSize = samples;
|
|
926
912
|
return this;
|
|
@@ -984,6 +970,20 @@
|
|
|
984
970
|
getHz() {
|
|
985
971
|
return this.time > 0 ? this.samples / (this.time / 1e3) : 0;
|
|
986
972
|
}
|
|
973
|
+
reset() {
|
|
974
|
+
this.time = 0;
|
|
975
|
+
this.count = 0;
|
|
976
|
+
this.samples = 0;
|
|
977
|
+
this.lastTiming = 0;
|
|
978
|
+
this.lastSampleTime = 0;
|
|
979
|
+
this.lastSampleCount = 0;
|
|
980
|
+
this._count = 0;
|
|
981
|
+
this._time = 0;
|
|
982
|
+
this._samples = 0;
|
|
983
|
+
this._startTime = 0;
|
|
984
|
+
this._timerPending = false;
|
|
985
|
+
return this;
|
|
986
|
+
}
|
|
987
987
|
_checkSampling() {
|
|
988
988
|
if (this._samples === this.sampleSize) {
|
|
989
989
|
this.lastSampleTime = this._time;
|
|
@@ -1000,10 +1000,10 @@
|
|
|
1000
1000
|
}
|
|
1001
1001
|
});
|
|
1002
1002
|
|
|
1003
|
-
//
|
|
1003
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js
|
|
1004
1004
|
var Stats;
|
|
1005
1005
|
var init_stats = __esm({
|
|
1006
|
-
"
|
|
1006
|
+
"../../node_modules/@probe.gl/stats/dist/esm/lib/stats.js"() {
|
|
1007
1007
|
init_defineProperty();
|
|
1008
1008
|
init_stat();
|
|
1009
1009
|
Stats = class {
|
|
@@ -1026,14 +1026,14 @@
|
|
|
1026
1026
|
return Object.keys(this.stats).length;
|
|
1027
1027
|
}
|
|
1028
1028
|
reset() {
|
|
1029
|
-
for (const
|
|
1030
|
-
|
|
1029
|
+
for (const key in this.stats) {
|
|
1030
|
+
this.stats[key].reset();
|
|
1031
1031
|
}
|
|
1032
1032
|
return this;
|
|
1033
1033
|
}
|
|
1034
1034
|
forEach(fn) {
|
|
1035
|
-
for (const
|
|
1036
|
-
fn(
|
|
1035
|
+
for (const key in this.stats) {
|
|
1036
|
+
fn(this.stats[key]);
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
getTable() {
|
|
@@ -1053,28 +1053,29 @@
|
|
|
1053
1053
|
stats.forEach((stat2) => this._getOrCreate(stat2));
|
|
1054
1054
|
}
|
|
1055
1055
|
_getOrCreate(stat2) {
|
|
1056
|
+
if (!stat2 || !stat2.name) {
|
|
1057
|
+
return null;
|
|
1058
|
+
}
|
|
1056
1059
|
const {
|
|
1057
1060
|
name,
|
|
1058
1061
|
type
|
|
1059
1062
|
} = stat2;
|
|
1060
|
-
|
|
1061
|
-
if (!result) {
|
|
1063
|
+
if (!this.stats[name]) {
|
|
1062
1064
|
if (stat2 instanceof Stat) {
|
|
1063
|
-
|
|
1065
|
+
this.stats[name] = stat2;
|
|
1064
1066
|
} else {
|
|
1065
|
-
|
|
1067
|
+
this.stats[name] = new Stat(name, type);
|
|
1066
1068
|
}
|
|
1067
|
-
this.stats[name] = result;
|
|
1068
1069
|
}
|
|
1069
|
-
return
|
|
1070
|
+
return this.stats[name];
|
|
1070
1071
|
}
|
|
1071
1072
|
};
|
|
1072
1073
|
}
|
|
1073
1074
|
});
|
|
1074
1075
|
|
|
1075
|
-
//
|
|
1076
|
-
var
|
|
1077
|
-
"
|
|
1076
|
+
// ../../node_modules/@probe.gl/stats/dist/esm/index.js
|
|
1077
|
+
var init_esm = __esm({
|
|
1078
|
+
"../../node_modules/@probe.gl/stats/dist/esm/index.js"() {
|
|
1078
1079
|
init_stats();
|
|
1079
1080
|
init_stat();
|
|
1080
1081
|
init_hi_res_timestamp();
|
|
@@ -1085,7 +1086,7 @@
|
|
|
1085
1086
|
var STAT_QUEUED_REQUESTS, STAT_ACTIVE_REQUESTS, STAT_CANCELLED_REQUESTS, STAT_QUEUED_REQUESTS_EVER, STAT_ACTIVE_REQUESTS_EVER, DEFAULT_PROPS2, RequestScheduler;
|
|
1086
1087
|
var init_request_scheduler = __esm({
|
|
1087
1088
|
"../loader-utils/src/lib/request-utils/request-scheduler.ts"() {
|
|
1088
|
-
|
|
1089
|
+
init_esm();
|
|
1089
1090
|
STAT_QUEUED_REQUESTS = "Queued Requests";
|
|
1090
1091
|
STAT_ACTIVE_REQUESTS = "Active Requests";
|
|
1091
1092
|
STAT_CANCELLED_REQUESTS = "Cancelled Requests";
|
|
@@ -1777,7 +1778,7 @@
|
|
|
1777
1778
|
}
|
|
1778
1779
|
});
|
|
1779
1780
|
|
|
1780
|
-
// node_modules/@probe.gl/env/dist/lib/is-electron.js
|
|
1781
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js
|
|
1781
1782
|
function isElectron(mockUserAgent) {
|
|
1782
1783
|
if (typeof window !== "undefined" && typeof window.process === "object" && window.process.type === "renderer") {
|
|
1783
1784
|
return true;
|
|
@@ -1793,54 +1794,59 @@
|
|
|
1793
1794
|
return false;
|
|
1794
1795
|
}
|
|
1795
1796
|
var init_is_electron = __esm({
|
|
1796
|
-
"node_modules/@probe.gl/env/dist/lib/is-electron.js"() {
|
|
1797
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-electron.js"() {
|
|
1797
1798
|
}
|
|
1798
1799
|
});
|
|
1799
1800
|
|
|
1800
|
-
// node_modules/@probe.gl/env/dist/lib/is-browser.js
|
|
1801
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js
|
|
1801
1802
|
function isBrowser3() {
|
|
1802
1803
|
const isNode = typeof process === "object" && String(process) === "[object process]" && !process.browser;
|
|
1803
1804
|
return !isNode || isElectron();
|
|
1804
1805
|
}
|
|
1805
1806
|
var init_is_browser = __esm({
|
|
1806
|
-
"node_modules/@probe.gl/env/dist/lib/is-browser.js"() {
|
|
1807
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/is-browser.js"() {
|
|
1807
1808
|
init_is_electron();
|
|
1808
1809
|
}
|
|
1809
1810
|
});
|
|
1810
1811
|
|
|
1811
|
-
// node_modules/@probe.gl/env/dist/lib/globals.js
|
|
1812
|
-
var self_3, window_3, document_3, process_
|
|
1812
|
+
// ../../node_modules/@probe.gl/env/dist/esm/lib/globals.js
|
|
1813
|
+
var globals3, self_3, window_3, document_3, process_;
|
|
1813
1814
|
var init_globals3 = __esm({
|
|
1814
|
-
"node_modules/@probe.gl/env/dist/lib/globals.js"() {
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1815
|
+
"../../node_modules/@probe.gl/env/dist/esm/lib/globals.js"() {
|
|
1816
|
+
globals3 = {
|
|
1817
|
+
self: typeof self !== "undefined" && self,
|
|
1818
|
+
window: typeof window !== "undefined" && window,
|
|
1819
|
+
global: typeof global !== "undefined" && global,
|
|
1820
|
+
document: typeof document !== "undefined" && document,
|
|
1821
|
+
process: typeof process === "object" && process
|
|
1822
|
+
};
|
|
1823
|
+
self_3 = globals3.self || globals3.window || globals3.global;
|
|
1824
|
+
window_3 = globals3.window || globals3.self || globals3.global;
|
|
1825
|
+
document_3 = globals3.document || {};
|
|
1826
|
+
process_ = globals3.process || {};
|
|
1821
1827
|
}
|
|
1822
1828
|
});
|
|
1823
1829
|
|
|
1824
|
-
// node_modules/@probe.gl/env/dist/utils/globals.js
|
|
1830
|
+
// ../../node_modules/@probe.gl/env/dist/esm/utils/globals.js
|
|
1825
1831
|
var VERSION4, isBrowser4;
|
|
1826
1832
|
var init_globals4 = __esm({
|
|
1827
|
-
"node_modules/@probe.gl/env/dist/utils/globals.js"() {
|
|
1833
|
+
"../../node_modules/@probe.gl/env/dist/esm/utils/globals.js"() {
|
|
1828
1834
|
init_is_browser();
|
|
1829
1835
|
VERSION4 = typeof __VERSION__ !== "undefined" ? __VERSION__ : "untranspiled source";
|
|
1830
1836
|
isBrowser4 = isBrowser3();
|
|
1831
1837
|
}
|
|
1832
1838
|
});
|
|
1833
1839
|
|
|
1834
|
-
// node_modules/@probe.gl/env/dist/index.js
|
|
1835
|
-
var
|
|
1836
|
-
"node_modules/@probe.gl/env/dist/index.js"() {
|
|
1840
|
+
// ../../node_modules/@probe.gl/env/dist/esm/index.js
|
|
1841
|
+
var init_esm2 = __esm({
|
|
1842
|
+
"../../node_modules/@probe.gl/env/dist/esm/index.js"() {
|
|
1837
1843
|
init_globals4();
|
|
1838
1844
|
init_globals3();
|
|
1839
1845
|
init_is_browser();
|
|
1840
1846
|
}
|
|
1841
1847
|
});
|
|
1842
1848
|
|
|
1843
|
-
// node_modules/@probe.gl/log/dist/utils/local-storage.js
|
|
1849
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js
|
|
1844
1850
|
function getStorage(type) {
|
|
1845
1851
|
try {
|
|
1846
1852
|
const storage = window[type];
|
|
@@ -1854,7 +1860,7 @@
|
|
|
1854
1860
|
}
|
|
1855
1861
|
var LocalStorage;
|
|
1856
1862
|
var init_local_storage = __esm({
|
|
1857
|
-
"node_modules/@probe.gl/log/dist/utils/local-storage.js"() {
|
|
1863
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/local-storage.js"() {
|
|
1858
1864
|
init_defineProperty();
|
|
1859
1865
|
LocalStorage = class {
|
|
1860
1866
|
constructor(id, defaultConfig) {
|
|
@@ -1890,7 +1896,7 @@
|
|
|
1890
1896
|
}
|
|
1891
1897
|
});
|
|
1892
1898
|
|
|
1893
|
-
// node_modules/@probe.gl/log/dist/utils/formatters.js
|
|
1899
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js
|
|
1894
1900
|
function formatTime(ms) {
|
|
1895
1901
|
let formatted;
|
|
1896
1902
|
if (ms < 10) {
|
|
@@ -1921,35 +1927,31 @@
|
|
|
1921
1927
|
return ["".concat(message, " %c+"), style];
|
|
1922
1928
|
}
|
|
1923
1929
|
var init_formatters = __esm({
|
|
1924
|
-
"node_modules/@probe.gl/log/dist/utils/formatters.js"() {
|
|
1930
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/formatters.js"() {
|
|
1925
1931
|
}
|
|
1926
1932
|
});
|
|
1927
1933
|
|
|
1928
|
-
// node_modules/@probe.gl/log/dist/utils/color.js
|
|
1934
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/color.js
|
|
1929
1935
|
function getColor(color) {
|
|
1930
|
-
|
|
1931
|
-
return color;
|
|
1932
|
-
}
|
|
1933
|
-
color = color.toUpperCase();
|
|
1934
|
-
return COLOR[color] || COLOR.WHITE;
|
|
1936
|
+
return typeof color === "string" ? COLOR[color.toUpperCase()] || COLOR.WHITE : color;
|
|
1935
1937
|
}
|
|
1936
1938
|
function addColor(string, color, background) {
|
|
1937
1939
|
if (!isBrowser3 && typeof string === "string") {
|
|
1938
1940
|
if (color) {
|
|
1939
|
-
|
|
1940
|
-
string = "[".concat(
|
|
1941
|
+
color = getColor(color);
|
|
1942
|
+
string = "[".concat(color, "m").concat(string, "[39m");
|
|
1941
1943
|
}
|
|
1942
1944
|
if (background) {
|
|
1943
|
-
|
|
1944
|
-
string = "[".concat(
|
|
1945
|
+
color = getColor(background);
|
|
1946
|
+
string = "[".concat(background + 10, "m").concat(string, "[49m");
|
|
1945
1947
|
}
|
|
1946
1948
|
}
|
|
1947
1949
|
return string;
|
|
1948
1950
|
}
|
|
1949
|
-
var COLOR
|
|
1951
|
+
var COLOR;
|
|
1950
1952
|
var init_color = __esm({
|
|
1951
|
-
"node_modules/@probe.gl/log/dist/utils/color.js"() {
|
|
1952
|
-
|
|
1953
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/color.js"() {
|
|
1954
|
+
init_esm2();
|
|
1953
1955
|
(function(COLOR2) {
|
|
1954
1956
|
COLOR2[COLOR2["BLACK"] = 30] = "BLACK";
|
|
1955
1957
|
COLOR2[COLOR2["RED"] = 31] = "RED";
|
|
@@ -1968,45 +1970,42 @@
|
|
|
1968
1970
|
COLOR2[COLOR2["BRIGHT_CYAN"] = 96] = "BRIGHT_CYAN";
|
|
1969
1971
|
COLOR2[COLOR2["BRIGHT_WHITE"] = 97] = "BRIGHT_WHITE";
|
|
1970
1972
|
})(COLOR || (COLOR = {}));
|
|
1971
|
-
BACKGROUND_INCREMENT = 10;
|
|
1972
1973
|
}
|
|
1973
1974
|
});
|
|
1974
1975
|
|
|
1975
|
-
// node_modules/@probe.gl/log/dist/utils/autobind.js
|
|
1976
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js
|
|
1976
1977
|
function autobind(obj) {
|
|
1977
1978
|
let predefined = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : ["constructor"];
|
|
1978
1979
|
const proto = Object.getPrototypeOf(obj);
|
|
1979
1980
|
const propNames = Object.getOwnPropertyNames(proto);
|
|
1980
|
-
const object = obj;
|
|
1981
1981
|
for (const key of propNames) {
|
|
1982
|
-
|
|
1983
|
-
if (typeof value === "function") {
|
|
1982
|
+
if (typeof obj[key] === "function") {
|
|
1984
1983
|
if (!predefined.find((name) => key === name)) {
|
|
1985
|
-
|
|
1984
|
+
obj[key] = obj[key].bind(obj);
|
|
1986
1985
|
}
|
|
1987
1986
|
}
|
|
1988
1987
|
}
|
|
1989
1988
|
}
|
|
1990
1989
|
var init_autobind = __esm({
|
|
1991
|
-
"node_modules/@probe.gl/log/dist/utils/autobind.js"() {
|
|
1990
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/autobind.js"() {
|
|
1992
1991
|
}
|
|
1993
1992
|
});
|
|
1994
1993
|
|
|
1995
|
-
// node_modules/@probe.gl/log/dist/utils/assert.js
|
|
1994
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/assert.js
|
|
1996
1995
|
function assert3(condition, message) {
|
|
1997
1996
|
if (!condition) {
|
|
1998
1997
|
throw new Error(message || "Assertion failed");
|
|
1999
1998
|
}
|
|
2000
1999
|
}
|
|
2001
2000
|
var init_assert3 = __esm({
|
|
2002
|
-
"node_modules/@probe.gl/log/dist/utils/assert.js"() {
|
|
2001
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/assert.js"() {
|
|
2003
2002
|
}
|
|
2004
2003
|
});
|
|
2005
2004
|
|
|
2006
|
-
// node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js
|
|
2005
|
+
// ../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js
|
|
2007
2006
|
function getHiResTimestamp2() {
|
|
2008
2007
|
let timestamp;
|
|
2009
|
-
if (isBrowser3
|
|
2008
|
+
if (isBrowser3 && "performance" in window_3) {
|
|
2010
2009
|
var _window$performance, _window$performance$n;
|
|
2011
2010
|
timestamp = window_3 === null || window_3 === void 0 ? void 0 : (_window$performance = window_3.performance) === null || _window$performance === void 0 ? void 0 : (_window$performance$n = _window$performance.now) === null || _window$performance$n === void 0 ? void 0 : _window$performance$n.call(_window$performance);
|
|
2012
2011
|
} else if ("hrtime" in process_) {
|
|
@@ -2019,12 +2018,12 @@
|
|
|
2019
2018
|
return timestamp;
|
|
2020
2019
|
}
|
|
2021
2020
|
var init_hi_res_timestamp2 = __esm({
|
|
2022
|
-
"node_modules/@probe.gl/log/dist/utils/hi-res-timestamp.js"() {
|
|
2023
|
-
|
|
2021
|
+
"../../node_modules/@probe.gl/log/dist/esm/utils/hi-res-timestamp.js"() {
|
|
2022
|
+
init_esm2();
|
|
2024
2023
|
}
|
|
2025
2024
|
});
|
|
2026
2025
|
|
|
2027
|
-
// node_modules/@probe.gl/log/dist/log.js
|
|
2026
|
+
// ../../node_modules/@probe.gl/log/dist/esm/log.js
|
|
2028
2027
|
function noop() {
|
|
2029
2028
|
}
|
|
2030
2029
|
function normalizeLogLevel(logLevel) {
|
|
@@ -2129,11 +2128,11 @@
|
|
|
2129
2128
|
}
|
|
2130
2129
|
return "empty";
|
|
2131
2130
|
}
|
|
2132
|
-
var originalConsole,
|
|
2131
|
+
var originalConsole, DEFAULT_SETTINGS, cache, ONCE, Log;
|
|
2133
2132
|
var init_log = __esm({
|
|
2134
|
-
"node_modules/@probe.gl/log/dist/log.js"() {
|
|
2133
|
+
"../../node_modules/@probe.gl/log/dist/esm/log.js"() {
|
|
2135
2134
|
init_defineProperty();
|
|
2136
|
-
|
|
2135
|
+
init_esm2();
|
|
2137
2136
|
init_local_storage();
|
|
2138
2137
|
init_formatters();
|
|
2139
2138
|
init_color();
|
|
@@ -2141,13 +2140,13 @@
|
|
|
2141
2140
|
init_assert3();
|
|
2142
2141
|
init_hi_res_timestamp2();
|
|
2143
2142
|
originalConsole = {
|
|
2144
|
-
debug: isBrowser3
|
|
2143
|
+
debug: isBrowser3 ? console.debug || console.log : console.log,
|
|
2145
2144
|
log: console.log,
|
|
2146
2145
|
info: console.info,
|
|
2147
2146
|
warn: console.warn,
|
|
2148
2147
|
error: console.error
|
|
2149
2148
|
};
|
|
2150
|
-
|
|
2149
|
+
DEFAULT_SETTINGS = {
|
|
2151
2150
|
enabled: true,
|
|
2152
2151
|
level: 0
|
|
2153
2152
|
};
|
|
@@ -2171,7 +2170,7 @@
|
|
|
2171
2170
|
_defineProperty(this, "LOG_THROTTLE_TIMEOUT", 0);
|
|
2172
2171
|
this.id = id;
|
|
2173
2172
|
this.userData = {};
|
|
2174
|
-
this._storage = new LocalStorage("__probe-".concat(this.id, "__"),
|
|
2173
|
+
this._storage = new LocalStorage("__probe-".concat(this.id, "__"), DEFAULT_SETTINGS);
|
|
2175
2174
|
this.timeStamp("".concat(this.id, " started"));
|
|
2176
2175
|
autobind(this);
|
|
2177
2176
|
Object.seal(this);
|
|
@@ -2259,6 +2258,9 @@
|
|
|
2259
2258
|
return this._getLogFunction(logLevel, message, console.info, arguments);
|
|
2260
2259
|
}
|
|
2261
2260
|
once(logLevel, message) {
|
|
2261
|
+
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
2262
|
+
args[_key - 2] = arguments[_key];
|
|
2263
|
+
}
|
|
2262
2264
|
return this._getLogFunction(logLevel, message, originalConsole.debug || originalConsole.info, arguments, ONCE);
|
|
2263
2265
|
}
|
|
2264
2266
|
table(logLevel, table, columns) {
|
|
@@ -2280,7 +2282,7 @@
|
|
|
2280
2282
|
if (!this._shouldLog(logLevel || priority)) {
|
|
2281
2283
|
return noop;
|
|
2282
2284
|
}
|
|
2283
|
-
return isBrowser3
|
|
2285
|
+
return isBrowser3 ? logImageInBrowser({
|
|
2284
2286
|
image,
|
|
2285
2287
|
message,
|
|
2286
2288
|
scale
|
|
@@ -2353,7 +2355,7 @@
|
|
|
2353
2355
|
opts.delta = this.getDelta();
|
|
2354
2356
|
this._deltaTs = getHiResTimestamp2();
|
|
2355
2357
|
const tag = opts.tag || opts.message;
|
|
2356
|
-
if (opts.once
|
|
2358
|
+
if (opts.once) {
|
|
2357
2359
|
if (!cache[tag]) {
|
|
2358
2360
|
cache[tag] = getHiResTimestamp2();
|
|
2359
2361
|
} else {
|
|
@@ -2370,13 +2372,13 @@
|
|
|
2370
2372
|
}
|
|
2371
2373
|
});
|
|
2372
2374
|
|
|
2373
|
-
// node_modules/@probe.gl/log/dist/index.js
|
|
2374
|
-
var
|
|
2375
|
-
var
|
|
2376
|
-
"node_modules/@probe.gl/log/dist/index.js"() {
|
|
2375
|
+
// ../../node_modules/@probe.gl/log/dist/esm/index.js
|
|
2376
|
+
var esm_default;
|
|
2377
|
+
var init_esm3 = __esm({
|
|
2378
|
+
"../../node_modules/@probe.gl/log/dist/esm/index.js"() {
|
|
2377
2379
|
init_log();
|
|
2378
2380
|
init_log();
|
|
2379
|
-
|
|
2381
|
+
esm_default = new Log({
|
|
2380
2382
|
id: "@probe.gl/log"
|
|
2381
2383
|
});
|
|
2382
2384
|
}
|
|
@@ -2386,7 +2388,7 @@
|
|
|
2386
2388
|
var probeLog, NullLog, ConsoleLog;
|
|
2387
2389
|
var init_loggers = __esm({
|
|
2388
2390
|
"src/lib/loader-utils/loggers.ts"() {
|
|
2389
|
-
|
|
2391
|
+
init_esm3();
|
|
2390
2392
|
probeLog = new Log({ id: "loaders.gl" });
|
|
2391
2393
|
NullLog = class {
|
|
2392
2394
|
log() {
|
|
@@ -2657,7 +2659,7 @@
|
|
|
2657
2659
|
var log;
|
|
2658
2660
|
var init_log2 = __esm({
|
|
2659
2661
|
"src/lib/utils/log.ts"() {
|
|
2660
|
-
|
|
2662
|
+
init_esm3();
|
|
2661
2663
|
log = new Log({ id: "loaders.gl" });
|
|
2662
2664
|
}
|
|
2663
2665
|
});
|
package/dist/es5/bundle.js
CHANGED
package/dist/es5/bundle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,
|
|
1
|
+
{"version":3,"file":"bundle.js","names":["moduleExports","require","globalThis","loaders","module","exports","Object","assign"],"sources":["../../src/bundle.ts"],"sourcesContent":["// @ts-nocheck\nconst moduleExports = require('./index');\nglobalThis.loaders = globalThis.loaders || {};\nmodule.exports = Object.assign(globalThis.loaders, moduleExports);\n"],"mappings":";;AACA,MAAMA,aAAa,GAAGC,OAAO,CAAC,SAAS,CAAC;AACxCC,UAAU,CAACC,OAAO,GAAGD,UAAU,CAACC,OAAO,IAAI,CAAC,CAAC;AAC7CC,MAAM,CAACC,OAAO,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,CAACC,OAAO,EAAEH,aAAa,CAAC"}
|