selenium-webdriver 2.46.2 → 2.47.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGES CHANGED
@@ -1,3 +1,9 @@
1
+ 2.47.0 (2015-07-29)
2
+ ===================
3
+
4
+ Safari:
5
+ * Remove support for installing additional extensions due to architectural changes introduced with Safari 7
6
+
1
7
  2.46.2 (2015-06-05)
2
8
  ===================
3
9
  * Fix encoding issue which prevents Element#send_keys to work on Ruby < 2.0 (#621)
data/Gemfile.lock CHANGED
@@ -10,18 +10,18 @@ PATH
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.3.7)
13
+ addressable (2.3.8)
14
14
  builder (3.2.2)
15
- childprocess (0.5.5)
15
+ childprocess (0.5.6)
16
16
  ffi (~> 1.0, >= 1.0.11)
17
17
  ci_reporter (1.9.3)
18
18
  builder (>= 2.1.2)
19
19
  crack (0.4.2)
20
20
  safe_yaml (~> 1.0.0)
21
21
  diff-lcs (1.2.5)
22
- ffi (1.9.6)
23
- multi_json (1.10.1)
24
- rack (1.6.0)
22
+ ffi (1.9.10)
23
+ multi_json (1.11.2)
24
+ rack (1.6.4)
25
25
  rspec (2.99.0)
26
26
  rspec-core (~> 2.99.0)
27
27
  rspec-expectations (~> 2.99.0)
@@ -29,13 +29,13 @@ GEM
29
29
  rspec-core (2.99.2)
30
30
  rspec-expectations (2.99.2)
31
31
  diff-lcs (>= 1.1.3, < 2.0)
32
- rspec-mocks (2.99.3)
32
+ rspec-mocks (2.99.4)
33
33
  rubyzip (1.1.7)
34
34
  safe_yaml (1.0.4)
35
- webmock (1.20.4)
35
+ webmock (1.21.0)
36
36
  addressable (>= 2.3.6)
37
37
  crack (>= 0.3.2)
38
- websocket (1.2.1)
38
+ websocket (1.2.2)
39
39
 
40
40
  PLATFORMS
41
41
  ruby
@@ -46,3 +46,6 @@ DEPENDENCIES
46
46
  rspec (~> 2.99.0)
47
47
  selenium-webdriver!
48
48
  webmock (~> 1.7, >= 1.7.5)
49
+
50
+ BUNDLED WITH
51
+ 1.10.6
@@ -9,6 +9,7 @@
9
9
  "browser.link.open_external": 2,
10
10
  "browser.link.open_newwindow": 2,
11
11
  "browser.offline": false,
12
+ "browser.reader.detectedFirstArticle": true,
12
13
  "browser.safebrowsing.enabled": false,
13
14
  "browser.safebrowsing.malware.enabled": false,
14
15
  "browser.search.update": false,
@@ -30,6 +31,7 @@
30
31
  "extensions.logging.enabled": true,
31
32
  "extensions.update.enabled": false,
32
33
  "extensions.update.notifyUser": false,
34
+ "javascript.enabled": true,
33
35
  "network.manage-offline-status": false,
34
36
  "network.http.phishy-userpass-length": 255,
35
37
  "offline-apps.allow_by_default": true,
@@ -60,7 +60,6 @@ end # Selenium
60
60
 
61
61
  require 'selenium/webdriver/safari/browser'
62
62
  require 'selenium/webdriver/safari/server'
63
- require 'selenium/webdriver/safari/extensions'
64
63
  require 'selenium/webdriver/safari/options'
65
64
  require 'selenium/webdriver/safari/bridge'
66
65
 
@@ -31,9 +31,6 @@ module Selenium
31
31
 
32
32
  @command_id ||= 0
33
33
 
34
- @extensions = Extensions.new(safari_options)
35
- @extensions.install
36
-
37
34
  # TODO: handle safari_opts['cleanSession']
38
35
  @server = Server.new(safari_options.port, command_timeout)
39
36
  @server.start
@@ -51,7 +48,6 @@ module Selenium
51
48
 
52
49
  @server.stop
53
50
  @safari.stop
54
- @extensions.uninstall
55
51
  end
56
52
 
57
53
  def driver_extensions
@@ -22,25 +22,15 @@ module Selenium
22
22
  module Safari
23
23
  class Options
24
24
  attr_accessor :port, :data_dir, :skip_extension_installation
25
- attr_reader :extensions
26
25
 
27
26
  def initialize(opts = {})
28
- @extensions = []
29
27
  extract_options(opts)
30
28
  end
31
29
 
32
- def add_extension(ext)
33
- @extensions << verify_safari_extension(ext)
34
- end
35
-
36
30
  def clean_session?
37
31
  !!@clean_session
38
32
  end
39
33
 
40
- def skip_extension_installation?
41
- !!@skip_extension_installation
42
- end
43
-
44
34
  def to_capabilities
45
35
  caps = Remote::Capabilities.safari
46
36
  caps.merge!('safari.options' => as_json)
@@ -53,43 +43,15 @@ module Selenium
53
43
  'port' => port,
54
44
  'dataDir' => data_dir,
55
45
  'cleanSession' => clean_session?,
56
- 'extensions' => extensions_as_json,
57
- 'skipExtensionInstallation' => skip_extension_installation?
58
46
  }
59
47
  end
60
48
 
61
49
  private
62
50
 
63
- def extensions_as_json
64
- @extensions.map do |path|
65
- {'filename' => path.basename, 'contents' => Base64.strict_encode64(path.read) }
66
- end
67
- end
68
-
69
51
  def extract_options(opts)
70
52
  @port = Integer(opts[:port] || PortProber.random)
71
53
  @data_dir = opts[:custom_data_dir] || opts[:data_dir]
72
54
  @clean_session = opts[:clean_session]
73
-
74
- Array(opts[:extensions]).each { |ext| add_extension(ext) }
75
-
76
- if opts.key?(:install_extension)
77
- @skip_extension_installation = !opts[:install_extension]
78
- elsif opts.key?(:skip_extension_installation)
79
- @skip_extension_installation = opts[:skip_extension_installation]
80
- else
81
- @skip_extension_installation = false
82
- end
83
- end
84
-
85
- def verify_safari_extension(path)
86
- pn = Pathname.new(path)
87
-
88
- unless pn.file? && pn.extname == '.safariextz'
89
- raise ArgumentError, "invalid Safari extension path: #{path}"
90
- end
91
-
92
- pn
93
55
  end
94
56
 
95
57
  end # Options
@@ -20,6 +20,8 @@ goog.DEBUG = !0;
20
20
  goog.LOCALE = "en";
21
21
  goog.TRUSTED_SITE = !0;
22
22
  goog.STRICT_MODE_COMPATIBLE = !1;
23
+ goog.DISALLOW_TEST_ONLY_CODE = COMPILED && !goog.DEBUG;
24
+ goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING = !1;
23
25
  goog.provide = function(a) {
24
26
  if (!COMPILED && goog.isProvided_(a)) {
25
27
  throw Error('Namespace "' + a + '" already declared.');
@@ -82,7 +84,7 @@ goog.module.declareLegacyNamespace = function() {
82
84
  goog.moduleLoaderState_.declareLegacyNamespace = !0;
83
85
  };
84
86
  goog.setTestOnly = function(a) {
85
- if (COMPILED && !goog.DEBUG) {
87
+ if (goog.DISALLOW_TEST_ONLY_CODE) {
86
88
  throw a = a || "", Error("Importing test-only code into non-debug environment" + (a ? ": " + a : "."));
87
89
  }
88
90
  };
@@ -143,9 +145,6 @@ goog.require = function(a) {
143
145
  goog.basePath = "";
144
146
  goog.nullFunction = function() {
145
147
  };
146
- goog.identityFunction = function(a, b) {
147
- return a;
148
- };
149
148
  goog.abstractMethod = function() {
150
149
  throw Error("unimplemented abstract method");
151
150
  };
@@ -171,7 +170,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
171
170
  goog.basePath = goog.global.CLOSURE_BASE_PATH;
172
171
  } else {
173
172
  if (goog.inHtmlDocument_()) {
174
- for (var a = goog.global.document.getElementsByTagName("script"), b = a.length - 1;0 <= b;--b) {
173
+ for (var a = goog.global.document.getElementsByTagName("SCRIPT"), b = a.length - 1;0 <= b;--b) {
175
174
  var c = a[b].src, d = c.lastIndexOf("?"), d = -1 == d ? c.length : d;
176
175
  if ("base.js" == c.substr(d - 7, 7)) {
177
176
  goog.basePath = c.substr(0, d - 7);
@@ -182,7 +181,7 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
182
181
  }
183
182
  }, goog.importScript_ = function(a, b) {
184
183
  (goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_)(a, b) && (goog.dependencies_.written[a] = !0);
185
- }, goog.IS_OLD_IE_ = goog.global.document && goog.global.document.all && !goog.global.atob, goog.importModule_ = function(a) {
184
+ }, goog.IS_OLD_IE_ = !goog.global.atob && goog.global.document && goog.global.document.all, goog.importModule_ = function(a) {
186
185
  goog.importScript_("", 'goog.retrieveAndExecModule_("' + a + '");') && (goog.dependencies_.written[a] = !0);
187
186
  }, goog.queuedModules_ = [], goog.wrapModule_ = function(a, b) {
188
187
  return goog.LOAD_MODULE_USING_EVAL && goog.isDef(goog.global.JSON) ? "goog.loadModule(" + goog.global.JSON.stringify(b + "\n//# sourceURL=" + a + "\n") + ");" : 'goog.loadModule(function(exports) {"use strict";' + b + "\n;return exports});\n//# sourceURL=" + a + "\n";
@@ -198,16 +197,16 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
198
197
  }, goog.maybeProcessDeferredDep_ = function(a) {
199
198
  goog.isDeferredModule_(a) && goog.allDepsAreAvailable_(a) && (a = goog.getPathFromDeps_(a), goog.maybeProcessDeferredPath_(goog.basePath + a));
200
199
  }, goog.isDeferredModule_ = function(a) {
201
- return(a = goog.getPathFromDeps_(a)) && goog.dependencies_.pathIsModule[a] ? goog.basePath + a in goog.dependencies_.deferred : !1;
200
+ return (a = goog.getPathFromDeps_(a)) && goog.dependencies_.pathIsModule[a] ? goog.basePath + a in goog.dependencies_.deferred : !1;
202
201
  }, goog.allDepsAreAvailable_ = function(a) {
203
202
  if ((a = goog.getPathFromDeps_(a)) && a in goog.dependencies_.requires) {
204
203
  for (var b in goog.dependencies_.requires[a]) {
205
204
  if (!goog.isProvided_(b) && !goog.isDeferredModule_(b)) {
206
- return!1;
205
+ return !1;
207
206
  }
208
207
  }
209
208
  }
210
- return!0;
209
+ return !0;
211
210
  }, goog.maybeProcessDeferredPath_ = function(a) {
212
211
  if (a in goog.dependencies_.deferred) {
213
212
  var b = goog.dependencies_.deferred[a];
@@ -246,24 +245,33 @@ goog.DEPENDENCIES_ENABLED && (goog.included_ = {}, goog.dependencies_ = {pathIsM
246
245
  }
247
246
  }, goog.loadModuleFromSource_ = function(a) {
248
247
  eval(a);
249
- return{};
248
+ return {};
249
+ }, goog.writeScriptSrcNode_ = function(a) {
250
+ goog.global.document.write('<script type="text/javascript" src="' + a + '">\x3c/script>');
251
+ }, goog.appendScriptSrcNode_ = function(a) {
252
+ var b = goog.global.document, c = b.createElement("script");
253
+ c.type = "text/javascript";
254
+ c.src = a;
255
+ c.defer = !1;
256
+ c.async = !1;
257
+ b.head.appendChild(c);
250
258
  }, goog.writeScriptTag_ = function(a, b) {
251
259
  if (goog.inHtmlDocument_()) {
252
260
  var c = goog.global.document;
253
- if ("complete" == c.readyState) {
261
+ if (!goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING && "complete" == c.readyState) {
254
262
  if (/\bdeps.js$/.test(a)) {
255
- return!1;
263
+ return !1;
256
264
  }
257
265
  throw Error('Cannot write "' + a + '" after document load');
258
266
  }
259
267
  var d = goog.IS_OLD_IE_;
260
- void 0 === b ? d ? (d = " onreadystatechange='goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ", c.write('<script type="text/javascript" src="' + a + '"' + d + ">\x3c/script>")) : c.write('<script type="text/javascript" src="' + a + '">\x3c/script>') : c.write('<script type="text/javascript">' + b + "\x3c/script>");
261
- return!0;
268
+ void 0 === b ? d ? (d = " onreadystatechange='goog.onScriptLoad_(this, " + ++goog.lastNonModuleScriptIndex_ + ")' ", c.write('<script type="text/javascript" src="' + a + '"' + d + ">\x3c/script>")) : goog.ENABLE_CHROME_APP_SAFE_SCRIPT_LOADING ? goog.appendScriptSrcNode_(a) : goog.writeScriptSrcNode_(a) : c.write('<script type="text/javascript">' + b + "\x3c/script>");
269
+ return !0;
262
270
  }
263
- return!1;
271
+ return !1;
264
272
  }, goog.lastNonModuleScriptIndex_ = 0, goog.onScriptLoad_ = function(a, b) {
265
273
  "complete" == a.readyState && goog.lastNonModuleScriptIndex_ == b && goog.loadQueuedModules_();
266
- return!0;
274
+ return !0;
267
275
  }, goog.writeScripts_ = function() {
268
276
  function a(e) {
269
277
  if (!(e in d.written)) {
@@ -308,19 +316,22 @@ goog.normalizePath_ = function(a) {
308
316
  }
309
317
  return a.join("/");
310
318
  };
319
+ goog.loadFileSync_ = function(a) {
320
+ if (goog.global.CLOSURE_LOAD_FILE_SYNC) {
321
+ return goog.global.CLOSURE_LOAD_FILE_SYNC(a);
322
+ }
323
+ var b = new goog.global.XMLHttpRequest;
324
+ b.open("get", a, !1);
325
+ b.send();
326
+ return b.responseText;
327
+ };
311
328
  goog.retrieveAndExecModule_ = function(a) {
312
329
  if (!COMPILED) {
313
330
  var b = a;
314
331
  a = goog.normalizePath_(a);
315
- var c = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_, d = null, e = new goog.global.XMLHttpRequest;
316
- e.onload = function() {
317
- d = this.responseText;
318
- };
319
- e.open("get", a, !1);
320
- e.send();
321
- d = e.responseText;
332
+ var c = goog.global.CLOSURE_IMPORT_SCRIPT || goog.writeScriptTag_, d = goog.loadFileSync_(a);
322
333
  if (null != d) {
323
- e = goog.wrapModule_(a, d), goog.IS_OLD_IE_ ? (goog.dependencies_.deferred[b] = e, goog.queuedModules_.push(b)) : c(a, e);
334
+ d = goog.wrapModule_(a, d), goog.IS_OLD_IE_ ? (goog.dependencies_.deferred[b] = d, goog.queuedModules_.push(b)) : c(a, d);
324
335
  } else {
325
336
  throw Error("load of " + a + "failed");
326
337
  }
@@ -392,7 +403,7 @@ goog.getUid = function(a) {
392
403
  return a[goog.UID_PROPERTY_] || (a[goog.UID_PROPERTY_] = ++goog.uidCounter_);
393
404
  };
394
405
  goog.hasUid = function(a) {
395
- return!!a[goog.UID_PROPERTY_];
406
+ return !!a[goog.UID_PROPERTY_];
396
407
  };
397
408
  goog.removeUid = function(a) {
398
409
  "removeAttribute" in a && a.removeAttribute(goog.UID_PROPERTY_);
@@ -456,7 +467,7 @@ goog.mixin = function(a, b) {
456
467
  }
457
468
  };
458
469
  goog.now = goog.TRUSTED_SITE && Date.now || function() {
459
- return+new Date;
470
+ return +new Date;
460
471
  };
461
472
  goog.globalEval = function(a) {
462
473
  if (goog.global.execScript) {
@@ -466,7 +477,7 @@ goog.globalEval = function(a) {
466
477
  if (null == goog.evalWorksForGlobals_ && (goog.global.eval("var _et_ = 1;"), "undefined" != typeof goog.global._et_ ? (delete goog.global._et_, goog.evalWorksForGlobals_ = !0) : goog.evalWorksForGlobals_ = !1), goog.evalWorksForGlobals_) {
467
478
  goog.global.eval(a);
468
479
  } else {
469
- var b = goog.global.document, c = b.createElement("script");
480
+ var b = goog.global.document, c = b.createElement("SCRIPT");
470
481
  c.type = "text/javascript";
471
482
  c.defer = !1;
472
483
  c.appendChild(b.createTextNode(a));
@@ -521,7 +532,9 @@ goog.inherits = function(a, b) {
521
532
  a.prototype = new c;
522
533
  a.prototype.constructor = a;
523
534
  a.base = function(a, c, f) {
524
- var g = Array.prototype.slice.call(arguments, 2);
535
+ for (var g = Array(arguments.length - 2), h = 2;h < arguments.length;h++) {
536
+ g[h - 2] = arguments[h];
537
+ }
525
538
  return b.prototype[c].apply(a, g);
526
539
  };
527
540
  };
@@ -531,9 +544,16 @@ goog.base = function(a, b, c) {
531
544
  throw Error("arguments.caller not defined. goog.base() cannot be used with strict mode code. See http://www.ecma-international.org/ecma-262/5.1/#sec-C");
532
545
  }
533
546
  if (d.superClass_) {
534
- return d.superClass_.constructor.apply(a, Array.prototype.slice.call(arguments, 1));
547
+ for (var e = Array(arguments.length - 1), f = 1;f < arguments.length;f++) {
548
+ e[f - 1] = arguments[f];
549
+ }
550
+ return d.superClass_.constructor.apply(a, e);
551
+ }
552
+ e = Array(arguments.length - 2);
553
+ for (f = 2;f < arguments.length;f++) {
554
+ e[f - 2] = arguments[f];
535
555
  }
536
- for (var e = Array.prototype.slice.call(arguments, 2), f = !1, g = a.constructor;g;g = g.superClass_ && g.superClass_.constructor) {
556
+ for (var f = !1, g = a.constructor;g;g = g.superClass_ && g.superClass_.constructor) {
537
557
  if (g.prototype[b] === d) {
538
558
  f = !0;
539
559
  } else {
@@ -602,6 +622,7 @@ goog.debug.Error = function(a) {
602
622
  b && (this.stack = b);
603
623
  }
604
624
  a && (this.message = String(a));
625
+ this.reportErrorToServer = !0;
605
626
  };
606
627
  goog.inherits(goog.debug.Error, Error);
607
628
  goog.debug.Error.prototype.name = "CustomError";
@@ -637,7 +658,7 @@ goog.string.collapseWhitespace = function(a) {
637
658
  return a.replace(/[\s\xa0]+/g, " ").replace(/^\s+|\s+$/g, "");
638
659
  };
639
660
  goog.string.isEmptyOrWhitespace = function(a) {
640
- return/^[\s\xa0]*$/.test(a);
661
+ return /^[\s\xa0]*$/.test(a);
641
662
  };
642
663
  goog.string.isEmptyString = function(a) {
643
664
  return 0 == a.length;
@@ -648,16 +669,16 @@ goog.string.isEmptyOrWhitespaceSafe = function(a) {
648
669
  };
649
670
  goog.string.isEmptySafe = goog.string.isEmptyOrWhitespaceSafe;
650
671
  goog.string.isBreakingWhitespace = function(a) {
651
- return!/[^\t\n\r ]/.test(a);
672
+ return !/[^\t\n\r ]/.test(a);
652
673
  };
653
674
  goog.string.isAlpha = function(a) {
654
- return!/[^a-zA-Z]/.test(a);
675
+ return !/[^a-zA-Z]/.test(a);
655
676
  };
656
677
  goog.string.isNumeric = function(a) {
657
- return!/[^0-9]/.test(a);
678
+ return !/[^0-9]/.test(a);
658
679
  };
659
680
  goog.string.isAlphaNumeric = function(a) {
660
- return!/[^a-zA-Z0-9]/.test(a);
681
+ return !/[^a-zA-Z0-9]/.test(a);
661
682
  };
662
683
  goog.string.isSpace = function(a) {
663
684
  return " " == a;
@@ -701,7 +722,7 @@ goog.string.numerateCompare = function(a, b) {
701
722
  return 0;
702
723
  }
703
724
  if (!a) {
704
- return-1;
725
+ return -1;
705
726
  }
706
727
  if (!b) {
707
728
  return 1;
@@ -780,7 +801,7 @@ goog.string.unescapePureXmlEntities_ = function(a) {
780
801
  case "gt":
781
802
  return ">";
782
803
  case "quot":
783
- return'"';
804
+ return '"';
784
805
  default:
785
806
  if ("#" == c.charAt(0)) {
786
807
  var d = Number("0" + c.substr(1));
@@ -869,7 +890,7 @@ goog.string.escapeChar = function(a) {
869
890
  return goog.string.jsEscapeCache_[a] = b;
870
891
  };
871
892
  goog.string.contains = function(a, b) {
872
- return-1 != a.indexOf(b);
893
+ return -1 != a.indexOf(b);
873
894
  };
874
895
  goog.string.caseInsensitiveContains = function(a, b) {
875
896
  return goog.string.contains(a.toLowerCase(), b.toLowerCase());
@@ -943,10 +964,10 @@ goog.string.toNumber = function(a) {
943
964
  return 0 == b && goog.string.isEmptyOrWhitespace(a) ? NaN : b;
944
965
  };
945
966
  goog.string.isLowerCamelCase = function(a) {
946
- return/^[a-z]+([A-Z][a-z]*)*$/.test(a);
967
+ return /^[a-z]+([A-Z][a-z]*)*$/.test(a);
947
968
  };
948
969
  goog.string.isUpperCamelCase = function(a) {
949
- return/^([A-Z][a-z]*)+$/.test(a);
970
+ return /^([A-Z][a-z]*)+$/.test(a);
950
971
  };
951
972
  goog.string.toCamelCase = function(a) {
952
973
  return String(a).replace(/\-([a-z])/g, function(a, c) {
@@ -1094,7 +1115,7 @@ goog.array.indexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_F
1094
1115
  return c;
1095
1116
  }
1096
1117
  }
1097
- return-1;
1118
+ return -1;
1098
1119
  };
1099
1120
  goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.lastIndexOf) ? function(a, b, c) {
1100
1121
  goog.asserts.assert(null != a.length);
@@ -1110,7 +1131,7 @@ goog.array.lastIndexOf = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATI
1110
1131
  return c;
1111
1132
  }
1112
1133
  }
1113
- return-1;
1134
+ return -1;
1114
1135
  };
1115
1136
  goog.array.forEach = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.forEach) ? function(a, b, c) {
1116
1137
  goog.asserts.assert(null != a.length);
@@ -1174,10 +1195,10 @@ goog.array.some = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNC
1174
1195
  } : function(a, b, c) {
1175
1196
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
1176
1197
  if (f in e && b.call(c, e[f], f, a)) {
1177
- return!0;
1198
+ return !0;
1178
1199
  }
1179
1200
  }
1180
- return!1;
1201
+ return !1;
1181
1202
  };
1182
1203
  goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUNCTIONS || goog.array.ARRAY_PROTOTYPE_.every) ? function(a, b, c) {
1183
1204
  goog.asserts.assert(null != a.length);
@@ -1185,10 +1206,10 @@ goog.array.every = goog.NATIVE_ARRAY_PROTOTYPES && (goog.array.ASSUME_NATIVE_FUN
1185
1206
  } : function(a, b, c) {
1186
1207
  for (var d = a.length, e = goog.isString(a) ? a.split("") : a, f = 0;f < d;f++) {
1187
1208
  if (f in e && !b.call(c, e[f], f, a)) {
1188
- return!1;
1209
+ return !1;
1189
1210
  }
1190
1211
  }
1191
- return!0;
1212
+ return !0;
1192
1213
  };
1193
1214
  goog.array.count = function(a, b, c) {
1194
1215
  var d = 0;
@@ -1207,7 +1228,7 @@ goog.array.findIndex = function(a, b, c) {
1207
1228
  return f;
1208
1229
  }
1209
1230
  }
1210
- return-1;
1231
+ return -1;
1211
1232
  };
1212
1233
  goog.array.findRight = function(a, b, c) {
1213
1234
  b = goog.array.findIndexRight(a, b, c);
@@ -1219,7 +1240,7 @@ goog.array.findIndexRight = function(a, b, c) {
1219
1240
  return d;
1220
1241
  }
1221
1242
  }
1222
- return-1;
1243
+ return -1;
1223
1244
  };
1224
1245
  goog.array.contains = function(a, b) {
1225
1246
  return 0 <= goog.array.indexOf(a, b);
@@ -1282,7 +1303,7 @@ goog.array.toArray = function(a) {
1282
1303
  }
1283
1304
  return c;
1284
1305
  }
1285
- return[];
1306
+ return [];
1286
1307
  };
1287
1308
  goog.array.clone = goog.array.toArray;
1288
1309
  goog.array.extend = function(a, b) {
@@ -1364,23 +1385,23 @@ goog.array.isSorted = function(a, b, c) {
1364
1385
  for (var d = 1;d < a.length;d++) {
1365
1386
  var e = b(a[d - 1], a[d]);
1366
1387
  if (0 < e || 0 == e && c) {
1367
- return!1;
1388
+ return !1;
1368
1389
  }
1369
1390
  }
1370
- return!0;
1391
+ return !0;
1371
1392
  };
1372
1393
  goog.array.equals = function(a, b, c) {
1373
1394
  if (!goog.isArrayLike(a) || !goog.isArrayLike(b) || a.length != b.length) {
1374
- return!1;
1395
+ return !1;
1375
1396
  }
1376
1397
  var d = a.length;
1377
1398
  c = c || goog.array.defaultCompareEquality;
1378
1399
  for (var e = 0;e < d;e++) {
1379
1400
  if (!c(a[e], b[e])) {
1380
- return!1;
1401
+ return !1;
1381
1402
  }
1382
1403
  }
1383
- return!0;
1404
+ return !0;
1384
1405
  };
1385
1406
  goog.array.compare3 = function(a, b, c) {
1386
1407
  c = c || goog.array.defaultCompare;
@@ -1395,6 +1416,9 @@ goog.array.compare3 = function(a, b, c) {
1395
1416
  goog.array.defaultCompare = function(a, b) {
1396
1417
  return a > b ? 1 : a < b ? -1 : 0;
1397
1418
  };
1419
+ goog.array.inverseDefaultCompare = function(a, b) {
1420
+ return -goog.array.defaultCompare(a, b);
1421
+ };
1398
1422
  goog.array.defaultCompareEquality = function(a, b) {
1399
1423
  return a === b;
1400
1424
  };
@@ -1425,7 +1449,7 @@ goog.array.range = function(a, b, c) {
1425
1449
  c = c || 1;
1426
1450
  void 0 !== b && (e = a, f = b);
1427
1451
  if (0 > c * (f - e)) {
1428
- return[];
1452
+ return [];
1429
1453
  }
1430
1454
  if (0 < c) {
1431
1455
  for (a = e;a < f;a += c) {
@@ -1472,7 +1496,7 @@ goog.array.moveItem = function(a, b, c) {
1472
1496
  };
1473
1497
  goog.array.zip = function(a) {
1474
1498
  if (!arguments.length) {
1475
- return[];
1499
+ return [];
1476
1500
  }
1477
1501
  for (var b = [], c = 0;;c++) {
1478
1502
  for (var d = [], e = 0;e < arguments.length;e++) {
@@ -1492,6 +1516,13 @@ goog.array.shuffle = function(a, b) {
1492
1516
  a[e] = f;
1493
1517
  }
1494
1518
  };
1519
+ goog.array.copyByIndex = function(a, b) {
1520
+ var c = [];
1521
+ goog.array.forEach(b, function(b) {
1522
+ c.push(a[b]);
1523
+ });
1524
+ return c;
1525
+ };
1495
1526
  goog.object = {};
1496
1527
  goog.object.forEach = function(a, b, c) {
1497
1528
  for (var d in a) {
@@ -1515,18 +1546,18 @@ goog.object.map = function(a, b, c) {
1515
1546
  goog.object.some = function(a, b, c) {
1516
1547
  for (var d in a) {
1517
1548
  if (b.call(c, a[d], d, a)) {
1518
- return!0;
1549
+ return !0;
1519
1550
  }
1520
1551
  }
1521
- return!1;
1552
+ return !1;
1522
1553
  };
1523
1554
  goog.object.every = function(a, b, c) {
1524
1555
  for (var d in a) {
1525
1556
  if (!b.call(c, a[d], d, a)) {
1526
- return!1;
1557
+ return !1;
1527
1558
  }
1528
1559
  }
1529
- return!0;
1560
+ return !0;
1530
1561
  };
1531
1562
  goog.object.getCount = function(a) {
1532
1563
  var b = 0, c;
@@ -1573,10 +1604,10 @@ goog.object.containsKey = function(a, b) {
1573
1604
  goog.object.containsValue = function(a, b) {
1574
1605
  for (var c in a) {
1575
1606
  if (a[c] == b) {
1576
- return!0;
1607
+ return !0;
1577
1608
  }
1578
1609
  }
1579
- return!1;
1610
+ return !1;
1580
1611
  };
1581
1612
  goog.object.findKey = function(a, b, c) {
1582
1613
  for (var d in a) {
@@ -1586,13 +1617,13 @@ goog.object.findKey = function(a, b, c) {
1586
1617
  }
1587
1618
  };
1588
1619
  goog.object.findValue = function(a, b, c) {
1589
- return(b = goog.object.findKey(a, b, c)) && a[b];
1620
+ return (b = goog.object.findKey(a, b, c)) && a[b];
1590
1621
  };
1591
1622
  goog.object.isEmpty = function(a) {
1592
1623
  for (var b in a) {
1593
- return!1;
1624
+ return !1;
1594
1625
  }
1595
- return!0;
1626
+ return !0;
1596
1627
  };
1597
1628
  goog.object.clear = function(a) {
1598
1629
  for (var b in a) {
@@ -1619,18 +1650,25 @@ goog.object.set = function(a, b, c) {
1619
1650
  goog.object.setIfUndefined = function(a, b, c) {
1620
1651
  return b in a ? a[b] : a[b] = c;
1621
1652
  };
1653
+ goog.object.setWithReturnValueIfNotSet = function(a, b, c) {
1654
+ if (b in a) {
1655
+ return a[b];
1656
+ }
1657
+ c = c();
1658
+ return a[b] = c;
1659
+ };
1622
1660
  goog.object.equals = function(a, b) {
1623
1661
  for (var c in a) {
1624
1662
  if (!(c in b) || a[c] !== b[c]) {
1625
- return!1;
1663
+ return !1;
1626
1664
  }
1627
1665
  }
1628
1666
  for (c in b) {
1629
1667
  if (!(c in a)) {
1630
- return!1;
1668
+ return !1;
1631
1669
  }
1632
1670
  }
1633
- return!0;
1671
+ return !0;
1634
1672
  };
1635
1673
  goog.object.clone = function(a) {
1636
1674
  var b = {}, c;
@@ -1701,7 +1739,7 @@ goog.object.createImmutableView = function(a) {
1701
1739
  return b;
1702
1740
  };
1703
1741
  goog.object.isImmutableView = function(a) {
1704
- return!!Object.isFrozen && Object.isFrozen(a);
1742
+ return !!Object.isFrozen && Object.isFrozen(a);
1705
1743
  };
1706
1744
  goog.structs = {};
1707
1745
  goog.structs.getCount = function(a) {
@@ -1809,10 +1847,10 @@ goog.structs.some = function(a, b, c) {
1809
1847
  }
1810
1848
  for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
1811
1849
  if (b.call(c, e[g], d && d[g], a)) {
1812
- return!0;
1850
+ return !0;
1813
1851
  }
1814
1852
  }
1815
- return!1;
1853
+ return !1;
1816
1854
  };
1817
1855
  goog.structs.every = function(a, b, c) {
1818
1856
  if ("function" == typeof a.every) {
@@ -1823,10 +1861,10 @@ goog.structs.every = function(a, b, c) {
1823
1861
  }
1824
1862
  for (var d = goog.structs.getKeys(a), e = goog.structs.getValues(a), f = e.length, g = 0;g < f;g++) {
1825
1863
  if (!b.call(c, e[g], d && d[g], a)) {
1826
- return!1;
1864
+ return !1;
1827
1865
  }
1828
1866
  }
1829
- return!0;
1867
+ return !0;
1830
1868
  };
1831
1869
  goog.functions = {};
1832
1870
  goog.functions.constant = function(a) {
@@ -1894,10 +1932,10 @@ goog.functions.and = function(a) {
1894
1932
  return function() {
1895
1933
  for (var a = 0;a < c;a++) {
1896
1934
  if (!b[a].apply(this, arguments)) {
1897
- return!1;
1935
+ return !1;
1898
1936
  }
1899
1937
  }
1900
- return!0;
1938
+ return !0;
1901
1939
  };
1902
1940
  };
1903
1941
  goog.functions.or = function(a) {
@@ -1905,15 +1943,15 @@ goog.functions.or = function(a) {
1905
1943
  return function() {
1906
1944
  for (var a = 0;a < c;a++) {
1907
1945
  if (b[a].apply(this, arguments)) {
1908
- return!0;
1946
+ return !0;
1909
1947
  }
1910
1948
  }
1911
- return!1;
1949
+ return !1;
1912
1950
  };
1913
1951
  };
1914
1952
  goog.functions.not = function(a) {
1915
1953
  return function() {
1916
- return!a.apply(this, arguments);
1954
+ return !a.apply(this, arguments);
1917
1955
  };
1918
1956
  };
1919
1957
  goog.functions.create = function(a, b) {
@@ -1981,8 +2019,8 @@ goog.math.angleDifference = function(a, b) {
1981
2019
  180 < c ? c -= 360 : -180 >= c && (c = 360 + c);
1982
2020
  return c;
1983
2021
  };
1984
- goog.math.sign = function(a) {
1985
- return 0 == a ? 0 : 0 > a ? -1 : 1;
2022
+ goog.math.sign = Math.sign || function(a) {
2023
+ return 0 < a ? 1 : 0 > a ? -1 : a;
1986
2024
  };
1987
2025
  goog.math.longestCommonSubsequence = function(a, b, c, d) {
1988
2026
  c = c || function(a, b) {
@@ -2034,6 +2072,9 @@ goog.math.isInt = function(a) {
2034
2072
  goog.math.isFiniteNumber = function(a) {
2035
2073
  return isFinite(a) && !isNaN(a);
2036
2074
  };
2075
+ goog.math.isNegativeZero = function(a) {
2076
+ return 0 == a && 0 > 1 / a;
2077
+ };
2037
2078
  goog.math.log10Floor = function(a) {
2038
2079
  if (0 < a) {
2039
2080
  var b = Math.round(Math.log(a) * Math.LOG10E);
@@ -2050,7 +2091,7 @@ goog.math.safeCeil = function(a, b) {
2050
2091
  return Math.ceil(a - (b || 2E-15));
2051
2092
  };
2052
2093
  goog.iter = {};
2053
- goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopIteration : Error("StopIteration");
2094
+ goog.iter.StopIteration = "StopIteration" in goog.global ? goog.global.StopIteration : {message:"StopIteration", stack:""};
2054
2095
  goog.iter.Iterator = function() {
2055
2096
  };
2056
2097
  goog.iter.Iterator.prototype.next = function() {
@@ -2162,7 +2203,7 @@ goog.iter.some = function(a, b, c) {
2162
2203
  try {
2163
2204
  for (;;) {
2164
2205
  if (b.call(c, a.next(), void 0, a)) {
2165
- return!0;
2206
+ return !0;
2166
2207
  }
2167
2208
  }
2168
2209
  } catch (d) {
@@ -2170,14 +2211,14 @@ goog.iter.some = function(a, b, c) {
2170
2211
  throw d;
2171
2212
  }
2172
2213
  }
2173
- return!1;
2214
+ return !1;
2174
2215
  };
2175
2216
  goog.iter.every = function(a, b, c) {
2176
2217
  a = goog.iter.toIterator(a);
2177
2218
  try {
2178
2219
  for (;;) {
2179
2220
  if (!b.call(c, a.next(), void 0, a)) {
2180
- return!1;
2221
+ return !1;
2181
2222
  }
2182
2223
  }
2183
2224
  } catch (d) {
@@ -2185,7 +2226,7 @@ goog.iter.every = function(a, b, c) {
2185
2226
  throw d;
2186
2227
  }
2187
2228
  }
2188
- return!0;
2229
+ return !0;
2189
2230
  };
2190
2231
  goog.iter.chain = function(a) {
2191
2232
  return goog.iter.chainFromIterable(arguments);
@@ -2268,7 +2309,7 @@ goog.iter.nextOrValue = function(a, b) {
2268
2309
  };
2269
2310
  goog.iter.product = function(a) {
2270
2311
  if (goog.array.some(arguments, function(a) {
2271
- return!a.length;
2312
+ return !a.length;
2272
2313
  }) || !arguments.length) {
2273
2314
  return new goog.iter.Iterator;
2274
2315
  }
@@ -2379,7 +2420,7 @@ goog.iter.zipLongest = function(a, b) {
2379
2420
  goog.iter.compress = function(a, b) {
2380
2421
  var c = goog.iter.toIterator(b);
2381
2422
  return goog.iter.filter(a, function() {
2382
- return!!c.next();
2423
+ return !!c.next();
2383
2424
  });
2384
2425
  };
2385
2426
  goog.iter.GroupByIterator_ = function(a, b) {
@@ -2392,7 +2433,7 @@ goog.iter.GroupByIterator_.prototype.next = function() {
2392
2433
  this.currentValue = this.iterator.next(), this.currentKey = this.keyFunc(this.currentValue);
2393
2434
  }
2394
2435
  this.targetKey = this.currentKey;
2395
- return[this.currentKey, this.groupItems_(this.targetKey)];
2436
+ return [this.currentKey, this.groupItems_(this.targetKey)];
2396
2437
  };
2397
2438
  goog.iter.GroupByIterator_.prototype.groupItems_ = function(a) {
2398
2439
  for (var b = [];this.currentKey == a;) {
@@ -2423,7 +2464,7 @@ goog.iter.starMap = function(a, b, c) {
2423
2464
  };
2424
2465
  goog.iter.tee = function(a, b) {
2425
2466
  var c = goog.iter.toIterator(a), d = goog.isNumber(b) ? b : 2, e = goog.array.map(goog.array.range(d), function() {
2426
- return[];
2467
+ return [];
2427
2468
  }), f = function() {
2428
2469
  var a = c.next();
2429
2470
  goog.array.forEach(e, function(b) {
@@ -2475,7 +2516,7 @@ goog.iter.hasDuplicates_ = function(a) {
2475
2516
  goog.iter.permutations = function(a, b) {
2476
2517
  var c = goog.iter.toArray(a), d = goog.isNumber(b) ? b : c.length, c = goog.array.repeat(c, d), c = goog.iter.product.apply(void 0, c);
2477
2518
  return goog.iter.filter(c, function(a) {
2478
- return!goog.iter.hasDuplicates_(a);
2519
+ return !goog.iter.hasDuplicates_(a);
2479
2520
  });
2480
2521
  };
2481
2522
  goog.iter.combinations = function(a, b) {
@@ -2539,26 +2580,26 @@ goog.structs.Map.prototype.containsValue = function(a) {
2539
2580
  for (var b = 0;b < this.keys_.length;b++) {
2540
2581
  var c = this.keys_[b];
2541
2582
  if (goog.structs.Map.hasKey_(this.map_, c) && this.map_[c] == a) {
2542
- return!0;
2583
+ return !0;
2543
2584
  }
2544
2585
  }
2545
- return!1;
2586
+ return !1;
2546
2587
  };
2547
2588
  goog.structs.Map.prototype.equals = function(a, b) {
2548
2589
  if (this === a) {
2549
- return!0;
2590
+ return !0;
2550
2591
  }
2551
2592
  if (this.count_ != a.getCount()) {
2552
- return!1;
2593
+ return !1;
2553
2594
  }
2554
2595
  var c = b || goog.structs.Map.defaultEquals;
2555
2596
  this.cleanupKeysArray_();
2556
2597
  for (var d, e = 0;d = this.keys_[e];e++) {
2557
2598
  if (!c(this.get(d), a.get(d))) {
2558
- return!1;
2599
+ return !1;
2559
2600
  }
2560
2601
  }
2561
- return!0;
2602
+ return !0;
2562
2603
  };
2563
2604
  goog.structs.Map.defaultEquals = function(a, b) {
2564
2605
  return a === b;
@@ -2635,20 +2676,18 @@ goog.structs.Map.prototype.getValueIterator = function() {
2635
2676
  };
2636
2677
  goog.structs.Map.prototype.__iterator__ = function(a) {
2637
2678
  this.cleanupKeysArray_();
2638
- var b = 0, c = this.keys_, d = this.map_, e = this.version_, f = this, g = new goog.iter.Iterator;
2639
- g.next = function() {
2640
- for (;;) {
2641
- if (e != f.version_) {
2642
- throw Error("The map has changed since the iterator was created");
2643
- }
2644
- if (b >= c.length) {
2645
- throw goog.iter.StopIteration;
2646
- }
2647
- var g = c[b++];
2648
- return a ? g : d[g];
2679
+ var b = 0, c = this.version_, d = this, e = new goog.iter.Iterator;
2680
+ e.next = function() {
2681
+ if (c != d.version_) {
2682
+ throw Error("The map has changed since the iterator was created");
2649
2683
  }
2684
+ if (b >= d.keys_.length) {
2685
+ throw goog.iter.StopIteration;
2686
+ }
2687
+ var e = d.keys_[b++];
2688
+ return a ? e : d.map_[e];
2650
2689
  };
2651
- return g;
2690
+ return e;
2652
2691
  };
2653
2692
  goog.structs.Map.hasKey_ = function(a, b) {
2654
2693
  return Object.prototype.hasOwnProperty.call(a, b);
@@ -2689,25 +2728,25 @@ goog.labs.userAgent.browser.matchOpera_ = function() {
2689
2728
  return goog.labs.userAgent.util.matchUserAgent("Opera") || goog.labs.userAgent.util.matchUserAgent("OPR");
2690
2729
  };
2691
2730
  goog.labs.userAgent.browser.matchIE_ = function() {
2692
- return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
2731
+ return goog.labs.userAgent.util.matchUserAgent("Edge") || goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
2693
2732
  };
2694
2733
  goog.labs.userAgent.browser.matchFirefox_ = function() {
2695
2734
  return goog.labs.userAgent.util.matchUserAgent("Firefox");
2696
2735
  };
2697
2736
  goog.labs.userAgent.browser.matchSafari_ = function() {
2698
- return goog.labs.userAgent.util.matchUserAgent("Safari") && !goog.labs.userAgent.util.matchUserAgent("Chrome") && !goog.labs.userAgent.util.matchUserAgent("CriOS") && !goog.labs.userAgent.util.matchUserAgent("Android");
2737
+ return goog.labs.userAgent.util.matchUserAgent("Safari") && !(goog.labs.userAgent.browser.matchChrome_() || goog.labs.userAgent.browser.matchCoast_() || goog.labs.userAgent.browser.matchOpera_() || goog.labs.userAgent.browser.matchIE_() || goog.labs.userAgent.browser.isSilk() || goog.labs.userAgent.util.matchUserAgent("Android"));
2699
2738
  };
2700
2739
  goog.labs.userAgent.browser.matchCoast_ = function() {
2701
2740
  return goog.labs.userAgent.util.matchUserAgent("Coast");
2702
2741
  };
2703
2742
  goog.labs.userAgent.browser.matchIosWebview_ = function() {
2704
- return(goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
2743
+ return (goog.labs.userAgent.util.matchUserAgent("iPad") || goog.labs.userAgent.util.matchUserAgent("iPhone")) && !goog.labs.userAgent.browser.matchSafari_() && !goog.labs.userAgent.browser.matchChrome_() && !goog.labs.userAgent.browser.matchCoast_() && goog.labs.userAgent.util.matchUserAgent("AppleWebKit");
2705
2744
  };
2706
2745
  goog.labs.userAgent.browser.matchChrome_ = function() {
2707
- return goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS");
2746
+ return (goog.labs.userAgent.util.matchUserAgent("Chrome") || goog.labs.userAgent.util.matchUserAgent("CriOS")) && !goog.labs.userAgent.browser.matchOpera_() && !goog.labs.userAgent.browser.matchIE_();
2708
2747
  };
2709
2748
  goog.labs.userAgent.browser.matchAndroidBrowser_ = function() {
2710
- return!goog.labs.userAgent.browser.isChrome() && goog.labs.userAgent.util.matchUserAgent("Android");
2749
+ return goog.labs.userAgent.util.matchUserAgent("Android") && !(goog.labs.userAgent.browser.isChrome() || goog.labs.userAgent.browser.isFirefox() || goog.labs.userAgent.browser.isOpera() || goog.labs.userAgent.browser.isSilk());
2711
2750
  };
2712
2751
  goog.labs.userAgent.browser.isOpera = goog.labs.userAgent.browser.matchOpera_;
2713
2752
  goog.labs.userAgent.browser.isIE = goog.labs.userAgent.browser.matchIE_;
@@ -2741,7 +2780,7 @@ goog.labs.userAgent.browser.isVersionOrHigher = function(a) {
2741
2780
  };
2742
2781
  goog.labs.userAgent.browser.getIEVersion_ = function(a) {
2743
2782
  var b = /rv: *([\d\.]*)/.exec(a);
2744
- if (b && b[1]) {
2783
+ if (b && b[1] || (b = /Edge\/([\d\.]+)/.exec(a))) {
2745
2784
  return b[1];
2746
2785
  }
2747
2786
  var b = "", c = /MSIE +([\d\.]+)/.exec(a);
@@ -2777,16 +2816,19 @@ goog.labs.userAgent.engine.isPresto = function() {
2777
2816
  goog.labs.userAgent.engine.isTrident = function() {
2778
2817
  return goog.labs.userAgent.util.matchUserAgent("Trident") || goog.labs.userAgent.util.matchUserAgent("MSIE");
2779
2818
  };
2819
+ goog.labs.userAgent.engine.isEdge = function() {
2820
+ return goog.labs.userAgent.util.matchUserAgent("Edge");
2821
+ };
2780
2822
  goog.labs.userAgent.engine.isWebKit = function() {
2781
- return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit");
2823
+ return goog.labs.userAgent.util.matchUserAgentIgnoreCase("WebKit") && !goog.labs.userAgent.engine.isEdge();
2782
2824
  };
2783
2825
  goog.labs.userAgent.engine.isGecko = function() {
2784
- return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs.userAgent.engine.isTrident();
2826
+ return goog.labs.userAgent.util.matchUserAgent("Gecko") && !goog.labs.userAgent.engine.isWebKit() && !goog.labs.userAgent.engine.isTrident() && !goog.labs.userAgent.engine.isEdge();
2785
2827
  };
2786
2828
  goog.labs.userAgent.engine.getVersion = function() {
2787
2829
  var a = goog.labs.userAgent.util.getUserAgent();
2788
2830
  if (a) {
2789
- var a = goog.labs.userAgent.util.extractVersionTuples(a), b = a[1];
2831
+ var a = goog.labs.userAgent.util.extractVersionTuples(a), b = goog.labs.userAgent.engine.getEngineTuple_(a);
2790
2832
  if (b) {
2791
2833
  return "Gecko" == b[0] ? goog.labs.userAgent.engine.getVersionForKey_(a, "Firefox") : b[1];
2792
2834
  }
@@ -2797,6 +2839,17 @@ goog.labs.userAgent.engine.getVersion = function() {
2797
2839
  }
2798
2840
  return "";
2799
2841
  };
2842
+ goog.labs.userAgent.engine.getEngineTuple_ = function(a) {
2843
+ if (!goog.labs.userAgent.engine.isEdge()) {
2844
+ return a[1];
2845
+ }
2846
+ for (var b = 0;b < a.length;b++) {
2847
+ var c = a[b];
2848
+ if ("Edge" == c[0]) {
2849
+ return c;
2850
+ }
2851
+ }
2852
+ };
2800
2853
  goog.labs.userAgent.engine.isVersionOrHigher = function(a) {
2801
2854
  return 0 <= goog.string.compareVersions(goog.labs.userAgent.engine.getVersion(), a);
2802
2855
  };
@@ -2887,20 +2940,35 @@ goog.userAgent.isLegacyLinux_ = function() {
2887
2940
  goog.userAgent.LINUX = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_LINUX : goog.userAgent.isLegacyLinux_();
2888
2941
  goog.userAgent.isX11_ = function() {
2889
2942
  var a = goog.userAgent.getNavigator();
2890
- return!!a && goog.string.contains(a.appVersion || "", "X11");
2943
+ return !!a && goog.string.contains(a.appVersion || "", "X11");
2891
2944
  };
2892
2945
  goog.userAgent.X11 = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_X11 : goog.userAgent.isX11_();
2893
2946
  goog.userAgent.ANDROID = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_ANDROID : goog.labs.userAgent.platform.isAndroid();
2894
2947
  goog.userAgent.IPHONE = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPHONE : goog.labs.userAgent.platform.isIphone();
2895
2948
  goog.userAgent.IPAD = goog.userAgent.PLATFORM_KNOWN_ ? goog.userAgent.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
2896
2949
  goog.userAgent.determineVersion_ = function() {
2897
- var a = "", b;
2898
2950
  if (goog.userAgent.OPERA && goog.global.opera) {
2899
- return a = goog.global.opera.version, goog.isFunction(a) ? a() : a;
2951
+ var a = goog.global.opera.version;
2952
+ return goog.isFunction(a) ? a() : a;
2953
+ }
2954
+ var a = "", b = goog.userAgent.getVersionRegexResult_();
2955
+ b && (a = b ? b[1] : "");
2956
+ return goog.userAgent.IE && !goog.labs.userAgent.engine.isEdge() && (b = goog.userAgent.getDocumentMode_(), b > parseFloat(a)) ? String(b) : a;
2957
+ };
2958
+ goog.userAgent.getVersionRegexResult_ = function() {
2959
+ var a = goog.userAgent.getUserAgentString();
2960
+ if (goog.userAgent.GECKO) {
2961
+ return /rv\:([^\);]+)(\)|;)/.exec(a);
2962
+ }
2963
+ if (goog.userAgent.IE && goog.labs.userAgent.engine.isEdge()) {
2964
+ return /Edge\/([\d\.]+)/.exec(a);
2965
+ }
2966
+ if (goog.userAgent.IE) {
2967
+ return /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);
2968
+ }
2969
+ if (goog.userAgent.WEBKIT) {
2970
+ return /WebKit\/(\S+)/.exec(a);
2900
2971
  }
2901
- goog.userAgent.GECKO ? b = /rv\:([^\);]+)(\)|;)/ : goog.userAgent.IE ? b = /\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/ : goog.userAgent.WEBKIT && (b = /WebKit\/(\S+)/);
2902
- b && (a = (a = b.exec(goog.userAgent.getUserAgentString())) ? a[1] : "");
2903
- return goog.userAgent.IE && (b = goog.userAgent.getDocumentMode_(), b > parseFloat(a)) ? String(b) : a;
2904
2972
  };
2905
2973
  goog.userAgent.getDocumentMode_ = function() {
2906
2974
  var a = goog.global.document;
@@ -2916,12 +2984,12 @@ goog.userAgent.isVersionOrHigher = function(a) {
2916
2984
  };
2917
2985
  goog.userAgent.isVersion = goog.userAgent.isVersionOrHigher;
2918
2986
  goog.userAgent.isDocumentModeOrHigher = function(a) {
2919
- return goog.userAgent.IE && goog.userAgent.DOCUMENT_MODE >= a;
2987
+ return goog.userAgent.IE && (goog.labs.userAgent.engine.isEdge() || goog.userAgent.DOCUMENT_MODE >= a);
2920
2988
  };
2921
2989
  goog.userAgent.isDocumentMode = goog.userAgent.isDocumentModeOrHigher;
2922
2990
  goog.userAgent.DOCUMENT_MODE = function() {
2923
- var a = goog.global.document;
2924
- return a && goog.userAgent.IE ? goog.userAgent.getDocumentMode_() || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5) : void 0;
2991
+ var a = goog.global.document, b = goog.userAgent.getDocumentMode_();
2992
+ return !a || !goog.userAgent.IE || !b && goog.labs.userAgent.engine.isEdge() ? void 0 : b || ("CSS1Compat" == a.compatMode ? parseInt(goog.userAgent.VERSION, 10) : 5);
2925
2993
  }();
2926
2994
  goog.uri = {};
2927
2995
  goog.uri.utils = {};
@@ -3023,6 +3091,13 @@ goog.uri.utils.assertNoFragmentsOrQueries_ = function(a) {
3023
3091
  throw Error("goog.uri.utils: Fragment or query identifiers are not supported: [" + a + "]");
3024
3092
  }
3025
3093
  };
3094
+ goog.uri.utils.parseQueryData = function(a, b) {
3095
+ for (var c = a.split("&"), d = 0;d < c.length;d++) {
3096
+ var e = c[d].indexOf("="), f = null, g = null;
3097
+ 0 <= e ? (f = c[d].substring(0, e), g = c[d].substring(e + 1)) : f = c[d];
3098
+ b(f, g ? goog.string.urlDecode(g) : "");
3099
+ }
3100
+ };
3026
3101
  goog.uri.utils.appendQueryData_ = function(a) {
3027
3102
  if (a[1]) {
3028
3103
  var b = a[0], c = b.indexOf("#");
@@ -3086,7 +3161,7 @@ goog.uri.utils.findParam_ = function(a, b, c, d) {
3086
3161
  }
3087
3162
  b += e + 1;
3088
3163
  }
3089
- return-1;
3164
+ return -1;
3090
3165
  };
3091
3166
  goog.uri.utils.hashOrEndRe_ = /#|$/;
3092
3167
  goog.uri.utils.hasParam = function(a, b) {
@@ -3142,20 +3217,16 @@ goog.uri.utils.makeUnique = function(a) {
3142
3217
  return goog.uri.utils.setParam(a, goog.uri.utils.StandardQueryParam.RANDOM, goog.string.getRandomString());
3143
3218
  };
3144
3219
  goog.Uri = function(a, b) {
3220
+ this.domain_ = this.userInfo_ = this.scheme_ = "";
3221
+ this.port_ = null;
3222
+ this.fragment_ = this.path_ = "";
3223
+ this.ignoreCase_ = this.isReadOnly_ = !1;
3145
3224
  var c;
3146
3225
  a instanceof goog.Uri ? (this.ignoreCase_ = goog.isDef(b) ? b : a.getIgnoreCase(), this.setScheme(a.getScheme()), this.setUserInfo(a.getUserInfo()), this.setDomain(a.getDomain()), this.setPort(a.getPort()), this.setPath(a.getPath()), this.setQueryData(a.getQueryData().clone()), this.setFragment(a.getFragment())) : a && (c = goog.uri.utils.split(String(a))) ? (this.ignoreCase_ = !!b, this.setScheme(c[goog.uri.utils.ComponentIndex.SCHEME] || "", !0), this.setUserInfo(c[goog.uri.utils.ComponentIndex.USER_INFO] ||
3147
3226
  "", !0), this.setDomain(c[goog.uri.utils.ComponentIndex.DOMAIN] || "", !0), this.setPort(c[goog.uri.utils.ComponentIndex.PORT]), this.setPath(c[goog.uri.utils.ComponentIndex.PATH] || "", !0), this.setQueryData(c[goog.uri.utils.ComponentIndex.QUERY_DATA] || "", !0), this.setFragment(c[goog.uri.utils.ComponentIndex.FRAGMENT] || "", !0)) : (this.ignoreCase_ = !!b, this.queryData_ = new goog.Uri.QueryData(null, null, this.ignoreCase_));
3148
3227
  };
3149
3228
  goog.Uri.preserveParameterTypesCompatibilityFlag = !1;
3150
3229
  goog.Uri.RANDOM_PARAM = goog.uri.utils.StandardQueryParam.RANDOM;
3151
- goog.Uri.prototype.scheme_ = "";
3152
- goog.Uri.prototype.userInfo_ = "";
3153
- goog.Uri.prototype.domain_ = "";
3154
- goog.Uri.prototype.port_ = null;
3155
- goog.Uri.prototype.path_ = "";
3156
- goog.Uri.prototype.fragment_ = "";
3157
- goog.Uri.prototype.isReadOnly_ = !1;
3158
- goog.Uri.prototype.ignoreCase_ = !1;
3159
3230
  goog.Uri.prototype.toString = function() {
3160
3231
  var a = [], b = this.getScheme();
3161
3232
  b && a.push(goog.Uri.encodeSpecialChars_(b, goog.Uri.reDisallowedInSchemeOrUserInfo_, !0), ":");
@@ -3214,7 +3285,7 @@ goog.Uri.prototype.setScheme = function(a, b) {
3214
3285
  return this;
3215
3286
  };
3216
3287
  goog.Uri.prototype.hasScheme = function() {
3217
- return!!this.scheme_;
3288
+ return !!this.scheme_;
3218
3289
  };
3219
3290
  goog.Uri.prototype.getUserInfo = function() {
3220
3291
  return this.userInfo_;
@@ -3225,7 +3296,7 @@ goog.Uri.prototype.setUserInfo = function(a, b) {
3225
3296
  return this;
3226
3297
  };
3227
3298
  goog.Uri.prototype.hasUserInfo = function() {
3228
- return!!this.userInfo_;
3299
+ return !!this.userInfo_;
3229
3300
  };
3230
3301
  goog.Uri.prototype.getDomain = function() {
3231
3302
  return this.domain_;
@@ -3236,7 +3307,7 @@ goog.Uri.prototype.setDomain = function(a, b) {
3236
3307
  return this;
3237
3308
  };
3238
3309
  goog.Uri.prototype.hasDomain = function() {
3239
- return!!this.domain_;
3310
+ return !!this.domain_;
3240
3311
  };
3241
3312
  goog.Uri.prototype.getPort = function() {
3242
3313
  return this.port_;
@@ -3266,7 +3337,7 @@ goog.Uri.prototype.setPath = function(a, b) {
3266
3337
  return this;
3267
3338
  };
3268
3339
  goog.Uri.prototype.hasPath = function() {
3269
- return!!this.path_;
3340
+ return !!this.path_;
3270
3341
  };
3271
3342
  goog.Uri.prototype.hasQuery = function() {
3272
3343
  return "" !== this.queryData_.toString();
@@ -3317,10 +3388,10 @@ goog.Uri.prototype.setFragment = function(a, b) {
3317
3388
  return this;
3318
3389
  };
3319
3390
  goog.Uri.prototype.hasFragment = function() {
3320
- return!!this.fragment_;
3391
+ return !!this.fragment_;
3321
3392
  };
3322
3393
  goog.Uri.prototype.hasSameDomainAs = function(a) {
3323
- return(!this.hasDomain() && !a.hasDomain() || this.getDomain() == a.getDomain()) && (!this.hasPort() && !a.hasPort() || this.getPort() == a.getPort());
3394
+ return (!this.hasDomain() && !a.hasDomain() || this.getDomain() == a.getDomain()) && (!this.hasPort() && !a.hasPort() || this.getPort() == a.getPort());
3324
3395
  };
3325
3396
  goog.Uri.prototype.makeUnique = function() {
3326
3397
  this.enforceReadOnly();
@@ -3387,7 +3458,7 @@ goog.Uri.removeDotSegments = function(a) {
3387
3458
  return a;
3388
3459
  };
3389
3460
  goog.Uri.decodeOrEmpty_ = function(a, b) {
3390
- return a ? b ? decodeURI(a) : decodeURIComponent(a) : "";
3461
+ return a ? b ? decodeURI(a.replace(/%25/g, "%2525")) : decodeURIComponent(a) : "";
3391
3462
  };
3392
3463
  goog.Uri.encodeSpecialChars_ = function(a, b, c) {
3393
3464
  return goog.isString(a) ? (a = encodeURI(a).replace(b, goog.Uri.encodeChar_), c && (a = goog.Uri.removeDoubleEncoding_(a)), a) : null;
@@ -3409,18 +3480,16 @@ goog.Uri.haveSameDomain = function(a, b) {
3409
3480
  return c[goog.uri.utils.ComponentIndex.DOMAIN] == d[goog.uri.utils.ComponentIndex.DOMAIN] && c[goog.uri.utils.ComponentIndex.PORT] == d[goog.uri.utils.ComponentIndex.PORT];
3410
3481
  };
3411
3482
  goog.Uri.QueryData = function(a, b, c) {
3483
+ this.count_ = this.keyMap_ = null;
3412
3484
  this.encodedQuery_ = a || null;
3413
3485
  this.ignoreCase_ = !!c;
3414
3486
  };
3415
3487
  goog.Uri.QueryData.prototype.ensureKeyMapInitialized_ = function() {
3416
3488
  if (!this.keyMap_ && (this.keyMap_ = new goog.structs.Map, this.count_ = 0, this.encodedQuery_)) {
3417
- for (var a = this.encodedQuery_.split("&"), b = 0;b < a.length;b++) {
3418
- var c = a[b].indexOf("="), d = null, e = null;
3419
- 0 <= c ? (d = a[b].substring(0, c), e = a[b].substring(c + 1)) : d = a[b];
3420
- d = goog.string.urlDecode(d);
3421
- d = this.getKeyName_(d);
3422
- this.add(d, e ? goog.string.urlDecode(e) : "");
3423
- }
3489
+ var a = this;
3490
+ goog.uri.utils.parseQueryData(this.encodedQuery_, function(b, c) {
3491
+ a.add(goog.string.urlDecode(b), c);
3492
+ });
3424
3493
  }
3425
3494
  };
3426
3495
  goog.Uri.QueryData.createFromMap = function(a, b, c) {
@@ -3446,8 +3515,6 @@ goog.Uri.QueryData.createFromKeysValues = function(a, b, c, d) {
3446
3515
  }
3447
3516
  return c;
3448
3517
  };
3449
- goog.Uri.QueryData.prototype.keyMap_ = null;
3450
- goog.Uri.QueryData.prototype.count_ = null;
3451
3518
  goog.Uri.QueryData.prototype.getCount = function() {
3452
3519
  this.ensureKeyMapInitialized_();
3453
3520
  return this.count_;
@@ -3578,1054 +3645,1249 @@ goog.Uri.QueryData.prototype.extend = function(a) {
3578
3645
  }, this);
3579
3646
  }
3580
3647
  };
3581
- goog.structs.Collection = function() {
3648
+ goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN",
3649
+ DIALOG:"DIALOG", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", EMBED:"EMBED", FIELDSET:"FIELDSET", FIGCAPTION:"FIGCAPTION", FIGURE:"FIGURE", FONT:"FONT", FOOTER:"FOOTER", FORM:"FORM", FRAME:"FRAME", FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HEADER:"HEADER", HGROUP:"HGROUP", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", KEYGEN:"KEYGEN", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK",
3650
+ MAP:"MAP", MARK:"MARK", MATH:"MATH", MENU:"MENU", META:"META", METER:"METER", NAV:"NAV", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", OUTPUT:"OUTPUT", P:"P", PARAM:"PARAM", PRE:"PRE", PROGRESS:"PROGRESS", Q:"Q", RP:"RP", RT:"RT", RUBY:"RUBY", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SECTION:"SECTION", SELECT:"SELECT", SMALL:"SMALL", SOURCE:"SOURCE", SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUMMARY:"SUMMARY",
3651
+ SUP:"SUP", SVG:"SVG", TABLE:"TABLE", TBODY:"TBODY", TD:"TD", TEMPLATE:"TEMPLATE", TEXTAREA:"TEXTAREA", TFOOT:"TFOOT", TH:"TH", THEAD:"THEAD", TIME:"TIME", TITLE:"TITLE", TR:"TR", TRACK:"TRACK", TT:"TT", U:"U", UL:"UL", VAR:"VAR", VIDEO:"VIDEO", WBR:"WBR"};
3652
+ goog.dom.tags = {};
3653
+ goog.dom.tags.VOID_TAGS_ = goog.object.createSet("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));
3654
+ goog.dom.tags.isVoidTag = function(a) {
3655
+ return !0 === goog.dom.tags.VOID_TAGS_[a];
3582
3656
  };
3583
- goog.structs.Set = function(a) {
3584
- this.map_ = new goog.structs.Map;
3585
- a && this.addAll(a);
3657
+ goog.string.TypedString = function() {
3586
3658
  };
3587
- goog.structs.Set.getKey_ = function(a) {
3588
- var b = typeof a;
3589
- return "object" == b && a || "function" == b ? "o" + goog.getUid(a) : b.substr(0, 1) + a;
3659
+ goog.string.Const = function() {
3660
+ this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = "";
3661
+ this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_;
3590
3662
  };
3591
- goog.structs.Set.prototype.getCount = function() {
3592
- return this.map_.getCount();
3663
+ goog.string.Const.prototype.implementsGoogStringTypedString = !0;
3664
+ goog.string.Const.prototype.getTypedStringValue = function() {
3665
+ return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
3593
3666
  };
3594
- goog.structs.Set.prototype.add = function(a) {
3595
- this.map_.set(goog.structs.Set.getKey_(a), a);
3667
+ goog.string.Const.prototype.toString = function() {
3668
+ return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}";
3596
3669
  };
3597
- goog.structs.Set.prototype.addAll = function(a) {
3598
- a = goog.structs.getValues(a);
3599
- for (var b = a.length, c = 0;c < b;c++) {
3600
- this.add(a[c]);
3670
+ goog.string.Const.unwrap = function(a) {
3671
+ if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) {
3672
+ return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
3601
3673
  }
3674
+ goog.asserts.fail("expected object of type Const, got '" + a + "'");
3675
+ return "type_error:Const";
3602
3676
  };
3603
- goog.structs.Set.prototype.removeAll = function(a) {
3604
- a = goog.structs.getValues(a);
3605
- for (var b = a.length, c = 0;c < b;c++) {
3606
- this.remove(a[c]);
3607
- }
3677
+ goog.string.Const.from = function(a) {
3678
+ return goog.string.Const.create__googStringSecurityPrivate_(a);
3608
3679
  };
3609
- goog.structs.Set.prototype.remove = function(a) {
3610
- return this.map_.remove(goog.structs.Set.getKey_(a));
3680
+ goog.string.Const.TYPE_MARKER_ = {};
3681
+ goog.string.Const.create__googStringSecurityPrivate_ = function(a) {
3682
+ var b = new goog.string.Const;
3683
+ b.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a;
3684
+ return b;
3611
3685
  };
3612
- goog.structs.Set.prototype.clear = function() {
3613
- this.map_.clear();
3686
+ goog.html = {};
3687
+ goog.html.SafeStyle = function() {
3688
+ this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
3689
+ this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3614
3690
  };
3615
- goog.structs.Set.prototype.isEmpty = function() {
3616
- return this.map_.isEmpty();
3691
+ goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
3692
+ goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
3693
+ goog.html.SafeStyle.fromConstant = function(a) {
3694
+ a = goog.string.Const.unwrap(a);
3695
+ if (0 === a.length) {
3696
+ return goog.html.SafeStyle.EMPTY;
3697
+ }
3698
+ goog.html.SafeStyle.checkStyle_(a);
3699
+ goog.asserts.assert(goog.string.endsWith(a, ";"), "Last character of style string is not ';': " + a);
3700
+ goog.asserts.assert(goog.string.contains(a, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
3701
+ return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a);
3617
3702
  };
3618
- goog.structs.Set.prototype.contains = function(a) {
3619
- return this.map_.containsKey(goog.structs.Set.getKey_(a));
3703
+ goog.html.SafeStyle.checkStyle_ = function(a) {
3704
+ goog.asserts.assert(!/[<>]/.test(a), "Forbidden characters in style string: " + a);
3620
3705
  };
3621
- goog.structs.Set.prototype.containsAll = function(a) {
3622
- return goog.structs.every(a, this.contains, this);
3706
+ goog.html.SafeStyle.prototype.getTypedStringValue = function() {
3707
+ return this.privateDoNotAccessOrElseSafeStyleWrappedValue_;
3623
3708
  };
3624
- goog.structs.Set.prototype.intersection = function(a) {
3625
- var b = new goog.structs.Set;
3626
- a = goog.structs.getValues(a);
3627
- for (var c = 0;c < a.length;c++) {
3628
- var d = a[c];
3629
- this.contains(d) && b.add(d);
3709
+ goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function() {
3710
+ return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}";
3711
+ });
3712
+ goog.html.SafeStyle.unwrap = function(a) {
3713
+ if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3714
+ return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
3630
3715
  }
3631
- return b;
3632
- };
3633
- goog.structs.Set.prototype.difference = function(a) {
3634
- var b = this.clone();
3635
- b.removeAll(a);
3636
- return b;
3716
+ goog.asserts.fail("expected object of type SafeStyle, got '" + a + "'");
3717
+ return "type_error:SafeStyle";
3637
3718
  };
3638
- goog.structs.Set.prototype.getValues = function() {
3639
- return this.map_.getValues();
3719
+ goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(a) {
3720
+ return (new goog.html.SafeStyle).initSecurityPrivateDoNotAccessOrElse_(a);
3640
3721
  };
3641
- goog.structs.Set.prototype.clone = function() {
3642
- return new goog.structs.Set(this);
3722
+ goog.html.SafeStyle.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
3723
+ this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
3724
+ return this;
3643
3725
  };
3644
- goog.structs.Set.prototype.equals = function(a) {
3645
- return this.getCount() == goog.structs.getCount(a) && this.isSubsetOf(a);
3726
+ goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
3727
+ goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
3728
+ goog.html.SafeStyle.create = function(a) {
3729
+ var b = "", c;
3730
+ for (c in a) {
3731
+ if (!/^[-_a-zA-Z0-9]+$/.test(c)) {
3732
+ throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
3733
+ }
3734
+ var d = a[c];
3735
+ null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) ? goog.html.SafeStyle.hasBalancedQuotes_(d) || (goog.asserts.fail("String value requires balanced quotes, got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING) : (goog.asserts.fail("String value allows only [-,.\"'%_!# a-zA-Z0-9], got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING), b += c + ":" + d +
3736
+ ";");
3737
+ }
3738
+ if (!b) {
3739
+ return goog.html.SafeStyle.EMPTY;
3740
+ }
3741
+ goog.html.SafeStyle.checkStyle_(b);
3742
+ return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b);
3646
3743
  };
3647
- goog.structs.Set.prototype.isSubsetOf = function(a) {
3648
- var b = goog.structs.getCount(a);
3649
- if (this.getCount() > b) {
3650
- return!1;
3744
+ goog.html.SafeStyle.hasBalancedQuotes_ = function(a) {
3745
+ for (var b = !0, c = !0, d = 0;d < a.length;d++) {
3746
+ var e = a.charAt(d);
3747
+ "'" == e && c ? b = !b : '"' == e && b && (c = !c);
3651
3748
  }
3652
- !(a instanceof goog.structs.Set) && 5 < b && (a = new goog.structs.Set(a));
3653
- return goog.structs.every(this, function(b) {
3654
- return goog.structs.contains(a, b);
3655
- });
3749
+ return b && c;
3656
3750
  };
3657
- goog.structs.Set.prototype.__iterator__ = function(a) {
3658
- return this.map_.__iterator__(!1);
3751
+ goog.html.SafeStyle.VALUE_RE_ = /^[-,."'%_!# a-zA-Z0-9]+$/;
3752
+ goog.html.SafeStyle.concat = function(a) {
3753
+ var b = "", c = function(a) {
3754
+ goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a);
3755
+ };
3756
+ goog.array.forEach(arguments, c);
3757
+ return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY;
3659
3758
  };
3660
- goog.debug.LOGGING_ENABLED = goog.DEBUG;
3661
- goog.debug.catchErrors = function(a, b, c) {
3662
- c = c || goog.global;
3663
- var d = c.onerror, e = !!b;
3664
- goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher("535.3") && (e = !e);
3665
- c.onerror = function(b, c, h, k, l) {
3666
- d && d(b, c, h, k, l);
3667
- a({message:b, fileName:c, line:h, col:k, error:l});
3668
- return e;
3759
+ goog.html.SafeStyleSheet = function() {
3760
+ this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = "";
3761
+ this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3762
+ };
3763
+ goog.html.SafeStyleSheet.prototype.implementsGoogStringTypedString = !0;
3764
+ goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
3765
+ goog.html.SafeStyleSheet.concat = function(a) {
3766
+ var b = "", c = function(a) {
3767
+ goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyleSheet.unwrap(a);
3669
3768
  };
3769
+ goog.array.forEach(arguments, c);
3770
+ return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b);
3670
3771
  };
3671
- goog.debug.expose = function(a, b) {
3672
- if ("undefined" == typeof a) {
3673
- return "undefined";
3772
+ goog.html.SafeStyleSheet.fromConstant = function(a) {
3773
+ a = goog.string.Const.unwrap(a);
3774
+ if (0 === a.length) {
3775
+ return goog.html.SafeStyleSheet.EMPTY;
3674
3776
  }
3675
- if (null == a) {
3676
- return "NULL";
3777
+ goog.asserts.assert(!goog.string.contains(a, "<"), "Forbidden '<' character in style sheet string: " + a);
3778
+ return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(a);
3779
+ };
3780
+ goog.html.SafeStyleSheet.prototype.getTypedStringValue = function() {
3781
+ return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
3782
+ };
3783
+ goog.DEBUG && (goog.html.SafeStyleSheet.prototype.toString = function() {
3784
+ return "SafeStyleSheet{" + this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ + "}";
3785
+ });
3786
+ goog.html.SafeStyleSheet.unwrap = function(a) {
3787
+ if (a instanceof goog.html.SafeStyleSheet && a.constructor === goog.html.SafeStyleSheet && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyleSheet.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3788
+ return a.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_;
3677
3789
  }
3678
- var c = [], d;
3679
- for (d in a) {
3680
- if (b || !goog.isFunction(a[d])) {
3681
- var e = d + " = ";
3682
- try {
3683
- e += a[d];
3684
- } catch (f) {
3685
- e += "*** " + f + " ***";
3686
- }
3687
- c.push(e);
3688
- }
3790
+ goog.asserts.fail("expected object of type SafeStyleSheet, got '" + a + "'");
3791
+ return "type_error:SafeStyleSheet";
3792
+ };
3793
+ goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse = function(a) {
3794
+ return (new goog.html.SafeStyleSheet).initSecurityPrivateDoNotAccessOrElse_(a);
3795
+ };
3796
+ goog.html.SafeStyleSheet.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
3797
+ this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_ = a;
3798
+ return this;
3799
+ };
3800
+ goog.html.SafeStyleSheet.EMPTY = goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse("");
3801
+ goog.fs = {};
3802
+ goog.fs.url = {};
3803
+ goog.fs.url.createObjectUrl = function(a) {
3804
+ return goog.fs.url.getUrlObject_().createObjectURL(a);
3805
+ };
3806
+ goog.fs.url.revokeObjectUrl = function(a) {
3807
+ goog.fs.url.getUrlObject_().revokeObjectURL(a);
3808
+ };
3809
+ goog.fs.url.getUrlObject_ = function() {
3810
+ var a = goog.fs.url.findUrlObject_();
3811
+ if (null != a) {
3812
+ return a;
3689
3813
  }
3690
- return c.join("\n");
3814
+ throw Error("This browser doesn't seem to support blob URLs");
3691
3815
  };
3692
- goog.debug.deepExpose = function(a, b) {
3693
- var c = [], d = function(a, f, g) {
3694
- var h = f + " ";
3695
- g = new goog.structs.Set(g);
3696
- try {
3697
- if (goog.isDef(a)) {
3698
- if (goog.isNull(a)) {
3699
- c.push("NULL");
3700
- } else {
3701
- if (goog.isString(a)) {
3702
- c.push('"' + a.replace(/\n/g, "\n" + f) + '"');
3703
- } else {
3704
- if (goog.isFunction(a)) {
3705
- c.push(String(a).replace(/\n/g, "\n" + f));
3706
- } else {
3707
- if (goog.isObject(a)) {
3708
- if (g.contains(a)) {
3709
- c.push("*** reference loop detected ***");
3710
- } else {
3711
- g.add(a);
3712
- c.push("{");
3713
- for (var k in a) {
3714
- if (b || !goog.isFunction(a[k])) {
3715
- c.push("\n"), c.push(h), c.push(k + " = "), d(a[k], h, g);
3716
- }
3717
- }
3718
- c.push("\n" + f + "}");
3719
- }
3720
- } else {
3721
- c.push(a);
3722
- }
3723
- }
3724
- }
3725
- }
3726
- } else {
3727
- c.push("undefined");
3728
- }
3729
- } catch (l) {
3730
- c.push("*** " + l + " ***");
3731
- }
3732
- };
3733
- d(a, "", new goog.structs.Set);
3734
- return c.join("");
3816
+ goog.fs.url.findUrlObject_ = function() {
3817
+ return goog.isDef(goog.global.URL) && goog.isDef(goog.global.URL.createObjectURL) ? goog.global.URL : goog.isDef(goog.global.webkitURL) && goog.isDef(goog.global.webkitURL.createObjectURL) ? goog.global.webkitURL : goog.isDef(goog.global.createObjectURL) ? goog.global : null;
3735
3818
  };
3736
- goog.debug.exposeArray = function(a) {
3737
- for (var b = [], c = 0;c < a.length;c++) {
3738
- goog.isArray(a[c]) ? b.push(goog.debug.exposeArray(a[c])) : b.push(a[c]);
3739
- }
3740
- return "[ " + b.join(", ") + " ]";
3819
+ goog.fs.url.browserSupportsObjectUrls = function() {
3820
+ return null != goog.fs.url.findUrlObject_();
3741
3821
  };
3742
- goog.debug.exposeException = function(a, b) {
3743
- try {
3744
- var c = goog.debug.normalizeErrorObject(a);
3745
- return "Message: " + goog.string.htmlEscape(c.message) + '\nUrl: <a href="view-source:' + c.fileName + '" target="_new">' + c.fileName + "</a>\nLine: " + c.lineNumber + "\n\nBrowser stack:\n" + goog.string.htmlEscape(c.stack + "-> ") + "[end]\n\nJS stack traversal:\n" + goog.string.htmlEscape(goog.debug.getStacktrace(b) + "-> ");
3746
- } catch (d) {
3747
- return "Exception trying to expose exception! You win, we lose. " + d;
3748
- }
3822
+ goog.i18n = {};
3823
+ goog.i18n.bidi = {};
3824
+ goog.i18n.bidi.FORCE_RTL = !1;
3825
+ goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog.LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog.LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog.LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog.LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0,
3826
+ 2).toLowerCase()) && (2 == goog.LOCALE.length || "-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" == goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4));
3827
+ goog.i18n.bidi.Format = {LRE:"\u202a", RLE:"\u202b", PDF:"\u202c", LRM:"\u200e", RLM:"\u200f"};
3828
+ goog.i18n.bidi.Dir = {LTR:1, RTL:-1, NEUTRAL:0};
3829
+ goog.i18n.bidi.RIGHT = "right";
3830
+ goog.i18n.bidi.LEFT = "left";
3831
+ goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
3832
+ goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
3833
+ goog.i18n.bidi.toDir = function(a, b) {
3834
+ return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog.i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
3749
3835
  };
3750
- goog.debug.normalizeErrorObject = function(a) {
3751
- var b = goog.getObjectByName("window.location.href");
3752
- if (goog.isString(a)) {
3753
- return{message:a, name:"Unknown error", lineNumber:"Not available", fileName:b, stack:"Not available"};
3754
- }
3755
- var c, d, e = !1;
3756
- try {
3757
- c = a.lineNumber || a.line || "Not available";
3758
- } catch (f) {
3759
- c = "Not available", e = !0;
3760
- }
3761
- try {
3762
- d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b;
3763
- } catch (g) {
3764
- d = "Not available", e = !0;
3765
- }
3766
- return!e && a.lineNumber && a.fileName && a.stack && a.message && a.name ? a : {message:a.message || "Not available", name:a.name || "UnknownError", lineNumber:c, fileName:d, stack:a.stack || "Not available"};
3836
+ goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
3837
+ goog.i18n.bidi.rtlChars_ = "\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";
3838
+ goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
3839
+ goog.i18n.bidi.stripHtmlIfNeeded_ = function(a, b) {
3840
+ return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a;
3767
3841
  };
3768
- goog.debug.enhanceError = function(a, b) {
3769
- var c;
3770
- "string" == typeof a ? (c = Error(a), Error.captureStackTrace && Error.captureStackTrace(c, goog.debug.enhanceError)) : c = a;
3771
- c.stack || (c.stack = goog.debug.getStacktrace(goog.debug.enhanceError));
3772
- if (b) {
3773
- for (var d = 0;c["message" + d];) {
3774
- ++d;
3775
- }
3776
- c["message" + d] = String(b);
3777
- }
3778
- return c;
3842
+ goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
3843
+ goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
3844
+ goog.i18n.bidi.hasAnyRtl = function(a, b) {
3845
+ return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3779
3846
  };
3780
- goog.debug.getStacktraceSimple = function(a) {
3781
- if (goog.STRICT_MODE_COMPATIBLE) {
3782
- var b = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);
3783
- if (b) {
3784
- return b;
3785
- }
3786
- }
3787
- for (var b = [], c = arguments.callee.caller, d = 0;c && (!a || d < a);) {
3788
- b.push(goog.debug.getFunctionName(c));
3789
- b.push("()\n");
3790
- try {
3791
- c = c.caller;
3792
- } catch (e) {
3793
- b.push("[exception trying to get caller]\n");
3794
- break;
3795
- }
3796
- d++;
3797
- if (d >= goog.debug.MAX_STACK_DEPTH) {
3798
- b.push("[...long stack...]");
3799
- break;
3800
- }
3801
- }
3802
- a && d >= a ? b.push("[...reached max depth limit...]") : b.push("[end]");
3803
- return b.join("");
3847
+ goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
3848
+ goog.i18n.bidi.hasAnyLtr = function(a, b) {
3849
+ return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3804
3850
  };
3805
- goog.debug.MAX_STACK_DEPTH = 50;
3806
- goog.debug.getNativeStackTrace_ = function(a) {
3807
- var b = Error();
3808
- if (Error.captureStackTrace) {
3809
- return Error.captureStackTrace(b, a), String(b.stack);
3810
- }
3811
- try {
3812
- throw b;
3813
- } catch (c) {
3814
- b = c;
3815
- }
3816
- return(a = b.stack) ? String(a) : null;
3851
+ goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
3852
+ goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
3853
+ goog.i18n.bidi.isRtlChar = function(a) {
3854
+ return goog.i18n.bidi.rtlRe_.test(a);
3817
3855
  };
3818
- goog.debug.getStacktrace = function(a) {
3819
- var b;
3820
- goog.STRICT_MODE_COMPATIBLE && (b = goog.debug.getNativeStackTrace_(a || goog.debug.getStacktrace));
3821
- b || (b = goog.debug.getStacktraceHelper_(a || arguments.callee.caller, []));
3822
- return b;
3856
+ goog.i18n.bidi.isLtrChar = function(a) {
3857
+ return goog.i18n.bidi.ltrRe_.test(a);
3823
3858
  };
3824
- goog.debug.getStacktraceHelper_ = function(a, b) {
3825
- var c = [];
3826
- if (goog.array.contains(b, a)) {
3827
- c.push("[...circular reference...]");
3828
- } else {
3829
- if (a && b.length < goog.debug.MAX_STACK_DEPTH) {
3830
- c.push(goog.debug.getFunctionName(a) + "(");
3831
- for (var d = a.arguments, e = 0;d && e < d.length;e++) {
3832
- 0 < e && c.push(", ");
3833
- var f;
3834
- f = d[e];
3835
- switch(typeof f) {
3836
- case "object":
3837
- f = f ? "object" : "null";
3838
- break;
3839
- case "string":
3840
- break;
3841
- case "number":
3842
- f = String(f);
3843
- break;
3844
- case "boolean":
3845
- f = f ? "true" : "false";
3846
- break;
3847
- case "function":
3848
- f = (f = goog.debug.getFunctionName(f)) ? f : "[fn]";
3849
- break;
3850
- default:
3851
- f = typeof f;
3852
- }
3853
- 40 < f.length && (f = f.substr(0, 40) + "...");
3854
- c.push(f);
3855
- }
3856
- b.push(a);
3857
- c.push(")\n");
3858
- try {
3859
- c.push(goog.debug.getStacktraceHelper_(a.caller, b));
3860
- } catch (g) {
3861
- c.push("[exception trying to get caller]\n");
3862
- }
3863
- } else {
3864
- a ? c.push("[...long stack...]") : c.push("[end]");
3865
- }
3866
- }
3867
- return c.join("");
3859
+ goog.i18n.bidi.isNeutralChar = function(a) {
3860
+ return !goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a);
3868
3861
  };
3869
- goog.debug.setFunctionResolver = function(a) {
3870
- goog.debug.fnNameResolver_ = a;
3862
+ goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
3863
+ goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
3864
+ goog.i18n.bidi.startsWithRtl = function(a, b) {
3865
+ return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3871
3866
  };
3872
- goog.debug.getFunctionName = function(a) {
3873
- if (goog.debug.fnNameCache_[a]) {
3874
- return goog.debug.fnNameCache_[a];
3875
- }
3876
- if (goog.debug.fnNameResolver_) {
3877
- var b = goog.debug.fnNameResolver_(a);
3878
- if (b) {
3879
- return goog.debug.fnNameCache_[a] = b;
3880
- }
3881
- }
3882
- a = String(a);
3883
- goog.debug.fnNameCache_[a] || (b = /function ([^\(]+)/.exec(a), goog.debug.fnNameCache_[a] = b ? b[1] : "[Anonymous]");
3884
- return goog.debug.fnNameCache_[a];
3867
+ goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
3868
+ goog.i18n.bidi.startsWithLtr = function(a, b) {
3869
+ return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3885
3870
  };
3886
- goog.debug.makeWhitespaceVisible = function(a) {
3887
- return a.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]");
3871
+ goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
3872
+ goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
3873
+ goog.i18n.bidi.isNeutralText = function(a, b) {
3874
+ a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
3875
+ return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a);
3888
3876
  };
3889
- goog.debug.fnNameCache_ = {};
3890
- goog.debug.LogRecord = function(a, b, c, d, e) {
3891
- this.reset(a, b, c, d, e);
3877
+ goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
3878
+ goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
3879
+ goog.i18n.bidi.endsWithLtr = function(a, b) {
3880
+ return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3892
3881
  };
3893
- goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
3894
- goog.debug.LogRecord.prototype.exception_ = null;
3895
- goog.debug.LogRecord.prototype.exceptionText_ = null;
3896
- goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS = !0;
3897
- goog.debug.LogRecord.nextSequenceNumber_ = 0;
3898
- goog.debug.LogRecord.prototype.reset = function(a, b, c, d, e) {
3899
- goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS && (this.sequenceNumber_ = "number" == typeof e ? e : goog.debug.LogRecord.nextSequenceNumber_++);
3900
- this.time_ = d || goog.now();
3901
- this.level_ = a;
3902
- this.msg_ = b;
3903
- this.loggerName_ = c;
3904
- delete this.exception_;
3905
- delete this.exceptionText_;
3882
+ goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
3883
+ goog.i18n.bidi.endsWithRtl = function(a, b) {
3884
+ return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
3906
3885
  };
3907
- goog.debug.LogRecord.prototype.getLoggerName = function() {
3908
- return this.loggerName_;
3886
+ goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
3887
+ goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
3888
+ goog.i18n.bidi.isRtlLanguage = function(a) {
3889
+ return goog.i18n.bidi.rtlLocalesRe_.test(a);
3909
3890
  };
3910
- goog.debug.LogRecord.prototype.getException = function() {
3911
- return this.exception_;
3891
+ goog.i18n.bidi.bracketGuardHtmlRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)/g;
3892
+ goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
3893
+ goog.i18n.bidi.guardBracketInHtml = function(a, b) {
3894
+ return (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=rtl>$&</span>") : a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=ltr>$&</span>");
3912
3895
  };
3913
- goog.debug.LogRecord.prototype.setException = function(a) {
3914
- this.exception_ = a;
3896
+ goog.i18n.bidi.guardBracketInText = function(a, b) {
3897
+ var c = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
3898
+ return a.replace(goog.i18n.bidi.bracketGuardTextRe_, c + "$&" + c);
3915
3899
  };
3916
- goog.debug.LogRecord.prototype.getExceptionText = function() {
3917
- return this.exceptionText_;
3900
+ goog.i18n.bidi.enforceRtlInHtml = function(a) {
3901
+ return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>";
3902
+ };
3903
+ goog.i18n.bidi.enforceRtlInText = function(a) {
3904
+ return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF;
3905
+ };
3906
+ goog.i18n.bidi.enforceLtrInHtml = function(a) {
3907
+ return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>";
3908
+ };
3909
+ goog.i18n.bidi.enforceLtrInText = function(a) {
3910
+ return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF;
3911
+ };
3912
+ goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
3913
+ goog.i18n.bidi.leftRe_ = /left/gi;
3914
+ goog.i18n.bidi.rightRe_ = /right/gi;
3915
+ goog.i18n.bidi.tempRe_ = /%%%%/g;
3916
+ goog.i18n.bidi.mirrorCSS = function(a) {
3917
+ return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT);
3918
3918
  };
3919
- goog.debug.LogRecord.prototype.setExceptionText = function(a) {
3920
- this.exceptionText_ = a;
3919
+ goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
3920
+ goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
3921
+ goog.i18n.bidi.normalizeHebrewQuote = function(a) {
3922
+ return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3");
3923
+ };
3924
+ goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
3925
+ goog.i18n.bidi.hasNumeralsRe_ = /[\d\u06f0-\u06f9]/;
3926
+ goog.i18n.bidi.rtlDetectionThreshold_ = .4;
3927
+ goog.i18n.bidi.estimateDirection = function(a, b) {
3928
+ for (var c = 0, d = 0, e = !1, f = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_), g = 0;g < f.length;g++) {
3929
+ var h = f[g];
3930
+ goog.i18n.bidi.startsWithRtl(h) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(h) ? e = !0 : goog.i18n.bidi.hasAnyLtr(h) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(h) && (e = !0);
3931
+ }
3932
+ return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
3933
+ };
3934
+ goog.i18n.bidi.detectRtlDirectionality = function(a, b) {
3935
+ return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL;
3936
+ };
3937
+ goog.i18n.bidi.setElementDirAndAlign = function(a, b) {
3938
+ a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr");
3939
+ };
3940
+ goog.i18n.bidi.setElementDirByTextDirectionality = function(a, b) {
3941
+ switch(goog.i18n.bidi.estimateDirection(b)) {
3942
+ case goog.i18n.bidi.Dir.LTR:
3943
+ a.dir = "ltr";
3944
+ break;
3945
+ case goog.i18n.bidi.Dir.RTL:
3946
+ a.dir = "rtl";
3947
+ break;
3948
+ default:
3949
+ a.removeAttribute("dir");
3950
+ }
3951
+ };
3952
+ goog.i18n.bidi.DirectionalString = function() {
3953
+ };
3954
+ goog.html.SafeUrl = function() {
3955
+ this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
3956
+ this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3957
+ };
3958
+ goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
3959
+ goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
3960
+ goog.html.SafeUrl.prototype.getTypedStringValue = function() {
3961
+ return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
3921
3962
  };
3922
- goog.debug.LogRecord.prototype.setLoggerName = function(a) {
3923
- this.loggerName_ = a;
3963
+ goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
3964
+ goog.html.SafeUrl.prototype.getDirection = function() {
3965
+ return goog.i18n.bidi.Dir.LTR;
3924
3966
  };
3925
- goog.debug.LogRecord.prototype.getLevel = function() {
3926
- return this.level_;
3967
+ goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function() {
3968
+ return "SafeUrl{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
3969
+ });
3970
+ goog.html.SafeUrl.unwrap = function(a) {
3971
+ if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
3972
+ return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
3973
+ }
3974
+ goog.asserts.fail("expected object of type SafeUrl, got '" + a + "'");
3975
+ return "type_error:SafeUrl";
3927
3976
  };
3928
- goog.debug.LogRecord.prototype.setLevel = function(a) {
3929
- this.level_ = a;
3977
+ goog.html.SafeUrl.fromConstant = function(a) {
3978
+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
3930
3979
  };
3931
- goog.debug.LogRecord.prototype.getMessage = function() {
3932
- return this.msg_;
3980
+ goog.html.SAFE_BLOB_TYPE_PATTERN_ = /^image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)$/i;
3981
+ goog.html.SafeUrl.fromBlob = function(a) {
3982
+ a = goog.html.SAFE_BLOB_TYPE_PATTERN_.test(a.type) ? goog.fs.url.createObjectUrl(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
3983
+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a);
3933
3984
  };
3934
- goog.debug.LogRecord.prototype.setMessage = function(a) {
3935
- this.msg_ = a;
3985
+ goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto|ftp):|[^&:/?#]*(?:[/?#]|$))/i;
3986
+ goog.html.SafeUrl.sanitize = function(a) {
3987
+ if (a instanceof goog.html.SafeUrl) {
3988
+ return a;
3989
+ }
3990
+ a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
3991
+ a = goog.html.SAFE_URL_PATTERN_.test(a) ? goog.html.SafeUrl.normalize_(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
3992
+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a);
3936
3993
  };
3937
- goog.debug.LogRecord.prototype.getMillis = function() {
3938
- return this.time_;
3994
+ goog.html.SafeUrl.normalize_ = function(a) {
3995
+ try {
3996
+ var b = encodeURI(a);
3997
+ } catch (c) {
3998
+ return goog.html.SafeUrl.INNOCUOUS_STRING;
3999
+ }
4000
+ return b.replace(goog.html.SafeUrl.NORMALIZE_MATCHER_, function(a) {
4001
+ return goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_[a];
4002
+ });
3939
4003
  };
3940
- goog.debug.LogRecord.prototype.setMillis = function(a) {
3941
- this.time_ = a;
4004
+ goog.html.SafeUrl.NORMALIZE_MATCHER_ = /[()']|%5B|%5D|%25/g;
4005
+ goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_ = {"'":"%27", "(":"%28", ")":"%29", "%5B":"[", "%5D":"]", "%25":"%"};
4006
+ goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4007
+ goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(a) {
4008
+ var b = new goog.html.SafeUrl;
4009
+ b.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
4010
+ return b;
3942
4011
  };
3943
- goog.debug.LogRecord.prototype.getSequenceNumber = function() {
3944
- return this.sequenceNumber_;
4012
+ goog.html.TrustedResourceUrl = function() {
4013
+ this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
4014
+ this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
3945
4015
  };
3946
- goog.debug.LogBuffer = function() {
3947
- goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");
3948
- this.clear();
4016
+ goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
4017
+ goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
4018
+ return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
3949
4019
  };
3950
- goog.debug.LogBuffer.getInstance = function() {
3951
- goog.debug.LogBuffer.instance_ || (goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer);
3952
- return goog.debug.LogBuffer.instance_;
4020
+ goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
4021
+ goog.html.TrustedResourceUrl.prototype.getDirection = function() {
4022
+ return goog.i18n.bidi.Dir.LTR;
3953
4023
  };
3954
- goog.debug.LogBuffer.CAPACITY = 0;
3955
- goog.debug.LogBuffer.prototype.addRecord = function(a, b, c) {
3956
- var d = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
3957
- this.curIndex_ = d;
3958
- if (this.isFull_) {
3959
- return d = this.buffer_[d], d.reset(a, b, c), d;
4024
+ goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function() {
4025
+ return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}";
4026
+ });
4027
+ goog.html.TrustedResourceUrl.unwrap = function(a) {
4028
+ if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4029
+ return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
3960
4030
  }
3961
- this.isFull_ = d == goog.debug.LogBuffer.CAPACITY - 1;
3962
- return this.buffer_[d] = new goog.debug.LogRecord(a, b, c);
3963
- };
3964
- goog.debug.LogBuffer.isBufferingEnabled = function() {
3965
- return 0 < goog.debug.LogBuffer.CAPACITY;
4031
+ goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "'");
4032
+ return "type_error:TrustedResourceUrl";
3966
4033
  };
3967
- goog.debug.LogBuffer.prototype.clear = function() {
3968
- this.buffer_ = Array(goog.debug.LogBuffer.CAPACITY);
3969
- this.curIndex_ = -1;
3970
- this.isFull_ = !1;
4034
+ goog.html.TrustedResourceUrl.fromConstant = function(a) {
4035
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
3971
4036
  };
3972
- goog.debug.LogBuffer.prototype.forEachRecord = function(a) {
3973
- var b = this.buffer_;
3974
- if (b[0]) {
3975
- var c = this.curIndex_, d = this.isFull_ ? c : -1;
3976
- do {
3977
- d = (d + 1) % goog.debug.LogBuffer.CAPACITY, a(b[d]);
3978
- } while (d != c);
3979
- }
4037
+ goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4038
+ goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(a) {
4039
+ var b = new goog.html.TrustedResourceUrl;
4040
+ b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a;
4041
+ return b;
3980
4042
  };
3981
- goog.debug.Logger = function(a) {
3982
- this.name_ = a;
3983
- this.handlers_ = this.children_ = this.level_ = this.parent_ = null;
4043
+ goog.html.SafeHtml = function() {
4044
+ this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
4045
+ this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4046
+ this.dir_ = null;
3984
4047
  };
3985
- goog.debug.Logger.ROOT_LOGGER_NAME = "";
3986
- goog.debug.Logger.ENABLE_HIERARCHY = !0;
3987
- goog.debug.Logger.ENABLE_HIERARCHY || (goog.debug.Logger.rootHandlers_ = []);
3988
- goog.debug.Logger.Level = function(a, b) {
3989
- this.name = a;
3990
- this.value = b;
4048
+ goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
4049
+ goog.html.SafeHtml.prototype.getDirection = function() {
4050
+ return this.dir_;
3991
4051
  };
3992
- goog.debug.Logger.Level.prototype.toString = function() {
3993
- return this.name;
4052
+ goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
4053
+ goog.html.SafeHtml.prototype.getTypedStringValue = function() {
4054
+ return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
3994
4055
  };
3995
- goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
3996
- goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
3997
- goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
3998
- goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
3999
- goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
4000
- goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
4001
- goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
4002
- goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
4003
- goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
4004
- goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
4005
- goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
4006
- goog.debug.Logger.Level.predefinedLevelsCache_ = null;
4007
- goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {
4008
- goog.debug.Logger.Level.predefinedLevelsCache_ = {};
4009
- for (var a = 0, b;b = goog.debug.Logger.Level.PREDEFINED_LEVELS[a];a++) {
4010
- goog.debug.Logger.Level.predefinedLevelsCache_[b.value] = b, goog.debug.Logger.Level.predefinedLevelsCache_[b.name] = b;
4056
+ goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function() {
4057
+ return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
4058
+ });
4059
+ goog.html.SafeHtml.unwrap = function(a) {
4060
+ if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4061
+ return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
4011
4062
  }
4063
+ goog.asserts.fail("expected object of type SafeHtml, got '" + a + "'");
4064
+ return "type_error:SafeHtml";
4012
4065
  };
4013
- goog.debug.Logger.Level.getPredefinedLevel = function(a) {
4014
- goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
4015
- return goog.debug.Logger.Level.predefinedLevelsCache_[a] || null;
4066
+ goog.html.SafeHtml.htmlEscape = function(a) {
4067
+ if (a instanceof goog.html.SafeHtml) {
4068
+ return a;
4069
+ }
4070
+ var b = null;
4071
+ a.implementsGoogI18nBidiDirectionalString && (b = a.getDirection());
4072
+ a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
4073
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(a), b);
4016
4074
  };
4017
- goog.debug.Logger.Level.getPredefinedLevelByValue = function(a) {
4018
- goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
4019
- if (a in goog.debug.Logger.Level.predefinedLevelsCache_) {
4020
- return goog.debug.Logger.Level.predefinedLevelsCache_[a];
4075
+ goog.html.SafeHtml.htmlEscapePreservingNewlines = function(a) {
4076
+ if (a instanceof goog.html.SafeHtml) {
4077
+ return a;
4021
4078
  }
4022
- for (var b = 0;b < goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++b) {
4023
- var c = goog.debug.Logger.Level.PREDEFINED_LEVELS[b];
4024
- if (c.value <= a) {
4025
- return c;
4026
- }
4079
+ a = goog.html.SafeHtml.htmlEscape(a);
4080
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(a)), a.getDirection());
4081
+ };
4082
+ goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(a) {
4083
+ if (a instanceof goog.html.SafeHtml) {
4084
+ return a;
4027
4085
  }
4028
- return null;
4086
+ a = goog.html.SafeHtml.htmlEscape(a);
4087
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(a)), a.getDirection());
4029
4088
  };
4030
- goog.debug.Logger.getLogger = function(a) {
4031
- return goog.debug.LogManager.getLogger(a);
4089
+ goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
4090
+ goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
4091
+ goog.html.SafeHtml.URL_ATTRIBUTES_ = {action:!0, cite:!0, data:!0, formaction:!0, href:!0, manifest:!0, poster:!0, src:!0};
4092
+ goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet(goog.dom.TagName.EMBED, goog.dom.TagName.IFRAME, goog.dom.TagName.LINK, goog.dom.TagName.OBJECT, goog.dom.TagName.SCRIPT, goog.dom.TagName.STYLE, goog.dom.TagName.TEMPLATE);
4093
+ goog.html.SafeHtml.create = function(a, b, c) {
4094
+ if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) {
4095
+ throw Error("Invalid tag name <" + a + ">.");
4096
+ }
4097
+ if (a.toUpperCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) {
4098
+ throw Error("Tag name <" + a + "> is not allowed for SafeHtml.");
4099
+ }
4100
+ return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(a, b, c);
4032
4101
  };
4033
- goog.debug.Logger.logToProfilers = function(a) {
4034
- goog.global.console && (goog.global.console.timeStamp ? goog.global.console.timeStamp(a) : goog.global.console.markTimeline && goog.global.console.markTimeline(a));
4035
- goog.global.msWriteProfilerMark && goog.global.msWriteProfilerMark(a);
4102
+ goog.html.SafeHtml.createIframe = function(a, b, c, d) {
4103
+ var e = {};
4104
+ e.src = a || null;
4105
+ e.srcdoc = b || null;
4106
+ a = goog.html.SafeHtml.combineAttributes(e, {sandbox:""}, c);
4107
+ return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("iframe", a, d);
4036
4108
  };
4037
- goog.debug.Logger.prototype.getName = function() {
4038
- return this.name_;
4109
+ goog.html.SafeHtml.createStyle = function(a, b) {
4110
+ var c = goog.html.SafeHtml.combineAttributes({type:"text/css"}, {}, b), d = "";
4111
+ a = goog.array.concat(a);
4112
+ for (var e = 0;e < a.length;e++) {
4113
+ d += goog.html.SafeStyleSheet.unwrap(a[e]);
4114
+ }
4115
+ d = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(d, goog.i18n.bidi.Dir.NEUTRAL);
4116
+ return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse("style", c, d);
4039
4117
  };
4040
- goog.debug.Logger.prototype.addHandler = function(a) {
4041
- goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a)));
4118
+ goog.html.SafeHtml.getAttrNameAndValue_ = function(a, b, c) {
4119
+ if (c instanceof goog.string.Const) {
4120
+ c = goog.string.Const.unwrap(c);
4121
+ } else {
4122
+ if ("style" == b.toLowerCase()) {
4123
+ c = goog.html.SafeHtml.getStyleValue_(c);
4124
+ } else {
4125
+ if (/^on/i.test(b)) {
4126
+ throw Error('Attribute "' + b + '" requires goog.string.Const value, "' + c + '" given.');
4127
+ }
4128
+ if (b.toLowerCase() in goog.html.SafeHtml.URL_ATTRIBUTES_) {
4129
+ if (c instanceof goog.html.TrustedResourceUrl) {
4130
+ c = goog.html.TrustedResourceUrl.unwrap(c);
4131
+ } else {
4132
+ if (c instanceof goog.html.SafeUrl) {
4133
+ c = goog.html.SafeUrl.unwrap(c);
4134
+ } else {
4135
+ throw Error('Attribute "' + b + '" on tag "' + a + '" requires goog.html.SafeUrl or goog.string.Const value, "' + c + '" given.');
4136
+ }
4137
+ }
4138
+ }
4139
+ }
4140
+ }
4141
+ c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
4142
+ goog.asserts.assert(goog.isString(c) || goog.isNumber(c), "String or number value expected, got " + typeof c + " with value: " + c);
4143
+ return b + '="' + goog.string.htmlEscape(String(c)) + '"';
4042
4144
  };
4043
- goog.debug.Logger.prototype.removeHandler = function(a) {
4044
- if (goog.debug.LOGGING_ENABLED) {
4045
- var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
4046
- return!!b && goog.array.remove(b, a);
4145
+ goog.html.SafeHtml.getStyleValue_ = function(a) {
4146
+ if (!goog.isObject(a)) {
4147
+ throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a + " given: " + a);
4047
4148
  }
4048
- return!1;
4149
+ a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
4150
+ return goog.html.SafeStyle.unwrap(a);
4049
4151
  };
4050
- goog.debug.Logger.prototype.getParent = function() {
4051
- return this.parent_;
4152
+ goog.html.SafeHtml.createWithDir = function(a, b, c, d) {
4153
+ b = goog.html.SafeHtml.create(b, c, d);
4154
+ b.dir_ = a;
4155
+ return b;
4052
4156
  };
4053
- goog.debug.Logger.prototype.getChildren = function() {
4054
- this.children_ || (this.children_ = {});
4055
- return this.children_;
4157
+ goog.html.SafeHtml.concat = function(a) {
4158
+ var b = goog.i18n.bidi.Dir.NEUTRAL, c = "", d = function(a) {
4159
+ goog.isArray(a) ? goog.array.forEach(a, d) : (a = goog.html.SafeHtml.htmlEscape(a), c += goog.html.SafeHtml.unwrap(a), a = a.getDirection(), b == goog.i18n.bidi.Dir.NEUTRAL ? b = a : a != goog.i18n.bidi.Dir.NEUTRAL && b != a && (b = null));
4160
+ };
4161
+ goog.array.forEach(arguments, d);
4162
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, b);
4163
+ };
4164
+ goog.html.SafeHtml.concatWithDir = function(a, b) {
4165
+ var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
4166
+ c.dir_ = a;
4167
+ return c;
4056
4168
  };
4057
- goog.debug.Logger.prototype.setLevel = function(a) {
4058
- goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a));
4169
+ goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4170
+ goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(a, b) {
4171
+ return (new goog.html.SafeHtml).initSecurityPrivateDoNotAccessOrElse_(a, b);
4059
4172
  };
4060
- goog.debug.Logger.prototype.getLevel = function() {
4061
- return goog.debug.LOGGING_ENABLED ? this.level_ : goog.debug.Logger.Level.OFF;
4173
+ goog.html.SafeHtml.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a, b) {
4174
+ this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
4175
+ this.dir_ = b;
4176
+ return this;
4062
4177
  };
4063
- goog.debug.Logger.prototype.getEffectiveLevel = function() {
4064
- if (!goog.debug.LOGGING_ENABLED) {
4065
- return goog.debug.Logger.Level.OFF;
4178
+ goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(a, b, c) {
4179
+ var d = null, e = "<" + a;
4180
+ if (b) {
4181
+ for (var f in b) {
4182
+ if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(f)) {
4183
+ throw Error('Invalid attribute name "' + f + '".');
4184
+ }
4185
+ var g = b[f];
4186
+ goog.isDefAndNotNull(g) && (e += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, f, g));
4187
+ }
4066
4188
  }
4067
- if (!goog.debug.Logger.ENABLE_HIERARCHY) {
4068
- return goog.debug.Logger.rootLevel_;
4189
+ goog.isDefAndNotNull(c) ? goog.isArray(c) || (c = [c]) : c = [];
4190
+ goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a + "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html.SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
4191
+ (a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
4192
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e, d);
4193
+ };
4194
+ goog.html.SafeHtml.combineAttributes = function(a, b, c) {
4195
+ var d = {}, e;
4196
+ for (e in a) {
4197
+ goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = a[e];
4069
4198
  }
4070
- if (this.level_) {
4071
- return this.level_;
4199
+ for (e in b) {
4200
+ goog.asserts.assert(e.toLowerCase() == e, "Must be lower case"), d[e] = b[e];
4072
4201
  }
4073
- if (this.parent_) {
4074
- return this.parent_.getEffectiveLevel();
4202
+ for (e in c) {
4203
+ var f = e.toLowerCase();
4204
+ if (f in a) {
4205
+ throw Error('Cannot override "' + f + '" attribute, got "' + e + '" with value "' + c[e] + '"');
4206
+ }
4207
+ f in b && delete d[f];
4208
+ d[e] = c[e];
4075
4209
  }
4076
- goog.asserts.fail("Root logger has no level set.");
4077
- return null;
4210
+ return d;
4078
4211
  };
4079
- goog.debug.Logger.prototype.isLoggable = function(a) {
4080
- return goog.debug.LOGGING_ENABLED && a.value >= this.getEffectiveLevel().value;
4212
+ goog.html.SafeHtml.DOCTYPE_HTML = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("<!DOCTYPE html>", goog.i18n.bidi.Dir.NEUTRAL);
4213
+ goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
4214
+ goog.html.SafeScript = function() {
4215
+ this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = "";
4216
+ this.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4081
4217
  };
4082
- goog.debug.Logger.prototype.log = function(a, b, c) {
4083
- goog.debug.LOGGING_ENABLED && this.isLoggable(a) && (goog.isFunction(b) && (b = b()), this.doLogRecord_(this.getLogRecord(a, b, c, goog.debug.Logger.prototype.log)));
4218
+ goog.html.SafeScript.prototype.implementsGoogStringTypedString = !0;
4219
+ goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4220
+ goog.html.SafeScript.fromConstant = function(a) {
4221
+ a = goog.string.Const.unwrap(a);
4222
+ return 0 === a.length ? goog.html.SafeScript.EMPTY : goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(a);
4084
4223
  };
4085
- goog.debug.Logger.prototype.getLogRecord = function(a, b, c, d) {
4086
- var e = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
4087
- if (c) {
4088
- var f;
4089
- f = goog.STRICT_MODE_COMPATIBLE ? d || goog.debug.Logger.prototype.getLogRecord : d || arguments.callee.caller;
4090
- e.setException(c);
4091
- e.setExceptionText(goog.debug.exposeException(c, f));
4224
+ goog.html.SafeScript.prototype.getTypedStringValue = function() {
4225
+ return this.privateDoNotAccessOrElseSafeScriptWrappedValue_;
4226
+ };
4227
+ goog.DEBUG && (goog.html.SafeScript.prototype.toString = function() {
4228
+ return "SafeScript{" + this.privateDoNotAccessOrElseSafeScriptWrappedValue_ + "}";
4229
+ });
4230
+ goog.html.SafeScript.unwrap = function(a) {
4231
+ if (a instanceof goog.html.SafeScript && a.constructor === goog.html.SafeScript && a.SAFE_SCRIPT_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeScript.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4232
+ return a.privateDoNotAccessOrElseSafeScriptWrappedValue_;
4092
4233
  }
4093
- return e;
4234
+ goog.asserts.fail("expected object of type SafeScript, got '" + a + "'");
4235
+ return "type_error:SafeScript";
4094
4236
  };
4095
- goog.debug.Logger.prototype.shout = function(a, b) {
4096
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SHOUT, a, b);
4237
+ goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse = function(a) {
4238
+ return (new goog.html.SafeScript).initSecurityPrivateDoNotAccessOrElse_(a);
4097
4239
  };
4098
- goog.debug.Logger.prototype.severe = function(a, b) {
4099
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SEVERE, a, b);
4240
+ goog.html.SafeScript.prototype.initSecurityPrivateDoNotAccessOrElse_ = function(a) {
4241
+ this.privateDoNotAccessOrElseSafeScriptWrappedValue_ = a;
4242
+ return this;
4100
4243
  };
4101
- goog.debug.Logger.prototype.warning = function(a, b) {
4102
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.WARNING, a, b);
4244
+ goog.html.SafeScript.EMPTY = goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse("");
4245
+ goog.html.uncheckedconversions = {};
4246
+ goog.html.uncheckedconversions.safeHtmlFromStringKnownToSatisfyTypeContract = function(a, b, c) {
4247
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4248
+ goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4249
+ return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(b, c || null);
4250
+ };
4251
+ goog.html.uncheckedconversions.safeScriptFromStringKnownToSatisfyTypeContract = function(a, b) {
4252
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4253
+ goog.asserts.assert(!goog.string.isEmpty(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4254
+ return goog.html.SafeScript.createSafeScriptSecurityPrivateDoNotAccessOrElse(b);
4255
+ };
4256
+ goog.html.uncheckedconversions.safeStyleFromStringKnownToSatisfyTypeContract = function(a, b) {
4257
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4258
+ goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4259
+ return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b);
4103
4260
  };
4104
- goog.debug.Logger.prototype.info = function(a, b) {
4105
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.INFO, a, b);
4261
+ goog.html.uncheckedconversions.safeStyleSheetFromStringKnownToSatisfyTypeContract = function(a, b) {
4262
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4263
+ goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4264
+ return goog.html.SafeStyleSheet.createSafeStyleSheetSecurityPrivateDoNotAccessOrElse(b);
4106
4265
  };
4107
- goog.debug.Logger.prototype.config = function(a, b) {
4108
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.CONFIG, a, b);
4266
+ goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract = function(a, b) {
4267
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4268
+ goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4269
+ return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(b);
4109
4270
  };
4110
- goog.debug.Logger.prototype.fine = function(a, b) {
4111
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINE, a, b);
4271
+ goog.html.uncheckedconversions.trustedResourceUrlFromStringKnownToSatisfyTypeContract = function(a, b) {
4272
+ goog.asserts.assertString(goog.string.Const.unwrap(a), "must provide justification");
4273
+ goog.asserts.assert(!goog.string.isEmptyOrWhitespace(goog.string.Const.unwrap(a)), "must provide non-empty justification");
4274
+ return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(b);
4112
4275
  };
4113
- goog.debug.Logger.prototype.finer = function(a, b) {
4114
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINER, a, b);
4276
+ goog.structs.Collection = function() {
4115
4277
  };
4116
- goog.debug.Logger.prototype.finest = function(a, b) {
4117
- goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINEST, a, b);
4278
+ goog.structs.Set = function(a) {
4279
+ this.map_ = new goog.structs.Map;
4280
+ a && this.addAll(a);
4118
4281
  };
4119
- goog.debug.Logger.prototype.logRecord = function(a) {
4120
- goog.debug.LOGGING_ENABLED && this.isLoggable(a.getLevel()) && this.doLogRecord_(a);
4282
+ goog.structs.Set.getKey_ = function(a) {
4283
+ var b = typeof a;
4284
+ return "object" == b && a || "function" == b ? "o" + goog.getUid(a) : b.substr(0, 1) + a;
4121
4285
  };
4122
- goog.debug.Logger.prototype.doLogRecord_ = function(a) {
4123
- goog.debug.Logger.logToProfilers("log:" + a.getMessage());
4124
- if (goog.debug.Logger.ENABLE_HIERARCHY) {
4125
- for (var b = this;b;) {
4126
- b.callPublish_(a), b = b.getParent();
4127
- }
4128
- } else {
4129
- for (var b = 0, c;c = goog.debug.Logger.rootHandlers_[b++];) {
4130
- c(a);
4131
- }
4132
- }
4286
+ goog.structs.Set.prototype.getCount = function() {
4287
+ return this.map_.getCount();
4133
4288
  };
4134
- goog.debug.Logger.prototype.callPublish_ = function(a) {
4135
- if (this.handlers_) {
4136
- for (var b = 0, c;c = this.handlers_[b];b++) {
4137
- c(a);
4138
- }
4139
- }
4289
+ goog.structs.Set.prototype.add = function(a) {
4290
+ this.map_.set(goog.structs.Set.getKey_(a), a);
4140
4291
  };
4141
- goog.debug.Logger.prototype.setParent_ = function(a) {
4142
- this.parent_ = a;
4292
+ goog.structs.Set.prototype.addAll = function(a) {
4293
+ a = goog.structs.getValues(a);
4294
+ for (var b = a.length, c = 0;c < b;c++) {
4295
+ this.add(a[c]);
4296
+ }
4143
4297
  };
4144
- goog.debug.Logger.prototype.addChild_ = function(a, b) {
4145
- this.getChildren()[a] = b;
4298
+ goog.structs.Set.prototype.removeAll = function(a) {
4299
+ a = goog.structs.getValues(a);
4300
+ for (var b = a.length, c = 0;c < b;c++) {
4301
+ this.remove(a[c]);
4302
+ }
4146
4303
  };
4147
- goog.debug.LogManager = {};
4148
- goog.debug.LogManager.loggers_ = {};
4149
- goog.debug.LogManager.rootLogger_ = null;
4150
- goog.debug.LogManager.initialize = function() {
4151
- goog.debug.LogManager.rootLogger_ || (goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME), goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] = goog.debug.LogManager.rootLogger_, goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG));
4304
+ goog.structs.Set.prototype.remove = function(a) {
4305
+ return this.map_.remove(goog.structs.Set.getKey_(a));
4152
4306
  };
4153
- goog.debug.LogManager.getLoggers = function() {
4154
- return goog.debug.LogManager.loggers_;
4307
+ goog.structs.Set.prototype.clear = function() {
4308
+ this.map_.clear();
4155
4309
  };
4156
- goog.debug.LogManager.getRoot = function() {
4157
- goog.debug.LogManager.initialize();
4158
- return goog.debug.LogManager.rootLogger_;
4310
+ goog.structs.Set.prototype.isEmpty = function() {
4311
+ return this.map_.isEmpty();
4159
4312
  };
4160
- goog.debug.LogManager.getLogger = function(a) {
4161
- goog.debug.LogManager.initialize();
4162
- return goog.debug.LogManager.loggers_[a] || goog.debug.LogManager.createLogger_(a);
4313
+ goog.structs.Set.prototype.contains = function(a) {
4314
+ return this.map_.containsKey(goog.structs.Set.getKey_(a));
4163
4315
  };
4164
- goog.debug.LogManager.createFunctionForCatchErrors = function(a) {
4165
- return function(b) {
4166
- (a || goog.debug.LogManager.getRoot()).severe("Error: " + b.message + " (" + b.fileName + " @ Line: " + b.line + ")");
4167
- };
4316
+ goog.structs.Set.prototype.containsAll = function(a) {
4317
+ return goog.structs.every(a, this.contains, this);
4168
4318
  };
4169
- goog.debug.LogManager.createLogger_ = function(a) {
4170
- var b = new goog.debug.Logger(a);
4171
- if (goog.debug.Logger.ENABLE_HIERARCHY) {
4172
- var c = a.lastIndexOf("."), d = a.substr(0, c), c = a.substr(c + 1), d = goog.debug.LogManager.getLogger(d);
4173
- d.addChild_(c, b);
4174
- b.setParent_(d);
4319
+ goog.structs.Set.prototype.intersection = function(a) {
4320
+ var b = new goog.structs.Set;
4321
+ a = goog.structs.getValues(a);
4322
+ for (var c = 0;c < a.length;c++) {
4323
+ var d = a[c];
4324
+ this.contains(d) && b.add(d);
4175
4325
  }
4176
- return goog.debug.LogManager.loggers_[a] = b;
4177
- };
4178
- goog.debug.RelativeTimeProvider = function() {
4179
- this.relativeTimeStart_ = goog.now();
4326
+ return b;
4180
4327
  };
4181
- goog.debug.RelativeTimeProvider.defaultInstance_ = new goog.debug.RelativeTimeProvider;
4182
- goog.debug.RelativeTimeProvider.prototype.set = function(a) {
4183
- this.relativeTimeStart_ = a;
4328
+ goog.structs.Set.prototype.difference = function(a) {
4329
+ var b = this.clone();
4330
+ b.removeAll(a);
4331
+ return b;
4184
4332
  };
4185
- goog.debug.RelativeTimeProvider.prototype.reset = function() {
4186
- this.set(goog.now());
4333
+ goog.structs.Set.prototype.getValues = function() {
4334
+ return this.map_.getValues();
4187
4335
  };
4188
- goog.debug.RelativeTimeProvider.prototype.get = function() {
4189
- return this.relativeTimeStart_;
4336
+ goog.structs.Set.prototype.clone = function() {
4337
+ return new goog.structs.Set(this);
4190
4338
  };
4191
- goog.debug.RelativeTimeProvider.getDefaultInstance = function() {
4192
- return goog.debug.RelativeTimeProvider.defaultInstance_;
4339
+ goog.structs.Set.prototype.equals = function(a) {
4340
+ return this.getCount() == goog.structs.getCount(a) && this.isSubsetOf(a);
4193
4341
  };
4194
- goog.dom.tags = {};
4195
- goog.dom.tags.VOID_TAGS_ = goog.object.createSet("area base br col command embed hr img input keygen link meta param source track wbr".split(" "));
4196
- goog.dom.tags.isVoidTag = function(a) {
4197
- return!0 === goog.dom.tags.VOID_TAGS_[a];
4342
+ goog.structs.Set.prototype.isSubsetOf = function(a) {
4343
+ var b = goog.structs.getCount(a);
4344
+ if (this.getCount() > b) {
4345
+ return !1;
4346
+ }
4347
+ !(a instanceof goog.structs.Set) && 5 < b && (a = new goog.structs.Set(a));
4348
+ return goog.structs.every(this, function(b) {
4349
+ return goog.structs.contains(a, b);
4350
+ });
4198
4351
  };
4199
- goog.string.TypedString = function() {
4352
+ goog.structs.Set.prototype.__iterator__ = function(a) {
4353
+ return this.map_.__iterator__(!1);
4200
4354
  };
4201
- goog.string.Const = function() {
4202
- this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = "";
4203
- this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ = goog.string.Const.TYPE_MARKER_;
4355
+ goog.debug.LOGGING_ENABLED = goog.DEBUG;
4356
+ goog.debug.catchErrors = function(a, b, c) {
4357
+ c = c || goog.global;
4358
+ var d = c.onerror, e = !!b;
4359
+ goog.userAgent.WEBKIT && !goog.userAgent.isVersionOrHigher("535.3") && (e = !e);
4360
+ c.onerror = function(b, c, h, k, l) {
4361
+ d && d(b, c, h, k, l);
4362
+ a({message:b, fileName:c, line:h, col:k, error:l});
4363
+ return e;
4364
+ };
4204
4365
  };
4205
- goog.string.Const.prototype.implementsGoogStringTypedString = !0;
4206
- goog.string.Const.prototype.getTypedStringValue = function() {
4207
- return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
4366
+ goog.debug.expose = function(a, b) {
4367
+ if ("undefined" == typeof a) {
4368
+ return "undefined";
4369
+ }
4370
+ if (null == a) {
4371
+ return "NULL";
4372
+ }
4373
+ var c = [], d;
4374
+ for (d in a) {
4375
+ if (b || !goog.isFunction(a[d])) {
4376
+ var e = d + " = ";
4377
+ try {
4378
+ e += a[d];
4379
+ } catch (f) {
4380
+ e += "*** " + f + " ***";
4381
+ }
4382
+ c.push(e);
4383
+ }
4384
+ }
4385
+ return c.join("\n");
4208
4386
  };
4209
- goog.string.Const.prototype.toString = function() {
4210
- return "Const{" + this.stringConstValueWithSecurityContract__googStringSecurityPrivate_ + "}";
4387
+ goog.debug.deepExpose = function(a, b) {
4388
+ var c = [], d = function(a, f, g) {
4389
+ var h = f + " ";
4390
+ g = new goog.structs.Set(g);
4391
+ try {
4392
+ if (goog.isDef(a)) {
4393
+ if (goog.isNull(a)) {
4394
+ c.push("NULL");
4395
+ } else {
4396
+ if (goog.isString(a)) {
4397
+ c.push('"' + a.replace(/\n/g, "\n" + f) + '"');
4398
+ } else {
4399
+ if (goog.isFunction(a)) {
4400
+ c.push(String(a).replace(/\n/g, "\n" + f));
4401
+ } else {
4402
+ if (goog.isObject(a)) {
4403
+ if (g.contains(a)) {
4404
+ c.push("*** reference loop detected ***");
4405
+ } else {
4406
+ g.add(a);
4407
+ c.push("{");
4408
+ for (var k in a) {
4409
+ if (b || !goog.isFunction(a[k])) {
4410
+ c.push("\n"), c.push(h), c.push(k + " = "), d(a[k], h, g);
4411
+ }
4412
+ }
4413
+ c.push("\n" + f + "}");
4414
+ }
4415
+ } else {
4416
+ c.push(a);
4417
+ }
4418
+ }
4419
+ }
4420
+ }
4421
+ } else {
4422
+ c.push("undefined");
4423
+ }
4424
+ } catch (l) {
4425
+ c.push("*** " + l + " ***");
4426
+ }
4427
+ };
4428
+ d(a, "", new goog.structs.Set);
4429
+ return c.join("");
4211
4430
  };
4212
- goog.string.Const.unwrap = function(a) {
4213
- if (a instanceof goog.string.Const && a.constructor === goog.string.Const && a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_ === goog.string.Const.TYPE_MARKER_) {
4214
- return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;
4431
+ goog.debug.exposeArray = function(a) {
4432
+ for (var b = [], c = 0;c < a.length;c++) {
4433
+ goog.isArray(a[c]) ? b.push(goog.debug.exposeArray(a[c])) : b.push(a[c]);
4215
4434
  }
4216
- goog.asserts.fail("expected object of type Const, got '" + a + "'");
4217
- return "type_error:Const";
4218
- };
4219
- goog.string.Const.from = function(a) {
4220
- return goog.string.Const.create__googStringSecurityPrivate_(a);
4221
- };
4222
- goog.string.Const.TYPE_MARKER_ = {};
4223
- goog.string.Const.create__googStringSecurityPrivate_ = function(a) {
4224
- var b = new goog.string.Const;
4225
- b.stringConstValueWithSecurityContract__googStringSecurityPrivate_ = a;
4226
- return b;
4435
+ return "[ " + b.join(", ") + " ]";
4227
4436
  };
4228
- goog.html = {};
4229
- goog.html.SafeStyle = function() {
4230
- this.privateDoNotAccessOrElseSafeStyleWrappedValue_ = "";
4231
- this.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4437
+ goog.debug.exposeException = function(a, b) {
4438
+ var c = goog.debug.exposeExceptionAsHtml(a, b);
4439
+ return goog.html.SafeHtml.unwrap(c);
4232
4440
  };
4233
- goog.html.SafeStyle.prototype.implementsGoogStringTypedString = !0;
4234
- goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4235
- goog.html.SafeStyle.fromConstant = function(a) {
4236
- a = goog.string.Const.unwrap(a);
4237
- if (0 === a.length) {
4238
- return goog.html.SafeStyle.EMPTY;
4441
+ goog.debug.exposeExceptionAsHtml = function(a, b) {
4442
+ try {
4443
+ var c = goog.debug.normalizeErrorObject(a), d = goog.debug.createViewSourceUrl_(c.fileName);
4444
+ return goog.html.SafeHtml.concat(goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Message: " + c.message + "\nUrl: "), goog.html.SafeHtml.create("a", {href:d, target:"_new"}, c.fileName), goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("\nLine: " + c.lineNumber + "\n\nBrowser stack:\n" + c.stack + "-> [end]\n\nJS stack traversal:\n" + goog.debug.getStacktrace(b) + "-> "));
4445
+ } catch (e) {
4446
+ return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces("Exception trying to expose exception! You win, we lose. " + e);
4239
4447
  }
4240
- goog.html.SafeStyle.checkStyle_(a);
4241
- goog.asserts.assert(goog.string.endsWith(a, ";"), "Last character of style string is not ';': " + a);
4242
- goog.asserts.assert(goog.string.contains(a, ":"), "Style string must contain at least one ':', to specify a \"name: value\" pair: " + a);
4243
- return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(a);
4244
- };
4245
- goog.html.SafeStyle.checkStyle_ = function(a) {
4246
- goog.asserts.assert(!/[<>]/.test(a), "Forbidden characters in style string: " + a);
4247
4448
  };
4248
- goog.html.SafeStyle.prototype.getTypedStringValue = function() {
4249
- return this.privateDoNotAccessOrElseSafeStyleWrappedValue_;
4449
+ goog.debug.createViewSourceUrl_ = function(a) {
4450
+ goog.isDefAndNotNull(a) || (a = "");
4451
+ if (!/^https?:\/\//i.test(a)) {
4452
+ return goog.html.SafeUrl.fromConstant(goog.string.Const.from("sanitizedviewsrc"));
4453
+ }
4454
+ a = goog.html.SafeUrl.sanitize(a);
4455
+ return goog.html.uncheckedconversions.safeUrlFromStringKnownToSatisfyTypeContract(goog.string.Const.from("view-source scheme plus HTTP/HTTPS URL"), "view-source:" + goog.html.SafeUrl.unwrap(a));
4250
4456
  };
4251
- goog.DEBUG && (goog.html.SafeStyle.prototype.toString = function() {
4252
- return "SafeStyle{" + this.privateDoNotAccessOrElseSafeStyleWrappedValue_ + "}";
4253
- });
4254
- goog.html.SafeStyle.unwrap = function(a) {
4255
- if (a instanceof goog.html.SafeStyle && a.constructor === goog.html.SafeStyle && a.SAFE_STYLE_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeStyle.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4256
- return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;
4457
+ goog.debug.normalizeErrorObject = function(a) {
4458
+ var b = goog.getObjectByName("window.location.href");
4459
+ if (goog.isString(a)) {
4460
+ return {message:a, name:"Unknown error", lineNumber:"Not available", fileName:b, stack:"Not available"};
4257
4461
  }
4258
- goog.asserts.fail("expected object of type SafeStyle, got '" + a + "'");
4259
- return "type_error:SafeStyle";
4462
+ var c, d, e = !1;
4463
+ try {
4464
+ c = a.lineNumber || a.line || "Not available";
4465
+ } catch (f) {
4466
+ c = "Not available", e = !0;
4467
+ }
4468
+ try {
4469
+ d = a.fileName || a.filename || a.sourceURL || goog.global.$googDebugFname || b;
4470
+ } catch (g) {
4471
+ d = "Not available", e = !0;
4472
+ }
4473
+ return !e && a.lineNumber && a.fileName && a.stack && a.message && a.name ? a : {message:a.message || "Not available", name:a.name || "UnknownError", lineNumber:c, fileName:d, stack:a.stack || "Not available"};
4260
4474
  };
4261
- goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse = function(a) {
4262
- var b = new goog.html.SafeStyle;
4263
- b.privateDoNotAccessOrElseSafeStyleWrappedValue_ = a;
4264
- return b;
4475
+ goog.debug.enhanceError = function(a, b) {
4476
+ var c;
4477
+ "string" == typeof a ? (c = Error(a), Error.captureStackTrace && Error.captureStackTrace(c, goog.debug.enhanceError)) : c = a;
4478
+ c.stack || (c.stack = goog.debug.getStacktrace(goog.debug.enhanceError));
4479
+ if (b) {
4480
+ for (var d = 0;c["message" + d];) {
4481
+ ++d;
4482
+ }
4483
+ c["message" + d] = String(b);
4484
+ }
4485
+ return c;
4265
4486
  };
4266
- goog.html.SafeStyle.EMPTY = goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse("");
4267
- goog.html.SafeStyle.INNOCUOUS_STRING = "zClosurez";
4268
- goog.html.SafeStyle.create = function(a) {
4269
- var b = "", c;
4270
- for (c in a) {
4271
- if (!/^[-_a-zA-Z0-9]+$/.test(c)) {
4272
- throw Error("Name allows only [-_a-zA-Z0-9], got: " + c);
4487
+ goog.debug.getStacktraceSimple = function(a) {
4488
+ if (goog.STRICT_MODE_COMPATIBLE) {
4489
+ var b = goog.debug.getNativeStackTrace_(goog.debug.getStacktraceSimple);
4490
+ if (b) {
4491
+ return b;
4273
4492
  }
4274
- var d = a[c];
4275
- null != d && (d instanceof goog.string.Const ? (d = goog.string.Const.unwrap(d), goog.asserts.assert(!/[{;}]/.test(d), "Value does not allow [{;}].")) : goog.html.SafeStyle.VALUE_RE_.test(d) || (goog.asserts.fail("String value allows only [-.%_!# a-zA-Z0-9], got: " + d), d = goog.html.SafeStyle.INNOCUOUS_STRING), b += c + ":" + d + ";");
4276
4493
  }
4277
- if (!b) {
4278
- return goog.html.SafeStyle.EMPTY;
4494
+ for (var b = [], c = arguments.callee.caller, d = 0;c && (!a || d < a);) {
4495
+ b.push(goog.debug.getFunctionName(c));
4496
+ b.push("()\n");
4497
+ try {
4498
+ c = c.caller;
4499
+ } catch (e) {
4500
+ b.push("[exception trying to get caller]\n");
4501
+ break;
4502
+ }
4503
+ d++;
4504
+ if (d >= goog.debug.MAX_STACK_DEPTH) {
4505
+ b.push("[...long stack...]");
4506
+ break;
4507
+ }
4279
4508
  }
4280
- goog.html.SafeStyle.checkStyle_(b);
4281
- return goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b);
4509
+ a && d >= a ? b.push("[...reached max depth limit...]") : b.push("[end]");
4510
+ return b.join("");
4282
4511
  };
4283
- goog.html.SafeStyle.VALUE_RE_ = /^[-.%_!# a-zA-Z0-9]+$/;
4284
- goog.html.SafeStyle.concat = function(a) {
4285
- var b = "", c = function(a) {
4286
- goog.isArray(a) ? goog.array.forEach(a, c) : b += goog.html.SafeStyle.unwrap(a);
4287
- };
4288
- goog.array.forEach(arguments, c);
4289
- return b ? goog.html.SafeStyle.createSafeStyleSecurityPrivateDoNotAccessOrElse(b) : goog.html.SafeStyle.EMPTY;
4512
+ goog.debug.MAX_STACK_DEPTH = 50;
4513
+ goog.debug.getNativeStackTrace_ = function(a) {
4514
+ var b = Error();
4515
+ if (Error.captureStackTrace) {
4516
+ return Error.captureStackTrace(b, a), String(b.stack);
4517
+ }
4518
+ try {
4519
+ throw b;
4520
+ } catch (c) {
4521
+ b = c;
4522
+ }
4523
+ return (a = b.stack) ? String(a) : null;
4290
4524
  };
4291
- goog.i18n = {};
4292
- goog.i18n.bidi = {};
4293
- goog.i18n.bidi.FORCE_RTL = !1;
4294
- goog.i18n.bidi.IS_RTL = goog.i18n.bidi.FORCE_RTL || ("ar" == goog.LOCALE.substring(0, 2).toLowerCase() || "fa" == goog.LOCALE.substring(0, 2).toLowerCase() || "he" == goog.LOCALE.substring(0, 2).toLowerCase() || "iw" == goog.LOCALE.substring(0, 2).toLowerCase() || "ps" == goog.LOCALE.substring(0, 2).toLowerCase() || "sd" == goog.LOCALE.substring(0, 2).toLowerCase() || "ug" == goog.LOCALE.substring(0, 2).toLowerCase() || "ur" == goog.LOCALE.substring(0, 2).toLowerCase() || "yi" == goog.LOCALE.substring(0,
4295
- 2).toLowerCase()) && (2 == goog.LOCALE.length || "-" == goog.LOCALE.substring(2, 3) || "_" == goog.LOCALE.substring(2, 3)) || 3 <= goog.LOCALE.length && "ckb" == goog.LOCALE.substring(0, 3).toLowerCase() && (3 == goog.LOCALE.length || "-" == goog.LOCALE.substring(3, 4) || "_" == goog.LOCALE.substring(3, 4));
4296
- goog.i18n.bidi.Format = {LRE:"\u202a", RLE:"\u202b", PDF:"\u202c", LRM:"\u200e", RLM:"\u200f"};
4297
- goog.i18n.bidi.Dir = {LTR:1, RTL:-1, NEUTRAL:0};
4298
- goog.i18n.bidi.RIGHT = "right";
4299
- goog.i18n.bidi.LEFT = "left";
4300
- goog.i18n.bidi.I18N_RIGHT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.LEFT : goog.i18n.bidi.RIGHT;
4301
- goog.i18n.bidi.I18N_LEFT = goog.i18n.bidi.IS_RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT;
4302
- goog.i18n.bidi.toDir = function(a, b) {
4303
- return "number" == typeof a ? 0 < a ? goog.i18n.bidi.Dir.LTR : 0 > a ? goog.i18n.bidi.Dir.RTL : b ? null : goog.i18n.bidi.Dir.NEUTRAL : null == a ? null : a ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
4525
+ goog.debug.getStacktrace = function(a) {
4526
+ var b;
4527
+ goog.STRICT_MODE_COMPATIBLE && (b = goog.debug.getNativeStackTrace_(a || goog.debug.getStacktrace));
4528
+ b || (b = goog.debug.getStacktraceHelper_(a || arguments.callee.caller, []));
4529
+ return b;
4304
4530
  };
4305
- goog.i18n.bidi.ltrChars_ = "A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff";
4306
- goog.i18n.bidi.rtlChars_ = "\u0591-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc";
4307
- goog.i18n.bidi.htmlSkipReg_ = /<[^>]*>|&[^;]+;/g;
4308
- goog.i18n.bidi.stripHtmlIfNeeded_ = function(a, b) {
4309
- return b ? a.replace(goog.i18n.bidi.htmlSkipReg_, "") : a;
4531
+ goog.debug.getStacktraceHelper_ = function(a, b) {
4532
+ var c = [];
4533
+ if (goog.array.contains(b, a)) {
4534
+ c.push("[...circular reference...]");
4535
+ } else {
4536
+ if (a && b.length < goog.debug.MAX_STACK_DEPTH) {
4537
+ c.push(goog.debug.getFunctionName(a) + "(");
4538
+ for (var d = a.arguments, e = 0;d && e < d.length;e++) {
4539
+ 0 < e && c.push(", ");
4540
+ var f;
4541
+ f = d[e];
4542
+ switch(typeof f) {
4543
+ case "object":
4544
+ f = f ? "object" : "null";
4545
+ break;
4546
+ case "string":
4547
+ break;
4548
+ case "number":
4549
+ f = String(f);
4550
+ break;
4551
+ case "boolean":
4552
+ f = f ? "true" : "false";
4553
+ break;
4554
+ case "function":
4555
+ f = (f = goog.debug.getFunctionName(f)) ? f : "[fn]";
4556
+ break;
4557
+ default:
4558
+ f = typeof f;
4559
+ }
4560
+ 40 < f.length && (f = f.substr(0, 40) + "...");
4561
+ c.push(f);
4562
+ }
4563
+ b.push(a);
4564
+ c.push(")\n");
4565
+ try {
4566
+ c.push(goog.debug.getStacktraceHelper_(a.caller, b));
4567
+ } catch (g) {
4568
+ c.push("[exception trying to get caller]\n");
4569
+ }
4570
+ } else {
4571
+ a ? c.push("[...long stack...]") : c.push("[end]");
4572
+ }
4573
+ }
4574
+ return c.join("");
4310
4575
  };
4311
- goog.i18n.bidi.rtlCharReg_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "]");
4312
- goog.i18n.bidi.ltrCharReg_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "]");
4313
- goog.i18n.bidi.hasAnyRtl = function(a, b) {
4314
- return goog.i18n.bidi.rtlCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4576
+ goog.debug.setFunctionResolver = function(a) {
4577
+ goog.debug.fnNameResolver_ = a;
4315
4578
  };
4316
- goog.i18n.bidi.hasRtlChar = goog.i18n.bidi.hasAnyRtl;
4317
- goog.i18n.bidi.hasAnyLtr = function(a, b) {
4318
- return goog.i18n.bidi.ltrCharReg_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4579
+ goog.debug.getFunctionName = function(a) {
4580
+ if (goog.debug.fnNameCache_[a]) {
4581
+ return goog.debug.fnNameCache_[a];
4582
+ }
4583
+ if (goog.debug.fnNameResolver_) {
4584
+ var b = goog.debug.fnNameResolver_(a);
4585
+ if (b) {
4586
+ return goog.debug.fnNameCache_[a] = b;
4587
+ }
4588
+ }
4589
+ a = String(a);
4590
+ goog.debug.fnNameCache_[a] || (b = /function ([^\(]+)/.exec(a), goog.debug.fnNameCache_[a] = b ? b[1] : "[Anonymous]");
4591
+ return goog.debug.fnNameCache_[a];
4319
4592
  };
4320
- goog.i18n.bidi.ltrRe_ = new RegExp("^[" + goog.i18n.bidi.ltrChars_ + "]");
4321
- goog.i18n.bidi.rtlRe_ = new RegExp("^[" + goog.i18n.bidi.rtlChars_ + "]");
4322
- goog.i18n.bidi.isRtlChar = function(a) {
4323
- return goog.i18n.bidi.rtlRe_.test(a);
4593
+ goog.debug.makeWhitespaceVisible = function(a) {
4594
+ return a.replace(/ /g, "[_]").replace(/\f/g, "[f]").replace(/\n/g, "[n]\n").replace(/\r/g, "[r]").replace(/\t/g, "[t]");
4324
4595
  };
4325
- goog.i18n.bidi.isLtrChar = function(a) {
4326
- return goog.i18n.bidi.ltrRe_.test(a);
4596
+ goog.debug.runtimeType = function(a) {
4597
+ return a instanceof Function ? a.displayName || a.name || "unknown type name" : a instanceof Object ? a.constructor.displayName || a.constructor.name || Object.prototype.toString.call(a) : null === a ? "null" : typeof a;
4327
4598
  };
4328
- goog.i18n.bidi.isNeutralChar = function(a) {
4329
- return!goog.i18n.bidi.isLtrChar(a) && !goog.i18n.bidi.isRtlChar(a);
4599
+ goog.debug.fnNameCache_ = {};
4600
+ goog.debug.LogRecord = function(a, b, c, d, e) {
4601
+ this.reset(a, b, c, d, e);
4330
4602
  };
4331
- goog.i18n.bidi.ltrDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.rtlChars_ + "]*[" + goog.i18n.bidi.ltrChars_ + "]");
4332
- goog.i18n.bidi.rtlDirCheckRe_ = new RegExp("^[^" + goog.i18n.bidi.ltrChars_ + "]*[" + goog.i18n.bidi.rtlChars_ + "]");
4333
- goog.i18n.bidi.startsWithRtl = function(a, b) {
4334
- return goog.i18n.bidi.rtlDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4603
+ goog.debug.LogRecord.prototype.sequenceNumber_ = 0;
4604
+ goog.debug.LogRecord.prototype.exception_ = null;
4605
+ goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS = !0;
4606
+ goog.debug.LogRecord.nextSequenceNumber_ = 0;
4607
+ goog.debug.LogRecord.prototype.reset = function(a, b, c, d, e) {
4608
+ goog.debug.LogRecord.ENABLE_SEQUENCE_NUMBERS && (this.sequenceNumber_ = "number" == typeof e ? e : goog.debug.LogRecord.nextSequenceNumber_++);
4609
+ this.time_ = d || goog.now();
4610
+ this.level_ = a;
4611
+ this.msg_ = b;
4612
+ this.loggerName_ = c;
4613
+ delete this.exception_;
4335
4614
  };
4336
- goog.i18n.bidi.isRtlText = goog.i18n.bidi.startsWithRtl;
4337
- goog.i18n.bidi.startsWithLtr = function(a, b) {
4338
- return goog.i18n.bidi.ltrDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4615
+ goog.debug.LogRecord.prototype.getLoggerName = function() {
4616
+ return this.loggerName_;
4339
4617
  };
4340
- goog.i18n.bidi.isLtrText = goog.i18n.bidi.startsWithLtr;
4341
- goog.i18n.bidi.isRequiredLtrRe_ = /^http:\/\/.*/;
4342
- goog.i18n.bidi.isNeutralText = function(a, b) {
4343
- a = goog.i18n.bidi.stripHtmlIfNeeded_(a, b);
4344
- return goog.i18n.bidi.isRequiredLtrRe_.test(a) || !goog.i18n.bidi.hasAnyLtr(a) && !goog.i18n.bidi.hasAnyRtl(a);
4618
+ goog.debug.LogRecord.prototype.getException = function() {
4619
+ return this.exception_;
4345
4620
  };
4346
- goog.i18n.bidi.ltrExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.ltrChars_ + "][^" + goog.i18n.bidi.rtlChars_ + "]*$");
4347
- goog.i18n.bidi.rtlExitDirCheckRe_ = new RegExp("[" + goog.i18n.bidi.rtlChars_ + "][^" + goog.i18n.bidi.ltrChars_ + "]*$");
4348
- goog.i18n.bidi.endsWithLtr = function(a, b) {
4349
- return goog.i18n.bidi.ltrExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4621
+ goog.debug.LogRecord.prototype.setException = function(a) {
4622
+ this.exception_ = a;
4350
4623
  };
4351
- goog.i18n.bidi.isLtrExitText = goog.i18n.bidi.endsWithLtr;
4352
- goog.i18n.bidi.endsWithRtl = function(a, b) {
4353
- return goog.i18n.bidi.rtlExitDirCheckRe_.test(goog.i18n.bidi.stripHtmlIfNeeded_(a, b));
4624
+ goog.debug.LogRecord.prototype.setLoggerName = function(a) {
4625
+ this.loggerName_ = a;
4354
4626
  };
4355
- goog.i18n.bidi.isRtlExitText = goog.i18n.bidi.endsWithRtl;
4356
- goog.i18n.bidi.rtlLocalesRe_ = /^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Arab|Hebr|Thaa|Nkoo|Tfng))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;
4357
- goog.i18n.bidi.isRtlLanguage = function(a) {
4358
- return goog.i18n.bidi.rtlLocalesRe_.test(a);
4627
+ goog.debug.LogRecord.prototype.getLevel = function() {
4628
+ return this.level_;
4359
4629
  };
4360
- goog.i18n.bidi.bracketGuardHtmlRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(&lt;.*?(&gt;)+)/g;
4361
- goog.i18n.bidi.bracketGuardTextRe_ = /(\(.*?\)+)|(\[.*?\]+)|(\{.*?\}+)|(<.*?>+)/g;
4362
- goog.i18n.bidi.guardBracketInHtml = function(a, b) {
4363
- return(void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=rtl>$&</span>") : a.replace(goog.i18n.bidi.bracketGuardHtmlRe_, "<span dir=ltr>$&</span>");
4630
+ goog.debug.LogRecord.prototype.setLevel = function(a) {
4631
+ this.level_ = a;
4364
4632
  };
4365
- goog.i18n.bidi.guardBracketInText = function(a, b) {
4366
- var c = (void 0 === b ? goog.i18n.bidi.hasAnyRtl(a) : b) ? goog.i18n.bidi.Format.RLM : goog.i18n.bidi.Format.LRM;
4367
- return a.replace(goog.i18n.bidi.bracketGuardTextRe_, c + "$&" + c);
4633
+ goog.debug.LogRecord.prototype.getMessage = function() {
4634
+ return this.msg_;
4368
4635
  };
4369
- goog.i18n.bidi.enforceRtlInHtml = function(a) {
4370
- return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=rtl") : "\n<span dir=rtl>" + a + "</span>";
4636
+ goog.debug.LogRecord.prototype.setMessage = function(a) {
4637
+ this.msg_ = a;
4371
4638
  };
4372
- goog.i18n.bidi.enforceRtlInText = function(a) {
4373
- return goog.i18n.bidi.Format.RLE + a + goog.i18n.bidi.Format.PDF;
4639
+ goog.debug.LogRecord.prototype.getMillis = function() {
4640
+ return this.time_;
4374
4641
  };
4375
- goog.i18n.bidi.enforceLtrInHtml = function(a) {
4376
- return "<" == a.charAt(0) ? a.replace(/<\w+/, "$& dir=ltr") : "\n<span dir=ltr>" + a + "</span>";
4642
+ goog.debug.LogRecord.prototype.setMillis = function(a) {
4643
+ this.time_ = a;
4377
4644
  };
4378
- goog.i18n.bidi.enforceLtrInText = function(a) {
4379
- return goog.i18n.bidi.Format.LRE + a + goog.i18n.bidi.Format.PDF;
4645
+ goog.debug.LogRecord.prototype.getSequenceNumber = function() {
4646
+ return this.sequenceNumber_;
4380
4647
  };
4381
- goog.i18n.bidi.dimensionsRe_ = /:\s*([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)\s+([.\d][.\w]*)/g;
4382
- goog.i18n.bidi.leftRe_ = /left/gi;
4383
- goog.i18n.bidi.rightRe_ = /right/gi;
4384
- goog.i18n.bidi.tempRe_ = /%%%%/g;
4385
- goog.i18n.bidi.mirrorCSS = function(a) {
4386
- return a.replace(goog.i18n.bidi.dimensionsRe_, ":$1 $4 $3 $2").replace(goog.i18n.bidi.leftRe_, "%%%%").replace(goog.i18n.bidi.rightRe_, goog.i18n.bidi.LEFT).replace(goog.i18n.bidi.tempRe_, goog.i18n.bidi.RIGHT);
4648
+ goog.debug.LogBuffer = function() {
4649
+ goog.asserts.assert(goog.debug.LogBuffer.isBufferingEnabled(), "Cannot use goog.debug.LogBuffer without defining goog.debug.LogBuffer.CAPACITY.");
4650
+ this.clear();
4387
4651
  };
4388
- goog.i18n.bidi.doubleQuoteSubstituteRe_ = /([\u0591-\u05f2])"/g;
4389
- goog.i18n.bidi.singleQuoteSubstituteRe_ = /([\u0591-\u05f2])'/g;
4390
- goog.i18n.bidi.normalizeHebrewQuote = function(a) {
4391
- return a.replace(goog.i18n.bidi.doubleQuoteSubstituteRe_, "$1\u05f4").replace(goog.i18n.bidi.singleQuoteSubstituteRe_, "$1\u05f3");
4652
+ goog.debug.LogBuffer.getInstance = function() {
4653
+ goog.debug.LogBuffer.instance_ || (goog.debug.LogBuffer.instance_ = new goog.debug.LogBuffer);
4654
+ return goog.debug.LogBuffer.instance_;
4392
4655
  };
4393
- goog.i18n.bidi.wordSeparatorRe_ = /\s+/;
4394
- goog.i18n.bidi.hasNumeralsRe_ = /\d/;
4395
- goog.i18n.bidi.rtlDetectionThreshold_ = .4;
4396
- goog.i18n.bidi.estimateDirection = function(a, b) {
4397
- for (var c = 0, d = 0, e = !1, f = goog.i18n.bidi.stripHtmlIfNeeded_(a, b).split(goog.i18n.bidi.wordSeparatorRe_), g = 0;g < f.length;g++) {
4398
- var h = f[g];
4399
- goog.i18n.bidi.startsWithRtl(h) ? (c++, d++) : goog.i18n.bidi.isRequiredLtrRe_.test(h) ? e = !0 : goog.i18n.bidi.hasAnyLtr(h) ? d++ : goog.i18n.bidi.hasNumeralsRe_.test(h) && (e = !0);
4656
+ goog.debug.LogBuffer.CAPACITY = 0;
4657
+ goog.debug.LogBuffer.prototype.addRecord = function(a, b, c) {
4658
+ var d = (this.curIndex_ + 1) % goog.debug.LogBuffer.CAPACITY;
4659
+ this.curIndex_ = d;
4660
+ if (this.isFull_) {
4661
+ return d = this.buffer_[d], d.reset(a, b, c), d;
4400
4662
  }
4401
- return 0 == d ? e ? goog.i18n.bidi.Dir.LTR : goog.i18n.bidi.Dir.NEUTRAL : c / d > goog.i18n.bidi.rtlDetectionThreshold_ ? goog.i18n.bidi.Dir.RTL : goog.i18n.bidi.Dir.LTR;
4663
+ this.isFull_ = d == goog.debug.LogBuffer.CAPACITY - 1;
4664
+ return this.buffer_[d] = new goog.debug.LogRecord(a, b, c);
4402
4665
  };
4403
- goog.i18n.bidi.detectRtlDirectionality = function(a, b) {
4404
- return goog.i18n.bidi.estimateDirection(a, b) == goog.i18n.bidi.Dir.RTL;
4666
+ goog.debug.LogBuffer.isBufferingEnabled = function() {
4667
+ return 0 < goog.debug.LogBuffer.CAPACITY;
4405
4668
  };
4406
- goog.i18n.bidi.setElementDirAndAlign = function(a, b) {
4407
- a && (b = goog.i18n.bidi.toDir(b)) && (a.style.textAlign = b == goog.i18n.bidi.Dir.RTL ? goog.i18n.bidi.RIGHT : goog.i18n.bidi.LEFT, a.dir = b == goog.i18n.bidi.Dir.RTL ? "rtl" : "ltr");
4669
+ goog.debug.LogBuffer.prototype.clear = function() {
4670
+ this.buffer_ = Array(goog.debug.LogBuffer.CAPACITY);
4671
+ this.curIndex_ = -1;
4672
+ this.isFull_ = !1;
4408
4673
  };
4409
- goog.i18n.bidi.DirectionalString = function() {
4674
+ goog.debug.LogBuffer.prototype.forEachRecord = function(a) {
4675
+ var b = this.buffer_;
4676
+ if (b[0]) {
4677
+ var c = this.curIndex_, d = this.isFull_ ? c : -1;
4678
+ do {
4679
+ d = (d + 1) % goog.debug.LogBuffer.CAPACITY, a(b[d]);
4680
+ } while (d != c);
4681
+ }
4410
4682
  };
4411
- goog.html.SafeUrl = function() {
4412
- this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
4413
- this.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4683
+ goog.debug.Logger = function(a) {
4684
+ this.name_ = a;
4685
+ this.handlers_ = this.children_ = this.level_ = this.parent_ = null;
4414
4686
  };
4415
- goog.html.SafeUrl.INNOCUOUS_STRING = "about:invalid#zClosurez";
4416
- goog.html.SafeUrl.prototype.implementsGoogStringTypedString = !0;
4417
- goog.html.SafeUrl.prototype.getTypedStringValue = function() {
4418
- return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
4687
+ goog.debug.Logger.ROOT_LOGGER_NAME = "";
4688
+ goog.debug.Logger.ENABLE_HIERARCHY = !0;
4689
+ goog.debug.Logger.ENABLE_HIERARCHY || (goog.debug.Logger.rootHandlers_ = []);
4690
+ goog.debug.Logger.Level = function(a, b) {
4691
+ this.name = a;
4692
+ this.value = b;
4419
4693
  };
4420
- goog.html.SafeUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
4421
- goog.html.SafeUrl.prototype.getDirection = function() {
4422
- return goog.i18n.bidi.Dir.LTR;
4694
+ goog.debug.Logger.Level.prototype.toString = function() {
4695
+ return this.name;
4423
4696
  };
4424
- goog.DEBUG && (goog.html.SafeUrl.prototype.toString = function() {
4425
- return "SafeUrl{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
4426
- });
4427
- goog.html.SafeUrl.unwrap = function(a) {
4428
- if (a instanceof goog.html.SafeUrl && a.constructor === goog.html.SafeUrl && a.SAFE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4429
- return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
4697
+ goog.debug.Logger.Level.OFF = new goog.debug.Logger.Level("OFF", Infinity);
4698
+ goog.debug.Logger.Level.SHOUT = new goog.debug.Logger.Level("SHOUT", 1200);
4699
+ goog.debug.Logger.Level.SEVERE = new goog.debug.Logger.Level("SEVERE", 1E3);
4700
+ goog.debug.Logger.Level.WARNING = new goog.debug.Logger.Level("WARNING", 900);
4701
+ goog.debug.Logger.Level.INFO = new goog.debug.Logger.Level("INFO", 800);
4702
+ goog.debug.Logger.Level.CONFIG = new goog.debug.Logger.Level("CONFIG", 700);
4703
+ goog.debug.Logger.Level.FINE = new goog.debug.Logger.Level("FINE", 500);
4704
+ goog.debug.Logger.Level.FINER = new goog.debug.Logger.Level("FINER", 400);
4705
+ goog.debug.Logger.Level.FINEST = new goog.debug.Logger.Level("FINEST", 300);
4706
+ goog.debug.Logger.Level.ALL = new goog.debug.Logger.Level("ALL", 0);
4707
+ goog.debug.Logger.Level.PREDEFINED_LEVELS = [goog.debug.Logger.Level.OFF, goog.debug.Logger.Level.SHOUT, goog.debug.Logger.Level.SEVERE, goog.debug.Logger.Level.WARNING, goog.debug.Logger.Level.INFO, goog.debug.Logger.Level.CONFIG, goog.debug.Logger.Level.FINE, goog.debug.Logger.Level.FINER, goog.debug.Logger.Level.FINEST, goog.debug.Logger.Level.ALL];
4708
+ goog.debug.Logger.Level.predefinedLevelsCache_ = null;
4709
+ goog.debug.Logger.Level.createPredefinedLevelsCache_ = function() {
4710
+ goog.debug.Logger.Level.predefinedLevelsCache_ = {};
4711
+ for (var a = 0, b;b = goog.debug.Logger.Level.PREDEFINED_LEVELS[a];a++) {
4712
+ goog.debug.Logger.Level.predefinedLevelsCache_[b.value] = b, goog.debug.Logger.Level.predefinedLevelsCache_[b.name] = b;
4430
4713
  }
4431
- goog.asserts.fail("expected object of type SafeUrl, got '" + a + "'");
4432
- return "type_error:SafeUrl";
4433
4714
  };
4434
- goog.html.SafeUrl.fromConstant = function(a) {
4435
- return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
4715
+ goog.debug.Logger.Level.getPredefinedLevel = function(a) {
4716
+ goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
4717
+ return goog.debug.Logger.Level.predefinedLevelsCache_[a] || null;
4436
4718
  };
4437
- goog.html.SAFE_URL_PATTERN_ = /^(?:(?:https?|mailto):|[^&:/?#]*(?:[/?#]|$))/i;
4438
- goog.html.SafeUrl.sanitize = function(a) {
4439
- if (a instanceof goog.html.SafeUrl) {
4440
- return a;
4719
+ goog.debug.Logger.Level.getPredefinedLevelByValue = function(a) {
4720
+ goog.debug.Logger.Level.predefinedLevelsCache_ || goog.debug.Logger.Level.createPredefinedLevelsCache_();
4721
+ if (a in goog.debug.Logger.Level.predefinedLevelsCache_) {
4722
+ return goog.debug.Logger.Level.predefinedLevelsCache_[a];
4441
4723
  }
4442
- a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
4443
- a = goog.html.SAFE_URL_PATTERN_.test(a) ? goog.html.SafeUrl.normalize_(a) : goog.html.SafeUrl.INNOCUOUS_STRING;
4444
- return goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse(a);
4724
+ for (var b = 0;b < goog.debug.Logger.Level.PREDEFINED_LEVELS.length;++b) {
4725
+ var c = goog.debug.Logger.Level.PREDEFINED_LEVELS[b];
4726
+ if (c.value <= a) {
4727
+ return c;
4728
+ }
4729
+ }
4730
+ return null;
4445
4731
  };
4446
- goog.html.SafeUrl.normalize_ = function(a) {
4447
- try {
4448
- var b = encodeURI(a);
4449
- } catch (c) {
4450
- return goog.html.SafeUrl.INNOCUOUS_STRING;
4732
+ goog.debug.Logger.getLogger = function(a) {
4733
+ return goog.debug.LogManager.getLogger(a);
4734
+ };
4735
+ goog.debug.Logger.logToProfilers = function(a) {
4736
+ goog.global.console && (goog.global.console.timeStamp ? goog.global.console.timeStamp(a) : goog.global.console.markTimeline && goog.global.console.markTimeline(a));
4737
+ goog.global.msWriteProfilerMark && goog.global.msWriteProfilerMark(a);
4738
+ };
4739
+ goog.debug.Logger.prototype.getName = function() {
4740
+ return this.name_;
4741
+ };
4742
+ goog.debug.Logger.prototype.addHandler = function(a) {
4743
+ goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? (this.handlers_ || (this.handlers_ = []), this.handlers_.push(a)) : (goog.asserts.assert(!this.name_, "Cannot call addHandler on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootHandlers_.push(a)));
4744
+ };
4745
+ goog.debug.Logger.prototype.removeHandler = function(a) {
4746
+ if (goog.debug.LOGGING_ENABLED) {
4747
+ var b = goog.debug.Logger.ENABLE_HIERARCHY ? this.handlers_ : goog.debug.Logger.rootHandlers_;
4748
+ return !!b && goog.array.remove(b, a);
4451
4749
  }
4452
- return b.replace(goog.html.SafeUrl.NORMALIZE_MATCHER_, function(a) {
4453
- return goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_[a];
4454
- });
4750
+ return !1;
4455
4751
  };
4456
- goog.html.SafeUrl.NORMALIZE_MATCHER_ = /[()']|%5B|%5D|%25/g;
4457
- goog.html.SafeUrl.NORMALIZE_REPLACER_MAP_ = {"'":"%27", "(":"%28", ")":"%29", "%5B":"[", "%5D":"]", "%25":"%"};
4458
- goog.html.SafeUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4459
- goog.html.SafeUrl.createSafeUrlSecurityPrivateDoNotAccessOrElse = function(a) {
4460
- var b = new goog.html.SafeUrl;
4461
- b.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
4462
- return b;
4752
+ goog.debug.Logger.prototype.getParent = function() {
4753
+ return this.parent_;
4463
4754
  };
4464
- goog.html.TrustedResourceUrl = function() {
4465
- this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = "";
4466
- this.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4755
+ goog.debug.Logger.prototype.getChildren = function() {
4756
+ this.children_ || (this.children_ = {});
4757
+ return this.children_;
4467
4758
  };
4468
- goog.html.TrustedResourceUrl.prototype.implementsGoogStringTypedString = !0;
4469
- goog.html.TrustedResourceUrl.prototype.getTypedStringValue = function() {
4470
- return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
4759
+ goog.debug.Logger.prototype.setLevel = function(a) {
4760
+ goog.debug.LOGGING_ENABLED && (goog.debug.Logger.ENABLE_HIERARCHY ? this.level_ = a : (goog.asserts.assert(!this.name_, "Cannot call setLevel() on a non-root logger when goog.debug.Logger.ENABLE_HIERARCHY is false."), goog.debug.Logger.rootLevel_ = a));
4471
4761
  };
4472
- goog.html.TrustedResourceUrl.prototype.implementsGoogI18nBidiDirectionalString = !0;
4473
- goog.html.TrustedResourceUrl.prototype.getDirection = function() {
4474
- return goog.i18n.bidi.Dir.LTR;
4762
+ goog.debug.Logger.prototype.getLevel = function() {
4763
+ return goog.debug.LOGGING_ENABLED ? this.level_ : goog.debug.Logger.Level.OFF;
4475
4764
  };
4476
- goog.DEBUG && (goog.html.TrustedResourceUrl.prototype.toString = function() {
4477
- return "TrustedResourceUrl{" + this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ + "}";
4478
- });
4479
- goog.html.TrustedResourceUrl.unwrap = function(a) {
4480
- if (a instanceof goog.html.TrustedResourceUrl && a.constructor === goog.html.TrustedResourceUrl && a.TRUSTED_RESOURCE_URL_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4481
- return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;
4765
+ goog.debug.Logger.prototype.getEffectiveLevel = function() {
4766
+ if (!goog.debug.LOGGING_ENABLED) {
4767
+ return goog.debug.Logger.Level.OFF;
4482
4768
  }
4483
- goog.asserts.fail("expected object of type TrustedResourceUrl, got '" + a + "'");
4484
- return "type_error:TrustedResourceUrl";
4769
+ if (!goog.debug.Logger.ENABLE_HIERARCHY) {
4770
+ return goog.debug.Logger.rootLevel_;
4771
+ }
4772
+ if (this.level_) {
4773
+ return this.level_;
4774
+ }
4775
+ if (this.parent_) {
4776
+ return this.parent_.getEffectiveLevel();
4777
+ }
4778
+ goog.asserts.fail("Root logger has no level set.");
4779
+ return null;
4485
4780
  };
4486
- goog.html.TrustedResourceUrl.fromConstant = function(a) {
4487
- return goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse(goog.string.Const.unwrap(a));
4781
+ goog.debug.Logger.prototype.isLoggable = function(a) {
4782
+ return goog.debug.LOGGING_ENABLED && a.value >= this.getEffectiveLevel().value;
4488
4783
  };
4489
- goog.html.TrustedResourceUrl.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4490
- goog.html.TrustedResourceUrl.createTrustedResourceUrlSecurityPrivateDoNotAccessOrElse = function(a) {
4491
- var b = new goog.html.TrustedResourceUrl;
4492
- b.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_ = a;
4493
- return b;
4784
+ goog.debug.Logger.prototype.log = function(a, b, c) {
4785
+ goog.debug.LOGGING_ENABLED && this.isLoggable(a) && (goog.isFunction(b) && (b = b()), this.doLogRecord_(this.getLogRecord(a, b, c)));
4494
4786
  };
4495
- goog.html.SafeHtml = function() {
4496
- this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = "";
4497
- this.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_;
4498
- this.dir_ = null;
4787
+ goog.debug.Logger.prototype.getLogRecord = function(a, b, c) {
4788
+ a = goog.debug.LogBuffer.isBufferingEnabled() ? goog.debug.LogBuffer.getInstance().addRecord(a, b, this.name_) : new goog.debug.LogRecord(a, String(b), this.name_);
4789
+ c && a.setException(c);
4790
+ return a;
4791
+ };
4792
+ goog.debug.Logger.prototype.shout = function(a, b) {
4793
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SHOUT, a, b);
4499
4794
  };
4500
- goog.html.SafeHtml.prototype.implementsGoogI18nBidiDirectionalString = !0;
4501
- goog.html.SafeHtml.prototype.getDirection = function() {
4502
- return this.dir_;
4795
+ goog.debug.Logger.prototype.severe = function(a, b) {
4796
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.SEVERE, a, b);
4503
4797
  };
4504
- goog.html.SafeHtml.prototype.implementsGoogStringTypedString = !0;
4505
- goog.html.SafeHtml.prototype.getTypedStringValue = function() {
4506
- return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
4798
+ goog.debug.Logger.prototype.warning = function(a, b) {
4799
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.WARNING, a, b);
4507
4800
  };
4508
- goog.DEBUG && (goog.html.SafeHtml.prototype.toString = function() {
4509
- return "SafeHtml{" + this.privateDoNotAccessOrElseSafeHtmlWrappedValue_ + "}";
4510
- });
4511
- goog.html.SafeHtml.unwrap = function(a) {
4512
- if (a instanceof goog.html.SafeHtml && a.constructor === goog.html.SafeHtml && a.SAFE_HTML_TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ === goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_) {
4513
- return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;
4514
- }
4515
- goog.asserts.fail("expected object of type SafeHtml, got '" + a + "'");
4516
- return "type_error:SafeHtml";
4801
+ goog.debug.Logger.prototype.info = function(a, b) {
4802
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.INFO, a, b);
4517
4803
  };
4518
- goog.html.SafeHtml.htmlEscape = function(a) {
4519
- if (a instanceof goog.html.SafeHtml) {
4520
- return a;
4521
- }
4522
- var b = null;
4523
- a.implementsGoogI18nBidiDirectionalString && (b = a.getDirection());
4524
- a = a.implementsGoogStringTypedString ? a.getTypedStringValue() : String(a);
4525
- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.htmlEscape(a), b);
4804
+ goog.debug.Logger.prototype.config = function(a, b) {
4805
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.CONFIG, a, b);
4526
4806
  };
4527
- goog.html.SafeHtml.htmlEscapePreservingNewlines = function(a) {
4528
- if (a instanceof goog.html.SafeHtml) {
4529
- return a;
4530
- }
4531
- a = goog.html.SafeHtml.htmlEscape(a);
4532
- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.newLineToBr(goog.html.SafeHtml.unwrap(a)), a.getDirection());
4807
+ goog.debug.Logger.prototype.fine = function(a, b) {
4808
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINE, a, b);
4533
4809
  };
4534
- goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces = function(a) {
4535
- if (a instanceof goog.html.SafeHtml) {
4536
- return a;
4537
- }
4538
- a = goog.html.SafeHtml.htmlEscape(a);
4539
- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(goog.string.whitespaceEscape(goog.html.SafeHtml.unwrap(a)), a.getDirection());
4810
+ goog.debug.Logger.prototype.finer = function(a, b) {
4811
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINER, a, b);
4540
4812
  };
4541
- goog.html.SafeHtml.from = goog.html.SafeHtml.htmlEscape;
4542
- goog.html.SafeHtml.VALID_NAMES_IN_TAG_ = /^[a-zA-Z0-9-]+$/;
4543
- goog.html.SafeHtml.URL_ATTRIBUTES_ = goog.object.createSet("action", "cite", "data", "formaction", "href", "manifest", "poster", "src");
4544
- goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_ = goog.object.createSet("embed", "iframe", "link", "script", "style", "template");
4545
- goog.html.SafeHtml.create = function(a, b, c) {
4546
- if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(a)) {
4547
- throw Error("Invalid tag name <" + a + ">.");
4548
- }
4549
- if (a.toLowerCase() in goog.html.SafeHtml.NOT_ALLOWED_TAG_NAMES_) {
4550
- throw Error("Tag name <" + a + "> is not allowed for SafeHtml.");
4551
- }
4552
- return goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse(a, b, c);
4813
+ goog.debug.Logger.prototype.finest = function(a, b) {
4814
+ goog.debug.LOGGING_ENABLED && this.log(goog.debug.Logger.Level.FINEST, a, b);
4553
4815
  };
4554
- goog.html.SafeHtml.getAttrNameAndValue_ = function(a, b, c) {
4555
- if (c instanceof goog.string.Const) {
4556
- c = goog.string.Const.unwrap(c);
4816
+ goog.debug.Logger.prototype.logRecord = function(a) {
4817
+ goog.debug.LOGGING_ENABLED && this.isLoggable(a.getLevel()) && this.doLogRecord_(a);
4818
+ };
4819
+ goog.debug.Logger.prototype.doLogRecord_ = function(a) {
4820
+ goog.debug.Logger.logToProfilers("log:" + a.getMessage());
4821
+ if (goog.debug.Logger.ENABLE_HIERARCHY) {
4822
+ for (var b = this;b;) {
4823
+ b.callPublish_(a), b = b.getParent();
4824
+ }
4557
4825
  } else {
4558
- if ("style" == b.toLowerCase()) {
4559
- c = goog.html.SafeHtml.getStyleValue_(c);
4560
- } else {
4561
- if (/^on/i.test(b)) {
4562
- throw Error('Attribute "' + b + '" requires goog.string.Const value, "' + c + '" given.');
4563
- }
4564
- if (b.toLowerCase() in goog.html.SafeHtml.URL_ATTRIBUTES_) {
4565
- if (c instanceof goog.html.TrustedResourceUrl) {
4566
- c = goog.html.TrustedResourceUrl.unwrap(c);
4567
- } else {
4568
- if (c instanceof goog.html.SafeUrl) {
4569
- c = goog.html.SafeUrl.unwrap(c);
4570
- } else {
4571
- throw Error('Attribute "' + b + '" on tag "' + a + '" requires goog.html.SafeUrl or goog.string.Const value, "' + c + '" given.');
4572
- }
4573
- }
4574
- }
4826
+ for (var b = 0, c;c = goog.debug.Logger.rootHandlers_[b++];) {
4827
+ c(a);
4575
4828
  }
4576
4829
  }
4577
- c.implementsGoogStringTypedString && (c = c.getTypedStringValue());
4578
- goog.asserts.assert(goog.isString(c) || goog.isNumber(c), "String or number value expected, got " + typeof c + " with value: " + c);
4579
- return b + '="' + goog.string.htmlEscape(String(c)) + '"';
4580
4830
  };
4581
- goog.html.SafeHtml.getStyleValue_ = function(a) {
4582
- if (!goog.isObject(a)) {
4583
- throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, ' + typeof a + " given: " + a);
4831
+ goog.debug.Logger.prototype.callPublish_ = function(a) {
4832
+ if (this.handlers_) {
4833
+ for (var b = 0, c;c = this.handlers_[b];b++) {
4834
+ c(a);
4835
+ }
4584
4836
  }
4585
- a instanceof goog.html.SafeStyle || (a = goog.html.SafeStyle.create(a));
4586
- return goog.html.SafeStyle.unwrap(a);
4587
4837
  };
4588
- goog.html.SafeHtml.createWithDir = function(a, b, c, d) {
4589
- b = goog.html.SafeHtml.create(b, c, d);
4590
- b.dir_ = a;
4591
- return b;
4838
+ goog.debug.Logger.prototype.setParent_ = function(a) {
4839
+ this.parent_ = a;
4592
4840
  };
4593
- goog.html.SafeHtml.concat = function(a) {
4594
- var b = goog.i18n.bidi.Dir.NEUTRAL, c = "", d = function(a) {
4595
- goog.isArray(a) ? goog.array.forEach(a, d) : (a = goog.html.SafeHtml.htmlEscape(a), c += goog.html.SafeHtml.unwrap(a), a = a.getDirection(), b == goog.i18n.bidi.Dir.NEUTRAL ? b = a : a != goog.i18n.bidi.Dir.NEUTRAL && b != a && (b = null));
4596
- };
4597
- goog.array.forEach(arguments, d);
4598
- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(c, b);
4841
+ goog.debug.Logger.prototype.addChild_ = function(a, b) {
4842
+ this.getChildren()[a] = b;
4599
4843
  };
4600
- goog.html.SafeHtml.concatWithDir = function(a, b) {
4601
- var c = goog.html.SafeHtml.concat(goog.array.slice(arguments, 1));
4602
- c.dir_ = a;
4603
- return c;
4844
+ goog.debug.LogManager = {};
4845
+ goog.debug.LogManager.loggers_ = {};
4846
+ goog.debug.LogManager.rootLogger_ = null;
4847
+ goog.debug.LogManager.initialize = function() {
4848
+ goog.debug.LogManager.rootLogger_ || (goog.debug.LogManager.rootLogger_ = new goog.debug.Logger(goog.debug.Logger.ROOT_LOGGER_NAME), goog.debug.LogManager.loggers_[goog.debug.Logger.ROOT_LOGGER_NAME] = goog.debug.LogManager.rootLogger_, goog.debug.LogManager.rootLogger_.setLevel(goog.debug.Logger.Level.CONFIG));
4604
4849
  };
4605
- goog.html.SafeHtml.TYPE_MARKER_GOOG_HTML_SECURITY_PRIVATE_ = {};
4606
- goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse = function(a, b) {
4607
- var c = new goog.html.SafeHtml;
4608
- c.privateDoNotAccessOrElseSafeHtmlWrappedValue_ = a;
4609
- c.dir_ = b;
4610
- return c;
4850
+ goog.debug.LogManager.getLoggers = function() {
4851
+ return goog.debug.LogManager.loggers_;
4611
4852
  };
4612
- goog.html.SafeHtml.createSafeHtmlTagSecurityPrivateDoNotAccessOrElse = function(a, b, c) {
4613
- var d = null, e = "<" + a;
4614
- if (b) {
4615
- for (var f in b) {
4616
- if (!goog.html.SafeHtml.VALID_NAMES_IN_TAG_.test(f)) {
4617
- throw Error('Invalid attribute name "' + f + '".');
4618
- }
4619
- var g = b[f];
4620
- goog.isDefAndNotNull(g) && (e += " " + goog.html.SafeHtml.getAttrNameAndValue_(a, f, g));
4621
- }
4853
+ goog.debug.LogManager.getRoot = function() {
4854
+ goog.debug.LogManager.initialize();
4855
+ return goog.debug.LogManager.rootLogger_;
4856
+ };
4857
+ goog.debug.LogManager.getLogger = function(a) {
4858
+ goog.debug.LogManager.initialize();
4859
+ return goog.debug.LogManager.loggers_[a] || goog.debug.LogManager.createLogger_(a);
4860
+ };
4861
+ goog.debug.LogManager.createFunctionForCatchErrors = function(a) {
4862
+ return function(b) {
4863
+ (a || goog.debug.LogManager.getRoot()).severe("Error: " + b.message + " (" + b.fileName + " @ Line: " + b.line + ")");
4864
+ };
4865
+ };
4866
+ goog.debug.LogManager.createLogger_ = function(a) {
4867
+ var b = new goog.debug.Logger(a);
4868
+ if (goog.debug.Logger.ENABLE_HIERARCHY) {
4869
+ var c = a.lastIndexOf("."), d = a.substr(0, c), c = a.substr(c + 1), d = goog.debug.LogManager.getLogger(d);
4870
+ d.addChild_(c, b);
4871
+ b.setParent_(d);
4622
4872
  }
4623
- goog.isDef(c) ? goog.isArray(c) || (c = [c]) : c = [];
4624
- goog.dom.tags.isVoidTag(a.toLowerCase()) ? (goog.asserts.assert(!c.length, "Void tag <" + a + "> does not allow content."), e += ">") : (d = goog.html.SafeHtml.concat(c), e += ">" + goog.html.SafeHtml.unwrap(d) + "</" + a + ">", d = d.getDirection());
4625
- (a = b && b.dir) && (d = /^(ltr|rtl|auto)$/i.test(a) ? goog.i18n.bidi.Dir.NEUTRAL : null);
4626
- return goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse(e, d);
4873
+ return goog.debug.LogManager.loggers_[a] = b;
4874
+ };
4875
+ goog.debug.RelativeTimeProvider = function() {
4876
+ this.relativeTimeStart_ = goog.now();
4877
+ };
4878
+ goog.debug.RelativeTimeProvider.defaultInstance_ = new goog.debug.RelativeTimeProvider;
4879
+ goog.debug.RelativeTimeProvider.prototype.set = function(a) {
4880
+ this.relativeTimeStart_ = a;
4881
+ };
4882
+ goog.debug.RelativeTimeProvider.prototype.reset = function() {
4883
+ this.set(goog.now());
4884
+ };
4885
+ goog.debug.RelativeTimeProvider.prototype.get = function() {
4886
+ return this.relativeTimeStart_;
4887
+ };
4888
+ goog.debug.RelativeTimeProvider.getDefaultInstance = function() {
4889
+ return goog.debug.RelativeTimeProvider.defaultInstance_;
4627
4890
  };
4628
- goog.html.SafeHtml.EMPTY = goog.html.SafeHtml.createSafeHtmlSecurityPrivateDoNotAccessOrElse("", goog.i18n.bidi.Dir.NEUTRAL);
4629
4891
  goog.debug.Formatter = function(a) {
4630
4892
  this.prefix_ = a || "";
4631
4893
  this.startTimeProvider_ = goog.debug.RelativeTimeProvider.getDefaultInstance();
@@ -4675,6 +4937,9 @@ goog.debug.HtmlFormatter.prototype.formatRecord = function(a) {
4675
4937
  return a ? this.formatRecordAsHtml(a).getTypedStringValue() : "";
4676
4938
  };
4677
4939
  goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(a) {
4940
+ if (!a) {
4941
+ return goog.html.SafeHtml.EMPTY;
4942
+ }
4678
4943
  var b;
4679
4944
  switch(a.getLevel().value) {
4680
4945
  case goog.debug.Logger.Level.SHOUT.value:
@@ -4699,7 +4964,7 @@ goog.debug.HtmlFormatter.prototype.formatRecordAsHtml = function(a) {
4699
4964
  this.showLoggerName && c.push("[", a.getLoggerName(), "] ");
4700
4965
  this.showSeverityLevel && c.push("[", a.getLevel().name, "] ");
4701
4966
  var c = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(c.join("")), d = goog.html.SafeHtml.EMPTY;
4702
- this.showExceptionText && a.getException() && (d = goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(a.getExceptionText() || "")));
4967
+ this.showExceptionText && a.getException() && (d = goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), goog.debug.exposeExceptionAsHtml(a.getException())));
4703
4968
  a = goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(a.getMessage());
4704
4969
  b = goog.html.SafeHtml.create("span", {"class":b}, goog.html.SafeHtml.concat(a, d));
4705
4970
  return this.appendNewline ? goog.html.SafeHtml.concat(c, b, goog.html.SafeHtml.create("br")) : goog.html.SafeHtml.concat(c, b);
@@ -4716,11 +4981,18 @@ goog.debug.TextFormatter.prototype.formatRecord = function(a) {
4716
4981
  this.showLoggerName && b.push("[", a.getLoggerName(), "] ");
4717
4982
  this.showSeverityLevel && b.push("[", a.getLevel().name, "] ");
4718
4983
  b.push(a.getMessage());
4719
- this.showExceptionText && a.getException() && b.push("\n", a.getExceptionText());
4984
+ this.showExceptionText && (a = a.getException()) && b.push("\n", a instanceof Error ? a.message : a.toString());
4720
4985
  this.appendNewline && b.push("\n");
4721
4986
  return b.join("");
4722
4987
  };
4988
+ goog.debug.TextFormatter.prototype.formatRecordAsHtml = function(a) {
4989
+ return goog.html.SafeHtml.htmlEscapePreservingNewlinesAndSpaces(goog.debug.TextFormatter.prototype.formatRecord(a));
4990
+ };
4723
4991
  goog.dom.safe = {};
4992
+ goog.dom.safe.InsertAdjacentHtmlPosition = {AFTERBEGIN:"afterbegin", AFTEREND:"afterend", BEFOREBEGIN:"beforebegin", BEFOREEND:"beforeend"};
4993
+ goog.dom.safe.insertAdjacentHtml = function(a, b, c) {
4994
+ a.insertAdjacentHTML(b, goog.html.SafeHtml.unwrap(c));
4995
+ };
4724
4996
  goog.dom.safe.setInnerHtml = function(a, b) {
4725
4997
  a.innerHTML = goog.html.SafeHtml.unwrap(b);
4726
4998
  };
@@ -4735,17 +5007,36 @@ goog.dom.safe.setAnchorHref = function(a, b) {
4735
5007
  c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
4736
5008
  a.href = goog.html.SafeUrl.unwrap(c);
4737
5009
  };
5010
+ goog.dom.safe.setEmbedSrc = function(a, b) {
5011
+ a.src = goog.html.TrustedResourceUrl.unwrap(b);
5012
+ };
5013
+ goog.dom.safe.setFrameSrc = function(a, b) {
5014
+ a.src = goog.html.TrustedResourceUrl.unwrap(b);
5015
+ };
5016
+ goog.dom.safe.setIframeSrc = function(a, b) {
5017
+ a.src = goog.html.TrustedResourceUrl.unwrap(b);
5018
+ };
5019
+ goog.dom.safe.setLinkHrefAndRel = function(a, b, c) {
5020
+ a.rel = c;
5021
+ goog.string.caseInsensitiveContains(c, "stylesheet") ? (goog.asserts.assert(b instanceof goog.html.TrustedResourceUrl, 'URL must be TrustedResourceUrl because "rel" contains "stylesheet"'), a.href = goog.html.TrustedResourceUrl.unwrap(b)) : a.href = b instanceof goog.html.TrustedResourceUrl ? goog.html.TrustedResourceUrl.unwrap(b) : b instanceof goog.html.SafeUrl ? goog.html.SafeUrl.unwrap(b) : goog.html.SafeUrl.sanitize(b).getTypedStringValue();
5022
+ };
5023
+ goog.dom.safe.setObjectData = function(a, b) {
5024
+ a.data = goog.html.TrustedResourceUrl.unwrap(b);
5025
+ };
5026
+ goog.dom.safe.setScriptSrc = function(a, b) {
5027
+ a.src = goog.html.TrustedResourceUrl.unwrap(b);
5028
+ };
4738
5029
  goog.dom.safe.setLocationHref = function(a, b) {
4739
5030
  var c;
4740
5031
  c = b instanceof goog.html.SafeUrl ? b : goog.html.SafeUrl.sanitize(b);
4741
5032
  a.href = goog.html.SafeUrl.unwrap(c);
4742
5033
  };
5034
+ goog.dom.safe.openInWindow = function(a, b, c, d, e) {
5035
+ a = a instanceof goog.html.SafeUrl ? a : goog.html.SafeUrl.sanitize(a);
5036
+ return (b || window).open(goog.html.SafeUrl.unwrap(a), c ? goog.string.Const.unwrap(c) : "", d, e);
5037
+ };
4743
5038
  goog.dom.BrowserFeature = {CAN_ADD_NAME_OR_TYPE_ATTRIBUTES:!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9), CAN_USE_CHILDREN_ATTRIBUTE:!goog.userAgent.GECKO && !goog.userAgent.IE || goog.userAgent.IE && goog.userAgent.isDocumentModeOrHigher(9) || goog.userAgent.GECKO && goog.userAgent.isVersionOrHigher("1.9.1"), CAN_USE_INNER_TEXT:goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("9"), CAN_USE_PARENT_ELEMENT_PROPERTY:goog.userAgent.IE || goog.userAgent.OPERA || goog.userAgent.WEBKIT,
4744
5039
  INNER_HTML_NEEDS_SCOPED_ELEMENT:goog.userAgent.IE, LEGACY_IE_RANGES:goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)};
4745
- goog.dom.TagName = {A:"A", ABBR:"ABBR", ACRONYM:"ACRONYM", ADDRESS:"ADDRESS", APPLET:"APPLET", AREA:"AREA", ARTICLE:"ARTICLE", ASIDE:"ASIDE", AUDIO:"AUDIO", B:"B", BASE:"BASE", BASEFONT:"BASEFONT", BDI:"BDI", BDO:"BDO", BIG:"BIG", BLOCKQUOTE:"BLOCKQUOTE", BODY:"BODY", BR:"BR", BUTTON:"BUTTON", CANVAS:"CANVAS", CAPTION:"CAPTION", CENTER:"CENTER", CITE:"CITE", CODE:"CODE", COL:"COL", COLGROUP:"COLGROUP", COMMAND:"COMMAND", DATA:"DATA", DATALIST:"DATALIST", DD:"DD", DEL:"DEL", DETAILS:"DETAILS", DFN:"DFN",
4746
- DIALOG:"DIALOG", DIR:"DIR", DIV:"DIV", DL:"DL", DT:"DT", EM:"EM", EMBED:"EMBED", FIELDSET:"FIELDSET", FIGCAPTION:"FIGCAPTION", FIGURE:"FIGURE", FONT:"FONT", FOOTER:"FOOTER", FORM:"FORM", FRAME:"FRAME", FRAMESET:"FRAMESET", H1:"H1", H2:"H2", H3:"H3", H4:"H4", H5:"H5", H6:"H6", HEAD:"HEAD", HEADER:"HEADER", HGROUP:"HGROUP", HR:"HR", HTML:"HTML", I:"I", IFRAME:"IFRAME", IMG:"IMG", INPUT:"INPUT", INS:"INS", ISINDEX:"ISINDEX", KBD:"KBD", KEYGEN:"KEYGEN", LABEL:"LABEL", LEGEND:"LEGEND", LI:"LI", LINK:"LINK",
4747
- MAP:"MAP", MARK:"MARK", MATH:"MATH", MENU:"MENU", META:"META", METER:"METER", NAV:"NAV", NOFRAMES:"NOFRAMES", NOSCRIPT:"NOSCRIPT", OBJECT:"OBJECT", OL:"OL", OPTGROUP:"OPTGROUP", OPTION:"OPTION", OUTPUT:"OUTPUT", P:"P", PARAM:"PARAM", PRE:"PRE", PROGRESS:"PROGRESS", Q:"Q", RP:"RP", RT:"RT", RUBY:"RUBY", S:"S", SAMP:"SAMP", SCRIPT:"SCRIPT", SECTION:"SECTION", SELECT:"SELECT", SMALL:"SMALL", SOURCE:"SOURCE", SPAN:"SPAN", STRIKE:"STRIKE", STRONG:"STRONG", STYLE:"STYLE", SUB:"SUB", SUMMARY:"SUMMARY",
4748
- SUP:"SUP", SVG:"SVG", TABLE:"TABLE", TBODY:"TBODY", TD:"TD", TEXTAREA:"TEXTAREA", TFOOT:"TFOOT", TH:"TH", THEAD:"THEAD", TIME:"TIME", TITLE:"TITLE", TR:"TR", TRACK:"TRACK", TT:"TT", U:"U", UL:"UL", VAR:"VAR", VIDEO:"VIDEO", WBR:"WBR"};
4749
5040
  goog.math.Coordinate = function(a, b) {
4750
5041
  this.x = goog.isDef(a) ? a : 0;
4751
5042
  this.y = goog.isDef(b) ? b : 0;
@@ -4841,7 +5132,7 @@ goog.math.Size.prototype.aspectRatio = function() {
4841
5132
  return this.width / this.height;
4842
5133
  };
4843
5134
  goog.math.Size.prototype.isEmpty = function() {
4844
- return!this.area();
5135
+ return !this.area();
4845
5136
  };
4846
5137
  goog.math.Size.prototype.ceil = function() {
4847
5138
  this.width = Math.ceil(this.width);
@@ -4867,6 +5158,10 @@ goog.math.Size.prototype.scale = function(a, b) {
4867
5158
  this.height *= c;
4868
5159
  return this;
4869
5160
  };
5161
+ goog.math.Size.prototype.scaleToCover = function(a) {
5162
+ a = this.aspectRatio() <= a.aspectRatio() ? a.width / this.width : a.height / this.height;
5163
+ return this.scale(a);
5164
+ };
4870
5165
  goog.math.Size.prototype.scaleToFit = function(a) {
4871
5166
  a = this.aspectRatio() > a.aspectRatio() ? a.width / this.width : a.height / this.height;
4872
5167
  return this.scale(a);
@@ -4904,14 +5199,14 @@ goog.dom.getElementsByClass = function(a, b) {
4904
5199
  };
4905
5200
  goog.dom.getElementByClass = function(a, b) {
4906
5201
  var c = b || document, d = null;
4907
- return(d = goog.dom.canUseQuerySelector_(c) ? c.querySelector("." + a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b)[0]) || null;
5202
+ return (d = c.getElementsByClassName ? c.getElementsByClassName(a)[0] : goog.dom.canUseQuerySelector_(c) ? c.querySelector("." + a) : goog.dom.getElementsByTagNameAndClass_(document, "*", a, b)[0]) || null;
4908
5203
  };
4909
5204
  goog.dom.getRequiredElementByClass = function(a, b) {
4910
5205
  var c = goog.dom.getElementByClass(a, b);
4911
5206
  return goog.asserts.assert(c, "No element found with className: " + a);
4912
5207
  };
4913
5208
  goog.dom.canUseQuerySelector_ = function(a) {
4914
- return!(!a.querySelectorAll || !a.querySelector);
5209
+ return !(!a.querySelectorAll || !a.querySelector);
4915
5210
  };
4916
5211
  goog.dom.getElementsByTagNameAndClass_ = function(a, b, c, d) {
4917
5212
  a = d || a;
@@ -4993,7 +5288,7 @@ goog.dom.getDocumentScrollElement = function() {
4993
5288
  return goog.dom.getDocumentScrollElement_(document);
4994
5289
  };
4995
5290
  goog.dom.getDocumentScrollElement_ = function(a) {
4996
- return!goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body || a.documentElement;
5291
+ return a.scrollingElement ? a.scrollingElement : !goog.userAgent.WEBKIT && goog.dom.isCss1CompatMode_(a) ? a.documentElement : a.body || a.documentElement;
4997
5292
  };
4998
5293
  goog.dom.getWindow = function(a) {
4999
5294
  return a ? goog.dom.getWindow_(a) : window;
@@ -5044,33 +5339,40 @@ goog.dom.createTable = function(a, b, c) {
5044
5339
  return goog.dom.createTable_(document, a, b, !!c);
5045
5340
  };
5046
5341
  goog.dom.createTable_ = function(a, b, c, d) {
5047
- for (var e = ["<tr>"], f = 0;f < c;f++) {
5048
- e.push(d ? "<td>&nbsp;</td>" : "<td></td>");
5049
- }
5050
- e.push("</tr>");
5051
- e = e.join("");
5052
- c = ["<table>"];
5053
- for (f = 0;f < b;f++) {
5054
- c.push(e);
5342
+ for (var e = a.createElement(goog.dom.TagName.TABLE), f = e.appendChild(a.createElement(goog.dom.TagName.TBODY)), g = 0;g < b;g++) {
5343
+ for (var h = a.createElement(goog.dom.TagName.TR), k = 0;k < c;k++) {
5344
+ var l = a.createElement(goog.dom.TagName.TD);
5345
+ d && goog.dom.setTextContent(l, goog.string.Unicode.NBSP);
5346
+ h.appendChild(l);
5347
+ }
5348
+ f.appendChild(h);
5055
5349
  }
5056
- c.push("</table>");
5057
- a = a.createElement(goog.dom.TagName.DIV);
5058
- a.innerHTML = c.join("");
5059
- return a.removeChild(a.firstChild);
5350
+ return e;
5351
+ };
5352
+ goog.dom.safeHtmlToNode = function(a) {
5353
+ return goog.dom.safeHtmlToNode_(document, a);
5354
+ };
5355
+ goog.dom.safeHtmlToNode_ = function(a, b) {
5356
+ var c = a.createElement(goog.dom.TagName.DIV);
5357
+ goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (goog.dom.safe.setInnerHtml(c, goog.html.SafeHtml.concat(goog.html.SafeHtml.create("br"), b)), c.removeChild(c.firstChild)) : goog.dom.safe.setInnerHtml(c, b);
5358
+ return goog.dom.childrenToNode_(a, c);
5060
5359
  };
5061
5360
  goog.dom.htmlToDocumentFragment = function(a) {
5062
5361
  return goog.dom.htmlToDocumentFragment_(document, a);
5063
5362
  };
5064
5363
  goog.dom.htmlToDocumentFragment_ = function(a, b) {
5065
- var c = a.createElement("div");
5364
+ var c = a.createElement(goog.dom.TagName.DIV);
5066
5365
  goog.dom.BrowserFeature.INNER_HTML_NEEDS_SCOPED_ELEMENT ? (c.innerHTML = "<br>" + b, c.removeChild(c.firstChild)) : c.innerHTML = b;
5067
- if (1 == c.childNodes.length) {
5068
- return c.removeChild(c.firstChild);
5366
+ return goog.dom.childrenToNode_(a, c);
5367
+ };
5368
+ goog.dom.childrenToNode_ = function(a, b) {
5369
+ if (1 == b.childNodes.length) {
5370
+ return b.removeChild(b.firstChild);
5069
5371
  }
5070
- for (var d = a.createDocumentFragment();c.firstChild;) {
5071
- d.appendChild(c.firstChild);
5372
+ for (var c = a.createDocumentFragment();b.firstChild;) {
5373
+ c.appendChild(b.firstChild);
5072
5374
  }
5073
- return d;
5375
+ return c;
5074
5376
  };
5075
5377
  goog.dom.isCss1CompatMode = function() {
5076
5378
  return goog.dom.isCss1CompatMode_(document);
@@ -5080,7 +5382,7 @@ goog.dom.isCss1CompatMode_ = function(a) {
5080
5382
  };
5081
5383
  goog.dom.canHaveChildren = function(a) {
5082
5384
  if (a.nodeType != goog.dom.NodeType.ELEMENT) {
5083
- return!1;
5385
+ return !1;
5084
5386
  }
5085
5387
  switch(a.tagName) {
5086
5388
  case goog.dom.TagName.APPLET:
@@ -5132,9 +5434,9 @@ goog.dom.canHaveChildren = function(a) {
5132
5434
  case goog.dom.TagName.TRACK:
5133
5435
  ;
5134
5436
  case goog.dom.TagName.WBR:
5135
- return!1;
5437
+ return !1;
5136
5438
  }
5137
- return!0;
5439
+ return !0;
5138
5440
  };
5139
5441
  goog.dom.appendChild = function(a, b) {
5140
5442
  a.appendChild(b);
@@ -5260,7 +5562,7 @@ goog.dom.compareNodeOrder = function(a, b) {
5260
5562
  }
5261
5563
  if (goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(9)) {
5262
5564
  if (a.nodeType == goog.dom.NodeType.DOCUMENT) {
5263
- return-1;
5565
+ return -1;
5264
5566
  }
5265
5567
  if (b.nodeType == goog.dom.NodeType.DOCUMENT) {
5266
5568
  return 1;
@@ -5286,7 +5588,7 @@ goog.dom.compareNodeOrder = function(a, b) {
5286
5588
  goog.dom.compareParentsDescendantNodeIe_ = function(a, b) {
5287
5589
  var c = a.parentNode;
5288
5590
  if (c == b) {
5289
- return-1;
5591
+ return -1;
5290
5592
  }
5291
5593
  for (var d = b;d.parentNode != c;) {
5292
5594
  d = d.parentNode;
@@ -5296,7 +5598,7 @@ goog.dom.compareParentsDescendantNodeIe_ = function(a, b) {
5296
5598
  goog.dom.compareSiblingOrder_ = function(a, b) {
5297
5599
  for (var c = b;c = c.previousSibling;) {
5298
5600
  if (c == a) {
5299
- return-1;
5601
+ return -1;
5300
5602
  }
5301
5603
  }
5302
5604
  return 1;
@@ -5363,7 +5665,7 @@ goog.dom.getOuterHtml = function(a) {
5363
5665
  if ("outerHTML" in a) {
5364
5666
  return a.outerHTML;
5365
5667
  }
5366
- var b = goog.dom.getOwnerDocument(a).createElement("div");
5668
+ var b = goog.dom.getOwnerDocument(a).createElement(goog.dom.TagName.DIV);
5367
5669
  b.appendChild(a.cloneNode(!0));
5368
5670
  return b.innerHTML;
5369
5671
  };
@@ -5380,12 +5682,12 @@ goog.dom.findNodes_ = function(a, b, c, d) {
5380
5682
  if (null != a) {
5381
5683
  for (a = a.firstChild;a;) {
5382
5684
  if (b(a) && (c.push(a), d) || goog.dom.findNodes_(a, b, c, d)) {
5383
- return!0;
5685
+ return !0;
5384
5686
  }
5385
5687
  a = a.nextSibling;
5386
5688
  }
5387
5689
  }
5388
- return!1;
5690
+ return !1;
5389
5691
  };
5390
5692
  goog.dom.TAGS_TO_IGNORE_ = {SCRIPT:1, STYLE:1, HEAD:1, IFRAME:1, OBJECT:1};
5391
5693
  goog.dom.PREDEFINED_TAG_VALUES_ = {IMG:" ", BR:"\n"};
@@ -5397,7 +5699,7 @@ goog.dom.setFocusableTabIndex = function(a, b) {
5397
5699
  };
5398
5700
  goog.dom.isFocusable = function(a) {
5399
5701
  var b;
5400
- return(b = goog.dom.nativelySupportsFocus_(a) ? !a.disabled && (!goog.dom.hasSpecifiedTabIndex_(a) || goog.dom.isTabIndexFocusable_(a)) : goog.dom.isFocusableTabIndex(a)) && goog.userAgent.IE ? goog.dom.hasNonZeroBoundingRect_(a) : b;
5702
+ return (b = goog.dom.nativelySupportsFocus_(a) ? !a.disabled && (!goog.dom.hasSpecifiedTabIndex_(a) || goog.dom.isTabIndexFocusable_(a)) : goog.dom.isFocusableTabIndex(a)) && goog.userAgent.IE ? goog.dom.hasNonZeroBoundingRect_(a) : b;
5401
5703
  };
5402
5704
  goog.dom.hasSpecifiedTabIndex_ = function(a) {
5403
5705
  a = a.getAttributeNode("tabindex");
@@ -5489,7 +5791,7 @@ goog.dom.isNodeList = function(a) {
5489
5791
  return "function" == typeof a.item;
5490
5792
  }
5491
5793
  }
5492
- return!1;
5794
+ return !1;
5493
5795
  };
5494
5796
  goog.dom.getAncestorByTagNameAndClass = function(a, b, c, d) {
5495
5797
  if (!b && !c) {
@@ -5497,7 +5799,7 @@ goog.dom.getAncestorByTagNameAndClass = function(a, b, c, d) {
5497
5799
  }
5498
5800
  var e = b ? b.toUpperCase() : null;
5499
5801
  return goog.dom.getAncestor(a, function(a) {
5500
- return(!e || a.nodeName == e) && (!c || goog.isString(a.className) && goog.array.contains(a.className.split(/\s+/), c));
5802
+ return (!e || a.nodeName == e) && (!c || goog.isString(a.className) && goog.array.contains(a.className.split(/\s+/), c));
5501
5803
  }, !0, d);
5502
5804
  };
5503
5805
  goog.dom.getAncestorByClass = function(a, b, c) {
@@ -5507,6 +5809,7 @@ goog.dom.getAncestor = function(a, b, c, d) {
5507
5809
  c || (a = a.parentNode);
5508
5810
  c = null == d;
5509
5811
  for (var e = 0;a && (c || e <= d);) {
5812
+ goog.asserts.assert("parentNode" != a.name);
5510
5813
  if (b(a)) {
5511
5814
  return a;
5512
5815
  }
@@ -5579,6 +5882,9 @@ goog.dom.DomHelper.prototype.createTextNode = function(a) {
5579
5882
  goog.dom.DomHelper.prototype.createTable = function(a, b, c) {
5580
5883
  return goog.dom.createTable_(this.document_, a, b, !!c);
5581
5884
  };
5885
+ goog.dom.DomHelper.prototype.safeHtmlToNode = function(a) {
5886
+ return goog.dom.safeHtmlToNode_(this.document_, a);
5887
+ };
5582
5888
  goog.dom.DomHelper.prototype.htmlToDocumentFragment = function(a) {
5583
5889
  return goog.dom.htmlToDocumentFragment_(this.document_, a);
5584
5890
  };
@@ -5654,7 +5960,7 @@ goog.dom.vendor.getPrefixedPropertyName = function(a, b) {
5654
5960
  return c ? (c = c.toLowerCase(), c += goog.string.toTitleCase(a), !goog.isDef(b) || c in b ? c : null) : null;
5655
5961
  };
5656
5962
  goog.dom.vendor.getPrefixedEventType = function(a) {
5657
- return((goog.dom.vendor.getVendorJsPrefix() || "") + a).toLowerCase();
5963
+ return ((goog.dom.vendor.getVendorJsPrefix() || "") + a).toLowerCase();
5658
5964
  };
5659
5965
  goog.math.Box = function(a, b, c, d) {
5660
5966
  this.top = a;
@@ -5764,6 +6070,9 @@ goog.math.Rect.prototype.clone = function() {
5764
6070
  goog.math.Rect.prototype.toBox = function() {
5765
6071
  return new goog.math.Box(this.top, this.left + this.width, this.top + this.height, this.left);
5766
6072
  };
6073
+ goog.math.Rect.createFromPositionAndSize = function(a, b) {
6074
+ return new goog.math.Rect(a.x, a.y, b.width, b.height);
6075
+ };
5767
6076
  goog.math.Rect.createFromBox = function(a) {
5768
6077
  return new goog.math.Rect(a.left, a.top, a.right - a.left, a.bottom - a.top);
5769
6078
  };
@@ -5782,7 +6091,7 @@ goog.math.Rect.prototype.intersection = function(a) {
5782
6091
  return this.left = b, this.top = d, this.width = c - b, this.height = a - d, !0;
5783
6092
  }
5784
6093
  }
5785
- return!1;
6094
+ return !1;
5786
6095
  };
5787
6096
  goog.math.Rect.intersection = function(a, b) {
5788
6097
  var c = Math.max(a.left, b.left), d = Math.min(a.left + a.width, b.left + b.width);
@@ -5803,7 +6112,7 @@ goog.math.Rect.prototype.intersects = function(a) {
5803
6112
  goog.math.Rect.difference = function(a, b) {
5804
6113
  var c = goog.math.Rect.intersection(a, b);
5805
6114
  if (!c || !c.height || !c.width) {
5806
- return[a.clone()];
6115
+ return [a.clone()];
5807
6116
  }
5808
6117
  var c = [], d = a.top, e = a.height, f = a.left + a.width, g = a.top + a.height, h = b.left + b.width, k = b.top + b.height;
5809
6118
  b.top > a.top && (c.push(new goog.math.Rect(a.left, a.top, a.width, b.top - a.top)), d = b.top, e -= b.top - a.top);
@@ -5887,7 +6196,6 @@ goog.math.Rect.prototype.scale = function(a, b) {
5887
6196
  return this;
5888
6197
  };
5889
6198
  goog.style = {};
5890
- goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS = !1;
5891
6199
  goog.style.setStyle = function(a, b, c) {
5892
6200
  if (goog.isString(b)) {
5893
6201
  goog.style.setStyle_(a, c, b);
@@ -5900,13 +6208,13 @@ goog.style.setStyle = function(a, b, c) {
5900
6208
  goog.style.setStyle_ = function(a, b, c) {
5901
6209
  (c = goog.style.getVendorJsStyleName_(a, c)) && (a.style[c] = b);
5902
6210
  };
6211
+ goog.style.styleNameCache_ = {};
5903
6212
  goog.style.getVendorJsStyleName_ = function(a, b) {
5904
- var c = goog.string.toCamelCase(b);
5905
- if (void 0 === a.style[c]) {
5906
- var d = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(c);
5907
- if (void 0 !== a.style[d]) {
5908
- return d;
5909
- }
6213
+ var c = goog.style.styleNameCache_[b];
6214
+ if (!c) {
6215
+ var d = goog.string.toCamelCase(b), c = d;
6216
+ void 0 === a.style[d] && (d = goog.dom.vendor.getVendorJsPrefix() + goog.string.toTitleCase(d), void 0 !== a.style[d] && (c = d));
6217
+ goog.style.styleNameCache_[b] = c;
5910
6218
  }
5911
6219
  return c;
5912
6220
  };
@@ -5957,17 +6265,17 @@ goog.style.getComputedTransform = function(a) {
5957
6265
  return goog.style.getStyle_(a, b) || goog.style.getStyle_(a, "transform");
5958
6266
  };
5959
6267
  goog.style.setPosition = function(a, b, c) {
5960
- var d, e = goog.userAgent.GECKO && (goog.userAgent.MAC || goog.userAgent.X11) && goog.userAgent.isVersionOrHigher("1.9");
6268
+ var d;
5961
6269
  b instanceof goog.math.Coordinate ? (d = b.x, b = b.y) : (d = b, b = c);
5962
- a.style.left = goog.style.getPixelStyleValue_(d, e);
5963
- a.style.top = goog.style.getPixelStyleValue_(b, e);
6270
+ a.style.left = goog.style.getPixelStyleValue_(d, !1);
6271
+ a.style.top = goog.style.getPixelStyleValue_(b, !1);
5964
6272
  };
5965
6273
  goog.style.getPosition = function(a) {
5966
6274
  return new goog.math.Coordinate(a.offsetLeft, a.offsetTop);
5967
6275
  };
5968
6276
  goog.style.getClientViewportElement = function(a) {
5969
6277
  a = a ? goog.dom.getOwnerDocument(a) : goog.dom.getDocument();
5970
- return!goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9) || goog.dom.getDomHelper(a).isCss1CompatMode() ? a.documentElement : a.body;
6278
+ return !goog.userAgent.IE || goog.userAgent.isDocumentModeOrHigher(9) || goog.dom.getDomHelper(a).isCss1CompatMode() ? a.documentElement : a.body;
5971
6279
  };
5972
6280
  goog.style.getViewportPageOffset = function(a) {
5973
6281
  var b = a.body;
@@ -5979,7 +6287,7 @@ goog.style.getBoundingClientRect_ = function(a) {
5979
6287
  try {
5980
6288
  b = a.getBoundingClientRect();
5981
6289
  } catch (c) {
5982
- return{left:0, top:0, right:0, bottom:0};
6290
+ return {left:0, top:0, right:0, bottom:0};
5983
6291
  }
5984
6292
  goog.userAgent.IE && a.ownerDocument.body && (a = a.ownerDocument, b.left -= a.documentElement.clientLeft + a.body.clientLeft, b.top -= a.documentElement.clientTop + a.body.clientTop);
5985
6293
  return b;
@@ -5990,7 +6298,7 @@ goog.style.getOffsetParent = function(a) {
5990
6298
  }
5991
6299
  var b = goog.dom.getOwnerDocument(a), c = goog.style.getStyle_(a, "position"), d = "fixed" == c || "absolute" == c;
5992
6300
  for (a = a.parentNode;a && a != b;a = a.parentNode) {
5993
- if (c = goog.style.getStyle_(a, "position"), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth || a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) {
6301
+ if (a.nodeType == goog.dom.NodeType.DOCUMENT_FRAGMENT && a.host && (a = a.host), c = goog.style.getStyle_(a, "position"), d = d && "static" == c && a != b.documentElement && a != b.body, !d && (a.scrollWidth > a.clientWidth || a.scrollHeight > a.clientHeight || "fixed" == c || "absolute" == c || "relative" == c)) {
5994
6302
  return a;
5995
6303
  }
5996
6304
  }
@@ -6018,12 +6326,14 @@ goog.style.getVisibleRectForElement = function(a) {
6018
6326
  return 0 <= b.top && 0 <= b.left && b.bottom > b.top && b.right > b.left ? b : null;
6019
6327
  };
6020
6328
  goog.style.getContainerOffsetToScrollInto = function(a, b, c) {
6021
- var d = goog.style.getPageOffset(a), e = goog.style.getPageOffset(b), f = goog.style.getBorderBox(b), g = d.x - e.x - f.left, d = d.y - e.y - f.top, e = b.clientWidth - a.offsetWidth;
6329
+ var d = goog.style.getPageOffset(a), e = goog.style.getPageOffset(b), f = goog.style.getBorderBox(b), g = d.x - e.x - f.left, d = d.y - e.y - f.top, h = b.clientWidth - a.offsetWidth;
6022
6330
  a = b.clientHeight - a.offsetHeight;
6023
- f = b.scrollLeft;
6024
- b = b.scrollTop;
6025
- c ? (f += g - e / 2, b += d - a / 2) : (f += Math.min(g, Math.max(g - e, 0)), b += Math.min(d, Math.max(d - a, 0)));
6026
- return new goog.math.Coordinate(f, b);
6331
+ var k = b.scrollLeft, l = b.scrollTop;
6332
+ if (b == goog.dom.getDocument().body || b == goog.dom.getDocument().documentElement) {
6333
+ k = e.x + f.left, l = e.y + f.top, goog.userAgent.IE && !goog.userAgent.isDocumentModeOrHigher(10) && (k += f.left, l += f.top);
6334
+ }
6335
+ c ? (k += g - h / 2, l += d - a / 2) : (k += Math.min(g, Math.max(g - h, 0)), l += Math.min(d, Math.max(d - a, 0)));
6336
+ return new goog.math.Coordinate(k, l);
6027
6337
  };
6028
6338
  goog.style.scrollIntoContainerView = function(a, b, c) {
6029
6339
  a = goog.style.getContainerOffsetToScrollInto(a, b, c);
@@ -6031,49 +6341,20 @@ goog.style.scrollIntoContainerView = function(a, b, c) {
6031
6341
  b.scrollTop = a.y;
6032
6342
  };
6033
6343
  goog.style.getClientLeftTop = function(a) {
6034
- if (goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher("1.9")) {
6035
- var b = parseFloat(goog.style.getComputedStyle(a, "borderLeftWidth"));
6036
- if (goog.style.isRightToLeft(a)) {
6037
- var c = a.offsetWidth - a.clientWidth - b - parseFloat(goog.style.getComputedStyle(a, "borderRightWidth")), b = b + c
6038
- }
6039
- return new goog.math.Coordinate(b, parseFloat(goog.style.getComputedStyle(a, "borderTopWidth")));
6040
- }
6041
6344
  return new goog.math.Coordinate(a.clientLeft, a.clientTop);
6042
6345
  };
6043
6346
  goog.style.getPageOffset = function(a) {
6044
- var b, c = goog.dom.getOwnerDocument(a), d = goog.style.getStyle_(a, "position");
6347
+ var b = goog.dom.getOwnerDocument(a);
6045
6348
  goog.asserts.assertObject(a, "Parameter is required");
6046
- var e = !goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS && goog.userAgent.GECKO && c.getBoxObjectFor && !a.getBoundingClientRect && "absolute" == d && (b = c.getBoxObjectFor(a)) && (0 > b.screenX || 0 > b.screenY), f = new goog.math.Coordinate(0, 0), g = goog.style.getClientViewportElement(c);
6047
- if (a == g) {
6048
- return f;
6049
- }
6050
- if (goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS || a.getBoundingClientRect) {
6051
- b = goog.style.getBoundingClientRect_(a), a = goog.dom.getDomHelper(c).getDocumentScroll(), f.x = b.left + a.x, f.y = b.top + a.y;
6052
- } else {
6053
- if (c.getBoxObjectFor && !e) {
6054
- b = c.getBoxObjectFor(a), a = c.getBoxObjectFor(g), f.x = b.screenX - a.screenX, f.y = b.screenY - a.screenY;
6055
- } else {
6056
- b = a;
6057
- do {
6058
- f.x += b.offsetLeft;
6059
- f.y += b.offsetTop;
6060
- b != a && (f.x += b.clientLeft || 0, f.y += b.clientTop || 0);
6061
- if (goog.userAgent.WEBKIT && "fixed" == goog.style.getComputedPosition(b)) {
6062
- f.x += c.body.scrollLeft;
6063
- f.y += c.body.scrollTop;
6064
- break;
6065
- }
6066
- b = b.offsetParent;
6067
- } while (b && b != a);
6068
- if (goog.userAgent.OPERA || goog.userAgent.WEBKIT && "absolute" == d) {
6069
- f.y -= c.body.offsetTop;
6070
- }
6071
- for (b = a;(b = goog.style.getOffsetParent(b)) && b != c.body && b != g;) {
6072
- f.x -= b.scrollLeft, goog.userAgent.OPERA && "TR" == b.tagName || (f.y -= b.scrollTop);
6073
- }
6074
- }
6349
+ var c = new goog.math.Coordinate(0, 0), d = goog.style.getClientViewportElement(b);
6350
+ if (a == d) {
6351
+ return c;
6075
6352
  }
6076
- return f;
6353
+ a = goog.style.getBoundingClientRect_(a);
6354
+ b = goog.dom.getDomHelper(b).getDocumentScroll();
6355
+ c.x = a.left + b.x;
6356
+ c.y = a.top + b.y;
6357
+ return c;
6077
6358
  };
6078
6359
  goog.style.getPageOffsetLeft = function(a) {
6079
6360
  return goog.style.getPageOffset(a).x;
@@ -6087,7 +6368,7 @@ goog.style.getFramedPageOffset = function(a, b) {
6087
6368
  var f = d == b ? goog.style.getPageOffset(e) : goog.style.getClientPositionForElement_(goog.asserts.assert(e));
6088
6369
  c.x += f.x;
6089
6370
  c.y += f.y;
6090
- } while (d && d != b && (e = d.frameElement) && (d = d.parent));
6371
+ } while (d && d != b && d != d.parent && (e = d.frameElement) && (d = d.parent));
6091
6372
  return c;
6092
6373
  };
6093
6374
  goog.style.translateRectForAnotherFrame = function(a, b, c) {
@@ -6105,15 +6386,8 @@ goog.style.getRelativePosition = function(a, b) {
6105
6386
  return new goog.math.Coordinate(c.x - d.x, c.y - d.y);
6106
6387
  };
6107
6388
  goog.style.getClientPositionForElement_ = function(a) {
6108
- var b;
6109
- if (goog.style.GET_BOUNDING_CLIENT_RECT_ALWAYS_EXISTS || a.getBoundingClientRect) {
6110
- b = goog.style.getBoundingClientRect_(a), b = new goog.math.Coordinate(b.left, b.top);
6111
- } else {
6112
- b = goog.dom.getDomHelper(a).getDocumentScroll();
6113
- var c = goog.style.getPageOffset(a);
6114
- b = new goog.math.Coordinate(c.x - b.x, c.y - b.y);
6115
- }
6116
- return goog.userAgent.GECKO && !goog.userAgent.isVersionOrHigher(12) ? goog.math.Coordinate.sum(b, goog.style.getCssTranslation(a)) : b;
6389
+ a = goog.style.getBoundingClientRect_(a);
6390
+ return new goog.math.Coordinate(a.left, a.top);
6117
6391
  };
6118
6392
  goog.style.getClientPosition = function(a) {
6119
6393
  goog.asserts.assert(a);
@@ -6218,7 +6492,7 @@ goog.style.isElementShown = function(a) {
6218
6492
  };
6219
6493
  goog.style.installStyles = function(a, b) {
6220
6494
  var c = goog.dom.getDomHelper(b), d = null, e = c.getDocument();
6221
- goog.userAgent.IE && e.createStyleSheet ? (d = e.createStyleSheet(), goog.style.setStyles(d, a)) : (e = c.getElementsByTagNameAndClass("head")[0], e || (d = c.getElementsByTagNameAndClass("body")[0], e = c.createDom("head"), d.parentNode.insertBefore(e, d)), d = c.createDom("style"), goog.style.setStyles(d, a), c.appendChild(e, d));
6495
+ goog.userAgent.IE && e.createStyleSheet ? (d = e.createStyleSheet(), goog.style.setStyles(d, a)) : (e = c.getElementsByTagNameAndClass(goog.dom.TagName.HEAD)[0], e || (d = c.getElementsByTagNameAndClass(goog.dom.TagName.BODY)[0], e = c.createDom(goog.dom.TagName.HEAD), d.parentNode.insertBefore(e, d)), d = c.createDom(goog.dom.TagName.STYLE), goog.style.setStyles(d, a), c.appendChild(e, d));
6222
6496
  return d;
6223
6497
  };
6224
6498
  goog.style.uninstallStyles = function(a) {
@@ -6234,7 +6508,7 @@ goog.style.setPreWrap = function(a) {
6234
6508
  goog.style.setInlineBlock = function(a) {
6235
6509
  a = a.style;
6236
6510
  a.position = "relative";
6237
- goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.zoom = "1", a.display = "inline") : a.display = goog.userAgent.GECKO ? goog.userAgent.isVersionOrHigher("1.9a") ? "inline-block" : "-moz-inline-box" : "inline-block";
6511
+ goog.userAgent.IE && !goog.userAgent.isVersionOrHigher("8") ? (a.zoom = "1", a.display = "inline") : a.display = "inline-block";
6238
6512
  };
6239
6513
  goog.style.isRightToLeft = function(a) {
6240
6514
  return "rtl" == goog.style.getStyle_(a, "direction");
@@ -6247,10 +6521,10 @@ goog.style.setUnselectable = function(a, b, c) {
6247
6521
  c = c ? null : a.getElementsByTagName("*");
6248
6522
  var d = goog.style.unselectableStyle_;
6249
6523
  if (d) {
6250
- if (b = b ? "none" : "", a.style[d] = b, c) {
6524
+ if (b = b ? "none" : "", a.style && (a.style[d] = b), c) {
6251
6525
  a = 0;
6252
6526
  for (var e;e = c[a];a++) {
6253
- e.style[d] = b;
6527
+ e.style && (e.style[d] = b);
6254
6528
  }
6255
6529
  }
6256
6530
  } else {
@@ -6381,7 +6655,7 @@ goog.style.getFontFamily = function(a) {
6381
6655
  };
6382
6656
  goog.style.lengthUnitRegex_ = /[^\d]+$/;
6383
6657
  goog.style.getLengthUnits = function(a) {
6384
- return(a = a.match(goog.style.lengthUnitRegex_)) && a[0] || null;
6658
+ return (a = a.match(goog.style.lengthUnitRegex_)) && a[0] || null;
6385
6659
  };
6386
6660
  goog.style.ABSOLUTE_CSS_LENGTH_UNITS_ = {cm:1, "in":1, mm:1, pc:1, pt:1};
6387
6661
  goog.style.CONVERTIBLE_RELATIVE_CSS_UNITS_ = {em:1, ex:1};
@@ -6398,7 +6672,7 @@ goog.style.getFontSize = function(a) {
6398
6672
  return a = a.parentNode, c = goog.style.getStyle_(a, "fontSize"), goog.style.getIePixelValue_(a, b == c ? "1em" : b, "left", "pixelLeft");
6399
6673
  }
6400
6674
  }
6401
- c = goog.dom.createDom("span", {style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});
6675
+ c = goog.dom.createDom(goog.dom.TagName.SPAN, {style:"visibility:hidden;position:absolute;line-height:0;padding:0;margin:0;border:0;height:1em;"});
6402
6676
  goog.dom.appendChild(a, c);
6403
6677
  b = c.offsetHeight;
6404
6678
  goog.dom.removeNode(c);
@@ -6419,17 +6693,18 @@ goog.style.toStyleAttribute = function(a) {
6419
6693
  });
6420
6694
  return b.join("");
6421
6695
  };
6696
+ goog.style.FLOAT_CSS_PROPERTY_NAME_ = goog.userAgent.IE && !goog.userAgent.isVersionOrHigher(12) ? "styleFloat" : "cssFloat";
6422
6697
  goog.style.setFloat = function(a, b) {
6423
- a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] = b;
6698
+ a.style[goog.style.FLOAT_CSS_PROPERTY_NAME_] = b;
6424
6699
  };
6425
6700
  goog.style.getFloat = function(a) {
6426
- return a.style[goog.userAgent.IE ? "styleFloat" : "cssFloat"] || "";
6701
+ return a.style[goog.style.FLOAT_CSS_PROPERTY_NAME_] || "";
6427
6702
  };
6428
6703
  goog.style.getScrollbarWidth = function(a) {
6429
- var b = goog.dom.createElement("div");
6704
+ var b = goog.dom.createElement(goog.dom.TagName.DIV);
6430
6705
  a && (b.className = a);
6431
6706
  b.style.cssText = "overflow:auto;position:absolute;top:0;width:100px;height:100px";
6432
- a = goog.dom.createElement("div");
6707
+ a = goog.dom.createElement(goog.dom.TagName.DIV);
6433
6708
  goog.style.setSize(a, "200px", "200px");
6434
6709
  b.appendChild(a);
6435
6710
  goog.dom.appendChild(goog.dom.getDocument().body, b);
@@ -6463,7 +6738,7 @@ goog.debug.DivConsole.prototype.setCapturing = function(a) {
6463
6738
  };
6464
6739
  goog.debug.DivConsole.prototype.addLogRecord = function(a) {
6465
6740
  if (a) {
6466
- var b = 100 >= this.element_.scrollHeight - this.element_.scrollTop - this.element_.clientHeight, c = this.elementOwnerDocument_.createElement("div");
6741
+ var b = 100 >= this.element_.scrollHeight - this.element_.scrollTop - this.element_.clientHeight, c = this.elementOwnerDocument_.createElement(goog.dom.TagName.DIV);
6467
6742
  c.className = "logmsg";
6468
6743
  goog.dom.safe.setInnerHtml(c, this.formatter_.formatRecordAsHtml(a));
6469
6744
  this.element_.appendChild(c);
@@ -6477,7 +6752,7 @@ goog.debug.DivConsole.prototype.setFormatter = function(a) {
6477
6752
  this.formatter_ = a;
6478
6753
  };
6479
6754
  goog.debug.DivConsole.prototype.addSeparator = function() {
6480
- var a = this.elementOwnerDocument_.createElement("div");
6755
+ var a = this.elementOwnerDocument_.createElement(goog.dom.TagName.DIV);
6481
6756
  a.className = "logmsg logsep";
6482
6757
  this.element_.appendChild(a);
6483
6758
  };
@@ -6521,35 +6796,26 @@ goog.log.fine = function(a, b, c) {
6521
6796
  };
6522
6797
  goog.userAgent.product = {};
6523
6798
  goog.userAgent.product.ASSUME_FIREFOX = !1;
6524
- goog.userAgent.product.ASSUME_CAMINO = !1;
6525
6799
  goog.userAgent.product.ASSUME_IPHONE = !1;
6526
6800
  goog.userAgent.product.ASSUME_IPAD = !1;
6527
6801
  goog.userAgent.product.ASSUME_ANDROID = !1;
6528
6802
  goog.userAgent.product.ASSUME_CHROME = !1;
6529
6803
  goog.userAgent.product.ASSUME_SAFARI = !0;
6530
- goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_CAMINO || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI;
6531
- goog.userAgent.product.init_ = function() {
6532
- goog.userAgent.product.detectedFirefox_ = !1;
6533
- goog.userAgent.product.detectedCamino_ = !1;
6534
- goog.userAgent.product.detectedIphone_ = !1;
6535
- goog.userAgent.product.detectedIpad_ = !1;
6536
- goog.userAgent.product.detectedAndroid_ = !1;
6537
- goog.userAgent.product.detectedChrome_ = !1;
6538
- goog.userAgent.product.detectedSafari_ = !1;
6539
- var a = goog.userAgent.getUserAgentString();
6540
- a && (-1 != a.indexOf("Firefox") ? goog.userAgent.product.detectedFirefox_ = !0 : -1 != a.indexOf("Camino") ? goog.userAgent.product.detectedCamino_ = !0 : -1 != a.indexOf("iPad") ? goog.userAgent.product.detectedIpad_ = !0 : -1 != a.indexOf("iPhone") || -1 != a.indexOf("iPod") ? goog.userAgent.product.detectedIphone_ = !0 : -1 != a.indexOf("Chrome") ? goog.userAgent.product.detectedChrome_ = !0 : -1 != a.indexOf("Android") ? goog.userAgent.product.detectedAndroid_ = !0 : -1 != a.indexOf("Safari") &&
6541
- (goog.userAgent.product.detectedSafari_ = !0));
6542
- };
6543
- goog.userAgent.product.PRODUCT_KNOWN_ || goog.userAgent.product.init_();
6804
+ goog.userAgent.product.PRODUCT_KNOWN_ = goog.userAgent.ASSUME_IE || goog.userAgent.ASSUME_OPERA || goog.userAgent.product.ASSUME_FIREFOX || goog.userAgent.product.ASSUME_IPHONE || goog.userAgent.product.ASSUME_IPAD || goog.userAgent.product.ASSUME_ANDROID || goog.userAgent.product.ASSUME_CHROME || goog.userAgent.product.ASSUME_SAFARI;
6544
6805
  goog.userAgent.product.OPERA = goog.userAgent.OPERA;
6545
6806
  goog.userAgent.product.IE = goog.userAgent.IE;
6546
- goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.userAgent.product.detectedFirefox_;
6547
- goog.userAgent.product.CAMINO = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CAMINO : goog.userAgent.product.detectedCamino_;
6548
- goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.detectedIphone_;
6549
- goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.userAgent.product.detectedIpad_;
6550
- goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.userAgent.product.detectedAndroid_;
6551
- goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.userAgent.product.detectedChrome_;
6552
- goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.detectedSafari_;
6807
+ goog.userAgent.product.FIREFOX = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_FIREFOX : goog.labs.userAgent.browser.isFirefox();
6808
+ goog.userAgent.product.isIphoneOrIpod_ = function() {
6809
+ return goog.labs.userAgent.platform.isIphone() || goog.labs.userAgent.platform.isIpod();
6810
+ };
6811
+ goog.userAgent.product.IPHONE = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPHONE : goog.userAgent.product.isIphoneOrIpod_();
6812
+ goog.userAgent.product.IPAD = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_IPAD : goog.labs.userAgent.platform.isIpad();
6813
+ goog.userAgent.product.ANDROID = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_ANDROID : goog.labs.userAgent.browser.isAndroidBrowser();
6814
+ goog.userAgent.product.CHROME = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_CHROME : goog.labs.userAgent.browser.isChrome();
6815
+ goog.userAgent.product.isSafariDesktop_ = function() {
6816
+ return goog.labs.userAgent.browser.isSafari() && !goog.labs.userAgent.platform.isIos();
6817
+ };
6818
+ goog.userAgent.product.SAFARI = goog.userAgent.product.PRODUCT_KNOWN_ ? goog.userAgent.product.ASSUME_SAFARI : goog.userAgent.product.isSafariDesktop_();
6553
6819
  goog.userAgent.product.determineVersion_ = function() {
6554
6820
  if (goog.userAgent.product.FIREFOX) {
6555
6821
  return goog.userAgent.product.getFirstRegExpGroup_(/Firefox\/([0-9.]+)/);
@@ -6560,7 +6826,7 @@ goog.userAgent.product.determineVersion_ = function() {
6560
6826
  if (goog.userAgent.product.CHROME) {
6561
6827
  return goog.userAgent.product.getFirstRegExpGroup_(/Chrome\/([0-9.]+)/);
6562
6828
  }
6563
- if (goog.userAgent.product.SAFARI) {
6829
+ if (goog.userAgent.product.SAFARI && !goog.labs.userAgent.platform.isIos()) {
6564
6830
  return goog.userAgent.product.getFirstRegExpGroup_(/Version\/([0-9.]+)/);
6565
6831
  }
6566
6832
  if (goog.userAgent.product.IPHONE || goog.userAgent.product.IPAD) {
@@ -6570,16 +6836,13 @@ goog.userAgent.product.determineVersion_ = function() {
6570
6836
  }
6571
6837
  } else {
6572
6838
  if (goog.userAgent.product.ANDROID) {
6573
- return(a = goog.userAgent.product.getFirstRegExpGroup_(/Android\s+([0-9.]+)/)) ? a : goog.userAgent.product.getFirstRegExpGroup_(/Version\/([0-9.]+)/);
6574
- }
6575
- if (goog.userAgent.product.CAMINO) {
6576
- return goog.userAgent.product.getFirstRegExpGroup_(/Camino\/([0-9.]+)/);
6839
+ return (a = goog.userAgent.product.getFirstRegExpGroup_(/Android\s+([0-9.]+)/)) ? a : goog.userAgent.product.getFirstRegExpGroup_(/Version\/([0-9.]+)/);
6577
6840
  }
6578
6841
  }
6579
6842
  return "";
6580
6843
  };
6581
6844
  goog.userAgent.product.getFirstRegExpGroup_ = function(a) {
6582
- return(a = goog.userAgent.product.execRegExp_(a)) ? a[1] : "";
6845
+ return (a = goog.userAgent.product.execRegExp_(a)) ? a[1] : "";
6583
6846
  };
6584
6847
  goog.userAgent.product.execRegExp_ = function(a) {
6585
6848
  return a.exec(goog.userAgent.getUserAgentString());
@@ -6597,18 +6860,18 @@ bot.userAgent.isProductVersion = function(a) {
6597
6860
  };
6598
6861
  bot.userAgent.FIREFOX_EXTENSION = function() {
6599
6862
  if (!goog.userAgent.GECKO) {
6600
- return!1;
6863
+ return !1;
6601
6864
  }
6602
6865
  var a = goog.global.Components;
6603
6866
  if (!a) {
6604
- return!1;
6867
+ return !1;
6605
6868
  }
6606
6869
  try {
6607
6870
  if (!a.classes) {
6608
- return!1;
6871
+ return !1;
6609
6872
  }
6610
6873
  } catch (b) {
6611
- return!1;
6874
+ return !1;
6612
6875
  }
6613
6876
  var c = a.classes, a = a.interfaces, d = c["@mozilla.org/xpcom/version-comparator;1"].getService(a.nsIVersionComparator), c = c["@mozilla.org/xre/app-info;1"].getService(a.nsIXULAppInfo), e = c.platformVersion, f = c.version;
6614
6877
  bot.userAgent.FIREFOX_EXTENSION_IS_ENGINE_VERSION_ = function(a) {
@@ -6617,14 +6880,14 @@ bot.userAgent.FIREFOX_EXTENSION = function() {
6617
6880
  bot.userAgent.FIREFOX_EXTENSION_IS_PRODUCT_VERSION_ = function(a) {
6618
6881
  return 0 <= d.compare(f, "" + a);
6619
6882
  };
6620
- return!0;
6883
+ return !0;
6621
6884
  }();
6622
6885
  bot.userAgent.IOS = goog.userAgent.product.IPAD || goog.userAgent.product.IPHONE;
6623
6886
  bot.userAgent.MOBILE = bot.userAgent.IOS || goog.userAgent.product.ANDROID;
6624
6887
  bot.userAgent.ANDROID_VERSION_ = function() {
6625
6888
  if (goog.userAgent.product.ANDROID) {
6626
6889
  var a = goog.userAgent.getUserAgentString();
6627
- return(a = /Android\s+([0-9\.]+)/.exec(a)) ? a[1] : "0";
6890
+ return (a = /Android\s+([0-9\.]+)/.exec(a)) ? a[1] : "0";
6628
6891
  }
6629
6892
  return "0";
6630
6893
  }();
@@ -6640,7 +6903,7 @@ bot.userAgent.WINDOWS_PHONE = goog.userAgent.IE && -1 != goog.userAgent.getUserA
6640
6903
  goog.json = {};
6641
6904
  goog.json.USE_NATIVE_JSON = !1;
6642
6905
  goog.json.isValid = function(a) {
6643
- return/^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""));
6906
+ return /^\s*$/.test(a) ? !1 : /^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g, "@").replace(/"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g, "]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g, ""));
6644
6907
  };
6645
6908
  goog.json.parse = goog.json.USE_NATIVE_JSON ? goog.global.JSON.parse : function(a) {
6646
6909
  a = String(a);
@@ -6656,7 +6919,7 @@ goog.json.unsafeParse = goog.json.USE_NATIVE_JSON ? goog.global.JSON.parse : fun
6656
6919
  return eval("(" + a + ")");
6657
6920
  };
6658
6921
  goog.json.serialize = goog.json.USE_NATIVE_JSON ? goog.global.JSON.stringify : function(a, b) {
6659
- return(new goog.json.Serializer(b)).serialize(a);
6922
+ return (new goog.json.Serializer(b)).serialize(a);
6660
6923
  };
6661
6924
  goog.json.Serializer = function(a) {
6662
6925
  this.replacer_ = a;
@@ -6667,46 +6930,45 @@ goog.json.Serializer.prototype.serialize = function(a) {
6667
6930
  return b.join("");
6668
6931
  };
6669
6932
  goog.json.Serializer.prototype.serializeInternal = function(a, b) {
6670
- switch(typeof a) {
6671
- case "string":
6672
- this.serializeString_(a, b);
6673
- break;
6674
- case "number":
6675
- this.serializeNumber_(a, b);
6676
- break;
6677
- case "boolean":
6678
- b.push(a);
6679
- break;
6680
- case "undefined":
6681
- b.push("null");
6682
- break;
6683
- case "object":
6684
- if (null == a) {
6685
- b.push("null");
6686
- break;
6687
- }
6933
+ if (null == a) {
6934
+ b.push("null");
6935
+ } else {
6936
+ if ("object" == typeof a) {
6688
6937
  if (goog.isArray(a)) {
6689
6938
  this.serializeArray(a, b);
6690
- break;
6939
+ return;
6691
6940
  }
6692
- this.serializeObject_(a, b);
6693
- break;
6694
- case "function":
6695
- break;
6696
- default:
6697
- throw Error("Unknown type: " + typeof a);;
6941
+ if (a instanceof String || a instanceof Number || a instanceof Boolean) {
6942
+ a = a.valueOf();
6943
+ } else {
6944
+ this.serializeObject_(a, b);
6945
+ return;
6946
+ }
6947
+ }
6948
+ switch(typeof a) {
6949
+ case "string":
6950
+ this.serializeString_(a, b);
6951
+ break;
6952
+ case "number":
6953
+ this.serializeNumber_(a, b);
6954
+ break;
6955
+ case "boolean":
6956
+ b.push(a);
6957
+ break;
6958
+ case "function":
6959
+ break;
6960
+ default:
6961
+ throw Error("Unknown type: " + typeof a);;
6962
+ }
6698
6963
  }
6699
6964
  };
6700
6965
  goog.json.Serializer.charToJsonCharCache_ = {'"':'\\"', "\\":"\\\\", "/":"\\/", "\b":"\\b", "\f":"\\f", "\n":"\\n", "\r":"\\r", "\t":"\\t", "\x0B":"\\u000b"};
6701
6966
  goog.json.Serializer.charsToReplace_ = /\uffff/.test("\uffff") ? /[\\\"\x00-\x1f\x7f-\uffff]/g : /[\\\"\x00-\x1f\x7f-\xff]/g;
6702
6967
  goog.json.Serializer.prototype.serializeString_ = function(a, b) {
6703
6968
  b.push('"', a.replace(goog.json.Serializer.charsToReplace_, function(a) {
6704
- if (a in goog.json.Serializer.charToJsonCharCache_) {
6705
- return goog.json.Serializer.charToJsonCharCache_[a];
6706
- }
6707
- var b = a.charCodeAt(0), e = "\\u";
6708
- 16 > b ? e += "000" : 256 > b ? e += "00" : 4096 > b && (e += "0");
6709
- return goog.json.Serializer.charToJsonCharCache_[a] = e + b.toString(16);
6969
+ var b = goog.json.Serializer.charToJsonCharCache_[a];
6970
+ b || (b = "\\u" + (a.charCodeAt(0) | 65536).toString(16).substr(1), goog.json.Serializer.charToJsonCharCache_[a] = b);
6971
+ return b;
6710
6972
  }), '"');
6711
6973
  };
6712
6974
  goog.json.Serializer.prototype.serializeNumber_ = function(a, b) {