UNPKG

create-expo-cljs-app

Version:

Create a react native application with Expo and Shadow-CLJS!

1 lines 45.7 kB
["^ ","~:resource-id",["~:shadow.build.classpath/resource","goog/functions/functions.js"],"~:js","goog.provide(\"goog.functions\");\ngoog.functions.constant = function(retValue) {\n return function() {\n return retValue;\n };\n};\ngoog.functions.FALSE = function() {\n return false;\n};\ngoog.functions.TRUE = function() {\n return true;\n};\ngoog.functions.NULL = function() {\n return null;\n};\ngoog.functions.identity = function(opt_returnValue, var_args) {\n return opt_returnValue;\n};\ngoog.functions.error = function(message) {\n return function() {\n throw new Error(message);\n };\n};\ngoog.functions.fail = function(err) {\n return function() {\n throw err;\n };\n};\ngoog.functions.lock = function(f, opt_numArgs) {\n opt_numArgs = opt_numArgs || 0;\n return function() {\n const self = this;\n return f.apply(self, Array.prototype.slice.call(arguments, 0, opt_numArgs));\n };\n};\ngoog.functions.nth = function(n) {\n return function() {\n return arguments[n];\n };\n};\ngoog.functions.partialRight = function(fn, var_args) {\n const rightArgs = Array.prototype.slice.call(arguments, 1);\n return function() {\n const self = this;\n const newArgs = Array.prototype.slice.call(arguments);\n newArgs.push.apply(newArgs, rightArgs);\n return fn.apply(self, newArgs);\n };\n};\ngoog.functions.withReturnValue = function(f, retValue) {\n return goog.functions.sequence(f, goog.functions.constant(retValue));\n};\ngoog.functions.equalTo = function(value, opt_useLooseComparison) {\n return function(other) {\n return opt_useLooseComparison ? value == other : value === other;\n };\n};\ngoog.functions.compose = function(fn, var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = this;\n let result;\n if (length) {\n result = functions[length - 1].apply(self, arguments);\n }\n for (let i = length - 2; i >= 0; i--) {\n result = functions[i].call(self, result);\n }\n return result;\n };\n};\ngoog.functions.sequence = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = this;\n let result;\n for (let i = 0; i < length; i++) {\n result = functions[i].apply(self, arguments);\n }\n return result;\n };\n};\ngoog.functions.and = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = this;\n for (let i = 0; i < length; i++) {\n if (!functions[i].apply(self, arguments)) {\n return false;\n }\n }\n return true;\n };\n};\ngoog.functions.or = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = this;\n for (let i = 0; i < length; i++) {\n if (functions[i].apply(self, arguments)) {\n return true;\n }\n }\n return false;\n };\n};\ngoog.functions.not = function(f) {\n return function() {\n const self = this;\n return !f.apply(self, arguments);\n };\n};\ngoog.functions.create = function(constructor, var_args) {\n const temp = function() {\n };\n temp.prototype = constructor.prototype;\n const obj = new temp;\n constructor.apply(obj, Array.prototype.slice.call(arguments, 1));\n return obj;\n};\ngoog.functions.CACHE_RETURN_VALUE = goog.define(\"goog.functions.CACHE_RETURN_VALUE\", true);\ngoog.functions.cacheReturnValue = function(fn) {\n let called = false;\n let value;\n return function() {\n if (!goog.functions.CACHE_RETURN_VALUE) {\n return fn();\n }\n if (!called) {\n value = fn();\n called = true;\n }\n return value;\n };\n};\ngoog.functions.once = function(f) {\n let inner = f;\n return function() {\n if (inner) {\n const tmp = inner;\n inner = null;\n tmp();\n }\n };\n};\ngoog.functions.debounce = function(f, interval, opt_scope) {\n let timeout = 0;\n return function(var_args) {\n goog.global.clearTimeout(timeout);\n const args = arguments;\n timeout = goog.global.setTimeout(function() {\n f.apply(opt_scope, args);\n }, interval);\n };\n};\ngoog.functions.throttle = function(f, interval, opt_scope) {\n let timeout = 0;\n let shouldFire = false;\n let args = [];\n const handleTimeout = function() {\n timeout = 0;\n if (shouldFire) {\n shouldFire = false;\n fire();\n }\n };\n const fire = function() {\n timeout = goog.global.setTimeout(handleTimeout, interval);\n f.apply(opt_scope, args);\n };\n return function(var_args) {\n args = arguments;\n if (!timeout) {\n fire();\n } else {\n shouldFire = true;\n }\n };\n};\ngoog.functions.rateLimit = function(f, interval, opt_scope) {\n let timeout = 0;\n const handleTimeout = function() {\n timeout = 0;\n };\n return function(var_args) {\n if (!timeout) {\n timeout = goog.global.setTimeout(handleTimeout, interval);\n f.apply(opt_scope, arguments);\n }\n };\n};\n","~:source","// Copyright 2008 The Closure Library Authors. All Rights Reserved.\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS-IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n/**\n * @fileoverview Utilities for creating functions. Loosely inspired by these\n * java classes from the Guava library:\n * com.google.common.base.Functions\n * https://google.github.io/guava/releases/snapshot-jre/api/docs/index.html?com/google/common/base/Functions.html\n *\n * com.google.common.base.Predicates\n * https://google.github.io/guava/releases/snapshot-jre/api/docs/index.html?com/google/common/base/Predicates.html\n *\n * More about these can be found at\n * https://github.com/google/guava/wiki/FunctionalExplained\n *\n * @author nicksantos@google.com (Nick Santos)\n */\n\n\ngoog.provide('goog.functions');\n\n\n/**\n * Creates a function that always returns the same value.\n * @param {T} retValue The value to return.\n * @return {function():T} The new function.\n * @template T\n */\ngoog.functions.constant = function(retValue) {\n return function() { return retValue; };\n};\n\n\n/**\n * Always returns false.\n * @type {function(...): boolean}\n */\ngoog.functions.FALSE = function() {\n return false;\n};\n\n\n/**\n * Always returns true.\n * @type {function(...): boolean}\n */\ngoog.functions.TRUE = function() {\n return true;\n};\n\n\n/**\n * Always returns NULL.\n * @type {function(...): null}\n */\ngoog.functions.NULL = function() {\n return null;\n};\n\n\n/**\n * A simple function that returns the first argument of whatever is passed\n * into it.\n * @param {T=} opt_returnValue The single value that will be returned.\n * @param {...*} var_args Optional trailing arguments. These are ignored.\n * @return {T} The first argument passed in, or undefined if nothing was passed.\n * @template T\n */\ngoog.functions.identity = function(opt_returnValue, var_args) {\n return opt_returnValue;\n};\n\n\n/**\n * Creates a function that always throws an error with the given message.\n * @param {string} message The error message.\n * @return {!Function} The error-throwing function.\n */\ngoog.functions.error = function(message) {\n return function() {\n throw new Error(message);\n };\n};\n\n\n/**\n * Creates a function that throws the given object.\n * @param {*} err An object to be thrown.\n * @return {!Function} The error-throwing function.\n */\ngoog.functions.fail = function(err) {\n return function() { throw err; };\n};\n\n\n/**\n * Given a function, create a function that keeps opt_numArgs arguments and\n * silently discards all additional arguments.\n * @param {Function} f The original function.\n * @param {number=} opt_numArgs The number of arguments to keep. Defaults to 0.\n * @return {!Function} A version of f that only keeps the first opt_numArgs\n * arguments.\n */\ngoog.functions.lock = function(f, opt_numArgs) {\n opt_numArgs = opt_numArgs || 0;\n return function() {\n const self = /** @type {*} */ (this);\n return f.apply(self, Array.prototype.slice.call(arguments, 0, opt_numArgs));\n };\n};\n\n\n/**\n * Creates a function that returns its nth argument.\n * @param {number} n The position of the return argument.\n * @return {!Function} A new function.\n */\ngoog.functions.nth = function(n) {\n return function() { return arguments[n]; };\n};\n\n\n/**\n * Like goog.partial(), except that arguments are added after arguments to the\n * returned function.\n *\n * Usage:\n * function f(arg1, arg2, arg3, arg4) { ... }\n * var g = goog.functions.partialRight(f, arg3, arg4);\n * g(arg1, arg2);\n *\n * @param {!Function} fn A function to partially apply.\n * @param {...*} var_args Additional arguments that are partially applied to fn\n * at the end.\n * @return {!Function} A partially-applied form of the function goog.partial()\n * was invoked as a method of.\n */\ngoog.functions.partialRight = function(fn, var_args) {\n const rightArgs = Array.prototype.slice.call(arguments, 1);\n return function() {\n const self = /** @type {*} */ (this);\n const newArgs = Array.prototype.slice.call(arguments);\n newArgs.push.apply(newArgs, rightArgs);\n return fn.apply(self, newArgs);\n };\n};\n\n\n/**\n * Given a function, create a new function that swallows its return value\n * and replaces it with a new one.\n * @param {Function} f A function.\n * @param {T} retValue A new return value.\n * @return {function(...?):T} A new function.\n * @template T\n */\ngoog.functions.withReturnValue = function(f, retValue) {\n return goog.functions.sequence(f, goog.functions.constant(retValue));\n};\n\n\n/**\n * Creates a function that returns whether its argument equals the given value.\n *\n * Example:\n * var key = goog.object.findKey(obj, goog.functions.equalTo('needle'));\n *\n * @param {*} value The value to compare to.\n * @param {boolean=} opt_useLooseComparison Whether to use a loose (==)\n * comparison rather than a strict (===) one. Defaults to false.\n * @return {function(*):boolean} The new function.\n */\ngoog.functions.equalTo = function(value, opt_useLooseComparison) {\n return function(other) {\n return opt_useLooseComparison ? (value == other) : (value === other);\n };\n};\n\n\n/**\n * Creates the composition of the functions passed in.\n * For example, (goog.functions.compose(f, g))(a) is equivalent to f(g(a)).\n * @param {function(...?):T} fn The final function.\n * @param {...Function} var_args A list of functions.\n * @return {function(...?):T} The composition of all inputs.\n * @template T\n */\ngoog.functions.compose = function(fn, var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = /** @type {*} */ (this);\n let result;\n if (length) {\n result = functions[length - 1].apply(self, arguments);\n }\n\n for (let i = length - 2; i >= 0; i--) {\n result = functions[i].call(self, result);\n }\n return result;\n };\n};\n\n\n/**\n * Creates a function that calls the functions passed in in sequence, and\n * returns the value of the last function. For example,\n * (goog.functions.sequence(f, g))(x) is equivalent to f(x),g(x).\n * @param {...Function} var_args A list of functions.\n * @return {!Function} A function that calls all inputs in sequence.\n */\ngoog.functions.sequence = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = /** @type {*} */ (this);\n let result;\n for (let i = 0; i < length; i++) {\n result = functions[i].apply(self, arguments);\n }\n return result;\n };\n};\n\n\n/**\n * Creates a function that returns true if each of its components evaluates\n * to true. The components are evaluated in order, and the evaluation will be\n * short-circuited as soon as a function returns false.\n * For example, (goog.functions.and(f, g))(x) is equivalent to f(x) && g(x).\n * @param {...Function} var_args A list of functions.\n * @return {function(...?):boolean} A function that ANDs its component\n * functions.\n */\ngoog.functions.and = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = /** @type {*} */ (this);\n for (let i = 0; i < length; i++) {\n if (!functions[i].apply(self, arguments)) {\n return false;\n }\n }\n return true;\n };\n};\n\n\n/**\n * Creates a function that returns true if any of its components evaluates\n * to true. The components are evaluated in order, and the evaluation will be\n * short-circuited as soon as a function returns true.\n * For example, (goog.functions.or(f, g))(x) is equivalent to f(x) || g(x).\n * @param {...Function} var_args A list of functions.\n * @return {function(...?):boolean} A function that ORs its component\n * functions.\n */\ngoog.functions.or = function(var_args) {\n const functions = arguments;\n const length = functions.length;\n return function() {\n const self = /** @type {*} */ (this);\n for (let i = 0; i < length; i++) {\n if (functions[i].apply(self, arguments)) {\n return true;\n }\n }\n return false;\n };\n};\n\n\n/**\n * Creates a function that returns the Boolean opposite of a provided function.\n * For example, (goog.functions.not(f))(x) is equivalent to !f(x).\n * @param {!Function} f The original function.\n * @return {function(...?):boolean} A function that delegates to f and returns\n * opposite.\n */\ngoog.functions.not = function(f) {\n return function() {\n const self = /** @type {*} */ (this);\n return !f.apply(self, arguments);\n };\n};\n\n\n/**\n * Generic factory function to construct an object given the constructor\n * and the arguments. Intended to be bound to create object factories.\n *\n * Example:\n *\n * var factory = goog.partial(goog.functions.create, Class);\n *\n * @param {function(new:T, ...)} constructor The constructor for the Object.\n * @param {...*} var_args The arguments to be passed to the constructor.\n * @return {T} A new instance of the class given in `constructor`.\n * @template T\n */\ngoog.functions.create = function(constructor, var_args) {\n /**\n * @constructor\n * @final\n */\n const temp = function() {};\n temp.prototype = constructor.prototype;\n\n // obj will have constructor's prototype in its chain and\n // 'obj instanceof constructor' will be true.\n const obj = new temp();\n\n // obj is initialized by constructor.\n // arguments is only array-like so lacks shift(), but can be used with\n // the Array prototype function.\n constructor.apply(obj, Array.prototype.slice.call(arguments, 1));\n return obj;\n};\n\n\n/**\n * @define {boolean} Whether the return value cache should be used.\n * This should only be used to disable caches when testing.\n */\ngoog.functions.CACHE_RETURN_VALUE =\n goog.define('goog.functions.CACHE_RETURN_VALUE', true);\n\n\n/**\n * Gives a wrapper function that caches the return value of a parameterless\n * function when first called.\n *\n * When called for the first time, the given function is called and its\n * return value is cached (thus this is only appropriate for idempotent\n * functions). Subsequent calls will return the cached return value. This\n * allows the evaluation of expensive functions to be delayed until first used.\n *\n * To cache the return values of functions with parameters, see goog.memoize.\n *\n * @param {function():T} fn A function to lazily evaluate.\n * @return {function():T} A wrapped version the function.\n * @template T\n */\ngoog.functions.cacheReturnValue = function(fn) {\n let called = false;\n let value;\n\n return function() {\n if (!goog.functions.CACHE_RETURN_VALUE) {\n return fn();\n }\n\n if (!called) {\n value = fn();\n called = true;\n }\n\n return value;\n };\n};\n\n\n/**\n * Wraps a function to allow it to be called, at most, once. All\n * additional calls are no-ops.\n *\n * This is particularly useful for initialization functions\n * that should be called, at most, once.\n *\n * @param {function():*} f Function to call.\n * @return {function():undefined} Wrapped function.\n */\ngoog.functions.once = function(f) {\n // Keep a reference to the function that we null out when we're done with\n // it -- that way, the function can be GC'd when we're done with it.\n let inner = f;\n return function() {\n if (inner) {\n const tmp = inner;\n inner = null;\n tmp();\n }\n };\n};\n\n\n/**\n * Wraps a function to allow it to be called, at most, once per interval\n * (specified in milliseconds). If the wrapper function is called N times within\n * that interval, only the Nth call will go through.\n *\n * This is particularly useful for batching up repeated actions where the\n * last action should win. This can be used, for example, for refreshing an\n * autocomplete pop-up every so often rather than updating with every keystroke,\n * since the final text typed by the user is the one that should produce the\n * final autocomplete results. For more stateful debouncing with support for\n * pausing, resuming, and canceling debounced actions, use\n * `goog.async.Debouncer`.\n *\n * @param {function(this:SCOPE, ...?)} f Function to call.\n * @param {number} interval Interval over which to debounce. The function will\n * only be called after the full interval has elapsed since the last call.\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\n * @return {function(...?): undefined} Wrapped function.\n * @template SCOPE\n */\ngoog.functions.debounce = function(f, interval, opt_scope) {\n let timeout = 0;\n return /** @type {function(...?)} */ (function(var_args) {\n goog.global.clearTimeout(timeout);\n const args = arguments;\n timeout = goog.global.setTimeout(function() {\n f.apply(opt_scope, args);\n }, interval);\n });\n};\n\n\n/**\n * Wraps a function to allow it to be called, at most, once per interval\n * (specified in milliseconds). If the wrapper function is called N times in\n * that interval, both the 1st and the Nth calls will go through.\n *\n * This is particularly useful for limiting repeated user requests where the\n * the last action should win, but you also don't want to wait until the end of\n * the interval before sending a request out, as it leads to a perception of\n * slowness for the user.\n *\n * @param {function(this:SCOPE, ...?)} f Function to call.\n * @param {number} interval Interval over which to throttle. The function can\n * only be called once per interval.\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\n * @return {function(...?): undefined} Wrapped function.\n * @template SCOPE\n */\ngoog.functions.throttle = function(f, interval, opt_scope) {\n let timeout = 0;\n let shouldFire = false;\n let args = [];\n\n const handleTimeout = function() {\n timeout = 0;\n if (shouldFire) {\n shouldFire = false;\n fire();\n }\n };\n\n const fire = function() {\n timeout = goog.global.setTimeout(handleTimeout, interval);\n f.apply(opt_scope, args);\n };\n\n return /** @type {function(...?)} */ (function(var_args) {\n args = arguments;\n if (!timeout) {\n fire();\n } else {\n shouldFire = true;\n }\n });\n};\n\n\n/**\n * Wraps a function to allow it to be called, at most, once per interval\n * (specified in milliseconds). If the wrapper function is called N times within\n * that interval, only the 1st call will go through.\n *\n * This is particularly useful for limiting repeated user requests where the\n * first request is guaranteed to have all the data required to perform the\n * final action, so there's no need to wait until the end of the interval before\n * sending the request out.\n *\n * @param {function(this:SCOPE, ...?)} f Function to call.\n * @param {number} interval Interval over which to rate-limit. The function will\n * only be called once per interval, and ignored for the remainer of the\n * interval.\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\n * @return {function(...?): undefined} Wrapped function.\n * @template SCOPE\n */\ngoog.functions.rateLimit = function(f, interval, opt_scope) {\n let timeout = 0;\n\n const handleTimeout = function() {\n timeout = 0;\n };\n\n return /** @type {function(...?)} */ (function(var_args) {\n if (!timeout) {\n timeout = goog.global.setTimeout(handleTimeout, interval);\n f.apply(opt_scope, arguments);\n }\n });\n};\n","~:compiled-at",1613924115718,"~:source-map-json","{\n\"version\":3,\n\"file\":\"goog.functions.functions.js\",\n\"lineCount\":196,\n\"mappings\":\"AA8BAA,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,CAAEG,KAAF,CAAQoD,SAAR,EAAmB/C,SAAnB,CAAA;AAFY;AADyC,GAAzD;AAP0D,CAA5D;;\",\n\"sources\":[\"goog/functions/functions.js\"],\n\"sourcesContent\":[\"// Copyright 2008 The Closure Library Authors. All Rights Reserved.\\n//\\n// Licensed under the Apache License, Version 2.0 (the \\\"License\\\");\\n// you may not use this file except in compliance with the License.\\n// You may obtain a copy of the License at\\n//\\n// http://www.apache.org/licenses/LICENSE-2.0\\n//\\n// Unless required by applicable law or agreed to in writing, software\\n// distributed under the License is distributed on an \\\"AS-IS\\\" BASIS,\\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\\n// See the License for the specific language governing permissions and\\n// limitations under the License.\\n\\n/**\\n * @fileoverview Utilities for creating functions. Loosely inspired by these\\n * java classes from the Guava library:\\n * com.google.common.base.Functions\\n * https://google.github.io/guava/releases/snapshot-jre/api/docs/index.html?com/google/common/base/Functions.html\\n *\\n * com.google.common.base.Predicates\\n * https://google.github.io/guava/releases/snapshot-jre/api/docs/index.html?com/google/common/base/Predicates.html\\n *\\n * More about these can be found at\\n * https://github.com/google/guava/wiki/FunctionalExplained\\n *\\n * @author nicksantos@google.com (Nick Santos)\\n */\\n\\n\\ngoog.provide('goog.functions');\\n\\n\\n/**\\n * Creates a function that always returns the same value.\\n * @param {T} retValue The value to return.\\n * @return {function():T} The new function.\\n * @template T\\n */\\ngoog.functions.constant = function(retValue) {\\n return function() { return retValue; };\\n};\\n\\n\\n/**\\n * Always returns false.\\n * @type {function(...): boolean}\\n */\\ngoog.functions.FALSE = function() {\\n return false;\\n};\\n\\n\\n/**\\n * Always returns true.\\n * @type {function(...): boolean}\\n */\\ngoog.functions.TRUE = function() {\\n return true;\\n};\\n\\n\\n/**\\n * Always returns NULL.\\n * @type {function(...): null}\\n */\\ngoog.functions.NULL = function() {\\n return null;\\n};\\n\\n\\n/**\\n * A simple function that returns the first argument of whatever is passed\\n * into it.\\n * @param {T=} opt_returnValue The single value that will be returned.\\n * @param {...*} var_args Optional trailing arguments. These are ignored.\\n * @return {T} The first argument passed in, or undefined if nothing was passed.\\n * @template T\\n */\\ngoog.functions.identity = function(opt_returnValue, var_args) {\\n return opt_returnValue;\\n};\\n\\n\\n/**\\n * Creates a function that always throws an error with the given message.\\n * @param {string} message The error message.\\n * @return {!Function} The error-throwing function.\\n */\\ngoog.functions.error = function(message) {\\n return function() {\\n throw new Error(message);\\n };\\n};\\n\\n\\n/**\\n * Creates a function that throws the given object.\\n * @param {*} err An object to be thrown.\\n * @return {!Function} The error-throwing function.\\n */\\ngoog.functions.fail = function(err) {\\n return function() { throw err; };\\n};\\n\\n\\n/**\\n * Given a function, create a function that keeps opt_numArgs arguments and\\n * silently discards all additional arguments.\\n * @param {Function} f The original function.\\n * @param {number=} opt_numArgs The number of arguments to keep. Defaults to 0.\\n * @return {!Function} A version of f that only keeps the first opt_numArgs\\n * arguments.\\n */\\ngoog.functions.lock = function(f, opt_numArgs) {\\n opt_numArgs = opt_numArgs || 0;\\n return function() {\\n const self = /** @type {*} */ (this);\\n return f.apply(self, Array.prototype.slice.call(arguments, 0, opt_numArgs));\\n };\\n};\\n\\n\\n/**\\n * Creates a function that returns its nth argument.\\n * @param {number} n The position of the return argument.\\n * @return {!Function} A new function.\\n */\\ngoog.functions.nth = function(n) {\\n return function() { return arguments[n]; };\\n};\\n\\n\\n/**\\n * Like goog.partial(), except that arguments are added after arguments to the\\n * returned function.\\n *\\n * Usage:\\n * function f(arg1, arg2, arg3, arg4) { ... }\\n * var g = goog.functions.partialRight(f, arg3, arg4);\\n * g(arg1, arg2);\\n *\\n * @param {!Function} fn A function to partially apply.\\n * @param {...*} var_args Additional arguments that are partially applied to fn\\n * at the end.\\n * @return {!Function} A partially-applied form of the function goog.partial()\\n * was invoked as a method of.\\n */\\ngoog.functions.partialRight = function(fn, var_args) {\\n const rightArgs = Array.prototype.slice.call(arguments, 1);\\n return function() {\\n const self = /** @type {*} */ (this);\\n const newArgs = Array.prototype.slice.call(arguments);\\n newArgs.push.apply(newArgs, rightArgs);\\n return fn.apply(self, newArgs);\\n };\\n};\\n\\n\\n/**\\n * Given a function, create a new function that swallows its return value\\n * and replaces it with a new one.\\n * @param {Function} f A function.\\n * @param {T} retValue A new return value.\\n * @return {function(...?):T} A new function.\\n * @template T\\n */\\ngoog.functions.withReturnValue = function(f, retValue) {\\n return goog.functions.sequence(f, goog.functions.constant(retValue));\\n};\\n\\n\\n/**\\n * Creates a function that returns whether its argument equals the given value.\\n *\\n * Example:\\n * var key = goog.object.findKey(obj, goog.functions.equalTo('needle'));\\n *\\n * @param {*} value The value to compare to.\\n * @param {boolean=} opt_useLooseComparison Whether to use a loose (==)\\n * comparison rather than a strict (===) one. Defaults to false.\\n * @return {function(*):boolean} The new function.\\n */\\ngoog.functions.equalTo = function(value, opt_useLooseComparison) {\\n return function(other) {\\n return opt_useLooseComparison ? (value == other) : (value === other);\\n };\\n};\\n\\n\\n/**\\n * Creates the composition of the functions passed in.\\n * For example, (goog.functions.compose(f, g))(a) is equivalent to f(g(a)).\\n * @param {function(...?):T} fn The final function.\\n * @param {...Function} var_args A list of functions.\\n * @return {function(...?):T} The composition of all inputs.\\n * @template T\\n */\\ngoog.functions.compose = function(fn, var_args) {\\n const functions = arguments;\\n const length = functions.length;\\n return function() {\\n const self = /** @type {*} */ (this);\\n let result;\\n if (length) {\\n result = functions[length - 1].apply(self, arguments);\\n }\\n\\n for (let i = length - 2; i >= 0; i--) {\\n result = functions[i].call(self, result);\\n }\\n return result;\\n };\\n};\\n\\n\\n/**\\n * Creates a function that calls the functions passed in in sequence, and\\n * returns the value of the last function. For example,\\n * (goog.functions.sequence(f, g))(x) is equivalent to f(x),g(x).\\n * @param {...Function} var_args A list of functions.\\n * @return {!Function} A function that calls all inputs in sequence.\\n */\\ngoog.functions.sequence = function(var_args) {\\n const functions = arguments;\\n const length = functions.length;\\n return function() {\\n const self = /** @type {*} */ (this);\\n let result;\\n for (let i = 0; i < length; i++) {\\n result = functions[i].apply(self, arguments);\\n }\\n return result;\\n };\\n};\\n\\n\\n/**\\n * Creates a function that returns true if each of its components evaluates\\n * to true. The components are evaluated in order, and the evaluation will be\\n * short-circuited as soon as a function returns false.\\n * For example, (goog.functions.and(f, g))(x) is equivalent to f(x) && g(x).\\n * @param {...Function} var_args A list of functions.\\n * @return {function(...?):boolean} A function that ANDs its component\\n * functions.\\n */\\ngoog.functions.and = function(var_args) {\\n const functions = arguments;\\n const length = functions.length;\\n return function() {\\n const self = /** @type {*} */ (this);\\n for (let i = 0; i < length; i++) {\\n if (!functions[i].apply(self, arguments)) {\\n return false;\\n }\\n }\\n return true;\\n };\\n};\\n\\n\\n/**\\n * Creates a function that returns true if any of its components evaluates\\n * to true. The components are evaluated in order, and the evaluation will be\\n * short-circuited as soon as a function returns true.\\n * For example, (goog.functions.or(f, g))(x) is equivalent to f(x) || g(x).\\n * @param {...Function} var_args A list of functions.\\n * @return {function(...?):boolean} A function that ORs its component\\n * functions.\\n */\\ngoog.functions.or = function(var_args) {\\n const functions = arguments;\\n const length = functions.length;\\n return function() {\\n const self = /** @type {*} */ (this);\\n for (let i = 0; i < length; i++) {\\n if (functions[i].apply(self, arguments)) {\\n return true;\\n }\\n }\\n return false;\\n };\\n};\\n\\n\\n/**\\n * Creates a function that returns the Boolean opposite of a provided function.\\n * For example, (goog.functions.not(f))(x) is equivalent to !f(x).\\n * @param {!Function} f The original function.\\n * @return {function(...?):boolean} A function that delegates to f and returns\\n * opposite.\\n */\\ngoog.functions.not = function(f) {\\n return function() {\\n const self = /** @type {*} */ (this);\\n return !f.apply(self, arguments);\\n };\\n};\\n\\n\\n/**\\n * Generic factory function to construct an object given the constructor\\n * and the arguments. Intended to be bound to create object factories.\\n *\\n * Example:\\n *\\n * var factory = goog.partial(goog.functions.create, Class);\\n *\\n * @param {function(new:T, ...)} constructor The constructor for the Object.\\n * @param {...*} var_args The arguments to be passed to the constructor.\\n * @return {T} A new instance of the class given in `constructor`.\\n * @template T\\n */\\ngoog.functions.create = function(constructor, var_args) {\\n /**\\n * @constructor\\n * @final\\n */\\n const temp = function() {};\\n temp.prototype = constructor.prototype;\\n\\n // obj will have constructor's prototype in its chain and\\n // 'obj instanceof constructor' will be true.\\n const obj = new temp();\\n\\n // obj is initialized by constructor.\\n // arguments is only array-like so lacks shift(), but can be used with\\n // the Array prototype function.\\n constructor.apply(obj, Array.prototype.slice.call(arguments, 1));\\n return obj;\\n};\\n\\n\\n/**\\n * @define {boolean} Whether the return value cache should be used.\\n * This should only be used to disable caches when testing.\\n */\\ngoog.functions.CACHE_RETURN_VALUE =\\n goog.define('goog.functions.CACHE_RETURN_VALUE', true);\\n\\n\\n/**\\n * Gives a wrapper function that caches the return value of a parameterless\\n * function when first called.\\n *\\n * When called for the first time, the given function is called and its\\n * return value is cached (thus this is only appropriate for idempotent\\n * functions). Subsequent calls will return the cached return value. This\\n * allows the evaluation of expensive functions to be delayed until first used.\\n *\\n * To cache the return values of functions with parameters, see goog.memoize.\\n *\\n * @param {function():T} fn A function to lazily evaluate.\\n * @return {function():T} A wrapped version the function.\\n * @template T\\n */\\ngoog.functions.cacheReturnValue = function(fn) {\\n let called = false;\\n let value;\\n\\n return function() {\\n if (!goog.functions.CACHE_RETURN_VALUE) {\\n return fn();\\n }\\n\\n if (!called) {\\n value = fn();\\n called = true;\\n }\\n\\n return value;\\n };\\n};\\n\\n\\n/**\\n * Wraps a function to allow it to be called, at most, once. All\\n * additional calls are no-ops.\\n *\\n * This is particularly useful for initialization functions\\n * that should be called, at most, once.\\n *\\n * @param {function():*} f Function to call.\\n * @return {function():undefined} Wrapped function.\\n */\\ngoog.functions.once = function(f) {\\n // Keep a reference to the function that we null out when we're done with\\n // it -- that way, the function can be GC'd when we're done with it.\\n let inner = f;\\n return function() {\\n if (inner) {\\n const tmp = inner;\\n inner = null;\\n tmp();\\n }\\n };\\n};\\n\\n\\n/**\\n * Wraps a function to allow it to be called, at most, once per interval\\n * (specified in milliseconds). If the wrapper function is called N times within\\n * that interval, only the Nth call will go through.\\n *\\n * This is particularly useful for batching up repeated actions where the\\n * last action should win. This can be used, for example, for refreshing an\\n * autocomplete pop-up every so often rather than updating with every keystroke,\\n * since the final text typed by the user is the one that should produce the\\n * final autocomplete results. For more stateful debouncing with support for\\n * pausing, resuming, and canceling debounced actions, use\\n * `goog.async.Debouncer`.\\n *\\n * @param {function(this:SCOPE, ...?)} f Function to call.\\n * @param {number} interval Interval over which to debounce. The function will\\n * only be called after the full interval has elapsed since the last call.\\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\\n * @return {function(...?): undefined} Wrapped function.\\n * @template SCOPE\\n */\\ngoog.functions.debounce = function(f, interval, opt_scope) {\\n let timeout = 0;\\n return /** @type {function(...?)} */ (function(var_args) {\\n goog.global.clearTimeout(timeout);\\n const args = arguments;\\n timeout = goog.global.setTimeout(function() {\\n f.apply(opt_scope, args);\\n }, interval);\\n });\\n};\\n\\n\\n/**\\n * Wraps a function to allow it to be called, at most, once per interval\\n * (specified in milliseconds). If the wrapper function is called N times in\\n * that interval, both the 1st and the Nth calls will go through.\\n *\\n * This is particularly useful for limiting repeated user requests where the\\n * the last action should win, but you also don't want to wait until the end of\\n * the interval before sending a request out, as it leads to a perception of\\n * slowness for the user.\\n *\\n * @param {function(this:SCOPE, ...?)} f Function to call.\\n * @param {number} interval Interval over which to throttle. The function can\\n * only be called once per interval.\\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\\n * @return {function(...?): undefined} Wrapped function.\\n * @template SCOPE\\n */\\ngoog.functions.throttle = function(f, interval, opt_scope) {\\n let timeout = 0;\\n let shouldFire = false;\\n let args = [];\\n\\n const handleTimeout = function() {\\n timeout = 0;\\n if (shouldFire) {\\n shouldFire = false;\\n fire();\\n }\\n };\\n\\n const fire = function() {\\n timeout = goog.global.setTimeout(handleTimeout, interval);\\n f.apply(opt_scope, args);\\n };\\n\\n return /** @type {function(...?)} */ (function(var_args) {\\n args = arguments;\\n if (!timeout) {\\n fire();\\n } else {\\n shouldFire = true;\\n }\\n });\\n};\\n\\n\\n/**\\n * Wraps a function to allow it to be called, at most, once per interval\\n * (specified in milliseconds). If the wrapper function is called N times within\\n * that interval, only the 1st call will go through.\\n *\\n * This is particularly useful for limiting repeated user requests where the\\n * first request is guaranteed to have all the data required to perform the\\n * final action, so there's no need to wait until the end of the interval before\\n * sending the request out.\\n *\\n * @param {function(this:SCOPE, ...?)} f Function to call.\\n * @param {number} interval Interval over which to rate-limit. The function will\\n * only be called once per interval, and ignored for the remainer of the\\n * interval.\\n * @param {SCOPE=} opt_scope Object in whose scope to call the function.\\n * @return {function(...?): undefined} Wrapped function.\\n * @template SCOPE\\n */\\ngoog.functions.rateLimit = function(f, interval, opt_scope) {\\n let timeout = 0;\\n\\n const handleTimeout = function() {\\n timeout = 0;\\n };\\n\\n return /** @type {function(...?)} */ (function(var_args) {\\n if (!timeout) {\\n timeout = goog.global.setTimeout(handleTimeout, interval);\\n f.apply(opt_scope, arguments);\\n }\\n });\\n};\\n\"],\n\"names\":[\"goog\",\"provide\",\"functions\",\"constant\",\"goog.functions.constant\",\"retValue\",\"FALSE\",\"goog.functions.FALSE\",\"TRUE\",\"goog.functions.TRUE\",\"NULL\",\"goog.functions.NULL\",\"identity\",\"goog.functions.identity\",\"opt_returnValue\",\"var_args\",\"error\",\"goog.functions.error\",\"message\",\"Error\",\"fail\",\"goog.functions.fail\",\"err\",\"lock\",\"goog.functions.lock\",\"f\",\"opt_numArgs\",\"self\",\"apply\",\"Array\",\"prototype\",\"slice\",\"call\",\"arguments\",\"nth\",\"goog.functions.nth\",\"n\",\"partialRight\",\"goog.functions.partialRight\",\"fn\",\"rightArgs\",\"newArgs\",\"push\",\"withReturnValue\",\"goog.functions.withReturnValue\",\"sequence\",\"equalTo\",\"goog.functions.equalTo\",\"value\",\"opt_useLooseComparison\",\"other\",\"compose\",\"goog.functions.compose\",\"length\",\"result\",\"i\",\"goog.functions.sequence\",\"and\",\"goog.functions.and\",\"or\",\"goog.functions.or\",\"not\",\"goog.functions.not\",\"create\",\"goog.functions.create\",\"constructor\",\"temp\",\"obj\",\"CACHE_RETURN_VALUE\",\"define\",\"cacheReturnValue\",\"goog.functions.cacheReturnValue\",\"called\",\"once\",\"goog.functions.once\",\"inner\",\"tmp\",\"debounce\",\"goog.functions.debounce\",\"interval\",\"opt_scope\",\"timeout\",\"global\",\"clearTimeout\",\"args\",\"setTimeout\",\"throttle\",\"goog.functions.throttle\",\"shouldFire\",\"handleTimeout\",\"fire\",\"rateLimit\",\"goog.functions.rateLimit\"]\n}\n"]