@p4ulcristian/iris-layout 0.2.0 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (201) hide show
  1. package/dist/cljs-runtime/cljs.core.js +38746 -0
  2. package/dist/cljs-runtime/cljs.core.js.map +1 -0
  3. package/dist/cljs-runtime/cljs.pprint.js +8400 -0
  4. package/dist/cljs-runtime/cljs.pprint.js.map +1 -0
  5. package/dist/cljs-runtime/cljs.stacktrace.js +561 -0
  6. package/dist/cljs-runtime/cljs.stacktrace.js.map +1 -0
  7. package/dist/cljs-runtime/cljs_env.js +1286 -0
  8. package/dist/cljs-runtime/clojure.data.js +295 -0
  9. package/dist/cljs-runtime/clojure.data.js.map +1 -0
  10. package/dist/cljs-runtime/clojure.set.js +382 -0
  11. package/dist/cljs-runtime/clojure.set.js.map +1 -0
  12. package/dist/cljs-runtime/clojure.string.js +480 -0
  13. package/dist/cljs-runtime/clojure.string.js.map +1 -0
  14. package/dist/cljs-runtime/clojure.walk.js +132 -0
  15. package/dist/cljs-runtime/clojure.walk.js.map +1 -0
  16. package/dist/cljs-runtime/devtools.async.js +90 -0
  17. package/dist/cljs-runtime/devtools.async.js.map +1 -0
  18. package/dist/cljs-runtime/devtools.context.js +11 -0
  19. package/dist/cljs-runtime/devtools.context.js.map +1 -0
  20. package/dist/cljs-runtime/devtools.core.js +175 -0
  21. package/dist/cljs-runtime/devtools.core.js.map +1 -0
  22. package/dist/cljs-runtime/devtools.defaults.js +20 -0
  23. package/dist/cljs-runtime/devtools.defaults.js.map +1 -0
  24. package/dist/cljs-runtime/devtools.format.js +631 -0
  25. package/dist/cljs-runtime/devtools.format.js.map +1 -0
  26. package/dist/cljs-runtime/devtools.formatters.budgeting.js +182 -0
  27. package/dist/cljs-runtime/devtools.formatters.budgeting.js.map +1 -0
  28. package/dist/cljs-runtime/devtools.formatters.core.js +220 -0
  29. package/dist/cljs-runtime/devtools.formatters.core.js.map +1 -0
  30. package/dist/cljs-runtime/devtools.formatters.helpers.js +228 -0
  31. package/dist/cljs-runtime/devtools.formatters.helpers.js.map +1 -0
  32. package/dist/cljs-runtime/devtools.formatters.js +261 -0
  33. package/dist/cljs-runtime/devtools.formatters.js.map +1 -0
  34. package/dist/cljs-runtime/devtools.formatters.markup.js +1174 -0
  35. package/dist/cljs-runtime/devtools.formatters.markup.js.map +1 -0
  36. package/dist/cljs-runtime/devtools.formatters.printing.js +313 -0
  37. package/dist/cljs-runtime/devtools.formatters.printing.js.map +1 -0
  38. package/dist/cljs-runtime/devtools.formatters.state.js +325 -0
  39. package/dist/cljs-runtime/devtools.formatters.state.js.map +1 -0
  40. package/dist/cljs-runtime/devtools.formatters.templating.js +666 -0
  41. package/dist/cljs-runtime/devtools.formatters.templating.js.map +1 -0
  42. package/dist/cljs-runtime/devtools.hints.js +193 -0
  43. package/dist/cljs-runtime/devtools.hints.js.map +1 -0
  44. package/dist/cljs-runtime/devtools.munging.js +1058 -0
  45. package/dist/cljs-runtime/devtools.munging.js.map +1 -0
  46. package/dist/cljs-runtime/devtools.prefs.js +87 -0
  47. package/dist/cljs-runtime/devtools.prefs.js.map +1 -0
  48. package/dist/cljs-runtime/devtools.preload.js +11 -0
  49. package/dist/cljs-runtime/devtools.preload.js.map +1 -0
  50. package/dist/cljs-runtime/devtools.protocols.js +98 -0
  51. package/dist/cljs-runtime/devtools.protocols.js.map +1 -0
  52. package/dist/cljs-runtime/devtools.reporter.js +81 -0
  53. package/dist/cljs-runtime/devtools.reporter.js.map +1 -0
  54. package/dist/cljs-runtime/devtools.toolbox.js +141 -0
  55. package/dist/cljs-runtime/devtools.toolbox.js.map +1 -0
  56. package/dist/cljs-runtime/devtools.util.js +517 -0
  57. package/dist/cljs-runtime/devtools.util.js.map +1 -0
  58. package/dist/cljs-runtime/devtools.version.js +9 -0
  59. package/dist/cljs-runtime/devtools.version.js.map +1 -0
  60. package/dist/cljs-runtime/goog.array.array.js +659 -0
  61. package/dist/cljs-runtime/goog.array.array.js.map +9 -0
  62. package/dist/cljs-runtime/goog.asserts.asserts.js +133 -0
  63. package/dist/cljs-runtime/goog.asserts.asserts.js.map +9 -0
  64. package/dist/cljs-runtime/goog.asserts.dom.js +90 -0
  65. package/dist/cljs-runtime/goog.asserts.dom.js.map +9 -0
  66. package/dist/cljs-runtime/goog.async.nexttick.js +93 -0
  67. package/dist/cljs-runtime/goog.async.nexttick.js.map +9 -0
  68. package/dist/cljs-runtime/goog.base.js +1261 -0
  69. package/dist/cljs-runtime/goog.base.js.map +9 -0
  70. package/dist/cljs-runtime/goog.collections.maps.js +82 -0
  71. package/dist/cljs-runtime/goog.collections.maps.js.map +9 -0
  72. package/dist/cljs-runtime/goog.debug.entrypointregistry.js +44 -0
  73. package/dist/cljs-runtime/goog.debug.entrypointregistry.js.map +9 -0
  74. package/dist/cljs-runtime/goog.debug.error.js +30 -0
  75. package/dist/cljs-runtime/goog.debug.error.js.map +9 -0
  76. package/dist/cljs-runtime/goog.dom.asserts.js +40 -0
  77. package/dist/cljs-runtime/goog.dom.asserts.js.map +9 -0
  78. package/dist/cljs-runtime/goog.dom.browserfeature.js +21 -0
  79. package/dist/cljs-runtime/goog.dom.browserfeature.js.map +9 -0
  80. package/dist/cljs-runtime/goog.dom.dom.js +1087 -0
  81. package/dist/cljs-runtime/goog.dom.dom.js.map +9 -0
  82. package/dist/cljs-runtime/goog.dom.element.js +69 -0
  83. package/dist/cljs-runtime/goog.dom.element.js.map +9 -0
  84. package/dist/cljs-runtime/goog.dom.htmlelement.js +7 -0
  85. package/dist/cljs-runtime/goog.dom.htmlelement.js.map +9 -0
  86. package/dist/cljs-runtime/goog.dom.nodetype.js +6 -0
  87. package/dist/cljs-runtime/goog.dom.nodetype.js.map +9 -0
  88. package/dist/cljs-runtime/goog.dom.safe.js +277 -0
  89. package/dist/cljs-runtime/goog.dom.safe.js.map +9 -0
  90. package/dist/cljs-runtime/goog.dom.tagname.js +147 -0
  91. package/dist/cljs-runtime/goog.dom.tagname.js.map +9 -0
  92. package/dist/cljs-runtime/goog.dom.tags.js +10 -0
  93. package/dist/cljs-runtime/goog.dom.tags.js.map +9 -0
  94. package/dist/cljs-runtime/goog.flags.flags.js +12 -0
  95. package/dist/cljs-runtime/goog.flags.flags.js.map +9 -0
  96. package/dist/cljs-runtime/goog.fs.blob.js +38 -0
  97. package/dist/cljs-runtime/goog.fs.blob.js.map +9 -0
  98. package/dist/cljs-runtime/goog.fs.url.js +37 -0
  99. package/dist/cljs-runtime/goog.fs.url.js.map +9 -0
  100. package/dist/cljs-runtime/goog.functions.functions.js +211 -0
  101. package/dist/cljs-runtime/goog.functions.functions.js.map +9 -0
  102. package/dist/cljs-runtime/goog.html.safehtml.js +321 -0
  103. package/dist/cljs-runtime/goog.html.safehtml.js.map +9 -0
  104. package/dist/cljs-runtime/goog.html.safescript.js +65 -0
  105. package/dist/cljs-runtime/goog.html.safescript.js.map +9 -0
  106. package/dist/cljs-runtime/goog.html.safestyle.js +175 -0
  107. package/dist/cljs-runtime/goog.html.safestyle.js.map +9 -0
  108. package/dist/cljs-runtime/goog.html.safestylesheet.js +99 -0
  109. package/dist/cljs-runtime/goog.html.safestylesheet.js.map +9 -0
  110. package/dist/cljs-runtime/goog.html.safeurl.js +231 -0
  111. package/dist/cljs-runtime/goog.html.safeurl.js.map +9 -0
  112. package/dist/cljs-runtime/goog.html.trustedresourceurl.js +123 -0
  113. package/dist/cljs-runtime/goog.html.trustedresourceurl.js.map +9 -0
  114. package/dist/cljs-runtime/goog.html.trustedtypes.js +16 -0
  115. package/dist/cljs-runtime/goog.html.trustedtypes.js.map +9 -0
  116. package/dist/cljs-runtime/goog.html.uncheckedconversions.js +52 -0
  117. package/dist/cljs-runtime/goog.html.uncheckedconversions.js.map +9 -0
  118. package/dist/cljs-runtime/goog.labs.useragent.browser.js +352 -0
  119. package/dist/cljs-runtime/goog.labs.useragent.browser.js.map +9 -0
  120. package/dist/cljs-runtime/goog.labs.useragent.engine.js +73 -0
  121. package/dist/cljs-runtime/goog.labs.useragent.engine.js.map +9 -0
  122. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js +14 -0
  123. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropydata.js.map +9 -0
  124. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js +74 -0
  125. package/dist/cljs-runtime/goog.labs.useragent.highentropy.highentropyvalue.js.map +9 -0
  126. package/dist/cljs-runtime/goog.labs.useragent.platform.js +147 -0
  127. package/dist/cljs-runtime/goog.labs.useragent.platform.js.map +9 -0
  128. package/dist/cljs-runtime/goog.labs.useragent.useragent.js +21 -0
  129. package/dist/cljs-runtime/goog.labs.useragent.useragent.js.map +9 -0
  130. package/dist/cljs-runtime/goog.labs.useragent.util.js +81 -0
  131. package/dist/cljs-runtime/goog.labs.useragent.util.js.map +9 -0
  132. package/dist/cljs-runtime/goog.math.coordinate.js +97 -0
  133. package/dist/cljs-runtime/goog.math.coordinate.js.map +9 -0
  134. package/dist/cljs-runtime/goog.math.integer.js +445 -0
  135. package/dist/cljs-runtime/goog.math.integer.js.map +9 -0
  136. package/dist/cljs-runtime/goog.math.long.js +437 -0
  137. package/dist/cljs-runtime/goog.math.long.js.map +9 -0
  138. package/dist/cljs-runtime/goog.math.math.js +158 -0
  139. package/dist/cljs-runtime/goog.math.math.js.map +9 -0
  140. package/dist/cljs-runtime/goog.math.size.js +76 -0
  141. package/dist/cljs-runtime/goog.math.size.js.map +9 -0
  142. package/dist/cljs-runtime/goog.object.object.js +284 -0
  143. package/dist/cljs-runtime/goog.object.object.js.map +9 -0
  144. package/dist/cljs-runtime/goog.reflect.reflect.js +32 -0
  145. package/dist/cljs-runtime/goog.reflect.reflect.js.map +9 -0
  146. package/dist/cljs-runtime/goog.string.const.js +35 -0
  147. package/dist/cljs-runtime/goog.string.const.js.map +9 -0
  148. package/dist/cljs-runtime/goog.string.internal.js +119 -0
  149. package/dist/cljs-runtime/goog.string.internal.js.map +9 -0
  150. package/dist/cljs-runtime/goog.string.string.js +462 -0
  151. package/dist/cljs-runtime/goog.string.string.js.map +9 -0
  152. package/dist/cljs-runtime/goog.string.stringbuffer.js +32 -0
  153. package/dist/cljs-runtime/goog.string.stringbuffer.js.map +9 -0
  154. package/dist/cljs-runtime/goog.string.typedstring.js +9 -0
  155. package/dist/cljs-runtime/goog.string.typedstring.js.map +9 -0
  156. package/dist/cljs-runtime/goog.structs.structs.js +199 -0
  157. package/dist/cljs-runtime/goog.structs.structs.js.map +9 -0
  158. package/dist/cljs-runtime/goog.uri.uri.js +628 -0
  159. package/dist/cljs-runtime/goog.uri.uri.js.map +9 -0
  160. package/dist/cljs-runtime/goog.uri.utils.js +326 -0
  161. package/dist/cljs-runtime/goog.uri.utils.js.map +9 -0
  162. package/dist/cljs-runtime/goog.useragent.useragent.js +139 -0
  163. package/dist/cljs-runtime/goog.useragent.useragent.js.map +9 -0
  164. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js +202 -0
  165. package/dist/cljs-runtime/iris_layout.components.entity_card_group.js.map +1 -0
  166. package/dist/cljs-runtime/iris_layout.components.entity_tile.js +295 -0
  167. package/dist/cljs-runtime/iris_layout.components.entity_tile.js.map +1 -0
  168. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js +33 -0
  169. package/dist/cljs-runtime/iris_layout.components.entity_tile_group.js.map +1 -0
  170. package/dist/cljs-runtime/iris_layout.components.resizer.js +91 -0
  171. package/dist/cljs-runtime/iris_layout.components.resizer.js.map +1 -0
  172. package/dist/cljs-runtime/iris_layout.components.touch_drag.js +399 -0
  173. package/dist/cljs-runtime/iris_layout.components.touch_drag.js.map +1 -0
  174. package/dist/cljs-runtime/iris_layout.core.js +1372 -0
  175. package/dist/cljs-runtime/iris_layout.core.js.map +1 -0
  176. package/dist/cljs-runtime/iris_layout.layout.js +328 -0
  177. package/dist/cljs-runtime/iris_layout.layout.js.map +1 -0
  178. package/dist/cljs-runtime/reagent.core.js +993 -0
  179. package/dist/cljs-runtime/reagent.core.js.map +1 -0
  180. package/dist/cljs-runtime/reagent.debug.js +75 -0
  181. package/dist/cljs-runtime/reagent.debug.js.map +1 -0
  182. package/dist/cljs-runtime/reagent.impl.batching.js +270 -0
  183. package/dist/cljs-runtime/reagent.impl.batching.js.map +1 -0
  184. package/dist/cljs-runtime/reagent.impl.component.js +758 -0
  185. package/dist/cljs-runtime/reagent.impl.component.js.map +1 -0
  186. package/dist/cljs-runtime/reagent.impl.input.js +175 -0
  187. package/dist/cljs-runtime/reagent.impl.input.js.map +1 -0
  188. package/dist/cljs-runtime/reagent.impl.protocols.js +99 -0
  189. package/dist/cljs-runtime/reagent.impl.protocols.js.map +1 -0
  190. package/dist/cljs-runtime/reagent.impl.template.js +660 -0
  191. package/dist/cljs-runtime/reagent.impl.template.js.map +1 -0
  192. package/dist/cljs-runtime/reagent.impl.util.js +748 -0
  193. package/dist/cljs-runtime/reagent.impl.util.js.map +1 -0
  194. package/dist/cljs-runtime/reagent.ratom.js +1668 -0
  195. package/dist/cljs-runtime/reagent.ratom.js.map +1 -0
  196. package/dist/cljs-runtime/shadow.esm.esm_import$react.js +5 -0
  197. package/dist/cljs-runtime/shadow.module.iris-layout.append.js +2 -0
  198. package/dist/cljs-runtime/shadow.module.iris-layout.prepend.js +2 -0
  199. package/dist/iris-layout.js +375 -355
  200. package/dist/styles.css +287 -9
  201. package/package.json +1 -1
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.labs.useragent.highentropy.highentropyvalue.js",
4
+ "lineCount":70,
5
+ "mappings":"AAAA,IAAA,CAAA,UAAA,CAAA,QAAA,CAAA,OAAA,CAAA;AAAA,cAAA;AAWAA,MAAKC,CAAAA,MAAL,CAAY,kDAAZ,CAAA;AAEA,QAAMC,OAAOF,IAAKG,CAAAA,OAAL,CAAa,0BAAb,CAAb;AACA,QAAM,CAACC,eAAD,CAAA,GAAoBJ,IAAKG,CAAAA,OAAL,CAAa,sBAAb,CAA1B;AAOA,OAAME,WAAN;AAMEC,eAAW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AKD,CAAAA,MAAL,GAAcC,SAAd;AACA,UAAKE,CAAAA,QAAL,GAAgB,KAAhB;AATgB;AAtEpB;AAkFAR,SAAQC,CAAAA,gBAAR,GAA2BA,gBAA3B;AAMA,OAAMc,QAAN;AAIEb,eAAW,CAACc,aAAD,CAAgB;AAKzB,UAAKC,CAAAA,cAAL,GAAsBD,aAAtB;AALyB;AAY3BE,6BAAyB,EAAG;AAC1B,aAAO,IAAKD,CAAAA,cAAZ;AAD0B;AAU5BE,aAAS,CAACC,OAAD,CAAU;AACjB,aAAOxB,eAAA,CAAgB,IAAKqB,CAAAA,cAArB,EAAqCG,OAArC,CAAP,IAAwD,CAAxD;AADiB;AA1BrB;AA8BApB,SAAQe,CAAAA,OAAR,GAAkBA,OAAlB;AAnKA,SAAA,OAAA;AAAA,CAAA,CAAA;;",
6
+ "sources":["goog/labs/useragent/highentropy/highentropyvalue.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Provides helper classes and objects to work with High Entropy\n * user agent values.\n */\n\ngoog.module('goog.labs.userAgent.highEntropy.highEntropyValue');\n\nconst util = goog.require('goog.labs.userAgent.util');\nconst {compareVersions} = goog.require('goog.string.internal');\n\n/**\n * Represents a value that can be asynchronously loaded.\n * @interface\n * @template VALUE_TYPE\n */\nclass AsyncValue {\n /**\n * Get the value represented by this AsyncValue instance, if it was\n * previously requested.\n * @return {VALUE_TYPE|undefined}\n */\n getIfLoaded() {}\n\n /**\n * Request the value represented by this AsyncValue instance.\n * @return {!Promise<VALUE_TYPE>}\n */\n load() {}\n}\nexports.AsyncValue = AsyncValue;\n\n/**\n * Represents a high-entropy value.\n * High-entropy values must be specifically requested from the Promise-based\n * Client Hints API.\n * @template VALUE_TYPE The type of the value wrapped by this HighEntropyValue\n * instance.\n * @implements {AsyncValue<VALUE_TYPE>}\n */\nclass HighEntropyValue {\n /**\n * Constructs a new HighEntropyValue instance.\n * @param {string} key The name of the high-entropy value, used when\n * requesting it from the browser.\n */\n constructor(key) {\n /**\n * The key used to request the high-entropy value from the browser.\n * @const {string}\n * @private\n */\n this.key_ = key;\n\n /**\n * The value represented by this HighEntropyValue instance. If it hasn't\n * been successfully requested yet, its value will be undefined.\n * @type {VALUE_TYPE|undefined}\n * @protected\n */\n this.value_ = undefined;\n\n /**\n * The high-entropy value request. If it hasn't been requested yet, this\n * value will be undefined.\n * @type {!Promise<VALUE_TYPE>|undefined}\n * @private\n */\n this.promise_ = undefined;\n\n this.pending_ = false;\n }\n\n /**\n * @return {VALUE_TYPE|undefined}\n * @override\n */\n getIfLoaded() {\n const userAgentData = util.getUserAgentData();\n if (!userAgentData) {\n return undefined;\n }\n return this.value_;\n }\n\n /**\n * @return {!Promise<VALUE_TYPE>}\n * @override\n */\n async load() {\n const userAgentData = util.getUserAgentData();\n if (!userAgentData) return undefined;\n if (!this.promise_) {\n this.pending_ = true;\n this.promise_ = (async () => {\n try {\n const dataValues =\n await userAgentData.getHighEntropyValues([this.key_]);\n this.value_ =\n /** @type {!Object<string, VALUE_TYPE>} */ (\n dataValues)[this.key_];\n return this.value_;\n } finally {\n this.pending_ = false;\n }\n })();\n }\n return await this.promise_;\n }\n\n resetForTesting() {\n if (this.pending_) {\n // There is a pending request that may set this.value_ at any time.\n // Therefore, it can't be guaranteed that this object is actually in a\n // clean state.\n throw new Error('Unsafe call to resetForTesting');\n }\n this.promise_ = undefined;\n this.value_ = undefined;\n this.pending_ = false;\n }\n}\nexports.HighEntropyValue = HighEntropyValue;\n\n/**\n * An object that wraps a version string.\n * This allows for easy version comparisons.\n */\nclass Version {\n /**\n * @param {string} versionString The underlying version string.\n */\n constructor(versionString) {\n /**\n * @const {string}\n * @private\n */\n this.versionString_ = versionString;\n }\n\n /**\n * Returns the underlying version string.\n * @return {string}\n */\n toVersionStringForLogging() {\n return this.versionString_;\n }\n\n /**\n * Returns true if the underlying version string is equal to or greater than\n * the given version.\n * @param {string} version The version to compare against.\n * @return {boolean}\n */\n isAtLeast(version) {\n return compareVersions(this.versionString_, version) >= 0;\n }\n}\nexports.Version = Version;\n"],
8
+ "names":["goog","module","util","require","compareVersions","AsyncValue","getIfLoaded","load","exports","HighEntropyValue","constructor","key","key_","value_","undefined","promise_","pending_","userAgentData","getUserAgentData","dataValues","getHighEntropyValues","resetForTesting","Error","Version","versionString","versionString_","toVersionStringForLogging","isAtLeast","version"]
9
+ }
@@ -0,0 +1,147 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.string.internal.js";
3
+ import "./goog.labs.useragent.util.js";
4
+ import "./goog.labs.useragent.highentropy.highentropyvalue.js";
5
+ import "./goog.labs.useragent.highentropy.highentropydata.js";
6
+ import "./goog.labs.useragent.useragent.js";
7
+ goog.loadModule(function(exports) {
8
+ function useUserAgentDataPlatform(ignoreClientHintsFlag = false) {
9
+ if (util.ASSUME_CLIENT_HINTS_SUPPORT) {
10
+ return true;
11
+ }
12
+ if (!ignoreClientHintsFlag && !useClientHints()) {
13
+ return false;
14
+ }
15
+ const userAgentData = util.getUserAgentData();
16
+ return !!userAgentData && !!userAgentData.platform;
17
+ }
18
+ function isAndroid() {
19
+ if (useUserAgentDataPlatform()) {
20
+ return util.getUserAgentData().platform === "Android";
21
+ }
22
+ return util.matchUserAgent("Android");
23
+ }
24
+ function isIpod() {
25
+ return util.matchUserAgent("iPod");
26
+ }
27
+ function isIphone() {
28
+ return util.matchUserAgent("iPhone") && !util.matchUserAgent("iPod") && !util.matchUserAgent("iPad");
29
+ }
30
+ function isIpad() {
31
+ return util.matchUserAgent("iPad");
32
+ }
33
+ function isIos() {
34
+ return isIphone() || isIpad() || isIpod();
35
+ }
36
+ function isMacintosh() {
37
+ if (useUserAgentDataPlatform()) {
38
+ return util.getUserAgentData().platform === "macOS";
39
+ }
40
+ return util.matchUserAgent("Macintosh");
41
+ }
42
+ function isLinux() {
43
+ if (useUserAgentDataPlatform()) {
44
+ return util.getUserAgentData().platform === "Linux";
45
+ }
46
+ return util.matchUserAgent("Linux");
47
+ }
48
+ function isWindows() {
49
+ if (useUserAgentDataPlatform()) {
50
+ return util.getUserAgentData().platform === "Windows";
51
+ }
52
+ return util.matchUserAgent("Windows");
53
+ }
54
+ function isChromeOS() {
55
+ if (useUserAgentDataPlatform()) {
56
+ return util.getUserAgentData().platform === "Chrome OS";
57
+ }
58
+ return util.matchUserAgent("CrOS");
59
+ }
60
+ function isChromecast() {
61
+ return util.matchUserAgent("CrKey");
62
+ }
63
+ function isKaiOS() {
64
+ return util.matchUserAgentIgnoreCase("KaiOS");
65
+ }
66
+ function getVersion() {
67
+ const userAgentString = util.getUserAgent();
68
+ let version = "";
69
+ let re;
70
+ if (isWindows()) {
71
+ re = /Windows (?:NT|Phone) ([0-9.]+)/;
72
+ const match = re.exec(userAgentString);
73
+ if (match) {
74
+ version = match[1];
75
+ } else {
76
+ version = "0.0";
77
+ }
78
+ } else if (isIos()) {
79
+ re = /(?:iPhone|iPod|iPad|CPU)\s+OS\s+(\S+)/;
80
+ const match = re.exec(userAgentString);
81
+ version = match && match[1].replace(/_/g, ".");
82
+ } else if (isMacintosh()) {
83
+ re = /Mac OS X ([0-9_.]+)/;
84
+ const match = re.exec(userAgentString);
85
+ version = match ? match[1].replace(/_/g, ".") : "10";
86
+ } else if (isKaiOS()) {
87
+ re = /(?:KaiOS)\/(\S+)/i;
88
+ const match = re.exec(userAgentString);
89
+ version = match && match[1];
90
+ } else if (isAndroid()) {
91
+ re = /Android\s+([^\);]+)(\)|;)/;
92
+ const match = re.exec(userAgentString);
93
+ version = match && match[1];
94
+ } else if (isChromeOS()) {
95
+ re = /(?:CrOS\s+(?:i686|x86_64)\s+([0-9.]+))/;
96
+ const match = re.exec(userAgentString);
97
+ version = match && match[1];
98
+ }
99
+ return version || "";
100
+ }
101
+ function isVersionOrHigher(version) {
102
+ return googString.compareVersions(getVersion(), version) >= 0;
103
+ }
104
+ "use strict";
105
+ goog.module("goog.labs.userAgent.platform");
106
+ goog.module.declareLegacyNamespace();
107
+ const googString = goog.require("goog.string.internal");
108
+ const util = goog.require("goog.labs.userAgent.util");
109
+ const {AsyncValue, Version} = goog.require("goog.labs.userAgent.highEntropy.highEntropyValue");
110
+ const {platformVersion} = goog.require("goog.labs.userAgent.highEntropy.highEntropyData");
111
+ const {useClientHints} = goog.require("goog.labs.userAgent");
112
+ class PlatformVersion {
113
+ constructor() {
114
+ this.preUachHasLoaded_ = false;
115
+ }
116
+ getIfLoaded() {
117
+ if (useUserAgentDataPlatform(true)) {
118
+ const loadedPlatformVersion = platformVersion.getIfLoaded();
119
+ if (loadedPlatformVersion === undefined) {
120
+ return undefined;
121
+ }
122
+ return new Version(loadedPlatformVersion);
123
+ } else if (!this.preUachHasLoaded_) {
124
+ return undefined;
125
+ } else {
126
+ return new Version(getVersion());
127
+ }
128
+ }
129
+ async load() {
130
+ if (useUserAgentDataPlatform(true)) {
131
+ return new Version(await platformVersion.load());
132
+ } else {
133
+ this.preUachHasLoaded_ = true;
134
+ return new Version(getVersion());
135
+ }
136
+ }
137
+ resetForTesting() {
138
+ platformVersion.resetForTesting();
139
+ this.preUachHasLoaded_ = false;
140
+ }
141
+ }
142
+ const version = new PlatformVersion();
143
+ exports = {getVersion, isAndroid, isChromeOS, isChromecast, isIos, isIpad, isIphone, isIpod, isKaiOS, isLinux, isMacintosh, isVersionOrHigher, isWindows, version};
144
+ return exports;
145
+ });
146
+
147
+ //# sourceMappingURL=goog.labs.useragent.platform.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.labs.useragent.platform.js",
4
+ "lineCount":140,
5
+ "mappings":"AAAA,IAAA,CAAA,UAAA,CAAA,QAAA,CAAA,OAAA,CAAA;AAqCAA,UAASA,yBAAwB,CAACC,qBAAA,GAAwB,KAAzB,CAAgC;AAC/D,QAAIC,IAAKC,CAAAA,2BAAT;AAAsC,aAAO,IAAP;AAAtC;AAGA,QAAI,CAACF,qBAAL,IAA8B,CAACG,cAAA,EAA/B;AAAiD,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CAAV;AAvRA,SAAA,OAAA;AAAA,CAAA,CAAA;;",
6
+ "sources":["goog/labs/useragent/platform.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Closure user agent platform detection.\n * @see <a href=\"http://www.useragentstring.com/\">User agent strings</a>\n * For more information on browser brand, rendering engine, or device see the\n * other sub-namespaces in goog.labs.userAgent (browser, engine, and device\n * respectively).\n */\n\ngoog.module('goog.labs.userAgent.platform');\ngoog.module.declareLegacyNamespace();\n\nconst googString = goog.require('goog.string.internal');\nconst util = goog.require('goog.labs.userAgent.util');\nconst {AsyncValue, Version} = goog.require('goog.labs.userAgent.highEntropy.highEntropyValue');\nconst {platformVersion} = goog.require('goog.labs.userAgent.highEntropy.highEntropyData');\nconst {useClientHints} = goog.require('goog.labs.userAgent');\n\n/**\n * @param {boolean=} ignoreClientHintsFlag Iff truthy, the `useClientHints`\n * function will not be called when evaluating if User-Agent Client Hints\n * Brand data can be used. For existing labs.userAgent API surfaces with\n * widespread use, this should be a falsy value so that usage of the Client\n * Hints APIs can be gated behind flags / experiment rollouts.\n * @return {boolean} Whether to use navigator.userAgentData to determine\n * the current platform.\n * userAgentData.platform was enabled by default in Chrome 93:\n * https://www.chromestatus.com/feature/5733498725859328\n * TODO(user): Skip this check with FEATURESET_YEAR once userAgentData is\n * present in all major browsers (may not be until 2024).\n * See https://caniuse.com/mdn-api_navigator_useragentdata.\n */\nfunction useUserAgentDataPlatform(ignoreClientHintsFlag = false) {\n if (util.ASSUME_CLIENT_HINTS_SUPPORT) return true;\n // High-entropy API surfaces should not be gated behind the useClientHints\n // check (as in production it is gated behind a define).\n if (!ignoreClientHintsFlag && !useClientHints()) return false;\n const userAgentData = util.getUserAgentData();\n return !!userAgentData && !!userAgentData.platform;\n}\n\n/**\n * @return {boolean} Whether the platform is Android.\n */\nfunction isAndroid() {\n if (useUserAgentDataPlatform()) {\n return util.getUserAgentData().platform === 'Android';\n }\n return util.matchUserAgent('Android');\n}\n\n/**\n * @return {boolean} Whether the platform is iPod.\n * TODO(user): Combine iPod/iPhone detection since they may become\n * indistinguishable if we begin relying on userAgentdata in iOS.\n */\nfunction isIpod() {\n // navigator.userAgentData is currently not supported on any iOS browser, so\n // rely only on navigator.userAgent.\n return util.matchUserAgent('iPod');\n}\n\n/**\n * @return {boolean} Whether the platform is iPhone.\n */\nfunction isIphone() {\n // navigator.userAgentData is currently not supported on any iOS browser, so\n // rely only on navigator.userAgent.\n return util.matchUserAgent('iPhone') && !util.matchUserAgent('iPod') &&\n !util.matchUserAgent('iPad');\n}\n\n/**\n * Returns whether the platform is iPad.\n * Note that iPadOS 13+ spoofs macOS Safari by default in its user agent, and in\n * this scenario the platform will not be recognized as iPad. If you must have\n * iPad-specific behavior, use\n * {@link goog.labs.userAgent.extra.isSafariDesktopOnMobile}.\n * @return {boolean} Whether the platform is iPad.\n */\nfunction isIpad() {\n // navigator.userAgentData is currently not supported on any iOS browser, so\n // rely only on navigator.userAgent.\n return util.matchUserAgent('iPad');\n}\n\n/**\n * Returns whether the platform is iOS.\n * Note that iPadOS 13+ spoofs macOS Safari by default in its user agent, and in\n * this scenario the platform will not be recognized as iOS. If you must have\n * iPad-specific behavior, use\n * {@link goog.labs.userAgent.extra.isSafariDesktopOnMobile}.\n * @return {boolean} Whether the platform is iOS.\n */\nfunction isIos() {\n return isIphone() || isIpad() || isIpod();\n}\n\n/**\n * @return {boolean} Whether the platform is Mac.\n */\nfunction isMacintosh() {\n if (useUserAgentDataPlatform()) {\n return util.getUserAgentData().platform === 'macOS';\n }\n return util.matchUserAgent('Macintosh');\n}\n\n/**\n * Note: ChromeOS is not considered to be Linux as it does not report itself\n * as Linux in the user agent string.\n * @return {boolean} Whether the platform is Linux.\n */\nfunction isLinux() {\n if (useUserAgentDataPlatform()) {\n return util.getUserAgentData().platform === 'Linux';\n }\n return util.matchUserAgent('Linux');\n}\n\n/**\n * @return {boolean} Whether the platform is Windows.\n */\nfunction isWindows() {\n if (useUserAgentDataPlatform()) {\n return util.getUserAgentData().platform === 'Windows';\n }\n return util.matchUserAgent('Windows');\n}\n\n/**\n * @return {boolean} Whether the platform is ChromeOS.\n */\nfunction isChromeOS() {\n if (useUserAgentDataPlatform()) {\n return util.getUserAgentData().platform === 'Chrome OS';\n }\n return util.matchUserAgent('CrOS');\n}\n\n/**\n * @return {boolean} Whether the platform is Chromecast.\n */\nfunction isChromecast() {\n // TODO(user): Check against util.getUserAgentData().platform once the\n // OS string for Chromecast is known.\n return util.matchUserAgent('CrKey');\n}\n\n/**\n * @return {boolean} Whether the platform is KaiOS.\n */\nfunction isKaiOS() {\n // navigator.userAgentData is currently not supported on any KaiOS browser, so\n // rely only on navigator.userAgent.\n return util.matchUserAgentIgnoreCase('KaiOS');\n}\n\n/**\n * The version of the platform. We only determine the version for Windows,\n * Mac, and Chrome OS. It doesn't make much sense on Linux. For Windows, we only\n * look at the NT version. Non-NT-based versions (e.g. 95, 98, etc.) are given\n * version 0.0.\n *\n * @return {string} The platform version or empty string if version cannot be\n * determined.\n */\nfunction getVersion() {\n const userAgentString = util.getUserAgent();\n let version = '', re;\n if (isWindows()) {\n re = /Windows (?:NT|Phone) ([0-9.]+)/;\n const match = re.exec(userAgentString);\n if (match) {\n version = match[1];\n } else {\n version = '0.0';\n }\n } else if (isIos()) {\n re = /(?:iPhone|iPod|iPad|CPU)\\s+OS\\s+(\\S+)/;\n const match = re.exec(userAgentString);\n // Report the version as x.y.z and not x_y_z\n version = match && match[1].replace(/_/g, '.');\n } else if (isMacintosh()) {\n re = /Mac OS X ([0-9_.]+)/;\n const match = re.exec(userAgentString);\n // Note: some old versions of Camino do not report an OSX version.\n // Default to 10.\n version = match ? match[1].replace(/_/g, '.') : '10';\n } else if (isKaiOS()) {\n re = /(?:KaiOS)\\/(\\S+)/i;\n const match = re.exec(userAgentString);\n version = match && match[1];\n } else if (isAndroid()) {\n re = /Android\\s+([^\\);]+)(\\)|;)/;\n const match = re.exec(userAgentString);\n version = match && match[1];\n } else if (isChromeOS()) {\n re = /(?:CrOS\\s+(?:i686|x86_64)\\s+([0-9.]+))/;\n const match = re.exec(userAgentString);\n version = match && match[1];\n }\n return version || '';\n}\n\n/**\n * @param {string|number} version The version to check.\n * @return {boolean} Whether the browser version is higher or the same as the\n * given version.\n */\nfunction isVersionOrHigher(version) {\n return googString.compareVersions(getVersion(), version) >= 0;\n}\n\n/**\n * Represents a high-entropy version string.\n * @implements {AsyncValue<!Version>}\n */\nclass PlatformVersion {\n constructor() {\n /** @private {boolean} */\n this.preUachHasLoaded_ = false;\n }\n\n /**\n * @return {!Version|undefined}\n * @override\n */\n getIfLoaded() {\n if (useUserAgentDataPlatform(true)) {\n const loadedPlatformVersion = platformVersion.getIfLoaded();\n if (loadedPlatformVersion === undefined) {\n // No platform data has been cached\n return undefined;\n }\n return new Version(loadedPlatformVersion);\n } else if (!this.preUachHasLoaded_) {\n // Nobody ever called `load` on this class instance, so we should return\n // nothing to match the semantics of the class when using the Client Hint\n // APIs.\n return undefined;\n } else {\n // `load` has been called, so we can return a Version derived from the\n // useragent string.\n return new Version(getVersion());\n }\n }\n\n /**\n * @return {!Promise<!Version>}\n * @override\n */\n async load() {\n if (useUserAgentDataPlatform(true)) {\n return new Version(await platformVersion.load());\n } else {\n this.preUachHasLoaded_ = true;\n return new Version(getVersion());\n }\n }\n\n /** @package */\n resetForTesting() {\n platformVersion.resetForTesting();\n this.preUachHasLoaded_ = false;\n }\n}\n\n/**\n * The platform version, a high-entropy value.\n * @type {!PlatformVersion}\n */\nconst version = new PlatformVersion();\n\nexports = {\n getVersion,\n isAndroid,\n isChromeOS,\n isChromecast,\n isIos,\n isIpad,\n isIphone,\n isIpod,\n isKaiOS,\n isLinux,\n isMacintosh,\n isVersionOrHigher,\n isWindows,\n version,\n};\n"],
8
+ "names":["useUserAgentDataPlatform","ignoreClientHintsFlag","util","ASSUME_CLIENT_HINTS_SUPPORT","useClientHints","userAgentData","getUserAgentData","platform","isAndroid","matchUserAgent","isIpod","isIphone","isIpad","isIos","isMacintosh","isLinux","isWindows","isChromeOS","isChromecast","isKaiOS","matchUserAgentIgnoreCase","getVersion","userAgentString","getUserAgent","version","re","match","exec","replace","isVersionOrHigher","googString","compareVersions","goog","module","declareLegacyNamespace","require","AsyncValue","Version","platformVersion","PlatformVersion","constructor","preUachHasLoaded_","getIfLoaded","loadedPlatformVersion","undefined","load","resetForTesting","exports"]
9
+ }
@@ -0,0 +1,21 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.flags.flags.js";
3
+ goog.loadModule(function(exports) {
4
+ "use strict";
5
+ goog.module("goog.labs.userAgent");
6
+ goog.module.declareLegacyNamespace();
7
+ const flags = goog.require("goog.flags");
8
+ const USE_CLIENT_HINTS_OVERRIDE = goog.define("goog.labs.userAgent.USE_CLIENT_HINTS_OVERRIDE", "");
9
+ const USE_CLIENT_HINTS = goog.define("goog.labs.userAgent.USE_CLIENT_HINTS", false);
10
+ let forceClientHintsInTests = false;
11
+ exports.setUseClientHintsForTesting = use => {
12
+ forceClientHintsInTests = use;
13
+ };
14
+ const useClientHintsRuntimeOverride = USE_CLIENT_HINTS_OVERRIDE ? !!goog.getObjectByName(USE_CLIENT_HINTS_OVERRIDE) : false;
15
+ exports.useClientHints = () => {
16
+ return flags.USE_USER_AGENT_CLIENT_HINTS || USE_CLIENT_HINTS || useClientHintsRuntimeOverride || forceClientHintsInTests;
17
+ };
18
+ return exports;
19
+ });
20
+
21
+ //# sourceMappingURL=goog.labs.useragent.useragent.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.labs.useragent.useragent.js",
4
+ "lineCount":18,
5
+ "mappings":"AAAA,IAAA,CAAA,UAAA,CAAA,QAAA,CAAA,OAAA,CAAA;AAAA,cAAA;AAUAA,MAAKC,CAAAA,MAAL,CAAY,qBAAZ,CAAA;AACAD,MAAKC,CAAAA,MAAOC,CAAAA,sBAAZ,EAAA;AAEA,QAAMC,QAAQH,IAAKI,CAAAA,OAAL,CAAa,YAAb,CAAd;AAQA,QAAMC,4BACFL,IAAKM,CAAAA,MAAL,CAAY,+CAAZ,EAA6D,EAA7D,CADJ;AAQA,QAAMC,mBACFP,IAAKM,CAAAA,MAAL,CAAY,sCAAZ,EAAoD,KAApD,CADJ;AAGA,MAAIE,0BAA0B,KAA9B;AAcAC,SAAQC,CAAAA,2BAAR,GAAuCC,GAADC,IAAS;AAC7CJ,2BAAA,GAA0BG,GAA1B;AAD6C,GAA/C;AAKA,QAAME,gCAAgCR,yBAAA,GAClC,CAAC,CAACL,IAAKc,CAAAA,eAAL,CAAqBT,yBAArB,CADgC,GAElC,KAFJ;AAWAI,SAAQM,CAAAA,cAAR,GAAyB,EAAAC,IAAM;AAC7B,WAAOb,KAAMc,CAAAA,2BAAb,IAA4CV,gBAA5C,IACIM,6BADJ,IACqCL,uBADrC;AAD6B,GAA/B;AA9DA,SAAA,OAAA;AAAA,CAAA,CAAA;;",
6
+ "sources":["goog/labs/useragent/useragent.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Defines for goog.labs.userAgent.\n */\n\ngoog.module('goog.labs.userAgent');\ngoog.module.declareLegacyNamespace();\n\nconst flags = goog.require('goog.flags');\n\n/**\n * @define {string} Optional runtime override for the USE_CLIENT_HINTS flag.\n * If this is set (for example, to 'foo.bar') then any value of USE_CLIENT_HINTS\n * will be overridden by `globalThis.foo.bar` if it is non-null.\n * This flag will be removed in December 2021.\n */\nconst USE_CLIENT_HINTS_OVERRIDE =\n goog.define('goog.labs.userAgent.USE_CLIENT_HINTS_OVERRIDE', '');\n\n/**\n * @define {boolean} If true, use navigator.userAgentData. Note: this overrides\n * the `USE_USER_AGENT_CLIENT_HINTS` runtime flag. Please prefer the flag when\n * possible.\n */\nconst USE_CLIENT_HINTS =\n goog.define('goog.labs.userAgent.USE_CLIENT_HINTS', false);\n\nlet forceClientHintsInTests = false;\n\n/**\n * Sets whether to use client hints APIs in tests for codepaths that\n * - were originally implemented as checks against the navigator.userAgent\n * string.\n * - have an alternative implementation that uses Client Hints APIs.\n *\n * See the jsdoc on useClientHints for cases where this flag will be\n * ineffective, and the Client Hints APIs would be used regardless.\n * DO NOT call this function in production code - it will cause de-optimization.\n * @param {boolean} use Whether or not to use Client Hints API codepaths in\n * goog.labs.useragent.* modules.\n */\nexports.setUseClientHintsForTesting = (use) => {\n forceClientHintsInTests = use;\n};\n\n/** @const {boolean} */\nconst useClientHintsRuntimeOverride = USE_CLIENT_HINTS_OVERRIDE ?\n !!goog.getObjectByName(USE_CLIENT_HINTS_OVERRIDE) :\n false;\n\n/**\n * Whether to use UserAgent-Client Hints API surfaces in parts of the\n * labs.userAgent package that previously only relied on the navigator.userAgent\n * string. Newer labs.userAgent API surfaces may ignore the result of this\n * function as they are considered opt-in API surfaces.\n * @const {function():boolean}\n */\nexports.useClientHints = () => {\n return flags.USE_USER_AGENT_CLIENT_HINTS || USE_CLIENT_HINTS ||\n useClientHintsRuntimeOverride || forceClientHintsInTests;\n};\n"],
8
+ "names":["goog","module","declareLegacyNamespace","flags","require","USE_CLIENT_HINTS_OVERRIDE","define","USE_CLIENT_HINTS","forceClientHintsInTests","exports","setUseClientHintsForTesting","use","exports.setUseClientHintsForTesting","useClientHintsRuntimeOverride","getObjectByName","useClientHints","exports.useClientHints","USE_USER_AGENT_CLIENT_HINTS"]
9
+ }
@@ -0,0 +1,81 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.string.internal.js";
3
+ import "./goog.labs.useragent.useragent.js";
4
+ goog.loadModule(function(exports) {
5
+ function getNativeUserAgentString() {
6
+ const navigator = getNavigator();
7
+ if (navigator) {
8
+ const userAgent = navigator.userAgent;
9
+ if (userAgent) {
10
+ return userAgent;
11
+ }
12
+ }
13
+ return "";
14
+ }
15
+ function getNativeUserAgentData() {
16
+ const navigator = getNavigator();
17
+ if (navigator) {
18
+ return navigator.userAgentData || null;
19
+ }
20
+ return null;
21
+ }
22
+ function getNavigator() {
23
+ return goog.global.navigator;
24
+ }
25
+ function setUserAgent(userAgent = undefined) {
26
+ userAgentInternal = typeof userAgent === "string" ? userAgent : getNativeUserAgentString();
27
+ }
28
+ function getUserAgent() {
29
+ return userAgentInternal == null ? getNativeUserAgentString() : userAgentInternal;
30
+ }
31
+ function setUserAgentData(userAgentData) {
32
+ userAgentDataInternal = userAgentData;
33
+ }
34
+ function resetUserAgentData() {
35
+ userAgentDataInternal = getNativeUserAgentData();
36
+ }
37
+ function getUserAgentData() {
38
+ return userAgentDataInternal;
39
+ }
40
+ function matchUserAgentDataBrand(str) {
41
+ if (!useClientHints()) {
42
+ return false;
43
+ }
44
+ const data = getUserAgentData();
45
+ if (!data) {
46
+ return false;
47
+ }
48
+ return data.brands.some(({brand}) => {
49
+ return brand && contains(brand, str);
50
+ });
51
+ }
52
+ function matchUserAgent(str) {
53
+ const userAgent = getUserAgent();
54
+ return contains(userAgent, str);
55
+ }
56
+ function matchUserAgentIgnoreCase(str) {
57
+ const userAgent = getUserAgent();
58
+ return caseInsensitiveContains(userAgent, str);
59
+ }
60
+ function extractVersionTuples(userAgent) {
61
+ const versionRegExp = new RegExp("([A-Z][\\w ]+)" + "/" + "([^\\s]+)" + "\\s*" + "(?:\\((.*?)\\))?", "g");
62
+ const data = [];
63
+ let match;
64
+ for (; match = versionRegExp.exec(userAgent);) {
65
+ data.push([match[1], match[2], match[3] || undefined]);
66
+ }
67
+ return data;
68
+ }
69
+ "use strict";
70
+ goog.module("goog.labs.userAgent.util");
71
+ goog.module.declareLegacyNamespace();
72
+ const {caseInsensitiveContains, contains} = goog.require("goog.string.internal");
73
+ const {useClientHints} = goog.require("goog.labs.userAgent");
74
+ const ASSUME_CLIENT_HINTS_SUPPORT = false;
75
+ let userAgentInternal = null;
76
+ let userAgentDataInternal = getNativeUserAgentData();
77
+ exports = {ASSUME_CLIENT_HINTS_SUPPORT, extractVersionTuples, getNativeUserAgentString, getUserAgent, getUserAgentData, matchUserAgent, matchUserAgentDataBrand, matchUserAgentIgnoreCase, resetUserAgentData, setUserAgent, setUserAgentData};
78
+ return exports;
79
+ });
80
+
81
+ //# sourceMappingURL=goog.labs.useragent.util.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.labs.useragent.util.js",
4
+ "lineCount":77,
5
+ "mappings":"AAAA,IAAA,CAAA,UAAA,CAAA,QAAA,CAAA,OAAA,CAAA;AA+BAA,UAASA,yBAAwB,EAAG;AAClC,UAAMC,YAAYC,YAAA,EAAlB;AACA,QAAID,SAAJ,CAAe;AACb,YAAME,YAAYF,SAAUE,CAAAA,SAA5B;AACA,UAAIA,SAAJ;AACE,eAAOA,SAAP;AADF;AAFa;AAMf,WAAO,EAAP;AARkC;AAgBpCC,UAASA,uBAAsB,EAAG;AAChC,UAAMH,YAAYC,YAAA,EAAlB;AAEA,QAAID,SAAJ;AACE,aAAOA,SAAUI,CAAAA,aAAjB,IAAkC,IAAlC;AADF;AAGA,WAAO,IAAP;AANgC;AAalCH,UAASA,aAAY,EAAG;AACtB,WAAOI,IAAKC,CAAAA,MAAON,CAAAA,SAAnB;AADsB;AA0BxBO,UAASA,aAAY,CAACL,SAAA,GAAYM,SAAb,CAAwB;AAC3CC,qBAAA,GACI,MAAOP,UAAP,KAAqB,QAArB,GAAgCA,SAAhC,GAA4CH,wBAAA,EADhD;AAD2C;AAM7CW,UAASA,aAAY,EAAG;AACtB,WAAOD,iBAAA,IAAqB,IAArB,GAA4BV,wBAAA,EAA5B,GAC4BU,iBADnC;AADsB;AAaxBE,UAASA,iBAAgB,CAACP,aAAD,CAAgB;AACvCQ,yBAAA,GAAwBR,aAAxB;AADuC;AAQzCS,UAASA,mBAAkB,EAAG;AAC5BD,yBAAA,GAAwBT,sBAAA,EAAxB;AAD4B;AAK9BW,UAASA,iBAAgB,EAAG;AAC1B,WAAOF,qBAAP;AAD0B;AAW5BG,UAASA,wBAAuB,CAACC,GAAD,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CAAA,GAAsCjB,IAAK6B,CAAAA,OAAL,CAAa,sBAAb,CAA5C;AACA,QAAM,CAACjB,cAAD,CAAA,GAAmBZ,IAAK6B,CAAAA,OAAL,CAAa,qBAAb,CAAzB;AAOA,QAAMC,8BAA8B,KAApC;AA8CA,MAAI1B,oBAAoB,IAAxB;AAOA,MAAIG,wBAAwBT,sBAAA,EAA5B;AAwHAiC,SAAA,GAAU,CACRD,2BADQ,EAERT,oBAFQ,EAGR3B,wBAHQ,EAIRW,YAJQ,EAKRI,gBALQ,EAMRS,cANQ,EAORR,uBAPQ,EAQRS,wBARQ,EASRX,kBATQ,EAURN,YAVQ,EAWRI,gBAXQ,CAAV;AApMA,SAAA,OAAA;AAAA,CAAA,CAAA;;",
6
+ "sources":["goog/labs/useragent/util.js"],
7
+ "sourcesContent":["/**\n * @license\n * Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview Utilities used by goog.labs.userAgent tools. These functions\n * should not be used outside of goog.labs.userAgent.*.\n *\n */\n\ngoog.module('goog.labs.userAgent.util');\ngoog.module.declareLegacyNamespace();\n\nconst {caseInsensitiveContains, contains} = goog.require('goog.string.internal');\nconst {useClientHints} = goog.require('goog.labs.userAgent');\n\n/**\n * @const {boolean} If true, use navigator.userAgentData without check.\n * TODO(user): FEATURESET_YEAR >= 2024 if it supports mobile and all the\n * brands we need. See https://caniuse.com/mdn-api_navigator_useragentdata.\n */\nconst ASSUME_CLIENT_HINTS_SUPPORT = false;\n\n/**\n * Gets the native userAgent string from navigator if it exists.\n * If navigator or navigator.userAgent string is missing, returns an empty\n * string.\n * @return {string}\n */\nfunction getNativeUserAgentString() {\n const navigator = getNavigator();\n if (navigator) {\n const userAgent = navigator.userAgent;\n if (userAgent) {\n return userAgent;\n }\n }\n return '';\n}\n\n/**\n * Gets the native userAgentData object from navigator if it exists.\n * If navigator.userAgentData object is missing returns null.\n * @return {?NavigatorUAData}\n */\nfunction getNativeUserAgentData() {\n const navigator = getNavigator();\n // TODO(user): Use navigator?.userAgent ?? null once it's supported.\n if (navigator) {\n return navigator.userAgentData || null;\n }\n return null;\n}\n\n/**\n * Getter for the native navigator.\n * @return {!Navigator}\n */\nfunction getNavigator() {\n return goog.global.navigator;\n}\n\n/**\n * A possible override for applications which wish to not check\n * navigator.userAgent but use a specified value for detection instead.\n * @type {?string}\n */\nlet userAgentInternal = null;\n\n/**\n * A possible override for applications which wish to not check\n * navigator.userAgentData but use a specified value for detection instead.\n * @type {?NavigatorUAData}\n */\nlet userAgentDataInternal = getNativeUserAgentData();\n\n/**\n * Override the user agent string with the given value.\n * This should only be used for testing within the goog.labs.userAgent\n * namespace.\n * Pass `null` to use the native browser object instead.\n * @param {?string=} userAgent The userAgent override.\n * @return {void}\n */\nfunction setUserAgent(userAgent = undefined) {\n userAgentInternal =\n typeof userAgent === 'string' ? userAgent : getNativeUserAgentString();\n}\n\n/** @return {string} The user agent string. */\nfunction getUserAgent() {\n return userAgentInternal == null ? getNativeUserAgentString() :\n userAgentInternal;\n}\n\n/**\n * Override the user agent data object with the given value.\n * This should only be used for testing within the goog.labs.userAgent\n * namespace.\n * Pass `null` to specify the absence of userAgentData. Note that this behavior\n * is different from setUserAgent.\n * @param {?NavigatorUAData} userAgentData The userAgentData override.\n */\nfunction setUserAgentData(userAgentData) {\n userAgentDataInternal = userAgentData;\n}\n\n/**\n * If the user agent data object was overridden using setUserAgentData,\n * reset it so that it uses the native browser object instead, if it exists.\n */\nfunction resetUserAgentData() {\n userAgentDataInternal = getNativeUserAgentData();\n}\n\n/** @return {?NavigatorUAData} Navigator.userAgentData if exist */\nfunction getUserAgentData() {\n return userAgentDataInternal;\n}\n\n/**\n * Checks if any string in userAgentData.brands matches str.\n * Returns false if userAgentData is not supported.\n * @param {string} str\n * @return {boolean} Whether any brand string from userAgentData contains the\n * given string.\n */\nfunction matchUserAgentDataBrand(str) {\n if (!useClientHints()) return false;\n const data = getUserAgentData();\n if (!data) return false;\n return data.brands.some(({brand}) => brand && contains(brand, str));\n}\n\n/**\n * @param {string} str\n * @return {boolean} Whether the user agent contains the given string.\n */\nfunction matchUserAgent(str) {\n const userAgent = getUserAgent();\n return contains(userAgent, str);\n}\n\n/**\n * @param {string} str\n * @return {boolean} Whether the user agent contains the given string, ignoring\n * case.\n */\nfunction matchUserAgentIgnoreCase(str) {\n const userAgent = getUserAgent();\n return caseInsensitiveContains(userAgent, str);\n}\n\n/**\n * Parses the user agent into tuples for each section.\n * @param {string} userAgent\n * @return {!Array<!Array<string>>} Tuples of key, version, and the contents of\n * the parenthetical.\n */\nfunction extractVersionTuples(userAgent) {\n // Matches each section of a user agent string.\n // Example UA:\n // Mozilla/5.0 (iPad; U; CPU OS 3_2_1 like Mac OS X; en-us)\n // AppleWebKit/531.21.10 (KHTML, like Gecko) Mobile/7B405\n // This has three version tuples: Mozilla, AppleWebKit, and Mobile.\n\n const versionRegExp = new RegExp(\n // Key. Note that a key may have a space.\n // (i.e. 'Mobile Safari' in 'Mobile Safari/5.0')\n '([A-Z][\\\\w ]+)' +\n\n '/' + // slash\n '([^\\\\s]+)' + // version (i.e. '5.0b')\n '\\\\s*' + // whitespace\n '(?:\\\\((.*?)\\\\))?', // parenthetical info. parentheses not matched.\n 'g');\n\n const data = [];\n let match;\n\n // Iterate and collect the version tuples. Each iteration will be the\n // next regex match.\n while (match = versionRegExp.exec(userAgent)) {\n data.push([\n match[1], // key\n match[2], // value\n // || undefined as this is not undefined in IE7 and IE8\n match[3] || undefined // info\n ]);\n }\n\n return data;\n}\n\nexports = {\n ASSUME_CLIENT_HINTS_SUPPORT,\n extractVersionTuples,\n getNativeUserAgentString,\n getUserAgent,\n getUserAgentData,\n matchUserAgent,\n matchUserAgentDataBrand,\n matchUserAgentIgnoreCase,\n resetUserAgentData,\n setUserAgent,\n setUserAgentData,\n};\n"],
8
+ "names":["getNativeUserAgentString","navigator","getNavigator","userAgent","getNativeUserAgentData","userAgentData","goog","global","setUserAgent","undefined","userAgentInternal","getUserAgent","setUserAgentData","userAgentDataInternal","resetUserAgentData","getUserAgentData","matchUserAgentDataBrand","str","useClientHints","data","brands","some","brand","contains","matchUserAgent","matchUserAgentIgnoreCase","caseInsensitiveContains","extractVersionTuples","versionRegExp","RegExp","match","exec","push","module","declareLegacyNamespace","require","ASSUME_CLIENT_HINTS_SUPPORT","exports"]
9
+ }
@@ -0,0 +1,97 @@
1
+ import "./cljs_env.js";
2
+ import "./goog.math.math.js";
3
+ goog.provide("goog.math.Coordinate");
4
+ goog.require("goog.math");
5
+ goog.math.Coordinate = function(opt_x, opt_y) {
6
+ this.x = opt_x !== undefined ? opt_x : 0;
7
+ this.y = opt_y !== undefined ? opt_y : 0;
8
+ };
9
+ goog.math.Coordinate.prototype.clone = function() {
10
+ return new goog.math.Coordinate(this.x, this.y);
11
+ };
12
+ if (goog.DEBUG) {
13
+ goog.math.Coordinate.prototype.toString = function() {
14
+ return "(" + this.x + ", " + this.y + ")";
15
+ };
16
+ }
17
+ goog.math.Coordinate.prototype.equals = function(other) {
18
+ return other instanceof goog.math.Coordinate && goog.math.Coordinate.equals(this, other);
19
+ };
20
+ goog.math.Coordinate.equals = function(a, b) {
21
+ if (a == b) {
22
+ return true;
23
+ }
24
+ if (!a || !b) {
25
+ return false;
26
+ }
27
+ return a.x == b.x && a.y == b.y;
28
+ };
29
+ goog.math.Coordinate.distance = function(a, b) {
30
+ var dx = a.x - b.x;
31
+ var dy = a.y - b.y;
32
+ return Math.sqrt(dx * dx + dy * dy);
33
+ };
34
+ goog.math.Coordinate.magnitude = function(a) {
35
+ return Math.sqrt(a.x * a.x + a.y * a.y);
36
+ };
37
+ goog.math.Coordinate.azimuth = function(a) {
38
+ return goog.math.angle(0, 0, a.x, a.y);
39
+ };
40
+ goog.math.Coordinate.squaredDistance = function(a, b) {
41
+ var dx = a.x - b.x;
42
+ var dy = a.y - b.y;
43
+ return dx * dx + dy * dy;
44
+ };
45
+ goog.math.Coordinate.difference = function(a, b) {
46
+ return new goog.math.Coordinate(a.x - b.x, a.y - b.y);
47
+ };
48
+ goog.math.Coordinate.sum = function(a, b) {
49
+ return new goog.math.Coordinate(a.x + b.x, a.y + b.y);
50
+ };
51
+ goog.math.Coordinate.prototype.ceil = function() {
52
+ this.x = Math.ceil(this.x);
53
+ this.y = Math.ceil(this.y);
54
+ return this;
55
+ };
56
+ goog.math.Coordinate.prototype.floor = function() {
57
+ this.x = Math.floor(this.x);
58
+ this.y = Math.floor(this.y);
59
+ return this;
60
+ };
61
+ goog.math.Coordinate.prototype.round = function() {
62
+ this.x = Math.round(this.x);
63
+ this.y = Math.round(this.y);
64
+ return this;
65
+ };
66
+ goog.math.Coordinate.prototype.translate = function(tx, opt_ty) {
67
+ if (tx instanceof goog.math.Coordinate) {
68
+ this.x += tx.x;
69
+ this.y += tx.y;
70
+ } else {
71
+ this.x += Number(tx);
72
+ if (typeof opt_ty === "number") {
73
+ this.y += opt_ty;
74
+ }
75
+ }
76
+ return this;
77
+ };
78
+ goog.math.Coordinate.prototype.scale = function(sx, opt_sy) {
79
+ var sy = typeof opt_sy === "number" ? opt_sy : sx;
80
+ this.x *= sx;
81
+ this.y *= sy;
82
+ return this;
83
+ };
84
+ goog.math.Coordinate.prototype.rotateRadians = function(radians, opt_center) {
85
+ var center = opt_center || new goog.math.Coordinate(0, 0);
86
+ var x = this.x;
87
+ var y = this.y;
88
+ var cos = Math.cos(radians);
89
+ var sin = Math.sin(radians);
90
+ this.x = (x - center.x) * cos - (y - center.y) * sin + center.x;
91
+ this.y = (x - center.x) * sin + (y - center.y) * cos + center.y;
92
+ };
93
+ goog.math.Coordinate.prototype.rotateDegrees = function(degrees, opt_center) {
94
+ this.rotateRadians(goog.math.toRadians(degrees), opt_center);
95
+ };
96
+
97
+ //# sourceMappingURL=goog.math.coordinate.js.map
@@ -0,0 +1,9 @@
1
+ {
2
+ "version":3,
3
+ "file":"goog.math.coordinate.js",
4
+ "lineCount":94,
5
+ "mappings":"AAWAA,IAAKC,CAAAA,OAAL,CAAa,sBAA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Copyright The Closure Library Authors.\n * SPDX-License-Identifier: Apache-2.0\n */\n\n/**\n * @fileoverview A utility class for representing two-dimensional positions.\n */\n\n\ngoog.provide('goog.math.Coordinate');\n\ngoog.require('goog.math');\n\n\n\n/**\n * Class for representing coordinates and positions.\n * @param {number=} opt_x Left, defaults to 0.\n * @param {number=} opt_y Top, defaults to 0.\n * @struct\n * @constructor\n */\ngoog.math.Coordinate = function(opt_x, opt_y) {\n 'use strict';\n /**\n * X-value\n * @type {number}\n */\n this.x = (opt_x !== undefined) ? opt_x : 0;\n\n /**\n * Y-value\n * @type {number}\n */\n this.y = (opt_y !== undefined) ? opt_y : 0;\n};\n\n\n/**\n * Returns a new copy of the coordinate.\n * @return {!goog.math.Coordinate} A clone of this coordinate.\n */\ngoog.math.Coordinate.prototype.clone = function() {\n 'use strict';\n return new goog.math.Coordinate(this.x, this.y);\n};\n\n\nif (goog.DEBUG) {\n /**\n * Returns a nice string representing the coordinate.\n * @return {string} In the form (50, 73).\n * @override\n */\n goog.math.Coordinate.prototype.toString = function() {\n 'use strict';\n return '(' + this.x + ', ' + this.y + ')';\n };\n}\n\n\n/**\n * Returns whether the specified value is equal to this coordinate.\n * @param {*} other Some other value.\n * @return {boolean} Whether the specified value is equal to this coordinate.\n */\ngoog.math.Coordinate.prototype.equals = function(other) {\n 'use strict';\n return other instanceof goog.math.Coordinate &&\n goog.math.Coordinate.equals(this, other);\n};\n\n\n/**\n * Compares coordinates for equality.\n * @param {goog.math.Coordinate} a A Coordinate.\n * @param {goog.math.Coordinate} b A Coordinate.\n * @return {boolean} True iff the coordinates are equal, or if both are null.\n */\ngoog.math.Coordinate.equals = function(a, b) {\n 'use strict';\n if (a == b) {\n return true;\n }\n if (!a || !b) {\n return false;\n }\n return a.x == b.x && a.y == b.y;\n};\n\n\n/**\n * Returns the distance between two coordinates.\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @param {!goog.math.Coordinate} b A Coordinate.\n * @return {number} The distance between `a` and `b`.\n */\ngoog.math.Coordinate.distance = function(a, b) {\n 'use strict';\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n return Math.sqrt(dx * dx + dy * dy);\n};\n\n\n/**\n * Returns the magnitude of a coordinate.\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @return {number} The distance between the origin and `a`.\n */\ngoog.math.Coordinate.magnitude = function(a) {\n 'use strict';\n return Math.sqrt(a.x * a.x + a.y * a.y);\n};\n\n\n/**\n * Returns the angle from the origin to a coordinate.\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @return {number} The angle, in degrees, clockwise from the positive X\n * axis to `a`.\n */\ngoog.math.Coordinate.azimuth = function(a) {\n 'use strict';\n return goog.math.angle(0, 0, a.x, a.y);\n};\n\n\n/**\n * Returns the squared distance between two coordinates. Squared distances can\n * be used for comparisons when the actual value is not required.\n *\n * Performance note: eliminating the square root is an optimization often used\n * in lower-level languages, but the speed difference is not nearly as\n * pronounced in JavaScript (only a few percent.)\n *\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @param {!goog.math.Coordinate} b A Coordinate.\n * @return {number} The squared distance between `a` and `b`.\n */\ngoog.math.Coordinate.squaredDistance = function(a, b) {\n 'use strict';\n var dx = a.x - b.x;\n var dy = a.y - b.y;\n return dx * dx + dy * dy;\n};\n\n\n/**\n * Returns the difference between two coordinates as a new\n * goog.math.Coordinate.\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @param {!goog.math.Coordinate} b A Coordinate.\n * @return {!goog.math.Coordinate} A Coordinate representing the difference\n * between `a` and `b`.\n */\ngoog.math.Coordinate.difference = function(a, b) {\n 'use strict';\n return new goog.math.Coordinate(a.x - b.x, a.y - b.y);\n};\n\n\n/**\n * Returns the sum of two coordinates as a new goog.math.Coordinate.\n * @param {!goog.math.Coordinate} a A Coordinate.\n * @param {!goog.math.Coordinate} b A Coordinate.\n * @return {!goog.math.Coordinate} A Coordinate representing the sum of the two\n * coordinates.\n */\ngoog.math.Coordinate.sum = function(a, b) {\n 'use strict';\n return new goog.math.Coordinate(a.x + b.x, a.y + b.y);\n};\n\n\n/**\n * Rounds the x and y fields to the next larger integer values.\n * @return {!goog.math.Coordinate} This coordinate with ceil'd fields.\n */\ngoog.math.Coordinate.prototype.ceil = function() {\n 'use strict';\n this.x = Math.ceil(this.x);\n this.y = Math.ceil(this.y);\n return this;\n};\n\n\n/**\n * Rounds the x and y fields to the next smaller integer values.\n * @return {!goog.math.Coordinate} This coordinate with floored fields.\n */\ngoog.math.Coordinate.prototype.floor = function() {\n 'use strict';\n this.x = Math.floor(this.x);\n this.y = Math.floor(this.y);\n return this;\n};\n\n\n/**\n * Rounds the x and y fields to the nearest integer values.\n * @return {!goog.math.Coordinate} This coordinate with rounded fields.\n */\ngoog.math.Coordinate.prototype.round = function() {\n 'use strict';\n this.x = Math.round(this.x);\n this.y = Math.round(this.y);\n return this;\n};\n\n\n/**\n * Translates this box by the given offsets. If a `goog.math.Coordinate`\n * is given, then the x and y values are translated by the coordinate's x and y.\n * Otherwise, x and y are translated by `tx` and `opt_ty`\n * respectively.\n * @param {number|goog.math.Coordinate} tx The value to translate x by or the\n * the coordinate to translate this coordinate by.\n * @param {number=} opt_ty The value to translate y by.\n * @return {!goog.math.Coordinate} This coordinate after translating.\n */\ngoog.math.Coordinate.prototype.translate = function(tx, opt_ty) {\n 'use strict';\n if (tx instanceof goog.math.Coordinate) {\n this.x += tx.x;\n this.y += tx.y;\n } else {\n this.x += Number(tx);\n if (typeof opt_ty === 'number') {\n this.y += opt_ty;\n }\n }\n return this;\n};\n\n\n/**\n * Scales this coordinate by the given scale factors. The x and y values are\n * scaled by `sx` and `opt_sy` respectively. If `opt_sy`\n * is not given, then `sx` is used for both x and y.\n * @param {number} sx The scale factor to use for the x dimension.\n * @param {number=} opt_sy The scale factor to use for the y dimension.\n * @return {!goog.math.Coordinate} This coordinate after scaling.\n */\ngoog.math.Coordinate.prototype.scale = function(sx, opt_sy) {\n 'use strict';\n var sy = (typeof opt_sy === 'number') ? opt_sy : sx;\n this.x *= sx;\n this.y *= sy;\n return this;\n};\n\n\n/**\n * Rotates this coordinate clockwise about the origin (or, optionally, the given\n * center) by the given angle, in radians.\n * @param {number} radians The angle by which to rotate this coordinate\n * clockwise about the given center, in radians.\n * @param {!goog.math.Coordinate=} opt_center The center of rotation. Defaults\n * to (0, 0) if not given.\n */\ngoog.math.Coordinate.prototype.rotateRadians = function(radians, opt_center) {\n 'use strict';\n var center = opt_center || new goog.math.Coordinate(0, 0);\n\n var x = this.x;\n var y = this.y;\n var cos = Math.cos(radians);\n var sin = Math.sin(radians);\n\n this.x = (x - center.x) * cos - (y - center.y) * sin + center.x;\n this.y = (x - center.x) * sin + (y - center.y) * cos + center.y;\n};\n\n\n/**\n * Rotates this coordinate clockwise about the origin (or, optionally, the given\n * center) by the given angle, in degrees.\n * @param {number} degrees The angle by which to rotate this coordinate\n * clockwise about the given center, in degrees.\n * @param {!goog.math.Coordinate=} opt_center The center of rotation. Defaults\n * to (0, 0) if not given.\n */\ngoog.math.Coordinate.prototype.rotateDegrees = function(degrees, opt_center) {\n 'use strict';\n this.rotateRadians(goog.math.toRadians(degrees), opt_center);\n};\n"],
8
+ "names":["goog","provide","require","math","Coordinate","goog.math.Coordinate","opt_x","opt_y","x","undefined","y","prototype","clone","goog.math.Coordinate.prototype.clone","DEBUG","toString","goog.math.Coordinate.prototype.toString","equals","goog.math.Coordinate.prototype.equals","other","goog.math.Coordinate.equals","a","b","distance","goog.math.Coordinate.distance","dx","dy","Math","sqrt","magnitude","goog.math.Coordinate.magnitude","azimuth","goog.math.Coordinate.azimuth","angle","squaredDistance","goog.math.Coordinate.squaredDistance","difference","goog.math.Coordinate.difference","sum","goog.math.Coordinate.sum","ceil","goog.math.Coordinate.prototype.ceil","floor","goog.math.Coordinate.prototype.floor","round","goog.math.Coordinate.prototype.round","translate","goog.math.Coordinate.prototype.translate","tx","opt_ty","Number","scale","goog.math.Coordinate.prototype.scale","sx","opt_sy","sy","rotateRadians","goog.math.Coordinate.prototype.rotateRadians","radians","opt_center","center","cos","sin","rotateDegrees","goog.math.Coordinate.prototype.rotateDegrees","degrees","toRadians"]
9
+ }