From 6ced3b4ca5b3307687f007e0100a123e47bf9ccf Mon Sep 17 00:00:00 2001 From: Daniel Wiell Date: Thu, 24 Jun 2021 10:19:57 +0200 Subject: [PATCH] Updated version and rebuilt. --- javascript/build/browser.js | 5915 +++++++++-------------------------- javascript/build/main.js | 5915 +++++++++-------------------------- package.json | 2 +- 3 files changed, 2875 insertions(+), 8957 deletions(-) diff --git a/javascript/build/browser.js b/javascript/build/browser.js index 2a7ddb28d..fba85cc42 100644 --- a/javascript/build/browser.js +++ b/javascript/build/browser.js @@ -78,7 +78,19 @@ $jscomp.polyfillIsolated = function(target, polyfill, fromLang, toLang) { ownerObject = ownerObject[key]; } var property = split[split.length - 1], nativeImpl = $jscomp.IS_SYMBOL_NATIVE && "es6" === fromLang ? ownerObject[property] : null, impl = polyfill(nativeImpl); - null != impl && (isSimpleName ? $jscomp.defineProperty($jscomp.polyfills, property, {configurable:!0, writable:!0, value:impl}) : impl !== nativeImpl && (void 0 === $jscomp.propertyToPolyfillSymbol[property] && ($jscomp.propertyToPolyfillSymbol[property] = $jscomp.IS_SYMBOL_NATIVE ? $jscomp.global.Symbol(property) : $jscomp.POLYFILL_PREFIX + property), $jscomp.defineProperty(ownerObject, $jscomp.propertyToPolyfillSymbol[property], {configurable:!0, writable:!0, value:impl}))); + if (null != impl) { + if (isSimpleName) { + $jscomp.defineProperty($jscomp.polyfills, property, {configurable:!0, writable:!0, value:impl}); + } else { + if (impl !== nativeImpl) { + if (void 0 === $jscomp.propertyToPolyfillSymbol[property]) { + var BIN_ID = 1e9 * Math.random() >>> 0; + $jscomp.propertyToPolyfillSymbol[property] = $jscomp.IS_SYMBOL_NATIVE ? $jscomp.global.Symbol(property) : $jscomp.POLYFILL_PREFIX + BIN_ID + "$" + property; + } + $jscomp.defineProperty(ownerObject, $jscomp.propertyToPolyfillSymbol[property], {configurable:!0, writable:!0, value:impl}); + } + } + } }; $jscomp.initSymbol = function() { }; @@ -93,11 +105,11 @@ $jscomp.polyfill("Symbol", function(orig) { SymbolClass.prototype.toString = function() { return this.$jscomp$symbol$id_; }; - var counter = 0, symbolPolyfill = function(opt_description) { + var SYMBOL_PREFIX = "jscomp_symbol_" + (1e9 * Math.random() >>> 0) + "_", counter = 0, symbolPolyfill = function(opt_description) { if (this instanceof symbolPolyfill) { throw new TypeError("Symbol is not a constructor"); } - return new SymbolClass("jscomp_symbol_" + (opt_description || "") + "_" + counter++, opt_description); + return new SymbolClass(SYMBOL_PREFIX + (opt_description || "") + "_" + counter++, opt_description); }; return symbolPolyfill; }, "es6", "es3"); @@ -230,6 +242,235 @@ $jscomp.polyfill("Reflect.setPrototypeOf", function(orig) { } return null; }, "es6", "es5"); +$jscomp.checkEs6ConformanceViaProxy = function() { + try { + var proxied = {}, proxy = Object.create(new $jscomp.global.Proxy(proxied, {get:function(target, key, receiver) { + return target == proxied && "q" == key && receiver == proxy; + }})); + return !0 === proxy.q; + } catch (err) { + return !1; + } +}; +$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS = !1; +$jscomp.ES6_CONFORMANCE = $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS && $jscomp.checkEs6ConformanceViaProxy(); +$jscomp.owns = function(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +}; +$jscomp.polyfill("WeakMap", function(NativeWeakMap) { + function isConformant() { + if (!NativeWeakMap || !Object.seal) { + return !1; + } + try { + var x = Object.seal({}), y = Object.seal({}), map = new NativeWeakMap([[x, 2], [y, 3]]); + if (2 != map.get(x) || 3 != map.get(y)) { + return !1; + } + map.delete(x); + map.set(y, 4); + return !map.has(x) && 4 == map.get(y); + } catch (err) { + return !1; + } + } + function WeakMapMembership() { + } + function isValidKey(key) { + var type = typeof key; + return "object" === type && null !== key || "function" === type; + } + function insert(target) { + if (!$jscomp.owns(target, prop)) { + var obj = new WeakMapMembership; + $jscomp.defineProperty(target, prop, {value:obj}); + } + } + function patch(name) { + if (!$jscomp.ISOLATE_POLYFILLS) { + var prev = Object[name]; + prev && (Object[name] = function(target) { + if (target instanceof WeakMapMembership) { + return target; + } + Object.isExtensible(target) && insert(target); + return prev(target); + }); + } + } + if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { + if (NativeWeakMap && $jscomp.ES6_CONFORMANCE) { + return NativeWeakMap; + } + } else { + if (isConformant()) { + return NativeWeakMap; + } + } + var prop = "$jscomp_hidden_" + Math.random(); + patch("freeze"); + patch("preventExtensions"); + patch("seal"); + var index = 0, PolyfillWeakMap = function(opt_iterable) { + this.id_ = (index += Math.random() + 1).toString(); + if (opt_iterable) { + for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { + var item = entry.value; + this.set(item[0], item[1]); + } + } + }; + PolyfillWeakMap.prototype.set = function(key, value) { + if (!isValidKey(key)) { + throw Error("Invalid WeakMap key"); + } + insert(key); + if (!$jscomp.owns(key, prop)) { + throw Error("WeakMap key fail: " + key); + } + key[prop][this.id_] = value; + return this; + }; + PolyfillWeakMap.prototype.get = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) ? key[prop][this.id_] : void 0; + }; + PolyfillWeakMap.prototype.has = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_); + }; + PolyfillWeakMap.prototype.delete = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_) ? delete key[prop][this.id_] : !1; + }; + return PolyfillWeakMap; +}, "es6", "es3"); +$jscomp.MapEntry = function() { +}; +$jscomp.polyfill("Map", function(NativeMap) { + function isConformant() { + if ($jscomp.ASSUME_NO_NATIVE_MAP || !NativeMap || "function" != typeof NativeMap || !NativeMap.prototype.entries || "function" != typeof Object.seal) { + return !1; + } + try { + var key = Object.seal({x:4}), map = new NativeMap($jscomp.makeIterator([[key, "s"]])); + if ("s" != map.get(key) || 1 != map.size || map.get({x:4}) || map.set({x:4}, "t") != map || 2 != map.size) { + return !1; + } + var iter = map.entries(), item = iter.next(); + if (item.done || item.value[0] != key || "s" != item.value[1]) { + return !1; + } + item = iter.next(); + return item.done || 4 != item.value[0].x || "t" != item.value[1] || !iter.next().done ? !1 : !0; + } catch (err) { + return !1; + } + } + if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { + if (NativeMap && $jscomp.ES6_CONFORMANCE) { + return NativeMap; + } + } else { + if (isConformant()) { + return NativeMap; + } + } + var idMap = new WeakMap, PolyfillMap = function(opt_iterable) { + this.data_ = {}; + this.head_ = createHead(); + this.size = 0; + if (opt_iterable) { + for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { + var item = entry.value; + this.set(item[0], item[1]); + } + } + }; + PolyfillMap.prototype.set = function(key, value) { + key = 0 === key ? 0 : key; + var r = maybeGetEntry(this, key); + r.list || (r.list = this.data_[r.id] = []); + r.entry ? r.entry.value = value : (r.entry = {next:this.head_, previous:this.head_.previous, head:this.head_, key:key, value:value, }, r.list.push(r.entry), this.head_.previous.next = r.entry, this.head_.previous = r.entry, this.size++); + return this; + }; + PolyfillMap.prototype.delete = function(key) { + var r = maybeGetEntry(this, key); + return r.entry && r.list ? (r.list.splice(r.index, 1), r.list.length || delete this.data_[r.id], r.entry.previous.next = r.entry.next, r.entry.next.previous = r.entry.previous, r.entry.head = null, this.size--, !0) : !1; + }; + PolyfillMap.prototype.clear = function() { + this.data_ = {}; + this.head_ = this.head_.previous = createHead(); + this.size = 0; + }; + PolyfillMap.prototype.has = function(key) { + return !!maybeGetEntry(this, key).entry; + }; + PolyfillMap.prototype.get = function(key) { + var entry = maybeGetEntry(this, key).entry; + return entry && entry.value; + }; + PolyfillMap.prototype.entries = function() { + return makeIterator(this, function(entry) { + return [entry.key, entry.value]; + }); + }; + PolyfillMap.prototype.keys = function() { + return makeIterator(this, function(entry) { + return entry.key; + }); + }; + PolyfillMap.prototype.values = function() { + return makeIterator(this, function(entry) { + return entry.value; + }); + }; + PolyfillMap.prototype.forEach = function(callback, opt_thisArg) { + for (var iter = this.entries(), item; !(item = iter.next()).done;) { + var entry = item.value; + callback.call(opt_thisArg, entry[1], entry[0], this); + } + }; + PolyfillMap.prototype[Symbol.iterator] = PolyfillMap.prototype.entries; + var maybeGetEntry = function(map, key) { + var id = getId(key), list = map.data_[id]; + if (list && $jscomp.owns(map.data_, id)) { + for (var index = 0; index < list.length; index++) { + var entry = list[index]; + if (key !== key && entry.key !== entry.key || key === entry.key) { + return {id:id, list:list, index:index, entry:entry}; + } + } + } + return {id:id, list:list, index:-1, entry:void 0}; + }, makeIterator = function(map, func) { + var entry = map.head_; + return $jscomp.iteratorPrototype(function() { + if (entry) { + for (; entry.head != map.head_;) { + entry = entry.previous; + } + for (; entry.next != entry.head;) { + return entry = entry.next, {done:!1, value:func(entry)}; + } + entry = null; + } + return {done:!0, value:void 0}; + }); + }, createHead = function() { + var head = {}; + return head.previous = head.next = head.head = head; + }, mapIndex = 0, getId = function(obj) { + var type = obj && typeof obj; + if ("object" == type || "function" == type) { + if (!idMap.has(obj)) { + var id = "" + ++mapIndex; + idMap.set(obj, id); + return id; + } + return idMap.get(obj); + } + return "p_" + obj; + }; + return PolyfillMap; +}, "es6", "es3"); $jscomp.findInternal = function(array, callback, thisArg) { array instanceof String && (array = String(array)); for (var len = array.length, i = 0; i < len; i++) { @@ -294,23 +535,68 @@ $jscomp.polyfill("String.prototype.repeat", function(orig) { return result; }; }, "es6", "es3"); -$jscomp.polyfill("Object.setPrototypeOf", function(orig) { - return orig || $jscomp.setPrototypeOf; -}, "es6", "es5"); -$jscomp.owns = function(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; -$jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(target, var_args) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - if (source) { - for (var key in source) { - $jscomp.owns(source, key) && (target[key] = source[key]); - } +$jscomp.iteratorFromArray = function(array, transform) { + array instanceof String && (array += ""); + var i = 0, done = !1, iter = {next:function() { + if (!done && i < array.length) { + var index = i++; + return {value:transform(index, array[index]), done:!1}; } - } - return target; -}; + done = !0; + return {done:!0, value:void 0}; + }}; + iter[Symbol.iterator] = function() { + return iter; + }; + return iter; +}; +$jscomp.polyfill("Array.prototype.keys", function(orig) { + return orig ? orig : function() { + return $jscomp.iteratorFromArray(this, function(i) { + return i; + }); + }; +}, "es6", "es3"); +$jscomp.polyfill("Array.from", function(orig) { + return orig ? orig : function(arrayLike, opt_mapFn, opt_thisArg) { + opt_mapFn = null != opt_mapFn ? opt_mapFn : function(x) { + return x; + }; + var result = [], iteratorFunction = "undefined" != typeof Symbol && Symbol.iterator && arrayLike[Symbol.iterator]; + if ("function" == typeof iteratorFunction) { + arrayLike = iteratorFunction.call(arrayLike); + for (var next, k = 0; !(next = arrayLike.next()).done;) { + result.push(opt_mapFn.call(opt_thisArg, next.value, k++)); + } + } else { + for (var len = arrayLike.length, i = 0; i < len; i++) { + result.push(opt_mapFn.call(opt_thisArg, arrayLike[i], i)); + } + } + return result; + }; +}, "es6", "es3"); +$jscomp.polyfill("Array.prototype.values", function(orig) { + return orig ? orig : function() { + return $jscomp.iteratorFromArray(this, function(k, v) { + return v; + }); + }; +}, "es8", "es3"); +$jscomp.polyfill("Object.setPrototypeOf", function(orig) { + return orig || $jscomp.setPrototypeOf; +}, "es6", "es5"); +$jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(target, var_args) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + if (source) { + for (var key in source) { + $jscomp.owns(source, key) && (target[key] = source[key]); + } + } + } + return target; +}; $jscomp.polyfill("Object.assign", function(orig) { return orig || $jscomp.assign; }, "es6", "es3"); @@ -544,28 +830,6 @@ $jscomp.polyfill("Promise", function(NativePromise) { }; return PolyfillPromise; }, "es6", "es3"); -$jscomp.iteratorFromArray = function(array, transform) { - array instanceof String && (array += ""); - var i = 0, done = !1, iter = {next:function() { - if (!done && i < array.length) { - var index = i++; - return {value:transform(index, array[index]), done:!1}; - } - done = !0; - return {done:!0, value:void 0}; - }}; - iter[Symbol.iterator] = function() { - return iter; - }; - return iter; -}; -$jscomp.polyfill("Array.prototype.keys", function(orig) { - return orig ? orig : function() { - return $jscomp.iteratorFromArray(this, function(i) { - return i; - }); - }; -}, "es6", "es3"); $jscomp.polyfill("Object.entries", function(orig) { return orig ? orig : function(obj) { var result = [], key; @@ -599,13 +863,6 @@ $jscomp.polyfill("String.prototype.includes", function(orig) { return -1 !== $jscomp.checkStringArgs(this, searchString, "includes").indexOf(searchString, opt_position || 0); }; }, "es6", "es3"); -$jscomp.polyfill("Array.prototype.values", function(orig) { - return orig ? orig : function() { - return $jscomp.iteratorFromArray(this, function(k, v) { - return v; - }); - }; -}, "es8", "es3"); $jscomp.polyfill("String.prototype.trimLeft", function(orig) { function polyfill() { return this.replace(/^[\s\xa0]+/, ""); @@ -619,300 +876,74 @@ $jscomp.polyfill("Array.prototype.entries", function(orig) { }); }; }, "es6", "es3"); -$jscomp.checkEs6ConformanceViaProxy = function() { - try { - var proxied = {}, proxy = Object.create(new $jscomp.global.Proxy(proxied, {get:function(target, key, receiver) { - return target == proxied && "q" == key && receiver == proxy; - }})); - return !0 === proxy.q; - } catch (err) { - return !1; - } -}; -$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS = !1; -$jscomp.ES6_CONFORMANCE = $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS && $jscomp.checkEs6ConformanceViaProxy(); -$jscomp.polyfill("WeakMap", function(NativeWeakMap) { - function isConformant() { - if (!NativeWeakMap || !Object.seal) { - return !1; - } - try { - var x = Object.seal({}), y = Object.seal({}), map = new NativeWeakMap([[x, 2], [y, 3]]); - if (2 != map.get(x) || 3 != map.get(y)) { - return !1; - } - map.delete(x); - map.set(y, 4); - return !map.has(x) && 4 == map.get(y); - } catch (err) { - return !1; - } - } - function WeakMapMembership() { - } - function isValidKey(key) { - var type = typeof key; - return "object" === type && null !== key || "function" === type; - } - function insert(target) { - if (!$jscomp.owns(target, prop)) { - var obj = new WeakMapMembership; - $jscomp.defineProperty(target, prop, {value:obj}); - } - } - function patch(name) { - if (!$jscomp.ISOLATE_POLYFILLS) { - var prev = Object[name]; - prev && (Object[name] = function(target) { - if (target instanceof WeakMapMembership) { - return target; - } - Object.isExtensible(target) && insert(target); - return prev(target); - }); - } - } - if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeWeakMap && $jscomp.ES6_CONFORMANCE) { - return NativeWeakMap; - } - } else { - if (isConformant()) { - return NativeWeakMap; - } - } - var prop = "$jscomp_hidden_" + Math.random(); - patch("freeze"); - patch("preventExtensions"); - patch("seal"); - var index = 0, PolyfillWeakMap = function(opt_iterable) { - this.id_ = (index += Math.random() + 1).toString(); - if (opt_iterable) { - for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - var item = entry.value; - this.set(item[0], item[1]); - } - } - }; - PolyfillWeakMap.prototype.set = function(key, value) { - if (!isValidKey(key)) { - throw Error("Invalid WeakMap key"); - } - insert(key); - if (!$jscomp.owns(key, prop)) { - throw Error("WeakMap key fail: " + key); - } - key[prop][this.id_] = value; - return this; - }; - PolyfillWeakMap.prototype.get = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) ? key[prop][this.id_] : void 0; - }; - PolyfillWeakMap.prototype.has = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_); - }; - PolyfillWeakMap.prototype.delete = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_) ? delete key[prop][this.id_] : !1; - }; - return PolyfillWeakMap; -}, "es6", "es3"); -$jscomp.MapEntry = function() { -}; -$jscomp.polyfill("Map", function(NativeMap) { +$jscomp.polyfill("Set", function(NativeSet) { function isConformant() { - if ($jscomp.ASSUME_NO_NATIVE_MAP || !NativeMap || "function" != typeof NativeMap || !NativeMap.prototype.entries || "function" != typeof Object.seal) { + if ($jscomp.ASSUME_NO_NATIVE_SET || !NativeSet || "function" != typeof NativeSet || !NativeSet.prototype.entries || "function" != typeof Object.seal) { return !1; } try { - var key = Object.seal({x:4}), map = new NativeMap($jscomp.makeIterator([[key, "s"]])); - if ("s" != map.get(key) || 1 != map.size || map.get({x:4}) || map.set({x:4}, "t") != map || 2 != map.size) { + var value = Object.seal({x:4}), set = new NativeSet($jscomp.makeIterator([value])); + if (!set.has(value) || 1 != set.size || set.add(value) != set || 1 != set.size || set.add({x:4}) != set || 2 != set.size) { return !1; } - var iter = map.entries(), item = iter.next(); - if (item.done || item.value[0] != key || "s" != item.value[1]) { + var iter = set.entries(), item = iter.next(); + if (item.done || item.value[0] != value || item.value[1] != value) { return !1; } item = iter.next(); - return item.done || 4 != item.value[0].x || "t" != item.value[1] || !iter.next().done ? !1 : !0; + return item.done || item.value[0] == value || 4 != item.value[0].x || item.value[1] != item.value[0] ? !1 : iter.next().done; } catch (err) { return !1; } } if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeMap && $jscomp.ES6_CONFORMANCE) { - return NativeMap; + if (NativeSet && $jscomp.ES6_CONFORMANCE) { + return NativeSet; } } else { if (isConformant()) { - return NativeMap; + return NativeSet; } } - var idMap = new WeakMap, PolyfillMap = function(opt_iterable) { - this.data_ = {}; - this.head_ = createHead(); - this.size = 0; + var PolyfillSet = function(opt_iterable) { + this.map_ = new Map; if (opt_iterable) { for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - var item = entry.value; - this.set(item[0], item[1]); + this.add(entry.value); } } + this.size = this.map_.size; }; - PolyfillMap.prototype.set = function(key, value) { - key = 0 === key ? 0 : key; - var r = maybeGetEntry(this, key); - r.list || (r.list = this.data_[r.id] = []); - r.entry ? r.entry.value = value : (r.entry = {next:this.head_, previous:this.head_.previous, head:this.head_, key:key, value:value, }, r.list.push(r.entry), this.head_.previous.next = r.entry, this.head_.previous = r.entry, this.size++); + PolyfillSet.prototype.add = function(value) { + value = 0 === value ? 0 : value; + this.map_.set(value, value); + this.size = this.map_.size; return this; }; - PolyfillMap.prototype.delete = function(key) { - var r = maybeGetEntry(this, key); - return r.entry && r.list ? (r.list.splice(r.index, 1), r.list.length || delete this.data_[r.id], r.entry.previous.next = r.entry.next, r.entry.next.previous = r.entry.previous, r.entry.head = null, this.size--, !0) : !1; + PolyfillSet.prototype.delete = function(value) { + var result = this.map_.delete(value); + this.size = this.map_.size; + return result; }; - PolyfillMap.prototype.clear = function() { - this.data_ = {}; - this.head_ = this.head_.previous = createHead(); + PolyfillSet.prototype.clear = function() { + this.map_.clear(); this.size = 0; }; - PolyfillMap.prototype.has = function(key) { - return !!maybeGetEntry(this, key).entry; - }; - PolyfillMap.prototype.get = function(key) { - var entry = maybeGetEntry(this, key).entry; - return entry && entry.value; + PolyfillSet.prototype.has = function(value) { + return this.map_.has(value); }; - PolyfillMap.prototype.entries = function() { - return makeIterator(this, function(entry) { - return [entry.key, entry.value]; - }); + PolyfillSet.prototype.entries = function() { + return this.map_.entries(); }; - PolyfillMap.prototype.keys = function() { - return makeIterator(this, function(entry) { - return entry.key; - }); + PolyfillSet.prototype.values = function() { + return this.map_.values(); }; - PolyfillMap.prototype.values = function() { - return makeIterator(this, function(entry) { - return entry.value; - }); - }; - PolyfillMap.prototype.forEach = function(callback, opt_thisArg) { - for (var iter = this.entries(), item; !(item = iter.next()).done;) { - var entry = item.value; - callback.call(opt_thisArg, entry[1], entry[0], this); - } - }; - PolyfillMap.prototype[Symbol.iterator] = PolyfillMap.prototype.entries; - var maybeGetEntry = function(map, key) { - var id = getId(key), list = map.data_[id]; - if (list && $jscomp.owns(map.data_, id)) { - for (var index = 0; index < list.length; index++) { - var entry = list[index]; - if (key !== key && entry.key !== entry.key || key === entry.key) { - return {id:id, list:list, index:index, entry:entry}; - } - } - } - return {id:id, list:list, index:-1, entry:void 0}; - }, makeIterator = function(map, func) { - var entry = map.head_; - return $jscomp.iteratorPrototype(function() { - if (entry) { - for (; entry.head != map.head_;) { - entry = entry.previous; - } - for (; entry.next != entry.head;) { - return entry = entry.next, {done:!1, value:func(entry)}; - } - entry = null; - } - return {done:!0, value:void 0}; - }); - }, createHead = function() { - var head = {}; - return head.previous = head.next = head.head = head; - }, mapIndex = 0, getId = function(obj) { - var type = obj && typeof obj; - if ("object" == type || "function" == type) { - if (!idMap.has(obj)) { - var id = "" + ++mapIndex; - idMap.set(obj, id); - return id; - } - return idMap.get(obj); - } - return "p_" + obj; - }; - return PolyfillMap; -}, "es6", "es3"); -$jscomp.polyfill("Set", function(NativeSet) { - function isConformant() { - if ($jscomp.ASSUME_NO_NATIVE_SET || !NativeSet || "function" != typeof NativeSet || !NativeSet.prototype.entries || "function" != typeof Object.seal) { - return !1; - } - try { - var value = Object.seal({x:4}), set = new NativeSet($jscomp.makeIterator([value])); - if (!set.has(value) || 1 != set.size || set.add(value) != set || 1 != set.size || set.add({x:4}) != set || 2 != set.size) { - return !1; - } - var iter = set.entries(), item = iter.next(); - if (item.done || item.value[0] != value || item.value[1] != value) { - return !1; - } - item = iter.next(); - return item.done || item.value[0] == value || 4 != item.value[0].x || item.value[1] != item.value[0] ? !1 : iter.next().done; - } catch (err) { - return !1; - } - } - if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeSet && $jscomp.ES6_CONFORMANCE) { - return NativeSet; - } - } else { - if (isConformant()) { - return NativeSet; - } - } - var PolyfillSet = function(opt_iterable) { - this.map_ = new Map; - if (opt_iterable) { - for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - this.add(entry.value); - } - } - this.size = this.map_.size; - }; - PolyfillSet.prototype.add = function(value) { - value = 0 === value ? 0 : value; - this.map_.set(value, value); - this.size = this.map_.size; - return this; - }; - PolyfillSet.prototype.delete = function(value) { - var result = this.map_.delete(value); - this.size = this.map_.size; - return result; - }; - PolyfillSet.prototype.clear = function() { - this.map_.clear(); - this.size = 0; - }; - PolyfillSet.prototype.has = function(value) { - return this.map_.has(value); - }; - PolyfillSet.prototype.entries = function() { - return this.map_.entries(); - }; - PolyfillSet.prototype.values = function() { - return this.map_.values(); - }; - PolyfillSet.prototype.keys = PolyfillSet.prototype.values; - PolyfillSet.prototype[Symbol.iterator] = PolyfillSet.prototype.values; - PolyfillSet.prototype.forEach = function(callback, opt_thisArg) { - var set = this; - this.map_.forEach(function(value) { - return callback.call(opt_thisArg, value, value, set); + PolyfillSet.prototype.keys = PolyfillSet.prototype.values; + PolyfillSet.prototype[Symbol.iterator] = PolyfillSet.prototype.values; + PolyfillSet.prototype.forEach = function(callback, opt_thisArg) { + var set = this; + this.map_.forEach(function(value) { + return callback.call(opt_thisArg, value, value, set); }); }; return PolyfillSet; @@ -962,6 +993,9 @@ goog.define = function(name, defaultValue) { goog.FEATURESET_YEAR = 2012; goog.DEBUG = !0; goog.LOCALE = "en"; +goog.getLocale = function() { + return goog.LOCALE; +}; goog.TRUSTED_SITE = !0; goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG; goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1; @@ -975,17 +1009,9 @@ goog.constructNamespace_ = function(name, object, overwriteImplicit) { var namespace; goog.exportPath_(name, object, overwriteImplicit); }; -goog.getScriptNonce = function(opt_window) { - if (opt_window && opt_window != goog.global) { - return goog.getScriptNonce_(opt_window.document); - } - null === goog.cspNonce_ && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document)); - return goog.cspNonce_; -}; goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/; -goog.cspNonce_ = null; -goog.getScriptNonce_ = function(doc) { - var script = doc.querySelector && doc.querySelector("script[nonce]"); +goog.getScriptNonce_ = function(opt_window) { + var doc = (opt_window || goog.global).document, script = doc.querySelector && doc.querySelector("script[nonce]"); if (script) { var nonce = script.nonce || script.getAttribute("nonce"); if (nonce && goog.NONCE_PATTERN_.test(nonce)) { @@ -1097,6 +1123,7 @@ goog.TRANSPILE = "detect"; goog.ASSUME_ES_MODULES_TRANSPILED = !1; goog.TRANSPILE_TO_LANGUAGE = ""; goog.TRANSPILER = "transpile.js"; +goog.TRUSTED_TYPES_POLICY_NAME = "goog"; goog.hasBadLetScoping = null; goog.loadModule = function(moduleDef) { var previousState = goog.moduleLoaderState_; @@ -1209,6 +1236,12 @@ goog.cloneObject = function(obj) { if ("function" === typeof obj.clone) { return obj.clone(); } + if ("undefined" !== typeof Map && obj instanceof Map) { + return new Map(obj); + } + if ("undefined" !== typeof Set && obj instanceof Set) { + return new Set(obj); + } var clone = "array" == type ? [] : {}, key; for (key in obj) { clone[key] = goog.cloneObject(obj[key]); @@ -1348,7 +1381,6 @@ goog.defineClass.applyProperties_ = function(target, source) { key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); } }; -goog.TRUSTED_TYPES_POLICY_NAME = "goog"; goog.identity_ = function(s) { return s; }; @@ -1458,14 +1490,15 @@ goog.events.Event.preventDefault = function(e) { e.preventDefault(); }; goog.debug = {}; -function module$contents$goog$debug$Error_DebugError(opt_msg) { +function module$contents$goog$debug$Error_DebugError(msg, cause) { if (Error.captureStackTrace) { Error.captureStackTrace(this, module$contents$goog$debug$Error_DebugError); } else { var stack = Error().stack; stack && (this.stack = stack); } - opt_msg && (this.message = String(opt_msg)); + msg && (this.message = String(msg)); + cause && (this.cause = cause); this.reportErrorToServer = !0; } goog.inherits(module$contents$goog$debug$Error_DebugError, Error); @@ -1556,8 +1589,9 @@ goog.asserts.getType_ = function(value) { return value instanceof Function ? value.displayName || value.name || "unknown type name" : value instanceof Object ? value.constructor.displayName || value.constructor.name || Object.prototype.toString.call(value) : null === value ? "null" : typeof value; }; goog.debug.entryPointRegistry = {}; -goog.debug.EntryPointMonitor = function() { +goog.debug.entryPointRegistry.EntryPointMonitor = function() { }; +goog.debug.EntryPointMonitor = goog.debug.entryPointRegistry.EntryPointMonitor; goog.debug.entryPointRegistry.refList_ = []; goog.debug.entryPointRegistry.monitors_ = []; goog.debug.entryPointRegistry.monitorsMayExist_ = !1; @@ -1664,7 +1698,7 @@ var module$contents$goog$array_map = goog.NATIVE_ARRAY_PROTOTYPES && (module$con return res; }; goog.array.map = module$contents$goog$array_map; -var module$contents$goog$array_reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(arr, f, val, opt_obj) { +goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(arr, f, val, opt_obj) { goog.asserts.assert(null != arr.length); opt_obj && (f = goog.bind(f, opt_obj)); return Array.prototype.reduce.call(arr, f, val); @@ -1675,7 +1709,6 @@ var module$contents$goog$array_reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$ }); return rval; }; -goog.array.reduce = module$contents$goog$array_reduce; goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function(arr, f, val, opt_obj) { goog.asserts.assert(null != arr.length); goog.asserts.assert(null != f); @@ -1852,7 +1885,7 @@ goog.array.slice = module$contents$goog$array_slice; function module$contents$goog$array_removeDuplicates(arr, opt_rv, opt_hashFn) { for (var returnArray = opt_rv || arr, defaultHashFn = function(item) { return goog.isObject(item) ? "o" + goog.getUid(item) : (typeof item).charAt(0) + item; - }, hashFn = opt_hashFn || defaultHashFn, seen = {}, cursorInsert = 0, cursorRead = 0; cursorRead < arr.length;) { + }, hashFn = opt_hashFn || defaultHashFn, cursorInsert = 0, cursorRead = 0, seen = {}; cursorRead < arr.length;) { var current = arr[cursorRead++], key = hashFn(current); Object.prototype.hasOwnProperty.call(seen, key) || (seen[key] = !0, returnArray[cursorInsert++] = current); } @@ -1868,8 +1901,8 @@ goog.array.binarySelect = function module$contents$goog$array_binarySelect(arr, }; function module$contents$goog$array_binarySearch_(arr, compareFn, isEvaluator, opt_target, opt_selfObj) { for (var left = 0, right = arr.length, found; left < right;) { - var middle = left + (right - left >>> 1); - var compareResult = isEvaluator ? compareFn.call(opt_selfObj, arr[middle], middle, arr) : compareFn(opt_target, arr[middle]); + var middle = left + (right - left >>> 1), compareResult = void 0; + compareResult = isEvaluator ? compareFn.call(opt_selfObj, arr[middle], middle, arr) : compareFn(opt_target, arr[middle]); 0 < compareResult ? left = middle + 1 : (right = middle, found = !compareResult); } return found ? left : -left - 1; @@ -1886,8 +1919,8 @@ goog.array.stableSort = function module$contents$goog$array_stableSort(arr, opt_ module$contents$goog$array_sort(compArr, function stableCompareFn(obj1, obj2) { return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index; }); - for (i = 0; i < arr.length; i++) { - arr[i] = compArr[i].value; + for (var i$21 = 0; i$21 < arr.length; i$21++) { + arr[i$21] = compArr[i$21].value; } }; function module$contents$goog$array_sortByKey(arr, keyFn, opt_compareFn) { @@ -1959,6 +1992,17 @@ goog.array.bucket = function module$contents$goog$array_bucket(array, sorter, op } return buckets; }; +goog.array.bucketToMap = function module$contents$goog$array_bucketToMap(array, sorter) { + for (var buckets = new Map, i = 0; i < array.length; i++) { + var value = array[i], key = sorter(value, i, array); + if (void 0 !== key) { + var bucket = buckets.get(key); + bucket || (bucket = [], buckets.set(key, bucket)); + bucket.push(value); + } + } + return buckets; +}; goog.array.toObject = function module$contents$goog$array_toObject(arr, keyFunc, opt_obj) { var ret = {}; module$contents$goog$array_forEach(arr, function(element, index) { @@ -1966,6 +2010,13 @@ goog.array.toObject = function module$contents$goog$array_toObject(arr, keyFunc, }); return ret; }; +goog.array.toMap = function module$contents$goog$array_toMap(arr, keyFunc) { + for (var map = new Map, i = 0; i < arr.length; i++) { + var element = arr[i]; + map.set(keyFunc(element, i, arr), element); + } + return map; +}; function module$contents$goog$array_range(startOrEnd, opt_end, opt_step) { var array = [], start = 0, end = startOrEnd, step = opt_step || 1; void 0 !== opt_end && (start = startOrEnd, end = opt_end); @@ -1977,8 +2028,8 @@ function module$contents$goog$array_range(startOrEnd, opt_end, opt_step) { array.push(i); } } else { - for (i = start; i > end; i += step) { - array.push(i); + for (var i$22 = start; i$22 > end; i$22 += step) { + array.push(i$22); } } return array; @@ -2025,9 +2076,9 @@ goog.array.zip = function module$contents$goog$array_zip(var_args) { for (var result = [], minLen = arguments[0].length, i = 1; i < arguments.length; i++) { arguments[i].length < minLen && (minLen = arguments[i].length); } - for (i = 0; i < minLen; i++) { + for (var i$23 = 0; i$23 < minLen; i$23++) { for (var value = [], j = 0; j < arguments.length; j++) { - value.push(arguments[j][i]); + value.push(arguments[j][i$23]); } result.push(value); } @@ -2178,200 +2229,136 @@ goog.labs.userAgent.util.extractVersionTuples = function(userAgent) { return data; }; goog.object = {}; -goog.object.forEach = function(obj, f, opt_obj) { +function module$contents$goog$object_forEach(obj, f, opt_obj) { for (var key in obj) { f.call(opt_obj, obj[key], key, obj); } -}; -goog.object.filter = function(obj, f, opt_obj) { +} +function module$contents$goog$object_filter(obj, f, opt_obj) { var res = {}, key; for (key in obj) { f.call(opt_obj, obj[key], key, obj) && (res[key] = obj[key]); } return res; -}; -goog.object.map = function(obj, f, opt_obj) { +} +function module$contents$goog$object_map(obj, f, opt_obj) { var res = {}, key; for (key in obj) { res[key] = f.call(opt_obj, obj[key], key, obj); } return res; -}; -goog.object.some = function(obj, f, opt_obj) { +} +function module$contents$goog$object_some(obj, f, opt_obj) { for (var key in obj) { if (f.call(opt_obj, obj[key], key, obj)) { return !0; } } return !1; -}; -goog.object.every = function(obj, f, opt_obj) { - for (var key in obj) { - if (!f.call(opt_obj, obj[key], key, obj)) { - return !1; - } - } - return !0; -}; -goog.object.getCount = function(obj) { +} +function module$contents$goog$object_getCount(obj) { var rv = 0, key; for (key in obj) { rv++; } return rv; -}; -goog.object.getAnyKey = function(obj) { - for (var key in obj) { - return key; - } -}; -goog.object.getAnyValue = function(obj) { - for (var key in obj) { - return obj[key]; - } -}; -goog.object.contains = function(obj, val) { - return goog.object.containsValue(obj, val); -}; -goog.object.getValues = function(obj) { +} +function module$contents$goog$object_contains(obj, val) { + return module$contents$goog$object_containsValue(obj, val); +} +function module$contents$goog$object_getValues(obj) { var res = [], i = 0, key; for (key in obj) { res[i++] = obj[key]; } return res; -}; -goog.object.getKeys = function(obj) { +} +function module$contents$goog$object_getKeys(obj) { var res = [], i = 0, key; for (key in obj) { res[i++] = key; } return res; -}; -goog.object.getValueByKeys = function(obj, var_args) { - for (var isArrayLike = goog.isArrayLike(var_args), keys = isArrayLike ? var_args : arguments, i = isArrayLike ? 0 : 1; i < keys.length; i++) { - if (null == obj) { - return; - } - obj = obj[keys[i]]; - } - return obj; -}; -goog.object.containsKey = function(obj, key) { +} +function module$contents$goog$object_containsKey(obj, key) { return null !== obj && key in obj; -}; -goog.object.containsValue = function(obj, val) { +} +function module$contents$goog$object_containsValue(obj, val) { for (var key in obj) { if (obj[key] == val) { return !0; } } return !1; -}; -goog.object.findKey = function(obj, f, opt_this) { +} +function module$contents$goog$object_findKey(obj, f, thisObj) { for (var key in obj) { - if (f.call(opt_this, obj[key], key, obj)) { + if (f.call(thisObj, obj[key], key, obj)) { return key; } } -}; -goog.object.findValue = function(obj, f, opt_this) { - var key = goog.object.findKey(obj, f, opt_this); - return key && obj[key]; -}; -goog.object.isEmpty = function(obj) { +} +function module$contents$goog$object_isEmpty(obj) { for (var key in obj) { return !1; } return !0; -}; -goog.object.clear = function(obj) { +} +function module$contents$goog$object_clear(obj) { for (var i in obj) { delete obj[i]; } -}; -goog.object.remove = function(obj, key) { +} +function module$contents$goog$object_remove(obj, key) { var rv; (rv = key in obj) && delete obj[key]; return rv; -}; -goog.object.add = function(obj, key, val) { - if (null !== obj && key in obj) { - throw Error('The object already contains the key "' + key + '"'); - } - goog.object.set(obj, key, val); -}; -goog.object.get = function(obj, key, opt_val) { - return null !== obj && key in obj ? obj[key] : opt_val; -}; -goog.object.set = function(obj, key, value) { +} +function module$contents$goog$object_set(obj, key, value) { obj[key] = value; -}; -goog.object.setIfUndefined = function(obj, key, value) { - return key in obj ? obj[key] : obj[key] = value; -}; -goog.object.setWithReturnValueIfNotSet = function(obj, key, f) { - if (key in obj) { - return obj[key]; - } - var val = f(); - return obj[key] = val; -}; -goog.object.equals = function(a, b) { - for (var k in a) { - if (!(k in b) || a[k] !== b[k]) { - return !1; - } - } - for (var k$19 in b) { - if (!(k$19 in a)) { - return !1; - } - } - return !0; -}; -goog.object.clone = function(obj) { +} +function module$contents$goog$object_clone(obj) { var res = {}, key; for (key in obj) { res[key] = obj[key]; } return res; -}; -goog.object.unsafeClone = function(obj) { +} +function module$contents$goog$object_unsafeClone(obj) { if (!obj || "object" !== typeof obj) { return obj; } if ("function" === typeof obj.clone) { return obj.clone(); } + if ("undefined" !== typeof Map && obj instanceof Map) { + return new Map(obj); + } + if ("undefined" !== typeof Set && obj instanceof Set) { + return new Set(obj); + } var clone = Array.isArray(obj) ? [] : "function" !== typeof ArrayBuffer || "function" !== typeof ArrayBuffer.isView || !ArrayBuffer.isView(obj) || obj instanceof DataView ? {} : new obj.constructor(obj.length), key; for (key in obj) { - clone[key] = goog.object.unsafeClone(obj[key]); + clone[key] = module$contents$goog$object_unsafeClone(obj[key]); } return clone; -}; -goog.object.transpose = function(obj) { - var transposed = {}, key; - for (key in obj) { - transposed[obj[key]] = key; - } - return transposed; -}; -goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); -goog.object.extend = function(target, var_args) { +} +var module$contents$goog$object_PROTOTYPE_FIELDS = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); +function module$contents$goog$object_extend(target, var_args) { for (var key, source, i = 1; i < arguments.length; i++) { source = arguments[i]; for (key in source) { target[key] = source[key]; } - for (var j = 0; j < goog.object.PROTOTYPE_FIELDS_.length; j++) { - key = goog.object.PROTOTYPE_FIELDS_[j], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + for (var j = 0; j < module$contents$goog$object_PROTOTYPE_FIELDS.length; j++) { + key = module$contents$goog$object_PROTOTYPE_FIELDS[j], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); } } -}; -goog.object.create = function(var_args) { +} +function module$contents$goog$object_create(var_args) { var argLength = arguments.length; if (1 == argLength && Array.isArray(arguments[0])) { - return goog.object.create.apply(null, arguments[0]); + return module$contents$goog$object_create.apply(null, arguments[0]); } if (argLength % 2) { throw Error("Uneven number of arguments"); @@ -2380,45 +2367,135 @@ goog.object.create = function(var_args) { rv[arguments[i]] = arguments[i + 1]; } return rv; -}; -goog.object.createSet = function(var_args) { +} +function module$contents$goog$object_createSet(var_args) { var argLength = arguments.length; if (1 == argLength && Array.isArray(arguments[0])) { - return goog.object.createSet.apply(null, arguments[0]); + return module$contents$goog$object_createSet.apply(null, arguments[0]); } for (var rv = {}, i = 0; i < argLength; i++) { rv[arguments[i]] = !0; } return rv; +} +goog.object.add = function module$contents$goog$object_add(obj, key, val) { + if (null !== obj && key in obj) { + throw Error('The object already contains the key "' + key + '"'); + } + module$contents$goog$object_set(obj, key, val); }; -goog.object.createImmutableView = function(obj) { +goog.object.clear = module$contents$goog$object_clear; +goog.object.clone = module$contents$goog$object_clone; +goog.object.contains = module$contents$goog$object_contains; +goog.object.containsKey = module$contents$goog$object_containsKey; +goog.object.containsValue = module$contents$goog$object_containsValue; +goog.object.create = module$contents$goog$object_create; +goog.object.createImmutableView = function module$contents$goog$object_createImmutableView(obj) { var result = obj; Object.isFrozen && !Object.isFrozen(obj) && (result = Object.create(obj), Object.freeze(result)); return result; }; -goog.object.isImmutableView = function(obj) { - return !!Object.isFrozen && Object.isFrozen(obj); +goog.object.createSet = module$contents$goog$object_createSet; +goog.object.equals = function module$contents$goog$object_equals(a, b) { + for (var k in a) { + if (!(k in b) || a[k] !== b[k]) { + return !1; + } + } + for (var k$24 in b) { + if (!(k$24 in a)) { + return !1; + } + } + return !0; +}; +goog.object.every = function module$contents$goog$object_every(obj, f, opt_obj) { + for (var key in obj) { + if (!f.call(opt_obj, obj[key], key, obj)) { + return !1; + } + } + return !0; }; -goog.object.getAllPropertyNames = function(obj, opt_includeObjectPrototype, opt_includeFunctionPrototype) { +goog.object.extend = module$contents$goog$object_extend; +goog.object.filter = module$contents$goog$object_filter; +goog.object.findKey = module$contents$goog$object_findKey; +goog.object.findValue = function module$contents$goog$object_findValue(obj, f, thisObj) { + var key = module$contents$goog$object_findKey(obj, f, thisObj); + return key && obj[key]; +}; +goog.object.forEach = module$contents$goog$object_forEach; +goog.object.get = function module$contents$goog$object_get(obj, key, val) { + return null !== obj && key in obj ? obj[key] : val; +}; +goog.object.getAllPropertyNames = function module$contents$goog$object_getAllPropertyNames(obj, includeObjectPrototype, includeFunctionPrototype) { if (!obj) { return []; } if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) { - return goog.object.getKeys(obj); + return module$contents$goog$object_getKeys(obj); } - for (var visitedSet = {}, proto = obj; proto && (proto !== Object.prototype || opt_includeObjectPrototype) && (proto !== Function.prototype || opt_includeFunctionPrototype);) { + for (var visitedSet = {}, proto = obj; proto && (proto !== Object.prototype || includeObjectPrototype) && (proto !== Function.prototype || includeFunctionPrototype);) { for (var names = Object.getOwnPropertyNames(proto), i = 0; i < names.length; i++) { visitedSet[names[i]] = !0; } proto = Object.getPrototypeOf(proto); } - return goog.object.getKeys(visitedSet); + return module$contents$goog$object_getKeys(visitedSet); +}; +goog.object.getAnyKey = function module$contents$goog$object_getAnyKey(obj) { + for (var key in obj) { + return key; + } +}; +goog.object.getAnyValue = function module$contents$goog$object_getAnyValue(obj) { + for (var key in obj) { + return obj[key]; + } }; -goog.object.getSuperClass = function(constructor) { +goog.object.getCount = module$contents$goog$object_getCount; +goog.object.getKeys = module$contents$goog$object_getKeys; +goog.object.getSuperClass = function module$contents$goog$object_getSuperClass(constructor) { var proto = Object.getPrototypeOf(constructor.prototype); return proto && proto.constructor; }; -goog.labs.userAgent.browser = {}; +goog.object.getValueByKeys = function module$contents$goog$object_getValueByKeys(obj, var_args) { + for (var isArrayLike = goog.isArrayLike(var_args), keys = isArrayLike ? var_args : arguments, i = isArrayLike ? 0 : 1; i < keys.length; i++) { + if (null == obj) { + return; + } + obj = obj[keys[i]]; + } + return obj; +}; +goog.object.getValues = module$contents$goog$object_getValues; +goog.object.isEmpty = module$contents$goog$object_isEmpty; +goog.object.isImmutableView = function module$contents$goog$object_isImmutableView(obj) { + return !!Object.isFrozen && Object.isFrozen(obj); +}; +goog.object.map = module$contents$goog$object_map; +goog.object.remove = module$contents$goog$object_remove; +goog.object.set = module$contents$goog$object_set; +goog.object.setIfUndefined = function module$contents$goog$object_setIfUndefined(obj, key, value) { + return key in obj ? obj[key] : obj[key] = value; +}; +goog.object.setWithReturnValueIfNotSet = function module$contents$goog$object_setWithReturnValueIfNotSet(obj, key, f) { + if (key in obj) { + return obj[key]; + } + var val = f(); + return obj[key] = val; +}; +goog.object.some = module$contents$goog$object_some; +goog.object.transpose = function module$contents$goog$object_transpose(obj) { + var transposed = {}, key; + for (key in obj) { + transposed[obj[key]] = key; + } + return transposed; +}; +goog.object.unsafeClone = module$contents$goog$object_unsafeClone; +goog.labs.userAgent.browser = {}; goog.labs.userAgent.browser.matchOpera_ = function() { return goog.labs.userAgent.util.matchUserAgent("Opera"); }; @@ -2479,7 +2556,7 @@ goog.labs.userAgent.browser.getVersion = function() { module$contents$goog$array_forEach(versionTuples, function(tuple) { versionMap[tuple[0]] = tuple[1]; }); - var versionMapHasKey = goog.partial(goog.object.containsKey, versionMap); + var versionMapHasKey = goog.partial(module$contents$goog$object_containsKey, versionMap); if (goog.labs.userAgent.browser.isOpera()) { return lookUpValueWithKeys(["Version", "Opera"]); } @@ -3037,7 +3114,7 @@ goog.fs.blob.getBlob = function(var_args) { } return bb.getBlob(); } - return goog.fs.blob.getBlobWithProperties(module$contents$goog$array_toArray(arguments)); + return goog.fs.blob.getBlobWithProperties(Array.prototype.slice.call(arguments)); }; goog.fs.blob.getBlobWithProperties = function(parts, opt_type, opt_endings) { var BlobBuilder = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder; @@ -3544,7 +3621,7 @@ goog.html.SafeStyle.concat = function(var_args) { var style = "", addArgument = function(argument) { Array.isArray(argument) ? module$contents$goog$array_forEach(argument, addArgument) : style += goog.html.SafeStyle.unwrap(argument); }; - module$contents$goog$array_forEach(arguments, addArgument); + Array.prototype.forEach.call(arguments, addArgument); return style ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : goog.html.SafeStyle.EMPTY; }; var module$contents$goog$html$SafeStyleSheet_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeStyleSheet_SafeStyleSheet = function(value, token) { @@ -3572,7 +3649,7 @@ module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_ = f if (brackets[ch]) { expectedBrackets.push(brackets[ch]); } else { - if (goog.object.contains(brackets, ch) && expectedBrackets.pop() != ch) { + if (module$contents$goog$object_contains(brackets, ch) && expectedBrackets.pop() != ch) { return !1; } } @@ -3583,7 +3660,7 @@ module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.concat = function(var_ar var result = "", addArgument = function(argument) { Array.isArray(argument) ? module$contents$goog$array_forEach(argument, addArgument) : result += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(argument); }; - module$contents$goog$array_forEach(arguments, addArgument); + Array.prototype.forEach.call(arguments, addArgument); return module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(result); }; module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.fromConstant = function(styleSheet) { @@ -3667,7 +3744,7 @@ goog.html.SafeHtml.comment = function(text) { }; goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/; goog.html.SafeHtml.URL_ATTRIBUTES_ = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}; -goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); +goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); goog.html.SafeHtml.create = function(tagName, opt_attributes, opt_content) { goog.html.SafeHtml.verifyTagName(String(tagName)); return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(tagName), opt_attributes, opt_content); @@ -3803,7 +3880,7 @@ goog.html.SafeHtml.concat = function(var_args) { return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); }; goog.html.SafeHtml.concatWithDir = function(dir, var_args) { - var html = goog.html.SafeHtml.concat(module$contents$goog$array_slice(arguments, 1)); + var html = goog.html.SafeHtml.concat(Array.prototype.slice.call(arguments, 1)); html.dir_ = dir; return html; }; @@ -4000,7 +4077,14 @@ goog.dom.safe.setIframeSrcdoc = function(iframe, html) { goog.dom.safe.setLinkHrefAndRel = function(link, url, rel) { goog.dom.asserts.assertIsHTMLLinkElement(link); link.rel = rel; - goog.string.internal.caseInsensitiveContains(rel, "stylesheet") ? (goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), link.href = goog.html.TrustedResourceUrl.unwrap(url)) : link.href = url instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(url) : url instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(url) : goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(url)); + if (goog.string.internal.caseInsensitiveContains(rel, "stylesheet")) { + goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'); + link.href = goog.html.TrustedResourceUrl.unwrap(url); + var nonce = goog.dom.safe.getStyleNonce(link.ownerDocument && link.ownerDocument.defaultView); + nonce && link.setAttribute("nonce", nonce); + } else { + link.href = url instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(url) : url instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(url) : goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(url)); + } }; goog.dom.safe.setObjectData = function(object, url) { goog.dom.asserts.assertIsHTMLObjectElement(object); @@ -4017,7 +4101,7 @@ goog.dom.safe.setScriptContent = function(script, content) { goog.dom.safe.setNonceForScriptElement_(script); }; goog.dom.safe.setNonceForScriptElement_ = function(script) { - var nonce = goog.getScriptNonce(script.ownerDocument && script.ownerDocument.defaultView); + var nonce = goog.dom.safe.getScriptNonce(script.ownerDocument && script.ownerDocument.defaultView); nonce && script.setAttribute("nonce", nonce); }; goog.dom.safe.setLocationHref = function(loc, url) { @@ -4059,6 +4143,27 @@ goog.dom.safe.createImageFromBlob = function(blob) { goog.dom.safe.createContextualFragment = function(range, html) { return range.createContextualFragment(goog.html.SafeHtml.unwrapTrustedHTML(html)); }; +goog.dom.safe.getScriptNonce = function(opt_window) { + return goog.dom.safe.getNonce_("script[nonce]", opt_window); +}; +goog.dom.safe.getStyleNonce = function(opt_window) { + return goog.dom.safe.getNonce_('style[nonce],link[rel="stylesheet"][nonce]', opt_window); +}; +goog.dom.safe.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/; +goog.dom.safe.getNonce_ = function(selector, win) { + var doc = (win || goog.global).document; + if (!doc.querySelector) { + return ""; + } + var el = doc.querySelector(selector); + if (el) { + var nonce = el.nonce || el.getAttribute("nonce"); + if (nonce && goog.dom.safe.NONCE_PATTERN_.test(nonce)) { + return nonce; + } + } + return ""; +}; goog.string.DETECT_DOUBLE_ESCAPING = !1; goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1; goog.string.Unicode = {NBSP:"\u00a0"}; @@ -4406,13 +4511,13 @@ goog.string.editDistance = function(a, b) { for (var i = 0; i < b.length + 1; i++) { v0[i] = i; } - for (i = 0; i < a.length; i++) { - v1[0] = i + 1; + for (var i$25 = 0; i$25 < a.length; i$25++) { + v1[0] = i$25 + 1; for (var j = 0; j < b.length; j++) { - v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + Number(a[i] != b[j])); + v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + Number(a[i$25] != b[j])); } - for (j = 0; j < v0.length; j++) { - v0[j] = v1[j]; + for (var j$26 = 0; j$26 < v0.length; j$26++) { + v0[j$26] = v1[j$26]; } } return v1[b.length]; @@ -4646,7 +4751,6 @@ goog.userAgent.isVersionOrHigher = function(version) { return 0 <= goog.string.compareVersions(goog.userAgent.VERSION, version); }); }; -goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher; goog.userAgent.isDocumentModeOrHigher = function(documentMode) { return Number(goog.userAgent.DOCUMENT_MODE) >= documentMode; }; @@ -4761,7 +4865,7 @@ goog.debug.normalizeErrorObject = function(err) { } try { var fileName = err.fileName || err.filename || err.sourceURL || goog.global.$googDebugFname || href; - } catch (e$20) { + } catch (e$27) { fileName = "Not available", threwError = !0; } var stack = goog.debug.serializeErrorStack_(err); @@ -4774,7 +4878,7 @@ goog.debug.normalizeErrorObject = function(err) { if (goog.debug.CHECK_FOR_THROWN_EVENT && "Event" == ctorName) { try { message = message + ' with Event.type "' + (err.type || "") + '"'; - } catch (e$21) { + } catch (e$28) { } } } else { @@ -4785,7 +4889,7 @@ goog.debug.normalizeErrorObject = function(err) { return {message:message, name:err.name || "UnknownError", lineNumber:lineNumber, fileName:fileName, stack:stack || "Not available"}; } err.stack = stack; - return err; + return {message:err.message, name:err.name, lineNumber:err.lineNumber, fileName:err.fileName, stack:err.stack}; }; goog.debug.serializeErrorStack_ = function(e, seen) { seen || (seen = {}); @@ -4939,8 +5043,8 @@ goog.debug.freeze = function(arg) { return goog.debug.freezeInternal_(arg); }(); }; -goog.events.BrowserFeature = {HAS_W3C_BUTTON:!0, HAS_W3C_EVENT_SUPPORT:!0, SET_KEY_CODE_TO_PREVENT_DEFAULT:!1, HAS_NAVIGATOR_ONLINE_PROPERTY:!0, HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9b") || goog.userAgent.IE && goog.userAgent.isVersionOrHigher("8") || goog.userAgent.OPERA && goog.userAgent.isVersionOrHigher("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("528"), HTML5_NETWORK_EVENTS_FIRE_ON_BODY:!1, TOUCH_ENABLED:"ontouchstart" in -goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.maxTouchPoints && !goog.global.navigator.msMaxTouchPoints), POINTER_EVENTS:"PointerEvent" in goog.global, MSPOINTER_EVENTS:"MSPointerEvent" in goog.global && !(!goog.global.navigator || !goog.global.navigator.msPointerEnabled), PASSIVE_EVENTS:function(fn) { +goog.events.BrowserFeature = {HAS_W3C_BUTTON:!0, HAS_W3C_EVENT_SUPPORT:!0, SET_KEY_CODE_TO_PREVENT_DEFAULT:!1, HAS_NAVIGATOR_ONLINE_PROPERTY:!0, HAS_HTML5_NETWORK_EVENT_SUPPORT:!0, HTML5_NETWORK_EVENTS_FIRE_ON_BODY:!1, TOUCH_ENABLED:"ontouchstart" in goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.maxTouchPoints && !goog.global.navigator.msMaxTouchPoints), POINTER_EVENTS:"PointerEvent" in +goog.global, MSPOINTER_EVENTS:"MSPointerEvent" in goog.global && !(!goog.global.navigator || !goog.global.navigator.msPointerEnabled), PASSIVE_EVENTS:function(fn) { return {valueOf:fn}.valueOf(); }(function() { if (!goog.global.addEventListener || !Object.defineProperty) { @@ -5182,7 +5286,7 @@ goog.events.ListenerMap.prototype.getListener = function(type, listener, capture }; goog.events.ListenerMap.prototype.hasListener = function(opt_type, opt_capture) { var hasType = void 0 !== opt_type, typeStr = hasType ? opt_type.toString() : "", hasCapture = void 0 !== opt_capture; - return goog.object.some(this.listeners, function(listenerArray, type) { + return module$contents$goog$object_some(this.listeners, function(listenerArray, type) { for (var i = 0; i < listenerArray.length; ++i) { if (!(hasType && listenerArray[i].type != typeStr || hasCapture && listenerArray[i].capture != opt_capture)) { return !0; @@ -5581,7 +5685,7 @@ goog.events.EventTarget.dispatchEventInternal_ = function(target, e, opt_ancesto } else { var oldEvent = e; e = new goog.events.Event(type, target); - goog.object.extend(e, oldEvent); + module$contents$goog$object_extend(e, oldEvent); } } var rv = !0; @@ -5602,6 +5706,77 @@ goog.events.EventTarget.dispatchEventInternal_ = function(target, e, opt_ancesto goog.structs = {}; goog.structs.Collection = function() { }; +goog.collections = {}; +goog.collections.iters = {}; +function module$contents$goog$collections$iters_getIterator(iterable) { + return iterable[goog.global.Symbol.iterator](); +} +goog.collections.iters.getIterator = module$contents$goog$collections$iters_getIterator; +goog.collections.iters.forEach = function(iterable, f) { + for (var $jscomp$iter$5 = $jscomp.makeIterator(iterable), $jscomp$key$elem = $jscomp$iter$5.next(); !$jscomp$key$elem.done; $jscomp$key$elem = $jscomp$iter$5.next()) { + f($jscomp$key$elem.value); + } +}; +var module$contents$goog$collections$iters_MapIterator = function(childIter, mapFn) { + this.childIterator_ = module$contents$goog$collections$iters_getIterator(childIter); + this.mapFn_ = mapFn; + this.nextIndex_ = 0; +}; +module$contents$goog$collections$iters_MapIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_MapIterator.prototype.next = function() { + var childResult = this.childIterator_.next(); + return {value:childResult.done ? void 0 : this.mapFn_.call(void 0, childResult.value, this.nextIndex_++), done:childResult.done, }; +}; +goog.collections.iters.map = function(iterable, f) { + return new module$contents$goog$collections$iters_MapIterator(iterable, f); +}; +var module$contents$goog$collections$iters_FilterIterator = function(childIter, filterFn) { + this.childIter_ = module$contents$goog$collections$iters_getIterator(childIter); + this.filterFn_ = filterFn; + this.nextIndex_ = 0; +}; +module$contents$goog$collections$iters_FilterIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_FilterIterator.prototype.next = function() { + for (;;) { + var childResult = this.childIter_.next(); + if (childResult.done) { + return {done:!0, value:void 0}; + } + if (this.filterFn_.call(void 0, childResult.value, this.nextIndex_++)) { + return childResult; + } + } +}; +goog.collections.iters.filter = function(iterable, f) { + return new module$contents$goog$collections$iters_FilterIterator(iterable, f); +}; +var module$contents$goog$collections$iters_ConcatIterator = function(iterators) { + this.iterators_ = iterators; + this.iterIndex_ = 0; +}; +module$contents$goog$collections$iters_ConcatIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_ConcatIterator.prototype.next = function() { + for (; this.iterIndex_ < this.iterators_.length;) { + var result = this.iterators_[this.iterIndex_].next(); + if (!result.done) { + return result; + } + this.iterIndex_++; + } + return {done:!0}; +}; +goog.collections.iters.concat = function(iterables) { + for (var $jscomp$restParams = [], $jscomp$restIndex = 0; $jscomp$restIndex < arguments.length; ++$jscomp$restIndex) { + $jscomp$restParams[$jscomp$restIndex - 0] = arguments[$jscomp$restIndex]; + } + return new module$contents$goog$collections$iters_ConcatIterator($jscomp$restParams.map(module$contents$goog$collections$iters_getIterator)); +}; goog.math = {}; goog.math.randomInt = function(a) { return Math.floor(Math.random() * a); @@ -5675,7 +5850,7 @@ goog.math.longestCommonSubsequence = function(array1, array2, opt_compareFn, opt return result; }; goog.math.sum = function(var_args) { - return module$contents$goog$array_reduce(arguments, function(sum, value) { + return Array.prototype.reduce.call(arguments, function(sum, value) { return sum + value; }, 0); }; @@ -5688,7 +5863,7 @@ goog.math.sampleVariance = function(var_args) { return 0; } var mean = goog.math.average.apply(null, arguments); - return goog.math.sum.apply(null, module$contents$goog$array_map(arguments, function(val) { + return goog.math.sum.apply(null, Array.prototype.map.call(arguments, function(val) { return Math.pow(val - mean, 2); })) / (sampleSize - 1); }; @@ -5724,6 +5899,9 @@ goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopItera goog.iter.Iterator = function() { }; goog.iter.Iterator.prototype.next = function() { + return goog.iter.Iterator.prototype.nextValueOrThrow.call(this); +}; +goog.iter.Iterator.prototype.nextValueOrThrow = function() { throw goog.iter.StopIteration; }; goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) { @@ -5768,9 +5946,9 @@ goog.iter.forEach = function(iterable, f, opt_obj) { for (;;) { f.call(opt_obj, iterable.next(), void 0, iterable); } - } catch (ex$22) { - if (ex$22 !== goog.iter.StopIteration) { - throw ex$22; + } catch (ex$30) { + if (ex$30 !== goog.iter.StopIteration) { + throw ex$30; } } } @@ -5929,7 +6107,7 @@ goog.iter.nextOrValue = function(iterable, defaultValue) { } }; goog.iter.product = function(var_args) { - if (module$contents$goog$array_some(arguments, function(arr) { + if (Array.prototype.some.call(arguments, function(arr) { return !arr.length; }) || !arguments.length) { return new goog.iter.Iterator; @@ -6011,7 +6189,7 @@ goog.iter.zip = function(var_args) { return iter; }; goog.iter.zipLongest = function(fillValue, var_args) { - var args = module$contents$goog$array_slice(arguments, 1), iter = new goog.iter.Iterator; + var args = Array.prototype.slice.call(arguments, 1), iter = new goog.iter.Iterator; if (0 < args.length) { var iterators = module$contents$goog$array_map(args, goog.iter.toIterator); iter.next = function() { @@ -6160,10 +6338,108 @@ goog.iter.combinationsWithReplacement = function(iterable, length) { }; return iter; }; +goog.iter.es6 = {}; +var module$contents$goog$iter$es6_ShimIterable = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.__iterator__ = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.toGoog = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.toEs6 = function() { +}; +module$contents$goog$iter$es6_ShimIterable.of = function(iter) { + if (iter instanceof module$contents$goog$iter$es6_ShimIterableImpl || iter instanceof module$contents$goog$iter$es6_ShimGoogIterator || iter instanceof module$contents$goog$iter$es6_ShimEs6Iterator) { + return iter; + } + if ("function" == typeof iter.next) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return module$contents$goog$iter$es6_wrapGoog(iter); + }); + } + if ("function" == typeof iter[Symbol.iterator]) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return iter[Symbol.iterator](); + }); + } + if ("function" == typeof iter.__iterator__) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return module$contents$goog$iter$es6_wrapGoog(iter.__iterator__()); + }); + } + throw Error("Not an iterator or iterable."); +}; +var module$contents$goog$iter$es6_wrapGoog = function(iter) { + if (!(iter instanceof goog.iter.Iterator)) { + return iter; + } + var done = !1; + return {next:function() { + for (var value; !done;) { + try { + value = iter.next(); + break; + } catch (err$31) { + if (err$31 !== goog.iter.StopIteration) { + throw err$31; + } + done = !0; + } + } + return {value:value, done:done}; + }, }; +}, module$contents$goog$iter$es6_ShimIterableImpl = function(func) { + this.func_ = func; +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.__iterator__ = function() { + return new module$contents$goog$iter$es6_ShimGoogIterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.toGoog = function() { + return new module$contents$goog$iter$es6_ShimGoogIterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype[Symbol.iterator] = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.toEs6 = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.func_()); +}; +var module$contents$goog$iter$es6_ShimGoogIterator = function(iter) { + goog.iter.Iterator.call(this); + this.iter_ = iter; +}; +$jscomp.inherits(module$contents$goog$iter$es6_ShimGoogIterator, goog.iter.Iterator); +module$contents$goog$iter$es6_ShimGoogIterator.prototype.next = function() { + var result = this.iter_.next(); + if (result.done) { + throw goog.iter.StopIteration; + } + return result.value; +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype.toGoog = function() { + return this; +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype[Symbol.iterator] = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.iter_); +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype.toEs6 = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.iter_); +}; +var module$contents$goog$iter$es6_ShimEs6Iterator = function(iter) { + module$contents$goog$iter$es6_ShimIterableImpl.call(this, function() { + return iter; + }); + this.iter_ = iter; +}; +$jscomp.inherits(module$contents$goog$iter$es6_ShimEs6Iterator, module$contents$goog$iter$es6_ShimIterableImpl); +module$contents$goog$iter$es6_ShimEs6Iterator.prototype.next = function() { + return this.iter_.next(); +}; +goog.iter.es6.ShimIterable = module$contents$goog$iter$es6_ShimIterable; +goog.iter.es6.ShimEs6Iterator = module$contents$goog$iter$es6_ShimEs6Iterator; +goog.iter.es6.ShimGoogIterator = module$contents$goog$iter$es6_ShimGoogIterator; goog.structs.Map = function(opt_map, var_args) { this.map_ = {}; this.keys_ = []; - this.version_ = this.count_ = 0; + this.version_ = this.size = 0; var argLength = arguments.length; if (1 < argLength) { if (argLength % 2) { @@ -6177,7 +6453,7 @@ goog.structs.Map = function(opt_map, var_args) { } }; goog.structs.Map.prototype.getCount = function() { - return this.count_; + return this.size; }; goog.structs.Map.prototype.getValues = function() { this.cleanupKeysArray_(); @@ -6191,6 +6467,9 @@ goog.structs.Map.prototype.getKeys = function() { return this.keys_.concat(); }; goog.structs.Map.prototype.containsKey = function(key) { + return this.has(key); +}; +goog.structs.Map.prototype.has = function(key) { return goog.structs.Map.hasKey_(this.map_, key); }; goog.structs.Map.prototype.containsValue = function(val) { @@ -6206,7 +6485,7 @@ goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) { if (this === otherMap) { return !0; } - if (this.count_ != otherMap.getCount()) { + if (this.size != otherMap.getCount()) { return !1; } var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals; @@ -6222,17 +6501,22 @@ goog.structs.Map.defaultEquals = function(a, b) { return a === b; }; goog.structs.Map.prototype.isEmpty = function() { - return 0 == this.count_; + return 0 == this.size; }; goog.structs.Map.prototype.clear = function() { this.map_ = {}; - this.version_ = this.count_ = this.keys_.length = 0; + this.keys_.length = 0; + this.setSizeInternal_(0); + this.version_ = 0; }; goog.structs.Map.prototype.remove = function(key) { - return goog.structs.Map.hasKey_(this.map_, key) ? (delete this.map_[key], this.count_--, this.version_++, this.keys_.length > 2 * this.count_ && this.cleanupKeysArray_(), !0) : !1; + return this.delete(key); +}; +goog.structs.Map.prototype.delete = function(key) { + return goog.structs.Map.hasKey_(this.map_, key) ? (delete this.map_[key], this.setSizeInternal_(this.size - 1), this.version_++, this.keys_.length > 2 * this.size && this.cleanupKeysArray_(), !0) : !1; }; goog.structs.Map.prototype.cleanupKeysArray_ = function() { - if (this.count_ != this.keys_.length) { + if (this.size != this.keys_.length) { for (var srcIndex = 0, destIndex = 0; srcIndex < this.keys_.length;) { var key = this.keys_[srcIndex]; goog.structs.Map.hasKey_(this.map_, key) && (this.keys_[destIndex++] = key); @@ -6240,7 +6524,7 @@ goog.structs.Map.prototype.cleanupKeysArray_ = function() { } this.keys_.length = destIndex; } - if (this.count_ != this.keys_.length) { + if (this.size != this.keys_.length) { var seen = {}; for (destIndex = srcIndex = 0; srcIndex < this.keys_.length;) { key = this.keys_[srcIndex], goog.structs.Map.hasKey_(seen, key) || (this.keys_[destIndex++] = key, seen[key] = 1), srcIndex++; @@ -6252,7 +6536,7 @@ goog.structs.Map.prototype.get = function(key, opt_val) { return goog.structs.Map.hasKey_(this.map_, key) ? this.map_[key] : opt_val; }; goog.structs.Map.prototype.set = function(key, value) { - goog.structs.Map.hasKey_(this.map_, key) || (this.count_++, this.keys_.push(key), this.version_++); + goog.structs.Map.hasKey_(this.map_, key) || (this.setSizeInternal_(this.size + 1), this.keys_.push(key), this.version_++); this.map_[key] = value; }; goog.structs.Map.prototype.addAll = function(map) { @@ -6293,9 +6577,21 @@ goog.structs.Map.prototype.toObject = function() { goog.structs.Map.prototype.getKeyIterator = function() { return this.__iterator__(!0); }; +goog.structs.Map.prototype.keys = function() { + return module$contents$goog$iter$es6_ShimIterable.of(this.getKeyIterator()).toEs6(); +}; goog.structs.Map.prototype.getValueIterator = function() { return this.__iterator__(!1); }; +goog.structs.Map.prototype.values = function() { + return module$contents$goog$iter$es6_ShimIterable.of(this.getValueIterator()).toEs6(); +}; +goog.structs.Map.prototype.entries = function() { + var self = this; + return goog.collections.iters.map(this.keys(), function(key) { + return [key, self.get(key)]; + }); +}; goog.structs.Map.prototype.__iterator__ = function(opt_keys) { this.cleanupKeysArray_(); var i = 0, version = this.version_, selfObj = this, newIter = new goog.iter.Iterator; @@ -6311,16 +6607,22 @@ goog.structs.Map.prototype.__iterator__ = function(opt_keys) { }; return newIter; }; +goog.structs.Map.prototype.setSizeInternal_ = function(newSize) { + this.size = newSize; +}; goog.structs.Map.hasKey_ = function(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); }; goog.structs.getCount = function(col) { - return col.getCount && "function" == typeof col.getCount ? col.getCount() : goog.isArrayLike(col) || "string" === typeof col ? col.length : goog.object.getCount(col); + return col.getCount && "function" == typeof col.getCount ? col.getCount() : goog.isArrayLike(col) || "string" === typeof col ? col.length : module$contents$goog$object_getCount(col); }; goog.structs.getValues = function(col) { if (col.getValues && "function" == typeof col.getValues) { return col.getValues(); } + if ("undefined" !== typeof Map && col instanceof Map || "undefined" !== typeof Set && col instanceof Set) { + return Array.from(col.values()); + } if ("string" === typeof col) { return col.split(""); } @@ -6330,30 +6632,35 @@ goog.structs.getValues = function(col) { } return rv; } - return goog.object.getValues(col); + return module$contents$goog$object_getValues(col); }; goog.structs.getKeys = function(col) { if (col.getKeys && "function" == typeof col.getKeys) { return col.getKeys(); } if (!col.getValues || "function" != typeof col.getValues) { - if (goog.isArrayLike(col) || "string" === typeof col) { - for (var rv = [], l = col.length, i = 0; i < l; i++) { - rv.push(i); + if ("undefined" !== typeof Map && col instanceof Map) { + return Array.from(col.keys()); + } + if (!("undefined" !== typeof Set && col instanceof Set)) { + if (goog.isArrayLike(col) || "string" === typeof col) { + for (var rv = [], l = col.length, i = 0; i < l; i++) { + rv.push(i); + } + return rv; } - return rv; + return module$contents$goog$object_getKeys(col); } - return goog.object.getKeys(col); } }; goog.structs.contains = function(col, val) { - return col.contains && "function" == typeof col.contains ? col.contains(val) : col.containsValue && "function" == typeof col.containsValue ? col.containsValue(val) : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_contains(col, val) : goog.object.containsValue(col, val); + return col.contains && "function" == typeof col.contains ? col.contains(val) : col.containsValue && "function" == typeof col.containsValue ? col.containsValue(val) : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_contains(col, val) : module$contents$goog$object_containsValue(col, val); }; goog.structs.isEmpty = function(col) { - return col.isEmpty && "function" == typeof col.isEmpty ? col.isEmpty() : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_isEmpty(col) : goog.object.isEmpty(col); + return col.isEmpty && "function" == typeof col.isEmpty ? col.isEmpty() : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_isEmpty(col) : module$contents$goog$object_isEmpty(col); }; goog.structs.clear = function(col) { - col.clear && "function" == typeof col.clear ? col.clear() : goog.isArrayLike(col) ? module$contents$goog$array_clear(col) : goog.object.clear(col); + col.clear && "function" == typeof col.clear ? col.clear() : goog.isArrayLike(col) ? module$contents$goog$array_clear(col) : module$contents$goog$object_clear(col); }; goog.structs.forEach = function(col, f, opt_obj) { if (col.forEach && "function" == typeof col.forEach) { @@ -6438,6 +6745,7 @@ goog.structs.every = function(col, f, opt_obj) { }; goog.structs.Set = function(opt_values) { this.map_ = new goog.structs.Map; + this.size = 0; opt_values && this.addAll(opt_values); }; goog.structs.Set.getUid_ = goog.getUid; @@ -6446,29 +6754,41 @@ goog.structs.Set.getKey_ = function(val) { return "object" == type && val || "function" == type ? "o" + goog.getUid(val) : type.substr(0, 1) + val; }; goog.structs.Set.prototype.getCount = function() { - return this.map_.getCount(); + return this.map_.size; }; goog.structs.Set.prototype.add = function(element) { this.map_.set(goog.structs.Set.getKey_(element), element); + this.setSizeInternal_(this.map_.size); }; goog.structs.Set.prototype.addAll = function(col) { for (var values = goog.structs.getValues(col), l = values.length, i = 0; i < l; i++) { this.add(values[i]); } + this.setSizeInternal_(this.map_.size); }; goog.structs.Set.prototype.removeAll = function(col) { for (var values = goog.structs.getValues(col), l = values.length, i = 0; i < l; i++) { this.remove(values[i]); } + this.setSizeInternal_(this.map_.size); +}; +goog.structs.Set.prototype.delete = function(element) { + var rv = this.map_.remove(goog.structs.Set.getKey_(element)); + this.setSizeInternal_(this.map_.size); + return rv; }; goog.structs.Set.prototype.remove = function(element) { - return this.map_.remove(goog.structs.Set.getKey_(element)); + return this.delete(element); }; goog.structs.Set.prototype.clear = function() { this.map_.clear(); + this.setSizeInternal_(0); }; goog.structs.Set.prototype.isEmpty = function() { - return this.map_.isEmpty(); + return 0 === this.map_.size; +}; +goog.structs.Set.prototype.has = function(element) { + return this.map_.containsKey(goog.structs.Set.getKey_(element)); }; goog.structs.Set.prototype.contains = function(element) { return this.map_.containsKey(goog.structs.Set.getKey_(element)); @@ -6491,6 +6811,9 @@ goog.structs.Set.prototype.difference = function(col) { goog.structs.Set.prototype.getValues = function() { return this.map_.getValues(); }; +goog.structs.Set.prototype.values = function() { + return this.map_.values(); +}; goog.structs.Set.prototype.clone = function() { return new goog.structs.Set(this); }; @@ -6510,6 +6833,12 @@ goog.structs.Set.prototype.isSubsetOf = function(col) { goog.structs.Set.prototype.__iterator__ = function(opt_keys) { return this.map_.__iterator__(!1); }; +goog.structs.Set.prototype[Symbol.iterator] = function() { + return this.values(); +}; +goog.structs.Set.prototype.setSizeInternal_ = function(newSize) { + this.size = newSize; +}; var ee = {AbstractOverlay:function(url, mapId, token, opt_init, opt_profiler) { goog.events.EventTarget.call(this); this.mapId = mapId; @@ -6752,6 +7081,9 @@ module$exports$tslib.__spreadArrays = function() { return r; }; module$exports$tslib.__spreadArray = function(to, from) { + if (!(Array.isArray(from) || from instanceof NodeList)) { + throw new TypeError("Expected an Array or NodeList: " + String(from)); + } for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) { to[j] = from[i]; } @@ -6844,7 +7176,7 @@ module$exports$eeapiclient$domain_object.NULL_VALUE = new module$contents$eeapic module$exports$eeapiclient$domain_object.ISerializable = function module$contents$eeapiclient$domain_object_ISerializable() { }; function module$contents$eeapiclient$domain_object_buildClassMetadataFromPartial(partialClassMetadata) { - return Object.assign({arrays:{}, descriptions:{}, keys:[], objectMaps:{}, objects:{}, enums:{}}, partialClassMetadata); + return Object.assign({arrays:{}, descriptions:{}, keys:[], objectMaps:{}, objects:{}, enums:{}, emptyArrayIsUnset:!1}, partialClassMetadata); } module$exports$eeapiclient$domain_object.buildClassMetadataFromPartial = module$contents$eeapiclient$domain_object_buildClassMetadataFromPartial; module$exports$eeapiclient$domain_object.Serializable = function() { @@ -6905,25 +7237,45 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function module$con }; 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; function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) { - for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$loop$39 = {}, $jscomp$iter$4 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$4.next(); !$jscomp$key$key.done; $jscomp$loop$39 = {$jscomp$loop$prop$mapMetadata$40:$jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40}, - $jscomp$key$key = $jscomp$iter$4.next()) { + for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$loop$59 = {}, $jscomp$iter$6 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$6.next(); !$jscomp$key$key.done; $jscomp$loop$59 = {$jscomp$loop$prop$mapMetadata$60:$jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60}, + $jscomp$key$key = $jscomp$iter$6.next()) { var key = $jscomp$key$key.value, value = valueGetter(key, source); if (null != value) { var copy = void 0; - arrays.hasOwnProperty(key) ? copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !0, arrays[key]) : objects.hasOwnProperty(key) ? copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]) : objectMaps.hasOwnProperty(key) ? ($jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40 = - objectMaps[key], copy = $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40.isPropertyArray ? value.map(function($jscomp$loop$39) { - return function(v) { - return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40, valueGetter, valueSetter, copyInstanciator); - }; - }($jscomp$loop$39)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40, valueGetter, valueSetter, copyInstanciator)) : copy = Array.isArray(value) ? module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !1) : value instanceof module$contents$eeapiclient$domain_object_NullClass ? - null : value; + if (arrays.hasOwnProperty(key)) { + if (metadata.emptyArrayIsUnset && 0 === value.length) { + continue; + } + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !0, arrays[key]); + } else { + if (objects.hasOwnProperty(key)) { + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]); + } else { + if (objectMaps.hasOwnProperty(key)) { + $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60 = objectMaps[key], copy = $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60.isPropertyArray ? value.map(function($jscomp$loop$59) { + return function(v) { + return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60, valueGetter, valueSetter, copyInstanciator); + }; + }($jscomp$loop$59)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60, valueGetter, valueSetter, copyInstanciator); + } else { + if (Array.isArray(value)) { + if (metadata.emptyArrayIsUnset && 0 === value.length) { + continue; + } + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !1); + } else { + copy = value instanceof module$contents$eeapiclient$domain_object_NullClass ? null : value; + } + } + } + } valueSetter(key, target, copy); } } return target; } function module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, mapMetadata, valueGetter, valueSetter, copyInstanciator) { - for (var objMap = {}, $jscomp$iter$5 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$mapKey = $jscomp$iter$5.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$5.next()) { + for (var objMap = {}, $jscomp$iter$7 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$mapKey = $jscomp$iter$7.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$7.next()) { var mapKey = $jscomp$key$mapKey.value, mapValue = value[mapKey]; null != mapValue && (objMap[mapKey] = module$contents$eeapiclient$domain_object_deepCopyValue(mapValue, valueGetter, valueSetter, copyInstanciator, mapMetadata.isValueArray, mapMetadata.isSerializable, mapMetadata.ctor)); } @@ -6956,45 +7308,45 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser 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))) { return !1; } - for (var $jscomp$loop$41 = {}, $jscomp$iter$6 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$6.next(); !$jscomp$key$key.done; $jscomp$loop$41 = {$jscomp$loop$prop$value2$42:$jscomp$loop$41.$jscomp$loop$prop$value2$42, $jscomp$loop$prop$mapMetadata$43:$jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43}, $jscomp$key$key = $jscomp$iter$6.next()) { - var key = $jscomp$key$key.value; - if (serializable1.Serializable$has(key) !== serializable2.Serializable$has(key)) { + for (var $jscomp$loop$61 = {}, $jscomp$iter$8 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$8.next(); !$jscomp$key$key.done; $jscomp$loop$61 = {$jscomp$loop$prop$value2$62:$jscomp$loop$61.$jscomp$loop$prop$value2$62, $jscomp$loop$prop$mapMetadata$63:$jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63}, $jscomp$key$key = $jscomp$iter$8.next()) { + 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); + if (has1 !== has2) { return !1; } - if (serializable1.Serializable$has(key)) { + if (has1) { var value1 = serializable1.Serializable$get(key); - $jscomp$loop$41.$jscomp$loop$prop$value2$42 = serializable2.Serializable$get(key); + $jscomp$loop$61.$jscomp$loop$prop$value2$62 = serializable2.Serializable$get(key); if (arrays1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !0, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !0, !0)) { return !1; } } else { if (objects1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !1, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !1, !0)) { return !1; } } else { if (objectMaps1.hasOwnProperty(key)) { - if ($jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43 = objectMaps1[key], $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43.isPropertyArray) { - if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42) || value1.some(function($jscomp$loop$41) { + if ($jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63 = objectMaps1[key], $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63.isPropertyArray) { + if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62) || value1.some(function($jscomp$loop$61) { return function(v1, i) { - return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$41.$jscomp$loop$prop$value2$42[i], $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43); + return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$61.$jscomp$loop$prop$value2$62[i], $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63); }; - }($jscomp$loop$41))) { + }($jscomp$loop$61))) { return !1; } } else { - if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63)) { return !1; } } } else { if (Array.isArray(value1)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !0, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !0, !1)) { return !1; } } else { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !1, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !1, !1)) { return !1; } } @@ -7006,11 +7358,21 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser return !0; } module$exports$eeapiclient$domain_object.deepEquals = module$contents$eeapiclient$domain_object_deepEquals; +function module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable, key, metadata) { + if (!serializable.Serializable$has(key)) { + return !1; + } + if (!metadata.emptyArrayIsUnset) { + return !0; + } + var value = serializable.Serializable$get(key); + return Array.isArray(value) ? 0 !== value.length : !0; +} function module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, value2, mapMetadata) { if (!module$contents$eeapiclient$domain_object_sameKeys(value1, value2)) { return !1; } - for (var $jscomp$iter$7 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$mapKey = $jscomp$iter$7.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$7.next()) { + for (var $jscomp$iter$9 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$mapKey = $jscomp$iter$9.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$9.next()) { var mapKey = $jscomp$key$mapKey.value; if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1[mapKey], value2[mapKey], mapMetadata.isValueArray, mapMetadata.isSerializable)) { return !1; @@ -7065,7 +7427,12 @@ function module$contents$eeapiclient$domain_object_sameKeys(a, b) { } return !0; } -;goog.uri = {}; +module$exports$eeapiclient$domain_object.serializableEqualityTester = function module$contents$eeapiclient$domain_object_serializableEqualityTester(left, right) { + if (left instanceof module$exports$eeapiclient$domain_object.Serializable && right instanceof module$exports$eeapiclient$domain_object.Serializable) { + return module$contents$eeapiclient$domain_object_deepEquals(left, right); + } +}; +goog.uri = {}; goog.uri.utils = {}; goog.uri.utils.CharCode_ = {AMPERSAND:38, EQUAL:61, HASH:35, QUESTION:63}; goog.uri.utils.buildFromEncodedParts = function(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) { @@ -7751,7 +8118,7 @@ goog.Uri.QueryData.prototype.extend = function(var_args) { }; var module$exports$goog$net$rpc$HttpCors = {HTTP_HEADERS_PARAM_NAME:"$httpHeaders", HTTP_METHOD_PARAM_NAME:"$httpMethod", generateHttpHeadersOverwriteParam:function(headers) { var result = ""; - goog.object.forEach(headers, function(value, key) { + module$contents$goog$object_forEach(headers, function(value, key) { result += key; result += ":"; result += value; @@ -7761,7 +8128,7 @@ var module$exports$goog$net$rpc$HttpCors = {HTTP_HEADERS_PARAM_NAME:"$httpHeader }, generateEncodedHttpHeadersOverwriteParam:function(headers) { return goog.string.urlEncode(module$exports$goog$net$rpc$HttpCors.generateHttpHeadersOverwriteParam(headers)); }, setHttpHeadersWithOverwriteParam:function(url, urlParam, extraHeaders) { - if (goog.object.isEmpty(extraHeaders)) { + if (module$contents$goog$object_isEmpty(extraHeaders)) { return url; } var httpHeaders = module$exports$goog$net$rpc$HttpCors.generateHttpHeadersOverwriteParam(extraHeaders); @@ -7789,7 +8156,7 @@ function module$contents$eeapiclient$request_params_processParams(params) { } module$exports$eeapiclient$request_params.processParams = module$contents$eeapiclient$request_params_processParams; function module$contents$eeapiclient$request_params_buildQueryParams(params, mapping, passthroughParams) { - for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$8 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$ = $jscomp$iter$8.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$8.next()) { + for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$10 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$ = $jscomp$iter$10.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$10.next()) { var $jscomp$destructuring$var1 = $jscomp.makeIterator($jscomp$key$.value), jsName = $jscomp$destructuring$var1.next().value, urlQueryParamName = $jscomp$destructuring$var1.next().value; jsName in params && (urlQueryParams[urlQueryParamName] = params[jsName]); } @@ -7801,7 +8168,7 @@ module$exports$eeapiclient$request_params.bypassCorsPreflight = function module$ var safeHeaders = {}, unsafeHeaders = {}, hasUnsafeHeaders = !1, hasSafeHeaders = !1, hasContentType = !1; if (params.headers) { hasContentType = null != params.headers["Content-Type"]; - for (var $jscomp$iter$9 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$ = $jscomp$iter$9.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$9.next()) { + for (var $jscomp$iter$11 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$ = $jscomp$iter$11.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$11.next()) { var $jscomp$destructuring$var3 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var3.next().value, value = $jscomp$destructuring$var3.next().value; module$contents$eeapiclient$request_params_simpleCorsAllowedHeaders.includes(key) ? (safeHeaders[key] = value, hasSafeHeaders = !0) : (unsafeHeaders[key] = value, hasUnsafeHeaders = !0); } @@ -7852,7 +8219,7 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.build = return Promise.all(this.files.map(function(f) { return $jscomp$this.encodeFile(f); })).then(function(filePayloads) { - for (var $jscomp$iter$10 = $jscomp.makeIterator(filePayloads), $jscomp$key$filePayload = $jscomp$iter$10.next(); !$jscomp$key$filePayload.done; $jscomp$key$filePayload = $jscomp$iter$10.next()) { + for (var $jscomp$iter$12 = $jscomp.makeIterator(filePayloads), $jscomp$key$filePayload = $jscomp$iter$12.next(); !$jscomp$key$filePayload.done; $jscomp$key$filePayload = $jscomp$iter$12.next()) { payload += $jscomp$key$filePayload.value; } return payload += "\r\n--" + $jscomp$this._boundary + "--"; @@ -7868,7 +8235,7 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.base64En var reader = new FileReader; reader.onload = function(ev) { try { - var file$23 = ev.target.result, toResolve = file$23.substr(file$23.indexOf(",") + 1); + var file$32 = ev.target.result, toResolve = file$32.substr(file$32.indexOf(",") + 1); resolve(toResolve); } catch (e) { reject(e); @@ -8006,8 +8373,9 @@ module$exports$eeapiclient$ee_api_client.DataAccessOptionsLogModeEnum = {LOG_FAI }}; module$exports$eeapiclient$ee_api_client.IEarthEngineAssetTypeEnum = function module$contents$eeapiclient$ee_api_client_IEarthEngineAssetTypeEnum() { }; -module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum = {FOLDER:"FOLDER", IMAGE:"IMAGE", IMAGE_COLLECTION:"IMAGE_COLLECTION", TABLE:"TABLE", TYPE_UNSPECIFIED:"TYPE_UNSPECIFIED", values:function() { - return [module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TYPE_UNSPECIFIED, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE_COLLECTION, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TABLE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.FOLDER]; +module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum = {CLASSIFIER:"CLASSIFIER", FOLDER:"FOLDER", IMAGE:"IMAGE", IMAGE_COLLECTION:"IMAGE_COLLECTION", TABLE:"TABLE", TYPE_UNSPECIFIED:"TYPE_UNSPECIFIED", values:function() { + return [module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TYPE_UNSPECIFIED, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE_COLLECTION, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TABLE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.FOLDER, + module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.CLASSIFIER]; }}; module$exports$eeapiclient$ee_api_client.IEarthEngineMapFileFormatEnum = function module$contents$eeapiclient$ee_api_client_IEarthEngineMapFileFormatEnum() { }; @@ -8444,6 +8812,25 @@ $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client. $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.Capabilities, {Capabilities:{configurable:!0, enumerable:!0, get:function() { return module$exports$eeapiclient$ee_api_client.CapabilitiesCapabilitiesEnum; }}}); +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptionsParameters = function module$contents$eeapiclient$ee_api_client_ClassifierAssetExportOptionsParameters() { +}; +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); + this.Serializable$set("earthEngineDestination", null == parameters.earthEngineDestination ? null : parameters.earthEngineDestination); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions; +}; +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype.getPartialClassMetadata = function() { + return {keys:["earthEngineDestination"], objects:{earthEngineDestination:module$exports$eeapiclient$ee_api_client.EarthEngineDestination}}; +}; +$jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype, {earthEngineDestination:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("earthEngineDestination") ? this.Serializable$get("earthEngineDestination") : null; +}, set:function(value) { + this.Serializable$set("earthEngineDestination", value); +}}}); module$exports$eeapiclient$ee_api_client.CloudAuditOptionsParameters = function module$contents$eeapiclient$ee_api_client_CloudAuditOptionsParameters() { }; module$exports$eeapiclient$ee_api_client.CloudAuditOptions = function(parameters) { @@ -9118,6 +9505,50 @@ module$exports$eeapiclient$ee_api_client.Empty.prototype.getConstructor = functi module$exports$eeapiclient$ee_api_client.Empty.prototype.getPartialClassMetadata = function() { return {keys:[]}; }; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequestParameters = function module$contents$eeapiclient$ee_api_client_ExportClassifierRequestParameters() { +}; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); + this.Serializable$set("expression", null == parameters.expression ? null : parameters.expression); + this.Serializable$set("description", null == parameters.description ? null : parameters.description); + this.Serializable$set("requestId", null == parameters.requestId ? null : parameters.requestId); + this.Serializable$set("assetExportOptions", null == parameters.assetExportOptions ? null : parameters.assetExportOptions); + this.Serializable$set("maxWorkers", null == parameters.maxWorkers ? null : parameters.maxWorkers); + this.Serializable$set("maxWorkerCount", null == parameters.maxWorkerCount ? null : parameters.maxWorkerCount); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.ExportClassifierRequest, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.ExportClassifierRequest; +}; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype.getPartialClassMetadata = function() { + return {keys:"assetExportOptions description expression maxWorkerCount maxWorkers requestId".split(" "), objects:{assetExportOptions:module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions, expression:module$exports$eeapiclient$ee_api_client.Expression}}; +}; +$jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype, {assetExportOptions:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("assetExportOptions") ? this.Serializable$get("assetExportOptions") : null; +}, set:function(value) { + this.Serializable$set("assetExportOptions", value); +}}, description:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("description") ? this.Serializable$get("description") : null; +}, set:function(value) { + this.Serializable$set("description", value); +}}, expression:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("expression") ? this.Serializable$get("expression") : null; +}, set:function(value) { + this.Serializable$set("expression", value); +}}, maxWorkerCount:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("maxWorkerCount") ? this.Serializable$get("maxWorkerCount") : null; +}, set:function(value) { + this.Serializable$set("maxWorkerCount", value); +}}, maxWorkers:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("maxWorkers") ? this.Serializable$get("maxWorkers") : null; +}, set:function(value) { + this.Serializable$set("maxWorkers", value); +}}, requestId:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("requestId") ? this.Serializable$get("requestId") : null; +}, set:function(value) { + this.Serializable$set("requestId", value); +}}}); module$exports$eeapiclient$ee_api_client.ExportImageRequestParameters = function module$contents$eeapiclient$ee_api_client_ExportImageRequestParameters() { }; module$exports$eeapiclient$ee_api_client.ExportImageRequest = function(parameters) { @@ -9734,6 +10165,19 @@ $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client. }, set:function(value) { this.Serializable$set("options", value); }}}); +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequestParameters = function module$contents$eeapiclient$ee_api_client_GetLinkedAssetRequestParameters() { +}; +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest; +}; +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest.prototype.getPartialClassMetadata = function() { + return {keys:[]}; +}; module$exports$eeapiclient$ee_api_client.GetPixelsRequestParameters = function module$contents$eeapiclient$ee_api_client_GetPixelsRequestParameters() { }; module$exports$eeapiclient$ee_api_client.GetPixelsRequest = function(parameters) { @@ -11880,6 +12324,12 @@ module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.g this.$apiClient.$validateParameter(resource, /^projects\/[^/]+\/assets\/.*$/); return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.assets.getIamPolicy", path:"/" + this.gapiVersion + "/" + resource + ":getIamPolicy", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.Policy}); }; +module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.getLinked = function(name, $requestBody, namedParameters, passthroughNamedParameters) { + namedParameters = void 0 === namedParameters ? {} : namedParameters; + passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; + this.$apiClient.$validateParameter(name, /^projects\/[^/]+\/assets\/.*$/); + return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.assets.getLinked", path:"/" + this.gapiVersion + "/" + name + ":getLinked", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.EarthEngineAsset}); +}; module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.getPixels = function(name, $requestBody, namedParameters, passthroughNamedParameters) { namedParameters = void 0 === namedParameters ? {} : namedParameters; passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; @@ -11936,6 +12386,28 @@ module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.t }; module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClient = function() { }; +module$exports$eeapiclient$ee_api_client.IProjectsClassifierApiClient$XgafvEnum = function module$contents$eeapiclient$ee_api_client_IProjectsClassifierApiClient$XgafvEnum() { +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum = {1:"1", 2:"2", values:function() { + return [module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum[1], module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum[2]]; +}}; +module$exports$eeapiclient$ee_api_client.IProjectsClassifierApiClientAltEnum = function module$contents$eeapiclient$ee_api_client_IProjectsClassifierApiClientAltEnum() { +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum = {JSON:"json", MEDIA:"media", PROTO:"proto", values:function() { + return [module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.JSON, module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.MEDIA, module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.PROTO]; +}}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl = function(gapiVersion, gapiRequestService, apiClientHookFactory) { + this.gapiVersion = gapiVersion; + this.$apiClient = new module$exports$eeapiclient$promise_api_client.PromiseApiClient(gapiRequestService, void 0 === apiClientHookFactory ? null : apiClientHookFactory); +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl.prototype.export = function(project, $requestBody, namedParameters, passthroughNamedParameters) { + namedParameters = void 0 === namedParameters ? {} : namedParameters; + passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; + this.$apiClient.$validateParameter(project, /^projects\/[^/]+$/); + return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.classifier.export", path:"/" + this.gapiVersion + "/" + project + "/classifier:export", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.Operation}); +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient = function() { +}; module$exports$eeapiclient$ee_api_client.IProjectsFilmstripThumbnailsApiClient$XgafvEnum = function module$contents$eeapiclient$ee_api_client_IProjectsFilmstripThumbnailsApiClient$XgafvEnum() { }; module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClient$XgafvEnum = {1:"1", 2:"2", values:function() { @@ -12449,9 +12921,8 @@ module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl.pr module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClient = function() { }; ee.api = module$exports$eeapiclient$ee_api_client; -ee.apiVersion = {}; -ee.apiVersion.V1ALPHA = "v1alpha"; -ee.apiVersion.VERSION = "v1alpha"; +var module$exports$ee$apiVersion = {V1ALPHA:"v1alpha"}; +module$exports$ee$apiVersion.VERSION = module$exports$ee$apiVersion.V1ALPHA; var module$exports$eeapiclient$promise_request_service = {}, module$contents$eeapiclient$promise_request_service_module = module$contents$eeapiclient$promise_request_service_module || {id:"javascript/typescript/contrib/apiclient/request_service/promise_request_service.closure.js"}; module$exports$eeapiclient$promise_request_service.PromiseRequestService = function() { }; @@ -12718,7 +13189,7 @@ goog.dom.getElementByTagNameAndClass_ = function(doc, opt_tag, opt_class, opt_el }; goog.dom.$$ = goog.dom.getElementsByTagNameAndClass; goog.dom.setProperties = function(element, properties) { - goog.object.forEach(properties, function(val, key) { + module$contents$goog$object_forEach(properties, function(val, key) { val && "object" == typeof val && val.implementsGoogStringTypedString && (val = val.getTypedStringValue()); "style" == key ? element.style.cssText = val : "class" == key ? element.className = val : "for" == key ? element.htmlFor = val : goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(key) ? element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val) : goog.string.startsWith(key, "aria-") || goog.string.startsWith(key, "data-") ? element.setAttribute(key, val) : element[key] = val; }); @@ -12788,7 +13259,7 @@ goog.dom.createDom_ = function(doc, args) { if (attributes.type) { tagNameArr.push(' type="', goog.string.htmlEscape(attributes.type), '"'); var clone = {}; - goog.object.extend(clone, attributes); + module$contents$goog$object_extend(clone, attributes); delete clone.type; attributes = clone; } @@ -12836,7 +13307,7 @@ goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) { return table; }; goog.dom.constHtmlToNode = function(var_args) { - var stringArray = module$contents$goog$array_map(arguments, goog.string.Const.unwrap), safeHtml = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), stringArray.join("")); + var stringArray = Array.prototype.map.call(arguments, goog.string.Const.unwrap), safeHtml = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), stringArray.join("")); return goog.dom.safeHtmlToNode(safeHtml); }; goog.dom.safeHtmlToNode = function(html) { @@ -13821,16 +14292,16 @@ goog.Promise.prototype.addChildPromise_ = function(onFulfilled, onRejected, opt_ try { var result = onFulfilled.call(opt_context, value); resolve(result); - } catch (err$24) { - reject(err$24); + } catch (err$33) { + reject(err$33); } } : resolve; callbackEntry.onRejected = onRejected ? function(reason) { try { var result = onRejected.call(opt_context, reason); void 0 === result && reason instanceof goog.Promise.CancellationError ? reject(reason) : resolve(result); - } catch (err$25) { - reject(err$25); + } catch (err$34) { + reject(err$34); } } : reject; }); @@ -13920,8 +14391,8 @@ goog.Promise.prototype.executeCallback_ = function(callbackEntry, state, result) } else { try { callbackEntry.always ? callbackEntry.onFulfilled.call(callbackEntry.context) : goog.Promise.invokeCallback_(callbackEntry, state, result); - } catch (err$26) { - goog.Promise.handleRejection_.call(null, err$26); + } catch (err$35) { + goog.Promise.handleRejection_.call(null, err$35); } } goog.Promise.returnEntry_(callbackEntry); @@ -14202,7 +14673,7 @@ goog.async.Deferred.prototype.addCallbacks = function(cb, eb, opt_scope) { return this; }; goog.async.Deferred.prototype.then = function(opt_onFulfilled, opt_onRejected, opt_context) { - var resolve, reject, promise = new goog.Promise(function(res, rej) { + var reject, resolve, promise = new goog.Promise(function(res, rej) { resolve = res; reject = rej; }); @@ -14362,7 +14833,7 @@ goog.net.jsloader.safeLoadMany = function(trustedUris, opt_options) { return goog.net.jsloader.scriptLoadingDeferred_; }; goog.net.jsloader.safeLoad = function(trustedUri, opt_options) { - var options = opt_options || {}, doc = options.document || document, uri = goog.html.TrustedResourceUrl.unwrap(trustedUri), script = goog.dom.createElement(goog.dom.TagName.SCRIPT), request = {script_:script, timeout_:void 0}, deferred = new goog.async.Deferred(goog.net.jsloader.cancel_, request), timeout = null, timeoutDuration = null != options.timeout ? options.timeout : goog.net.jsloader.DEFAULT_TIMEOUT; + var options = opt_options || {}, doc = options.document || document, uri = goog.html.TrustedResourceUrl.unwrap(trustedUri), script = (new goog.dom.DomHelper(doc)).createElement(goog.dom.TagName.SCRIPT), request = {script_:script, timeout_:void 0}, deferred = new goog.async.Deferred(goog.net.jsloader.cancel_, request), timeout = null, timeoutDuration = null != options.timeout ? options.timeout : goog.net.jsloader.DEFAULT_TIMEOUT; 0 < timeoutDuration && (timeout = window.setTimeout(function() { goog.net.jsloader.cleanup_(script, !0); deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.TIMEOUT, "Timeout reached for loading script " + uri)); @@ -14375,7 +14846,7 @@ goog.net.jsloader.safeLoad = function(trustedUri, opt_options) { deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.LOAD_ERROR, "Error while loading script " + uri)); }; var properties = options.attributes || {}; - goog.object.extend(properties, {type:"text/javascript", charset:"UTF-8"}); + module$contents$goog$object_extend(properties, {type:"text/javascript", charset:"UTF-8"}); goog.dom.setProperties(script, properties); goog.dom.safe.setScriptSrc(script, trustedUri); goog.net.jsloader.getScriptParentElement_(doc).appendChild(script); @@ -14449,7 +14920,7 @@ goog.json.parse = goog.json.USE_NATIVE_JSON ? goog.global.JSON.parse : function( var result = eval("(" + o + ")"); error && goog.json.errorLogger_("Invalid JSON: " + o, error); return result; - } catch (ex$27) { + } catch (ex$36) { } } throw Error("Invalid JSON string: " + o); @@ -14729,10 +15200,10 @@ third_party$javascript$closure$log$log$classdecl$var4.prototype.publish = functi }), target = target.parent; } }; -goog.log.LogRegistryEntry = third_party$javascript$closure$log$log$classdecl$var4; +goog.log.LogRegistryEntry_ = third_party$javascript$closure$log$log$classdecl$var4; var third_party$javascript$closure$log$log$classdecl$var5 = function() { this.entries = {}; - var rootLogRegistryEntry = new goog.log.LogRegistryEntry(goog.log.ROOT_LOGGER_NAME); + var rootLogRegistryEntry = new goog.log.LogRegistryEntry_(goog.log.ROOT_LOGGER_NAME); rootLogRegistryEntry.level = goog.log.Level.CONFIG; this.entries[goog.log.ROOT_LOGGER_NAME] = rootLogRegistryEntry; }; @@ -14741,7 +15212,7 @@ third_party$javascript$closure$log$log$classdecl$var5.prototype.getLogRegistryEn if (entry) { return void 0 !== level && (entry.level = level), entry; } - var lastDotIndex = name.lastIndexOf("."), parentLogRegistryEntry = this.getLogRegistryEntry(name.substr(0, lastDotIndex)), logRegistryEntry = new goog.log.LogRegistryEntry(name, parentLogRegistryEntry); + var lastDotIndex = name.lastIndexOf("."), parentLogRegistryEntry = this.getLogRegistryEntry(name.substr(0, lastDotIndex)), logRegistryEntry = new goog.log.LogRegistryEntry_(name, parentLogRegistryEntry); this.entries[name] = logRegistryEntry; parentLogRegistryEntry.children.push(logRegistryEntry); void 0 !== level && (logRegistryEntry.level = level); @@ -14753,23 +15224,23 @@ third_party$javascript$closure$log$log$classdecl$var5.prototype.getAllLoggers = return $jscomp$this.entries[loggerName].logger; }); }; -goog.log.LogRegistry = third_party$javascript$closure$log$log$classdecl$var5; -goog.log.LogRegistry.getInstance = function() { - goog.log.LogRegistry.instance_ || (goog.log.LogRegistry.instance_ = new goog.log.LogRegistry); - return goog.log.LogRegistry.instance_; +goog.log.LogRegistry_ = third_party$javascript$closure$log$log$classdecl$var5; +goog.log.LogRegistry_.getInstance = function() { + goog.log.LogRegistry_.instance_ || (goog.log.LogRegistry_.instance_ = new goog.log.LogRegistry_); + return goog.log.LogRegistry_.instance_; }; goog.log.getLogger = function(name, level) { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(name, level).logger : null; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(name, level).logger : null; }; goog.log.getRootLogger = function() { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger : null; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger : null; }; goog.log.addHandler = function(logger, handler) { - goog.log.ENABLED && logger && goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler); + goog.log.ENABLED && logger && goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler); }; goog.log.removeHandler = function(logger, handler) { if (goog.log.ENABLED && logger) { - var loggerEntry = goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()), indexOfHandler = loggerEntry.handlers.indexOf(handler); + var loggerEntry = goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()), indexOfHandler = loggerEntry.handlers.indexOf(handler); if (-1 !== indexOfHandler) { return loggerEntry.handlers.splice(indexOfHandler, 1), !0; } @@ -14777,19 +15248,19 @@ goog.log.removeHandler = function(logger, handler) { return !1; }; goog.log.setLevel = function(logger, level) { - goog.log.ENABLED && logger && (goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).level = level); + goog.log.ENABLED && logger && (goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level = level); }; goog.log.getLevel = function(logger) { - return goog.log.ENABLED && logger ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).level : null; + return goog.log.ENABLED && logger ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level : null; }; goog.log.getEffectiveLevel = function(logger) { - return goog.log.ENABLED && logger ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel() : goog.log.Level.OFF; + return goog.log.ENABLED && logger ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel() : goog.log.Level.OFF; }; goog.log.isLoggable = function(logger, level) { return goog.log.ENABLED && logger && level ? level.value >= goog.log.getEffectiveLevel(logger).value : !1; }; goog.log.getAllLoggers = function() { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getAllLoggers() : []; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getAllLoggers() : []; }; goog.log.getLogRecord = function(logger, level, msg, exception) { var logRecord = goog.log.LogBuffer.getInstance().addRecord(level || goog.log.Level.OFF, msg, logger.getName()); @@ -14797,12 +15268,12 @@ goog.log.getLogRecord = function(logger, level, msg, exception) { return logRecord; }; goog.log.publishLogRecord = function(logger, logRecord) { - goog.log.ENABLED && logger && goog.log.isLoggable(logger, logRecord.getLevel()) && goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord); + goog.log.ENABLED && logger && goog.log.isLoggable(logger, logRecord.getLevel()) && goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord); }; goog.log.log = function(logger, level, msg, exception) { if (goog.log.ENABLED && logger && goog.log.isLoggable(logger, level)) { level = level || goog.log.Level.OFF; - var loggerEntry = goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()); + var loggerEntry = goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()); "function" === typeof msg && (msg = msg()); var logRecord = goog.log.LogBuffer.getInstance().addRecord(level, msg, logger.getName()); exception && logRecord.setException(exception); @@ -15040,9 +15511,9 @@ goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_heade }, this), this.xhr_.upload && (this.xhr_.upload.onprogress = goog.bind(this.onProgressHandler_, this))); try { goog.log.fine(this.logger_, this.formatMsg_("Opening Xhr")), this.inOpen_ = !0, this.xhr_.open(method, String(url), !0), this.inOpen_ = !1; - } catch (err$28) { - goog.log.fine(this.logger_, this.formatMsg_("Error opening Xhr: " + err$28.message)); - this.error_(goog.net.ErrorCode.EXCEPTION, err$28); + } catch (err$37) { + goog.log.fine(this.logger_, this.formatMsg_("Error opening Xhr: " + err$37.message)); + this.error_(goog.net.ErrorCode.EXCEPTION, err$37); return; } var content = opt_content || "", headers = this.headers.clone(); @@ -15059,15 +15530,15 @@ goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_heade if ("setTrustToken" in this.xhr_ && this.trustToken_) { try { this.xhr_.setTrustToken(this.trustToken_); - } catch (err$29) { - goog.log.fine(this.logger_, this.formatMsg_("Error SetTrustToken: " + err$29.message)); + } catch (err$38) { + goog.log.fine(this.logger_, this.formatMsg_("Error SetTrustToken: " + err$38.message)); } } try { this.cleanUpTimeoutTimer_(), 0 < this.timeoutInterval_ && (this.useXhr2Timeout_ = goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_), goog.log.fine(this.logger_, this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete, xhr2 " + this.useXhr2Timeout_)), this.useXhr2Timeout_ ? (this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_] = this.timeoutInterval_, this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_] = goog.bind(this.timeout_, this)) : this.timeoutId_ = goog.Timer.callOnce(this.timeout_, this.timeoutInterval_, this)), goog.log.fine(this.logger_, this.formatMsg_("Sending request")), this.inSend_ = !0, this.xhr_.send(content), this.inSend_ = !1; - } catch (err$30) { - goog.log.fine(this.logger_, this.formatMsg_("Send error: " + err$30.message)), this.error_(goog.net.ErrorCode.EXCEPTION, err$30); + } catch (err$39) { + goog.log.fine(this.logger_, this.formatMsg_("Send error: " + err$39.message)), this.error_(goog.net.ErrorCode.EXCEPTION, err$39); } }; goog.net.XhrIo.shouldUseXhr2Timeout_ = function(xhr) { @@ -15267,7 +15738,7 @@ goog.net.XhrIo.prototype.getResponseHeaders = function() { } } } - return goog.object.map(headersObject, function(values) { + return module$contents$goog$object_map(headersObject, function(values) { return values.join(", "); }); }; @@ -15291,8 +15762,8 @@ goog.debug.entryPointRegistry.register(function(transformer) { }); ee.apiclient = {}; var module$contents$ee$apiclient_apiclient = {}; -ee.apiclient.VERSION = "v1alpha"; -ee.apiclient.API_CLIENT_VERSION = "0.1.254"; +ee.apiclient.VERSION = module$exports$ee$apiVersion.V1ALPHA; +ee.apiclient.API_CLIENT_VERSION = "0.1.270"; ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE; ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService; ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams; @@ -15331,49 +15802,52 @@ module$contents$ee$apiclient_Call.prototype.projectsPath = function() { return "projects/" + module$contents$ee$apiclient_apiclient.getProject(); }; module$contents$ee$apiclient_Call.prototype.algorithms = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.projects = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.assets = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.operations = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.value = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.maps = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.map = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.image = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.table = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.tables = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.video = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.videoMap = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); +}; +module$contents$ee$apiclient_Call.prototype.classifier = function() { + return new module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.thumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.videoThumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.filmstripThumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; var module$contents$ee$apiclient_EERequestService = function(sync, retries) { this.sync = sync = void 0 === sync ? !1 : sync; @@ -15385,12 +15859,12 @@ module$contents$ee$apiclient_EERequestService.prototype.send = function(params, module$contents$eeapiclient$request_params_processParams(params); var path = params.path || "", url = module$contents$ee$apiclient_apiclient.getSafeApiUrl() + path, args = module$contents$ee$apiclient_apiclient.makeRequest_(params.queryParams || {}), body = params.body ? JSON.stringify(params.body) : void 0; if (this.sync) { - var raw = module$contents$ee$apiclient_apiclient.send(url, args, void 0, params.httpMethod, body, this.retries), value$31 = responseCtor ? module$contents$eeapiclient$domain_object_deserialize(responseCtor, raw) : raw, thenable = function(v) { + var raw = module$contents$ee$apiclient_apiclient.send(url, args, void 0, params.httpMethod, body, this.retries), value$40 = responseCtor ? module$contents$eeapiclient$domain_object_deserialize(responseCtor, raw) : raw, thenable = function(v) { return {then:function(f) { return thenable(f(v)); }}; }; - return thenable(value$31); + return thenable(value$40); } return (new Promise(function(resolve, reject) { module$contents$ee$apiclient_apiclient.send(url, args, function(value, error) { @@ -15437,7 +15911,7 @@ module$contents$ee$apiclient_BatchRequestService.prototype.send = function(param module$contents$ee$apiclient_BatchRequestService.prototype.makeRequest = function(params) { }; module$contents$ee$apiclient_apiclient.parseBatchReply = function(contentType, responseText, handle) { - for (var boundary = contentType.split("; boundary=")[1], $jscomp$iter$11 = $jscomp.makeIterator(responseText.split("--" + boundary)), $jscomp$key$part = $jscomp$iter$11.next(); !$jscomp$key$part.done; $jscomp$key$part = $jscomp$iter$11.next()) { + for (var boundary = contentType.split("; boundary=")[1], $jscomp$iter$13 = $jscomp.makeIterator(responseText.split("--" + boundary)), $jscomp$key$part = $jscomp$iter$13.next(); !$jscomp$key$part.done; $jscomp$key$part = $jscomp$iter$13.next()) { var groups = $jscomp$key$part.value.split("\r\n\r\n"); if (!(3 > groups.length)) { var id = groups[0].match(/\r\nContent-ID: ]*)>/)[1], status = Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]), text = groups.slice(2).join("\r\n\r\n"); @@ -15462,9 +15936,16 @@ module$contents$ee$apiclient_apiclient.getSafeApiUrl = function() { var url = module$contents$ee$apiclient_apiclient.apiBaseUrl_.replace(/\/api$/, ""); return "window" in goog.global && !url.match(/^https?:\/\/content-/) ? url.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/, "$1content-$2") : url; }; -module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenType, accessToken, expiresIn, extraScopes, callback, updateAuthLibrary) { - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - extraScopes && (module$contents$goog$array_extend(scopes, extraScopes), module$contents$goog$array_removeDuplicates(scopes)); +module$contents$ee$apiclient_apiclient.mergeAuthScopes_ = function(includeDefaultScopes, includeStorageScope, extraScopes) { + var scopes = []; + includeDefaultScopes && (scopes = scopes.concat(module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_)); + includeStorageScope && scopes.push(module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_); + scopes = scopes.concat(extraScopes); + module$contents$goog$array_removeDuplicates(scopes); + return scopes; +}; +module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenType, accessToken, expiresIn, extraScopes, callback, updateAuthLibrary, suppressDefaultScopes) { + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!suppressDefaultScopes, !1, extraScopes || []); module$contents$ee$apiclient_apiclient.authClientId_ = clientId; module$contents$ee$apiclient_apiclient.authScopes_ = scopes; var tokenObject = {token_type:tokenType, access_token:accessToken, state:scopes.join(" "), expires_in:expiresIn}; @@ -15560,8 +16041,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType, }, version = "0.1.254"; - "0.1.254" === version && (version = "latest"); + var headers = {"Content-Type":contentType, }, version = "0.1.270"; + "0.1.270" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { @@ -15593,7 +16074,7 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m }, xmlHttp, retryCount = 0, maxRetries = null != retries ? retries : module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_;;) { xmlHttp = (0,goog.net.XmlHttp)(); xmlHttp.open(method, url, !1); - goog.object.forEach(headers, setRequestHeader, xmlHttp); + module$contents$goog$object_forEach(headers, setRequestHeader, xmlHttp); xmlHttp.send(requestData); if (429 != xmlHttp.status || retryCount > maxRetries) { break; @@ -15711,7 +16192,7 @@ module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, err } }; module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { - for (var request = new goog.Uri.QueryData, $jscomp$iter$12 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$12.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$12.next()) { + for (var request = new goog.Uri.QueryData, $jscomp$iter$14 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$14.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$14.next()) { var $jscomp$destructuring$var11 = $jscomp.makeIterator($jscomp$key$.value), name = $jscomp$destructuring$var11.next().value, item = $jscomp$destructuring$var11.next().value; request.set(name, item); } @@ -15719,7 +16200,7 @@ module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { }; module$contents$ee$apiclient_apiclient.setupMockSend = function(calls) { function getResponse(url, method, data) { - url = url.replace(apiBaseUrl, "").replace("v1alpha/projects/" + module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_ + "/", ""); + url = url.replace(apiBaseUrl, "").replace(module$exports$ee$apiVersion.V1ALPHA + "/projects/" + module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_ + "/", ""); if (url in calls) { var response = calls[url]; } else { @@ -15735,7 +16216,7 @@ module$contents$ee$apiclient_apiclient.setupMockSend = function(calls) { } return response; } - calls = calls ? goog.object.clone(calls) : {}; + calls = calls ? module$contents$goog$object_clone(calls) : {}; var apiBaseUrl; goog.net.XhrIo.send = function(url, callback, method, data) { apiBaseUrl = apiBaseUrl || module$contents$ee$apiclient_apiclient.apiBaseUrl_; @@ -15808,7 +16289,9 @@ module$contents$ee$apiclient_apiclient.authClientId_ = null; module$contents$ee$apiclient_apiclient.authScopes_ = []; module$contents$ee$apiclient_apiclient.authTokenRefresher_ = null; module$contents$ee$apiclient_apiclient.AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine"; +module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine.readonly"; module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_ = "https://www.googleapis.com/auth/cloud-platform"; +module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_ = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_ = goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}"); module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_ = "https://www.googleapis.com/auth/devstorage.read_write"; module$contents$ee$apiclient_apiclient.cloudApiKey_ = null; @@ -15842,8 +16325,10 @@ ee.apiclient.PROFILE_REQUEST_HEADER = module$contents$ee$apiclient_apiclient.PRO ee.apiclient.API_CLIENT_VERSION_HEADER = module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER; ee.apiclient.send = module$contents$ee$apiclient_apiclient.send; ee.apiclient.AUTH_SCOPE = module$contents$ee$apiclient_apiclient.AUTH_SCOPE_; +ee.apiclient.READ_ONLY_AUTH_SCOPE = module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_; ee.apiclient.CLOUD_PLATFORM_SCOPE = module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_; ee.apiclient.STORAGE_SCOPE = module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_; +ee.apiclient.DEFAULT_AUTH_SCOPES = module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_; ee.apiclient.makeRequest = module$contents$ee$apiclient_apiclient.makeRequest_; ee.apiclient.reset = module$contents$ee$apiclient_apiclient.reset; ee.apiclient.initialize = module$contents$ee$apiclient_apiclient.initialize; @@ -15860,6 +16345,7 @@ ee.apiclient.setAuthToken = module$contents$ee$apiclient_apiclient.setAuthToken; ee.apiclient.clearAuthToken = module$contents$ee$apiclient_apiclient.clearAuthToken; ee.apiclient.setAuthTokenRefresher = module$contents$ee$apiclient_apiclient.setAuthTokenRefresher; ee.apiclient.setAppIdToken = module$contents$ee$apiclient_apiclient.setAppIdToken; +ee.apiclient.mergeAuthScopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_; ee.apiclient.setupMockSend = module$contents$ee$apiclient_apiclient.setupMockSend; ee.apiclient.setParamAugmenter = module$contents$ee$apiclient_apiclient.setParamAugmenter; ee.apiclient.withProfiling = module$contents$ee$apiclient_apiclient.withProfiling; @@ -16056,7 +16542,7 @@ ee.rpc_convert.algorithms = function(result) { algorithm.deprecated && (internalAlgorithm.deprecated = algorithm.deprecationReason); algorithm.sourceCodeUri && (internalAlgorithm.sourceCodeUri = algorithm.sourceCodeUri); return internalAlgorithm; - }, internalAlgorithms = {}, $jscomp$iter$13 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$13.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$13.next()) { + }, internalAlgorithms = {}, $jscomp$iter$15 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$15.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$15.next()) { var algorithm$jscomp$0 = $jscomp$key$algorithm.value, name = algorithm$jscomp$0.name.replace(/^algorithms\//, ""); internalAlgorithms[name] = convertAlgorithm(algorithm$jscomp$0); } @@ -16111,6 +16597,8 @@ ee.rpc_convert.assetTypeToLegacyAssetType = function(type) { return "ImageCollection"; case "TABLE": return "Table"; + case "CLASSIFIER": + return "Classifier"; default: return "Unknown"; } @@ -16163,17 +16651,25 @@ ee.rpc_convert.assetToLegacyResult = function(result) { ee.rpc_convert.legacyPropertiesToAssetUpdate = function(legacyProperties) { var asset = new module$exports$eeapiclient$ee_api_client.EarthEngineAsset, toTimestamp = function(msec) { return (new Date(Number(msec))).toISOString(); - }, properties = Object.assign({}, legacyProperties), value, extractValue = function(key) { - value = properties[key]; + }, asNull = function(value) { + return null === value ? module$exports$eeapiclient$domain_object.NULL_VALUE : void 0; + }, properties = Object.assign({}, legacyProperties), value$jscomp$0, extractValue = function(key) { + value$jscomp$0 = properties[key]; delete properties[key]; - return value; + return value$jscomp$0; }; - extractValue("system:asset_size") && (asset.sizeBytes = String(value)); - extractValue("system:time_start") && (asset.startTime = toTimestamp(value)); - extractValue("system:time_end") && (asset.endTime = toTimestamp(value)); - extractValue("system:footprint") && (asset.geometry = value); - "string" === typeof extractValue("system:title") && null == properties.title && (properties.title = value); - "string" === typeof extractValue("system:description") && null == properties.description && (properties.description = value); + void 0 !== extractValue("system:asset_size") && (asset.sizeBytes = asNull(value$jscomp$0) || String(value$jscomp$0)); + void 0 !== extractValue("system:time_start") && (asset.startTime = asNull(value$jscomp$0) || toTimestamp(value$jscomp$0)); + void 0 !== extractValue("system:time_end") && (asset.endTime = asNull(value$jscomp$0) || toTimestamp(value$jscomp$0)); + void 0 !== extractValue("system:footprint") && (asset.geometry = asNull(value$jscomp$0) || value$jscomp$0); + extractValue("system:title"); + "string" !== typeof value$jscomp$0 && null !== value$jscomp$0 || null != properties.title || (properties.title = asNull(value$jscomp$0) || value$jscomp$0); + extractValue("system:description"); + "string" !== typeof value$jscomp$0 && null !== value$jscomp$0 || null != properties.description || (properties.description = asNull(value$jscomp$0) || value$jscomp$0); + Object.entries(properties).forEach(function($jscomp$destructuring$var12) { + var $jscomp$destructuring$var13 = $jscomp.makeIterator($jscomp$destructuring$var12), key = $jscomp$destructuring$var13.next().value, value = $jscomp$destructuring$var13.next().value; + properties[key] = asNull(value) || value; + }); asset.properties = properties; return asset; }; @@ -16196,9 +16692,9 @@ ee.rpc_convert.getListToListImages = function(param) { param.bbox && (imagesRequest.region = ee.rpc_convert.boundingBoxToGeoJson(param.bbox)); param.region && (imagesRequest.region = param.region); param.bbox && param.region && console.warn("Multiple request parameters converted to region"); - for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$14 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { + for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$16 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { return !allKeys.includes(k); - })), $jscomp$key$key = $jscomp$iter$14.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$14.next()) { + })), $jscomp$key$key = $jscomp$iter$16.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$16.next()) { console.warn("Unrecognized key " + $jscomp$key$key.value + " ignored"); } imagesRequest.fields = "assets(type,path)"; @@ -16660,12 +17156,12 @@ ee.Serializer.prototype.encodeValue_ = function(object) { }, this); } else { if (goog.isObject(object) && "function" !== typeof object) { - var encodedObject = goog.object.map(object, function(element) { + var encodedObject = module$contents$goog$object_map(object, function(element) { if ("function" !== typeof element) { return this.encodeValue_(element); } }, this); - goog.object.remove(encodedObject, this.HASH_KEY); + module$contents$goog$object_remove(encodedObject, this.HASH_KEY); result = {type:"Dictionary", value:encodedObject}; } else { throw Error("Can't encode object: " + object); @@ -16702,10 +17198,10 @@ ee.Serializer.encodeCloudApiPretty = function(obj) { if (!goog.isObject(object)) { return object; } - for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$15 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$15.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$15.next()) { - var $jscomp$destructuring$var13 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var13.next().value, val = $jscomp$destructuring$var13.next().value; - isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:goog.object.map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? null : val : walkObject(val)) : - ret[key] = walkObject(val); + for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$17 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$17.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$17.next()) { + var $jscomp$destructuring$var15 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var15.next().value, val = $jscomp$destructuring$var15.next().value; + isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:module$contents$goog$object_map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? + null : val : walkObject(val)) : ret[key] = walkObject(val); } return ret; }; @@ -16814,8 +17310,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { })) : ee.rpc_node.array(arr); } if (null != value.dictionaryValue) { - for (var values = {}, constantValues = {}, $jscomp$iter$16 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$16.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$16.next()) { - var $jscomp$destructuring$var15 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var15.next().value, v$jscomp$0 = $jscomp$destructuring$var15.next().value; + for (var values = {}, constantValues = {}, $jscomp$iter$18 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$18.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$18.next()) { + var $jscomp$destructuring$var17 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var17.next().value, v$jscomp$0 = $jscomp$destructuring$var17.next().value; values[k] = this.optimizeValue(v$jscomp$0, depth + 3); null !== constantValues && isConst(values[k]) ? constantValues[k] = serializeConst(values[k].constantValue) : constantValues = null; } @@ -16826,9 +17322,9 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return ee.rpc_node.functionDefinition(def.argumentNames || [], this.optimizeReference(def.body || "")); } if (null != value.functionInvocationValue) { - for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$17 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$17.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$17.next()) { - var k$32 = $jscomp$key$k.value; - args[k$32] = this.optimizeValue(inv.arguments[k$32], depth + 3); + for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$19 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$19.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$19.next()) { + var k$41 = $jscomp$key$k.value; + args[k$41] = this.optimizeValue(inv.arguments[k$41], depth + 3); } return inv.functionName ? ee.rpc_node.functionByName(inv.functionName, args) : ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference || ""), args); } @@ -16857,3763 +17353,217 @@ ExpressionOptimizer.prototype.countReferences = function() { Object.values(inv.arguments).forEach(visitValue); } else { null != value.valueReference && visitReference(value.valueReference); - } - } - } - } - }; - visitReference(this.rootReference); - return counts; -}; -ee.rpc_convert_batch = {}; -ee.rpc_convert_batch.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; -ee.rpc_convert_batch.taskToExportImageRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var result = new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, grid:null, maxPixels:stringOrNull_(params.maxPixels), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); - switch(destination) { - case ee.rpc_convert_batch.ExportDestination.GCS: - case ee.rpc_convert_batch.ExportDestination.DRIVE: - result.fileExportOptions = ee.rpc_convert_batch.buildImageFileExportOptions_(params, destination); - break; - case ee.rpc_convert_batch.ExportDestination.ASSET: - result.assetExportOptions = ee.rpc_convert_batch.buildImageAssetExportOptions_(params); - break; - default: - throw Error('Export destination "' + destination + '" unknown'); - } - return result; -}; -ee.rpc_convert_batch.taskToExportTableRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var selectors = params.selectors || null; - null != selectors && "string" === typeof selectors && (selectors = selectors.split(",")); - var result = new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, selectors:selectors, maxErrorMeters:numberOrNull_(params.maxErrorMeters), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); - switch(destination) { - case ee.rpc_convert_batch.ExportDestination.GCS: - case ee.rpc_convert_batch.ExportDestination.DRIVE: - result.fileExportOptions = ee.rpc_convert_batch.buildTableFileExportOptions_(params, destination); - break; - case ee.rpc_convert_batch.ExportDestination.ASSET: - result.assetExportOptions = ee.rpc_convert_batch.buildTableAssetExportOptions_(params); - break; - default: - throw Error('Export destination "' + destination + '" unknown'); - } - return result; -}; -ee.rpc_convert_batch.taskToExportVideoRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var result = new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params), fileExportOptions:null, requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); - result.fileExportOptions = ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.guessDestination_(params)); - return result; -}; -ee.rpc_convert_batch.taskToExportMapRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); -}; -ee.rpc_convert_batch.taskToExportVideoMapRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), - version:stringOrNull_(params.version), maxWorkerCount:numberOrNull_(params.maxWorkers)}); -}; -function stringOrNull_(value) { - return null != value ? String(value) : null; -} -function numberOrNull_(value) { - return null != value ? Number(value) : null; -} -ee.rpc_convert_batch.guessDestination_ = function(params) { - var destination = ee.rpc_convert_batch.ExportDestination.DRIVE; - if (null == params) { - return destination; - } - null != params.outputBucket || null != params.outputPrefix ? destination = ee.rpc_convert_batch.ExportDestination.GCS : null != params.assetId && (destination = ee.rpc_convert_batch.ExportDestination.ASSET); - return destination; -}; -ee.rpc_convert_batch.buildGeoTiffFormatOptions_ = function(params) { - if (params.fileDimensions && params.tiffFileDimensions) { - throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); - } - return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized, skipEmptyFiles:!(!params.skipEmptyTiles && !params.tiffSkipEmptyFiles), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions || params.tiffFileDimensions), }); -}; -ee.rpc_convert_batch.buildTfRecordFormatOptions_ = function(params) { - var tfRecordOptions = new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed, maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize), sequenceData:!!params.tfrecordSequenceData, collapseBands:!!params.tfrecordCollapseBands, maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold), defaultValue:numberOrNull_(params.tfrecordDefaultValue), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions), - marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize), tensorDepths:null, }), tensorDepths = params.tfrecordTensorDepths; - if (null != tensorDepths) { - if (goog.isObject(tensorDepths)) { - var result = {}; - goog.object.forEach(tensorDepths, function(v, k) { - if ("string" !== typeof k || "number" !== typeof v) { - throw Error('"tensorDepths" option must be an object of type Object'); - } - result[k] = v; - }); - tfRecordOptions.tensorDepths = result; - } else { - throw Error('"tensorDepths" option needs to have the form Object.'); - } - } - return tfRecordOptions; -}; -ee.rpc_convert_batch.buildImageFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null, driveDestination:null, geoTiffOptions:null, tfRecordOptions:null, fileFormat:ee.rpc_convert.fileFormat(params.fileFormat), }); - "GEO_TIFF" === result.fileFormat ? result.geoTiffOptions = ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params) : "TF_RECORD_IMAGE" === result.fileFormat && (result.tfRecordOptions = ee.rpc_convert_batch.buildTfRecordFormatOptions_(params)); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildImageAssetExportOptions_ = function(params) { - var allPolicies = params.pyramidingPolicy || {}; - try { - allPolicies = JSON.parse(allPolicies); - } catch ($jscomp$unused$catch) { - } - var defaultPyramidingPolicy = "PYRAMIDING_POLICY_UNSPECIFIED"; - "string" === typeof allPolicies ? (defaultPyramidingPolicy = allPolicies, allPolicies = {}) : allPolicies[".default"] && (defaultPyramidingPolicy = allPolicies[".default"], delete allPolicies[".default"]); - return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params), pyramidingPolicy:defaultPyramidingPolicy, pyramidingPolicyOverrides:goog.object.isEmpty(allPolicies) ? null : allPolicies, }); -}; -ee.rpc_convert_batch.buildTableFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat), }); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildTableAssetExportOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}); -}; -ee.rpc_convert_batch.buildVideoFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:"MP4", }); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildVideoOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:stringOrNull_(params.maxPixels), }); -}; -ee.rpc_convert_batch.buildVideoMapOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:null, }); -}; -ee.rpc_convert_batch.buildTileOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom), scale:numberOrNull_(params.scale), minZoom:numberOrNull_(params.minZoom), skipEmptyTiles:!!params.skipEmptyTiles, mapsApiKey:stringOrNull_(params.mapsApiKey), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions), stride:numberOrNull_(params.stride), zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset), - numberOrNull_(params.maxTimeMachineZoomSubset)), }); -}; -ee.rpc_convert_batch.buildZoomSubset_ = function(min, max) { - if (null == min && null == max) { - return null; - } - var result = new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0, max:null}); - null != min && (result.min = min); - result.max = max; - return result; -}; -ee.rpc_convert_batch.buildGridDimensions_ = function(dimensions) { - if (null == dimensions) { - return null; - } - var result = new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0, width:0}); - "string" === typeof dimensions && (-1 !== dimensions.indexOf("x") ? dimensions = dimensions.split("x").map(Number) : -1 !== dimensions.indexOf(",") && (dimensions = dimensions.split(",").map(Number))); - if (Array.isArray(dimensions)) { - if (2 === dimensions.length) { - result.height = dimensions[0], result.width = dimensions[1]; - } else { - if (1 === dimensions.length) { - result.height = dimensions[0], result.width = dimensions[0]; - } else { - throw Error("Unable to construct grid from dimensions: " + dimensions); - } - } - } else { - if ("number" !== typeof dimensions || isNaN(dimensions)) { - if (goog.isObject(dimensions) && null != dimensions.height && null != dimensions.width) { - result.height = dimensions.height, result.width = dimensions.width; - } else { - throw Error("Unable to construct grid from dimensions: " + dimensions); - } - } else { - result.height = dimensions, result.width = dimensions; - } - } - return result; -}; -ee.rpc_convert_batch.buildGcsDestination_ = function(params) { - var permissions = null; - null != params.writePublicTiles && (permissions = params.writePublicTiles ? "PUBLIC" : "DEFAULT_OBJECT_ACL"); - return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket), filenamePrefix:stringOrNull_(params.outputPrefix), bucketCorsUris:params.bucketCorsUris || null, permissions:permissions, }); -}; -ee.rpc_convert_batch.buildDriveDestination_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder), filenamePrefix:stringOrNull_(params.driveFileNamePrefix), }); -}; -ee.rpc_convert_batch.buildEarthEngineDestination_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)}); -}; -var jspb = {}, module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage = function() { -}; -module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage.prototype.toDebugString = function() { -}; -module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage.prototype.toDebugStringInternal = function(indentLevel) { -}; -jspb.ConstBinaryMessage = module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage; -jspb.BinaryMessage = function() { -}; -jspb.ScalarFieldType = void 0; -jspb.RepeatedFieldType = void 0; -jspb.AnyFieldType = void 0; -jspb.BinaryConstants = {}; -var module$contents$jspb$BinaryConstants_FieldType = {INVALID:-1, DOUBLE:1, FLOAT:2, INT64:3, UINT64:4, INT32:5, FIXED64:6, FIXED32:7, BOOL:8, STRING:9, GROUP:10, MESSAGE:11, BYTES:12, UINT32:13, ENUM:14, SFIXED32:15, SFIXED64:16, SINT32:17, SINT64:18, }, module$contents$jspb$BinaryConstants_WireType = {INVALID:-1, VARINT:0, FIXED64:1, DELIMITED:2, START_GROUP:3, END_GROUP:4, FIXED32:5}; -function module$contents$jspb$BinaryConstants_FieldTypeToWireType(fieldType) { - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.INT32: - case module$contents$jspb$BinaryConstants_FieldType.INT64: - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - return module$contents$jspb$BinaryConstants_WireType.VARINT; - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - return module$contents$jspb$BinaryConstants_WireType.FIXED64; - case module$contents$jspb$BinaryConstants_FieldType.STRING: - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - return module$contents$jspb$BinaryConstants_WireType.DELIMITED; - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - return module$contents$jspb$BinaryConstants_WireType.FIXED32; - default: - return module$contents$jspb$BinaryConstants_WireType.INVALID; - } -} -jspb.BinaryConstants.FieldType = module$contents$jspb$BinaryConstants_FieldType; -jspb.BinaryConstants.FieldTypeToWireType = module$contents$jspb$BinaryConstants_FieldTypeToWireType; -jspb.BinaryConstants.FLOAT32_EPS = 1.401298464324817e-45; -jspb.BinaryConstants.FLOAT32_MIN = 1.1754943508222875e-38; -jspb.BinaryConstants.FLOAT32_MAX = 3.4028234663852886e+38; -jspb.BinaryConstants.FLOAT64_EPS = 5e-324; -jspb.BinaryConstants.FLOAT64_MIN = 2.2250738585072014e-308; -jspb.BinaryConstants.FLOAT64_MAX = 1.7976931348623157e+308; -jspb.BinaryConstants.INVALID_FIELD_NUMBER = -1; -jspb.BinaryConstants.TWO_TO_20 = 1048576; -jspb.BinaryConstants.TWO_TO_23 = 8388608; -jspb.BinaryConstants.TWO_TO_31 = 2147483648; -jspb.BinaryConstants.TWO_TO_32 = 4294967296; -jspb.BinaryConstants.TWO_TO_52 = 4503599627370496; -jspb.BinaryConstants.TWO_TO_63 = 9223372036854775808; -jspb.BinaryConstants.TWO_TO_64 = 18446744073709551616; -jspb.BinaryConstants.WireType = module$contents$jspb$BinaryConstants_WireType; -jspb.BinaryConstants.ZERO_HASH = "\x00\x00\x00\x00\x00\x00\x00\x00"; -jspb.ByteSource = void 0; -goog.crypt.stringToByteArray = function(str) { - for (var output = [], p = 0, i = 0; i < str.length; i++) { - var c = str.charCodeAt(i); - 255 < c && (output[p++] = c & 255, c >>= 8); - output[p++] = c; - } - return output; -}; -goog.crypt.byteArrayToString = function(bytes) { - if (8192 >= bytes.length) { - return String.fromCharCode.apply(null, bytes); - } - for (var str = "", i = 0; i < bytes.length; i += 8192) { - var chunk = module$contents$goog$array_slice(bytes, i, i + 8192); - str += String.fromCharCode.apply(null, chunk); - } - return str; -}; -goog.crypt.byteArrayToHex = function(array, opt_separator) { - return module$contents$goog$array_map(array, function(numByte) { - var hexByte = numByte.toString(16); - return 1 < hexByte.length ? hexByte : "0" + hexByte; - }).join(opt_separator || ""); -}; -goog.crypt.hexToByteArray = function(hexString) { - goog.asserts.assert(0 == hexString.length % 2, "Key string length must be multiple of 2"); - for (var arr = [], i = 0; i < hexString.length; i += 2) { - arr.push(parseInt(hexString.substring(i, i + 2), 16)); - } - return arr; -}; -goog.crypt.stringToUtf8ByteArray = function(str) { - for (var out = [], p = 0, i = 0; i < str.length; i++) { - var c = str.charCodeAt(i); - 128 > c ? out[p++] = c : (2048 > c ? out[p++] = c >> 6 | 192 : (55296 == (c & 64512) && i + 1 < str.length && 56320 == (str.charCodeAt(i + 1) & 64512) ? (c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023), out[p++] = c >> 18 | 240, out[p++] = c >> 12 & 63 | 128) : out[p++] = c >> 12 | 224, out[p++] = c >> 6 & 63 | 128), out[p++] = c & 63 | 128); - } - return out; -}; -goog.crypt.utf8ByteArrayToString = function(bytes) { - for (var out = [], pos = 0, c = 0; pos < bytes.length;) { - var c1 = bytes[pos++]; - if (128 > c1) { - out[c++] = String.fromCharCode(c1); - } else { - if (191 < c1 && 224 > c1) { - var c2 = bytes[pos++]; - out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63); - } else { - if (239 < c1 && 365 > c1) { - c2 = bytes[pos++]; - var c3 = bytes[pos++], c4 = bytes[pos++], u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 65536; - out[c++] = String.fromCharCode(55296 + (u >> 10)); - out[c++] = String.fromCharCode(56320 + (u & 1023)); - } else { - c2 = bytes[pos++], c3 = bytes[pos++], out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63); - } - } - } - } - return out.join(""); -}; -goog.crypt.xorByteArray = function(bytes1, bytes2) { - goog.asserts.assert(bytes1.length == bytes2.length, "XOR array lengths must match"); - for (var result = [], i = 0; i < bytes1.length; i++) { - result.push(bytes1[i] ^ bytes2[i]); - } - return result; -}; -jspb.utils = {}; -var module$contents$jspb$utils_split64Low = 0, module$contents$jspb$utils_split64High = 0; -function module$contents$jspb$utils_splitUint64(value) { - var lowBits = value >>> 0, highBits = Math.floor((value - lowBits) / 4294967296) >>> 0; - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitInt64(value) { - var sign = 0 > value; - value = Math.abs(value); - var lowBits = value >>> 0, highBits = Math.floor((value - lowBits) / 4294967296); - highBits >>>= 0; - sign && (highBits = ~highBits >>> 0, lowBits = (~lowBits >>> 0) + 1, 4294967295 < lowBits && (lowBits = 0, highBits++, 4294967295 < highBits && (highBits = 0))); - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitZigzag64(value) { - var sign = 0 > value; - value = 2 * Math.abs(value); - module$contents$jspb$utils_splitUint64(value); - var lowBits = module$contents$jspb$utils_split64Low, highBits = module$contents$jspb$utils_split64High; - sign && (0 == lowBits ? 0 == highBits ? highBits = lowBits = 4294967295 : (highBits--, lowBits = 4294967295) : lowBits--); - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitFloat32(value) { - var sign = 0 > value ? 1 : 0; - value = sign ? -value : value; - if (0 === value) { - 0 < 1 / value ? module$contents$jspb$utils_split64Low = module$contents$jspb$utils_split64High = 0 : (module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = 2147483648); - } else { - if (isNaN(value)) { - module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = 2147483647; - } else { - if (3.4028234663852886e+38 < value) { - module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = (sign << 31 | 2139095040) >>> 0; - } else { - if (1.1754943508222875e-38 > value) { - var mant = Math.round(value / Math.pow(2, -149)); - module$contents$jspb$utils_split64High = 0; - module$contents$jspb$utils_split64Low = (sign << 31 | mant) >>> 0; - } else { - var exp = Math.floor(Math.log(value) / Math.LN2); - mant = value * Math.pow(2, -exp); - mant = Math.round(8388608 * mant) & 8388607; - module$contents$jspb$utils_split64High = 0; - module$contents$jspb$utils_split64Low = (sign << 31 | exp + 127 << 23 | mant) >>> 0; - } - } - } - } -} -function module$contents$jspb$utils_splitFloat64(value) { - var sign = 0 > value ? 1 : 0; - value = sign ? -value : value; - if (0 === value) { - module$contents$jspb$utils_split64High = 0 < 1 / value ? 0 : 2147483648, module$contents$jspb$utils_split64Low = 0; - } else { - if (isNaN(value)) { - module$contents$jspb$utils_split64High = 2147483647, module$contents$jspb$utils_split64Low = 4294967295; - } else { - if (1.7976931348623157e+308 < value) { - module$contents$jspb$utils_split64High = (sign << 31 | 2146435072) >>> 0, module$contents$jspb$utils_split64Low = 0; - } else { - if (2.2250738585072014e-308 > value) { - var mant = value / Math.pow(2, -1074), mantHigh; - module$contents$jspb$utils_split64High = (sign << 31 | mant / 4294967296) >>> 0; - module$contents$jspb$utils_split64Low = mant >>> 0; - } else { - var x = value, exp = 0; - if (2 <= x) { - for (; 2 <= x && 1023 > exp;) { - exp++, x /= 2; - } - } else { - for (; 1 > x && -1022 < exp;) { - x *= 2, exp--; - } - } - mant = value * Math.pow(2, -exp); - var mantLow; - module$contents$jspb$utils_split64High = (sign << 31 | exp + 1023 << 20 | 1048576 * mant & 1048575) >>> 0; - module$contents$jspb$utils_split64Low = 4503599627370496 * mant >>> 0; - } - } - } - } -} -function module$contents$jspb$utils_splitHash64(hash) { - var e = hash.charCodeAt(4), f = hash.charCodeAt(5), g = hash.charCodeAt(6), h = hash.charCodeAt(7); - module$contents$jspb$utils_split64Low = hash.charCodeAt(0) + (hash.charCodeAt(1) << 8) + (hash.charCodeAt(2) << 16) + (hash.charCodeAt(3) << 24) >>> 0; - module$contents$jspb$utils_split64High = e + (f << 8) + (g << 16) + (h << 24) >>> 0; -} -function module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh) { - return 4294967296 * bitsHigh + (bitsLow >>> 0); -} -function module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh) { - var sign = bitsHigh & 2147483648; - sign && (bitsLow = ~bitsLow + 1 >>> 0, bitsHigh = ~bitsHigh >>> 0, 0 == bitsLow && (bitsHigh = bitsHigh + 1 >>> 0)); - var result = module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); - return sign ? -result : result; -} -function module$contents$jspb$utils_toZigzag64(bitsLow, bitsHigh, convert) { - var signFlipMask = bitsHigh >> 31; - return convert(bitsLow << 1 ^ signFlipMask, (bitsHigh << 1 | bitsLow >>> 31) ^ signFlipMask); -} -function module$contents$jspb$utils_joinZigzag64(bitsLow, bitsHigh) { - return module$contents$jspb$utils_fromZigzag64(bitsLow, bitsHigh, module$contents$jspb$utils_joinInt64); -} -function module$contents$jspb$utils_fromZigzag64(bitsLow, bitsHigh, convert) { - var signFlipMask = -(bitsLow & 1); - return convert((bitsLow >>> 1 | bitsHigh << 31) ^ signFlipMask, bitsHigh >>> 1 ^ signFlipMask); -} -function module$contents$jspb$utils_joinFloat32(bitsLow, bitsHigh) { - var sign = 2 * (bitsLow >> 31) + 1, exp = bitsLow >>> 23 & 255, mant = bitsLow & 8388607; - return 255 == exp ? mant ? NaN : Infinity * sign : 0 == exp ? sign * Math.pow(2, -149) * mant : sign * Math.pow(2, exp - 150) * (mant + Math.pow(2, 23)); -} -function module$contents$jspb$utils_joinFloat64(bitsLow, bitsHigh) { - var sign = 2 * (bitsHigh >> 31) + 1, exp = bitsHigh >>> 20 & 2047, mant = 4294967296 * (bitsHigh & 1048575) + bitsLow; - return 2047 == exp ? mant ? NaN : Infinity * sign : 0 == exp ? sign * Math.pow(2, -1074) * mant : sign * Math.pow(2, exp - 1075) * (mant + 4503599627370496); -} -function module$contents$jspb$utils_joinHash64(bitsLow, bitsHigh) { - return String.fromCharCode(bitsLow >>> 0 & 255, bitsLow >>> 8 & 255, bitsLow >>> 16 & 255, bitsLow >>> 24 & 255, bitsHigh >>> 0 & 255, bitsHigh >>> 8 & 255, bitsHigh >>> 16 & 255, bitsHigh >>> 24 & 255); -} -function module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh) { - function decimalFrom1e7(digit1e7, needLeadingZeros) { - var partial = digit1e7 ? String(digit1e7) : ""; - return needLeadingZeros ? "0000000".slice(partial.length) + partial : partial; - } - if (2097151 >= bitsHigh) { - return "" + (4294967296 * bitsHigh + bitsLow); - } - var mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215, high = bitsHigh >> 16 & 65535, digitA = (bitsLow & 16777215) + 6777216 * mid + 6710656 * high, digitB = mid + 8147497 * high, digitC = 2 * high; - 10000000 <= digitA && (digitB += Math.floor(digitA / 10000000), digitA %= 10000000); - 10000000 <= digitB && (digitC += Math.floor(digitB / 10000000), digitB %= 10000000); - return decimalFrom1e7(digitC, 0) + decimalFrom1e7(digitB, digitC) + decimalFrom1e7(digitA, 1); -} -function module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh) { - var negative = bitsHigh & 2147483648; - negative && (bitsLow = ~bitsLow + 1 >>> 0, bitsHigh = ~bitsHigh + (0 == bitsLow ? 1 : 0) >>> 0); - var result = module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); - return negative ? "-" + result : result; -} -function module$contents$jspb$utils_hash64ToDecimalString(hash, signed) { - module$contents$jspb$utils_splitHash64(hash); - var bitsLow = module$contents$jspb$utils_split64Low, bitsHigh = module$contents$jspb$utils_split64High; - return signed ? module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh) : module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); -} -function module$contents$jspb$utils_decimalStringToHash64(dec) { - function muladd(m, c) { - for (var i = 0; 8 > i && (1 !== m || 0 < c); i++) { - var r = m * resultBytes[i] + c; - resultBytes[i] = r & 255; - c = r >>> 8; - } - } - function neg() { - for (var i = 0; 8 > i; i++) { - resultBytes[i] = ~resultBytes[i] & 255; - } - } - (0,goog.asserts.assert)(0 < dec.length); - var minus = !1; - "-" === dec[0] && (minus = !0, dec = dec.slice(1)); - for (var resultBytes = [0, 0, 0, 0, 0, 0, 0, 0], i$jscomp$0 = 0; i$jscomp$0 < dec.length; i$jscomp$0++) { - muladd(10, dec.charCodeAt(i$jscomp$0) - 48); - } - minus && (neg(), muladd(1, 1)); - return goog.crypt.byteArrayToString(resultBytes); -} -function module$contents$jspb$utils_splitDecimalString(value) { - module$contents$jspb$utils_splitHash64(module$contents$jspb$utils_decimalStringToHash64(value)); -} -function module$contents$jspb$utils_toHexDigit_(nibble) { - return String.fromCharCode(10 > nibble ? 48 + nibble : 87 + nibble); -} -function module$contents$jspb$utils_fromHexCharCode_(hexCharCode) { - return 97 <= hexCharCode ? hexCharCode - 97 + 10 : hexCharCode - 48; -} -function module$contents$jspb$utils_countFixedFields_(buffer, start, end, tag, stride) { - var count = 0, cursor = start; - if (128 > tag) { - for (; cursor < end && buffer[cursor++] == tag;) { - count++, cursor += stride; - } - } else { - for (; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor++] != (temp & 127 | 128)) { - return count; - } - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - count++; - cursor += stride; - } - } - return count; -} -function module$contents$jspb$utils_byteSourceToUint8Array(data) { - if (data.constructor === Uint8Array) { - return data; - } - if (data.constructor === ArrayBuffer) { - return new Uint8Array(data); - } - if (data.constructor === Array) { - return new Uint8Array(data); - } - if (data.constructor === String) { - return goog.crypt.base64.decodeStringToUint8Array(data); - } - (0,goog.asserts.fail)("Type not convertible to Uint8Array."); - return new Uint8Array(0); -} -function module$contents$jspb$utils_getSplit64Low() { - return module$contents$jspb$utils_split64Low; -} -function module$contents$jspb$utils_getSplit64High() { - return module$contents$jspb$utils_split64High; -} -jspb.utils.byteSourceToUint8Array = module$contents$jspb$utils_byteSourceToUint8Array; -jspb.utils.countDelimitedFields = function module$contents$jspb$utils_countDelimitedFields(buffer, start, end, field) { - for (var count = 0, cursor = start, tag = 8 * field + module$contents$jspb$BinaryConstants_WireType.DELIMITED; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor++] != (temp & 127 | 128)) { - return count; - } - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - count++; - for (var length = 0, shift = 1; temp = buffer[cursor++], length += (temp & 127) * shift, shift *= 128, 0 != (temp & 128);) { - } - cursor += length; - } - return count; -}; -jspb.utils.countFixed32Fields = function module$contents$jspb$utils_countFixed32Fields(buffer, start, end, field) { - return module$contents$jspb$utils_countFixedFields_(buffer, start, end, 8 * field + module$contents$jspb$BinaryConstants_WireType.FIXED32, 4); -}; -jspb.utils.countFixed64Fields = function module$contents$jspb$utils_countFixed64Fields(buffer, start, end, field) { - return module$contents$jspb$utils_countFixedFields_(buffer, start, end, 8 * field + module$contents$jspb$BinaryConstants_WireType.FIXED64, 8); -}; -jspb.utils.countVarintFields = function module$contents$jspb$utils_countVarintFields(buffer, start, end, field) { - var count = 0, cursor = start, tag = 8 * field + module$contents$jspb$BinaryConstants_WireType.VARINT; - if (128 > tag) { - for (; cursor < end && buffer[cursor++] == tag;) { - for (count++;;) { - var x = buffer[cursor++]; - if (0 == (x & 128)) { - break; - } - } - } - } else { - for (; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor] != (temp & 127 | 128)) { - return count; - } - cursor++; - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - for (count++; x = buffer[cursor++], 0 != (x & 128);) { - } - } - } - return count; -}; -jspb.utils.countVarints = function module$contents$jspb$utils_countVarints(buffer, start, end) { - for (var count = 0, i = start; i < end; i++) { - count += buffer[i] >> 7; - } - return end - start - count; -}; -jspb.utils.debugBytesToTextFormat = function module$contents$jspb$utils_debugBytesToTextFormat(byteSource) { - var s = '"'; - if (byteSource) { - for (var bytes = module$contents$jspb$utils_byteSourceToUint8Array(byteSource), i = 0; i < bytes.length; i++) { - s += "\\x", 16 > bytes[i] && (s += "0"), s += bytes[i].toString(16); - } - } - return s + '"'; -}; -jspb.utils.debugScalarToTextFormat = function module$contents$jspb$utils_debugScalarToTextFormat(scalar) { - return "string" === typeof scalar ? goog.string.quote(scalar) : scalar.toString(); -}; -jspb.utils.decimalStringToHash64 = module$contents$jspb$utils_decimalStringToHash64; -jspb.utils.DIGITS = "0123456789abcdef".split(""); -jspb.utils.fromZigzag64 = module$contents$jspb$utils_fromZigzag64; -jspb.utils.hash64ArrayToDecimalStrings = function module$contents$jspb$utils_hash64ArrayToDecimalStrings(hashes, signed) { - for (var result = Array(hashes.length), i = 0; i < hashes.length; i++) { - result[i] = module$contents$jspb$utils_hash64ToDecimalString(hashes[i], signed); - } - return result; -}; -jspb.utils.hash64ToDecimalString = module$contents$jspb$utils_hash64ToDecimalString; -jspb.utils.hash64ToHexString = function module$contents$jspb$utils_hash64ToHexString(hash) { - var temp = Array(18); - temp[0] = "0"; - temp[1] = "x"; - for (var i = 0; 8 > i; i++) { - var c = hash.charCodeAt(7 - i); - temp[2 * i + 2] = module$contents$jspb$utils_toHexDigit_(c >> 4); - temp[2 * i + 3] = module$contents$jspb$utils_toHexDigit_(c & 15); - } - return temp.join(""); -}; -jspb.utils.hash64ToNumber = function module$contents$jspb$utils_hash64ToNumber(hash, signed) { - module$contents$jspb$utils_splitHash64(hash); - var bitsLow = module$contents$jspb$utils_split64Low, bitsHigh = module$contents$jspb$utils_split64High; - return signed ? module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh) : module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); -}; -jspb.utils.hexStringToHash64 = function module$contents$jspb$utils_hexStringToHash64(hex) { - hex = hex.toLowerCase(); - (0,goog.asserts.assert)(18 == hex.length); - (0,goog.asserts.assert)("0" == hex[0]); - (0,goog.asserts.assert)("x" == hex[1]); - for (var result = "", i = 0; 8 > i; i++) { - result = String.fromCharCode(16 * module$contents$jspb$utils_fromHexCharCode_(hex.charCodeAt(2 * i + 2)) + module$contents$jspb$utils_fromHexCharCode_(hex.charCodeAt(2 * i + 3))) + result; - } - return result; -}; -jspb.utils.joinFloat64 = module$contents$jspb$utils_joinFloat64; -jspb.utils.joinFloat32 = module$contents$jspb$utils_joinFloat32; -jspb.utils.joinHash64 = module$contents$jspb$utils_joinHash64; -jspb.utils.joinInt64 = module$contents$jspb$utils_joinInt64; -jspb.utils.joinSignedDecimalString = module$contents$jspb$utils_joinSignedDecimalString; -jspb.utils.joinUint64 = module$contents$jspb$utils_joinUint64; -jspb.utils.joinUnsignedDecimalString = module$contents$jspb$utils_joinUnsignedDecimalString; -jspb.utils.joinZigzag64 = module$contents$jspb$utils_joinZigzag64; -jspb.utils.numberToHash64 = function module$contents$jspb$utils_numberToHash64(value) { - module$contents$jspb$utils_splitInt64(value); - return module$contents$jspb$utils_joinHash64(module$contents$jspb$utils_split64Low, module$contents$jspb$utils_split64High); -}; -jspb.utils.splitDecimalString = module$contents$jspb$utils_splitDecimalString; -jspb.utils.splitHash64 = module$contents$jspb$utils_splitHash64; -jspb.utils.splitFloat64 = module$contents$jspb$utils_splitFloat64; -jspb.utils.splitFloat32 = module$contents$jspb$utils_splitFloat32; -jspb.utils.splitZigzag64 = module$contents$jspb$utils_splitZigzag64; -jspb.utils.splitInt64 = module$contents$jspb$utils_splitInt64; -jspb.utils.splitUint64 = module$contents$jspb$utils_splitUint64; -jspb.utils.getSplit64Low = module$contents$jspb$utils_getSplit64Low; -jspb.utils.getSplit64High = module$contents$jspb$utils_getSplit64High; -jspb.utils.stringToByteArray = function module$contents$jspb$utils_stringToByteArray(str) { - for (var arr = new Uint8Array(str.length), i = 0; i < str.length; i++) { - var codepoint = str.charCodeAt(i); - if (255 < codepoint) { - throw Error("Conversion error: string contains codepoint outside of byte range"); - } - arr[i] = codepoint; - } - return arr; -}; -jspb.utils.toZigzag64 = module$contents$jspb$utils_toZigzag64; -var module$contents$jspb$BinaryDecoder_BinaryDecoder = function(bytes, start, length) { - this.bytes_ = null; - this.cursor_ = this.end_ = this.start_ = 0; - this.error_ = !1; - bytes && this.setBlock(bytes, start, length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc = function(bytes, start, length) { - if (module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.length) { - var newDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.pop(); - bytes && newDecoder.setBlock(bytes, start, length); - return newDecoder; - } - return new module$contents$jspb$BinaryDecoder_BinaryDecoder(bytes, start, length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.free = function() { - this.clear(); - 100 > module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.length && module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.push(this); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.clone = function() { - return module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(this.bytes_, this.start_, this.end_ - this.start_); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.clear = function() { - this.bytes_ = null; - this.cursor_ = this.end_ = this.start_ = 0; - this.error_ = !1; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getBuffer = function() { - return this.bytes_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setBlock = function(data, start, length) { - this.bytes_ = module$contents$jspb$utils_byteSourceToUint8Array(data); - this.start_ = void 0 !== start ? start : 0; - this.end_ = void 0 !== length ? this.start_ + length : this.bytes_.length; - this.cursor_ = this.start_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getEnd = function() { - return this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setEnd = function(end) { - this.end_ = end; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.reset = function() { - this.cursor_ = this.start_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getCursor = function() { - return this.cursor_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setCursor = function(cursor) { - this.cursor_ = cursor; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.advance = function(count) { - this.cursor_ += count; - goog.asserts.assert(this.cursor_ <= this.end_); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.atEnd = function() { - return this.cursor_ == this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.pastEnd = function() { - return this.cursor_ > this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getError = function() { - return this.error_ || 0 > this.cursor_ || this.cursor_ > this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitVarint64 = function(convert) { - for (var temp = 128, lowBits = 0, highBits = 0, i = 0; 4 > i && 128 <= temp; i++) { - temp = this.bytes_[this.cursor_++], lowBits |= (temp & 127) << 7 * i; - } - 128 <= temp && (temp = this.bytes_[this.cursor_++], lowBits |= (temp & 127) << 28, highBits |= (temp & 127) >> 4); - if (128 <= temp) { - for (i = 0; 5 > i && 128 <= temp; i++) { - temp = this.bytes_[this.cursor_++], highBits |= (temp & 127) << 7 * i + 3; - } - } - if (128 > temp) { - return convert(lowBits >>> 0, highBits >>> 0); - } - goog.asserts.fail("Failed to read varint, encoding is invalid."); - this.error_ = !0; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitZigzagVarint64 = function(convert) { - return this.readSplitVarint64(function(low, high) { - return module$contents$jspb$utils_fromZigzag64(low, high, convert); - }); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitFixed64 = function(convert) { - var bytes = this.bytes_, cursor = this.cursor_; - this.cursor_ += 8; - for (var lowBits = 0, highBits = 0, i = cursor + 7; i >= cursor; i--) { - lowBits = lowBits << 8 | bytes[i], highBits = highBits << 8 | bytes[i + 4]; - } - return convert(lowBits, highBits); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.skipVarint = function() { - for (; this.bytes_[this.cursor_] & 128;) { - this.cursor_++; - } - this.cursor_++; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.unskipVarint = function(value) { - for (; 128 < value;) { - this.cursor_--, value >>>= 7; - } - this.cursor_--; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint32 = function() { - var bytes = this.bytes_; - var temp = bytes[this.cursor_ + 0]; - var x = temp & 127; - if (128 > temp) { - return this.cursor_ += 1, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 1]; - x |= (temp & 127) << 7; - if (128 > temp) { - return this.cursor_ += 2, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 2]; - x |= (temp & 127) << 14; - if (128 > temp) { - return this.cursor_ += 3, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 3]; - x |= (temp & 127) << 21; - if (128 > temp) { - return this.cursor_ += 4, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 4]; - x |= (temp & 15) << 28; - if (128 > temp) { - return this.cursor_ += 5, goog.asserts.assert(this.cursor_ <= this.end_), x >>> 0; - } - this.cursor_ += 5; - 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && goog.asserts.assert(!1); - goog.asserts.assert(this.cursor_ <= this.end_); - return x; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint32 = function() { - return this.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint32String = function() { - return this.readUnsignedVarint32().toString(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint32String = function() { - return this.readSignedVarint32().toString(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint32 = function() { - var result = this.readUnsignedVarint32(); - return result >>> 1 ^ -(result & 1); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinUint64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint64String = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinUnsignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinInt64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint64String = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinSignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinZigzag64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint64String = function() { - return this.readSplitZigzagVarint64(module$contents$jspb$utils_joinSignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint8 = function() { - var a = this.bytes_[this.cursor_ + 0]; - this.cursor_ += 1; - goog.asserts.assert(this.cursor_ <= this.end_); - return a; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint16 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1]; - this.cursor_ += 2; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 0 | b << 8; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint32 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2], d = this.bytes_[this.cursor_ + 3]; - this.cursor_ += 4; - goog.asserts.assert(this.cursor_ <= this.end_); - return (a << 0 | b << 8 | c << 16 | d << 24) >>> 0; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint64 = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint64String = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt8 = function() { - var a = this.bytes_[this.cursor_ + 0]; - this.cursor_ += 1; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 24 >> 24; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt16 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1]; - this.cursor_ += 2; - goog.asserts.assert(this.cursor_ <= this.end_); - return (a << 0 | b << 8) << 16 >> 16; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt32 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2], d = this.bytes_[this.cursor_ + 3]; - this.cursor_ += 4; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 0 | b << 8 | c << 16 | d << 24; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt64 = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt64String = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readFloat = function() { - var bitsLow = this.readUint32(); - return module$contents$jspb$utils_joinFloat32(bitsLow, 0); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readDouble = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinFloat64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readBool = function() { - return !!this.bytes_[this.cursor_++]; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readEnum = function() { - return this.readSignedVarint32(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readString = function(length) { - for (var bytes = this.bytes_, cursor = this.cursor_, end = cursor + length, codeUnits = [], result = ""; cursor < end;) { - var c = bytes[cursor++]; - if (128 > c) { - codeUnits.push(c); - } else { - if (192 > c) { - continue; - } else { - if (224 > c) { - var c2 = bytes[cursor++]; - codeUnits.push((c & 31) << 6 | c2 & 63); - } else { - if (240 > c) { - c2 = bytes[cursor++]; - var c3 = bytes[cursor++]; - codeUnits.push((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); - } else { - if (248 > c) { - c2 = bytes[cursor++]; - c3 = bytes[cursor++]; - var c4 = bytes[cursor++], codepoint = (c & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63; - codepoint -= 65536; - codeUnits.push((codepoint >> 10 & 1023) + 55296, (codepoint & 1023) + 56320); - } - } - } - } - } - 8192 <= codeUnits.length && (result += String.fromCharCode.apply(null, codeUnits), codeUnits.length = 0); - } - result += goog.crypt.byteArrayToString(codeUnits); - this.cursor_ = cursor; - return result; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readStringWithLength = function() { - var length = this.readUnsignedVarint32(); - return this.readString(length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readBytes = function(length) { - if (0 > length || this.cursor_ + length > this.bytes_.length) { - return this.error_ = !0, goog.asserts.fail("Invalid byte length!"), new Uint8Array(0); - } - var result = this.bytes_.subarray(this.cursor_, this.cursor_ + length); - this.cursor_ += length; - goog.asserts.assert(this.cursor_ <= this.end_); - return result; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.resetInstanceCache = function() { - module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_ = []; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.getInstanceCache = function() { - return module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_ = []; -jspb.BinaryDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder; -var module$contents$jspb$BinaryReader_BinaryReader = function(bytes, start, length) { - this.decoder_ = module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(bytes, start, length); - this.fieldCursor_ = this.decoder_.getCursor(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; - this.error_ = !1; - this.readCallbacks_ = null; -}; -module$contents$jspb$BinaryReader_BinaryReader.alloc = function(bytes, start, length) { - if (module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.length) { - var newReader = module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.pop(); - bytes && newReader.decoder_.setBlock(bytes, start, length); - return newReader; - } - return new module$contents$jspb$BinaryReader_BinaryReader(bytes, start, length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.free = function() { - this.decoder_.clear(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; - this.error_ = !1; - this.readCallbacks_ = null; - 100 > module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.length && module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.push(this); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldCursor = function() { - return this.fieldCursor_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getCursor = function() { - return this.decoder_.getCursor(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getBuffer = function() { - return this.decoder_.getBuffer(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldNumber = function() { - return this.nextField_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getWireType = function() { - return this.nextWireType_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.isEndGroup = function() { - return this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.isDelimited = function() { - return this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getError = function() { - return this.error_ || this.decoder_.getError(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.setBlock = function(bytes, start, length) { - this.decoder_.setBlock(bytes, start, length); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.reset = function() { - this.decoder_.reset(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.advance = function(count) { - this.decoder_.advance(count); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.nextField = function() { - if (this.decoder_.atEnd()) { - return !1; - } - if (this.getError()) { - return goog.asserts.fail("Decoder hit an error"), !1; - } - this.fieldCursor_ = this.decoder_.getCursor(); - var header = this.decoder_.readUnsignedVarint32(), nextField = header >>> 3, nextWireType = header & 7; - if (nextWireType != module$contents$jspb$BinaryConstants_WireType.VARINT && nextWireType != module$contents$jspb$BinaryConstants_WireType.FIXED32 && nextWireType != module$contents$jspb$BinaryConstants_WireType.FIXED64 && nextWireType != module$contents$jspb$BinaryConstants_WireType.DELIMITED && nextWireType != module$contents$jspb$BinaryConstants_WireType.START_GROUP && nextWireType != module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - return goog.asserts.fail("Invalid wire type: %s (at position %s)", nextWireType, this.fieldCursor_), this.error_ = !0, !1; - } - this.nextField_ = nextField; - this.nextWireType_ = nextWireType; - return !0; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.unskipHeader = function() { - this.decoder_.unskipVarint(this.nextField_ << 3 | this.nextWireType_); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipMatchingFields = function() { - var field = this.nextField_; - for (this.unskipHeader(); this.nextField() && this.getFieldNumber() == field;) { - this.skipField(); - } - this.decoder_.atEnd() || this.unskipHeader(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipVarintField = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.VARINT ? (goog.asserts.fail("Invalid wire type for skipVarintField"), this.skipField()) : this.decoder_.skipVarint(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipDelimitedField = function() { - if (this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.DELIMITED) { - goog.asserts.fail("Invalid wire type for skipDelimitedField"), this.skipField(); - } else { - var length = this.decoder_.readUnsignedVarint32(); - this.decoder_.advance(length); - } -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipFixed32Field = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.FIXED32 ? (goog.asserts.fail("Invalid wire type for skipFixed32Field"), this.skipField()) : this.decoder_.advance(4); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipFixed64Field = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.FIXED64 ? (goog.asserts.fail("Invalid wire type for skipFixed64Field"), this.skipField()) : this.decoder_.advance(8); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipGroup = function() { - var previousField = this.nextField_; - do { - if (!this.nextField()) { - goog.asserts.fail("Unmatched start-group tag: stream EOF"); - this.error_ = !0; - break; - } - if (this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - this.nextField_ != previousField && (goog.asserts.fail("Unmatched end-group tag"), this.error_ = !0); - break; - } - this.skipField(); - } while (1); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipField = function() { - switch(this.nextWireType_) { - case module$contents$jspb$BinaryConstants_WireType.VARINT: - this.skipVarintField(); - break; - case module$contents$jspb$BinaryConstants_WireType.FIXED64: - this.skipFixed64Field(); - break; - case module$contents$jspb$BinaryConstants_WireType.DELIMITED: - this.skipDelimitedField(); - break; - case module$contents$jspb$BinaryConstants_WireType.FIXED32: - this.skipFixed32Field(); - break; - case module$contents$jspb$BinaryConstants_WireType.START_GROUP: - this.skipGroup(); - break; - default: - this.error_ = !0, goog.asserts.fail("Invalid wire encoding for field."); - } -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.registerReadCallback = function(callbackName, callback) { - null === this.readCallbacks_ && (this.readCallbacks_ = {}); - goog.asserts.assert(!this.readCallbacks_[callbackName]); - this.readCallbacks_[callbackName] = callback; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.runReadCallback = function(callbackName) { - goog.asserts.assert(null !== this.readCallbacks_); - var callback = this.readCallbacks_[callbackName]; - goog.asserts.assert(callback); - return callback(this); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readAny = function(fieldType) { - this.nextWireType_ = module$contents$jspb$BinaryConstants_FieldTypeToWireType(fieldType); - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - return this.readDouble(); - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - return this.readFloat(); - case module$contents$jspb$BinaryConstants_FieldType.INT64: - return this.readInt64(); - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - return this.readUint64(); - case module$contents$jspb$BinaryConstants_FieldType.INT32: - return this.readInt32(); - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - return this.readFixed64(); - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - return this.readFixed32(); - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - return this.readBool(); - case module$contents$jspb$BinaryConstants_FieldType.STRING: - return this.readString(); - case module$contents$jspb$BinaryConstants_FieldType.GROUP: - goog.asserts.fail("Group field type not supported in readAny()"); - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - goog.asserts.fail("Message field type not supported in readAny()"); - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - return this.readBytes(); - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - return this.readUint32(); - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - return this.readEnum(); - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - return this.readSfixed32(); - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - return this.readSfixed64(); - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - return this.readSint32(); - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - return this.readSint64(); - default: - goog.asserts.fail("Invalid field type in readAny()"); - } - return 0; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readMessage = function(message, reader) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var oldEnd = this.decoder_.getEnd(), length = this.decoder_.readUnsignedVarint32(), newEnd = this.decoder_.getCursor() + length; - this.decoder_.setEnd(newEnd); - reader(message, this); - this.decoder_.setCursor(newEnd); - this.decoder_.setEnd(oldEnd); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readGroup = function(field, message, reader) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.START_GROUP); - goog.asserts.assert(this.nextField_ == field); - reader(message, this); - this.error_ || this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP || (goog.asserts.fail("Group submessage did not end with an END_GROUP tag"), this.error_ = !0); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldDecoder = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(), start = this.decoder_.getCursor(), end = start + length, innerDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(this.decoder_.getBuffer(), start, length); - this.decoder_.setCursor(end); - return innerDecoder; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint32String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint32String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readUint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readUint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readUint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readInt32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readInt32().toString(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readInt64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readInt64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFloat = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readFloat(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readDouble = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readDouble(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readBool = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return !!this.decoder_.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readEnum = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readString = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(); - return this.decoder_.readString(length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readBytes = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(); - return this.decoder_.readBytes(length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitVarint64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSplitVarint64(convert); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitZigzagVarint64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSplitVarint64(function(lowBits, highBits) { - return module$contents$jspb$utils_fromZigzag64(lowBits, highBits, convert); - }); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitFixed64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readSplitFixed64(convert); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedField_ = function(decodeMethod) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - for (var length = this.decoder_.readUnsignedVarint32(), end = this.decoder_.getCursor() + length, result = []; this.decoder_.getCursor() < end;) { - result.push(decodeMethod.call(this.decoder_)); - } - return result; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt32 = function() { - return this.readPackedField_(this.decoder_.readSignedVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt32String = function() { - return this.readPackedField_(this.decoder_.readSignedVarint32String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt64 = function() { - return this.readPackedField_(this.decoder_.readSignedVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt64String = function() { - return this.readPackedField_(this.decoder_.readSignedVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint32 = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint32String = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint32String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint64 = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint64String = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint32 = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint64 = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint64String = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed32 = function() { - return this.readPackedField_(this.decoder_.readUint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed64 = function() { - return this.readPackedField_(this.decoder_.readUint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed64String = function() { - return this.readPackedField_(this.decoder_.readUint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed32 = function() { - return this.readPackedField_(this.decoder_.readInt32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed64 = function() { - return this.readPackedField_(this.decoder_.readInt64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed64String = function() { - return this.readPackedField_(this.decoder_.readInt64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFloat = function() { - return this.readPackedField_(this.decoder_.readFloat); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedDouble = function() { - return this.readPackedField_(this.decoder_.readDouble); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedBool = function() { - return this.readPackedField_(this.decoder_.readBool); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedEnum = function() { - return this.readPackedField_(this.decoder_.readEnum); -}; -module$contents$jspb$BinaryReader_BinaryReader.resetInstanceCache = function() { - module$contents$jspb$BinaryReader_BinaryReader.instanceCache_ = []; -}; -module$contents$jspb$BinaryReader_BinaryReader.getInstanceCache = function() { - return module$contents$jspb$BinaryReader_BinaryReader.instanceCache_; -}; -module$contents$jspb$BinaryReader_BinaryReader.instanceCache_ = []; -jspb.BinaryReader = module$contents$jspb$BinaryReader_BinaryReader; -jspb.arith = {}; -jspb.arith.UInt64 = function(lo, hi) { - this.lo = lo; - this.hi = hi; -}; -jspb.arith.UInt64.prototype.cmp = function(other) { - return this.hi < other.hi || this.hi == other.hi && this.lo < other.lo ? -1 : this.hi == other.hi && this.lo == other.lo ? 0 : 1; -}; -jspb.arith.UInt64.prototype.rightShift = function() { - return new jspb.arith.UInt64((this.lo >>> 1 | (this.hi & 1) << 31) >>> 0, this.hi >>> 1 >>> 0); -}; -jspb.arith.UInt64.prototype.leftShift = function() { - return new jspb.arith.UInt64(this.lo << 1 >>> 0, (this.hi << 1 | this.lo >>> 31) >>> 0); -}; -jspb.arith.UInt64.prototype.msb = function() { - return !!(this.hi & 2147483648); -}; -jspb.arith.UInt64.prototype.lsb = function() { - return !!(this.lo & 1); -}; -jspb.arith.UInt64.prototype.zero = function() { - return 0 == this.lo && 0 == this.hi; -}; -jspb.arith.UInt64.prototype.add = function(other) { - return new jspb.arith.UInt64((this.lo + other.lo & 4294967295) >>> 0 >>> 0, ((this.hi + other.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.UInt64.prototype.sub = function(other) { - return new jspb.arith.UInt64((this.lo - other.lo & 4294967295) >>> 0 >>> 0, ((this.hi - other.hi & 4294967295) >>> 0) - (0 > this.lo - other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.UInt64.mul32x32 = function(a, b) { - for (var aLow = a & 65535, aHigh = a >>> 16, bLow = b & 65535, bHigh = b >>> 16, productLow = aLow * bLow + 65536 * (aLow * bHigh & 65535) + 65536 * (aHigh * bLow & 65535), productHigh = aHigh * bHigh + (aLow * bHigh >>> 16) + (aHigh * bLow >>> 16); 4294967296 <= productLow;) { - productLow -= 4294967296, productHigh += 1; - } - return new jspb.arith.UInt64(productLow >>> 0, productHigh >>> 0); -}; -jspb.arith.UInt64.prototype.mul = function(a) { - var lo = jspb.arith.UInt64.mul32x32(this.lo, a), hi = jspb.arith.UInt64.mul32x32(this.hi, a); - hi.hi = hi.lo; - hi.lo = 0; - return lo.add(hi); -}; -jspb.arith.UInt64.prototype.div = function(_divisor) { - if (0 == _divisor) { - return []; - } - for (var quotient = new jspb.arith.UInt64(0, 0), remainder = new jspb.arith.UInt64(this.lo, this.hi), divisor = new jspb.arith.UInt64(_divisor, 0), unit = new jspb.arith.UInt64(1, 0); !divisor.msb();) { - divisor = divisor.leftShift(), unit = unit.leftShift(); - } - for (; !unit.zero();) { - 0 >= divisor.cmp(remainder) && (quotient = quotient.add(unit), remainder = remainder.sub(divisor)), divisor = divisor.rightShift(), unit = unit.rightShift(); - } - return [quotient, remainder]; -}; -jspb.arith.UInt64.prototype.toString = function() { - for (var result = "", num = this; !num.zero();) { - var divResult = num.div(10), quotient = divResult[0]; - result = divResult[1].lo + result; - num = quotient; - } - "" == result && (result = "0"); - return result; -}; -jspb.arith.UInt64.fromString = function(s) { - for (var result = new jspb.arith.UInt64(0, 0), digit64 = new jspb.arith.UInt64(0, 0), i = 0; i < s.length; i++) { - if ("0" > s[i] || "9" < s[i]) { - return null; - } - digit64.lo = parseInt(s[i], 10); - result = result.mul(10).add(digit64); - } - return result; -}; -jspb.arith.UInt64.prototype.clone = function() { - return new jspb.arith.UInt64(this.lo, this.hi); -}; -jspb.arith.Int64 = function(lo, hi) { - this.lo = lo; - this.hi = hi; -}; -jspb.arith.Int64.prototype.add = function(other) { - return new jspb.arith.Int64((this.lo + other.lo & 4294967295) >>> 0 >>> 0, ((this.hi + other.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.Int64.prototype.sub = function(other) { - return new jspb.arith.Int64((this.lo - other.lo & 4294967295) >>> 0 >>> 0, ((this.hi - other.hi & 4294967295) >>> 0) - (0 > this.lo - other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.Int64.prototype.clone = function() { - return new jspb.arith.Int64(this.lo, this.hi); -}; -jspb.arith.Int64.prototype.toString = function() { - var sign = 0 != (this.hi & 2147483648), num = new jspb.arith.UInt64(this.lo, this.hi); - sign && (num = (new jspb.arith.UInt64(0, 0)).sub(num)); - return (sign ? "-" : "") + num.toString(); -}; -jspb.arith.Int64.fromString = function(s) { - var hasNegative = 0 < s.length && "-" == s[0]; - hasNegative && (s = s.substring(1)); - var num = jspb.arith.UInt64.fromString(s); - if (null === num) { - return null; - } - hasNegative && (num = (new jspb.arith.UInt64(0, 0)).sub(num)); - return new jspb.arith.Int64(num.lo, num.hi); -}; -var module$contents$jspb$BinaryEncoder_BinaryEncoder = function() { - this.buffer_ = []; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.length = function() { - return this.buffer_.length; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.end = function() { - var buffer = this.buffer_; - this.buffer_ = []; - return buffer; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitVarint64 = function(lowBits, highBits) { - goog.asserts.assert(lowBits == Math.floor(lowBits)); - goog.asserts.assert(highBits == Math.floor(highBits)); - goog.asserts.assert(0 <= lowBits && 4294967296 > lowBits); - for (goog.asserts.assert(0 <= highBits && 4294967296 > highBits); 0 < highBits || 127 < lowBits;) { - this.buffer_.push(lowBits & 127 | 128), lowBits = (lowBits >>> 7 | highBits << 25) >>> 0, highBits >>>= 7; - } - this.buffer_.push(lowBits); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitFixed64 = function(lowBits, highBits) { - goog.asserts.assert(lowBits == Math.floor(lowBits)); - goog.asserts.assert(highBits == Math.floor(highBits)); - goog.asserts.assert(0 <= lowBits && 4294967296 > lowBits); - goog.asserts.assert(0 <= highBits && 4294967296 > highBits); - this.writeUint32(lowBits); - this.writeUint32(highBits); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitZigzagVarint64 = function(lowBits, highBits) { - var self = this; - module$contents$jspb$utils_toZigzag64(lowBits, highBits, function(lo, hi) { - self.writeSplitVarint64(lo >>> 0, hi >>> 0); - }); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUnsignedVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - for (goog.asserts.assert(0 <= value && 4294967296 > value); 127 < value;) { - this.buffer_.push(value & 127 | 128), value >>>= 7; - } - this.buffer_.push(value); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSignedVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - if (0 <= value) { - this.writeUnsignedVarint32(value); - } else { - for (var i = 0; 9 > i; i++) { - this.buffer_.push(value & 127 | 128), value >>= 7; - } - this.buffer_.push(1); - } -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUnsignedVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 18446744073709551616 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSignedVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.writeUnsignedVarint32((value << 1 ^ value >> 31) >>> 0); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitZigzag64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint64String = function(value) { - var self = this; - module$contents$jspb$utils_splitDecimalString(value); - module$contents$jspb$utils_toZigzag64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High(), function(lo, hi) { - self.writeSplitVarint64(lo >>> 0, hi >>> 0); - }); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint8 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 256 > value); - this.buffer_.push(value >>> 0 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint16 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 65536 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 4294967296 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); - this.buffer_.push(value >>> 16 & 255); - this.buffer_.push(value >>> 24 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 18446744073709551616 > value); - module$contents$jspb$utils_splitUint64(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); - this.writeUint32(module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt8 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-128 <= value && 128 > value); - this.buffer_.push(value >>> 0 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt16 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-32768 <= value && 32768 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); - this.buffer_.push(value >>> 16 & 255); - this.buffer_.push(value >>> 24 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitFixed64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt64String = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= +value && 9223372036854775808 > +value); - module$contents$jspb$utils_splitDecimalString(value); - this.writeSplitFixed64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeFloat = function(value) { - goog.asserts.assert(Infinity === value || -Infinity === value || isNaN(value) || -3.4028234663852886E38 <= value && 3.4028234663852886e+38 >= value); - module$contents$jspb$utils_splitFloat32(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeDouble = function(value) { - goog.asserts.assert(Infinity === value || -Infinity === value || isNaN(value) || -1.7976931348623157E308 <= value && 1.7976931348623157e+308 >= value); - module$contents$jspb$utils_splitFloat64(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); - this.writeUint32(module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeBool = function(value) { - goog.asserts.assert("boolean" === typeof value || "number" === typeof value); - this.buffer_.push(value ? 1 : 0); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeEnum = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.writeSignedVarint32(value); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeBytes = function(bytes) { - this.buffer_.push.apply(this.buffer_, bytes); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeString = function(value) { - for (var oldLength = this.buffer_.length, i = 0; i < value.length; i++) { - var c = value.charCodeAt(i); - if (128 > c) { - this.buffer_.push(c); - } else { - if (2048 > c) { - this.buffer_.push(c >> 6 | 192), this.buffer_.push(c & 63 | 128); - } else { - if (65536 > c) { - if (55296 <= c && 56319 >= c && i + 1 < value.length) { - var second = value.charCodeAt(i + 1); - 56320 <= second && 57343 >= second && (c = 1024 * (c - 55296) + second - 56320 + 65536, this.buffer_.push(c >> 18 | 240), this.buffer_.push(c >> 12 & 63 | 128), this.buffer_.push(c >> 6 & 63 | 128), this.buffer_.push(c & 63 | 128), i++); - } else { - this.buffer_.push(c >> 12 | 224), this.buffer_.push(c >> 6 & 63 | 128), this.buffer_.push(c & 63 | 128); - } - } - } - } - } - return this.buffer_.length - oldLength; -}; -jspb.BinaryEncoder = module$contents$jspb$BinaryEncoder_BinaryEncoder; -goog.userAgent.product = {}; -goog.userAgent.product.ASSUME_FIREFOX = !1; -goog.userAgent.product.ASSUME_IPHONE = !1; -goog.userAgent.product.ASSUME_IPAD = !1; -goog.userAgent.product.ASSUME_ANDROID = !1; -goog.userAgent.product.ASSUME_CHROME = !1; -goog.userAgent.product.ASSUME_SAFARI = !1; -goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI; -goog.userAgent.product.OPERA = goog.userAgent.OPERA; -goog.userAgent.product.IE = goog.userAgent.IE; -goog.userAgent.product.EDGE = goog.userAgent.EDGE; -goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.labs.userAgent.browser.isFirefox(); -goog.userAgent.product.isIphoneOrIpod_ = function() { - return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod(); -}; -goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.isIphoneOrIpod_(); -goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad(); -goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.labs.userAgent.browser.isAndroidBrowser(); -goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs.userAgent.browser.isChrome(); -goog.userAgent.product.isSafariDesktop_ = function() { - return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos(); -}; -goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.isSafariDesktop_(); -goog.crypt.base64 = {}; -goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -goog.crypt.base64.ENCODED_VALS = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "+/="; -goog.crypt.base64.ENCODED_VALS_WEBSAFE = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "-_."; -goog.crypt.base64.Alphabet = {DEFAULT:0, NO_PADDING:1, WEBSAFE:2, WEBSAFE_DOT_PADDING:3, WEBSAFE_NO_PADDING:4, }; -goog.crypt.base64.paddingChars_ = "=."; -goog.crypt.base64.isPadding_ = function(char) { - return goog.string.contains(goog.crypt.base64.paddingChars_, char); -}; -goog.crypt.base64.byteToCharMaps_ = {}; -goog.crypt.base64.charToByteMap_ = null; -goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ = goog.userAgent.GECKO || goog.userAgent.WEBKIT && !goog.userAgent.product.SAFARI || goog.userAgent.OPERA; -goog.crypt.base64.HAS_NATIVE_ENCODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || "function" == typeof goog.global.btoa; -goog.crypt.base64.HAS_NATIVE_DECODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || !goog.userAgent.product.SAFARI && !goog.userAgent.IE && "function" == typeof goog.global.atob; -goog.crypt.base64.encodeByteArray = function(input, alphabet) { - goog.asserts.assert(goog.isArrayLike(input), "encodeByteArray takes an array as a parameter"); - void 0 === alphabet && (alphabet = goog.crypt.base64.Alphabet.DEFAULT); - goog.crypt.base64.init_(); - for (var byteToCharMap = goog.crypt.base64.byteToCharMaps_[alphabet], output = [], i = 0; i < input.length; i += 3) { - var byte1 = input[i], haveByte2 = i + 1 < input.length, byte2 = haveByte2 ? input[i + 1] : 0, haveByte3 = i + 2 < input.length, byte3 = haveByte3 ? input[i + 2] : 0, outByte1 = byte1 >> 2, outByte2 = (byte1 & 3) << 4 | byte2 >> 4, outByte3 = (byte2 & 15) << 2 | byte3 >> 6, outByte4 = byte3 & 63; - haveByte3 || (outByte4 = 64, haveByte2 || (outByte3 = 64)); - output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3] || "", byteToCharMap[outByte4] || ""); - } - return output.join(""); -}; -goog.crypt.base64.encodeString = function(input, alphabet) { - return goog.crypt.base64.HAS_NATIVE_ENCODE_ && !alphabet ? goog.global.btoa(input) : goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(input), alphabet); -}; -goog.crypt.base64.decodeString = function(input, useCustomDecoder) { - if (goog.crypt.base64.HAS_NATIVE_DECODE_ && !useCustomDecoder) { - return goog.global.atob(input); - } - var output = ""; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output += String.fromCharCode(b); - }); - return output; -}; -goog.crypt.base64.decodeStringToByteArray = function(input, opt_ignored) { - var output = []; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output.push(b); - }); - return output; -}; -goog.crypt.base64.decodeStringToUint8Array = function(input) { - goog.asserts.assert(!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10"), "Browser does not support typed arrays"); - var len = input.length, approxByteLength = 3 * len / 4; - approxByteLength % 3 ? approxByteLength = Math.floor(approxByteLength) : goog.crypt.base64.isPadding_(input[len - 1]) && (approxByteLength = goog.crypt.base64.isPadding_(input[len - 2]) ? approxByteLength - 2 : approxByteLength - 1); - var output = new Uint8Array(approxByteLength), outLen = 0; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output[outLen++] = b; - }); - return output.subarray(0, outLen); -}; -goog.crypt.base64.decodeStringInternal_ = function(input, pushByte) { - function getByte(default_val) { - for (; nextCharIndex < input.length;) { - var ch = input.charAt(nextCharIndex++), b = goog.crypt.base64.charToByteMap_[ch]; - if (null != b) { - return b; - } - if (!goog.string.isEmptyOrWhitespace(ch)) { - throw Error("Unknown base64 encoding at char: " + ch); - } - } - return default_val; - } - goog.crypt.base64.init_(); - for (var nextCharIndex = 0;;) { - var byte1 = getByte(-1), byte2 = getByte(0), byte3 = getByte(64), byte4 = getByte(64); - if (64 === byte4 && -1 === byte1) { - break; - } - pushByte(byte1 << 2 | byte2 >> 4); - 64 != byte3 && (pushByte(byte2 << 4 & 240 | byte3 >> 2), 64 != byte4 && pushByte(byte3 << 6 & 192 | byte4)); - } -}; -goog.crypt.base64.init_ = function() { - if (!goog.crypt.base64.charToByteMap_) { - goog.crypt.base64.charToByteMap_ = {}; - for (var commonChars = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""), specialChars = ["+/=", "+/", "-_=", "-_.", "-_", ], i = 0; 5 > i; i++) { - var chars = commonChars.concat(specialChars[i].split("")); - goog.crypt.base64.byteToCharMaps_[i] = chars; - for (var j = 0; j < chars.length; j++) { - var char = chars[j], existingByte = goog.crypt.base64.charToByteMap_[char]; - void 0 === existingByte ? goog.crypt.base64.charToByteMap_[char] = j : goog.asserts.assert(existingByte === j); - } - } - } -}; -var module$contents$jspb$BinaryWriter_BinaryWriter = function() { - this.blocks_ = []; - this.totalLength_ = 0; - this.encoder_ = new module$contents$jspb$BinaryEncoder_BinaryEncoder; - this.bookmarks_ = []; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.appendUint8Array_ = function(arr) { - var temp = this.encoder_.end(); - this.blocks_.push(temp); - this.blocks_.push(arr); - this.totalLength_ += temp.length + arr.length; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.beginDelimited_ = function(field) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var bookmark = this.encoder_.end(); - this.blocks_.push(bookmark); - this.totalLength_ += bookmark.length; - bookmark.push(this.totalLength_); - return bookmark; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.endDelimited_ = function(bookmark) { - var oldLength = bookmark.pop(), messageLength = this.totalLength_ + this.encoder_.length() - oldLength; - for ((0,goog.asserts.assert)(0 <= messageLength); 127 < messageLength;) { - bookmark.push(messageLength & 127 | 128), messageLength >>>= 7, this.totalLength_++; - } - bookmark.push(messageLength); - this.totalLength_++; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSerializedMessage = function(bytes, start, end) { - this.appendUint8Array_(bytes.subarray(start, end)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.maybeWriteSerializedMessage = function(bytes, start, end) { - null != bytes && null != start && null != end && this.writeSerializedMessage(bytes, start, end); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.reset = function() { - this.blocks_ = []; - this.encoder_.end(); - this.totalLength_ = 0; - this.bookmarks_ = []; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.getResultBuffer = function() { - (0,goog.asserts.assert)(0 == this.bookmarks_.length); - for (var flat = new Uint8Array(this.totalLength_ + this.encoder_.length()), blocks = this.blocks_, blockCount = blocks.length, offset = 0, i = 0; i < blockCount; i++) { - var block = blocks[i]; - flat.set(block, offset); - offset += block.length; - } - var tail = this.encoder_.end(); - flat.set(tail, offset); - offset += tail.length; - (0,goog.asserts.assert)(offset == flat.length); - this.blocks_ = [flat]; - return flat; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.getResultBase64String = function(alphabet) { - return (0,goog.crypt.base64.encodeByteArray)(this.getResultBuffer(), alphabet); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.beginSubMessage = function(field) { - this.bookmarks_.push(this.beginDelimited_(field)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.endSubMessage = function() { - (0,goog.asserts.assert)(0 <= this.bookmarks_.length); - this.endDelimited_(this.bookmarks_.pop()); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFieldHeader_ = function(field, wireType) { - (0,goog.asserts.assert)(1 <= field && field == Math.floor(field)); - this.encoder_.writeUnsignedVarint32(8 * field + wireType); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeAny = function(fieldType, field, value) { - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - this.writeDouble(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - this.writeFloat(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.INT64: - this.writeInt64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - this.writeUint64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.INT32: - this.writeInt32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - this.writeFixed64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - this.writeFixed32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - this.writeBool(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.STRING: - this.writeString(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.GROUP: - (0,goog.asserts.fail)("Group field type not supported in writeAny()"); - break; - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - (0,goog.asserts.fail)("Message field type not supported in writeAny()"); - break; - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - this.writeBytes(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - this.writeUint32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - this.writeEnum(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - this.writeSfixed32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - this.writeSfixed64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - this.writeSint32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - this.writeSint64(field, value); - break; - default: - (0,goog.asserts.fail)("Invalid field type in writeAny()"); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUnsignedVarint32_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeUnsignedVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSignedVarint32_ = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertSignedInteger(field, value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeSignedVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUnsignedVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeUnsignedVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSignedVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeSignedVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint32_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint64String_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint64String(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeSignedVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt32String = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertThat(field, intValue, -2147483648 <= intValue && 2147483648 > intValue); - this.writeSignedVarint32_(field, intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeSignedVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt64String = function(field, value) { - if (null != value) { - var num = jspb.arith.Int64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 4294967296 > value), this.writeUnsignedVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint32String = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= intValue && 4294967296 > intValue); - this.writeUnsignedVarint32_(field, intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 18446744073709551616 > value), this.writeUnsignedVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint64String = function(field, value) { - if (null != value) { - var num = jspb.arith.UInt64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeZigzagVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeZigzagVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint64String = function(field, value) { - null != value && this.writeZigzagVarint64String_(field, value); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 4294967296 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeUint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 18446744073709551616 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeUint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed64String = function(field, value) { - if (null != value) { - var num = jspb.arith.UInt64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeInt32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeInt64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed64String = function(field, value) { - if (null != value) { - var num = jspb.arith.Int64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFloat = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeFloat(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeDouble = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeDouble(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeBool = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, "boolean" === typeof value || "number" === typeof value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeBool(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeEnum = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertSignedInteger(field, intValue); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSignedVarint32(intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeString = function(field, value) { - if (null != value) { - var bookmark = this.beginDelimited_(field); - this.encoder_.writeString(value); - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeBytes = function(field, value) { - if (null != value) { - var bytes = module$contents$jspb$utils_byteSourceToUint8Array(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(bytes.length); - this.appendUint8Array_(bytes); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessage = function(field, value, writerCallback) { - if (null != value) { - var bookmark = this.beginDelimited_(field); - writerCallback(value, this); - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessageSet = function(field, value, writerCallback) { - if (null != value) { - this.writeFieldHeader_(1, module$contents$jspb$BinaryConstants_WireType.START_GROUP); - this.writeFieldHeader_(2, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSignedVarint32(field); - var bookmark = this.beginDelimited_(3); - writerCallback(value, this); - this.endDelimited_(bookmark); - this.writeFieldHeader_(1, module$contents$jspb$BinaryConstants_WireType.END_GROUP); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeGroup = function(field, value, writerCallback) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.START_GROUP), writerCallback(value, this), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.END_GROUP)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitFixed64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(lowBits, highBits); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitVarint64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(lowBits, highBits); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitZigzagVarint64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitZigzagVarint64(lowBits >>> 0, highBits >>> 0); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSignedVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt32String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeInt32String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSignedVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitFixed64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitFixed64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitVarint64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitZigzagVarint64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeInt64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUnsignedVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint32String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUint32String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUnsignedVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUint64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint64String_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed32(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed64(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed32(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed64(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFloat = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFloat(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedDouble = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeDouble(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedBool = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeBool(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedEnum = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeEnum(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedString = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeString(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedBytes = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeBytes(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedMessage = function(field, value, writerCallback) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - var bookmark = this.beginDelimited_(field); - writerCallback(value[i], this); - this.endDelimited_(bookmark); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedGroup = function(field, value, writerCallback) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.START_GROUP), writerCallback(value[i], this), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.END_GROUP); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - module$contents$jspb$BinaryWriter_assertSignedInteger(field, value[i]), this.encoder_.writeSignedVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt32String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var intValue = parseInt(value[i], 10); - module$contents$jspb$BinaryWriter_assertSignedInteger(field, intValue); - this.encoder_.writeSignedVarint32(intValue); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSignedVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitFixed64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSplitFixed64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSplitVarint64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitZigzagVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), encoder = this.encoder_, i = 0; i < value.length; i++) { - encoder.writeSplitZigzagVarint64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var num = jspb.arith.Int64.fromString(value[i]); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint32String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint32(parseInt(value[i], 10)); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var num = jspb.arith.UInt64.fromString(value[i]); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint64String(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed32 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeUint32(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed64 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeUint64(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed64String = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - var num = jspb.arith.UInt64.fromString(value[i]); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed32 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt32(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed64 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt64(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed64String = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt64String(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFloat = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeFloat(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedDouble = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeDouble(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedBool = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeBool(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedEnum = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeEnum(value[i]); - } - this.endDelimited_(bookmark); - } -}; -function module$contents$jspb$BinaryWriter_assertSignedInteger(field, value) { - module$contents$jspb$BinaryWriter_assertThat(field, value, value === Math.floor(value)); - module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value); -} -function module$contents$jspb$BinaryWriter_assertThat(field, value, condition) { - condition || (0,goog.asserts.fail)("for [" + value + "] at [" + field + "]"); -} -jspb.BinaryWriter = module$contents$jspb$BinaryWriter_BinaryWriter; -var module$exports$jspb$Freezer$Loading$Info = {isFreezerLoaded:!1}; -var module$contents$jspb$Map_Map = function(arr, valueCtor) { - this.arr_ = arr; - this.valueCtor = valueCtor; - this.map = {}; - this.arrClean = !0; - this.markMessageFrozenFn_ = null; - 0 < this.arr_.length && this.loadFromArray_(); -}; -module$contents$jspb$Map_Map.prototype.isFrozen = function() { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && null != this.markMessageFrozenFn_; -}; -module$contents$jspb$Map_Map.prototype.internalMarkFrozen = function(markMessageFrozenFn) { - goog.asserts.assert(module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded); - this.markMessageFrozenFn_ = markMessageFrozenFn; -}; -module$contents$jspb$Map_Map.prototype.checkNotFrozen_ = function() { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && this.isFrozen()) { - throw Error("Cannot mutate a frozen Map"); - } -}; -module$contents$jspb$Map_Map.prototype.loadFromArray_ = function() { - for (var i = 0; i < this.arr_.length; i++) { - var record = this.arr_[i], key = record[0]; - this.map[key.toString()] = new module$contents$jspb$Map_Entry_(key, record[1]); - } - this.arrClean = !0; -}; -module$contents$jspb$Map_Map.prototype.toArray = function() { - this.checkNotFrozen_(); - return this.syncInternalArray_(!1); -}; -module$contents$jspb$Map_Map.prototype.toArrayInternal = function() { - return this.syncInternalArray_(!0); -}; -module$contents$jspb$Map_Map.prototype.toArrayHelper_ = function(msg, internalCall) { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && internalCall ? msg.toArrayInternal() : msg.toArray(); -}; -module$contents$jspb$Map_Map.prototype.syncInternalArray_ = function(internalCall) { - if (this.arrClean) { - if (this.valueCtor) { - var m = this.map, p; - for (p in m) { - if (Object.prototype.hasOwnProperty.call(m, p)) { - var valueWrapper = m[p].valueWrapper; - valueWrapper && this.toArrayHelper_(valueWrapper, internalCall); - } - } - } - } else { - this.arr_.length = 0; - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - (valueWrapper = entry.valueWrapper) && this.toArrayHelper_(valueWrapper, internalCall); - this.arr_.push([entry.key, entry.value]); - } - this.arrClean = !0; - } - return this.arr_; -}; -module$contents$jspb$Map_Map.prototype.toObject = function(includeInstance, valueToObject) { - for (var rawArray = this.toArrayInternal(), entries = [], i = 0; i < rawArray.length; i++) { - var entry = this.map[rawArray[i][0].toString()]; - this.wrapEntry_(entry); - var valueWrapper = entry.valueWrapper; - valueWrapper ? (goog.asserts.assert(valueToObject), entries.push([entry.key, valueToObject(includeInstance, valueWrapper)])) : entries.push([entry.key, entry.value]); - } - return entries; -}; -module$contents$jspb$Map_Map.fromObject = function(entries, valueCtor, valueFromObject) { - for (var result = new module$contents$jspb$Map_Map([], valueCtor), i = 0; i < entries.length; i++) { - var key = entries[i][0], value = valueFromObject(entries[i][1]); - result.set(key, value); - } - return result; -}; -module$contents$jspb$Map_Map.prototype.getLength = function() { - return this.stringKeys_().length; -}; -module$contents$jspb$Map_Map.prototype.clear = function() { - this.checkNotFrozen_(); - this.map = {}; - this.arrClean = !1; -}; -module$contents$jspb$Map_Map.prototype.del = function(key) { - this.checkNotFrozen_(); - var keyValue = key.toString(), hadKey = this.map.hasOwnProperty(keyValue); - delete this.map[keyValue]; - this.arrClean = !1; - return hadKey; -}; -module$contents$jspb$Map_Map.prototype.getEntryList = function() { - var entries = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - entries.push([entry.key, entry.value]); - } - return entries; -}; -module$contents$jspb$Map_Map.prototype.entries = function() { - var entries = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - entries.push([entry.key, this.wrapEntry_(entry)]); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(entries); -}; -module$contents$jspb$Map_Map.prototype.keys = function() { - var keys = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - keys.push(this.map[strKeys[i]].key); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(keys); -}; -module$contents$jspb$Map_Map.prototype.values = function() { - var values = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - values.push(this.wrapEntry_(this.map[strKeys[i]])); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(values); -}; -module$contents$jspb$Map_Map.prototype.forEach = function(cb, thisArg) { - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - cb.call(thisArg, this.wrapEntry_(entry), entry.key, this); - } -}; -module$contents$jspb$Map_Map.prototype.set = function(key, value) { - this.checkNotFrozen_(); - var entry = new module$contents$jspb$Map_Entry_(key); - this.valueCtor ? (entry.valueWrapper = value, entry.value = value.toArrayInternal()) : entry.value = value; - this.map[key.toString()] = entry; - this.arrClean = !1; - return this; -}; -module$contents$jspb$Map_Map.prototype.setRawData = function(key, rawData) { - this.map[key.toString()] = new module$contents$jspb$Map_Entry_(key, rawData); - this.arrClean = !1; -}; -module$contents$jspb$Map_Map.prototype.wrapEntry_ = function(entry) { - return this.valueCtor ? (entry.valueWrapper || (entry.valueWrapper = new this.valueCtor(entry.value), this.isFrozen() && (goog.asserts.assert(null != this.markMessageFrozenFn_), this.markMessageFrozenFn_(entry.valueWrapper))), entry.valueWrapper) : entry.value; -}; -module$contents$jspb$Map_Map.prototype.get = function(key) { - var entry = this.map[key.toString()]; - if (entry) { - return this.wrapEntry_(entry); - } -}; -module$contents$jspb$Map_Map.prototype.has = function(key) { - return key.toString() in this.map; -}; -module$contents$jspb$Map_Map.prototype.serializeBinary = function(fieldNumber, writer, keyWriterFn, valueWriterFn, valueWriterCallback) { - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - writer.beginSubMessage(fieldNumber); - keyWriterFn.call(writer, 1, entry.key); - this.valueCtor ? valueWriterFn.call(writer, 2, this.wrapEntry_(entry), valueWriterCallback) : valueWriterFn.call(writer, 2, entry.value); - writer.endSubMessage(); - } -}; -module$contents$jspb$Map_Map.deserializeBinary = function(map, reader, keyReaderFn, valueReaderFn, valueReaderCallback, defaultKey, defaultValue) { - for (var key = defaultKey, value = defaultValue; reader.nextField() && !reader.isEndGroup();) { - var field = reader.getFieldNumber(); - 1 == field ? key = keyReaderFn.call(reader) : 2 == field && (map.valueCtor ? (goog.asserts.assert(valueReaderCallback), value || (value = new map.valueCtor), valueReaderFn.call(reader, value, valueReaderCallback)) : value = valueReaderFn.call(reader)); - } - goog.asserts.assert(void 0 != key); - goog.asserts.assert(void 0 != value); - map.set(key, value); -}; -module$contents$jspb$Map_Map.prototype.stringKeys_ = function() { - var m = this.map, ret = [], p; - for (p in m) { - Object.prototype.hasOwnProperty.call(m, p) && ret.push(p); - } - return ret; -}; -var module$contents$jspb$Map_Entry_ = function(key, value) { - this.key = key; - this.value = value; - this.valueWrapper = void 0; -}, module$contents$jspb$Map_ArrayIteratorIterable = function(arr) { - this.idx_ = 0; - this.arr_ = arr; -}; -module$contents$jspb$Map_ArrayIteratorIterable.prototype.next = function() { - return this.idx_ < this.arr_.length ? {done:!1, value:this.arr_[this.idx_++]} : {done:!0, value:void 0}; -}; -"undefined" != typeof Symbol && "undefined" != typeof Symbol.iterator && (module$contents$jspb$Map_ArrayIteratorIterable.prototype[Symbol.iterator] = function() { - return this; -}); -jspb.Map = module$contents$jspb$Map_Map; -var module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo = function(fieldNumber, fieldName, ctor, toObjectFn, isRepeated) { - this.fieldIndex = fieldNumber; - this.fieldName = fieldName; - this.ctor = ctor; - this.toObjectFn = toObjectFn; - this.isRepeated = isRepeated; -}; -module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo.prototype.isMessageType = function() { - return !!this.ctor; -}; -jspb.ExtensionFieldInfo = module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo; -jspb.ExtensionFieldBinaryInfo = function(fieldInfo, binaryReaderFn, binaryWriterFn, binaryMessageSerializeFn, binaryMessageDeserializeFn, isPacked) { - this.fieldInfo = fieldInfo; - this.binaryReaderFn = binaryReaderFn; - this.binaryWriterFn = binaryWriterFn; - this.binaryMessageSerializeFn = binaryMessageSerializeFn; - this.binaryMessageDeserializeFn = binaryMessageDeserializeFn; - this.isPacked = isPacked || !1; -}; -var module$contents$jspb$Message_Message = function() { -}; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT = !0; -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT = !goog.DISALLOW_TEST_ONLY_CODE; -module$contents$jspb$Message_Message.GENERATE_TO_STRING = !0; -module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS = !0; -module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ = "function" == typeof Uint8Array; -module$contents$jspb$Message_Message.prototype.getJsPbMessageId = function() { - return this.messageId_; -}; -module$contents$jspb$Message_Message.getIndex_ = function(msg, fieldNumber) { - return fieldNumber + msg.arrayIndexOffset_; -}; -module$contents$jspb$Message_Message.hiddenES6Property_ = function() { -}; -module$contents$jspb$Message_Message.getFieldNumber = function(msg, index) { - return index - msg.arrayIndexOffset_; -}; -module$contents$jspb$Message_Message.initialize = function(msg, data, messageId, suggestedPivot, repeatedFields, opt_oneofFields) { - msg.wrappers_ = null; - data || (data = messageId ? [messageId] : []); - msg.messageId_ = messageId ? String(messageId) : void 0; - msg.arrayIndexOffset_ = 0 === messageId ? -1 : 0; - msg.array = data; - module$contents$jspb$Message_Message.initPivotAndExtensionObject_(msg, suggestedPivot); - msg.convertedPrimitiveFields_ = {}; - module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS || (msg.repeatedFields = repeatedFields); - if (repeatedFields) { - for (var i = 0; i < repeatedFields.length; i++) { - var fieldNumber = repeatedFields[i]; - if (fieldNumber < msg.pivot_) { - var index = module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber); - msg.array[index] = msg.array[index] || module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_; - } else { - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), msg.extensionObject_[fieldNumber] = msg.extensionObject_[fieldNumber] || module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_; - } - } - } - if (opt_oneofFields && opt_oneofFields.length) { - for (i = 0; i < opt_oneofFields.length; i++) { - module$contents$jspb$Message_Message.computeOneofCase(msg, opt_oneofFields[i]); - } - } -}; -module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ = goog.DEBUG && Object.freeze ? Object.freeze([]) : []; -module$contents$jspb$Message_Message.isExtensionObject = function(o) { - return null !== o && "object" == typeof o && !Array.isArray(o) && !(module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && o instanceof Uint8Array); -}; -module$contents$jspb$Message_Message.initPivotAndExtensionObject_ = function(msg, suggestedPivot) { - var msgLength = msg.array.length, lastIndex = -1; - if (msgLength) { - lastIndex = msgLength - 1; - var obj = msg.array[lastIndex]; - if (module$contents$jspb$Message_Message.isExtensionObject(obj)) { - msg.pivot_ = module$contents$jspb$Message_Message.getFieldNumber(msg, lastIndex); - msg.extensionObject_ = obj; - return; - } - } - -1 < suggestedPivot ? (msg.pivot_ = Math.max(suggestedPivot, module$contents$jspb$Message_Message.getFieldNumber(msg, lastIndex + 1)), msg.extensionObject_ = null) : msg.pivot_ = Number.MAX_VALUE; -}; -module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_ = function(msg) { - var pivotIndex = module$contents$jspb$Message_Message.getIndex_(msg, msg.pivot_); - msg.array[pivotIndex] || (module$contents$jspb$Message_Message.isFrozen(msg) ? (msg.extensionObject_ = {}, Object.freeze(msg.extensionObject_)) : msg.extensionObject_ = msg.array[pivotIndex] = {}); -}; -module$contents$jspb$Message_Message.toObjectList = function(field, toObjectFn, opt_includeInstance) { - for (var result = [], i = 0; i < field.length; i++) { - result[i] = toObjectFn.call(field[i], opt_includeInstance, field[i]); - } - return result; -}; -module$contents$jspb$Message_Message.toObjectExtension = function(proto, obj, extensions, getExtensionFn, opt_includeInstance) { - for (var fieldNumber in extensions) { - if (module$contents$jspb$Message_hasOwnProperty(extensions, fieldNumber)) { - var fieldInfo = extensions[fieldNumber], value = getExtensionFn.call(proto, fieldInfo); - if (null != value) { - for (var name in fieldInfo.fieldName) { - if (fieldInfo.fieldName.hasOwnProperty(name)) { - break; - } - } - obj[name] = fieldInfo.toObjectFn ? fieldInfo.isRepeated ? module$contents$jspb$Message_Message.toObjectList(value, fieldInfo.toObjectFn, opt_includeInstance) : fieldInfo.toObjectFn(opt_includeInstance, value) : value; - } - } - } -}; -module$contents$jspb$Message_Message.serializeBinaryExtensions = function(proto, writer, extensions, getExtensionFn) { - for (var fieldNumber in extensions) { - if (module$contents$jspb$Message_hasOwnProperty(extensions, fieldNumber)) { - var binaryFieldInfo = extensions[fieldNumber], fieldInfo = binaryFieldInfo.fieldInfo; - if (!binaryFieldInfo.binaryWriterFn) { - throw Error("Message extension present that was generated without binary serialization support"); - } - var value = getExtensionFn.call(proto, fieldInfo); - if (null != value) { - if (fieldInfo.isMessageType()) { - if (binaryFieldInfo.binaryMessageSerializeFn) { - binaryFieldInfo.binaryWriterFn.call(writer, fieldInfo.fieldIndex, value, binaryFieldInfo.binaryMessageSerializeFn); - } else { - throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format"); - } - } else { - binaryFieldInfo.binaryWriterFn.call(writer, fieldInfo.fieldIndex, value); - } - } - } - } -}; -module$contents$jspb$Message_Message.readBinaryExtensionMessageSet = function(msg, reader, extensions, getExtensionFn, setExtensionFn) { - if (1 == reader.getFieldNumber() && reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.START_GROUP) { - for (var fieldNumber = 0, rawBytes = null; reader.nextField() && (0 != reader.getWireType() || 0 != reader.getFieldNumber());) { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.VARINT && 2 == reader.getFieldNumber()) { - fieldNumber = reader.readUint32(); - } else { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.DELIMITED && 3 == reader.getFieldNumber()) { - rawBytes = reader.readBytes(); - } else { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - break; - } else { - reader.skipField(); - } - } - } - } - if (1 != reader.getFieldNumber() || reader.getWireType() != module$contents$jspb$BinaryConstants_WireType.END_GROUP || null == rawBytes || 0 == fieldNumber) { - throw Error("Malformed binary bytes for message set"); - } - var binaryFieldInfo = extensions[fieldNumber]; - if (binaryFieldInfo) { - var fieldInfo = binaryFieldInfo.fieldInfo, newValue = new fieldInfo.ctor; - binaryFieldInfo.binaryMessageDeserializeFn.call(newValue, newValue, new module$contents$jspb$BinaryReader_BinaryReader(rawBytes)); - setExtensionFn.call(msg, fieldInfo, newValue); - } - } else { - reader.skipField(); - } -}; -module$contents$jspb$Message_Message.readBinaryExtension = function(msg, reader, extensions, getExtensionFn, setExtensionFn) { - var binaryFieldInfo = extensions[reader.getFieldNumber()]; - if (binaryFieldInfo) { - var fieldInfo = binaryFieldInfo.fieldInfo; - if (!binaryFieldInfo.binaryReaderFn) { - throw Error("Deserializing extension whose generated code does not support binary format"); - } - if (fieldInfo.isMessageType()) { - var value = new fieldInfo.ctor; - binaryFieldInfo.binaryReaderFn.call(reader, value, binaryFieldInfo.binaryMessageDeserializeFn); - } else { - value = binaryFieldInfo.binaryReaderFn.call(reader); - } - if (fieldInfo.isRepeated && !binaryFieldInfo.isPacked) { - var currentList = getExtensionFn.call(msg, fieldInfo); - currentList ? currentList.push(value) : setExtensionFn.call(msg, fieldInfo, [value]); - } else { - setExtensionFn.call(msg, fieldInfo, value); - } - } else { - reader.skipField(); - } -}; -module$contents$jspb$Message_Message.getField = function(msg, fieldNumber) { - if (fieldNumber < msg.pivot_) { - var index = module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber), val = msg.array[index]; - return val !== module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ || module$contents$jspb$Message_Message.isFrozen(msg) ? val : msg.array[index] = []; - } - if (msg.extensionObject_) { - return val = msg.extensionObject_[fieldNumber], val === module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ ? msg.extensionObject_[fieldNumber] = [] : val; - } -}; -module$contents$jspb$Message_Message.hasField = function(msg, fieldNumber) { - return null != module$contents$jspb$Message_Message.getField(msg, fieldNumber); -}; -module$contents$jspb$Message_Message.getRepeatedField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.getOptionalFloatingPointField = function(msg, fieldNumber) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? value : +value; -}; -module$contents$jspb$Message_Message.getBooleanField = function(msg, fieldNumber) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? value : !!value; -}; -module$contents$jspb$Message_Message.getRepeatedFloatingPointField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - msg.convertedPrimitiveFields_ || (msg.convertedPrimitiveFields_ = {}); - if (!msg.convertedPrimitiveFields_[fieldNumber]) { - for (var i = 0; i < values.length; i++) { - values[i] = +values[i]; - } - msg.convertedPrimitiveFields_[fieldNumber] = !0; - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.getRepeatedBooleanField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - msg.convertedPrimitiveFields_ || (msg.convertedPrimitiveFields_ = {}); - if (!msg.convertedPrimitiveFields_[fieldNumber]) { - for (var i = 0; i < values.length; i++) { - values[i] = !!values[i]; - } - msg.convertedPrimitiveFields_[fieldNumber] = !0; - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.bytesAsB64 = function(value) { - if (null == value || "string" === typeof value) { - return value; - } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && value instanceof Uint8Array) { - return goog.crypt.base64.encodeByteArray(value); - } - goog.asserts.fail("Cannot coerce to b64 string: " + goog.typeOf(value)); - return null; -}; -module$contents$jspb$Message_Message.bytesAsU8 = function(value) { - if (null == value || value instanceof Uint8Array) { - return value; - } - if ("string" === typeof value) { - return goog.crypt.base64.decodeStringToUint8Array(value); - } - goog.asserts.fail("Cannot coerce to Uint8Array: " + goog.typeOf(value)); - return null; -}; -module$contents$jspb$Message_Message.bytesListAsB64 = function(value) { - module$contents$jspb$Message_Message.assertConsistentTypes_(value); - return value.length && "string" !== typeof value[0] ? module$contents$goog$array_map(value, module$contents$jspb$Message_Message.bytesAsB64) : value; -}; -module$contents$jspb$Message_Message.bytesListAsU8 = function(value) { - module$contents$jspb$Message_Message.assertConsistentTypes_(value); - return !value.length || value[0] instanceof Uint8Array ? value : module$contents$goog$array_map(value, module$contents$jspb$Message_Message.bytesAsU8); -}; -module$contents$jspb$Message_Message.assertConsistentTypes_ = function(array) { - if (goog.DEBUG && array && 1 < array.length) { - var expected = goog.typeOf(array[0]); - module$contents$goog$array_forEach(array, function(e) { - goog.typeOf(e) != expected && goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got " + goog.typeOf(e) + " expected " + expected); - }); - } -}; -module$contents$jspb$Message_Message.getFieldWithDefault = function(msg, fieldNumber, defaultValue) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getIntegerFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? 0 : defaultValue); -}; -module$contents$jspb$Message_Message.getStringFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? "" : defaultValue); -}; -module$contents$jspb$Message_Message.getIntegerInStringFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? "0" : defaultValue); -}; -module$contents$jspb$Message_Message.getBooleanFieldWithDefault = function(msg, fieldNumber, defaultValue) { - defaultValue = void 0 === defaultValue ? !1 : defaultValue; - var value = module$contents$jspb$Message_Message.getBooleanField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault = function(msg, fieldNumber, defaultValue) { - defaultValue = void 0 === defaultValue ? 0.0 : defaultValue; - var value = module$contents$jspb$Message_Message.getOptionalFloatingPointField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getFieldProto3 = module$contents$jspb$Message_Message.getFieldWithDefault; -module$contents$jspb$Message_Message.getMapField = function(msg, fieldNumber, noLazyCreate, opt_valueCtor) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (fieldNumber in msg.wrappers_) { - return msg.wrappers_[fieldNumber]; - } - var arr = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - if (!arr) { - if (noLazyCreate) { - return; - } - arr = []; - module$contents$jspb$Message_Message.isFrozen(msg) || module$contents$jspb$Message_Message.setField(msg, fieldNumber, arr); - } - var jspbMap = new module$contents$jspb$Map_Map(arr, opt_valueCtor); - module$contents$jspb$Message_Message.isFrozen(msg) && jspbMap.internalMarkFrozen(module$contents$jspb$Message_Message.internalMarkFrozen); - return msg.wrappers_[fieldNumber] = jspbMap; -}; -module$contents$jspb$Message_Message.setField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - fieldNumber < msg.pivot_ ? msg.array[module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber)] = value : (module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), msg.extensionObject_[fieldNumber] = value); - return msg; -}; -module$contents$jspb$Message_Message.clearField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, void 0); -}; -module$contents$jspb$Message_Message.clearRepeatedField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, []); -}; -module$contents$jspb$Message_Message.clearWrapperField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setWrapperField(msg, fieldNumber, void 0); -}; -module$contents$jspb$Message_Message.clearRepeatedWrapperField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setRepeatedWrapperField(msg, fieldNumber, []); -}; -module$contents$jspb$Message_Message.clearOneofField = function(msg, fieldNumber, oneof) { - return module$contents$jspb$Message_Message.setOneofField(msg, fieldNumber, oneof, void 0); -}; -module$contents$jspb$Message_Message.clearOneofWrapperField = function(msg, fieldNumber, oneof) { - return module$contents$jspb$Message_Message.setOneofWrapperField(msg, fieldNumber, oneof, void 0); -}; -module$contents$jspb$Message_Message.setProto3IntField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0); -}; -module$contents$jspb$Message_Message.setProto3FloatField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0.0); -}; -module$contents$jspb$Message_Message.setProto3BooleanField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, !1); -}; -module$contents$jspb$Message_Message.setProto3StringField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, ""); -}; -module$contents$jspb$Message_Message.setProto3BytesField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, ""); -}; -module$contents$jspb$Message_Message.setProto3EnumField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0); -}; -module$contents$jspb$Message_Message.setProto3StringIntField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, "0"); -}; -module$contents$jspb$Message_Message.setFieldIgnoringDefault_ = function(msg, fieldNumber, value, defaultValue) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - value !== defaultValue ? module$contents$jspb$Message_Message.setField(msg, fieldNumber, value) : fieldNumber < msg.pivot_ ? msg.array[module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber)] = null : (module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), delete msg.extensionObject_[fieldNumber]); - return msg; -}; -module$contents$jspb$Message_Message.addToRepeatedField = function(msg, fieldNumber, value, opt_index) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var arr = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber); - void 0 != opt_index ? arr.splice(opt_index, 0, value) : arr.push(value); - return msg; -}; -module$contents$jspb$Message_Message.setOneofField = function(msg, fieldNumber, oneof, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var currentCase = module$contents$jspb$Message_Message.computeOneofCase(msg, oneof); - currentCase && currentCase !== fieldNumber && void 0 !== value && (msg.wrappers_ && currentCase in msg.wrappers_ && (msg.wrappers_[currentCase] = void 0), module$contents$jspb$Message_Message.setField(msg, currentCase, void 0)); - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, value); -}; -module$contents$jspb$Message_Message.computeOneofCase = function(msg, oneof) { - for (var oneofField, oneofValue, isFrozen = module$contents$jspb$Message_Message.isFrozen(msg), i = 0; i < oneof.length; i++) { - var fieldNumber = oneof[i], value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - null != value && (oneofField = fieldNumber, oneofValue = value, isFrozen || module$contents$jspb$Message_Message.setField(msg, fieldNumber, void 0)); - } - return oneofField ? (isFrozen || module$contents$jspb$Message_Message.setField(msg, oneofField, oneofValue), oneofField) : 0; -}; -module$contents$jspb$Message_Message.getWrapperField = function(msg, ctor, fieldNumber, opt_required) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (!msg.wrappers_[fieldNumber]) { - var data = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - if (opt_required || data) { - msg.wrappers_[fieldNumber] = new ctor(data), module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(msg.wrappers_[fieldNumber]); - } - } - return msg.wrappers_[fieldNumber]; -}; -module$contents$jspb$Message_Message.getRepeatedWrapperField = function(msg, ctor, fieldNumber) { - module$contents$jspb$Message_Message.wrapRepeatedField_(msg, ctor, fieldNumber); - var val = msg.wrappers_[fieldNumber]; - val == module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ && (val = msg.wrappers_[fieldNumber] = []); - return val; -}; -module$contents$jspb$Message_Message.wrapRepeatedField_ = function(msg, ctor, fieldNumber) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (!msg.wrappers_[fieldNumber]) { - for (var data = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber), wrappers = [], i = 0; i < data.length; i++) { - wrappers[i] = new ctor(data[i]), module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(wrappers[i]); - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(wrappers); - msg.wrappers_[fieldNumber] = wrappers; - } -}; -module$contents$jspb$Message_Message.setWrapperField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - var data = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value; - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, data); -}; -module$contents$jspb$Message_Message.setOneofWrapperField = function(msg, fieldNumber, oneof, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - var data = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value; - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setOneofField(msg, fieldNumber, oneof, data); -}; -module$contents$jspb$Message_Message.setRepeatedWrapperField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - value = value || []; - for (var data = [], i = 0; i < value.length; i++) { - data[i] = module$contents$jspb$Message_Message.toArrayHelper_(value[i], !0); - } - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, data); -}; -module$contents$jspb$Message_Message.addToRepeatedWrapperField = function(msg, fieldNumber, value, ctor, index) { - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var wrapperArray = module$contents$jspb$Message_Message.getRepeatedWrapperField(msg, ctor, fieldNumber), insertedValue = value ? value : new ctor, array = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber); - void 0 != index ? (wrapperArray.splice(index, 0, insertedValue), array.splice(index, 0, module$contents$jspb$Message_Message.toArrayHelper_(insertedValue, !0))) : (wrapperArray.push(insertedValue), array.push(module$contents$jspb$Message_Message.toArrayHelper_(insertedValue, !0))); - return insertedValue; -}; -module$contents$jspb$Message_Message.toMap = function(field, mapKeyGetterFn, opt_toObjectFn, opt_includeInstance) { - for (var result = {}, i = 0; i < field.length; i++) { - result[mapKeyGetterFn.call(field[i])] = opt_toObjectFn ? opt_toObjectFn.call(field[i], opt_includeInstance, field[i]) : field[i]; - } - return result; -}; -module$contents$jspb$Message_Message.prototype.syncMapFields_ = function(internalCall) { - if (this.wrappers_) { - for (var fieldNumber in this.wrappers_) { - if (module$contents$jspb$Message_hasOwnProperty(this.wrappers_, fieldNumber)) { - var val = this.wrappers_[fieldNumber]; - if (Array.isArray(val)) { - for (var i = 0; i < val.length; i++) { - val[i] && module$contents$jspb$Message_Message.toArrayHelper_(val[i], internalCall); - } - } else { - val && module$contents$jspb$Message_Message.toArrayHelper_(val, internalCall); - } - } - } - } -}; -module$contents$jspb$Message_Message.toArrayHelper_ = function(msg, internalCall) { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && internalCall ? msg.toArrayInternal() : msg.toArray(); -}; -module$contents$jspb$Message_Message.prototype.toArray = function() { - module$contents$jspb$Message_Message.checkNotFrozen_(this); - this.syncMapFields_(!1); - return this.array; -}; -module$contents$jspb$Message_Message.prototype.toArrayInternal = function() { - this.syncMapFields_(!0); - return this.array; -}; -module$contents$jspb$Message_Message.prototype.serialize = module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ ? function() { - var old_toJSON = Uint8Array.prototype.toJSON; - Uint8Array.prototype.toJSON = function() { - return goog.crypt.base64.encodeByteArray(this); - }; - try { - return JSON.stringify(this.array && module$contents$jspb$Message_Message.prepareForSerialize_(module$contents$jspb$Message_Message.toArrayHelper_(this, !0), this), module$contents$jspb$Message_Message.serializeSpecialNumbers_); - } finally { - Uint8Array.prototype.toJSON = old_toJSON; - } -} : function() { - return JSON.stringify(this.array && module$contents$jspb$Message_Message.prepareForSerialize_(module$contents$jspb$Message_Message.toArrayHelper_(this, !0), this), module$contents$jspb$Message_Message.serializeSpecialNumbers_); -}; -module$contents$jspb$Message_Message.prepareForSerialize_ = function(array, msg) { - if (module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS) { - return array; - } - for (var result, length = array.length, needsCopy = !1, extension, i = array.length; i--;) { - var value = array[i]; - if (Array.isArray(value)) { - var nestedMsg = Array.isArray(msg) ? msg[i] : msg && msg.wrappers_ ? msg.wrappers_[module$contents$jspb$Message_Message.getFieldNumber(msg, i)] : void 0; - value = module$contents$jspb$Message_Message.prepareForSerialize_(value, nestedMsg); - !value.length && msg && (Array.isArray(msg) || msg.repeatedFields && -1 != msg.repeatedFields.indexOf(module$contents$jspb$Message_Message.getFieldNumber(msg, i)) && (value = null)); - value != array[i] && (needsCopy = !0); - } else { - if (module$contents$jspb$Message_Message.isExtensionObject(value)) { - extension = module$contents$jspb$Message_Message.prepareExtensionForSerialize_(value, msg && goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message)); - extension != value && (needsCopy = !0); - length--; - continue; - } - } - null == value && length == i + 1 ? (needsCopy = !0, length--) : needsCopy && (result || (result = array.slice(0, length)), result[i] = value); - } - if (!needsCopy) { - return array; - } - result || (result = array.slice(0, length)); - extension && result.push(extension); - return result; -}; -module$contents$jspb$Message_Message.prepareExtensionForSerialize_ = function(extension, msg) { - var result = {}, changed = !1, key; - for (key in extension) { - if (module$contents$jspb$Message_hasOwnProperty(extension, key)) { - var value = extension[key]; - if (Array.isArray(value)) { - var prepared = module$contents$jspb$Message_Message.prepareForSerialize_(value, msg && msg.wrappers_ && msg.wrappers_[key]); - !prepared.length && msg && msg.repeatedFields && -1 != msg.repeatedFields.indexOf(+key) || (result[key] = prepared); - result[key] != value && (changed = !0); - } else { - null != value ? result[key] = value : changed = !0; - } - } - } - if (!changed) { - return extension; - } - for (key in result) { - return result; - } - return null; -}; -module$contents$jspb$Message_Message.serializeSpecialNumbers_ = function(key, value) { - return "number" !== typeof value || !isNaN(value) && Infinity !== value && -Infinity !== value ? value : String(value); -}; -module$contents$jspb$Message_Message.deserializeWithCtor = function(ctor, data) { - var msg = new ctor(data ? JSON.parse(data) : null); - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - return msg; -}; -module$contents$jspb$Message_Message.GENERATE_TO_STRING && (module$contents$jspb$Message_Message.prototype.toString = function() { - return module$contents$jspb$Message_Message.toArrayHelper_(this, !0).toString(); -}); -module$contents$jspb$Message_Message.prototype.getExtension = function(fieldInfo) { - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(this); - this.wrappers_ || (this.wrappers_ = {}); - var isFrozen = module$contents$jspb$Message_Message.isFrozen(this), fieldNumber = fieldInfo.fieldIndex; - if (fieldInfo.isRepeated) { - if (fieldInfo.isMessageType()) { - return this.wrappers_[fieldNumber] || (this.wrappers_[fieldNumber] = module$contents$goog$array_map(this.extensionObject_[fieldNumber] || [], function(arr) { - var msg = new fieldInfo.ctor(arr); - isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(msg); - return msg; - })), isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(this.wrappers_[fieldNumber]), this.wrappers_[fieldNumber]; - } - if (isFrozen) { - var res = this.extensionObject_[fieldNumber]; - res || (res = [], module$contents$jspb$Message_Message.internalMarkFrozen(res)); - return res; - } - return this.extensionObject_[fieldNumber] = this.extensionObject_[fieldNumber] || []; - } - return fieldInfo.isMessageType() ? (!this.wrappers_[fieldNumber] && this.extensionObject_[fieldNumber] && (this.wrappers_[fieldNumber] = new fieldInfo.ctor(this.extensionObject_[fieldNumber]), isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(this.wrappers_[fieldNumber])), this.wrappers_[fieldNumber]) : this.extensionObject_[fieldNumber]; -}; -module$contents$jspb$Message_Message.prototype.setExtension = function(fieldInfo, value) { - module$contents$jspb$Message_Message.checkNotFrozen_(this); - this.wrappers_ || (this.wrappers_ = {}); - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(this); - var fieldNumber = fieldInfo.fieldIndex; - fieldInfo.isRepeated ? (value = value || [], fieldInfo.isMessageType() ? (this.wrappers_[fieldNumber] = value, this.extensionObject_[fieldNumber] = module$contents$goog$array_map(value, function(msg) { - return module$contents$jspb$Message_Message.toArrayHelper_(msg, !0); - })) : this.extensionObject_[fieldNumber] = value) : fieldInfo.isMessageType() ? (this.wrappers_[fieldNumber] = value, this.extensionObject_[fieldNumber] = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value) : this.extensionObject_[fieldNumber] = value; - return this; -}; -module$contents$jspb$Message_Message.difference = function(m1, m2) { - if (!(m1 instanceof m2.constructor)) { - throw Error("Messages have different types."); - } - var arr1 = module$contents$jspb$Message_Message.toArrayHelper_(m1, !0), arr2 = module$contents$jspb$Message_Message.toArrayHelper_(m2, !0), res = [], start = 0, length = arr1.length > arr2.length ? arr1.length : arr2.length; - m1.getJsPbMessageId() && (res[0] = m1.getJsPbMessageId(), start = 1); - for (var i = start; i < length; i++) { - module$contents$jspb$Message_Message.compareFields(arr1[i], arr2[i]) || (res[i] = arr2[i]); - } - return new m1.constructor(res); -}; -module$contents$jspb$Message_Message.equals = function(m1, m2) { - return m1 == m2 || !(!m1 || !m2) && m1 instanceof m2.constructor && module$contents$jspb$Message_Message.compareFields(module$contents$jspb$Message_Message.toArrayHelper_(m1, !0), module$contents$jspb$Message_Message.toArrayHelper_(m2, !0)); -}; -module$contents$jspb$Message_Message.compareExtensions = function(extension1, extension2) { - extension1 = extension1 || {}; - extension2 = extension2 || {}; - var keys = {}, name; - for (name in extension1) { - module$contents$jspb$Message_hasOwnProperty(extension1, name) && (keys[name] = 0); - } - for (name in extension2) { - module$contents$jspb$Message_hasOwnProperty(extension2, name) && (keys[name] = 0); - } - for (name in keys) { - if (module$contents$jspb$Message_hasOwnProperty(keys, name) && !module$contents$jspb$Message_Message.compareFields(extension1[name], extension2[name])) { - return !1; - } - } - return !0; -}; -module$contents$jspb$Message_Message.compareFields = function(field1, field2) { - if (field1 == field2) { - return !0; - } - if (!goog.isObject(field1) || !goog.isObject(field2)) { - return "number" === typeof field1 && isNaN(field1) || "number" === typeof field2 && isNaN(field2) ? String(field1) == String(field2) : !1; - } - if (field1.constructor != field2.constructor) { - return !1; - } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && field1.constructor === Uint8Array) { - if (field1.length != field2.length) { - return !1; - } - for (var i = 0; i < field1.length; i++) { - if (field1[i] != field2[i]) { - return !1; - } - } - return !0; - } - if (field1.constructor === Array) { - var extension1 = void 0, extension2 = void 0, length = Math.max(field1.length, field2.length); - for (i = 0; i < length; i++) { - var val1 = field1[i], val2 = field2[i]; - val1 && val1.constructor == Object && (goog.asserts.assert(void 0 === extension1), goog.asserts.assert(i === field1.length - 1), extension1 = val1, val1 = void 0); - val2 && val2.constructor == Object && (goog.asserts.assert(void 0 === extension2), goog.asserts.assert(i === field2.length - 1), extension2 = val2, val2 = void 0); - if (!module$contents$jspb$Message_Message.compareFields(val1, val2)) { - return !1; - } - } - return extension1 || extension2 ? (extension1 = extension1 || {}, extension2 = extension2 || {}, module$contents$jspb$Message_Message.compareExtensions(extension1, extension2)) : !0; - } - if (field1.constructor === Object) { - return module$contents$jspb$Message_Message.compareExtensions(field1, field2); - } - throw Error("Invalid type in JSPB array"); -}; -module$contents$jspb$Message_Message.prototype.cloneMessage = function() { - return module$contents$jspb$Message_Message.cloneMessage(this); -}; -module$contents$jspb$Message_Message.prototype.clone = function() { - return module$contents$jspb$Message_Message.cloneMessage(this); -}; -module$contents$jspb$Message_Message.clone = function(msg) { - return module$contents$jspb$Message_Message.cloneMessage(msg); -}; -module$contents$jspb$Message_Message.cloneMessage = function(msg) { - var clonedData = module$contents$jspb$Message_Message.clone_(module$contents$jspb$Message_Message.toArrayHelper_(msg, !0)), oldInitialize = module$contents$jspb$Message_Message.initialize; - module$contents$jspb$Message_Message.initialize = function(message, ignoredData, messageId, pivot, repeated, oneof) { - oldInitialize(message, clonedData, messageId, pivot, repeated, oneof); - module$contents$jspb$Message_Message.initialize = oldInitialize; + } + } + } + } }; - var newInstance = new msg.constructor(clonedData); - module$contents$jspb$Message_Message.initialize !== oldInitialize && (module$contents$jspb$Message_Message.initialize = oldInitialize); - return newInstance; + visitReference(this.rootReference); + return counts; }; -module$contents$jspb$Message_Message.copyInto = function(fromMessage, toMessage) { - goog.asserts.assertInstanceof(fromMessage, module$contents$jspb$Message_Message); - goog.asserts.assertInstanceof(toMessage, module$contents$jspb$Message_Message); - goog.asserts.assert(fromMessage.constructor == toMessage.constructor, "Copy source and target message should have the same type."); - for (var copyOfFrom = module$contents$jspb$Message_Message.clone(fromMessage), to = module$contents$jspb$Message_Message.toArrayHelper_(toMessage, !0), from = module$contents$jspb$Message_Message.toArrayHelper_(copyOfFrom, !0), i = to.length = 0; i < from.length; i++) { - to[i] = from[i]; +ee.rpc_convert_batch = {}; +ee.rpc_convert_batch.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; +ee.rpc_convert_batch.taskToExportImageRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - toMessage.wrappers_ = copyOfFrom.wrappers_; - toMessage.extensionObject_ = copyOfFrom.extensionObject_; -}; -module$contents$jspb$Message_Message.clone_ = function(obj) { - if (Array.isArray(obj)) { - for (var clonedArray = Array(obj.length), i = 0; i < obj.length; i++) { - var o = obj[i]; - null != o && (clonedArray[i] = "object" == typeof o ? module$contents$jspb$Message_Message.clone_(goog.asserts.assert(o)) : o); - } - return clonedArray; + var result = new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, grid:null, maxPixels:stringOrNull_(params.maxPixels), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); + switch(destination) { + case ee.rpc_convert_batch.ExportDestination.GCS: + case ee.rpc_convert_batch.ExportDestination.DRIVE: + result.fileExportOptions = ee.rpc_convert_batch.buildImageFileExportOptions_(params, destination); + break; + case ee.rpc_convert_batch.ExportDestination.ASSET: + result.assetExportOptions = ee.rpc_convert_batch.buildImageAssetExportOptions_(params); + break; + default: + throw Error('Export destination "' + destination + '" unknown'); } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && obj instanceof Uint8Array) { - return new Uint8Array(obj); + return result; +}; +ee.rpc_convert_batch.taskToExportTableRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - var clone = {}, key; - for (key in obj) { - module$contents$jspb$Message_hasOwnProperty(obj, key) && (o = obj[key], null != o && (clone[key] = "object" == typeof o ? module$contents$jspb$Message_Message.clone_(goog.asserts.assert(o)) : o)); + var selectors = params.selectors || null; + null != selectors && "string" === typeof selectors && (selectors = selectors.split(",")); + var result = new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, selectors:selectors, maxErrorMeters:numberOrNull_(params.maxErrorMeters), requestId:stringOrNull_(params.id), maxVertices:numberOrNull_(params.maxVertices), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); + switch(destination) { + case ee.rpc_convert_batch.ExportDestination.GCS: + case ee.rpc_convert_batch.ExportDestination.DRIVE: + result.fileExportOptions = ee.rpc_convert_batch.buildTableFileExportOptions_(params, destination); + break; + case ee.rpc_convert_batch.ExportDestination.ASSET: + result.assetExportOptions = ee.rpc_convert_batch.buildTableAssetExportOptions_(params); + break; + default: + throw Error('Export destination "' + destination + '" unknown'); } - return clone; + return result; }; -module$contents$jspb$Message_Message.registerMessageType = function(id, constructor) { - constructor.messageId = id; +ee.rpc_convert_batch.taskToExportVideoRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + var result = new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params), fileExportOptions:null, requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); + result.fileExportOptions = ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.guessDestination_(params)); + return result; }; -module$contents$jspb$Message_Message.messageSetExtensions = {}; -module$contents$jspb$Message_Message.messageSetExtensionsBinary = {}; -module$contents$jspb$Message_Message.isFrozen = function(msg) { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded) { - var extensionObject = !msg.extensionObject_ || Object.isFrozen(msg.extensionObject_); - return Object.isFrozen(msg.array) && extensionObject; +ee.rpc_convert_batch.taskToExportMapRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - return !1; + return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); }; -module$contents$jspb$Message_Message.internalMarkFrozen = function(value) { - goog.asserts.assert(module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded); - Array.isArray(value) ? Object.freeze(value) : (Object.freeze(value.array), value.extensionObject_ && Object.freeze(value.extensionObject_)); +ee.rpc_convert_batch.taskToExportVideoMapRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), + version:stringOrNull_(params.version), maxWorkerCount:numberOrNull_(params.maxWorkers)}); }; -module$contents$jspb$Message_Message.checkNotFrozen_ = function(msg) { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && module$contents$jspb$Message_Message.isFrozen(msg)) { - throw Error("Cannot mutate a frozen Message"); +ee.rpc_convert_batch.taskToExportClassifierRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + var destination = ee.rpc_convert_batch.guessDestination_(params); + if (destination != ee.rpc_convert_batch.ExportDestination.ASSET) { + throw Error('Export destination "' + destination + '" unknown'); } + return new module$exports$eeapiclient$ee_api_client.ExportClassifierRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), requestId:stringOrNull_(params.id), assetExportOptions:new module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}), maxWorkerCount:numberOrNull_(params.maxWorkers), + }); }; -function module$contents$jspb$Message_hasOwnProperty(obj, property) { - return goog.TRUSTED_SITE || Object.prototype.hasOwnProperty.call(obj, property); +function stringOrNull_(value) { + return null != value ? String(value) : null; } -jspb.Message = module$contents$jspb$Message_Message; -var proto = {google:{}}; -proto.google.protobuf = {}; -proto.google.protobuf.Struct = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.Struct, module$contents$jspb$Message_Message); -proto.google.protobuf.Value = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, null, proto.google.protobuf.Value.oneofGroups_); -}; -goog.inherits(proto.google.protobuf.Value, module$contents$jspb$Message_Message); -proto.google.protobuf.ListValue = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ListValue.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ListValue, module$contents$jspb$Message_Message); -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.Struct.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.Struct.toObject(opt_includeInstance, this); -}, proto.google.protobuf.Struct.toObject = function(includeInstance, msg) { - var f, obj = {fieldsMap:(f = msg.getFieldsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.Struct.ObjectFormat = function() { -}, proto.google.protobuf.Struct.fromObject = function(obj) { - var msg = new proto.google.protobuf.Struct; - obj.fieldsMap && module$contents$jspb$Message_Message.setWrapperField(msg, 1, module$contents$jspb$Map_Map.fromObject(obj.fieldsMap, proto.google.protobuf.Value, proto.google.protobuf.Value.fromObject)); - return msg; -}); -proto.google.protobuf.Struct.deserializeBinary = function(bytes) { - return proto.google.protobuf.Struct.deserializeBinaryFromReader(new proto.google.protobuf.Struct, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.Struct.deserializeBinaryFromReader = function(msg, reader$jscomp$0) { - for (; reader$jscomp$0.nextField() && !reader$jscomp$0.isEndGroup();) { - var value = void 0; - switch(reader$jscomp$0.getFieldNumber()) { - case 1: - value = msg.getFieldsMap(); - reader$jscomp$0.readMessage(value, function(message, reader) { - module$contents$jspb$Map_Map.deserializeBinary(message, reader, module$contents$jspb$BinaryReader_BinaryReader.prototype.readString, module$contents$jspb$BinaryReader_BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value); - }); - break; - default: - reader$jscomp$0.skipField(); - } +function numberOrNull_(value) { + return null != value ? Number(value) : null; +} +ee.rpc_convert_batch.guessDestination_ = function(params) { + var destination = ee.rpc_convert_batch.ExportDestination.DRIVE; + if (null == params) { + return destination; } - return msg; -}; -proto.google.protobuf.Struct.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.Struct.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; -proto.google.protobuf.Struct.serializeBinaryToWriter = function(message, writer) { - var f; - (f = message.getFieldsMap(!0)) && 0 < f.getLength() && f.serializeBinary(1, writer, module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeString, module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); -}; -proto.google.protobuf.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { - return module$contents$jspb$Message_Message.getMapField(this, 1, opt_noLazyCreate, proto.google.protobuf.Value); -}; -proto.google.protobuf.Struct.prototype.clearFieldsMap = function() { - this.getFieldsMap().clear(); - return this; -}; -proto.google.protobuf.Struct.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.Struct, data); + null != params.outputBucket || null != params.outputPrefix ? destination = ee.rpc_convert_batch.ExportDestination.GCS : null != params.assetId && (destination = ee.rpc_convert_batch.ExportDestination.ASSET); + return destination; }; -proto.google.protobuf.Value.oneofGroups_ = [[1, 2, 3, 4, 5, 6]]; -proto.google.protobuf.Value.KindCase = {KIND_NOT_SET:0, NULL_VALUE:1, NUMBER_VALUE:2, STRING_VALUE:3, BOOL_VALUE:4, STRUCT_VALUE:5, LIST_VALUE:6}; -proto.google.protobuf.Value.prototype.getKindCase = function() { - return module$contents$jspb$Message_Message.computeOneofCase(this, proto.google.protobuf.Value.oneofGroups_[0]); +ee.rpc_convert_batch.buildGeoTiffFormatOptions_ = function(params) { + if (params.fileDimensions && params.tiffFileDimensions) { + throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); + } + var tileSize = params.tiffShardSize || params.shardSize; + return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized, skipEmptyFiles:!(!params.skipEmptyTiles && !params.tiffSkipEmptyFiles), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions || params.tiffFileDimensions), tileSize:numberOrNull_(tileSize), }); }; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.Value.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.Value.toObject(opt_includeInstance, this); -}, proto.google.protobuf.Value.toObject = function(includeInstance, msg) { - var f, obj = {nullValue:module$contents$jspb$Message_Message.getFieldWithDefault(msg, 1, 0), numberValue:module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault(msg, 2), stringValue:module$contents$jspb$Message_Message.getStringFieldWithDefault(msg, 3), boolValue:module$contents$jspb$Message_Message.getBooleanFieldWithDefault(msg, 4), structValue:(f = msg.getStructValue()) && proto.google.protobuf.Struct.toObject(includeInstance, f), listValue:(f = msg.getListValue()) && proto.google.protobuf.ListValue.toObject(includeInstance, - f)}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.Value.ObjectFormat = function() { -}, proto.google.protobuf.Value.fromObject = function(obj) { - var msg = new proto.google.protobuf.Value; - null != obj.nullValue && module$contents$jspb$Message_Message.setField(msg, 1, obj.nullValue); - null != obj.numberValue && module$contents$jspb$Message_Message.setField(msg, 2, obj.numberValue); - null != obj.stringValue && module$contents$jspb$Message_Message.setField(msg, 3, obj.stringValue); - null != obj.boolValue && module$contents$jspb$Message_Message.setField(msg, 4, obj.boolValue); - obj.structValue && module$contents$jspb$Message_Message.setWrapperField(msg, 5, proto.google.protobuf.Struct.fromObject(obj.structValue)); - obj.listValue && module$contents$jspb$Message_Message.setWrapperField(msg, 6, proto.google.protobuf.ListValue.fromObject(obj.listValue)); - return msg; -}); -proto.google.protobuf.Value.deserializeBinary = function(bytes) { - return proto.google.protobuf.Value.deserializeBinaryFromReader(new proto.google.protobuf.Value, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.Value.deserializeBinaryFromReader = function(msg, reader) { - for (; reader.nextField() && !reader.isEndGroup();) { - var value = void 0; - switch(reader.getFieldNumber()) { - case 1: - value = reader.readEnum(); - msg.setNullValue(value); - break; - case 2: - value = reader.readDouble(); - msg.setNumberValue(value); - break; - case 3: - value = reader.readString(); - msg.setStringValue(value); - break; - case 4: - value = reader.readBool(); - msg.setBoolValue(value); - break; - case 5: - value = new proto.google.protobuf.Struct; - reader.readMessage(value, proto.google.protobuf.Struct.deserializeBinaryFromReader); - msg.setStructValue(value); - break; - case 6: - value = new proto.google.protobuf.ListValue; - reader.readMessage(value, proto.google.protobuf.ListValue.deserializeBinaryFromReader); - msg.setListValue(value); - break; - default: - reader.skipField(); +ee.rpc_convert_batch.buildTfRecordFormatOptions_ = function(params) { + var tfRecordOptions = new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed, maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize), sequenceData:!!params.tfrecordSequenceData, collapseBands:!!params.tfrecordCollapseBands, maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold), defaultValue:numberOrNull_(params.tfrecordDefaultValue), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions), + marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize), tensorDepths:null, }), tensorDepths = params.tfrecordTensorDepths; + if (null != tensorDepths) { + if (goog.isObject(tensorDepths)) { + var result = {}; + module$contents$goog$object_forEach(tensorDepths, function(v, k) { + if ("string" !== typeof k || "number" !== typeof v) { + throw Error('"tensorDepths" option must be an object of type Object'); + } + result[k] = v; + }); + tfRecordOptions.tensorDepths = result; + } else { + throw Error('"tensorDepths" option needs to have the form Object.'); } } - return msg; -}; -proto.google.protobuf.Value.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.Value.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; -proto.google.protobuf.Value.serializeBinaryToWriter = function(message, writer) { - var f = module$contents$jspb$Message_Message.getField(message, 1); - null != f && writer.writeEnum(1, f); - f = module$contents$jspb$Message_Message.getField(message, 2); - null != f && writer.writeDouble(2, f); - f = module$contents$jspb$Message_Message.getField(message, 3); - null != f && writer.writeString(3, f); - f = module$contents$jspb$Message_Message.getField(message, 4); - null != f && writer.writeBool(4, f); - f = message.getStructValue(); - null != f && writer.writeMessage(5, f, proto.google.protobuf.Struct.serializeBinaryToWriter); - f = message.getListValue(); - null != f && writer.writeMessage(6, f, proto.google.protobuf.ListValue.serializeBinaryToWriter); -}; -proto.google.protobuf.Value.prototype.getNullValue = function() { - return module$contents$jspb$Message_Message.getFieldWithDefault(this, 1, 0); -}; -proto.google.protobuf.Value.prototype.setNullValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearNullValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasNullValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 1); -}; -proto.google.protobuf.Value.prototype.getNumberValue = function() { - return module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault(this, 2); -}; -proto.google.protobuf.Value.prototype.setNumberValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearNumberValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasNumberValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 2); -}; -proto.google.protobuf.Value.prototype.getStringValue = function() { - return module$contents$jspb$Message_Message.getStringFieldWithDefault(this, 3); -}; -proto.google.protobuf.Value.prototype.setStringValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearStringValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasStringValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 3); -}; -proto.google.protobuf.Value.prototype.getBoolValue = function() { - return module$contents$jspb$Message_Message.getBooleanFieldWithDefault(this, 4); -}; -proto.google.protobuf.Value.prototype.setBoolValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearBoolValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasBoolValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 4); -}; -proto.google.protobuf.Value.prototype.getStructValue = function() { - return module$contents$jspb$Message_Message.getWrapperField(this, proto.google.protobuf.Struct, 5); -}; -proto.google.protobuf.Value.prototype.setStructValue = function(value) { - return module$contents$jspb$Message_Message.setOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearStructValue = function() { - return module$contents$jspb$Message_Message.clearOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasStructValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 5); -}; -proto.google.protobuf.Value.prototype.getListValue = function() { - return module$contents$jspb$Message_Message.getWrapperField(this, proto.google.protobuf.ListValue, 6); -}; -proto.google.protobuf.Value.prototype.setListValue = function(value) { - return module$contents$jspb$Message_Message.setOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearListValue = function() { - return module$contents$jspb$Message_Message.clearOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasListValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 6); + return tfRecordOptions; }; -proto.google.protobuf.Value.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.Value, data); +ee.rpc_convert_batch.buildImageFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null, driveDestination:null, geoTiffOptions:null, tfRecordOptions:null, fileFormat:ee.rpc_convert.fileFormat(params.fileFormat), }); + "GEO_TIFF" === result.fileFormat ? result.geoTiffOptions = ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params) : "TF_RECORD_IMAGE" === result.fileFormat && (result.tfRecordOptions = ee.rpc_convert_batch.buildTfRecordFormatOptions_(params)); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.repeatedFields_ = [1]; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.ListValue.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.ListValue.toObject(opt_includeInstance, this); -}, proto.google.protobuf.ListValue.toObject = function(includeInstance, msg) { - var f, obj = {valuesList:module$contents$jspb$Message_Message.toObjectList(msg.getValuesList(), proto.google.protobuf.Value.toObject, includeInstance)}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.ListValue.ObjectFormat = function() { -}, proto.google.protobuf.ListValue.fromObject = function(obj) { - var msg = new proto.google.protobuf.ListValue; - obj.valuesList && module$contents$jspb$Message_Message.setRepeatedWrapperField(msg, 1, obj.valuesList.map(proto.google.protobuf.Value.fromObject)); - return msg; -}); -proto.google.protobuf.ListValue.deserializeBinary = function(bytes) { - return proto.google.protobuf.ListValue.deserializeBinaryFromReader(new proto.google.protobuf.ListValue, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.ListValue.deserializeBinaryFromReader = function(msg, reader) { - for (; reader.nextField() && !reader.isEndGroup();) { - var value = void 0; - switch(reader.getFieldNumber()) { - case 1: - value = new proto.google.protobuf.Value; - reader.readMessage(value, proto.google.protobuf.Value.deserializeBinaryFromReader); - msg.addValues(value); - break; - default: - reader.skipField(); - } +ee.rpc_convert_batch.buildImageAssetExportOptions_ = function(params) { + var allPolicies = params.pyramidingPolicy || {}; + try { + allPolicies = JSON.parse(allPolicies); + } catch ($jscomp$unused$catch) { } - return msg; -}; -proto.google.protobuf.ListValue.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.ListValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + var defaultPyramidingPolicy = "PYRAMIDING_POLICY_UNSPECIFIED"; + "string" === typeof allPolicies ? (defaultPyramidingPolicy = allPolicies, allPolicies = {}) : allPolicies[".default"] && (defaultPyramidingPolicy = allPolicies[".default"], delete allPolicies[".default"]); + return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params), pyramidingPolicy:defaultPyramidingPolicy, pyramidingPolicyOverrides:module$contents$goog$object_isEmpty(allPolicies) ? null : allPolicies, tileSize:numberOrNull_(params.shardSize), }); }; -proto.google.protobuf.ListValue.serializeBinaryToWriter = function(message, writer) { - var f = message.getValuesList(); - 0 < f.length && writer.writeRepeatedMessage(1, f, proto.google.protobuf.Value.serializeBinaryToWriter); +ee.rpc_convert_batch.buildTableFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat), }); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.prototype.getValuesList = function() { - return module$contents$jspb$Message_Message.getRepeatedWrapperField(this, proto.google.protobuf.Value, 1); +ee.rpc_convert_batch.buildTableAssetExportOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}); }; -proto.google.protobuf.ListValue.prototype.setValuesList = function(value) { - return module$contents$jspb$Message_Message.setRepeatedWrapperField(this, 1, value); +ee.rpc_convert_batch.buildVideoFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:"MP4", }); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.prototype.addValues = function(opt_value, opt_index) { - return module$contents$jspb$Message_Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Value, opt_index); +ee.rpc_convert_batch.buildVideoOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:stringOrNull_(params.maxPixels), }); }; -proto.google.protobuf.ListValue.prototype.clearValuesList = function() { - return module$contents$jspb$Message_Message.clearRepeatedWrapperField(this, 1); +ee.rpc_convert_batch.buildVideoMapOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:null, }); }; -proto.google.protobuf.ListValue.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.ListValue, data); +ee.rpc_convert_batch.buildTileOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom), scale:numberOrNull_(params.scale), minZoom:numberOrNull_(params.minZoom), skipEmptyTiles:!!params.skipEmptyTiles, mapsApiKey:stringOrNull_(params.mapsApiKey), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions), stride:numberOrNull_(params.stride), zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset), + numberOrNull_(params.maxTimeMachineZoomSubset)), }); }; -proto.google.protobuf.NullValue = {NULL_VALUE:0}; -proto.google.protobuf.Value.prototype.toJavaScript = function() { - var kindCase = proto.google.protobuf.Value.KindCase; - switch(this.getKindCase()) { - case kindCase.NULL_VALUE: - return null; - case kindCase.NUMBER_VALUE: - return this.getNumberValue(); - case kindCase.STRING_VALUE: - return this.getStringValue(); - case kindCase.BOOL_VALUE: - return this.getBoolValue(); - case kindCase.STRUCT_VALUE: - return this.getStructValue().toJavaScript(); - case kindCase.LIST_VALUE: - return this.getListValue().toJavaScript(); - default: - throw Error("Unexpected struct type"); +ee.rpc_convert_batch.buildZoomSubset_ = function(min, max) { + if (null == min && null == max) { + return null; } + var result = new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0, max:null}); + null != min && (result.min = min); + result.max = max; + return result; }; -proto.google.protobuf.Value.fromJavaScript = function(value) { - var ret = new proto.google.protobuf.Value; - switch(goog.typeOf(value)) { - case "string": - ret.setStringValue(value); - break; - case "number": - ret.setNumberValue(value); - break; - case "boolean": - ret.setBoolValue(value); - break; - case "null": - ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE); - break; - case "array": - ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript(value)); - break; - case "object": - ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript(value)); - break; - default: - throw Error("Unexpected struct type."); +ee.rpc_convert_batch.buildGridDimensions_ = function(dimensions) { + if (null == dimensions) { + return null; } - return ret; -}; -proto.google.protobuf.ListValue.prototype.toJavaScript = function() { - for (var ret = [], values = this.getValuesList(), i = 0; i < values.length; i++) { - ret[i] = values[i].toJavaScript(); + var result = new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0, width:0}); + "string" === typeof dimensions && (-1 !== dimensions.indexOf("x") ? dimensions = dimensions.split("x").map(Number) : -1 !== dimensions.indexOf(",") && (dimensions = dimensions.split(",").map(Number))); + if (Array.isArray(dimensions)) { + if (2 === dimensions.length) { + result.height = dimensions[0], result.width = dimensions[1]; + } else { + if (1 === dimensions.length) { + result.height = dimensions[0], result.width = dimensions[0]; + } else { + throw Error("Unable to construct grid from dimensions: " + dimensions); + } + } + } else { + if ("number" !== typeof dimensions || isNaN(dimensions)) { + if (goog.isObject(dimensions) && null != dimensions.height && null != dimensions.width) { + result.height = dimensions.height, result.width = dimensions.width; + } else { + throw Error("Unable to construct grid from dimensions: " + dimensions); + } + } else { + result.height = dimensions, result.width = dimensions; + } } - return ret; + return result; }; -proto.google.protobuf.ListValue.fromJavaScript = function(array) { - for (var ret = new proto.google.protobuf.ListValue, i = 0; i < array.length; i++) { - ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i])); - } - return ret; +ee.rpc_convert_batch.buildGcsDestination_ = function(params) { + var permissions = null; + null != params.writePublicTiles && (permissions = params.writePublicTiles ? "PUBLIC" : "DEFAULT_OBJECT_ACL"); + return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket), filenamePrefix:stringOrNull_(params.outputPrefix), bucketCorsUris:params.bucketCorsUris || null, permissions:permissions, }); }; -proto.google.protobuf.Struct.prototype.toJavaScript = function() { - var ret = {}; - this.getFieldsMap().forEach(function(value, key) { - ret[key] = value.toJavaScript(); - }); - return ret; +ee.rpc_convert_batch.buildDriveDestination_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder), filenamePrefix:stringOrNull_(params.driveFileNamePrefix), }); }; -proto.google.protobuf.Struct.fromJavaScript = function(obj) { - var ret = new proto.google.protobuf.Struct, map = ret.getFieldsMap(), property; - for (property in obj) { - map.set(property, proto.google.protobuf.Value.fromJavaScript(obj[property])); - } - return ret; +ee.rpc_convert_batch.buildEarthEngineDestination_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)}); }; ee.data = {}; -ee.data.authenticateViaOauth = function(clientId, success, opt_error, opt_extraScopes, opt_onImmediateFailed) { - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - opt_extraScopes && (module$contents$goog$array_extend(scopes, opt_extraScopes), module$contents$goog$array_removeDuplicates(scopes)); +ee.data.authenticateViaOauth = function(clientId, success, opt_error, opt_extraScopes, opt_onImmediateFailed, opt_suppressDefaultScopes) { + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes, !1, opt_extraScopes || []); module$contents$ee$apiclient_apiclient.setAuthClient(clientId, scopes); null === clientId ? module$contents$ee$apiclient_apiclient.clearAuthToken() : module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { var onImmediateFailed = opt_onImmediateFailed || goog.partial(ee.data.authenticateViaPopup, success, opt_error); @@ -20629,12 +17579,11 @@ ee.data.authenticateViaPopup = function(opt_success, opt_error) { goog.global.gapi.auth.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), immediate:!1, scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}, goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error)); }; goog.exportSymbol("ee.data.authenticateViaPopup", ee.data.authenticateViaPopup); -ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes) { +ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes, opt_suppressDefaultScopes) { if ("window" in goog.global) { throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead."); } - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - opt_extraScopes && (module$contents$goog$array_extend(scopes, opt_extraScopes), module$contents$goog$array_removeDuplicates(scopes)); + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes, !opt_suppressDefaultScopes, opt_extraScopes || []); module$contents$ee$apiclient_apiclient.setAuthClient(privateKey.client_email, scopes); var jwtClient = new google.auth.JWT(privateKey.client_email, null, privateKey.private_key, scopes, null); ee.data.setAuthTokenRefresher(function(authArgs, callback) { @@ -20710,7 +17659,7 @@ ee.data.makeMapId_ = function(mapid, token, opt_urlFormat) { if (!urlFormat) { module$contents$ee$apiclient_apiclient.initialize(); var base = module$contents$ee$apiclient_apiclient.getTileBaseUrl(); - urlFormat = token ? base + "/map/" + mapid + "/{z}/{x}/{y}?token=" + token : base + "/v1alpha/" + mapid + "/tiles/{z}/{x}/{y}"; + urlFormat = token ? base + "/map/" + mapid + "/{z}/{x}/{y}?token=" + token : base + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + mapid + "/tiles/{z}/{x}/{y}"; } return {mapid:mapid, token:token, formatTileUrl:function(x, y, z) { var width = Math.pow(2, z); @@ -20761,7 +17710,7 @@ ee.data.getFilmstripThumbId = function(params, opt_callback) { }; goog.exportSymbol("ee.data.getFilmstripThumbId", ee.data.getFilmstripThumbId); ee.data.makeThumbUrl = function(id) { - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.thumbid + ":getPixels"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.thumbid + ":getPixels"; }; goog.exportSymbol("ee.data.makeThumbUrl", ee.data.makeThumbUrl); ee.data.getDownloadId = function(params, opt_callback) { @@ -20793,8 +17742,8 @@ ee.data.getDownloadId = function(params, opt_callback) { }) && (params.bands = params.bands.map(function(band) { return {id:band}; })); - if (params.bands && params.bands.some(function($jscomp$destructuring$var16) { - return null == $jscomp$destructuring$var16.id; + if (params.bands && params.bands.some(function($jscomp$destructuring$var18) { + return null == $jscomp$destructuring$var18.id; })) { throw Error("Each band dictionary must have an id."); } @@ -20802,7 +17751,7 @@ ee.data.getDownloadId = function(params, opt_callback) { if ("string" === typeof params.crs_transform) { try { params.crs_transform = JSON.parse(params.crs_transform); - } catch (e$33) { + } catch (e$42) { } } var image = ee.data.images.buildDownloadIdImage(params.image, params), thumbnail = new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null, expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(image)), fileFormat:ee.rpc_convert.fileFormat(params.format), filenamePrefix:params.name, bandIds:params.bands && ee.rpc_convert.bandList(params.bands.map(function(band) { @@ -20815,7 +17764,7 @@ ee.data.getDownloadId = function(params, opt_callback) { goog.exportSymbol("ee.data.getDownloadId", ee.data.getDownloadId); ee.data.makeDownloadUrl = function(id) { module$contents$ee$apiclient_apiclient.initialize(); - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.docid + ":getPixels"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.docid + ":getPixels"; }; goog.exportSymbol("ee.data.makeDownloadUrl", ee.data.makeDownloadUrl); ee.data.getTableDownloadId = function(params, opt_callback) { @@ -20840,7 +17789,7 @@ ee.data.getTableDownloadId = function(params, opt_callback) { }; goog.exportSymbol("ee.data.getTableDownloadId", ee.data.getTableDownloadId); ee.data.makeTableDownloadUrl = function(id) { - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.docid + ":getFeatures"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.docid + ":getFeatures"; }; goog.exportSymbol("ee.data.makeTableDownloadUrl", ee.data.makeTableDownloadUrl); ee.data.newTaskId = function(opt_count, opt_callback) { @@ -20859,8 +17808,8 @@ goog.exportSymbol("ee.data.newTaskId", ee.data.newTaskId); ee.data.getTaskStatus = function(taskId, opt_callback) { var opNames = ee.data.makeStringArray_(taskId).map(ee.rpc_convert.taskIdToOperationName); if (1 === opNames.length) { - var call$35 = new module$contents$ee$apiclient_Call(opt_callback); - return call$35.handle(call$35.operations().get(opNames[0]).then(function(op) { + var call$44 = new module$contents$ee$apiclient_Call(opt_callback); + return call$44.handle(call$44.operations().get(opNames[0]).then(function(op) { return [ee.rpc_convert.operationToTask(op)]; })); } @@ -20914,8 +17863,8 @@ goog.exportSymbol("ee.data.listOperations", ee.data.listOperations); ee.data.cancelOperation = function(operationName, opt_callback) { var opNames = ee.data.makeStringArray_(operationName), request = new module$exports$eeapiclient$ee_api_client.CancelOperationRequest; if (1 === opNames.length) { - var call$36 = new module$contents$ee$apiclient_Call(opt_callback); - call$36.handle(call$36.operations().cancel(opNames[0], request)); + var call$45 = new module$contents$ee$apiclient_Call(opt_callback); + call$45.handle(call$45.operations().cancel(opNames[0], request)); } else { var call = new module$contents$ee$apiclient_BatchCall(opt_callback), operations = call.operations(); call.send(opNames.map(function(op) { @@ -20927,8 +17876,8 @@ goog.exportSymbol("ee.data.cancelOperation", ee.data.cancelOperation); ee.data.getOperation = function(operationName, opt_callback) { var opNames = ee.data.makeStringArray_(operationName).map(ee.rpc_convert.taskIdToOperationName); if (!Array.isArray(operationName)) { - var call$37 = new module$contents$ee$apiclient_Call(opt_callback); - return call$37.handle(call$37.operations().get(opNames[0])); + var call$46 = new module$contents$ee$apiclient_Call(opt_callback); + return call$46.handle(call$46.operations().get(opNames[0])); } var call = new module$contents$ee$apiclient_BatchCall(opt_callback), operations = call.operations(); return call.send(opNames.map(function(op) { @@ -20941,7 +17890,7 @@ ee.data.cancelTask = function(taskId, opt_callback) { }; goog.exportSymbol("ee.data.cancelTask", ee.data.cancelTask); ee.data.updateTask = function(taskId, action, opt_callback) { - if (!goog.object.containsValue(ee.data.TaskUpdateActions, action)) { + if (!module$contents$goog$object_containsValue(ee.data.TaskUpdateActions, action)) { throw Error("Invalid action: " + action); } taskId = ee.data.makeStringArray_(taskId); @@ -20972,6 +17921,9 @@ ee.data.startProcessing = function(taskId, params, opt_callback) { case ee.data.ExportType.VIDEO_MAP: var videoMapRequest = ee.data.prepareExportVideoMapRequest_(params, metadata); return handle(call.videoMap().export(call.projectsPath(), videoMapRequest)); + case ee.data.ExportType.CLASSIFIER: + var classifierRequest = ee.data.prepareExportClassifierRequest_(params, metadata); + return handle(call.classifier().export(call.projectsPath(), classifierRequest)); default: throw Error("Unable to start processing for task of type " + taskType); } @@ -21005,6 +17957,11 @@ ee.data.prepareExportVideoMapRequest_ = function(taskConfig, metadata) { videoMapRequest.expression = ee.data.expressionAugmenter_(videoMapRequest.expression); return videoMapRequest; }; +ee.data.prepareExportClassifierRequest_ = function(taskConfig, metadata) { + var classifierRequest = ee.rpc_convert_batch.taskToExportClassifierRequest(taskConfig); + classifierRequest.expression = ee.data.expressionAugmenter_(classifierRequest.expression); + return classifierRequest; +}; ee.data.startIngestion = function(taskId, request, opt_callback) { var manifest = ee.rpc_convert.toImageManifest(request), convert = function(arg) { return arg ? ee.rpc_convert.operationToProcessingResponse(arg) : null; @@ -21175,8 +18132,8 @@ ee.data.getAssetRootQuota = function(rootId, opt_callback) { })); }; goog.exportSymbol("ee.data.getAssetRootQuota", ee.data.getAssetRootQuota); -ee.data.AssetType = {ALGORITHM:"Algorithm", FOLDER:"Folder", FEATURE_COLLECTION:"FeatureCollection", IMAGE:"Image", IMAGE_COLLECTION:"ImageCollection", TABLE:"Table", UNKNOWN:"Unknown"}; -ee.data.ExportType = {IMAGE:"EXPORT_IMAGE", MAP:"EXPORT_TILES", TABLE:"EXPORT_FEATURES", VIDEO:"EXPORT_VIDEO", VIDEO_MAP:"EXPORT_VIDEO_MAP"}; +ee.data.AssetType = {ALGORITHM:"Algorithm", CLASSIFIER:"Classifier", FOLDER:"Folder", FEATURE_COLLECTION:"FeatureCollection", IMAGE:"Image", IMAGE_COLLECTION:"ImageCollection", TABLE:"Table", UNKNOWN:"Unknown"}; +ee.data.ExportType = {IMAGE:"EXPORT_IMAGE", MAP:"EXPORT_TILES", TABLE:"EXPORT_FEATURES", VIDEO:"EXPORT_VIDEO", VIDEO_MAP:"EXPORT_VIDEO_MAP", CLASSIFIER:"EXPORT_CLASSIFIER"}; ee.data.ExportState = {UNSUBMITTED:"UNSUBMITTED", READY:"READY", RUNNING:"RUNNING", COMPLETED:"COMPLETED", FAILED:"FAILED", CANCEL_REQUESTED:"CANCEL_REQUESTED", CANCELLED:"CANCELLED", }; ee.data.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; ee.data.SystemPropertyPrefix = "system:"; @@ -21339,7 +18296,7 @@ ee.ComputedObject.prototype.name = function() { return "ComputedObject"; }; ee.ComputedObject.prototype.aside = function(func, var_args) { - var args = module$contents$goog$array_toArray(arguments); + var args = Array.from(arguments); args[0] = this; func.apply(goog.global, args); return this; @@ -21441,7 +18398,7 @@ goog.exportProperty(ee.Function.prototype, "apply", ee.Function.prototype.apply) ee.Function.prototype.callOrApply = function(thisValue, args) { var isInstance = void 0 !== thisValue, signature = this.getSignature(); if (ee.Types.useKeywordArgs(args, signature, isInstance)) { - var namedArgs = goog.object.clone(args[0]); + var namedArgs = module$contents$goog$object_clone(args[0]); if (isInstance) { var firstArgName = signature.args[0].name; if (firstArgName in namedArgs) { @@ -21524,7 +18481,7 @@ ee.ApiFunction = function(name, opt_signature) { if (!(this instanceof ee.ApiFunction)) { return ee.ComputedObject.construct(ee.ApiFunction, arguments); } - this.signature_ = goog.object.unsafeClone(opt_signature); + this.signature_ = module$contents$goog$object_unsafeClone(opt_signature); this.signature_.name = name; }; goog.inherits(ee.ApiFunction, ee.Function); @@ -21550,13 +18507,13 @@ ee.ApiFunction.api_ = null; ee.ApiFunction.boundSignatures_ = {}; ee.ApiFunction.allSignatures = function() { ee.ApiFunction.initialize(); - return goog.object.map(ee.ApiFunction.api_, function(func) { + return module$contents$goog$object_map(ee.ApiFunction.api_, function(func) { return func.getSignature(); }); }; ee.ApiFunction.unboundFunctions = function() { ee.ApiFunction.initialize(); - return goog.object.filter(ee.ApiFunction.api_, function(func, name) { + return module$contents$goog$object_filter(ee.ApiFunction.api_, function(func, name) { return !ee.ApiFunction.boundSignatures_[name]; }); }; @@ -21577,7 +18534,7 @@ ee.ApiFunction.initialize = function(opt_successCallback, opt_failureCallback) { opt_successCallback && opt_successCallback(); } else { var callback = function(data, opt_error) { - opt_error ? opt_failureCallback && opt_failureCallback(Error(opt_error)) : (ee.ApiFunction.api_ = goog.object.map(data, function(sig, name) { + opt_error ? opt_failureCallback && opt_failureCallback(Error(opt_error)) : (ee.ApiFunction.api_ = module$contents$goog$object_map(data, function(sig, name) { sig.returns = sig.returns.replace(/<.*>/, ""); for (var i = 0; i < sig.args.length; i++) { sig.args[i].type = sig.args[i].type.replace(/<.*>/, ""); @@ -21595,7 +18552,7 @@ ee.ApiFunction.reset = function() { ee.ApiFunction.importApi = function(target, prefix, typeName, opt_prepend) { ee.ApiFunction.initialize(); var prepend = opt_prepend || ""; - goog.object.forEach(ee.ApiFunction.api_, function(apiFunc, name) { + module$contents$goog$object_forEach(ee.ApiFunction.api_, function(apiFunc, name) { var parts = name.split("."); if (2 == parts.length && parts[0] == prefix) { var fname = prepend + parts[1], signature = apiFunc.getSignature(); @@ -21644,7 +18601,7 @@ ee.arguments.extractImpl_ = function(fn, originalArgs, parameterMatcher) { args[paramNames[i]] = originalArgs[i]; } } else { - var seen = new goog.structs.Set(goog.object.getKeys(firstArg)), expected = new goog.structs.Set(paramNames); + var seen = new goog.structs.Set(module$contents$goog$object_getKeys(firstArg)), expected = new goog.structs.Set(paramNames); if (expected.intersection(seen).isEmpty()) { args[paramNames[0]] = originalArgs[0]; } else { @@ -21652,10 +18609,10 @@ ee.arguments.extractImpl_ = function(fn, originalArgs, parameterMatcher) { if (!unexpected.isEmpty()) { throw Error("Unexpected arguments" + fnNameSnippet + ": " + unexpected.getValues().join(", ")); } - args = goog.object.clone(firstArg); + args = module$contents$goog$object_clone(firstArg); } } - var provided = new goog.structs.Set(goog.object.getKeys(args)), missing = (new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix, function(param) { + var provided = new goog.structs.Set(module$contents$goog$object_getKeys(args)), missing = (new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix, function(param) { return !goog.string.startsWith(param, "opt_"); }))).difference(provided); if (!missing.isEmpty()) { @@ -21710,7 +18667,7 @@ ee.Element.prototype.name = function() { ee.Element.prototype.set = function(var_args) { if (1 >= arguments.length) { var properties = arguments[0]; - ee.Types.isRegularObject(properties) && module$contents$goog$array_equals(goog.object.getKeys(properties), ["properties"]) && goog.isObject(properties.properties) && (properties = properties.properties); + ee.Types.isRegularObject(properties) && module$contents$goog$array_equals(module$contents$goog$object_getKeys(properties), ["properties"]) && goog.isObject(properties.properties) && (properties = properties.properties); if (ee.Types.isRegularObject(properties)) { var result = this; for (var key in properties) { @@ -21761,7 +18718,7 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) { } ee.ComputedObject.call(this, null, null); this.type_ = geoJson.type; - this.coordinates_ = null != geoJson.coordinates ? goog.object.unsafeClone(geoJson.coordinates) : null; + this.coordinates_ = null != geoJson.coordinates ? module$contents$goog$object_unsafeClone(geoJson.coordinates) : null; this.geometries_ = geoJson.geometries || null; if (null != opt_proj) { this.proj_ = opt_proj; @@ -22026,7 +18983,7 @@ ee.Geometry.getEeApiArgs_ = function(jsConstructorFn, originalArgs) { delete args.coords; args.crs = args.proj; delete args.proj; - return goog.object.filter(args, function(x) { + return module$contents$goog$object_filter(args, function(x) { return null != x; }); }; @@ -22273,7 +19230,7 @@ ee.Feature = function(geometry, opt_properties) { if ("system:index" in properties) { throw Error('Can\'t specify both "id" and "system:index".'); } - properties = goog.object.clone(properties); + properties = module$contents$goog$object_clone(properties); properties["system:index"] = geometry.id; } ee.Element.call(this, new ee.ApiFunction("Feature"), {geometry:new ee.Geometry(geometry.geometry), metadata:properties}); @@ -22322,7 +19279,7 @@ ee.data.images.applyTransformsToCollection = function(taskConfig) { }; ee.data.images.applySelectionAndScale = function(image, params, outParams) { var clipParams = {}, dimensions_consumed = !1, SCALING_KEYS = ["maxDimension", "width", "height", "scale"]; - goog.object.forEach(params, function(value, key) { + module$contents$goog$object_forEach(params, function(value, key) { if (null != value) { switch(key) { case "dimensions": @@ -22356,7 +19313,7 @@ ee.data.images.applySelectionAndScale = function(image, params, outParams) { } } }); - goog.object.isEmpty(clipParams) || (clipParams.input = image, image = SCALING_KEYS.some(function(key) { + module$contents$goog$object_isEmpty(clipParams) || (clipParams.input = image, image = SCALING_KEYS.some(function(key) { return key in clipParams; }) || dimensions_consumed ? ee.ApiFunction._apply("Image.clipToBoundsAndScale", clipParams) : ee.ApiFunction._apply("Image.clip", clipParams)); return image; @@ -22446,13 +19403,13 @@ ee.data.images.maybeConvertCrsTransformToArray_ = function(crsTransform) { }; ee.data.images.applyVisualization = function(image, params) { var request = {}, visParams = ee.data.images.extractVisParams(params, request); - goog.object.isEmpty(visParams) || (visParams.image = image, image = ee.ApiFunction._apply("Image.visualize", visParams)); + module$contents$goog$object_isEmpty(visParams) || (visParams.image = image, image = ee.ApiFunction._apply("Image.visualize", visParams)); request.image = image; return request; }; ee.data.images.extractVisParams = function(params, outParams) { var keysToExtract = "bands gain bias min max gamma palette opacity forceRgbOutput".split(" "), visParams = {}; - goog.object.forEach(params, function(value, key) { + module$contents$goog$object_forEach(params, function(value, key) { module$contents$goog$array_contains(keysToExtract, key) ? visParams[key] = value : outParams[key] = value; }); return visParams; @@ -22563,7 +19520,7 @@ ee.Image.prototype.getMap = function(opt_visParams, opt_callback) { }; goog.exportProperty(ee.Image.prototype, "getMap", ee.Image.prototype.getMap); ee.Image.prototype.getDownloadURL = function(params, opt_callback) { - var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? goog.object.clone(args.params) : {}; + var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? module$contents$goog$object_clone(args.params) : {}; request.image = this; if (args.callback) { var callback = args.callback; @@ -22576,7 +19533,7 @@ ee.Image.prototype.getDownloadURL = function(params, opt_callback) { }; goog.exportProperty(ee.Image.prototype, "getDownloadURL", ee.Image.prototype.getDownloadURL); ee.Image.prototype.getThumbId = function(params, opt_callback) { - var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? goog.object.clone(args.params) : {}, extra = {}, image = ee.data.images.applyCrsAndTransform(this, request); + var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? module$contents$goog$object_clone(args.params) : {}, extra = {}, image = ee.data.images.applyCrsAndTransform(this, request); image = ee.data.images.applySelectionAndScale(image, request, extra); request = ee.data.images.applyVisualization(image, extra); return args.callback ? (ee.data.getThumbId(request, args.callback), null) : ee.data.getThumbId(request); @@ -22668,7 +19625,7 @@ ee.Image.prototype.clip = function(geometry) { }; goog.exportProperty(ee.Image.prototype, "clip", ee.Image.prototype.clip); ee.Image.prototype.rename = function(var_args) { - var names = 1 != arguments.length || ee.Types.isString(arguments[0]) ? module$contents$goog$array_toArray(arguments) : arguments[0]; + var names = 1 != arguments.length || ee.Types.isString(arguments[0]) ? Array.from(arguments) : arguments[0]; return ee.ApiFunction._call("Image.rename", this, names); }; goog.exportProperty(ee.Image.prototype, "rename", ee.Image.prototype.rename); @@ -22942,14 +19899,14 @@ ee.ImageCollection.prototype.elementType = function() { return ee.Image; }; ee.batch = {}; -var module$contents$ee$batch_Export = {image:{}, map:{}, table:{}, video:{}, videoMap:{}}, module$contents$ee$batch_ExportTask = function(config) { +var module$contents$ee$batch_Export = {image:{}, map:{}, table:{}, video:{}, videoMap:{}, classifier:{}}, module$contents$ee$batch_ExportTask = function(config) { this.config_ = config; this.id = null; }; module$contents$ee$batch_ExportTask.create = function(exportArgs) { var config = {element:module$contents$ee$batch_Export.extractElement(exportArgs)}; Object.assign(config, exportArgs); - config = goog.object.filter(config, function(x) { + config = module$contents$goog$object_filter(config, function(x) { return null != x; }); return new module$contents$ee$batch_ExportTask(config); @@ -22973,7 +19930,7 @@ module$contents$ee$batch_ExportTask.prototype.start = function(opt_success, opt_ } }; goog.exportProperty(module$contents$ee$batch_ExportTask.prototype, "start", module$contents$ee$batch_ExportTask.prototype.start); -module$contents$ee$batch_Export.image.toAsset = function(image, opt_description, opt_assetId, opt_pyramidingPolicy, opt_dimensions, opt_region, opt_scale, opt_crs, opt_crsTransform, opt_maxPixels) { +module$contents$ee$batch_Export.image.toAsset = function(image, opt_description, opt_assetId, opt_pyramidingPolicy, opt_dimensions, opt_region, opt_scale, opt_crs, opt_crsTransform, opt_maxPixels, opt_shardSize) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.IMAGE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; @@ -22993,19 +19950,19 @@ module$contents$ee$batch_Export.map.toCloudStorage = function(image, opt_descrip return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.map.toCloudStorage", module$contents$ee$batch_Export.map.toCloudStorage); -module$contents$ee$batch_Export.table.toCloudStorage = function(collection, opt_description, opt_bucket, opt_fileNamePrefix, opt_fileFormat, opt_selectors) { +module$contents$ee$batch_Export.table.toCloudStorage = function(collection, opt_description, opt_bucket, opt_fileNamePrefix, opt_fileFormat, opt_selectors, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toCloudStorage, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.GCS, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.table.toCloudStorage", module$contents$ee$batch_Export.table.toCloudStorage); -module$contents$ee$batch_Export.table.toDrive = function(collection, opt_description, opt_folder, opt_fileNamePrefix, opt_fileFormat, opt_selectors) { +module$contents$ee$batch_Export.table.toDrive = function(collection, opt_description, opt_folder, opt_fileNamePrefix, opt_fileFormat, opt_selectors, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDrive, arguments); clientConfig.type = ee.data.ExportType.TABLE; var serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.DRIVE, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.table.toDrive", module$contents$ee$batch_Export.table.toDrive); -module$contents$ee$batch_Export.table.toAsset = function(collection, opt_description, opt_assetId) { +module$contents$ee$batch_Export.table.toAsset = function(collection, opt_description, opt_assetId, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; @@ -23025,6 +19982,11 @@ module$contents$ee$batch_Export.videoMap.toCloudStorage = function(collection, o return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.videoMap.toCloudStorage", module$contents$ee$batch_Export.videoMap.toCloudStorage); +module$contents$ee$batch_Export.classifier.toAsset = function(classifier, opt_description, opt_assetId) { + var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.classifier.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.CLASSIFIER); + return module$contents$ee$batch_ExportTask.create(serverConfig); +}; +goog.exportSymbol("module$contents$ee$batch_Export.classifier.toAsset", module$contents$ee$batch_Export.classifier.toAsset); module$contents$ee$batch_Export.serializeRegion = function(region) { if (region instanceof ee.Geometry) { region = region.toGeoJSON(); @@ -23051,7 +20013,7 @@ module$contents$ee$batch_Export.serializeRegion = function(region) { return JSON.stringify(region); }; module$contents$ee$batch_Export.resolveRegionParam = function(params) { - params = goog.object.clone(params); + params = module$contents$goog$object_clone(params); if (!params.region) { return goog.Promise.resolve(params); } @@ -23070,7 +20032,7 @@ module$contents$ee$batch_Export.extractElement = function(exportArgs) { var isInArgs = function(key) { return key in exportArgs; }, eeElementKey = module$contents$ee$batch_Export.EE_ELEMENT_KEYS.find(isInArgs); - goog.asserts.assert(1 === module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS, isInArgs), 'Expected a single "image" or "collection" key.'); + goog.asserts.assert(1 === module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS, isInArgs), 'Expected a single "image", "collection" or "classifier" key.'); var element = exportArgs[eeElementKey]; if (element instanceof ee.Image) { var result = element; @@ -23084,7 +20046,11 @@ module$contents$ee$batch_Export.extractElement = function(exportArgs) { if (element instanceof ee.Element) { result = element; } else { - throw Error("Unknown element type provided: " + typeof element + ". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element."); + if (element instanceof ee.ComputedObject) { + result = element; + } else { + throw Error("Unknown element type provided: " + typeof element + ". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject."); + } } } } @@ -23112,6 +20078,9 @@ module$contents$ee$batch_Export.convertToServerParams = function(originalArgs, d case ee.data.ExportType.VIDEO_MAP: taskConfig = module$contents$ee$batch_Export.videoMap.prepareTaskConfig_(taskConfig, destination); break; + case ee.data.ExportType.CLASSIFIER: + taskConfig = module$contents$ee$batch_Export.classifier.prepareTaskConfig_(taskConfig, destination); + break; default: throw Error("Unknown export type: " + taskConfig.type); } @@ -23171,8 +20140,11 @@ module$contents$ee$batch_Export.videoMap.prepareTaskConfig_ = function(taskConfi taskConfig.tileDimensions = {width:taskConfig.tileWidth || 256, height:taskConfig.tileHeight || 256}; return taskConfig = module$contents$ee$batch_Export.prepareDestination_(taskConfig, destination); }; +module$contents$ee$batch_Export.classifier.prepareTaskConfig_ = function(taskConfig, destination) { + return taskConfig = module$contents$ee$batch_Export.prepareDestination_(taskConfig, destination); +}; var module$contents$ee$batch_VideoFormat = {MP4:"MP4", GIF:"GIF", VP9:"VP9", }, module$contents$ee$batch_MapFormat = {AUTO_JPEG_PNG:"AUTO_JPEG_PNG", JPEG:"JPEG", PNG:"PNG", }, module$contents$ee$batch_ImageFormat = {GEO_TIFF:"GEO_TIFF", TF_RECORD_IMAGE:"TF_RECORD_IMAGE", }, module$contents$ee$batch_TableFormat = {CSV:"CSV", GEO_JSON:"GEO_JSON", KML:"KML", KMZ:"KMZ", SHP:"SHP", TF_RECORD_TABLE:"TF_RECORD_TABLE", }, module$contents$ee$batch_VideoMapVersion = {V1:"V1", V2:"V2", }, module$contents$ee$batch_FORMAT_OPTIONS_MAP = -{GEO_TIFF:["cloudOptimized", "fileDimensions", ], TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")}, module$contents$ee$batch_FORMAT_PREFIX_MAP = {GEO_TIFF:"tiff", TF_RECORD_IMAGE:"tfrecord"}; +{GEO_TIFF:["cloudOptimized", "fileDimensions", "shardSize", ], TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")}, module$contents$ee$batch_FORMAT_PREFIX_MAP = {GEO_TIFF:"tiff", TF_RECORD_IMAGE:"tfrecord"}; module$contents$ee$batch_Export.reconcileVideoFormat_ = function(taskConfig) { taskConfig.videoOptions = taskConfig.framesPerSecond || 5.0; taskConfig.maxFrames = taskConfig.maxFrames || 1000; @@ -23287,12 +20259,12 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, return {}; } if (Object.keys(taskConfig).some(function(key) { - return goog.object.containsKey(formatOptions, key); + return module$contents$goog$object_containsKey(formatOptions, key); })) { throw Error("Parameter specified at least twice: once in config, and once in config format options."); } - for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$18 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$18.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$18.next()) { - var $jscomp$destructuring$var19 = $jscomp.makeIterator($jscomp$key$.value), key$jscomp$0 = $jscomp$destructuring$var19.next().value, value = $jscomp$destructuring$var19.next().value; + for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$20.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$20.next()) { + var $jscomp$destructuring$var21 = $jscomp.makeIterator($jscomp$key$.value), key$jscomp$0 = $jscomp$destructuring$var21.next().value, value = $jscomp$destructuring$var21.next().value; if (!module$contents$goog$array_contains(validOptionKeys, key$jscomp$0)) { var validKeysMsg = validOptionKeys.join(", "); throw Error('"' + key$jscomp$0 + '" is not a valid option, the image format "' + imageFormat + '""may have the following options: ' + (validKeysMsg + '".')); @@ -23303,7 +20275,7 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, return prefixedOptions; }; module$contents$ee$batch_Export.CRS_TRANSFORM_KEY = "crs_transform"; -module$contents$ee$batch_Export.EE_ELEMENT_KEYS = ["image", "collection"]; +module$contents$ee$batch_Export.EE_ELEMENT_KEYS = ["image", "collection", "classifier"]; ee.batch.Export = module$contents$ee$batch_Export; ee.batch.ExportTask = module$contents$ee$batch_ExportTask; ee.batch.ImageFormat = module$contents$ee$batch_ImageFormat; @@ -23469,8 +20441,8 @@ ee.CustomFunction.resolveNamelessArgs_ = function(signature, vars, body) { return node.functionDefinitionValue ? 1 : node.arrayValue ? countNodes(node.arrayValue.values) : node.dictionaryValue ? countNodes(Object.values(node.dictionaryValue.values)) : node.functionInvocationValue ? countNodes(Object.values(node.functionInvocationValue.arguments)) : 0; }; return countNodes(Object.values(expression.values)); - }(ee.Serializer.encodeCloudApiExpression(body.apply(null, vars))) + "_", i$38 = 0; i$38 < namelessArgIndices.length; i$38++) { - var index = namelessArgIndices[i$38], name = baseName + i$38; + }(ee.Serializer.encodeCloudApiExpression(body.apply(null, vars))) + "_", i$47 = 0; i$47 < namelessArgIndices.length; i$47++) { + var index = namelessArgIndices[i$47], name = baseName + i$47; vars[index].varName = name; signature.args[index].name = name; } @@ -23585,12 +20557,12 @@ ee.Deserializer.decodeValue_ = function(json, namedValues) { return ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:json}), json); case "Invocation": var func = "functionName" in json ? ee.ApiFunction.lookup(json.functionName) : ee.Deserializer.decodeValue_(json["function"], namedValues); - var args = goog.object.map(json.arguments, function(element) { + var args = module$contents$goog$object_map(json.arguments, function(element) { return ee.Deserializer.decodeValue_(element, namedValues); }); return ee.Deserializer.invocation_(func, args); case "Dictionary": - return goog.object.map(json.value, function(element) { + return module$contents$goog$object_map(json.value, function(element) { return ee.Deserializer.decodeValue_(element, namedValues); }); case "Function": @@ -23660,7 +20632,7 @@ ee.Deserializer.decodeCloudApi = function(json) { } return decoded[reference]; }, decode = function(node) { - return null !== node.constantValue ? node.constantValue : null !== node.arrayValue ? node.arrayValue.values.map(decode) : null !== node.dictionaryValue ? goog.object.map(node.dictionaryValue.values, decode) : null !== node.argumentReference ? ee.CustomFunction.variable(Object, node.argumentReference) : null !== node.functionDefinitionValue ? decodeFunctionDefinition(node.functionDefinitionValue) : null !== node.functionInvocationValue ? decodeFunctionInvocation(node.functionInvocationValue) : + return null !== node.constantValue ? node.constantValue : null !== node.arrayValue ? node.arrayValue.values.map(decode) : null !== node.dictionaryValue ? module$contents$goog$object_map(node.dictionaryValue.values, decode) : null !== node.argumentReference ? ee.CustomFunction.variable(Object, node.argumentReference) : null !== node.functionDefinitionValue ? decodeFunctionDefinition(node.functionDefinitionValue) : null !== node.functionInvocationValue ? decodeFunctionInvocation(node.functionInvocationValue) : null !== node.bytesValue ? ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:node.bytesValue}), node.bytesValue) : null !== node.integerValue ? ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({integerValue:node.integerValue}), node.integerValue) : null !== node.valueReference ? lookup(node.valueReference, "reference") : null; }, decodeFunctionDefinition = function(defined) { var body = lookup(defined.body, "function body"), signature = {args:defined.argumentNames.map(function(name) { @@ -23670,7 +20642,7 @@ ee.Deserializer.decodeCloudApi = function(json) { return body; }); }, decodeFunctionInvocation = function(invoked) { - var func = invoked.functionReference ? lookup(invoked.functionReference, "function") : ee.ApiFunction.lookup(invoked.functionName), args = goog.object.map(invoked.arguments, decode); + var func = invoked.functionReference ? lookup(invoked.functionReference, "function") : ee.ApiFunction.lookup(invoked.functionName), args = module$contents$goog$object_map(invoked.arguments, decode); return ee.Deserializer.invocation_(func, args); }; return lookup(expression.result, "result value"); @@ -23762,7 +20734,7 @@ ee.reset = function() { ee.String.reset(); ee.Terrain.reset(); ee.resetGeneratedClasses_(); - goog.object.clear(ee.Algorithms); + module$contents$goog$object_clear(ee.Algorithms); }; goog.exportSymbol("ee.reset", ee.reset); ee.InitState = {NOT_READY:"not_ready", LOADING:"loading", READY:"ready"}; @@ -23891,7 +20863,7 @@ ee.promote_ = function(arg, klass) { }; ee.initializeUnboundMethods_ = function() { var unbound = ee.ApiFunction.unboundFunctions(); - goog.object.getKeys(unbound).sort().forEach(function(name) { + module$contents$goog$object_getKeys(unbound).sort().forEach(function(name) { var func = unbound[name], signature = func.getSignature(); if (!signature.hidden) { var nameParts = name.split("."), target = ee.Algorithms; @@ -24135,7 +21107,7 @@ goog.events.EventHandler.prototype.unlistenWithWrapper = function(src, wrapper, return this; }; goog.events.EventHandler.prototype.removeAll = function() { - goog.object.forEach(this.keys_, function(listenerObj, key) { + module$contents$goog$object_forEach(this.keys_, function(listenerObj, key) { this.keys_.hasOwnProperty(key) && goog.events.unlistenByKey(listenerObj); }, this); this.keys_ = {}; @@ -24163,7 +21135,7 @@ goog.inherits(goog.fs.Error, module$contents$goog$debug$Error_DebugError); goog.fs.Error.ErrorName = {ABORT:"AbortError", ENCODING:"EncodingError", INVALID_MODIFICATION:"InvalidModificationError", INVALID_STATE:"InvalidStateError", NOT_FOUND:"NotFoundError", NOT_READABLE:"NotReadableError", NO_MODIFICATION_ALLOWED:"NoModificationAllowedError", PATH_EXISTS:"PathExistsError", QUOTA_EXCEEDED:"QuotaExceededError", SECURITY:"SecurityError", SYNTAX:"SyntaxError", TYPE_MISMATCH:"TypeMismatchError"}; goog.fs.Error.ErrorCode = {NOT_FOUND:1, SECURITY:2, ABORT:3, NOT_READABLE:4, ENCODING:5, NO_MODIFICATION_ALLOWED:6, INVALID_STATE:7, SYNTAX:8, INVALID_MODIFICATION:9, QUOTA_EXCEEDED:10, TYPE_MISMATCH:11, PATH_EXISTS:12}; goog.fs.Error.getNameFromCode_ = function(code) { - var name = goog.object.findKey(goog.fs.Error.NameToCodeMap_, function(c) { + var name = module$contents$goog$object_findKey(goog.fs.Error.NameToCodeMap_, function(c) { return code == c; }); if (void 0 === name) { @@ -24174,8 +21146,10 @@ goog.fs.Error.getNameFromCode_ = function(code) { goog.fs.Error.getCodeFromName_ = function(name) { return goog.fs.Error.NameToCodeMap_[name]; }; -goog.fs.Error.NameToCodeMap_ = goog.object.create(goog.fs.Error.ErrorName.ABORT, goog.fs.Error.ErrorCode.ABORT, goog.fs.Error.ErrorName.ENCODING, goog.fs.Error.ErrorCode.ENCODING, goog.fs.Error.ErrorName.INVALID_MODIFICATION, goog.fs.Error.ErrorCode.INVALID_MODIFICATION, goog.fs.Error.ErrorName.INVALID_STATE, goog.fs.Error.ErrorCode.INVALID_STATE, goog.fs.Error.ErrorName.NOT_FOUND, goog.fs.Error.ErrorCode.NOT_FOUND, goog.fs.Error.ErrorName.NOT_READABLE, goog.fs.Error.ErrorCode.NOT_READABLE, goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED, -goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED, goog.fs.Error.ErrorName.PATH_EXISTS, goog.fs.Error.ErrorCode.PATH_EXISTS, goog.fs.Error.ErrorName.QUOTA_EXCEEDED, goog.fs.Error.ErrorCode.QUOTA_EXCEEDED, goog.fs.Error.ErrorName.SECURITY, goog.fs.Error.ErrorCode.SECURITY, goog.fs.Error.ErrorName.SYNTAX, goog.fs.Error.ErrorCode.SYNTAX, goog.fs.Error.ErrorName.TYPE_MISMATCH, goog.fs.Error.ErrorCode.TYPE_MISMATCH); +var $jscomp$compprop4 = {}; +goog.fs.Error.NameToCodeMap_ = ($jscomp$compprop4[goog.fs.Error.ErrorName.ABORT] = goog.fs.Error.ErrorCode.ABORT, $jscomp$compprop4[goog.fs.Error.ErrorName.ENCODING] = goog.fs.Error.ErrorCode.ENCODING, $jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_MODIFICATION] = goog.fs.Error.ErrorCode.INVALID_MODIFICATION, $jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_STATE] = goog.fs.Error.ErrorCode.INVALID_STATE, $jscomp$compprop4[goog.fs.Error.ErrorName.NOT_FOUND] = goog.fs.Error.ErrorCode.NOT_FOUND, +$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_READABLE] = goog.fs.Error.ErrorCode.NOT_READABLE, $jscomp$compprop4[goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED] = goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED, $jscomp$compprop4[goog.fs.Error.ErrorName.PATH_EXISTS] = goog.fs.Error.ErrorCode.PATH_EXISTS, $jscomp$compprop4[goog.fs.Error.ErrorName.QUOTA_EXCEEDED] = goog.fs.Error.ErrorCode.QUOTA_EXCEEDED, $jscomp$compprop4[goog.fs.Error.ErrorName.SECURITY] = goog.fs.Error.ErrorCode.SECURITY, $jscomp$compprop4[goog.fs.Error.ErrorName.SYNTAX] = +goog.fs.Error.ErrorCode.SYNTAX, $jscomp$compprop4[goog.fs.Error.ErrorName.TYPE_MISMATCH] = goog.fs.Error.ErrorCode.TYPE_MISMATCH, $jscomp$compprop4); goog.fs.ProgressEvent = function(event, target) { goog.events.Event.call(this, event.type, target); this.event_ = event; @@ -24868,7 +21842,7 @@ goog.style.installSafeStyleSheet = function(safeStyleSheet, opt_node) { head = dh.createDom(goog.dom.TagName.HEAD); body.parentNode.insertBefore(head, body); } - var el = dh.createDom(goog.dom.TagName.STYLE), nonce = goog.getScriptNonce(); + var el = dh.createDom(goog.dom.TagName.STYLE), nonce = goog.dom.safe.getStyleNonce(); nonce && el.setAttribute("nonce", nonce); goog.style.setSafeStyleSheet(el, safeStyleSheet); dh.appendChild(head, el); @@ -25073,7 +22047,7 @@ goog.style.parseStyleAttribute = function(value) { }; goog.style.toStyleAttribute = function(obj) { var buffer = []; - goog.object.forEach(obj, function(value, key) { + module$contents$goog$object_forEach(obj, function(value, key) { buffer.push(goog.string.toSelectorCase(key), ":", value, ";"); }); return buffer.join(""); @@ -25269,7 +22243,7 @@ ee.layers.AbstractTile.prototype.startLoad = function() { status == HttpStatus.TOO_MANY_REQUESTS && $jscomp$this.setStatus(ee.layers.AbstractTile.Status.THROTTLED); if (HttpStatus.isSuccess(status)) { var sourceResponseHeaders = {}; - goog.object.forEach($jscomp$this.xhrIo_.getResponseHeaders(), function(value, name) { + module$contents$goog$object_forEach($jscomp$this.xhrIo_.getResponseHeaders(), function(value, name) { sourceResponseHeaders[name.toLowerCase()] = value; }); $jscomp$this.sourceResponseHeaders = sourceResponseHeaders; @@ -25334,13 +22308,12 @@ ee.layers.AbstractTile.prototype.disposeInternal = function() { }; ee.layers.AbstractTile.EventType = {STATUS_CHANGED:"status-changed"}; ee.layers.AbstractTile.Status = {NEW:"new", LOADING:"loading", THROTTLED:"throttled", LOADED:"loaded", FAILED:"failed", ABORTED:"aborted", REMOVED:"removed", }; -ee.layers.AbstractTile.DONE_STATUS_SET_ = goog.object.createSet(ee.layers.AbstractTile.Status.ABORTED, ee.layers.AbstractTile.Status.FAILED, ee.layers.AbstractTile.Status.LOADED, ee.layers.AbstractTile.Status.REMOVED); +ee.layers.AbstractTile.DONE_STATUS_SET_ = module$contents$goog$object_createSet(ee.layers.AbstractTile.Status.ABORTED, ee.layers.AbstractTile.Status.FAILED, ee.layers.AbstractTile.Status.LOADED, ee.layers.AbstractTile.Status.REMOVED); ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_ = 5; -var module$contents$ee$layers$AbstractTileSource_AbstractTileSource = function() { +var module$exports$ee$layers$AbstractTileSource = function() { goog.Disposable.call(this); }; -$jscomp.inherits(module$contents$ee$layers$AbstractTileSource_AbstractTileSource, goog.Disposable); -ee.layers.AbstractTileSource = module$contents$ee$layers$AbstractTileSource_AbstractTileSource; +$jscomp.inherits(module$exports$ee$layers$AbstractTileSource, goog.Disposable); ee.layers.BinaryOverlay = function(tileSource, opt_options) { ee.layers.AbstractOverlay.call(this, tileSource, opt_options); this.buffersByCoord_ = new goog.structs.Map; @@ -25399,7 +22372,7 @@ goog.net.ImageLoader.prototype.removeImage = function(id) { }; goog.net.ImageLoader.prototype.start = function() { var imageIdToRequestMap = this.imageIdToRequestMap_; - module$contents$goog$array_forEach(goog.object.getKeys(imageIdToRequestMap), function(id) { + module$contents$goog$array_forEach(module$contents$goog$object_getKeys(imageIdToRequestMap), function(id) { var imageRequest = imageIdToRequestMap[id]; imageRequest && (delete imageIdToRequestMap[id], this.loadImage_(imageRequest, id)); }, this); @@ -25431,7 +22404,7 @@ goog.net.ImageLoader.prototype.onNetworkEvent_ = function(evt) { } }; goog.net.ImageLoader.prototype.maybeFireCompletionEvent_ = function() { - goog.object.isEmpty(this.imageIdToImageMap_) && goog.object.isEmpty(this.imageIdToRequestMap_) && !this.completionFired_ && (this.completionFired_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE)); + module$contents$goog$object_isEmpty(this.imageIdToImageMap_) && module$contents$goog$object_isEmpty(this.imageIdToRequestMap_) && !this.completionFired_ && (this.completionFired_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE)); }; goog.net.ImageLoader.prototype.disposeInternal = function() { delete this.imageIdToRequestMap_; @@ -25520,13 +22493,13 @@ goog.string.path.split = function(path) { return [head, tail]; }; var module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource = function(bucket, path, maxZoom, opt_suffix) { - module$contents$ee$layers$AbstractTileSource_AbstractTileSource.call(this); + module$exports$ee$layers$AbstractTileSource.call(this); this.bucket_ = bucket; this.path_ = path; this.suffix_ = opt_suffix || ""; this.maxZoom_ = maxZoom; }; -$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource, module$contents$ee$layers$AbstractTileSource_AbstractTileSource); +$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource, module$exports$ee$layers$AbstractTileSource); module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.loadTile = function(tile, opt_priority) { if (tile.zoom <= this.maxZoom_) { tile.sourceUrl = this.getTileUrl_(tile.coord, tile.zoom); @@ -25646,7 +22619,7 @@ goog.structs.Pool.prototype.setDelay = function(delay) { this.delay = delay; }; goog.structs.Pool.prototype.getObject = function() { - var time = goog.now(); + var time = Date.now(); if (!(null != this.lastAccess && time - this.lastAccess < this.delay)) { var obj = this.removeFreeObject_(); obj && (this.lastAccess = time, this.inUseSet_.add(obj)); @@ -25749,7 +22722,7 @@ goog.structs.Heap.prototype.insertAll = function(heap) { return; } } else { - keys = goog.object.getKeys(heap), values = goog.object.getValues(heap); + keys = module$contents$goog$object_getKeys(heap), values = module$contents$goog$object_getValues(heap); } for (i = 0; i < keys.length; i++) { this.insert(keys[i], values[i]); @@ -25854,7 +22827,7 @@ goog.inherits(goog.structs.PriorityPool, goog.structs.Pool); goog.structs.PriorityPool.DEFAULT_PRIORITY_ = 100; goog.structs.PriorityPool.prototype.setDelay = function(delay) { goog.structs.PriorityPool.superClass_.setDelay.call(this, delay); - null != this.lastAccess && (goog.global.clearTimeout(this.delayTimeout_), this.delayTimeout_ = goog.global.setTimeout(goog.bind(this.handleQueueRequests_, this), this.delay + this.lastAccess - goog.now()), this.handleQueueRequests_()); + null != this.lastAccess && (goog.global.clearTimeout(this.delayTimeout_), this.delayTimeout_ = goog.global.setTimeout(goog.bind(this.handleQueueRequests_, this), this.delay + this.lastAccess - Date.now()), this.handleQueueRequests_()); }; goog.structs.PriorityPool.prototype.getObject = function(opt_callback, opt_priority) { if (!opt_callback) { @@ -25890,11 +22863,11 @@ goog.structs.PriorityPool.prototype.disposeInternal = function() { this.requestQueue_ = null; }; var module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource = function(mapId, opt_profiler) { - module$contents$ee$layers$AbstractTileSource_AbstractTileSource.call(this); + module$exports$ee$layers$AbstractTileSource.call(this); this.mapId_ = mapId; this.profiler_ = opt_profiler || null; }; -$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource, module$contents$ee$layers$AbstractTileSource_AbstractTileSource); +$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource, module$exports$ee$layers$AbstractTileSource); module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.loadTile = function(tile, opt_priority) { var ProfilerHeader = module$contents$ee$apiclient_apiclient.PROFILE_HEADER.toLowerCase(), key = goog.events.listen(tile, ee.layers.AbstractTile.EventType.STATUS_CHANGED, function() { switch(tile.getStatus()) { @@ -26298,7 +23271,7 @@ ee.data.Profiler.prototype.getStatusText = function() { return "Loading..."; } var profiles = 0, nonTileProfiles = 0, tileProfiles = 0; - goog.object.forEach(this.profileIds_, function(refCount) { + module$contents$goog$object_forEach(this.profileIds_, function(refCount) { profiles++; Infinity === refCount ? nonTileProfiles++ : tileProfiles++; }, this); @@ -26331,7 +23304,7 @@ ee.data.Profiler.prototype.refresh_ = function(retryAttempt) { var handleResponse = function(result, error) { marker == $jscomp$this.lastRefreshToken_ && (error && "number" === typeof retryAttempt && retryAttempt < $jscomp$this.MAX_RETRY_COUNT_ ? goog.Timer.callOnce(goog.bind($jscomp$this.refresh_, $jscomp$this, retryAttempt + 1), 2 * ee.data.Profiler.DELAY_BEFORE_REFRESH_) : ($jscomp$this.profileError_ = error || null, $jscomp$this.profileData_ = error ? ee.data.Profiler.getEmptyProfile_($jscomp$this.format_) : result, $jscomp$this.lastRefreshToken_ = null, $jscomp$this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED), $jscomp$this.dispatchEvent(ee.data.Profiler.EventType.DATA_CHANGED))); - }, ids = goog.object.getKeys(this.profileIds_); + }, ids = module$contents$goog$object_getKeys(this.profileIds_); 0 === ids.length ? handleResponse(ee.data.Profiler.getEmptyProfile_(this.format_), void 0) : (ee.ApiFunction._apply(this.showInternal_ ? "Profile.getProfilesInternal" : "Profile.getProfiles", {ids:ids, format:this.format_.toString(), }).getInfo(handleResponse), this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED)); }; ee.data.Profiler.prototype.addTile = function(tileId, profileId) { @@ -26372,42 +23345,28 @@ ee.data.Profiler.Format.prototype.toString = function() { }; ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text"); ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json"); -ee.SavedFunction = function(path, signature) { - if (!(this instanceof ee.SavedFunction)) { - return new ee.SavedFunction(path, signature); - } - this.path_ = path; - this.signature_ = signature; -}; -goog.inherits(ee.SavedFunction, ee.Function); -goog.exportSymbol("ee.SavedFunction", ee.SavedFunction); -ee.SavedFunction.prototype.encode = function(encoder) { - return ee.ApiFunction._call("LoadAlgorithmById", this.path_).encode(encoder); -}; -ee.SavedFunction.prototype.getSignature = function() { - return this.signature_; -}; (function() { - var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.table.toCloudStorage ee.batch.Export.image.toDrive ee.batch.Export.table.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.map.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.image.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toDrive ee.Collection.prototype.filterDate ee.Collection.prototype.limit ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.sort ee.Collection.prototype.map ee.Collection.prototype.filterBounds ee.Collection.prototype.iterate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.data.getTaskList ee.data.deleteAsset ee.data.startProcessing ee.data.getTileUrl ee.data.makeDownloadUrl ee.data.getTaskListWithLimit ee.data.authenticateViaPopup ee.data.makeTableDownloadUrl ee.data.getAssetAcl ee.data.listOperations ee.data.getTableDownloadId ee.data.computeValue ee.data.cancelOperation ee.data.authenticateViaPrivateKey ee.data.getThumbId ee.data.getMapId ee.data.getOperation ee.data.newTaskId ee.data.getVideoThumbId ee.data.updateAsset ee.data.cancelTask ee.data.startIngestion ee.data.getTaskStatus ee.data.makeThumbUrl ee.data.updateTask ee.data.getFilmstripThumbId ee.data.authenticateViaOauth ee.data.setAssetAcl ee.data.setAssetProperties ee.data.authenticate ee.data.getDownloadId ee.data.listBuckets ee.data.getAssetRoots ee.data.getAssetRootQuota ee.data.startTableIngestion ee.data.getAsset ee.data.createAssetHome ee.data.getInfo ee.data.getList ee.data.createAsset ee.data.createFolder ee.data.listAssets ee.data.listImages ee.data.renameAsset ee.data.copyAsset ee.Date ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.fromJSON ee.Dictionary ee.apply ee.reset ee.Algorithms ee.initialize ee.InitState ee.call ee.TILE_SIZE ee.Element.prototype.set ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getInfo ee.FeatureCollection ee.Filter ee.Filter.gte ee.Filter.metadata ee.Filter.inList ee.Filter.date ee.Filter.lte ee.Filter.eq ee.Filter.lt ee.Filter.or ee.Filter.gt ee.Filter.prototype.not ee.Filter.and ee.Filter.bounds ee.Filter.neq ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.prototype.toGeoJSONString ee.Geometry.Point ee.Geometry.LinearRing ee.Geometry.prototype.serialize ee.Geometry.MultiPoint ee.Geometry.MultiPolygon ee.Geometry.Rectangle ee.Geometry.MultiLineString ee.Geometry ee.Geometry.Polygon ee.Geometry.LineString ee.Geometry.BBox ee.Geometry.prototype.toGeoJSON ee.Image ee.Image.prototype.expression ee.Image.prototype.getThumbURL ee.Image.prototype.rename ee.Image.prototype.getMap ee.Image.prototype.clip ee.Image.prototype.select ee.Image.cat ee.Image.prototype.getDownloadURL ee.Image.rgb ee.Image.prototype.getThumbId ee.Image.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection ee.ImageCollection.prototype.getInfo ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.toJSON ee.Serializer.toCloudApiJSON ee.Serializer.encode ee.Serializer.encodeCloudApiPretty ee.Serializer.encodeCloudApi ee.Serializer.toReadableJSON ee.String ee.Terrain".split(" "), - orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), ["collection", "opt_description", "opt_assetId"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), - "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), - "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "), ["start", "opt_end"], ["max", "opt_property", "opt_ascending"], ["filter"], - ["name", "operator", "value"], ["property", "opt_ascending"], ["algorithm", "opt_dropNulls"], ["geometry"], ["algorithm", "opt_first"], ["opt_callback"], ["legacy"], ["func", "var_args"], ["callback"], ["opt_callback"], ["assetId", "opt_callback"], ["taskId", "params", "opt_callback"], ["id", "x", "y", "z"], ["id"], ["opt_limit", "opt_callback"], ["opt_success", "opt_error"], ["id"], ["assetId", "opt_callback"], ["opt_limit", "opt_callback"], ["params", "opt_callback"], ["obj", "opt_callback"], - ["operationName", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes"], ["params", "opt_callback"], ["params", "opt_callback"], ["operationName", "opt_callback"], ["opt_count", "opt_callback"], ["params", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "request", "opt_callback"], ["taskId", "opt_callback"], ["id"], ["taskId", "action", "opt_callback"], ["params", "opt_callback"], ["clientId", "success", "opt_error", - "opt_extraScopes", "opt_onImmediateFailed"], ["assetId", "aclUpdate", "opt_callback"], ["assetId", "properties", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["params", "opt_callback"], ["project", "opt_callback"], ["opt_callback"], ["rootId", "opt_callback"], ["taskId", "request", "opt_callback"], ["id", "opt_callback"], ["requestedId", "opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", - "opt_callback"], ["path", "opt_force", "opt_callback"], ["parent", "params", "opt_callback"], ["parent", "params", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], ["func", "namedArgs"], [], [], ["opt_baseurl", "opt_tileurl", "opt_successCallback", "opt_errorCallback", "opt_xsrfToken"], [], ["func", "var_args"], [], ["var_args"], ["geometry", "opt_properties"], - ["opt_visParams", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["opt_callback"], ["args", "opt_column"], ["opt_filter"], ["name", "value"], ["name", "operator", "value"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["start", "opt_end"], ["name", "value"], ["name", "value"], ["name", "value"], ["var_args"], ["name", - "value"], [], ["var_args"], ["geometry", "opt_errorMargin"], ["name", "value"], ["namedArgs"], ["var_args"], [], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["legacy"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", - "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["west", "south", "east", "north"], [], ["opt_args"], ["expression", "opt_map"], ["params", "opt_callback"], ["var_args"], ["opt_visParams", "opt_callback"], ["geometry"], ["var_args"], ["var_args"], ["params", "opt_callback"], ["r", "g", "b"], ["params", "opt_callback"], ["opt_callback"], ["selectors", "opt_names"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], [], ["params", "opt_callback"], - ["args"], ["opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["string"], []]; - [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.video.toCloudStorage, - module$contents$ee$batch_Export.table.toDrive, ee.Collection.prototype.filterDate, ee.Collection.prototype.limit, ee.Collection.prototype.filter, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.sort, ee.Collection.prototype.map, ee.Collection.prototype.filterBounds, ee.Collection.prototype.iterate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.aside, ee.ComputedObject.prototype.evaluate, ee.data.getTaskList, ee.data.deleteAsset, - ee.data.startProcessing, ee.data.getTileUrl, ee.data.makeDownloadUrl, ee.data.getTaskListWithLimit, ee.data.authenticateViaPopup, ee.data.makeTableDownloadUrl, ee.data.getAssetAcl, ee.data.listOperations, ee.data.getTableDownloadId, ee.data.computeValue, ee.data.cancelOperation, ee.data.authenticateViaPrivateKey, ee.data.getThumbId, ee.data.getMapId, ee.data.getOperation, ee.data.newTaskId, ee.data.getVideoThumbId, ee.data.updateAsset, ee.data.cancelTask, ee.data.startIngestion, ee.data.getTaskStatus, - ee.data.makeThumbUrl, ee.data.updateTask, ee.data.getFilmstripThumbId, ee.data.authenticateViaOauth, ee.data.setAssetAcl, ee.data.setAssetProperties, ee.data.authenticate, ee.data.getDownloadId, ee.data.listBuckets, ee.data.getAssetRoots, ee.data.getAssetRootQuota, ee.data.startTableIngestion, ee.data.getAsset, ee.data.createAssetHome, ee.data.getInfo, ee.data.getList, ee.data.createAsset, ee.data.createFolder, ee.data.listAssets, ee.data.listImages, ee.data.renameAsset, ee.data.copyAsset, ee.Date, - ee.Deserializer.decode, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.fromJSON, ee.Dictionary, ee.apply, ee.reset, ee.Algorithms, ee.initialize, ee.InitState, ee.call, ee.TILE_SIZE, ee.Element.prototype.set, ee.Feature, ee.Feature.prototype.getMap, ee.Feature.prototype.getInfo, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.select, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection, - ee.Filter, ee.Filter.gte, ee.Filter.metadata, ee.Filter.inList, ee.Filter.date, ee.Filter.lte, ee.Filter.eq, ee.Filter.lt, ee.Filter.or, ee.Filter.gt, ee.Filter.prototype.not, ee.Filter.and, ee.Filter.bounds, ee.Filter.neq, ee.Function.prototype.apply, ee.Function.prototype.call, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.Point, ee.Geometry.LinearRing, ee.Geometry.prototype.serialize, ee.Geometry.MultiPoint, ee.Geometry.MultiPolygon, ee.Geometry.Rectangle, ee.Geometry.MultiLineString, ee.Geometry, - ee.Geometry.Polygon, ee.Geometry.LineString, ee.Geometry.BBox, ee.Geometry.prototype.toGeoJSON, ee.Image, ee.Image.prototype.expression, ee.Image.prototype.getThumbURL, ee.Image.prototype.rename, ee.Image.prototype.getMap, ee.Image.prototype.clip, ee.Image.prototype.select, ee.Image.cat, ee.Image.prototype.getDownloadURL, ee.Image.rgb, ee.Image.prototype.getThumbId, ee.Image.prototype.getInfo, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.getVideoThumbURL, - ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection, ee.ImageCollection.prototype.getInfo, ee.List, ee.Number, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.toJSON, ee.Serializer.toCloudApiJSON, ee.Serializer.encode, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encodeCloudApi, ee.Serializer.toReadableJSON, ee.String, ee.Terrain].forEach(function(fn, i) { + var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.image.toDrive ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.image.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.video.toDrive ee.batch.Export.classifier.toAsset ee.batch.Export.table.toDrive ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toCloudStorage ee.Collection.prototype.filter ee.Collection.prototype.sort ee.Collection.prototype.filterBounds ee.Collection.prototype.map ee.Collection.prototype.filterMetadata ee.Collection.prototype.iterate ee.Collection.prototype.filterDate ee.Collection.prototype.limit ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.aside ee.data.getMapId ee.data.createFolder ee.data.renameAsset ee.data.makeThumbUrl ee.data.updateTask ee.data.startProcessing ee.data.getDownloadId ee.data.getTileUrl ee.data.copyAsset ee.data.makeDownloadUrl ee.data.deleteAsset ee.data.getTableDownloadId ee.data.getAssetAcl ee.data.computeValue ee.data.makeTableDownloadUrl ee.data.getVideoThumbId ee.data.getThumbId ee.data.authenticateViaOauth ee.data.newTaskId ee.data.getFilmstripThumbId ee.data.getTaskStatus ee.data.getList ee.data.updateAsset ee.data.startIngestion ee.data.setAssetAcl ee.data.listAssets ee.data.getTaskList ee.data.listImages ee.data.setAssetProperties ee.data.listBuckets ee.data.authenticate ee.data.getAssetRootQuota ee.data.getTaskListWithLimit ee.data.authenticateViaPopup ee.data.listOperations ee.data.startTableIngestion ee.data.getAssetRoots ee.data.getAsset ee.data.cancelOperation ee.data.createAssetHome ee.data.authenticateViaPrivateKey ee.data.cancelTask ee.data.getOperation ee.data.getInfo ee.data.createAsset ee.Date ee.Deserializer.decodeCloudApi ee.Deserializer.fromJSON ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Dictionary ee.reset ee.InitState ee.initialize ee.TILE_SIZE ee.call ee.apply ee.Algorithms ee.Element.prototype.set ee.Feature.prototype.getInfo ee.Feature.prototype.getMap ee.Feature ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection ee.Filter.eq ee.Filter.prototype.not ee.Filter.lt ee.Filter.gt ee.Filter.and ee.Filter.neq ee.Filter ee.Filter.inList ee.Filter.date ee.Filter.metadata ee.Filter.bounds ee.Filter.lte ee.Filter.gte ee.Filter.or ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.BBox ee.Geometry.Polygon ee.Geometry.MultiPolygon ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Geometry.LineString ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSONString ee.Geometry.prototype.toGeoJSON ee.Geometry.LinearRing ee.Image.prototype.getInfo ee.Image ee.Image.prototype.getThumbURL ee.Image.prototype.expression ee.Image.cat ee.Image.prototype.rename ee.Image.prototype.getThumbId ee.Image.prototype.getMap ee.Image.prototype.clip ee.Image.rgb ee.Image.prototype.getDownloadURL ee.Image.prototype.select ee.ImageCollection ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.first ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getMap ee.List ee.Number ee.Serializer.toCloudApiJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.toReadableJSON ee.Serializer.encode ee.String ee.Terrain".split(" "), + orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), ["collection", + "opt_description", "opt_assetId", "opt_maxVertices"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), + "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), ["classifier", "opt_description", "opt_assetId"], "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), + "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), ["filter"], ["property", "opt_ascending"], ["geometry"], ["algorithm", "opt_dropNulls"], ["name", "operator", "value"], ["algorithm", "opt_first"], ["start", "opt_end"], ["max", "opt_property", "opt_ascending"], + ["callback"], ["legacy"], ["opt_callback"], ["func", "var_args"], ["params", "opt_callback"], ["path", "opt_force", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["id"], ["taskId", "action", "opt_callback"], ["taskId", "params", "opt_callback"], ["params", "opt_callback"], ["id", "x", "y", "z"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["id"], ["assetId", "opt_callback"], ["params", "opt_callback"], ["assetId", "opt_callback"], ["obj", "opt_callback"], ["id"], + ["params", "opt_callback"], ["params", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["opt_count", "opt_callback"], ["params", "opt_callback"], ["taskId", "opt_callback"], ["params", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["taskId", "request", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["parent", "params", "opt_callback"], ["opt_callback"], ["parent", "params", "opt_callback"], + ["assetId", "properties", "opt_callback"], ["project", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["rootId", "opt_callback"], ["opt_limit", "opt_callback"], ["opt_success", "opt_error"], ["opt_limit", "opt_callback"], ["taskId", "request", "opt_callback"], ["opt_callback"], ["id", "opt_callback"], ["operationName", "opt_callback"], ["requestedId", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], + ["taskId", "opt_callback"], ["operationName", "opt_callback"], ["id", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], [], ["opt_baseurl", "opt_tileurl", "opt_successCallback", "opt_errorCallback", "opt_xsrfToken"], [], ["func", "var_args"], ["func", "namedArgs"], [], ["var_args"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["geometry", "opt_properties"], ["propertySelectors", + "opt_newProperties", "opt_retainGeometry"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["args", "opt_column"], ["name", "value"], [], ["name", "value"], ["name", "value"], ["var_args"], ["name", "value"], ["opt_filter"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["start", "opt_end"], ["name", "operator", "value"], ["geometry", "opt_errorMargin"], ["name", "value"], ["name", "value"], ["var_args"], + ["var_args"], ["namedArgs"], ["west", "south", "east", "north"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["legacy"], ["coords", "opt_proj"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], [], [], ["coords", + "opt_proj", "opt_geodesic", "opt_maxError"], ["opt_callback"], ["opt_args"], ["params", "opt_callback"], ["expression", "opt_map"], ["var_args"], ["var_args"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["geometry"], ["r", "g", "b"], ["params", "opt_callback"], ["var_args"], ["args"], ["opt_callback"], [], ["selectors", "opt_names"], ["params", "opt_callback"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj"], + ["obj"], ["obj"], ["obj", "opt_isCompound"], ["string"], []]; + [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.table.toDrive, + module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, ee.Collection.prototype.filter, ee.Collection.prototype.sort, ee.Collection.prototype.filterBounds, ee.Collection.prototype.map, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.iterate, ee.Collection.prototype.filterDate, ee.Collection.prototype.limit, ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.aside, + ee.data.getMapId, ee.data.createFolder, ee.data.renameAsset, ee.data.makeThumbUrl, ee.data.updateTask, ee.data.startProcessing, ee.data.getDownloadId, ee.data.getTileUrl, ee.data.copyAsset, ee.data.makeDownloadUrl, ee.data.deleteAsset, ee.data.getTableDownloadId, ee.data.getAssetAcl, ee.data.computeValue, ee.data.makeTableDownloadUrl, ee.data.getVideoThumbId, ee.data.getThumbId, ee.data.authenticateViaOauth, ee.data.newTaskId, ee.data.getFilmstripThumbId, ee.data.getTaskStatus, ee.data.getList, + ee.data.updateAsset, ee.data.startIngestion, ee.data.setAssetAcl, ee.data.listAssets, ee.data.getTaskList, ee.data.listImages, ee.data.setAssetProperties, ee.data.listBuckets, ee.data.authenticate, ee.data.getAssetRootQuota, ee.data.getTaskListWithLimit, ee.data.authenticateViaPopup, ee.data.listOperations, ee.data.startTableIngestion, ee.data.getAssetRoots, ee.data.getAsset, ee.data.cancelOperation, ee.data.createAssetHome, ee.data.authenticateViaPrivateKey, ee.data.cancelTask, ee.data.getOperation, + ee.data.getInfo, ee.data.createAsset, ee.Date, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromJSON, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decode, ee.Dictionary, ee.reset, ee.InitState, ee.initialize, ee.TILE_SIZE, ee.call, ee.apply, ee.Algorithms, ee.Element.prototype.set, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMap, ee.Feature, ee.FeatureCollection.prototype.select, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.getMap, + ee.FeatureCollection, ee.Filter.eq, ee.Filter.prototype.not, ee.Filter.lt, ee.Filter.gt, ee.Filter.and, ee.Filter.neq, ee.Filter, ee.Filter.inList, ee.Filter.date, ee.Filter.metadata, ee.Filter.bounds, ee.Filter.lte, ee.Filter.gte, ee.Filter.or, ee.Function.prototype.call, ee.Function.prototype.apply, ee.Geometry.BBox, ee.Geometry.Polygon, ee.Geometry.MultiPolygon, ee.Geometry.prototype.serialize, ee.Geometry.Point, ee.Geometry, ee.Geometry.MultiPoint, ee.Geometry.Rectangle, ee.Geometry.LineString, + ee.Geometry.MultiLineString, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.prototype.toGeoJSON, ee.Geometry.LinearRing, ee.Image.prototype.getInfo, ee.Image, ee.Image.prototype.getThumbURL, ee.Image.prototype.expression, ee.Image.cat, ee.Image.prototype.rename, ee.Image.prototype.getThumbId, ee.Image.prototype.getMap, ee.Image.prototype.clip, ee.Image.rgb, ee.Image.prototype.getDownloadURL, ee.Image.prototype.select, ee.ImageCollection, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.first, + ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection.prototype.getMap, ee.List, ee.Number, ee.Serializer.toCloudApiJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.Serializer.toReadableJSON, ee.Serializer.encode, ee.String, ee.Terrain].forEach(function(fn, i) { fn && (exportedFnInfo[fn.toString()] = {name:orderedFnNames[i], paramNames:orderedParamLists[i]}); }); goog.global.EXPORTED_FN_INFO = exportedFnInfo; diff --git a/javascript/build/main.js b/javascript/build/main.js index af3bec24b..26e4c0108 100644 --- a/javascript/build/main.js +++ b/javascript/build/main.js @@ -80,7 +80,19 @@ $jscomp.polyfillIsolated = function(target, polyfill, fromLang, toLang) { ownerObject = ownerObject[key]; } var property = split[split.length - 1], nativeImpl = $jscomp.IS_SYMBOL_NATIVE && "es6" === fromLang ? ownerObject[property] : null, impl = polyfill(nativeImpl); - null != impl && (isSimpleName ? $jscomp.defineProperty($jscomp.polyfills, property, {configurable:!0, writable:!0, value:impl}) : impl !== nativeImpl && (void 0 === $jscomp.propertyToPolyfillSymbol[property] && ($jscomp.propertyToPolyfillSymbol[property] = $jscomp.IS_SYMBOL_NATIVE ? $jscomp.global.Symbol(property) : $jscomp.POLYFILL_PREFIX + property), $jscomp.defineProperty(ownerObject, $jscomp.propertyToPolyfillSymbol[property], {configurable:!0, writable:!0, value:impl}))); + if (null != impl) { + if (isSimpleName) { + $jscomp.defineProperty($jscomp.polyfills, property, {configurable:!0, writable:!0, value:impl}); + } else { + if (impl !== nativeImpl) { + if (void 0 === $jscomp.propertyToPolyfillSymbol[property]) { + var BIN_ID = 1e9 * Math.random() >>> 0; + $jscomp.propertyToPolyfillSymbol[property] = $jscomp.IS_SYMBOL_NATIVE ? $jscomp.global.Symbol(property) : $jscomp.POLYFILL_PREFIX + BIN_ID + "$" + property; + } + $jscomp.defineProperty(ownerObject, $jscomp.propertyToPolyfillSymbol[property], {configurable:!0, writable:!0, value:impl}); + } + } + } }; $jscomp.initSymbol = function() { }; @@ -95,11 +107,11 @@ $jscomp.polyfill("Symbol", function(orig) { SymbolClass.prototype.toString = function() { return this.$jscomp$symbol$id_; }; - var counter = 0, symbolPolyfill = function(opt_description) { + var SYMBOL_PREFIX = "jscomp_symbol_" + (1e9 * Math.random() >>> 0) + "_", counter = 0, symbolPolyfill = function(opt_description) { if (this instanceof symbolPolyfill) { throw new TypeError("Symbol is not a constructor"); } - return new SymbolClass("jscomp_symbol_" + (opt_description || "") + "_" + counter++, opt_description); + return new SymbolClass(SYMBOL_PREFIX + (opt_description || "") + "_" + counter++, opt_description); }; return symbolPolyfill; }, "es6", "es3"); @@ -232,6 +244,235 @@ $jscomp.polyfill("Reflect.setPrototypeOf", function(orig) { } return null; }, "es6", "es5"); +$jscomp.checkEs6ConformanceViaProxy = function() { + try { + var proxied = {}, proxy = Object.create(new $jscomp.global.Proxy(proxied, {get:function(target, key, receiver) { + return target == proxied && "q" == key && receiver == proxy; + }})); + return !0 === proxy.q; + } catch (err) { + return !1; + } +}; +$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS = !1; +$jscomp.ES6_CONFORMANCE = $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS && $jscomp.checkEs6ConformanceViaProxy(); +$jscomp.owns = function(obj, prop) { + return Object.prototype.hasOwnProperty.call(obj, prop); +}; +$jscomp.polyfill("WeakMap", function(NativeWeakMap) { + function isConformant() { + if (!NativeWeakMap || !Object.seal) { + return !1; + } + try { + var x = Object.seal({}), y = Object.seal({}), map = new NativeWeakMap([[x, 2], [y, 3]]); + if (2 != map.get(x) || 3 != map.get(y)) { + return !1; + } + map.delete(x); + map.set(y, 4); + return !map.has(x) && 4 == map.get(y); + } catch (err) { + return !1; + } + } + function WeakMapMembership() { + } + function isValidKey(key) { + var type = typeof key; + return "object" === type && null !== key || "function" === type; + } + function insert(target) { + if (!$jscomp.owns(target, prop)) { + var obj = new WeakMapMembership; + $jscomp.defineProperty(target, prop, {value:obj}); + } + } + function patch(name) { + if (!$jscomp.ISOLATE_POLYFILLS) { + var prev = Object[name]; + prev && (Object[name] = function(target) { + if (target instanceof WeakMapMembership) { + return target; + } + Object.isExtensible(target) && insert(target); + return prev(target); + }); + } + } + if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { + if (NativeWeakMap && $jscomp.ES6_CONFORMANCE) { + return NativeWeakMap; + } + } else { + if (isConformant()) { + return NativeWeakMap; + } + } + var prop = "$jscomp_hidden_" + Math.random(); + patch("freeze"); + patch("preventExtensions"); + patch("seal"); + var index = 0, PolyfillWeakMap = function(opt_iterable) { + this.id_ = (index += Math.random() + 1).toString(); + if (opt_iterable) { + for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { + var item = entry.value; + this.set(item[0], item[1]); + } + } + }; + PolyfillWeakMap.prototype.set = function(key, value) { + if (!isValidKey(key)) { + throw Error("Invalid WeakMap key"); + } + insert(key); + if (!$jscomp.owns(key, prop)) { + throw Error("WeakMap key fail: " + key); + } + key[prop][this.id_] = value; + return this; + }; + PolyfillWeakMap.prototype.get = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) ? key[prop][this.id_] : void 0; + }; + PolyfillWeakMap.prototype.has = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_); + }; + PolyfillWeakMap.prototype.delete = function(key) { + return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_) ? delete key[prop][this.id_] : !1; + }; + return PolyfillWeakMap; +}, "es6", "es3"); +$jscomp.MapEntry = function() { +}; +$jscomp.polyfill("Map", function(NativeMap) { + function isConformant() { + if ($jscomp.ASSUME_NO_NATIVE_MAP || !NativeMap || "function" != typeof NativeMap || !NativeMap.prototype.entries || "function" != typeof Object.seal) { + return !1; + } + try { + var key = Object.seal({x:4}), map = new NativeMap($jscomp.makeIterator([[key, "s"]])); + if ("s" != map.get(key) || 1 != map.size || map.get({x:4}) || map.set({x:4}, "t") != map || 2 != map.size) { + return !1; + } + var iter = map.entries(), item = iter.next(); + if (item.done || item.value[0] != key || "s" != item.value[1]) { + return !1; + } + item = iter.next(); + return item.done || 4 != item.value[0].x || "t" != item.value[1] || !iter.next().done ? !1 : !0; + } catch (err) { + return !1; + } + } + if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { + if (NativeMap && $jscomp.ES6_CONFORMANCE) { + return NativeMap; + } + } else { + if (isConformant()) { + return NativeMap; + } + } + var idMap = new WeakMap, PolyfillMap = function(opt_iterable) { + this.data_ = {}; + this.head_ = createHead(); + this.size = 0; + if (opt_iterable) { + for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { + var item = entry.value; + this.set(item[0], item[1]); + } + } + }; + PolyfillMap.prototype.set = function(key, value) { + key = 0 === key ? 0 : key; + var r = maybeGetEntry(this, key); + r.list || (r.list = this.data_[r.id] = []); + r.entry ? r.entry.value = value : (r.entry = {next:this.head_, previous:this.head_.previous, head:this.head_, key:key, value:value, }, r.list.push(r.entry), this.head_.previous.next = r.entry, this.head_.previous = r.entry, this.size++); + return this; + }; + PolyfillMap.prototype.delete = function(key) { + var r = maybeGetEntry(this, key); + return r.entry && r.list ? (r.list.splice(r.index, 1), r.list.length || delete this.data_[r.id], r.entry.previous.next = r.entry.next, r.entry.next.previous = r.entry.previous, r.entry.head = null, this.size--, !0) : !1; + }; + PolyfillMap.prototype.clear = function() { + this.data_ = {}; + this.head_ = this.head_.previous = createHead(); + this.size = 0; + }; + PolyfillMap.prototype.has = function(key) { + return !!maybeGetEntry(this, key).entry; + }; + PolyfillMap.prototype.get = function(key) { + var entry = maybeGetEntry(this, key).entry; + return entry && entry.value; + }; + PolyfillMap.prototype.entries = function() { + return makeIterator(this, function(entry) { + return [entry.key, entry.value]; + }); + }; + PolyfillMap.prototype.keys = function() { + return makeIterator(this, function(entry) { + return entry.key; + }); + }; + PolyfillMap.prototype.values = function() { + return makeIterator(this, function(entry) { + return entry.value; + }); + }; + PolyfillMap.prototype.forEach = function(callback, opt_thisArg) { + for (var iter = this.entries(), item; !(item = iter.next()).done;) { + var entry = item.value; + callback.call(opt_thisArg, entry[1], entry[0], this); + } + }; + PolyfillMap.prototype[Symbol.iterator] = PolyfillMap.prototype.entries; + var maybeGetEntry = function(map, key) { + var id = getId(key), list = map.data_[id]; + if (list && $jscomp.owns(map.data_, id)) { + for (var index = 0; index < list.length; index++) { + var entry = list[index]; + if (key !== key && entry.key !== entry.key || key === entry.key) { + return {id:id, list:list, index:index, entry:entry}; + } + } + } + return {id:id, list:list, index:-1, entry:void 0}; + }, makeIterator = function(map, func) { + var entry = map.head_; + return $jscomp.iteratorPrototype(function() { + if (entry) { + for (; entry.head != map.head_;) { + entry = entry.previous; + } + for (; entry.next != entry.head;) { + return entry = entry.next, {done:!1, value:func(entry)}; + } + entry = null; + } + return {done:!0, value:void 0}; + }); + }, createHead = function() { + var head = {}; + return head.previous = head.next = head.head = head; + }, mapIndex = 0, getId = function(obj) { + var type = obj && typeof obj; + if ("object" == type || "function" == type) { + if (!idMap.has(obj)) { + var id = "" + ++mapIndex; + idMap.set(obj, id); + return id; + } + return idMap.get(obj); + } + return "p_" + obj; + }; + return PolyfillMap; +}, "es6", "es3"); $jscomp.findInternal = function(array, callback, thisArg) { array instanceof String && (array = String(array)); for (var len = array.length, i = 0; i < len; i++) { @@ -296,23 +537,68 @@ $jscomp.polyfill("String.prototype.repeat", function(orig) { return result; }; }, "es6", "es3"); -$jscomp.polyfill("Object.setPrototypeOf", function(orig) { - return orig || $jscomp.setPrototypeOf; -}, "es6", "es5"); -$jscomp.owns = function(obj, prop) { - return Object.prototype.hasOwnProperty.call(obj, prop); -}; -$jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(target, var_args) { - for (var i = 1; i < arguments.length; i++) { - var source = arguments[i]; - if (source) { - for (var key in source) { - $jscomp.owns(source, key) && (target[key] = source[key]); - } +$jscomp.iteratorFromArray = function(array, transform) { + array instanceof String && (array += ""); + var i = 0, done = !1, iter = {next:function() { + if (!done && i < array.length) { + var index = i++; + return {value:transform(index, array[index]), done:!1}; } - } - return target; -}; + done = !0; + return {done:!0, value:void 0}; + }}; + iter[Symbol.iterator] = function() { + return iter; + }; + return iter; +}; +$jscomp.polyfill("Array.prototype.keys", function(orig) { + return orig ? orig : function() { + return $jscomp.iteratorFromArray(this, function(i) { + return i; + }); + }; +}, "es6", "es3"); +$jscomp.polyfill("Array.from", function(orig) { + return orig ? orig : function(arrayLike, opt_mapFn, opt_thisArg) { + opt_mapFn = null != opt_mapFn ? opt_mapFn : function(x) { + return x; + }; + var result = [], iteratorFunction = "undefined" != typeof Symbol && Symbol.iterator && arrayLike[Symbol.iterator]; + if ("function" == typeof iteratorFunction) { + arrayLike = iteratorFunction.call(arrayLike); + for (var next, k = 0; !(next = arrayLike.next()).done;) { + result.push(opt_mapFn.call(opt_thisArg, next.value, k++)); + } + } else { + for (var len = arrayLike.length, i = 0; i < len; i++) { + result.push(opt_mapFn.call(opt_thisArg, arrayLike[i], i)); + } + } + return result; + }; +}, "es6", "es3"); +$jscomp.polyfill("Array.prototype.values", function(orig) { + return orig ? orig : function() { + return $jscomp.iteratorFromArray(this, function(k, v) { + return v; + }); + }; +}, "es8", "es3"); +$jscomp.polyfill("Object.setPrototypeOf", function(orig) { + return orig || $jscomp.setPrototypeOf; +}, "es6", "es5"); +$jscomp.assign = $jscomp.TRUST_ES6_POLYFILLS && "function" == typeof Object.assign ? Object.assign : function(target, var_args) { + for (var i = 1; i < arguments.length; i++) { + var source = arguments[i]; + if (source) { + for (var key in source) { + $jscomp.owns(source, key) && (target[key] = source[key]); + } + } + } + return target; +}; $jscomp.polyfill("Object.assign", function(orig) { return orig || $jscomp.assign; }, "es6", "es3"); @@ -546,28 +832,6 @@ $jscomp.polyfill("Promise", function(NativePromise) { }; return PolyfillPromise; }, "es6", "es3"); -$jscomp.iteratorFromArray = function(array, transform) { - array instanceof String && (array += ""); - var i = 0, done = !1, iter = {next:function() { - if (!done && i < array.length) { - var index = i++; - return {value:transform(index, array[index]), done:!1}; - } - done = !0; - return {done:!0, value:void 0}; - }}; - iter[Symbol.iterator] = function() { - return iter; - }; - return iter; -}; -$jscomp.polyfill("Array.prototype.keys", function(orig) { - return orig ? orig : function() { - return $jscomp.iteratorFromArray(this, function(i) { - return i; - }); - }; -}, "es6", "es3"); $jscomp.polyfill("Object.entries", function(orig) { return orig ? orig : function(obj) { var result = [], key; @@ -601,13 +865,6 @@ $jscomp.polyfill("String.prototype.includes", function(orig) { return -1 !== $jscomp.checkStringArgs(this, searchString, "includes").indexOf(searchString, opt_position || 0); }; }, "es6", "es3"); -$jscomp.polyfill("Array.prototype.values", function(orig) { - return orig ? orig : function() { - return $jscomp.iteratorFromArray(this, function(k, v) { - return v; - }); - }; -}, "es8", "es3"); $jscomp.polyfill("String.prototype.trimLeft", function(orig) { function polyfill() { return this.replace(/^[\s\xa0]+/, ""); @@ -621,300 +878,74 @@ $jscomp.polyfill("Array.prototype.entries", function(orig) { }); }; }, "es6", "es3"); -$jscomp.checkEs6ConformanceViaProxy = function() { - try { - var proxied = {}, proxy = Object.create(new $jscomp.global.Proxy(proxied, {get:function(target, key, receiver) { - return target == proxied && "q" == key && receiver == proxy; - }})); - return !0 === proxy.q; - } catch (err) { - return !1; - } -}; -$jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS = !1; -$jscomp.ES6_CONFORMANCE = $jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS && $jscomp.checkEs6ConformanceViaProxy(); -$jscomp.polyfill("WeakMap", function(NativeWeakMap) { - function isConformant() { - if (!NativeWeakMap || !Object.seal) { - return !1; - } - try { - var x = Object.seal({}), y = Object.seal({}), map = new NativeWeakMap([[x, 2], [y, 3]]); - if (2 != map.get(x) || 3 != map.get(y)) { - return !1; - } - map.delete(x); - map.set(y, 4); - return !map.has(x) && 4 == map.get(y); - } catch (err) { - return !1; - } - } - function WeakMapMembership() { - } - function isValidKey(key) { - var type = typeof key; - return "object" === type && null !== key || "function" === type; - } - function insert(target) { - if (!$jscomp.owns(target, prop)) { - var obj = new WeakMapMembership; - $jscomp.defineProperty(target, prop, {value:obj}); - } - } - function patch(name) { - if (!$jscomp.ISOLATE_POLYFILLS) { - var prev = Object[name]; - prev && (Object[name] = function(target) { - if (target instanceof WeakMapMembership) { - return target; - } - Object.isExtensible(target) && insert(target); - return prev(target); - }); - } - } - if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeWeakMap && $jscomp.ES6_CONFORMANCE) { - return NativeWeakMap; - } - } else { - if (isConformant()) { - return NativeWeakMap; - } - } - var prop = "$jscomp_hidden_" + Math.random(); - patch("freeze"); - patch("preventExtensions"); - patch("seal"); - var index = 0, PolyfillWeakMap = function(opt_iterable) { - this.id_ = (index += Math.random() + 1).toString(); - if (opt_iterable) { - for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - var item = entry.value; - this.set(item[0], item[1]); - } - } - }; - PolyfillWeakMap.prototype.set = function(key, value) { - if (!isValidKey(key)) { - throw Error("Invalid WeakMap key"); - } - insert(key); - if (!$jscomp.owns(key, prop)) { - throw Error("WeakMap key fail: " + key); - } - key[prop][this.id_] = value; - return this; - }; - PolyfillWeakMap.prototype.get = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) ? key[prop][this.id_] : void 0; - }; - PolyfillWeakMap.prototype.has = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_); - }; - PolyfillWeakMap.prototype.delete = function(key) { - return isValidKey(key) && $jscomp.owns(key, prop) && $jscomp.owns(key[prop], this.id_) ? delete key[prop][this.id_] : !1; - }; - return PolyfillWeakMap; -}, "es6", "es3"); -$jscomp.MapEntry = function() { -}; -$jscomp.polyfill("Map", function(NativeMap) { +$jscomp.polyfill("Set", function(NativeSet) { function isConformant() { - if ($jscomp.ASSUME_NO_NATIVE_MAP || !NativeMap || "function" != typeof NativeMap || !NativeMap.prototype.entries || "function" != typeof Object.seal) { + if ($jscomp.ASSUME_NO_NATIVE_SET || !NativeSet || "function" != typeof NativeSet || !NativeSet.prototype.entries || "function" != typeof Object.seal) { return !1; } try { - var key = Object.seal({x:4}), map = new NativeMap($jscomp.makeIterator([[key, "s"]])); - if ("s" != map.get(key) || 1 != map.size || map.get({x:4}) || map.set({x:4}, "t") != map || 2 != map.size) { + var value = Object.seal({x:4}), set = new NativeSet($jscomp.makeIterator([value])); + if (!set.has(value) || 1 != set.size || set.add(value) != set || 1 != set.size || set.add({x:4}) != set || 2 != set.size) { return !1; } - var iter = map.entries(), item = iter.next(); - if (item.done || item.value[0] != key || "s" != item.value[1]) { + var iter = set.entries(), item = iter.next(); + if (item.done || item.value[0] != value || item.value[1] != value) { return !1; } item = iter.next(); - return item.done || 4 != item.value[0].x || "t" != item.value[1] || !iter.next().done ? !1 : !0; + return item.done || item.value[0] == value || 4 != item.value[0].x || item.value[1] != item.value[0] ? !1 : iter.next().done; } catch (err) { return !1; } } if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeMap && $jscomp.ES6_CONFORMANCE) { - return NativeMap; + if (NativeSet && $jscomp.ES6_CONFORMANCE) { + return NativeSet; } } else { if (isConformant()) { - return NativeMap; + return NativeSet; } } - var idMap = new WeakMap, PolyfillMap = function(opt_iterable) { - this.data_ = {}; - this.head_ = createHead(); - this.size = 0; + var PolyfillSet = function(opt_iterable) { + this.map_ = new Map; if (opt_iterable) { for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - var item = entry.value; - this.set(item[0], item[1]); + this.add(entry.value); } } + this.size = this.map_.size; }; - PolyfillMap.prototype.set = function(key, value) { - key = 0 === key ? 0 : key; - var r = maybeGetEntry(this, key); - r.list || (r.list = this.data_[r.id] = []); - r.entry ? r.entry.value = value : (r.entry = {next:this.head_, previous:this.head_.previous, head:this.head_, key:key, value:value, }, r.list.push(r.entry), this.head_.previous.next = r.entry, this.head_.previous = r.entry, this.size++); + PolyfillSet.prototype.add = function(value) { + value = 0 === value ? 0 : value; + this.map_.set(value, value); + this.size = this.map_.size; return this; }; - PolyfillMap.prototype.delete = function(key) { - var r = maybeGetEntry(this, key); - return r.entry && r.list ? (r.list.splice(r.index, 1), r.list.length || delete this.data_[r.id], r.entry.previous.next = r.entry.next, r.entry.next.previous = r.entry.previous, r.entry.head = null, this.size--, !0) : !1; + PolyfillSet.prototype.delete = function(value) { + var result = this.map_.delete(value); + this.size = this.map_.size; + return result; }; - PolyfillMap.prototype.clear = function() { - this.data_ = {}; - this.head_ = this.head_.previous = createHead(); + PolyfillSet.prototype.clear = function() { + this.map_.clear(); this.size = 0; }; - PolyfillMap.prototype.has = function(key) { - return !!maybeGetEntry(this, key).entry; - }; - PolyfillMap.prototype.get = function(key) { - var entry = maybeGetEntry(this, key).entry; - return entry && entry.value; + PolyfillSet.prototype.has = function(value) { + return this.map_.has(value); }; - PolyfillMap.prototype.entries = function() { - return makeIterator(this, function(entry) { - return [entry.key, entry.value]; - }); + PolyfillSet.prototype.entries = function() { + return this.map_.entries(); }; - PolyfillMap.prototype.keys = function() { - return makeIterator(this, function(entry) { - return entry.key; - }); + PolyfillSet.prototype.values = function() { + return this.map_.values(); }; - PolyfillMap.prototype.values = function() { - return makeIterator(this, function(entry) { - return entry.value; - }); - }; - PolyfillMap.prototype.forEach = function(callback, opt_thisArg) { - for (var iter = this.entries(), item; !(item = iter.next()).done;) { - var entry = item.value; - callback.call(opt_thisArg, entry[1], entry[0], this); - } - }; - PolyfillMap.prototype[Symbol.iterator] = PolyfillMap.prototype.entries; - var maybeGetEntry = function(map, key) { - var id = getId(key), list = map.data_[id]; - if (list && $jscomp.owns(map.data_, id)) { - for (var index = 0; index < list.length; index++) { - var entry = list[index]; - if (key !== key && entry.key !== entry.key || key === entry.key) { - return {id:id, list:list, index:index, entry:entry}; - } - } - } - return {id:id, list:list, index:-1, entry:void 0}; - }, makeIterator = function(map, func) { - var entry = map.head_; - return $jscomp.iteratorPrototype(function() { - if (entry) { - for (; entry.head != map.head_;) { - entry = entry.previous; - } - for (; entry.next != entry.head;) { - return entry = entry.next, {done:!1, value:func(entry)}; - } - entry = null; - } - return {done:!0, value:void 0}; - }); - }, createHead = function() { - var head = {}; - return head.previous = head.next = head.head = head; - }, mapIndex = 0, getId = function(obj) { - var type = obj && typeof obj; - if ("object" == type || "function" == type) { - if (!idMap.has(obj)) { - var id = "" + ++mapIndex; - idMap.set(obj, id); - return id; - } - return idMap.get(obj); - } - return "p_" + obj; - }; - return PolyfillMap; -}, "es6", "es3"); -$jscomp.polyfill("Set", function(NativeSet) { - function isConformant() { - if ($jscomp.ASSUME_NO_NATIVE_SET || !NativeSet || "function" != typeof NativeSet || !NativeSet.prototype.entries || "function" != typeof Object.seal) { - return !1; - } - try { - var value = Object.seal({x:4}), set = new NativeSet($jscomp.makeIterator([value])); - if (!set.has(value) || 1 != set.size || set.add(value) != set || 1 != set.size || set.add({x:4}) != set || 2 != set.size) { - return !1; - } - var iter = set.entries(), item = iter.next(); - if (item.done || item.value[0] != value || item.value[1] != value) { - return !1; - } - item = iter.next(); - return item.done || item.value[0] == value || 4 != item.value[0].x || item.value[1] != item.value[0] ? !1 : iter.next().done; - } catch (err) { - return !1; - } - } - if ($jscomp.USE_PROXY_FOR_ES6_CONFORMANCE_CHECKS) { - if (NativeSet && $jscomp.ES6_CONFORMANCE) { - return NativeSet; - } - } else { - if (isConformant()) { - return NativeSet; - } - } - var PolyfillSet = function(opt_iterable) { - this.map_ = new Map; - if (opt_iterable) { - for (var iter = $jscomp.makeIterator(opt_iterable), entry; !(entry = iter.next()).done;) { - this.add(entry.value); - } - } - this.size = this.map_.size; - }; - PolyfillSet.prototype.add = function(value) { - value = 0 === value ? 0 : value; - this.map_.set(value, value); - this.size = this.map_.size; - return this; - }; - PolyfillSet.prototype.delete = function(value) { - var result = this.map_.delete(value); - this.size = this.map_.size; - return result; - }; - PolyfillSet.prototype.clear = function() { - this.map_.clear(); - this.size = 0; - }; - PolyfillSet.prototype.has = function(value) { - return this.map_.has(value); - }; - PolyfillSet.prototype.entries = function() { - return this.map_.entries(); - }; - PolyfillSet.prototype.values = function() { - return this.map_.values(); - }; - PolyfillSet.prototype.keys = PolyfillSet.prototype.values; - PolyfillSet.prototype[Symbol.iterator] = PolyfillSet.prototype.values; - PolyfillSet.prototype.forEach = function(callback, opt_thisArg) { - var set = this; - this.map_.forEach(function(value) { - return callback.call(opt_thisArg, value, value, set); + PolyfillSet.prototype.keys = PolyfillSet.prototype.values; + PolyfillSet.prototype[Symbol.iterator] = PolyfillSet.prototype.values; + PolyfillSet.prototype.forEach = function(callback, opt_thisArg) { + var set = this; + this.map_.forEach(function(value) { + return callback.call(opt_thisArg, value, value, set); }); }; return PolyfillSet; @@ -964,6 +995,9 @@ goog.define = function(name, defaultValue) { goog.FEATURESET_YEAR = 2012; goog.DEBUG = !0; goog.LOCALE = "en"; +goog.getLocale = function() { + return goog.LOCALE; +}; goog.TRUSTED_SITE = !0; goog.DISALLOW_TEST_ONLY_CODE = !goog.DEBUG; goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1; @@ -977,17 +1011,9 @@ goog.constructNamespace_ = function(name, object, overwriteImplicit) { var namespace; goog.exportPath_(name, object, overwriteImplicit); }; -goog.getScriptNonce = function(opt_window) { - if (opt_window && opt_window != goog.global) { - return goog.getScriptNonce_(opt_window.document); - } - null === goog.cspNonce_ && (goog.cspNonce_ = goog.getScriptNonce_(goog.global.document)); - return goog.cspNonce_; -}; goog.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/; -goog.cspNonce_ = null; -goog.getScriptNonce_ = function(doc) { - var script = doc.querySelector && doc.querySelector("script[nonce]"); +goog.getScriptNonce_ = function(opt_window) { + var doc = (opt_window || goog.global).document, script = doc.querySelector && doc.querySelector("script[nonce]"); if (script) { var nonce = script.nonce || script.getAttribute("nonce"); if (nonce && goog.NONCE_PATTERN_.test(nonce)) { @@ -1099,6 +1125,7 @@ goog.TRANSPILE = "detect"; goog.ASSUME_ES_MODULES_TRANSPILED = !1; goog.TRANSPILE_TO_LANGUAGE = ""; goog.TRANSPILER = "transpile.js"; +goog.TRUSTED_TYPES_POLICY_NAME = "goog"; goog.hasBadLetScoping = null; goog.loadModule = function(moduleDef) { var previousState = goog.moduleLoaderState_; @@ -1211,6 +1238,12 @@ goog.cloneObject = function(obj) { if ("function" === typeof obj.clone) { return obj.clone(); } + if ("undefined" !== typeof Map && obj instanceof Map) { + return new Map(obj); + } + if ("undefined" !== typeof Set && obj instanceof Set) { + return new Set(obj); + } var clone = "array" == type ? [] : {}, key; for (key in obj) { clone[key] = goog.cloneObject(obj[key]); @@ -1350,7 +1383,6 @@ goog.defineClass.applyProperties_ = function(target, source) { key = goog.defineClass.OBJECT_PROTOTYPE_FIELDS_[i], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); } }; -goog.TRUSTED_TYPES_POLICY_NAME = "goog"; goog.identity_ = function(s) { return s; }; @@ -1460,14 +1492,15 @@ goog.events.Event.preventDefault = function(e) { e.preventDefault(); }; goog.debug = {}; -function module$contents$goog$debug$Error_DebugError(opt_msg) { +function module$contents$goog$debug$Error_DebugError(msg, cause) { if (Error.captureStackTrace) { Error.captureStackTrace(this, module$contents$goog$debug$Error_DebugError); } else { var stack = Error().stack; stack && (this.stack = stack); } - opt_msg && (this.message = String(opt_msg)); + msg && (this.message = String(msg)); + cause && (this.cause = cause); this.reportErrorToServer = !0; } goog.inherits(module$contents$goog$debug$Error_DebugError, Error); @@ -1558,8 +1591,9 @@ goog.asserts.getType_ = function(value) { return value instanceof Function ? value.displayName || value.name || "unknown type name" : value instanceof Object ? value.constructor.displayName || value.constructor.name || Object.prototype.toString.call(value) : null === value ? "null" : typeof value; }; goog.debug.entryPointRegistry = {}; -goog.debug.EntryPointMonitor = function() { +goog.debug.entryPointRegistry.EntryPointMonitor = function() { }; +goog.debug.EntryPointMonitor = goog.debug.entryPointRegistry.EntryPointMonitor; goog.debug.entryPointRegistry.refList_ = []; goog.debug.entryPointRegistry.monitors_ = []; goog.debug.entryPointRegistry.monitorsMayExist_ = !1; @@ -1666,7 +1700,7 @@ var module$contents$goog$array_map = goog.NATIVE_ARRAY_PROTOTYPES && (module$con return res; }; goog.array.map = module$contents$goog$array_map; -var module$contents$goog$array_reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(arr, f, val, opt_obj) { +goog.array.reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduce) ? function(arr, f, val, opt_obj) { goog.asserts.assert(null != arr.length); opt_obj && (f = goog.bind(f, opt_obj)); return Array.prototype.reduce.call(arr, f, val); @@ -1677,7 +1711,6 @@ var module$contents$goog$array_reduce = goog.NATIVE_ARRAY_PROTOTYPES && (module$ }); return rval; }; -goog.array.reduce = module$contents$goog$array_reduce; goog.array.reduceRight = goog.NATIVE_ARRAY_PROTOTYPES && (module$contents$goog$array_ASSUME_NATIVE_FUNCTIONS || Array.prototype.reduceRight) ? function(arr, f, val, opt_obj) { goog.asserts.assert(null != arr.length); goog.asserts.assert(null != f); @@ -1854,7 +1887,7 @@ goog.array.slice = module$contents$goog$array_slice; function module$contents$goog$array_removeDuplicates(arr, opt_rv, opt_hashFn) { for (var returnArray = opt_rv || arr, defaultHashFn = function(item) { return goog.isObject(item) ? "o" + goog.getUid(item) : (typeof item).charAt(0) + item; - }, hashFn = opt_hashFn || defaultHashFn, seen = {}, cursorInsert = 0, cursorRead = 0; cursorRead < arr.length;) { + }, hashFn = opt_hashFn || defaultHashFn, cursorInsert = 0, cursorRead = 0, seen = {}; cursorRead < arr.length;) { var current = arr[cursorRead++], key = hashFn(current); Object.prototype.hasOwnProperty.call(seen, key) || (seen[key] = !0, returnArray[cursorInsert++] = current); } @@ -1870,8 +1903,8 @@ goog.array.binarySelect = function module$contents$goog$array_binarySelect(arr, }; function module$contents$goog$array_binarySearch_(arr, compareFn, isEvaluator, opt_target, opt_selfObj) { for (var left = 0, right = arr.length, found; left < right;) { - var middle = left + (right - left >>> 1); - var compareResult = isEvaluator ? compareFn.call(opt_selfObj, arr[middle], middle, arr) : compareFn(opt_target, arr[middle]); + var middle = left + (right - left >>> 1), compareResult = void 0; + compareResult = isEvaluator ? compareFn.call(opt_selfObj, arr[middle], middle, arr) : compareFn(opt_target, arr[middle]); 0 < compareResult ? left = middle + 1 : (right = middle, found = !compareResult); } return found ? left : -left - 1; @@ -1888,8 +1921,8 @@ goog.array.stableSort = function module$contents$goog$array_stableSort(arr, opt_ module$contents$goog$array_sort(compArr, function stableCompareFn(obj1, obj2) { return valueCompareFn(obj1.value, obj2.value) || obj1.index - obj2.index; }); - for (i = 0; i < arr.length; i++) { - arr[i] = compArr[i].value; + for (var i$21 = 0; i$21 < arr.length; i$21++) { + arr[i$21] = compArr[i$21].value; } }; function module$contents$goog$array_sortByKey(arr, keyFn, opt_compareFn) { @@ -1961,6 +1994,17 @@ goog.array.bucket = function module$contents$goog$array_bucket(array, sorter, op } return buckets; }; +goog.array.bucketToMap = function module$contents$goog$array_bucketToMap(array, sorter) { + for (var buckets = new Map, i = 0; i < array.length; i++) { + var value = array[i], key = sorter(value, i, array); + if (void 0 !== key) { + var bucket = buckets.get(key); + bucket || (bucket = [], buckets.set(key, bucket)); + bucket.push(value); + } + } + return buckets; +}; goog.array.toObject = function module$contents$goog$array_toObject(arr, keyFunc, opt_obj) { var ret = {}; module$contents$goog$array_forEach(arr, function(element, index) { @@ -1968,6 +2012,13 @@ goog.array.toObject = function module$contents$goog$array_toObject(arr, keyFunc, }); return ret; }; +goog.array.toMap = function module$contents$goog$array_toMap(arr, keyFunc) { + for (var map = new Map, i = 0; i < arr.length; i++) { + var element = arr[i]; + map.set(keyFunc(element, i, arr), element); + } + return map; +}; function module$contents$goog$array_range(startOrEnd, opt_end, opt_step) { var array = [], start = 0, end = startOrEnd, step = opt_step || 1; void 0 !== opt_end && (start = startOrEnd, end = opt_end); @@ -1979,8 +2030,8 @@ function module$contents$goog$array_range(startOrEnd, opt_end, opt_step) { array.push(i); } } else { - for (i = start; i > end; i += step) { - array.push(i); + for (var i$22 = start; i$22 > end; i$22 += step) { + array.push(i$22); } } return array; @@ -2027,9 +2078,9 @@ goog.array.zip = function module$contents$goog$array_zip(var_args) { for (var result = [], minLen = arguments[0].length, i = 1; i < arguments.length; i++) { arguments[i].length < minLen && (minLen = arguments[i].length); } - for (i = 0; i < minLen; i++) { + for (var i$23 = 0; i$23 < minLen; i$23++) { for (var value = [], j = 0; j < arguments.length; j++) { - value.push(arguments[j][i]); + value.push(arguments[j][i$23]); } result.push(value); } @@ -2180,200 +2231,136 @@ goog.labs.userAgent.util.extractVersionTuples = function(userAgent) { return data; }; goog.object = {}; -goog.object.forEach = function(obj, f, opt_obj) { +function module$contents$goog$object_forEach(obj, f, opt_obj) { for (var key in obj) { f.call(opt_obj, obj[key], key, obj); } -}; -goog.object.filter = function(obj, f, opt_obj) { +} +function module$contents$goog$object_filter(obj, f, opt_obj) { var res = {}, key; for (key in obj) { f.call(opt_obj, obj[key], key, obj) && (res[key] = obj[key]); } return res; -}; -goog.object.map = function(obj, f, opt_obj) { +} +function module$contents$goog$object_map(obj, f, opt_obj) { var res = {}, key; for (key in obj) { res[key] = f.call(opt_obj, obj[key], key, obj); } return res; -}; -goog.object.some = function(obj, f, opt_obj) { +} +function module$contents$goog$object_some(obj, f, opt_obj) { for (var key in obj) { if (f.call(opt_obj, obj[key], key, obj)) { return !0; } } return !1; -}; -goog.object.every = function(obj, f, opt_obj) { - for (var key in obj) { - if (!f.call(opt_obj, obj[key], key, obj)) { - return !1; - } - } - return !0; -}; -goog.object.getCount = function(obj) { +} +function module$contents$goog$object_getCount(obj) { var rv = 0, key; for (key in obj) { rv++; } return rv; -}; -goog.object.getAnyKey = function(obj) { - for (var key in obj) { - return key; - } -}; -goog.object.getAnyValue = function(obj) { - for (var key in obj) { - return obj[key]; - } -}; -goog.object.contains = function(obj, val) { - return goog.object.containsValue(obj, val); -}; -goog.object.getValues = function(obj) { +} +function module$contents$goog$object_contains(obj, val) { + return module$contents$goog$object_containsValue(obj, val); +} +function module$contents$goog$object_getValues(obj) { var res = [], i = 0, key; for (key in obj) { res[i++] = obj[key]; } return res; -}; -goog.object.getKeys = function(obj) { +} +function module$contents$goog$object_getKeys(obj) { var res = [], i = 0, key; for (key in obj) { res[i++] = key; } return res; -}; -goog.object.getValueByKeys = function(obj, var_args) { - for (var isArrayLike = goog.isArrayLike(var_args), keys = isArrayLike ? var_args : arguments, i = isArrayLike ? 0 : 1; i < keys.length; i++) { - if (null == obj) { - return; - } - obj = obj[keys[i]]; - } - return obj; -}; -goog.object.containsKey = function(obj, key) { +} +function module$contents$goog$object_containsKey(obj, key) { return null !== obj && key in obj; -}; -goog.object.containsValue = function(obj, val) { +} +function module$contents$goog$object_containsValue(obj, val) { for (var key in obj) { if (obj[key] == val) { return !0; } } return !1; -}; -goog.object.findKey = function(obj, f, opt_this) { +} +function module$contents$goog$object_findKey(obj, f, thisObj) { for (var key in obj) { - if (f.call(opt_this, obj[key], key, obj)) { + if (f.call(thisObj, obj[key], key, obj)) { return key; } } -}; -goog.object.findValue = function(obj, f, opt_this) { - var key = goog.object.findKey(obj, f, opt_this); - return key && obj[key]; -}; -goog.object.isEmpty = function(obj) { +} +function module$contents$goog$object_isEmpty(obj) { for (var key in obj) { return !1; } return !0; -}; -goog.object.clear = function(obj) { +} +function module$contents$goog$object_clear(obj) { for (var i in obj) { delete obj[i]; } -}; -goog.object.remove = function(obj, key) { +} +function module$contents$goog$object_remove(obj, key) { var rv; (rv = key in obj) && delete obj[key]; return rv; -}; -goog.object.add = function(obj, key, val) { - if (null !== obj && key in obj) { - throw Error('The object already contains the key "' + key + '"'); - } - goog.object.set(obj, key, val); -}; -goog.object.get = function(obj, key, opt_val) { - return null !== obj && key in obj ? obj[key] : opt_val; -}; -goog.object.set = function(obj, key, value) { +} +function module$contents$goog$object_set(obj, key, value) { obj[key] = value; -}; -goog.object.setIfUndefined = function(obj, key, value) { - return key in obj ? obj[key] : obj[key] = value; -}; -goog.object.setWithReturnValueIfNotSet = function(obj, key, f) { - if (key in obj) { - return obj[key]; - } - var val = f(); - return obj[key] = val; -}; -goog.object.equals = function(a, b) { - for (var k in a) { - if (!(k in b) || a[k] !== b[k]) { - return !1; - } - } - for (var k$19 in b) { - if (!(k$19 in a)) { - return !1; - } - } - return !0; -}; -goog.object.clone = function(obj) { +} +function module$contents$goog$object_clone(obj) { var res = {}, key; for (key in obj) { res[key] = obj[key]; } return res; -}; -goog.object.unsafeClone = function(obj) { +} +function module$contents$goog$object_unsafeClone(obj) { if (!obj || "object" !== typeof obj) { return obj; } if ("function" === typeof obj.clone) { return obj.clone(); } + if ("undefined" !== typeof Map && obj instanceof Map) { + return new Map(obj); + } + if ("undefined" !== typeof Set && obj instanceof Set) { + return new Set(obj); + } var clone = Array.isArray(obj) ? [] : "function" !== typeof ArrayBuffer || "function" !== typeof ArrayBuffer.isView || !ArrayBuffer.isView(obj) || obj instanceof DataView ? {} : new obj.constructor(obj.length), key; for (key in obj) { - clone[key] = goog.object.unsafeClone(obj[key]); + clone[key] = module$contents$goog$object_unsafeClone(obj[key]); } return clone; -}; -goog.object.transpose = function(obj) { - var transposed = {}, key; - for (key in obj) { - transposed[obj[key]] = key; - } - return transposed; -}; -goog.object.PROTOTYPE_FIELDS_ = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); -goog.object.extend = function(target, var_args) { +} +var module$contents$goog$object_PROTOTYPE_FIELDS = "constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "); +function module$contents$goog$object_extend(target, var_args) { for (var key, source, i = 1; i < arguments.length; i++) { source = arguments[i]; for (key in source) { target[key] = source[key]; } - for (var j = 0; j < goog.object.PROTOTYPE_FIELDS_.length; j++) { - key = goog.object.PROTOTYPE_FIELDS_[j], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); + for (var j = 0; j < module$contents$goog$object_PROTOTYPE_FIELDS.length; j++) { + key = module$contents$goog$object_PROTOTYPE_FIELDS[j], Object.prototype.hasOwnProperty.call(source, key) && (target[key] = source[key]); } } -}; -goog.object.create = function(var_args) { +} +function module$contents$goog$object_create(var_args) { var argLength = arguments.length; if (1 == argLength && Array.isArray(arguments[0])) { - return goog.object.create.apply(null, arguments[0]); + return module$contents$goog$object_create.apply(null, arguments[0]); } if (argLength % 2) { throw Error("Uneven number of arguments"); @@ -2382,45 +2369,135 @@ goog.object.create = function(var_args) { rv[arguments[i]] = arguments[i + 1]; } return rv; -}; -goog.object.createSet = function(var_args) { +} +function module$contents$goog$object_createSet(var_args) { var argLength = arguments.length; if (1 == argLength && Array.isArray(arguments[0])) { - return goog.object.createSet.apply(null, arguments[0]); + return module$contents$goog$object_createSet.apply(null, arguments[0]); } for (var rv = {}, i = 0; i < argLength; i++) { rv[arguments[i]] = !0; } return rv; +} +goog.object.add = function module$contents$goog$object_add(obj, key, val) { + if (null !== obj && key in obj) { + throw Error('The object already contains the key "' + key + '"'); + } + module$contents$goog$object_set(obj, key, val); }; -goog.object.createImmutableView = function(obj) { +goog.object.clear = module$contents$goog$object_clear; +goog.object.clone = module$contents$goog$object_clone; +goog.object.contains = module$contents$goog$object_contains; +goog.object.containsKey = module$contents$goog$object_containsKey; +goog.object.containsValue = module$contents$goog$object_containsValue; +goog.object.create = module$contents$goog$object_create; +goog.object.createImmutableView = function module$contents$goog$object_createImmutableView(obj) { var result = obj; Object.isFrozen && !Object.isFrozen(obj) && (result = Object.create(obj), Object.freeze(result)); return result; }; -goog.object.isImmutableView = function(obj) { - return !!Object.isFrozen && Object.isFrozen(obj); +goog.object.createSet = module$contents$goog$object_createSet; +goog.object.equals = function module$contents$goog$object_equals(a, b) { + for (var k in a) { + if (!(k in b) || a[k] !== b[k]) { + return !1; + } + } + for (var k$24 in b) { + if (!(k$24 in a)) { + return !1; + } + } + return !0; +}; +goog.object.every = function module$contents$goog$object_every(obj, f, opt_obj) { + for (var key in obj) { + if (!f.call(opt_obj, obj[key], key, obj)) { + return !1; + } + } + return !0; }; -goog.object.getAllPropertyNames = function(obj, opt_includeObjectPrototype, opt_includeFunctionPrototype) { +goog.object.extend = module$contents$goog$object_extend; +goog.object.filter = module$contents$goog$object_filter; +goog.object.findKey = module$contents$goog$object_findKey; +goog.object.findValue = function module$contents$goog$object_findValue(obj, f, thisObj) { + var key = module$contents$goog$object_findKey(obj, f, thisObj); + return key && obj[key]; +}; +goog.object.forEach = module$contents$goog$object_forEach; +goog.object.get = function module$contents$goog$object_get(obj, key, val) { + return null !== obj && key in obj ? obj[key] : val; +}; +goog.object.getAllPropertyNames = function module$contents$goog$object_getAllPropertyNames(obj, includeObjectPrototype, includeFunctionPrototype) { if (!obj) { return []; } if (!Object.getOwnPropertyNames || !Object.getPrototypeOf) { - return goog.object.getKeys(obj); + return module$contents$goog$object_getKeys(obj); } - for (var visitedSet = {}, proto = obj; proto && (proto !== Object.prototype || opt_includeObjectPrototype) && (proto !== Function.prototype || opt_includeFunctionPrototype);) { + for (var visitedSet = {}, proto = obj; proto && (proto !== Object.prototype || includeObjectPrototype) && (proto !== Function.prototype || includeFunctionPrototype);) { for (var names = Object.getOwnPropertyNames(proto), i = 0; i < names.length; i++) { visitedSet[names[i]] = !0; } proto = Object.getPrototypeOf(proto); } - return goog.object.getKeys(visitedSet); + return module$contents$goog$object_getKeys(visitedSet); +}; +goog.object.getAnyKey = function module$contents$goog$object_getAnyKey(obj) { + for (var key in obj) { + return key; + } +}; +goog.object.getAnyValue = function module$contents$goog$object_getAnyValue(obj) { + for (var key in obj) { + return obj[key]; + } }; -goog.object.getSuperClass = function(constructor) { +goog.object.getCount = module$contents$goog$object_getCount; +goog.object.getKeys = module$contents$goog$object_getKeys; +goog.object.getSuperClass = function module$contents$goog$object_getSuperClass(constructor) { var proto = Object.getPrototypeOf(constructor.prototype); return proto && proto.constructor; }; -goog.labs.userAgent.browser = {}; +goog.object.getValueByKeys = function module$contents$goog$object_getValueByKeys(obj, var_args) { + for (var isArrayLike = goog.isArrayLike(var_args), keys = isArrayLike ? var_args : arguments, i = isArrayLike ? 0 : 1; i < keys.length; i++) { + if (null == obj) { + return; + } + obj = obj[keys[i]]; + } + return obj; +}; +goog.object.getValues = module$contents$goog$object_getValues; +goog.object.isEmpty = module$contents$goog$object_isEmpty; +goog.object.isImmutableView = function module$contents$goog$object_isImmutableView(obj) { + return !!Object.isFrozen && Object.isFrozen(obj); +}; +goog.object.map = module$contents$goog$object_map; +goog.object.remove = module$contents$goog$object_remove; +goog.object.set = module$contents$goog$object_set; +goog.object.setIfUndefined = function module$contents$goog$object_setIfUndefined(obj, key, value) { + return key in obj ? obj[key] : obj[key] = value; +}; +goog.object.setWithReturnValueIfNotSet = function module$contents$goog$object_setWithReturnValueIfNotSet(obj, key, f) { + if (key in obj) { + return obj[key]; + } + var val = f(); + return obj[key] = val; +}; +goog.object.some = module$contents$goog$object_some; +goog.object.transpose = function module$contents$goog$object_transpose(obj) { + var transposed = {}, key; + for (key in obj) { + transposed[obj[key]] = key; + } + return transposed; +}; +goog.object.unsafeClone = module$contents$goog$object_unsafeClone; +goog.labs.userAgent.browser = {}; goog.labs.userAgent.browser.matchOpera_ = function() { return goog.labs.userAgent.util.matchUserAgent("Opera"); }; @@ -2481,7 +2558,7 @@ goog.labs.userAgent.browser.getVersion = function() { module$contents$goog$array_forEach(versionTuples, function(tuple) { versionMap[tuple[0]] = tuple[1]; }); - var versionMapHasKey = goog.partial(goog.object.containsKey, versionMap); + var versionMapHasKey = goog.partial(module$contents$goog$object_containsKey, versionMap); if (goog.labs.userAgent.browser.isOpera()) { return lookUpValueWithKeys(["Version", "Opera"]); } @@ -3039,7 +3116,7 @@ goog.fs.blob.getBlob = function(var_args) { } return bb.getBlob(); } - return goog.fs.blob.getBlobWithProperties(module$contents$goog$array_toArray(arguments)); + return goog.fs.blob.getBlobWithProperties(Array.prototype.slice.call(arguments)); }; goog.fs.blob.getBlobWithProperties = function(parts, opt_type, opt_endings) { var BlobBuilder = goog.global.BlobBuilder || goog.global.WebKitBlobBuilder; @@ -3546,7 +3623,7 @@ goog.html.SafeStyle.concat = function(var_args) { var style = "", addArgument = function(argument) { Array.isArray(argument) ? module$contents$goog$array_forEach(argument, addArgument) : style += goog.html.SafeStyle.unwrap(argument); }; - module$contents$goog$array_forEach(arguments, addArgument); + Array.prototype.forEach.call(arguments, addArgument); return style ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(style) : goog.html.SafeStyle.EMPTY; }; var module$contents$goog$html$SafeStyleSheet_CONSTRUCTOR_TOKEN_PRIVATE = {}, module$contents$goog$html$SafeStyleSheet_SafeStyleSheet = function(value, token) { @@ -3574,7 +3651,7 @@ module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.hasBalancedBrackets_ = f if (brackets[ch]) { expectedBrackets.push(brackets[ch]); } else { - if (goog.object.contains(brackets, ch) && expectedBrackets.pop() != ch) { + if (module$contents$goog$object_contains(brackets, ch) && expectedBrackets.pop() != ch) { return !1; } } @@ -3585,7 +3662,7 @@ module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.concat = function(var_ar var result = "", addArgument = function(argument) { Array.isArray(argument) ? module$contents$goog$array_forEach(argument, addArgument) : result += module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.unwrap(argument); }; - module$contents$goog$array_forEach(arguments, addArgument); + Array.prototype.forEach.call(arguments, addArgument); return module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(result); }; module$contents$goog$html$SafeStyleSheet_SafeStyleSheet.fromConstant = function(styleSheet) { @@ -3669,7 +3746,7 @@ goog.html.SafeHtml.comment = function(text) { }; goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/; goog.html.SafeHtml.URL_ATTRIBUTES_ = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0}; -goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); +goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = module$contents$goog$object_createSet(goog.dom.TagName.APPLET, goog.dom.TagName.BASE, goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.MATH, goog.dom.TagName.META, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.SVG, goog.dom.TagName.TEMPLATE); goog.html.SafeHtml.create = function(tagName, opt_attributes, opt_content) { goog.html.SafeHtml.verifyTagName(String(tagName)); return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(String(tagName), opt_attributes, opt_content); @@ -3805,7 +3882,7 @@ goog.html.SafeHtml.concat = function(var_args) { return goog.html.SafeHtml.join(goog.html.SafeHtml.EMPTY, Array.prototype.slice.call(arguments)); }; goog.html.SafeHtml.concatWithDir = function(dir, var_args) { - var html = goog.html.SafeHtml.concat(module$contents$goog$array_slice(arguments, 1)); + var html = goog.html.SafeHtml.concat(Array.prototype.slice.call(arguments, 1)); html.dir_ = dir; return html; }; @@ -4002,7 +4079,14 @@ goog.dom.safe.setIframeSrcdoc = function(iframe, html) { goog.dom.safe.setLinkHrefAndRel = function(link, url, rel) { goog.dom.asserts.assertIsHTMLLinkElement(link); link.rel = rel; - goog.string.internal.caseInsensitiveContains(rel, "stylesheet") ? (goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), link.href = goog.html.TrustedResourceUrl.unwrap(url)) : link.href = url instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(url) : url instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(url) : goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(url)); + if (goog.string.internal.caseInsensitiveContains(rel, "stylesheet")) { + goog.asserts.assert(url instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'); + link.href = goog.html.TrustedResourceUrl.unwrap(url); + var nonce = goog.dom.safe.getStyleNonce(link.ownerDocument && link.ownerDocument.defaultView); + nonce && link.setAttribute("nonce", nonce); + } else { + link.href = url instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(url) : url instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(url) : goog.html.SafeUrl.unwrap(goog.html.SafeUrl.sanitizeAssertUnchanged(url)); + } }; goog.dom.safe.setObjectData = function(object, url) { goog.dom.asserts.assertIsHTMLObjectElement(object); @@ -4019,7 +4103,7 @@ goog.dom.safe.setScriptContent = function(script, content) { goog.dom.safe.setNonceForScriptElement_(script); }; goog.dom.safe.setNonceForScriptElement_ = function(script) { - var nonce = goog.getScriptNonce(script.ownerDocument && script.ownerDocument.defaultView); + var nonce = goog.dom.safe.getScriptNonce(script.ownerDocument && script.ownerDocument.defaultView); nonce && script.setAttribute("nonce", nonce); }; goog.dom.safe.setLocationHref = function(loc, url) { @@ -4061,6 +4145,27 @@ goog.dom.safe.createImageFromBlob = function(blob) { goog.dom.safe.createContextualFragment = function(range, html) { return range.createContextualFragment(goog.html.SafeHtml.unwrapTrustedHTML(html)); }; +goog.dom.safe.getScriptNonce = function(opt_window) { + return goog.dom.safe.getNonce_("script[nonce]", opt_window); +}; +goog.dom.safe.getStyleNonce = function(opt_window) { + return goog.dom.safe.getNonce_('style[nonce],link[rel="stylesheet"][nonce]', opt_window); +}; +goog.dom.safe.NONCE_PATTERN_ = /^[\w+/_-]+[=]{0,2}$/; +goog.dom.safe.getNonce_ = function(selector, win) { + var doc = (win || goog.global).document; + if (!doc.querySelector) { + return ""; + } + var el = doc.querySelector(selector); + if (el) { + var nonce = el.nonce || el.getAttribute("nonce"); + if (nonce && goog.dom.safe.NONCE_PATTERN_.test(nonce)) { + return nonce; + } + } + return ""; +}; goog.string.DETECT_DOUBLE_ESCAPING = !1; goog.string.FORCE_NON_DOM_HTML_UNESCAPING = !1; goog.string.Unicode = {NBSP:"\u00a0"}; @@ -4408,13 +4513,13 @@ goog.string.editDistance = function(a, b) { for (var i = 0; i < b.length + 1; i++) { v0[i] = i; } - for (i = 0; i < a.length; i++) { - v1[0] = i + 1; + for (var i$25 = 0; i$25 < a.length; i$25++) { + v1[0] = i$25 + 1; for (var j = 0; j < b.length; j++) { - v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + Number(a[i] != b[j])); + v1[j + 1] = Math.min(v1[j] + 1, v0[j + 1] + 1, v0[j] + Number(a[i$25] != b[j])); } - for (j = 0; j < v0.length; j++) { - v0[j] = v1[j]; + for (var j$26 = 0; j$26 < v0.length; j$26++) { + v0[j$26] = v1[j$26]; } } return v1[b.length]; @@ -4648,7 +4753,6 @@ goog.userAgent.isVersionOrHigher = function(version) { return 0 <= goog.string.compareVersions(goog.userAgent.VERSION, version); }); }; -goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher; goog.userAgent.isDocumentModeOrHigher = function(documentMode) { return Number(goog.userAgent.DOCUMENT_MODE) >= documentMode; }; @@ -4763,7 +4867,7 @@ goog.debug.normalizeErrorObject = function(err) { } try { var fileName = err.fileName || err.filename || err.sourceURL || goog.global.$googDebugFname || href; - } catch (e$20) { + } catch (e$27) { fileName = "Not available", threwError = !0; } var stack = goog.debug.serializeErrorStack_(err); @@ -4776,7 +4880,7 @@ goog.debug.normalizeErrorObject = function(err) { if (goog.debug.CHECK_FOR_THROWN_EVENT && "Event" == ctorName) { try { message = message + ' with Event.type "' + (err.type || "") + '"'; - } catch (e$21) { + } catch (e$28) { } } } else { @@ -4787,7 +4891,7 @@ goog.debug.normalizeErrorObject = function(err) { return {message:message, name:err.name || "UnknownError", lineNumber:lineNumber, fileName:fileName, stack:stack || "Not available"}; } err.stack = stack; - return err; + return {message:err.message, name:err.name, lineNumber:err.lineNumber, fileName:err.fileName, stack:err.stack}; }; goog.debug.serializeErrorStack_ = function(e, seen) { seen || (seen = {}); @@ -4941,8 +5045,8 @@ goog.debug.freeze = function(arg) { return goog.debug.freezeInternal_(arg); }(); }; -goog.events.BrowserFeature = {HAS_W3C_BUTTON:!0, HAS_W3C_EVENT_SUPPORT:!0, SET_KEY_CODE_TO_PREVENT_DEFAULT:!1, HAS_NAVIGATOR_ONLINE_PROPERTY:!0, HAS_HTML5_NETWORK_EVENT_SUPPORT:goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9b") || goog.userAgent.IE && goog.userAgent.isVersionOrHigher("8") || goog.userAgent.OPERA && goog.userAgent.isVersionOrHigher("9.5") || goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher("528"), HTML5_NETWORK_EVENTS_FIRE_ON_BODY:!1, TOUCH_ENABLED:"ontouchstart" in -goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.maxTouchPoints && !goog.global.navigator.msMaxTouchPoints), POINTER_EVENTS:"PointerEvent" in goog.global, MSPOINTER_EVENTS:"MSPointerEvent" in goog.global && !(!goog.global.navigator || !goog.global.navigator.msPointerEnabled), PASSIVE_EVENTS:function(fn) { +goog.events.BrowserFeature = {HAS_W3C_BUTTON:!0, HAS_W3C_EVENT_SUPPORT:!0, SET_KEY_CODE_TO_PREVENT_DEFAULT:!1, HAS_NAVIGATOR_ONLINE_PROPERTY:!0, HAS_HTML5_NETWORK_EVENT_SUPPORT:!0, HTML5_NETWORK_EVENTS_FIRE_ON_BODY:!1, TOUCH_ENABLED:"ontouchstart" in goog.global || !!(goog.global.document && document.documentElement && "ontouchstart" in document.documentElement) || !(!goog.global.navigator || !goog.global.navigator.maxTouchPoints && !goog.global.navigator.msMaxTouchPoints), POINTER_EVENTS:"PointerEvent" in +goog.global, MSPOINTER_EVENTS:"MSPointerEvent" in goog.global && !(!goog.global.navigator || !goog.global.navigator.msPointerEnabled), PASSIVE_EVENTS:function(fn) { return {valueOf:fn}.valueOf(); }(function() { if (!goog.global.addEventListener || !Object.defineProperty) { @@ -5184,7 +5288,7 @@ goog.events.ListenerMap.prototype.getListener = function(type, listener, capture }; goog.events.ListenerMap.prototype.hasListener = function(opt_type, opt_capture) { var hasType = void 0 !== opt_type, typeStr = hasType ? opt_type.toString() : "", hasCapture = void 0 !== opt_capture; - return goog.object.some(this.listeners, function(listenerArray, type) { + return module$contents$goog$object_some(this.listeners, function(listenerArray, type) { for (var i = 0; i < listenerArray.length; ++i) { if (!(hasType && listenerArray[i].type != typeStr || hasCapture && listenerArray[i].capture != opt_capture)) { return !0; @@ -5583,7 +5687,7 @@ goog.events.EventTarget.dispatchEventInternal_ = function(target, e, opt_ancesto } else { var oldEvent = e; e = new goog.events.Event(type, target); - goog.object.extend(e, oldEvent); + module$contents$goog$object_extend(e, oldEvent); } } var rv = !0; @@ -5604,6 +5708,77 @@ goog.events.EventTarget.dispatchEventInternal_ = function(target, e, opt_ancesto goog.structs = {}; goog.structs.Collection = function() { }; +goog.collections = {}; +goog.collections.iters = {}; +function module$contents$goog$collections$iters_getIterator(iterable) { + return iterable[goog.global.Symbol.iterator](); +} +goog.collections.iters.getIterator = module$contents$goog$collections$iters_getIterator; +goog.collections.iters.forEach = function(iterable, f) { + for (var $jscomp$iter$5 = $jscomp.makeIterator(iterable), $jscomp$key$elem = $jscomp$iter$5.next(); !$jscomp$key$elem.done; $jscomp$key$elem = $jscomp$iter$5.next()) { + f($jscomp$key$elem.value); + } +}; +var module$contents$goog$collections$iters_MapIterator = function(childIter, mapFn) { + this.childIterator_ = module$contents$goog$collections$iters_getIterator(childIter); + this.mapFn_ = mapFn; + this.nextIndex_ = 0; +}; +module$contents$goog$collections$iters_MapIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_MapIterator.prototype.next = function() { + var childResult = this.childIterator_.next(); + return {value:childResult.done ? void 0 : this.mapFn_.call(void 0, childResult.value, this.nextIndex_++), done:childResult.done, }; +}; +goog.collections.iters.map = function(iterable, f) { + return new module$contents$goog$collections$iters_MapIterator(iterable, f); +}; +var module$contents$goog$collections$iters_FilterIterator = function(childIter, filterFn) { + this.childIter_ = module$contents$goog$collections$iters_getIterator(childIter); + this.filterFn_ = filterFn; + this.nextIndex_ = 0; +}; +module$contents$goog$collections$iters_FilterIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_FilterIterator.prototype.next = function() { + for (;;) { + var childResult = this.childIter_.next(); + if (childResult.done) { + return {done:!0, value:void 0}; + } + if (this.filterFn_.call(void 0, childResult.value, this.nextIndex_++)) { + return childResult; + } + } +}; +goog.collections.iters.filter = function(iterable, f) { + return new module$contents$goog$collections$iters_FilterIterator(iterable, f); +}; +var module$contents$goog$collections$iters_ConcatIterator = function(iterators) { + this.iterators_ = iterators; + this.iterIndex_ = 0; +}; +module$contents$goog$collections$iters_ConcatIterator.prototype[Symbol.iterator] = function() { + return this; +}; +module$contents$goog$collections$iters_ConcatIterator.prototype.next = function() { + for (; this.iterIndex_ < this.iterators_.length;) { + var result = this.iterators_[this.iterIndex_].next(); + if (!result.done) { + return result; + } + this.iterIndex_++; + } + return {done:!0}; +}; +goog.collections.iters.concat = function(iterables) { + for (var $jscomp$restParams = [], $jscomp$restIndex = 0; $jscomp$restIndex < arguments.length; ++$jscomp$restIndex) { + $jscomp$restParams[$jscomp$restIndex - 0] = arguments[$jscomp$restIndex]; + } + return new module$contents$goog$collections$iters_ConcatIterator($jscomp$restParams.map(module$contents$goog$collections$iters_getIterator)); +}; goog.math = {}; goog.math.randomInt = function(a) { return Math.floor(Math.random() * a); @@ -5677,7 +5852,7 @@ goog.math.longestCommonSubsequence = function(array1, array2, opt_compareFn, opt return result; }; goog.math.sum = function(var_args) { - return module$contents$goog$array_reduce(arguments, function(sum, value) { + return Array.prototype.reduce.call(arguments, function(sum, value) { return sum + value; }, 0); }; @@ -5690,7 +5865,7 @@ goog.math.sampleVariance = function(var_args) { return 0; } var mean = goog.math.average.apply(null, arguments); - return goog.math.sum.apply(null, module$contents$goog$array_map(arguments, function(val) { + return goog.math.sum.apply(null, Array.prototype.map.call(arguments, function(val) { return Math.pow(val - mean, 2); })) / (sampleSize - 1); }; @@ -5726,6 +5901,9 @@ goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopItera goog.iter.Iterator = function() { }; goog.iter.Iterator.prototype.next = function() { + return goog.iter.Iterator.prototype.nextValueOrThrow.call(this); +}; +goog.iter.Iterator.prototype.nextValueOrThrow = function() { throw goog.iter.StopIteration; }; goog.iter.Iterator.prototype.__iterator__ = function(opt_keys) { @@ -5770,9 +5948,9 @@ goog.iter.forEach = function(iterable, f, opt_obj) { for (;;) { f.call(opt_obj, iterable.next(), void 0, iterable); } - } catch (ex$22) { - if (ex$22 !== goog.iter.StopIteration) { - throw ex$22; + } catch (ex$30) { + if (ex$30 !== goog.iter.StopIteration) { + throw ex$30; } } } @@ -5931,7 +6109,7 @@ goog.iter.nextOrValue = function(iterable, defaultValue) { } }; goog.iter.product = function(var_args) { - if (module$contents$goog$array_some(arguments, function(arr) { + if (Array.prototype.some.call(arguments, function(arr) { return !arr.length; }) || !arguments.length) { return new goog.iter.Iterator; @@ -6013,7 +6191,7 @@ goog.iter.zip = function(var_args) { return iter; }; goog.iter.zipLongest = function(fillValue, var_args) { - var args = module$contents$goog$array_slice(arguments, 1), iter = new goog.iter.Iterator; + var args = Array.prototype.slice.call(arguments, 1), iter = new goog.iter.Iterator; if (0 < args.length) { var iterators = module$contents$goog$array_map(args, goog.iter.toIterator); iter.next = function() { @@ -6162,10 +6340,108 @@ goog.iter.combinationsWithReplacement = function(iterable, length) { }; return iter; }; +goog.iter.es6 = {}; +var module$contents$goog$iter$es6_ShimIterable = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.__iterator__ = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.toGoog = function() { +}; +module$contents$goog$iter$es6_ShimIterable.prototype.toEs6 = function() { +}; +module$contents$goog$iter$es6_ShimIterable.of = function(iter) { + if (iter instanceof module$contents$goog$iter$es6_ShimIterableImpl || iter instanceof module$contents$goog$iter$es6_ShimGoogIterator || iter instanceof module$contents$goog$iter$es6_ShimEs6Iterator) { + return iter; + } + if ("function" == typeof iter.next) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return module$contents$goog$iter$es6_wrapGoog(iter); + }); + } + if ("function" == typeof iter[Symbol.iterator]) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return iter[Symbol.iterator](); + }); + } + if ("function" == typeof iter.__iterator__) { + return new module$contents$goog$iter$es6_ShimIterableImpl(function() { + return module$contents$goog$iter$es6_wrapGoog(iter.__iterator__()); + }); + } + throw Error("Not an iterator or iterable."); +}; +var module$contents$goog$iter$es6_wrapGoog = function(iter) { + if (!(iter instanceof goog.iter.Iterator)) { + return iter; + } + var done = !1; + return {next:function() { + for (var value; !done;) { + try { + value = iter.next(); + break; + } catch (err$31) { + if (err$31 !== goog.iter.StopIteration) { + throw err$31; + } + done = !0; + } + } + return {value:value, done:done}; + }, }; +}, module$contents$goog$iter$es6_ShimIterableImpl = function(func) { + this.func_ = func; +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.__iterator__ = function() { + return new module$contents$goog$iter$es6_ShimGoogIterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.toGoog = function() { + return new module$contents$goog$iter$es6_ShimGoogIterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype[Symbol.iterator] = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.func_()); +}; +module$contents$goog$iter$es6_ShimIterableImpl.prototype.toEs6 = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.func_()); +}; +var module$contents$goog$iter$es6_ShimGoogIterator = function(iter) { + goog.iter.Iterator.call(this); + this.iter_ = iter; +}; +$jscomp.inherits(module$contents$goog$iter$es6_ShimGoogIterator, goog.iter.Iterator); +module$contents$goog$iter$es6_ShimGoogIterator.prototype.next = function() { + var result = this.iter_.next(); + if (result.done) { + throw goog.iter.StopIteration; + } + return result.value; +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype.toGoog = function() { + return this; +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype[Symbol.iterator] = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.iter_); +}; +module$contents$goog$iter$es6_ShimGoogIterator.prototype.toEs6 = function() { + return new module$contents$goog$iter$es6_ShimEs6Iterator(this.iter_); +}; +var module$contents$goog$iter$es6_ShimEs6Iterator = function(iter) { + module$contents$goog$iter$es6_ShimIterableImpl.call(this, function() { + return iter; + }); + this.iter_ = iter; +}; +$jscomp.inherits(module$contents$goog$iter$es6_ShimEs6Iterator, module$contents$goog$iter$es6_ShimIterableImpl); +module$contents$goog$iter$es6_ShimEs6Iterator.prototype.next = function() { + return this.iter_.next(); +}; +goog.iter.es6.ShimIterable = module$contents$goog$iter$es6_ShimIterable; +goog.iter.es6.ShimEs6Iterator = module$contents$goog$iter$es6_ShimEs6Iterator; +goog.iter.es6.ShimGoogIterator = module$contents$goog$iter$es6_ShimGoogIterator; goog.structs.Map = function(opt_map, var_args) { this.map_ = {}; this.keys_ = []; - this.version_ = this.count_ = 0; + this.version_ = this.size = 0; var argLength = arguments.length; if (1 < argLength) { if (argLength % 2) { @@ -6179,7 +6455,7 @@ goog.structs.Map = function(opt_map, var_args) { } }; goog.structs.Map.prototype.getCount = function() { - return this.count_; + return this.size; }; goog.structs.Map.prototype.getValues = function() { this.cleanupKeysArray_(); @@ -6193,6 +6469,9 @@ goog.structs.Map.prototype.getKeys = function() { return this.keys_.concat(); }; goog.structs.Map.prototype.containsKey = function(key) { + return this.has(key); +}; +goog.structs.Map.prototype.has = function(key) { return goog.structs.Map.hasKey_(this.map_, key); }; goog.structs.Map.prototype.containsValue = function(val) { @@ -6208,7 +6487,7 @@ goog.structs.Map.prototype.equals = function(otherMap, opt_equalityFn) { if (this === otherMap) { return !0; } - if (this.count_ != otherMap.getCount()) { + if (this.size != otherMap.getCount()) { return !1; } var equalityFn = opt_equalityFn || goog.structs.Map.defaultEquals; @@ -6224,17 +6503,22 @@ goog.structs.Map.defaultEquals = function(a, b) { return a === b; }; goog.structs.Map.prototype.isEmpty = function() { - return 0 == this.count_; + return 0 == this.size; }; goog.structs.Map.prototype.clear = function() { this.map_ = {}; - this.version_ = this.count_ = this.keys_.length = 0; + this.keys_.length = 0; + this.setSizeInternal_(0); + this.version_ = 0; }; goog.structs.Map.prototype.remove = function(key) { - return goog.structs.Map.hasKey_(this.map_, key) ? (delete this.map_[key], this.count_--, this.version_++, this.keys_.length > 2 * this.count_ && this.cleanupKeysArray_(), !0) : !1; + return this.delete(key); +}; +goog.structs.Map.prototype.delete = function(key) { + return goog.structs.Map.hasKey_(this.map_, key) ? (delete this.map_[key], this.setSizeInternal_(this.size - 1), this.version_++, this.keys_.length > 2 * this.size && this.cleanupKeysArray_(), !0) : !1; }; goog.structs.Map.prototype.cleanupKeysArray_ = function() { - if (this.count_ != this.keys_.length) { + if (this.size != this.keys_.length) { for (var srcIndex = 0, destIndex = 0; srcIndex < this.keys_.length;) { var key = this.keys_[srcIndex]; goog.structs.Map.hasKey_(this.map_, key) && (this.keys_[destIndex++] = key); @@ -6242,7 +6526,7 @@ goog.structs.Map.prototype.cleanupKeysArray_ = function() { } this.keys_.length = destIndex; } - if (this.count_ != this.keys_.length) { + if (this.size != this.keys_.length) { var seen = {}; for (destIndex = srcIndex = 0; srcIndex < this.keys_.length;) { key = this.keys_[srcIndex], goog.structs.Map.hasKey_(seen, key) || (this.keys_[destIndex++] = key, seen[key] = 1), srcIndex++; @@ -6254,7 +6538,7 @@ goog.structs.Map.prototype.get = function(key, opt_val) { return goog.structs.Map.hasKey_(this.map_, key) ? this.map_[key] : opt_val; }; goog.structs.Map.prototype.set = function(key, value) { - goog.structs.Map.hasKey_(this.map_, key) || (this.count_++, this.keys_.push(key), this.version_++); + goog.structs.Map.hasKey_(this.map_, key) || (this.setSizeInternal_(this.size + 1), this.keys_.push(key), this.version_++); this.map_[key] = value; }; goog.structs.Map.prototype.addAll = function(map) { @@ -6295,9 +6579,21 @@ goog.structs.Map.prototype.toObject = function() { goog.structs.Map.prototype.getKeyIterator = function() { return this.__iterator__(!0); }; +goog.structs.Map.prototype.keys = function() { + return module$contents$goog$iter$es6_ShimIterable.of(this.getKeyIterator()).toEs6(); +}; goog.structs.Map.prototype.getValueIterator = function() { return this.__iterator__(!1); }; +goog.structs.Map.prototype.values = function() { + return module$contents$goog$iter$es6_ShimIterable.of(this.getValueIterator()).toEs6(); +}; +goog.structs.Map.prototype.entries = function() { + var self = this; + return goog.collections.iters.map(this.keys(), function(key) { + return [key, self.get(key)]; + }); +}; goog.structs.Map.prototype.__iterator__ = function(opt_keys) { this.cleanupKeysArray_(); var i = 0, version = this.version_, selfObj = this, newIter = new goog.iter.Iterator; @@ -6313,16 +6609,22 @@ goog.structs.Map.prototype.__iterator__ = function(opt_keys) { }; return newIter; }; +goog.structs.Map.prototype.setSizeInternal_ = function(newSize) { + this.size = newSize; +}; goog.structs.Map.hasKey_ = function(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); }; goog.structs.getCount = function(col) { - return col.getCount && "function" == typeof col.getCount ? col.getCount() : goog.isArrayLike(col) || "string" === typeof col ? col.length : goog.object.getCount(col); + return col.getCount && "function" == typeof col.getCount ? col.getCount() : goog.isArrayLike(col) || "string" === typeof col ? col.length : module$contents$goog$object_getCount(col); }; goog.structs.getValues = function(col) { if (col.getValues && "function" == typeof col.getValues) { return col.getValues(); } + if ("undefined" !== typeof Map && col instanceof Map || "undefined" !== typeof Set && col instanceof Set) { + return Array.from(col.values()); + } if ("string" === typeof col) { return col.split(""); } @@ -6332,30 +6634,35 @@ goog.structs.getValues = function(col) { } return rv; } - return goog.object.getValues(col); + return module$contents$goog$object_getValues(col); }; goog.structs.getKeys = function(col) { if (col.getKeys && "function" == typeof col.getKeys) { return col.getKeys(); } if (!col.getValues || "function" != typeof col.getValues) { - if (goog.isArrayLike(col) || "string" === typeof col) { - for (var rv = [], l = col.length, i = 0; i < l; i++) { - rv.push(i); + if ("undefined" !== typeof Map && col instanceof Map) { + return Array.from(col.keys()); + } + if (!("undefined" !== typeof Set && col instanceof Set)) { + if (goog.isArrayLike(col) || "string" === typeof col) { + for (var rv = [], l = col.length, i = 0; i < l; i++) { + rv.push(i); + } + return rv; } - return rv; + return module$contents$goog$object_getKeys(col); } - return goog.object.getKeys(col); } }; goog.structs.contains = function(col, val) { - return col.contains && "function" == typeof col.contains ? col.contains(val) : col.containsValue && "function" == typeof col.containsValue ? col.containsValue(val) : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_contains(col, val) : goog.object.containsValue(col, val); + return col.contains && "function" == typeof col.contains ? col.contains(val) : col.containsValue && "function" == typeof col.containsValue ? col.containsValue(val) : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_contains(col, val) : module$contents$goog$object_containsValue(col, val); }; goog.structs.isEmpty = function(col) { - return col.isEmpty && "function" == typeof col.isEmpty ? col.isEmpty() : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_isEmpty(col) : goog.object.isEmpty(col); + return col.isEmpty && "function" == typeof col.isEmpty ? col.isEmpty() : goog.isArrayLike(col) || "string" === typeof col ? module$contents$goog$array_isEmpty(col) : module$contents$goog$object_isEmpty(col); }; goog.structs.clear = function(col) { - col.clear && "function" == typeof col.clear ? col.clear() : goog.isArrayLike(col) ? module$contents$goog$array_clear(col) : goog.object.clear(col); + col.clear && "function" == typeof col.clear ? col.clear() : goog.isArrayLike(col) ? module$contents$goog$array_clear(col) : module$contents$goog$object_clear(col); }; goog.structs.forEach = function(col, f, opt_obj) { if (col.forEach && "function" == typeof col.forEach) { @@ -6440,6 +6747,7 @@ goog.structs.every = function(col, f, opt_obj) { }; goog.structs.Set = function(opt_values) { this.map_ = new goog.structs.Map; + this.size = 0; opt_values && this.addAll(opt_values); }; goog.structs.Set.getUid_ = goog.getUid; @@ -6448,29 +6756,41 @@ goog.structs.Set.getKey_ = function(val) { return "object" == type && val || "function" == type ? "o" + goog.getUid(val) : type.substr(0, 1) + val; }; goog.structs.Set.prototype.getCount = function() { - return this.map_.getCount(); + return this.map_.size; }; goog.structs.Set.prototype.add = function(element) { this.map_.set(goog.structs.Set.getKey_(element), element); + this.setSizeInternal_(this.map_.size); }; goog.structs.Set.prototype.addAll = function(col) { for (var values = goog.structs.getValues(col), l = values.length, i = 0; i < l; i++) { this.add(values[i]); } + this.setSizeInternal_(this.map_.size); }; goog.structs.Set.prototype.removeAll = function(col) { for (var values = goog.structs.getValues(col), l = values.length, i = 0; i < l; i++) { this.remove(values[i]); } + this.setSizeInternal_(this.map_.size); +}; +goog.structs.Set.prototype.delete = function(element) { + var rv = this.map_.remove(goog.structs.Set.getKey_(element)); + this.setSizeInternal_(this.map_.size); + return rv; }; goog.structs.Set.prototype.remove = function(element) { - return this.map_.remove(goog.structs.Set.getKey_(element)); + return this.delete(element); }; goog.structs.Set.prototype.clear = function() { this.map_.clear(); + this.setSizeInternal_(0); }; goog.structs.Set.prototype.isEmpty = function() { - return this.map_.isEmpty(); + return 0 === this.map_.size; +}; +goog.structs.Set.prototype.has = function(element) { + return this.map_.containsKey(goog.structs.Set.getKey_(element)); }; goog.structs.Set.prototype.contains = function(element) { return this.map_.containsKey(goog.structs.Set.getKey_(element)); @@ -6493,6 +6813,9 @@ goog.structs.Set.prototype.difference = function(col) { goog.structs.Set.prototype.getValues = function() { return this.map_.getValues(); }; +goog.structs.Set.prototype.values = function() { + return this.map_.values(); +}; goog.structs.Set.prototype.clone = function() { return new goog.structs.Set(this); }; @@ -6512,6 +6835,12 @@ goog.structs.Set.prototype.isSubsetOf = function(col) { goog.structs.Set.prototype.__iterator__ = function(opt_keys) { return this.map_.__iterator__(!1); }; +goog.structs.Set.prototype[Symbol.iterator] = function() { + return this.values(); +}; +goog.structs.Set.prototype.setSizeInternal_ = function(newSize) { + this.size = newSize; +}; var ee = {AbstractOverlay:function(url, mapId, token, opt_init, opt_profiler) { goog.events.EventTarget.call(this); this.mapId = mapId; @@ -6754,6 +7083,9 @@ module$exports$tslib.__spreadArrays = function() { return r; }; module$exports$tslib.__spreadArray = function(to, from) { + if (!(Array.isArray(from) || from instanceof NodeList)) { + throw new TypeError("Expected an Array or NodeList: " + String(from)); + } for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) { to[j] = from[i]; } @@ -6846,7 +7178,7 @@ module$exports$eeapiclient$domain_object.NULL_VALUE = new module$contents$eeapic module$exports$eeapiclient$domain_object.ISerializable = function module$contents$eeapiclient$domain_object_ISerializable() { }; function module$contents$eeapiclient$domain_object_buildClassMetadataFromPartial(partialClassMetadata) { - return Object.assign({arrays:{}, descriptions:{}, keys:[], objectMaps:{}, objects:{}, enums:{}}, partialClassMetadata); + return Object.assign({arrays:{}, descriptions:{}, keys:[], objectMaps:{}, objects:{}, enums:{}, emptyArrayIsUnset:!1}, partialClassMetadata); } module$exports$eeapiclient$domain_object.buildClassMetadataFromPartial = module$contents$eeapiclient$domain_object_buildClassMetadataFromPartial; module$exports$eeapiclient$domain_object.Serializable = function() { @@ -6907,25 +7239,45 @@ module$exports$eeapiclient$domain_object.strictDeserialize = function module$con }; 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; function module$contents$eeapiclient$domain_object_deepCopy(source, valueGetter, valueSetter, copyInstanciator, targetConstructor) { - for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$loop$39 = {}, $jscomp$iter$4 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$4.next(); !$jscomp$key$key.done; $jscomp$loop$39 = {$jscomp$loop$prop$mapMetadata$40:$jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40}, - $jscomp$key$key = $jscomp$iter$4.next()) { + for (var target = copyInstanciator(targetConstructor), metadata = module$contents$eeapiclient$domain_object_deepCopyMetadata(source, target), arrays = metadata.arrays || {}, objects = metadata.objects || {}, objectMaps = metadata.objectMaps || {}, $jscomp$loop$59 = {}, $jscomp$iter$6 = $jscomp.makeIterator(metadata.keys || []), $jscomp$key$key = $jscomp$iter$6.next(); !$jscomp$key$key.done; $jscomp$loop$59 = {$jscomp$loop$prop$mapMetadata$60:$jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60}, + $jscomp$key$key = $jscomp$iter$6.next()) { var key = $jscomp$key$key.value, value = valueGetter(key, source); if (null != value) { var copy = void 0; - arrays.hasOwnProperty(key) ? copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !0, arrays[key]) : objects.hasOwnProperty(key) ? copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]) : objectMaps.hasOwnProperty(key) ? ($jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40 = - objectMaps[key], copy = $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40.isPropertyArray ? value.map(function($jscomp$loop$39) { - return function(v) { - return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40, valueGetter, valueSetter, copyInstanciator); - }; - }($jscomp$loop$39)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$39.$jscomp$loop$prop$mapMetadata$40, valueGetter, valueSetter, copyInstanciator)) : copy = Array.isArray(value) ? module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !1) : value instanceof module$contents$eeapiclient$domain_object_NullClass ? - null : value; + if (arrays.hasOwnProperty(key)) { + if (metadata.emptyArrayIsUnset && 0 === value.length) { + continue; + } + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !0, arrays[key]); + } else { + if (objects.hasOwnProperty(key)) { + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !1, !0, objects[key]); + } else { + if (objectMaps.hasOwnProperty(key)) { + $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60 = objectMaps[key], copy = $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60.isPropertyArray ? value.map(function($jscomp$loop$59) { + return function(v) { + return module$contents$eeapiclient$domain_object_deepCopyObjectMap(v, $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60, valueGetter, valueSetter, copyInstanciator); + }; + }($jscomp$loop$59)) : module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, $jscomp$loop$59.$jscomp$loop$prop$mapMetadata$60, valueGetter, valueSetter, copyInstanciator); + } else { + if (Array.isArray(value)) { + if (metadata.emptyArrayIsUnset && 0 === value.length) { + continue; + } + copy = module$contents$eeapiclient$domain_object_deepCopyValue(value, valueGetter, valueSetter, copyInstanciator, !0, !1); + } else { + copy = value instanceof module$contents$eeapiclient$domain_object_NullClass ? null : value; + } + } + } + } valueSetter(key, target, copy); } } return target; } function module$contents$eeapiclient$domain_object_deepCopyObjectMap(value, mapMetadata, valueGetter, valueSetter, copyInstanciator) { - for (var objMap = {}, $jscomp$iter$5 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$mapKey = $jscomp$iter$5.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$5.next()) { + for (var objMap = {}, $jscomp$iter$7 = $jscomp.makeIterator(Object.keys(value)), $jscomp$key$mapKey = $jscomp$iter$7.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$7.next()) { var mapKey = $jscomp$key$mapKey.value, mapValue = value[mapKey]; null != mapValue && (objMap[mapKey] = module$contents$eeapiclient$domain_object_deepCopyValue(mapValue, valueGetter, valueSetter, copyInstanciator, mapMetadata.isValueArray, mapMetadata.isSerializable, mapMetadata.ctor)); } @@ -6958,45 +7310,45 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser 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))) { return !1; } - for (var $jscomp$loop$41 = {}, $jscomp$iter$6 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$6.next(); !$jscomp$key$key.done; $jscomp$loop$41 = {$jscomp$loop$prop$value2$42:$jscomp$loop$41.$jscomp$loop$prop$value2$42, $jscomp$loop$prop$mapMetadata$43:$jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43}, $jscomp$key$key = $jscomp$iter$6.next()) { - var key = $jscomp$key$key.value; - if (serializable1.Serializable$has(key) !== serializable2.Serializable$has(key)) { + for (var $jscomp$loop$61 = {}, $jscomp$iter$8 = $jscomp.makeIterator(keys1), $jscomp$key$key = $jscomp$iter$8.next(); !$jscomp$key$key.done; $jscomp$loop$61 = {$jscomp$loop$prop$value2$62:$jscomp$loop$61.$jscomp$loop$prop$value2$62, $jscomp$loop$prop$mapMetadata$63:$jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63}, $jscomp$key$key = $jscomp$iter$8.next()) { + 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); + if (has1 !== has2) { return !1; } - if (serializable1.Serializable$has(key)) { + if (has1) { var value1 = serializable1.Serializable$get(key); - $jscomp$loop$41.$jscomp$loop$prop$value2$42 = serializable2.Serializable$get(key); + $jscomp$loop$61.$jscomp$loop$prop$value2$62 = serializable2.Serializable$get(key); if (arrays1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !0, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !0, !0)) { return !1; } } else { if (objects1.hasOwnProperty(key)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !1, !0)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !1, !0)) { return !1; } } else { if (objectMaps1.hasOwnProperty(key)) { - if ($jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43 = objectMaps1[key], $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43.isPropertyArray) { - if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42) || value1.some(function($jscomp$loop$41) { + if ($jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63 = objectMaps1[key], $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63.isPropertyArray) { + if (!module$contents$eeapiclient$domain_object_sameKeys(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62) || value1.some(function($jscomp$loop$61) { return function(v1, i) { - return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$41.$jscomp$loop$prop$value2$42[i], $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43); + return !module$contents$eeapiclient$domain_object_deepEqualsObjectMap(v1, $jscomp$loop$61.$jscomp$loop$prop$value2$62[i], $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63); }; - }($jscomp$loop$41))) { + }($jscomp$loop$61))) { return !1; } } else { - if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, $jscomp$loop$41.$jscomp$loop$prop$mapMetadata$43)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, $jscomp$loop$61.$jscomp$loop$prop$mapMetadata$63)) { return !1; } } } else { if (Array.isArray(value1)) { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !0, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !0, !1)) { return !1; } } else { - if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$41.$jscomp$loop$prop$value2$42, !1, !1)) { + if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1, $jscomp$loop$61.$jscomp$loop$prop$value2$62, !1, !1)) { return !1; } } @@ -7008,11 +7360,21 @@ function module$contents$eeapiclient$domain_object_deepEquals(serializable1, ser return !0; } module$exports$eeapiclient$domain_object.deepEquals = module$contents$eeapiclient$domain_object_deepEquals; +function module$contents$eeapiclient$domain_object_hasAndIsNotEmptyArray(serializable, key, metadata) { + if (!serializable.Serializable$has(key)) { + return !1; + } + if (!metadata.emptyArrayIsUnset) { + return !0; + } + var value = serializable.Serializable$get(key); + return Array.isArray(value) ? 0 !== value.length : !0; +} function module$contents$eeapiclient$domain_object_deepEqualsObjectMap(value1, value2, mapMetadata) { if (!module$contents$eeapiclient$domain_object_sameKeys(value1, value2)) { return !1; } - for (var $jscomp$iter$7 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$mapKey = $jscomp$iter$7.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$7.next()) { + for (var $jscomp$iter$9 = $jscomp.makeIterator(Object.keys(value1)), $jscomp$key$mapKey = $jscomp$iter$9.next(); !$jscomp$key$mapKey.done; $jscomp$key$mapKey = $jscomp$iter$9.next()) { var mapKey = $jscomp$key$mapKey.value; if (!module$contents$eeapiclient$domain_object_deepEqualsValue(value1[mapKey], value2[mapKey], mapMetadata.isValueArray, mapMetadata.isSerializable)) { return !1; @@ -7067,7 +7429,12 @@ function module$contents$eeapiclient$domain_object_sameKeys(a, b) { } return !0; } -;goog.uri = {}; +module$exports$eeapiclient$domain_object.serializableEqualityTester = function module$contents$eeapiclient$domain_object_serializableEqualityTester(left, right) { + if (left instanceof module$exports$eeapiclient$domain_object.Serializable && right instanceof module$exports$eeapiclient$domain_object.Serializable) { + return module$contents$eeapiclient$domain_object_deepEquals(left, right); + } +}; +goog.uri = {}; goog.uri.utils = {}; goog.uri.utils.CharCode_ = {AMPERSAND:38, EQUAL:61, HASH:35, QUESTION:63}; goog.uri.utils.buildFromEncodedParts = function(opt_scheme, opt_userInfo, opt_domain, opt_port, opt_path, opt_queryData, opt_fragment) { @@ -7753,7 +8120,7 @@ goog.Uri.QueryData.prototype.extend = function(var_args) { }; var module$exports$goog$net$rpc$HttpCors = {HTTP_HEADERS_PARAM_NAME:"$httpHeaders", HTTP_METHOD_PARAM_NAME:"$httpMethod", generateHttpHeadersOverwriteParam:function(headers) { var result = ""; - goog.object.forEach(headers, function(value, key) { + module$contents$goog$object_forEach(headers, function(value, key) { result += key; result += ":"; result += value; @@ -7763,7 +8130,7 @@ var module$exports$goog$net$rpc$HttpCors = {HTTP_HEADERS_PARAM_NAME:"$httpHeader }, generateEncodedHttpHeadersOverwriteParam:function(headers) { return goog.string.urlEncode(module$exports$goog$net$rpc$HttpCors.generateHttpHeadersOverwriteParam(headers)); }, setHttpHeadersWithOverwriteParam:function(url, urlParam, extraHeaders) { - if (goog.object.isEmpty(extraHeaders)) { + if (module$contents$goog$object_isEmpty(extraHeaders)) { return url; } var httpHeaders = module$exports$goog$net$rpc$HttpCors.generateHttpHeadersOverwriteParam(extraHeaders); @@ -7791,7 +8158,7 @@ function module$contents$eeapiclient$request_params_processParams(params) { } module$exports$eeapiclient$request_params.processParams = module$contents$eeapiclient$request_params_processParams; function module$contents$eeapiclient$request_params_buildQueryParams(params, mapping, passthroughParams) { - for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$8 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$ = $jscomp$iter$8.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$8.next()) { + for (var urlQueryParams = passthroughParams = void 0 === passthroughParams ? {} : passthroughParams, $jscomp$iter$10 = $jscomp.makeIterator(Object.entries(mapping)), $jscomp$key$ = $jscomp$iter$10.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$10.next()) { var $jscomp$destructuring$var1 = $jscomp.makeIterator($jscomp$key$.value), jsName = $jscomp$destructuring$var1.next().value, urlQueryParamName = $jscomp$destructuring$var1.next().value; jsName in params && (urlQueryParams[urlQueryParamName] = params[jsName]); } @@ -7803,7 +8170,7 @@ module$exports$eeapiclient$request_params.bypassCorsPreflight = function module$ var safeHeaders = {}, unsafeHeaders = {}, hasUnsafeHeaders = !1, hasSafeHeaders = !1, hasContentType = !1; if (params.headers) { hasContentType = null != params.headers["Content-Type"]; - for (var $jscomp$iter$9 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$ = $jscomp$iter$9.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$9.next()) { + for (var $jscomp$iter$11 = $jscomp.makeIterator(Object.entries(params.headers)), $jscomp$key$ = $jscomp$iter$11.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$11.next()) { var $jscomp$destructuring$var3 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var3.next().value, value = $jscomp$destructuring$var3.next().value; module$contents$eeapiclient$request_params_simpleCorsAllowedHeaders.includes(key) ? (safeHeaders[key] = value, hasSafeHeaders = !0) : (unsafeHeaders[key] = value, hasUnsafeHeaders = !0); } @@ -7854,7 +8221,7 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.build = return Promise.all(this.files.map(function(f) { return $jscomp$this.encodeFile(f); })).then(function(filePayloads) { - for (var $jscomp$iter$10 = $jscomp.makeIterator(filePayloads), $jscomp$key$filePayload = $jscomp$iter$10.next(); !$jscomp$key$filePayload.done; $jscomp$key$filePayload = $jscomp$iter$10.next()) { + for (var $jscomp$iter$12 = $jscomp.makeIterator(filePayloads), $jscomp$key$filePayload = $jscomp$iter$12.next(); !$jscomp$key$filePayload.done; $jscomp$key$filePayload = $jscomp$iter$12.next()) { payload += $jscomp$key$filePayload.value; } return payload += "\r\n--" + $jscomp$this._boundary + "--"; @@ -7870,7 +8237,7 @@ module$exports$eeapiclient$multipart_request.MultipartRequest.prototype.base64En var reader = new FileReader; reader.onload = function(ev) { try { - var file$23 = ev.target.result, toResolve = file$23.substr(file$23.indexOf(",") + 1); + var file$32 = ev.target.result, toResolve = file$32.substr(file$32.indexOf(",") + 1); resolve(toResolve); } catch (e) { reject(e); @@ -8008,8 +8375,9 @@ module$exports$eeapiclient$ee_api_client.DataAccessOptionsLogModeEnum = {LOG_FAI }}; module$exports$eeapiclient$ee_api_client.IEarthEngineAssetTypeEnum = function module$contents$eeapiclient$ee_api_client_IEarthEngineAssetTypeEnum() { }; -module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum = {FOLDER:"FOLDER", IMAGE:"IMAGE", IMAGE_COLLECTION:"IMAGE_COLLECTION", TABLE:"TABLE", TYPE_UNSPECIFIED:"TYPE_UNSPECIFIED", values:function() { - return [module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TYPE_UNSPECIFIED, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE_COLLECTION, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TABLE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.FOLDER]; +module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum = {CLASSIFIER:"CLASSIFIER", FOLDER:"FOLDER", IMAGE:"IMAGE", IMAGE_COLLECTION:"IMAGE_COLLECTION", TABLE:"TABLE", TYPE_UNSPECIFIED:"TYPE_UNSPECIFIED", values:function() { + return [module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TYPE_UNSPECIFIED, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.IMAGE_COLLECTION, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.TABLE, module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.FOLDER, + module$exports$eeapiclient$ee_api_client.EarthEngineAssetTypeEnum.CLASSIFIER]; }}; module$exports$eeapiclient$ee_api_client.IEarthEngineMapFileFormatEnum = function module$contents$eeapiclient$ee_api_client_IEarthEngineMapFileFormatEnum() { }; @@ -8446,6 +8814,25 @@ $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client. $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.Capabilities, {Capabilities:{configurable:!0, enumerable:!0, get:function() { return module$exports$eeapiclient$ee_api_client.CapabilitiesCapabilitiesEnum; }}}); +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptionsParameters = function module$contents$eeapiclient$ee_api_client_ClassifierAssetExportOptionsParameters() { +}; +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); + this.Serializable$set("earthEngineDestination", null == parameters.earthEngineDestination ? null : parameters.earthEngineDestination); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions; +}; +module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype.getPartialClassMetadata = function() { + return {keys:["earthEngineDestination"], objects:{earthEngineDestination:module$exports$eeapiclient$ee_api_client.EarthEngineDestination}}; +}; +$jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions.prototype, {earthEngineDestination:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("earthEngineDestination") ? this.Serializable$get("earthEngineDestination") : null; +}, set:function(value) { + this.Serializable$set("earthEngineDestination", value); +}}}); module$exports$eeapiclient$ee_api_client.CloudAuditOptionsParameters = function module$contents$eeapiclient$ee_api_client_CloudAuditOptionsParameters() { }; module$exports$eeapiclient$ee_api_client.CloudAuditOptions = function(parameters) { @@ -9120,6 +9507,50 @@ module$exports$eeapiclient$ee_api_client.Empty.prototype.getConstructor = functi module$exports$eeapiclient$ee_api_client.Empty.prototype.getPartialClassMetadata = function() { return {keys:[]}; }; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequestParameters = function module$contents$eeapiclient$ee_api_client_ExportClassifierRequestParameters() { +}; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); + this.Serializable$set("expression", null == parameters.expression ? null : parameters.expression); + this.Serializable$set("description", null == parameters.description ? null : parameters.description); + this.Serializable$set("requestId", null == parameters.requestId ? null : parameters.requestId); + this.Serializable$set("assetExportOptions", null == parameters.assetExportOptions ? null : parameters.assetExportOptions); + this.Serializable$set("maxWorkers", null == parameters.maxWorkers ? null : parameters.maxWorkers); + this.Serializable$set("maxWorkerCount", null == parameters.maxWorkerCount ? null : parameters.maxWorkerCount); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.ExportClassifierRequest, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.ExportClassifierRequest; +}; +module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype.getPartialClassMetadata = function() { + return {keys:"assetExportOptions description expression maxWorkerCount maxWorkers requestId".split(" "), objects:{assetExportOptions:module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions, expression:module$exports$eeapiclient$ee_api_client.Expression}}; +}; +$jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client.ExportClassifierRequest.prototype, {assetExportOptions:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("assetExportOptions") ? this.Serializable$get("assetExportOptions") : null; +}, set:function(value) { + this.Serializable$set("assetExportOptions", value); +}}, description:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("description") ? this.Serializable$get("description") : null; +}, set:function(value) { + this.Serializable$set("description", value); +}}, expression:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("expression") ? this.Serializable$get("expression") : null; +}, set:function(value) { + this.Serializable$set("expression", value); +}}, maxWorkerCount:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("maxWorkerCount") ? this.Serializable$get("maxWorkerCount") : null; +}, set:function(value) { + this.Serializable$set("maxWorkerCount", value); +}}, maxWorkers:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("maxWorkers") ? this.Serializable$get("maxWorkers") : null; +}, set:function(value) { + this.Serializable$set("maxWorkers", value); +}}, requestId:{configurable:!0, enumerable:!0, get:function() { + return this.Serializable$has("requestId") ? this.Serializable$get("requestId") : null; +}, set:function(value) { + this.Serializable$set("requestId", value); +}}}); module$exports$eeapiclient$ee_api_client.ExportImageRequestParameters = function module$contents$eeapiclient$ee_api_client_ExportImageRequestParameters() { }; module$exports$eeapiclient$ee_api_client.ExportImageRequest = function(parameters) { @@ -9736,6 +10167,19 @@ $jscomp.global.Object.defineProperties(module$exports$eeapiclient$ee_api_client. }, set:function(value) { this.Serializable$set("options", value); }}}); +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequestParameters = function module$contents$eeapiclient$ee_api_client_GetLinkedAssetRequestParameters() { +}; +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest = function(parameters) { + parameters = void 0 === parameters ? {} : parameters; + module$exports$eeapiclient$domain_object.Serializable.call(this); +}; +$jscomp.inherits(module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest, module$exports$eeapiclient$domain_object.Serializable); +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest.prototype.getConstructor = function() { + return module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest; +}; +module$exports$eeapiclient$ee_api_client.GetLinkedAssetRequest.prototype.getPartialClassMetadata = function() { + return {keys:[]}; +}; module$exports$eeapiclient$ee_api_client.GetPixelsRequestParameters = function module$contents$eeapiclient$ee_api_client_GetPixelsRequestParameters() { }; module$exports$eeapiclient$ee_api_client.GetPixelsRequest = function(parameters) { @@ -11882,6 +12326,12 @@ module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.g this.$apiClient.$validateParameter(resource, /^projects\/[^/]+\/assets\/.*$/); return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.assets.getIamPolicy", path:"/" + this.gapiVersion + "/" + resource + ":getIamPolicy", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.Policy}); }; +module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.getLinked = function(name, $requestBody, namedParameters, passthroughNamedParameters) { + namedParameters = void 0 === namedParameters ? {} : namedParameters; + passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; + this.$apiClient.$validateParameter(name, /^projects\/[^/]+\/assets\/.*$/); + return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.assets.getLinked", path:"/" + this.gapiVersion + "/" + name + ":getLinked", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.EarthEngineAsset}); +}; module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.getPixels = function(name, $requestBody, namedParameters, passthroughNamedParameters) { namedParameters = void 0 === namedParameters ? {} : namedParameters; passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; @@ -11938,6 +12388,28 @@ module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl.prototype.t }; module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClient = function() { }; +module$exports$eeapiclient$ee_api_client.IProjectsClassifierApiClient$XgafvEnum = function module$contents$eeapiclient$ee_api_client_IProjectsClassifierApiClient$XgafvEnum() { +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum = {1:"1", 2:"2", values:function() { + return [module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum[1], module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient$XgafvEnum[2]]; +}}; +module$exports$eeapiclient$ee_api_client.IProjectsClassifierApiClientAltEnum = function module$contents$eeapiclient$ee_api_client_IProjectsClassifierApiClientAltEnum() { +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum = {JSON:"json", MEDIA:"media", PROTO:"proto", values:function() { + return [module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.JSON, module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.MEDIA, module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientAltEnum.PROTO]; +}}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl = function(gapiVersion, gapiRequestService, apiClientHookFactory) { + this.gapiVersion = gapiVersion; + this.$apiClient = new module$exports$eeapiclient$promise_api_client.PromiseApiClient(gapiRequestService, void 0 === apiClientHookFactory ? null : apiClientHookFactory); +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl.prototype.export = function(project, $requestBody, namedParameters, passthroughNamedParameters) { + namedParameters = void 0 === namedParameters ? {} : namedParameters; + passthroughNamedParameters = void 0 === passthroughNamedParameters ? {} : passthroughNamedParameters; + this.$apiClient.$validateParameter(project, /^projects\/[^/]+$/); + return this.$apiClient.$request({body:$requestBody, httpMethod:"POST", methodId:"earthengine.projects.classifier.export", path:"/" + this.gapiVersion + "/" + project + "/classifier:export", queryParams:module$contents$eeapiclient$request_params_buildQueryParams(namedParameters, module$contents$eeapiclient$ee_api_client_PARAM_MAP_0, passthroughNamedParameters), responseCtor:module$exports$eeapiclient$ee_api_client.Operation}); +}; +module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClient = function() { +}; module$exports$eeapiclient$ee_api_client.IProjectsFilmstripThumbnailsApiClient$XgafvEnum = function module$contents$eeapiclient$ee_api_client_IProjectsFilmstripThumbnailsApiClient$XgafvEnum() { }; module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClient$XgafvEnum = {1:"1", 2:"2", values:function() { @@ -12451,9 +12923,8 @@ module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl.pr module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClient = function() { }; ee.api = module$exports$eeapiclient$ee_api_client; -ee.apiVersion = {}; -ee.apiVersion.V1ALPHA = "v1alpha"; -ee.apiVersion.VERSION = "v1alpha"; +var module$exports$ee$apiVersion = {V1ALPHA:"v1alpha"}; +module$exports$ee$apiVersion.VERSION = module$exports$ee$apiVersion.V1ALPHA; var module$exports$eeapiclient$promise_request_service = {}, module$contents$eeapiclient$promise_request_service_module = module$contents$eeapiclient$promise_request_service_module || {id:"javascript/typescript/contrib/apiclient/request_service/promise_request_service.closure.js"}; module$exports$eeapiclient$promise_request_service.PromiseRequestService = function() { }; @@ -12720,7 +13191,7 @@ goog.dom.getElementByTagNameAndClass_ = function(doc, opt_tag, opt_class, opt_el }; goog.dom.$$ = goog.dom.getElementsByTagNameAndClass; goog.dom.setProperties = function(element, properties) { - goog.object.forEach(properties, function(val, key) { + module$contents$goog$object_forEach(properties, function(val, key) { val && "object" == typeof val && val.implementsGoogStringTypedString && (val = val.getTypedStringValue()); "style" == key ? element.style.cssText = val : "class" == key ? element.className = val : "for" == key ? element.htmlFor = val : goog.dom.DIRECT_ATTRIBUTE_MAP_.hasOwnProperty(key) ? element.setAttribute(goog.dom.DIRECT_ATTRIBUTE_MAP_[key], val) : goog.string.startsWith(key, "aria-") || goog.string.startsWith(key, "data-") ? element.setAttribute(key, val) : element[key] = val; }); @@ -12790,7 +13261,7 @@ goog.dom.createDom_ = function(doc, args) { if (attributes.type) { tagNameArr.push(' type="', goog.string.htmlEscape(attributes.type), '"'); var clone = {}; - goog.object.extend(clone, attributes); + module$contents$goog$object_extend(clone, attributes); delete clone.type; attributes = clone; } @@ -12838,7 +13309,7 @@ goog.dom.createTable_ = function(doc, rows, columns, fillWithNbsp) { return table; }; goog.dom.constHtmlToNode = function(var_args) { - var stringArray = module$contents$goog$array_map(arguments, goog.string.Const.unwrap), safeHtml = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), stringArray.join("")); + var stringArray = Array.prototype.map.call(arguments, goog.string.Const.unwrap), safeHtml = goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("Constant HTML string, that gets turned into a Node later, so it will be automatically balanced."), stringArray.join("")); return goog.dom.safeHtmlToNode(safeHtml); }; goog.dom.safeHtmlToNode = function(html) { @@ -13823,16 +14294,16 @@ goog.Promise.prototype.addChildPromise_ = function(onFulfilled, onRejected, opt_ try { var result = onFulfilled.call(opt_context, value); resolve(result); - } catch (err$24) { - reject(err$24); + } catch (err$33) { + reject(err$33); } } : resolve; callbackEntry.onRejected = onRejected ? function(reason) { try { var result = onRejected.call(opt_context, reason); void 0 === result && reason instanceof goog.Promise.CancellationError ? reject(reason) : resolve(result); - } catch (err$25) { - reject(err$25); + } catch (err$34) { + reject(err$34); } } : reject; }); @@ -13922,8 +14393,8 @@ goog.Promise.prototype.executeCallback_ = function(callbackEntry, state, result) } else { try { callbackEntry.always ? callbackEntry.onFulfilled.call(callbackEntry.context) : goog.Promise.invokeCallback_(callbackEntry, state, result); - } catch (err$26) { - goog.Promise.handleRejection_.call(null, err$26); + } catch (err$35) { + goog.Promise.handleRejection_.call(null, err$35); } } goog.Promise.returnEntry_(callbackEntry); @@ -14204,7 +14675,7 @@ goog.async.Deferred.prototype.addCallbacks = function(cb, eb, opt_scope) { return this; }; goog.async.Deferred.prototype.then = function(opt_onFulfilled, opt_onRejected, opt_context) { - var resolve, reject, promise = new goog.Promise(function(res, rej) { + var reject, resolve, promise = new goog.Promise(function(res, rej) { resolve = res; reject = rej; }); @@ -14364,7 +14835,7 @@ goog.net.jsloader.safeLoadMany = function(trustedUris, opt_options) { return goog.net.jsloader.scriptLoadingDeferred_; }; goog.net.jsloader.safeLoad = function(trustedUri, opt_options) { - var options = opt_options || {}, doc = options.document || document, uri = goog.html.TrustedResourceUrl.unwrap(trustedUri), script = goog.dom.createElement(goog.dom.TagName.SCRIPT), request = {script_:script, timeout_:void 0}, deferred = new goog.async.Deferred(goog.net.jsloader.cancel_, request), timeout = null, timeoutDuration = null != options.timeout ? options.timeout : goog.net.jsloader.DEFAULT_TIMEOUT; + var options = opt_options || {}, doc = options.document || document, uri = goog.html.TrustedResourceUrl.unwrap(trustedUri), script = (new goog.dom.DomHelper(doc)).createElement(goog.dom.TagName.SCRIPT), request = {script_:script, timeout_:void 0}, deferred = new goog.async.Deferred(goog.net.jsloader.cancel_, request), timeout = null, timeoutDuration = null != options.timeout ? options.timeout : goog.net.jsloader.DEFAULT_TIMEOUT; 0 < timeoutDuration && (timeout = window.setTimeout(function() { goog.net.jsloader.cleanup_(script, !0); deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.TIMEOUT, "Timeout reached for loading script " + uri)); @@ -14377,7 +14848,7 @@ goog.net.jsloader.safeLoad = function(trustedUri, opt_options) { deferred.errback(new goog.net.jsloader.Error(goog.net.jsloader.ErrorCode.LOAD_ERROR, "Error while loading script " + uri)); }; var properties = options.attributes || {}; - goog.object.extend(properties, {type:"text/javascript", charset:"UTF-8"}); + module$contents$goog$object_extend(properties, {type:"text/javascript", charset:"UTF-8"}); goog.dom.setProperties(script, properties); goog.dom.safe.setScriptSrc(script, trustedUri); goog.net.jsloader.getScriptParentElement_(doc).appendChild(script); @@ -14451,7 +14922,7 @@ goog.json.parse = goog.json.USE_NATIVE_JSON ? goog.global.JSON.parse : function( var result = eval("(" + o + ")"); error && goog.json.errorLogger_("Invalid JSON: " + o, error); return result; - } catch (ex$27) { + } catch (ex$36) { } } throw Error("Invalid JSON string: " + o); @@ -14731,10 +15202,10 @@ third_party$javascript$closure$log$log$classdecl$var4.prototype.publish = functi }), target = target.parent; } }; -goog.log.LogRegistryEntry = third_party$javascript$closure$log$log$classdecl$var4; +goog.log.LogRegistryEntry_ = third_party$javascript$closure$log$log$classdecl$var4; var third_party$javascript$closure$log$log$classdecl$var5 = function() { this.entries = {}; - var rootLogRegistryEntry = new goog.log.LogRegistryEntry(goog.log.ROOT_LOGGER_NAME); + var rootLogRegistryEntry = new goog.log.LogRegistryEntry_(goog.log.ROOT_LOGGER_NAME); rootLogRegistryEntry.level = goog.log.Level.CONFIG; this.entries[goog.log.ROOT_LOGGER_NAME] = rootLogRegistryEntry; }; @@ -14743,7 +15214,7 @@ third_party$javascript$closure$log$log$classdecl$var5.prototype.getLogRegistryEn if (entry) { return void 0 !== level && (entry.level = level), entry; } - var lastDotIndex = name.lastIndexOf("."), parentLogRegistryEntry = this.getLogRegistryEntry(name.substr(0, lastDotIndex)), logRegistryEntry = new goog.log.LogRegistryEntry(name, parentLogRegistryEntry); + var lastDotIndex = name.lastIndexOf("."), parentLogRegistryEntry = this.getLogRegistryEntry(name.substr(0, lastDotIndex)), logRegistryEntry = new goog.log.LogRegistryEntry_(name, parentLogRegistryEntry); this.entries[name] = logRegistryEntry; parentLogRegistryEntry.children.push(logRegistryEntry); void 0 !== level && (logRegistryEntry.level = level); @@ -14755,23 +15226,23 @@ third_party$javascript$closure$log$log$classdecl$var5.prototype.getAllLoggers = return $jscomp$this.entries[loggerName].logger; }); }; -goog.log.LogRegistry = third_party$javascript$closure$log$log$classdecl$var5; -goog.log.LogRegistry.getInstance = function() { - goog.log.LogRegistry.instance_ || (goog.log.LogRegistry.instance_ = new goog.log.LogRegistry); - return goog.log.LogRegistry.instance_; +goog.log.LogRegistry_ = third_party$javascript$closure$log$log$classdecl$var5; +goog.log.LogRegistry_.getInstance = function() { + goog.log.LogRegistry_.instance_ || (goog.log.LogRegistry_.instance_ = new goog.log.LogRegistry_); + return goog.log.LogRegistry_.instance_; }; goog.log.getLogger = function(name, level) { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(name, level).logger : null; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(name, level).logger : null; }; goog.log.getRootLogger = function() { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger : null; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(goog.log.ROOT_LOGGER_NAME).logger : null; }; goog.log.addHandler = function(logger, handler) { - goog.log.ENABLED && logger && goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler); + goog.log.ENABLED && logger && goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).handlers.push(handler); }; goog.log.removeHandler = function(logger, handler) { if (goog.log.ENABLED && logger) { - var loggerEntry = goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()), indexOfHandler = loggerEntry.handlers.indexOf(handler); + var loggerEntry = goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()), indexOfHandler = loggerEntry.handlers.indexOf(handler); if (-1 !== indexOfHandler) { return loggerEntry.handlers.splice(indexOfHandler, 1), !0; } @@ -14779,19 +15250,19 @@ goog.log.removeHandler = function(logger, handler) { return !1; }; goog.log.setLevel = function(logger, level) { - goog.log.ENABLED && logger && (goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).level = level); + goog.log.ENABLED && logger && (goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level = level); }; goog.log.getLevel = function(logger) { - return goog.log.ENABLED && logger ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).level : null; + return goog.log.ENABLED && logger ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).level : null; }; goog.log.getEffectiveLevel = function(logger) { - return goog.log.ENABLED && logger ? goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel() : goog.log.Level.OFF; + return goog.log.ENABLED && logger ? goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).getEffectiveLevel() : goog.log.Level.OFF; }; goog.log.isLoggable = function(logger, level) { return goog.log.ENABLED && logger && level ? level.value >= goog.log.getEffectiveLevel(logger).value : !1; }; goog.log.getAllLoggers = function() { - return goog.log.ENABLED ? goog.log.LogRegistry.getInstance().getAllLoggers() : []; + return goog.log.ENABLED ? goog.log.LogRegistry_.getInstance().getAllLoggers() : []; }; goog.log.getLogRecord = function(logger, level, msg, exception) { var logRecord = goog.log.LogBuffer.getInstance().addRecord(level || goog.log.Level.OFF, msg, logger.getName()); @@ -14799,12 +15270,12 @@ goog.log.getLogRecord = function(logger, level, msg, exception) { return logRecord; }; goog.log.publishLogRecord = function(logger, logRecord) { - goog.log.ENABLED && logger && goog.log.isLoggable(logger, logRecord.getLevel()) && goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord); + goog.log.ENABLED && logger && goog.log.isLoggable(logger, logRecord.getLevel()) && goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()).publish(logRecord); }; goog.log.log = function(logger, level, msg, exception) { if (goog.log.ENABLED && logger && goog.log.isLoggable(logger, level)) { level = level || goog.log.Level.OFF; - var loggerEntry = goog.log.LogRegistry.getInstance().getLogRegistryEntry(logger.getName()); + var loggerEntry = goog.log.LogRegistry_.getInstance().getLogRegistryEntry(logger.getName()); "function" === typeof msg && (msg = msg()); var logRecord = goog.log.LogBuffer.getInstance().addRecord(level, msg, logger.getName()); exception && logRecord.setException(exception); @@ -15042,9 +15513,9 @@ goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_heade }, this), this.xhr_.upload && (this.xhr_.upload.onprogress = goog.bind(this.onProgressHandler_, this))); try { goog.log.fine(this.logger_, this.formatMsg_("Opening Xhr")), this.inOpen_ = !0, this.xhr_.open(method, String(url), !0), this.inOpen_ = !1; - } catch (err$28) { - goog.log.fine(this.logger_, this.formatMsg_("Error opening Xhr: " + err$28.message)); - this.error_(goog.net.ErrorCode.EXCEPTION, err$28); + } catch (err$37) { + goog.log.fine(this.logger_, this.formatMsg_("Error opening Xhr: " + err$37.message)); + this.error_(goog.net.ErrorCode.EXCEPTION, err$37); return; } var content = opt_content || "", headers = this.headers.clone(); @@ -15061,15 +15532,15 @@ goog.net.XhrIo.prototype.send = function(url, opt_method, opt_content, opt_heade if ("setTrustToken" in this.xhr_ && this.trustToken_) { try { this.xhr_.setTrustToken(this.trustToken_); - } catch (err$29) { - goog.log.fine(this.logger_, this.formatMsg_("Error SetTrustToken: " + err$29.message)); + } catch (err$38) { + goog.log.fine(this.logger_, this.formatMsg_("Error SetTrustToken: " + err$38.message)); } } try { this.cleanUpTimeoutTimer_(), 0 < this.timeoutInterval_ && (this.useXhr2Timeout_ = goog.net.XhrIo.shouldUseXhr2Timeout_(this.xhr_), goog.log.fine(this.logger_, this.formatMsg_("Will abort after " + this.timeoutInterval_ + "ms if incomplete, xhr2 " + this.useXhr2Timeout_)), this.useXhr2Timeout_ ? (this.xhr_[goog.net.XhrIo.XHR2_TIMEOUT_] = this.timeoutInterval_, this.xhr_[goog.net.XhrIo.XHR2_ON_TIMEOUT_] = goog.bind(this.timeout_, this)) : this.timeoutId_ = goog.Timer.callOnce(this.timeout_, this.timeoutInterval_, this)), goog.log.fine(this.logger_, this.formatMsg_("Sending request")), this.inSend_ = !0, this.xhr_.send(content), this.inSend_ = !1; - } catch (err$30) { - goog.log.fine(this.logger_, this.formatMsg_("Send error: " + err$30.message)), this.error_(goog.net.ErrorCode.EXCEPTION, err$30); + } catch (err$39) { + goog.log.fine(this.logger_, this.formatMsg_("Send error: " + err$39.message)), this.error_(goog.net.ErrorCode.EXCEPTION, err$39); } }; goog.net.XhrIo.shouldUseXhr2Timeout_ = function(xhr) { @@ -15269,7 +15740,7 @@ goog.net.XhrIo.prototype.getResponseHeaders = function() { } } } - return goog.object.map(headersObject, function(values) { + return module$contents$goog$object_map(headersObject, function(values) { return values.join(", "); }); }; @@ -15293,8 +15764,8 @@ goog.debug.entryPointRegistry.register(function(transformer) { }); ee.apiclient = {}; var module$contents$ee$apiclient_apiclient = {}; -ee.apiclient.VERSION = "v1alpha"; -ee.apiclient.API_CLIENT_VERSION = "0.1.254"; +ee.apiclient.VERSION = module$exports$ee$apiVersion.V1ALPHA; +ee.apiclient.API_CLIENT_VERSION = "0.1.270"; ee.apiclient.NULL_VALUE = module$exports$eeapiclient$domain_object.NULL_VALUE; ee.apiclient.PromiseRequestService = module$exports$eeapiclient$promise_request_service.PromiseRequestService; ee.apiclient.MakeRequestParams = module$contents$eeapiclient$request_params_MakeRequestParams; @@ -15333,49 +15804,52 @@ module$contents$ee$apiclient_Call.prototype.projectsPath = function() { return "projects/" + module$contents$ee$apiclient_apiclient.getProject(); }; module$contents$ee$apiclient_Call.prototype.algorithms = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsAlgorithmsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.projects = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.assets = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsAssetsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.operations = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsOperationsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.value = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsValueApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.maps = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsMapsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.map = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.image = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsImageApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.table = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsTableApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.tables = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsTablesApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.video = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.videoMap = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoMapApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); +}; +module$contents$ee$apiclient_Call.prototype.classifier = function() { + return new module$exports$eeapiclient$ee_api_client.ProjectsClassifierApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.thumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.videoThumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsVideoThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; module$contents$ee$apiclient_Call.prototype.filmstripThumbnails = function() { - return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl("v1alpha", this.requestService); + return new module$exports$eeapiclient$ee_api_client.ProjectsFilmstripThumbnailsApiClientImpl(module$exports$ee$apiVersion.V1ALPHA, this.requestService); }; var module$contents$ee$apiclient_EERequestService = function(sync, retries) { this.sync = sync = void 0 === sync ? !1 : sync; @@ -15387,12 +15861,12 @@ module$contents$ee$apiclient_EERequestService.prototype.send = function(params, module$contents$eeapiclient$request_params_processParams(params); var path = params.path || "", url = module$contents$ee$apiclient_apiclient.getSafeApiUrl() + path, args = module$contents$ee$apiclient_apiclient.makeRequest_(params.queryParams || {}), body = params.body ? JSON.stringify(params.body) : void 0; if (this.sync) { - var raw = module$contents$ee$apiclient_apiclient.send(url, args, void 0, params.httpMethod, body, this.retries), value$31 = responseCtor ? module$contents$eeapiclient$domain_object_deserialize(responseCtor, raw) : raw, thenable = function(v) { + var raw = module$contents$ee$apiclient_apiclient.send(url, args, void 0, params.httpMethod, body, this.retries), value$40 = responseCtor ? module$contents$eeapiclient$domain_object_deserialize(responseCtor, raw) : raw, thenable = function(v) { return {then:function(f) { return thenable(f(v)); }}; }; - return thenable(value$31); + return thenable(value$40); } return (new Promise(function(resolve, reject) { module$contents$ee$apiclient_apiclient.send(url, args, function(value, error) { @@ -15439,7 +15913,7 @@ module$contents$ee$apiclient_BatchRequestService.prototype.send = function(param module$contents$ee$apiclient_BatchRequestService.prototype.makeRequest = function(params) { }; module$contents$ee$apiclient_apiclient.parseBatchReply = function(contentType, responseText, handle) { - for (var boundary = contentType.split("; boundary=")[1], $jscomp$iter$11 = $jscomp.makeIterator(responseText.split("--" + boundary)), $jscomp$key$part = $jscomp$iter$11.next(); !$jscomp$key$part.done; $jscomp$key$part = $jscomp$iter$11.next()) { + for (var boundary = contentType.split("; boundary=")[1], $jscomp$iter$13 = $jscomp.makeIterator(responseText.split("--" + boundary)), $jscomp$key$part = $jscomp$iter$13.next(); !$jscomp$key$part.done; $jscomp$key$part = $jscomp$iter$13.next()) { var groups = $jscomp$key$part.value.split("\r\n\r\n"); if (!(3 > groups.length)) { var id = groups[0].match(/\r\nContent-ID: ]*)>/)[1], status = Number(groups[1].match(/^HTTP\S*\s(\d+)\s/)[1]), text = groups.slice(2).join("\r\n\r\n"); @@ -15464,9 +15938,16 @@ module$contents$ee$apiclient_apiclient.getSafeApiUrl = function() { var url = module$contents$ee$apiclient_apiclient.apiBaseUrl_.replace(/\/api$/, ""); return "window" in goog.global && !url.match(/^https?:\/\/content-/) ? url.replace(/^(https?:\/\/)(.*\.googleapis\.com)$/, "$1content-$2") : url; }; -module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenType, accessToken, expiresIn, extraScopes, callback, updateAuthLibrary) { - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - extraScopes && (module$contents$goog$array_extend(scopes, extraScopes), module$contents$goog$array_removeDuplicates(scopes)); +module$contents$ee$apiclient_apiclient.mergeAuthScopes_ = function(includeDefaultScopes, includeStorageScope, extraScopes) { + var scopes = []; + includeDefaultScopes && (scopes = scopes.concat(module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_)); + includeStorageScope && scopes.push(module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_); + scopes = scopes.concat(extraScopes); + module$contents$goog$array_removeDuplicates(scopes); + return scopes; +}; +module$contents$ee$apiclient_apiclient.setAuthToken = function(clientId, tokenType, accessToken, expiresIn, extraScopes, callback, updateAuthLibrary, suppressDefaultScopes) { + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!suppressDefaultScopes, !1, extraScopes || []); module$contents$ee$apiclient_apiclient.authClientId_ = clientId; module$contents$ee$apiclient_apiclient.authScopes_ = scopes; var tokenObject = {token_type:tokenType, access_token:accessToken, state:scopes.join(" "), expires_in:expiresIn}; @@ -15562,8 +16043,8 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m var profileHookAtCallTime = module$contents$ee$apiclient_apiclient.profileHook_, contentType = "application/x-www-form-urlencoded"; body && (contentType = "application/json", method && method.startsWith("multipart") && (contentType = method, method = "POST")); method = method || "POST"; - var headers = {"Content-Type":contentType, }, version = "0.1.254"; - "0.1.254" === version && (version = "latest"); + var headers = {"Content-Type":contentType, }, version = "0.1.270"; + "0.1.270" === version && (version = "latest"); headers[module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER] = "ee-js/" + version; var authToken = module$contents$ee$apiclient_apiclient.getAuthToken(); if (null != authToken) { @@ -15595,7 +16076,7 @@ module$contents$ee$apiclient_apiclient.send = function(path, params, callback, m }, xmlHttp, retryCount = 0, maxRetries = null != retries ? retries : module$contents$ee$apiclient_apiclient.MAX_SYNC_RETRIES_;;) { xmlHttp = (0,goog.net.XmlHttp)(); xmlHttp.open(method, url, !1); - goog.object.forEach(headers, setRequestHeader, xmlHttp); + module$contents$goog$object_forEach(headers, setRequestHeader, xmlHttp); xmlHttp.send(requestData); if (429 != xmlHttp.status || retryCount > maxRetries) { break; @@ -15713,7 +16194,7 @@ module$contents$ee$apiclient_apiclient.handleAuthResult_ = function(success, err } }; module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { - for (var request = new goog.Uri.QueryData, $jscomp$iter$12 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$12.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$12.next()) { + for (var request = new goog.Uri.QueryData, $jscomp$iter$14 = $jscomp.makeIterator(Object.entries(params)), $jscomp$key$ = $jscomp$iter$14.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$14.next()) { var $jscomp$destructuring$var11 = $jscomp.makeIterator($jscomp$key$.value), name = $jscomp$destructuring$var11.next().value, item = $jscomp$destructuring$var11.next().value; request.set(name, item); } @@ -15721,7 +16202,7 @@ module$contents$ee$apiclient_apiclient.makeRequest_ = function(params) { }; module$contents$ee$apiclient_apiclient.setupMockSend = function(calls) { function getResponse(url, method, data) { - url = url.replace(apiBaseUrl, "").replace("v1alpha/projects/" + module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_ + "/", ""); + url = url.replace(apiBaseUrl, "").replace(module$exports$ee$apiVersion.V1ALPHA + "/projects/" + module$contents$ee$apiclient_apiclient.DEFAULT_PROJECT_ + "/", ""); if (url in calls) { var response = calls[url]; } else { @@ -15737,7 +16218,7 @@ module$contents$ee$apiclient_apiclient.setupMockSend = function(calls) { } return response; } - calls = calls ? goog.object.clone(calls) : {}; + calls = calls ? module$contents$goog$object_clone(calls) : {}; var apiBaseUrl; goog.net.XhrIo.send = function(url, callback, method, data) { apiBaseUrl = apiBaseUrl || module$contents$ee$apiclient_apiclient.apiBaseUrl_; @@ -15810,7 +16291,9 @@ module$contents$ee$apiclient_apiclient.authClientId_ = null; module$contents$ee$apiclient_apiclient.authScopes_ = []; module$contents$ee$apiclient_apiclient.authTokenRefresher_ = null; module$contents$ee$apiclient_apiclient.AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine"; +module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_ = "https://www.googleapis.com/auth/earthengine.readonly"; module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_ = "https://www.googleapis.com/auth/cloud-platform"; +module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_ = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; module$contents$ee$apiclient_apiclient.AUTH_LIBRARY_URL_ = goog.string.Const.from("https://apis.google.com/js/client.js?onload=%{onload}"); module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_ = "https://www.googleapis.com/auth/devstorage.read_write"; module$contents$ee$apiclient_apiclient.cloudApiKey_ = null; @@ -15844,8 +16327,10 @@ ee.apiclient.PROFILE_REQUEST_HEADER = module$contents$ee$apiclient_apiclient.PRO ee.apiclient.API_CLIENT_VERSION_HEADER = module$contents$ee$apiclient_apiclient.API_CLIENT_VERSION_HEADER; ee.apiclient.send = module$contents$ee$apiclient_apiclient.send; ee.apiclient.AUTH_SCOPE = module$contents$ee$apiclient_apiclient.AUTH_SCOPE_; +ee.apiclient.READ_ONLY_AUTH_SCOPE = module$contents$ee$apiclient_apiclient.READ_ONLY_AUTH_SCOPE_; ee.apiclient.CLOUD_PLATFORM_SCOPE = module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_; ee.apiclient.STORAGE_SCOPE = module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_; +ee.apiclient.DEFAULT_AUTH_SCOPES = module$contents$ee$apiclient_apiclient.DEFAULT_AUTH_SCOPES_; ee.apiclient.makeRequest = module$contents$ee$apiclient_apiclient.makeRequest_; ee.apiclient.reset = module$contents$ee$apiclient_apiclient.reset; ee.apiclient.initialize = module$contents$ee$apiclient_apiclient.initialize; @@ -15862,6 +16347,7 @@ ee.apiclient.setAuthToken = module$contents$ee$apiclient_apiclient.setAuthToken; ee.apiclient.clearAuthToken = module$contents$ee$apiclient_apiclient.clearAuthToken; ee.apiclient.setAuthTokenRefresher = module$contents$ee$apiclient_apiclient.setAuthTokenRefresher; ee.apiclient.setAppIdToken = module$contents$ee$apiclient_apiclient.setAppIdToken; +ee.apiclient.mergeAuthScopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_; ee.apiclient.setupMockSend = module$contents$ee$apiclient_apiclient.setupMockSend; ee.apiclient.setParamAugmenter = module$contents$ee$apiclient_apiclient.setParamAugmenter; ee.apiclient.withProfiling = module$contents$ee$apiclient_apiclient.withProfiling; @@ -16058,7 +16544,7 @@ ee.rpc_convert.algorithms = function(result) { algorithm.deprecated && (internalAlgorithm.deprecated = algorithm.deprecationReason); algorithm.sourceCodeUri && (internalAlgorithm.sourceCodeUri = algorithm.sourceCodeUri); return internalAlgorithm; - }, internalAlgorithms = {}, $jscomp$iter$13 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$13.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$13.next()) { + }, internalAlgorithms = {}, $jscomp$iter$15 = $jscomp.makeIterator(result.algorithms || []), $jscomp$key$algorithm = $jscomp$iter$15.next(); !$jscomp$key$algorithm.done; $jscomp$key$algorithm = $jscomp$iter$15.next()) { var algorithm$jscomp$0 = $jscomp$key$algorithm.value, name = algorithm$jscomp$0.name.replace(/^algorithms\//, ""); internalAlgorithms[name] = convertAlgorithm(algorithm$jscomp$0); } @@ -16113,6 +16599,8 @@ ee.rpc_convert.assetTypeToLegacyAssetType = function(type) { return "ImageCollection"; case "TABLE": return "Table"; + case "CLASSIFIER": + return "Classifier"; default: return "Unknown"; } @@ -16165,17 +16653,25 @@ ee.rpc_convert.assetToLegacyResult = function(result) { ee.rpc_convert.legacyPropertiesToAssetUpdate = function(legacyProperties) { var asset = new module$exports$eeapiclient$ee_api_client.EarthEngineAsset, toTimestamp = function(msec) { return (new Date(Number(msec))).toISOString(); - }, properties = Object.assign({}, legacyProperties), value, extractValue = function(key) { - value = properties[key]; + }, asNull = function(value) { + return null === value ? module$exports$eeapiclient$domain_object.NULL_VALUE : void 0; + }, properties = Object.assign({}, legacyProperties), value$jscomp$0, extractValue = function(key) { + value$jscomp$0 = properties[key]; delete properties[key]; - return value; + return value$jscomp$0; }; - extractValue("system:asset_size") && (asset.sizeBytes = String(value)); - extractValue("system:time_start") && (asset.startTime = toTimestamp(value)); - extractValue("system:time_end") && (asset.endTime = toTimestamp(value)); - extractValue("system:footprint") && (asset.geometry = value); - "string" === typeof extractValue("system:title") && null == properties.title && (properties.title = value); - "string" === typeof extractValue("system:description") && null == properties.description && (properties.description = value); + void 0 !== extractValue("system:asset_size") && (asset.sizeBytes = asNull(value$jscomp$0) || String(value$jscomp$0)); + void 0 !== extractValue("system:time_start") && (asset.startTime = asNull(value$jscomp$0) || toTimestamp(value$jscomp$0)); + void 0 !== extractValue("system:time_end") && (asset.endTime = asNull(value$jscomp$0) || toTimestamp(value$jscomp$0)); + void 0 !== extractValue("system:footprint") && (asset.geometry = asNull(value$jscomp$0) || value$jscomp$0); + extractValue("system:title"); + "string" !== typeof value$jscomp$0 && null !== value$jscomp$0 || null != properties.title || (properties.title = asNull(value$jscomp$0) || value$jscomp$0); + extractValue("system:description"); + "string" !== typeof value$jscomp$0 && null !== value$jscomp$0 || null != properties.description || (properties.description = asNull(value$jscomp$0) || value$jscomp$0); + Object.entries(properties).forEach(function($jscomp$destructuring$var12) { + var $jscomp$destructuring$var13 = $jscomp.makeIterator($jscomp$destructuring$var12), key = $jscomp$destructuring$var13.next().value, value = $jscomp$destructuring$var13.next().value; + properties[key] = asNull(value) || value; + }); asset.properties = properties; return asset; }; @@ -16198,9 +16694,9 @@ ee.rpc_convert.getListToListImages = function(param) { param.bbox && (imagesRequest.region = ee.rpc_convert.boundingBoxToGeoJson(param.bbox)); param.region && (imagesRequest.region = param.region); param.bbox && param.region && console.warn("Multiple request parameters converted to region"); - for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$14 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { + for (var allKeys = "id num starttime endtime bbox region".split(" "), $jscomp$iter$16 = $jscomp.makeIterator(Object.keys(param).filter(function(k) { return !allKeys.includes(k); - })), $jscomp$key$key = $jscomp$iter$14.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$14.next()) { + })), $jscomp$key$key = $jscomp$iter$16.next(); !$jscomp$key$key.done; $jscomp$key$key = $jscomp$iter$16.next()) { console.warn("Unrecognized key " + $jscomp$key$key.value + " ignored"); } imagesRequest.fields = "assets(type,path)"; @@ -16662,12 +17158,12 @@ ee.Serializer.prototype.encodeValue_ = function(object) { }, this); } else { if (goog.isObject(object) && "function" !== typeof object) { - var encodedObject = goog.object.map(object, function(element) { + var encodedObject = module$contents$goog$object_map(object, function(element) { if ("function" !== typeof element) { return this.encodeValue_(element); } }, this); - goog.object.remove(encodedObject, this.HASH_KEY); + module$contents$goog$object_remove(encodedObject, this.HASH_KEY); result = {type:"Dictionary", value:encodedObject}; } else { throw Error("Can't encode object: " + object); @@ -16704,10 +17200,10 @@ ee.Serializer.encodeCloudApiPretty = function(obj) { if (!goog.isObject(object)) { return object; } - for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$15 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$15.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$15.next()) { - var $jscomp$destructuring$var13 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var13.next().value, val = $jscomp$destructuring$var13.next().value; - isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:goog.object.map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? null : val : walkObject(val)) : - ret[key] = walkObject(val); + for (var ret = Array.isArray(object) ? [] : {}, isNode = object instanceof Object.getPrototypeOf(module$exports$eeapiclient$ee_api_client.ValueNode), $jscomp$iter$17 = $jscomp.makeIterator(Object.entries(isNode ? object.Serializable$values : object)), $jscomp$key$ = $jscomp$iter$17.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$17.next()) { + var $jscomp$destructuring$var15 = $jscomp.makeIterator($jscomp$key$.value), key = $jscomp$destructuring$var15.next().value, val = $jscomp$destructuring$var15.next().value; + isNode ? null !== val && (ret[key] = "functionDefinitionValue" === key && null != val.body ? {argumentNames:val.argumentNames, body:walkObject(values[val.body])} : "functionInvocationValue" === key && null != val.functionReference ? {arguments:module$contents$goog$object_map(val.arguments, walkObject), functionReference:walkObject(values[val.functionReference])} : "constantValue" === key ? val === module$exports$eeapiclient$domain_object.NULL_VALUE ? + null : val : walkObject(val)) : ret[key] = walkObject(val); } return ret; }; @@ -16816,8 +17312,8 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { })) : ee.rpc_node.array(arr); } if (null != value.dictionaryValue) { - for (var values = {}, constantValues = {}, $jscomp$iter$16 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$16.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$16.next()) { - var $jscomp$destructuring$var15 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var15.next().value, v$jscomp$0 = $jscomp$destructuring$var15.next().value; + for (var values = {}, constantValues = {}, $jscomp$iter$18 = $jscomp.makeIterator(Object.entries(value.dictionaryValue.values || {})), $jscomp$key$ = $jscomp$iter$18.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$18.next()) { + var $jscomp$destructuring$var17 = $jscomp.makeIterator($jscomp$key$.value), k = $jscomp$destructuring$var17.next().value, v$jscomp$0 = $jscomp$destructuring$var17.next().value; values[k] = this.optimizeValue(v$jscomp$0, depth + 3); null !== constantValues && isConst(values[k]) ? constantValues[k] = serializeConst(values[k].constantValue) : constantValues = null; } @@ -16828,9 +17324,9 @@ ExpressionOptimizer.prototype.optimizeValue = function(value, depth) { return ee.rpc_node.functionDefinition(def.argumentNames || [], this.optimizeReference(def.body || "")); } if (null != value.functionInvocationValue) { - for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$17 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$17.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$17.next()) { - var k$32 = $jscomp$key$k.value; - args[k$32] = this.optimizeValue(inv.arguments[k$32], depth + 3); + for (var inv = value.functionInvocationValue, args = {}, $jscomp$iter$19 = $jscomp.makeIterator(Object.keys(inv.arguments || {})), $jscomp$key$k = $jscomp$iter$19.next(); !$jscomp$key$k.done; $jscomp$key$k = $jscomp$iter$19.next()) { + var k$41 = $jscomp$key$k.value; + args[k$41] = this.optimizeValue(inv.arguments[k$41], depth + 3); } return inv.functionName ? ee.rpc_node.functionByName(inv.functionName, args) : ee.rpc_node.functionByReference(this.optimizeReference(inv.functionReference || ""), args); } @@ -16859,3763 +17355,217 @@ ExpressionOptimizer.prototype.countReferences = function() { Object.values(inv.arguments).forEach(visitValue); } else { null != value.valueReference && visitReference(value.valueReference); - } - } - } - } - }; - visitReference(this.rootReference); - return counts; -}; -ee.rpc_convert_batch = {}; -ee.rpc_convert_batch.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; -ee.rpc_convert_batch.taskToExportImageRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var result = new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, grid:null, maxPixels:stringOrNull_(params.maxPixels), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); - switch(destination) { - case ee.rpc_convert_batch.ExportDestination.GCS: - case ee.rpc_convert_batch.ExportDestination.DRIVE: - result.fileExportOptions = ee.rpc_convert_batch.buildImageFileExportOptions_(params, destination); - break; - case ee.rpc_convert_batch.ExportDestination.ASSET: - result.assetExportOptions = ee.rpc_convert_batch.buildImageAssetExportOptions_(params); - break; - default: - throw Error('Export destination "' + destination + '" unknown'); - } - return result; -}; -ee.rpc_convert_batch.taskToExportTableRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var selectors = params.selectors || null; - null != selectors && "string" === typeof selectors && (selectors = selectors.split(",")); - var result = new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, selectors:selectors, maxErrorMeters:numberOrNull_(params.maxErrorMeters), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); - switch(destination) { - case ee.rpc_convert_batch.ExportDestination.GCS: - case ee.rpc_convert_batch.ExportDestination.DRIVE: - result.fileExportOptions = ee.rpc_convert_batch.buildTableFileExportOptions_(params, destination); - break; - case ee.rpc_convert_batch.ExportDestination.ASSET: - result.assetExportOptions = ee.rpc_convert_batch.buildTableAssetExportOptions_(params); - break; - default: - throw Error('Export destination "' + destination + '" unknown'); - } - return result; -}; -ee.rpc_convert_batch.taskToExportVideoRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - var result = new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params), fileExportOptions:null, requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); - result.fileExportOptions = ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.guessDestination_(params)); - return result; -}; -ee.rpc_convert_batch.taskToExportMapRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); -}; -ee.rpc_convert_batch.taskToExportVideoMapRequest = function(params) { - if (null == params.element) { - throw Error('"element" not found in params ' + params); - } - return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), - version:stringOrNull_(params.version), maxWorkerCount:numberOrNull_(params.maxWorkers)}); -}; -function stringOrNull_(value) { - return null != value ? String(value) : null; -} -function numberOrNull_(value) { - return null != value ? Number(value) : null; -} -ee.rpc_convert_batch.guessDestination_ = function(params) { - var destination = ee.rpc_convert_batch.ExportDestination.DRIVE; - if (null == params) { - return destination; - } - null != params.outputBucket || null != params.outputPrefix ? destination = ee.rpc_convert_batch.ExportDestination.GCS : null != params.assetId && (destination = ee.rpc_convert_batch.ExportDestination.ASSET); - return destination; -}; -ee.rpc_convert_batch.buildGeoTiffFormatOptions_ = function(params) { - if (params.fileDimensions && params.tiffFileDimensions) { - throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); - } - return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized, skipEmptyFiles:!(!params.skipEmptyTiles && !params.tiffSkipEmptyFiles), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions || params.tiffFileDimensions), }); -}; -ee.rpc_convert_batch.buildTfRecordFormatOptions_ = function(params) { - var tfRecordOptions = new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed, maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize), sequenceData:!!params.tfrecordSequenceData, collapseBands:!!params.tfrecordCollapseBands, maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold), defaultValue:numberOrNull_(params.tfrecordDefaultValue), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions), - marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize), tensorDepths:null, }), tensorDepths = params.tfrecordTensorDepths; - if (null != tensorDepths) { - if (goog.isObject(tensorDepths)) { - var result = {}; - goog.object.forEach(tensorDepths, function(v, k) { - if ("string" !== typeof k || "number" !== typeof v) { - throw Error('"tensorDepths" option must be an object of type Object'); - } - result[k] = v; - }); - tfRecordOptions.tensorDepths = result; - } else { - throw Error('"tensorDepths" option needs to have the form Object.'); - } - } - return tfRecordOptions; -}; -ee.rpc_convert_batch.buildImageFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null, driveDestination:null, geoTiffOptions:null, tfRecordOptions:null, fileFormat:ee.rpc_convert.fileFormat(params.fileFormat), }); - "GEO_TIFF" === result.fileFormat ? result.geoTiffOptions = ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params) : "TF_RECORD_IMAGE" === result.fileFormat && (result.tfRecordOptions = ee.rpc_convert_batch.buildTfRecordFormatOptions_(params)); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildImageAssetExportOptions_ = function(params) { - var allPolicies = params.pyramidingPolicy || {}; - try { - allPolicies = JSON.parse(allPolicies); - } catch ($jscomp$unused$catch) { - } - var defaultPyramidingPolicy = "PYRAMIDING_POLICY_UNSPECIFIED"; - "string" === typeof allPolicies ? (defaultPyramidingPolicy = allPolicies, allPolicies = {}) : allPolicies[".default"] && (defaultPyramidingPolicy = allPolicies[".default"], delete allPolicies[".default"]); - return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params), pyramidingPolicy:defaultPyramidingPolicy, pyramidingPolicyOverrides:goog.object.isEmpty(allPolicies) ? null : allPolicies, }); -}; -ee.rpc_convert_batch.buildTableFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat), }); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildTableAssetExportOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}); -}; -ee.rpc_convert_batch.buildVideoFileExportOptions_ = function(params, destination) { - var result = new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:"MP4", }); - destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); - return result; -}; -ee.rpc_convert_batch.buildVideoOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:stringOrNull_(params.maxPixels), }); -}; -ee.rpc_convert_batch.buildVideoMapOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:null, }); -}; -ee.rpc_convert_batch.buildTileOptions_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom), scale:numberOrNull_(params.scale), minZoom:numberOrNull_(params.minZoom), skipEmptyTiles:!!params.skipEmptyTiles, mapsApiKey:stringOrNull_(params.mapsApiKey), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions), stride:numberOrNull_(params.stride), zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset), - numberOrNull_(params.maxTimeMachineZoomSubset)), }); -}; -ee.rpc_convert_batch.buildZoomSubset_ = function(min, max) { - if (null == min && null == max) { - return null; - } - var result = new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0, max:null}); - null != min && (result.min = min); - result.max = max; - return result; -}; -ee.rpc_convert_batch.buildGridDimensions_ = function(dimensions) { - if (null == dimensions) { - return null; - } - var result = new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0, width:0}); - "string" === typeof dimensions && (-1 !== dimensions.indexOf("x") ? dimensions = dimensions.split("x").map(Number) : -1 !== dimensions.indexOf(",") && (dimensions = dimensions.split(",").map(Number))); - if (Array.isArray(dimensions)) { - if (2 === dimensions.length) { - result.height = dimensions[0], result.width = dimensions[1]; - } else { - if (1 === dimensions.length) { - result.height = dimensions[0], result.width = dimensions[0]; - } else { - throw Error("Unable to construct grid from dimensions: " + dimensions); - } - } - } else { - if ("number" !== typeof dimensions || isNaN(dimensions)) { - if (goog.isObject(dimensions) && null != dimensions.height && null != dimensions.width) { - result.height = dimensions.height, result.width = dimensions.width; - } else { - throw Error("Unable to construct grid from dimensions: " + dimensions); - } - } else { - result.height = dimensions, result.width = dimensions; - } - } - return result; -}; -ee.rpc_convert_batch.buildGcsDestination_ = function(params) { - var permissions = null; - null != params.writePublicTiles && (permissions = params.writePublicTiles ? "PUBLIC" : "DEFAULT_OBJECT_ACL"); - return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket), filenamePrefix:stringOrNull_(params.outputPrefix), bucketCorsUris:params.bucketCorsUris || null, permissions:permissions, }); -}; -ee.rpc_convert_batch.buildDriveDestination_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder), filenamePrefix:stringOrNull_(params.driveFileNamePrefix), }); -}; -ee.rpc_convert_batch.buildEarthEngineDestination_ = function(params) { - return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)}); -}; -var jspb = {}, module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage = function() { -}; -module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage.prototype.toDebugString = function() { -}; -module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage.prototype.toDebugStringInternal = function(indentLevel) { -}; -jspb.ConstBinaryMessage = module$contents$jspb$ConstBinaryMessage_ConstBinaryMessage; -jspb.BinaryMessage = function() { -}; -jspb.ScalarFieldType = void 0; -jspb.RepeatedFieldType = void 0; -jspb.AnyFieldType = void 0; -jspb.BinaryConstants = {}; -var module$contents$jspb$BinaryConstants_FieldType = {INVALID:-1, DOUBLE:1, FLOAT:2, INT64:3, UINT64:4, INT32:5, FIXED64:6, FIXED32:7, BOOL:8, STRING:9, GROUP:10, MESSAGE:11, BYTES:12, UINT32:13, ENUM:14, SFIXED32:15, SFIXED64:16, SINT32:17, SINT64:18, }, module$contents$jspb$BinaryConstants_WireType = {INVALID:-1, VARINT:0, FIXED64:1, DELIMITED:2, START_GROUP:3, END_GROUP:4, FIXED32:5}; -function module$contents$jspb$BinaryConstants_FieldTypeToWireType(fieldType) { - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.INT32: - case module$contents$jspb$BinaryConstants_FieldType.INT64: - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - return module$contents$jspb$BinaryConstants_WireType.VARINT; - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - return module$contents$jspb$BinaryConstants_WireType.FIXED64; - case module$contents$jspb$BinaryConstants_FieldType.STRING: - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - return module$contents$jspb$BinaryConstants_WireType.DELIMITED; - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - return module$contents$jspb$BinaryConstants_WireType.FIXED32; - default: - return module$contents$jspb$BinaryConstants_WireType.INVALID; - } -} -jspb.BinaryConstants.FieldType = module$contents$jspb$BinaryConstants_FieldType; -jspb.BinaryConstants.FieldTypeToWireType = module$contents$jspb$BinaryConstants_FieldTypeToWireType; -jspb.BinaryConstants.FLOAT32_EPS = 1.401298464324817e-45; -jspb.BinaryConstants.FLOAT32_MIN = 1.1754943508222875e-38; -jspb.BinaryConstants.FLOAT32_MAX = 3.4028234663852886e+38; -jspb.BinaryConstants.FLOAT64_EPS = 5e-324; -jspb.BinaryConstants.FLOAT64_MIN = 2.2250738585072014e-308; -jspb.BinaryConstants.FLOAT64_MAX = 1.7976931348623157e+308; -jspb.BinaryConstants.INVALID_FIELD_NUMBER = -1; -jspb.BinaryConstants.TWO_TO_20 = 1048576; -jspb.BinaryConstants.TWO_TO_23 = 8388608; -jspb.BinaryConstants.TWO_TO_31 = 2147483648; -jspb.BinaryConstants.TWO_TO_32 = 4294967296; -jspb.BinaryConstants.TWO_TO_52 = 4503599627370496; -jspb.BinaryConstants.TWO_TO_63 = 9223372036854775808; -jspb.BinaryConstants.TWO_TO_64 = 18446744073709551616; -jspb.BinaryConstants.WireType = module$contents$jspb$BinaryConstants_WireType; -jspb.BinaryConstants.ZERO_HASH = "\x00\x00\x00\x00\x00\x00\x00\x00"; -jspb.ByteSource = void 0; -goog.crypt.stringToByteArray = function(str) { - for (var output = [], p = 0, i = 0; i < str.length; i++) { - var c = str.charCodeAt(i); - 255 < c && (output[p++] = c & 255, c >>= 8); - output[p++] = c; - } - return output; -}; -goog.crypt.byteArrayToString = function(bytes) { - if (8192 >= bytes.length) { - return String.fromCharCode.apply(null, bytes); - } - for (var str = "", i = 0; i < bytes.length; i += 8192) { - var chunk = module$contents$goog$array_slice(bytes, i, i + 8192); - str += String.fromCharCode.apply(null, chunk); - } - return str; -}; -goog.crypt.byteArrayToHex = function(array, opt_separator) { - return module$contents$goog$array_map(array, function(numByte) { - var hexByte = numByte.toString(16); - return 1 < hexByte.length ? hexByte : "0" + hexByte; - }).join(opt_separator || ""); -}; -goog.crypt.hexToByteArray = function(hexString) { - goog.asserts.assert(0 == hexString.length % 2, "Key string length must be multiple of 2"); - for (var arr = [], i = 0; i < hexString.length; i += 2) { - arr.push(parseInt(hexString.substring(i, i + 2), 16)); - } - return arr; -}; -goog.crypt.stringToUtf8ByteArray = function(str) { - for (var out = [], p = 0, i = 0; i < str.length; i++) { - var c = str.charCodeAt(i); - 128 > c ? out[p++] = c : (2048 > c ? out[p++] = c >> 6 | 192 : (55296 == (c & 64512) && i + 1 < str.length && 56320 == (str.charCodeAt(i + 1) & 64512) ? (c = 65536 + ((c & 1023) << 10) + (str.charCodeAt(++i) & 1023), out[p++] = c >> 18 | 240, out[p++] = c >> 12 & 63 | 128) : out[p++] = c >> 12 | 224, out[p++] = c >> 6 & 63 | 128), out[p++] = c & 63 | 128); - } - return out; -}; -goog.crypt.utf8ByteArrayToString = function(bytes) { - for (var out = [], pos = 0, c = 0; pos < bytes.length;) { - var c1 = bytes[pos++]; - if (128 > c1) { - out[c++] = String.fromCharCode(c1); - } else { - if (191 < c1 && 224 > c1) { - var c2 = bytes[pos++]; - out[c++] = String.fromCharCode((c1 & 31) << 6 | c2 & 63); - } else { - if (239 < c1 && 365 > c1) { - c2 = bytes[pos++]; - var c3 = bytes[pos++], c4 = bytes[pos++], u = ((c1 & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63) - 65536; - out[c++] = String.fromCharCode(55296 + (u >> 10)); - out[c++] = String.fromCharCode(56320 + (u & 1023)); - } else { - c2 = bytes[pos++], c3 = bytes[pos++], out[c++] = String.fromCharCode((c1 & 15) << 12 | (c2 & 63) << 6 | c3 & 63); - } - } - } - } - return out.join(""); -}; -goog.crypt.xorByteArray = function(bytes1, bytes2) { - goog.asserts.assert(bytes1.length == bytes2.length, "XOR array lengths must match"); - for (var result = [], i = 0; i < bytes1.length; i++) { - result.push(bytes1[i] ^ bytes2[i]); - } - return result; -}; -jspb.utils = {}; -var module$contents$jspb$utils_split64Low = 0, module$contents$jspb$utils_split64High = 0; -function module$contents$jspb$utils_splitUint64(value) { - var lowBits = value >>> 0, highBits = Math.floor((value - lowBits) / 4294967296) >>> 0; - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitInt64(value) { - var sign = 0 > value; - value = Math.abs(value); - var lowBits = value >>> 0, highBits = Math.floor((value - lowBits) / 4294967296); - highBits >>>= 0; - sign && (highBits = ~highBits >>> 0, lowBits = (~lowBits >>> 0) + 1, 4294967295 < lowBits && (lowBits = 0, highBits++, 4294967295 < highBits && (highBits = 0))); - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitZigzag64(value) { - var sign = 0 > value; - value = 2 * Math.abs(value); - module$contents$jspb$utils_splitUint64(value); - var lowBits = module$contents$jspb$utils_split64Low, highBits = module$contents$jspb$utils_split64High; - sign && (0 == lowBits ? 0 == highBits ? highBits = lowBits = 4294967295 : (highBits--, lowBits = 4294967295) : lowBits--); - module$contents$jspb$utils_split64Low = lowBits; - module$contents$jspb$utils_split64High = highBits; -} -function module$contents$jspb$utils_splitFloat32(value) { - var sign = 0 > value ? 1 : 0; - value = sign ? -value : value; - if (0 === value) { - 0 < 1 / value ? module$contents$jspb$utils_split64Low = module$contents$jspb$utils_split64High = 0 : (module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = 2147483648); - } else { - if (isNaN(value)) { - module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = 2147483647; - } else { - if (3.4028234663852886e+38 < value) { - module$contents$jspb$utils_split64High = 0, module$contents$jspb$utils_split64Low = (sign << 31 | 2139095040) >>> 0; - } else { - if (1.1754943508222875e-38 > value) { - var mant = Math.round(value / Math.pow(2, -149)); - module$contents$jspb$utils_split64High = 0; - module$contents$jspb$utils_split64Low = (sign << 31 | mant) >>> 0; - } else { - var exp = Math.floor(Math.log(value) / Math.LN2); - mant = value * Math.pow(2, -exp); - mant = Math.round(8388608 * mant) & 8388607; - module$contents$jspb$utils_split64High = 0; - module$contents$jspb$utils_split64Low = (sign << 31 | exp + 127 << 23 | mant) >>> 0; - } - } - } - } -} -function module$contents$jspb$utils_splitFloat64(value) { - var sign = 0 > value ? 1 : 0; - value = sign ? -value : value; - if (0 === value) { - module$contents$jspb$utils_split64High = 0 < 1 / value ? 0 : 2147483648, module$contents$jspb$utils_split64Low = 0; - } else { - if (isNaN(value)) { - module$contents$jspb$utils_split64High = 2147483647, module$contents$jspb$utils_split64Low = 4294967295; - } else { - if (1.7976931348623157e+308 < value) { - module$contents$jspb$utils_split64High = (sign << 31 | 2146435072) >>> 0, module$contents$jspb$utils_split64Low = 0; - } else { - if (2.2250738585072014e-308 > value) { - var mant = value / Math.pow(2, -1074), mantHigh; - module$contents$jspb$utils_split64High = (sign << 31 | mant / 4294967296) >>> 0; - module$contents$jspb$utils_split64Low = mant >>> 0; - } else { - var x = value, exp = 0; - if (2 <= x) { - for (; 2 <= x && 1023 > exp;) { - exp++, x /= 2; - } - } else { - for (; 1 > x && -1022 < exp;) { - x *= 2, exp--; - } - } - mant = value * Math.pow(2, -exp); - var mantLow; - module$contents$jspb$utils_split64High = (sign << 31 | exp + 1023 << 20 | 1048576 * mant & 1048575) >>> 0; - module$contents$jspb$utils_split64Low = 4503599627370496 * mant >>> 0; - } - } - } - } -} -function module$contents$jspb$utils_splitHash64(hash) { - var e = hash.charCodeAt(4), f = hash.charCodeAt(5), g = hash.charCodeAt(6), h = hash.charCodeAt(7); - module$contents$jspb$utils_split64Low = hash.charCodeAt(0) + (hash.charCodeAt(1) << 8) + (hash.charCodeAt(2) << 16) + (hash.charCodeAt(3) << 24) >>> 0; - module$contents$jspb$utils_split64High = e + (f << 8) + (g << 16) + (h << 24) >>> 0; -} -function module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh) { - return 4294967296 * bitsHigh + (bitsLow >>> 0); -} -function module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh) { - var sign = bitsHigh & 2147483648; - sign && (bitsLow = ~bitsLow + 1 >>> 0, bitsHigh = ~bitsHigh >>> 0, 0 == bitsLow && (bitsHigh = bitsHigh + 1 >>> 0)); - var result = module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); - return sign ? -result : result; -} -function module$contents$jspb$utils_toZigzag64(bitsLow, bitsHigh, convert) { - var signFlipMask = bitsHigh >> 31; - return convert(bitsLow << 1 ^ signFlipMask, (bitsHigh << 1 | bitsLow >>> 31) ^ signFlipMask); -} -function module$contents$jspb$utils_joinZigzag64(bitsLow, bitsHigh) { - return module$contents$jspb$utils_fromZigzag64(bitsLow, bitsHigh, module$contents$jspb$utils_joinInt64); -} -function module$contents$jspb$utils_fromZigzag64(bitsLow, bitsHigh, convert) { - var signFlipMask = -(bitsLow & 1); - return convert((bitsLow >>> 1 | bitsHigh << 31) ^ signFlipMask, bitsHigh >>> 1 ^ signFlipMask); -} -function module$contents$jspb$utils_joinFloat32(bitsLow, bitsHigh) { - var sign = 2 * (bitsLow >> 31) + 1, exp = bitsLow >>> 23 & 255, mant = bitsLow & 8388607; - return 255 == exp ? mant ? NaN : Infinity * sign : 0 == exp ? sign * Math.pow(2, -149) * mant : sign * Math.pow(2, exp - 150) * (mant + Math.pow(2, 23)); -} -function module$contents$jspb$utils_joinFloat64(bitsLow, bitsHigh) { - var sign = 2 * (bitsHigh >> 31) + 1, exp = bitsHigh >>> 20 & 2047, mant = 4294967296 * (bitsHigh & 1048575) + bitsLow; - return 2047 == exp ? mant ? NaN : Infinity * sign : 0 == exp ? sign * Math.pow(2, -1074) * mant : sign * Math.pow(2, exp - 1075) * (mant + 4503599627370496); -} -function module$contents$jspb$utils_joinHash64(bitsLow, bitsHigh) { - return String.fromCharCode(bitsLow >>> 0 & 255, bitsLow >>> 8 & 255, bitsLow >>> 16 & 255, bitsLow >>> 24 & 255, bitsHigh >>> 0 & 255, bitsHigh >>> 8 & 255, bitsHigh >>> 16 & 255, bitsHigh >>> 24 & 255); -} -function module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh) { - function decimalFrom1e7(digit1e7, needLeadingZeros) { - var partial = digit1e7 ? String(digit1e7) : ""; - return needLeadingZeros ? "0000000".slice(partial.length) + partial : partial; - } - if (2097151 >= bitsHigh) { - return "" + (4294967296 * bitsHigh + bitsLow); - } - var mid = (bitsLow >>> 24 | bitsHigh << 8) >>> 0 & 16777215, high = bitsHigh >> 16 & 65535, digitA = (bitsLow & 16777215) + 6777216 * mid + 6710656 * high, digitB = mid + 8147497 * high, digitC = 2 * high; - 10000000 <= digitA && (digitB += Math.floor(digitA / 10000000), digitA %= 10000000); - 10000000 <= digitB && (digitC += Math.floor(digitB / 10000000), digitB %= 10000000); - return decimalFrom1e7(digitC, 0) + decimalFrom1e7(digitB, digitC) + decimalFrom1e7(digitA, 1); -} -function module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh) { - var negative = bitsHigh & 2147483648; - negative && (bitsLow = ~bitsLow + 1 >>> 0, bitsHigh = ~bitsHigh + (0 == bitsLow ? 1 : 0) >>> 0); - var result = module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); - return negative ? "-" + result : result; -} -function module$contents$jspb$utils_hash64ToDecimalString(hash, signed) { - module$contents$jspb$utils_splitHash64(hash); - var bitsLow = module$contents$jspb$utils_split64Low, bitsHigh = module$contents$jspb$utils_split64High; - return signed ? module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh) : module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); -} -function module$contents$jspb$utils_decimalStringToHash64(dec) { - function muladd(m, c) { - for (var i = 0; 8 > i && (1 !== m || 0 < c); i++) { - var r = m * resultBytes[i] + c; - resultBytes[i] = r & 255; - c = r >>> 8; - } - } - function neg() { - for (var i = 0; 8 > i; i++) { - resultBytes[i] = ~resultBytes[i] & 255; - } - } - (0,goog.asserts.assert)(0 < dec.length); - var minus = !1; - "-" === dec[0] && (minus = !0, dec = dec.slice(1)); - for (var resultBytes = [0, 0, 0, 0, 0, 0, 0, 0], i$jscomp$0 = 0; i$jscomp$0 < dec.length; i$jscomp$0++) { - muladd(10, dec.charCodeAt(i$jscomp$0) - 48); - } - minus && (neg(), muladd(1, 1)); - return goog.crypt.byteArrayToString(resultBytes); -} -function module$contents$jspb$utils_splitDecimalString(value) { - module$contents$jspb$utils_splitHash64(module$contents$jspb$utils_decimalStringToHash64(value)); -} -function module$contents$jspb$utils_toHexDigit_(nibble) { - return String.fromCharCode(10 > nibble ? 48 + nibble : 87 + nibble); -} -function module$contents$jspb$utils_fromHexCharCode_(hexCharCode) { - return 97 <= hexCharCode ? hexCharCode - 97 + 10 : hexCharCode - 48; -} -function module$contents$jspb$utils_countFixedFields_(buffer, start, end, tag, stride) { - var count = 0, cursor = start; - if (128 > tag) { - for (; cursor < end && buffer[cursor++] == tag;) { - count++, cursor += stride; - } - } else { - for (; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor++] != (temp & 127 | 128)) { - return count; - } - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - count++; - cursor += stride; - } - } - return count; -} -function module$contents$jspb$utils_byteSourceToUint8Array(data) { - if (data.constructor === Uint8Array) { - return data; - } - if (data.constructor === ArrayBuffer) { - return new Uint8Array(data); - } - if (data.constructor === Array) { - return new Uint8Array(data); - } - if (data.constructor === String) { - return goog.crypt.base64.decodeStringToUint8Array(data); - } - (0,goog.asserts.fail)("Type not convertible to Uint8Array."); - return new Uint8Array(0); -} -function module$contents$jspb$utils_getSplit64Low() { - return module$contents$jspb$utils_split64Low; -} -function module$contents$jspb$utils_getSplit64High() { - return module$contents$jspb$utils_split64High; -} -jspb.utils.byteSourceToUint8Array = module$contents$jspb$utils_byteSourceToUint8Array; -jspb.utils.countDelimitedFields = function module$contents$jspb$utils_countDelimitedFields(buffer, start, end, field) { - for (var count = 0, cursor = start, tag = 8 * field + module$contents$jspb$BinaryConstants_WireType.DELIMITED; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor++] != (temp & 127 | 128)) { - return count; - } - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - count++; - for (var length = 0, shift = 1; temp = buffer[cursor++], length += (temp & 127) * shift, shift *= 128, 0 != (temp & 128);) { - } - cursor += length; - } - return count; -}; -jspb.utils.countFixed32Fields = function module$contents$jspb$utils_countFixed32Fields(buffer, start, end, field) { - return module$contents$jspb$utils_countFixedFields_(buffer, start, end, 8 * field + module$contents$jspb$BinaryConstants_WireType.FIXED32, 4); -}; -jspb.utils.countFixed64Fields = function module$contents$jspb$utils_countFixed64Fields(buffer, start, end, field) { - return module$contents$jspb$utils_countFixedFields_(buffer, start, end, 8 * field + module$contents$jspb$BinaryConstants_WireType.FIXED64, 8); -}; -jspb.utils.countVarintFields = function module$contents$jspb$utils_countVarintFields(buffer, start, end, field) { - var count = 0, cursor = start, tag = 8 * field + module$contents$jspb$BinaryConstants_WireType.VARINT; - if (128 > tag) { - for (; cursor < end && buffer[cursor++] == tag;) { - for (count++;;) { - var x = buffer[cursor++]; - if (0 == (x & 128)) { - break; - } - } - } - } else { - for (; cursor < end;) { - for (var temp = tag; 128 < temp;) { - if (buffer[cursor] != (temp & 127 | 128)) { - return count; - } - cursor++; - temp >>= 7; - } - if (buffer[cursor++] != temp) { - break; - } - for (count++; x = buffer[cursor++], 0 != (x & 128);) { - } - } - } - return count; -}; -jspb.utils.countVarints = function module$contents$jspb$utils_countVarints(buffer, start, end) { - for (var count = 0, i = start; i < end; i++) { - count += buffer[i] >> 7; - } - return end - start - count; -}; -jspb.utils.debugBytesToTextFormat = function module$contents$jspb$utils_debugBytesToTextFormat(byteSource) { - var s = '"'; - if (byteSource) { - for (var bytes = module$contents$jspb$utils_byteSourceToUint8Array(byteSource), i = 0; i < bytes.length; i++) { - s += "\\x", 16 > bytes[i] && (s += "0"), s += bytes[i].toString(16); - } - } - return s + '"'; -}; -jspb.utils.debugScalarToTextFormat = function module$contents$jspb$utils_debugScalarToTextFormat(scalar) { - return "string" === typeof scalar ? goog.string.quote(scalar) : scalar.toString(); -}; -jspb.utils.decimalStringToHash64 = module$contents$jspb$utils_decimalStringToHash64; -jspb.utils.DIGITS = "0123456789abcdef".split(""); -jspb.utils.fromZigzag64 = module$contents$jspb$utils_fromZigzag64; -jspb.utils.hash64ArrayToDecimalStrings = function module$contents$jspb$utils_hash64ArrayToDecimalStrings(hashes, signed) { - for (var result = Array(hashes.length), i = 0; i < hashes.length; i++) { - result[i] = module$contents$jspb$utils_hash64ToDecimalString(hashes[i], signed); - } - return result; -}; -jspb.utils.hash64ToDecimalString = module$contents$jspb$utils_hash64ToDecimalString; -jspb.utils.hash64ToHexString = function module$contents$jspb$utils_hash64ToHexString(hash) { - var temp = Array(18); - temp[0] = "0"; - temp[1] = "x"; - for (var i = 0; 8 > i; i++) { - var c = hash.charCodeAt(7 - i); - temp[2 * i + 2] = module$contents$jspb$utils_toHexDigit_(c >> 4); - temp[2 * i + 3] = module$contents$jspb$utils_toHexDigit_(c & 15); - } - return temp.join(""); -}; -jspb.utils.hash64ToNumber = function module$contents$jspb$utils_hash64ToNumber(hash, signed) { - module$contents$jspb$utils_splitHash64(hash); - var bitsLow = module$contents$jspb$utils_split64Low, bitsHigh = module$contents$jspb$utils_split64High; - return signed ? module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh) : module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); -}; -jspb.utils.hexStringToHash64 = function module$contents$jspb$utils_hexStringToHash64(hex) { - hex = hex.toLowerCase(); - (0,goog.asserts.assert)(18 == hex.length); - (0,goog.asserts.assert)("0" == hex[0]); - (0,goog.asserts.assert)("x" == hex[1]); - for (var result = "", i = 0; 8 > i; i++) { - result = String.fromCharCode(16 * module$contents$jspb$utils_fromHexCharCode_(hex.charCodeAt(2 * i + 2)) + module$contents$jspb$utils_fromHexCharCode_(hex.charCodeAt(2 * i + 3))) + result; - } - return result; -}; -jspb.utils.joinFloat64 = module$contents$jspb$utils_joinFloat64; -jspb.utils.joinFloat32 = module$contents$jspb$utils_joinFloat32; -jspb.utils.joinHash64 = module$contents$jspb$utils_joinHash64; -jspb.utils.joinInt64 = module$contents$jspb$utils_joinInt64; -jspb.utils.joinSignedDecimalString = module$contents$jspb$utils_joinSignedDecimalString; -jspb.utils.joinUint64 = module$contents$jspb$utils_joinUint64; -jspb.utils.joinUnsignedDecimalString = module$contents$jspb$utils_joinUnsignedDecimalString; -jspb.utils.joinZigzag64 = module$contents$jspb$utils_joinZigzag64; -jspb.utils.numberToHash64 = function module$contents$jspb$utils_numberToHash64(value) { - module$contents$jspb$utils_splitInt64(value); - return module$contents$jspb$utils_joinHash64(module$contents$jspb$utils_split64Low, module$contents$jspb$utils_split64High); -}; -jspb.utils.splitDecimalString = module$contents$jspb$utils_splitDecimalString; -jspb.utils.splitHash64 = module$contents$jspb$utils_splitHash64; -jspb.utils.splitFloat64 = module$contents$jspb$utils_splitFloat64; -jspb.utils.splitFloat32 = module$contents$jspb$utils_splitFloat32; -jspb.utils.splitZigzag64 = module$contents$jspb$utils_splitZigzag64; -jspb.utils.splitInt64 = module$contents$jspb$utils_splitInt64; -jspb.utils.splitUint64 = module$contents$jspb$utils_splitUint64; -jspb.utils.getSplit64Low = module$contents$jspb$utils_getSplit64Low; -jspb.utils.getSplit64High = module$contents$jspb$utils_getSplit64High; -jspb.utils.stringToByteArray = function module$contents$jspb$utils_stringToByteArray(str) { - for (var arr = new Uint8Array(str.length), i = 0; i < str.length; i++) { - var codepoint = str.charCodeAt(i); - if (255 < codepoint) { - throw Error("Conversion error: string contains codepoint outside of byte range"); - } - arr[i] = codepoint; - } - return arr; -}; -jspb.utils.toZigzag64 = module$contents$jspb$utils_toZigzag64; -var module$contents$jspb$BinaryDecoder_BinaryDecoder = function(bytes, start, length) { - this.bytes_ = null; - this.cursor_ = this.end_ = this.start_ = 0; - this.error_ = !1; - bytes && this.setBlock(bytes, start, length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc = function(bytes, start, length) { - if (module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.length) { - var newDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.pop(); - bytes && newDecoder.setBlock(bytes, start, length); - return newDecoder; - } - return new module$contents$jspb$BinaryDecoder_BinaryDecoder(bytes, start, length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.free = function() { - this.clear(); - 100 > module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.length && module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_.push(this); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.clone = function() { - return module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(this.bytes_, this.start_, this.end_ - this.start_); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.clear = function() { - this.bytes_ = null; - this.cursor_ = this.end_ = this.start_ = 0; - this.error_ = !1; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getBuffer = function() { - return this.bytes_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setBlock = function(data, start, length) { - this.bytes_ = module$contents$jspb$utils_byteSourceToUint8Array(data); - this.start_ = void 0 !== start ? start : 0; - this.end_ = void 0 !== length ? this.start_ + length : this.bytes_.length; - this.cursor_ = this.start_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getEnd = function() { - return this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setEnd = function(end) { - this.end_ = end; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.reset = function() { - this.cursor_ = this.start_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getCursor = function() { - return this.cursor_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.setCursor = function(cursor) { - this.cursor_ = cursor; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.advance = function(count) { - this.cursor_ += count; - goog.asserts.assert(this.cursor_ <= this.end_); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.atEnd = function() { - return this.cursor_ == this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.pastEnd = function() { - return this.cursor_ > this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.getError = function() { - return this.error_ || 0 > this.cursor_ || this.cursor_ > this.end_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitVarint64 = function(convert) { - for (var temp = 128, lowBits = 0, highBits = 0, i = 0; 4 > i && 128 <= temp; i++) { - temp = this.bytes_[this.cursor_++], lowBits |= (temp & 127) << 7 * i; - } - 128 <= temp && (temp = this.bytes_[this.cursor_++], lowBits |= (temp & 127) << 28, highBits |= (temp & 127) >> 4); - if (128 <= temp) { - for (i = 0; 5 > i && 128 <= temp; i++) { - temp = this.bytes_[this.cursor_++], highBits |= (temp & 127) << 7 * i + 3; - } - } - if (128 > temp) { - return convert(lowBits >>> 0, highBits >>> 0); - } - goog.asserts.fail("Failed to read varint, encoding is invalid."); - this.error_ = !0; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitZigzagVarint64 = function(convert) { - return this.readSplitVarint64(function(low, high) { - return module$contents$jspb$utils_fromZigzag64(low, high, convert); - }); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSplitFixed64 = function(convert) { - var bytes = this.bytes_, cursor = this.cursor_; - this.cursor_ += 8; - for (var lowBits = 0, highBits = 0, i = cursor + 7; i >= cursor; i--) { - lowBits = lowBits << 8 | bytes[i], highBits = highBits << 8 | bytes[i + 4]; - } - return convert(lowBits, highBits); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.skipVarint = function() { - for (; this.bytes_[this.cursor_] & 128;) { - this.cursor_++; - } - this.cursor_++; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.unskipVarint = function(value) { - for (; 128 < value;) { - this.cursor_--, value >>>= 7; - } - this.cursor_--; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint32 = function() { - var bytes = this.bytes_; - var temp = bytes[this.cursor_ + 0]; - var x = temp & 127; - if (128 > temp) { - return this.cursor_ += 1, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 1]; - x |= (temp & 127) << 7; - if (128 > temp) { - return this.cursor_ += 2, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 2]; - x |= (temp & 127) << 14; - if (128 > temp) { - return this.cursor_ += 3, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 3]; - x |= (temp & 127) << 21; - if (128 > temp) { - return this.cursor_ += 4, goog.asserts.assert(this.cursor_ <= this.end_), x; - } - temp = bytes[this.cursor_ + 4]; - x |= (temp & 15) << 28; - if (128 > temp) { - return this.cursor_ += 5, goog.asserts.assert(this.cursor_ <= this.end_), x >>> 0; - } - this.cursor_ += 5; - 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && 128 <= bytes[this.cursor_++] && goog.asserts.assert(!1); - goog.asserts.assert(this.cursor_ <= this.end_); - return x; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint32 = function() { - return this.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint32String = function() { - return this.readUnsignedVarint32().toString(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint32String = function() { - return this.readSignedVarint32().toString(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint32 = function() { - var result = this.readUnsignedVarint32(); - return result >>> 1 ^ -(result & 1); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinUint64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUnsignedVarint64String = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinUnsignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinInt64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readSignedVarint64String = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinSignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint64 = function() { - return this.readSplitVarint64(module$contents$jspb$utils_joinZigzag64); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readZigzagVarint64String = function() { - return this.readSplitZigzagVarint64(module$contents$jspb$utils_joinSignedDecimalString); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint8 = function() { - var a = this.bytes_[this.cursor_ + 0]; - this.cursor_ += 1; - goog.asserts.assert(this.cursor_ <= this.end_); - return a; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint16 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1]; - this.cursor_ += 2; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 0 | b << 8; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint32 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2], d = this.bytes_[this.cursor_ + 3]; - this.cursor_ += 4; - goog.asserts.assert(this.cursor_ <= this.end_); - return (a << 0 | b << 8 | c << 16 | d << 24) >>> 0; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint64 = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinUint64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readUint64String = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinUnsignedDecimalString(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt8 = function() { - var a = this.bytes_[this.cursor_ + 0]; - this.cursor_ += 1; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 24 >> 24; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt16 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1]; - this.cursor_ += 2; - goog.asserts.assert(this.cursor_ <= this.end_); - return (a << 0 | b << 8) << 16 >> 16; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt32 = function() { - var a = this.bytes_[this.cursor_ + 0], b = this.bytes_[this.cursor_ + 1], c = this.bytes_[this.cursor_ + 2], d = this.bytes_[this.cursor_ + 3]; - this.cursor_ += 4; - goog.asserts.assert(this.cursor_ <= this.end_); - return a << 0 | b << 8 | c << 16 | d << 24; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt64 = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinInt64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readInt64String = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinSignedDecimalString(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readFloat = function() { - var bitsLow = this.readUint32(); - return module$contents$jspb$utils_joinFloat32(bitsLow, 0); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readDouble = function() { - var bitsLow = this.readUint32(), bitsHigh = this.readUint32(); - return module$contents$jspb$utils_joinFloat64(bitsLow, bitsHigh); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readBool = function() { - return !!this.bytes_[this.cursor_++]; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readEnum = function() { - return this.readSignedVarint32(); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readString = function(length) { - for (var bytes = this.bytes_, cursor = this.cursor_, end = cursor + length, codeUnits = [], result = ""; cursor < end;) { - var c = bytes[cursor++]; - if (128 > c) { - codeUnits.push(c); - } else { - if (192 > c) { - continue; - } else { - if (224 > c) { - var c2 = bytes[cursor++]; - codeUnits.push((c & 31) << 6 | c2 & 63); - } else { - if (240 > c) { - c2 = bytes[cursor++]; - var c3 = bytes[cursor++]; - codeUnits.push((c & 15) << 12 | (c2 & 63) << 6 | c3 & 63); - } else { - if (248 > c) { - c2 = bytes[cursor++]; - c3 = bytes[cursor++]; - var c4 = bytes[cursor++], codepoint = (c & 7) << 18 | (c2 & 63) << 12 | (c3 & 63) << 6 | c4 & 63; - codepoint -= 65536; - codeUnits.push((codepoint >> 10 & 1023) + 55296, (codepoint & 1023) + 56320); - } - } - } - } - } - 8192 <= codeUnits.length && (result += String.fromCharCode.apply(null, codeUnits), codeUnits.length = 0); - } - result += goog.crypt.byteArrayToString(codeUnits); - this.cursor_ = cursor; - return result; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readStringWithLength = function() { - var length = this.readUnsignedVarint32(); - return this.readString(length); -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.prototype.readBytes = function(length) { - if (0 > length || this.cursor_ + length > this.bytes_.length) { - return this.error_ = !0, goog.asserts.fail("Invalid byte length!"), new Uint8Array(0); - } - var result = this.bytes_.subarray(this.cursor_, this.cursor_ + length); - this.cursor_ += length; - goog.asserts.assert(this.cursor_ <= this.end_); - return result; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.resetInstanceCache = function() { - module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_ = []; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.getInstanceCache = function() { - return module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_; -}; -module$contents$jspb$BinaryDecoder_BinaryDecoder.instanceCache_ = []; -jspb.BinaryDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder; -var module$contents$jspb$BinaryReader_BinaryReader = function(bytes, start, length) { - this.decoder_ = module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(bytes, start, length); - this.fieldCursor_ = this.decoder_.getCursor(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; - this.error_ = !1; - this.readCallbacks_ = null; -}; -module$contents$jspb$BinaryReader_BinaryReader.alloc = function(bytes, start, length) { - if (module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.length) { - var newReader = module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.pop(); - bytes && newReader.decoder_.setBlock(bytes, start, length); - return newReader; - } - return new module$contents$jspb$BinaryReader_BinaryReader(bytes, start, length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.free = function() { - this.decoder_.clear(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; - this.error_ = !1; - this.readCallbacks_ = null; - 100 > module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.length && module$contents$jspb$BinaryReader_BinaryReader.instanceCache_.push(this); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldCursor = function() { - return this.fieldCursor_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getCursor = function() { - return this.decoder_.getCursor(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getBuffer = function() { - return this.decoder_.getBuffer(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldNumber = function() { - return this.nextField_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getWireType = function() { - return this.nextWireType_; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.isEndGroup = function() { - return this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.isDelimited = function() { - return this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getError = function() { - return this.error_ || this.decoder_.getError(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.setBlock = function(bytes, start, length) { - this.decoder_.setBlock(bytes, start, length); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.reset = function() { - this.decoder_.reset(); - this.nextField_ = -1; - this.nextWireType_ = module$contents$jspb$BinaryConstants_WireType.INVALID; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.advance = function(count) { - this.decoder_.advance(count); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.nextField = function() { - if (this.decoder_.atEnd()) { - return !1; - } - if (this.getError()) { - return goog.asserts.fail("Decoder hit an error"), !1; - } - this.fieldCursor_ = this.decoder_.getCursor(); - var header = this.decoder_.readUnsignedVarint32(), nextField = header >>> 3, nextWireType = header & 7; - if (nextWireType != module$contents$jspb$BinaryConstants_WireType.VARINT && nextWireType != module$contents$jspb$BinaryConstants_WireType.FIXED32 && nextWireType != module$contents$jspb$BinaryConstants_WireType.FIXED64 && nextWireType != module$contents$jspb$BinaryConstants_WireType.DELIMITED && nextWireType != module$contents$jspb$BinaryConstants_WireType.START_GROUP && nextWireType != module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - return goog.asserts.fail("Invalid wire type: %s (at position %s)", nextWireType, this.fieldCursor_), this.error_ = !0, !1; - } - this.nextField_ = nextField; - this.nextWireType_ = nextWireType; - return !0; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.unskipHeader = function() { - this.decoder_.unskipVarint(this.nextField_ << 3 | this.nextWireType_); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipMatchingFields = function() { - var field = this.nextField_; - for (this.unskipHeader(); this.nextField() && this.getFieldNumber() == field;) { - this.skipField(); - } - this.decoder_.atEnd() || this.unskipHeader(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipVarintField = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.VARINT ? (goog.asserts.fail("Invalid wire type for skipVarintField"), this.skipField()) : this.decoder_.skipVarint(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipDelimitedField = function() { - if (this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.DELIMITED) { - goog.asserts.fail("Invalid wire type for skipDelimitedField"), this.skipField(); - } else { - var length = this.decoder_.readUnsignedVarint32(); - this.decoder_.advance(length); - } -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipFixed32Field = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.FIXED32 ? (goog.asserts.fail("Invalid wire type for skipFixed32Field"), this.skipField()) : this.decoder_.advance(4); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipFixed64Field = function() { - this.nextWireType_ != module$contents$jspb$BinaryConstants_WireType.FIXED64 ? (goog.asserts.fail("Invalid wire type for skipFixed64Field"), this.skipField()) : this.decoder_.advance(8); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipGroup = function() { - var previousField = this.nextField_; - do { - if (!this.nextField()) { - goog.asserts.fail("Unmatched start-group tag: stream EOF"); - this.error_ = !0; - break; - } - if (this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - this.nextField_ != previousField && (goog.asserts.fail("Unmatched end-group tag"), this.error_ = !0); - break; - } - this.skipField(); - } while (1); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.skipField = function() { - switch(this.nextWireType_) { - case module$contents$jspb$BinaryConstants_WireType.VARINT: - this.skipVarintField(); - break; - case module$contents$jspb$BinaryConstants_WireType.FIXED64: - this.skipFixed64Field(); - break; - case module$contents$jspb$BinaryConstants_WireType.DELIMITED: - this.skipDelimitedField(); - break; - case module$contents$jspb$BinaryConstants_WireType.FIXED32: - this.skipFixed32Field(); - break; - case module$contents$jspb$BinaryConstants_WireType.START_GROUP: - this.skipGroup(); - break; - default: - this.error_ = !0, goog.asserts.fail("Invalid wire encoding for field."); - } -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.registerReadCallback = function(callbackName, callback) { - null === this.readCallbacks_ && (this.readCallbacks_ = {}); - goog.asserts.assert(!this.readCallbacks_[callbackName]); - this.readCallbacks_[callbackName] = callback; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.runReadCallback = function(callbackName) { - goog.asserts.assert(null !== this.readCallbacks_); - var callback = this.readCallbacks_[callbackName]; - goog.asserts.assert(callback); - return callback(this); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readAny = function(fieldType) { - this.nextWireType_ = module$contents$jspb$BinaryConstants_FieldTypeToWireType(fieldType); - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - return this.readDouble(); - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - return this.readFloat(); - case module$contents$jspb$BinaryConstants_FieldType.INT64: - return this.readInt64(); - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - return this.readUint64(); - case module$contents$jspb$BinaryConstants_FieldType.INT32: - return this.readInt32(); - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - return this.readFixed64(); - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - return this.readFixed32(); - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - return this.readBool(); - case module$contents$jspb$BinaryConstants_FieldType.STRING: - return this.readString(); - case module$contents$jspb$BinaryConstants_FieldType.GROUP: - goog.asserts.fail("Group field type not supported in readAny()"); - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - goog.asserts.fail("Message field type not supported in readAny()"); - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - return this.readBytes(); - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - return this.readUint32(); - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - return this.readEnum(); - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - return this.readSfixed32(); - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - return this.readSfixed64(); - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - return this.readSint32(); - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - return this.readSint64(); - default: - goog.asserts.fail("Invalid field type in readAny()"); - } - return 0; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readMessage = function(message, reader) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var oldEnd = this.decoder_.getEnd(), length = this.decoder_.readUnsignedVarint32(), newEnd = this.decoder_.getCursor() + length; - this.decoder_.setEnd(newEnd); - reader(message, this); - this.decoder_.setCursor(newEnd); - this.decoder_.setEnd(oldEnd); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readGroup = function(field, message, reader) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.START_GROUP); - goog.asserts.assert(this.nextField_ == field); - reader(message, this); - this.error_ || this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.END_GROUP || (goog.asserts.fail("Group submessage did not end with an END_GROUP tag"), this.error_ = !0); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.getFieldDecoder = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(), start = this.decoder_.getCursor(), end = start + length, innerDecoder = module$contents$jspb$BinaryDecoder_BinaryDecoder.alloc(this.decoder_.getBuffer(), start, length); - this.decoder_.setCursor(end); - return innerDecoder; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint32String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readInt64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint32String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readUint64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readUnsignedVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSint64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readZigzagVarint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readUint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readUint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFixed64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readUint64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed32 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readInt32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed32String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readInt32().toString(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed64 = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readInt64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSfixed64String = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readInt64String(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readFloat = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED32); - return this.decoder_.readFloat(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readDouble = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readDouble(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readBool = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return !!this.decoder_.readUnsignedVarint32(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readEnum = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSignedVarint64(); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readString = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(); - return this.decoder_.readString(length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readBytes = function() { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var length = this.decoder_.readUnsignedVarint32(); - return this.decoder_.readBytes(length); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitVarint64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSplitVarint64(convert); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitZigzagVarint64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.VARINT); - return this.decoder_.readSplitVarint64(function(lowBits, highBits) { - return module$contents$jspb$utils_fromZigzag64(lowBits, highBits, convert); - }); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readSplitFixed64 = function(convert) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.FIXED64); - return this.decoder_.readSplitFixed64(convert); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedField_ = function(decodeMethod) { - goog.asserts.assert(this.nextWireType_ == module$contents$jspb$BinaryConstants_WireType.DELIMITED); - for (var length = this.decoder_.readUnsignedVarint32(), end = this.decoder_.getCursor() + length, result = []; this.decoder_.getCursor() < end;) { - result.push(decodeMethod.call(this.decoder_)); - } - return result; -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt32 = function() { - return this.readPackedField_(this.decoder_.readSignedVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt32String = function() { - return this.readPackedField_(this.decoder_.readSignedVarint32String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt64 = function() { - return this.readPackedField_(this.decoder_.readSignedVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedInt64String = function() { - return this.readPackedField_(this.decoder_.readSignedVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint32 = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint32String = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint32String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint64 = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedUint64String = function() { - return this.readPackedField_(this.decoder_.readUnsignedVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint32 = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint64 = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSint64String = function() { - return this.readPackedField_(this.decoder_.readZigzagVarint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed32 = function() { - return this.readPackedField_(this.decoder_.readUint32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed64 = function() { - return this.readPackedField_(this.decoder_.readUint64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFixed64String = function() { - return this.readPackedField_(this.decoder_.readUint64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed32 = function() { - return this.readPackedField_(this.decoder_.readInt32); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed64 = function() { - return this.readPackedField_(this.decoder_.readInt64); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedSfixed64String = function() { - return this.readPackedField_(this.decoder_.readInt64String); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedFloat = function() { - return this.readPackedField_(this.decoder_.readFloat); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedDouble = function() { - return this.readPackedField_(this.decoder_.readDouble); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedBool = function() { - return this.readPackedField_(this.decoder_.readBool); -}; -module$contents$jspb$BinaryReader_BinaryReader.prototype.readPackedEnum = function() { - return this.readPackedField_(this.decoder_.readEnum); -}; -module$contents$jspb$BinaryReader_BinaryReader.resetInstanceCache = function() { - module$contents$jspb$BinaryReader_BinaryReader.instanceCache_ = []; -}; -module$contents$jspb$BinaryReader_BinaryReader.getInstanceCache = function() { - return module$contents$jspb$BinaryReader_BinaryReader.instanceCache_; -}; -module$contents$jspb$BinaryReader_BinaryReader.instanceCache_ = []; -jspb.BinaryReader = module$contents$jspb$BinaryReader_BinaryReader; -jspb.arith = {}; -jspb.arith.UInt64 = function(lo, hi) { - this.lo = lo; - this.hi = hi; -}; -jspb.arith.UInt64.prototype.cmp = function(other) { - return this.hi < other.hi || this.hi == other.hi && this.lo < other.lo ? -1 : this.hi == other.hi && this.lo == other.lo ? 0 : 1; -}; -jspb.arith.UInt64.prototype.rightShift = function() { - return new jspb.arith.UInt64((this.lo >>> 1 | (this.hi & 1) << 31) >>> 0, this.hi >>> 1 >>> 0); -}; -jspb.arith.UInt64.prototype.leftShift = function() { - return new jspb.arith.UInt64(this.lo << 1 >>> 0, (this.hi << 1 | this.lo >>> 31) >>> 0); -}; -jspb.arith.UInt64.prototype.msb = function() { - return !!(this.hi & 2147483648); -}; -jspb.arith.UInt64.prototype.lsb = function() { - return !!(this.lo & 1); -}; -jspb.arith.UInt64.prototype.zero = function() { - return 0 == this.lo && 0 == this.hi; -}; -jspb.arith.UInt64.prototype.add = function(other) { - return new jspb.arith.UInt64((this.lo + other.lo & 4294967295) >>> 0 >>> 0, ((this.hi + other.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.UInt64.prototype.sub = function(other) { - return new jspb.arith.UInt64((this.lo - other.lo & 4294967295) >>> 0 >>> 0, ((this.hi - other.hi & 4294967295) >>> 0) - (0 > this.lo - other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.UInt64.mul32x32 = function(a, b) { - for (var aLow = a & 65535, aHigh = a >>> 16, bLow = b & 65535, bHigh = b >>> 16, productLow = aLow * bLow + 65536 * (aLow * bHigh & 65535) + 65536 * (aHigh * bLow & 65535), productHigh = aHigh * bHigh + (aLow * bHigh >>> 16) + (aHigh * bLow >>> 16); 4294967296 <= productLow;) { - productLow -= 4294967296, productHigh += 1; - } - return new jspb.arith.UInt64(productLow >>> 0, productHigh >>> 0); -}; -jspb.arith.UInt64.prototype.mul = function(a) { - var lo = jspb.arith.UInt64.mul32x32(this.lo, a), hi = jspb.arith.UInt64.mul32x32(this.hi, a); - hi.hi = hi.lo; - hi.lo = 0; - return lo.add(hi); -}; -jspb.arith.UInt64.prototype.div = function(_divisor) { - if (0 == _divisor) { - return []; - } - for (var quotient = new jspb.arith.UInt64(0, 0), remainder = new jspb.arith.UInt64(this.lo, this.hi), divisor = new jspb.arith.UInt64(_divisor, 0), unit = new jspb.arith.UInt64(1, 0); !divisor.msb();) { - divisor = divisor.leftShift(), unit = unit.leftShift(); - } - for (; !unit.zero();) { - 0 >= divisor.cmp(remainder) && (quotient = quotient.add(unit), remainder = remainder.sub(divisor)), divisor = divisor.rightShift(), unit = unit.rightShift(); - } - return [quotient, remainder]; -}; -jspb.arith.UInt64.prototype.toString = function() { - for (var result = "", num = this; !num.zero();) { - var divResult = num.div(10), quotient = divResult[0]; - result = divResult[1].lo + result; - num = quotient; - } - "" == result && (result = "0"); - return result; -}; -jspb.arith.UInt64.fromString = function(s) { - for (var result = new jspb.arith.UInt64(0, 0), digit64 = new jspb.arith.UInt64(0, 0), i = 0; i < s.length; i++) { - if ("0" > s[i] || "9" < s[i]) { - return null; - } - digit64.lo = parseInt(s[i], 10); - result = result.mul(10).add(digit64); - } - return result; -}; -jspb.arith.UInt64.prototype.clone = function() { - return new jspb.arith.UInt64(this.lo, this.hi); -}; -jspb.arith.Int64 = function(lo, hi) { - this.lo = lo; - this.hi = hi; -}; -jspb.arith.Int64.prototype.add = function(other) { - return new jspb.arith.Int64((this.lo + other.lo & 4294967295) >>> 0 >>> 0, ((this.hi + other.hi & 4294967295) >>> 0) + (4294967296 <= this.lo + other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.Int64.prototype.sub = function(other) { - return new jspb.arith.Int64((this.lo - other.lo & 4294967295) >>> 0 >>> 0, ((this.hi - other.hi & 4294967295) >>> 0) - (0 > this.lo - other.lo ? 1 : 0) >>> 0); -}; -jspb.arith.Int64.prototype.clone = function() { - return new jspb.arith.Int64(this.lo, this.hi); -}; -jspb.arith.Int64.prototype.toString = function() { - var sign = 0 != (this.hi & 2147483648), num = new jspb.arith.UInt64(this.lo, this.hi); - sign && (num = (new jspb.arith.UInt64(0, 0)).sub(num)); - return (sign ? "-" : "") + num.toString(); -}; -jspb.arith.Int64.fromString = function(s) { - var hasNegative = 0 < s.length && "-" == s[0]; - hasNegative && (s = s.substring(1)); - var num = jspb.arith.UInt64.fromString(s); - if (null === num) { - return null; - } - hasNegative && (num = (new jspb.arith.UInt64(0, 0)).sub(num)); - return new jspb.arith.Int64(num.lo, num.hi); -}; -var module$contents$jspb$BinaryEncoder_BinaryEncoder = function() { - this.buffer_ = []; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.length = function() { - return this.buffer_.length; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.end = function() { - var buffer = this.buffer_; - this.buffer_ = []; - return buffer; -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitVarint64 = function(lowBits, highBits) { - goog.asserts.assert(lowBits == Math.floor(lowBits)); - goog.asserts.assert(highBits == Math.floor(highBits)); - goog.asserts.assert(0 <= lowBits && 4294967296 > lowBits); - for (goog.asserts.assert(0 <= highBits && 4294967296 > highBits); 0 < highBits || 127 < lowBits;) { - this.buffer_.push(lowBits & 127 | 128), lowBits = (lowBits >>> 7 | highBits << 25) >>> 0, highBits >>>= 7; - } - this.buffer_.push(lowBits); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitFixed64 = function(lowBits, highBits) { - goog.asserts.assert(lowBits == Math.floor(lowBits)); - goog.asserts.assert(highBits == Math.floor(highBits)); - goog.asserts.assert(0 <= lowBits && 4294967296 > lowBits); - goog.asserts.assert(0 <= highBits && 4294967296 > highBits); - this.writeUint32(lowBits); - this.writeUint32(highBits); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSplitZigzagVarint64 = function(lowBits, highBits) { - var self = this; - module$contents$jspb$utils_toZigzag64(lowBits, highBits, function(lo, hi) { - self.writeSplitVarint64(lo >>> 0, hi >>> 0); - }); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUnsignedVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - for (goog.asserts.assert(0 <= value && 4294967296 > value); 127 < value;) { - this.buffer_.push(value & 127 | 128), value >>>= 7; - } - this.buffer_.push(value); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSignedVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - if (0 <= value) { - this.writeUnsignedVarint32(value); - } else { - for (var i = 0; 9 > i; i++) { - this.buffer_.push(value & 127 | 128), value >>= 7; - } - this.buffer_.push(1); - } -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUnsignedVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 18446744073709551616 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeSignedVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.writeUnsignedVarint32((value << 1 ^ value >> 31) >>> 0); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitZigzag64(value); - this.writeSplitVarint64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeZigzagVarint64String = function(value) { - var self = this; - module$contents$jspb$utils_splitDecimalString(value); - module$contents$jspb$utils_toZigzag64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High(), function(lo, hi) { - self.writeSplitVarint64(lo >>> 0, hi >>> 0); - }); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint8 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 256 > value); - this.buffer_.push(value >>> 0 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint16 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 65536 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 4294967296 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); - this.buffer_.push(value >>> 16 & 255); - this.buffer_.push(value >>> 24 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeUint64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(0 <= value && 18446744073709551616 > value); - module$contents$jspb$utils_splitUint64(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); - this.writeUint32(module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt8 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-128 <= value && 128 > value); - this.buffer_.push(value >>> 0 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt16 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-32768 <= value && 32768 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt32 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.buffer_.push(value >>> 0 & 255); - this.buffer_.push(value >>> 8 & 255); - this.buffer_.push(value >>> 16 & 255); - this.buffer_.push(value >>> 24 & 255); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt64 = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= value && 9223372036854775808 > value); - module$contents$jspb$utils_splitInt64(value); - this.writeSplitFixed64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeInt64String = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-9223372036854775808 <= +value && 9223372036854775808 > +value); - module$contents$jspb$utils_splitDecimalString(value); - this.writeSplitFixed64(module$contents$jspb$utils_getSplit64Low(), module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeFloat = function(value) { - goog.asserts.assert(Infinity === value || -Infinity === value || isNaN(value) || -3.4028234663852886E38 <= value && 3.4028234663852886e+38 >= value); - module$contents$jspb$utils_splitFloat32(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeDouble = function(value) { - goog.asserts.assert(Infinity === value || -Infinity === value || isNaN(value) || -1.7976931348623157E308 <= value && 1.7976931348623157e+308 >= value); - module$contents$jspb$utils_splitFloat64(value); - this.writeUint32(module$contents$jspb$utils_getSplit64Low()); - this.writeUint32(module$contents$jspb$utils_getSplit64High()); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeBool = function(value) { - goog.asserts.assert("boolean" === typeof value || "number" === typeof value); - this.buffer_.push(value ? 1 : 0); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeEnum = function(value) { - goog.asserts.assert(value == Math.floor(value)); - goog.asserts.assert(-2147483648 <= value && 2147483648 > value); - this.writeSignedVarint32(value); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeBytes = function(bytes) { - this.buffer_.push.apply(this.buffer_, bytes); -}; -module$contents$jspb$BinaryEncoder_BinaryEncoder.prototype.writeString = function(value) { - for (var oldLength = this.buffer_.length, i = 0; i < value.length; i++) { - var c = value.charCodeAt(i); - if (128 > c) { - this.buffer_.push(c); - } else { - if (2048 > c) { - this.buffer_.push(c >> 6 | 192), this.buffer_.push(c & 63 | 128); - } else { - if (65536 > c) { - if (55296 <= c && 56319 >= c && i + 1 < value.length) { - var second = value.charCodeAt(i + 1); - 56320 <= second && 57343 >= second && (c = 1024 * (c - 55296) + second - 56320 + 65536, this.buffer_.push(c >> 18 | 240), this.buffer_.push(c >> 12 & 63 | 128), this.buffer_.push(c >> 6 & 63 | 128), this.buffer_.push(c & 63 | 128), i++); - } else { - this.buffer_.push(c >> 12 | 224), this.buffer_.push(c >> 6 & 63 | 128), this.buffer_.push(c & 63 | 128); - } - } - } - } - } - return this.buffer_.length - oldLength; -}; -jspb.BinaryEncoder = module$contents$jspb$BinaryEncoder_BinaryEncoder; -goog.userAgent.product = {}; -goog.userAgent.product.ASSUME_FIREFOX = !1; -goog.userAgent.product.ASSUME_IPHONE = !1; -goog.userAgent.product.ASSUME_IPAD = !1; -goog.userAgent.product.ASSUME_ANDROID = !1; -goog.userAgent.product.ASSUME_CHROME = !1; -goog.userAgent.product.ASSUME_SAFARI = !1; -goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_EDGE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI; -goog.userAgent.product.OPERA = goog.userAgent.OPERA; -goog.userAgent.product.IE = goog.userAgent.IE; -goog.userAgent.product.EDGE = goog.userAgent.EDGE; -goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.labs.userAgent.browser.isFirefox(); -goog.userAgent.product.isIphoneOrIpod_ = function() { - return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod(); -}; -goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.isIphoneOrIpod_(); -goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad(); -goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.labs.userAgent.browser.isAndroidBrowser(); -goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs.userAgent.browser.isChrome(); -goog.userAgent.product.isSafariDesktop_ = function() { - return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos(); -}; -goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.isSafariDesktop_(); -goog.crypt.base64 = {}; -goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; -goog.crypt.base64.ENCODED_VALS = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "+/="; -goog.crypt.base64.ENCODED_VALS_WEBSAFE = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_ + "-_."; -goog.crypt.base64.Alphabet = {DEFAULT:0, NO_PADDING:1, WEBSAFE:2, WEBSAFE_DOT_PADDING:3, WEBSAFE_NO_PADDING:4, }; -goog.crypt.base64.paddingChars_ = "=."; -goog.crypt.base64.isPadding_ = function(char) { - return goog.string.contains(goog.crypt.base64.paddingChars_, char); -}; -goog.crypt.base64.byteToCharMaps_ = {}; -goog.crypt.base64.charToByteMap_ = null; -goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ = goog.userAgent.GECKO || goog.userAgent.WEBKIT && !goog.userAgent.product.SAFARI || goog.userAgent.OPERA; -goog.crypt.base64.HAS_NATIVE_ENCODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || "function" == typeof goog.global.btoa; -goog.crypt.base64.HAS_NATIVE_DECODE_ = goog.crypt.base64.ASSUME_NATIVE_SUPPORT_ || !goog.userAgent.product.SAFARI && !goog.userAgent.IE && "function" == typeof goog.global.atob; -goog.crypt.base64.encodeByteArray = function(input, alphabet) { - goog.asserts.assert(goog.isArrayLike(input), "encodeByteArray takes an array as a parameter"); - void 0 === alphabet && (alphabet = goog.crypt.base64.Alphabet.DEFAULT); - goog.crypt.base64.init_(); - for (var byteToCharMap = goog.crypt.base64.byteToCharMaps_[alphabet], output = [], i = 0; i < input.length; i += 3) { - var byte1 = input[i], haveByte2 = i + 1 < input.length, byte2 = haveByte2 ? input[i + 1] : 0, haveByte3 = i + 2 < input.length, byte3 = haveByte3 ? input[i + 2] : 0, outByte1 = byte1 >> 2, outByte2 = (byte1 & 3) << 4 | byte2 >> 4, outByte3 = (byte2 & 15) << 2 | byte3 >> 6, outByte4 = byte3 & 63; - haveByte3 || (outByte4 = 64, haveByte2 || (outByte3 = 64)); - output.push(byteToCharMap[outByte1], byteToCharMap[outByte2], byteToCharMap[outByte3] || "", byteToCharMap[outByte4] || ""); - } - return output.join(""); -}; -goog.crypt.base64.encodeString = function(input, alphabet) { - return goog.crypt.base64.HAS_NATIVE_ENCODE_ && !alphabet ? goog.global.btoa(input) : goog.crypt.base64.encodeByteArray(goog.crypt.stringToByteArray(input), alphabet); -}; -goog.crypt.base64.decodeString = function(input, useCustomDecoder) { - if (goog.crypt.base64.HAS_NATIVE_DECODE_ && !useCustomDecoder) { - return goog.global.atob(input); - } - var output = ""; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output += String.fromCharCode(b); - }); - return output; -}; -goog.crypt.base64.decodeStringToByteArray = function(input, opt_ignored) { - var output = []; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output.push(b); - }); - return output; -}; -goog.crypt.base64.decodeStringToUint8Array = function(input) { - goog.asserts.assert(!goog.userAgent.IE || goog.userAgent.isVersionOrHigher("10"), "Browser does not support typed arrays"); - var len = input.length, approxByteLength = 3 * len / 4; - approxByteLength % 3 ? approxByteLength = Math.floor(approxByteLength) : goog.crypt.base64.isPadding_(input[len - 1]) && (approxByteLength = goog.crypt.base64.isPadding_(input[len - 2]) ? approxByteLength - 2 : approxByteLength - 1); - var output = new Uint8Array(approxByteLength), outLen = 0; - goog.crypt.base64.decodeStringInternal_(input, function pushByte(b) { - output[outLen++] = b; - }); - return output.subarray(0, outLen); -}; -goog.crypt.base64.decodeStringInternal_ = function(input, pushByte) { - function getByte(default_val) { - for (; nextCharIndex < input.length;) { - var ch = input.charAt(nextCharIndex++), b = goog.crypt.base64.charToByteMap_[ch]; - if (null != b) { - return b; - } - if (!goog.string.isEmptyOrWhitespace(ch)) { - throw Error("Unknown base64 encoding at char: " + ch); - } - } - return default_val; - } - goog.crypt.base64.init_(); - for (var nextCharIndex = 0;;) { - var byte1 = getByte(-1), byte2 = getByte(0), byte3 = getByte(64), byte4 = getByte(64); - if (64 === byte4 && -1 === byte1) { - break; - } - pushByte(byte1 << 2 | byte2 >> 4); - 64 != byte3 && (pushByte(byte2 << 4 & 240 | byte3 >> 2), 64 != byte4 && pushByte(byte3 << 6 & 192 | byte4)); - } -}; -goog.crypt.base64.init_ = function() { - if (!goog.crypt.base64.charToByteMap_) { - goog.crypt.base64.charToByteMap_ = {}; - for (var commonChars = goog.crypt.base64.DEFAULT_ALPHABET_COMMON_.split(""), specialChars = ["+/=", "+/", "-_=", "-_.", "-_", ], i = 0; 5 > i; i++) { - var chars = commonChars.concat(specialChars[i].split("")); - goog.crypt.base64.byteToCharMaps_[i] = chars; - for (var j = 0; j < chars.length; j++) { - var char = chars[j], existingByte = goog.crypt.base64.charToByteMap_[char]; - void 0 === existingByte ? goog.crypt.base64.charToByteMap_[char] = j : goog.asserts.assert(existingByte === j); - } - } - } -}; -var module$contents$jspb$BinaryWriter_BinaryWriter = function() { - this.blocks_ = []; - this.totalLength_ = 0; - this.encoder_ = new module$contents$jspb$BinaryEncoder_BinaryEncoder; - this.bookmarks_ = []; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.appendUint8Array_ = function(arr) { - var temp = this.encoder_.end(); - this.blocks_.push(temp); - this.blocks_.push(arr); - this.totalLength_ += temp.length + arr.length; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.beginDelimited_ = function(field) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - var bookmark = this.encoder_.end(); - this.blocks_.push(bookmark); - this.totalLength_ += bookmark.length; - bookmark.push(this.totalLength_); - return bookmark; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.endDelimited_ = function(bookmark) { - var oldLength = bookmark.pop(), messageLength = this.totalLength_ + this.encoder_.length() - oldLength; - for ((0,goog.asserts.assert)(0 <= messageLength); 127 < messageLength;) { - bookmark.push(messageLength & 127 | 128), messageLength >>>= 7, this.totalLength_++; - } - bookmark.push(messageLength); - this.totalLength_++; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSerializedMessage = function(bytes, start, end) { - this.appendUint8Array_(bytes.subarray(start, end)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.maybeWriteSerializedMessage = function(bytes, start, end) { - null != bytes && null != start && null != end && this.writeSerializedMessage(bytes, start, end); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.reset = function() { - this.blocks_ = []; - this.encoder_.end(); - this.totalLength_ = 0; - this.bookmarks_ = []; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.getResultBuffer = function() { - (0,goog.asserts.assert)(0 == this.bookmarks_.length); - for (var flat = new Uint8Array(this.totalLength_ + this.encoder_.length()), blocks = this.blocks_, blockCount = blocks.length, offset = 0, i = 0; i < blockCount; i++) { - var block = blocks[i]; - flat.set(block, offset); - offset += block.length; - } - var tail = this.encoder_.end(); - flat.set(tail, offset); - offset += tail.length; - (0,goog.asserts.assert)(offset == flat.length); - this.blocks_ = [flat]; - return flat; -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.getResultBase64String = function(alphabet) { - return (0,goog.crypt.base64.encodeByteArray)(this.getResultBuffer(), alphabet); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.beginSubMessage = function(field) { - this.bookmarks_.push(this.beginDelimited_(field)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.endSubMessage = function() { - (0,goog.asserts.assert)(0 <= this.bookmarks_.length); - this.endDelimited_(this.bookmarks_.pop()); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFieldHeader_ = function(field, wireType) { - (0,goog.asserts.assert)(1 <= field && field == Math.floor(field)); - this.encoder_.writeUnsignedVarint32(8 * field + wireType); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeAny = function(fieldType, field, value) { - switch(fieldType) { - case module$contents$jspb$BinaryConstants_FieldType.DOUBLE: - this.writeDouble(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FLOAT: - this.writeFloat(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.INT64: - this.writeInt64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.UINT64: - this.writeUint64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.INT32: - this.writeInt32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FIXED64: - this.writeFixed64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.FIXED32: - this.writeFixed32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.BOOL: - this.writeBool(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.STRING: - this.writeString(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.GROUP: - (0,goog.asserts.fail)("Group field type not supported in writeAny()"); - break; - case module$contents$jspb$BinaryConstants_FieldType.MESSAGE: - (0,goog.asserts.fail)("Message field type not supported in writeAny()"); - break; - case module$contents$jspb$BinaryConstants_FieldType.BYTES: - this.writeBytes(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.UINT32: - this.writeUint32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.ENUM: - this.writeEnum(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SFIXED32: - this.writeSfixed32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SFIXED64: - this.writeSfixed64(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SINT32: - this.writeSint32(field, value); - break; - case module$contents$jspb$BinaryConstants_FieldType.SINT64: - this.writeSint64(field, value); - break; - default: - (0,goog.asserts.fail)("Invalid field type in writeAny()"); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUnsignedVarint32_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeUnsignedVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSignedVarint32_ = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertSignedInteger(field, value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeSignedVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUnsignedVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeUnsignedVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSignedVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeSignedVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint32_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint64_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeZigzagVarint64String_ = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeZigzagVarint64String(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeSignedVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt32String = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertThat(field, intValue, -2147483648 <= intValue && 2147483648 > intValue); - this.writeSignedVarint32_(field, intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeSignedVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeInt64String = function(field, value) { - if (null != value) { - var num = jspb.arith.Int64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 4294967296 > value), this.writeUnsignedVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint32String = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= intValue && 4294967296 > intValue); - this.writeUnsignedVarint32_(field, intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 18446744073709551616 > value), this.writeUnsignedVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeUint64String = function(field, value) { - if (null != value) { - var num = jspb.arith.UInt64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeZigzagVarint32_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeZigzagVarint64_(field, value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSint64String = function(field, value) { - null != value && this.writeZigzagVarint64String_(field, value); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 4294967296 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeUint32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, 0 <= value && 18446744073709551616 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeUint64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFixed64String = function(field, value) { - if (null != value) { - var num = jspb.arith.UInt64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed32 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeInt32(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed64 = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, -9223372036854775808 <= value && 9223372036854775808 > value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeInt64(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSfixed64String = function(field, value) { - if (null != value) { - var num = jspb.arith.Int64.fromString(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeFloat = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED32), this.encoder_.writeFloat(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeDouble = function(field, value) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64), this.encoder_.writeDouble(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeBool = function(field, value) { - null != value && (module$contents$jspb$BinaryWriter_assertThat(field, value, "boolean" === typeof value || "number" === typeof value), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT), this.encoder_.writeBool(value)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeEnum = function(field, value) { - if (null != value) { - var intValue = parseInt(value, 10); - module$contents$jspb$BinaryWriter_assertSignedInteger(field, intValue); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSignedVarint32(intValue); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeString = function(field, value) { - if (null != value) { - var bookmark = this.beginDelimited_(field); - this.encoder_.writeString(value); - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeBytes = function(field, value) { - if (null != value) { - var bytes = module$contents$jspb$utils_byteSourceToUint8Array(value); - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(bytes.length); - this.appendUint8Array_(bytes); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessage = function(field, value, writerCallback) { - if (null != value) { - var bookmark = this.beginDelimited_(field); - writerCallback(value, this); - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessageSet = function(field, value, writerCallback) { - if (null != value) { - this.writeFieldHeader_(1, module$contents$jspb$BinaryConstants_WireType.START_GROUP); - this.writeFieldHeader_(2, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSignedVarint32(field); - var bookmark = this.beginDelimited_(3); - writerCallback(value, this); - this.endDelimited_(bookmark); - this.writeFieldHeader_(1, module$contents$jspb$BinaryConstants_WireType.END_GROUP); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeGroup = function(field, value, writerCallback) { - null != value && (this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.START_GROUP), writerCallback(value, this), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.END_GROUP)); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitFixed64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.FIXED64); - this.encoder_.writeSplitFixed64(lowBits, highBits); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitVarint64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitVarint64(lowBits, highBits); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeSplitZigzagVarint64 = function(field, lowBits, highBits) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.VARINT); - this.encoder_.writeSplitZigzagVarint64(lowBits >>> 0, highBits >>> 0); -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSignedVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt32String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeInt32String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSignedVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitFixed64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitFixed64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitVarint64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSplitZigzagVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSplitZigzagVarint64(field, lo(value[i]), hi(value[i])); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedInt64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeInt64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUnsignedVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint32String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUint32String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUnsignedVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedUint64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeUint64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint32_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint64_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSint64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeZigzagVarint64String_(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed32(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed64(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFixed64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFixed64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed32 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed32(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed64 = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed64(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedSfixed64String = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeSfixed64String(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedFloat = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFloat(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedDouble = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeDouble(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedBool = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeBool(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedEnum = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeEnum(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedString = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeString(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedBytes = function(field, value) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeBytes(field, value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedMessage = function(field, value, writerCallback) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - var bookmark = this.beginDelimited_(field); - writerCallback(value[i], this); - this.endDelimited_(bookmark); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeRepeatedGroup = function(field, value, writerCallback) { - if (null != value) { - for (var i = 0; i < value.length; i++) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.START_GROUP), writerCallback(value[i], this), this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.END_GROUP); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - module$contents$jspb$BinaryWriter_assertSignedInteger(field, value[i]), this.encoder_.writeSignedVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt32String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var intValue = parseInt(value[i], 10); - module$contents$jspb$BinaryWriter_assertSignedInteger(field, intValue); - this.encoder_.writeSignedVarint32(intValue); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSignedVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitFixed64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSplitFixed64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeSplitVarint64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSplitZigzagVarint64 = function(field, value, lo, hi) { - if (null != value) { - for (var bookmark = this.beginDelimited_(field), encoder = this.encoder_, i = 0; i < value.length; i++) { - encoder.writeSplitZigzagVarint64(lo(value[i]), hi(value[i])); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedInt64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var num = jspb.arith.Int64.fromString(value[i]); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint32String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint32(parseInt(value[i], 10)); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeUnsignedVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedUint64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - var num = jspb.arith.UInt64.fromString(value[i]); - this.encoder_.writeSplitVarint64(num.lo, num.hi); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint32 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint32(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint64 = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint64(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSint64String = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeZigzagVarint64String(value[i]); - } - this.endDelimited_(bookmark); - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed32 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeUint32(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed64 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeUint64(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFixed64String = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - var num = jspb.arith.UInt64.fromString(value[i]); - this.encoder_.writeSplitFixed64(num.lo, num.hi); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed32 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt32(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed64 = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt64(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedSfixed64String = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeInt64String(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedFloat = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(4 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeFloat(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedDouble = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(8 * value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeDouble(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedBool = function(field, value) { - if (null != value && value.length) { - this.writeFieldHeader_(field, module$contents$jspb$BinaryConstants_WireType.DELIMITED); - this.encoder_.writeUnsignedVarint32(value.length); - for (var i = 0; i < value.length; i++) { - this.encoder_.writeBool(value[i]); - } - } -}; -module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writePackedEnum = function(field, value) { - if (null != value && value.length) { - for (var bookmark = this.beginDelimited_(field), i = 0; i < value.length; i++) { - this.encoder_.writeEnum(value[i]); - } - this.endDelimited_(bookmark); - } -}; -function module$contents$jspb$BinaryWriter_assertSignedInteger(field, value) { - module$contents$jspb$BinaryWriter_assertThat(field, value, value === Math.floor(value)); - module$contents$jspb$BinaryWriter_assertThat(field, value, -2147483648 <= value && 2147483648 > value); -} -function module$contents$jspb$BinaryWriter_assertThat(field, value, condition) { - condition || (0,goog.asserts.fail)("for [" + value + "] at [" + field + "]"); -} -jspb.BinaryWriter = module$contents$jspb$BinaryWriter_BinaryWriter; -var module$exports$jspb$Freezer$Loading$Info = {isFreezerLoaded:!1}; -var module$contents$jspb$Map_Map = function(arr, valueCtor) { - this.arr_ = arr; - this.valueCtor = valueCtor; - this.map = {}; - this.arrClean = !0; - this.markMessageFrozenFn_ = null; - 0 < this.arr_.length && this.loadFromArray_(); -}; -module$contents$jspb$Map_Map.prototype.isFrozen = function() { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && null != this.markMessageFrozenFn_; -}; -module$contents$jspb$Map_Map.prototype.internalMarkFrozen = function(markMessageFrozenFn) { - goog.asserts.assert(module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded); - this.markMessageFrozenFn_ = markMessageFrozenFn; -}; -module$contents$jspb$Map_Map.prototype.checkNotFrozen_ = function() { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && this.isFrozen()) { - throw Error("Cannot mutate a frozen Map"); - } -}; -module$contents$jspb$Map_Map.prototype.loadFromArray_ = function() { - for (var i = 0; i < this.arr_.length; i++) { - var record = this.arr_[i], key = record[0]; - this.map[key.toString()] = new module$contents$jspb$Map_Entry_(key, record[1]); - } - this.arrClean = !0; -}; -module$contents$jspb$Map_Map.prototype.toArray = function() { - this.checkNotFrozen_(); - return this.syncInternalArray_(!1); -}; -module$contents$jspb$Map_Map.prototype.toArrayInternal = function() { - return this.syncInternalArray_(!0); -}; -module$contents$jspb$Map_Map.prototype.toArrayHelper_ = function(msg, internalCall) { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && internalCall ? msg.toArrayInternal() : msg.toArray(); -}; -module$contents$jspb$Map_Map.prototype.syncInternalArray_ = function(internalCall) { - if (this.arrClean) { - if (this.valueCtor) { - var m = this.map, p; - for (p in m) { - if (Object.prototype.hasOwnProperty.call(m, p)) { - var valueWrapper = m[p].valueWrapper; - valueWrapper && this.toArrayHelper_(valueWrapper, internalCall); - } - } - } - } else { - this.arr_.length = 0; - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - (valueWrapper = entry.valueWrapper) && this.toArrayHelper_(valueWrapper, internalCall); - this.arr_.push([entry.key, entry.value]); - } - this.arrClean = !0; - } - return this.arr_; -}; -module$contents$jspb$Map_Map.prototype.toObject = function(includeInstance, valueToObject) { - for (var rawArray = this.toArrayInternal(), entries = [], i = 0; i < rawArray.length; i++) { - var entry = this.map[rawArray[i][0].toString()]; - this.wrapEntry_(entry); - var valueWrapper = entry.valueWrapper; - valueWrapper ? (goog.asserts.assert(valueToObject), entries.push([entry.key, valueToObject(includeInstance, valueWrapper)])) : entries.push([entry.key, entry.value]); - } - return entries; -}; -module$contents$jspb$Map_Map.fromObject = function(entries, valueCtor, valueFromObject) { - for (var result = new module$contents$jspb$Map_Map([], valueCtor), i = 0; i < entries.length; i++) { - var key = entries[i][0], value = valueFromObject(entries[i][1]); - result.set(key, value); - } - return result; -}; -module$contents$jspb$Map_Map.prototype.getLength = function() { - return this.stringKeys_().length; -}; -module$contents$jspb$Map_Map.prototype.clear = function() { - this.checkNotFrozen_(); - this.map = {}; - this.arrClean = !1; -}; -module$contents$jspb$Map_Map.prototype.del = function(key) { - this.checkNotFrozen_(); - var keyValue = key.toString(), hadKey = this.map.hasOwnProperty(keyValue); - delete this.map[keyValue]; - this.arrClean = !1; - return hadKey; -}; -module$contents$jspb$Map_Map.prototype.getEntryList = function() { - var entries = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - entries.push([entry.key, entry.value]); - } - return entries; -}; -module$contents$jspb$Map_Map.prototype.entries = function() { - var entries = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - entries.push([entry.key, this.wrapEntry_(entry)]); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(entries); -}; -module$contents$jspb$Map_Map.prototype.keys = function() { - var keys = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - keys.push(this.map[strKeys[i]].key); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(keys); -}; -module$contents$jspb$Map_Map.prototype.values = function() { - var values = [], strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - values.push(this.wrapEntry_(this.map[strKeys[i]])); - } - return new module$contents$jspb$Map_ArrayIteratorIterable(values); -}; -module$contents$jspb$Map_Map.prototype.forEach = function(cb, thisArg) { - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - cb.call(thisArg, this.wrapEntry_(entry), entry.key, this); - } -}; -module$contents$jspb$Map_Map.prototype.set = function(key, value) { - this.checkNotFrozen_(); - var entry = new module$contents$jspb$Map_Entry_(key); - this.valueCtor ? (entry.valueWrapper = value, entry.value = value.toArrayInternal()) : entry.value = value; - this.map[key.toString()] = entry; - this.arrClean = !1; - return this; -}; -module$contents$jspb$Map_Map.prototype.setRawData = function(key, rawData) { - this.map[key.toString()] = new module$contents$jspb$Map_Entry_(key, rawData); - this.arrClean = !1; -}; -module$contents$jspb$Map_Map.prototype.wrapEntry_ = function(entry) { - return this.valueCtor ? (entry.valueWrapper || (entry.valueWrapper = new this.valueCtor(entry.value), this.isFrozen() && (goog.asserts.assert(null != this.markMessageFrozenFn_), this.markMessageFrozenFn_(entry.valueWrapper))), entry.valueWrapper) : entry.value; -}; -module$contents$jspb$Map_Map.prototype.get = function(key) { - var entry = this.map[key.toString()]; - if (entry) { - return this.wrapEntry_(entry); - } -}; -module$contents$jspb$Map_Map.prototype.has = function(key) { - return key.toString() in this.map; -}; -module$contents$jspb$Map_Map.prototype.serializeBinary = function(fieldNumber, writer, keyWriterFn, valueWriterFn, valueWriterCallback) { - var strKeys = this.stringKeys_(); - strKeys.sort(); - for (var i = 0; i < strKeys.length; i++) { - var entry = this.map[strKeys[i]]; - writer.beginSubMessage(fieldNumber); - keyWriterFn.call(writer, 1, entry.key); - this.valueCtor ? valueWriterFn.call(writer, 2, this.wrapEntry_(entry), valueWriterCallback) : valueWriterFn.call(writer, 2, entry.value); - writer.endSubMessage(); - } -}; -module$contents$jspb$Map_Map.deserializeBinary = function(map, reader, keyReaderFn, valueReaderFn, valueReaderCallback, defaultKey, defaultValue) { - for (var key = defaultKey, value = defaultValue; reader.nextField() && !reader.isEndGroup();) { - var field = reader.getFieldNumber(); - 1 == field ? key = keyReaderFn.call(reader) : 2 == field && (map.valueCtor ? (goog.asserts.assert(valueReaderCallback), value || (value = new map.valueCtor), valueReaderFn.call(reader, value, valueReaderCallback)) : value = valueReaderFn.call(reader)); - } - goog.asserts.assert(void 0 != key); - goog.asserts.assert(void 0 != value); - map.set(key, value); -}; -module$contents$jspb$Map_Map.prototype.stringKeys_ = function() { - var m = this.map, ret = [], p; - for (p in m) { - Object.prototype.hasOwnProperty.call(m, p) && ret.push(p); - } - return ret; -}; -var module$contents$jspb$Map_Entry_ = function(key, value) { - this.key = key; - this.value = value; - this.valueWrapper = void 0; -}, module$contents$jspb$Map_ArrayIteratorIterable = function(arr) { - this.idx_ = 0; - this.arr_ = arr; -}; -module$contents$jspb$Map_ArrayIteratorIterable.prototype.next = function() { - return this.idx_ < this.arr_.length ? {done:!1, value:this.arr_[this.idx_++]} : {done:!0, value:void 0}; -}; -"undefined" != typeof Symbol && "undefined" != typeof Symbol.iterator && (module$contents$jspb$Map_ArrayIteratorIterable.prototype[Symbol.iterator] = function() { - return this; -}); -jspb.Map = module$contents$jspb$Map_Map; -var module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo = function(fieldNumber, fieldName, ctor, toObjectFn, isRepeated) { - this.fieldIndex = fieldNumber; - this.fieldName = fieldName; - this.ctor = ctor; - this.toObjectFn = toObjectFn; - this.isRepeated = isRepeated; -}; -module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo.prototype.isMessageType = function() { - return !!this.ctor; -}; -jspb.ExtensionFieldInfo = module$contents$jspb$ExtensionFieldInfo_ExtensionFieldInfo; -jspb.ExtensionFieldBinaryInfo = function(fieldInfo, binaryReaderFn, binaryWriterFn, binaryMessageSerializeFn, binaryMessageDeserializeFn, isPacked) { - this.fieldInfo = fieldInfo; - this.binaryReaderFn = binaryReaderFn; - this.binaryWriterFn = binaryWriterFn; - this.binaryMessageSerializeFn = binaryMessageSerializeFn; - this.binaryMessageDeserializeFn = binaryMessageDeserializeFn; - this.isPacked = isPacked || !1; -}; -var module$contents$jspb$Message_Message = function() { -}; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT = !0; -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT = !goog.DISALLOW_TEST_ONLY_CODE; -module$contents$jspb$Message_Message.GENERATE_TO_STRING = !0; -module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS = !0; -module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ = "function" == typeof Uint8Array; -module$contents$jspb$Message_Message.prototype.getJsPbMessageId = function() { - return this.messageId_; -}; -module$contents$jspb$Message_Message.getIndex_ = function(msg, fieldNumber) { - return fieldNumber + msg.arrayIndexOffset_; -}; -module$contents$jspb$Message_Message.hiddenES6Property_ = function() { -}; -module$contents$jspb$Message_Message.getFieldNumber = function(msg, index) { - return index - msg.arrayIndexOffset_; -}; -module$contents$jspb$Message_Message.initialize = function(msg, data, messageId, suggestedPivot, repeatedFields, opt_oneofFields) { - msg.wrappers_ = null; - data || (data = messageId ? [messageId] : []); - msg.messageId_ = messageId ? String(messageId) : void 0; - msg.arrayIndexOffset_ = 0 === messageId ? -1 : 0; - msg.array = data; - module$contents$jspb$Message_Message.initPivotAndExtensionObject_(msg, suggestedPivot); - msg.convertedPrimitiveFields_ = {}; - module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS || (msg.repeatedFields = repeatedFields); - if (repeatedFields) { - for (var i = 0; i < repeatedFields.length; i++) { - var fieldNumber = repeatedFields[i]; - if (fieldNumber < msg.pivot_) { - var index = module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber); - msg.array[index] = msg.array[index] || module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_; - } else { - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), msg.extensionObject_[fieldNumber] = msg.extensionObject_[fieldNumber] || module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_; - } - } - } - if (opt_oneofFields && opt_oneofFields.length) { - for (i = 0; i < opt_oneofFields.length; i++) { - module$contents$jspb$Message_Message.computeOneofCase(msg, opt_oneofFields[i]); - } - } -}; -module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ = goog.DEBUG && Object.freeze ? Object.freeze([]) : []; -module$contents$jspb$Message_Message.isExtensionObject = function(o) { - return null !== o && "object" == typeof o && !Array.isArray(o) && !(module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && o instanceof Uint8Array); -}; -module$contents$jspb$Message_Message.initPivotAndExtensionObject_ = function(msg, suggestedPivot) { - var msgLength = msg.array.length, lastIndex = -1; - if (msgLength) { - lastIndex = msgLength - 1; - var obj = msg.array[lastIndex]; - if (module$contents$jspb$Message_Message.isExtensionObject(obj)) { - msg.pivot_ = module$contents$jspb$Message_Message.getFieldNumber(msg, lastIndex); - msg.extensionObject_ = obj; - return; - } - } - -1 < suggestedPivot ? (msg.pivot_ = Math.max(suggestedPivot, module$contents$jspb$Message_Message.getFieldNumber(msg, lastIndex + 1)), msg.extensionObject_ = null) : msg.pivot_ = Number.MAX_VALUE; -}; -module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_ = function(msg) { - var pivotIndex = module$contents$jspb$Message_Message.getIndex_(msg, msg.pivot_); - msg.array[pivotIndex] || (module$contents$jspb$Message_Message.isFrozen(msg) ? (msg.extensionObject_ = {}, Object.freeze(msg.extensionObject_)) : msg.extensionObject_ = msg.array[pivotIndex] = {}); -}; -module$contents$jspb$Message_Message.toObjectList = function(field, toObjectFn, opt_includeInstance) { - for (var result = [], i = 0; i < field.length; i++) { - result[i] = toObjectFn.call(field[i], opt_includeInstance, field[i]); - } - return result; -}; -module$contents$jspb$Message_Message.toObjectExtension = function(proto, obj, extensions, getExtensionFn, opt_includeInstance) { - for (var fieldNumber in extensions) { - if (module$contents$jspb$Message_hasOwnProperty(extensions, fieldNumber)) { - var fieldInfo = extensions[fieldNumber], value = getExtensionFn.call(proto, fieldInfo); - if (null != value) { - for (var name in fieldInfo.fieldName) { - if (fieldInfo.fieldName.hasOwnProperty(name)) { - break; - } - } - obj[name] = fieldInfo.toObjectFn ? fieldInfo.isRepeated ? module$contents$jspb$Message_Message.toObjectList(value, fieldInfo.toObjectFn, opt_includeInstance) : fieldInfo.toObjectFn(opt_includeInstance, value) : value; - } - } - } -}; -module$contents$jspb$Message_Message.serializeBinaryExtensions = function(proto, writer, extensions, getExtensionFn) { - for (var fieldNumber in extensions) { - if (module$contents$jspb$Message_hasOwnProperty(extensions, fieldNumber)) { - var binaryFieldInfo = extensions[fieldNumber], fieldInfo = binaryFieldInfo.fieldInfo; - if (!binaryFieldInfo.binaryWriterFn) { - throw Error("Message extension present that was generated without binary serialization support"); - } - var value = getExtensionFn.call(proto, fieldInfo); - if (null != value) { - if (fieldInfo.isMessageType()) { - if (binaryFieldInfo.binaryMessageSerializeFn) { - binaryFieldInfo.binaryWriterFn.call(writer, fieldInfo.fieldIndex, value, binaryFieldInfo.binaryMessageSerializeFn); - } else { - throw Error("Message extension present holding submessage without binary support enabled, and message is being serialized to binary format"); - } - } else { - binaryFieldInfo.binaryWriterFn.call(writer, fieldInfo.fieldIndex, value); - } - } - } - } -}; -module$contents$jspb$Message_Message.readBinaryExtensionMessageSet = function(msg, reader, extensions, getExtensionFn, setExtensionFn) { - if (1 == reader.getFieldNumber() && reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.START_GROUP) { - for (var fieldNumber = 0, rawBytes = null; reader.nextField() && (0 != reader.getWireType() || 0 != reader.getFieldNumber());) { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.VARINT && 2 == reader.getFieldNumber()) { - fieldNumber = reader.readUint32(); - } else { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.DELIMITED && 3 == reader.getFieldNumber()) { - rawBytes = reader.readBytes(); - } else { - if (reader.getWireType() == module$contents$jspb$BinaryConstants_WireType.END_GROUP) { - break; - } else { - reader.skipField(); - } - } - } - } - if (1 != reader.getFieldNumber() || reader.getWireType() != module$contents$jspb$BinaryConstants_WireType.END_GROUP || null == rawBytes || 0 == fieldNumber) { - throw Error("Malformed binary bytes for message set"); - } - var binaryFieldInfo = extensions[fieldNumber]; - if (binaryFieldInfo) { - var fieldInfo = binaryFieldInfo.fieldInfo, newValue = new fieldInfo.ctor; - binaryFieldInfo.binaryMessageDeserializeFn.call(newValue, newValue, new module$contents$jspb$BinaryReader_BinaryReader(rawBytes)); - setExtensionFn.call(msg, fieldInfo, newValue); - } - } else { - reader.skipField(); - } -}; -module$contents$jspb$Message_Message.readBinaryExtension = function(msg, reader, extensions, getExtensionFn, setExtensionFn) { - var binaryFieldInfo = extensions[reader.getFieldNumber()]; - if (binaryFieldInfo) { - var fieldInfo = binaryFieldInfo.fieldInfo; - if (!binaryFieldInfo.binaryReaderFn) { - throw Error("Deserializing extension whose generated code does not support binary format"); - } - if (fieldInfo.isMessageType()) { - var value = new fieldInfo.ctor; - binaryFieldInfo.binaryReaderFn.call(reader, value, binaryFieldInfo.binaryMessageDeserializeFn); - } else { - value = binaryFieldInfo.binaryReaderFn.call(reader); - } - if (fieldInfo.isRepeated && !binaryFieldInfo.isPacked) { - var currentList = getExtensionFn.call(msg, fieldInfo); - currentList ? currentList.push(value) : setExtensionFn.call(msg, fieldInfo, [value]); - } else { - setExtensionFn.call(msg, fieldInfo, value); - } - } else { - reader.skipField(); - } -}; -module$contents$jspb$Message_Message.getField = function(msg, fieldNumber) { - if (fieldNumber < msg.pivot_) { - var index = module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber), val = msg.array[index]; - return val !== module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ || module$contents$jspb$Message_Message.isFrozen(msg) ? val : msg.array[index] = []; - } - if (msg.extensionObject_) { - return val = msg.extensionObject_[fieldNumber], val === module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ ? msg.extensionObject_[fieldNumber] = [] : val; - } -}; -module$contents$jspb$Message_Message.hasField = function(msg, fieldNumber) { - return null != module$contents$jspb$Message_Message.getField(msg, fieldNumber); -}; -module$contents$jspb$Message_Message.getRepeatedField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.getOptionalFloatingPointField = function(msg, fieldNumber) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? value : +value; -}; -module$contents$jspb$Message_Message.getBooleanField = function(msg, fieldNumber) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? value : !!value; -}; -module$contents$jspb$Message_Message.getRepeatedFloatingPointField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - msg.convertedPrimitiveFields_ || (msg.convertedPrimitiveFields_ = {}); - if (!msg.convertedPrimitiveFields_[fieldNumber]) { - for (var i = 0; i < values.length; i++) { - values[i] = +values[i]; - } - msg.convertedPrimitiveFields_[fieldNumber] = !0; - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.getRepeatedBooleanField = function(msg, fieldNumber) { - var values = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - msg.convertedPrimitiveFields_ || (msg.convertedPrimitiveFields_ = {}); - if (!msg.convertedPrimitiveFields_[fieldNumber]) { - for (var i = 0; i < values.length; i++) { - values[i] = !!values[i]; - } - msg.convertedPrimitiveFields_[fieldNumber] = !0; - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(values); - return values; -}; -module$contents$jspb$Message_Message.bytesAsB64 = function(value) { - if (null == value || "string" === typeof value) { - return value; - } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && value instanceof Uint8Array) { - return goog.crypt.base64.encodeByteArray(value); - } - goog.asserts.fail("Cannot coerce to b64 string: " + goog.typeOf(value)); - return null; -}; -module$contents$jspb$Message_Message.bytesAsU8 = function(value) { - if (null == value || value instanceof Uint8Array) { - return value; - } - if ("string" === typeof value) { - return goog.crypt.base64.decodeStringToUint8Array(value); - } - goog.asserts.fail("Cannot coerce to Uint8Array: " + goog.typeOf(value)); - return null; -}; -module$contents$jspb$Message_Message.bytesListAsB64 = function(value) { - module$contents$jspb$Message_Message.assertConsistentTypes_(value); - return value.length && "string" !== typeof value[0] ? module$contents$goog$array_map(value, module$contents$jspb$Message_Message.bytesAsB64) : value; -}; -module$contents$jspb$Message_Message.bytesListAsU8 = function(value) { - module$contents$jspb$Message_Message.assertConsistentTypes_(value); - return !value.length || value[0] instanceof Uint8Array ? value : module$contents$goog$array_map(value, module$contents$jspb$Message_Message.bytesAsU8); -}; -module$contents$jspb$Message_Message.assertConsistentTypes_ = function(array) { - if (goog.DEBUG && array && 1 < array.length) { - var expected = goog.typeOf(array[0]); - module$contents$goog$array_forEach(array, function(e) { - goog.typeOf(e) != expected && goog.asserts.fail("Inconsistent type in JSPB repeated field array. Got " + goog.typeOf(e) + " expected " + expected); - }); - } -}; -module$contents$jspb$Message_Message.getFieldWithDefault = function(msg, fieldNumber, defaultValue) { - var value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getIntegerFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? 0 : defaultValue); -}; -module$contents$jspb$Message_Message.getStringFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? "" : defaultValue); -}; -module$contents$jspb$Message_Message.getIntegerInStringFieldWithDefault = function(msg, fieldNumber, defaultValue) { - return module$contents$jspb$Message_Message.getFieldWithDefault(msg, fieldNumber, void 0 === defaultValue ? "0" : defaultValue); -}; -module$contents$jspb$Message_Message.getBooleanFieldWithDefault = function(msg, fieldNumber, defaultValue) { - defaultValue = void 0 === defaultValue ? !1 : defaultValue; - var value = module$contents$jspb$Message_Message.getBooleanField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault = function(msg, fieldNumber, defaultValue) { - defaultValue = void 0 === defaultValue ? 0.0 : defaultValue; - var value = module$contents$jspb$Message_Message.getOptionalFloatingPointField(msg, fieldNumber); - return null == value ? defaultValue : value; -}; -module$contents$jspb$Message_Message.getFieldProto3 = module$contents$jspb$Message_Message.getFieldWithDefault; -module$contents$jspb$Message_Message.getMapField = function(msg, fieldNumber, noLazyCreate, opt_valueCtor) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (fieldNumber in msg.wrappers_) { - return msg.wrappers_[fieldNumber]; - } - var arr = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - if (!arr) { - if (noLazyCreate) { - return; - } - arr = []; - module$contents$jspb$Message_Message.isFrozen(msg) || module$contents$jspb$Message_Message.setField(msg, fieldNumber, arr); - } - var jspbMap = new module$contents$jspb$Map_Map(arr, opt_valueCtor); - module$contents$jspb$Message_Message.isFrozen(msg) && jspbMap.internalMarkFrozen(module$contents$jspb$Message_Message.internalMarkFrozen); - return msg.wrappers_[fieldNumber] = jspbMap; -}; -module$contents$jspb$Message_Message.setField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - fieldNumber < msg.pivot_ ? msg.array[module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber)] = value : (module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), msg.extensionObject_[fieldNumber] = value); - return msg; -}; -module$contents$jspb$Message_Message.clearField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, void 0); -}; -module$contents$jspb$Message_Message.clearRepeatedField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, []); -}; -module$contents$jspb$Message_Message.clearWrapperField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setWrapperField(msg, fieldNumber, void 0); -}; -module$contents$jspb$Message_Message.clearRepeatedWrapperField = function(msg, fieldNumber) { - return module$contents$jspb$Message_Message.setRepeatedWrapperField(msg, fieldNumber, []); -}; -module$contents$jspb$Message_Message.clearOneofField = function(msg, fieldNumber, oneof) { - return module$contents$jspb$Message_Message.setOneofField(msg, fieldNumber, oneof, void 0); -}; -module$contents$jspb$Message_Message.clearOneofWrapperField = function(msg, fieldNumber, oneof) { - return module$contents$jspb$Message_Message.setOneofWrapperField(msg, fieldNumber, oneof, void 0); -}; -module$contents$jspb$Message_Message.setProto3IntField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0); -}; -module$contents$jspb$Message_Message.setProto3FloatField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0.0); -}; -module$contents$jspb$Message_Message.setProto3BooleanField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, !1); -}; -module$contents$jspb$Message_Message.setProto3StringField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, ""); -}; -module$contents$jspb$Message_Message.setProto3BytesField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, ""); -}; -module$contents$jspb$Message_Message.setProto3EnumField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, 0); -}; -module$contents$jspb$Message_Message.setProto3StringIntField = function(msg, fieldNumber, value) { - return module$contents$jspb$Message_Message.setFieldIgnoringDefault_(msg, fieldNumber, value, "0"); -}; -module$contents$jspb$Message_Message.setFieldIgnoringDefault_ = function(msg, fieldNumber, value, defaultValue) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - value !== defaultValue ? module$contents$jspb$Message_Message.setField(msg, fieldNumber, value) : fieldNumber < msg.pivot_ ? msg.array[module$contents$jspb$Message_Message.getIndex_(msg, fieldNumber)] = null : (module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(msg), delete msg.extensionObject_[fieldNumber]); - return msg; -}; -module$contents$jspb$Message_Message.addToRepeatedField = function(msg, fieldNumber, value, opt_index) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var arr = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber); - void 0 != opt_index ? arr.splice(opt_index, 0, value) : arr.push(value); - return msg; -}; -module$contents$jspb$Message_Message.setOneofField = function(msg, fieldNumber, oneof, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var currentCase = module$contents$jspb$Message_Message.computeOneofCase(msg, oneof); - currentCase && currentCase !== fieldNumber && void 0 !== value && (msg.wrappers_ && currentCase in msg.wrappers_ && (msg.wrappers_[currentCase] = void 0), module$contents$jspb$Message_Message.setField(msg, currentCase, void 0)); - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, value); -}; -module$contents$jspb$Message_Message.computeOneofCase = function(msg, oneof) { - for (var oneofField, oneofValue, isFrozen = module$contents$jspb$Message_Message.isFrozen(msg), i = 0; i < oneof.length; i++) { - var fieldNumber = oneof[i], value = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - null != value && (oneofField = fieldNumber, oneofValue = value, isFrozen || module$contents$jspb$Message_Message.setField(msg, fieldNumber, void 0)); - } - return oneofField ? (isFrozen || module$contents$jspb$Message_Message.setField(msg, oneofField, oneofValue), oneofField) : 0; -}; -module$contents$jspb$Message_Message.getWrapperField = function(msg, ctor, fieldNumber, opt_required) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (!msg.wrappers_[fieldNumber]) { - var data = module$contents$jspb$Message_Message.getField(msg, fieldNumber); - if (opt_required || data) { - msg.wrappers_[fieldNumber] = new ctor(data), module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(msg.wrappers_[fieldNumber]); - } - } - return msg.wrappers_[fieldNumber]; -}; -module$contents$jspb$Message_Message.getRepeatedWrapperField = function(msg, ctor, fieldNumber) { - module$contents$jspb$Message_Message.wrapRepeatedField_(msg, ctor, fieldNumber); - var val = msg.wrappers_[fieldNumber]; - val == module$contents$jspb$Message_Message.EMPTY_LIST_SENTINEL_ && (val = msg.wrappers_[fieldNumber] = []); - return val; -}; -module$contents$jspb$Message_Message.wrapRepeatedField_ = function(msg, ctor, fieldNumber) { - msg.wrappers_ || (msg.wrappers_ = {}); - if (!msg.wrappers_[fieldNumber]) { - for (var data = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber), wrappers = [], i = 0; i < data.length; i++) { - wrappers[i] = new ctor(data[i]), module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(wrappers[i]); - } - module$contents$jspb$Message_Message.isFrozen(msg) && module$contents$jspb$Message_Message.internalMarkFrozen(wrappers); - msg.wrappers_[fieldNumber] = wrappers; - } -}; -module$contents$jspb$Message_Message.setWrapperField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - var data = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value; - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, data); -}; -module$contents$jspb$Message_Message.setOneofWrapperField = function(msg, fieldNumber, oneof, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - var data = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value; - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setOneofField(msg, fieldNumber, oneof, data); -}; -module$contents$jspb$Message_Message.setRepeatedWrapperField = function(msg, fieldNumber, value) { - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - msg.wrappers_ || (msg.wrappers_ = {}); - value = value || []; - for (var data = [], i = 0; i < value.length; i++) { - data[i] = module$contents$jspb$Message_Message.toArrayHelper_(value[i], !0); - } - msg.wrappers_[fieldNumber] = value; - return module$contents$jspb$Message_Message.setField(msg, fieldNumber, data); -}; -module$contents$jspb$Message_Message.addToRepeatedWrapperField = function(msg, fieldNumber, value, ctor, index) { - module$contents$jspb$Message_Message.checkNotFrozen_(msg); - var wrapperArray = module$contents$jspb$Message_Message.getRepeatedWrapperField(msg, ctor, fieldNumber), insertedValue = value ? value : new ctor, array = module$contents$jspb$Message_Message.getRepeatedField(msg, fieldNumber); - void 0 != index ? (wrapperArray.splice(index, 0, insertedValue), array.splice(index, 0, module$contents$jspb$Message_Message.toArrayHelper_(insertedValue, !0))) : (wrapperArray.push(insertedValue), array.push(module$contents$jspb$Message_Message.toArrayHelper_(insertedValue, !0))); - return insertedValue; -}; -module$contents$jspb$Message_Message.toMap = function(field, mapKeyGetterFn, opt_toObjectFn, opt_includeInstance) { - for (var result = {}, i = 0; i < field.length; i++) { - result[mapKeyGetterFn.call(field[i])] = opt_toObjectFn ? opt_toObjectFn.call(field[i], opt_includeInstance, field[i]) : field[i]; - } - return result; -}; -module$contents$jspb$Message_Message.prototype.syncMapFields_ = function(internalCall) { - if (this.wrappers_) { - for (var fieldNumber in this.wrappers_) { - if (module$contents$jspb$Message_hasOwnProperty(this.wrappers_, fieldNumber)) { - var val = this.wrappers_[fieldNumber]; - if (Array.isArray(val)) { - for (var i = 0; i < val.length; i++) { - val[i] && module$contents$jspb$Message_Message.toArrayHelper_(val[i], internalCall); - } - } else { - val && module$contents$jspb$Message_Message.toArrayHelper_(val, internalCall); - } - } - } - } -}; -module$contents$jspb$Message_Message.toArrayHelper_ = function(msg, internalCall) { - return module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && internalCall ? msg.toArrayInternal() : msg.toArray(); -}; -module$contents$jspb$Message_Message.prototype.toArray = function() { - module$contents$jspb$Message_Message.checkNotFrozen_(this); - this.syncMapFields_(!1); - return this.array; -}; -module$contents$jspb$Message_Message.prototype.toArrayInternal = function() { - this.syncMapFields_(!0); - return this.array; -}; -module$contents$jspb$Message_Message.prototype.serialize = module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ ? function() { - var old_toJSON = Uint8Array.prototype.toJSON; - Uint8Array.prototype.toJSON = function() { - return goog.crypt.base64.encodeByteArray(this); - }; - try { - return JSON.stringify(this.array && module$contents$jspb$Message_Message.prepareForSerialize_(module$contents$jspb$Message_Message.toArrayHelper_(this, !0), this), module$contents$jspb$Message_Message.serializeSpecialNumbers_); - } finally { - Uint8Array.prototype.toJSON = old_toJSON; - } -} : function() { - return JSON.stringify(this.array && module$contents$jspb$Message_Message.prepareForSerialize_(module$contents$jspb$Message_Message.toArrayHelper_(this, !0), this), module$contents$jspb$Message_Message.serializeSpecialNumbers_); -}; -module$contents$jspb$Message_Message.prepareForSerialize_ = function(array, msg) { - if (module$contents$jspb$Message_Message.SERIALIZE_EMPTY_TRAILING_FIELDS) { - return array; - } - for (var result, length = array.length, needsCopy = !1, extension, i = array.length; i--;) { - var value = array[i]; - if (Array.isArray(value)) { - var nestedMsg = Array.isArray(msg) ? msg[i] : msg && msg.wrappers_ ? msg.wrappers_[module$contents$jspb$Message_Message.getFieldNumber(msg, i)] : void 0; - value = module$contents$jspb$Message_Message.prepareForSerialize_(value, nestedMsg); - !value.length && msg && (Array.isArray(msg) || msg.repeatedFields && -1 != msg.repeatedFields.indexOf(module$contents$jspb$Message_Message.getFieldNumber(msg, i)) && (value = null)); - value != array[i] && (needsCopy = !0); - } else { - if (module$contents$jspb$Message_Message.isExtensionObject(value)) { - extension = module$contents$jspb$Message_Message.prepareExtensionForSerialize_(value, msg && goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message)); - extension != value && (needsCopy = !0); - length--; - continue; - } - } - null == value && length == i + 1 ? (needsCopy = !0, length--) : needsCopy && (result || (result = array.slice(0, length)), result[i] = value); - } - if (!needsCopy) { - return array; - } - result || (result = array.slice(0, length)); - extension && result.push(extension); - return result; -}; -module$contents$jspb$Message_Message.prepareExtensionForSerialize_ = function(extension, msg) { - var result = {}, changed = !1, key; - for (key in extension) { - if (module$contents$jspb$Message_hasOwnProperty(extension, key)) { - var value = extension[key]; - if (Array.isArray(value)) { - var prepared = module$contents$jspb$Message_Message.prepareForSerialize_(value, msg && msg.wrappers_ && msg.wrappers_[key]); - !prepared.length && msg && msg.repeatedFields && -1 != msg.repeatedFields.indexOf(+key) || (result[key] = prepared); - result[key] != value && (changed = !0); - } else { - null != value ? result[key] = value : changed = !0; - } - } - } - if (!changed) { - return extension; - } - for (key in result) { - return result; - } - return null; -}; -module$contents$jspb$Message_Message.serializeSpecialNumbers_ = function(key, value) { - return "number" !== typeof value || !isNaN(value) && Infinity !== value && -Infinity !== value ? value : String(value); -}; -module$contents$jspb$Message_Message.deserializeWithCtor = function(ctor, data) { - var msg = new ctor(data ? JSON.parse(data) : null); - goog.asserts.assertInstanceof(msg, module$contents$jspb$Message_Message); - return msg; -}; -module$contents$jspb$Message_Message.GENERATE_TO_STRING && (module$contents$jspb$Message_Message.prototype.toString = function() { - return module$contents$jspb$Message_Message.toArrayHelper_(this, !0).toString(); -}); -module$contents$jspb$Message_Message.prototype.getExtension = function(fieldInfo) { - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(this); - this.wrappers_ || (this.wrappers_ = {}); - var isFrozen = module$contents$jspb$Message_Message.isFrozen(this), fieldNumber = fieldInfo.fieldIndex; - if (fieldInfo.isRepeated) { - if (fieldInfo.isMessageType()) { - return this.wrappers_[fieldNumber] || (this.wrappers_[fieldNumber] = module$contents$goog$array_map(this.extensionObject_[fieldNumber] || [], function(arr) { - var msg = new fieldInfo.ctor(arr); - isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(msg); - return msg; - })), isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(this.wrappers_[fieldNumber]), this.wrappers_[fieldNumber]; - } - if (isFrozen) { - var res = this.extensionObject_[fieldNumber]; - res || (res = [], module$contents$jspb$Message_Message.internalMarkFrozen(res)); - return res; - } - return this.extensionObject_[fieldNumber] = this.extensionObject_[fieldNumber] || []; - } - return fieldInfo.isMessageType() ? (!this.wrappers_[fieldNumber] && this.extensionObject_[fieldNumber] && (this.wrappers_[fieldNumber] = new fieldInfo.ctor(this.extensionObject_[fieldNumber]), isFrozen && module$contents$jspb$Message_Message.internalMarkFrozen(this.wrappers_[fieldNumber])), this.wrappers_[fieldNumber]) : this.extensionObject_[fieldNumber]; -}; -module$contents$jspb$Message_Message.prototype.setExtension = function(fieldInfo, value) { - module$contents$jspb$Message_Message.checkNotFrozen_(this); - this.wrappers_ || (this.wrappers_ = {}); - module$contents$jspb$Message_Message.maybeInitEmptyExtensionObject_(this); - var fieldNumber = fieldInfo.fieldIndex; - fieldInfo.isRepeated ? (value = value || [], fieldInfo.isMessageType() ? (this.wrappers_[fieldNumber] = value, this.extensionObject_[fieldNumber] = module$contents$goog$array_map(value, function(msg) { - return module$contents$jspb$Message_Message.toArrayHelper_(msg, !0); - })) : this.extensionObject_[fieldNumber] = value) : fieldInfo.isMessageType() ? (this.wrappers_[fieldNumber] = value, this.extensionObject_[fieldNumber] = value ? module$contents$jspb$Message_Message.toArrayHelper_(value, !0) : value) : this.extensionObject_[fieldNumber] = value; - return this; -}; -module$contents$jspb$Message_Message.difference = function(m1, m2) { - if (!(m1 instanceof m2.constructor)) { - throw Error("Messages have different types."); - } - var arr1 = module$contents$jspb$Message_Message.toArrayHelper_(m1, !0), arr2 = module$contents$jspb$Message_Message.toArrayHelper_(m2, !0), res = [], start = 0, length = arr1.length > arr2.length ? arr1.length : arr2.length; - m1.getJsPbMessageId() && (res[0] = m1.getJsPbMessageId(), start = 1); - for (var i = start; i < length; i++) { - module$contents$jspb$Message_Message.compareFields(arr1[i], arr2[i]) || (res[i] = arr2[i]); - } - return new m1.constructor(res); -}; -module$contents$jspb$Message_Message.equals = function(m1, m2) { - return m1 == m2 || !(!m1 || !m2) && m1 instanceof m2.constructor && module$contents$jspb$Message_Message.compareFields(module$contents$jspb$Message_Message.toArrayHelper_(m1, !0), module$contents$jspb$Message_Message.toArrayHelper_(m2, !0)); -}; -module$contents$jspb$Message_Message.compareExtensions = function(extension1, extension2) { - extension1 = extension1 || {}; - extension2 = extension2 || {}; - var keys = {}, name; - for (name in extension1) { - module$contents$jspb$Message_hasOwnProperty(extension1, name) && (keys[name] = 0); - } - for (name in extension2) { - module$contents$jspb$Message_hasOwnProperty(extension2, name) && (keys[name] = 0); - } - for (name in keys) { - if (module$contents$jspb$Message_hasOwnProperty(keys, name) && !module$contents$jspb$Message_Message.compareFields(extension1[name], extension2[name])) { - return !1; - } - } - return !0; -}; -module$contents$jspb$Message_Message.compareFields = function(field1, field2) { - if (field1 == field2) { - return !0; - } - if (!goog.isObject(field1) || !goog.isObject(field2)) { - return "number" === typeof field1 && isNaN(field1) || "number" === typeof field2 && isNaN(field2) ? String(field1) == String(field2) : !1; - } - if (field1.constructor != field2.constructor) { - return !1; - } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && field1.constructor === Uint8Array) { - if (field1.length != field2.length) { - return !1; - } - for (var i = 0; i < field1.length; i++) { - if (field1[i] != field2[i]) { - return !1; - } - } - return !0; - } - if (field1.constructor === Array) { - var extension1 = void 0, extension2 = void 0, length = Math.max(field1.length, field2.length); - for (i = 0; i < length; i++) { - var val1 = field1[i], val2 = field2[i]; - val1 && val1.constructor == Object && (goog.asserts.assert(void 0 === extension1), goog.asserts.assert(i === field1.length - 1), extension1 = val1, val1 = void 0); - val2 && val2.constructor == Object && (goog.asserts.assert(void 0 === extension2), goog.asserts.assert(i === field2.length - 1), extension2 = val2, val2 = void 0); - if (!module$contents$jspb$Message_Message.compareFields(val1, val2)) { - return !1; - } - } - return extension1 || extension2 ? (extension1 = extension1 || {}, extension2 = extension2 || {}, module$contents$jspb$Message_Message.compareExtensions(extension1, extension2)) : !0; - } - if (field1.constructor === Object) { - return module$contents$jspb$Message_Message.compareExtensions(field1, field2); - } - throw Error("Invalid type in JSPB array"); -}; -module$contents$jspb$Message_Message.prototype.cloneMessage = function() { - return module$contents$jspb$Message_Message.cloneMessage(this); -}; -module$contents$jspb$Message_Message.prototype.clone = function() { - return module$contents$jspb$Message_Message.cloneMessage(this); -}; -module$contents$jspb$Message_Message.clone = function(msg) { - return module$contents$jspb$Message_Message.cloneMessage(msg); -}; -module$contents$jspb$Message_Message.cloneMessage = function(msg) { - var clonedData = module$contents$jspb$Message_Message.clone_(module$contents$jspb$Message_Message.toArrayHelper_(msg, !0)), oldInitialize = module$contents$jspb$Message_Message.initialize; - module$contents$jspb$Message_Message.initialize = function(message, ignoredData, messageId, pivot, repeated, oneof) { - oldInitialize(message, clonedData, messageId, pivot, repeated, oneof); - module$contents$jspb$Message_Message.initialize = oldInitialize; + } + } + } + } }; - var newInstance = new msg.constructor(clonedData); - module$contents$jspb$Message_Message.initialize !== oldInitialize && (module$contents$jspb$Message_Message.initialize = oldInitialize); - return newInstance; + visitReference(this.rootReference); + return counts; }; -module$contents$jspb$Message_Message.copyInto = function(fromMessage, toMessage) { - goog.asserts.assertInstanceof(fromMessage, module$contents$jspb$Message_Message); - goog.asserts.assertInstanceof(toMessage, module$contents$jspb$Message_Message); - goog.asserts.assert(fromMessage.constructor == toMessage.constructor, "Copy source and target message should have the same type."); - for (var copyOfFrom = module$contents$jspb$Message_Message.clone(fromMessage), to = module$contents$jspb$Message_Message.toArrayHelper_(toMessage, !0), from = module$contents$jspb$Message_Message.toArrayHelper_(copyOfFrom, !0), i = to.length = 0; i < from.length; i++) { - to[i] = from[i]; +ee.rpc_convert_batch = {}; +ee.rpc_convert_batch.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; +ee.rpc_convert_batch.taskToExportImageRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - toMessage.wrappers_ = copyOfFrom.wrappers_; - toMessage.extensionObject_ = copyOfFrom.extensionObject_; -}; -module$contents$jspb$Message_Message.clone_ = function(obj) { - if (Array.isArray(obj)) { - for (var clonedArray = Array(obj.length), i = 0; i < obj.length; i++) { - var o = obj[i]; - null != o && (clonedArray[i] = "object" == typeof o ? module$contents$jspb$Message_Message.clone_(goog.asserts.assert(o)) : o); - } - return clonedArray; + var result = new module$exports$eeapiclient$ee_api_client.ExportImageRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, grid:null, maxPixels:stringOrNull_(params.maxPixels), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); + switch(destination) { + case ee.rpc_convert_batch.ExportDestination.GCS: + case ee.rpc_convert_batch.ExportDestination.DRIVE: + result.fileExportOptions = ee.rpc_convert_batch.buildImageFileExportOptions_(params, destination); + break; + case ee.rpc_convert_batch.ExportDestination.ASSET: + result.assetExportOptions = ee.rpc_convert_batch.buildImageAssetExportOptions_(params); + break; + default: + throw Error('Export destination "' + destination + '" unknown'); } - if (module$contents$jspb$Message_Message.SUPPORTS_UINT8ARRAY_ && obj instanceof Uint8Array) { - return new Uint8Array(obj); + return result; +}; +ee.rpc_convert_batch.taskToExportTableRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - var clone = {}, key; - for (key in obj) { - module$contents$jspb$Message_hasOwnProperty(obj, key) && (o = obj[key], null != o && (clone[key] = "object" == typeof o ? module$contents$jspb$Message_Message.clone_(goog.asserts.assert(o)) : o)); + var selectors = params.selectors || null; + null != selectors && "string" === typeof selectors && (selectors = selectors.split(",")); + var result = new module$exports$eeapiclient$ee_api_client.ExportTableRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), fileExportOptions:null, assetExportOptions:null, selectors:selectors, maxErrorMeters:numberOrNull_(params.maxErrorMeters), requestId:stringOrNull_(params.id), maxVertices:numberOrNull_(params.maxVertices), maxWorkerCount:numberOrNull_(params.maxWorkers)}), destination = ee.rpc_convert_batch.guessDestination_(params); + switch(destination) { + case ee.rpc_convert_batch.ExportDestination.GCS: + case ee.rpc_convert_batch.ExportDestination.DRIVE: + result.fileExportOptions = ee.rpc_convert_batch.buildTableFileExportOptions_(params, destination); + break; + case ee.rpc_convert_batch.ExportDestination.ASSET: + result.assetExportOptions = ee.rpc_convert_batch.buildTableAssetExportOptions_(params); + break; + default: + throw Error('Export destination "' + destination + '" unknown'); } - return clone; + return result; }; -module$contents$jspb$Message_Message.registerMessageType = function(id, constructor) { - constructor.messageId = id; +ee.rpc_convert_batch.taskToExportVideoRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + var result = new module$exports$eeapiclient$ee_api_client.ExportVideoRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoOptions_(params), fileExportOptions:null, requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); + result.fileExportOptions = ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.guessDestination_(params)); + return result; }; -module$contents$jspb$Message_Message.messageSetExtensions = {}; -module$contents$jspb$Message_Message.messageSetExtensionsBinary = {}; -module$contents$jspb$Message_Message.isFrozen = function(msg) { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded) { - var extensionObject = !msg.extensionObject_ || Object.isFrozen(msg.extensionObject_); - return Object.isFrozen(msg.array) && extensionObject; +ee.rpc_convert_batch.taskToExportMapRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); } - return !1; + return new module$exports$eeapiclient$ee_api_client.ExportMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildImageFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), maxWorkerCount:numberOrNull_(params.maxWorkers)}); }; -module$contents$jspb$Message_Message.internalMarkFrozen = function(value) { - goog.asserts.assert(module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded); - Array.isArray(value) ? Object.freeze(value) : (Object.freeze(value.array), value.extensionObject_ && Object.freeze(value.extensionObject_)); +ee.rpc_convert_batch.taskToExportVideoMapRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + return new module$exports$eeapiclient$ee_api_client.ExportVideoMapRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), videoOptions:ee.rpc_convert_batch.buildVideoMapOptions_(params), tileOptions:ee.rpc_convert_batch.buildTileOptions_(params), tileExportOptions:ee.rpc_convert_batch.buildVideoFileExportOptions_(params, ee.rpc_convert_batch.ExportDestination.GCS), requestId:stringOrNull_(params.id), + version:stringOrNull_(params.version), maxWorkerCount:numberOrNull_(params.maxWorkers)}); }; -module$contents$jspb$Message_Message.checkNotFrozen_ = function(msg) { - if (module$exports$jspb$Freezer$Loading$Info.isFreezerLoaded && module$contents$jspb$Message_Message.isFrozen(msg)) { - throw Error("Cannot mutate a frozen Message"); +ee.rpc_convert_batch.taskToExportClassifierRequest = function(params) { + if (null == params.element) { + throw Error('"element" not found in params ' + params); + } + var destination = ee.rpc_convert_batch.guessDestination_(params); + if (destination != ee.rpc_convert_batch.ExportDestination.ASSET) { + throw Error('Export destination "' + destination + '" unknown'); } + return new module$exports$eeapiclient$ee_api_client.ExportClassifierRequest({expression:ee.Serializer.encodeCloudApiExpression(params.element), description:stringOrNull_(params.description), requestId:stringOrNull_(params.id), assetExportOptions:new module$exports$eeapiclient$ee_api_client.ClassifierAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}), maxWorkerCount:numberOrNull_(params.maxWorkers), + }); }; -function module$contents$jspb$Message_hasOwnProperty(obj, property) { - return goog.TRUSTED_SITE || Object.prototype.hasOwnProperty.call(obj, property); +function stringOrNull_(value) { + return null != value ? String(value) : null; } -jspb.Message = module$contents$jspb$Message_Message; -var proto = {google:{}}; -proto.google.protobuf = {}; -proto.google.protobuf.Struct = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.google.protobuf.Struct, module$contents$jspb$Message_Message); -proto.google.protobuf.Value = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, null, proto.google.protobuf.Value.oneofGroups_); -}; -goog.inherits(proto.google.protobuf.Value, module$contents$jspb$Message_Message); -proto.google.protobuf.ListValue = function(opt_data) { - module$contents$jspb$Message_Message.initialize(this, opt_data, 0, -1, proto.google.protobuf.ListValue.repeatedFields_, null); -}; -goog.inherits(proto.google.protobuf.ListValue, module$contents$jspb$Message_Message); -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.Struct.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.Struct.toObject(opt_includeInstance, this); -}, proto.google.protobuf.Struct.toObject = function(includeInstance, msg) { - var f, obj = {fieldsMap:(f = msg.getFieldsMap()) ? f.toObject(includeInstance, proto.google.protobuf.Value.toObject) : []}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.Struct.ObjectFormat = function() { -}, proto.google.protobuf.Struct.fromObject = function(obj) { - var msg = new proto.google.protobuf.Struct; - obj.fieldsMap && module$contents$jspb$Message_Message.setWrapperField(msg, 1, module$contents$jspb$Map_Map.fromObject(obj.fieldsMap, proto.google.protobuf.Value, proto.google.protobuf.Value.fromObject)); - return msg; -}); -proto.google.protobuf.Struct.deserializeBinary = function(bytes) { - return proto.google.protobuf.Struct.deserializeBinaryFromReader(new proto.google.protobuf.Struct, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.Struct.deserializeBinaryFromReader = function(msg, reader$jscomp$0) { - for (; reader$jscomp$0.nextField() && !reader$jscomp$0.isEndGroup();) { - var value = void 0; - switch(reader$jscomp$0.getFieldNumber()) { - case 1: - value = msg.getFieldsMap(); - reader$jscomp$0.readMessage(value, function(message, reader) { - module$contents$jspb$Map_Map.deserializeBinary(message, reader, module$contents$jspb$BinaryReader_BinaryReader.prototype.readString, module$contents$jspb$BinaryReader_BinaryReader.prototype.readMessage, proto.google.protobuf.Value.deserializeBinaryFromReader, "", new proto.google.protobuf.Value); - }); - break; - default: - reader$jscomp$0.skipField(); - } +function numberOrNull_(value) { + return null != value ? Number(value) : null; +} +ee.rpc_convert_batch.guessDestination_ = function(params) { + var destination = ee.rpc_convert_batch.ExportDestination.DRIVE; + if (null == params) { + return destination; } - return msg; -}; -proto.google.protobuf.Struct.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.Struct.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; -proto.google.protobuf.Struct.serializeBinaryToWriter = function(message, writer) { - var f; - (f = message.getFieldsMap(!0)) && 0 < f.getLength() && f.serializeBinary(1, writer, module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeString, module$contents$jspb$BinaryWriter_BinaryWriter.prototype.writeMessage, proto.google.protobuf.Value.serializeBinaryToWriter); -}; -proto.google.protobuf.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { - return module$contents$jspb$Message_Message.getMapField(this, 1, opt_noLazyCreate, proto.google.protobuf.Value); -}; -proto.google.protobuf.Struct.prototype.clearFieldsMap = function() { - this.getFieldsMap().clear(); - return this; -}; -proto.google.protobuf.Struct.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.Struct, data); + null != params.outputBucket || null != params.outputPrefix ? destination = ee.rpc_convert_batch.ExportDestination.GCS : null != params.assetId && (destination = ee.rpc_convert_batch.ExportDestination.ASSET); + return destination; }; -proto.google.protobuf.Value.oneofGroups_ = [[1, 2, 3, 4, 5, 6]]; -proto.google.protobuf.Value.KindCase = {KIND_NOT_SET:0, NULL_VALUE:1, NUMBER_VALUE:2, STRING_VALUE:3, BOOL_VALUE:4, STRUCT_VALUE:5, LIST_VALUE:6}; -proto.google.protobuf.Value.prototype.getKindCase = function() { - return module$contents$jspb$Message_Message.computeOneofCase(this, proto.google.protobuf.Value.oneofGroups_[0]); +ee.rpc_convert_batch.buildGeoTiffFormatOptions_ = function(params) { + if (params.fileDimensions && params.tiffFileDimensions) { + throw Error('Export cannot set both "fileDimensions" and "tiffFileDimensions".'); + } + var tileSize = params.tiffShardSize || params.shardSize; + return new module$exports$eeapiclient$ee_api_client.GeoTiffImageExportOptions({cloudOptimized:!!params.tiffCloudOptimized, skipEmptyFiles:!(!params.skipEmptyTiles && !params.tiffSkipEmptyFiles), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.fileDimensions || params.tiffFileDimensions), tileSize:numberOrNull_(tileSize), }); }; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.Value.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.Value.toObject(opt_includeInstance, this); -}, proto.google.protobuf.Value.toObject = function(includeInstance, msg) { - var f, obj = {nullValue:module$contents$jspb$Message_Message.getFieldWithDefault(msg, 1, 0), numberValue:module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault(msg, 2), stringValue:module$contents$jspb$Message_Message.getStringFieldWithDefault(msg, 3), boolValue:module$contents$jspb$Message_Message.getBooleanFieldWithDefault(msg, 4), structValue:(f = msg.getStructValue()) && proto.google.protobuf.Struct.toObject(includeInstance, f), listValue:(f = msg.getListValue()) && proto.google.protobuf.ListValue.toObject(includeInstance, - f)}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.Value.ObjectFormat = function() { -}, proto.google.protobuf.Value.fromObject = function(obj) { - var msg = new proto.google.protobuf.Value; - null != obj.nullValue && module$contents$jspb$Message_Message.setField(msg, 1, obj.nullValue); - null != obj.numberValue && module$contents$jspb$Message_Message.setField(msg, 2, obj.numberValue); - null != obj.stringValue && module$contents$jspb$Message_Message.setField(msg, 3, obj.stringValue); - null != obj.boolValue && module$contents$jspb$Message_Message.setField(msg, 4, obj.boolValue); - obj.structValue && module$contents$jspb$Message_Message.setWrapperField(msg, 5, proto.google.protobuf.Struct.fromObject(obj.structValue)); - obj.listValue && module$contents$jspb$Message_Message.setWrapperField(msg, 6, proto.google.protobuf.ListValue.fromObject(obj.listValue)); - return msg; -}); -proto.google.protobuf.Value.deserializeBinary = function(bytes) { - return proto.google.protobuf.Value.deserializeBinaryFromReader(new proto.google.protobuf.Value, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.Value.deserializeBinaryFromReader = function(msg, reader) { - for (; reader.nextField() && !reader.isEndGroup();) { - var value = void 0; - switch(reader.getFieldNumber()) { - case 1: - value = reader.readEnum(); - msg.setNullValue(value); - break; - case 2: - value = reader.readDouble(); - msg.setNumberValue(value); - break; - case 3: - value = reader.readString(); - msg.setStringValue(value); - break; - case 4: - value = reader.readBool(); - msg.setBoolValue(value); - break; - case 5: - value = new proto.google.protobuf.Struct; - reader.readMessage(value, proto.google.protobuf.Struct.deserializeBinaryFromReader); - msg.setStructValue(value); - break; - case 6: - value = new proto.google.protobuf.ListValue; - reader.readMessage(value, proto.google.protobuf.ListValue.deserializeBinaryFromReader); - msg.setListValue(value); - break; - default: - reader.skipField(); +ee.rpc_convert_batch.buildTfRecordFormatOptions_ = function(params) { + var tfRecordOptions = new module$exports$eeapiclient$ee_api_client.TfRecordImageExportOptions({compress:!!params.tfrecordCompressed, maxSizeBytes:stringOrNull_(params.tfrecordMaxFileSize), sequenceData:!!params.tfrecordSequenceData, collapseBands:!!params.tfrecordCollapseBands, maxMaskedRatio:numberOrNull_(params.tfrecordMaskedThreshold), defaultValue:numberOrNull_(params.tfrecordDefaultValue), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordPatchDimensions), + marginDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tfrecordKernelSize), tensorDepths:null, }), tensorDepths = params.tfrecordTensorDepths; + if (null != tensorDepths) { + if (goog.isObject(tensorDepths)) { + var result = {}; + module$contents$goog$object_forEach(tensorDepths, function(v, k) { + if ("string" !== typeof k || "number" !== typeof v) { + throw Error('"tensorDepths" option must be an object of type Object'); + } + result[k] = v; + }); + tfRecordOptions.tensorDepths = result; + } else { + throw Error('"tensorDepths" option needs to have the form Object.'); } } - return msg; -}; -proto.google.protobuf.Value.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.Value.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); -}; -proto.google.protobuf.Value.serializeBinaryToWriter = function(message, writer) { - var f = module$contents$jspb$Message_Message.getField(message, 1); - null != f && writer.writeEnum(1, f); - f = module$contents$jspb$Message_Message.getField(message, 2); - null != f && writer.writeDouble(2, f); - f = module$contents$jspb$Message_Message.getField(message, 3); - null != f && writer.writeString(3, f); - f = module$contents$jspb$Message_Message.getField(message, 4); - null != f && writer.writeBool(4, f); - f = message.getStructValue(); - null != f && writer.writeMessage(5, f, proto.google.protobuf.Struct.serializeBinaryToWriter); - f = message.getListValue(); - null != f && writer.writeMessage(6, f, proto.google.protobuf.ListValue.serializeBinaryToWriter); -}; -proto.google.protobuf.Value.prototype.getNullValue = function() { - return module$contents$jspb$Message_Message.getFieldWithDefault(this, 1, 0); -}; -proto.google.protobuf.Value.prototype.setNullValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearNullValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 1, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasNullValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 1); -}; -proto.google.protobuf.Value.prototype.getNumberValue = function() { - return module$contents$jspb$Message_Message.getFloatingPointFieldWithDefault(this, 2); -}; -proto.google.protobuf.Value.prototype.setNumberValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearNumberValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 2, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasNumberValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 2); -}; -proto.google.protobuf.Value.prototype.getStringValue = function() { - return module$contents$jspb$Message_Message.getStringFieldWithDefault(this, 3); -}; -proto.google.protobuf.Value.prototype.setStringValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearStringValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 3, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasStringValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 3); -}; -proto.google.protobuf.Value.prototype.getBoolValue = function() { - return module$contents$jspb$Message_Message.getBooleanFieldWithDefault(this, 4); -}; -proto.google.protobuf.Value.prototype.setBoolValue = function(value) { - return module$contents$jspb$Message_Message.setOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearBoolValue = function() { - return module$contents$jspb$Message_Message.clearOneofField(this, 4, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasBoolValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 4); -}; -proto.google.protobuf.Value.prototype.getStructValue = function() { - return module$contents$jspb$Message_Message.getWrapperField(this, proto.google.protobuf.Struct, 5); -}; -proto.google.protobuf.Value.prototype.setStructValue = function(value) { - return module$contents$jspb$Message_Message.setOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearStructValue = function() { - return module$contents$jspb$Message_Message.clearOneofWrapperField(this, 5, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasStructValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 5); -}; -proto.google.protobuf.Value.prototype.getListValue = function() { - return module$contents$jspb$Message_Message.getWrapperField(this, proto.google.protobuf.ListValue, 6); -}; -proto.google.protobuf.Value.prototype.setListValue = function(value) { - return module$contents$jspb$Message_Message.setOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0], value); -}; -proto.google.protobuf.Value.prototype.clearListValue = function() { - return module$contents$jspb$Message_Message.clearOneofWrapperField(this, 6, proto.google.protobuf.Value.oneofGroups_[0]); -}; -proto.google.protobuf.Value.prototype.hasListValue = function() { - return module$contents$jspb$Message_Message.hasField(this, 6); + return tfRecordOptions; }; -proto.google.protobuf.Value.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.Value, data); +ee.rpc_convert_batch.buildImageFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.ImageFileExportOptions({gcsDestination:null, driveDestination:null, geoTiffOptions:null, tfRecordOptions:null, fileFormat:ee.rpc_convert.fileFormat(params.fileFormat), }); + "GEO_TIFF" === result.fileFormat ? result.geoTiffOptions = ee.rpc_convert_batch.buildGeoTiffFormatOptions_(params) : "TF_RECORD_IMAGE" === result.fileFormat && (result.tfRecordOptions = ee.rpc_convert_batch.buildTfRecordFormatOptions_(params)); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.repeatedFields_ = [1]; -module$contents$jspb$Message_Message.GENERATE_TO_OBJECT && (proto.google.protobuf.ListValue.prototype.toObject = function(opt_includeInstance) { - return proto.google.protobuf.ListValue.toObject(opt_includeInstance, this); -}, proto.google.protobuf.ListValue.toObject = function(includeInstance, msg) { - var f, obj = {valuesList:module$contents$jspb$Message_Message.toObjectList(msg.getValuesList(), proto.google.protobuf.Value.toObject, includeInstance)}; - includeInstance && (obj.$jspbMessageInstance = msg); - return obj; -}); -module$contents$jspb$Message_Message.GENERATE_FROM_OBJECT && (proto.google.protobuf.ListValue.ObjectFormat = function() { -}, proto.google.protobuf.ListValue.fromObject = function(obj) { - var msg = new proto.google.protobuf.ListValue; - obj.valuesList && module$contents$jspb$Message_Message.setRepeatedWrapperField(msg, 1, obj.valuesList.map(proto.google.protobuf.Value.fromObject)); - return msg; -}); -proto.google.protobuf.ListValue.deserializeBinary = function(bytes) { - return proto.google.protobuf.ListValue.deserializeBinaryFromReader(new proto.google.protobuf.ListValue, new module$contents$jspb$BinaryReader_BinaryReader(bytes)); -}; -proto.google.protobuf.ListValue.deserializeBinaryFromReader = function(msg, reader) { - for (; reader.nextField() && !reader.isEndGroup();) { - var value = void 0; - switch(reader.getFieldNumber()) { - case 1: - value = new proto.google.protobuf.Value; - reader.readMessage(value, proto.google.protobuf.Value.deserializeBinaryFromReader); - msg.addValues(value); - break; - default: - reader.skipField(); - } +ee.rpc_convert_batch.buildImageAssetExportOptions_ = function(params) { + var allPolicies = params.pyramidingPolicy || {}; + try { + allPolicies = JSON.parse(allPolicies); + } catch ($jscomp$unused$catch) { } - return msg; -}; -proto.google.protobuf.ListValue.prototype.serializeBinary = function() { - var writer = new module$contents$jspb$BinaryWriter_BinaryWriter; - proto.google.protobuf.ListValue.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + var defaultPyramidingPolicy = "PYRAMIDING_POLICY_UNSPECIFIED"; + "string" === typeof allPolicies ? (defaultPyramidingPolicy = allPolicies, allPolicies = {}) : allPolicies[".default"] && (defaultPyramidingPolicy = allPolicies[".default"], delete allPolicies[".default"]); + return new module$exports$eeapiclient$ee_api_client.ImageAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params), pyramidingPolicy:defaultPyramidingPolicy, pyramidingPolicyOverrides:module$contents$goog$object_isEmpty(allPolicies) ? null : allPolicies, tileSize:numberOrNull_(params.shardSize), }); }; -proto.google.protobuf.ListValue.serializeBinaryToWriter = function(message, writer) { - var f = message.getValuesList(); - 0 < f.length && writer.writeRepeatedMessage(1, f, proto.google.protobuf.Value.serializeBinaryToWriter); +ee.rpc_convert_batch.buildTableFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.TableFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:ee.rpc_convert.tableFileFormat(params.fileFormat), }); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.prototype.getValuesList = function() { - return module$contents$jspb$Message_Message.getRepeatedWrapperField(this, proto.google.protobuf.Value, 1); +ee.rpc_convert_batch.buildTableAssetExportOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.TableAssetExportOptions({earthEngineDestination:ee.rpc_convert_batch.buildEarthEngineDestination_(params)}); }; -proto.google.protobuf.ListValue.prototype.setValuesList = function(value) { - return module$contents$jspb$Message_Message.setRepeatedWrapperField(this, 1, value); +ee.rpc_convert_batch.buildVideoFileExportOptions_ = function(params, destination) { + var result = new module$exports$eeapiclient$ee_api_client.VideoFileExportOptions({gcsDestination:null, driveDestination:null, fileFormat:"MP4", }); + destination === ee.rpc_convert_batch.ExportDestination.GCS ? result.gcsDestination = ee.rpc_convert_batch.buildGcsDestination_(params) : result.driveDestination = ee.rpc_convert_batch.buildDriveDestination_(params); + return result; }; -proto.google.protobuf.ListValue.prototype.addValues = function(opt_value, opt_index) { - return module$contents$jspb$Message_Message.addToRepeatedWrapperField(this, 1, opt_value, proto.google.protobuf.Value, opt_index); +ee.rpc_convert_batch.buildVideoOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:stringOrNull_(params.maxPixels), }); }; -proto.google.protobuf.ListValue.prototype.clearValuesList = function() { - return module$contents$jspb$Message_Message.clearRepeatedWrapperField(this, 1); +ee.rpc_convert_batch.buildVideoMapOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.VideoOptions({framesPerSecond:numberOrNull_(params.framesPerSecond), maxFrames:numberOrNull_(params.maxFrames), maxPixelsPerFrame:null, }); }; -proto.google.protobuf.ListValue.deserialize = function(data) { - return module$contents$jspb$Message_Message.deserializeWithCtor(proto.google.protobuf.ListValue, data); +ee.rpc_convert_batch.buildTileOptions_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.TileOptions({maxZoom:numberOrNull_(params.maxZoom), scale:numberOrNull_(params.scale), minZoom:numberOrNull_(params.minZoom), skipEmptyTiles:!!params.skipEmptyTiles, mapsApiKey:stringOrNull_(params.mapsApiKey), tileDimensions:ee.rpc_convert_batch.buildGridDimensions_(params.tileDimensions), stride:numberOrNull_(params.stride), zoomSubset:ee.rpc_convert_batch.buildZoomSubset_(numberOrNull_(params.minTimeMachineZoomSubset), + numberOrNull_(params.maxTimeMachineZoomSubset)), }); }; -proto.google.protobuf.NullValue = {NULL_VALUE:0}; -proto.google.protobuf.Value.prototype.toJavaScript = function() { - var kindCase = proto.google.protobuf.Value.KindCase; - switch(this.getKindCase()) { - case kindCase.NULL_VALUE: - return null; - case kindCase.NUMBER_VALUE: - return this.getNumberValue(); - case kindCase.STRING_VALUE: - return this.getStringValue(); - case kindCase.BOOL_VALUE: - return this.getBoolValue(); - case kindCase.STRUCT_VALUE: - return this.getStructValue().toJavaScript(); - case kindCase.LIST_VALUE: - return this.getListValue().toJavaScript(); - default: - throw Error("Unexpected struct type"); +ee.rpc_convert_batch.buildZoomSubset_ = function(min, max) { + if (null == min && null == max) { + return null; } + var result = new module$exports$eeapiclient$ee_api_client.ZoomSubset({min:0, max:null}); + null != min && (result.min = min); + result.max = max; + return result; }; -proto.google.protobuf.Value.fromJavaScript = function(value) { - var ret = new proto.google.protobuf.Value; - switch(goog.typeOf(value)) { - case "string": - ret.setStringValue(value); - break; - case "number": - ret.setNumberValue(value); - break; - case "boolean": - ret.setBoolValue(value); - break; - case "null": - ret.setNullValue(proto.google.protobuf.NullValue.NULL_VALUE); - break; - case "array": - ret.setListValue(proto.google.protobuf.ListValue.fromJavaScript(value)); - break; - case "object": - ret.setStructValue(proto.google.protobuf.Struct.fromJavaScript(value)); - break; - default: - throw Error("Unexpected struct type."); +ee.rpc_convert_batch.buildGridDimensions_ = function(dimensions) { + if (null == dimensions) { + return null; } - return ret; -}; -proto.google.protobuf.ListValue.prototype.toJavaScript = function() { - for (var ret = [], values = this.getValuesList(), i = 0; i < values.length; i++) { - ret[i] = values[i].toJavaScript(); + var result = new module$exports$eeapiclient$ee_api_client.GridDimensions({height:0, width:0}); + "string" === typeof dimensions && (-1 !== dimensions.indexOf("x") ? dimensions = dimensions.split("x").map(Number) : -1 !== dimensions.indexOf(",") && (dimensions = dimensions.split(",").map(Number))); + if (Array.isArray(dimensions)) { + if (2 === dimensions.length) { + result.height = dimensions[0], result.width = dimensions[1]; + } else { + if (1 === dimensions.length) { + result.height = dimensions[0], result.width = dimensions[0]; + } else { + throw Error("Unable to construct grid from dimensions: " + dimensions); + } + } + } else { + if ("number" !== typeof dimensions || isNaN(dimensions)) { + if (goog.isObject(dimensions) && null != dimensions.height && null != dimensions.width) { + result.height = dimensions.height, result.width = dimensions.width; + } else { + throw Error("Unable to construct grid from dimensions: " + dimensions); + } + } else { + result.height = dimensions, result.width = dimensions; + } } - return ret; + return result; }; -proto.google.protobuf.ListValue.fromJavaScript = function(array) { - for (var ret = new proto.google.protobuf.ListValue, i = 0; i < array.length; i++) { - ret.addValues(proto.google.protobuf.Value.fromJavaScript(array[i])); - } - return ret; +ee.rpc_convert_batch.buildGcsDestination_ = function(params) { + var permissions = null; + null != params.writePublicTiles && (permissions = params.writePublicTiles ? "PUBLIC" : "DEFAULT_OBJECT_ACL"); + return new module$exports$eeapiclient$ee_api_client.GcsDestination({bucket:stringOrNull_(params.outputBucket), filenamePrefix:stringOrNull_(params.outputPrefix), bucketCorsUris:params.bucketCorsUris || null, permissions:permissions, }); }; -proto.google.protobuf.Struct.prototype.toJavaScript = function() { - var ret = {}; - this.getFieldsMap().forEach(function(value, key) { - ret[key] = value.toJavaScript(); - }); - return ret; +ee.rpc_convert_batch.buildDriveDestination_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.DriveDestination({folder:stringOrNull_(params.driveFolder), filenamePrefix:stringOrNull_(params.driveFileNamePrefix), }); }; -proto.google.protobuf.Struct.fromJavaScript = function(obj) { - var ret = new proto.google.protobuf.Struct, map = ret.getFieldsMap(), property; - for (property in obj) { - map.set(property, proto.google.protobuf.Value.fromJavaScript(obj[property])); - } - return ret; +ee.rpc_convert_batch.buildEarthEngineDestination_ = function(params) { + return new module$exports$eeapiclient$ee_api_client.EarthEngineDestination({name:ee.rpc_convert.assetIdToAssetName(params.assetId)}); }; ee.data = {}; -ee.data.authenticateViaOauth = function(clientId, success, opt_error, opt_extraScopes, opt_onImmediateFailed) { - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - opt_extraScopes && (module$contents$goog$array_extend(scopes, opt_extraScopes), module$contents$goog$array_removeDuplicates(scopes)); +ee.data.authenticateViaOauth = function(clientId, success, opt_error, opt_extraScopes, opt_onImmediateFailed, opt_suppressDefaultScopes) { + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes, !1, opt_extraScopes || []); module$contents$ee$apiclient_apiclient.setAuthClient(clientId, scopes); null === clientId ? module$contents$ee$apiclient_apiclient.clearAuthToken() : module$contents$ee$apiclient_apiclient.ensureAuthLibLoaded_(function() { var onImmediateFailed = opt_onImmediateFailed || goog.partial(ee.data.authenticateViaPopup, success, opt_error); @@ -20631,12 +17581,11 @@ ee.data.authenticateViaPopup = function(opt_success, opt_error) { goog.global.gapi.auth.authorize({client_id:module$contents$ee$apiclient_apiclient.getAuthClientId(), immediate:!1, scope:module$contents$ee$apiclient_apiclient.getAuthScopes().join(" ")}, goog.partial(module$contents$ee$apiclient_apiclient.handleAuthResult_, opt_success, opt_error)); }; goog.exportSymbol("ee.data.authenticateViaPopup", ee.data.authenticateViaPopup); -ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes) { +ee.data.authenticateViaPrivateKey = function(privateKey, opt_success, opt_error, opt_extraScopes, opt_suppressDefaultScopes) { if ("window" in goog.global) { throw Error("Use of private key authentication in the browser is insecure. Consider using OAuth, instead."); } - var scopes = [module$contents$ee$apiclient_apiclient.AUTH_SCOPE_, module$contents$ee$apiclient_apiclient.STORAGE_SCOPE_, module$contents$ee$apiclient_apiclient.CLOUD_PLATFORM_SCOPE_]; - opt_extraScopes && (module$contents$goog$array_extend(scopes, opt_extraScopes), module$contents$goog$array_removeDuplicates(scopes)); + var scopes = module$contents$ee$apiclient_apiclient.mergeAuthScopes_(!opt_suppressDefaultScopes, !opt_suppressDefaultScopes, opt_extraScopes || []); module$contents$ee$apiclient_apiclient.setAuthClient(privateKey.client_email, scopes); var jwtClient = new google.auth.JWT(privateKey.client_email, null, privateKey.private_key, scopes, null); ee.data.setAuthTokenRefresher(function(authArgs, callback) { @@ -20712,7 +17661,7 @@ ee.data.makeMapId_ = function(mapid, token, opt_urlFormat) { if (!urlFormat) { module$contents$ee$apiclient_apiclient.initialize(); var base = module$contents$ee$apiclient_apiclient.getTileBaseUrl(); - urlFormat = token ? base + "/map/" + mapid + "/{z}/{x}/{y}?token=" + token : base + "/v1alpha/" + mapid + "/tiles/{z}/{x}/{y}"; + urlFormat = token ? base + "/map/" + mapid + "/{z}/{x}/{y}?token=" + token : base + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + mapid + "/tiles/{z}/{x}/{y}"; } return {mapid:mapid, token:token, formatTileUrl:function(x, y, z) { var width = Math.pow(2, z); @@ -20763,7 +17712,7 @@ ee.data.getFilmstripThumbId = function(params, opt_callback) { }; goog.exportSymbol("ee.data.getFilmstripThumbId", ee.data.getFilmstripThumbId); ee.data.makeThumbUrl = function(id) { - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.thumbid + ":getPixels"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.thumbid + ":getPixels"; }; goog.exportSymbol("ee.data.makeThumbUrl", ee.data.makeThumbUrl); ee.data.getDownloadId = function(params, opt_callback) { @@ -20795,8 +17744,8 @@ ee.data.getDownloadId = function(params, opt_callback) { }) && (params.bands = params.bands.map(function(band) { return {id:band}; })); - if (params.bands && params.bands.some(function($jscomp$destructuring$var16) { - return null == $jscomp$destructuring$var16.id; + if (params.bands && params.bands.some(function($jscomp$destructuring$var18) { + return null == $jscomp$destructuring$var18.id; })) { throw Error("Each band dictionary must have an id."); } @@ -20804,7 +17753,7 @@ ee.data.getDownloadId = function(params, opt_callback) { if ("string" === typeof params.crs_transform) { try { params.crs_transform = JSON.parse(params.crs_transform); - } catch (e$33) { + } catch (e$42) { } } var image = ee.data.images.buildDownloadIdImage(params.image, params), thumbnail = new module$exports$eeapiclient$ee_api_client.Thumbnail({name:null, expression:ee.data.expressionAugmenter_(ee.Serializer.encodeCloudApiExpression(image)), fileFormat:ee.rpc_convert.fileFormat(params.format), filenamePrefix:params.name, bandIds:params.bands && ee.rpc_convert.bandList(params.bands.map(function(band) { @@ -20817,7 +17766,7 @@ ee.data.getDownloadId = function(params, opt_callback) { goog.exportSymbol("ee.data.getDownloadId", ee.data.getDownloadId); ee.data.makeDownloadUrl = function(id) { module$contents$ee$apiclient_apiclient.initialize(); - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.docid + ":getPixels"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.docid + ":getPixels"; }; goog.exportSymbol("ee.data.makeDownloadUrl", ee.data.makeDownloadUrl); ee.data.getTableDownloadId = function(params, opt_callback) { @@ -20842,7 +17791,7 @@ ee.data.getTableDownloadId = function(params, opt_callback) { }; goog.exportSymbol("ee.data.getTableDownloadId", ee.data.getTableDownloadId); ee.data.makeTableDownloadUrl = function(id) { - return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/v1alpha/" + id.docid + ":getFeatures"; + return module$contents$ee$apiclient_apiclient.getTileBaseUrl() + "/" + module$exports$ee$apiVersion.V1ALPHA + "/" + id.docid + ":getFeatures"; }; goog.exportSymbol("ee.data.makeTableDownloadUrl", ee.data.makeTableDownloadUrl); ee.data.newTaskId = function(opt_count, opt_callback) { @@ -20861,8 +17810,8 @@ goog.exportSymbol("ee.data.newTaskId", ee.data.newTaskId); ee.data.getTaskStatus = function(taskId, opt_callback) { var opNames = ee.data.makeStringArray_(taskId).map(ee.rpc_convert.taskIdToOperationName); if (1 === opNames.length) { - var call$35 = new module$contents$ee$apiclient_Call(opt_callback); - return call$35.handle(call$35.operations().get(opNames[0]).then(function(op) { + var call$44 = new module$contents$ee$apiclient_Call(opt_callback); + return call$44.handle(call$44.operations().get(opNames[0]).then(function(op) { return [ee.rpc_convert.operationToTask(op)]; })); } @@ -20916,8 +17865,8 @@ goog.exportSymbol("ee.data.listOperations", ee.data.listOperations); ee.data.cancelOperation = function(operationName, opt_callback) { var opNames = ee.data.makeStringArray_(operationName), request = new module$exports$eeapiclient$ee_api_client.CancelOperationRequest; if (1 === opNames.length) { - var call$36 = new module$contents$ee$apiclient_Call(opt_callback); - call$36.handle(call$36.operations().cancel(opNames[0], request)); + var call$45 = new module$contents$ee$apiclient_Call(opt_callback); + call$45.handle(call$45.operations().cancel(opNames[0], request)); } else { var call = new module$contents$ee$apiclient_BatchCall(opt_callback), operations = call.operations(); call.send(opNames.map(function(op) { @@ -20929,8 +17878,8 @@ goog.exportSymbol("ee.data.cancelOperation", ee.data.cancelOperation); ee.data.getOperation = function(operationName, opt_callback) { var opNames = ee.data.makeStringArray_(operationName).map(ee.rpc_convert.taskIdToOperationName); if (!Array.isArray(operationName)) { - var call$37 = new module$contents$ee$apiclient_Call(opt_callback); - return call$37.handle(call$37.operations().get(opNames[0])); + var call$46 = new module$contents$ee$apiclient_Call(opt_callback); + return call$46.handle(call$46.operations().get(opNames[0])); } var call = new module$contents$ee$apiclient_BatchCall(opt_callback), operations = call.operations(); return call.send(opNames.map(function(op) { @@ -20943,7 +17892,7 @@ ee.data.cancelTask = function(taskId, opt_callback) { }; goog.exportSymbol("ee.data.cancelTask", ee.data.cancelTask); ee.data.updateTask = function(taskId, action, opt_callback) { - if (!goog.object.containsValue(ee.data.TaskUpdateActions, action)) { + if (!module$contents$goog$object_containsValue(ee.data.TaskUpdateActions, action)) { throw Error("Invalid action: " + action); } taskId = ee.data.makeStringArray_(taskId); @@ -20974,6 +17923,9 @@ ee.data.startProcessing = function(taskId, params, opt_callback) { case ee.data.ExportType.VIDEO_MAP: var videoMapRequest = ee.data.prepareExportVideoMapRequest_(params, metadata); return handle(call.videoMap().export(call.projectsPath(), videoMapRequest)); + case ee.data.ExportType.CLASSIFIER: + var classifierRequest = ee.data.prepareExportClassifierRequest_(params, metadata); + return handle(call.classifier().export(call.projectsPath(), classifierRequest)); default: throw Error("Unable to start processing for task of type " + taskType); } @@ -21007,6 +17959,11 @@ ee.data.prepareExportVideoMapRequest_ = function(taskConfig, metadata) { videoMapRequest.expression = ee.data.expressionAugmenter_(videoMapRequest.expression); return videoMapRequest; }; +ee.data.prepareExportClassifierRequest_ = function(taskConfig, metadata) { + var classifierRequest = ee.rpc_convert_batch.taskToExportClassifierRequest(taskConfig); + classifierRequest.expression = ee.data.expressionAugmenter_(classifierRequest.expression); + return classifierRequest; +}; ee.data.startIngestion = function(taskId, request, opt_callback) { var manifest = ee.rpc_convert.toImageManifest(request), convert = function(arg) { return arg ? ee.rpc_convert.operationToProcessingResponse(arg) : null; @@ -21177,8 +18134,8 @@ ee.data.getAssetRootQuota = function(rootId, opt_callback) { })); }; goog.exportSymbol("ee.data.getAssetRootQuota", ee.data.getAssetRootQuota); -ee.data.AssetType = {ALGORITHM:"Algorithm", FOLDER:"Folder", FEATURE_COLLECTION:"FeatureCollection", IMAGE:"Image", IMAGE_COLLECTION:"ImageCollection", TABLE:"Table", UNKNOWN:"Unknown"}; -ee.data.ExportType = {IMAGE:"EXPORT_IMAGE", MAP:"EXPORT_TILES", TABLE:"EXPORT_FEATURES", VIDEO:"EXPORT_VIDEO", VIDEO_MAP:"EXPORT_VIDEO_MAP"}; +ee.data.AssetType = {ALGORITHM:"Algorithm", CLASSIFIER:"Classifier", FOLDER:"Folder", FEATURE_COLLECTION:"FeatureCollection", IMAGE:"Image", IMAGE_COLLECTION:"ImageCollection", TABLE:"Table", UNKNOWN:"Unknown"}; +ee.data.ExportType = {IMAGE:"EXPORT_IMAGE", MAP:"EXPORT_TILES", TABLE:"EXPORT_FEATURES", VIDEO:"EXPORT_VIDEO", VIDEO_MAP:"EXPORT_VIDEO_MAP", CLASSIFIER:"EXPORT_CLASSIFIER"}; ee.data.ExportState = {UNSUBMITTED:"UNSUBMITTED", READY:"READY", RUNNING:"RUNNING", COMPLETED:"COMPLETED", FAILED:"FAILED", CANCEL_REQUESTED:"CANCEL_REQUESTED", CANCELLED:"CANCELLED", }; ee.data.ExportDestination = {DRIVE:"DRIVE", GCS:"GOOGLE_CLOUD_STORAGE", ASSET:"ASSET", }; ee.data.SystemPropertyPrefix = "system:"; @@ -21341,7 +18298,7 @@ ee.ComputedObject.prototype.name = function() { return "ComputedObject"; }; ee.ComputedObject.prototype.aside = function(func, var_args) { - var args = module$contents$goog$array_toArray(arguments); + var args = Array.from(arguments); args[0] = this; func.apply(goog.global, args); return this; @@ -21443,7 +18400,7 @@ goog.exportProperty(ee.Function.prototype, "apply", ee.Function.prototype.apply) ee.Function.prototype.callOrApply = function(thisValue, args) { var isInstance = void 0 !== thisValue, signature = this.getSignature(); if (ee.Types.useKeywordArgs(args, signature, isInstance)) { - var namedArgs = goog.object.clone(args[0]); + var namedArgs = module$contents$goog$object_clone(args[0]); if (isInstance) { var firstArgName = signature.args[0].name; if (firstArgName in namedArgs) { @@ -21526,7 +18483,7 @@ ee.ApiFunction = function(name, opt_signature) { if (!(this instanceof ee.ApiFunction)) { return ee.ComputedObject.construct(ee.ApiFunction, arguments); } - this.signature_ = goog.object.unsafeClone(opt_signature); + this.signature_ = module$contents$goog$object_unsafeClone(opt_signature); this.signature_.name = name; }; goog.inherits(ee.ApiFunction, ee.Function); @@ -21552,13 +18509,13 @@ ee.ApiFunction.api_ = null; ee.ApiFunction.boundSignatures_ = {}; ee.ApiFunction.allSignatures = function() { ee.ApiFunction.initialize(); - return goog.object.map(ee.ApiFunction.api_, function(func) { + return module$contents$goog$object_map(ee.ApiFunction.api_, function(func) { return func.getSignature(); }); }; ee.ApiFunction.unboundFunctions = function() { ee.ApiFunction.initialize(); - return goog.object.filter(ee.ApiFunction.api_, function(func, name) { + return module$contents$goog$object_filter(ee.ApiFunction.api_, function(func, name) { return !ee.ApiFunction.boundSignatures_[name]; }); }; @@ -21579,7 +18536,7 @@ ee.ApiFunction.initialize = function(opt_successCallback, opt_failureCallback) { opt_successCallback && opt_successCallback(); } else { var callback = function(data, opt_error) { - opt_error ? opt_failureCallback && opt_failureCallback(Error(opt_error)) : (ee.ApiFunction.api_ = goog.object.map(data, function(sig, name) { + opt_error ? opt_failureCallback && opt_failureCallback(Error(opt_error)) : (ee.ApiFunction.api_ = module$contents$goog$object_map(data, function(sig, name) { sig.returns = sig.returns.replace(/<.*>/, ""); for (var i = 0; i < sig.args.length; i++) { sig.args[i].type = sig.args[i].type.replace(/<.*>/, ""); @@ -21597,7 +18554,7 @@ ee.ApiFunction.reset = function() { ee.ApiFunction.importApi = function(target, prefix, typeName, opt_prepend) { ee.ApiFunction.initialize(); var prepend = opt_prepend || ""; - goog.object.forEach(ee.ApiFunction.api_, function(apiFunc, name) { + module$contents$goog$object_forEach(ee.ApiFunction.api_, function(apiFunc, name) { var parts = name.split("."); if (2 == parts.length && parts[0] == prefix) { var fname = prepend + parts[1], signature = apiFunc.getSignature(); @@ -21646,7 +18603,7 @@ ee.arguments.extractImpl_ = function(fn, originalArgs, parameterMatcher) { args[paramNames[i]] = originalArgs[i]; } } else { - var seen = new goog.structs.Set(goog.object.getKeys(firstArg)), expected = new goog.structs.Set(paramNames); + var seen = new goog.structs.Set(module$contents$goog$object_getKeys(firstArg)), expected = new goog.structs.Set(paramNames); if (expected.intersection(seen).isEmpty()) { args[paramNames[0]] = originalArgs[0]; } else { @@ -21654,10 +18611,10 @@ ee.arguments.extractImpl_ = function(fn, originalArgs, parameterMatcher) { if (!unexpected.isEmpty()) { throw Error("Unexpected arguments" + fnNameSnippet + ": " + unexpected.getValues().join(", ")); } - args = goog.object.clone(firstArg); + args = module$contents$goog$object_clone(firstArg); } } - var provided = new goog.structs.Set(goog.object.getKeys(args)), missing = (new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix, function(param) { + var provided = new goog.structs.Set(module$contents$goog$object_getKeys(args)), missing = (new goog.structs.Set(module$contents$goog$array_filter(paramNamesWithOptPrefix, function(param) { return !goog.string.startsWith(param, "opt_"); }))).difference(provided); if (!missing.isEmpty()) { @@ -21712,7 +18669,7 @@ ee.Element.prototype.name = function() { ee.Element.prototype.set = function(var_args) { if (1 >= arguments.length) { var properties = arguments[0]; - ee.Types.isRegularObject(properties) && module$contents$goog$array_equals(goog.object.getKeys(properties), ["properties"]) && goog.isObject(properties.properties) && (properties = properties.properties); + ee.Types.isRegularObject(properties) && module$contents$goog$array_equals(module$contents$goog$object_getKeys(properties), ["properties"]) && goog.isObject(properties.properties) && (properties = properties.properties); if (ee.Types.isRegularObject(properties)) { var result = this; for (var key in properties) { @@ -21763,7 +18720,7 @@ ee.Geometry = function(geoJson, opt_proj, opt_geodesic, opt_evenOdd) { } ee.ComputedObject.call(this, null, null); this.type_ = geoJson.type; - this.coordinates_ = null != geoJson.coordinates ? goog.object.unsafeClone(geoJson.coordinates) : null; + this.coordinates_ = null != geoJson.coordinates ? module$contents$goog$object_unsafeClone(geoJson.coordinates) : null; this.geometries_ = geoJson.geometries || null; if (null != opt_proj) { this.proj_ = opt_proj; @@ -22028,7 +18985,7 @@ ee.Geometry.getEeApiArgs_ = function(jsConstructorFn, originalArgs) { delete args.coords; args.crs = args.proj; delete args.proj; - return goog.object.filter(args, function(x) { + return module$contents$goog$object_filter(args, function(x) { return null != x; }); }; @@ -22275,7 +19232,7 @@ ee.Feature = function(geometry, opt_properties) { if ("system:index" in properties) { throw Error('Can\'t specify both "id" and "system:index".'); } - properties = goog.object.clone(properties); + properties = module$contents$goog$object_clone(properties); properties["system:index"] = geometry.id; } ee.Element.call(this, new ee.ApiFunction("Feature"), {geometry:new ee.Geometry(geometry.geometry), metadata:properties}); @@ -22324,7 +19281,7 @@ ee.data.images.applyTransformsToCollection = function(taskConfig) { }; ee.data.images.applySelectionAndScale = function(image, params, outParams) { var clipParams = {}, dimensions_consumed = !1, SCALING_KEYS = ["maxDimension", "width", "height", "scale"]; - goog.object.forEach(params, function(value, key) { + module$contents$goog$object_forEach(params, function(value, key) { if (null != value) { switch(key) { case "dimensions": @@ -22358,7 +19315,7 @@ ee.data.images.applySelectionAndScale = function(image, params, outParams) { } } }); - goog.object.isEmpty(clipParams) || (clipParams.input = image, image = SCALING_KEYS.some(function(key) { + module$contents$goog$object_isEmpty(clipParams) || (clipParams.input = image, image = SCALING_KEYS.some(function(key) { return key in clipParams; }) || dimensions_consumed ? ee.ApiFunction._apply("Image.clipToBoundsAndScale", clipParams) : ee.ApiFunction._apply("Image.clip", clipParams)); return image; @@ -22448,13 +19405,13 @@ ee.data.images.maybeConvertCrsTransformToArray_ = function(crsTransform) { }; ee.data.images.applyVisualization = function(image, params) { var request = {}, visParams = ee.data.images.extractVisParams(params, request); - goog.object.isEmpty(visParams) || (visParams.image = image, image = ee.ApiFunction._apply("Image.visualize", visParams)); + module$contents$goog$object_isEmpty(visParams) || (visParams.image = image, image = ee.ApiFunction._apply("Image.visualize", visParams)); request.image = image; return request; }; ee.data.images.extractVisParams = function(params, outParams) { var keysToExtract = "bands gain bias min max gamma palette opacity forceRgbOutput".split(" "), visParams = {}; - goog.object.forEach(params, function(value, key) { + module$contents$goog$object_forEach(params, function(value, key) { module$contents$goog$array_contains(keysToExtract, key) ? visParams[key] = value : outParams[key] = value; }); return visParams; @@ -22565,7 +19522,7 @@ ee.Image.prototype.getMap = function(opt_visParams, opt_callback) { }; goog.exportProperty(ee.Image.prototype, "getMap", ee.Image.prototype.getMap); ee.Image.prototype.getDownloadURL = function(params, opt_callback) { - var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? goog.object.clone(args.params) : {}; + var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? module$contents$goog$object_clone(args.params) : {}; request.image = this; if (args.callback) { var callback = args.callback; @@ -22578,7 +19535,7 @@ ee.Image.prototype.getDownloadURL = function(params, opt_callback) { }; goog.exportProperty(ee.Image.prototype, "getDownloadURL", ee.Image.prototype.getDownloadURL); ee.Image.prototype.getThumbId = function(params, opt_callback) { - var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? goog.object.clone(args.params) : {}, extra = {}, image = ee.data.images.applyCrsAndTransform(this, request); + var args = ee.arguments.extractFromFunction(ee.Image.prototype.getDownloadURL, arguments), request = args.params ? module$contents$goog$object_clone(args.params) : {}, extra = {}, image = ee.data.images.applyCrsAndTransform(this, request); image = ee.data.images.applySelectionAndScale(image, request, extra); request = ee.data.images.applyVisualization(image, extra); return args.callback ? (ee.data.getThumbId(request, args.callback), null) : ee.data.getThumbId(request); @@ -22670,7 +19627,7 @@ ee.Image.prototype.clip = function(geometry) { }; goog.exportProperty(ee.Image.prototype, "clip", ee.Image.prototype.clip); ee.Image.prototype.rename = function(var_args) { - var names = 1 != arguments.length || ee.Types.isString(arguments[0]) ? module$contents$goog$array_toArray(arguments) : arguments[0]; + var names = 1 != arguments.length || ee.Types.isString(arguments[0]) ? Array.from(arguments) : arguments[0]; return ee.ApiFunction._call("Image.rename", this, names); }; goog.exportProperty(ee.Image.prototype, "rename", ee.Image.prototype.rename); @@ -22944,14 +19901,14 @@ ee.ImageCollection.prototype.elementType = function() { return ee.Image; }; ee.batch = {}; -var module$contents$ee$batch_Export = {image:{}, map:{}, table:{}, video:{}, videoMap:{}}, module$contents$ee$batch_ExportTask = function(config) { +var module$contents$ee$batch_Export = {image:{}, map:{}, table:{}, video:{}, videoMap:{}, classifier:{}}, module$contents$ee$batch_ExportTask = function(config) { this.config_ = config; this.id = null; }; module$contents$ee$batch_ExportTask.create = function(exportArgs) { var config = {element:module$contents$ee$batch_Export.extractElement(exportArgs)}; Object.assign(config, exportArgs); - config = goog.object.filter(config, function(x) { + config = module$contents$goog$object_filter(config, function(x) { return null != x; }); return new module$contents$ee$batch_ExportTask(config); @@ -22975,7 +19932,7 @@ module$contents$ee$batch_ExportTask.prototype.start = function(opt_success, opt_ } }; goog.exportProperty(module$contents$ee$batch_ExportTask.prototype, "start", module$contents$ee$batch_ExportTask.prototype.start); -module$contents$ee$batch_Export.image.toAsset = function(image, opt_description, opt_assetId, opt_pyramidingPolicy, opt_dimensions, opt_region, opt_scale, opt_crs, opt_crsTransform, opt_maxPixels) { +module$contents$ee$batch_Export.image.toAsset = function(image, opt_description, opt_assetId, opt_pyramidingPolicy, opt_dimensions, opt_region, opt_scale, opt_crs, opt_crsTransform, opt_maxPixels, opt_shardSize) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.image.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.IMAGE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; @@ -22995,19 +19952,19 @@ module$contents$ee$batch_Export.map.toCloudStorage = function(image, opt_descrip return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.map.toCloudStorage", module$contents$ee$batch_Export.map.toCloudStorage); -module$contents$ee$batch_Export.table.toCloudStorage = function(collection, opt_description, opt_bucket, opt_fileNamePrefix, opt_fileFormat, opt_selectors) { +module$contents$ee$batch_Export.table.toCloudStorage = function(collection, opt_description, opt_bucket, opt_fileNamePrefix, opt_fileFormat, opt_selectors, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toCloudStorage, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.GCS, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.table.toCloudStorage", module$contents$ee$batch_Export.table.toCloudStorage); -module$contents$ee$batch_Export.table.toDrive = function(collection, opt_description, opt_folder, opt_fileNamePrefix, opt_fileFormat, opt_selectors) { +module$contents$ee$batch_Export.table.toDrive = function(collection, opt_description, opt_folder, opt_fileNamePrefix, opt_fileFormat, opt_selectors, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toDrive, arguments); clientConfig.type = ee.data.ExportType.TABLE; var serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.DRIVE, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.table.toDrive", module$contents$ee$batch_Export.table.toDrive); -module$contents$ee$batch_Export.table.toAsset = function(collection, opt_description, opt_assetId) { +module$contents$ee$batch_Export.table.toAsset = function(collection, opt_description, opt_assetId, opt_maxVertices) { var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.table.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.TABLE); return module$contents$ee$batch_ExportTask.create(serverConfig); }; @@ -23027,6 +19984,11 @@ module$contents$ee$batch_Export.videoMap.toCloudStorage = function(collection, o return module$contents$ee$batch_ExportTask.create(serverConfig); }; goog.exportSymbol("module$contents$ee$batch_Export.videoMap.toCloudStorage", module$contents$ee$batch_Export.videoMap.toCloudStorage); +module$contents$ee$batch_Export.classifier.toAsset = function(classifier, opt_description, opt_assetId) { + var clientConfig = ee.arguments.extractFromFunction(module$contents$ee$batch_Export.classifier.toAsset, arguments), serverConfig = module$contents$ee$batch_Export.convertToServerParams(clientConfig, ee.data.ExportDestination.ASSET, ee.data.ExportType.CLASSIFIER); + return module$contents$ee$batch_ExportTask.create(serverConfig); +}; +goog.exportSymbol("module$contents$ee$batch_Export.classifier.toAsset", module$contents$ee$batch_Export.classifier.toAsset); module$contents$ee$batch_Export.serializeRegion = function(region) { if (region instanceof ee.Geometry) { region = region.toGeoJSON(); @@ -23053,7 +20015,7 @@ module$contents$ee$batch_Export.serializeRegion = function(region) { return JSON.stringify(region); }; module$contents$ee$batch_Export.resolveRegionParam = function(params) { - params = goog.object.clone(params); + params = module$contents$goog$object_clone(params); if (!params.region) { return goog.Promise.resolve(params); } @@ -23072,7 +20034,7 @@ module$contents$ee$batch_Export.extractElement = function(exportArgs) { var isInArgs = function(key) { return key in exportArgs; }, eeElementKey = module$contents$ee$batch_Export.EE_ELEMENT_KEYS.find(isInArgs); - goog.asserts.assert(1 === module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS, isInArgs), 'Expected a single "image" or "collection" key.'); + goog.asserts.assert(1 === module$contents$goog$array_count(module$contents$ee$batch_Export.EE_ELEMENT_KEYS, isInArgs), 'Expected a single "image", "collection" or "classifier" key.'); var element = exportArgs[eeElementKey]; if (element instanceof ee.Image) { var result = element; @@ -23086,7 +20048,11 @@ module$contents$ee$batch_Export.extractElement = function(exportArgs) { if (element instanceof ee.Element) { result = element; } else { - throw Error("Unknown element type provided: " + typeof element + ". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection or ee.Element."); + if (element instanceof ee.ComputedObject) { + result = element; + } else { + throw Error("Unknown element type provided: " + typeof element + ". Expected: ee.Image, ee.ImageCollection, ee.FeatureCollection, ee.Element or ee.ComputedObject."); + } } } } @@ -23114,6 +20080,9 @@ module$contents$ee$batch_Export.convertToServerParams = function(originalArgs, d case ee.data.ExportType.VIDEO_MAP: taskConfig = module$contents$ee$batch_Export.videoMap.prepareTaskConfig_(taskConfig, destination); break; + case ee.data.ExportType.CLASSIFIER: + taskConfig = module$contents$ee$batch_Export.classifier.prepareTaskConfig_(taskConfig, destination); + break; default: throw Error("Unknown export type: " + taskConfig.type); } @@ -23173,8 +20142,11 @@ module$contents$ee$batch_Export.videoMap.prepareTaskConfig_ = function(taskConfi taskConfig.tileDimensions = {width:taskConfig.tileWidth || 256, height:taskConfig.tileHeight || 256}; return taskConfig = module$contents$ee$batch_Export.prepareDestination_(taskConfig, destination); }; +module$contents$ee$batch_Export.classifier.prepareTaskConfig_ = function(taskConfig, destination) { + return taskConfig = module$contents$ee$batch_Export.prepareDestination_(taskConfig, destination); +}; var module$contents$ee$batch_VideoFormat = {MP4:"MP4", GIF:"GIF", VP9:"VP9", }, module$contents$ee$batch_MapFormat = {AUTO_JPEG_PNG:"AUTO_JPEG_PNG", JPEG:"JPEG", PNG:"PNG", }, module$contents$ee$batch_ImageFormat = {GEO_TIFF:"GEO_TIFF", TF_RECORD_IMAGE:"TF_RECORD_IMAGE", }, module$contents$ee$batch_TableFormat = {CSV:"CSV", GEO_JSON:"GEO_JSON", KML:"KML", KMZ:"KMZ", SHP:"SHP", TF_RECORD_TABLE:"TF_RECORD_TABLE", }, module$contents$ee$batch_VideoMapVersion = {V1:"V1", V2:"V2", }, module$contents$ee$batch_FORMAT_OPTIONS_MAP = -{GEO_TIFF:["cloudOptimized", "fileDimensions", ], TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")}, module$contents$ee$batch_FORMAT_PREFIX_MAP = {GEO_TIFF:"tiff", TF_RECORD_IMAGE:"tfrecord"}; +{GEO_TIFF:["cloudOptimized", "fileDimensions", "shardSize", ], TF_RECORD_IMAGE:"patchDimensions kernelSize compressed maxFileSize defaultValue tensorDepths sequenceData collapseBands maskedThreshold".split(" ")}, module$contents$ee$batch_FORMAT_PREFIX_MAP = {GEO_TIFF:"tiff", TF_RECORD_IMAGE:"tfrecord"}; module$contents$ee$batch_Export.reconcileVideoFormat_ = function(taskConfig) { taskConfig.videoOptions = taskConfig.framesPerSecond || 5.0; taskConfig.maxFrames = taskConfig.maxFrames || 1000; @@ -23289,12 +20261,12 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, return {}; } if (Object.keys(taskConfig).some(function(key) { - return goog.object.containsKey(formatOptions, key); + return module$contents$goog$object_containsKey(formatOptions, key); })) { throw Error("Parameter specified at least twice: once in config, and once in config format options."); } - for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$18 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$18.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$18.next()) { - var $jscomp$destructuring$var19 = $jscomp.makeIterator($jscomp$key$.value), key$jscomp$0 = $jscomp$destructuring$var19.next().value, value = $jscomp$destructuring$var19.next().value; + for (var prefix = module$contents$ee$batch_FORMAT_PREFIX_MAP[imageFormat], validOptionKeys = module$contents$ee$batch_FORMAT_OPTIONS_MAP[imageFormat], prefixedOptions = {}, $jscomp$iter$20 = $jscomp.makeIterator(Object.entries(formatOptions)), $jscomp$key$ = $jscomp$iter$20.next(); !$jscomp$key$.done; $jscomp$key$ = $jscomp$iter$20.next()) { + var $jscomp$destructuring$var21 = $jscomp.makeIterator($jscomp$key$.value), key$jscomp$0 = $jscomp$destructuring$var21.next().value, value = $jscomp$destructuring$var21.next().value; if (!module$contents$goog$array_contains(validOptionKeys, key$jscomp$0)) { var validKeysMsg = validOptionKeys.join(", "); throw Error('"' + key$jscomp$0 + '" is not a valid option, the image format "' + imageFormat + '""may have the following options: ' + (validKeysMsg + '".')); @@ -23305,7 +20277,7 @@ module$contents$ee$batch_Export.prefixImageFormatOptions_ = function(taskConfig, return prefixedOptions; }; module$contents$ee$batch_Export.CRS_TRANSFORM_KEY = "crs_transform"; -module$contents$ee$batch_Export.EE_ELEMENT_KEYS = ["image", "collection"]; +module$contents$ee$batch_Export.EE_ELEMENT_KEYS = ["image", "collection", "classifier"]; ee.batch.Export = module$contents$ee$batch_Export; ee.batch.ExportTask = module$contents$ee$batch_ExportTask; ee.batch.ImageFormat = module$contents$ee$batch_ImageFormat; @@ -23471,8 +20443,8 @@ ee.CustomFunction.resolveNamelessArgs_ = function(signature, vars, body) { return node.functionDefinitionValue ? 1 : node.arrayValue ? countNodes(node.arrayValue.values) : node.dictionaryValue ? countNodes(Object.values(node.dictionaryValue.values)) : node.functionInvocationValue ? countNodes(Object.values(node.functionInvocationValue.arguments)) : 0; }; return countNodes(Object.values(expression.values)); - }(ee.Serializer.encodeCloudApiExpression(body.apply(null, vars))) + "_", i$38 = 0; i$38 < namelessArgIndices.length; i$38++) { - var index = namelessArgIndices[i$38], name = baseName + i$38; + }(ee.Serializer.encodeCloudApiExpression(body.apply(null, vars))) + "_", i$47 = 0; i$47 < namelessArgIndices.length; i$47++) { + var index = namelessArgIndices[i$47], name = baseName + i$47; vars[index].varName = name; signature.args[index].name = name; } @@ -23587,12 +20559,12 @@ ee.Deserializer.decodeValue_ = function(json, namedValues) { return ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:json}), json); case "Invocation": var func = "functionName" in json ? ee.ApiFunction.lookup(json.functionName) : ee.Deserializer.decodeValue_(json["function"], namedValues); - var args = goog.object.map(json.arguments, function(element) { + var args = module$contents$goog$object_map(json.arguments, function(element) { return ee.Deserializer.decodeValue_(element, namedValues); }); return ee.Deserializer.invocation_(func, args); case "Dictionary": - return goog.object.map(json.value, function(element) { + return module$contents$goog$object_map(json.value, function(element) { return ee.Deserializer.decodeValue_(element, namedValues); }); case "Function": @@ -23662,7 +20634,7 @@ ee.Deserializer.decodeCloudApi = function(json) { } return decoded[reference]; }, decode = function(node) { - return null !== node.constantValue ? node.constantValue : null !== node.arrayValue ? node.arrayValue.values.map(decode) : null !== node.dictionaryValue ? goog.object.map(node.dictionaryValue.values, decode) : null !== node.argumentReference ? ee.CustomFunction.variable(Object, node.argumentReference) : null !== node.functionDefinitionValue ? decodeFunctionDefinition(node.functionDefinitionValue) : null !== node.functionInvocationValue ? decodeFunctionInvocation(node.functionInvocationValue) : + return null !== node.constantValue ? node.constantValue : null !== node.arrayValue ? node.arrayValue.values.map(decode) : null !== node.dictionaryValue ? module$contents$goog$object_map(node.dictionaryValue.values, decode) : null !== node.argumentReference ? ee.CustomFunction.variable(Object, node.argumentReference) : null !== node.functionDefinitionValue ? decodeFunctionDefinition(node.functionDefinitionValue) : null !== node.functionInvocationValue ? decodeFunctionInvocation(node.functionInvocationValue) : null !== node.bytesValue ? ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({bytesValue:node.bytesValue}), node.bytesValue) : null !== node.integerValue ? ee.Deserializer.roundTrip_(new module$exports$eeapiclient$ee_api_client.ValueNode({integerValue:node.integerValue}), node.integerValue) : null !== node.valueReference ? lookup(node.valueReference, "reference") : null; }, decodeFunctionDefinition = function(defined) { var body = lookup(defined.body, "function body"), signature = {args:defined.argumentNames.map(function(name) { @@ -23672,7 +20644,7 @@ ee.Deserializer.decodeCloudApi = function(json) { return body; }); }, decodeFunctionInvocation = function(invoked) { - var func = invoked.functionReference ? lookup(invoked.functionReference, "function") : ee.ApiFunction.lookup(invoked.functionName), args = goog.object.map(invoked.arguments, decode); + var func = invoked.functionReference ? lookup(invoked.functionReference, "function") : ee.ApiFunction.lookup(invoked.functionName), args = module$contents$goog$object_map(invoked.arguments, decode); return ee.Deserializer.invocation_(func, args); }; return lookup(expression.result, "result value"); @@ -23764,7 +20736,7 @@ ee.reset = function() { ee.String.reset(); ee.Terrain.reset(); ee.resetGeneratedClasses_(); - goog.object.clear(ee.Algorithms); + module$contents$goog$object_clear(ee.Algorithms); }; goog.exportSymbol("ee.reset", ee.reset); ee.InitState = {NOT_READY:"not_ready", LOADING:"loading", READY:"ready"}; @@ -23893,7 +20865,7 @@ ee.promote_ = function(arg, klass) { }; ee.initializeUnboundMethods_ = function() { var unbound = ee.ApiFunction.unboundFunctions(); - goog.object.getKeys(unbound).sort().forEach(function(name) { + module$contents$goog$object_getKeys(unbound).sort().forEach(function(name) { var func = unbound[name], signature = func.getSignature(); if (!signature.hidden) { var nameParts = name.split("."), target = ee.Algorithms; @@ -24137,7 +21109,7 @@ goog.events.EventHandler.prototype.unlistenWithWrapper = function(src, wrapper, return this; }; goog.events.EventHandler.prototype.removeAll = function() { - goog.object.forEach(this.keys_, function(listenerObj, key) { + module$contents$goog$object_forEach(this.keys_, function(listenerObj, key) { this.keys_.hasOwnProperty(key) && goog.events.unlistenByKey(listenerObj); }, this); this.keys_ = {}; @@ -24165,7 +21137,7 @@ goog.inherits(goog.fs.Error, module$contents$goog$debug$Error_DebugError); goog.fs.Error.ErrorName = {ABORT:"AbortError", ENCODING:"EncodingError", INVALID_MODIFICATION:"InvalidModificationError", INVALID_STATE:"InvalidStateError", NOT_FOUND:"NotFoundError", NOT_READABLE:"NotReadableError", NO_MODIFICATION_ALLOWED:"NoModificationAllowedError", PATH_EXISTS:"PathExistsError", QUOTA_EXCEEDED:"QuotaExceededError", SECURITY:"SecurityError", SYNTAX:"SyntaxError", TYPE_MISMATCH:"TypeMismatchError"}; goog.fs.Error.ErrorCode = {NOT_FOUND:1, SECURITY:2, ABORT:3, NOT_READABLE:4, ENCODING:5, NO_MODIFICATION_ALLOWED:6, INVALID_STATE:7, SYNTAX:8, INVALID_MODIFICATION:9, QUOTA_EXCEEDED:10, TYPE_MISMATCH:11, PATH_EXISTS:12}; goog.fs.Error.getNameFromCode_ = function(code) { - var name = goog.object.findKey(goog.fs.Error.NameToCodeMap_, function(c) { + var name = module$contents$goog$object_findKey(goog.fs.Error.NameToCodeMap_, function(c) { return code == c; }); if (void 0 === name) { @@ -24176,8 +21148,10 @@ goog.fs.Error.getNameFromCode_ = function(code) { goog.fs.Error.getCodeFromName_ = function(name) { return goog.fs.Error.NameToCodeMap_[name]; }; -goog.fs.Error.NameToCodeMap_ = goog.object.create(goog.fs.Error.ErrorName.ABORT, goog.fs.Error.ErrorCode.ABORT, goog.fs.Error.ErrorName.ENCODING, goog.fs.Error.ErrorCode.ENCODING, goog.fs.Error.ErrorName.INVALID_MODIFICATION, goog.fs.Error.ErrorCode.INVALID_MODIFICATION, goog.fs.Error.ErrorName.INVALID_STATE, goog.fs.Error.ErrorCode.INVALID_STATE, goog.fs.Error.ErrorName.NOT_FOUND, goog.fs.Error.ErrorCode.NOT_FOUND, goog.fs.Error.ErrorName.NOT_READABLE, goog.fs.Error.ErrorCode.NOT_READABLE, goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED, -goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED, goog.fs.Error.ErrorName.PATH_EXISTS, goog.fs.Error.ErrorCode.PATH_EXISTS, goog.fs.Error.ErrorName.QUOTA_EXCEEDED, goog.fs.Error.ErrorCode.QUOTA_EXCEEDED, goog.fs.Error.ErrorName.SECURITY, goog.fs.Error.ErrorCode.SECURITY, goog.fs.Error.ErrorName.SYNTAX, goog.fs.Error.ErrorCode.SYNTAX, goog.fs.Error.ErrorName.TYPE_MISMATCH, goog.fs.Error.ErrorCode.TYPE_MISMATCH); +var $jscomp$compprop4 = {}; +goog.fs.Error.NameToCodeMap_ = ($jscomp$compprop4[goog.fs.Error.ErrorName.ABORT] = goog.fs.Error.ErrorCode.ABORT, $jscomp$compprop4[goog.fs.Error.ErrorName.ENCODING] = goog.fs.Error.ErrorCode.ENCODING, $jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_MODIFICATION] = goog.fs.Error.ErrorCode.INVALID_MODIFICATION, $jscomp$compprop4[goog.fs.Error.ErrorName.INVALID_STATE] = goog.fs.Error.ErrorCode.INVALID_STATE, $jscomp$compprop4[goog.fs.Error.ErrorName.NOT_FOUND] = goog.fs.Error.ErrorCode.NOT_FOUND, +$jscomp$compprop4[goog.fs.Error.ErrorName.NOT_READABLE] = goog.fs.Error.ErrorCode.NOT_READABLE, $jscomp$compprop4[goog.fs.Error.ErrorName.NO_MODIFICATION_ALLOWED] = goog.fs.Error.ErrorCode.NO_MODIFICATION_ALLOWED, $jscomp$compprop4[goog.fs.Error.ErrorName.PATH_EXISTS] = goog.fs.Error.ErrorCode.PATH_EXISTS, $jscomp$compprop4[goog.fs.Error.ErrorName.QUOTA_EXCEEDED] = goog.fs.Error.ErrorCode.QUOTA_EXCEEDED, $jscomp$compprop4[goog.fs.Error.ErrorName.SECURITY] = goog.fs.Error.ErrorCode.SECURITY, $jscomp$compprop4[goog.fs.Error.ErrorName.SYNTAX] = +goog.fs.Error.ErrorCode.SYNTAX, $jscomp$compprop4[goog.fs.Error.ErrorName.TYPE_MISMATCH] = goog.fs.Error.ErrorCode.TYPE_MISMATCH, $jscomp$compprop4); goog.fs.ProgressEvent = function(event, target) { goog.events.Event.call(this, event.type, target); this.event_ = event; @@ -24870,7 +21844,7 @@ goog.style.installSafeStyleSheet = function(safeStyleSheet, opt_node) { head = dh.createDom(goog.dom.TagName.HEAD); body.parentNode.insertBefore(head, body); } - var el = dh.createDom(goog.dom.TagName.STYLE), nonce = goog.getScriptNonce(); + var el = dh.createDom(goog.dom.TagName.STYLE), nonce = goog.dom.safe.getStyleNonce(); nonce && el.setAttribute("nonce", nonce); goog.style.setSafeStyleSheet(el, safeStyleSheet); dh.appendChild(head, el); @@ -25075,7 +22049,7 @@ goog.style.parseStyleAttribute = function(value) { }; goog.style.toStyleAttribute = function(obj) { var buffer = []; - goog.object.forEach(obj, function(value, key) { + module$contents$goog$object_forEach(obj, function(value, key) { buffer.push(goog.string.toSelectorCase(key), ":", value, ";"); }); return buffer.join(""); @@ -25271,7 +22245,7 @@ ee.layers.AbstractTile.prototype.startLoad = function() { status == HttpStatus.TOO_MANY_REQUESTS && $jscomp$this.setStatus(ee.layers.AbstractTile.Status.THROTTLED); if (HttpStatus.isSuccess(status)) { var sourceResponseHeaders = {}; - goog.object.forEach($jscomp$this.xhrIo_.getResponseHeaders(), function(value, name) { + module$contents$goog$object_forEach($jscomp$this.xhrIo_.getResponseHeaders(), function(value, name) { sourceResponseHeaders[name.toLowerCase()] = value; }); $jscomp$this.sourceResponseHeaders = sourceResponseHeaders; @@ -25336,13 +22310,12 @@ ee.layers.AbstractTile.prototype.disposeInternal = function() { }; ee.layers.AbstractTile.EventType = {STATUS_CHANGED:"status-changed"}; ee.layers.AbstractTile.Status = {NEW:"new", LOADING:"loading", THROTTLED:"throttled", LOADED:"loaded", FAILED:"failed", ABORTED:"aborted", REMOVED:"removed", }; -ee.layers.AbstractTile.DONE_STATUS_SET_ = goog.object.createSet(ee.layers.AbstractTile.Status.ABORTED, ee.layers.AbstractTile.Status.FAILED, ee.layers.AbstractTile.Status.LOADED, ee.layers.AbstractTile.Status.REMOVED); +ee.layers.AbstractTile.DONE_STATUS_SET_ = module$contents$goog$object_createSet(ee.layers.AbstractTile.Status.ABORTED, ee.layers.AbstractTile.Status.FAILED, ee.layers.AbstractTile.Status.LOADED, ee.layers.AbstractTile.Status.REMOVED); ee.layers.AbstractTile.DEFAULT_MAX_LOAD_RETRIES_ = 5; -var module$contents$ee$layers$AbstractTileSource_AbstractTileSource = function() { +var module$exports$ee$layers$AbstractTileSource = function() { goog.Disposable.call(this); }; -$jscomp.inherits(module$contents$ee$layers$AbstractTileSource_AbstractTileSource, goog.Disposable); -ee.layers.AbstractTileSource = module$contents$ee$layers$AbstractTileSource_AbstractTileSource; +$jscomp.inherits(module$exports$ee$layers$AbstractTileSource, goog.Disposable); ee.layers.BinaryOverlay = function(tileSource, opt_options) { ee.layers.AbstractOverlay.call(this, tileSource, opt_options); this.buffersByCoord_ = new goog.structs.Map; @@ -25401,7 +22374,7 @@ goog.net.ImageLoader.prototype.removeImage = function(id) { }; goog.net.ImageLoader.prototype.start = function() { var imageIdToRequestMap = this.imageIdToRequestMap_; - module$contents$goog$array_forEach(goog.object.getKeys(imageIdToRequestMap), function(id) { + module$contents$goog$array_forEach(module$contents$goog$object_getKeys(imageIdToRequestMap), function(id) { var imageRequest = imageIdToRequestMap[id]; imageRequest && (delete imageIdToRequestMap[id], this.loadImage_(imageRequest, id)); }, this); @@ -25433,7 +22406,7 @@ goog.net.ImageLoader.prototype.onNetworkEvent_ = function(evt) { } }; goog.net.ImageLoader.prototype.maybeFireCompletionEvent_ = function() { - goog.object.isEmpty(this.imageIdToImageMap_) && goog.object.isEmpty(this.imageIdToRequestMap_) && !this.completionFired_ && (this.completionFired_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE)); + module$contents$goog$object_isEmpty(this.imageIdToImageMap_) && module$contents$goog$object_isEmpty(this.imageIdToRequestMap_) && !this.completionFired_ && (this.completionFired_ = !0, this.dispatchEvent(goog.net.EventType.COMPLETE)); }; goog.net.ImageLoader.prototype.disposeInternal = function() { delete this.imageIdToRequestMap_; @@ -25522,13 +22495,13 @@ goog.string.path.split = function(path) { return [head, tail]; }; var module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource = function(bucket, path, maxZoom, opt_suffix) { - module$contents$ee$layers$AbstractTileSource_AbstractTileSource.call(this); + module$exports$ee$layers$AbstractTileSource.call(this); this.bucket_ = bucket; this.path_ = path; this.suffix_ = opt_suffix || ""; this.maxZoom_ = maxZoom; }; -$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource, module$contents$ee$layers$AbstractTileSource_AbstractTileSource); +$jscomp.inherits(module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource, module$exports$ee$layers$AbstractTileSource); module$contents$ee$layers$CloudStorageTileSource_CloudStorageTileSource.prototype.loadTile = function(tile, opt_priority) { if (tile.zoom <= this.maxZoom_) { tile.sourceUrl = this.getTileUrl_(tile.coord, tile.zoom); @@ -25648,7 +22621,7 @@ goog.structs.Pool.prototype.setDelay = function(delay) { this.delay = delay; }; goog.structs.Pool.prototype.getObject = function() { - var time = goog.now(); + var time = Date.now(); if (!(null != this.lastAccess && time - this.lastAccess < this.delay)) { var obj = this.removeFreeObject_(); obj && (this.lastAccess = time, this.inUseSet_.add(obj)); @@ -25751,7 +22724,7 @@ goog.structs.Heap.prototype.insertAll = function(heap) { return; } } else { - keys = goog.object.getKeys(heap), values = goog.object.getValues(heap); + keys = module$contents$goog$object_getKeys(heap), values = module$contents$goog$object_getValues(heap); } for (i = 0; i < keys.length; i++) { this.insert(keys[i], values[i]); @@ -25856,7 +22829,7 @@ goog.inherits(goog.structs.PriorityPool, goog.structs.Pool); goog.structs.PriorityPool.DEFAULT_PRIORITY_ = 100; goog.structs.PriorityPool.prototype.setDelay = function(delay) { goog.structs.PriorityPool.superClass_.setDelay.call(this, delay); - null != this.lastAccess && (goog.global.clearTimeout(this.delayTimeout_), this.delayTimeout_ = goog.global.setTimeout(goog.bind(this.handleQueueRequests_, this), this.delay + this.lastAccess - goog.now()), this.handleQueueRequests_()); + null != this.lastAccess && (goog.global.clearTimeout(this.delayTimeout_), this.delayTimeout_ = goog.global.setTimeout(goog.bind(this.handleQueueRequests_, this), this.delay + this.lastAccess - Date.now()), this.handleQueueRequests_()); }; goog.structs.PriorityPool.prototype.getObject = function(opt_callback, opt_priority) { if (!opt_callback) { @@ -25892,11 +22865,11 @@ goog.structs.PriorityPool.prototype.disposeInternal = function() { this.requestQueue_ = null; }; var module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource = function(mapId, opt_profiler) { - module$contents$ee$layers$AbstractTileSource_AbstractTileSource.call(this); + module$exports$ee$layers$AbstractTileSource.call(this); this.mapId_ = mapId; this.profiler_ = opt_profiler || null; }; -$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource, module$contents$ee$layers$AbstractTileSource_AbstractTileSource); +$jscomp.inherits(module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource, module$exports$ee$layers$AbstractTileSource); module$contents$ee$layers$EarthEngineTileSource_EarthEngineTileSource.prototype.loadTile = function(tile, opt_priority) { var ProfilerHeader = module$contents$ee$apiclient_apiclient.PROFILE_HEADER.toLowerCase(), key = goog.events.listen(tile, ee.layers.AbstractTile.EventType.STATUS_CHANGED, function() { switch(tile.getStatus()) { @@ -26300,7 +23273,7 @@ ee.data.Profiler.prototype.getStatusText = function() { return "Loading..."; } var profiles = 0, nonTileProfiles = 0, tileProfiles = 0; - goog.object.forEach(this.profileIds_, function(refCount) { + module$contents$goog$object_forEach(this.profileIds_, function(refCount) { profiles++; Infinity === refCount ? nonTileProfiles++ : tileProfiles++; }, this); @@ -26333,7 +23306,7 @@ ee.data.Profiler.prototype.refresh_ = function(retryAttempt) { var handleResponse = function(result, error) { marker == $jscomp$this.lastRefreshToken_ && (error && "number" === typeof retryAttempt && retryAttempt < $jscomp$this.MAX_RETRY_COUNT_ ? goog.Timer.callOnce(goog.bind($jscomp$this.refresh_, $jscomp$this, retryAttempt + 1), 2 * ee.data.Profiler.DELAY_BEFORE_REFRESH_) : ($jscomp$this.profileError_ = error || null, $jscomp$this.profileData_ = error ? ee.data.Profiler.getEmptyProfile_($jscomp$this.format_) : result, $jscomp$this.lastRefreshToken_ = null, $jscomp$this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED), $jscomp$this.dispatchEvent(ee.data.Profiler.EventType.DATA_CHANGED))); - }, ids = goog.object.getKeys(this.profileIds_); + }, ids = module$contents$goog$object_getKeys(this.profileIds_); 0 === ids.length ? handleResponse(ee.data.Profiler.getEmptyProfile_(this.format_), void 0) : (ee.ApiFunction._apply(this.showInternal_ ? "Profile.getProfilesInternal" : "Profile.getProfiles", {ids:ids, format:this.format_.toString(), }).getInfo(handleResponse), this.dispatchEvent(ee.data.Profiler.EventType.STATE_CHANGED)); }; ee.data.Profiler.prototype.addTile = function(tileId, profileId) { @@ -26374,42 +23347,28 @@ ee.data.Profiler.Format.prototype.toString = function() { }; ee.data.Profiler.Format.TEXT = new ee.data.Profiler.Format("text"); ee.data.Profiler.Format.JSON = new ee.data.Profiler.Format("json"); -ee.SavedFunction = function(path, signature) { - if (!(this instanceof ee.SavedFunction)) { - return new ee.SavedFunction(path, signature); - } - this.path_ = path; - this.signature_ = signature; -}; -goog.inherits(ee.SavedFunction, ee.Function); -goog.exportSymbol("ee.SavedFunction", ee.SavedFunction); -ee.SavedFunction.prototype.encode = function(encoder) { - return ee.ApiFunction._call("LoadAlgorithmById", this.path_).encode(encoder); -}; -ee.SavedFunction.prototype.getSignature = function() { - return this.signature_; -}; (function() { - var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.table.toCloudStorage ee.batch.Export.image.toDrive ee.batch.Export.table.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.map.toCloudStorage ee.batch.Export.video.toDrive ee.batch.Export.image.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toDrive ee.Collection.prototype.filterDate ee.Collection.prototype.limit ee.Collection.prototype.filter ee.Collection.prototype.filterMetadata ee.Collection.prototype.sort ee.Collection.prototype.map ee.Collection.prototype.filterBounds ee.Collection.prototype.iterate ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.aside ee.ComputedObject.prototype.evaluate ee.data.getTaskList ee.data.deleteAsset ee.data.startProcessing ee.data.getTileUrl ee.data.makeDownloadUrl ee.data.getTaskListWithLimit ee.data.authenticateViaPopup ee.data.makeTableDownloadUrl ee.data.getAssetAcl ee.data.listOperations ee.data.getTableDownloadId ee.data.computeValue ee.data.cancelOperation ee.data.authenticateViaPrivateKey ee.data.getThumbId ee.data.getMapId ee.data.getOperation ee.data.newTaskId ee.data.getVideoThumbId ee.data.updateAsset ee.data.cancelTask ee.data.startIngestion ee.data.getTaskStatus ee.data.makeThumbUrl ee.data.updateTask ee.data.getFilmstripThumbId ee.data.authenticateViaOauth ee.data.setAssetAcl ee.data.setAssetProperties ee.data.authenticate ee.data.getDownloadId ee.data.listBuckets ee.data.getAssetRoots ee.data.getAssetRootQuota ee.data.startTableIngestion ee.data.getAsset ee.data.createAssetHome ee.data.getInfo ee.data.getList ee.data.createAsset ee.data.createFolder ee.data.listAssets ee.data.listImages ee.data.renameAsset ee.data.copyAsset ee.Date ee.Deserializer.decode ee.Deserializer.decodeCloudApi ee.Deserializer.fromCloudApiJSON ee.Deserializer.fromJSON ee.Dictionary ee.apply ee.reset ee.Algorithms ee.initialize ee.InitState ee.call ee.TILE_SIZE ee.Element.prototype.set ee.Feature ee.Feature.prototype.getMap ee.Feature.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getInfo ee.FeatureCollection ee.Filter ee.Filter.gte ee.Filter.metadata ee.Filter.inList ee.Filter.date ee.Filter.lte ee.Filter.eq ee.Filter.lt ee.Filter.or ee.Filter.gt ee.Filter.prototype.not ee.Filter.and ee.Filter.bounds ee.Filter.neq ee.Function.prototype.apply ee.Function.prototype.call ee.Geometry.prototype.toGeoJSONString ee.Geometry.Point ee.Geometry.LinearRing ee.Geometry.prototype.serialize ee.Geometry.MultiPoint ee.Geometry.MultiPolygon ee.Geometry.Rectangle ee.Geometry.MultiLineString ee.Geometry ee.Geometry.Polygon ee.Geometry.LineString ee.Geometry.BBox ee.Geometry.prototype.toGeoJSON ee.Image ee.Image.prototype.expression ee.Image.prototype.getThumbURL ee.Image.prototype.rename ee.Image.prototype.getMap ee.Image.prototype.clip ee.Image.prototype.select ee.Image.cat ee.Image.prototype.getDownloadURL ee.Image.rgb ee.Image.prototype.getThumbId ee.Image.prototype.getInfo ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getMap ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.first ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection ee.ImageCollection.prototype.getInfo ee.List ee.Number ee.Serializer.toReadableCloudApiJSON ee.Serializer.toJSON ee.Serializer.toCloudApiJSON ee.Serializer.encode ee.Serializer.encodeCloudApiPretty ee.Serializer.encodeCloudApi ee.Serializer.toReadableJSON ee.String ee.Terrain".split(" "), - orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "), "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), ["collection", "opt_description", "opt_assetId"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), - "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), - "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors".split(" "), ["start", "opt_end"], ["max", "opt_property", "opt_ascending"], ["filter"], - ["name", "operator", "value"], ["property", "opt_ascending"], ["algorithm", "opt_dropNulls"], ["geometry"], ["algorithm", "opt_first"], ["opt_callback"], ["legacy"], ["func", "var_args"], ["callback"], ["opt_callback"], ["assetId", "opt_callback"], ["taskId", "params", "opt_callback"], ["id", "x", "y", "z"], ["id"], ["opt_limit", "opt_callback"], ["opt_success", "opt_error"], ["id"], ["assetId", "opt_callback"], ["opt_limit", "opt_callback"], ["params", "opt_callback"], ["obj", "opt_callback"], - ["operationName", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes"], ["params", "opt_callback"], ["params", "opt_callback"], ["operationName", "opt_callback"], ["opt_count", "opt_callback"], ["params", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["taskId", "opt_callback"], ["taskId", "request", "opt_callback"], ["taskId", "opt_callback"], ["id"], ["taskId", "action", "opt_callback"], ["params", "opt_callback"], ["clientId", "success", "opt_error", - "opt_extraScopes", "opt_onImmediateFailed"], ["assetId", "aclUpdate", "opt_callback"], ["assetId", "properties", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["params", "opt_callback"], ["project", "opt_callback"], ["opt_callback"], ["rootId", "opt_callback"], ["taskId", "request", "opt_callback"], ["id", "opt_callback"], ["requestedId", "opt_callback"], ["id", "opt_callback"], ["params", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", - "opt_callback"], ["path", "opt_force", "opt_callback"], ["parent", "params", "opt_callback"], ["parent", "params", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], ["func", "namedArgs"], [], [], ["opt_baseurl", "opt_tileurl", "opt_successCallback", "opt_errorCallback", "opt_xsrfToken"], [], ["func", "var_args"], [], ["var_args"], ["geometry", "opt_properties"], - ["opt_visParams", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["propertySelectors", "opt_newProperties", "opt_retainGeometry"], ["opt_callback"], ["args", "opt_column"], ["opt_filter"], ["name", "value"], ["name", "operator", "value"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["start", "opt_end"], ["name", "value"], ["name", "value"], ["name", "value"], ["var_args"], ["name", - "value"], [], ["var_args"], ["geometry", "opt_errorMargin"], ["name", "value"], ["namedArgs"], ["var_args"], [], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["legacy"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", - "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["west", "south", "east", "north"], [], ["opt_args"], ["expression", "opt_map"], ["params", "opt_callback"], ["var_args"], ["opt_visParams", "opt_callback"], ["geometry"], ["var_args"], ["var_args"], ["params", "opt_callback"], ["r", "g", "b"], ["params", "opt_callback"], ["opt_callback"], ["selectors", "opt_names"], ["opt_visParams", "opt_callback"], ["params", "opt_callback"], [], ["params", "opt_callback"], - ["args"], ["opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj", "opt_isCompound"], ["obj"], ["obj"], ["obj"], ["string"], []]; - [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.table.toCloudStorage, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.video.toCloudStorage, - module$contents$ee$batch_Export.table.toDrive, ee.Collection.prototype.filterDate, ee.Collection.prototype.limit, ee.Collection.prototype.filter, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.sort, ee.Collection.prototype.map, ee.Collection.prototype.filterBounds, ee.Collection.prototype.iterate, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.aside, ee.ComputedObject.prototype.evaluate, ee.data.getTaskList, ee.data.deleteAsset, - ee.data.startProcessing, ee.data.getTileUrl, ee.data.makeDownloadUrl, ee.data.getTaskListWithLimit, ee.data.authenticateViaPopup, ee.data.makeTableDownloadUrl, ee.data.getAssetAcl, ee.data.listOperations, ee.data.getTableDownloadId, ee.data.computeValue, ee.data.cancelOperation, ee.data.authenticateViaPrivateKey, ee.data.getThumbId, ee.data.getMapId, ee.data.getOperation, ee.data.newTaskId, ee.data.getVideoThumbId, ee.data.updateAsset, ee.data.cancelTask, ee.data.startIngestion, ee.data.getTaskStatus, - ee.data.makeThumbUrl, ee.data.updateTask, ee.data.getFilmstripThumbId, ee.data.authenticateViaOauth, ee.data.setAssetAcl, ee.data.setAssetProperties, ee.data.authenticate, ee.data.getDownloadId, ee.data.listBuckets, ee.data.getAssetRoots, ee.data.getAssetRootQuota, ee.data.startTableIngestion, ee.data.getAsset, ee.data.createAssetHome, ee.data.getInfo, ee.data.getList, ee.data.createAsset, ee.data.createFolder, ee.data.listAssets, ee.data.listImages, ee.data.renameAsset, ee.data.copyAsset, ee.Date, - ee.Deserializer.decode, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.fromJSON, ee.Dictionary, ee.apply, ee.reset, ee.Algorithms, ee.initialize, ee.InitState, ee.call, ee.TILE_SIZE, ee.Element.prototype.set, ee.Feature, ee.Feature.prototype.getMap, ee.Feature.prototype.getInfo, ee.FeatureCollection.prototype.getMap, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.select, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection, - ee.Filter, ee.Filter.gte, ee.Filter.metadata, ee.Filter.inList, ee.Filter.date, ee.Filter.lte, ee.Filter.eq, ee.Filter.lt, ee.Filter.or, ee.Filter.gt, ee.Filter.prototype.not, ee.Filter.and, ee.Filter.bounds, ee.Filter.neq, ee.Function.prototype.apply, ee.Function.prototype.call, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.Point, ee.Geometry.LinearRing, ee.Geometry.prototype.serialize, ee.Geometry.MultiPoint, ee.Geometry.MultiPolygon, ee.Geometry.Rectangle, ee.Geometry.MultiLineString, ee.Geometry, - ee.Geometry.Polygon, ee.Geometry.LineString, ee.Geometry.BBox, ee.Geometry.prototype.toGeoJSON, ee.Image, ee.Image.prototype.expression, ee.Image.prototype.getThumbURL, ee.Image.prototype.rename, ee.Image.prototype.getMap, ee.Image.prototype.clip, ee.Image.prototype.select, ee.Image.cat, ee.Image.prototype.getDownloadURL, ee.Image.rgb, ee.Image.prototype.getThumbId, ee.Image.prototype.getInfo, ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.getMap, ee.ImageCollection.prototype.getVideoThumbURL, - ee.ImageCollection.prototype.first, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection, ee.ImageCollection.prototype.getInfo, ee.List, ee.Number, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.toJSON, ee.Serializer.toCloudApiJSON, ee.Serializer.encode, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encodeCloudApi, ee.Serializer.toReadableJSON, ee.String, ee.Terrain].forEach(function(fn, i) { + var exportedFnInfo = {}, orderedFnNames = "ee.ApiFunction._apply ee.ApiFunction.lookup ee.ApiFunction._call ee.batch.Export.image.toDrive ee.batch.Export.map.toCloudStorage ee.batch.Export.table.toAsset ee.batch.Export.videoMap.toCloudStorage ee.batch.Export.image.toCloudStorage ee.batch.Export.image.toAsset ee.batch.Export.video.toDrive ee.batch.Export.classifier.toAsset ee.batch.Export.table.toDrive ee.batch.Export.video.toCloudStorage ee.batch.Export.table.toCloudStorage ee.Collection.prototype.filter ee.Collection.prototype.sort ee.Collection.prototype.filterBounds ee.Collection.prototype.map ee.Collection.prototype.filterMetadata ee.Collection.prototype.iterate ee.Collection.prototype.filterDate ee.Collection.prototype.limit ee.ComputedObject.prototype.evaluate ee.ComputedObject.prototype.serialize ee.ComputedObject.prototype.getInfo ee.ComputedObject.prototype.aside ee.data.getMapId ee.data.createFolder ee.data.renameAsset ee.data.makeThumbUrl ee.data.updateTask ee.data.startProcessing ee.data.getDownloadId ee.data.getTileUrl ee.data.copyAsset ee.data.makeDownloadUrl ee.data.deleteAsset ee.data.getTableDownloadId ee.data.getAssetAcl ee.data.computeValue ee.data.makeTableDownloadUrl ee.data.getVideoThumbId ee.data.getThumbId ee.data.authenticateViaOauth ee.data.newTaskId ee.data.getFilmstripThumbId ee.data.getTaskStatus ee.data.getList ee.data.updateAsset ee.data.startIngestion ee.data.setAssetAcl ee.data.listAssets ee.data.getTaskList ee.data.listImages ee.data.setAssetProperties ee.data.listBuckets ee.data.authenticate ee.data.getAssetRootQuota ee.data.getTaskListWithLimit ee.data.authenticateViaPopup ee.data.listOperations ee.data.startTableIngestion ee.data.getAssetRoots ee.data.getAsset ee.data.cancelOperation ee.data.createAssetHome ee.data.authenticateViaPrivateKey ee.data.cancelTask ee.data.getOperation ee.data.getInfo ee.data.createAsset ee.Date ee.Deserializer.decodeCloudApi ee.Deserializer.fromJSON ee.Deserializer.fromCloudApiJSON ee.Deserializer.decode ee.Dictionary ee.reset ee.InitState ee.initialize ee.TILE_SIZE ee.call ee.apply ee.Algorithms ee.Element.prototype.set ee.Feature.prototype.getInfo ee.Feature.prototype.getMap ee.Feature ee.FeatureCollection.prototype.select ee.FeatureCollection.prototype.getDownloadURL ee.FeatureCollection.prototype.getInfo ee.FeatureCollection.prototype.getMap ee.FeatureCollection ee.Filter.eq ee.Filter.prototype.not ee.Filter.lt ee.Filter.gt ee.Filter.and ee.Filter.neq ee.Filter ee.Filter.inList ee.Filter.date ee.Filter.metadata ee.Filter.bounds ee.Filter.lte ee.Filter.gte ee.Filter.or ee.Function.prototype.call ee.Function.prototype.apply ee.Geometry.BBox ee.Geometry.Polygon ee.Geometry.MultiPolygon ee.Geometry.prototype.serialize ee.Geometry.Point ee.Geometry ee.Geometry.MultiPoint ee.Geometry.Rectangle ee.Geometry.LineString ee.Geometry.MultiLineString ee.Geometry.prototype.toGeoJSONString ee.Geometry.prototype.toGeoJSON ee.Geometry.LinearRing ee.Image.prototype.getInfo ee.Image ee.Image.prototype.getThumbURL ee.Image.prototype.expression ee.Image.cat ee.Image.prototype.rename ee.Image.prototype.getThumbId ee.Image.prototype.getMap ee.Image.prototype.clip ee.Image.rgb ee.Image.prototype.getDownloadURL ee.Image.prototype.select ee.ImageCollection ee.ImageCollection.prototype.getInfo ee.ImageCollection.prototype.first ee.ImageCollection.prototype.select ee.ImageCollection.prototype.getVideoThumbURL ee.ImageCollection.prototype.getFilmstripThumbURL ee.ImageCollection.prototype.getMap ee.List ee.Number ee.Serializer.toCloudApiJSON ee.Serializer.toReadableCloudApiJSON ee.Serializer.encodeCloudApiPretty ee.Serializer.encodeCloudApi ee.Serializer.toJSON ee.Serializer.toReadableJSON ee.Serializer.encode ee.String ee.Terrain".split(" "), + orderedParamLists = [["name", "namedArgs"], ["name"], ["name", "var_args"], "image opt_description opt_folder opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), "image opt_description opt_bucket opt_fileFormat opt_path opt_writePublicTiles opt_scale opt_maxZoom opt_minZoom opt_region opt_skipEmptyTiles opt_mapsApiKey opt_bucketCorsUris".split(" "), ["collection", + "opt_description", "opt_assetId", "opt_maxVertices"], "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_writePublicTiles opt_minZoom opt_maxZoom opt_scale opt_region opt_skipEmptyTiles opt_minTimeMachineZoomSubset opt_maxTimeMachineZoomSubset opt_tileWidth opt_tileHeight opt_tileStride opt_videoFormat opt_version opt_mapsApiKey opt_bucketCorsUris".split(" "), "image opt_description opt_bucket opt_fileNamePrefix opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize opt_fileDimensions opt_skipEmptyTiles opt_fileFormat opt_formatOptions".split(" "), + "image opt_description opt_assetId opt_pyramidingPolicy opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_shardSize".split(" "), "collection opt_description opt_folder opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), ["classifier", "opt_description", "opt_assetId"], "collection opt_description opt_folder opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), + "collection opt_description opt_bucket opt_fileNamePrefix opt_framesPerSecond opt_dimensions opt_region opt_scale opt_crs opt_crsTransform opt_maxPixels opt_maxFrames".split(" "), "collection opt_description opt_bucket opt_fileNamePrefix opt_fileFormat opt_selectors opt_maxVertices".split(" "), ["filter"], ["property", "opt_ascending"], ["geometry"], ["algorithm", "opt_dropNulls"], ["name", "operator", "value"], ["algorithm", "opt_first"], ["start", "opt_end"], ["max", "opt_property", "opt_ascending"], + ["callback"], ["legacy"], ["opt_callback"], ["func", "var_args"], ["params", "opt_callback"], ["path", "opt_force", "opt_callback"], ["sourceId", "destinationId", "opt_callback"], ["id"], ["taskId", "action", "opt_callback"], ["taskId", "params", "opt_callback"], ["params", "opt_callback"], ["id", "x", "y", "z"], ["sourceId", "destinationId", "opt_overwrite", "opt_callback"], ["id"], ["assetId", "opt_callback"], ["params", "opt_callback"], ["assetId", "opt_callback"], ["obj", "opt_callback"], ["id"], + ["params", "opt_callback"], ["params", "opt_callback"], "clientId success opt_error opt_extraScopes opt_onImmediateFailed opt_suppressDefaultScopes".split(" "), ["opt_count", "opt_callback"], ["params", "opt_callback"], ["taskId", "opt_callback"], ["params", "opt_callback"], ["assetId", "asset", "updateFields", "opt_callback"], ["taskId", "request", "opt_callback"], ["assetId", "aclUpdate", "opt_callback"], ["parent", "params", "opt_callback"], ["opt_callback"], ["parent", "params", "opt_callback"], + ["assetId", "properties", "opt_callback"], ["project", "opt_callback"], ["clientId", "success", "opt_error", "opt_extraScopes", "opt_onImmediateFailed"], ["rootId", "opt_callback"], ["opt_limit", "opt_callback"], ["opt_success", "opt_error"], ["opt_limit", "opt_callback"], ["taskId", "request", "opt_callback"], ["opt_callback"], ["id", "opt_callback"], ["operationName", "opt_callback"], ["requestedId", "opt_callback"], ["privateKey", "opt_success", "opt_error", "opt_extraScopes", "opt_suppressDefaultScopes"], + ["taskId", "opt_callback"], ["operationName", "opt_callback"], ["id", "opt_callback"], ["value", "opt_path", "opt_force", "opt_properties", "opt_callback"], ["date", "opt_tz"], ["json"], ["json"], ["json"], ["json"], ["opt_dict"], [], [], ["opt_baseurl", "opt_tileurl", "opt_successCallback", "opt_errorCallback", "opt_xsrfToken"], [], ["func", "var_args"], ["func", "namedArgs"], [], ["var_args"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["geometry", "opt_properties"], ["propertySelectors", + "opt_newProperties", "opt_retainGeometry"], ["opt_format", "opt_selectors", "opt_filename", "opt_callback"], ["opt_callback"], ["opt_visParams", "opt_callback"], ["args", "opt_column"], ["name", "value"], [], ["name", "value"], ["name", "value"], ["var_args"], ["name", "value"], ["opt_filter"], ["opt_leftField", "opt_rightValue", "opt_rightField", "opt_leftValue"], ["start", "opt_end"], ["name", "operator", "value"], ["geometry", "opt_errorMargin"], ["name", "value"], ["name", "value"], ["var_args"], + ["var_args"], ["namedArgs"], ["west", "south", "east", "north"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError", "opt_evenOdd"], ["legacy"], ["coords", "opt_proj"], ["geoJson", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj"], ["coords", "opt_proj", "opt_geodesic", "opt_evenOdd"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], ["coords", "opt_proj", "opt_geodesic", "opt_maxError"], [], [], ["coords", + "opt_proj", "opt_geodesic", "opt_maxError"], ["opt_callback"], ["opt_args"], ["params", "opt_callback"], ["expression", "opt_map"], ["var_args"], ["var_args"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["geometry"], ["r", "g", "b"], ["params", "opt_callback"], ["var_args"], ["args"], ["opt_callback"], [], ["selectors", "opt_names"], ["params", "opt_callback"], ["params", "opt_callback"], ["opt_visParams", "opt_callback"], ["list"], ["number"], ["obj"], ["obj"], ["obj"], ["obj"], + ["obj"], ["obj"], ["obj", "opt_isCompound"], ["string"], []]; + [ee.ApiFunction._apply, ee.ApiFunction.lookup, ee.ApiFunction._call, module$contents$ee$batch_Export.image.toDrive, module$contents$ee$batch_Export.map.toCloudStorage, module$contents$ee$batch_Export.table.toAsset, module$contents$ee$batch_Export.videoMap.toCloudStorage, module$contents$ee$batch_Export.image.toCloudStorage, module$contents$ee$batch_Export.image.toAsset, module$contents$ee$batch_Export.video.toDrive, module$contents$ee$batch_Export.classifier.toAsset, module$contents$ee$batch_Export.table.toDrive, + module$contents$ee$batch_Export.video.toCloudStorage, module$contents$ee$batch_Export.table.toCloudStorage, ee.Collection.prototype.filter, ee.Collection.prototype.sort, ee.Collection.prototype.filterBounds, ee.Collection.prototype.map, ee.Collection.prototype.filterMetadata, ee.Collection.prototype.iterate, ee.Collection.prototype.filterDate, ee.Collection.prototype.limit, ee.ComputedObject.prototype.evaluate, ee.ComputedObject.prototype.serialize, ee.ComputedObject.prototype.getInfo, ee.ComputedObject.prototype.aside, + ee.data.getMapId, ee.data.createFolder, ee.data.renameAsset, ee.data.makeThumbUrl, ee.data.updateTask, ee.data.startProcessing, ee.data.getDownloadId, ee.data.getTileUrl, ee.data.copyAsset, ee.data.makeDownloadUrl, ee.data.deleteAsset, ee.data.getTableDownloadId, ee.data.getAssetAcl, ee.data.computeValue, ee.data.makeTableDownloadUrl, ee.data.getVideoThumbId, ee.data.getThumbId, ee.data.authenticateViaOauth, ee.data.newTaskId, ee.data.getFilmstripThumbId, ee.data.getTaskStatus, ee.data.getList, + ee.data.updateAsset, ee.data.startIngestion, ee.data.setAssetAcl, ee.data.listAssets, ee.data.getTaskList, ee.data.listImages, ee.data.setAssetProperties, ee.data.listBuckets, ee.data.authenticate, ee.data.getAssetRootQuota, ee.data.getTaskListWithLimit, ee.data.authenticateViaPopup, ee.data.listOperations, ee.data.startTableIngestion, ee.data.getAssetRoots, ee.data.getAsset, ee.data.cancelOperation, ee.data.createAssetHome, ee.data.authenticateViaPrivateKey, ee.data.cancelTask, ee.data.getOperation, + ee.data.getInfo, ee.data.createAsset, ee.Date, ee.Deserializer.decodeCloudApi, ee.Deserializer.fromJSON, ee.Deserializer.fromCloudApiJSON, ee.Deserializer.decode, ee.Dictionary, ee.reset, ee.InitState, ee.initialize, ee.TILE_SIZE, ee.call, ee.apply, ee.Algorithms, ee.Element.prototype.set, ee.Feature.prototype.getInfo, ee.Feature.prototype.getMap, ee.Feature, ee.FeatureCollection.prototype.select, ee.FeatureCollection.prototype.getDownloadURL, ee.FeatureCollection.prototype.getInfo, ee.FeatureCollection.prototype.getMap, + ee.FeatureCollection, ee.Filter.eq, ee.Filter.prototype.not, ee.Filter.lt, ee.Filter.gt, ee.Filter.and, ee.Filter.neq, ee.Filter, ee.Filter.inList, ee.Filter.date, ee.Filter.metadata, ee.Filter.bounds, ee.Filter.lte, ee.Filter.gte, ee.Filter.or, ee.Function.prototype.call, ee.Function.prototype.apply, ee.Geometry.BBox, ee.Geometry.Polygon, ee.Geometry.MultiPolygon, ee.Geometry.prototype.serialize, ee.Geometry.Point, ee.Geometry, ee.Geometry.MultiPoint, ee.Geometry.Rectangle, ee.Geometry.LineString, + ee.Geometry.MultiLineString, ee.Geometry.prototype.toGeoJSONString, ee.Geometry.prototype.toGeoJSON, ee.Geometry.LinearRing, ee.Image.prototype.getInfo, ee.Image, ee.Image.prototype.getThumbURL, ee.Image.prototype.expression, ee.Image.cat, ee.Image.prototype.rename, ee.Image.prototype.getThumbId, ee.Image.prototype.getMap, ee.Image.prototype.clip, ee.Image.rgb, ee.Image.prototype.getDownloadURL, ee.Image.prototype.select, ee.ImageCollection, ee.ImageCollection.prototype.getInfo, ee.ImageCollection.prototype.first, + ee.ImageCollection.prototype.select, ee.ImageCollection.prototype.getVideoThumbURL, ee.ImageCollection.prototype.getFilmstripThumbURL, ee.ImageCollection.prototype.getMap, ee.List, ee.Number, ee.Serializer.toCloudApiJSON, ee.Serializer.toReadableCloudApiJSON, ee.Serializer.encodeCloudApiPretty, ee.Serializer.encodeCloudApi, ee.Serializer.toJSON, ee.Serializer.toReadableJSON, ee.Serializer.encode, ee.String, ee.Terrain].forEach(function(fn, i) { fn && (exportedFnInfo[fn.toString()] = {name:orderedFnNames[i], paramNames:orderedParamLists[i]}); }); goog.global.EXPORTED_FN_INFO = exportedFnInfo; diff --git a/package.json b/package.json index 9769d9c26..2bf5a16b9 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { "name": "earthengine-api", - "version": "0.1.254", + "version": "0.1.270", "main": "javascript/build/browser.js" }