@google/earthengine 0.1.377 → 0.1.378
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/.tmp/BUILD +4 -0
- package/.tmp/METADATA +4 -4
- package/.tmp/VERSION_BUILD +2 -2
- package/build/browser.js +55 -47
- package/build/ee_api_js.js +2 -2
- package/build/ee_api_js_debug.js +55 -47
- package/build/ee_api_js_npm.js +55 -47
- package/build/main.js +55 -47
- package/package.json +1 -1
- package/src/apiclient.js +1 -1
- package/src/examples/CloudMasking/{Sentinel2ClearComposite.js → Sentinel2ClearComposites.js} +29 -28
package/build/main.js
CHANGED
|
@@ -3728,24 +3728,18 @@ goog.userAgent.PLATFORM = goog.userAgent.determinePlatform_();
|
|
|
3728
3728
|
goog.userAgent.ASSUME_MAC = !1;
|
|
3729
3729
|
goog.userAgent.ASSUME_WINDOWS = !1;
|
|
3730
3730
|
goog.userAgent.ASSUME_LINUX = !1;
|
|
3731
|
-
goog.userAgent.ASSUME_X11 = !1;
|
|
3732
3731
|
goog.userAgent.ASSUME_ANDROID = !1;
|
|
3733
3732
|
goog.userAgent.ASSUME_IPHONE = !1;
|
|
3734
3733
|
goog.userAgent.ASSUME_IPAD = !1;
|
|
3735
3734
|
goog.userAgent.ASSUME_IPOD = !1;
|
|
3736
3735
|
goog.userAgent.ASSUME_KAIOS = !1;
|
|
3737
|
-
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.
|
|
3736
|
+
goog.userAgent.PLATFORM_KNOWN_ = goog.userAgent.ASSUME_MAC || goog.userAgent.ASSUME_WINDOWS || goog.userAgent.ASSUME_LINUX || goog.userAgent.ASSUME_ANDROID || goog.userAgent.ASSUME_IPHONE || goog.userAgent.ASSUME_IPAD || goog.userAgent.ASSUME_IPOD;
|
|
3738
3737
|
goog.userAgent.MAC = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_MAC : module$contents$goog$labs$userAgent$platform_isMacintosh();
|
|
3739
3738
|
goog.userAgent.WINDOWS = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_WINDOWS : module$contents$goog$labs$userAgent$platform_isWindows();
|
|
3740
3739
|
goog.userAgent.isLegacyLinux_ = function() {
|
|
3741
3740
|
return module$contents$goog$labs$userAgent$platform_isLinux() || module$contents$goog$labs$userAgent$platform_isChromeOS();
|
|
3742
3741
|
};
|
|
3743
3742
|
goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
|
|
3744
|
-
goog.userAgent.isX11_ = function() {
|
|
3745
|
-
var navigator = goog.userAgent.getNavigatorTyped();
|
|
3746
|
-
return !!navigator && goog.string.internal.contains(navigator.appVersion || "", "X11");
|
|
3747
|
-
};
|
|
3748
|
-
goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
|
|
3749
3743
|
goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : module$contents$goog$labs$userAgent$platform_isAndroid();
|
|
3750
3744
|
goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : module$contents$goog$labs$userAgent$platform_isIphone();
|
|
3751
3745
|
goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : module$contents$goog$labs$userAgent$platform_isIpad();
|
|
@@ -6068,7 +6062,7 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function(type, raw)
|
|
|
6068
6062
|
};
|
|
6069
6063
|
var module$contents$eeapiclient$domain_object_CopyValueGetter, module$contents$eeapiclient$domain_object_CopyValueSetter, module$contents$eeapiclient$domain_object_CopyConstructor, module$contents$eeapiclient$domain_object_CopyInstanciator;
|
|
6070
6064
|
function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) {
|
|
6071
|
-
for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$19.next(), $jscomp$loop$
|
|
6065
|
+
for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$iter$19 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$19.next(), $jscomp$loop$m192531680$0 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$0 = {mapMetadata:$jscomp$loop$m192531680$0.mapMetadata},
|
|
6072
6066
|
$jscomp$key$key = $jscomp$iter$19.next()) {
|
|
6073
6067
|
var key = $jscomp$key$key.value, value = valueGetter(key, source);
|
|
6074
6068
|
if (null != value) {
|
|
@@ -6081,11 +6075,11 @@ function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter,
|
|
|
6081
6075
|
} else if (objects.hasOwnProperty(key)) {
|
|
6082
6076
|
copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]);
|
|
6083
6077
|
} else if (objectMaps.hasOwnProperty(key)) {
|
|
6084
|
-
$jscomp$loop$
|
|
6078
|
+
$jscomp$loop$m192531680$0.mapMetadata = objectMaps[key], copy = $jscomp$loop$m192531680$0.mapMetadata.isPropertyArray ? value.map(function($jscomp$loop$m192531680$0) {
|
|
6085
6079
|
return function(v) {
|
|
6086
|
-
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$
|
|
6080
|
+
return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$m192531680$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6087
6081
|
};
|
|
6088
|
-
}($jscomp$loop$
|
|
6082
|
+
}($jscomp$loop$m192531680$0)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$m192531680$0.mapMetadata, valueGetter, valueSetter, copyInstanciator);
|
|
6089
6083
|
} else if (Array.isArray(value)) {
|
|
6090
6084
|
if (metadata.emptyArrayIsUnset && 0 === value.length) {
|
|
6091
6085
|
continue;
|
|
@@ -6131,39 +6125,39 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser
|
|
|
6131
6125
|
if (!(module$contents$eeapiclient$domain_object_sameKeys(keys1, metadata2.keys || []) && module$contents$eeapiclient$domain_object_sameKeys(arrays1, arrays2) && module$contents$eeapiclient$domain_object_sameKeys(objects1, objects2) && module$contents$eeapiclient$domain_object_sameKeys(objectMaps1, objectMaps2))) {
|
|
6132
6126
|
return !1;
|
|
6133
6127
|
}
|
|
6134
|
-
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$
|
|
6128
|
+
for (var $jscomp$iter$21 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$21.next(), $jscomp$loop$m192531680$1 = {}; !$jscomp$key$key.done; $jscomp$loop$m192531680$1 = {value2$jscomp$7:$jscomp$loop$m192531680$1.value2$jscomp$7, mapMetadata$jscomp$2:$jscomp$loop$m192531680$1.mapMetadata$jscomp$2}, $jscomp$key$key = $jscomp$iter$21.next()) {
|
|
6135
6129
|
var key = $jscomp$key$key.value, has1 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable1, key, metadata1), has2 = module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable2, key, metadata2);
|
|
6136
6130
|
if (has1 !== has2) {
|
|
6137
6131
|
return !1;
|
|
6138
6132
|
}
|
|
6139
6133
|
if (has1) {
|
|
6140
6134
|
var value1 = serializable1.Serializable$get(key);
|
|
6141
|
-
$jscomp$loop$
|
|
6135
|
+
$jscomp$loop$m192531680$1.value2$jscomp$7 = serializable2.Serializable$get(key);
|
|
6142
6136
|
if (arrays1.hasOwnProperty(key)) {
|
|
6143
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6137
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !0, !0)) {
|
|
6144
6138
|
return !1;
|
|
6145
6139
|
}
|
|
6146
6140
|
} else if (objects1.hasOwnProperty(key)) {
|
|
6147
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6141
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !1, !0)) {
|
|
6148
6142
|
return !1;
|
|
6149
6143
|
}
|
|
6150
6144
|
} else if (objectMaps1.hasOwnProperty(key)) {
|
|
6151
|
-
if ($jscomp$loop$
|
|
6152
|
-
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$
|
|
6145
|
+
if ($jscomp$loop$m192531680$1.mapMetadata$jscomp$2 = objectMaps1[key], $jscomp$loop$m192531680$1.mapMetadata$jscomp$2.isPropertyArray) {
|
|
6146
|
+
if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$m192531680$1.value2$jscomp$7) || value1.some(function($jscomp$loop$m192531680$1) {
|
|
6153
6147
|
return function(v1, i) {
|
|
6154
|
-
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$
|
|
6148
|
+
return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$m192531680$1.value2$jscomp$7[i], $jscomp$loop$m192531680$1.mapMetadata$jscomp$2);
|
|
6155
6149
|
};
|
|
6156
|
-
}($jscomp$loop$
|
|
6150
|
+
}($jscomp$loop$m192531680$1))) {
|
|
6157
6151
|
return !1;
|
|
6158
6152
|
}
|
|
6159
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$
|
|
6153
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, $jscomp$loop$m192531680$1.mapMetadata$jscomp$2)) {
|
|
6160
6154
|
return !1;
|
|
6161
6155
|
}
|
|
6162
6156
|
} else if (Array.isArray(value1)) {
|
|
6163
|
-
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6157
|
+
if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !0, !1)) {
|
|
6164
6158
|
return !1;
|
|
6165
6159
|
}
|
|
6166
|
-
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$
|
|
6160
|
+
} else if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$m192531680$1.value2$jscomp$7, !1, !1)) {
|
|
6167
6161
|
return !1;
|
|
6168
6162
|
}
|
|
6169
6163
|
}
|
|
@@ -6564,7 +6558,7 @@ goog.string.Const.prototype.getTypedStringValue = function() {
|
|
|
6564
6558
|
return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
|
|
6565
6559
|
};
|
|
6566
6560
|
goog.DEBUG && (goog.string.Const.prototype.toString = function() {
|
|
6567
|
-
return
|
|
6561
|
+
return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
|
|
6568
6562
|
});
|
|
6569
6563
|
goog.string.Const.unwrap = function(stringConst) {
|
|
6570
6564
|
if (stringConst instanceof goog.string.Const && stringConst.constructor === goog.string.Const && stringConst.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) {
|
|
@@ -17397,7 +17391,7 @@ goog.debug.entryPointRegistry.register(function(transformer) {
|
|
|
17397
17391
|
ee.apiclient = {};
|
|
17398
17392
|
var module$contents$ee$apiclient_apiclient = {};
|
|
17399
17393
|
ee.apiclient.VERSION = module$exports$ee$apiVersion.V1;
|
|
17400
|
-
ee.apiclient.API_CLIENT_VERSION = "0.1.
|
|
17394
|
+
ee.apiclient.API_CLIENT_VERSION = "0.1.378";
|
|
17401
17395
|
ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE;
|
|
17402
17396
|
ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService;
|
|
17403
17397
|
ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams;
|
|
@@ -17688,8 +17682,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m
|
|
|
17688
17682
|
var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded";
|
|
17689
17683
|
body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST"));
|
|
17690
17684
|
method = method || "POST";
|
|
17691
|
-
var headers = {"Content-Type":contentType}, version = "0.1.
|
|
17692
|
-
"0.1.
|
|
17685
|
+
var headers = {"Content-Type":contentType}, version = "0.1.378";
|
|
17686
|
+
"0.1.378" === version && (version = "latest");
|
|
17693
17687
|
headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version;
|
|
17694
17688
|
var authToken = module$contents$ee$apiclient_apiclient.getAuthToken();
|
|
17695
17689
|
if (null != authToken) {
|
|
@@ -24324,8 +24318,8 @@ function module$contents$safevalues$internals$attribute_impl_unwrapAttributePref
|
|
|
24324
24318
|
throw Error(message);
|
|
24325
24319
|
}
|
|
24326
24320
|
module$exports$safevalues$internals$attribute_impl.unwrapAttributePrefix = module$contents$safevalues$internals$attribute_impl_unwrapAttributePrefix;
|
|
24327
|
-
var $jscomp$templatelit$
|
|
24328
|
-
["\\0"]), $jscomp$templatelit$
|
|
24321
|
+
var $jscomp$templatelit$1274514361$0 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$1 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\0"]), $jscomp$templatelit$1274514361$2 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$3 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), $jscomp$templatelit$1274514361$4 = $jscomp.createTemplateTagFirstArg([""]), $jscomp$templatelit$1274514361$5 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"],
|
|
24322
|
+
["\\0"]), $jscomp$templatelit$1274514361$6 = $jscomp.createTemplateTagFirstArgWithRaw(["\n"], ["\\n"]), $jscomp$templatelit$1274514361$7 = $jscomp.createTemplateTagFirstArgWithRaw(["\x00"], ["\\u0000"]), module$contents$safevalues$internals$string_literal_module = module$contents$safevalues$internals$string_literal_module || {id:"third_party/javascript/safevalues/internals/string_literal.closure.js"};
|
|
24329
24323
|
function module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, numExprs) {
|
|
24330
24324
|
if (!module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) || numExprs + 1 !== templateObj.length) {
|
|
24331
24325
|
throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################");
|
|
@@ -24339,14 +24333,14 @@ function module$contents$safevalues$internals$string_literal_checkTranspiled(fn)
|
|
|
24339
24333
|
return -1 === fn.toString().indexOf("`");
|
|
24340
24334
|
}
|
|
24341
24335
|
var module$contents$safevalues$internals$string_literal_isTranspiled = module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24342
|
-
return tag($jscomp$templatelit$
|
|
24336
|
+
return tag($jscomp$templatelit$1274514361$0);
|
|
24343
24337
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24344
|
-
return tag($jscomp$templatelit$
|
|
24338
|
+
return tag($jscomp$templatelit$1274514361$1);
|
|
24345
24339
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24346
|
-
return tag($jscomp$templatelit$
|
|
24340
|
+
return tag($jscomp$templatelit$1274514361$2);
|
|
24347
24341
|
}) || module$contents$safevalues$internals$string_literal_checkTranspiled(function(tag) {
|
|
24348
|
-
return tag($jscomp$templatelit$
|
|
24349
|
-
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$
|
|
24342
|
+
return tag($jscomp$templatelit$1274514361$3);
|
|
24343
|
+
}), module$contents$safevalues$internals$string_literal_frozenTSA = module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$4) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$5) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$6) && module$contents$safevalues$internals$string_literal_checkFrozen($jscomp$templatelit$1274514361$7);
|
|
24350
24344
|
function module$contents$safevalues$internals$string_literal_isTemplateObject(templateObj) {
|
|
24351
24345
|
return Array.isArray(templateObj) && Array.isArray(templateObj.raw) && templateObj.length === templateObj.raw.length && (module$contents$safevalues$internals$string_literal_isTranspiled || templateObj !== templateObj.raw) && (module$contents$safevalues$internals$string_literal_isTranspiled && !module$contents$safevalues$internals$string_literal_frozenTSA || module$contents$safevalues$internals$string_literal_checkFrozen(templateObj)) ?
|
|
24352
24346
|
!0 : !1;
|
|
@@ -24612,9 +24606,12 @@ function module$contents$safevalues$dom$globals$range_createContextualFragment(r
|
|
|
24612
24606
|
return range.createContextualFragment(module$contents$safevalues$internals$html_impl_unwrapHtml(html));
|
|
24613
24607
|
}
|
|
24614
24608
|
;var module$contents$safevalues$builders$html_sanitizer$inert_fragment_module = module$contents$safevalues$builders$html_sanitizer$inert_fragment_module || {id:"third_party/javascript/safevalues/builders/html_sanitizer/inert_fragment.closure.js"};
|
|
24615
|
-
function module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(dirtyHtml) {
|
|
24616
|
-
|
|
24617
|
-
|
|
24609
|
+
function module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(dirtyHtml, inertDocument) {
|
|
24610
|
+
if (goog.DEBUG && inertDocument.defaultView) {
|
|
24611
|
+
throw Error("createInertFragment called with non-inert document");
|
|
24612
|
+
}
|
|
24613
|
+
var range = inertDocument.createRange();
|
|
24614
|
+
range.selectNode(inertDocument.body);
|
|
24618
24615
|
var temporarySafeHtml = module$contents$safevalues$internals$html_impl_createHtmlInternal(dirtyHtml);
|
|
24619
24616
|
return module$contents$safevalues$dom$globals$range_createContextualFragment(range, temporarySafeHtml);
|
|
24620
24617
|
}
|
|
@@ -24719,21 +24716,25 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm
|
|
|
24719
24716
|
return sanitizedHtml;
|
|
24720
24717
|
};
|
|
24721
24718
|
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitize = function(html) {
|
|
24722
|
-
var
|
|
24723
|
-
fakeRoot.appendChild(this.
|
|
24719
|
+
var inertDocument = document.implementation.createHTMLDocument(""), fakeRoot = inertDocument.body;
|
|
24720
|
+
fakeRoot.appendChild(this.sanitizeToFragmentInternal(html, inertDocument));
|
|
24724
24721
|
var serializedNewTree = (new XMLSerializer()).serializeToString(fakeRoot);
|
|
24725
24722
|
serializedNewTree = serializedNewTree.slice(serializedNewTree.indexOf(">") + 1, serializedNewTree.lastIndexOf("</"));
|
|
24726
24723
|
return module$contents$safevalues$internals$html_impl_createHtmlInternal(serializedNewTree);
|
|
24727
24724
|
};
|
|
24728
24725
|
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeToFragment = function(html) {
|
|
24729
|
-
|
|
24726
|
+
var inertDocument = document.implementation.createHTMLDocument("");
|
|
24727
|
+
return this.sanitizeToFragmentInternal(html, inertDocument);
|
|
24728
|
+
};
|
|
24729
|
+
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeToFragmentInternal = function(html, inertDocument) {
|
|
24730
|
+
for (var $jscomp$this = this, dirtyFragment = module$contents$safevalues$builders$html_sanitizer$inert_fragment_createInertFragment(html, inertDocument), treeWalker = document.createTreeWalker(dirtyFragment, 5, function(n) {
|
|
24730
24731
|
return $jscomp$this.nodeFilter(n);
|
|
24731
|
-
}, !1), currentNode = treeWalker.nextNode(), sanitizedFragment =
|
|
24732
|
+
}, !1), currentNode = treeWalker.nextNode(), sanitizedFragment = inertDocument.createDocumentFragment(), sanitizedParent = sanitizedFragment; null !== currentNode;) {
|
|
24732
24733
|
var sanitizedNode = void 0;
|
|
24733
24734
|
if (module$contents$safevalues$builders$html_sanitizer$no_clobber_isText(currentNode)) {
|
|
24734
24735
|
sanitizedNode = this.sanitizeTextNode(currentNode);
|
|
24735
24736
|
} else if (module$contents$safevalues$builders$html_sanitizer$no_clobber_isElement(currentNode)) {
|
|
24736
|
-
sanitizedNode = this.sanitizeElementNode(currentNode);
|
|
24737
|
+
sanitizedNode = this.sanitizeElementNode(currentNode, inertDocument);
|
|
24737
24738
|
} else {
|
|
24738
24739
|
var message = "";
|
|
24739
24740
|
goog.DEBUG && (message = "Node is not of type text or element");
|
|
@@ -24753,8 +24754,8 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm
|
|
|
24753
24754
|
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeTextNode = function(textNode) {
|
|
24754
24755
|
return document.createTextNode(textNode.data);
|
|
24755
24756
|
};
|
|
24756
|
-
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeElementNode = function(elementNode) {
|
|
24757
|
-
for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode =
|
|
24757
|
+
module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerImpl.prototype.sanitizeElementNode = function(elementNode, inertDocument) {
|
|
24758
|
+
for (var elementName = module$contents$safevalues$builders$html_sanitizer$no_clobber_getNodeName(elementNode), newNode = inertDocument.createElement(elementName), dirtyAttributes = elementNode.attributes, $jscomp$iter$43 = $jscomp.makeIterator(dirtyAttributes), $jscomp$key$ = $jscomp$iter$43.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$43.next()) {
|
|
24758
24759
|
var $jscomp$destructuring$var52 = $jscomp$key$.value, name = $jscomp$destructuring$var52.name, value = $jscomp$destructuring$var52.value, policy = this.sanitizerTable.getAttributePolicy(name, elementName);
|
|
24759
24760
|
if (this.satisfiesAllConditions(policy.conditions, dirtyAttributes)) {
|
|
24760
24761
|
switch(policy.policyAction) {
|
|
@@ -24809,7 +24810,7 @@ module$exports$safevalues$builders$html_sanitizer$html_sanitizer.HtmlSanitizerIm
|
|
|
24809
24810
|
return !0;
|
|
24810
24811
|
}
|
|
24811
24812
|
for (var $jscomp$iter$44 = $jscomp.makeIterator(conditions), $jscomp$key$ = $jscomp$iter$44.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$44.next()) {
|
|
24812
|
-
var $jscomp$destructuring$var54 = $jscomp.makeIterator($jscomp$key$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var54.next().value, expectedValues = $jscomp$destructuring$var54.next().value, $jscomp$optchain$
|
|
24813
|
+
var $jscomp$destructuring$var54 = $jscomp.makeIterator($jscomp$key$.value), attrName__tsickle_destructured_1 = $jscomp$destructuring$var54.next().value, expectedValues = $jscomp$destructuring$var54.next().value, $jscomp$optchain$tmpm1803429925$0 = void 0, value = null == ($jscomp$optchain$tmpm1803429925$0 = attrs.getNamedItem(attrName__tsickle_destructured_1)) ? void 0 : $jscomp$optchain$tmpm1803429925$0.value;
|
|
24813
24814
|
if (value && !expectedValues.has(value)) {
|
|
24814
24815
|
return !1;
|
|
24815
24816
|
}
|
|
@@ -24990,6 +24991,9 @@ function module$contents$safevalues$builders$resource_url_builders_isValidPathSt
|
|
|
24990
24991
|
}
|
|
24991
24992
|
throw Error("The path start in the url is invalid.");
|
|
24992
24993
|
}
|
|
24994
|
+
function module$contents$safevalues$builders$resource_url_builders_isValidRelativePathStart(base) {
|
|
24995
|
+
return RegExp("^[^:\\s\\\\/]+/").test(base);
|
|
24996
|
+
}
|
|
24993
24997
|
function module$contents$safevalues$builders$resource_url_builders_trustedResourceUrl(templateObj) {
|
|
24994
24998
|
var rest = $jscomp.getRestArguments.apply(1, arguments);
|
|
24995
24999
|
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, rest.length);
|
|
@@ -25001,7 +25005,7 @@ function module$contents$safevalues$builders$resource_url_builders_trustedResour
|
|
|
25001
25005
|
if (/^data:/.test(base)) {
|
|
25002
25006
|
throw Error("Data URLs cannot have expressions in the template literal input.");
|
|
25003
25007
|
}
|
|
25004
|
-
if (!module$contents$safevalues$builders$resource_url_builders_hasValidOrigin(base)
|
|
25008
|
+
if (!(module$contents$safevalues$builders$resource_url_builders_hasValidOrigin(base) || module$contents$safevalues$builders$resource_url_builders_isValidPathStart(base) || module$contents$safevalues$builders$resource_url_builders_isValidRelativePathStart(base) || module$contents$safevalues$builders$resource_url_builders_isValidAboutUrl(base))) {
|
|
25005
25009
|
throw Error("Trying to interpolate expressions in an unsupported url format.");
|
|
25006
25010
|
}
|
|
25007
25011
|
}
|
|
@@ -25046,6 +25050,10 @@ function module$contents$safevalues$builders$resource_url_builders_objectUrlFrom
|
|
|
25046
25050
|
return module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal(URL.createObjectURL(new Blob([scriptContent], {type:"text/javascript"})));
|
|
25047
25051
|
}
|
|
25048
25052
|
module$exports$safevalues$builders$resource_url_builders.objectUrlFromScript = module$contents$safevalues$builders$resource_url_builders_objectUrlFromScript;
|
|
25053
|
+
module$exports$safevalues$builders$resource_url_builders.toAbsoluteResourceUrl = function(pathRelativeUrl) {
|
|
25054
|
+
var originalUrl = module$contents$safevalues$internals$resource_url_impl_unwrapResourceUrl(pathRelativeUrl).toString(), qualifiedUrl = new URL(originalUrl, window.document.baseURI);
|
|
25055
|
+
return module$contents$safevalues$internals$resource_url_impl_createResourceUrlInternal(qualifiedUrl.toString());
|
|
25056
|
+
};
|
|
25049
25057
|
var module$exports$safevalues$builders$script_builders = {}, module$contents$safevalues$builders$script_builders_module = module$contents$safevalues$builders$script_builders_module || {id:"third_party/javascript/safevalues/builders/script_builders.closure.js"}, module$contents$safevalues$builders$script_builders_Primitive, module$contents$safevalues$builders$script_builders_Serializable;
|
|
25050
25058
|
function module$contents$safevalues$builders$script_builders_safeScript(templateObj) {
|
|
25051
25059
|
goog.DEBUG && module$contents$safevalues$internals$string_literal_assertIsTemplateObject(templateObj, 0);
|
|
@@ -25307,12 +25315,12 @@ function module$contents$safevalues$reporting$reporting_isChangedBySanitizing(s,
|
|
|
25307
25315
|
}
|
|
25308
25316
|
try {
|
|
25309
25317
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_lenientlySanitizeHtmlAssertUnchanged(s);
|
|
25310
|
-
} catch ($jscomp$unused$catch$
|
|
25318
|
+
} catch ($jscomp$unused$catch$442189172$0) {
|
|
25311
25319
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_RELAXED_SANITIZING), !0;
|
|
25312
25320
|
}
|
|
25313
25321
|
try {
|
|
25314
25322
|
module$contents$safevalues$builders$html_sanitizer$html_sanitizer_sanitizeHtmlAssertUnchanged(s);
|
|
25315
|
-
} catch ($jscomp$unused$catch$
|
|
25323
|
+
} catch ($jscomp$unused$catch$442189172$1) {
|
|
25316
25324
|
return module$contents$safevalues$reporting$reporting_reportLegacyConversion(options, module$contents$safevalues$reporting$reporting_ReportingType.HTML_CHANGED_BY_SANITIZING), !0;
|
|
25317
25325
|
}
|
|
25318
25326
|
return !1;
|
package/package.json
CHANGED
package/src/apiclient.js
CHANGED
|
@@ -25,7 +25,7 @@ const {PromiseRequestService} = goog.require('eeapiclient.promise_request_servic
|
|
|
25
25
|
/** @namespace */
|
|
26
26
|
const apiclient = {};
|
|
27
27
|
|
|
28
|
-
const API_CLIENT_VERSION = '0.1.
|
|
28
|
+
const API_CLIENT_VERSION = '0.1.378';
|
|
29
29
|
|
|
30
30
|
exports.VERSION = apiVersion.VERSION;
|
|
31
31
|
exports.API_CLIENT_VERSION = API_CLIENT_VERSION;
|
package/src/examples/CloudMasking/{Sentinel2ClearComposite.js → Sentinel2ClearComposites.js}
RENAMED
|
@@ -1,33 +1,27 @@
|
|
|
1
|
-
// This example demonstrates how to use Cloud Score+ QA bands to
|
|
2
|
-
//
|
|
1
|
+
// This example demonstrates how to use Cloud Score+ QA bands to generate and
|
|
2
|
+
// display a collection of monthly clear median composites.
|
|
3
3
|
//
|
|
4
4
|
|
|
5
|
-
|
|
6
5
|
// Region of interest.
|
|
7
|
-
var roi = ee.Geometry.Rectangle([-
|
|
8
|
-
|
|
9
|
-
// Harmonized Sentinel-2 Level 2A collection.
|
|
10
|
-
var s2 = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED');
|
|
6
|
+
var roi = ee.Geometry.Rectangle([-120.3388, 37.4074, -119.2732, 38.1012]);
|
|
11
7
|
|
|
12
8
|
// Cloud Score+ image collection. Note Cloud Score+ is produced
|
|
13
9
|
// from Sentinel-2 Level 1C data and can be applied to either L1C
|
|
14
10
|
// or L2A collections.
|
|
15
11
|
var csPlus = ee.ImageCollection('GOOGLE/CLOUD_SCORE_PLUS/V1/S2_HARMONIZED');
|
|
16
12
|
|
|
17
|
-
//
|
|
18
|
-
var
|
|
13
|
+
// Harmonized Sentinel-2 Level 2A collection.
|
|
14
|
+
var s2 = ee.ImageCollection('COPERNICUS/S2_SR_HARMONIZED');
|
|
19
15
|
|
|
20
16
|
// Link S2 and CS+ results.
|
|
21
|
-
var linkedCollection =
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
* @return {ee.Image} masked Sentinel-2 image
|
|
30
|
-
*/
|
|
17
|
+
var linkedCollection =
|
|
18
|
+
s2.linkCollection(csPlus, ['cs', 'cs_cdf']).filterBounds(roi);
|
|
19
|
+
|
|
20
|
+
// Year to generate composites for.
|
|
21
|
+
var year = 2022;
|
|
22
|
+
var months = ee.List.sequence(1, 12);
|
|
23
|
+
|
|
24
|
+
// Masks pixels with low CS+ QA scores.
|
|
31
25
|
function maskLowQA(image) {
|
|
32
26
|
// CS+ QA band to use for masking. Options are 'cs' and 'cs_cdf'.
|
|
33
27
|
var qaBand = 'cs';
|
|
@@ -42,16 +36,23 @@ function maskLowQA(image) {
|
|
|
42
36
|
return image.updateMask(mask);
|
|
43
37
|
}
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
39
|
+
// Generate a collection of monthly median composites.
|
|
40
|
+
var composites = ee.ImageCollection(months.map(function(month) {
|
|
41
|
+
return linkedCollection.filter(ee.Filter.calendarRange(month, month, 'month'))
|
|
42
|
+
.map(maskLowQA)
|
|
43
|
+
.map(function(image) {
|
|
44
|
+
return image.toFloat();
|
|
45
|
+
})
|
|
46
|
+
.median()
|
|
47
|
+
.set('month', month);
|
|
48
|
+
}));
|
|
52
49
|
|
|
53
50
|
// Sentinel-2 visualization parameters.
|
|
54
51
|
var s2Viz = {bands: ['B4', 'B3', 'B2'], min: 0, max: 3000};
|
|
55
52
|
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
for (var month = 1; month <= 12; month++) {
|
|
54
|
+
var composite = composites.filter(ee.Filter.eq('month', month));
|
|
55
|
+
Map.addLayer(composite, s2Viz, 'composite ' + month);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
Map.centerObject(roi, 12);
|