closure 1.1.692

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1494) hide show
  1. data/.gitignore +6 -0
  2. data/.yardopts +3 -0
  3. data/LICENSE +202 -0
  4. data/README.md +26 -0
  5. data/beanshell/LICENSE +12 -0
  6. data/beanshell/bsh-core-2.0b4.jar +0 -0
  7. data/closure-compiler/COPYING +202 -0
  8. data/closure-compiler/README +278 -0
  9. data/closure-compiler/compiler.jar +0 -0
  10. data/closure-library/AUTHORS +12 -0
  11. data/closure-library/LICENSE +176 -0
  12. data/closure-library/README +6 -0
  13. data/closure-library/all_tests.html +113 -0
  14. data/closure-library/alltests.js +16 -0
  15. data/closure-library/closure/bin/build/closurebuilder.py +257 -0
  16. data/closure-library/closure/bin/build/depstree.py +186 -0
  17. data/closure-library/closure/bin/build/depstree_test.py +127 -0
  18. data/closure-library/closure/bin/build/depswriter.py +197 -0
  19. data/closure-library/closure/bin/build/jscompiler.py +69 -0
  20. data/closure-library/closure/bin/build/source.py +86 -0
  21. data/closure-library/closure/bin/build/source_test.py +57 -0
  22. data/closure-library/closure/bin/build/treescan.py +78 -0
  23. data/closure-library/closure/bin/calcdeps.py +570 -0
  24. data/closure-library/closure/bin/scopify.py +211 -0
  25. data/closure-library/closure/css/inlay/g-base.css +82 -0
  26. data/closure-library/closure/css/inlay/g-fixed.css +158 -0
  27. data/closure-library/closure/css/inlay/g-ratio.css +253 -0
  28. data/closure-library/closure/goog/array/array.js +1300 -0
  29. data/closure-library/closure/goog/array/array_test.html +1524 -0
  30. data/closure-library/closure/goog/asserts/asserts.js +277 -0
  31. data/closure-library/closure/goog/asserts/asserts_test.html +163 -0
  32. data/closure-library/closure/goog/async/conditionaldelay.js +238 -0
  33. data/closure-library/closure/goog/async/conditionaldelay_test.html +227 -0
  34. data/closure-library/closure/goog/async/delay.js +174 -0
  35. data/closure-library/closure/goog/async/delay_test.html +148 -0
  36. data/closure-library/closure/goog/async/throttle.js +189 -0
  37. data/closure-library/closure/goog/async/throttle_test.html +102 -0
  38. data/closure-library/closure/goog/base.js +1471 -0
  39. data/closure-library/closure/goog/base_test.html +1166 -0
  40. data/closure-library/closure/goog/bootstrap/webworkers.js +37 -0
  41. data/closure-library/closure/goog/color/alpha.js +436 -0
  42. data/closure-library/closure/goog/color/alpha_test.html +234 -0
  43. data/closure-library/closure/goog/color/color.js +757 -0
  44. data/closure-library/closure/goog/color/color_test.html +645 -0
  45. data/closure-library/closure/goog/color/names.js +176 -0
  46. data/closure-library/closure/goog/crypt/arc4.js +141 -0
  47. data/closure-library/closure/goog/crypt/arc4_test.html +42 -0
  48. data/closure-library/closure/goog/crypt/base64.js +267 -0
  49. data/closure-library/closure/goog/crypt/base64_test.html +106 -0
  50. data/closure-library/closure/goog/crypt/basen.js +242 -0
  51. data/closure-library/closure/goog/crypt/basen_test.html +167 -0
  52. data/closure-library/closure/goog/crypt/crypt.js +103 -0
  53. data/closure-library/closure/goog/crypt/crypt_test.html +68 -0
  54. data/closure-library/closure/goog/crypt/hash32.js +184 -0
  55. data/closure-library/closure/goog/crypt/hash32_test.html +287 -0
  56. data/closure-library/closure/goog/crypt/sha1.js +238 -0
  57. data/closure-library/closure/goog/crypt/sha1_test.html +47 -0
  58. data/closure-library/closure/goog/css/autocomplete.css +43 -0
  59. data/closure-library/closure/goog/css/bubble.css +84 -0
  60. data/closure-library/closure/goog/css/button.css +38 -0
  61. data/closure-library/closure/goog/css/charpicker.css +201 -0
  62. data/closure-library/closure/goog/css/checkbox.css +38 -0
  63. data/closure-library/closure/goog/css/colormenubutton.css +25 -0
  64. data/closure-library/closure/goog/css/colorpalette.css +54 -0
  65. data/closure-library/closure/goog/css/colorpicker-simplegrid.css +50 -0
  66. data/closure-library/closure/goog/css/combobox.css +57 -0
  67. data/closure-library/closure/goog/css/common.css +41 -0
  68. data/closure-library/closure/goog/css/css3button.css +77 -0
  69. data/closure-library/closure/goog/css/css3menubutton.css +23 -0
  70. data/closure-library/closure/goog/css/custombutton.css +164 -0
  71. data/closure-library/closure/goog/css/datepicker.css +148 -0
  72. data/closure-library/closure/goog/css/dialog.css +72 -0
  73. data/closure-library/closure/goog/css/dimensionpicker.css +47 -0
  74. data/closure-library/closure/goog/css/dragdropdetector.css +48 -0
  75. data/closure-library/closure/goog/css/editor/bubble.css +73 -0
  76. data/closure-library/closure/goog/css/editor/dialog.css +66 -0
  77. data/closure-library/closure/goog/css/editor/linkdialog.css +36 -0
  78. data/closure-library/closure/goog/css/editortoolbar.css +225 -0
  79. data/closure-library/closure/goog/css/filteredmenu.css +30 -0
  80. data/closure-library/closure/goog/css/filterobservingmenuitem.css +25 -0
  81. data/closure-library/closure/goog/css/flatbutton.css +65 -0
  82. data/closure-library/closure/goog/css/flatmenubutton.css +63 -0
  83. data/closure-library/closure/goog/css/hovercard.css +51 -0
  84. data/closure-library/closure/goog/css/hsvapalette.css +231 -0
  85. data/closure-library/closure/goog/css/hsvpalette.css +179 -0
  86. data/closure-library/closure/goog/css/imagelessbutton.css +160 -0
  87. data/closure-library/closure/goog/css/imagelessmenubutton.css +23 -0
  88. data/closure-library/closure/goog/css/inputdatepicker.css +12 -0
  89. data/closure-library/closure/goog/css/linkbutton.css +26 -0
  90. data/closure-library/closure/goog/css/menu.css +27 -0
  91. data/closure-library/closure/goog/css/menubutton.css +169 -0
  92. data/closure-library/closure/goog/css/menuitem.css +96 -0
  93. data/closure-library/closure/goog/css/menuseparator.css +19 -0
  94. data/closure-library/closure/goog/css/multitestrunner.css +121 -0
  95. data/closure-library/closure/goog/css/offline.css +147 -0
  96. data/closure-library/closure/goog/css/palette.css +36 -0
  97. data/closure-library/closure/goog/css/popupdatepicker.css +17 -0
  98. data/closure-library/closure/goog/css/roundedpanel.css +29 -0
  99. data/closure-library/closure/goog/css/roundedtab.css +158 -0
  100. data/closure-library/closure/goog/css/submenu.css +28 -0
  101. data/closure-library/closure/goog/css/tab.css +91 -0
  102. data/closure-library/closure/goog/css/tabbar.css +52 -0
  103. data/closure-library/closure/goog/css/tablesorter.css +14 -0
  104. data/closure-library/closure/goog/css/toolbar.css +400 -0
  105. data/closure-library/closure/goog/css/tooltip.css +14 -0
  106. data/closure-library/closure/goog/css/tree.css +147 -0
  107. data/closure-library/closure/goog/css/tristatemenuitem.css +43 -0
  108. data/closure-library/closure/goog/cssom/cssom.js +447 -0
  109. data/closure-library/closure/goog/cssom/cssom_test.html +343 -0
  110. data/closure-library/closure/goog/cssom/cssom_test_import_1.css +11 -0
  111. data/closure-library/closure/goog/cssom/cssom_test_import_2.css +10 -0
  112. data/closure-library/closure/goog/cssom/cssom_test_link_1.css +10 -0
  113. data/closure-library/closure/goog/cssom/iframe/style.js +1020 -0
  114. data/closure-library/closure/goog/cssom/iframe/style_test.html +391 -0
  115. data/closure-library/closure/goog/cssom/iframe/style_test_import.css +10 -0
  116. data/closure-library/closure/goog/datasource/datamanager.js +566 -0
  117. data/closure-library/closure/goog/datasource/datasource.js +646 -0
  118. data/closure-library/closure/goog/datasource/datasource_test.html +265 -0
  119. data/closure-library/closure/goog/datasource/expr.js +544 -0
  120. data/closure-library/closure/goog/datasource/expr_test.html +97 -0
  121. data/closure-library/closure/goog/datasource/fastdatanode.js +792 -0
  122. data/closure-library/closure/goog/datasource/fastdatanode_test.html +254 -0
  123. data/closure-library/closure/goog/datasource/jsdatasource.js +460 -0
  124. data/closure-library/closure/goog/datasource/jsondatasource.js +146 -0
  125. data/closure-library/closure/goog/datasource/jsxmlhttpdatasource.js +191 -0
  126. data/closure-library/closure/goog/datasource/jsxmlhttpdatasource_test.html +94 -0
  127. data/closure-library/closure/goog/datasource/xmldatasource.js +407 -0
  128. data/closure-library/closure/goog/date/date.js +1642 -0
  129. data/closure-library/closure/goog/date/date_test.html +1293 -0
  130. data/closure-library/closure/goog/date/datelike.js +27 -0
  131. data/closure-library/closure/goog/date/daterange.js +398 -0
  132. data/closure-library/closure/goog/date/daterange_test.html +213 -0
  133. data/closure-library/closure/goog/date/relative.js +425 -0
  134. data/closure-library/closure/goog/date/relative_test.html +124 -0
  135. data/closure-library/closure/goog/date/utcdatetime.js +178 -0
  136. data/closure-library/closure/goog/date/utcdatetime_test.html +119 -0
  137. data/closure-library/closure/goog/debug/console.js +138 -0
  138. data/closure-library/closure/goog/debug/debug.js +452 -0
  139. data/closure-library/closure/goog/debug/debug_test.html +32 -0
  140. data/closure-library/closure/goog/debug/debugwindow.js +582 -0
  141. data/closure-library/closure/goog/debug/devcss/devcss.js +435 -0
  142. data/closure-library/closure/goog/debug/devcss/devcss_test.html +365 -0
  143. data/closure-library/closure/goog/debug/devcss/devcssrunner.js +26 -0
  144. data/closure-library/closure/goog/debug/divconsole.js +141 -0
  145. data/closure-library/closure/goog/debug/enhanceerror_test.html +138 -0
  146. data/closure-library/closure/goog/debug/entrypointregistry.js +111 -0
  147. data/closure-library/closure/goog/debug/entrypointregistry_test.html +63 -0
  148. data/closure-library/closure/goog/debug/error.js +47 -0
  149. data/closure-library/closure/goog/debug/error_test.html +85 -0
  150. data/closure-library/closure/goog/debug/errorhandler.js +234 -0
  151. data/closure-library/closure/goog/debug/errorhandler_async_test.html +112 -0
  152. data/closure-library/closure/goog/debug/errorhandler_test.html +186 -0
  153. data/closure-library/closure/goog/debug/errorhandlerweakdep.js +38 -0
  154. data/closure-library/closure/goog/debug/errorreporter.js +324 -0
  155. data/closure-library/closure/goog/debug/errorreporter_test.html +289 -0
  156. data/closure-library/closure/goog/debug/fancywindow.js +265 -0
  157. data/closure-library/closure/goog/debug/formatter.js +314 -0
  158. data/closure-library/closure/goog/debug/gcdiagnostics.js +143 -0
  159. data/closure-library/closure/goog/debug/logbuffer.js +147 -0
  160. data/closure-library/closure/goog/debug/logbuffer_test.html +105 -0
  161. data/closure-library/closure/goog/debug/logger.js +809 -0
  162. data/closure-library/closure/goog/debug/logger_test.html +208 -0
  163. data/closure-library/closure/goog/debug/logrecord.js +271 -0
  164. data/closure-library/closure/goog/debug/reflect.js +159 -0
  165. data/closure-library/closure/goog/debug/reflect_test.html +81 -0
  166. data/closure-library/closure/goog/debug/relativetimeprovider.js +83 -0
  167. data/closure-library/closure/goog/debug/tracer.js +750 -0
  168. data/closure-library/closure/goog/debug/tracer_test.html +57 -0
  169. data/closure-library/closure/goog/demos/advancedtooltip.html +78 -0
  170. data/closure-library/closure/goog/demos/animationqueue.html +149 -0
  171. data/closure-library/closure/goog/demos/autocomplete-basic.html +56 -0
  172. data/closure-library/closure/goog/demos/autocompleteremote.html +40 -0
  173. data/closure-library/closure/goog/demos/autocompleteremotedata.js +18 -0
  174. data/closure-library/closure/goog/demos/autocompleterichremote.html +137 -0
  175. data/closure-library/closure/goog/demos/autocompleterichremotedata.js +33 -0
  176. data/closure-library/closure/goog/demos/bidiinput.html +72 -0
  177. data/closure-library/closure/goog/demos/bubble.html +250 -0
  178. data/closure-library/closure/goog/demos/button.html +395 -0
  179. data/closure-library/closure/goog/demos/charcounter.html +57 -0
  180. data/closure-library/closure/goog/demos/charpicker.html +64 -0
  181. data/closure-library/closure/goog/demos/checkbox.html +122 -0
  182. data/closure-library/closure/goog/demos/color-contrast.html +60 -0
  183. data/closure-library/closure/goog/demos/colormenubutton.html +213 -0
  184. data/closure-library/closure/goog/demos/colorpicker.html +43 -0
  185. data/closure-library/closure/goog/demos/combobox.html +125 -0
  186. data/closure-library/closure/goog/demos/container.html +670 -0
  187. data/closure-library/closure/goog/demos/control.html +477 -0
  188. data/closure-library/closure/goog/demos/css/demo.css +75 -0
  189. data/closure-library/closure/goog/demos/css/emojipicker.css +36 -0
  190. data/closure-library/closure/goog/demos/css/emojisprite.css +92 -0
  191. data/closure-library/closure/goog/demos/css3button.html +166 -0
  192. data/closure-library/closure/goog/demos/css3menubutton.html +285 -0
  193. data/closure-library/closure/goog/demos/cssspriteanimation.html +80 -0
  194. data/closure-library/closure/goog/demos/datepicker.html +183 -0
  195. data/closure-library/closure/goog/demos/debug.html +119 -0
  196. data/closure-library/closure/goog/demos/depsgraph.html +221 -0
  197. data/closure-library/closure/goog/demos/dialog.html +156 -0
  198. data/closure-library/closure/goog/demos/dimensionpicker.html +108 -0
  199. data/closure-library/closure/goog/demos/dimensionpicker_rtl.html +123 -0
  200. data/closure-library/closure/goog/demos/dom_selection.html +88 -0
  201. data/closure-library/closure/goog/demos/drag.html +191 -0
  202. data/closure-library/closure/goog/demos/dragdrop.html +263 -0
  203. data/closure-library/closure/goog/demos/dragdropdetector.html +46 -0
  204. data/closure-library/closure/goog/demos/dragdropdetector_target.html +17 -0
  205. data/closure-library/closure/goog/demos/dragger.html +83 -0
  206. data/closure-library/closure/goog/demos/draglistgroup.html +261 -0
  207. data/closure-library/closure/goog/demos/drilldownrow.html +78 -0
  208. data/closure-library/closure/goog/demos/editor/deps.js +20 -0
  209. data/closure-library/closure/goog/demos/editor/editor.html +139 -0
  210. data/closure-library/closure/goog/demos/editor/field_basic.html +74 -0
  211. data/closure-library/closure/goog/demos/editor/helloworld.html +91 -0
  212. data/closure-library/closure/goog/demos/editor/helloworld.js +81 -0
  213. data/closure-library/closure/goog/demos/editor/helloworld_test.html +75 -0
  214. data/closure-library/closure/goog/demos/editor/helloworlddialog.js +163 -0
  215. data/closure-library/closure/goog/demos/editor/helloworlddialog_test.html +100 -0
  216. data/closure-library/closure/goog/demos/editor/helloworlddialogplugin.js +110 -0
  217. data/closure-library/closure/goog/demos/editor/helloworlddialogplugin_test.html +198 -0
  218. data/closure-library/closure/goog/demos/editor/seamlessfield.html +106 -0
  219. data/closure-library/closure/goog/demos/effects.html +142 -0
  220. data/closure-library/closure/goog/demos/emoji/200.gif +0 -0
  221. data/closure-library/closure/goog/demos/emoji/201.gif +0 -0
  222. data/closure-library/closure/goog/demos/emoji/202.gif +0 -0
  223. data/closure-library/closure/goog/demos/emoji/203.gif +0 -0
  224. data/closure-library/closure/goog/demos/emoji/204.gif +0 -0
  225. data/closure-library/closure/goog/demos/emoji/205.gif +0 -0
  226. data/closure-library/closure/goog/demos/emoji/206.gif +0 -0
  227. data/closure-library/closure/goog/demos/emoji/2BC.gif +0 -0
  228. data/closure-library/closure/goog/demos/emoji/2BD.gif +0 -0
  229. data/closure-library/closure/goog/demos/emoji/2BE.gif +0 -0
  230. data/closure-library/closure/goog/demos/emoji/2BF.gif +0 -0
  231. data/closure-library/closure/goog/demos/emoji/2C0.gif +0 -0
  232. data/closure-library/closure/goog/demos/emoji/2C1.gif +0 -0
  233. data/closure-library/closure/goog/demos/emoji/2C2.gif +0 -0
  234. data/closure-library/closure/goog/demos/emoji/2C3.gif +0 -0
  235. data/closure-library/closure/goog/demos/emoji/2C4.gif +0 -0
  236. data/closure-library/closure/goog/demos/emoji/2C5.gif +0 -0
  237. data/closure-library/closure/goog/demos/emoji/2C6.gif +0 -0
  238. data/closure-library/closure/goog/demos/emoji/2C7.gif +0 -0
  239. data/closure-library/closure/goog/demos/emoji/2C8.gif +0 -0
  240. data/closure-library/closure/goog/demos/emoji/2C9.gif +0 -0
  241. data/closure-library/closure/goog/demos/emoji/2CA.gif +0 -0
  242. data/closure-library/closure/goog/demos/emoji/2CB.gif +0 -0
  243. data/closure-library/closure/goog/demos/emoji/2CC.gif +0 -0
  244. data/closure-library/closure/goog/demos/emoji/2CD.gif +0 -0
  245. data/closure-library/closure/goog/demos/emoji/2CE.gif +0 -0
  246. data/closure-library/closure/goog/demos/emoji/2CF.gif +0 -0
  247. data/closure-library/closure/goog/demos/emoji/2D0.gif +0 -0
  248. data/closure-library/closure/goog/demos/emoji/2D1.gif +0 -0
  249. data/closure-library/closure/goog/demos/emoji/2D2.gif +0 -0
  250. data/closure-library/closure/goog/demos/emoji/2D3.gif +0 -0
  251. data/closure-library/closure/goog/demos/emoji/2D4.gif +0 -0
  252. data/closure-library/closure/goog/demos/emoji/2D5.gif +0 -0
  253. data/closure-library/closure/goog/demos/emoji/2D6.gif +0 -0
  254. data/closure-library/closure/goog/demos/emoji/2D7.gif +0 -0
  255. data/closure-library/closure/goog/demos/emoji/2D8.gif +0 -0
  256. data/closure-library/closure/goog/demos/emoji/2D9.gif +0 -0
  257. data/closure-library/closure/goog/demos/emoji/2DA.gif +0 -0
  258. data/closure-library/closure/goog/demos/emoji/2DB.gif +0 -0
  259. data/closure-library/closure/goog/demos/emoji/2DC.gif +0 -0
  260. data/closure-library/closure/goog/demos/emoji/2DD.gif +0 -0
  261. data/closure-library/closure/goog/demos/emoji/2DE.gif +0 -0
  262. data/closure-library/closure/goog/demos/emoji/2DF.gif +0 -0
  263. data/closure-library/closure/goog/demos/emoji/2E0.gif +0 -0
  264. data/closure-library/closure/goog/demos/emoji/2E1.gif +0 -0
  265. data/closure-library/closure/goog/demos/emoji/2E2.gif +0 -0
  266. data/closure-library/closure/goog/demos/emoji/2E3.gif +0 -0
  267. data/closure-library/closure/goog/demos/emoji/2E4.gif +0 -0
  268. data/closure-library/closure/goog/demos/emoji/2E5.gif +0 -0
  269. data/closure-library/closure/goog/demos/emoji/2E6.gif +0 -0
  270. data/closure-library/closure/goog/demos/emoji/2E7.gif +0 -0
  271. data/closure-library/closure/goog/demos/emoji/2E8.gif +0 -0
  272. data/closure-library/closure/goog/demos/emoji/2E9.gif +0 -0
  273. data/closure-library/closure/goog/demos/emoji/2EA.gif +0 -0
  274. data/closure-library/closure/goog/demos/emoji/2EB.gif +0 -0
  275. data/closure-library/closure/goog/demos/emoji/2EC.gif +0 -0
  276. data/closure-library/closure/goog/demos/emoji/2ED.gif +0 -0
  277. data/closure-library/closure/goog/demos/emoji/2EE.gif +0 -0
  278. data/closure-library/closure/goog/demos/emoji/2EF.gif +0 -0
  279. data/closure-library/closure/goog/demos/emoji/2F0.gif +0 -0
  280. data/closure-library/closure/goog/demos/emoji/2F1.gif +0 -0
  281. data/closure-library/closure/goog/demos/emoji/2F2.gif +0 -0
  282. data/closure-library/closure/goog/demos/emoji/2F3.gif +0 -0
  283. data/closure-library/closure/goog/demos/emoji/2F4.gif +0 -0
  284. data/closure-library/closure/goog/demos/emoji/2F5.gif +0 -0
  285. data/closure-library/closure/goog/demos/emoji/2F6.gif +0 -0
  286. data/closure-library/closure/goog/demos/emoji/2F7.gif +0 -0
  287. data/closure-library/closure/goog/demos/emoji/2F8.gif +0 -0
  288. data/closure-library/closure/goog/demos/emoji/2F9.gif +0 -0
  289. data/closure-library/closure/goog/demos/emoji/2FA.gif +0 -0
  290. data/closure-library/closure/goog/demos/emoji/2FB.gif +0 -0
  291. data/closure-library/closure/goog/demos/emoji/2FC.gif +0 -0
  292. data/closure-library/closure/goog/demos/emoji/2FD.gif +0 -0
  293. data/closure-library/closure/goog/demos/emoji/2FE.gif +0 -0
  294. data/closure-library/closure/goog/demos/emoji/2FF.gif +0 -0
  295. data/closure-library/closure/goog/demos/emoji/none.gif +0 -0
  296. data/closure-library/closure/goog/demos/emoji/sprite.png +0 -0
  297. data/closure-library/closure/goog/demos/emoji/sprite2.png +0 -0
  298. data/closure-library/closure/goog/demos/emoji/unknown.gif +0 -0
  299. data/closure-library/closure/goog/demos/event-propagation.html +192 -0
  300. data/closure-library/closure/goog/demos/events.html +99 -0
  301. data/closure-library/closure/goog/demos/eventtarget.html +70 -0
  302. data/closure-library/closure/goog/demos/filedrophandler.html +63 -0
  303. data/closure-library/closure/goog/demos/filteredmenu.html +118 -0
  304. data/closure-library/closure/goog/demos/focushandler.html +58 -0
  305. data/closure-library/closure/goog/demos/gauge.html +158 -0
  306. data/closure-library/closure/goog/demos/graphics/advancedcoordinates.html +141 -0
  307. data/closure-library/closure/goog/demos/graphics/advancedcoordinates2.html +130 -0
  308. data/closure-library/closure/goog/demos/graphics/basicelements.html +264 -0
  309. data/closure-library/closure/goog/demos/graphics/events.html +113 -0
  310. data/closure-library/closure/goog/demos/graphics/modifyelements.html +195 -0
  311. data/closure-library/closure/goog/demos/graphics/subpixel.html +80 -0
  312. data/closure-library/closure/goog/demos/graphics/tiger.html +105 -0
  313. data/closure-library/closure/goog/demos/graphics/tigerdata.js +2840 -0
  314. data/closure-library/closure/goog/demos/history1.html +132 -0
  315. data/closure-library/closure/goog/demos/history2.html +100 -0
  316. data/closure-library/closure/goog/demos/history3.html +106 -0
  317. data/closure-library/closure/goog/demos/history3js.html +36 -0
  318. data/closure-library/closure/goog/demos/history_blank.html +25 -0
  319. data/closure-library/closure/goog/demos/hovercard.html +177 -0
  320. data/closure-library/closure/goog/demos/hsvapalette.html +55 -0
  321. data/closure-library/closure/goog/demos/hsvpalette.html +56 -0
  322. data/closure-library/closure/goog/demos/html5history.html +87 -0
  323. data/closure-library/closure/goog/demos/imagelessbutton.html +221 -0
  324. data/closure-library/closure/goog/demos/imagelessmenubutton.html +285 -0
  325. data/closure-library/closure/goog/demos/imagelessroundedcorner.html +231 -0
  326. data/closure-library/closure/goog/demos/index.html +19 -0
  327. data/closure-library/closure/goog/demos/index_nav.html +253 -0
  328. data/closure-library/closure/goog/demos/index_splash.html +22 -0
  329. data/closure-library/closure/goog/demos/inline_block_quirks.html +125 -0
  330. data/closure-library/closure/goog/demos/inline_block_standards.html +126 -0
  331. data/closure-library/closure/goog/demos/inputdatepicker.html +60 -0
  332. data/closure-library/closure/goog/demos/inputhandler.html +72 -0
  333. data/closure-library/closure/goog/demos/jsonprettyprinter.html +80 -0
  334. data/closure-library/closure/goog/demos/keyboardshortcuts.html +112 -0
  335. data/closure-library/closure/goog/demos/keyhandler.html +127 -0
  336. data/closure-library/closure/goog/demos/labelinput.html +42 -0
  337. data/closure-library/closure/goog/demos/menu.html +220 -0
  338. data/closure-library/closure/goog/demos/menubutton.html +318 -0
  339. data/closure-library/closure/goog/demos/mousewheelhandler.html +109 -0
  340. data/closure-library/closure/goog/demos/offline.html +268 -0
  341. data/closure-library/closure/goog/demos/onlinehandler.html +77 -0
  342. data/closure-library/closure/goog/demos/palette.html +302 -0
  343. data/closure-library/closure/goog/demos/pastehandler.html +54 -0
  344. data/closure-library/closure/goog/demos/plaintextspellchecker.html +106 -0
  345. data/closure-library/closure/goog/demos/popup.html +200 -0
  346. data/closure-library/closure/goog/demos/popupcolorpicker.html +49 -0
  347. data/closure-library/closure/goog/demos/popupdatepicker.html +53 -0
  348. data/closure-library/closure/goog/demos/popupemojipicker.html +407 -0
  349. data/closure-library/closure/goog/demos/popupmenu.html +89 -0
  350. data/closure-library/closure/goog/demos/progressbar.html +97 -0
  351. data/closure-library/closure/goog/demos/prompt.html +92 -0
  352. data/closure-library/closure/goog/demos/quadtree.html +107 -0
  353. data/closure-library/closure/goog/demos/ratings.html +120 -0
  354. data/closure-library/closure/goog/demos/richtextspellchecker.html +92 -0
  355. data/closure-library/closure/goog/demos/roundedpanel.html +139 -0
  356. data/closure-library/closure/goog/demos/samplecomponent.html +75 -0
  357. data/closure-library/closure/goog/demos/samplecomponent.js +206 -0
  358. data/closure-library/closure/goog/demos/scrollfloater.html +117 -0
  359. data/closure-library/closure/goog/demos/select.html +324 -0
  360. data/closure-library/closure/goog/demos/selectionmenubutton.html +186 -0
  361. data/closure-library/closure/goog/demos/serverchart.html +122 -0
  362. data/closure-library/closure/goog/demos/silverlightclipboardbutton.html +71 -0
  363. data/closure-library/closure/goog/demos/slider.html +110 -0
  364. data/closure-library/closure/goog/demos/splitbehavior.html +164 -0
  365. data/closure-library/closure/goog/demos/splitpane.html +243 -0
  366. data/closure-library/closure/goog/demos/stopevent.html +171 -0
  367. data/closure-library/closure/goog/demos/submenus.html +130 -0
  368. data/closure-library/closure/goog/demos/submenus2.html +150 -0
  369. data/closure-library/closure/goog/demos/tabbar.html +289 -0
  370. data/closure-library/closure/goog/demos/tablesorter.html +116 -0
  371. data/closure-library/closure/goog/demos/tabpane.html +302 -0
  372. data/closure-library/closure/goog/demos/textarea.html +128 -0
  373. data/closure-library/closure/goog/demos/timers.html +291 -0
  374. data/closure-library/closure/goog/demos/toolbar.html +703 -0
  375. data/closure-library/closure/goog/demos/tooltip.html +91 -0
  376. data/closure-library/closure/goog/demos/tracer.html +92 -0
  377. data/closure-library/closure/goog/demos/tree/demo.html +126 -0
  378. data/closure-library/closure/goog/demos/tree/testdata.js +260 -0
  379. data/closure-library/closure/goog/demos/tweakui.html +121 -0
  380. data/closure-library/closure/goog/demos/twothumbslider.html +121 -0
  381. data/closure-library/closure/goog/demos/useragent.html +173 -0
  382. data/closure-library/closure/goog/demos/viewportsizemonitor.html +71 -0
  383. data/closure-library/closure/goog/demos/xpc/blank.html +7 -0
  384. data/closure-library/closure/goog/demos/xpc/index.html +89 -0
  385. data/closure-library/closure/goog/demos/xpc/inner.html +58 -0
  386. data/closure-library/closure/goog/demos/xpc/minimal/blank.html +7 -0
  387. data/closure-library/closure/goog/demos/xpc/minimal/index.html +105 -0
  388. data/closure-library/closure/goog/demos/xpc/minimal/inner.html +75 -0
  389. data/closure-library/closure/goog/demos/xpc/minimal/relay.html +7 -0
  390. data/closure-library/closure/goog/demos/xpc/relay.html +7 -0
  391. data/closure-library/closure/goog/demos/xpc/xpcdemo.js +304 -0
  392. data/closure-library/closure/goog/demos/zippy.html +127 -0
  393. data/closure-library/closure/goog/deps.js +672 -0
  394. data/closure-library/closure/goog/disposable/disposable.js +167 -0
  395. data/closure-library/closure/goog/disposable/disposable_test.html +202 -0
  396. data/closure-library/closure/goog/dom/a11y.js +438 -0
  397. data/closure-library/closure/goog/dom/a11y_test.html +86 -0
  398. data/closure-library/closure/goog/dom/abstractmultirange.js +77 -0
  399. data/closure-library/closure/goog/dom/abstractrange.js +514 -0
  400. data/closure-library/closure/goog/dom/abstractrange_test.html +73 -0
  401. data/closure-library/closure/goog/dom/annotate.js +352 -0
  402. data/closure-library/closure/goog/dom/annotate_test.html +187 -0
  403. data/closure-library/closure/goog/dom/browserfeature.js +50 -0
  404. data/closure-library/closure/goog/dom/browserrange/abstractrange.js +316 -0
  405. data/closure-library/closure/goog/dom/browserrange/browserrange.js +149 -0
  406. data/closure-library/closure/goog/dom/browserrange/browserrange_test.html +562 -0
  407. data/closure-library/closure/goog/dom/browserrange/geckorange.js +82 -0
  408. data/closure-library/closure/goog/dom/browserrange/ierange.js +970 -0
  409. data/closure-library/closure/goog/dom/browserrange/operarange.js +83 -0
  410. data/closure-library/closure/goog/dom/browserrange/w3crange.js +364 -0
  411. data/closure-library/closure/goog/dom/browserrange/webkitrange.js +112 -0
  412. data/closure-library/closure/goog/dom/classes.js +233 -0
  413. data/closure-library/closure/goog/dom/classes_test.html +228 -0
  414. data/closure-library/closure/goog/dom/controlrange.js +511 -0
  415. data/closure-library/closure/goog/dom/controlrange_test.html +246 -0
  416. data/closure-library/closure/goog/dom/dataset.js +90 -0
  417. data/closure-library/closure/goog/dom/dataset_test.html +104 -0
  418. data/closure-library/closure/goog/dom/dom.js +2424 -0
  419. data/closure-library/closure/goog/dom/dom_quirks_test.html +104 -0
  420. data/closure-library/closure/goog/dom/dom_test.html +103 -0
  421. data/closure-library/closure/goog/dom/dom_test.js +1129 -0
  422. data/closure-library/closure/goog/dom/fontsizemonitor.js +159 -0
  423. data/closure-library/closure/goog/dom/fontsizemonitor_test.html +283 -0
  424. data/closure-library/closure/goog/dom/forms.js +403 -0
  425. data/closure-library/closure/goog/dom/forms_test.html +483 -0
  426. data/closure-library/closure/goog/dom/iframe.js +128 -0
  427. data/closure-library/closure/goog/dom/iframe_test.html +87 -0
  428. data/closure-library/closure/goog/dom/iter.js +127 -0
  429. data/closure-library/closure/goog/dom/iter_test.html +97 -0
  430. data/closure-library/closure/goog/dom/multirange.js +519 -0
  431. data/closure-library/closure/goog/dom/multirange_test.html +67 -0
  432. data/closure-library/closure/goog/dom/nodeiterator.js +85 -0
  433. data/closure-library/closure/goog/dom/nodeiterator_test.html +49 -0
  434. data/closure-library/closure/goog/dom/nodeoffset.js +111 -0
  435. data/closure-library/closure/goog/dom/nodeoffset_test.html +88 -0
  436. data/closure-library/closure/goog/dom/pattern/abstractpattern.js +60 -0
  437. data/closure-library/closure/goog/dom/pattern/allchildren.js +73 -0
  438. data/closure-library/closure/goog/dom/pattern/callback/callback.js +82 -0
  439. data/closure-library/closure/goog/dom/pattern/callback/counter.js +72 -0
  440. data/closure-library/closure/goog/dom/pattern/callback/test.js +77 -0
  441. data/closure-library/closure/goog/dom/pattern/childmatches.js +152 -0
  442. data/closure-library/closure/goog/dom/pattern/endtag.js +53 -0
  443. data/closure-library/closure/goog/dom/pattern/fulltag.js +92 -0
  444. data/closure-library/closure/goog/dom/pattern/matcher.js +150 -0
  445. data/closure-library/closure/goog/dom/pattern/matcher_test.html +204 -0
  446. data/closure-library/closure/goog/dom/pattern/nodetype.js +57 -0
  447. data/closure-library/closure/goog/dom/pattern/pattern.js +93 -0
  448. data/closure-library/closure/goog/dom/pattern/pattern_test.html +614 -0
  449. data/closure-library/closure/goog/dom/pattern/repeat.js +188 -0
  450. data/closure-library/closure/goog/dom/pattern/sequence.js +139 -0
  451. data/closure-library/closure/goog/dom/pattern/starttag.js +53 -0
  452. data/closure-library/closure/goog/dom/pattern/tag.js +149 -0
  453. data/closure-library/closure/goog/dom/pattern/text.js +69 -0
  454. data/closure-library/closure/goog/dom/range.js +220 -0
  455. data/closure-library/closure/goog/dom/range_test.html +702 -0
  456. data/closure-library/closure/goog/dom/rangeendpoint.js +32 -0
  457. data/closure-library/closure/goog/dom/savedcaretrange.js +203 -0
  458. data/closure-library/closure/goog/dom/savedcaretrange_test.html +235 -0
  459. data/closure-library/closure/goog/dom/savedrange.js +74 -0
  460. data/closure-library/closure/goog/dom/savedrange_test.html +61 -0
  461. data/closure-library/closure/goog/dom/selection.js +470 -0
  462. data/closure-library/closure/goog/dom/selection_test.html +329 -0
  463. data/closure-library/closure/goog/dom/tagiterator.js +365 -0
  464. data/closure-library/closure/goog/dom/tagiterator_test.html +589 -0
  465. data/closure-library/closure/goog/dom/tagname.js +121 -0
  466. data/closure-library/closure/goog/dom/tagname_test.html +37 -0
  467. data/closure-library/closure/goog/dom/textrange.js +611 -0
  468. data/closure-library/closure/goog/dom/textrange_test.html +127 -0
  469. data/closure-library/closure/goog/dom/textrangeiterator.js +246 -0
  470. data/closure-library/closure/goog/dom/textrangeiterator_test.html +142 -0
  471. data/closure-library/closure/goog/dom/viewportsizemonitor.js +220 -0
  472. data/closure-library/closure/goog/dom/viewportsizemonitor_test.html +166 -0
  473. data/closure-library/closure/goog/dom/xml.js +187 -0
  474. data/closure-library/closure/goog/dom/xml_test.html +77 -0
  475. data/closure-library/closure/goog/editor/browserfeature.js +251 -0
  476. data/closure-library/closure/goog/editor/browserfeature_test.html +124 -0
  477. data/closure-library/closure/goog/editor/clicktoeditwrapper.js +438 -0
  478. data/closure-library/closure/goog/editor/clicktoeditwrapper_test.html +137 -0
  479. data/closure-library/closure/goog/editor/command.js +74 -0
  480. data/closure-library/closure/goog/editor/defines.js +34 -0
  481. data/closure-library/closure/goog/editor/field.js +2594 -0
  482. data/closure-library/closure/goog/editor/field_test.html +1000 -0
  483. data/closure-library/closure/goog/editor/focus.js +32 -0
  484. data/closure-library/closure/goog/editor/focus_test.html +66 -0
  485. data/closure-library/closure/goog/editor/icontent.js +296 -0
  486. data/closure-library/closure/goog/editor/icontent_test.html +209 -0
  487. data/closure-library/closure/goog/editor/link.js +279 -0
  488. data/closure-library/closure/goog/editor/link_test.html +234 -0
  489. data/closure-library/closure/goog/editor/node.js +435 -0
  490. data/closure-library/closure/goog/editor/node_test.html +590 -0
  491. data/closure-library/closure/goog/editor/plugin.js +444 -0
  492. data/closure-library/closure/goog/editor/plugin_test.html +187 -0
  493. data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin.js +535 -0
  494. data/closure-library/closure/goog/editor/plugins/abstractbubbleplugin_test.html +227 -0
  495. data/closure-library/closure/goog/editor/plugins/abstractdialogplugin.js +336 -0
  496. data/closure-library/closure/goog/editor/plugins/abstractdialogplugin_test.html +399 -0
  497. data/closure-library/closure/goog/editor/plugins/abstracttabhandler.js +78 -0
  498. data/closure-library/closure/goog/editor/plugins/abstracttabhandler_test.html +91 -0
  499. data/closure-library/closure/goog/editor/plugins/basictextformatter.js +1740 -0
  500. data/closure-library/closure/goog/editor/plugins/basictextformatter_test.html +1171 -0
  501. data/closure-library/closure/goog/editor/plugins/blockquote.js +422 -0
  502. data/closure-library/closure/goog/editor/plugins/blockquote_test.html +149 -0
  503. data/closure-library/closure/goog/editor/plugins/emoticons.js +83 -0
  504. data/closure-library/closure/goog/editor/plugins/emoticons_test.html +67 -0
  505. data/closure-library/closure/goog/editor/plugins/enterhandler.js +730 -0
  506. data/closure-library/closure/goog/editor/plugins/enterhandler_test.html +739 -0
  507. data/closure-library/closure/goog/editor/plugins/headerformatter.js +95 -0
  508. data/closure-library/closure/goog/editor/plugins/headerformatter_test.html +100 -0
  509. data/closure-library/closure/goog/editor/plugins/linkbubble.js +458 -0
  510. data/closure-library/closure/goog/editor/plugins/linkbubble_test.html +309 -0
  511. data/closure-library/closure/goog/editor/plugins/linkdialogplugin.js +222 -0
  512. data/closure-library/closure/goog/editor/plugins/linkdialogplugin_test.html +370 -0
  513. data/closure-library/closure/goog/editor/plugins/listtabhandler.js +66 -0
  514. data/closure-library/closure/goog/editor/plugins/listtabhandler_test.html +177 -0
  515. data/closure-library/closure/goog/editor/plugins/loremipsum.js +186 -0
  516. data/closure-library/closure/goog/editor/plugins/loremipsum_test.html +169 -0
  517. data/closure-library/closure/goog/editor/plugins/removeformatting.js +772 -0
  518. data/closure-library/closure/goog/editor/plugins/removeformatting_test.html +920 -0
  519. data/closure-library/closure/goog/editor/plugins/spacestabhandler.js +93 -0
  520. data/closure-library/closure/goog/editor/plugins/spacestabhandler_test.html +186 -0
  521. data/closure-library/closure/goog/editor/plugins/tableeditor.js +496 -0
  522. data/closure-library/closure/goog/editor/plugins/tableeditor_test.html +299 -0
  523. data/closure-library/closure/goog/editor/plugins/tagonenterhandler.js +741 -0
  524. data/closure-library/closure/goog/editor/plugins/tagonenterhandler_test.html +481 -0
  525. data/closure-library/closure/goog/editor/plugins/undoredo.js +1014 -0
  526. data/closure-library/closure/goog/editor/plugins/undoredo_test.html +525 -0
  527. data/closure-library/closure/goog/editor/plugins/undoredomanager.js +337 -0
  528. data/closure-library/closure/goog/editor/plugins/undoredomanager_test.html +394 -0
  529. data/closure-library/closure/goog/editor/plugins/undoredostate.js +84 -0
  530. data/closure-library/closure/goog/editor/plugins/undoredostate_test.html +44 -0
  531. data/closure-library/closure/goog/editor/range.js +602 -0
  532. data/closure-library/closure/goog/editor/range_test.html +880 -0
  533. data/closure-library/closure/goog/editor/seamlessfield.js +720 -0
  534. data/closure-library/closure/goog/editor/seamlessfield_quirks_test.html +30 -0
  535. data/closure-library/closure/goog/editor/seamlessfield_test.html +33 -0
  536. data/closure-library/closure/goog/editor/seamlessfield_test.js +392 -0
  537. data/closure-library/closure/goog/editor/style.js +222 -0
  538. data/closure-library/closure/goog/editor/style_test.html +177 -0
  539. data/closure-library/closure/goog/editor/table.js +566 -0
  540. data/closure-library/closure/goog/editor/table_test.html +522 -0
  541. data/closure-library/closure/goog/events/actioneventwrapper.js +131 -0
  542. data/closure-library/closure/goog/events/actioneventwrapper_test.html +176 -0
  543. data/closure-library/closure/goog/events/actionhandler.js +189 -0
  544. data/closure-library/closure/goog/events/actionhandler_test.html +82 -0
  545. data/closure-library/closure/goog/events/browserevent.js +412 -0
  546. data/closure-library/closure/goog/events/browserevent_test.html +145 -0
  547. data/closure-library/closure/goog/events/browserfeature.js +43 -0
  548. data/closure-library/closure/goog/events/event.js +123 -0
  549. data/closure-library/closure/goog/events/event_test.html +70 -0
  550. data/closure-library/closure/goog/events/eventhandler.js +348 -0
  551. data/closure-library/closure/goog/events/eventhandler_test.html +230 -0
  552. data/closure-library/closure/goog/events/events.js +1101 -0
  553. data/closure-library/closure/goog/events/events_test.html +362 -0
  554. data/closure-library/closure/goog/events/eventtarget.js +197 -0
  555. data/closure-library/closure/goog/events/eventtarget_test.html +423 -0
  556. data/closure-library/closure/goog/events/eventtype.js +107 -0
  557. data/closure-library/closure/goog/events/eventwrapper.js +67 -0
  558. data/closure-library/closure/goog/events/filedrophandler.js +224 -0
  559. data/closure-library/closure/goog/events/filedrophandler_test.html +258 -0
  560. data/closure-library/closure/goog/events/focushandler.js +111 -0
  561. data/closure-library/closure/goog/events/imehandler.js +365 -0
  562. data/closure-library/closure/goog/events/imehandler_test.html +271 -0
  563. data/closure-library/closure/goog/events/inputhandler.js +218 -0
  564. data/closure-library/closure/goog/events/keycodes.js +314 -0
  565. data/closure-library/closure/goog/events/keycodes_test.html +72 -0
  566. data/closure-library/closure/goog/events/keyhandler.js +522 -0
  567. data/closure-library/closure/goog/events/keyhandler_test.html +621 -0
  568. data/closure-library/closure/goog/events/keynames.js +124 -0
  569. data/closure-library/closure/goog/events/listener.js +160 -0
  570. data/closure-library/closure/goog/events/mousewheelhandler.js +280 -0
  571. data/closure-library/closure/goog/events/mousewheelhandler_test.html +331 -0
  572. data/closure-library/closure/goog/events/onlinehandler.js +176 -0
  573. data/closure-library/closure/goog/events/onlinelistener_test.html +214 -0
  574. data/closure-library/closure/goog/events/pastehandler.js +444 -0
  575. data/closure-library/closure/goog/events/pastehandler_test.html +354 -0
  576. data/closure-library/closure/goog/events/pools.js +342 -0
  577. data/closure-library/closure/goog/format/emailaddress.js +329 -0
  578. data/closure-library/closure/goog/format/emailaddress_test.html +179 -0
  579. data/closure-library/closure/goog/format/format.js +451 -0
  580. data/closure-library/closure/goog/format/format_test.html +257 -0
  581. data/closure-library/closure/goog/format/htmlprettyprinter.js +406 -0
  582. data/closure-library/closure/goog/format/htmlprettyprinter_test.html +205 -0
  583. data/closure-library/closure/goog/format/jsonprettyprinter.js +405 -0
  584. data/closure-library/closure/goog/format/jsonprettyprinter_test.html +111 -0
  585. data/closure-library/closure/goog/fs/entry.js +406 -0
  586. data/closure-library/closure/goog/fs/error.js +103 -0
  587. data/closure-library/closure/goog/fs/filesaver.js +214 -0
  588. data/closure-library/closure/goog/fs/filesystem.js +59 -0
  589. data/closure-library/closure/goog/fs/filewriter.js +106 -0
  590. data/closure-library/closure/goog/fs/fs.js +183 -0
  591. data/closure-library/closure/goog/fs/fs_test.html +270 -0
  592. data/closure-library/closure/goog/functions/functions.js +219 -0
  593. data/closure-library/closure/goog/functions/functions_test.html +198 -0
  594. data/closure-library/closure/goog/fx/abstractdragdrop.js +1451 -0
  595. data/closure-library/closure/goog/fx/abstractdragdrop_test.html +430 -0
  596. data/closure-library/closure/goog/fx/animation.js +621 -0
  597. data/closure-library/closure/goog/fx/animationqueue.js +348 -0
  598. data/closure-library/closure/goog/fx/cssspriteanimation.js +112 -0
  599. data/closure-library/closure/goog/fx/cssspriteanimation_test.html +125 -0
  600. data/closure-library/closure/goog/fx/dom.js +610 -0
  601. data/closure-library/closure/goog/fx/dragdrop.js +49 -0
  602. data/closure-library/closure/goog/fx/dragdropgroup.js +107 -0
  603. data/closure-library/closure/goog/fx/dragdropgroup_test.html +234 -0
  604. data/closure-library/closure/goog/fx/dragger.js +731 -0
  605. data/closure-library/closure/goog/fx/dragger_test.html +415 -0
  606. data/closure-library/closure/goog/fx/draglistgroup.js +1159 -0
  607. data/closure-library/closure/goog/fx/draglistgroup_test.html +231 -0
  608. data/closure-library/closure/goog/fx/dragscrollsupport.js +274 -0
  609. data/closure-library/closure/goog/fx/dragscrollsupport_test.html +253 -0
  610. data/closure-library/closure/goog/fx/easing.js +50 -0
  611. data/closure-library/closure/goog/fx/fx.js +30 -0
  612. data/closure-library/closure/goog/fx/fx_test.html +157 -0
  613. data/closure-library/closure/goog/gears/basestore.js +523 -0
  614. data/closure-library/closure/goog/gears/basestore_test.html +247 -0
  615. data/closure-library/closure/goog/gears/database.js +935 -0
  616. data/closure-library/closure/goog/gears/database_test.html +699 -0
  617. data/closure-library/closure/goog/gears/fakeworkerpool.js +252 -0
  618. data/closure-library/closure/goog/gears/fakeworkerpool_test.html +188 -0
  619. data/closure-library/closure/goog/gears/gears.js +228 -0
  620. data/closure-library/closure/goog/gears/gears_test.html +78 -0
  621. data/closure-library/closure/goog/gears/httprequest.js +77 -0
  622. data/closure-library/closure/goog/gears/loggerclient.js +131 -0
  623. data/closure-library/closure/goog/gears/loggerclient_test.html +171 -0
  624. data/closure-library/closure/goog/gears/loggerserver.js +158 -0
  625. data/closure-library/closure/goog/gears/loggerserver_test.html +118 -0
  626. data/closure-library/closure/goog/gears/logstore.js +479 -0
  627. data/closure-library/closure/goog/gears/logstore_test.html +600 -0
  628. data/closure-library/closure/goog/gears/managedresourcestore.js +553 -0
  629. data/closure-library/closure/goog/gears/managedresourcestore_test.html +453 -0
  630. data/closure-library/closure/goog/gears/multipartformdata.js +203 -0
  631. data/closure-library/closure/goog/gears/multipartformdata_test.html +220 -0
  632. data/closure-library/closure/goog/gears/statustype.js +37 -0
  633. data/closure-library/closure/goog/gears/urlcapture.js +370 -0
  634. data/closure-library/closure/goog/gears/urlcapture_test.html +392 -0
  635. data/closure-library/closure/goog/gears/worker.js +201 -0
  636. data/closure-library/closure/goog/gears/workerchannel.js +205 -0
  637. data/closure-library/closure/goog/gears/workerchannel_test.html +207 -0
  638. data/closure-library/closure/goog/gears/workerpool.js +241 -0
  639. data/closure-library/closure/goog/gears/workerpool_test.html +203 -0
  640. data/closure-library/closure/goog/graphics/abstractgraphics.js +439 -0
  641. data/closure-library/closure/goog/graphics/affinetransform.js +497 -0
  642. data/closure-library/closure/goog/graphics/affinetransform_test.html +316 -0
  643. data/closure-library/closure/goog/graphics/canvaselement.js +776 -0
  644. data/closure-library/closure/goog/graphics/canvasgraphics.js +632 -0
  645. data/closure-library/closure/goog/graphics/element.js +145 -0
  646. data/closure-library/closure/goog/graphics/ellipseelement.js +59 -0
  647. data/closure-library/closure/goog/graphics/ext/coordinates.js +158 -0
  648. data/closure-library/closure/goog/graphics/ext/coordinates_test.html +74 -0
  649. data/closure-library/closure/goog/graphics/ext/element.js +970 -0
  650. data/closure-library/closure/goog/graphics/ext/element_test.html +144 -0
  651. data/closure-library/closure/goog/graphics/ext/ellipse.js +58 -0
  652. data/closure-library/closure/goog/graphics/ext/ext.js +29 -0
  653. data/closure-library/closure/goog/graphics/ext/graphics.js +209 -0
  654. data/closure-library/closure/goog/graphics/ext/group.js +213 -0
  655. data/closure-library/closure/goog/graphics/ext/image.js +62 -0
  656. data/closure-library/closure/goog/graphics/ext/path.js +140 -0
  657. data/closure-library/closure/goog/graphics/ext/path_test.html +46 -0
  658. data/closure-library/closure/goog/graphics/ext/rectangle.js +53 -0
  659. data/closure-library/closure/goog/graphics/ext/shape.js +144 -0
  660. data/closure-library/closure/goog/graphics/ext/strokeandfillelement.js +69 -0
  661. data/closure-library/closure/goog/graphics/fill.js +29 -0
  662. data/closure-library/closure/goog/graphics/font.js +59 -0
  663. data/closure-library/closure/goog/graphics/graphics.js +124 -0
  664. data/closure-library/closure/goog/graphics/groupelement.js +54 -0
  665. data/closure-library/closure/goog/graphics/imageelement.js +67 -0
  666. data/closure-library/closure/goog/graphics/lineargradient.js +131 -0
  667. data/closure-library/closure/goog/graphics/path.js +508 -0
  668. data/closure-library/closure/goog/graphics/path_test.html +359 -0
  669. data/closure-library/closure/goog/graphics/pathelement.js +50 -0
  670. data/closure-library/closure/goog/graphics/paths.js +86 -0
  671. data/closure-library/closure/goog/graphics/paths_test.html +97 -0
  672. data/closure-library/closure/goog/graphics/rectelement.js +59 -0
  673. data/closure-library/closure/goog/graphics/solidfill.js +70 -0
  674. data/closure-library/closure/goog/graphics/stroke.js +63 -0
  675. data/closure-library/closure/goog/graphics/strokeandfillelement.js +110 -0
  676. data/closure-library/closure/goog/graphics/svgelement.js +262 -0
  677. data/closure-library/closure/goog/graphics/svggraphics.js +813 -0
  678. data/closure-library/closure/goog/graphics/textelement.js +51 -0
  679. data/closure-library/closure/goog/graphics/vmlelement.js +380 -0
  680. data/closure-library/closure/goog/graphics/vmlgraphics.js +863 -0
  681. data/closure-library/closure/goog/history/event.js +54 -0
  682. data/closure-library/closure/goog/history/eventtype.js +30 -0
  683. data/closure-library/closure/goog/history/history.js +979 -0
  684. data/closure-library/closure/goog/history/html5history.js +303 -0
  685. data/closure-library/closure/goog/history/html5history_test.html +163 -0
  686. data/closure-library/closure/goog/i18n/bidi.js +772 -0
  687. data/closure-library/closure/goog/i18n/bidi_test.html +414 -0
  688. data/closure-library/closure/goog/i18n/bidiformatter.js +488 -0
  689. data/closure-library/closure/goog/i18n/bidiformatter_test.html +343 -0
  690. data/closure-library/closure/goog/i18n/charlistdecompressor.js +157 -0
  691. data/closure-library/closure/goog/i18n/charlistdecompressor_test.html +65 -0
  692. data/closure-library/closure/goog/i18n/charpickerdata.js +3185 -0
  693. data/closure-library/closure/goog/i18n/currency.js +385 -0
  694. data/closure-library/closure/goog/i18n/currency_test.html +202 -0
  695. data/closure-library/closure/goog/i18n/currencycodemap.js +210 -0
  696. data/closure-library/closure/goog/i18n/datetimeformat.js +636 -0
  697. data/closure-library/closure/goog/i18n/datetimeformat_test.html +436 -0
  698. data/closure-library/closure/goog/i18n/datetimeparse.js +1111 -0
  699. data/closure-library/closure/goog/i18n/datetimeparse_test.html +796 -0
  700. data/closure-library/closure/goog/i18n/datetimepatterns.js +1586 -0
  701. data/closure-library/closure/goog/i18n/datetimepatternsext.js +7386 -0
  702. data/closure-library/closure/goog/i18n/datetimesymbols.js +3350 -0
  703. data/closure-library/closure/goog/i18n/datetimesymbolsext.js +12938 -0
  704. data/closure-library/closure/goog/i18n/graphemebreak.js +181 -0
  705. data/closure-library/closure/goog/i18n/graphemebreak_test.html +72 -0
  706. data/closure-library/closure/goog/i18n/messageformat.js +553 -0
  707. data/closure-library/closure/goog/i18n/messageformat_test.html +323 -0
  708. data/closure-library/closure/goog/i18n/mime.js +100 -0
  709. data/closure-library/closure/goog/i18n/mime_test.html +51 -0
  710. data/closure-library/closure/goog/i18n/numberformat.js +763 -0
  711. data/closure-library/closure/goog/i18n/numberformat_test.html +605 -0
  712. data/closure-library/closure/goog/i18n/numberformatsymbols.js +10358 -0
  713. data/closure-library/closure/goog/i18n/pluralrules.js +695 -0
  714. data/closure-library/closure/goog/i18n/timezone.js +341 -0
  715. data/closure-library/closure/goog/i18n/timezone_test.html +163 -0
  716. data/closure-library/closure/goog/i18n/uchar.js +1160 -0
  717. data/closure-library/closure/goog/i18n/uchar_test.html +72 -0
  718. data/closure-library/closure/goog/images/blank.gif +0 -0
  719. data/closure-library/closure/goog/images/bubble_close.jpg +0 -0
  720. data/closure-library/closure/goog/images/bubble_left.gif +0 -0
  721. data/closure-library/closure/goog/images/bubble_right.gif +0 -0
  722. data/closure-library/closure/goog/images/button-bg.gif +0 -0
  723. data/closure-library/closure/goog/images/check-outline.gif +0 -0
  724. data/closure-library/closure/goog/images/check-sprite.gif +0 -0
  725. data/closure-library/closure/goog/images/check.gif +0 -0
  726. data/closure-library/closure/goog/images/close_box.gif +0 -0
  727. data/closure-library/closure/goog/images/color-swatch-tick.gif +0 -0
  728. data/closure-library/closure/goog/images/dialog_close_box.gif +0 -0
  729. data/closure-library/closure/goog/images/dimension-highlighted.png +0 -0
  730. data/closure-library/closure/goog/images/dimension-unhighlighted.png +0 -0
  731. data/closure-library/closure/goog/images/dropdn.gif +0 -0
  732. data/closure-library/closure/goog/images/dropdn_disabled.gif +0 -0
  733. data/closure-library/closure/goog/images/dropdown.gif +0 -0
  734. data/closure-library/closure/goog/images/gears_bluedot.gif +0 -0
  735. data/closure-library/closure/goog/images/gears_offline.gif +0 -0
  736. data/closure-library/closure/goog/images/gears_online.gif +0 -0
  737. data/closure-library/closure/goog/images/gears_paused.gif +0 -0
  738. data/closure-library/closure/goog/images/gears_syncing.gif +0 -0
  739. data/closure-library/closure/goog/images/hsv-sprite-sm.gif +0 -0
  740. data/closure-library/closure/goog/images/hsv-sprite-sm.png +0 -0
  741. data/closure-library/closure/goog/images/hsv-sprite.gif +0 -0
  742. data/closure-library/closure/goog/images/hsv-sprite.png +0 -0
  743. data/closure-library/closure/goog/images/hsva-sprite-sm.gif +0 -0
  744. data/closure-library/closure/goog/images/hsva-sprite-sm.png +0 -0
  745. data/closure-library/closure/goog/images/hsva-sprite.gif +0 -0
  746. data/closure-library/closure/goog/images/hsva-sprite.png +0 -0
  747. data/closure-library/closure/goog/images/left_anchor_bubble_bot.gif +0 -0
  748. data/closure-library/closure/goog/images/left_anchor_bubble_top.gif +0 -0
  749. data/closure-library/closure/goog/images/menu-arrows.gif +0 -0
  750. data/closure-library/closure/goog/images/minus.png +0 -0
  751. data/closure-library/closure/goog/images/no_anchor_bubble_bot.gif +0 -0
  752. data/closure-library/closure/goog/images/no_anchor_bubble_top.gif +0 -0
  753. data/closure-library/closure/goog/images/offlineicons.png +0 -0
  754. data/closure-library/closure/goog/images/plus.png +0 -0
  755. data/closure-library/closure/goog/images/ratingstars.gif +0 -0
  756. data/closure-library/closure/goog/images/right_anchor_bubble_bot.gif +0 -0
  757. data/closure-library/closure/goog/images/right_anchor_bubble_top.gif +0 -0
  758. data/closure-library/closure/goog/images/toolbar-bg.png +0 -0
  759. data/closure-library/closure/goog/images/toolbar-separator.gif +0 -0
  760. data/closure-library/closure/goog/images/toolbar_icons.gif +0 -0
  761. data/closure-library/closure/goog/images/tree/I.png +0 -0
  762. data/closure-library/closure/goog/images/tree/cleardot.gif +0 -0
  763. data/closure-library/closure/goog/images/tree/tree.gif +0 -0
  764. data/closure-library/closure/goog/images/tree/tree.png +0 -0
  765. data/closure-library/closure/goog/images/ui_controls.jpg +0 -0
  766. data/closure-library/closure/goog/iter/iter.js +627 -0
  767. data/closure-library/closure/goog/iter/iter_test.html +443 -0
  768. data/closure-library/closure/goog/json/json.js +302 -0
  769. data/closure-library/closure/goog/json/json_test.html +501 -0
  770. data/closure-library/closure/goog/locale/countries.js +288 -0
  771. data/closure-library/closure/goog/locale/countrylanguagenames_test.html +233 -0
  772. data/closure-library/closure/goog/locale/defaultlocalenameconstants.js +847 -0
  773. data/closure-library/closure/goog/locale/genericfontnames.js +73 -0
  774. data/closure-library/closure/goog/locale/genericfontnames_test.html +97 -0
  775. data/closure-library/closure/goog/locale/genericfontnamesdata.js +328 -0
  776. data/closure-library/closure/goog/locale/locale.js +397 -0
  777. data/closure-library/closure/goog/locale/nativenameconstants.js +1354 -0
  778. data/closure-library/closure/goog/locale/scriptToLanguages.js +482 -0
  779. data/closure-library/closure/goog/locale/timezonedetection.js +117 -0
  780. data/closure-library/closure/goog/locale/timezonedetection_test.html +130 -0
  781. data/closure-library/closure/goog/locale/timezonefingerprint.js +250 -0
  782. data/closure-library/closure/goog/locale/timezonelist.js +129 -0
  783. data/closure-library/closure/goog/locale/timezonelist_test.html +165 -0
  784. data/closure-library/closure/goog/math/bezier.js +244 -0
  785. data/closure-library/closure/goog/math/bezier_test.html +70 -0
  786. data/closure-library/closure/goog/math/box.js +236 -0
  787. data/closure-library/closure/goog/math/box_test.html +139 -0
  788. data/closure-library/closure/goog/math/coordinate.js +136 -0
  789. data/closure-library/closure/goog/math/coordinate3.js +168 -0
  790. data/closure-library/closure/goog/math/coordinate3_test.html +208 -0
  791. data/closure-library/closure/goog/math/coordinate_test.html +92 -0
  792. data/closure-library/closure/goog/math/integer.js +736 -0
  793. data/closure-library/closure/goog/math/integer_test.html +1653 -0
  794. data/closure-library/closure/goog/math/line.js +177 -0
  795. data/closure-library/closure/goog/math/line_test.html +62 -0
  796. data/closure-library/closure/goog/math/long.js +801 -0
  797. data/closure-library/closure/goog/math/long_test.html +1571 -0
  798. data/closure-library/closure/goog/math/math.js +355 -0
  799. data/closure-library/closure/goog/math/math_test.html +254 -0
  800. data/closure-library/closure/goog/math/matrix.js +669 -0
  801. data/closure-library/closure/goog/math/matrix_test.html +427 -0
  802. data/closure-library/closure/goog/math/range.js +146 -0
  803. data/closure-library/closure/goog/math/range_test.html +103 -0
  804. data/closure-library/closure/goog/math/rangeset.js +368 -0
  805. data/closure-library/closure/goog/math/rangeset_test.html +619 -0
  806. data/closure-library/closure/goog/math/rect.js +340 -0
  807. data/closure-library/closure/goog/math/rect_test.html +315 -0
  808. data/closure-library/closure/goog/math/size.js +201 -0
  809. data/closure-library/closure/goog/math/size_test.html +174 -0
  810. data/closure-library/closure/goog/math/vec2.js +255 -0
  811. data/closure-library/closure/goog/math/vec2_test.html +203 -0
  812. data/closure-library/closure/goog/math/vec3.js +327 -0
  813. data/closure-library/closure/goog/math/vec3_test.html +231 -0
  814. data/closure-library/closure/goog/memoize/memoize.js +98 -0
  815. data/closure-library/closure/goog/memoize/memoize_test.html +157 -0
  816. data/closure-library/closure/goog/messaging/abstractchannel.js +209 -0
  817. data/closure-library/closure/goog/messaging/abstractchannel_test.html +90 -0
  818. data/closure-library/closure/goog/messaging/bufferedchannel.js +277 -0
  819. data/closure-library/closure/goog/messaging/bufferedchannel_test.html +205 -0
  820. data/closure-library/closure/goog/messaging/deferredchannel.js +79 -0
  821. data/closure-library/closure/goog/messaging/deferredchannel_test.html +107 -0
  822. data/closure-library/closure/goog/messaging/loggerclient.js +131 -0
  823. data/closure-library/closure/goog/messaging/loggerclient_test.html +102 -0
  824. data/closure-library/closure/goog/messaging/loggerserver.js +94 -0
  825. data/closure-library/closure/goog/messaging/loggerserver_test.html +101 -0
  826. data/closure-library/closure/goog/messaging/messagechannel.js +115 -0
  827. data/closure-library/closure/goog/messaging/messaging.js +34 -0
  828. data/closure-library/closure/goog/messaging/messaging_test.html +42 -0
  829. data/closure-library/closure/goog/messaging/multichannel.js +303 -0
  830. data/closure-library/closure/goog/messaging/multichannel_test.html +122 -0
  831. data/closure-library/closure/goog/messaging/portchannel.js +341 -0
  832. data/closure-library/closure/goog/messaging/portchannel_test.html +359 -0
  833. data/closure-library/closure/goog/messaging/testdata/portchannel_worker.js +37 -0
  834. data/closure-library/closure/goog/module/abstractmoduleloader.js +46 -0
  835. data/closure-library/closure/goog/module/basemodule.js +45 -0
  836. data/closure-library/closure/goog/module/basemoduleloader.js +210 -0
  837. data/closure-library/closure/goog/module/loader.js +269 -0
  838. data/closure-library/closure/goog/module/module.js +166 -0
  839. data/closure-library/closure/goog/module/moduleinfo.js +336 -0
  840. data/closure-library/closure/goog/module/moduleinfo_test.html +109 -0
  841. data/closure-library/closure/goog/module/moduleloadcallback.js +84 -0
  842. data/closure-library/closure/goog/module/moduleloadcallback_test.html +57 -0
  843. data/closure-library/closure/goog/module/moduleloader.js +250 -0
  844. data/closure-library/closure/goog/module/moduleloader_test.html +244 -0
  845. data/closure-library/closure/goog/module/modulemanager.js +1008 -0
  846. data/closure-library/closure/goog/module/modulemanager_test.html +1240 -0
  847. data/closure-library/closure/goog/module/testdata/modA_1.js +22 -0
  848. data/closure-library/closure/goog/module/testdata/modA_2.js +24 -0
  849. data/closure-library/closure/goog/module/testdata/modB_1.js +24 -0
  850. data/closure-library/closure/goog/net/browserchannel.js +2441 -0
  851. data/closure-library/closure/goog/net/browserchannel_test.html +1176 -0
  852. data/closure-library/closure/goog/net/browsertestchannel.js +552 -0
  853. data/closure-library/closure/goog/net/bulkloader.js +174 -0
  854. data/closure-library/closure/goog/net/bulkloader_test.html +232 -0
  855. data/closure-library/closure/goog/net/bulkloaderhelper.js +129 -0
  856. data/closure-library/closure/goog/net/channeldebug.js +288 -0
  857. data/closure-library/closure/goog/net/channelrequest.js +1125 -0
  858. data/closure-library/closure/goog/net/channelrequest_test.html +158 -0
  859. data/closure-library/closure/goog/net/cookies.js +401 -0
  860. data/closure-library/closure/goog/net/cookies_test.html +255 -0
  861. data/closure-library/closure/goog/net/crossdomainrpc.js +848 -0
  862. data/closure-library/closure/goog/net/crossdomainrpc_test.gif +0 -0
  863. data/closure-library/closure/goog/net/crossdomainrpc_test.html +120 -0
  864. data/closure-library/closure/goog/net/crossdomainrpc_test_response.html +59 -0
  865. data/closure-library/closure/goog/net/errorcode.js +130 -0
  866. data/closure-library/closure/goog/net/eventtype.js +37 -0
  867. data/closure-library/closure/goog/net/iframe_xhr_test.html +142 -0
  868. data/closure-library/closure/goog/net/iframe_xhr_test_response.html +17 -0
  869. data/closure-library/closure/goog/net/iframeio.js +1342 -0
  870. data/closure-library/closure/goog/net/iframeio_different_base_test.data +2 -0
  871. data/closure-library/closure/goog/net/iframeio_different_base_test.html +42 -0
  872. data/closure-library/closure/goog/net/iframeio_test.html +368 -0
  873. data/closure-library/closure/goog/net/iframeloadmonitor.js +199 -0
  874. data/closure-library/closure/goog/net/iframeloadmonitor_test.html +113 -0
  875. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame.html +12 -0
  876. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame2.html +12 -0
  877. data/closure-library/closure/goog/net/iframeloadmonitor_test_frame3.html +12 -0
  878. data/closure-library/closure/goog/net/imageloader.js +237 -0
  879. data/closure-library/closure/goog/net/imageloader_test.html +200 -0
  880. data/closure-library/closure/goog/net/imageloader_testimg1.gif +0 -0
  881. data/closure-library/closure/goog/net/imageloader_testimg2.gif +0 -0
  882. data/closure-library/closure/goog/net/imageloader_testimg3.gif +0 -0
  883. data/closure-library/closure/goog/net/jsonp.js +379 -0
  884. data/closure-library/closure/goog/net/jsonp_test.html +328 -0
  885. data/closure-library/closure/goog/net/mockiframeio.js +318 -0
  886. data/closure-library/closure/goog/net/mockxhrlite.js +34 -0
  887. data/closure-library/closure/goog/net/mockxhrlite_test.html +109 -0
  888. data/closure-library/closure/goog/net/multiiframeloadmonitor.js +116 -0
  889. data/closure-library/closure/goog/net/multiiframeloadmonitor_test.html +172 -0
  890. data/closure-library/closure/goog/net/networktester.js +383 -0
  891. data/closure-library/closure/goog/net/networktester_test.html +227 -0
  892. data/closure-library/closure/goog/net/tmpnetwork.js +168 -0
  893. data/closure-library/closure/goog/net/wrapperxmlhttpfactory.js +68 -0
  894. data/closure-library/closure/goog/net/xhrio.js +1093 -0
  895. data/closure-library/closure/goog/net/xhrio_test.html +603 -0
  896. data/closure-library/closure/goog/net/xhriopool.js +87 -0
  897. data/closure-library/closure/goog/net/xhrlite.js +119 -0
  898. data/closure-library/closure/goog/net/xhrlite_test.html +156 -0
  899. data/closure-library/closure/goog/net/xhrlitepool.js +37 -0
  900. data/closure-library/closure/goog/net/xhrmanager.js +763 -0
  901. data/closure-library/closure/goog/net/xhrmonitor.js +254 -0
  902. data/closure-library/closure/goog/net/xhrmonitor_test.html +199 -0
  903. data/closure-library/closure/goog/net/xmlhttp.js +215 -0
  904. data/closure-library/closure/goog/net/xmlhttpfactory.js +64 -0
  905. data/closure-library/closure/goog/net/xpc/crosspagechannel.js +624 -0
  906. data/closure-library/closure/goog/net/xpc/crosspagechannel_test.html +422 -0
  907. data/closure-library/closure/goog/net/xpc/frameelementmethodtransport.js +251 -0
  908. data/closure-library/closure/goog/net/xpc/iframepollingtransport.js +822 -0
  909. data/closure-library/closure/goog/net/xpc/iframerelaytransport.js +288 -0
  910. data/closure-library/closure/goog/net/xpc/nativemessagingtransport.js +280 -0
  911. data/closure-library/closure/goog/net/xpc/nativemessagingtransport_test.html +164 -0
  912. data/closure-library/closure/goog/net/xpc/nixtransport.js +454 -0
  913. data/closure-library/closure/goog/net/xpc/relay.js +72 -0
  914. data/closure-library/closure/goog/net/xpc/testdata/inner_peer.html +106 -0
  915. data/closure-library/closure/goog/net/xpc/transport.js +104 -0
  916. data/closure-library/closure/goog/net/xpc/xpc.js +238 -0
  917. data/closure-library/closure/goog/object/object.js +553 -0
  918. data/closure-library/closure/goog/object/object_test.html +376 -0
  919. data/closure-library/closure/goog/positioning/absoluteposition.js +73 -0
  920. data/closure-library/closure/goog/positioning/abstractposition.js +47 -0
  921. data/closure-library/closure/goog/positioning/anchoredposition.js +78 -0
  922. data/closure-library/closure/goog/positioning/anchoredviewportposition.js +126 -0
  923. data/closure-library/closure/goog/positioning/anchoredviewportposition_test.html +117 -0
  924. data/closure-library/closure/goog/positioning/anchoredviewportposition_test_iframe.html +35 -0
  925. data/closure-library/closure/goog/positioning/clientposition.js +75 -0
  926. data/closure-library/closure/goog/positioning/menuanchoredposition.js +97 -0
  927. data/closure-library/closure/goog/positioning/positioning.js +476 -0
  928. data/closure-library/closure/goog/positioning/positioning_test.html +877 -0
  929. data/closure-library/closure/goog/positioning/positioning_test_iframe1.html +16 -0
  930. data/closure-library/closure/goog/positioning/positioning_test_iframe2.html +13 -0
  931. data/closure-library/closure/goog/positioning/positioning_test_quirk.html +9 -0
  932. data/closure-library/closure/goog/positioning/positioning_test_standard.html +13 -0
  933. data/closure-library/closure/goog/positioning/viewportclientposition.js +102 -0
  934. data/closure-library/closure/goog/positioning/viewportclientposition_test.html +172 -0
  935. data/closure-library/closure/goog/positioning/viewportposition.js +63 -0
  936. data/closure-library/closure/goog/proto/proto.js +43 -0
  937. data/closure-library/closure/goog/proto/serializer.js +68 -0
  938. data/closure-library/closure/goog/proto/serializer_test.html +43 -0
  939. data/closure-library/closure/goog/proto2/descriptor.js +198 -0
  940. data/closure-library/closure/goog/proto2/descriptor_test.html +60 -0
  941. data/closure-library/closure/goog/proto2/fielddescriptor.js +288 -0
  942. data/closure-library/closure/goog/proto2/fielddescriptor_test.html +124 -0
  943. data/closure-library/closure/goog/proto2/lazydeserializer.js +69 -0
  944. data/closure-library/closure/goog/proto2/message.js +726 -0
  945. data/closure-library/closure/goog/proto2/message_test.html +356 -0
  946. data/closure-library/closure/goog/proto2/objectserializer.js +159 -0
  947. data/closure-library/closure/goog/proto2/objectserializer_test.html +423 -0
  948. data/closure-library/closure/goog/proto2/package_test.pb.js +164 -0
  949. data/closure-library/closure/goog/proto2/pbliteserializer.js +150 -0
  950. data/closure-library/closure/goog/proto2/pbliteserializer_test.html +267 -0
  951. data/closure-library/closure/goog/proto2/proto_test.html +693 -0
  952. data/closure-library/closure/goog/proto2/serializer.js +148 -0
  953. data/closure-library/closure/goog/proto2/test.pb.js +2820 -0
  954. data/closure-library/closure/goog/proto2/util.js +54 -0
  955. data/closure-library/closure/goog/pubsub/pubsub.js +326 -0
  956. data/closure-library/closure/goog/pubsub/pubsub_test.html +635 -0
  957. data/closure-library/closure/goog/reflect/reflect.js +50 -0
  958. data/closure-library/closure/goog/spell/spellcheck.js +474 -0
  959. data/closure-library/closure/goog/spell/spellcheck_test.html +112 -0
  960. data/closure-library/closure/goog/string/path.js +100 -0
  961. data/closure-library/closure/goog/string/path_test.html +59 -0
  962. data/closure-library/closure/goog/string/string.js +1207 -0
  963. data/closure-library/closure/goog/string/string_test.html +877 -0
  964. data/closure-library/closure/goog/string/stringbuffer.js +167 -0
  965. data/closure-library/closure/goog/string/stringbuffer_test.html +101 -0
  966. data/closure-library/closure/goog/string/stringformat.js +247 -0
  967. data/closure-library/closure/goog/string/stringformat_test.html +211 -0
  968. data/closure-library/closure/goog/structs/avltree.js +769 -0
  969. data/closure-library/closure/goog/structs/avltree_test.html +241 -0
  970. data/closure-library/closure/goog/structs/circularbuffer.js +219 -0
  971. data/closure-library/closure/goog/structs/circularbuffer_test.html +105 -0
  972. data/closure-library/closure/goog/structs/heap.js +332 -0
  973. data/closure-library/closure/goog/structs/heap_test.html +220 -0
  974. data/closure-library/closure/goog/structs/inversionmap.js +159 -0
  975. data/closure-library/closure/goog/structs/inversionmap_test.html +157 -0
  976. data/closure-library/closure/goog/structs/linkedmap.js +472 -0
  977. data/closure-library/closure/goog/structs/linkedmap_test.html +300 -0
  978. data/closure-library/closure/goog/structs/map.js +446 -0
  979. data/closure-library/closure/goog/structs/map_test.html +430 -0
  980. data/closure-library/closure/goog/structs/node.js +74 -0
  981. data/closure-library/closure/goog/structs/pool.js +344 -0
  982. data/closure-library/closure/goog/structs/pool_test.html +265 -0
  983. data/closure-library/closure/goog/structs/prioritypool.js +147 -0
  984. data/closure-library/closure/goog/structs/prioritypool_test.html +478 -0
  985. data/closure-library/closure/goog/structs/priorityqueue.js +64 -0
  986. data/closure-library/closure/goog/structs/priorityqueue_test.html +179 -0
  987. data/closure-library/closure/goog/structs/quadtree.js +571 -0
  988. data/closure-library/closure/goog/structs/quadtree_test.html +179 -0
  989. data/closure-library/closure/goog/structs/queue.js +157 -0
  990. data/closure-library/closure/goog/structs/queue_test.html +140 -0
  991. data/closure-library/closure/goog/structs/set.js +251 -0
  992. data/closure-library/closure/goog/structs/set_test.html +551 -0
  993. data/closure-library/closure/goog/structs/simplepool.js +203 -0
  994. data/closure-library/closure/goog/structs/stringset.js +404 -0
  995. data/closure-library/closure/goog/structs/stringset_test.html +251 -0
  996. data/closure-library/closure/goog/structs/structs.js +341 -0
  997. data/closure-library/closure/goog/structs/structs_test.html +1050 -0
  998. data/closure-library/closure/goog/structs/treenode.js +312 -0
  999. data/closure-library/closure/goog/structs/treenode_test.html +285 -0
  1000. data/closure-library/closure/goog/structs/trie.js +368 -0
  1001. data/closure-library/closure/goog/structs/trie_test.html +378 -0
  1002. data/closure-library/closure/goog/style/cursor.js +125 -0
  1003. data/closure-library/closure/goog/style/cursor_test.html +131 -0
  1004. data/closure-library/closure/goog/style/style.js +1804 -0
  1005. data/closure-library/closure/goog/style/style_quirks_test.html +1928 -0
  1006. data/closure-library/closure/goog/style/style_test.html +2073 -0
  1007. data/closure-library/closure/goog/style/style_test_iframe_quirk.html +29 -0
  1008. data/closure-library/closure/goog/style/style_test_iframe_standard.html +30 -0
  1009. data/closure-library/closure/goog/style/style_test_quirk.html +9 -0
  1010. data/closure-library/closure/goog/style/style_test_standard.html +11 -0
  1011. data/closure-library/closure/goog/testing/asserts.js +970 -0
  1012. data/closure-library/closure/goog/testing/asserts_test.html +966 -0
  1013. data/closure-library/closure/goog/testing/async/mockcontrol.js +174 -0
  1014. data/closure-library/closure/goog/testing/async/mockcontrol_test.html +224 -0
  1015. data/closure-library/closure/goog/testing/asynctestcase.js +812 -0
  1016. data/closure-library/closure/goog/testing/asynctestcase_async_test.html +102 -0
  1017. data/closure-library/closure/goog/testing/asynctestcase_noasync_test.html +98 -0
  1018. data/closure-library/closure/goog/testing/benchmark.js +87 -0
  1019. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton.js +64 -0
  1020. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizebutton_test.html +58 -0
  1021. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar.js +66 -0
  1022. data/closure-library/closure/goog/testing/benchmarks/jsbinarysizetoolbar_test.html +49 -0
  1023. data/closure-library/closure/goog/testing/continuationtestcase.js +682 -0
  1024. data/closure-library/closure/goog/testing/continuationtestcase_test.html +349 -0
  1025. data/closure-library/closure/goog/testing/deferredtestcase.js +157 -0
  1026. data/closure-library/closure/goog/testing/deferredtestcase_test.html +152 -0
  1027. data/closure-library/closure/goog/testing/dom.js +596 -0
  1028. data/closure-library/closure/goog/testing/dom_test.html +438 -0
  1029. data/closure-library/closure/goog/testing/editor/dom.js +293 -0
  1030. data/closure-library/closure/goog/testing/editor/dom_test.html +295 -0
  1031. data/closure-library/closure/goog/testing/editor/fieldmock.js +90 -0
  1032. data/closure-library/closure/goog/testing/editor/testhelper.js +168 -0
  1033. data/closure-library/closure/goog/testing/editor/testhelper_test.html +176 -0
  1034. data/closure-library/closure/goog/testing/events/eventobserver.js +85 -0
  1035. data/closure-library/closure/goog/testing/events/eventobserver_test.html +70 -0
  1036. data/closure-library/closure/goog/testing/events/events.js +540 -0
  1037. data/closure-library/closure/goog/testing/events/events_test.html +434 -0
  1038. data/closure-library/closure/goog/testing/events/matchers.js +41 -0
  1039. data/closure-library/closure/goog/testing/events/matchers_test.html +40 -0
  1040. data/closure-library/closure/goog/testing/expectedfailures.js +236 -0
  1041. data/closure-library/closure/goog/testing/expectedfailures_test.html +122 -0
  1042. data/closure-library/closure/goog/testing/fs/blob.js +74 -0
  1043. data/closure-library/closure/goog/testing/fs/blob_test.html +53 -0
  1044. data/closure-library/closure/goog/testing/fs/directoryentry_test.html +185 -0
  1045. data/closure-library/closure/goog/testing/fs/entry.js +511 -0
  1046. data/closure-library/closure/goog/testing/fs/entry_test.html +153 -0
  1047. data/closure-library/closure/goog/testing/fs/file.js +51 -0
  1048. data/closure-library/closure/goog/testing/fs/fileentry_test.html +54 -0
  1049. data/closure-library/closure/goog/testing/fs/filesystem.js +64 -0
  1050. data/closure-library/closure/goog/testing/fs/filewriter.js +314 -0
  1051. data/closure-library/closure/goog/testing/fs/filewriter_test.html +248 -0
  1052. data/closure-library/closure/goog/testing/fs/fs.js +146 -0
  1053. data/closure-library/closure/goog/testing/fs/fs_test.html +54 -0
  1054. data/closure-library/closure/goog/testing/fs/integration_test.html +219 -0
  1055. data/closure-library/closure/goog/testing/functionmock.js +157 -0
  1056. data/closure-library/closure/goog/testing/functionmock_test.html +357 -0
  1057. data/closure-library/closure/goog/testing/graphics.js +64 -0
  1058. data/closure-library/closure/goog/testing/jsunit.js +144 -0
  1059. data/closure-library/closure/goog/testing/loosemock.js +240 -0
  1060. data/closure-library/closure/goog/testing/loosemock_test.html +343 -0
  1061. data/closure-library/closure/goog/testing/messaging/mockmessagechannel.js +77 -0
  1062. data/closure-library/closure/goog/testing/messaging/mockmessageevent.js +100 -0
  1063. data/closure-library/closure/goog/testing/mock.js +556 -0
  1064. data/closure-library/closure/goog/testing/mock_test.html +208 -0
  1065. data/closure-library/closure/goog/testing/mockclassfactory.js +580 -0
  1066. data/closure-library/closure/goog/testing/mockclassfactory_test.html +241 -0
  1067. data/closure-library/closure/goog/testing/mockclock.js +395 -0
  1068. data/closure-library/closure/goog/testing/mockclock_test.html +413 -0
  1069. data/closure-library/closure/goog/testing/mockcontrol.js +210 -0
  1070. data/closure-library/closure/goog/testing/mockcontrol_test.html +127 -0
  1071. data/closure-library/closure/goog/testing/mockinterface.js +45 -0
  1072. data/closure-library/closure/goog/testing/mockmatchers.js +395 -0
  1073. data/closure-library/closure/goog/testing/mockmatchers_test.html +388 -0
  1074. data/closure-library/closure/goog/testing/mockrandom.js +128 -0
  1075. data/closure-library/closure/goog/testing/mockrandom_test.html +56 -0
  1076. data/closure-library/closure/goog/testing/mockrange.js +65 -0
  1077. data/closure-library/closure/goog/testing/mockrange_test.html +41 -0
  1078. data/closure-library/closure/goog/testing/mockuseragent.js +143 -0
  1079. data/closure-library/closure/goog/testing/mockuseragent_test.html +59 -0
  1080. data/closure-library/closure/goog/testing/multitestrunner.js +1442 -0
  1081. data/closure-library/closure/goog/testing/net/xhrio.js +595 -0
  1082. data/closure-library/closure/goog/testing/net/xhrio_test.html +321 -0
  1083. data/closure-library/closure/goog/testing/objectpropertystring.js +67 -0
  1084. data/closure-library/closure/goog/testing/performancetable.css +46 -0
  1085. data/closure-library/closure/goog/testing/performancetable.js +162 -0
  1086. data/closure-library/closure/goog/testing/performancetimer.js +166 -0
  1087. data/closure-library/closure/goog/testing/performancetimer_test.html +107 -0
  1088. data/closure-library/closure/goog/testing/propertyreplacer.js +243 -0
  1089. data/closure-library/closure/goog/testing/propertyreplacer_test.html +368 -0
  1090. data/closure-library/closure/goog/testing/pseudorandom.js +162 -0
  1091. data/closure-library/closure/goog/testing/pseudorandom_test.html +98 -0
  1092. data/closure-library/closure/goog/testing/recordfunction.js +194 -0
  1093. data/closure-library/closure/goog/testing/recordfunction_test.html +147 -0
  1094. data/closure-library/closure/goog/testing/singleton.js +82 -0
  1095. data/closure-library/closure/goog/testing/singleton_test.html +39 -0
  1096. data/closure-library/closure/goog/testing/stacktrace.js +470 -0
  1097. data/closure-library/closure/goog/testing/stacktrace_test.html +229 -0
  1098. data/closure-library/closure/goog/testing/strictmock.js +124 -0
  1099. data/closure-library/closure/goog/testing/strictmock_test.html +368 -0
  1100. data/closure-library/closure/goog/testing/style/layoutasserts.js +368 -0
  1101. data/closure-library/closure/goog/testing/style/layoutasserts_test.html +269 -0
  1102. data/closure-library/closure/goog/testing/testcase.js +1053 -0
  1103. data/closure-library/closure/goog/testing/testqueue.js +66 -0
  1104. data/closure-library/closure/goog/testing/testrunner.js +391 -0
  1105. data/closure-library/closure/goog/testing/ui/rendererasserts.js +50 -0
  1106. data/closure-library/closure/goog/testing/ui/rendererasserts_test.html +51 -0
  1107. data/closure-library/closure/goog/testing/ui/rendererharness.js +175 -0
  1108. data/closure-library/closure/goog/testing/ui/style.js +137 -0
  1109. data/closure-library/closure/goog/testing/ui/style_reference.html +27 -0
  1110. data/closure-library/closure/goog/testing/ui/style_test.html +130 -0
  1111. data/closure-library/closure/goog/timer/timer.js +285 -0
  1112. data/closure-library/closure/goog/timer/timer_test.html +118 -0
  1113. data/closure-library/closure/goog/tweak/entries.js +990 -0
  1114. data/closure-library/closure/goog/tweak/entries_test.html +94 -0
  1115. data/closure-library/closure/goog/tweak/registry.js +310 -0
  1116. data/closure-library/closure/goog/tweak/registry_test.html +144 -0
  1117. data/closure-library/closure/goog/tweak/testhelpers.js +111 -0
  1118. data/closure-library/closure/goog/tweak/tweak.js +318 -0
  1119. data/closure-library/closure/goog/tweak/tweakui.js +817 -0
  1120. data/closure-library/closure/goog/tweak/tweakui_test.html +280 -0
  1121. data/closure-library/closure/goog/ui/abstractspellchecker.js +1069 -0
  1122. data/closure-library/closure/goog/ui/activitymonitor.js +286 -0
  1123. data/closure-library/closure/goog/ui/activitymonitor_test.html +44 -0
  1124. data/closure-library/closure/goog/ui/advancedtooltip.js +369 -0
  1125. data/closure-library/closure/goog/ui/advancedtooltip_test.html +274 -0
  1126. data/closure-library/closure/goog/ui/animatedzippy.js +190 -0
  1127. data/closure-library/closure/goog/ui/attachablemenu.js +464 -0
  1128. data/closure-library/closure/goog/ui/autocomplete/arraymatcher.js +156 -0
  1129. data/closure-library/closure/goog/ui/autocomplete/arraymatcher_test.html +130 -0
  1130. data/closure-library/closure/goog/ui/autocomplete/autocomplete.js +627 -0
  1131. data/closure-library/closure/goog/ui/autocomplete/autocomplete_test.html +537 -0
  1132. data/closure-library/closure/goog/ui/autocomplete/basic.js +53 -0
  1133. data/closure-library/closure/goog/ui/autocomplete/basic_test.html +204 -0
  1134. data/closure-library/closure/goog/ui/autocomplete/inputhandler.js +1209 -0
  1135. data/closure-library/closure/goog/ui/autocomplete/inputhandler_test.html +555 -0
  1136. data/closure-library/closure/goog/ui/autocomplete/remote.js +117 -0
  1137. data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher.js +273 -0
  1138. data/closure-library/closure/goog/ui/autocomplete/remotearraymatcher_test.html +73 -0
  1139. data/closure-library/closure/goog/ui/autocomplete/renderer.js +852 -0
  1140. data/closure-library/closure/goog/ui/autocomplete/renderer_test.html +386 -0
  1141. data/closure-library/closure/goog/ui/autocomplete/richinputhandler.js +59 -0
  1142. data/closure-library/closure/goog/ui/autocomplete/richremote.js +108 -0
  1143. data/closure-library/closure/goog/ui/autocomplete/richremotearraymatcher.js +126 -0
  1144. data/closure-library/closure/goog/ui/basicmenu.js +930 -0
  1145. data/closure-library/closure/goog/ui/bidiinput.js +164 -0
  1146. data/closure-library/closure/goog/ui/bubble.js +475 -0
  1147. data/closure-library/closure/goog/ui/button.js +208 -0
  1148. data/closure-library/closure/goog/ui/button_test.html +257 -0
  1149. data/closure-library/closure/goog/ui/buttonrenderer.js +205 -0
  1150. data/closure-library/closure/goog/ui/buttonrenderer_test.html +190 -0
  1151. data/closure-library/closure/goog/ui/buttonside.js +40 -0
  1152. data/closure-library/closure/goog/ui/cccbutton.js +281 -0
  1153. data/closure-library/closure/goog/ui/charcounter.js +200 -0
  1154. data/closure-library/closure/goog/ui/charpicker.js +807 -0
  1155. data/closure-library/closure/goog/ui/checkbox.js +303 -0
  1156. data/closure-library/closure/goog/ui/checkbox_test.html +224 -0
  1157. data/closure-library/closure/goog/ui/checkboxmenuitem.js +53 -0
  1158. data/closure-library/closure/goog/ui/colorbutton.js +58 -0
  1159. data/closure-library/closure/goog/ui/colorbutton_test.html +70 -0
  1160. data/closure-library/closure/goog/ui/colorbuttonrenderer.js +72 -0
  1161. data/closure-library/closure/goog/ui/colormenubutton.js +213 -0
  1162. data/closure-library/closure/goog/ui/colormenubuttonrenderer.js +144 -0
  1163. data/closure-library/closure/goog/ui/colormenubuttonrenderer_test.html +88 -0
  1164. data/closure-library/closure/goog/ui/colorpalette.js +162 -0
  1165. data/closure-library/closure/goog/ui/colorpalette_test.html +169 -0
  1166. data/closure-library/closure/goog/ui/colorpicker.js +344 -0
  1167. data/closure-library/closure/goog/ui/colorsplitbehavior.js +61 -0
  1168. data/closure-library/closure/goog/ui/combobox.js +894 -0
  1169. data/closure-library/closure/goog/ui/combobox_test.html +208 -0
  1170. data/closure-library/closure/goog/ui/component.js +1187 -0
  1171. data/closure-library/closure/goog/ui/component_test.html +723 -0
  1172. data/closure-library/closure/goog/ui/container.js +1296 -0
  1173. data/closure-library/closure/goog/ui/container_test.html +450 -0
  1174. data/closure-library/closure/goog/ui/containerrenderer.js +370 -0
  1175. data/closure-library/closure/goog/ui/containerrenderer_test.html +227 -0
  1176. data/closure-library/closure/goog/ui/containerscroller.js +221 -0
  1177. data/closure-library/closure/goog/ui/containerscroller_test.html +213 -0
  1178. data/closure-library/closure/goog/ui/control.js +1348 -0
  1179. data/closure-library/closure/goog/ui/control_test.html +2128 -0
  1180. data/closure-library/closure/goog/ui/controlcontent.js +28 -0
  1181. data/closure-library/closure/goog/ui/controlrenderer.js +808 -0
  1182. data/closure-library/closure/goog/ui/controlrenderer_test.html +840 -0
  1183. data/closure-library/closure/goog/ui/cookieeditor.js +182 -0
  1184. data/closure-library/closure/goog/ui/cookieeditor_test.html +102 -0
  1185. data/closure-library/closure/goog/ui/css3buttonrenderer.js +147 -0
  1186. data/closure-library/closure/goog/ui/css3menubuttonrenderer.js +144 -0
  1187. data/closure-library/closure/goog/ui/cssnames.js +28 -0
  1188. data/closure-library/closure/goog/ui/custombutton.js +58 -0
  1189. data/closure-library/closure/goog/ui/custombuttonrenderer.js +254 -0
  1190. data/closure-library/closure/goog/ui/customcolorpalette.js +137 -0
  1191. data/closure-library/closure/goog/ui/customcolorpalette_test.html +60 -0
  1192. data/closure-library/closure/goog/ui/datepicker.js +1339 -0
  1193. data/closure-library/closure/goog/ui/datepicker_test.html +190 -0
  1194. data/closure-library/closure/goog/ui/decorate.js +37 -0
  1195. data/closure-library/closure/goog/ui/decorate_test.html +113 -0
  1196. data/closure-library/closure/goog/ui/deprecatedbutton.js +381 -0
  1197. data/closure-library/closure/goog/ui/dialog.js +1776 -0
  1198. data/closure-library/closure/goog/ui/dialog_test.html +493 -0
  1199. data/closure-library/closure/goog/ui/dimensionpicker.js +289 -0
  1200. data/closure-library/closure/goog/ui/dimensionpicker_test.html +128 -0
  1201. data/closure-library/closure/goog/ui/dimensionpickerrenderer.js +387 -0
  1202. data/closure-library/closure/goog/ui/dragdropdetector.js +642 -0
  1203. data/closure-library/closure/goog/ui/drilldownrow.js +494 -0
  1204. data/closure-library/closure/goog/ui/editor/abstractdialog.js +443 -0
  1205. data/closure-library/closure/goog/ui/editor/abstractdialog_test.html +467 -0
  1206. data/closure-library/closure/goog/ui/editor/bubble.js +520 -0
  1207. data/closure-library/closure/goog/ui/editor/bubble_test.html +264 -0
  1208. data/closure-library/closure/goog/ui/editor/defaulttoolbar.js +1062 -0
  1209. data/closure-library/closure/goog/ui/editor/linkdialog.js +833 -0
  1210. data/closure-library/closure/goog/ui/editor/linkdialog_test.html +449 -0
  1211. data/closure-library/closure/goog/ui/editor/messages.js +115 -0
  1212. data/closure-library/closure/goog/ui/editor/tabpane.js +183 -0
  1213. data/closure-library/closure/goog/ui/editor/toolbarcontroller.js +293 -0
  1214. data/closure-library/closure/goog/ui/editor/toolbarfactory.js +437 -0
  1215. data/closure-library/closure/goog/ui/editor/toolbarfactory_test.html +73 -0
  1216. data/closure-library/closure/goog/ui/emoji/emoji.js +72 -0
  1217. data/closure-library/closure/goog/ui/emoji/emojipalette.js +298 -0
  1218. data/closure-library/closure/goog/ui/emoji/emojipaletterenderer.js +206 -0
  1219. data/closure-library/closure/goog/ui/emoji/emojipicker.js +797 -0
  1220. data/closure-library/closure/goog/ui/emoji/emojipicker_test.html +840 -0
  1221. data/closure-library/closure/goog/ui/emoji/fast_nonprogressive_emojipicker_test.html +256 -0
  1222. data/closure-library/closure/goog/ui/emoji/fast_progressive_emojipicker_test.html +256 -0
  1223. data/closure-library/closure/goog/ui/emoji/popupemojipicker.js +410 -0
  1224. data/closure-library/closure/goog/ui/emoji/popupemojipicker_test.html +80 -0
  1225. data/closure-library/closure/goog/ui/emoji/progressiveemojipaletterenderer.js +97 -0
  1226. data/closure-library/closure/goog/ui/emoji/spriteinfo.js +212 -0
  1227. data/closure-library/closure/goog/ui/emoji/spriteinfo_test.html +51 -0
  1228. data/closure-library/closure/goog/ui/filteredmenu.js +562 -0
  1229. data/closure-library/closure/goog/ui/filteredmenu_test.html +299 -0
  1230. data/closure-library/closure/goog/ui/filterobservingmenuitem.js +97 -0
  1231. data/closure-library/closure/goog/ui/filterobservingmenuitemrenderer.js +60 -0
  1232. data/closure-library/closure/goog/ui/flatbuttonrenderer.js +138 -0
  1233. data/closure-library/closure/goog/ui/flatmenubuttonrenderer.js +199 -0
  1234. data/closure-library/closure/goog/ui/formpost.js +109 -0
  1235. data/closure-library/closure/goog/ui/formpost_test.html +109 -0
  1236. data/closure-library/closure/goog/ui/gauge.js +999 -0
  1237. data/closure-library/closure/goog/ui/gaugetheme.js +169 -0
  1238. data/closure-library/closure/goog/ui/hovercard.js +447 -0
  1239. data/closure-library/closure/goog/ui/hovercard_test.html +343 -0
  1240. data/closure-library/closure/goog/ui/hsvapalette.js +311 -0
  1241. data/closure-library/closure/goog/ui/hsvapalette_test.html +152 -0
  1242. data/closure-library/closure/goog/ui/hsvpalette.js +470 -0
  1243. data/closure-library/closure/goog/ui/hsvpalette_test.html +202 -0
  1244. data/closure-library/closure/goog/ui/idgenerator.js +57 -0
  1245. data/closure-library/closure/goog/ui/idletimer.js +299 -0
  1246. data/closure-library/closure/goog/ui/idletimer_test.html +100 -0
  1247. data/closure-library/closure/goog/ui/iframemask.js +256 -0
  1248. data/closure-library/closure/goog/ui/iframemask_test.html +230 -0
  1249. data/closure-library/closure/goog/ui/imagelessbuttonrenderer.js +204 -0
  1250. data/closure-library/closure/goog/ui/imagelessmenubuttonrenderer.js +202 -0
  1251. data/closure-library/closure/goog/ui/imagelessroundedcorner.js +971 -0
  1252. data/closure-library/closure/goog/ui/inputdatepicker.js +306 -0
  1253. data/closure-library/closure/goog/ui/inputdatepicker_test.html +109 -0
  1254. data/closure-library/closure/goog/ui/itemevent.js +50 -0
  1255. data/closure-library/closure/goog/ui/keyboardshortcuthandler.js +981 -0
  1256. data/closure-library/closure/goog/ui/keyboardshortcuthandler_test.html +671 -0
  1257. data/closure-library/closure/goog/ui/labelinput.js +439 -0
  1258. data/closure-library/closure/goog/ui/linkbuttonrenderer.js +67 -0
  1259. data/closure-library/closure/goog/ui/media/flashobject.js +629 -0
  1260. data/closure-library/closure/goog/ui/media/flashobject_test.html +236 -0
  1261. data/closure-library/closure/goog/ui/media/flickr.js +309 -0
  1262. data/closure-library/closure/goog/ui/media/flickr_test.html +90 -0
  1263. data/closure-library/closure/goog/ui/media/media.js +284 -0
  1264. data/closure-library/closure/goog/ui/media/media_test.html +161 -0
  1265. data/closure-library/closure/goog/ui/media/mediamodel.js +840 -0
  1266. data/closure-library/closure/goog/ui/media/mp3.js +225 -0
  1267. data/closure-library/closure/goog/ui/media/mp3_test.html +78 -0
  1268. data/closure-library/closure/goog/ui/media/photo.js +139 -0
  1269. data/closure-library/closure/goog/ui/media/photo_test.html +62 -0
  1270. data/closure-library/closure/goog/ui/media/picasa.js +317 -0
  1271. data/closure-library/closure/goog/ui/media/picasa_test.html +131 -0
  1272. data/closure-library/closure/goog/ui/media/vimeo.js +264 -0
  1273. data/closure-library/closure/goog/ui/media/vimeo_test.html +79 -0
  1274. data/closure-library/closure/goog/ui/media/youtube.js +328 -0
  1275. data/closure-library/closure/goog/ui/media/youtube_test.html +185 -0
  1276. data/closure-library/closure/goog/ui/menu.js +435 -0
  1277. data/closure-library/closure/goog/ui/menu_test.html +129 -0
  1278. data/closure-library/closure/goog/ui/menubase.js +191 -0
  1279. data/closure-library/closure/goog/ui/menubutton.js +809 -0
  1280. data/closure-library/closure/goog/ui/menubutton_test.html +440 -0
  1281. data/closure-library/closure/goog/ui/menubutton_test_frame.html +41 -0
  1282. data/closure-library/closure/goog/ui/menubuttonrenderer.js +226 -0
  1283. data/closure-library/closure/goog/ui/menubuttonrenderer_test.html +161 -0
  1284. data/closure-library/closure/goog/ui/menuheader.js +62 -0
  1285. data/closure-library/closure/goog/ui/menuheaderrenderer.js +55 -0
  1286. data/closure-library/closure/goog/ui/menuitem.js +154 -0
  1287. data/closure-library/closure/goog/ui/menuitem_test.html +506 -0
  1288. data/closure-library/closure/goog/ui/menuitemrenderer.js +353 -0
  1289. data/closure-library/closure/goog/ui/menuitemrenderer_test.html +190 -0
  1290. data/closure-library/closure/goog/ui/menurenderer.js +118 -0
  1291. data/closure-library/closure/goog/ui/menuseparator.js +51 -0
  1292. data/closure-library/closure/goog/ui/menuseparatorrenderer.js +102 -0
  1293. data/closure-library/closure/goog/ui/mockactivitymonitor.js +54 -0
  1294. data/closure-library/closure/goog/ui/nativebuttonrenderer.js +205 -0
  1295. data/closure-library/closure/goog/ui/nativebuttonrenderer_test.html +213 -0
  1296. data/closure-library/closure/goog/ui/offlineinstalldialog.js +1086 -0
  1297. data/closure-library/closure/goog/ui/offlinestatuscard.js +580 -0
  1298. data/closure-library/closure/goog/ui/offlinestatuscomponent.js +545 -0
  1299. data/closure-library/closure/goog/ui/option.js +67 -0
  1300. data/closure-library/closure/goog/ui/palette.js +528 -0
  1301. data/closure-library/closure/goog/ui/paletterenderer.js +318 -0
  1302. data/closure-library/closure/goog/ui/plaintextspellchecker.js +668 -0
  1303. data/closure-library/closure/goog/ui/plaintextspellchecker_test.html +240 -0
  1304. data/closure-library/closure/goog/ui/popup.js +410 -0
  1305. data/closure-library/closure/goog/ui/popup_test.html +137 -0
  1306. data/closure-library/closure/goog/ui/popupbase.js +721 -0
  1307. data/closure-library/closure/goog/ui/popupbase_test.html +186 -0
  1308. data/closure-library/closure/goog/ui/popupcolorpicker.js +441 -0
  1309. data/closure-library/closure/goog/ui/popupcolorpicker_test.html +71 -0
  1310. data/closure-library/closure/goog/ui/popupdatepicker.js +273 -0
  1311. data/closure-library/closure/goog/ui/popupmenu.js +539 -0
  1312. data/closure-library/closure/goog/ui/popupmenu_test.html +197 -0
  1313. data/closure-library/closure/goog/ui/progressbar.js +390 -0
  1314. data/closure-library/closure/goog/ui/prompt.js +307 -0
  1315. data/closure-library/closure/goog/ui/prompt_test.html +65 -0
  1316. data/closure-library/closure/goog/ui/rangemodel.js +301 -0
  1317. data/closure-library/closure/goog/ui/rangemodel_test.html +270 -0
  1318. data/closure-library/closure/goog/ui/ratings.js +441 -0
  1319. data/closure-library/closure/goog/ui/registry.js +166 -0
  1320. data/closure-library/closure/goog/ui/registry_test.html +236 -0
  1321. data/closure-library/closure/goog/ui/richtextspellchecker.js +600 -0
  1322. data/closure-library/closure/goog/ui/richtextspellchecker_test.html +224 -0
  1323. data/closure-library/closure/goog/ui/roundedcorners.js +694 -0
  1324. data/closure-library/closure/goog/ui/roundedpanel.js +609 -0
  1325. data/closure-library/closure/goog/ui/roundedpanel_test.html +57 -0
  1326. data/closure-library/closure/goog/ui/roundedtabrenderer.js +196 -0
  1327. data/closure-library/closure/goog/ui/scrollfloater.js +394 -0
  1328. data/closure-library/closure/goog/ui/scrollfloater_test.html +46 -0
  1329. data/closure-library/closure/goog/ui/select.js +397 -0
  1330. data/closure-library/closure/goog/ui/select_test.html +152 -0
  1331. data/closure-library/closure/goog/ui/selectionmenubutton.js +277 -0
  1332. data/closure-library/closure/goog/ui/selectionmenubutton_test.html +237 -0
  1333. data/closure-library/closure/goog/ui/selectionmodel.js +291 -0
  1334. data/closure-library/closure/goog/ui/separator.js +74 -0
  1335. data/closure-library/closure/goog/ui/serverchart.js +1791 -0
  1336. data/closure-library/closure/goog/ui/serverchart_test.html +598 -0
  1337. data/closure-library/closure/goog/ui/slider.js +125 -0
  1338. data/closure-library/closure/goog/ui/sliderbase.js +1087 -0
  1339. data/closure-library/closure/goog/ui/sliderbase_test.html +198 -0
  1340. data/closure-library/closure/goog/ui/splitbehavior.js +348 -0
  1341. data/closure-library/closure/goog/ui/splitbehavior_test.html +161 -0
  1342. data/closure-library/closure/goog/ui/splitpane.js +844 -0
  1343. data/closure-library/closure/goog/ui/splitpane_test.html +143 -0
  1344. data/closure-library/closure/goog/ui/style/app/buttonrenderer.js +204 -0
  1345. data/closure-library/closure/goog/ui/style/app/buttonrenderer_test.html +155 -0
  1346. data/closure-library/closure/goog/ui/style/app/menubuttonrenderer.js +227 -0
  1347. data/closure-library/closure/goog/ui/style/app/menubuttonrenderer_test.html +167 -0
  1348. data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer.js +88 -0
  1349. data/closure-library/closure/goog/ui/style/app/primaryactionbuttonrenderer_test.html +76 -0
  1350. data/closure-library/closure/goog/ui/submenu.js +660 -0
  1351. data/closure-library/closure/goog/ui/submenu_test.html +446 -0
  1352. data/closure-library/closure/goog/ui/submenurenderer.js +188 -0
  1353. data/closure-library/closure/goog/ui/tab.js +102 -0
  1354. data/closure-library/closure/goog/ui/tab_test.html +61 -0
  1355. data/closure-library/closure/goog/ui/tabbar.js +393 -0
  1356. data/closure-library/closure/goog/ui/tabbar_test.html +611 -0
  1357. data/closure-library/closure/goog/ui/tabbarrenderer.js +173 -0
  1358. data/closure-library/closure/goog/ui/tabbarrenderer_test.html +137 -0
  1359. data/closure-library/closure/goog/ui/tablesorter.js +304 -0
  1360. data/closure-library/closure/goog/ui/tablesorter_test.html +127 -0
  1361. data/closure-library/closure/goog/ui/tabpane.js +674 -0
  1362. data/closure-library/closure/goog/ui/tabpane_test.html +107 -0
  1363. data/closure-library/closure/goog/ui/tabrenderer.js +152 -0
  1364. data/closure-library/closure/goog/ui/tabrenderer_test.html +132 -0
  1365. data/closure-library/closure/goog/ui/textarea.js +573 -0
  1366. data/closure-library/closure/goog/ui/textarea_test.html +305 -0
  1367. data/closure-library/closure/goog/ui/textarearenderer.js +167 -0
  1368. data/closure-library/closure/goog/ui/togglebutton.js +58 -0
  1369. data/closure-library/closure/goog/ui/toolbar.js +45 -0
  1370. data/closure-library/closure/goog/ui/toolbarbutton.js +54 -0
  1371. data/closure-library/closure/goog/ui/toolbarbuttonrenderer.js +55 -0
  1372. data/closure-library/closure/goog/ui/toolbarcolormenubutton.js +57 -0
  1373. data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer.js +95 -0
  1374. data/closure-library/closure/goog/ui/toolbarcolormenubuttonrenderer_test.html +66 -0
  1375. data/closure-library/closure/goog/ui/toolbarmenubutton.js +56 -0
  1376. data/closure-library/closure/goog/ui/toolbarmenubuttonrenderer.js +55 -0
  1377. data/closure-library/closure/goog/ui/toolbarrenderer.js +95 -0
  1378. data/closure-library/closure/goog/ui/toolbarselect.js +55 -0
  1379. data/closure-library/closure/goog/ui/toolbarseparator.js +51 -0
  1380. data/closure-library/closure/goog/ui/toolbarseparatorrenderer.js +87 -0
  1381. data/closure-library/closure/goog/ui/toolbartogglebutton.js +53 -0
  1382. data/closure-library/closure/goog/ui/tooltip.js +975 -0
  1383. data/closure-library/closure/goog/ui/tooltip_test.html +351 -0
  1384. data/closure-library/closure/goog/ui/tree/basenode.js +1457 -0
  1385. data/closure-library/closure/goog/ui/tree/basenode_test.html +218 -0
  1386. data/closure-library/closure/goog/ui/tree/treecontrol.js +656 -0
  1387. data/closure-library/closure/goog/ui/tree/treecontrol_test.html +113 -0
  1388. data/closure-library/closure/goog/ui/tree/treenode.js +102 -0
  1389. data/closure-library/closure/goog/ui/tree/typeahead.js +332 -0
  1390. data/closure-library/closure/goog/ui/tree/typeahead_test.html +133 -0
  1391. data/closure-library/closure/goog/ui/tristatemenuitem.js +185 -0
  1392. data/closure-library/closure/goog/ui/tristatemenuitemrenderer.js +86 -0
  1393. data/closure-library/closure/goog/ui/twothumbslider.js +134 -0
  1394. data/closure-library/closure/goog/ui/zippy.js +277 -0
  1395. data/closure-library/closure/goog/ui/zippy_test.html +223 -0
  1396. data/closure-library/closure/goog/uri/uri.js +1595 -0
  1397. data/closure-library/closure/goog/uri/uri_test.html +837 -0
  1398. data/closure-library/closure/goog/uri/utils.js +972 -0
  1399. data/closure-library/closure/goog/uri/utils_test.html +521 -0
  1400. data/closure-library/closure/goog/useragent/adobereader.js +90 -0
  1401. data/closure-library/closure/goog/useragent/adobereader_test.html +34 -0
  1402. data/closure-library/closure/goog/useragent/flash.js +113 -0
  1403. data/closure-library/closure/goog/useragent/flash_test.html +34 -0
  1404. data/closure-library/closure/goog/useragent/iphoto.js +86 -0
  1405. data/closure-library/closure/goog/useragent/jscript.js +94 -0
  1406. data/closure-library/closure/goog/useragent/jscript_test.html +65 -0
  1407. data/closure-library/closure/goog/useragent/picasa.js +111 -0
  1408. data/closure-library/closure/goog/useragent/platform.js +70 -0
  1409. data/closure-library/closure/goog/useragent/platform_test.html +108 -0
  1410. data/closure-library/closure/goog/useragent/product.js +253 -0
  1411. data/closure-library/closure/goog/useragent/product_isversion.js +99 -0
  1412. data/closure-library/closure/goog/useragent/product_test.html +322 -0
  1413. data/closure-library/closure/goog/useragent/useragent.js +464 -0
  1414. data/closure-library/closure/goog/useragent/useragent_test.html +290 -0
  1415. data/closure-library/closure/goog/window/window.js +206 -0
  1416. data/closure-library/closure/goog/window/window_test.html +185 -0
  1417. data/closure-library/third_party/closure/goog/base.js +2 -0
  1418. data/closure-library/third_party/closure/goog/caja/string/html/htmlparser.js +611 -0
  1419. data/closure-library/third_party/closure/goog/caja/string/html/htmlsanitizer.js +605 -0
  1420. data/closure-library/third_party/closure/goog/deps.js +26 -0
  1421. data/closure-library/third_party/closure/goog/dojo/dom/query.js +1532 -0
  1422. data/closure-library/third_party/closure/goog/dojo/dom/query_test.html +63 -0
  1423. data/closure-library/third_party/closure/goog/dojo/dom/query_test.js +160 -0
  1424. data/closure-library/third_party/closure/goog/jpeg_encoder/jpeg_encoder_basic.js +751 -0
  1425. data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum.js +712 -0
  1426. data/closure-library/third_party/closure/goog/loremipsum/text/loremipsum_test.html +61 -0
  1427. data/closure-library/third_party/closure/goog/mochikit/async/deferred.js +530 -0
  1428. data/closure-library/third_party/closure/goog/mochikit/async/deferred_test.html +627 -0
  1429. data/closure-library/third_party/closure/goog/mochikit/async/deferredlist.js +199 -0
  1430. data/closure-library/third_party/closure/goog/mochikit/async/deferredlist_test.html +426 -0
  1431. data/closure-library/third_party/closure/goog/osapi/osapi.js +91 -0
  1432. data/closure-library/third_party/closure/goog/silverlight/AppManifest.xml +6 -0
  1433. data/closure-library/third_party/closure/goog/silverlight/AssemblyInfo.cs +35 -0
  1434. data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml +9 -0
  1435. data/closure-library/third_party/closure/goog/silverlight/ClipboardButton.xaml.cs +74 -0
  1436. data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml +8 -0
  1437. data/closure-library/third_party/closure/goog/silverlight/ClipboardButtonApp.xaml.cs +75 -0
  1438. data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj +108 -0
  1439. data/closure-library/third_party/closure/goog/silverlight/ClosureClipboardButton.csproj.user +29 -0
  1440. data/closure-library/third_party/closure/goog/silverlight/clipboardbutton.js +279 -0
  1441. data/closure-library/third_party/closure/goog/silverlight/silverlight.js +758 -0
  1442. data/closure-library/third_party/closure/goog/silverlight/supporteduseragent.js +138 -0
  1443. data/closure-library/third_party/closure/goog/silverlight/xap_files +0 -0
  1444. data/closure-templates/COPYING +202 -0
  1445. data/closure-templates/README +47 -0
  1446. data/closure-templates/SoyToJsSrcCompiler.jar +0 -0
  1447. data/closure-templates/soyutils.js +880 -0
  1448. data/closure-templates/soyutils_usegoog.js +308 -0
  1449. data/closure.gemspec +20 -0
  1450. data/config.ru +40 -0
  1451. data/java_src/ClosureScript.java +89 -0
  1452. data/java_src/make.rb +19 -0
  1453. data/lib/closure/beanshell.rb +80 -0
  1454. data/lib/closure/compiler.rb +184 -0
  1455. data/lib/closure/file_response.rb +90 -0
  1456. data/lib/closure/goog.rb +143 -0
  1457. data/lib/closure/middleware.rb +43 -0
  1458. data/lib/closure/sass.rb +56 -0
  1459. data/lib/closure/script.rb +139 -0
  1460. data/lib/closure/server.rb +83 -0
  1461. data/lib/closure/sources.rb +310 -0
  1462. data/lib/closure/templates.rb +156 -0
  1463. data/lib/closure/version.rb +20 -0
  1464. data/lib/closure.jar +0 -0
  1465. data/lib/closure.rb +134 -0
  1466. data/scripts/demos/compile.js.erb +8 -0
  1467. data/scripts/demos/compile.out +1 -0
  1468. data/scripts/demos/compiler.haml +17 -0
  1469. data/scripts/demos/compiler.js +12 -0
  1470. data/scripts/demos/deps.js.erb +1 -0
  1471. data/scripts/demos/externs.haml +16 -0
  1472. data/scripts/demos/externs.js.erb +8 -0
  1473. data/scripts/demos/externs.out +1 -0
  1474. data/scripts/demos/externs_jquery.externs +849 -0
  1475. data/scripts/demos/externs_jquery.js +167 -0
  1476. data/scripts/demos/externs_jquerytest.js +11 -0
  1477. data/scripts/demos/helloworld.haml +15 -0
  1478. data/scripts/demos/helloworld.js +58 -0
  1479. data/scripts/demos/helloworld.soy +45 -0
  1480. data/scripts/demos/index.haml +21 -0
  1481. data/scripts/demos/rails_ujs.haml +24 -0
  1482. data/scripts/examples/rails/ujs.js +136 -0
  1483. data/scripts/favicon.ico +0 -0
  1484. data/scripts/fixtures/_partial.haml +2 -0
  1485. data/scripts/fixtures/erb.html.erb +8 -0
  1486. data/scripts/fixtures/haml.haml +6 -0
  1487. data/scripts/fixtures/html.html +9 -0
  1488. data/scripts/fixtures/route_js.js.erb +1 -0
  1489. data/scripts/index.haml +14 -0
  1490. data/test/beanshell_test.rb +22 -0
  1491. data/test/server_test.rb +67 -0
  1492. data/test/sources_test.rb +41 -0
  1493. data/test/test_helper.rb +12 -0
  1494. metadata +1577 -0
@@ -0,0 +1,1642 @@
1
+ // Copyright 2006 The Closure Library Authors. All Rights Reserved.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS-IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ /**
16
+ * @fileoverview Functions and objects for date representation and manipulation.
17
+ *
18
+ */
19
+
20
+ goog.provide('goog.date');
21
+ goog.provide('goog.date.Date');
22
+ goog.provide('goog.date.DateTime');
23
+ goog.provide('goog.date.Interval');
24
+ goog.provide('goog.date.month');
25
+ goog.provide('goog.date.weekDay');
26
+
27
+ goog.require('goog.asserts');
28
+ goog.require('goog.date.DateLike');
29
+ goog.require('goog.string');
30
+
31
+
32
+ /**
33
+ * Constants for weekdays.
34
+ * @enum {number}
35
+ */
36
+ goog.date.weekDay = {
37
+ MON: 0,
38
+ TUE: 1,
39
+ WED: 2,
40
+ THU: 3,
41
+ FRI: 4,
42
+ SAT: 5,
43
+ SUN: 6
44
+ };
45
+
46
+
47
+ /**
48
+ * Constants for months.
49
+ * @enum {number}
50
+ */
51
+ goog.date.month = {
52
+ JAN: 0,
53
+ FEB: 1,
54
+ MAR: 2,
55
+ APR: 3,
56
+ MAY: 4,
57
+ JUN: 5,
58
+ JUL: 6,
59
+ AUG: 7,
60
+ SEP: 8,
61
+ OCT: 9,
62
+ NOV: 10,
63
+ DEC: 11
64
+ };
65
+
66
+
67
+ /**
68
+ * Formats a month/year string.
69
+ * Example: "January 2008"
70
+ *
71
+ * @param {string} monthName The month name to use in the result.
72
+ * @param {number} yearNum The numeric year to use in the result.
73
+ * @return {string} A formatted month/year string.
74
+ */
75
+ goog.date.formatMonthAndYear = function(monthName, yearNum) {
76
+ /** @desc Month/year format given the month name and the numeric year. */
77
+ var MSG_MONTH_AND_YEAR = goog.getMsg(
78
+ '{$monthName} {$yearNum}',
79
+ { 'monthName' : monthName, 'yearNum' : yearNum });
80
+ return MSG_MONTH_AND_YEAR;
81
+ };
82
+
83
+
84
+ /**
85
+ * Regular expression for splitting date parts from ISO 8601 styled string.
86
+ * Examples: '20060210' or '2005-02-22' or '20050222' or '2005-08'
87
+ * or '2005-W22' or '2005W22' or '2005-W22-4', etc.
88
+ * For explanation and more examples, see:
89
+ * {@link http://en.wikipedia.org/wiki/ISO_8601}
90
+ *
91
+ * @type {RegExp}
92
+ * @private
93
+ */
94
+ goog.date.splitDateStringRegex_ = new RegExp(
95
+ '^(\\d{4})(?:(?:-?(\\d{2})(?:-?(\\d{2}))?)|' +
96
+ '(?:-?(\\d{3}))|(?:-?W(\\d{2})(?:-?([1-7]))?))?$');
97
+
98
+
99
+ /**
100
+ * Regular expression for splitting time parts from ISO 8601 styled string.
101
+ * Examples: '18:46:39.994' or '184639.994'
102
+ *
103
+ * @type {RegExp}
104
+ * @private
105
+ */
106
+ goog.date.splitTimeStringRegex_ =
107
+ /^(\d{2})(?::?(\d{2})(?::?(\d{2})(\.\d+)?)?)?$/;
108
+
109
+
110
+ /**
111
+ * Regular expression for splitting timezone parts from ISO 8601 styled string.
112
+ * Example: The part after the '+' in '18:46:39+07:00'. Or '09:30Z' (UTC).
113
+ *
114
+ * @type {RegExp}
115
+ * @private
116
+ */
117
+ goog.date.splitTimezoneStringRegex_ = /Z|(?:([-+])(\d{2})(?::?(\d{2}))?)$/;
118
+
119
+
120
+ /**
121
+ * Regular expression for splitting duration parts from ISO 8601 styled string.
122
+ * Example: '-P1Y2M3DT4H5M6.7S'
123
+ *
124
+ * @type {RegExp}
125
+ * @private
126
+ */
127
+ goog.date.splitDurationRegex_ = new RegExp(
128
+ '^(-)?P(?:(\\d+)Y)?(?:(\\d+)M)?(?:(\\d+)D)?' +
129
+ '(T(?:(\\d+)H)?(?:(\\d+)M)?(?:(\\d+(?:\\.\\d+)?)S)?)?$');
130
+
131
+
132
+ /**
133
+ * Returns whether the given year is a leap year.
134
+ *
135
+ * @param {number} year Year part of date.
136
+ * @return {boolean} Whether the given year is a leap year.
137
+ */
138
+ goog.date.isLeapYear = function(year) {
139
+ // Leap year logic; the 4-100-400 rule
140
+ return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
141
+ };
142
+
143
+
144
+ /**
145
+ * Returns whether the given year is a long ISO year.
146
+ * See {@link http://www.phys.uu.nl/~vgent/calendar/isocalendar_text3.htm}.
147
+ *
148
+ * @param {number} year Full year part of date.
149
+ * @return {boolean} Whether the given year is a long ISO year.
150
+ */
151
+ goog.date.isLongIsoYear = function(year) {
152
+ var n = 5 * year + 12 - 4 * (Math.floor(year / 100) - Math.floor(year / 400));
153
+ n += Math.floor((year - 100) / 400) - Math.floor((year - 102) / 400);
154
+ n += Math.floor((year - 200) / 400) - Math.floor((year - 199) / 400);
155
+
156
+ return n % 28 < 5;
157
+ };
158
+
159
+
160
+ /**
161
+ * Returns the number of days for a given month.
162
+ *
163
+ * @param {number} year Year part of date.
164
+ * @param {number} month Month part of date.
165
+ * @return {number} The number of days for the given month.
166
+ */
167
+ goog.date.getNumberOfDaysInMonth = function(year, month) {
168
+ switch (month) {
169
+ case goog.date.month.FEB:
170
+ return goog.date.isLeapYear(year) ? 29 : 28;
171
+ case goog.date.month.JUN:
172
+ case goog.date.month.SEP:
173
+ case goog.date.month.NOV:
174
+ case goog.date.month.APR:
175
+ return 30;
176
+ }
177
+ return 31;
178
+ };
179
+
180
+
181
+ /**
182
+ * Returns true if the 2 dates are in the same day.
183
+ * @param {goog.date.DateLike} date The time to check.
184
+ * @param {goog.date.DateLike=} opt_now The current time.
185
+ * @return {boolean} Whether the dates are on the same day.
186
+ */
187
+ goog.date.isSameDay = function(date, opt_now) {
188
+ var now = opt_now || new Date(goog.now());
189
+ return date.getDate() == now.getDate() &&
190
+ goog.date.isSameMonth(date, now);
191
+ };
192
+
193
+
194
+ /**
195
+ * Returns true if the 2 dates are in the same month.
196
+ * @param {goog.date.DateLike} date The time to check.
197
+ * @param {goog.date.DateLike=} opt_now The current time.
198
+ * @return {boolean} Whether the dates are in the same calendar month.
199
+ */
200
+ goog.date.isSameMonth = function(date, opt_now) {
201
+ var now = opt_now || new Date(goog.now());
202
+ return date.getMonth() == now.getMonth() &&
203
+ goog.date.isSameYear(date, now);
204
+ };
205
+
206
+
207
+ /**
208
+ * Returns true if the 2 dates are in the same year.
209
+ * @param {goog.date.DateLike} date The time to check.
210
+ * @param {goog.date.DateLike=} opt_now The current time.
211
+ * @return {boolean} Whether the dates are in the same calendar year.
212
+ */
213
+ goog.date.isSameYear = function(date, opt_now) {
214
+ var now = opt_now || new Date(goog.now());
215
+ return date.getFullYear() == now.getFullYear();
216
+ };
217
+
218
+
219
+ /**
220
+ * Static function for week number calculation. ISO 8601 implementation.
221
+ *
222
+ * @param {number} year Year part of date.
223
+ * @param {number} month Month part of date (0-11).
224
+ * @param {number} date Day part of date (1-31).
225
+ * @param {number=} opt_weekDay Cut off weekday, defaults to Thursday.
226
+ * @param {number=} opt_firstDayOfWeek First day of the week, defaults to
227
+ * Monday.
228
+ * Monday=0, Sunday=6.
229
+ * @return {number} The week number (1-53).
230
+ */
231
+ goog.date.getWeekNumber = function(year, month, date, opt_weekDay,
232
+ opt_firstDayOfWeek) {
233
+ var d = new Date(year, month, date);
234
+
235
+ // Default to Thursday for cut off as per ISO 8601.
236
+ var cutoff = opt_weekDay || goog.date.weekDay.THU;
237
+
238
+ // Default to Monday for first day of the week as per ISO 8601.
239
+ var firstday = opt_firstDayOfWeek || goog.date.weekDay.MON;
240
+
241
+ // 1 day in milliseconds.
242
+ var ONE_DAY = 24 * 60 * 60 * 1000;
243
+
244
+ // The d.getDay() has to be converted first to ISO weekday (Monday=0).
245
+ var isoday = (d.getDay() + 6) % 7;
246
+
247
+ // Position of given day in the picker grid w.r.t. first day of week
248
+ var daypos = (isoday - firstday + 7) % 7;
249
+
250
+ // Position of cut off day in the picker grid w.r.t. first day of week
251
+ var cutoffpos = (cutoff - firstday + 7) % 7;
252
+
253
+ // Unix timestamp of the midnight of the cutoff day in the week of 'd'.
254
+ // There might be +-1 hour shift in the result due to the daylight saving,
255
+ // but it doesn't affect the year.
256
+ var cutoffSameWeek = d.valueOf() + (cutoffpos - daypos) * ONE_DAY;
257
+
258
+ // Unix timestamp of January 1 in the year of 'cutoffSameWeek'.
259
+ var jan1 = new Date(new Date(cutoffSameWeek).getFullYear(), 0, 1).valueOf();
260
+
261
+ // Number of week. The round() eliminates the effect of daylight saving.
262
+ return Math.floor(Math.round((cutoffSameWeek - jan1) / ONE_DAY) / 7) + 1;
263
+ };
264
+
265
+
266
+ /**
267
+ * Creates a DateTime from a datetime string expressed in ISO 8601 format.
268
+ *
269
+ * @param {string} formatted A date or datetime expressed in ISO 8601 format.
270
+ * @return {goog.date.DateTime} Parsed date or null if parse fails.
271
+ */
272
+ goog.date.fromIsoString = function(formatted) {
273
+ var ret = new goog.date.DateTime(2000);
274
+ return goog.date.setIso8601DateTime(ret, formatted) ? ret : null;
275
+ };
276
+
277
+
278
+ /**
279
+ * Parses a datetime string expressed in ISO 8601 format. Overwrites the date
280
+ * and optionally the time part of the given object with the parsed values.
281
+ *
282
+ * @param {!goog.date.DateTime} dateTime Object whose fields will be set.
283
+ * @param {string} formatted A date or datetime expressed in ISO 8601 format.
284
+ * @return {boolean} Whether the parsing succeeded.
285
+ */
286
+ goog.date.setIso8601DateTime = function(dateTime, formatted) {
287
+ formatted = goog.string.trim(formatted);
288
+ var delim = formatted.indexOf('T') == -1 ? ' ' : 'T';
289
+ var parts = formatted.split(delim);
290
+ return goog.date.setIso8601DateOnly_(dateTime, parts[0]) &&
291
+ (parts.length < 2 || goog.date.setIso8601TimeOnly_(dateTime, parts[1]));
292
+ };
293
+
294
+
295
+ /**
296
+ * Sets date fields based on an ISO 8601 format string.
297
+ *
298
+ * @param {!goog.date.DateTime} d Object whose fields will be set.
299
+ * @param {string} formatted A date expressed in ISO 8601 format.
300
+ * @return {boolean} Whether the parsing succeeded.
301
+ * @private
302
+ */
303
+ goog.date.setIso8601DateOnly_ = function(d, formatted) {
304
+ // split the formatted ISO date string into its date fields
305
+ var parts = formatted.match(goog.date.splitDateStringRegex_);
306
+ if (!parts) {
307
+ return false;
308
+ }
309
+
310
+ var year = parts[1];
311
+ var month = parts[2];
312
+ var date = parts[3];
313
+ var dayOfYear = parts[4];
314
+ var week = parts[5];
315
+ // ISO weekdays start with 1, native getDay() values start with 0
316
+ var dayOfWeek = parts[6] || 1;
317
+
318
+ d.setFullYear(year);
319
+
320
+ if (dayOfYear) {
321
+ d.setDate(1);
322
+ d.setMonth(0);
323
+ var offset = dayOfYear - 1; // offset, so 1-indexed, i.e., skip day 1
324
+ d.add(new goog.date.Interval(goog.date.Interval.DAYS, offset));
325
+ } else if (week) {
326
+ goog.date.setDateFromIso8601Week_(d, week, dayOfWeek);
327
+ } else {
328
+ if (month) {
329
+ d.setDate(1);
330
+ d.setMonth(month - 1);
331
+ }
332
+ if (date) {
333
+ d.setDate(date);
334
+ }
335
+ }
336
+
337
+ return true;
338
+ };
339
+
340
+
341
+ /**
342
+ * Sets date fields based on an ISO 8601 week string.
343
+ * See {@link http://en.wikipedia.org/wiki/ISO_week_date}, "Relation with the
344
+ * Gregorian Calendar". The first week of a new ISO year is the week with the
345
+ * majority of its days in the new Gregorian year. I.e., ISO Week 1's Thursday
346
+ * is in that year. ISO weeks always start on Monday. So ISO Week 1 can
347
+ * contain a few days from the previous Gregorian year. And ISO weeks always
348
+ * end on Sunday, so the last ISO week (Week 52 or 53) can have a few days from
349
+ * the following Gregorian year.
350
+ * Example: '1997-W01' lasts from 1996-12-30 to 1997-01-05. January 1, 1997 is
351
+ * a Wednesday. So W01's Monday is Dec.30, 1996, and Sunday is January 5, 1997.
352
+ *
353
+ * @param {goog.date.DateTime} d Object whose fields will be set.
354
+ * @param {number} week ISO week number.
355
+ * @param {number} dayOfWeek ISO day of week.
356
+ * @private
357
+ */
358
+ goog.date.setDateFromIso8601Week_ = function(d, week, dayOfWeek) {
359
+ // calculate offset for first week
360
+ d.setMonth(0);
361
+ d.setDate(1);
362
+ var jsDay = d.getDay();
363
+ // switch Sunday (0) to index 7; ISO days are 1-indexed
364
+ var jan1WeekDay = jsDay || 7;
365
+
366
+ var THURSDAY = 4;
367
+ if (jan1WeekDay <= THURSDAY) {
368
+ // was extended back to Monday
369
+ var startDelta = 1 - jan1WeekDay; // e.g., Thu(4) ==> -3
370
+ } else {
371
+ // was extended forward to Monday
372
+ startDelta = 8 - jan1WeekDay; // e.g., Fri(5) ==> +3
373
+ }
374
+
375
+ // find the absolute number of days to offset from the start of year
376
+ // to arrive close to the Gregorian equivalent (pending adjustments above)
377
+ // Note: decrement week multiplier by one because 1st week is
378
+ // represented by dayOfWeek value
379
+ var absoluteDays = Number(dayOfWeek) + (7 * (Number(week) - 1));
380
+
381
+ // convert from ISO weekday format to Gregorian calendar date
382
+ // note: subtract 1 because 1-indexed; offset should not include 1st of month
383
+ var delta = startDelta + absoluteDays - 1;
384
+ var interval = new goog.date.Interval(goog.date.Interval.DAYS, delta);
385
+ d.add(interval);
386
+ };
387
+
388
+
389
+ /**
390
+ * Sets time fields based on an ISO 8601 format string.
391
+ * Note: only time fields, not date fields.
392
+ *
393
+ * @param {!goog.date.DateTime} d Object whose fields will be set.
394
+ * @param {string} formatted A time expressed in ISO 8601 format.
395
+ * @return {boolean} Whether the parsing succeeded.
396
+ * @private
397
+ */
398
+ goog.date.setIso8601TimeOnly_ = function(d, formatted) {
399
+ // first strip timezone info from the end
400
+ var parts = formatted.match(goog.date.splitTimezoneStringRegex_);
401
+
402
+ var offset = 0; // local time if no timezone info
403
+ if (parts) {
404
+ if (parts[0] != 'Z') {
405
+ offset = parts[2] * 60 + Number(parts[3]);
406
+ offset *= parts[1] == '-' ? 1 : -1;
407
+ }
408
+ offset -= d.getTimezoneOffset();
409
+ formatted = formatted.substr(0, formatted.length - parts[0].length);
410
+ }
411
+
412
+ // then work out the time
413
+ parts = formatted.match(goog.date.splitTimeStringRegex_);
414
+ if (!parts) {
415
+ return false;
416
+ }
417
+
418
+ d.setHours(parts[1]);
419
+ d.setMinutes(parts[2] || 0);
420
+ d.setSeconds(parts[3] || 0);
421
+ d.setMilliseconds(parts[4] ? parts[4] * 1000 : 0);
422
+
423
+ if (offset != 0) {
424
+ // adjust the date and time according to the specified timezone
425
+ d.setTime(d.getTime() + offset * 60000);
426
+ }
427
+
428
+ return true;
429
+ };
430
+
431
+
432
+
433
+ /**
434
+ * Class representing a date/time interval. Used for date calculations.
435
+ * <pre>
436
+ * new goog.date.Interval(0, 1) // One month
437
+ * new goog.date.Interval(0, 0, 3, 1) // Three days and one hour
438
+ * new goog.date.Interval(goog.date.Interval.DAYS, 1) // One day
439
+ * </pre>
440
+ *
441
+ * @param {number|string=} opt_years Years or string representing date part.
442
+ * @param {number=} opt_months Months or number of whatever date part specified
443
+ * by first parameter.
444
+ * @param {number=} opt_days Days.
445
+ * @param {number=} opt_hours Hours.
446
+ * @param {number=} opt_minutes Minutes.
447
+ * @param {number=} opt_seconds Seconds.
448
+ * @constructor
449
+ */
450
+ goog.date.Interval = function(opt_years, opt_months, opt_days, opt_hours,
451
+ opt_minutes, opt_seconds) {
452
+ if (goog.isString(opt_years)) {
453
+ var type = opt_years;
454
+ var interval = /** @type {number} */ (opt_months);
455
+ this.years = type == goog.date.Interval.YEARS ? interval : 0;
456
+ this.months = type == goog.date.Interval.MONTHS ? interval : 0;
457
+ this.days = type == goog.date.Interval.DAYS ? interval : 0;
458
+ this.hours = type == goog.date.Interval.HOURS ? interval : 0;
459
+ this.minutes = type == goog.date.Interval.MINUTES ? interval : 0;
460
+ this.seconds = type == goog.date.Interval.SECONDS ? interval : 0;
461
+ } else {
462
+ this.years = /** @type {number} */ (opt_years) || 0;
463
+ this.months = opt_months || 0;
464
+ this.days = opt_days || 0;
465
+ this.hours = opt_hours || 0;
466
+ this.minutes = opt_minutes || 0;
467
+ this.seconds = opt_seconds || 0;
468
+ }
469
+ };
470
+
471
+
472
+ /**
473
+ * Parses an XML Schema duration (ISO 8601 extended).
474
+ * @see http://www.w3.org/TR/xmlschema-2/#duration
475
+ *
476
+ * @param {string} duration An XML schema duration in textual format.
477
+ * Recurring durations and weeks are not supported.
478
+ * @return {goog.date.Interval} The duration as a goog.date.Interval or null
479
+ * if the parse fails.
480
+ */
481
+ goog.date.Interval.fromIsoString = function(duration) {
482
+ var parts = duration.match(goog.date.splitDurationRegex_);
483
+ if (!parts) {
484
+ return null;
485
+ }
486
+
487
+ var timeEmpty = !(parts[6] || parts[7] || parts[8]);
488
+ var dateTimeEmpty = timeEmpty && !(parts[2] || parts[3] || parts[4]);
489
+ if (dateTimeEmpty || timeEmpty && parts[5]) {
490
+ return null;
491
+ }
492
+
493
+ var negative = parts[1];
494
+ var years = parseInt(parts[2], 10) || 0;
495
+ var months = parseInt(parts[3], 10) || 0;
496
+ var days = parseInt(parts[4], 10) || 0;
497
+ var hours = parseInt(parts[6], 10) || 0;
498
+ var minutes = parseInt(parts[7], 10) || 0;
499
+ var seconds = parseFloat(parts[8]) || 0;
500
+ return negative ? new goog.date.Interval(-years, -months, -days,
501
+ -hours, -minutes, -seconds) :
502
+ new goog.date.Interval(years, months, days,
503
+ hours, minutes, seconds);
504
+ };
505
+
506
+
507
+ /**
508
+ * Serializes goog.date.Interval into XML Schema duration (ISO 8601 extended).
509
+ * @see http://www.w3.org/TR/xmlschema-2/#duration
510
+ *
511
+ * @param {boolean=} opt_verbose Include zero fields in the duration string.
512
+ * @return {?string} An XML schema duration in ISO 8601 extended format,
513
+ * or null if the interval contains both positive and negative fields.
514
+ */
515
+ goog.date.Interval.prototype.toIsoString = function(opt_verbose) {
516
+ var minField = Math.min(this.years, this.months, this.days,
517
+ this.hours, this.minutes, this.seconds);
518
+ var maxField = Math.max(this.years, this.months, this.days,
519
+ this.hours, this.minutes, this.seconds);
520
+ if (minField < 0 && maxField > 0) {
521
+ return null;
522
+ }
523
+
524
+ // Return 0 seconds if all fields are zero.
525
+ if (!opt_verbose && minField == 0 && maxField == 0) {
526
+ return 'PT0S';
527
+ }
528
+
529
+ var res = [];
530
+
531
+ // Add sign and 'P' prefix.
532
+ if (minField < 0) {
533
+ res.push('-');
534
+ }
535
+ res.push('P');
536
+
537
+ // Add date.
538
+ if (this.years || opt_verbose) {
539
+ res.push(Math.abs(this.years) + 'Y');
540
+ }
541
+ if (this.months || opt_verbose) {
542
+ res.push(Math.abs(this.months) + 'M');
543
+ }
544
+ if (this.days || opt_verbose) {
545
+ res.push(Math.abs(this.days) + 'D');
546
+ }
547
+
548
+ // Add time.
549
+ if (this.hours || this.minutes || this.seconds || opt_verbose) {
550
+ res.push('T');
551
+ if (this.hours || opt_verbose) {
552
+ res.push(Math.abs(this.hours) + 'H');
553
+ }
554
+ if (this.minutes || opt_verbose) {
555
+ res.push(Math.abs(this.minutes) + 'M');
556
+ }
557
+ if (this.seconds || opt_verbose) {
558
+ res.push(Math.abs(this.seconds) + 'S');
559
+ }
560
+ }
561
+
562
+ return res.join('');
563
+ };
564
+
565
+
566
+ /**
567
+ * Tests whether the given interval is equal to this interval.
568
+ * Note, this is a simple field-by-field comparison, it doesn't
569
+ * account for comparisons like "12 months == 1 year".
570
+ *
571
+ * @param {goog.date.Interval} other The interval to test.
572
+ * @return {boolean} Whether the intervals are equal.
573
+ */
574
+ goog.date.Interval.prototype.equals = function(other) {
575
+ return other.years == this.years &&
576
+ other.months == this.months &&
577
+ other.days == this.days &&
578
+ other.hours == this.hours &&
579
+ other.minutes == this.minutes &&
580
+ other.seconds == this.seconds;
581
+ };
582
+
583
+
584
+ /**
585
+ * @return {!goog.date.Interval} A clone of the interval object.
586
+ */
587
+ goog.date.Interval.prototype.clone = function() {
588
+ return new goog.date.Interval(
589
+ this.years, this.months, this.days,
590
+ this.hours, this.minutes, this.seconds);
591
+ };
592
+
593
+
594
+ /**
595
+ * Years constant for the date parts.
596
+ * @type {string}
597
+ */
598
+ goog.date.Interval.YEARS = 'y';
599
+
600
+
601
+ /**
602
+ * Months constant for the date parts.
603
+ * @type {string}
604
+ */
605
+ goog.date.Interval.MONTHS = 'm';
606
+
607
+
608
+ /**
609
+ * Days constant for the date parts.
610
+ * @type {string}
611
+ */
612
+ goog.date.Interval.DAYS = 'd';
613
+
614
+
615
+ /**
616
+ * Hours constant for the date parts.
617
+ * @type {string}
618
+ */
619
+ goog.date.Interval.HOURS = 'h';
620
+
621
+
622
+ /**
623
+ * Minutes constant for the date parts.
624
+ * @type {string}
625
+ */
626
+ goog.date.Interval.MINUTES = 'n';
627
+
628
+
629
+ /**
630
+ * Seconds constant for the date parts.
631
+ * @type {string}
632
+ */
633
+ goog.date.Interval.SECONDS = 's';
634
+
635
+
636
+ /**
637
+ * @return {!goog.date.Interval} Negative of this interval.
638
+ */
639
+ goog.date.Interval.prototype.getInverse = function() {
640
+ return this.times(-1);
641
+ };
642
+
643
+
644
+ /**
645
+ * Calculates n * (this interval) by memberwise multiplication.
646
+ * @param {number} n An integer.
647
+ * @return {!goog.date.Interval} n * this.
648
+ */
649
+ goog.date.Interval.prototype.times = function(n) {
650
+ return new goog.date.Interval(this.years * n,
651
+ this.months * n,
652
+ this.days * n,
653
+ this.hours * n,
654
+ this.minutes * n,
655
+ this.seconds * n);
656
+ };
657
+
658
+
659
+ /**
660
+ * Gets the total number of seconds in the time interval. Assumes that months
661
+ * and years are empty.
662
+ * @return {number} Total number of seconds in the interval.
663
+ */
664
+ goog.date.Interval.prototype.getTotalSeconds = function() {
665
+ goog.asserts.assert(this.years == 0 && this.months == 0);
666
+ return ((this.days * 24 + this.hours) * 60 + this.minutes) * 60 +
667
+ this.seconds;
668
+ };
669
+
670
+
671
+ /**
672
+ * Adds the Interval in the argument to this Interval field by field.
673
+ *
674
+ * @param {goog.date.Interval} interval The Interval to add.
675
+ */
676
+ goog.date.Interval.prototype.add = function(interval) {
677
+ this.years += interval.years;
678
+ this.months += interval.months;
679
+ this.days += interval.days;
680
+ this.hours += interval.hours;
681
+ this.minutes += interval.minutes;
682
+ this.seconds += interval.seconds;
683
+ };
684
+
685
+
686
+
687
+ /**
688
+ * Class representing a date. Defaults to current date if none is specified.
689
+ *
690
+ * Implements most methods of the native js Date object (except the time related
691
+ * ones, {@see goog.date.DateTime}) and can be used interchangeably with it just
692
+ * as if goog.date.Date was a synonym of Date. To make this more transparent,
693
+ * Closure APIs should accept goog.date.DateLike instead of the real Date
694
+ * object.
695
+ *
696
+ * To allow goog.date.Date objects to be passed as arguments to methods
697
+ * expecting Date objects this class is marked as extending the built in Date
698
+ * object even though that's not strictly true.
699
+ *
700
+ * @param {number|Object=} opt_year Four digit year or a date-like object. If
701
+ * not set, the created object will contain the date determined by
702
+ * goog.now().
703
+ * @param {number=} opt_month Month, 0 = Jan, 11 = Dec.
704
+ * @param {number=} opt_date Date of month, 1 - 31.
705
+ * @constructor
706
+ * @see goog.date.DateTime
707
+ */
708
+ goog.date.Date = function(opt_year, opt_month, opt_date) {
709
+ // goog.date.DateTime assumes that only this.date_ is added in this ctor.
710
+ if (goog.isNumber(opt_year)) {
711
+ this.date_ = new Date(opt_year, opt_month || 0, opt_date || 1);
712
+ this.maybeFixDst_(opt_date || 1);
713
+ } else if (goog.isObject(opt_year)) {
714
+ this.date_ = new Date(opt_year.getFullYear(), opt_year.getMonth(),
715
+ opt_year.getDate());
716
+ this.maybeFixDst_(opt_year.getDate());
717
+ } else {
718
+ this.date_ = new Date(goog.now());
719
+ this.date_.setHours(0);
720
+ this.date_.setMinutes(0);
721
+ this.date_.setSeconds(0);
722
+ this.date_.setMilliseconds(0);
723
+ }
724
+ };
725
+
726
+
727
+ // TODO(anatol): It should use DateTimeSymbols
728
+ /**
729
+ * First day of week. 0 = Mon, 6 = Sun.
730
+ * @type {number}
731
+ * @private
732
+ */
733
+ goog.date.Date.prototype.firstDayOfWeek_ = goog.date.weekDay.MON;
734
+
735
+
736
+ /**
737
+ * The cut off weekday used for week number calculations. 0 = Mon, 6 = Sun.
738
+ * @type {number}
739
+ * @private
740
+ */
741
+ goog.date.Date.prototype.firstWeekCutOffDay_ = goog.date.weekDay.THU;
742
+
743
+
744
+ /**
745
+ * @return {!goog.date.Date} A clone of the date object.
746
+ */
747
+ goog.date.Date.prototype.clone = function() {
748
+ var date = new goog.date.Date(this.date_);
749
+ date.firstDayOfWeek_ = this.firstDayOfWeek_;
750
+ date.firstWeekCutOffDay_ = this.firstWeekCutOffDay_;
751
+
752
+ return date;
753
+ };
754
+
755
+
756
+ /**
757
+ * @return {number} The four digit year of date.
758
+ */
759
+ goog.date.Date.prototype.getFullYear = function() {
760
+ return this.date_.getFullYear();
761
+ };
762
+
763
+
764
+ /**
765
+ * Alias for getFullYear.
766
+ *
767
+ * @return {number} The four digit year of date.
768
+ * @see #getFullyear
769
+ */
770
+ goog.date.Date.prototype.getYear = function() {
771
+ return this.getFullYear();
772
+ };
773
+
774
+
775
+ /**
776
+ * @return {number} The month of date, 0 = Jan, 11 = Dec.
777
+ */
778
+ goog.date.Date.prototype.getMonth = function() {
779
+ return this.date_.getMonth();
780
+ };
781
+
782
+
783
+ /**
784
+ * @return {number} The date of month.
785
+ */
786
+ goog.date.Date.prototype.getDate = function() {
787
+ return this.date_.getDate();
788
+ };
789
+
790
+
791
+ /**
792
+ * Returns the number of milliseconds since 1 January 1970 00:00:00.
793
+ *
794
+ * @return {number} The number of milliseconds since 1 January 1970 00:00:00.
795
+ */
796
+ goog.date.Date.prototype.getTime = function() {
797
+ return this.date_.getTime();
798
+ };
799
+
800
+
801
+ /**
802
+ * @return {number} The day of week, US style. 0 = Sun, 6 = Sat.
803
+ */
804
+ goog.date.Date.prototype.getDay = function() {
805
+ return this.date_.getDay();
806
+ };
807
+
808
+
809
+ /**
810
+ * @return {number} The day of week, ISO style. 0 = Mon, 6 = Sun.
811
+ */
812
+ goog.date.Date.prototype.getIsoWeekday = function() {
813
+ return (this.getDay() + 6) % 7;
814
+ };
815
+
816
+
817
+ /**
818
+ * @return {number} The day of week according to firstDayOfWeek setting.
819
+ */
820
+ goog.date.Date.prototype.getWeekday = function() {
821
+ return (this.getIsoWeekday() - this.firstDayOfWeek_ + 7) % 7;
822
+ };
823
+
824
+
825
+ /**
826
+ * @return {number} The four digit year of date according to universal time.
827
+ */
828
+ goog.date.Date.prototype.getUTCFullYear = function() {
829
+ return this.date_.getUTCFullYear();
830
+ };
831
+
832
+
833
+ /**
834
+ * @return {number} The month of date according to universal time,
835
+ * 0 = Jan, 11 = Dec.
836
+ */
837
+ goog.date.Date.prototype.getUTCMonth = function() {
838
+ return this.date_.getUTCMonth();
839
+ };
840
+
841
+
842
+ /**
843
+ * @return {number} The date of month according to universal time.
844
+ */
845
+ goog.date.Date.prototype.getUTCDate = function() {
846
+ return this.date_.getUTCDate();
847
+ };
848
+
849
+
850
+ /**
851
+ * @return {number} The day of week according to universal time, US style.
852
+ * 0 = Sun, 1 = Mon, 6 = Sat.
853
+ */
854
+ goog.date.Date.prototype.getUTCDay = function() {
855
+ return this.date_.getDay();
856
+ };
857
+
858
+
859
+ /**
860
+ * @return {number} The hours value according to universal time.
861
+ */
862
+ goog.date.Date.prototype.getUTCHours = function() {
863
+ return this.date_.getUTCHours();
864
+ };
865
+
866
+
867
+ /**
868
+ * @return {number} The hours value according to universal time.
869
+ */
870
+ goog.date.Date.prototype.getUTCMinutes = function() {
871
+ return this.date_.getUTCMinutes();
872
+ };
873
+
874
+
875
+ /**
876
+ * @return {number} The day of week according to universal time, ISO style.
877
+ * 0 = Mon, 6 = Sun.
878
+ */
879
+ goog.date.Date.prototype.getUTCIsoWeekday = function() {
880
+ return (this.date_.getUTCDay() + 6) % 7;
881
+ };
882
+
883
+
884
+ /**
885
+ * @return {number} The day of week according to universal time and
886
+ * firstDayOfWeek setting.
887
+ */
888
+ goog.date.Date.prototype.getUTCWeekday = function() {
889
+ return (this.getUTCIsoWeekday() - this.firstDayOfWeek_ + 7) % 7;
890
+ };
891
+
892
+
893
+ /**
894
+ * @return {number} The first day of the week. 0 = Mon, 6 = Sun.
895
+ */
896
+ goog.date.Date.prototype.getFirstDayOfWeek = function() {
897
+ return this.firstDayOfWeek_;
898
+ };
899
+
900
+
901
+ /**
902
+ * @return {number} The cut off weekday used for week number calculations.
903
+ * 0 = Mon, 6 = Sun.
904
+ */
905
+ goog.date.Date.prototype.getFirstWeekCutOffDay = function() {
906
+ return this.firstWeekCutOffDay_;
907
+ };
908
+
909
+
910
+ /**
911
+ * @return {number} The number of days for the selected month.
912
+ */
913
+ goog.date.Date.prototype.getNumberOfDaysInMonth = function() {
914
+ return goog.date.getNumberOfDaysInMonth(this.getFullYear(), this.getMonth());
915
+ };
916
+
917
+
918
+ /**
919
+ * @return {number} The week number.
920
+ */
921
+ goog.date.Date.prototype.getWeekNumber = function() {
922
+ return goog.date.getWeekNumber(
923
+ this.getFullYear(), this.getMonth(), this.getDate(),
924
+ this.firstWeekCutOffDay_, this.firstDayOfWeek_);
925
+ };
926
+
927
+
928
+ /**
929
+ * @return {number} The day of year.
930
+ */
931
+ goog.date.Date.prototype.getDayOfYear = function() {
932
+ var dayOfYear = this.getDate();
933
+ var year = this.getFullYear();
934
+ for (var m = this.getMonth() - 1; m >= 0; m--) {
935
+ dayOfYear += goog.date.getNumberOfDaysInMonth(year, m);
936
+ }
937
+
938
+ return dayOfYear;
939
+ };
940
+
941
+
942
+ /**
943
+ * Returns timezone offset. The timezone offset is the delta in minutes between
944
+ * UTC and your local time. E.g., UTC+10 returns -600. Daylight savings time
945
+ * prevents this value from being constant.
946
+ *
947
+ * @return {number} The timezone offset.
948
+ */
949
+ goog.date.Date.prototype.getTimezoneOffset = function() {
950
+ return this.date_.getTimezoneOffset();
951
+ };
952
+
953
+
954
+ /**
955
+ * Returns timezone offset as a string. Returns offset in [+-]HH:mm format or Z
956
+ * for UTC.
957
+ *
958
+ * @return {string} The timezone offset as a string.
959
+ */
960
+ goog.date.Date.prototype.getTimezoneOffsetString = function() {
961
+ var tz;
962
+ var offset = this.getTimezoneOffset();
963
+
964
+ if (offset == 0) {
965
+ tz = 'Z';
966
+ } else {
967
+ var n = Math.abs(offset) / 60;
968
+ var h = Math.floor(n);
969
+ var m = (n - h) * 60;
970
+ tz = (offset > 0 ? '-' : '+') +
971
+ goog.string.padNumber(h, 2) + ':' +
972
+ goog.string.padNumber(m, 2);
973
+ }
974
+
975
+ return tz;
976
+ };
977
+
978
+
979
+ /**
980
+ * Sets the date.
981
+ *
982
+ * @param {goog.date.Date} date Date object to set date from.
983
+ */
984
+ goog.date.Date.prototype.set = function(date) {
985
+ this.date_ = new Date(date.getFullYear(), date.getMonth(), date.getDate());
986
+ };
987
+
988
+
989
+ /**
990
+ * Sets the year part of the date.
991
+ *
992
+ * @param {number} year Four digit year.
993
+ */
994
+ goog.date.Date.prototype.setFullYear = function(year) {
995
+ this.date_.setFullYear(year);
996
+ };
997
+
998
+
999
+ /**
1000
+ * Alias for setFullYear.
1001
+ *
1002
+ * @param {number} year Four digit year.
1003
+ * @see #setFullYear
1004
+ */
1005
+ goog.date.Date.prototype.setYear = function(year) {
1006
+ this.setFullYear(year);
1007
+ };
1008
+
1009
+
1010
+ /**
1011
+ * Sets the month part of the date.
1012
+ *
1013
+ * @param {number} month The month, where 0 = Jan, 11 = Dec.
1014
+ */
1015
+ goog.date.Date.prototype.setMonth = function(month) {
1016
+ this.date_.setMonth(month);
1017
+ };
1018
+
1019
+
1020
+ /**
1021
+ * Sets the day part of the date.
1022
+ *
1023
+ * @param {number} date The day part.
1024
+ */
1025
+ goog.date.Date.prototype.setDate = function(date) {
1026
+ this.date_.setDate(date);
1027
+ };
1028
+
1029
+
1030
+ /**
1031
+ * Sets the value of the date object as expressed in the number of milliseconds
1032
+ * since 1 January 1970 00:00:00.
1033
+ *
1034
+ * @param {number} ms Number of milliseconds since 1 Jan 1970.
1035
+ */
1036
+ goog.date.Date.prototype.setTime = function(ms) {
1037
+ this.date_.setTime(ms);
1038
+ };
1039
+
1040
+
1041
+ /**
1042
+ * Sets the year part of the date according to universal time.
1043
+ *
1044
+ * @param {number} year Four digit year.
1045
+ */
1046
+ goog.date.Date.prototype.setUTCFullYear = function(year) {
1047
+ this.date_.setUTCFullYear(year);
1048
+ };
1049
+
1050
+
1051
+ /**
1052
+ * Sets the month part of the date according to universal time.
1053
+ *
1054
+ * @param {number} month The month, where 0 = Jan, 11 = Dec.
1055
+ */
1056
+ goog.date.Date.prototype.setUTCMonth = function(month) {
1057
+ this.date_.setUTCMonth(month);
1058
+ };
1059
+
1060
+
1061
+ /**
1062
+ * Sets the day part of the date according to universal time.
1063
+ *
1064
+ * @param {number} date The UTC date.
1065
+ */
1066
+ goog.date.Date.prototype.setUTCDate = function(date) {
1067
+ this.date_.setUTCDate(date);
1068
+ };
1069
+
1070
+
1071
+ /**
1072
+ * Sets the first day of week.
1073
+ *
1074
+ * @param {number} day 0 = Mon, 6 = Sun.
1075
+ */
1076
+ goog.date.Date.prototype.setFirstDayOfWeek = function(day) {
1077
+ this.firstDayOfWeek_ = day;
1078
+ };
1079
+
1080
+
1081
+ /**
1082
+ * Sets cut off weekday used for week number calculations. 0 = Mon, 6 = Sun.
1083
+ *
1084
+ * @param {number} day The cut off weekday.
1085
+ */
1086
+ goog.date.Date.prototype.setFirstWeekCutOffDay = function(day) {
1087
+ this.firstWeekCutOffDay_ = day;
1088
+ };
1089
+
1090
+
1091
+ /**
1092
+ * Performs date calculation by adding the supplied interval to the date.
1093
+ *
1094
+ * @param {goog.date.Interval} interval Date interval to add.
1095
+ */
1096
+ goog.date.Date.prototype.add = function(interval) {
1097
+ if (interval.years || interval.months) {
1098
+ // As months have different number of days adding a month to Jan 31 by just
1099
+ // setting the month would result in a date in early March rather than Feb
1100
+ // 28 or 29. Doing it this way overcomes that problem.
1101
+
1102
+ // adjust year and month, accounting for both directions
1103
+ var month = this.getMonth() + interval.months + interval.years * 12;
1104
+ var year = this.getYear() + Math.floor(month / 12);
1105
+ month %= 12;
1106
+ if (month < 0) {
1107
+ month += 12;
1108
+ }
1109
+
1110
+ var daysInTargetMonth = goog.date.getNumberOfDaysInMonth(year, month);
1111
+ var date = Math.min(daysInTargetMonth, this.getDate());
1112
+
1113
+ // avoid inadvertently causing rollovers to adjacent months
1114
+ this.setDate(1);
1115
+
1116
+ this.setFullYear(year);
1117
+ this.setMonth(month);
1118
+ this.setDate(date);
1119
+ }
1120
+
1121
+ if (interval.days) {
1122
+ // Convert the days to milliseconds and add it to the UNIX timestamp.
1123
+ // Taking noon helps to avoid 1 day error due to the daylight saving.
1124
+ var noon = new Date(this.getYear(), this.getMonth(), this.getDate(), 12);
1125
+ var result = new Date(noon.getTime() + interval.days * 86400000);
1126
+
1127
+ // Set date to 1 to prevent rollover caused by setting the year or month.
1128
+ this.setDate(1);
1129
+ this.setFullYear(result.getFullYear());
1130
+ this.setMonth(result.getMonth());
1131
+ this.setDate(result.getDate());
1132
+
1133
+ this.maybeFixDst_(result.getDate());
1134
+ }
1135
+ };
1136
+
1137
+
1138
+ /**
1139
+ * Returns ISO 8601 string representation of date.
1140
+ *
1141
+ * @param {boolean=} opt_verbose Whether the verbose format should be used
1142
+ * instead of the default compact one.
1143
+ * @param {boolean=} opt_tz Whether the timezone offset should be included
1144
+ * in the string.
1145
+ * @return {string} ISO 8601 string representation of date.
1146
+ */
1147
+ goog.date.Date.prototype.toIsoString = function(opt_verbose, opt_tz) {
1148
+ var str = [
1149
+ this.getFullYear(),
1150
+ goog.string.padNumber(this.getMonth() + 1, 2),
1151
+ goog.string.padNumber(this.getDate(), 2)
1152
+ ];
1153
+
1154
+ return str.join((opt_verbose) ? '-' : '') +
1155
+ (opt_tz ? this.getTimezoneOffsetString() : '');
1156
+ };
1157
+
1158
+
1159
+ /**
1160
+ * Returns ISO 8601 string representation of date according to universal time.
1161
+ *
1162
+ * @param {boolean=} opt_verbose Whether the verbose format should be used
1163
+ * instead of the default compact one.
1164
+ * @param {boolean=} opt_tz Whether the timezone offset should be included in
1165
+ * the string.
1166
+ * @return {string} ISO 8601 string representation of date according to
1167
+ * universal time.
1168
+ */
1169
+ goog.date.Date.prototype.toUTCIsoString = function(opt_verbose, opt_tz) {
1170
+ var str = [
1171
+ this.getUTCFullYear(),
1172
+ goog.string.padNumber(this.getUTCMonth() + 1, 2),
1173
+ goog.string.padNumber(this.getUTCDate(), 2)
1174
+ ];
1175
+
1176
+ return str.join((opt_verbose) ? '-' : '') + (opt_tz ? 'Z' : '');
1177
+ };
1178
+
1179
+
1180
+ /**
1181
+ * Tests whether given date is equal to this Date.
1182
+ * Note: This ignores units more precise than days (hours and below)
1183
+ * and also ignores timezone considerations.
1184
+ *
1185
+ * @param {goog.date.Date} other The date to compare.
1186
+ * @return {boolean} Whether the given date is equal to this one.
1187
+ */
1188
+ goog.date.Date.prototype.equals = function(other) {
1189
+ return this.getYear() == other.getYear() &&
1190
+ this.getMonth() == other.getMonth() &&
1191
+ this.getDate() == other.getDate();
1192
+ };
1193
+
1194
+
1195
+ /**
1196
+ * Overloaded toString method for object.
1197
+ * @return {string} ISO 8601 string representation of date.
1198
+ */
1199
+ goog.date.Date.prototype.toString = function() {
1200
+ return this.toIsoString();
1201
+ };
1202
+
1203
+
1204
+ /**
1205
+ * Fixes date to account for daylight savings time in browsers that fail to do
1206
+ * so automatically.
1207
+ * @param {number} expected Expected date.
1208
+ * @private
1209
+ */
1210
+ goog.date.Date.prototype.maybeFixDst_ = function(expected) {
1211
+ if (this.getDate() != expected) {
1212
+ var dir = this.getDate() < expected ? 1 : -1;
1213
+ this.date_.setUTCHours(this.date_.getUTCHours() + dir);
1214
+ }
1215
+ };
1216
+
1217
+
1218
+ /**
1219
+ * @return {number} Value of wrapped date.
1220
+ */
1221
+ goog.date.Date.prototype.valueOf = function() {
1222
+ return this.date_.valueOf();
1223
+ };
1224
+
1225
+
1226
+
1227
+ /**
1228
+ * Class representing a date and time. Defaults to current date and time if none
1229
+ * is specified.
1230
+ *
1231
+ * Implements most methods of the native js Date object and can be used
1232
+ * interchangeably with it just as if goog.date.DateTime was a subclass of Date.
1233
+ *
1234
+ * @param {number|Object=} opt_year Four digit year or a date-like object. If
1235
+ * not set, the created object will contain the date determined by
1236
+ * goog.now().
1237
+ * @param {number=} opt_month Month, 0 = Jan, 11 = Dec.
1238
+ * @param {number=} opt_date Date of month, 1 - 31.
1239
+ * @param {number=} opt_hours Hours, 0 - 24.
1240
+ * @param {number=} opt_minutes Minutes, 0 - 59.
1241
+ * @param {number=} opt_seconds Seconds, 0 - 61.
1242
+ * @param {number=} opt_milliseconds Milliseconds, 0 - 999.
1243
+ * @constructor
1244
+ * @extends {goog.date.Date}
1245
+ */
1246
+ goog.date.DateTime = function(opt_year, opt_month, opt_date, opt_hours,
1247
+ opt_minutes, opt_seconds, opt_milliseconds) {
1248
+ if (goog.isNumber(opt_year)) {
1249
+ this.date_ = new Date(opt_year, opt_month || 0, opt_date || 1,
1250
+ opt_hours || 0, opt_minutes || 0, opt_seconds || 0,
1251
+ opt_milliseconds || 0);
1252
+ } else {
1253
+ this.date_ = new Date(opt_year ? opt_year.getTime() : goog.now());
1254
+ }
1255
+ };
1256
+ goog.inherits(goog.date.DateTime, goog.date.Date);
1257
+
1258
+
1259
+ /**
1260
+ * Creates a DateTime from a datetime string expressed in RFC 822 format.
1261
+ *
1262
+ * @param {string} formatted A date or datetime expressed in RFC 822 format.
1263
+ * @return {goog.date.DateTime} Parsed date or null if parse fails.
1264
+ */
1265
+ goog.date.DateTime.fromRfc822String = function(formatted) {
1266
+ var date = new Date(formatted);
1267
+ return !isNaN(date.getTime()) ? new goog.date.DateTime(date) : null;
1268
+ };
1269
+
1270
+
1271
+ /**
1272
+ * Returns the hours part of the datetime.
1273
+ *
1274
+ * @return {number} An integer between 0 and 23, representing the hour.
1275
+ */
1276
+ goog.date.DateTime.prototype.getHours = function() {
1277
+ return this.date_.getHours();
1278
+ };
1279
+
1280
+
1281
+ /**
1282
+ * Returns the minutes part of the datetime.
1283
+ *
1284
+ * @return {number} An integer between 0 and 59, representing the minutes.
1285
+ */
1286
+ goog.date.DateTime.prototype.getMinutes = function() {
1287
+ return this.date_.getMinutes();
1288
+ };
1289
+
1290
+
1291
+ /**
1292
+ * Returns the seconds part of the datetime.
1293
+ *
1294
+ * @return {number} An integer between 0 and 59, representing the seconds.
1295
+ */
1296
+ goog.date.DateTime.prototype.getSeconds = function() {
1297
+ return this.date_.getSeconds();
1298
+ };
1299
+
1300
+
1301
+ /**
1302
+ * Returns the milliseconds part of the datetime.
1303
+ *
1304
+ * @return {number} An integer between 0 and 999, representing the milliseconds.
1305
+ */
1306
+ goog.date.DateTime.prototype.getMilliseconds = function() {
1307
+ return this.date_.getMilliseconds();
1308
+ };
1309
+
1310
+
1311
+ /**
1312
+ * Returns the day of week according to universal time, US style.
1313
+ *
1314
+ * @return {number} Day of week, 0 = Sun, 1 = Mon, 6 = Sat.
1315
+ */
1316
+ goog.date.DateTime.prototype.getUTCDay = function() {
1317
+ return this.date_.getUTCDay();
1318
+ };
1319
+
1320
+
1321
+ /**
1322
+ * Returns the hours part of the datetime according to universal time.
1323
+ *
1324
+ * @return {number} An integer between 0 and 23, representing the hour.
1325
+ */
1326
+ goog.date.DateTime.prototype.getUTCHours = function() {
1327
+ return this.date_.getUTCHours();
1328
+ };
1329
+
1330
+
1331
+ /**
1332
+ * Returns the minutes part of the datetime according to universal time.
1333
+ *
1334
+ * @return {number} An integer between 0 and 59, representing the minutes.
1335
+ */
1336
+ goog.date.DateTime.prototype.getUTCMinutes = function() {
1337
+ return this.date_.getUTCMinutes();
1338
+ };
1339
+
1340
+
1341
+ /**
1342
+ * Returns the seconds part of the datetime according to universal time.
1343
+ *
1344
+ * @return {number} An integer between 0 and 59, representing the seconds.
1345
+ */
1346
+ goog.date.DateTime.prototype.getUTCSeconds = function() {
1347
+ return this.date_.getUTCSeconds();
1348
+ };
1349
+
1350
+
1351
+ /**
1352
+ * Returns the milliseconds part of the datetime according to universal time.
1353
+ *
1354
+ * @return {number} An integer between 0 and 999, representing the milliseconds.
1355
+ */
1356
+ goog.date.DateTime.prototype.getUTCMilliseconds = function() {
1357
+ return this.date_.getUTCMilliseconds();
1358
+ };
1359
+
1360
+
1361
+ /**
1362
+ * Sets the hours part of the datetime.
1363
+ *
1364
+ * @param {number} hours An integer between 0 and 23, representing the hour.
1365
+ */
1366
+ goog.date.DateTime.prototype.setHours = function(hours) {
1367
+ this.date_.setHours(hours);
1368
+ };
1369
+
1370
+
1371
+ /**
1372
+ * Sets the minutes part of the datetime.
1373
+ *
1374
+ * @param {number} minutes Integer between 0 and 59, representing the minutes.
1375
+ */
1376
+ goog.date.DateTime.prototype.setMinutes = function(minutes) {
1377
+ this.date_.setMinutes(minutes);
1378
+ };
1379
+
1380
+
1381
+ /**
1382
+ * Sets the seconds part of the datetime.
1383
+ *
1384
+ * @param {number} seconds Integer between 0 and 59, representing the seconds.
1385
+ */
1386
+ goog.date.DateTime.prototype.setSeconds = function(seconds) {
1387
+ this.date_.setSeconds(seconds);
1388
+ };
1389
+
1390
+
1391
+ /**
1392
+ * Sets the seconds part of the datetime.
1393
+ *
1394
+ * @param {number} ms Integer between 0 and 999, representing the milliseconds.
1395
+ */
1396
+ goog.date.DateTime.prototype.setMilliseconds = function(ms) {
1397
+ this.date_.setMilliseconds(ms);
1398
+ };
1399
+
1400
+
1401
+ /**
1402
+ * Sets the hours part of the datetime according to universal time.
1403
+ *
1404
+ * @param {number} hours An integer between 0 and 23, representing the hour.
1405
+ */
1406
+ goog.date.DateTime.prototype.setUTCHours = function(hours) {
1407
+ this.date_.setUTCHours(hours);
1408
+ };
1409
+
1410
+
1411
+ /**
1412
+ * Sets the minutes part of the datetime according to universal time.
1413
+ *
1414
+ * @param {number} minutes Integer between 0 and 59, representing the minutes.
1415
+ */
1416
+ goog.date.DateTime.prototype.setUTCMinutes = function(minutes) {
1417
+ this.date_.setUTCMinutes(minutes);
1418
+ };
1419
+
1420
+
1421
+ /**
1422
+ * Sets the seconds part of the datetime according to universal time.
1423
+ *
1424
+ * @param {number} seconds Integer between 0 and 59, representing the seconds.
1425
+ */
1426
+ goog.date.DateTime.prototype.setUTCSeconds = function(seconds) {
1427
+ this.date_.setUTCSeconds(seconds);
1428
+ };
1429
+
1430
+
1431
+ /**
1432
+ * Sets the seconds part of the datetime according to universal time.
1433
+ *
1434
+ * @param {number} ms Integer between 0 and 999, representing the milliseconds.
1435
+ */
1436
+ goog.date.DateTime.prototype.setUTCMilliseconds = function(ms) {
1437
+ this.date_.setUTCMilliseconds(ms);
1438
+ };
1439
+
1440
+
1441
+ /**
1442
+ * Performs date calculation by adding the supplied interval to the date.
1443
+ *
1444
+ * @param {goog.date.Interval} interval Date interval to add.
1445
+ */
1446
+ goog.date.DateTime.prototype.add = function(interval) {
1447
+ goog.date.Date.prototype.add.call(this, interval);
1448
+
1449
+ if (interval.hours) {
1450
+ this.setHours(this.date_.getHours() + interval.hours);
1451
+ }
1452
+ if (interval.minutes) {
1453
+ this.setMinutes(this.date_.getMinutes() + interval.minutes);
1454
+ }
1455
+ if (interval.seconds) {
1456
+ this.setSeconds(this.date_.getSeconds() + interval.seconds);
1457
+ }
1458
+ };
1459
+
1460
+
1461
+ /**
1462
+ * Returns ISO 8601 string representation of date/time.
1463
+ *
1464
+ * @param {boolean=} opt_verbose Whether the verbose format should be used
1465
+ * instead of the default compact one.
1466
+ * @param {boolean=} opt_tz Whether the timezone offset should be included
1467
+ * in the string.
1468
+ * @return {string} ISO 8601 string representation of date/time.
1469
+ */
1470
+ goog.date.DateTime.prototype.toIsoString = function(opt_verbose, opt_tz) {
1471
+ var dateString = goog.date.Date.prototype.toIsoString.call(this, opt_verbose);
1472
+
1473
+ if (opt_verbose) {
1474
+ return dateString + ' ' +
1475
+ goog.string.padNumber(this.getHours(), 2) + ':' +
1476
+ goog.string.padNumber(this.getMinutes(), 2) + ':' +
1477
+ goog.string.padNumber(this.getSeconds(), 2) +
1478
+ (opt_tz ? this.getTimezoneOffsetString() : '');
1479
+ }
1480
+
1481
+ return dateString + 'T' +
1482
+ goog.string.padNumber(this.getHours(), 2) +
1483
+ goog.string.padNumber(this.getMinutes(), 2) +
1484
+ goog.string.padNumber(this.getSeconds(), 2) +
1485
+ (opt_tz ? this.getTimezoneOffsetString() : '');
1486
+ };
1487
+
1488
+
1489
+ /**
1490
+ * Returns XML Schema 2 string representation of date/time.
1491
+ * The return value is also ISO 8601 compliant.
1492
+ *
1493
+ * @param {boolean=} opt_timezone Should the timezone offset be included in the
1494
+ * string?.
1495
+ * @return {string} XML Schema 2 string representation of date/time.
1496
+ */
1497
+ goog.date.DateTime.prototype.toXmlDateTime = function(opt_timezone) {
1498
+ return goog.date.Date.prototype.toIsoString.call(this, true) + 'T' +
1499
+ goog.string.padNumber(this.getHours(), 2) + ':' +
1500
+ goog.string.padNumber(this.getMinutes(), 2) + ':' +
1501
+ goog.string.padNumber(this.getSeconds(), 2) +
1502
+ (opt_timezone ? this.getTimezoneOffsetString() : '');
1503
+ };
1504
+
1505
+
1506
+ /**
1507
+ * Returns ISO 8601 string representation of date/time according to universal
1508
+ * time.
1509
+ *
1510
+ * @param {boolean=} opt_verbose Whether the opt_verbose format should be
1511
+ * returned instead of the default compact one.
1512
+ * @param {boolean=} opt_tz Whether the the timezone offset should be included
1513
+ * in the string.
1514
+ * @return {string} ISO 8601 string representation of date/time according to
1515
+ * universal time.
1516
+ */
1517
+ goog.date.DateTime.prototype.toUTCIsoString = function(opt_verbose, opt_tz) {
1518
+ var dateStr = goog.date.Date.prototype.toUTCIsoString.call(this, opt_verbose);
1519
+
1520
+ if (opt_verbose) {
1521
+ return dateStr + ' ' +
1522
+ goog.string.padNumber(this.getUTCHours(), 2) + ':' +
1523
+ goog.string.padNumber(this.getUTCMinutes(), 2) + ':' +
1524
+ goog.string.padNumber(this.getUTCSeconds(), 2) +
1525
+ (opt_tz ? 'Z' : '');
1526
+ }
1527
+
1528
+ return dateStr + 'T' +
1529
+ goog.string.padNumber(this.getUTCHours(), 2) +
1530
+ goog.string.padNumber(this.getUTCMinutes(), 2) +
1531
+ goog.string.padNumber(this.getUTCSeconds(), 2) +
1532
+ (opt_tz ? 'Z' : '');
1533
+ };
1534
+
1535
+
1536
+ /**
1537
+ * Tests whether given datetime is exactly equal to this DateTime.
1538
+ *
1539
+ * @param {goog.date.DateTime} other The datetime to compare.
1540
+ * @return {boolean} Whether the given datetime is exactly equal to this one.
1541
+ */
1542
+ goog.date.DateTime.prototype.equals = function(other) {
1543
+ return this.getTime() == other.getTime();
1544
+ };
1545
+
1546
+
1547
+ /**
1548
+ * Overloaded toString method for object.
1549
+ * @return {string} ISO 8601 string representation of date/time.
1550
+ */
1551
+ goog.date.DateTime.prototype.toString = function() {
1552
+ return this.toIsoString();
1553
+ };
1554
+
1555
+
1556
+ /**
1557
+ * Generates time label for the datetime, e.g., '5:30am'.
1558
+ * By default this does not pad hours (e.g., to '05:30') and it does add
1559
+ * an am/pm suffix.
1560
+ * TODO(user): i18n -- hardcoding time format like this is bad. E.g., in CJK
1561
+ * locales, need Chinese characters for hour and minute units.
1562
+ * @param {boolean=} opt_padHours Whether to pad hours, e.g., '05:30' vs '5:30'.
1563
+ * @param {boolean=} opt_showAmPm Whether to show the 'am' and 'pm' suffix.
1564
+ * @param {boolean=} opt_omitZeroMinutes E.g., '5:00pm' becomes '5pm',
1565
+ * but '5:01pm' remains '5:01pm'.
1566
+ * @return {string} The time label.
1567
+ */
1568
+ goog.date.DateTime.prototype.toUsTimeString = function(opt_padHours,
1569
+ opt_showAmPm,
1570
+ opt_omitZeroMinutes) {
1571
+ var hours = this.getHours();
1572
+
1573
+ // show am/pm marker by default
1574
+ if (!goog.isDef(opt_showAmPm)) {
1575
+ opt_showAmPm = true;
1576
+ }
1577
+
1578
+ // 12pm
1579
+ var isPM = hours == 12;
1580
+
1581
+ // change from 1-24 to 1-12 basis
1582
+ if (hours > 12) {
1583
+ hours -= 12;
1584
+ isPM = true;
1585
+ }
1586
+
1587
+ // midnight is expressed as "12am", but if am/pm marker omitted, keep as '0'
1588
+ if (hours == 0 && opt_showAmPm) {
1589
+ hours = 12;
1590
+ }
1591
+
1592
+ var label = opt_padHours ? goog.string.padNumber(hours, 2) : String(hours);
1593
+ var minutes = this.getMinutes();
1594
+ if (!opt_omitZeroMinutes || minutes > 0) {
1595
+ label += ':' + goog.string.padNumber(minutes, 2);
1596
+ }
1597
+
1598
+ // by default, show am/pm suffix
1599
+ if (opt_showAmPm) {
1600
+ /**
1601
+ * @desc Suffix for morning times.
1602
+ */
1603
+ var MSG_TIME_AM = goog.getMsg('am');
1604
+
1605
+ /**
1606
+ * @desc Suffix for afternoon times.
1607
+ */
1608
+ var MSG_TIME_PM = goog.getMsg('pm');
1609
+
1610
+ label += isPM ? MSG_TIME_PM : MSG_TIME_AM;
1611
+ }
1612
+ return label;
1613
+ };
1614
+
1615
+
1616
+ /**
1617
+ * Generates time label for the datetime in standard ISO 24-hour time format.
1618
+ * E.g., '06:00:00' or '23:30:15'.
1619
+ * @param {boolean=} opt_showSeconds Whether to shows seconds. Defaults to TRUE.
1620
+ * @return {string} The time label.
1621
+ */
1622
+ goog.date.DateTime.prototype.toIsoTimeString = function(opt_showSeconds) {
1623
+ var hours = this.getHours();
1624
+ var label = goog.string.padNumber(hours, 2) +
1625
+ ':' +
1626
+ goog.string.padNumber(this.getMinutes(), 2);
1627
+ if (!goog.isDef(opt_showSeconds) || opt_showSeconds) {
1628
+ label += ':' + goog.string.padNumber(this.getSeconds(), 2);
1629
+ }
1630
+ return label;
1631
+ };
1632
+
1633
+
1634
+ /**
1635
+ * @return {!goog.date.DateTime} A clone of the datetime object.
1636
+ */
1637
+ goog.date.DateTime.prototype.clone = function() {
1638
+ var date = new goog.date.DateTime(this.date_);
1639
+ date.setFirstDayOfWeek(this.getFirstDayOfWeek());
1640
+ date.setFirstWeekCutOffDay(this.getFirstWeekCutOffDay());
1641
+ return date;
1642
+ };