-
Notifications
You must be signed in to change notification settings - Fork 0
/
app_compiled.js
716 lines (699 loc) · 331 KB
/
app_compiled.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
var f,aa=function(a){var b=0;return function(){return b<a.length?{done:!1,value:a[b++]}:{done:!0}}},ba="function"==typeof Object.defineProperties?Object.defineProperty:function(a,b,c){if(a==Array.prototype||a==Object.prototype)return a;a[b]=c.value;return a},ca=function(a){a=["object"==typeof globalThis&&globalThis,a,"object"==typeof window&&window,"object"==typeof self&&self,"object"==typeof global&&global];for(var b=0;b<a.length;++b){var c=a[b];if(c&&c.Math==Math)return c}throw Error("Cannot find global object");
},da=ca(this),ea=function(a,b){if(b)a:{var c=da;a=a.split(".");for(var d=0;d<a.length-1;d++){var e=a[d];if(!(e in c))break a;c=c[e]}a=a[a.length-1];d=c[a];b=b(d);b!=d&&null!=b&&ba(c,a,{configurable:!0,writable:!0,value:b})}};
ea("Symbol",function(a){if(a)return a;var b=function(g,h){this.$jscomp$symbol$id_=g;ba(this,"description",{configurable:!0,writable:!0,value:h})};b.prototype.toString=function(){return this.$jscomp$symbol$id_};var c="jscomp_symbol_"+(1E9*Math.random()>>>0)+"_",d=0,e=function(g){if(this instanceof e)throw new TypeError("Symbol is not a constructor");return new b(c+(g||"")+"_"+d++,g)};return e});
ea("Symbol.iterator",function(a){if(a)return a;a=Symbol("Symbol.iterator");for(var b="Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array".split(" "),c=0;c<b.length;c++){var d=da[b[c]];"function"===typeof d&&"function"!=typeof d.prototype[a]&&ba(d.prototype,a,{configurable:!0,writable:!0,value:function(){return fa(aa(this))}})}return a});
var fa=function(a){a={next:a};a[Symbol.iterator]=function(){return this};return a},ha=function(a){return a.raw=a},ia=function(a,b){a.raw=b;return a},ja=function(a){var b="undefined"!=typeof Symbol&&Symbol.iterator&&a[Symbol.iterator];if(b)return b.call(a);if("number"==typeof a.length)return{next:aa(a)};throw Error(String(a)+" is not an iterable or ArrayLike");},ka=function(a){if(!(a instanceof Array)){a=ja(a);for(var b,c=[];!(b=a.next()).done;)c.push(b.value);a=c}return a},la="function"==typeof Object.create?
Object.create:function(a){var b=function(){};b.prototype=a;return new b},ma;if("function"==typeof Object.setPrototypeOf)ma=Object.setPrototypeOf;else{var na;a:{var oa={a:!0},pa={};try{pa.__proto__=oa;na=pa.a;break a}catch(a){}na=!1}ma=na?function(a,b){a.__proto__=b;if(a.__proto__!==b)throw new TypeError(a+" is not extensible");return a}:null}
var qa=ma,ra=function(a,b){a.prototype=la(b.prototype);a.prototype.constructor=a;if(qa)qa(a,b);else for(var c in b)if("prototype"!=c)if(Object.defineProperties){var d=Object.getOwnPropertyDescriptor(b,c);d&&Object.defineProperty(a,c,d)}else a[c]=b[c];a.superClass_=b.prototype},sa=function(){for(var a=Number(this),b=[],c=a;c<arguments.length;c++)b[c-a]=arguments[c];return b},ta=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};
ea("WeakMap",function(a){function b(){}function c(l){var n=typeof l;return"object"===n&&null!==l||"function"===n}function d(l){if(!ta(l,g)){var n=new b;ba(l,g,{value:n})}}function e(l){var n=Object[l];n&&(Object[l]=function(p){if(p instanceof b)return p;Object.isExtensible(p)&&d(p);return n(p)})}if(function(){if(!a||!Object.seal)return!1;try{var l=Object.seal({}),n=Object.seal({}),p=new a([[l,2],[n,3]]);if(2!=p.get(l)||3!=p.get(n))return!1;p.delete(l);p.set(n,4);return!p.has(l)&&4==p.get(n)}catch(r){return!1}}())return a;
var g="$jscomp_hidden_"+Math.random();e("freeze");e("preventExtensions");e("seal");var h=0,k=function(l){this.id_=(h+=Math.random()+1).toString();if(l){l=ja(l);for(var n;!(n=l.next()).done;)n=n.value,this.set(n[0],n[1])}};k.prototype.set=function(l,n){if(!c(l))throw Error("Invalid WeakMap key");d(l);if(!ta(l,g))throw Error("WeakMap key fail: "+l);l[g][this.id_]=n;return this};k.prototype.get=function(l){return c(l)&&ta(l,g)?l[g][this.id_]:void 0};k.prototype.has=function(l){return c(l)&&ta(l,g)&&
ta(l[g],this.id_)};k.prototype.delete=function(l){return c(l)&&ta(l,g)&&ta(l[g],this.id_)?delete l[g][this.id_]:!1};return k});
ea("Map",function(a){if(function(){if(!a||"function"!=typeof a||!a.prototype.entries||"function"!=typeof Object.seal)return!1;try{var k=Object.seal({x:4}),l=new a(ja([[k,"s"]]));if("s"!=l.get(k)||1!=l.size||l.get({x:4})||l.set({x:4},"t")!=l||2!=l.size)return!1;var n=l.entries(),p=n.next();if(p.done||p.value[0]!=k||"s"!=p.value[1])return!1;p=n.next();return p.done||4!=p.value[0].x||"t"!=p.value[1]||!n.next().done?!1:!0}catch(r){return!1}}())return a;var b=new WeakMap,c=function(k){this[0]={};this[1]=
g();this.size=0;if(k){k=ja(k);for(var l;!(l=k.next()).done;)l=l.value,this.set(l[0],l[1])}};c.prototype.set=function(k,l){k=0===k?0:k;var n=d(this,k);n.list||(n.list=this[0][n.id]=[]);n.entry?n.entry.value=l:(n.entry={next:this[1],previous:this[1].previous,head:this[1],key:k,value:l},n.list.push(n.entry),this[1].previous.next=n.entry,this[1].previous=n.entry,this.size++);return this};c.prototype.delete=function(k){k=d(this,k);return k.entry&&k.list?(k.list.splice(k.index,1),k.list.length||delete this[0][k.id],
k.entry.previous.next=k.entry.next,k.entry.next.previous=k.entry.previous,k.entry.head=null,this.size--,!0):!1};c.prototype.clear=function(){this[0]={};this[1]=this[1].previous=g();this.size=0};c.prototype.has=function(k){return!!d(this,k).entry};c.prototype.get=function(k){return(k=d(this,k).entry)&&k.value};c.prototype.entries=function(){return e(this,function(k){return[k.key,k.value]})};c.prototype.keys=function(){return e(this,function(k){return k.key})};c.prototype.values=function(){return e(this,
function(k){return k.value})};c.prototype.forEach=function(k,l){for(var n=this.entries(),p;!(p=n.next()).done;)p=p.value,k.call(l,p[1],p[0],this)};c.prototype[Symbol.iterator]=c.prototype.entries;var d=function(k,l){var n=l&&typeof l;"object"==n||"function"==n?b.has(l)?n=b.get(l):(n=""+ ++h,b.set(l,n)):n="p_"+l;var p=k[0][n];if(p&&ta(k[0],n))for(k=0;k<p.length;k++){var r=p[k];if(l!==l&&r.key!==r.key||l===r.key)return{id:n,list:p,index:k,entry:r}}return{id:n,list:p,index:-1,entry:void 0}},e=function(k,
l){var n=k[1];return fa(function(){if(n){for(;n.head!=k[1];)n=n.previous;for(;n.next!=n.head;)return n=n.next,{done:!1,value:l(n)};n=null}return{done:!0,value:void 0}})},g=function(){var k={};return k.previous=k.next=k.head=k},h=0;return c});var ua="function"==typeof Object.assign?Object.assign:function(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(d)for(var e in d)ta(d,e)&&(a[e]=d[e])}return a};ea("Object.assign",function(a){return a||ua});
ea("Array.prototype.find",function(a){return a?a:function(b,c){a:{var d=this;d instanceof String&&(d=String(d));for(var e=d.length,g=0;g<e;g++){var h=d[g];if(b.call(c,h,g,d)){b=h;break a}}b=void 0}return b}});var va=function(a,b,c){if(null==a)throw new TypeError("The 'this' value for String.prototype."+c+" must not be null or undefined");if(b instanceof RegExp)throw new TypeError("First argument to String.prototype."+c+" must not be a regular expression");return a+""};
ea("String.prototype.startsWith",function(a){return a?a:function(b,c){var d=va(this,b,"startsWith");b+="";var e=d.length,g=b.length;c=Math.max(0,Math.min(c|0,d.length));for(var h=0;h<g&&c<e;)if(d[c++]!=b[h++])return!1;return h>=g}});ea("Number.isFinite",function(a){return a?a:function(b){return"number"!==typeof b?!1:!isNaN(b)&&Infinity!==b&&-Infinity!==b}});
var wa=function(a,b){a instanceof String&&(a+="");var c=0,d=!1,e={next:function(){if(!d&&c<a.length){var g=c++;return{value:b(g,a[g]),done:!1}}d=!0;return{done:!0,value:void 0}}};e[Symbol.iterator]=function(){return e};return e};ea("Array.prototype.keys",function(a){return a?a:function(){return wa(this,function(b){return b})}});
ea("Array.from",function(a){return a?a:function(b,c,d){c=null!=c?c:function(k){return k};var e=[],g="undefined"!=typeof Symbol&&Symbol.iterator&&b[Symbol.iterator];if("function"==typeof g){b=g.call(b);for(var h=0;!(g=b.next()).done;)e.push(c.call(d,g.value,h++))}else for(g=b.length,h=0;h<g;h++)e.push(c.call(d,b[h],h));return e}});ea("Array.prototype.values",function(a){return a?a:function(){return wa(this,function(b,c){return c})}});
ea("Array.prototype.entries",function(a){return a?a:function(){return wa(this,function(b,c){return[b,c]})}});ea("Object.is",function(a){return a?a:function(b,c){return b===c?0!==b||1/b===1/c:b!==b&&c!==c}});ea("Array.prototype.includes",function(a){return a?a:function(b,c){var d=this;d instanceof String&&(d=String(d));var e=d.length;c=c||0;for(0>c&&(c=Math.max(c+e,0));c<e;c++){var g=d[c];if(g===b||Object.is(g,b))return!0}return!1}});
ea("String.prototype.includes",function(a){return a?a:function(b,c){return-1!==va(this,b,"includes").indexOf(b,c||0)}});ea("Math.log2",function(a){return a?a:function(b){return Math.log(b)/Math.LN2}});ea("Object.values",function(a){return a?a:function(b){var c=[],d;for(d in b)ta(b,d)&&c.push(b[d]);return c}});ea("Object.entries",function(a){return a?a:function(b){var c=[],d;for(d in b)ta(b,d)&&c.push([d,b[d]]);return c}});/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
var xa=xa||{},m=this||self,ya=function(a){a.instance_=void 0;a.getInstance=function(){return a.instance_?a.instance_:a.instance_=new a}},za=function(a){var b=typeof a;return"object"!=b?b:a?Array.isArray(a)?"array":b:"null"},Aa=function(a){var b=za(a);return"array"==b||"object"==b&&"number"==typeof a.length},q=function(a){var b=typeof a;return"object"==b&&null!=a||"function"==b},Da=function(a){return Object.prototype.hasOwnProperty.call(a,Ba)&&a[Ba]||(a[Ba]=++Ca)},Ba="closure_uid_"+(1E9*Math.random()>>>
0),Ca=0,Ea=function(a,b,c){return a.call.apply(a.bind,arguments)},Fa=function(a,b,c){if(!a)throw Error();if(2<arguments.length){var d=Array.prototype.slice.call(arguments,2);return function(){var e=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(e,d);return a.apply(b,e)}}return function(){return a.apply(b,arguments)}},t=function(a,b,c){t=Function.prototype.bind&&-1!=Function.prototype.bind.toString().indexOf("native code")?Ea:Fa;return t.apply(null,arguments)},Ga=function(a,b){var c=
Array.prototype.slice.call(arguments,1);return function(){var d=c.slice();d.push.apply(d,arguments);return a.apply(this,d)}},u=function(a,b){a=a.split(".");var c=m;a[0]in c||"undefined"==typeof c.execScript||c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)a.length||void 0===b?c=c[d]&&c[d]!==Object.prototype[d]?c[d]:c[d]={}:c[d]=b},v=function(a,b){function c(){}c.prototype=b.prototype;a.superClass_=b.prototype;a.prototype=new c;a.prototype.constructor=a;a.base=function(d,e,g){for(var h=
Array(arguments.length-2),k=2;k<arguments.length;k++)h[k-2]=arguments[k];return b.prototype[e].apply(d,h)}},Ha=function(a){return a};function Ia(a,b){if(Error.captureStackTrace)Error.captureStackTrace(this,Ia);else{var c=Error().stack;c&&(this.stack=c)}a&&(this.message=String(a));void 0!==b&&(this.cause=b)}v(Ia,Error);Ia.prototype.name="CustomError";var Ja;function Ka(a,b){a=a.split("%s");for(var c="",d=a.length-1,e=0;e<d;e++)c+=a[e]+(e<b.length?b[e]:"%s");Ia.call(this,c+a[d])}v(Ka,Ia);Ka.prototype.name="AssertionError";function La(a,b,c,d){var e="Assertion failed";if(c){e+=": "+c;var g=d}else a&&(e+=": "+a,g=b);throw new Ka(""+e,g||[]);}
var x=function(a,b,c){a||La("",null,b,Array.prototype.slice.call(arguments,2));return a},Ma=function(a,b,c){null==a&&La("Expected to exist: %s.",[a],b,Array.prototype.slice.call(arguments,2));return a},Na=function(a,b){throw new Ka("Failure"+(a?": "+a:""),Array.prototype.slice.call(arguments,1));},Oa=function(a,b,c){"number"!==typeof a&&La("Expected number but got %s: %s.",[za(a),a],b,Array.prototype.slice.call(arguments,2));return a},Pa=function(a,b,c){"string"!==typeof a&&La("Expected string but got %s: %s.",
[za(a),a],b,Array.prototype.slice.call(arguments,2));return a},Qa=function(a,b,c){"function"!==typeof a&&La("Expected function but got %s: %s.",[za(a),a],b,Array.prototype.slice.call(arguments,2))},Ra=function(a,b,c){q(a)||La("Expected object but got %s: %s.",[za(a),a],b,Array.prototype.slice.call(arguments,2))},Sa=function(a,b,c){Array.isArray(a)||La("Expected array but got %s: %s.",[za(a),a],b,Array.prototype.slice.call(arguments,2))},Ta=function(a,b,c){q(a)&&1==a.nodeType||La("Expected Element but got %s: %s.",
[za(a),a],b,Array.prototype.slice.call(arguments,2))},Va=function(a,b,c,d){a instanceof b||La("Expected instanceof %s but got %s.",[Ua(b),Ua(a)],c,Array.prototype.slice.call(arguments,3))};function Ua(a){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};var Wa=Array.prototype.indexOf?function(a,b){x(null!=a.length);return Array.prototype.indexOf.call(a,b,void 0)}:function(a,b){if("string"===typeof a)return"string"!==typeof b||1!=b.length?-1:a.indexOf(b,0);for(var c=0;c<a.length;c++)if(c in a&&a[c]===b)return c;return-1},Xa=Array.prototype.forEach?function(a,b,c){x(null!=a.length);Array.prototype.forEach.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,g=0;g<d;g++)g in e&&b.call(c,e[g],g,a)},Ya=Array.prototype.map?
function(a,b,c){x(null!=a.length);return Array.prototype.map.call(a,b,c)}:function(a,b,c){for(var d=a.length,e=Array(d),g="string"===typeof a?a.split(""):a,h=0;h<d;h++)h in g&&(e[h]=b.call(c,g[h],h,a));return e},Za=Array.prototype.some?function(a,b,c){x(null!=a.length);return Array.prototype.some.call(a,b,c)}:function(a,b,c){for(var d=a.length,e="string"===typeof a?a.split(""):a,g=0;g<d;g++)if(g in e&&b.call(c,e[g],g,a))return!0;return!1},$a=Array.prototype.every?function(a,b){x(null!=a.length);return Array.prototype.every.call(a,
b,void 0)}:function(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&!b.call(void 0,d[e],e,a))return!1;return!0};function ab(a,b){b=bb(a,b);return 0>b?null:"string"===typeof a?a.charAt(b):a[b]}function bb(a,b){for(var c=a.length,d="string"===typeof a?a.split(""):a,e=0;e<c;e++)if(e in d&&b.call(void 0,d[e],e,a))return e;return-1}function cb(a,b){return 0<=Wa(a,b)}function eb(a){if(!Array.isArray(a))for(var b=a.length-1;0<=b;b--)delete a[b];a.length=0}
function fb(a,b){b=Wa(a,b);var c;if(c=0<=b)x(null!=a.length),Array.prototype.splice.call(a,b,1);return c}function gb(a){var b=a.length;if(0<b){for(var c=Array(b),d=0;d<b;d++)c[d]=a[d];return c}return[]}function hb(a,b){for(var c=1;c<arguments.length;c++){var d=arguments[c];if(Aa(d)){var e=a.length||0,g=d.length||0;a.length=e+g;for(var h=0;h<g;h++)a[e+h]=d[h]}else a.push(d)}}function ib(a,b,c,d){x(null!=a.length);Array.prototype.splice.apply(a,jb(arguments,1))}
function jb(a,b,c){x(null!=a.length);return 2>=arguments.length?Array.prototype.slice.call(a,b):Array.prototype.slice.call(a,b,c)}function kb(a,b,c){if(!Aa(a)||!Aa(b)||a.length!=b.length)return!1;var d=a.length;c=c||lb;for(var e=0;e<d;e++)if(!c(a[e],b[e]))return!1;return!0}function lb(a,b){return a===b};var mb=Object.freeze||function(a){return a};function nb(a){a&&"function"==typeof a.dispose&&a.dispose()};var y=function(){this.disposed_=this.disposed_;this.onDisposeCallbacks_=this.onDisposeCallbacks_};y.prototype.disposed_=!1;y.prototype.dispose=function(){this.disposed_||(this.disposed_=!0,this.disposeInternal())};var ob=function(a,b){b=Ga(nb,b);a.disposed_?b():(a.onDisposeCallbacks_||(a.onDisposeCallbacks_=[]),a.onDisposeCallbacks_.push(b))};y.prototype.disposeInternal=function(){if(this.onDisposeCallbacks_)for(;this.onDisposeCallbacks_.length;)this.onDisposeCallbacks_.shift()()};var pb=function(a,b){this.type=a;this.currentTarget=this.target=b;this.defaultPrevented=this.propagationStopped_=!1};pb.prototype.stopPropagation=function(){this.propagationStopped_=!0};pb.prototype.preventDefault=function(){this.defaultPrevented=!0};var qb="PointerEvent"in m,rb=function(){if(!m.addEventListener||!Object.defineProperty)return!1;var a=!1,b=Object.defineProperty({},"passive",{get:function(){a=!0}});try{var c=function(){};m.addEventListener("test",c,b);m.removeEventListener("test",c,b)}catch(d){}return a}();var sb,tb;a:{for(var ub=["CLOSURE_FLAGS"],vb=m,wb=0;wb<ub.length;wb++)if(vb=vb[ub[wb]],null==vb){tb=null;break a}tb=vb}var xb=tb&&tb[610401301];sb=null!=xb?xb:!1;var yb=function(a){return/^[\s\xa0]*$/.test(a)},zb=String.prototype.trim?function(a){return a.trim()}:function(a){return/^[\s\xa0]*([\s\S]*?)[\s\xa0]*$/.exec(a)[1]},Hb=function(a){if(!Ab.test(a))return a;-1!=a.indexOf("&")&&(a=a.replace(Bb,"&"));-1!=a.indexOf("<")&&(a=a.replace(Cb,"<"));-1!=a.indexOf(">")&&(a=a.replace(Db,">"));-1!=a.indexOf('"')&&(a=a.replace(Eb,"""));-1!=a.indexOf("'")&&(a=a.replace(Fb,"'"));-1!=a.indexOf("\x00")&&(a=a.replace(Gb,"�"));return a},Bb=/&/g,Cb=
/</g,Db=/>/g,Eb=/"/g,Fb=/'/g,Gb=/\x00/g,Ab=/[\x00&<>"']/,Ib=function(a,b){return-1!=a.indexOf(b)},Kb=function(a,b){var c=0;a=zb(String(a)).split(".");b=zb(String(b)).split(".");for(var d=Math.max(a.length,b.length),e=0;0==c&&e<d;e++){var g=a[e]||"",h=b[e]||"";do{g=/(\d*)(\D*)(.*)/.exec(g)||["","","",""];h=/(\d*)(\D*)(.*)/.exec(h)||["","","",""];if(0==g[0].length&&0==h[0].length)break;c=Jb(0==g[1].length?0:parseInt(g[1],10),0==h[1].length?0:parseInt(h[1],10))||Jb(0==g[2].length,0==h[2].length)||Jb(g[2],
h[2]);g=g[3];h=h[3]}while(0==c)}return c},Jb=function(a,b){return a<b?-1:a>b?1:0};function Lb(){var a=m.navigator;return a&&(a=a.userAgent)?a:""}var Mb,Nb=m.navigator;Mb=Nb?Nb.userAgentData||null:null;function Ob(a){return sb?Mb?Mb.brands.some(function(b){return(b=b.brand)&&Ib(b,a)}):!1:!1}function z(a){return Ib(Lb(),a)};function Pb(){return sb?!!Mb&&0<Mb.brands.length:!1}function Qb(){return Pb()?!1:z("Opera")}function Rb(){return Pb()?!1:z("Trident")||z("MSIE")}function Sb(){return Pb()?!1:z("Edge")}function Tb(){return Pb()?Ob("Microsoft Edge"):z("Edg/")}function Ub(){return z("Firefox")||z("FxiOS")}function Vb(){return Pb()?Ob("Chromium"):(z("Chrome")||z("CriOS"))&&!Sb()||z("Silk")}
function Wb(a){var b={};a.forEach(function(c){b[c[0]]=c[1]});return function(c){return b[c.find(function(d){return d in b})]||""}}
function Xb(){var a=Lb();if(Rb()){var b=/rv: *([\d\.]*)/.exec(a);if(b&&b[1])a=b[1];else{b="";var c=/MSIE +([\d\.]+)/.exec(a);if(c&&c[1])if(a=/Trident\/(\d.\d)/.exec(a),"7.0"==c[1])if(a&&a[1])switch(a[1]){case "4.0":b="8.0";break;case "5.0":b="9.0";break;case "6.0":b="10.0";break;case "7.0":b="11.0"}else b="7.0";else b=c[1];a=b}return a}c=RegExp("([A-Z][\\w ]+)/([^\\s]+)\\s*(?:\\((.*?)\\))?","g");b=[];for(var d;d=c.exec(a);)b.push([d[1],d[2],d[3]||void 0]);a=Wb(b);return Qb()?a(["Version","Opera"]):
Sb()?a(["Edge"]):Tb()?a(["Edg"]):z("Silk")?a(["Silk"]):Vb()?a(["Chrome","CriOS","HeadlessChrome"]):(a=b[2])&&a[1]||""};function Yb(){return sb?!!Mb&&!!Mb.platform:!1}function Zb(){return z("iPhone")&&!z("iPod")&&!z("iPad")}function $b(){return Zb()||z("iPad")||z("iPod")}function ac(){return Yb()?"macOS"===Mb.platform:z("Macintosh")}function bc(){return Yb()?"Windows"===Mb.platform:z("Windows")};var cc=function(a){cc[" "](a);return a};cc[" "]=function(){};var dc=function(a,b){try{return cc(a[b]),!0}catch(c){}return!1};var ec=Qb(),B=Rb(),fc=z("Edge"),gc=fc||B,C=z("Gecko")&&!(Ib(Lb().toLowerCase(),"webkit")&&!z("Edge"))&&!(z("Trident")||z("MSIE"))&&!z("Edge"),hc=Ib(Lb().toLowerCase(),"webkit")&&!z("Edge"),ic=hc&&z("Mobile"),jc=ac(),kc=bc(),lc=Yb()?"Android"===Mb.platform:z("Android"),mc=Zb(),nc=z("iPad"),oc=z("iPod"),pc=$b(),qc=function(){var a=m.document;return a?a.documentMode:void 0},rc;
a:{var sc="",tc=function(){var a=Lb();if(C)return/rv:([^\);]+)(\)|;)/.exec(a);if(fc)return/Edge\/([\d\.]+)/.exec(a);if(B)return/\b(?:MSIE|rv)[: ]([^\);]+)(\)|;)/.exec(a);if(hc)return/WebKit\/(\S+)/.exec(a);if(ec)return/(?:Version)[ \/]?(\S+)/.exec(a)}();tc&&(sc=tc?tc[1]:"");if(B){var uc=qc();if(null!=uc&&uc>parseFloat(sc)){rc=String(uc);break a}}rc=sc}var vc=rc,wc;if(m.document&&B){var xc=qc();wc=xc?xc:parseInt(vc,10)||void 0}else wc=void 0;var yc=wc;var Ac=function(a,b){pb.call(this,a?a.type:"");this.relatedTarget=this.currentTarget=this.target=null;this.button=this.screenY=this.screenX=this.clientY=this.clientX=this.offsetY=this.offsetX=0;this.key="";this.charCode=this.keyCode=0;this.metaKey=this.shiftKey=this.altKey=this.ctrlKey=!1;this.state=null;this.platformModifierKey=!1;this.pointerId=0;this.pointerType="";this.timeStamp=0;this.event_=null;if(a){var c=this.type=a.type,d=a.changedTouches&&a.changedTouches.length?a.changedTouches[0]:null;
this.target=a.target||a.srcElement;this.currentTarget=b;(b=a.relatedTarget)?C&&(dc(b,"nodeName")||(b=null)):"mouseover"==c?b=a.fromElement:"mouseout"==c&&(b=a.toElement);this.relatedTarget=b;d?(this.clientX=void 0!==d.clientX?d.clientX:d.pageX,this.clientY=void 0!==d.clientY?d.clientY:d.pageY,this.screenX=d.screenX||0,this.screenY=d.screenY||0):(this.offsetX=hc||void 0!==a.offsetX?a.offsetX:a.layerX,this.offsetY=hc||void 0!==a.offsetY?a.offsetY:a.layerY,this.clientX=void 0!==a.clientX?a.clientX:a.pageX,
this.clientY=void 0!==a.clientY?a.clientY:a.pageY,this.screenX=a.screenX||0,this.screenY=a.screenY||0);this.button=a.button;this.keyCode=a.keyCode||0;this.key=a.key||"";this.charCode=a.charCode||("keypress"==c?a.keyCode:0);this.ctrlKey=a.ctrlKey;this.altKey=a.altKey;this.shiftKey=a.shiftKey;this.metaKey=a.metaKey;this.platformModifierKey=jc?a.metaKey:a.ctrlKey;this.pointerId=a.pointerId||0;this.pointerType="string"===typeof a.pointerType?a.pointerType:zc[a.pointerType]||"";this.state=a.state;this.timeStamp=
a.timeStamp;this.event_=a;a.defaultPrevented&&Ac.superClass_.preventDefault.call(this)}};v(Ac,pb);var zc=mb({2:"touch",3:"pen",4:"mouse"});Ac.prototype.stopPropagation=function(){Ac.superClass_.stopPropagation.call(this);this.event_.stopPropagation?this.event_.stopPropagation():this.event_.cancelBubble=!0};Ac.prototype.preventDefault=function(){Ac.superClass_.preventDefault.call(this);var a=this.event_;a.preventDefault?a.preventDefault():a.returnValue=!1};var Bc="closure_listenable_"+(1E6*Math.random()|0),Cc=function(a){return!(!a||!a[Bc])};var Dc=0;var Ec=function(a,b,c,d,e){this.listener=a;this.proxy=null;this.src=b;this.type=c;this.capture=!!d;this.handler=e;this.key=++Dc;this.removed=this.callOnce=!1},Fc=function(a){a.removed=!0;a.listener=null;a.proxy=null;a.src=null;a.handler=null};function Gc(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function Hc(a,b){for(var c in a)if(b.call(void 0,a[c],c,a))return!0;return!1}function Ic(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function Jc(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}function Kc(a,b){for(var c in a)if(a[c]==b)return!0;return!1}function Lc(a,b){a:{for(var c in a)if(b.call(void 0,a[c],c,a)){b=c;break a}b=void 0}return b&&a[b]}function Mc(){var a=Nc,b;for(b in a)return!1;return!0}
function Oc(a,b,c){if(null!==a&&b in a)throw Error('The object already contains the key "'+b+'"');a[b]=c}function Pc(a){var b={},c;for(c in a)b[c]=a[c];return b}var Qc="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" ");function Rc(a,b){for(var c,d,e=1;e<arguments.length;e++){d=arguments[e];for(c in d)a[c]=d[c];for(var g=0;g<Qc.length;g++)c=Qc[g],Object.prototype.hasOwnProperty.call(d,c)&&(a[c]=d[c])}}
function Sc(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return Sc.apply(null,arguments[0]);if(b%2)throw Error("Uneven number of arguments");for(var c={},d=0;d<b;d+=2)c[arguments[d]]=arguments[d+1];return c}function Tc(a){var b=arguments.length;if(1==b&&Array.isArray(arguments[0]))return Tc.apply(null,arguments[0]);for(var c={},d=0;d<b;d++)c[arguments[d]]=!0;return c};var Uc=function(a){this.src=a;this.listeners={};this.typeCount_=0};Uc.prototype.add=function(a,b,c,d,e){var g=a.toString();a=this.listeners[g];a||(a=this.listeners[g]=[],this.typeCount_++);var h=Vc(a,b,d,e);-1<h?(b=a[h],c||(b.callOnce=!1)):(b=new Ec(b,this.src,g,!!d,e),b.callOnce=c,a.push(b));return b};
Uc.prototype.remove=function(a,b,c,d){a=a.toString();if(!(a in this.listeners))return!1;var e=this.listeners[a];b=Vc(e,b,c,d);return-1<b?(Fc(e[b]),x(null!=e.length),Array.prototype.splice.call(e,b,1),0==e.length&&(delete this.listeners[a],this.typeCount_--),!0):!1};var Wc=function(a,b){var c=b.type;c in a.listeners&&fb(a.listeners[c],b)&&(Fc(b),0==a.listeners[c].length&&(delete a.listeners[c],a.typeCount_--))};
Uc.prototype.removeAll=function(a){a=a&&a.toString();var b=0,c;for(c in this.listeners)if(!a||c==a){for(var d=this.listeners[c],e=0;e<d.length;e++)++b,Fc(d[e]);delete this.listeners[c];this.typeCount_--}return b};Uc.prototype.getListeners=function(a,b){a=this.listeners[a.toString()];var c=[];if(a)for(var d=0;d<a.length;++d){var e=a[d];e.capture==b&&c.push(e)}return c};Uc.prototype.getListener=function(a,b,c,d){a=this.listeners[a.toString()];var e=-1;a&&(e=Vc(a,b,c,d));return-1<e?a[e]:null};
Uc.prototype.hasListener=function(a,b){var c=void 0!==a,d=c?a.toString():"",e=void 0!==b;return Hc(this.listeners,function(g){for(var h=0;h<g.length;++h)if(!(c&&g[h].type!=d||e&&g[h].capture!=b))return!0;return!1})};var Vc=function(a,b,c,d){for(var e=0;e<a.length;++e){var g=a[e];if(!g.removed&&g.listener==b&&g.capture==!!c&&g.handler==d)return e}return-1};var Xc="closure_lm_"+(1E6*Math.random()|0),Yc={},Zc=0,ad=function(a,b,c,d,e){if(d&&d.once)return $c(a,b,c,d,e);if(Array.isArray(b)){for(var g=0;g<b.length;g++)ad(a,b[g],c,d,e);return null}c=bd(c);return Cc(a)?a.listen(b,c,q(d)?!!d.capture:!!d,e):cd(a,b,c,!1,d,e)},cd=function(a,b,c,d,e,g){if(!b)throw Error("Invalid event type");var h=q(e)?!!e.capture:!!e,k=dd(a);k||(a[Xc]=k=new Uc(a));c=k.add(b,c,d,h,g);if(c.proxy)return c;d=ed();c.proxy=d;d.src=a;d.listener=c;if(a.addEventListener)rb||(e=h),void 0===
e&&(e=!1),a.addEventListener(b.toString(),d,e);else if(a.attachEvent)a.attachEvent(fd(b.toString()),d);else if(a.addListener&&a.removeListener)x("change"===b,"MediaQueryList only has a change event"),a.addListener(d);else throw Error("addEventListener and attachEvent are unavailable.");Zc++;return c},ed=function(){var a=gd,b=function(c){return a.call(b.src,b.listener,c)};return b},$c=function(a,b,c,d,e){if(Array.isArray(b)){for(var g=0;g<b.length;g++)$c(a,b[g],c,d,e);return null}c=bd(c);return Cc(a)?
a.listenOnce(b,c,q(d)?!!d.capture:!!d,e):cd(a,b,c,!0,d,e)},hd=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)hd(a,b[g],c,d,e);else d=q(d)?!!d.capture:!!d,c=bd(c),Cc(a)?a.unlisten(b,c,d,e):a&&(a=dd(a))&&(b=a.getListener(b,c,d,e))&&id(b)},id=function(a){if("number"!==typeof a&&a&&!a.removed){var b=a.src;if(Cc(b))Wc(b.eventTargetListeners_,a);else{var c=a.type,d=a.proxy;b.removeEventListener?b.removeEventListener(c,d,a.capture):b.detachEvent?b.detachEvent(fd(c),d):b.addListener&&
b.removeListener&&b.removeListener(d);Zc--;(c=dd(b))?(Wc(c,a),0==c.typeCount_&&(c.src=null,b[Xc]=null)):Fc(a)}}},fd=function(a){return a in Yc?Yc[a]:Yc[a]="on"+a},gd=function(a,b){if(a.removed)a=!0;else{b=new Ac(b,this);var c=a.listener,d=a.handler||a.src;a.callOnce&&id(a);a=c.call(d,b)}return a},dd=function(a){a=a[Xc];return a instanceof Uc?a:null},jd="__closure_events_fn_"+(1E9*Math.random()>>>0),bd=function(a){x(a,"Listener can not be null.");if("function"===typeof a)return a;x(a.handleEvent,"An object listener must have handleEvent method.");
a[jd]||(a[jd]=function(b){return a.handleEvent(b)});return a[jd]};function kd(){};var ld=function(a,b){this.limit_=100;this.create_=a;this.reset_=b;this.occupants_=0;this.head_=null};ld.prototype.get=function(){if(0<this.occupants_){this.occupants_--;var a=this.head_;this.head_=a.next;a.next=null}else a=this.create_();return a};ld.prototype.put=function(a){this.reset_(a);this.occupants_<this.limit_&&(this.occupants_++,a.next=this.head_,this.head_=a)};var md=function(){},nd=function(a){return a},od=function(a){var b=!1,c;return function(){b||(c=a(),b=!0);return c}};var pd={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0};var qd;var td=function(a,b){this.stringConstValueWithSecurityContract__googStringSecurityPrivate_=a===rd&&b||"";this.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_=sd};td.prototype.toString=function(){return this.stringConstValueWithSecurityContract__googStringSecurityPrivate_};
var ud=function(a){if(a instanceof td&&a.constructor===td&&a.STRING_CONST_TYPE_MARKER__GOOG_STRING_SECURITY_PRIVATE_===sd)return a.stringConstValueWithSecurityContract__googStringSecurityPrivate_;Na("expected object of type Const, got '"+a+"'");return"type_error:Const"},sd={},rd={};var wd=function(a,b){if(b!==vd)throw Error("TrustedResourceUrl is not meant to be built directly");this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_=a};wd.prototype.toString=function(){return this.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_+""};
var xd=function(a){if(a instanceof wd&&a.constructor===wd)return a.privateDoNotAccessOrElseTrustedResourceUrlWrappedValue_;Na("expected object of type TrustedResourceUrl, got '%s' of type %s",a,za(a));return"type_error:TrustedResourceUrl"},vd={};var zd=function(a,b){if(b!==yd)throw Error("SafeUrl is not meant to be built directly");this.privateDoNotAccessOrElseSafeUrlWrappedValue_=a};zd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeUrlWrappedValue_.toString()};
var Ad=function(a){if(a instanceof zd&&a.constructor===zd)return a.privateDoNotAccessOrElseSafeUrlWrappedValue_;Na("expected object of type SafeUrl, got '"+a+"' of type "+za(a));return"type_error:SafeUrl"},Bd=/^data:(.*);base64,[a-z0-9+\/]+=*$/i,Cd=/^(?:(?:https?|mailto|ftp):|[^:/?#]*(?:[/?#]|$))/i,Dd=function(a){if(a instanceof zd)return a;a=String(a);Cd.test(a)?a=new zd(a,yd):(a=String(a).replace(/(%0A|%0D)/g,""),a=a.match(Bd)?new zd(a,yd):null);return a},yd={},Ed=new zd("about:invalid#zClosurez",
yd);new zd("about:blank",yd);var Fd={},Gd=function(a,b){if(b!==Fd)throw Error("SafeStyle is not meant to be built directly");this.privateDoNotAccessOrElseSafeStyleWrappedValue_=a};Gd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeStyleWrappedValue_.toString()};var Hd=function(a){if(a instanceof Gd&&a.constructor===Gd)return a.privateDoNotAccessOrElseSafeStyleWrappedValue_;Na("expected object of type SafeStyle, got '"+a+"' of type "+za(a));return"type_error:SafeStyle"},Id=new Gd("",Fd);
function Jd(a){if(a instanceof zd)return'url("'+Ad(a).replace(/</g,"%3c").replace(/[\\"]/g,"\\$&")+'")';a=a instanceof td?ud(a):Kd(String(a));if(/[{;}]/.test(a))throw new Ka("Value does not allow [{;}], got: %s.",[a]);return a}
function Kd(a){var b=a.replace(Ld,"$1").replace(Ld,"$1").replace(Md,"url");if(Nd.test(b)){if(Od.test(a))return Na("String value disallows comments, got: "+a),"zClosurez";for(var c=b=!0,d=0;d<a.length;d++){var e=a.charAt(d);"'"==e&&c?b=!b:'"'==e&&b&&(c=!c)}if(!b||!c)return Na("String value requires balanced quotes, got: "+a),"zClosurez";if(!Pd(a))return Na("String value requires balanced square brackets and one identifier per pair of brackets, got: "+a),"zClosurez"}else return Na("String value allows only [-+,.\"'%_!#/ a-zA-Z0-9\\[\\]] and simple functions, got: "+
a),"zClosurez";return Qd(a)}function Pd(a){for(var b=!0,c=/^[-_a-zA-Z0-9]$/,d=0;d<a.length;d++){var e=a.charAt(d);if("]"==e){if(b)return!1;b=!0}else if("["==e){if(!b)return!1;b=!1}else if(!b&&!c.test(e))return!1}return b}
var Nd=RegExp("^[-+,.\"'%_!#/ a-zA-Z0-9\\[\\]]+$"),Md=RegExp("\\b(url\\([ \t\n]*)('[ -&(-\\[\\]-~]*'|\"[ !#-\\[\\]-~]*\"|[!#-&*-\\[\\]-~]*)([ \t\n]*\\))","g"),Ld=RegExp("\\b(calc|cubic-bezier|fit-content|hsl|hsla|linear-gradient|matrix|minmax|radial-gradient|repeat|rgb|rgba|(rotate|scale|translate)(X|Y|Z|3d)?|steps|var)\\([-+*/0-9a-zA-Z.%#\\[\\], ]+\\)","g"),Od=/\/\*/;
function Qd(a){return a.replace(Md,function(b,c,d,e){var g="";d=d.replace(/^(['"])(.*)\1$/,function(h,k,l){g=k;return l});b=(Dd(d)||Ed).toString();return c+g+b+g+e})};var Rd={},Sd=function(){if(Rd!==Rd)throw Error("SafeStyleSheet is not meant to be built directly");this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_=""};Sd.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeStyleSheetWrappedValue_.toString()};new Sd;var Td={},Ud=function(a,b){if(b!==Td)throw Error("SafeHtml is not meant to be built directly");this.privateDoNotAccessOrElseSafeHtmlWrappedValue_=a};Ud.prototype.toString=function(){return this.privateDoNotAccessOrElseSafeHtmlWrappedValue_.toString()};
var Vd=function(a){if(a instanceof Ud&&a.constructor===Ud)return a.privateDoNotAccessOrElseSafeHtmlWrappedValue_;Na("expected object of type SafeHtml, got '"+a+"' of type "+za(a));return"type_error:SafeHtml"},Xd=function(a){return a instanceof Ud?a:Wd(Hb(String(a)))},Zd=function(a){var b=Xd(Yd),c=[],d=function(e){Array.isArray(e)?e.forEach(d):(e=Xd(e),c.push(Vd(e).toString()))};a.forEach(d);return Wd(c.join(Vd(b).toString()))},$d=function(a){return Zd(Array.prototype.slice.call(arguments))},Wd=function(a){if(void 0===
qd){var b=null;var c=m.trustedTypes;if(c&&c.createPolicy)try{b=c.createPolicy("goog#html",{createHTML:Ha,createScript:Ha,createScriptURL:Ha})}catch(d){m.console&&m.console.error(d.message)}qd=b}a=(b=qd)?b.createHTML(a):a;return new Ud(a,Td)},ae=/^[a-zA-Z0-9-]+$/,be={action:!0,cite:!0,data:!0,formaction:!0,href:!0,manifest:!0,poster:!0,src:!0},ce={APPLET:!0,BASE:!0,EMBED:!0,IFRAME:!0,LINK:!0,MATH:!0,META:!0,OBJECT:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},Yd=new Ud(m.trustedTypes&&m.trustedTypes.emptyHTML||
"",Td);/*
SPDX-License-Identifier: Apache-2.0
*/
var de={};function ee(a){if("string"!==typeof a||""===a.trim())throw Error("Calls to uncheckedconversion functions must go through security review. A justification must be provided to capture what security assumptions are being made. See go/unchecked-conversions");};var fe={MATH:!0,SCRIPT:!0,STYLE:!0,SVG:!0,TEMPLATE:!0},ge=od(function(){if("undefined"===typeof document)return!1;var a=document.createElement("div"),b=document.createElement("div");b.appendChild(document.createElement("div"));a.appendChild(b);if(!a.firstChild)return!1;b=a.firstChild.firstChild;a.innerHTML=Vd(Yd);return!b.parentElement}),he=function(a,b){if(ge())for(;a.lastChild;)a.removeChild(a.lastChild);a.innerHTML=Vd(b)},ie=function(a,b){if(a.tagName&&fe[a.tagName.toUpperCase()])throw Error("goog.dom.safe.setInnerHtml cannot be used to set content of "+
a.tagName+".");he(a,b)};var E=function(a,b){this.x=void 0!==a?a:0;this.y=void 0!==b?b:0};E.prototype.clone=function(){return new E(this.x,this.y)};E.prototype.toString=function(){return"("+this.x+", "+this.y+")"};E.prototype.equals=function(a){return a instanceof E&&je(this,a)};var je=function(a,b){return a==b?!0:a&&b?a.x==b.x&&a.y==b.y:!1},ke=function(a,b){return new E(a.x-b.x,a.y-b.y)};f=E.prototype;f.ceil=function(){this.x=Math.ceil(this.x);this.y=Math.ceil(this.y);return this};
f.floor=function(){this.x=Math.floor(this.x);this.y=Math.floor(this.y);return this};f.round=function(){this.x=Math.round(this.x);this.y=Math.round(this.y);return this};f.translate=function(a,b){a instanceof E?(this.x+=a.x,this.y+=a.y):(this.x+=Number(a),"number"===typeof b&&(this.y+=b));return this};f.scale=function(a,b){this.x*=a;this.y*="number"===typeof b?b:a;return this};var le=function(a,b){this.width=a;this.height=b};f=le.prototype;f.clone=function(){return new le(this.width,this.height)};f.toString=function(){return"("+this.width+" x "+this.height+")"};f.aspectRatio=function(){return this.width/this.height};f.ceil=function(){this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.scale=function(a,b){this.width*=a;this.height*="number"===typeof b?b:a;return this};var me=function(a){return a.replace(/[\t\r\n ]+/g," ").replace(/^[\t\r\n ]+|[\t\r\n ]+$/g,"")},pe=function(a){return Ib(a,"&")?"document"in m?ne(a):oe(a):a},ne=function(a){var b={"&":"&","<":"<",">":">",""":'"'};var c=m.document.createElement("div");return a.replace(qe,function(d,e){var g=b[d];if(g)return g;"#"==e.charAt(0)&&(e=Number("0"+e.slice(1)),isNaN(e)||(g=String.fromCharCode(e)));g||(g=d+" ",ee("Single HTML entity."),g=Wd(g),ie(c,g),g=c.firstChild.nodeValue.slice(0,-1));return b[d]=
g})},oe=function(a){return a.replace(/&([^;]+);/g,function(b,c){switch(c){case "amp":return"&";case "lt":return"<";case "gt":return">";case "quot":return'"';default:return"#"!=c.charAt(0)||(c=Number("0"+c.slice(1)),isNaN(c))?b:String.fromCharCode(c)}})},qe=/&([^;\s<&]+);?/g,re=function(a){return String(a).replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")},se=String.prototype.repeat?function(a,b){return a.repeat(b)}:function(a,b){return Array(b+1).join(a)},te=function(a){return null==
a?"":String(a)},ue=function(a){return String(a).replace(/\-([a-z])/g,function(b,c){return c.toUpperCase()})},ve=function(a){return a.replace(RegExp("(^|[\\s]+)([a-z])","g"),function(b,c,d){return c+d.toUpperCase()})};var ye=function(a){return a?new we(xe(a)):Ja||(Ja=new we)},Ae=function(a,b){var c=b||document;return c.querySelectorAll&&c.querySelector?c.querySelectorAll("."+a):ze(document,"*",a,b)},Be=function(a,b){var c=b||document;if(c.getElementsByClassName)a=c.getElementsByClassName(a)[0];else{c=document;var d=b||c;a=d.querySelectorAll&&d.querySelector&&a?d.querySelector(a?"."+a:""):ze(c,"*",a,b)[0]||null}return a||null},ze=function(a,b,c,d){a=d||a;b=b&&"*"!=b?String(b).toUpperCase():"";if(a.querySelectorAll&&
a.querySelector&&(b||c))return a.querySelectorAll(b+(c?"."+c:""));if(c&&a.getElementsByClassName){a=a.getElementsByClassName(c);if(b){d={};for(var e=0,g=0,h;h=a[g];g++)b==h.nodeName&&(d[e++]=h);d.length=e;return d}return a}a=a.getElementsByTagName(b||"*");if(c){d={};for(g=e=0;h=a[g];g++)b=h.className,"function"==typeof b.split&&cb(b.split(/\s+/),c)&&(d[e++]=h);d.length=e;return d}return a},De=function(a,b){Gc(b,function(c,d){"style"==d?a.style.cssText=c:"class"==d?a.className=c:"for"==d?a.htmlFor=
c:Ce.hasOwnProperty(d)?a.setAttribute(Ce[d],c):0==d.lastIndexOf("aria-",0)||0==d.lastIndexOf("data-",0)?a.setAttribute(d,c):a[d]=c})},Ce={cellpadding:"cellPadding",cellspacing:"cellSpacing",colspan:"colSpan",frameborder:"frameBorder",height:"height",maxlength:"maxLength",nonce:"nonce",role:"role",rowspan:"rowSpan",type:"type",usemap:"useMap",valign:"vAlign",width:"width"},Fe=function(a){a=a.document;a=Ee(a)?a.documentElement:a.body;return new le(a.clientWidth,a.clientHeight)},Ie=function(a){var b=
Ge(a);a=He(a);return B&&a.pageYOffset!=b.scrollTop?new E(b.scrollLeft,b.scrollTop):new E(a.pageXOffset||b.scrollLeft,a.pageYOffset||b.scrollTop)},Ge=function(a){return a.scrollingElement?a.scrollingElement:!hc&&Ee(a)?a.documentElement:a.body||a.documentElement},He=function(a){return a.parentWindow||a.defaultView},Ke=function(a,b,c){return Je(document,arguments)},Je=function(a,b){var c=b[1],d=Le(a,String(b[0]));c&&("string"===typeof c?d.className=c:Array.isArray(c)?d.className=c.join(" "):De(d,c));
2<b.length&&Me(a,d,b,2);return d},Me=function(a,b,c,d){function e(k){k&&b.appendChild("string"===typeof k?a.createTextNode(k):k)}for(;d<c.length;d++){var g=c[d];if(!Aa(g)||q(g)&&0<g.nodeType)e(g);else{a:{if(g&&"number"==typeof g.length){if(q(g)){var h="function"==typeof g.item||"string"==typeof g.item;break a}if("function"===typeof g){h="function"==typeof g.item;break a}}h=!1}Xa(h?gb(g):g,e)}}},Le=function(a,b){b=String(b);"application/xhtml+xml"===a.contentType&&(b=b.toLowerCase());return a.createElement(b)},
Ee=function(a){return"CSS1Compat"==a.compatMode},Ne=function(a,b){x(null!=a&&null!=b,"goog.dom.appendChild expects non-null arguments");a.appendChild(b)},Oe=function(a,b){Me(xe(a),a,arguments,1)},Pe=function(a){for(var b;b=a.firstChild;)a.removeChild(b)},Qe=function(a){return a&&a.parentNode?a.parentNode.removeChild(a):null},Re=function(a){return void 0!=a.children?a.children:Array.prototype.filter.call(a.childNodes,function(b){return 1==b.nodeType})},Te=function(a){return void 0!==a.firstElementChild?
a.firstElementChild:Se(a.firstChild)},Se=function(a){for(;a&&1!=a.nodeType;)a=a.nextSibling;return a},Ue=function(a){return q(a)&&1==a.nodeType},Ve=function(a,b){if(!a||!b)return!1;if(a.contains&&1==b.nodeType)return a==b||a.contains(b);if("undefined"!=typeof a.compareDocumentPosition)return a==b||!!(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a},xe=function(a){x(a,"Node cannot be null or undefined.");return 9==a.nodeType?a:a.ownerDocument||a.document},We=function(a,b){x(null!=
a,"goog.dom.setTextContent expects a non-null value for node");if("textContent"in a)a.textContent=b;else if(3==a.nodeType)a.data=String(b);else if(a.firstChild&&3==a.firstChild.nodeType){for(;a.lastChild!=a.firstChild;)a.removeChild(x(a.lastChild));a.firstChild.data=String(b)}else{Pe(a);var c=xe(a);a.appendChild(c.createTextNode(String(b)))}},Xe={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ye={IMG:" ",BR:"\n"},$e=function(a){return a.hasAttribute("tabindex")&&Ze(a)},af=function(a,b){b?a.tabIndex=0:
(a.tabIndex=-1,a.removeAttribute("tabIndex"))},Ze=function(a){a=a.tabIndex;return"number"===typeof a&&0<=a&&32768>a},cf=function(a){var b=[];bf(a,b,!1);return b.join("")},bf=function(a,b,c){if(!(a.nodeName in Xe))if(3==a.nodeType)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ye)b.push(Ye[a.nodeName]);else for(a=a.firstChild;a;)bf(a,b,c),a=a.nextSibling},df=function(a,b){for(var c=0;a;){x("parentNode"!=a.name);if(b(a))return a;a=a.parentNode;c++}return null},
ef=function(a){try{var b=a&&a.activeElement;return b&&b.nodeName?b:null}catch(c){return null}},we=function(a){this.document_=a||m.document||document};f=we.prototype;f.getDomHelper=ye;f.getElement=function(a){var b=this.document_;return"string"===typeof a?b.getElementById(a):a};f.getElementsByTagName=function(a,b){return(b||this.document_).getElementsByTagName(String(a))};f.getElementByClass=function(a,b){return Be(a,b||this.document_)};
f.getRequiredElementByClass=function(a){var b=Be(a,this.document_);return x(b,"No element found with className: "+a)};f.setProperties=De;f.createDom=function(a,b,c){return Je(this.document_,arguments)};f.createElement=function(a){return Le(this.document_,a)};f.createTextNode=function(a){return this.document_.createTextNode(String(a))};f.appendChild=Ne;f.append=Oe;f.canHaveChildren=function(a){if(1!=a.nodeType)return!1;switch(a.tagName){case "APPLET":case "AREA":case "BASE":case "BR":case "COL":case "COMMAND":case "EMBED":case "FRAME":case "HR":case "IMG":case "INPUT":case "IFRAME":case "ISINDEX":case "KEYGEN":case "LINK":case "NOFRAMES":case "NOSCRIPT":case "META":case "OBJECT":case "PARAM":case "SCRIPT":case "SOURCE":case "STYLE":case "TRACK":case "WBR":return!1}return!0};
f.removeChildren=Pe;f.removeNode=Qe;f.getChildren=Re;f.getFirstElementChild=Te;f.isElement=Ue;f.contains=Ve;
f.isFocusable=function(a){var b;(b="A"==a.tagName&&a.hasAttribute("href")||"INPUT"==a.tagName||"TEXTAREA"==a.tagName||"SELECT"==a.tagName||"BUTTON"==a.tagName?!a.disabled&&(!a.hasAttribute("tabindex")||Ze(a)):$e(a))&&B?(a="function"!==typeof a.getBoundingClientRect||B&&null==a.parentElement?{height:a.offsetHeight,width:a.offsetWidth}:a.getBoundingClientRect(),a=null!=a&&0<a.height&&0<a.width):a=b;return a};var ff,gf=function(){var a=m.MessageChannel;"undefined"===typeof a&&"undefined"!==typeof window&&window.postMessage&&window.addEventListener&&!z("Presto")&&(a=function(){var e=Le(document,"IFRAME");e.style.display="none";document.documentElement.appendChild(e);var g=e.contentWindow;e=g.document;e.open();e.close();var h="callImmediate"+Math.random(),k="file:"==g.location.protocol?"*":g.location.protocol+"//"+g.location.host;e=t(function(l){if(("*"==k||l.origin==k)&&l.data==h)this.port1.onmessage()},
this);g.addEventListener("message",e,!1);this.port1={};this.port2={postMessage:function(){g.postMessage(h,k)}}});if("undefined"!==typeof a&&!Rb()){var b=new a,c={},d=c;b.port1.onmessage=function(){if(void 0!==c.next){c=c.next;var e=c.cb;c.cb=null;e()}};return function(e){d.next={cb:e};d=d.next;b.port2.postMessage(0)}}return function(e){m.setTimeout(e,0)}};function hf(a){m.setTimeout(function(){throw a;},0)};var jf=function(){this.workTail_=this.workHead_=null};jf.prototype.add=function(a,b){var c=kf.get();c.set(a,b);this.workTail_?this.workTail_.next=c:(x(!this.workHead_),this.workHead_=c);this.workTail_=c};jf.prototype.remove=function(){var a=null;this.workHead_&&(a=this.workHead_,this.workHead_=this.workHead_.next,this.workHead_||(this.workTail_=null),a.next=null);return a};var kf=new ld(function(){return new lf},function(a){return a.reset()}),lf=function(){this.next=this.scope=this.fn=null};
lf.prototype.set=function(a,b){this.fn=a;this.scope=b;this.next=null};lf.prototype.reset=function(){this.next=this.scope=this.fn=null};var mf=m.console&&m.console.createTask?m.console.createTask.bind(m.console):void 0,nf=mf?Symbol("consoleTask"):void 0;
function of(a,b){function c(){var k=sa.apply(0,arguments),l=this;return h.run(function(){return a.call.apply(a,[l].concat(ka(k)))})}b=void 0===b?"anonymous":b;if(nf&&a[nf])return a;var d=a,e,g=null==(e=pf)?void 0:e();a=function(){var k=sa.apply(0,arguments),l,n=null==(l=pf)?void 0:l();if(g!==n)throw Error(b+" was scheduled in '"+g+"' but called in '"+n+"'.\nMake sure your test awaits all async calls.\n\nTIP: To help investigate, debug the test in Chrome and look at the async portion\nof the call stack to see what originally scheduled the callback. Then, make the\ntest wait for the relevant asynchronous work to finish.");return d.call.apply(d,
[this].concat(ka(k)))};if(!mf)return a;var h=mf(a.name||b);c[Ma(nf)]=h;return c}var pf;var qf,rf=!1,sf=new jf,uf=function(a,b){qf||tf();rf||(qf(),rf=!0);a=of(a,"goog.async.run");sf.add(a,b)},tf=function(){if(m.Promise&&m.Promise.resolve){var a=m.Promise.resolve(void 0);qf=function(){a.then(vf)}}else qf=function(){var b=vf;"function"!==typeof m.setImmediate||m.Window&&m.Window.prototype&&!Sb()&&m.Window.prototype.setImmediate==m.setImmediate?(ff||(ff=gf()),ff(b)):m.setImmediate(b)}},vf=function(){for(var a;a=sf.remove();){try{a.fn.call(a.scope)}catch(b){hf(b)}kf.put(a)}rf=!1};var wf=function(a){if(!a)return!1;try{return!!a.$goog_Thenable}catch(b){return!1}};var zf=function(a){this.state_=0;this.result_=void 0;this.callbackEntriesTail_=this.callbackEntries_=this.parent_=null;this.hadUnhandledRejection_=this.executing_=!1;if(a!=md)try{var b=this;a.call(void 0,function(c){xf(b,2,c)},function(c){if(!(c instanceof yf))try{if(c instanceof Error)throw c;throw Error("Promise rejected.");}catch(d){}xf(b,3,c)})}catch(c){xf(this,3,c)}},Af=function(){this.next=this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};
Af.prototype.reset=function(){this.context=this.onRejected=this.onFulfilled=this.child=null;this.always=!1};var Bf=new ld(function(){return new Af},function(a){a.reset()}),Cf=function(a,b,c){var d=Bf.get();d.onFulfilled=a;d.onRejected=b;d.context=c;return d};
zf.prototype.then=function(a,b,c){null!=a&&Qa(a,"opt_onFulfilled should be a function.");null!=b&&Qa(b,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");return Df(this,"function"===typeof a?a:null,"function"===typeof b?b:null,c)};zf.prototype.$goog_Thenable=!0;zf.prototype.thenCatch=function(a,b){return Df(this,null,a,b)};zf.prototype.catch=zf.prototype.thenCatch;
zf.prototype.cancel=function(a){if(0==this.state_){var b=new yf(a);uf(function(){Ef(this,b)},this)}};
var Ef=function(a,b){if(0==a.state_)if(a.parent_){var c=a.parent_;if(c.callbackEntries_){for(var d=0,e=null,g=null,h=c.callbackEntries_;h&&(h.always||(d++,h.child==a&&(e=h),!(e&&1<d)));h=h.next)e||(g=h);e&&(0==c.state_&&1==d?Ef(c,b):(g?(d=g,x(c.callbackEntries_),x(null!=d),d.next==c.callbackEntriesTail_&&(c.callbackEntriesTail_=d),d.next=d.next.next):Ff(c),Gf(c,e,3,b)))}a.parent_=null}else xf(a,3,b)},If=function(a,b){a.callbackEntries_||2!=a.state_&&3!=a.state_||Hf(a);x(null!=b.onFulfilled);a.callbackEntriesTail_?
a.callbackEntriesTail_.next=b:a.callbackEntries_=b;a.callbackEntriesTail_=b},Df=function(a,b,c,d){b&&(b=of(b,"goog.Promise.then"));c&&(c=of(c,"goog.Promise.then"));var e=Cf(null,null,null);e.child=new zf(function(g,h){e.onFulfilled=b?function(k){try{var l=b.call(d,k);g(l)}catch(n){h(n)}}:g;e.onRejected=c?function(k){try{var l=c.call(d,k);void 0===l&&k instanceof yf?h(k):g(l)}catch(n){h(n)}}:h});e.child.parent_=a;If(a,e);return e.child};
zf.prototype.unblockAndFulfill_=function(a){x(1==this.state_);this.state_=0;xf(this,2,a)};zf.prototype.unblockAndReject_=function(a){x(1==this.state_);this.state_=0;xf(this,3,a)};
var xf=function(a,b,c){if(0==a.state_){a===c&&(b=3,c=new TypeError("Promise cannot resolve to itself"));a.state_=1;a:{var d=c,e=a.unblockAndFulfill_,g=a.unblockAndReject_;if(d instanceof zf){null!=e&&Qa(e,"opt_onFulfilled should be a function.");null!=g&&Qa(g,"opt_onRejected should be a function. Did you pass opt_context as the second argument instead of the third?");If(d,Cf(e||md,g||null,a));var h=!0}else if(wf(d))d.then(e,g,a),h=!0;else{if(q(d))try{var k=d.then;if("function"===typeof k){Jf(d,k,
e,g,a);h=!0;break a}}catch(l){g.call(a,l);h=!0;break a}h=!1}}h||(a.result_=c,a.state_=b,a.parent_=null,Hf(a),3!=b||c instanceof yf||Kf(a,c))}},Jf=function(a,b,c,d,e){var g=!1,h=function(l){g||(g=!0,c.call(e,l))},k=function(l){g||(g=!0,d.call(e,l))};try{b.call(a,h,k)}catch(l){k(l)}},Hf=function(a){a.executing_||(a.executing_=!0,uf(a.executeCallbacks_,a))},Ff=function(a){var b=null;a.callbackEntries_&&(b=a.callbackEntries_,a.callbackEntries_=b.next,b.next=null);a.callbackEntries_||(a.callbackEntriesTail_=
null);null!=b&&x(null!=b.onFulfilled);return b};zf.prototype.executeCallbacks_=function(){for(var a;a=Ff(this);)Gf(this,a,this.state_,this.result_);this.executing_=!1};
var Gf=function(a,b,c,d){if(3==c&&b.onRejected&&!b.always)for(;a&&a.hadUnhandledRejection_;a=a.parent_)a.hadUnhandledRejection_=!1;if(b.child)b.child.parent_=null,Lf(b,c,d);else try{b.always?b.onFulfilled.call(b.context):Lf(b,c,d)}catch(e){Mf.call(null,e)}Bf.put(b)},Lf=function(a,b,c){2==b?a.onFulfilled.call(a.context,c):a.onRejected&&a.onRejected.call(a.context,c)},Kf=function(a,b){a.hadUnhandledRejection_=!0;uf(function(){a.hadUnhandledRejection_&&Mf.call(null,b)})},Mf=hf,yf=function(a){Ia.call(this,
a)};v(yf,Ia);yf.prototype.name="cancel";/*
Copyright 2005, 2007 Bob Ippolito. All Rights Reserved.
Copyright The Closure Library Authors.
SPDX-License-Identifier: MIT
*/
var H=function(a,b){this.sequence_=[];this.onCancelFunction_=a;this.defaultScope_=b||null;this.hadError_=this.fired_=!1;this.result_=void 0;this.silentlyCanceled_=this.blocking_=this.blocked_=!1;this.unhandledErrorId_=0;this.parent_=null;this.branches_=0};v(H,kd);
H.prototype.cancel=function(a){if(this.fired_)this.result_ instanceof H&&this.result_.cancel();else{if(this.parent_){var b=this.parent_;delete this.parent_;a?b.cancel(a):(b.branches_--,0>=b.branches_&&b.cancel())}this.onCancelFunction_?this.onCancelFunction_.call(this.defaultScope_,this):this.silentlyCanceled_=!0;this.fired_||this.errback(new Nf(this))}};H.prototype.continue_=function(a,b){this.blocked_=!1;Of(this,a,b)};var Of=function(a,b,c){a.fired_=!0;a.result_=c;a.hadError_=!b;Pf(a)};
H.prototype.check_=function(){if(this.fired_){if(!this.silentlyCanceled_)throw new Qf(this);this.silentlyCanceled_=!1}};H.prototype.callback=function(a){this.check_();Rf(a);Of(this,!0,a)};H.prototype.errback=function(a){this.check_();Rf(a);Of(this,!1,a)};
var Rf=function(a){x(!(a instanceof H),"An execution sequence may not be initiated with a blocking Deferred.")},Tf=function(a,b,c){return Sf(a,b,null,c)},Sf=function(a,b,c,d){x(!a.blocking_,"Blocking Deferreds can not be re-used");a.sequence_.push([b,c,d]);a.fired_&&Pf(a);return a};H.prototype.then=function(a,b,c){var d,e,g=new zf(function(h,k){e=h;d=k});Sf(this,e,function(h){h instanceof Nf?g.cancel():d(h);return Uf},this);return g.then(a,b,c)};H.prototype.$goog_Thenable=!0;
H.prototype.isError=function(a){return a instanceof Error};
var Vf=function(a){return Za(a.sequence_,function(b){return"function"===typeof b[1]})},Uf={},Pf=function(a){if(a.unhandledErrorId_&&a.fired_&&Vf(a)){var b=a.unhandledErrorId_,c=Wf[b];c&&(m.clearTimeout(c.id_),delete Wf[b]);a.unhandledErrorId_=0}a.parent_&&(a.parent_.branches_--,delete a.parent_);b=a.result_;for(var d=c=!1;a.sequence_.length&&!a.blocked_;){var e=a.sequence_.shift(),g=e[0],h=e[1];e=e[2];if(g=a.hadError_?h:g)try{var k=g.call(e||a.defaultScope_,b);k===Uf&&(k=void 0);void 0!==k&&(a.hadError_=
a.hadError_&&(k==b||a.isError(k)),a.result_=b=k);if(wf(b)||"function"===typeof m.Promise&&b instanceof m.Promise)d=!0,a.blocked_=!0}catch(l){b=l,a.hadError_=!0,Vf(a)||(c=!0)}}a.result_=b;d&&(k=t(a.continue_,a,!0),d=t(a.continue_,a,!1),b instanceof H?(Sf(b,k,d),b.blocking_=!0):b.then(k,d));c&&(b=new Xf(b),Wf[b.id_]=b,a.unhandledErrorId_=b.id_)},Yf=function(a){var b=new H;b.callback(a);return b},$f=function(){var a=new H;a.errback(Zf);return a},Qf=function(){Ia.call(this)};v(Qf,Ia);
Qf.prototype.message="Deferred has already fired";Qf.prototype.name="AlreadyCalledError";var Nf=function(){Ia.call(this)};v(Nf,Ia);Nf.prototype.message="Deferred was canceled";Nf.prototype.name="CanceledError";var Xf=function(a){this.id_=m.setTimeout(t(this.throwError,this),0);this.error_=a};Xf.prototype.throwError=function(){x(Wf[this.id_],"Cannot throw an error that is not scheduled.");delete Wf[this.id_];throw this.error_;};var Wf={};var ag,bg;var I=function(){y.call(this);this.eventTargetListeners_=new Uc(this);this.actualEventTarget_=this;this.parentEventTarget_=null};v(I,y);I.prototype[Bc]=!0;f=I.prototype;f.getParentEventTarget=function(){return this.parentEventTarget_};f.setParentEventTarget=function(a){this.parentEventTarget_=a};f.addEventListener=function(a,b,c,d){ad(this,a,b,c,d)};f.removeEventListener=function(a,b,c,d){hd(this,a,b,c,d)};
f.dispatchEvent=function(a){cg(this);var b=this.getParentEventTarget();if(b){var c=[];for(var d=1;b;b=b.getParentEventTarget())c.push(b),x(1E3>++d,"infinite loop")}b=this.actualEventTarget_;d=a.type||a;if("string"===typeof a)a=new pb(a,b);else if(a instanceof pb)a.target=a.target||b;else{var e=a;a=new pb(d,b);Rc(a,e)}e=!0;if(c)for(var g=c.length-1;!a.propagationStopped_&&0<=g;g--){var h=a.currentTarget=c[g];e=dg(h,d,!0,a)&&e}a.propagationStopped_||(h=a.currentTarget=b,e=dg(h,d,!0,a)&&e,a.propagationStopped_||
(e=dg(h,d,!1,a)&&e));if(c)for(g=0;!a.propagationStopped_&&g<c.length;g++)h=a.currentTarget=c[g],e=dg(h,d,!1,a)&&e;return e};f.disposeInternal=function(){I.superClass_.disposeInternal.call(this);this.eventTargetListeners_&&this.eventTargetListeners_.removeAll(void 0);this.parentEventTarget_=null};f.listen=function(a,b,c,d){cg(this);return this.eventTargetListeners_.add(String(a),b,!1,c,d)};f.listenOnce=function(a,b,c,d){return this.eventTargetListeners_.add(String(a),b,!0,c,d)};
f.unlisten=function(a,b,c,d){return this.eventTargetListeners_.remove(String(a),b,c,d)};var dg=function(a,b,c,d){b=a.eventTargetListeners_.listeners[String(b)];if(!b)return!0;b=b.concat();for(var e=!0,g=0;g<b.length;++g){var h=b[g];if(h&&!h.removed&&h.capture==c){var k=h.listener,l=h.handler||h.src;h.callOnce&&Wc(a.eventTargetListeners_,h);e=!1!==k.call(l,d)&&e}}return e&&!d.defaultPrevented};I.prototype.getListeners=function(a,b){return this.eventTargetListeners_.getListeners(String(a),b)};
I.prototype.getListener=function(a,b,c,d){return this.eventTargetListeners_.getListener(String(a),b,c,d)};I.prototype.hasListener=function(a,b){return this.eventTargetListeners_.hasListener(void 0!==a?String(a):void 0,b)};var cg=function(a){x(a.eventTargetListeners_,"Event target is not initialized. Did you call the superclass (goog.events.EventTarget) constructor?")};var eg=function(){I.call(this);this.namespace_="google-analytics";this.storage_=chrome.storage.local;chrome.storage.onChanged.addListener(t(this.onStorageChanged_,this))};ra(eg,I);eg.prototype.onStorageChanged_=function(a,b){"local"==b&&fg(this,a)&&this.dispatchEvent("a")};var fg=function(a,b){return Za(Jc(b),function(c){return 0==c.lastIndexOf(this.namespace_,0)},a)};
eg.prototype.get=function(a){var b=new H,c=this.namespace_+"."+a;this.storage_.get(c,function(d){chrome.runtime.lastError?b.errback(chrome.runtime.lastError):(d=d[c],b.callback(null!=d?d.toString():void 0))});return b};eg.prototype.set=function(a,b){var c=new H,d={};d[this.namespace_+"."+a]=b;this.storage_.set(d,function(){chrome.runtime.lastError?c.errback(chrome.runtime.lastError):c.callback()});return c};var gg=function(a,b){this.childIterator_=a[m.Symbol.iterator]();this.mapFn_=b};gg.prototype[Symbol.iterator]=function(){return this};gg.prototype.next=function(){var a=this.childIterator_.next();return{value:a.done?void 0:this.mapFn_.call(void 0,a.value),done:a.done}};var hg=function(a,b){return new gg(a,b)};var ig=function(){};ig.prototype.next=function(){return jg};var jg=mb({done:!0,value:void 0});ig.prototype.__iterator__=function(){return this};var og=function(a){if(a instanceof kg||a instanceof lg||a instanceof mg)return a;if("function"==typeof a.next)return new kg(function(){return a});if("function"==typeof a[Symbol.iterator])return new kg(function(){return a[Symbol.iterator]()});if("function"==typeof a.__iterator__)return new kg(function(){return a.__iterator__()});throw Error("Not an iterator or iterable.");},kg=function(a){this.func_=a};kg.prototype.__iterator__=function(){return new lg(this.func_())};
kg.prototype[Symbol.iterator]=function(){return new mg(this.func_())};kg.prototype.toEs6=function(){return new mg(this.func_())};var lg=function(a){this.iter_=a};ra(lg,ig);lg.prototype.next=function(){return this.iter_.next()};lg.prototype[Symbol.iterator]=function(){return new mg(this.iter_)};lg.prototype.toEs6=function(){return new mg(this.iter_)};var mg=function(a){kg.call(this,function(){return a});this.iter_=a};ra(mg,kg);mg.prototype.next=function(){return this.iter_.next()};var pg=function(a,b){this.map_={};this.keys_=[];this.version_=this.size=0;var c=arguments.length;if(1<c){if(c%2)throw Error("Uneven number of arguments");for(var d=0;d<c;d+=2)this.set(arguments[d],arguments[d+1])}else a&&this.addAll(a)};f=pg.prototype;f.getCount=function(){return this.size};f.getValues=function(){qg(this);for(var a=[],b=0;b<this.keys_.length;b++)a.push(this.map_[this.keys_[b]]);return a};f.getKeys=function(){qg(this);return this.keys_.concat()};f.containsKey=function(a){return this.has(a)};
f.has=function(a){return rg(this.map_,a)};f.containsValue=function(a){for(var b=0;b<this.keys_.length;b++){var c=this.keys_[b];if(rg(this.map_,c)&&this.map_[c]==a)return!0}return!1};f.equals=function(a,b){if(this===a)return!0;if(this.size!=a.getCount())return!1;b=b||sg;qg(this);for(var c,d=0;c=this.keys_[d];d++)if(!b(this.get(c),a.get(c)))return!1;return!0};var sg=function(a,b){return a===b};pg.prototype.clear=function(){this.map_={};this.keys_.length=0;this.setSizeInternal_(0);this.version_=0};
pg.prototype.remove=function(a){return this.delete(a)};pg.prototype.delete=function(a){return rg(this.map_,a)?(delete this.map_[a],this.setSizeInternal_(this.size-1),this.version_++,this.keys_.length>2*this.size&&qg(this),!0):!1};
var qg=function(a){if(a.size!=a.keys_.length){for(var b=0,c=0;b<a.keys_.length;){var d=a.keys_[b];rg(a.map_,d)&&(a.keys_[c++]=d);b++}a.keys_.length=c}if(a.size!=a.keys_.length){var e={};for(c=b=0;b<a.keys_.length;)d=a.keys_[b],rg(e,d)||(a.keys_[c++]=d,e[d]=1),b++;a.keys_.length=c}};f=pg.prototype;f.get=function(a,b){return rg(this.map_,a)?this.map_[a]:b};f.set=function(a,b){rg(this.map_,a)||(this.setSizeInternal_(this.size+1),this.keys_.push(a),this.version_++);this.map_[a]=b};
f.addAll=function(a){if(a instanceof pg)for(var b=a.getKeys(),c=0;c<b.length;c++)this.set(b[c],a.get(b[c]));else for(b in a)this.set(b,a[b])};f.forEach=function(a,b){for(var c=this.getKeys(),d=0;d<c.length;d++){var e=c[d],g=this.get(e);a.call(b,g,e,this)}};f.clone=function(){return new pg(this)};f.keys=function(){return og(this.__iterator__(!0)).toEs6()};f.values=function(){return og(this.__iterator__(!1)).toEs6()};f.entries=function(){var a=this;return hg(this.keys(),function(b){return[b,a.get(b)]})};
f.__iterator__=function(a){qg(this);var b=0,c=this.version_,d=this,e=new ig;e.next=function(){if(c!=d.version_)throw Error("The map has changed since the iterator was created");if(b>=d.keys_.length)return jg;var g=d.keys_[b++];return{value:a?g:d.map_[g],done:!1}};return e};f.setSizeInternal_=function(a){this.size=a};var rg=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)};var tg={id:"hitType",name:"t",valueType:"text",maxLength:void 0,defaultValue:void 0},ug={id:"sessionControl",name:"sc",valueType:"text",maxLength:void 0,defaultValue:void 0},vg={id:"description",name:"cd",valueType:"text",maxLength:2048,defaultValue:void 0},wg={HIT_TYPE:tg,ANONYMIZE_IP:{id:"anonymizeIp",name:"aip",valueType:"boolean",maxLength:void 0,defaultValue:void 0},QUEUE_TIME:{id:"queueTime",name:"qt",valueType:"integer",maxLength:void 0,defaultValue:void 0},CACHE_BUSTER:{id:"cacheBuster",name:"z",
valueType:"text",maxLength:void 0,defaultValue:void 0},SESSION_CONTROL:ug,SESSION_GROUP:{id:"sessionGroup",name:"sg",valueType:"text",maxLength:void 0,defaultValue:void 0},USER_ID:{id:"userId",name:"uid",valueType:"text",maxLength:void 0,defaultValue:void 0},NON_INTERACTION:{id:"nonInteraction",name:"ni",valueType:"boolean",maxLength:void 0,defaultValue:void 0},DESCRIPTION:vg,TITLE:{id:"title",name:"dt",valueType:"text",maxLength:1500,defaultValue:void 0},APP_ID:{id:"appId",name:"aid",valueType:"text",
maxLength:150,defaultValue:void 0},APP_INSTALLER_ID:{id:"appInstallerId",name:"aiid",valueType:"text",maxLength:150,defaultValue:void 0},EVENT_CATEGORY:{id:"eventCategory",name:"ec",valueType:"text",maxLength:150,defaultValue:void 0},EVENT_ACTION:{id:"eventAction",name:"ea",valueType:"text",maxLength:500,defaultValue:void 0},EVENT_LABEL:{id:"eventLabel",name:"el",valueType:"text",maxLength:500,defaultValue:void 0},EVENT_VALUE:{id:"eventValue",name:"ev",valueType:"integer",maxLength:void 0,defaultValue:void 0},
SOCIAL_NETWORK:{id:"socialNetwork",name:"sn",valueType:"text",maxLength:50,defaultValue:void 0},SOCIAL_ACTION:{id:"socialAction",name:"sa",valueType:"text",maxLength:50,defaultValue:void 0},SOCIAL_TARGET:{id:"socialTarget",name:"st",valueType:"text",maxLength:2048,defaultValue:void 0},TRANSACTION_ID:{id:"transactionId",name:"ti",valueType:"text",maxLength:500,defaultValue:void 0},TRANSACTION_AFFILIATION:{id:"transactionAffiliation",name:"ta",valueType:"text",maxLength:500,defaultValue:void 0},TRANSACTION_REVENUE:{id:"transactionRevenue",
name:"tr",valueType:"currency",maxLength:void 0,defaultValue:void 0},TRANSACTION_SHIPPING:{id:"transactionShipping",name:"ts",valueType:"currency",maxLength:void 0,defaultValue:void 0},TRANSACTION_TAX:{id:"transactionTax",name:"tt",valueType:"currency",maxLength:void 0,defaultValue:void 0},CURRENCY_CODE:{id:"currencyCode",name:"cu",valueType:"text",maxLength:10,defaultValue:void 0},ITEM_PRICE:{id:"itemPrice",name:"ip",valueType:"currency",maxLength:void 0,defaultValue:void 0},ITEM_QUANTITY:{id:"itemQuantity",
name:"iq",valueType:"integer",maxLength:void 0,defaultValue:void 0},ITEM_CODE:{id:"itemCode",name:"ic",valueType:"text",maxLength:500,defaultValue:void 0},ITEM_NAME:{id:"itemName",name:"in",valueType:"text",maxLength:500,defaultValue:void 0},ITEM_CATEGORY:{id:"itemCategory",name:"iv",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_SOURCE:{id:"campaignSource",name:"cs",valueType:"text",maxLength:100,defaultValue:void 0},CAMPAIGN_MEDIUM:{id:"campaignMedium",name:"cm",valueType:"text",maxLength:50,
defaultValue:void 0},CAMPAIGN_NAME:{id:"campaignName",name:"cn",valueType:"text",maxLength:100,defaultValue:void 0},CAMPAIGN_KEYWORD:{id:"campaignKeyword",name:"ck",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_CONTENT:{id:"campaignContent",name:"cc",valueType:"text",maxLength:500,defaultValue:void 0},CAMPAIGN_ID:{id:"campaignId",name:"ci",valueType:"text",maxLength:100,defaultValue:void 0},GCLID:{id:"gclid",name:"gclid",valueType:"text",maxLength:void 0,defaultValue:void 0},DCLID:{id:"dclid",
name:"dclid",valueType:"text",maxLength:void 0,defaultValue:void 0},PAGE_LOAD_TIME:{id:"pageLoadTime",name:"plt",valueType:"integer",maxLength:void 0,defaultValue:void 0},DNS_TIME:{id:"dnsTime",name:"dns",valueType:"integer",maxLength:void 0,defaultValue:void 0},TCP_CONNECT_TIME:{id:"tcpConnectTime",name:"tcp",valueType:"integer",maxLength:void 0,defaultValue:void 0},SERVER_RESPONSE_TIME:{id:"serverResponseTime",name:"srt",valueType:"integer",maxLength:void 0,defaultValue:void 0},PAGE_DOWNLOAD_TIME:{id:"pageDownloadTime",
name:"pdt",valueType:"integer",maxLength:void 0,defaultValue:void 0},REDIRECT_RESPONSE_TIME:{id:"redirectResponseTime",name:"rrt",valueType:"integer",maxLength:void 0,defaultValue:void 0},TIMING_CATEGORY:{id:"timingCategory",name:"utc",valueType:"text",maxLength:150,defaultValue:void 0},TIMING_VAR:{id:"timingVar",name:"utv",valueType:"text",maxLength:500,defaultValue:void 0},TIMING_VALUE:{id:"timingValue",name:"utt",valueType:"integer",maxLength:void 0,defaultValue:void 0},TIMING_LABEL:{id:"timingLabel",
name:"utl",valueType:"text",maxLength:500,defaultValue:void 0},EX_DESCRIPTION:{id:"exDescription",name:"exd",valueType:"text",maxLength:150,defaultValue:void 0},EX_FATAL:{id:"exFatal",name:"exf",valueType:"boolean",maxLength:void 0,defaultValue:"1"}};var xg={id:"anonymizeIp",name:"aip",valueType:"boolean",maxLength:void 0,defaultValue:void 0},yg={id:"apiVersion",name:"v",valueType:"text",maxLength:void 0,defaultValue:void 0},zg={id:"appName",name:"an",valueType:"text",maxLength:100,defaultValue:void 0},Ag={id:"appVersion",name:"av",valueType:"text",maxLength:100,defaultValue:void 0},Bg={id:"clientId",name:"cid",valueType:"text",maxLength:void 0,defaultValue:void 0},Cg={id:"language",name:"ul",valueType:"text",maxLength:20,defaultValue:void 0},
Dg={id:"libVersion",name:"_v",valueType:"text",maxLength:void 0,defaultValue:void 0},Eg={id:"sampleRateOverride",name:"usro",valueType:"integer",maxLength:void 0,defaultValue:void 0},Fg={id:"screenColors",name:"sd",valueType:"text",maxLength:20,defaultValue:void 0},Gg={id:"screenResolution",name:"sr",valueType:"text",maxLength:20,defaultValue:void 0},Hg={id:"trackingId",name:"tid",valueType:"text",maxLength:void 0,defaultValue:void 0},Ig={id:"viewportSize",name:"vp",valueType:"text",maxLength:20,
defaultValue:void 0},Jg={ANONYMIZE_IP:xg,API_VERSION:yg,APP_NAME:zg,APP_VERSION:Ag,CLIENT_ID:Bg,LANGUAGE:Cg,LIBRARY_VERSION:Dg,SAMPLE_RATE_OVERRIDE:Eg,SCREEN_COLORS:Fg,SCREEN_RESOLUTION:Gg,TRACKING_ID:Hg,VIEWPORT_SIZE:Ig},Lg=function(a){if("string"!==typeof a)return a;var b=Kg(a,wg);if(q(b))return b;b=Kg(a,Jg);if(q(b))return b;b=/^dimension(\d+)$/.exec(a);if(null!==b){a=parseInt(b[1],10);if(1>a||200<a)throw Error("Expected dimension index range 1-200, but was : "+a);return{id:"dimension"+a,name:"cd"+
a,valueType:"text",maxLength:150,defaultValue:void 0}}b=/^metric(\d+)$/.exec(a);if(null!==b){a=parseInt(b[1],10);if(1>a||200<a)throw Error("Expected metric index range 1-200, but was : "+a);return{id:"metric"+a,name:"cm"+a,valueType:"integer",maxLength:void 0,defaultValue:void 0}}throw Error(a+" is not a valid parameter name.");},Kg=function(a,b){b=Lc(b,function(c){return c.id==a&&"metric"!=a&&"dimension"!=a});return q(b)?b:null};var Mg=function(a){if(a.getCount&&"function"==typeof a.getCount)a=a.getCount();else if(Aa(a)||"string"===typeof a)a=a.length;else{var b=0,c;for(c in a)b++;a=b}return a},Ng=function(a){if(a.getValues&&"function"==typeof a.getValues)return a.getValues();if("undefined"!==typeof Map&&a instanceof Map||"undefined"!==typeof Set&&a instanceof Set)return Array.from(a.values());if("string"===typeof a)return a.split("");if(Aa(a)){for(var b=[],c=a.length,d=0;d<c;d++)b.push(a[d]);return b}return Ic(a)},Og=function(a){if(a.getKeys&&
"function"==typeof a.getKeys)return a.getKeys();if(!a.getValues||"function"!=typeof a.getValues){if("undefined"!==typeof Map&&a instanceof Map)return Array.from(a.keys());if(!("undefined"!==typeof Set&&a instanceof Set)){if(Aa(a)||"string"===typeof a){var b=[];a=a.length;for(var c=0;c<a;c++)b.push(c);return b}return Jc(a)}}},Pg=function(a,b,c){if(a.forEach&&"function"==typeof a.forEach)a.forEach(b,c);else if(Aa(a)||"string"===typeof a)Array.prototype.forEach.call(a,b,c);else for(var d=Og(a),e=Ng(a),
g=e.length,h=0;h<g;h++)b.call(c,e[h],d&&d[h],a)},Qg=function(a,b){if("function"==typeof a.every)return a.every(b,void 0);if(Aa(a)||"string"===typeof a)return Array.prototype.every.call(a,b,void 0);for(var c=Og(a),d=Ng(a),e=d.length,g=0;g<e;g++)if(!b.call(void 0,d[g],c&&c[g],a))return!1;return!0};var Rg=function(a){this.entries_=new pg;if(0<arguments.length%2)throw Error("Uneven number of arguments to ParameterMap constructor.");for(var b=arguments,c=0;c<b.length;c+=2)this.set(b[c],b[c+1])};Rg.prototype.set=function(a,b){if(null==b)throw Error("undefined-or-null value for key: "+a.name);this.entries_.set(a.name,{key:a,value:b})};Rg.prototype.remove=function(a){this.entries_.delete(a.name)};Rg.prototype.get=function(a){a=this.entries_.get(a.name,null);return null===a?null:a.value};
Rg.prototype.addAll=function(a){this.entries_.addAll(a.entries_)};var Sg=function(a,b){Xa(Array.from(a.entries_.values()),function(c){b(c.key,c.value)})};Rg.prototype.clone=function(){var a=new Rg;a.entries_=this.entries_.clone();return a};Rg.prototype.equals=function(a){return this.entries_.size!==a.entries_.size?!1:$a(Array.from(this.entries_.values()),function(b){return b.value==a.get(b.key)})};
Rg.prototype.contains=function(a){return $a(Array.from(a.entries_.values()),t(function(b){return b.value==this.get(b.key)},this))};Rg.prototype.toString=function(){var a={};Sg(this,function(b,c){a[b.id]=c});return JSON.stringify(a)};function Tg(a){this.channelManager_=a;this.channel_=a.getChannel();this.params_=new Rg;this.anonymizeIps_=this.startSession_=!1}Tg.prototype.set=function(a,b){if(null==b)throw Error("Value must be defined and not null. Parameter="+a.id);a=Lg(a);this.params_.set(a,b)};Tg.prototype.addFilter=function(a){this.channelManager_.addFilter(a)};
Tg.prototype.send=function(a,b){var c=this.params_.clone();b instanceof Rg?c.addAll(b):q(b)&&Gc(b,function(d,e){null!=d&&c.set(Lg(e),d)},this);this.startSession_&&(this.startSession_=!1,c.set(ug,"start"));this.anonymizeIps_&&c.set(xg,!0);return this.channel_.send(a,c)};var Ug=function(a,b){var c={description:b};a.set(vg,b);a.send("appview",c)};Tg.prototype.sendTiming=function(a,b,c){this.send("timing",{timingCategory:a,timingVar:b,timingLabel:void 0,timingValue:c,sampleRateOverride:void 0})};var Yg=function(a){var b=Vg();if(!bg){var c=Vg();bg=new Wg(c,new Xg(c))}c=bg;this.libVersion_="ca1.6.0";this.appName_="cros_recovery_tool";this.appVersion_=a;this.settings_=b;this.channelFactory_=c};var Zg=[],$g=function(a){x(!Object.isSealed(a),"Cannot use getInstance() with a sealed constructor.");var b="instance_";if(a.instance_&&a.hasOwnProperty(b))return a.instance_;Zg.push(a);var c=new a;a.instance_=c;x(a.hasOwnProperty(b),"Could not instantiate singleton.");return c};var ah=function(){};ah.prototype.send=function(){return Yf()};var bh=function(a){this.filters_=[];this.delegate_=a};bh.prototype.addFilter=function(a){if("function"!==typeof a)throw Error("Invalid filter. Must be a function.");this.filters_.push(a)};bh.prototype.send=function(a,b){if(0==this.filters_.length)return this.delegate_.send(a,b);var c=new ch(a,b);return Tf(dh(this,0,c),function(){if(!c.canceled_)return this.delegate_.send(a,b)},this)};
var dh=function(a,b,c){return Tf(Tf(Yf(),function(){return this.filters_[b](c)},a),function(){if(++b<this.filters_.length&&!c.canceled_)return dh(this,b,c)},a)},ch=function(a,b){this.type_=a;this.parameters_=b;this.canceled_=!1};ch.prototype.getParameters=function(){return this.parameters_};ch.prototype.cancel=function(){this.canceled_=!0};function eh(a){this.destination_=a}eh.prototype.send=function(a,b){this.destination_.push({hitType:a,parameters:b});return Yf()};var gh=function(a,b){var c=$g(ah);this.settings_=a;this.diverted_=[];this.channels_={enabled:new eh(this.diverted_),disabled:c};this.channel_=this.channels_.enabled;Sf(fh(this.settings_),Ga(this.onSettingsReady_,b),this.onSettingsLoadFailed_,this)};
gh.prototype.onSettingsReady_=function(a){if(null===this.diverted_)throw Error("Channel setup already completed.");this.channels_.enabled=a();hh(this);Xa(this.diverted_,function(b){this.send(b.hitType,b.parameters)},this);this.diverted_=null;ih(this.settings_,t(this.onSettingsChanged_,this))};gh.prototype.onSettingsLoadFailed_=function(){if(null===this.diverted_)throw Error("Channel setup already completed.");this.channel_=this.channels_.enabled=this.channels_.disabled;this.diverted_=null};
gh.prototype.send=function(a,b){return this.channel_.send(a,b)};var hh=function(a){a.channel_=jh(a.settings_)?a.channels_.enabled:a.channels_.disabled};gh.prototype.onSettingsChanged_=function(a){switch(a){case "analytics.tracking-permitted":hh(this)}};var kh=function(a,b){this.bufferedFilters_=[];var c=t(function(){this.filterChannel_=new bh(b.getChannel());Xa(this.bufferedFilters_,function(d){this.filterChannel_.addFilter(d)},this);this.bufferedFilters_=null;return this.filterChannel_},this);this.channel_=new gh(a,c)};kh.prototype.getChannel=function(){return this.channel_};kh.prototype.addFilter=function(a){this.filterChannel_?this.filterChannel_.addFilter(a):this.bufferedFilters_.push(a)};
var Wg=function(a,b){this.settings_=a;this.sharedChannelProvider_=b};Wg.prototype.create=function(){return new kh(this.settings_,this.sharedChannelProvider_)};function lh(){for(var a="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""),b=0,c=a.length;b<c;b++)switch(a[b]){case "x":a[b]=Math.floor(16*Math.random()).toString(16);break;case "y":a[b]=(Math.floor(4*Math.random())+8).toString(16)}return a.join("")};var mh=function(a,b,c,d,e,g){H.call(this,e,g);this.list_=a;this.deferredResults_=[];this.fireOnOneCallback_=!!b;this.fireOnOneErrback_=!!c;this.consumeErrors_=!!d;for(b=this.numFinished_=0;b<a.length;b++)Sf(a[b],t(this.handleCallback_,this,b,!0),t(this.handleCallback_,this,b,!1));0!=a.length||this.fireOnOneCallback_||this.callback(this.deferredResults_)};v(mh,H);
mh.prototype.handleCallback_=function(a,b,c){this.numFinished_++;this.deferredResults_[a]=[b,c];this.fired_||(this.fireOnOneCallback_&&b?this.callback([a,c]):this.fireOnOneErrback_&&!b?this.errback(c):this.numFinished_==this.list_.length&&this.callback(this.deferredResults_));this.consumeErrors_&&!b&&(c=null);return c};mh.prototype.errback=function(a){mh.superClass_.errback.call(this,a);for(a=0;a<this.list_.length;a++)this.list_[a].cancel()};
var nh=function(a){return Tf(new mh(a,!1,!0),function(b){for(var c=[],d=0;d<b.length;d++)c[d]=b[d][1];return c})};var ph=function(){this.storage_=new eg;this.sampleRate_=100;this.changeListeners_=[];this.permitted_=this.userId_=null;this.ready_=oh(this);Tf(this.ready_,function(){this.storageListenerKey_=ad(this.storage_,"a",t(this.handleStorageChanged_,this))},this)},oh=function(a){return Tf(qh(a),function(){return this},a)},qh=function(a){return nh([rh(a),sh(a)])},fh=function(a){var b=new H;Sf(a.ready_,b.callback,b.errback,b);return b};
ph.prototype.handleStorageChanged_=function(){th(this);var a=uh(this),b=jh(this);Tf(qh(this),function(){a!=uh(this)&&vh(this,"analytics.user-id");b!=jh(this)&&vh(this,"analytics.tracking-permitted")},this)};
var ih=function(a,b){th(a);a.changeListeners_.push(b)},jh=function(a){th(a);if(a=a.permitted_)a=m._gaUserPrefs,a=!(a&&a.ioo&&a.ioo()||m.document&&m.document.documentElement.hasAttribute("data-google-analytics-opt-out"));return a},rh=function(a){return Tf(a.storage_.get("analytics.tracking-permitted"),function(b){this.permitted_=!0;if(void 0!==b)switch(b){case "true":this.permitted_=!0;break;case "false":this.permitted_=!1}},a)},uh=function(a){th(a);if("string"!==typeof a.userId_)throw Error("Invalid state. UserID is not a string.");
return a.userId_},sh=function(a){return Tf(a.storage_.get("analytics.user-id"),function(b){void 0!==b?this.userId_=b:wh(this)},a)},wh=function(a){a.userId_=lh();Tf(a.storage_.set("analytics.user-id",a.userId_),function(){vh(this,"analytics.user-id")},a)},xh=function(a){th(a);return a.sampleRate_},vh=function(a,b){Xa(a.changeListeners_,function(c){c(b)})};ph.prototype.dispose=function(){null!=this.storageListenerKey_&&id(this.storageListenerKey_)};
var th=function(a){if(!fh(a).fired_)throw Error("Settings object accessed prior to entering ready state.");};var yh=function(a,b){this.settings_=a;this.delegate_=b};yh.prototype.send=function(a,b){b.set(Bg,uh(this.settings_));return this.delegate_.send(a,b)};var zh=function(a){this.delegate_=a};zh.prototype.send=function(a,b){Ah(b);Bh(b);return this.delegate_.send(a,b)};var Ah=function(a){Sg(a,function(b,c){void 0!==b.maxLength&&"text"==b.valueType&&0<b.maxLength&&c.length>b.maxLength&&a.set(b,c.substring(0,b.maxLength))})},Bh=function(a){Sg(a,function(b,c){void 0!==b.defaultValue&&c==b.defaultValue&&a.remove(b)})};var Zf={status:"device-offline",details:void 0},Ch={status:"rate-limited",details:void 0},Dh={status:"sampled-out",details:void 0},Eh={status:"sent",details:void 0};var Fh=function(a,b){this.tokens_=a;this.delegate_=b};Fh.prototype.send=function(a,b){var c=this.tokens_;var d=c.timeSource_(),e=Math.floor((d-c.lastFilled_)*c.fillRate_);0<e&&(c.availableTokens_=Math.min(c.availableTokens_+e,c.maxTokens_),c.lastFilled_=d);1>c.availableTokens_?c=!1:(--c.availableTokens_,c=!0);return c||"item"==a||"transaction"==a?this.delegate_.send(a,b):Yf(Ch)};function Gh(){x(!0);x(!0);x(!0);this.availableTokens_=60;this.maxTokens_=500;this.fillRate_=5E-4;this.timeSource_=function(){return(new Date).getTime()};this.lastFilled_=this.timeSource_()};var Hh=function(a,b){this.settings_=a;this.delegate_=b};Hh.prototype.send=function(a,b){var c=b.get(Bg);c=parseInt(c.split("-")[1],16);if("timing"!=a)var d=xh(this.settings_);else(d=b.get(Eg))&&b.remove(Eg),d=d||xh(this.settings_);return c<655.36*d?this.delegate_.send(a,b):Yf(Dh)};var Ih=function(a){try{return m.JSON.parse(a)}catch(b){}a=String(a);if(/^\s*$/.test(a)?0:/^[\],:{}\s\u2028\u2029]*$/.test(a.replace(/\\["\\\/bfnrtu]/g,"@").replace(/(?:"[^"\\\n\r\u2028\u2029\x00-\x08\x0a-\x1f]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)[\s\u2028\u2029]*(?=:|,|]|}|$)/g,"]").replace(/(?:^|:|,)(?:[\s\u2028\u2029]*\[)+/g,"")))try{return eval("("+a+")")}catch(b){}throw Error("Invalid JSON string: "+a);};var Jh=function(a,b){this.name=a;this.value=b};Jh.prototype.toString=function(){return this.name};var Kh=new Jh("OFF",Infinity),Lh=new Jh("SEVERE",1E3),Mh=new Jh("WARNING",900),Nh=new Jh("CONFIG",700),Oh=new Jh("FINE",500),Ph=function(){this.capacity_=0;this.clear()},Qh;Ph.prototype.clear=function(){this.buffer_=Array(this.capacity_);this.curIndex_=-1;this.isFull_=!1};var Rh=function(a,b,c){this.reset(a||Kh,b,c,void 0,void 0)};Rh.prototype.reset=function(a,b){this.msg_=b};
Rh.prototype.getMessage=function(){return this.msg_};var Sh=function(a,b){this.level=null;this.handlers=[];this.parent=(void 0===b?null:b)||null;this.children=[];this.logger={getName:function(){return a}}},Th=function(a){if(a.level)return a.level;if(a.parent)return Th(a.parent);Na("Root logger has no level set.");return Kh};Sh.prototype.publish=function(a){for(var b=this;b;)b.handlers.forEach(function(c){c(a)}),b=b.parent};
var Uh=function(){this.entries={};var a=new Sh("");a.level=Nh;this.entries[""]=a},Vh,Wh=function(a,b){var c=a.entries[b];if(c)return c;c=Wh(a,b.slice(0,Math.max(b.lastIndexOf("."),0)));var d=new Sh(b,c);a.entries[b]=d;c.children.push(d);return d},Xh=function(){Vh||(Vh=new Uh);return Vh},Yh=function(a,b,c){var d;if(d=a)if(d=a&&b){d=b.value;var e=a?Th(Wh(Xh(),a.getName())):Kh;d=d>=e.value}if(d){b=b||Kh;d=Wh(Xh(),a.getName());"function"===typeof c&&(c=c());Qh||(Qh=new Ph);e=Qh;a=a.getName();if(0<e.capacity_){var g=
(e.curIndex_+1)%e.capacity_;e.curIndex_=g;e.isFull_?(e=e.buffer_[g],e.reset(b,c,a),a=e):(e.isFull_=g==e.capacity_-1,a=e.buffer_[g]=new Rh(b,c,a))}else a=new Rh(b,c,a);d.publish(a)}},Zh=function(a,b){a&&Yh(a,Lh,b)},$h=function(a,b){a&&Yh(a,Oh,b)};var ai=function(){};ai.prototype.cachedOptions_=null;var ci=function(a){var b;(b=a.cachedOptions_)||(b={},bi(a)&&(b[0]=!0,b[1]=!0),b=a.cachedOptions_=b);return b};var di,ei=function(){};v(ei,ai);var fi=function(a){return(a=bi(a))?new ActiveXObject(a):new XMLHttpRequest},bi=function(a){if(!a.ieProgId_&&"undefined"==typeof XMLHttpRequest&&"undefined"!=typeof ActiveXObject){for(var b=["MSXML2.XMLHTTP.6.0","MSXML2.XMLHTTP.3.0","MSXML2.XMLHTTP","Microsoft.XMLHTTP"],c=0;c<b.length;c++){var d=b[c];try{return new ActiveXObject(d),a.ieProgId_=d}catch(e){}}throw Error("Could not create ActiveXObject. ActiveX might be disabled, or MSXML might not be installed");}return a.ieProgId_};
di=new ei;var gi=function(a,b){I.call(this);this.interval_=a||1;this.timerObject_=b||m;this.boundTick_=t(this.tick_,this);this.last_=Date.now()};v(gi,I);f=gi.prototype;f.enabled=!1;f.timer_=null;f.setInterval=function(a){this.interval_=a;this.timer_&&this.enabled?(this.stop(),this.start()):this.timer_&&this.stop()};
f.tick_=function(){if(this.enabled){var a=Date.now()-this.last_;0<a&&a<.8*this.interval_?this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_-a):(this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null),this.dispatchEvent("tick"),this.enabled&&(this.stop(),this.start()))}};f.start=function(){this.enabled=!0;this.timer_||(this.timer_=this.timerObject_.setTimeout(this.boundTick_,this.interval_),this.last_=Date.now())};
f.stop=function(){this.enabled=!1;this.timer_&&(this.timerObject_.clearTimeout(this.timer_),this.timer_=null)};f.disposeInternal=function(){gi.superClass_.disposeInternal.call(this);this.stop();delete this.timerObject_};var hi=function(a,b,c){if("function"===typeof a)c&&(a=t(a,c));else if(a&&"function"==typeof a.handleEvent)a=t(a.handleEvent,a);else throw Error("Invalid listener argument");return 2147483647<Number(b)?-1:m.setTimeout(a,b||0)};var ii=RegExp("^(?:([^:/?#.]+):)?(?://(?:([^\\\\/?#]*)@)?([^\\\\/?#]*?)(?::([0-9]+))?(?=[\\\\/?#]|$))?([^?#]+)?(?:\\?([^#]*))?(?:#([\\s\\S]*))?$"),ji=function(a,b){if(a){a=a.split("&");for(var c=0;c<a.length;c++){var d=a[c].indexOf("="),e=null;if(0<=d){var g=a[c].substring(0,d);e=a[c].substring(d+1)}else g=a[c];b(g,e?decodeURIComponent(e.replace(/\+/g," ")):"")}}};var J=function(a){I.call(this);this.headers=new Map;this.xmlHttpFactory_=a||null;this.active_=!1;this.xhrOptions_=this.xhr_=null;this.lastError_=this.lastMethod_=this.lastUri_="";this.inAbort_=this.inOpen_=this.inSend_=this.errorDispatched_=!1;this.timeoutInterval_=0;this.timeoutId_=null;this.responseType_="";this.useXhr2Timeout_=this.progressEventsEnabled_=this.withCredentials_=!1;this.attributionReportingOptions_=this.trustToken_=null};v(J,I);J.prototype.logger_=Wh(Xh(),"goog.net.XhrIo").logger;
var ki=/^https?$/i,li=["POST","PUT"],mi=[],ni=function(a,b,c,d){var e=new J;mi.push(e);b&&e.listen("complete",b);e.listenOnce("ready",e.cleanupSend_);e.send(a,c,d,void 0)};J.prototype.cleanupSend_=function(){this.dispose();fb(mi,this)};J.prototype.setTrustToken=function(a){this.trustToken_=a};J.prototype.setAttributionReporting=function(a){this.attributionReportingOptions_=a};
J.prototype.send=function(a,b,c,d){if(this.xhr_)throw Error("[goog.net.XhrIo] Object is active with another request="+this.lastUri_+"; newUri="+a);b=b?b.toUpperCase():"GET";this.lastUri_=a;this.lastError_="";this.lastMethod_=b;this.errorDispatched_=!1;this.active_=!0;this.xhr_=this.xmlHttpFactory_?fi(this.xmlHttpFactory_):fi(di);this.xhrOptions_=this.xmlHttpFactory_?ci(this.xmlHttpFactory_):ci(di);this.xhr_.onreadystatechange=t(this.onReadyStateChange_,this);this.progressEventsEnabled_&&"onprogress"in
this.xhr_&&(this.xhr_.onprogress=t(function(h){this.onProgressHandler_(h,!0)},this),this.xhr_.upload&&(this.xhr_.upload.onprogress=t(this.onProgressHandler_,this)));try{$h(this.logger_,oi(this,"Opening Xhr")),this.inOpen_=!0,this.xhr_.open(b,String(a),!0),this.inOpen_=!1}catch(h){$h(this.logger_,oi(this,"Error opening Xhr: "+h.message));this.error_(5,h);return}a=c||"";c=new Map(this.headers);if(d)if(Object.getPrototypeOf(d)===Object.prototype)for(var e in d)c.set(e,d[e]);else if("function"===typeof d.keys&&
"function"===typeof d.get){e=ja(d.keys());for(var g=e.next();!g.done;g=e.next())g=g.value,c.set(g,d.get(g))}else throw Error("Unknown input type for opt_headers: "+String(d));d=Array.from(c.keys()).find(function(h){return"content-type"==h.toLowerCase()});e=m.FormData&&a instanceof m.FormData;!cb(li,b)||d||e||c.set("Content-Type","application/x-www-form-urlencoded;charset=utf-8");b=ja(c);for(d=b.next();!d.done;d=b.next())c=ja(d.value),d=c.next().value,c=c.next().value,this.xhr_.setRequestHeader(d,
c);this.responseType_&&(this.xhr_.responseType=this.responseType_);"withCredentials"in this.xhr_&&this.xhr_.withCredentials!==this.withCredentials_&&(this.xhr_.withCredentials=this.withCredentials_);if("setTrustToken"in this.xhr_&&this.trustToken_)try{this.xhr_.setTrustToken(this.trustToken_)}catch(h){$h(this.logger_,oi(this,"Error SetTrustToken: "+h.message))}if("setAttributionReporting"in this.xhr_&&this.attributionReportingOptions_)try{this.xhr_.setAttributionReporting(this.attributionReportingOptions_)}catch(h){$h(this.logger_,
oi(this,"Error SetAttributionReporting: "+h.message))}try{pi(this),0<this.timeoutInterval_&&(this.useXhr2Timeout_=qi(this.xhr_),$h(this.logger_,oi(this,"Will abort after "+this.timeoutInterval_+"ms if incomplete, xhr2 "+this.useXhr2Timeout_)),this.useXhr2Timeout_?(this.xhr_.timeout=this.timeoutInterval_,this.xhr_.ontimeout=t(this.timeout_,this)):this.timeoutId_=hi(this.timeout_,this.timeoutInterval_,this)),$h(this.logger_,oi(this,"Sending request")),this.inSend_=!0,this.xhr_.send(a),this.inSend_=
!1}catch(h){$h(this.logger_,oi(this,"Send error: "+h.message)),this.error_(5,h)}};var qi=function(a){return B&&"number"===typeof a.timeout&&void 0!==a.ontimeout};J.prototype.timeout_=function(){"undefined"!=typeof xa&&this.xhr_&&(this.lastError_="Timed out after "+this.timeoutInterval_+"ms, aborting",$h(this.logger_,oi(this,this.lastError_)),this.dispatchEvent("timeout"),this.abort(8))};
J.prototype.error_=function(a,b){this.active_=!1;this.xhr_&&(this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1);this.lastError_=b;ri(this);si(this)};var ri=function(a){a.errorDispatched_||(a.errorDispatched_=!0,a.dispatchEvent("complete"),a.dispatchEvent("error"))};J.prototype.abort=function(){this.xhr_&&this.active_&&($h(this.logger_,oi(this,"Aborting")),this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1,this.dispatchEvent("complete"),this.dispatchEvent("abort"),si(this))};
J.prototype.disposeInternal=function(){this.xhr_&&(this.active_&&(this.active_=!1,this.inAbort_=!0,this.xhr_.abort(),this.inAbort_=!1),si(this,!0));J.superClass_.disposeInternal.call(this)};J.prototype.onReadyStateChange_=function(){if(!this.disposed_)if(this.inOpen_||this.inSend_||this.inAbort_)ti(this);else this.onReadyStateChangeEntryPoint_()};J.prototype.onReadyStateChangeEntryPoint_=function(){ti(this)};
var ti=function(a){if(a.active_&&"undefined"!=typeof xa)if(a.xhrOptions_[1]&&4==ui(a)&&2==vi(a))$h(a.logger_,oi(a,"Local request error detected and ignored"));else if(a.inSend_&&4==ui(a))hi(a.onReadyStateChange_,0,a);else if(a.dispatchEvent("readystatechange"),4==ui(a)){$h(a.logger_,oi(a,"Request complete"));a.active_=!1;try{var b=vi(a);a:switch(b){case 200:case 201:case 202:case 204:case 206:case 304:case 1223:var c=!0;break a;default:c=!1}var d;if(!(d=c)){var e;if(e=0===b){var g=String(a.lastUri_).match(ii)[1]||
null;!g&&m.self&&m.self.location&&(g=m.self.location.protocol.slice(0,-1));e=!ki.test(g?g.toLowerCase():"")}d=e}if(d)a.dispatchEvent("complete"),a.dispatchEvent("success");else{try{var h=2<ui(a)?a.xhr_.statusText:""}catch(k){$h(a.logger_,"Can not get status: "+k.message),h=""}a.lastError_=h+" ["+vi(a)+"]";ri(a)}}finally{si(a)}}};
J.prototype.onProgressHandler_=function(a,b){x("progress"===a.type,"goog.net.EventType.PROGRESS is of the same type as raw XHR progress.");this.dispatchEvent(wi(a,"progress"));this.dispatchEvent(wi(a,b?"downloadprogress":"uploadprogress"))};
var wi=function(a,b){return{type:b,lengthComputable:a.lengthComputable,loaded:a.loaded,total:a.total}},si=function(a,b){if(a.xhr_){pi(a);var c=a.xhr_,d=a.xhrOptions_[0]?function(){}:null;a.xhr_=null;a.xhrOptions_=null;b||a.dispatchEvent("ready");try{c.onreadystatechange=d}catch(e){Zh(a.logger_,"Problem encountered resetting onreadystatechange: "+e.message)}}},pi=function(a){a.xhr_&&a.useXhr2Timeout_&&(a.xhr_.ontimeout=null);a.timeoutId_&&(m.clearTimeout(a.timeoutId_),a.timeoutId_=null)};
J.prototype.isActive=function(){return!!this.xhr_};var ui=function(a){return a.xhr_?a.xhr_.readyState:0},vi=function(a){try{return 2<ui(a)?a.xhr_.status:-1}catch(b){return-1}},xi=function(a){try{return a.xhr_?a.xhr_.responseText:""}catch(b){return $h(a.logger_,"Can not get responseText: "+b.message),""}};J.prototype.getResponseHeader=function(a){if(this.xhr_&&4==ui(this))return a=this.xhr_.getResponseHeader(a),null===a?void 0:a};
J.prototype.getAllResponseHeaders=function(){return this.xhr_&&2<=ui(this)?this.xhr_.getAllResponseHeaders()||"":""};var oi=function(a,b){return b+" ["+a.lastMethod_+" "+a.lastUri_+" "+vi(a)+"]"};var zi=function(a,b){var c=Array.prototype.slice.call(arguments),d=c.shift();if("undefined"==typeof d)throw Error("[goog.string.format] Template required");return d.replace(/%([0\- \+]*)(\d+)?(\.(\d+))?([%sfdiu])/g,function(e,g,h,k,l,n,p,r){if("%"==n)return"%";var w=c.shift();if("undefined"==typeof w)throw Error("[goog.string.format] Not enough arguments");arguments[0]=w;return yi[n].apply(null,arguments)})},yi={s:function(a,b,c){return isNaN(c)||""==c||a.length>=Number(c)?a:a=-1<b.indexOf("-",0)?
a+se(" ",Number(c)-a.length):se(" ",Number(c)-a.length)+a},f:function(a,b,c,d,e){d=a.toString();isNaN(e)||""==e||(d=parseFloat(a).toFixed(e));var g=0>Number(a)?"-":0<=b.indexOf("+")?"+":0<=b.indexOf(" ")?" ":"";0<=Number(a)&&(d=g+d);if(isNaN(c)||d.length>=Number(c))return d;d=isNaN(e)?Math.abs(Number(a)).toString():Math.abs(Number(a)).toFixed(e);a=Number(c)-d.length-g.length;return d=0<=b.indexOf("-",0)?g+d+se(" ",a):g+se(0<=b.indexOf("0",0)?"0":" ",a)+d},d:function(a,b,c,d,e,g,h,k){return yi.f(parseInt(a,
10),b,c,d,0,g,h,k)}};yi.i=yi.d;yi.u=yi.d;var Ai=function(a){this.domain_=this.userInfo_=this.scheme_="";this.port_=null;this.fragment_=this.path_="";this.ignoreCase_=this.isReadOnly_=!1;if(a instanceof Ai){this.ignoreCase_=a.ignoreCase_;Bi(this,a.scheme_);var b=a.userInfo_;K(this);this.userInfo_=b;b=a.domain_;K(this);this.domain_=b;Ci(this,a.port_);b=a.path_;K(this);this.path_=b;Di(this,a.queryData_.clone());a=a.fragment_;K(this);this.fragment_=a}else a&&(b=String(a).match(ii))?(this.ignoreCase_=!1,Bi(this,b[1]||"",!0),a=b[2]||"",K(this),
this.userInfo_=Ei(a),a=b[3]||"",K(this),this.domain_=Ei(a,!0),Ci(this,b[4]),a=b[5]||"",K(this),this.path_=Ei(a,!0),Di(this,b[6]||"",!0),a=b[7]||"",K(this),this.fragment_=Ei(a)):(this.ignoreCase_=!1,this.queryData_=new Fi(null,this.ignoreCase_))};
Ai.prototype.toString=function(){var a=[],b=this.scheme_;b&&a.push(Gi(b,Hi,!0),":");var c=this.domain_;if(c||"file"==b)a.push("//"),(b=this.userInfo_)&&a.push(Gi(b,Hi,!0),"@"),a.push(encodeURIComponent(String(c)).replace(/%25([0-9a-fA-F]{2})/g,"%$1")),c=this.port_,null!=c&&a.push(":",String(c));if(c=this.path_)this.domain_&&"/"!=c.charAt(0)&&a.push("/"),a.push(Gi(c,"/"==c.charAt(0)?Ii:Ji,!0));(c=this.queryData_.toString())&&a.push("?",c);(c=this.fragment_)&&a.push("#",Gi(c,Ki));return a.join("")};
Ai.prototype.resolve=function(a){var b=this.clone(),c=!!a.scheme_;c?Bi(b,a.scheme_):c=!!a.userInfo_;if(c){var d=a.userInfo_;K(b);b.userInfo_=d}else c=!!a.domain_;c?(d=a.domain_,K(b),b.domain_=d):c=null!=a.port_;d=a.path_;if(c)Ci(b,a.port_);else if(c=!!a.path_){if("/"!=d.charAt(0))if(this.domain_&&!this.path_)d="/"+d;else{var e=b.path_.lastIndexOf("/");-1!=e&&(d=b.path_.slice(0,e+1)+d)}e=d;if(".."==e||"."==e)d="";else if(Ib(e,"./")||Ib(e,"/.")){d=0==e.lastIndexOf("/",0);e=e.split("/");for(var g=[],
h=0;h<e.length;){var k=e[h++];"."==k?d&&h==e.length&&g.push(""):".."==k?((1<g.length||1==g.length&&""!=g[0])&&g.pop(),d&&h==e.length&&g.push("")):(g.push(k),d=!0)}d=g.join("/")}else d=e}c?(K(b),b.path_=d):c=""!==a.queryData_.toString();c?Di(b,a.queryData_.clone()):c=!!a.fragment_;c&&(a=a.fragment_,K(b),b.fragment_=a);return b};Ai.prototype.clone=function(){return new Ai(this)};
var Bi=function(a,b,c){K(a);a.scheme_=c?Ei(b,!0):b;a.scheme_&&(a.scheme_=a.scheme_.replace(/:$/,""))},Ci=function(a,b){K(a);if(b){b=Number(b);if(isNaN(b)||0>b)throw Error("Bad port number "+b);a.port_=b}else a.port_=null},Di=function(a,b,c){K(a);b instanceof Fi?(a.queryData_=b,a.queryData_.setIgnoreCase(a.ignoreCase_)):(c||(b=Gi(b,Li)),a.queryData_=new Fi(b,a.ignoreCase_))};Ai.prototype.getQuery=function(){return this.queryData_.toString()};
Ai.prototype.removeParameter=function(a){K(this);this.queryData_.remove(a);return this};var K=function(a){if(a.isReadOnly_)throw Error("Tried to modify a read-only Uri");};Ai.prototype.setIgnoreCase=function(a){this.ignoreCase_=a;this.queryData_&&this.queryData_.setIgnoreCase(a)};
var Ei=function(a,b){return a?b?decodeURI(a.replace(/%25/g,"%2525")):decodeURIComponent(a):""},Gi=function(a,b,c){return"string"===typeof a?(a=encodeURI(a).replace(b,Mi),c&&(a=a.replace(/%25([0-9a-fA-F]{2})/g,"%$1")),a):null},Mi=function(a){a=a.charCodeAt(0);return"%"+(a>>4&15).toString(16)+(a&15).toString(16)},Hi=/[#\/\?@]/g,Ji=/[#\?:]/g,Ii=/[#\?]/g,Li=/[#\?@]/g,Ki=/#/g,Fi=function(a,b){this.count_=this.keyMap_=null;this.encodedQuery_=a||null;this.ignoreCase_=!!b},Ni=function(a){a.keyMap_||(a.keyMap_=
new Map,a.count_=0,a.encodedQuery_&&ji(a.encodedQuery_,function(b,c){a.add(decodeURIComponent(b.replace(/\+/g," ")),c)}))};f=Fi.prototype;f.getCount=function(){Ni(this);return this.count_};f.add=function(a,b){Ni(this);this.encodedQuery_=null;a=Oi(this,a);var c=this.keyMap_.get(a);c||this.keyMap_.set(a,c=[]);c.push(b);this.count_=Oa(this.count_)+1;return this};
f.remove=function(a){Ni(this);a=Oi(this,a);return this.keyMap_.has(a)?(this.encodedQuery_=null,this.count_=Oa(this.count_)-this.keyMap_.get(a).length,this.keyMap_.delete(a)):!1};f.clear=function(){this.keyMap_=this.encodedQuery_=null;this.count_=0};f.containsKey=function(a){Ni(this);a=Oi(this,a);return this.keyMap_.has(a)};f.containsValue=function(a){var b=this.getValues();return cb(b,a)};
f.forEach=function(a,b){Ni(this);this.keyMap_.forEach(function(c,d){c.forEach(function(e){a.call(b,e,d,this)},this)},this)};f.getKeys=function(){Ni(this);for(var a=Array.from(this.keyMap_.values()),b=Array.from(this.keyMap_.keys()),c=[],d=0;d<b.length;d++)for(var e=a[d],g=0;g<e.length;g++)c.push(b[d]);return c};
f.getValues=function(a){Ni(this);var b=[];if("string"===typeof a)this.containsKey(a)&&(b=b.concat(this.keyMap_.get(Oi(this,a))));else{a=Array.from(this.keyMap_.values());for(var c=0;c<a.length;c++)b=b.concat(a[c])}return b};f.set=function(a,b){Ni(this);this.encodedQuery_=null;a=Oi(this,a);this.containsKey(a)&&(this.count_=Oa(this.count_)-this.keyMap_.get(a).length);this.keyMap_.set(a,[b]);this.count_=Oa(this.count_)+1;return this};
f.get=function(a,b){if(!a)return b;a=this.getValues(a);return 0<a.length?String(a[0]):b};f.toString=function(){if(this.encodedQuery_)return this.encodedQuery_;if(!this.keyMap_)return"";for(var a=[],b=Array.from(this.keyMap_.keys()),c=0;c<b.length;c++){var d=b[c],e=encodeURIComponent(String(d));d=this.getValues(d);for(var g=0;g<d.length;g++){var h=e;""!==d[g]&&(h+="="+encodeURIComponent(String(d[g])));a.push(h)}}return this.encodedQuery_=a.join("&")};
f.clone=function(){var a=new Fi;a.encodedQuery_=this.encodedQuery_;this.keyMap_&&(a.keyMap_=new Map(this.keyMap_),a.count_=this.count_);return a};var Oi=function(a,b){b=String(b);a.ignoreCase_&&(b=b.toLowerCase());return b};
Fi.prototype.setIgnoreCase=function(a){a&&!this.ignoreCase_&&(Ni(this),this.encodedQuery_=null,this.keyMap_.forEach(function(b,c){var d=c.toLowerCase();c!=d&&(this.remove(c),this.remove(d),0<b.length&&(this.encodedQuery_=null,this.keyMap_.set(Oi(this,d),gb(b)),this.count_=Oa(this.count_)+b.length))},this));this.ignoreCase_=a};Fi.prototype.extend=function(a){for(var b=0;b<arguments.length;b++)Pg(arguments[b],function(c,d){this.add(d,c)},this)};var Pi=function(a,b){this.serverUrl_=a;this.maxPostLength_=b};Pi.prototype.send=function(a,b){if(!navigator.onLine)return $f();var c=new H;a=Qi(a,b);a.length>this.maxPostLength_?c.errback({status:"payload-too-big",details:zi("Encoded hit length == %s, but should be <= %s.",a.length,this.maxPostLength_)}):ni(this.serverUrl_,function(){c.callback(Eh)},"POST",a);return c};var Qi=function(a,b){var c=new Fi;c.add(tg.name,a);Sg(b,function(d,e){c.add(d.name,e.toString())});return c.toString()};var Ri=function(a){y.call(this);this.handler_=a;this.keys_={}};v(Ri,y);var Si=[];Ri.prototype.listen=function(a,b,c,d){Array.isArray(b)||(b&&(Si[0]=b.toString()),b=Si);for(var e=0;e<b.length;e++){var g=ad(a,b[e],c||this.handleEvent,d||!1,this.handler_||this);if(!g)break;this.keys_[g.key]=g}return this};Ri.prototype.listenOnce=function(a,b,c,d){return Ti(this,a,b,c,d)};
var Ti=function(a,b,c,d,e,g){if(Array.isArray(c))for(var h=0;h<c.length;h++)Ti(a,b,c[h],d,e,g);else{b=$c(b,c,d||a.handleEvent,e,g||a.handler_||a);if(!b)return a;a.keys_[b.key]=b}return a};
Ri.prototype.unlisten=function(a,b,c,d,e){if(Array.isArray(b))for(var g=0;g<b.length;g++)this.unlisten(a,b[g],c,d,e);else c=c||this.handleEvent,d=q(d)?!!d.capture:!!d,e=e||this.handler_||this,c=bd(c),d=!!d,b=Cc(a)?a.getListener(b,c,d,e):a?(a=dd(a))?a.getListener(b,c,d,e):null:null,b&&(id(b),delete this.keys_[b.key]);return this};Ri.prototype.removeAll=function(){Gc(this.keys_,function(a,b){this.keys_.hasOwnProperty(b)&&id(a)},this);this.keys_={}};
Ri.prototype.disposeInternal=function(){Ri.superClass_.disposeInternal.call(this);this.removeAll()};Ri.prototype.handleEvent=function(){throw Error("EventHandler.handleEvent not implemented");};var Ui=function(){I.call(this);this.eventHandler_=new Ri(this);this.eventHandler_.listen(m,["online","offline"],this.handleChange_)};v(Ui,I);Ui.prototype.handleChange_=function(){this.dispatchEvent(navigator.onLine?"online":"offline")};Ui.prototype.disposeInternal=function(){Ui.superClass_.disposeInternal.call(this);this.eventHandler_.dispose();this.eventHandler_=null};var Xg=function(a){this.settings_=a;this.serverAddress_="https://www.google-analytics.com/collect";this.maxPostLength_=8192};Xg.prototype.getChannel=function(){if(!this.channel_){if(!fh(this.settings_).fired_)throw Error("Cannot construct shared channel prior to settings being ready.");new Ui;var a=new zh(new Pi(this.serverAddress_,this.maxPostLength_)),b=new Gh;this.channel_=new yh(this.settings_,new Hh(this.settings_,new Fh(b,a)))}return this.channel_};var Vi=new pg,Vg=function(){ag||(ag=new ph);return ag};var L={},Wi=function(){var a;if(!(a=this.analyticsService_)){a=Vi.get("cros_recovery_tool",null);var b=chrome.runtime.getManifest().version;null===a&&(a=new Yg(b),Vi.set("cros_recovery_tool",a))}this.analyticsService_=a;(a=this.tracker_)||(b=this.analyticsService_,a=new Tg(b.channelFactory_.create()),a.set(Dg,b.libVersion_),a.set(yg,1),a.set(zg,b.appName_),a.set(Ag,b.appVersion_),a.set(Hg,"UA-51966559-1"),(b=navigator.language||navigator.browserLanguage)&&a.set(Cg,b),(b=screen.colorDepth+"-bit")&&
a.set(Fg,b),(b=[screen.width,screen.height].join("x"))&&a.set(Gg,b),b=Fe(window),(b=[b.width,b.height].join("x"))&&a.set(Ig,b));this.tracker_=a;chrome.metricsPrivate&&chrome.metricsPrivate.getIsCrashReportingEnabled?chrome.metricsPrivate.getIsCrashReportingEnabled(this.initAnalytics_):this.initAnalytics_(!1)};
Wi.prototype.initAnalytics_=function(a){this.analyticsService_&&Tf(fh(this.analyticsService_.settings_),function(b){th(b);var c=b.permitted_!=a;b.permitted_=a;b.storage_.set("analytics.tracking-permitted",a.toString());c&&vh(b,"analytics.tracking-permitted")})};Wi.prototype.sendTiming=function(a,b){this.tracker_.sendTiming("recovery_timing",a,b)};L.GoogleAnalytics=Wi;var Xi=function(a){this.map_=new pg;this.size=0;a&&this.addAll(a)},Yi=function(a){var b=typeof a;return"object"==b&&a||"function"==b?"o"+Da(a):b.slice(0,1)+a};f=Xi.prototype;f.getCount=function(){return this.map_.size};f.add=function(a){this.map_.set(Yi(a),a);this.setSizeInternal_(this.map_.size)};f.addAll=function(a){a=Ng(a);for(var b=a.length,c=0;c<b;c++)this.add(a[c]);this.setSizeInternal_(this.map_.size)};f.removeAll=function(a){a=Ng(a);for(var b=a.length,c=0;c<b;c++)this.remove(a[c]);this.setSizeInternal_(this.map_.size)};
f.delete=function(a){a=this.map_.remove(Yi(a));this.setSizeInternal_(this.map_.size);return a};f.remove=function(a){return this.delete(a)};f.clear=function(){this.map_.clear();this.setSizeInternal_(0)};f.has=function(a){return this.map_.containsKey(Yi(a))};f.contains=function(a){return this.map_.containsKey(Yi(a))};f.intersection=function(a){var b=new Xi;a=Ng(a);for(var c=0;c<a.length;c++){var d=a[c];this.contains(d)&&b.add(d)}};f.getValues=function(){return this.map_.getValues()};f.values=function(){return this.map_.values()};
f.clone=function(){return new Xi(this)};f.equals=function(a){return this.getCount()==Mg(a)&&Zi(this,a)};var Zi=function(a,b){var c=Mg(b);if(a.getCount()>c)return!1;!(b instanceof Xi)&&5<c&&(b=new Xi(b));return Qg(a,function(d){var e=b;return e.contains&&"function"==typeof e.contains?e.contains(d):e.containsValue&&"function"==typeof e.containsValue?e.containsValue(d):Aa(e)||"string"===typeof e?cb(e,d):Kc(e,d)})};Xi.prototype.__iterator__=function(){return this.map_.__iterator__(!1)};
Xi.prototype[Symbol.iterator]=function(){return this.values()};Xi.prototype.setSizeInternal_=function(a){this.size=a};L.AppConfig={};L.Capabilities={};L.DeviceInfo={};L.DeviceInfoDummy={};L.RecoveryChannel={STABLE:"RECOVERY_CHANNEL_STABLE",BETA:"RECOVERY_CHANNEL_BETA",DEV:"RECOVERY_CHANNEL_DEV",LTS:"RECOVERY_CHANNEL_LTS",LTC:"RECOVERY_CHANNEL_LTC"};L.Platform={LINUX:"Linux",CHROMEOS:"CrOS",MAC:"Mac",WIN:"Windows",OTHER:"Unknown Platform"};L.Stage={UNKNOWN:"unknown",DOWNLOAD:"download",VERIFY_DOWNLOAD:"verifyDownload",UNZIP:"unzip",WRITE:"write",VERIFY_WRITE:"verifyWrite",COMPLETE:"complete"};
L.Runtime={CHROME_APP:"chromeApp",EXTENSION:"extension"};L.ImageWriterPrivateStub=function(){this.onDeviceAttached=new L.ChromeEventStub;this.onDeviceRemoved=new L.ChromeEventStub;this.onWriteProgress=new L.ChromeEventStub;this.onWriteComplete=new L.ChromeEventStub;this.onWriteError=new L.ChromeEventStub;this.firstDrive_=0;this.numExposedDrives=2;this.progressIntervalId_=null;this.progressStage_=L.Stage.UNKNOWN;this.progressPercent_=0;this.stagesRemaining_=[];this.failOnStage_=this.writeDrive_=null;this.failOnPercent_=0;this.failureErrorMessage_="TESTING"};
f=L.ImageWriterPrivateStub.prototype;f.listRemovableStorageDevices=function(a){for(var b=[],c=0;c<this.numExposedDrives;c++)b.push(Pc(L.ImageWriterPrivateStub.DRIVES_[(this.firstDrive_+c)%L.ImageWriterPrivateStub.DRIVES_.length]));window.setTimeout(function(){a(b)},L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_)};
f.writeFromUrl=function(a,b,c,d){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[L.Stage.DOWNLOAD,L.Stage.VERIFY_DOWNLOAD,L.Stage.UNZIP,L.Stage.WRITE,L.Stage.VERIFY_WRITE,L.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(t(this.makeProgress_,this),L.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(d,L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};
f.writeFromFile=function(a,b,c){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[L.Stage.WRITE,L.Stage.VERIFY_WRITE,L.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(t(this.makeProgress_,this),L.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(c,L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};f.cancelWrite=function(a){$i(this);window.setTimeout(a,L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_)};
f.destroyPartitions=function(a,b){this.writeDrive_||(this.writeDrive_=a,this.stagesRemaining_=[L.Stage.WRITE,L.Stage.COMPLETE],this.progressIntervalId_=window.setInterval(t(this.makeProgress_,this),L.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_),window.setTimeout(b,L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_))};
var aj=function(a){return{stage:a.progressStage_,percentComplete:a.progressPercent_}},$i=function(a){window.clearInterval(a.progressIntervalId_);a.writeDrive_=null;a.progressStage_=L.Stage.UNKNOWN;a.progressPercent_=0;a.stagesRemaining_=[]};
L.ImageWriterPrivateStub.prototype.makeProgress_=function(){this.progressStage_==L.Stage.UNKNOWN&&(this.progressStage_=this.stagesRemaining_.shift(),this.progressPercent_=0);this.progressStage_==L.Stage.COMPLETE?(this.onWriteComplete.trigger(aj(this)),$i(this)):this.failOnStage_==this.progressStage_&&this.progressPercent_>=this.failOnPercent_?(this.onWriteError.trigger(aj(this),this.failureErrorMessage_),$i(this)):(this.onWriteProgress.trigger(aj(this)),this.progressPercent_+=L.ImageWriterPrivateStub.PROGRESS_UPDATE_STEP_,
100<this.progressPercent_&&(this.progressStage_=this.stagesRemaining_.shift(),this.progressPercent_=0))};L.ImageWriterPrivateStub.CALLBACK_DELAY_MS_=10;L.ImageWriterPrivateStub.DRIVE_ROTATION_DELAY_MS_=1E4;L.ImageWriterPrivateStub.PROGRESS_UPDATE_DELAY_MS_=50;L.ImageWriterPrivateStub.PROGRESS_UPDATE_STEP_=10;
L.ImageWriterPrivateStub.DRIVES_=[{capacity:7803174912,model:"DataTraveler 2.0",storageUnitId:"/dev/sdb",vendor:"Kingston"},{capacity:3901587456,model:"Cruzer",storageUnitId:"/dev/sdc",vendor:"SanDisk"},{capacity:3901587456,model:"Store 'n' Go",storageUnitId:"/dev/sdd",vendor:"Verbatim"},{capacity:215606349824,model:"Extreme",storageUnitId:"/dev/sde",vendor:"SanDisk"}];L.ChromeEventStub=function(){this.listeners_=[]};f=L.ChromeEventStub.prototype;
f.trigger=function(a){var b=arguments;this.listeners_.forEach(function(c){c.apply(void 0,b)})};f.addListener=function(a){this.listeners_.push(a)};f.removeListener=function(a){fb(this.listeners_,a)};f.hasListener=function(a){return 0<=this.listeners_.indexOf(a)};f.hasListeners=function(){return 0<this.listeners_.length};L.logger=Wh(Xh(),"recovery").logger;L.recoveryChannelOrder={};L.recoveryChannelOrder[L.RecoveryChannel.STABLE]=0;L.recoveryChannelOrder[L.RecoveryChannel.BETA]=1;L.recoveryChannelOrder[L.RecoveryChannel.DEV]=2;L.recoveryChannelOrder[L.RecoveryChannel.LTS]=3;L.recoveryChannelOrder[L.RecoveryChannel.LTC]=4;L.installImageWriterStub=function(){chrome.imageWriterPrivate=new L.ImageWriterPrivateStub;var a=L.logger;a&&Yh(a,Mh,"You are using the ImageWriterPrivate stub API.")};
chrome.imageWriterPrivate||L.installImageWriterStub();
L.probeCapabilities=function(){for(var a=parseInt,b=1,c=Xb().split("."),d=[];0<b&&c.length;)d.push(c.shift()),b--;c.length&&d.push(c.join("."));a=a(d[0],10);isNaN(a)&&(a=0);b=L.Platform.OTHER;(Yb()?"Chrome OS"===Mb.platform:z("CrOS"))?b=L.Platform.CHROMEOS:(Yb()?"Linux"===Mb.platform:z("Linux"))?b=L.Platform.LINUX:ac()?b=L.Platform.MAC:bc()&&(b=L.Platform.WIN);return{platform:b,writeImage:b==L.Platform.CHROMEOS||b==L.Platform.WIN||b==L.Platform.MAC&&37<=a,destroyPartitions:36<=a,saveAsDownload:!1,
runtime:chrome.app&&chrome.app.window?L.Runtime.CHROME_APP:L.Runtime.EXTENSION}};L.CAPABILITIES=L.probeCapabilities();var bj="OnHub"==window.appType||"?OnHub"==window.location.search,cj="WorkspaceHardware"==window.appType||"?WorkspaceHardware"==window.location.search,dj="ChromeOSFlex"==window.appType||"?ChromeOSFlex"==window.location.search;console.log("App running in OnHub mode:"+bj);
L.appConfig=bj?{messageCatalogPostfix:"_ON_HUB",recovery_config_urls:["https://dl.google.com/dl/edgedl/chromeos/recovery/onhub_recovery.json"],imageMap:{"OnHub TGR 1900":"img/devices/whirlwind.jpg","OnHub SRT-AC1900":"img/devices/arkham.jpg"},analyticsAppType:L.GoogleAnalytics.appType.ONHUB,allowPopulateUsingModelNumber:!1,sampleHwid:"WHIRLWIND A-C 1126",allowSelectByHwid:!1,selectByModelFirst:!0,selectSingleImage:!1}:cj?{messageCatalogPostfix:"_WORKSPACE_HARDWARE",recovery_config_urls:["https://dl.google.com/dl/edgedl/chromeos/recovery/workspaceHardware_recovery2.json"],
imageMap:{"Acer Chromebase 24":"img/devices/buddy.png","Meet Compute System - Series One":"img/devices/endeavour.png","Asus Meet Compute System":"img/devices/excelsior.png","CTL Meet Compute System":"img/devices/excelsior.png","ASUS Chromebox 3 (CN65)":"img/devices/teemo.png","CTL Chromebox CBx1":"img/devices/wukong.png","Acer Chromebase CA24I2":"img/devices/karma.png"},analyticsAppType:L.GoogleAnalytics.appType.WORKSPACE_HARDWARE,allowPopulateUsingModelNumber:!1,sampleHwid:"ENDEAVOUR A-C 1126",allowSelectByHwid:!0,
selectByModelFirst:!1,selectSingleImage:!1}:dj?{messageCatalogPostfix:"_CHROMEOS_FLEX",recovery_config_urls:["https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json"],imageMap:{"Chrome OS Flex":"img/devices/reven.png"},analyticsAppType:L.GoogleAnalytics.appType.CHROMEOS_FLEX,allowPopulateUsingModelNumber:!1,sampleHwid:"REVEN-ANAE A6A-A7I",allowSelectByHwid:!1,selectByModelFirst:!1,selectSingleImage:!0}:{messageCatalogPostfix:"",recovery_config_urls:["https://dl.google.com/dl/edgedl/chromeos/recovery/recovery2.json",
"https://dl.google.com/dl/edgedl/chromeos/recovery/cloudready_recovery2.json"],imageMap:{"Acer C7 Chromebook":"img/devices/parrot.jpg","Acer C7 Chromebook IVB":"img/devices/parrot.jpg","Acer AC700-1099 Wifi":"img/devices/zgb.jpg","Acer AC700-1529 3G":"img/devices/zgb.jpg","Acer C720 Chromebook":"img/devices/peppy.jpg","ASUS Chromebox":"img/devices/panther.jpg","Cr-48":"img/devices/mario.jpg","Dell Chromebook 11":"img/devices/wolf.jpg","Google Chromebook Pixel":"img/devices/link.jpg","HP Pavilion Chromebook 14":"img/devices/butterfly.jpg",
"HP Chromebook 14 q000-q099 / HP Chromebook 14-SMB Atheros":"img/devices/falco.jpg","HP Chromebook 14 q000-q099 WP2 / HP Chromebook 14-SMB Intel Corp":"img/devices/falco.jpg","HP Chromebook 11 1100-1199 / HP Chromebook 11 G1":"img/devices/spring.jpg","HP Chromebox CB1-(000-099) / HP Chromebox G1":"img/devices/zako.jpg","Lenovo Thinkpad X131e Chromebook":"img/devices/stout.jpg","Samsung Chromebook":"img/devices/snow.jpg","Samsung Chromebook Series 5 Non-US-Wifi":"img/devices/alex.jpg","Samsung Chromebook Series 5 Non-US 3G":"img/devices/alex.jpg",
"Samsung Chromebook Series 5 US-Wifi":"img/devices/alex.jpg","Samsung Chromebook Series 5 US-3G":"img/devices/alex.jpg","Samsung Chromebook Series 5 550":"img/devices/lumpy.jpg","Samsung Chromebox Series 3":"img/devices/stumpy.jpg","Toshiba Chromebook":"img/devices/leon.jpg"},analyticsAppType:L.GoogleAnalytics.appType.CHROMEBOOK,allowPopulateUsingModelNumber:!0,sampleHwid:"LINK DALE A-C 1126",allowSelectByHwid:!0,selectByModelFirst:!1,selectSingleImage:!1};u("recovery.appConfig",L.appConfig);
L.DUMMY_DEVICE={name:"",photourl:"img/devices/unknown.png",sampleHwid:"DUMMY"};u("recovery.DUMMY_DEVICE",L.DUMMY_DEVICE);L.UNKNOWN_DEVICE_IMAGE="img/devices/unknown.png";u("recovery.UNKNOWN_DEVICE_IMAGE",L.UNKNOWN_DEVICE_IMAGE);L.RECOVERY_CONFIG_URLS=L.appConfig.recovery_config_urls;u("recovery.RECOVERY_CONFIG_URLS",L.RECOVERY_CONFIG_URLS);L.devices=[];u("recovery.devices",L.devices);L.oems={};u("recovery.oems",L.oems);L.imageMap=L.appConfig.imageMap;u("recovery.imageMap",L.imageMap);
L.getMatchingDevice=function(a){var b=L.devices.filter(function(c){return c.hwidMatchRegExp&&c.hwidMatchRegExp.test(a)});return 1==b.length?b[0]:null};L.isValidModelFamilyPrefix=function(a){for(var b=0;b<L.devices.length;b++)for(var c=L.devices[b].modelFamilies.getValues(),d=0;d<c.length;d++){var e=c[d];if(0==a.lastIndexOf(e,0)||0==e.lastIndexOf(a,0))return!0}return!1};
L.getDeviceAnalyticsModel=function(a){var b=null;a&&a.hwidMatchRegExp&&a.hwidMatchRegExp.source&&(a=/^\^?(\w+) .*/.exec(a.hwidMatchRegExp.source))&&1<a.length&&(b=a[1]);return b};L.controllers={};
var hj=function(a){a.app=this;this.applyScope_=t(a.$apply,a);this.platform=L.CAPABILITIES.platform;this.writeParams={device:L.DUMMY_DEVICE,target:null,recoveryChannel:null,saveAsDownload:!1};this.sortedAvailableRecoveryChannels=[];this.userHwid="";this.writeErrorCode=this.selectedSku=this.selectedOem=null;this.writeCancelled=!1;this.enableAdvancedSettings=!0;this.step=null;this.allowLocalFile=this.allowErase=!0;this.selectSingleImage=L.appConfig.selectSingleImage;this.userFeedbackFormFeatureEnabled=!1;
this.online=navigator.onLine;this.ga=ej(this);chrome.chromeosInfoPrivate&&chrome.chromeosInfoPrivate.get(["hwid"],t(function(){this.applyScope_()},this));this.startTime=Date.now();L.CAPABILITIES.writeImage?this.online&&fj(this):(gj(this),this.step=null,Ug(this.ga.tracker_,L.GoogleAnalytics.pageView.UNSUPPORTED_PAGE))},ej=function(a){var b=new L.GoogleAnalytics,c=chrome.runtime.getManifest().version;b.tracker_.set("dimension2",c);b.tracker_.set("dimension3",a.platform);a=window.navigator.appVersion.match(/Chrome\/([0-9.]*)/);
b.tracker_.set("dimension1",a?a[1]:"n/a");b.tracker_.set("dimension12",L.appConfig.analyticsAppType);Ug(b.tracker_,L.GoogleAnalytics.pageView.FIRST_PAGE);return b};hj.prototype.reset=function(){this.writeParams={device:L.DUMMY_DEVICE,target:null,recoveryChannel:null,saveAsDownload:!1};this.userHwid="";this.selectedSku=this.selectedOem=null;ij(this)};hj.prototype.close=function(){window.close();chrome.imageWriterPrivate.cancelWrite(function(){})};
var gj=function(a){a.writeErrorCode=null;a.writeCancelled=!1},jj=function(a){a=a.sortedAvailableRecoveryChannels;if(0<a.length)return a[0];console.warn("No channels found. Unexpected since there are recovery images.");return null},ij=function(a){gj(a);a.step=null;a.allowErase=!0;a.allowLocalFile=!0;a.enableAdvancedSettings=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.WELCOME_PAGE)},kj=function(a){gj(a);a.step=2;a.allowErase=!0;a.allowLocalFile=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.SELECT_TARGET_PAGE)},
lj=function(a){a.step=3;a.allowErase=!0;a.allowLocalFile=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.WRITE_CONFIRM_PAGE)};hj.prototype.writeImage=function(){gj(this);this.step=3;this.allowLocalFile=this.allowErase=!1;Ug(this.ga.tracker_,L.GoogleAnalytics.pageView.WRITE_PAGE)};var mj=function(a){a.writeParams.device.recoveryImages&&(a.sortedAvailableRecoveryChannels=Object.keys(a.writeParams.device.recoveryImages).sort(function(b,c){return L.recoveryChannelOrder[b]-L.recoveryChannelOrder[c]}))};
hj.prototype.sendFeedback=function(){chrome.runtime.sendMessage("gfdkimpbcpahaombhbimeihdjnejgicl",{requestFeedback:!0,feedbackInfo:{categoryTag:"chromeos-recovery-tool",description:"",systemInformation:[{key:"appVersion",value:chrome.runtime.getManifest().version}]}})};
var fj=function(a){L.RECOVERY_CONFIG_URLS.forEach(function(b){ni(b,hj.prototype.loadRecoveryJsonCallback_.bind(a))})},nj=function(a){var b={};switch(a.channel){case "LTR":b.channel=L.RecoveryChannel.LTS;break;case "LTC":b.channel=L.RecoveryChannel.LTC;break;case "DEV":case "dev-channel":b.channel=L.RecoveryChannel.DEV;break;case "BETA":case "beta-channel":b.channel=L.RecoveryChannel.BETA;break;default:b.channel=L.RecoveryChannel.STABLE}b.file=a.file;b.filesize=a.filesize;b.zipfilesize=a.zipfilesize;
b.url=a.url;b.md5=a.md5;b.sha1=a.sha1;b.chromeOsVersion=a.version;b.chromeVersion=a.chrome_version;return b};
hj.prototype.loadRecoveryJsonCallback_=function(a){a=a.target;if(200==vi(a)){try{var b=JSON.parse(xi(a))}catch(g){return}a={};b=ja(b);for(var c=b.next();!c.done;c=b.next())if(c=c.value,c.hwidmatch)if(Object.keys(a).includes(c.hwidmatch)){var d=a[c.hwidmatch],e=nj(c);Object.keys(d.recoveryImages).includes(c.channel)&&console.warn("Channel: "+e.channel+" has been previously encountered for "+c.hwidmatch+". Replacing.");d.recoveryImages[e.channel]=e}else d={},d.manufacturer=c.manufacturer.trim(),d.name=
c.name.trim(),d.model=c.model.trim(),d.desc=c.desc,d.hwidmatch=c.hwidmatch,d.photourl=c.photourl,d.recoveryImages={},c=nj(c),d.recoveryImages[c.channel]=c,d.modelFamilies=new Xi,d.hwidMatchRegExp=new RegExp(d.hwidmatch),(c=/^\^(\w+)/.exec(d.hwidmatch))&&1<c.length?d.modelFamilies.add(c[1]):console.warn('match pattern does not begin with "^": '+d.hwidmatch),L.oems[d.manufacturer]=L.oems[d.manufacturer]||{},L.oems[d.manufacturer][d.name]=d,L.devices.push(d),a[d.hwidmatch]=d;else console.warn("No hwidmatch for "+
c.name+". Skipping");this.ga.sendTiming(L.GoogleAnalytics.timingVar.DOWNLOAD_RECOVERY_JSON,Date.now()-this.startTime);this.applyScope_()}};u("recovery.controllers.AppController",hj);L.controllers.AppController=hj;var oj=function(){this.removeList_=[]};oj.prototype.add=function(a,b){a.addListener(b);this.removeList_.push(function(){a.removeListener(b)})};oj.prototype.removeAll=function(){this.removeList_.forEach(function(a){a()})};oj.prototype.removeAll=oj.prototype.removeAll;oj.prototype.add=oj.prototype.add;u("recovery.ListenerCollection",oj);L.ListenerCollection=oj;var pj=function(){};pj.prototype.reset=function(){};L.RateEstimator=pj;var qj={ACTIVEDESCENDANT:"activedescendant",ATOMIC:"atomic",AUTOCOMPLETE:"autocomplete",BUSY:"busy",CHECKED:"checked",COLINDEX:"colindex",CONTROLS:"controls",CURRENT:"current",DESCRIBEDBY:"describedby",DISABLED:"disabled",DROPEFFECT:"dropeffect",EXPANDED:"expanded",FLOWTO:"flowto",GRABBED:"grabbed",HASPOPUP:"haspopup",HIDDEN:"hidden",INVALID:"invalid",LABEL:"label",LABELLEDBY:"labelledby",LEVEL:"level",LIVE:"live",MULTILINE:"multiline",MULTISELECTABLE:"multiselectable",ORIENTATION:"orientation",OWNS:"owns",
POSINSET:"posinset",PRESSED:"pressed",READONLY:"readonly",RELEVANT:"relevant",REQUIRED:"required",ROWINDEX:"rowindex",SELECTED:"selected",SETSIZE:"setsize",SORT:"sort",VALUEMAX:"valuemax",VALUEMIN:"valuemin",VALUENOW:"valuenow",VALUETEXT:"valuetext"};var rj;var sj={ALERT:"alert",ALERTDIALOG:"alertdialog",APPLICATION:"application",ARTICLE:"article",BANNER:"banner",BUTTON:"button",CHECKBOX:"checkbox",COLUMNHEADER:"columnheader",COMBOBOX:"combobox",COMPLEMENTARY:"complementary",CONTENTINFO:"contentinfo",DEFINITION:"definition",DIALOG:"dialog",DIRECTORY:"directory",DOCUMENT:"document",FORM:"form",GRID:"grid",GRIDCELL:"gridcell",GROUP:"group",HEADING:"heading",IMG:"img",LINK:"link",LIST:"list",LISTBOX:"listbox",LISTITEM:"listitem",LOG:"log",MAIN:"main",MARQUEE:"marquee",
MATH:"math",MENU:"menu",MENUBAR:"menubar",MENUITEM:"menuitem",MENUITEMCHECKBOX:"menuitemcheckbox",MENUITEMRADIO:"menuitemradio",NAVIGATION:"navigation",NOTE:"note",OPTION:"option",PRESENTATION:"presentation",PROGRESSBAR:"progressbar",RADIO:"radio",RADIOGROUP:"radiogroup",REGION:"region",ROW:"row",ROWGROUP:"rowgroup",ROWHEADER:"rowheader",SCROLLBAR:"scrollbar",SEARCH:"search",SEPARATOR:"separator",SLIDER:"slider",SPINBUTTON:"spinbutton",STATUS:"status",TAB:"tab",TABLIST:"tablist",TABPANEL:"tabpanel",
TEXTBOX:"textbox",TEXTINFO:"textinfo",TIMER:"timer",TOOLBAR:"toolbar",TOOLTIP:"tooltip",TREE:"tree",TREEGRID:"treegrid",TREEITEM:"treeitem"};Tc("A AREA BUTTON HEAD INPUT LINK MENU META OPTGROUP OPTION PROGRESS STYLE SELECT SOURCE TEXTAREA TITLE TRACK".split(" "));
var tj="combobox grid group listbox menu menubar radiogroup row rowgroup tablist textbox toolbar tree treegrid".split(" "),uj=function(a,b){b?(x(Kc(sj,b),"No such ARIA role "+b),a.setAttribute("role",b)):a.removeAttribute("role")},M=function(a,b,c){Array.isArray(c)&&(c=c.join(" "));var d=vj(b);""===c||void 0==c?(rj||(c={},rj=(c.atomic=!1,c.autocomplete="none",c.dropeffect="none",c.haspopup=!1,c.live="off",c.multiline=!1,c.multiselectable=!1,c.orientation="vertical",c.readonly=!1,c.relevant="additions text",
c.required=!1,c.sort="none",c.busy=!1,c.disabled=!1,c.hidden=!1,c.invalid="false",c)),c=rj,b in c?a.setAttribute(d,c[b]):a.removeAttribute(d)):a.setAttribute(d,c)},wj=function(a,b){a=a.getAttribute(vj(b));return null==a||void 0==a?"":String(a)},xj=function(a){var b=wj(a,"activedescendant");return xe(a).getElementById(b)},yj=function(a,b){var c="";b&&(c=b.id,x(c,"The active element should have an id."));M(a,"activedescendant",c)},vj=function(a){x(a,"ARIA attribute cannot be empty.");x(Kc(qj,a),"No such ARIA attribute "+
a);return"aria-"+a};var zj=function(a){return"string"==typeof a.className?a.className:a.getAttribute&&a.getAttribute("class")||""},Aj=function(a){return a.classList?a.classList:zj(a).match(/\S+/g)||[]},Bj=function(a,b){"string"==typeof a.className?a.className=b:a.setAttribute&&a.setAttribute("class",b)},Cj=function(a,b){return a.classList?a.classList.contains(b):cb(Aj(a),b)},N=function(a,b){if(a.classList)a.classList.add(b);else if(!Cj(a,b)){var c=zj(a);Bj(a,c+(0<c.length?" "+b:b))}},Dj=function(a,b){if(a.classList)Array.prototype.forEach.call(b,
function(e){N(a,e)});else{var c={};Array.prototype.forEach.call(Aj(a),function(e){c[e]=!0});Array.prototype.forEach.call(b,function(e){c[e]=!0});b="";for(var d in c)b+=0<b.length?" "+d:d;Bj(a,b)}},Ej=function(a,b){a.classList?a.classList.remove(b):Cj(a,b)&&Bj(a,Array.prototype.filter.call(Aj(a),function(c){return c!=b}).join(" "))},Fj=function(a,b){a.classList?Array.prototype.forEach.call(b,function(c){Ej(a,c)}):Bj(a,Array.prototype.filter.call(Aj(a),function(c){return!cb(b,c)}).join(" "))},Gj=function(a,
b,c){c?N(a,b):Ej(a,b)};var Hj=function(a,b,c,d){this.top=a;this.right=b;this.bottom=c;this.left=d};f=Hj.prototype;f.getWidth=function(){return this.right-this.left};f.clone=function(){return new Hj(this.top,this.right,this.bottom,this.left)};f.toString=function(){return"("+this.top+"t, "+this.right+"r, "+this.bottom+"b, "+this.left+"l)"};
f.contains=function(a){return this&&a?a instanceof Hj?a.left>=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom:!1};f.expand=function(a,b,c,d){q(a)?(this.top-=a.top,this.right+=a.right,this.bottom+=a.bottom,this.left-=a.left):(this.top-=a,this.right+=Number(b),this.bottom+=Number(c),this.left-=Number(d));return this};
f.ceil=function(){this.top=Math.ceil(this.top);this.right=Math.ceil(this.right);this.bottom=Math.ceil(this.bottom);this.left=Math.ceil(this.left);return this};f.floor=function(){this.top=Math.floor(this.top);this.right=Math.floor(this.right);this.bottom=Math.floor(this.bottom);this.left=Math.floor(this.left);return this};f.round=function(){this.top=Math.round(this.top);this.right=Math.round(this.right);this.bottom=Math.round(this.bottom);this.left=Math.round(this.left);return this};
f.translate=function(a,b){a instanceof E?(this.left+=a.x,this.right+=a.x,this.top+=a.y,this.bottom+=a.y):(Oa(a),this.left+=a,this.right+=a,"number"===typeof b&&(this.top+=b,this.bottom+=b));return this};f.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.right*=a;this.top*=b;this.bottom*=b;return this};var Ij=function(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d};f=Ij.prototype;f.clone=function(){return new Ij(this.left,this.top,this.width,this.height)};f.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"};
f.intersection=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top);a=Math.min(this.top+this.height,a.top+a.height);d<=a&&(this.left=b,this.top=d,this.width=c-b,this.height=a-d)}};f.contains=function(a){return a instanceof E?a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height:this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height};
f.getSize=function(){return new le(this.width,this.height)};f.ceil=function(){this.left=Math.ceil(this.left);this.top=Math.ceil(this.top);this.width=Math.ceil(this.width);this.height=Math.ceil(this.height);return this};f.floor=function(){this.left=Math.floor(this.left);this.top=Math.floor(this.top);this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};
f.round=function(){this.left=Math.round(this.left);this.top=Math.round(this.top);this.width=Math.round(this.width);this.height=Math.round(this.height);return this};f.translate=function(a,b){a instanceof E?(this.left+=a.x,this.top+=a.y):(this.left+=Oa(a),"number"===typeof b&&(this.top+=b));return this};f.scale=function(a,b){b="number"===typeof b?b:a;this.left*=a;this.width*=a;this.top*=b;this.height*=b;return this};var O=function(a,b,c){if("string"===typeof b)(b=Jj(a,b))&&(a.style[b]=c);else for(var d in b){c=a;var e=b[d],g=Jj(c,d);g&&(c.style[g]=e)}},Kj={},Jj=function(a,b){var c=Kj[b];if(!c){var d=ue(b);c=d;void 0===a.style[d]&&(d=(hc?"Webkit":C?"Moz":B?"ms":null)+ve(d),void 0!==a.style[d]&&(c=d));Kj[b]=c}return c},Lj=function(a,b){var c=xe(a);return c.defaultView&&c.defaultView.getComputedStyle&&(a=c.defaultView.getComputedStyle(a,null))?a[b]||a.getPropertyValue(b)||"":""},Mj=function(a,b){return Lj(a,b)||
(a.currentStyle?a.currentStyle[b]:null)||a.style&&a.style[b]},Oj=function(a,b,c){if(b instanceof E){var d=b.x;b=b.y}else d=b,b=c;a.style.left=Nj(d,!1);a.style.top=Nj(b,!1)},Pj=function(a){try{return a.getBoundingClientRect()}catch(b){return{left:0,top:0,right:0,bottom:0}}},Qj=function(a){if(B&&!(8<=Number(yc)))return x(a&&"offsetParent"in a),a.offsetParent;var b=xe(a),c=Mj(a,"position"),d="fixed"==c||"absolute"==c;for(a=a.parentNode;a&&a!=b;a=a.parentNode)if(11==a.nodeType&&a.host&&(a=a.host),c=Mj(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))return a;return null},Sj=function(a){for(var b=new Hj(0,Infinity,Infinity,0),c=ye(a),d=c.document_.body,e=c.document_.documentElement,g=Ge(c.document_);a=Qj(a);)if(!(B&&0==a.clientWidth||hc&&0==a.clientHeight&&a==d)&&a!=d&&a!=e&&"visible"!=Mj(a,"overflow")){var h=Rj(a),k=new E(a.clientLeft,a.clientTop);h.x+=k.x;h.y+=k.y;b.top=Math.max(b.top,
h.y);b.right=Math.min(b.right,h.x+a.clientWidth);b.bottom=Math.min(b.bottom,h.y+a.clientHeight);b.left=Math.max(b.left,h.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=Fe(He(c.document_)||window);b.right=Math.min(b.right,d+c.width);b.bottom=Math.min(b.bottom,g+c.height);return 0<=b.top&&0<=b.left&&b.bottom>b.top&&b.right>b.left?b:null},Vj=function(a,b){b=b||Ge(document);var c=b||Ge(document);var d=Rj(a),e=Rj(c);if(!B||9<=Number(yc)){h=Lj(c,"borderLeftWidth");var g=
Lj(c,"borderRightWidth");k=Lj(c,"borderTopWidth");l=Lj(c,"borderBottomWidth");g=new Hj(parseFloat(k),parseFloat(g),parseFloat(l),parseFloat(h))}else{var h=Tj(c,"borderLeft");g=Tj(c,"borderRight");var k=Tj(c,"borderTop"),l=Tj(c,"borderBottom");g=new Hj(k,g,l,h)}c==Ge(document)?(h=d.x-c.scrollLeft,d=d.y-c.scrollTop,!B||10<=Number(yc)||(h+=g.left,d+=g.top)):(h=d.x-e.x-g.left,d=d.y-e.y-g.top);a=Uj(a);e=c.clientHeight-a.height;g=c.scrollLeft;k=c.scrollTop;g+=Math.min(h,Math.max(h-(c.clientWidth-a.width),
0));k+=Math.min(d,Math.max(d-e,0));c=new E(g,k);b.scrollLeft=c.x;b.scrollTop=c.y},Rj=function(a){var b=xe(a);Ra(a,"Parameter is required");var c=new E(0,0);var d=b?xe(b):document;d=!B||9<=Number(yc)||Ee(ye(d).document_)?d.documentElement:d.body;if(a==d)return c;a=Pj(a);b=Ie(ye(b).document_);c.x=a.left+b.x;c.y=a.top+b.y;return c},Xj=function(a,b){a=Wj(a);b=Wj(b);return new E(a.x-b.x,a.y-b.y)},Yj=function(a){a=Pj(a);return new E(a.left,a.top)},Wj=function(a){x(a);if(1==a.nodeType)return Yj(a);a=a.changedTouches?
a.changedTouches[0]:a;return new E(a.clientX,a.clientY)},Nj=function(a,b){"number"==typeof a&&(a=(b?Math.round(a):a)+"px");return a},Zj=function(a){var b=Uj;if("none"!=Mj(a,"display"))return b(a);var c=a.style,d=c.display,e=c.visibility,g=c.position;c.visibility="hidden";c.position="absolute";c.display="inline";a=b(a);c.display=d;c.position=g;c.visibility=e;return a},Uj=function(a){var b=a.offsetWidth,c=a.offsetHeight,d=hc&&!b&&!c;return(void 0===b||d)&&a.getBoundingClientRect?(a=Pj(a),new le(a.right-
a.left,a.bottom-a.top)):new le(b,c)},ak=function(a){var b=Rj(a);a=Zj(a);return new Ij(b.x,b.y,a.width,a.height)},P=function(a,b){a.style.display=b?"":"none"},bk=function(a){return"rtl"==Mj(a,"direction")},ck=C?"MozUserSelect":hc||fc?"WebkitUserSelect":null,dk=function(a,b,c){c=c?null:a.getElementsByTagName("*");if(ck){if(b=b?"none":"",a.style&&(a.style[ck]=b),c){a=0;for(var d;d=c[a];a++)d.style&&(d.style[ck]=b)}}else if(B&&(b=b?"on":"",a.setAttribute("unselectable",b),c))for(a=0;d=c[a];a++)d.setAttribute("unselectable",
b)},ek={thin:2,medium:4,thick:6},Tj=function(a,b){if("none"==(a.currentStyle?a.currentStyle[b+"Style"]:null))return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:null;if(c in ek)a=ek[c];else if(/^\d+px?$/.test(c))a=parseInt(c,10);else{b=a.style.left;var d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=c;c=a.style.pixelLeft;a.style.left=b;a.runtimeStyle.left=d;a=+c}return a};var fk=function(){};ya(fk);fk.prototype.nextId_=0;fk.prototype.idPrefix_="";var gk=function(a){return a.idPrefix_+":"+(a.nextId_++).toString(36)};var Q=function(a){I.call(this);this.dom_=a||ye();this.rightToLeft_=hk;this.id_=null;this.inDocument_=!1;this.element_=null;this.googUiComponentHandler_=void 0;this.childIndex_=this.children_=this.parent_=this.model_=null;this.pointerEventsEnabled_=this.wasDecorated_=!1};v(Q,I);Q.prototype.idGenerator_=fk.getInstance();
var hk=null,ik=function(a,b){switch(a){case 1:return b?"disable":"enable";case 2:return b?"highlight":"unhighlight";case 4:return b?"activate":"deactivate";case 8:return b?"select":"unselect";case 16:return b?"check":"uncheck";case 32:return b?"focus":"blur";case 64:return b?"open":"close"}throw Error("Invalid component state");},jk=function(a){return a.id_||(a.id_=gk(a.idGenerator_))},kk=function(a,b){if(a.parent_&&a.parent_.childIndex_){var c=a.parent_.childIndex_,d=a.id_;d in c&&delete c[d];Oc(a.parent_.childIndex_,
b,a)}a.id_=b};Q.prototype.getElement=function(){return this.element_};var lk=function(a){a=a.element_;x(a,"Can not call getElementStrict before rendering/decorating.");return a};Q.prototype.getElementByClass=function(a){return this.element_?this.dom_.getElementByClass(a,this.element_):null};Q.prototype.getRequiredElementByClass=function(a){var b=this.getElementByClass(a);x(b,"Expected element in component with class: %s",a);return b};
Q.prototype.getHandler=function(){this.googUiComponentHandler_||(this.googUiComponentHandler_=new Ri(this));return x(this.googUiComponentHandler_)};var nk=function(a,b){if(a==b)throw Error("Unable to set parent component");if(b&&a.parent_&&a.id_&&mk(a.parent_,a.id_)&&a.parent_!=b)throw Error("Unable to set parent component");a.parent_=b;Q.superClass_.setParentEventTarget.call(a,b)};f=Q.prototype;f.getParent=function(){return this.parent_};
f.setParentEventTarget=function(a){if(this.parent_&&this.parent_!=a)throw Error("Method not supported");Q.superClass_.setParentEventTarget.call(this,a)};f.getDomHelper=function(){return this.dom_};f.createDom=function(){this.element_=this.dom_.createElement("DIV")};f.render=function(a){ok(this,a)};
var ok=function(a,b,c){if(a.inDocument_)throw Error("Component already rendered");a.element_||a.createDom();b?b.insertBefore(a.element_,c||null):a.dom_.document_.body.appendChild(a.element_);a.parent_&&!a.parent_.inDocument_||a.enterDocument()};f=Q.prototype;
f.decorate=function(a){if(this.inDocument_)throw Error("Component already rendered");if(a&&this.canDecorate(a)){this.wasDecorated_=!0;var b=xe(a);this.dom_&&this.dom_.document_==b||(this.dom_=ye(a));this.decorateInternal(a);this.enterDocument()}else throw Error("Invalid element to decorate");};f.canDecorate=function(){return!0};f.decorateInternal=function(a){this.element_=a};f.enterDocument=function(){this.inDocument_=!0;pk(this,function(a){!a.inDocument_&&a.getElement()&&a.enterDocument()})};
f.exitDocument=function(){pk(this,function(a){a.inDocument_&&a.exitDocument()});this.googUiComponentHandler_&&this.googUiComponentHandler_.removeAll();this.inDocument_=!1};
f.disposeInternal=function(){this.inDocument_&&this.exitDocument();this.googUiComponentHandler_&&(this.googUiComponentHandler_.dispose(),delete this.googUiComponentHandler_);pk(this,function(a){a.dispose()});!this.wasDecorated_&&this.element_&&Qe(this.element_);this.parent_=this.model_=this.element_=this.childIndex_=this.children_=null;Q.superClass_.disposeInternal.call(this)};f.getModel=function(){return this.model_};f.setModel=function(a){this.model_=a};
f.addChild=function(a,b){this.addChildAt(a,qk(this),b)};
f.addChildAt=function(a,b,c){x(!!a,"Provided element must not be null.");if(a.inDocument_&&(c||!this.inDocument_))throw Error("Component already rendered");if(0>b||b>qk(this))throw Error("Child component index out of bounds");this.childIndex_&&this.children_||(this.childIndex_={},this.children_=[]);if(a.getParent()==this){var d=this.childIndex_,e=jk(a);d[e]=a;fb(this.children_,a)}else Oc(this.childIndex_,jk(a),a);nk(a,this);ib(this.children_,b,0,a);a.inDocument_&&this.inDocument_&&a.getParent()==
this?(c=this.getContentElement(),(c.childNodes[b]||null)!=a.getElement()&&(a.getElement().parentElement==c&&c.removeChild(a.getElement()),b=c.childNodes[b]||null,c.insertBefore(a.getElement(),b))):c?(this.element_||this.createDom(),b=rk(this,b+1),ok(a,this.getContentElement(),b?b.element_:null)):this.inDocument_&&!a.inDocument_&&a.element_&&a.element_.parentNode&&1==a.element_.parentNode.nodeType&&a.enterDocument()};f.getContentElement=function(){return this.element_};
f.isRightToLeft=function(){null==this.rightToLeft_&&(this.rightToLeft_=bk(this.inDocument_?this.element_:this.dom_.document_.body));return this.rightToLeft_};f.setRightToLeft=function(a){if(this.inDocument_)throw Error("Component already rendered");this.rightToLeft_=a};
var qk=function(a){return a.children_?a.children_.length:0},mk=function(a,b){a.childIndex_&&b?(a=a.childIndex_,b=(null!==a&&b in a?a[b]:void 0)||null):b=null;return b},rk=function(a,b){return a.children_?a.children_[b]||null:null},pk=function(a,b,c){a.children_&&a.children_.forEach(b,c)},sk=function(a,b){return a.children_&&b?a.children_.indexOf(b):-1};
Q.prototype.removeChild=function(a,b){if(a){var c="string"===typeof a?a:jk(a);a=mk(this,c);if(c&&a){var d=this.childIndex_;c in d&&delete d[c];fb(this.children_,a);b&&(a.exitDocument(),a.element_&&Qe(a.element_));nk(a,null)}}if(!a)throw Error("Child is not in parent component");return a};Q.prototype.removeChildren=function(a){for(var b=[];this.children_&&0!=this.children_.length;){var c=b,d=c.push;var e=this.removeChild(rk(this,0),a);d.call(c,e)}return b};var tk=function(a){a.writeImageController=this;this.app=a.app;this.applyScope=t(a.$apply,a);this.stage=null;this.percentComplete=this.startTime=0;this.listeners_=new L.ListenerCollection;this.app.writeParams.device?this.app.writeParams.target?(this.listeners_.add(chrome.imageWriterPrivate.onWriteComplete,t(this.onComplete,this)),this.listeners_.add(chrome.imageWriterPrivate.onWriteError,t(this.onError,this)),this.app.writeError=null,this.app.writeCancelled=!1,this.start()):kj(this.app):(a=this.app,
gj(a),a.step=1,a.allowErase=!0,a.allowLocalFile=!0,Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.SELECT_DEVICE_PAGE))};f=tk.prototype;
f.start=function(){var a=this;if(this.app.writeParams.device.local)chrome.imageWriterPrivate.writeFromFile(this.app.writeParams.target.storageUnitId,this.app.writeParams.device.file,function(){chrome.runtime.lastError&&(console.error(chrome.runtime.lastError),a.onError(null,"DEVICE_WRITE_ERROR"))});else if(this.app.writeParams.device.recoveryImages){if(this.app.writeParams.recoveryChannel)var b=this.app.writeParams.recoveryChannel;else if(b=jj(this.app),!b){console.error("Unable to write image due to missing expected recovery channel.");
return}b=this.app.writeParams.device.recoveryImages[b];chrome.imageWriterPrivate.writeFromUrl(this.app.writeParams.target.storageUnitId,b.url,{imageHash:b.md5,saveAsDownload:this.app.writeParams.saveAsDownload},function(){chrome.runtime.lastError&&(console.error(chrome.runtime.lastError),a.onError(null,"DEVICE_WRITE_ERROR"))})}this.startTime=Date.now()};f.back=function(){lj(this.app)};f.forward=function(){var a=this.app;gj(a);a.step=null;a.allowErase=!0;a.allowLocalFile=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.WRITE_COMPLETE_PAGE)};
f.cancel=function(){this.listeners_.removeAll();chrome.imageWriterPrivate.cancelWrite(t(function(){this.app.writeCancelled=!0;this.back();this.applyScope()},this))};
f.onComplete=function(){if(this.stage){var a=Date.now();this.stage==L.Stage.DOWNLOAD?this.app.ga.sendTiming(L.GoogleAnalytics.timingVar.DOWNLOAD_IMAGE,a-this.startTime):this.stage==L.Stage.VERIFY_DOWNLOAD?this.app.ga.sendTiming(L.GoogleAnalytics.timingVar.VERIFY_DOWNLOADED_IMAGE,a-this.startTime):this.stage==L.Stage.UNZIP?this.app.ga.sendTiming(L.GoogleAnalytics.timingVar.UNPACK_IMAGE,a-this.startTime):this.stage==L.Stage.WRITE?this.app.ga.sendTiming(L.GoogleAnalytics.timingVar.BURN_IMAGE,a-this.startTime):
this.stage==L.Stage.VERIFY_WRITE&&this.app.ga.sendTiming(L.GoogleAnalytics.timingVar.VERIFY_BURNED_IMAGE,a-this.startTime);this.startTime=a}this.listeners_.removeAll();this.forward();this.applyScope()};f.onError=function(a,b){this.app.ga.tracker_.set("dimension9",b);this.app.ga.tracker_.send("event",{eventCategory:"image_writer_error",eventAction:"image_writer_error",eventLabel:void 0,eventValue:void 0});this.listeners_.removeAll();this.app.writeErrorCode=b;lj(this.app);this.applyScope()};
u("recovery.controllers.WriteImageController",tk);L.controllers.WriteImageController=tk;var uk=function(a){L.controllers.WriteImageController.call(this,a);a.eraseDeviceController=this};ra(uk,L.controllers.WriteImageController);uk.prototype.start=function(){chrome.imageWriterPrivate.destroyPartitions(this.app.writeParams.target.storageUnitId,function(){})};uk.prototype.back=function(){var a=this.app;a.step=null;a.allowErase=!1;a.allowLocalFile=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.ERASE_CONFIRM_PAGE)};
uk.prototype.forward=function(){var a=this.app;gj(a);a.step=null;a.allowErase=!1;a.allowLocalFile=!0;Ug(a.ga.tracker_,L.GoogleAnalytics.pageView.ERASE_COMPLETE_PAGE)};u("recovery.controllers.EraseDeviceController",uk);var vk=function(a,b){this.devices_=null;this.callback_=a;this.pollInterval_=b||2E3;this.interval_=setInterval(t(this.poll_,this),this.pollInterval_);this.poll_()};vk.prototype.stop=function(){clearInterval(this.interval_)};vk.prototype.poll_=function(){chrome.imageWriterPrivate.listRemovableStorageDevices(t(this.update_,this))};
vk.prototype.update_=function(a){a=a.filter(function(b){return 0<b.capacity});kb(a,this.devices_,function(b,c){return b.storageUnitId==c.storageUnitId})||(this.devices_=a,this.callback_(a))};u("recovery.DriveListUpdater",vk);L.DriveListUpdater=vk;var wk=function(a){a.selectTargetController=this;this.app=a.app;this.applyScope_=t(a.$apply,a);this.selectedUsb=this.app.writeParams.target;this.canContinue=!1;var b=new L.DriveListUpdater(t(this.onDevicesChanged_,this));a.$on("$destroy",function(){b.stop()});a.$watch("selectTargetController.selectedUsb",t(this.onDeviceSelected_,this))},xk=function(){var a=document.getElementById("select-usb-device");a&&a.getElementsByClassName("jfk-select")[0].focus()};
wk.prototype.onDevicesChanged_=function(a){this.selectedUsb&&(this.selectedUsb=a.filter(function(b){return b.storageUnitId==this.selectedUsb.storageUnitId},this)[0]);this.applyScope_();xk()};
wk.prototype.onDeviceSelected_=function(){if(this.selectedUsb){this.app.ga.tracker_.set("dimension4",this.selectedUsb.vendor+" "+this.selectedUsb.model);var a=this.selectedUsb.capacity;this.app.ga.tracker_.set("dimension10",1E9<a?(a/1E9).toFixed(0)+"GB":(a/1E6).toFixed(0)+"MB");this.app.ga.tracker_.set("dimension11",this.selectedUsb.removable.toString());if(this.app.writeParams.device.local)this.canContinue=!0,this.app.writeParams.target=this.selectedUsb;else{var b=this.app.sortedAvailableRecoveryChannels;
a=this.app.writeParams.device.recoveryImages[b[0]].filesize;b=ja(b);for(var c=b.next();!c.done;c=b.next())c=this.app.writeParams.device.recoveryImages[c.value].filesize,c>a&&(a=c);this.selectedUsb.capacity>=a?(this.canContinue=!0,this.app.writeParams.target=this.selectedUsb):(this.canContinue=!1,this.app.writeParams.target=null)}}else this.canContinue=!1,this.app.writeParams.target=null};u("recovery.controllers.SelectTargetController",wk);L.controllers.SelectTargetController=wk;var yk=function(a){L.controllers.SelectTargetController.call(this,a);a.eraseSelectTargetController=this;a.app.writeParams.device={local:!0};a.app.step=null};ra(yk,L.controllers.SelectTargetController);u("recovery.controllers.EraseSelectTargetController",yk);var zk=function(a,b,c,d,e){this.removeDashes_=a;this.pattern_=b;this.prefixPattern_=c;this.checksumCharsLen_=d;this.generateChecksum_=e};zk.prototype.hasValidChecksum=function(a){if(!a)return!1;a=Ak(a,this.removeDashes_);var b=a.slice(a.length-this.checksumCharsLen_,a.length);return this.generateChecksum_(a.slice(0,a.length-this.checksumCharsLen_).trim())==b};zk.prototype.isValidPattern=function(a){a=Ak(a,!1);return this.pattern_.test(a)};
zk.prototype.isValidPrefix=function(a){return a?(a=Ak(a,!1),this.prefixPattern_.test(a)):!0};var Ak=function(a,b){a=a.toUpperCase().trim().replace(/\s+/g," ");b&&(a=a.replace(/-/g,""));return a};u("recovery.HwidDef",zk);L.HwidDef=zk;var Bk="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array;/*
JavaScript Zlib and Deflate Library
The MIT License
Copyright (c) 2011 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var Ck=new (Bk?Uint8Array:Array)(256),Dk;for(Dk=0;256>Dk;++Dk){var Ek=Dk,Fk=Ek,Gk=7;for(Ek>>>=1;Ek;Ek>>>=1)Fk<<=1,Fk|=Ek&1,--Gk;Ck[Dk]=(Fk<<Gk&255)>>>0};var Ik=function(a){var b=void 0,c;"number"===typeof b||(b=0);var d=a.length;var e=-1;for(c=d&7;c--;++b)e=e>>>8^Hk[(e^a[b])&255];for(c=d>>3;c--;b+=8)e=e>>>8^Hk[(e^a[b])&255],e=e>>>8^Hk[(e^a[b+1])&255],e=e>>>8^Hk[(e^a[b+2])&255],e=e>>>8^Hk[(e^a[b+3])&255],e=e>>>8^Hk[(e^a[b+4])&255],e=e>>>8^Hk[(e^a[b+5])&255],e=e>>>8^Hk[(e^a[b+6])&255],e=e>>>8^Hk[(e^a[b+7])&255];return(e^4294967295)>>>0},Jk=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,
2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,
3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,
879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,
4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,
83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,
1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],Hk=Bk?new Uint32Array(Jk):Jk;var Kk=[],Lk;for(Lk=0;288>Lk;Lk++)switch(!0){case 143>=Lk:Kk.push([Lk+48,8]);break;case 255>=Lk:Kk.push([Lk-144+400,9]);break;case 279>=Lk:Kk.push([Lk-256,7]);break;case 287>=Lk:Kk.push([Lk-280+192,8]);break;default:throw Error("invalid literal: "+Lk);}
var Mk=function(){function a(e){switch(!0){case 3===e:return[257,e-3,0];case 4===e:return[258,e-4,0];case 5===e:return[259,e-5,0];case 6===e:return[260,e-6,0];case 7===e:return[261,e-7,0];case 8===e:return[262,e-8,0];case 9===e:return[263,e-9,0];case 10===e:return[264,e-10,0];case 12>=e:return[265,e-11,1];case 14>=e:return[266,e-13,1];case 16>=e:return[267,e-15,1];case 18>=e:return[268,e-17,1];case 22>=e:return[269,e-19,2];case 26>=e:return[270,e-23,2];case 30>=e:return[271,e-27,2];case 34>=e:return[272,
e-31,2];case 42>=e:return[273,e-35,3];case 50>=e:return[274,e-43,3];case 58>=e:return[275,e-51,3];case 66>=e:return[276,e-59,3];case 82>=e:return[277,e-67,4];case 98>=e:return[278,e-83,4];case 114>=e:return[279,e-99,4];case 130>=e:return[280,e-115,4];case 162>=e:return[281,e-131,5];case 194>=e:return[282,e-163,5];case 226>=e:return[283,e-195,5];case 257>=e:return[284,e-227,5];case 258===e:return[285,e-258,0];default:throw Error("invalid length: "+e);}}var b=[],c;for(c=3;258>=c;c++){var d=a(c);b[c]=
d[2]<<24|d[1]<<16|d[0]}return b}();Bk&&new Uint32Array(Mk);/*
JavaScript Inflate Library
The MIT License
Copyright (c) 2012 imaya
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
var Nk=function(a){var b=a.length,c=0,d=Number.POSITIVE_INFINITY,e,g,h;for(g=0;g<b;++g)a[g]>c&&(c=a[g]),a[g]<d&&(d=a[g]);d=1<<c;var k=new (Bk?Uint32Array:Array)(d);var l=1;var n=0;for(e=2;l<=c;){for(g=0;g<b;++g)if(a[g]===l){var p=0;var r=n;for(h=0;h<l;++h)p=p<<1|r&1,r>>=1;r=l<<16|g;for(h=p;h<d;h+=e)k[h]=r;++n}++l;n<<=1;e<<=1}};var Ok=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];Bk&&new Uint16Array(Ok);var Pk=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258];Bk&&new Uint16Array(Pk);var Qk=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];Bk&&new Uint8Array(Qk);var Rk=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];Bk&&new Uint16Array(Rk);
var Sk=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];Bk&&new Uint8Array(Sk);var Tk=new (Bk?Uint8Array:Array)(288),Uk,Vk;Uk=0;for(Vk=Tk.length;Uk<Vk;++Uk)Tk[Uk]=143>=Uk?8:255>=Uk?9:279>=Uk?7:8;Nk(Tk);var Wk=new (Bk?Uint8Array:Array)(30),Xk,Yk;Xk=0;for(Yk=Wk.length;Xk<Yk;++Xk)Wk[Xk]=5;Nk(Wk);var Zk=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];Bk&&new Uint16Array(Zk);var $k=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258];Bk&&new Uint16Array($k);var al=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];Bk&&new Uint8Array(al);var bl=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];Bk&&new Uint16Array(bl);
var cl=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];Bk&&new Uint8Array(cl);var dl=new (Bk?Uint8Array:Array)(288),el,fl;el=0;for(fl=dl.length;el<fl;++el)dl[el]=143>=el?8:255>=el?9:279>=el?7:8;Nk(dl);var gl=new (Bk?Uint8Array:Array)(30),hl,il;hl=0;for(il=gl.length;hl<il;++hl)gl[hl]=5;Nk(gl);L.HwidDefV1V2={};var jl=RegExp("^(\\w+ ){2,3}(\\w+-?){1,3} \\d{4}$"),kl=RegExp("^((\\w+ ?){1,3}|(\\w+ ){2,3}(\\w+-?){1,3} ?|(\\w+ ){2,3}(\\w+-?){1,3} \\d{0,4})$");function ll(a){a=((Ik(L.HwidDef.stringToUint8Array(a))&4294967295)>>>0).toString();a=parseInt(a,10);if(Number.isFinite(a)){a=String(a);var b=a.indexOf(".");-1===b&&(b=a.length);var c="-"===a[0]?"-":"";c&&(a=a.substring(1));a=c+se("0",Math.max(0,4-b))+a}else a=String(a);return a.slice(a.length-4,a.length)}
L.HwidDefV1V2.create=function(){return new L.HwidDef(!1,jl,kl,4,ll)};L.HwidDefV3Base32={};var ml=RegExp("^\\w+ (?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{4}-?)+(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{1,4})?$"),nl=RegExp("^\\w+ ?(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{4}-?)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]{1,3})?$");function ol(a){a=Ik(L.HwidDef.stringToUint8Array(a))&1023;return"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a>>5]+"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a&31]}L.HwidDefV3Base32.create=function(){return new L.HwidDef(!0,ml,nl,2,ol)};L.HwidDefV3Base8192={};L.HwidDefV3Base8192Impl=function(){};L.HwidDefV3Base8192Impl.prototype.generateChecksum_=function(a){a=Ik(L.HwidDef.stringToUint8Array(a))&255;return"23456789"[a>>5]+"ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"[a&31]};
var pl=function(a){return L.HwidDefV3Base8192Impl.MODEL_AND_RLZ_PATTERN_.test(a)||L.HwidDefV3Base8192Impl.MODEL_PATTERN_.test(a)},ql=function(a){a=a.toUpperCase().trim().replace(/\s+/g," ");if(!a)return{success:!1,checksum:"",not_checksum:""};a=a.split(" ");var b=!1;2==a.length?b=pl(a[0])&&L.HwidDefV3Base8192Impl.COMPONENT_PATTERN_.test(a[1]):3==a.length&&(b=pl(a[0])&&L.HwidDefV3Base8192Impl.CONFIGLESS_PATTERN_.test(a[1])&&L.HwidDefV3Base8192Impl.COMPONENT_PATTERN_.test(a[2]));var c=a.length-1,d=
a[c].slice(a[c].length-2,a[c].length);a[c]=a[c].slice(0,a[c].length-2);a[c]=a[c].replace(/-/g,"");return{success:b,checksum:d,not_checksum:a.join(" ").trim()}};L.HwidDefV3Base8192Impl.prototype.hasValidChecksum=function(a){a=ql(a);var b=a.checksum;return this.generateChecksum_(a.not_checksum)==b};L.HwidDefV3Base8192Impl.prototype.isValidPattern=function(a){return ql(a).success};
L.HwidDefV3Base8192Impl.prototype.isValidPrefix=function(a){if(!a)return!0;a=a.toUpperCase().trim().replace(/\s+/g," ");a=a.split(" ");if(1<=a.length){if(!pl(a[0]))return!1;if(1==a.length)return!0}return 2==a.length?a[1]?L.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_.test(a[1])||L.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_.test(a[1]):!0:3==a.length?L.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_.test(a[1])?a[2]?L.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_.test(a[2]):!0:!1:!1};
u("recovery.HwidDefV3Base8192Impl",L.HwidDefV3Base8192Impl);L.HwidDefV3Base8192Impl.MODEL_PATTERN_=/^[A-Z0-9]+$/;L.HwidDefV3Base8192Impl.MODEL_AND_RLZ_PATTERN_=/^[A-Z0-9]+-\w+$/;L.HwidDefV3Base8192Impl.CONFIGLESS_PATTERN_=/^(?:[A-F0-9]+-)+[A-F0-9]+$/;L.HwidDefV3Base8192Impl.CONFIGLESS_PARTIAL_=/^(?:[A-F0-9]+-)*(?:[A-F0-9]+)?$/;L.HwidDefV3Base8192Impl.COMPONENT_PATTERN_=RegExp("^(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]-)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567])$");
L.HwidDefV3Base8192Impl.COMPONENT_PARTIAL_=RegExp("^(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789][ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]-?)*(?:[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567]|[ABCDEFGHIJKLMNOPQRSTUVWXYZ234567][23456789])?$");L.HwidDefV3Base8192.create=function(){return new L.HwidDefV3Base8192Impl};var rl=function(a){this.hwidDefs_=a};rl.prototype.isValidPrefix=function(a){return this.hwidDefs_.some(function(b){return b.isValidPrefix(a)})};rl.prototype.isValidPattern=function(a){return this.hwidDefs_.some(function(b){return b.isValidPattern(a)})};rl.prototype.hasValidChecksum=function(a){return this.hwidDefs_.some(function(b){return b.hasValidChecksum(a)})};u("recovery.HwidValidator",rl);L.HwidValidator=rl;var sl=function(a){a.selectByHwidController=this;this.app=a.app;this.selectController=a.selectDeviceController;t(a.$apply,a);this.app.writeParams.device=L.DUMMY_DEVICE;this.app.hwidPlaceholder="e.g. "+L.appConfig.sampleHwid;this.app.enableAdvancedSettings=!0;a.$watch("app.userHwid",t(this.watchHwid,this))};
sl.prototype.watchHwid=function(){var a=L.HwidValidator.createDefaultValidator(),b=null;if(yb(te(this.app.userHwid)))this.app.hwidEntryMessageStyle="",this.app.hwidEntryMessageKey="";else{b=this.app.userHwid.replace(/^[\s\xa0]+/,"").toUpperCase();if(b!=this.app.userHwid){this.app.userHwid=b;return}(b=L.getMatchingDevice(this.app.userHwid))?(this.app.hwidEntryMessageStyle="match",a.isValidPattern(this.app.userHwid)&&a.hasValidChecksum(this.app.userHwid)?this.app.hwidEntryMessageKey="HWID_MATCH_FOUND_AND_CHECKSUM_VERIFIED":
this.app.hwidEntryMessageKey="HWID_MATCH_FOUND"):L.isValidModelFamilyPrefix(this.app.userHwid)?a.isValidPrefix(this.app.userHwid)?(this.app.hwidEntryMessageStyle="message",this.app.hwidEntryMessageKey="HWID_KEEP_TYPING"):(this.app.hwidEntryMessageStyle="error",this.app.hwidEntryMessageKey="HWID_INVALID_MODEL"):(this.app.hwidEntryMessageStyle="error",this.app.hwidEntryMessageKey="HWID_INVALID_MODEL")}this.app.writeParams.device=b||L.DUMMY_DEVICE;this.selectController.canContinue=!!b;this.app.writeParams.recoveryChannel=
null;mj(this.app);b&&(this.app.ga.tracker_.set("dimension6",this.app.userHwid),this.app.ga.tracker_.set("dimension8",this.app.userHwid.split(" ")[0]))};u("recovery.controllers.SelectDeviceByHwidController",sl);L.controllers.SelectDeviceByHwidController=sl;var tl=function(a){a.selectByModelController=this;this.app=a.app;this.selectController=a.selectDeviceController;this.selectController.canContinue=!1;this.app.enableAdvancedSettings=!0;Object.keys(L.oems).sort();this.onOemSelected();this.app.hasSelectByHwid=L.appConfig.allowSelectByHwid;a.$watch("app.selectedOem",t(this.onOemSelected,this));a.$watch("app.selectedSku",t(this.onSkuSelected,this))};tl.prototype.onOemSelected=function(){var a=this.app.selectedOem;a&&Object.keys(L.oems[a]).sort();this.onSkuSelected()};
tl.prototype.onSkuSelected=function(){var a=this.app.selectedOem,b=this.app.selectedSku;a&&b&&L.oems[a]&&L.oems[a][b]?(this.selectController.canContinue=!0,this.app.writeParams.device=L.oems[a][b],(a=L.getDeviceAnalyticsModel(this.app.writeParams.device))&&this.app.ga.tracker_.set("dimension8",a)):(this.selectController.canContinue=!1,this.app.writeParams.device=L.DUMMY_DEVICE);this.app.writeParams.recoveryChannel=null;mj(this.app)};u("recovery.controllers.SelectDeviceByModelController",tl);
L.controllers.SelectDeviceByModelController=tl;var ul=function(a){a.selectDeviceController=this;this.app=a.app;this.app.step=1;this.app.allowErase=!0;this.app.allowLocalFile=!0;this.canContinue=!1;this.SelectionTypes={HWID:"HWID",MAKE_MODEL:"MAKE_MODEL",SINGLE:"SINGLE"};L.appConfig.selectSingleImage?(a.app.selectionType=this.SelectionTypes.SINGLE,this.selectSingleImage()):L.appConfig.selectByModelFirst?(a.app.selectionType=this.SelectionTypes.MAKE_MODEL,this.app.ga.tracker_.set("dimension7",L.GoogleAnalytics.selection.MODEL),this.app.selectionType=
this.SelectionTypes.MAKE_MODEL):(a.app.selectionType=this.SelectionTypes.HWID,this.app.ga.tracker_.set("dimension7",L.GoogleAnalytics.selection.HWID),this.app.selectionType=this.SelectionTypes.HWID)};ul.prototype.selectSingleImage=function(){var a=Object.keys(L.oems)[0],b=Object.keys(L.oems[a])[0];a&&b&&L.oems[a]&&L.oems[a][b]?(this.app.writeParams.device=L.oems[a][b],this.app.writeParams.recoveryChannel=null,mj(this.app),kj(this.app)):ij(this.app)};
u("recovery.controllers.SelectDeviceController",ul);L.controllers.SelectDeviceController=ul;var vl=function(){I.call(this);this.state_="none"};v(vl,I);vl.prototype.setState=function(a){this.state_!=a&&(this.state_=a,this.dispatchEvent("change"))};vl.prototype.getState=function(){return this.state_};var wl=function(a,b,c){c=void 0===c?!1:c;Q.call(this,b);this.retainLastTransition_=c;this.backgroundColor_="#fff";this.size_=0;this.status_=a};v(wl,Q);var xl={UP:0,RIGHT:1,DOWN:2,LEFT:3};f=wl.prototype;f.setSize=function(a){x(!this.getElement(),"Cannot setSize after activity indicator is rendered.");this.size_=a};
f.createDom=function(){wl.superClass_.createDom.call(this);var a=this.getDomHelper();this.contentElement_=a.createDom("DIV");this.iconLayer_=a.createDom("DIV","jfk-activityIndicator-icon");var b=["jfk-activityIndicator"];1==this.size_&&b.push("jfk-activityIndicator-small");this.element_=a.createDom("DIV",b,this.contentElement_,this.iconLayer_)};f.getContentElement=function(){return this.contentElement_};
f.enterDocument=function(){wl.superClass_.enterDocument.call(this);this.getHandler().listen(this.status_,"change",this.runAnimationLoop_)};
f.runAnimationLoop_=function(){if(!this.lastTransitionProperties_||this.lastTransitionProperties_.complete){this.removeChildren(!0);var a,b=a=this.backgroundColor_,c=2,d=this.lastTransitionProperties_;d&&(a=d.endColor,b=d.endShadowColor,c=d.direction,x(cb(Ic(xl),c)),c=(c+1)%4,x(cb(Ic(xl),c)));d=this.status_.getState();switch(d){case "loading":var e=yl[c];var g=e[0];e=e[1];break;case "none":e=g=this.backgroundColor_;break;case "offline":g="#999";e="#777";break;default:Na("should not reach default case")}x(g);
x(e);a=new zl(d,c,g,a,a,b,g,e,this.size_,this.getDomHelper());this.lastTransitionProperties_={complete:!1,endColor:a.endColor,endShadowColor:a.endShadowColor,direction:a.direction};this.addChild(a,!0);this.getHandler().listenOnce(a,"b",this.handleTransitionEnd_);hi(Ga(this.cleanupTransition_,a),0,this);Al(this)}};f.cleanupTransition_=function(a){this.inDocument_&&(a.play(),hi(function(){!this.disposed_&&this.inDocument_&&this.started&&!this.complete&&this.handleTransitionEnd_()},500,a))};
f.handleTransitionEnd_=function(a){this.lastTransitionProperties_.complete=!0;a=a.target;var b=this.status_.getState();b==a.state&&"loading"!=b||this.runAnimationLoop_();Al(this);this.retainLastTransition_||nb(a)};
var Al=function(a){a.iconLayer_.style.opacity="offline"==a.status_.getState()?1:0},yl={0:["#00B15F","#008948"],1:["#3C78F8","#2159bd"],2:["#FA2424","#9e1212"],3:["#FFD34B","#dea11a"]},zl=function(a,b,c,d,e,g,h,k,l,n){Q.call(this,n);this.state=a;this.complete=!1;this.direction=b;this.startBackgroundColor=c;this.endBackgroundColor=d;this.startColor=e;this.startShadowColor=g;this.endColor=h;this.endShadowColor=k;this.circleDiameter_=1==l?16:19};v(zl,Q);
zl.prototype.createDom=function(){zl.superClass_.createDom.call(this);var a=this.getElement(),b=this.getDomHelper();N(a,"jfk-activityIndicator-circle-transition");var c=b.createDom("DIV","jfk-activityIndicator-mask"),d=b.createDom("DIV","jfk-activityIndicator-mask");x(a);b.append(a,c,d);var e=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(c,e);O(e,"backgroundColor",this.startBackgroundColor);var g=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(d,g);O(g,"backgroundColor",
this.endBackgroundColor);a=b.createDom("DIV","jfk-activityIndicator-circle");var h=b.createDom("DIV","jfk-activityIndicator-circle");b.appendChild(c,a);b.appendChild(d,h);O(a,"backgroundColor",this.startColor);O(h,"backgroundColor",this.endShadowColor);this.firstCircle_=a;this.secondCircle_=h;this.firstBackgroundCircle_=e;this.secondBackgroundCircle_=g;this.firstMask_=c;this.secondMask_=d;b=this.circleDiameter_+"px";c=Math.ceil(this.circleDiameter_/2)+"px";d="-"+c;switch(this.direction){case 1:O(this.firstMask_,
{left:0,top:0});O(this.secondMask_,{left:c,top:0});O(this.firstCircle_,{left:0,top:0});O(this.secondCircle_,{width:0,left:0});O(this.firstBackgroundCircle_,{left:0,top:0});O(this.secondBackgroundCircle_,{left:d});break;case 3:O(this.firstMask_,{left:c,top:0});O(this.secondMask_,{left:0,top:0});O(this.firstCircle_,{left:d,top:0});O(this.secondCircle_,{width:0,left:c});O(this.firstBackgroundCircle_,{left:d,top:0});break;case 0:O(this.firstMask_,{left:0,top:c});O(this.secondMask_,{left:0,top:0});O(this.firstCircle_,
{left:0,top:d});O(this.secondCircle_,{top:c,height:0});O(this.firstBackgroundCircle_,{left:0,top:d});break;case 2:O(this.firstMask_,{left:0,top:0});O(this.secondMask_,{left:0,top:c});O(this.firstCircle_,{left:0,top:0});O(this.secondCircle_,{left:0,height:0});O(this.firstBackgroundCircle_,{left:0,top:0});O(this.secondBackgroundCircle_,{top:d});break;default:Na("should not reach default case")}d=this.direction;b=0==d||2==d?{width:b,height:c}:{width:c,height:b};O(this.firstMask_,b);O(this.secondMask_,
b);N(a,"jfk-activityIndicator-transition");N(h,"jfk-activityIndicator-transition-second")};
zl.prototype.play=function(){x(this.inDocument_,"Must be in document at this point.");C&&Zj(this.getElement());this.started=!0;Bl(this,this.secondCircle_,this.handleTransitionEnd_);O(this.firstCircle_,"backgroundColor",this.startShadowColor);O(this.secondCircle_,"backgroundColor",this.endColor);var a=this.circleDiameter_+"px",b=Math.ceil(this.circleDiameter_/2)+"px",c="-"+b;switch(this.direction){case 1:O(this.firstCircle_,{width:0,left:b});O(this.secondCircle_,{left:c,width:a});break;case 3:O(this.firstCircle_,
{width:0,left:0});O(this.secondCircle_,{width:a,left:0});break;case 0:O(this.firstCircle_,{top:0,height:0});O(this.secondCircle_,{top:0,height:a});break;case 2:O(this.firstCircle_,{top:b,height:0});O(this.secondCircle_,{top:c,height:a});break;default:Na("should not reach default case")}};var Bl=function(a,b,c){var d=!1;a.getHandler().listenOnce(b,["webkitTransitionEnd","transitionend"],function(){d||(d=!0,c.call(a))})};
zl.prototype.handleTransitionEnd_=function(){this.complete=!0;this.dispatchEvent("b");P(this.secondBackgroundCircle_,!1)};var Cl=function(a,b){this.$parse_=a;this.prefix_=b},Gl=function(a,b,c,d){d.setEnabled&&c.hasOwnProperty("ngDisabled")&&b.$watch(c.ngDisabled,function(e){d.setEnabled(void 0===e||!e)});d.setModel&&c.hasOwnProperty(a.prefix_+"ModelValue")&&b.$watch(c[a.prefix_+"ModelValue"],function(e){d.setModel(null!=e?e:Dl)});d.getElement&&c.hasOwnProperty("tabindex")&&c.$observe("tabindex",function(e){d.getElement().setAttribute("tabindex",e)});c.hasOwnProperty(a.prefix_+"ComponentAs")&&a.register(b,c[a.prefix_+
"ComponentAs"],d);El(a,b,c,d);b.$on("$destroy",function(){if("function"===typeof d.getElement){var e=d.getElement();if(e){var g=angular.element(e);"function"===typeof g.remove.$original?g.remove.$original.apply(g):Fl(e)}}d.dispose()})},Fl=function(a){var b=angular.element(a);b.unbind();b.removeData();b=0;for(a=a.childNodes||[];b<a.length;b++)Fl(a[b])},El=function(a,b,c,d){Gc(c,function(e,g){if(0==g.lastIndexOf(a.prefix_+"On",0)){e=g.slice((a.prefix_+"On").length);e=e[0].toLowerCase()+e.slice(1);var h=
a.$parse_(c[g]);Hl(b,d,e,function(k){Il(b,h,k)})}})},Il=function(a,b,c){Jl(a,function(){b(a,{$event:c})})},Jl=function(a,b){a.$root.$$phase?a.$eval(b):a.$apply(b)},Hl=function(a,b,c,d){var e=ad(b,c,d);a.$on("$destroy",function(){id(e)})};Cl.prototype.register=function(a,b,c){b=this.$parse_(b).assign;if(!b)throw Error("Angular scope expression non-assignable.");b(a,c)};Cl.$inject=["$parse","prefix"];var Dl={},Kl=1<angular.version.major||2<=angular.version.minor?1:-1;
angular.module("ng.g.GoogAdapter",[]).factory("gGoogAdapter",["$parse",function(a){return new Cl(a,"g")}]);var Ll=angular.module("jfkCommon",[]);Ll.factory("jfkCommon",["$parse",function(a){return new Cl(a,"jfk")}]);Ll.PRIORITY_BEFORE_NG_MODEL=Kl;var Ml=angular.module("jfkActivityIndicator",[Ll.name]);
Ml.directive("jfkActivityIndicator",["jfkCommon",function(a){var b="g"===a.prefix_+"",c=function(d){return b?"gActivityIndicator"+ve(d):d};return{replace:!0,restrict:"EAM",scope:{loading:"&"+c("loading"),offline:"&"+c("offline"),size:"@"+c("size"),backgroundColor:"@"+c("backgroundColor")},template:"<span></span>",link:function(d,e,g){var h=new vl,k=new wl(h),l=function(n){k.backgroundColor_=n||"#fff"};k.setSize("small"===d.size?1:0);l(d.backgroundColor);k.render(e[0]);Gl(a,d.$parent,g,k);El(a,d.$parent,
g,h);d.$watch(function(n){if(n.offline())return"offline";n=n.loading();return void 0===n||n?"loading":"none"},function(n){h.setState(n)});d.$watch(function(n){return n.backgroundColor},l)}}}]);var Nl=function(a,b){this.rows_=a||[];this.useSimilar_=!b};Nl.prototype.requestMatchingRows=function(a,b,c){if(this.useSimilar_){var d=this.rows_,e=Ol(a,b,d);0==e.length&&(e=Pl(a,b,d));b=e}else b=Ol(a,b,this.rows_);c(a,b)};
var Ol=function(a,b,c){var d=[];if(""!=a){a=re(a);a=new RegExp("(^|\\W+)"+a,"i");for(var e=0;e<c.length&&d.length<b;e++){var g=c[e];String(g).match(a)&&d.push(g)}}return d},Pl=function(a,b,c){for(var d=[],e=0;e<c.length;e++){var g=c[e],h=a.toLowerCase(),k=String(g).toLowerCase(),l=0;if(-1!=k.indexOf(h))l=parseInt((k.indexOf(h)/4).toString(),10);else for(var n=h.split(""),p=-1,r=10,w=0,D;D=n[w];w++)D=k.indexOf(D),D>p?(p=D-p-1,p>r-5&&(p=r-5),l+=p,p=D):(l+=r,r+=5);l<6*h.length&&d.push({str:g,score:l,
index:e})}d.sort(function(F,A){var db=F.score-A.score;return 0!=db?db:F.index-A.index});a=[];for(w=0;w<b&&w<d.length;w++)a.push(d[w].str);return a};var Ql=function(a,b,c){I.call(this);this.matcher_=a;this.selectionHandler_=c;this.renderer_=b;ad(b,["hilite","select","canceldismiss","dismiss"],this.handleEvent,!1,this);this.token_=null;this.rows_=[];this.hiliteId_=-1;this.firstRowId_=0;this.dismissTimer_=this.target_=null;this.inputToAnchorMap_={}};v(Ql,I);f=Ql.prototype;f.maxMatches_=10;f.autoHilite_=!0;f.allowFreeSelect_=!1;f.wrap_=!1;f.triggerSuggestionsOnUpdate_=!1;f.getToken=function(){return this.token_};
f.handleEvent=function(a){var b=this.matcher_;if(a.target==this.renderer_)switch(a.type){case "hilite":this.hiliteId(a.row);break;case "select":var c=!1;if("number"===typeof a.row){a=a.row;var d=this.rows_[Rl(this,a)];c=!!d&&b.isRowDisabled&&b.isRowDisabled(d);d&&!c&&this.hiliteId_!=a&&this.hiliteId(a)}c||Sl(this);break;case "canceldismiss":Tl(this);break;case "dismiss":Ul(this)}};f.isOpen=function(){return this.renderer_.isVisible()};
var Vl=function(a){for(var b=a.firstRowId_+a.rows_.length-1,c=a.hiliteId_,d=0;d<a.rows_.length;d++){if(c>=a.firstRowId_&&c<b)c++;else if(-1==c)c=a.firstRowId_;else if(a.allowFreeSelect_&&c==b){a.hiliteId(-1);break}else if(a.wrap_&&c==b)c=a.firstRowId_;else break;if(a.hiliteId(c))break}},Wl=function(a){for(var b=a.firstRowId_+a.rows_.length-1,c=a.hiliteId_,d=0;d<a.rows_.length;d++){if(c>a.firstRowId_)c--;else if(a.allowFreeSelect_&&c==a.firstRowId_){a.hiliteId(-1);break}else if(!a.wrap_||-1!=c&&c!=
a.firstRowId_)break;else c=b;if(a.hiliteId(c))break}};Ql.prototype.hiliteId=function(a){var b=Rl(this,a),c=this.rows_[b];return c&&this.matcher_.isRowDisabled&&this.matcher_.isRowDisabled(c)?!1:(this.hiliteId_=a,this.renderer_.hiliteId(a),-1!=b)};
var Sl=function(a){var b=Rl(a,a.hiliteId_);if(-1!=b){var c=a.rows_[b],d=a.selectionHandler_;if(d.activeElement_){var e=c.toString();if(d.multi_){var g=Xl(d,d.getValue(),Yl(d.activeElement_)[0]),h=Zl(d,d.getValue());d.separatorCheck_&&!d.separatorCheck_.test(e)&&(e=e.replace(/[\s\xa0]+$/,"")+d.defaultSeparator_);d.whitespaceWrapEntries_&&(0==g||yb(h[g-1])||(e=" "+e),g==h.length-1&&(e+=" "));if(e!=h[g]){h[g]=e;e=d.activeElement_;(C||B)&&e.blur();e.value=h.join("");for(var k=0,l=0;l<=g;l++)k+=h[l].length;
e.focus();d.setCursorPosition(k)}}else d.setValue(e);d.rowJustSelected_=!0}a.triggerSuggestionsOnUpdate_?(a.token_=null,Ul(a)):a.dismiss();a.dispatchEvent({type:"update",row:c,index:b});a.triggerSuggestionsOnUpdate_&&a.selectionHandler_.update(!0);return!0}a.dismiss();a.dispatchEvent({type:"update",row:null,index:null});return!1};
Ql.prototype.dismiss=function(){this.hiliteId_=-1;this.token_=null;this.firstRowId_+=this.rows_.length;this.rows_=[];window.clearTimeout(this.dismissTimer_);this.dismissTimer_=null;this.renderer_.dismiss();this.dispatchEvent("suggestionsupdate");this.dispatchEvent("dismiss")};var Ul=function(a){a.dismissTimer_||(a.dismissTimer_=window.setTimeout(t(a.dismiss,a),100))};
Ql.prototype.immediatelyCancelDelayedDismiss_=function(){return this.dismissTimer_?(window.clearTimeout(this.dismissTimer_),this.dismissTimer_=null,!0):!1};var Tl=function(a){a.immediatelyCancelDelayedDismiss_()||window.setTimeout(t(a.immediatelyCancelDelayedDismiss_,a),10)};Ql.prototype.disposeInternal=function(){Ql.superClass_.disposeInternal.call(this);delete this.inputToAnchorMap_;this.renderer_.dispose();this.selectionHandler_.dispose();this.matcher_=null};
Ql.prototype.matchListener_=function(a,b,c){this.token_==a&&this.renderRows(b,c)};
Ql.prototype.renderRows=function(a,b){var c="object"==za(b)&&b;b=(c?c.getPreserveHilited():b)?Rl(this,this.hiliteId_):-1;this.firstRowId_+=this.rows_.length;this.rows_=a;for(var d=[],e=0;e<a.length;++e)d.push({id:this.firstRowId_+e,data:a[e]});a=null;this.target_&&(a=this.inputToAnchorMap_[Da(this.target_)]||this.target_);this.renderer_.setAnchorElement(a);this.renderer_.renderRows(d,this.token_,this.target_);a=this.autoHilite_;c&&void 0!==c.getAutoHilite()&&(a=c.getAutoHilite());this.hiliteId_=-1;
(a||0<=b)&&0!=d.length&&this.token_&&(0<=b?this.hiliteId(this.firstRowId_+b):Vl(this));this.dispatchEvent("suggestionsupdate")};var Rl=function(a,b){b-=a.firstRowId_;return 0>b||b>=a.rows_.length?-1:b};Ql.prototype.attachInputs=function(a){var b=this.selectionHandler_;b.attachInputs.apply(b,arguments)};Ql.prototype.update=function(a){this.selectionHandler_.update(a)};var Yl=function(a){var b=0,c=0;$l(a)&&(b=a.selectionStart,c=-1);return[b,c]},$l=function(a){try{return"number"==typeof a.selectionStart}catch(b){return!1}};var cm=function(a,b,c,d,e,g){if(jc&&e)return am(a);if(e&&!d)return!1;if(!C){"number"===typeof b&&(b=bm(b));var h=17==b||18==b||jc&&91==b;if((!c||jc)&&h||jc&&16==b&&(d||g))return!1}if((hc||fc)&&d&&c)switch(a){case 220:case 219:case 221:case 192:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:return!1}if(B&&d&&b==a)return!1;switch(a){case 13:return C?g||e?!1:!(c&&d):!0;case 27:return!(hc||fc||C)}return C&&(d||e||g)?!1:am(a)},am=function(a){if(48<=a&&57>=a||96<=a&&106>=a||65<=
a&&90>=a||(hc||fc)&&0==a)return!0;switch(a){case 32:case 43:case 63:case 64:case 107:case 109:case 110:case 111:case 186:case 59:case 189:case 187:case 61:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:case 163:case 58:return!0;case 173:case 171:return C;default:return!1}},bm=function(a){if(C)a=dm(a);else if(jc&&hc)switch(a){case 93:a=91}return a},dm=function(a){switch(a){case 61:return 187;case 59:return 186;case 173:return 189;case 224:return 91;case 0:return 224;default:return a}};var em=function(a,b,c,d){Ac.call(this,d);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c};v(em,Ac);var gm=function(a,b){I.call(this);a&&fm(this,a,b)};v(gm,I);f=gm.prototype;f.element_=null;f.keyPressKey_=null;f.keyDownKey_=null;f.keyUpKey_=null;f.lastKey_=-1;f.keyCode_=-1;f.altKey_=!1;
var hm={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},im={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},jm=jc&&C;
gm.prototype.handleKeyDown_=function(a){if(hc||fc)if(17==this.lastKey_&&!a.ctrlKey||18==this.lastKey_&&!a.altKey||jc&&91==this.lastKey_&&!a.metaKey)this.keyCode_=this.lastKey_=-1;-1==this.lastKey_&&(a.ctrlKey&&17!=a.keyCode?this.lastKey_=17:a.altKey&&18!=a.keyCode?this.lastKey_=18:a.metaKey&&91!=a.keyCode&&(this.lastKey_=91));cm(a.keyCode,this.lastKey_,a.shiftKey,a.ctrlKey,a.altKey,a.metaKey)?(this.keyCode_=bm(a.keyCode),jm&&(this.altKey_=a.altKey)):this.handleEvent(a)};
gm.prototype.handleKeyup_=function(a){this.keyCode_=this.lastKey_=-1;this.altKey_=a.altKey};
gm.prototype.handleEvent=function(a){var b=a.event_,c=b.altKey;if(B&&"keypress"==a.type){var d=this.keyCode_;var e=13!=d&&27!=d?b.keyCode:0}else(hc||fc)&&"keypress"==a.type?(d=this.keyCode_,e=0<=b.charCode&&63232>b.charCode&&am(d)?b.charCode:0):("keypress"==a.type?(jm&&(c=this.altKey_),b.keyCode==b.charCode?32>b.keyCode?(d=b.keyCode,e=0):(d=this.keyCode_,e=b.charCode):(d=b.keyCode||this.keyCode_,e=b.charCode||0)):(d=b.keyCode||this.keyCode_,e=b.charCode||0),jc&&63==e&&224==d&&(d=191));var g=d=bm(d);
d?63232<=d&&d in hm?g=hm[d]:25==d&&a.shiftKey&&(g=9):b.keyIdentifier&&b.keyIdentifier in im&&(g=im[b.keyIdentifier]);if(!C||"keypress"!=a.type||cm(g,this.lastKey_,a.shiftKey,a.ctrlKey,c,a.metaKey))a=g==this.lastKey_,this.lastKey_=g,b=new em(g,e,a,b),b.altKey=c,this.dispatchEvent(b)};gm.prototype.getElement=function(){return this.element_};
var fm=function(a,b,c){a.keyUpKey_&&a.detach();a.element_=b;a.keyPressKey_=ad(a.element_,"keypress",a,c);a.keyDownKey_=ad(a.element_,"keydown",a.handleKeyDown_,c,a);a.keyUpKey_=ad(a.element_,"keyup",a.handleKeyup_,c,a)};gm.prototype.detach=function(){this.keyPressKey_&&(id(this.keyPressKey_),id(this.keyDownKey_),id(this.keyUpKey_),this.keyUpKey_=this.keyDownKey_=this.keyPressKey_=null);this.element_=null;this.keyCode_=this.lastKey_=-1};
gm.prototype.disposeInternal=function(){gm.superClass_.disposeInternal.call(this);this.detach()};var km=function(a,b,c,d){y.call(this);d=d||150;this.multi_=null!=c?c:!0;this.separators_=a||",;";this.defaultSeparator_=this.separators_.substring(0,1);a=this.multi_?"[\\s"+this.separators_+"]+":"[\\s]+";this.trimmer_=new RegExp("^"+a+"|"+a+"$","g");this.separatorCheck_=new RegExp("\\s*["+this.separators_+"]$");this.literals_=b||"";this.preventSelectionOnTab_=!1;this.preventDefaultOnTab_=this.multi_;this.timer_=0<d?new gi(d):null;this.eh_=new Ri(this);this.activateHandler_=new Ri(this);this.keyHandler_=
new gm;this.lastKeyCode_=-1};v(km,y);f=km.prototype;f.whitespaceWrapEntries_=!0;f.generateNewTokenOnLiteral_=!0;f.upsideDown_=!1;f.separatorUpdates_=!0;f.separatorSelects_=!0;f.activeTimeoutId_=null;f.activeElement_=null;f.lastValue_="";f.waitingForIme_=!1;f.rowJustSelected_=!1;f.updateDuringTyping_=!0;f.getValue=function(){return this.activeElement_.value};f.setValue=function(a){this.activeElement_.value=a};
f.setCursorPosition=function(a){var b=this.activeElement_;$l(b)&&(b.selectionStart=a);b=this.activeElement_;$l(b)&&(b.selectionEnd=a)};f.attachInputs=function(a){for(var b=0;b<arguments.length;b++){var c=arguments[b];Ue(c)&&(uj(c,"combobox"),M(c,"autocomplete","list"));this.eh_.listen(c,"focus",this.handleFocus);this.eh_.listen(c,"blur",this.handleBlur);if(!this.activeElement_&&(this.activateHandler_.listen(c,"keydown",this.onKeyDownOnInactiveElement_),Ue(c))){var d=xe(c);ef(d)==c&&lm(this,c)}}};
f.disposeInternal=function(){km.superClass_.disposeInternal.call(this);null!=this.activeTimeoutId_&&window.clearTimeout(this.activeTimeoutId_);this.eh_.dispose();delete this.eh_;this.activateHandler_.dispose();this.keyHandler_.dispose();nb(this.timer_)};
f.handleKeyEvent=function(a){switch(a.keyCode){case 40:if(this.ac_.isOpen())return this.upsideDown_?Wl(this.ac_):Vl(this.ac_),a.preventDefault(),!0;if(!this.multi_)return this.update(!0),a.preventDefault(),!0;break;case 38:if(this.ac_.isOpen())return this.upsideDown_?Vl(this.ac_):Wl(this.ac_),a.preventDefault(),!0;break;case 9:if(!this.ac_.isOpen()||a.shiftKey||this.preventSelectionOnTab_)this.ac_.dismiss();else if(this.update(),Sl(this.ac_)&&this.preventDefaultOnTab_)return a.preventDefault(),!0;
break;case 13:if(this.ac_.isOpen()){if(this.update(),Sl(this.ac_))return a.preventDefault(),a.stopPropagation(),!0}else this.ac_.dismiss();break;case 27:if(this.ac_.isOpen())return this.ac_.dismiss(),a.preventDefault(),a.stopPropagation(),!0;break;case 229:if(!this.waitingForIme_)return this.waitingForIme_||(this.eh_.listen(this.activeElement_,"keyup",this.onKeyUp_),this.eh_.listen(this.activeElement_,"keypress",this.onKeyPress_),this.waitingForIme_=!0),!0;break;default:this.timer_&&!this.updateDuringTyping_&&
(this.timer_.stop(),this.timer_.start())}return mm(this,a)};var mm=function(a,b){var c=a.multi_&&b.charCode&&-1!=a.separators_.indexOf(String.fromCharCode(b.charCode));a.separatorUpdates_&&c&&a.update();return a.separatorSelects_&&c&&Sl(a.ac_)?(b.preventDefault(),!0):!1};km.prototype.handleKeyUp=function(){return!1};km.prototype.handleFocus=function(a){lm(this,a.target||null)};
var lm=function(a,b){a.activateHandler_.removeAll();a.ac_&&Tl(a.ac_);b!=a.activeElement_&&(a.activeElement_=b,a.timer_&&(a.timer_.start(),a.eh_.listen(a.timer_,"tick",a.onTick_)),a.lastValue_=a.getValue(),fm(a.keyHandler_,a.activeElement_),a.eh_.listen(a.keyHandler_,"key",a.onKey_),a.eh_.listen(a.activeElement_,"mousedown",a.onMouseDown_),B&&a.eh_.listen(a.activeElement_,"keypress",a.onIeKeyPress_))};f=km.prototype;
f.handleBlur=function(){this.activeElement_&&(this.eh_.unlisten(this.keyHandler_,"key",this.onKey_),this.keyHandler_.detach(),this.eh_.unlisten(this.activeElement_,"keyup",this.handleKeyUp),this.eh_.unlisten(this.activeElement_,"mousedown",this.onMouseDown_),B&&this.eh_.unlisten(this.activeElement_,"keypress",this.onIeKeyPress_),this.waitingForIme_&&nm(this),this.activeElement_=null,this.timer_&&(this.timer_.stop(),this.eh_.unlisten(this.timer_,"tick",this.onTick_)),this.ac_&&Ul(this.ac_))};
f.onTick_=function(){this.update()};f.onKeyDownOnInactiveElement_=function(a){this.handleFocus(a)};f.onKey_=function(a){this.lastKeyCode_=a.keyCode;this.ac_&&this.handleKeyEvent(a)};f.onKeyPress_=function(){this.waitingForIme_&&229!=this.lastKeyCode_&&nm(this)};f.onKeyUp_=function(a){this.waitingForIme_&&(13==a.keyCode||77==a.keyCode&&a.ctrlKey)&&nm(this)};f.onMouseDown_=function(a){this.ac_&&this.handleMouseDown(a)};f.handleMouseDown=function(){};
var nm=function(a){a.waitingForIme_&&(a.waitingForIme_=!1,a.eh_.unlisten(a.activeElement_,"keypress",a.onKeyPress_),a.eh_.unlisten(a.activeElement_,"keyup",a.onKeyUp_))};km.prototype.onIeKeyPress_=function(a){mm(this,a)};
km.prototype.update=function(a){if(this.activeElement_&&(a||this.getValue()!=this.lastValue_)){if(a||!this.rowJustSelected_){a=Yl(this.activeElement_)[0];var b=this.getValue();a=Zl(this,b)[Xl(this,b,a)];a=this.trimmer_?String(a).replace(this.trimmer_,""):a;if(this.ac_){this.ac_.target_=this.activeElement_;b=this.ac_;var c=this.getValue();b.token_!=a&&(b.token_=a,b.matcher_.requestMatchingRows(b.token_,b.maxMatches_,t(b.matchListener_,b),c),Tl(b))}}this.lastValue_=this.getValue()}this.rowJustSelected_=
!1};var Xl=function(a,b,c){a=Zl(a,b);if(c==b.length)return a.length-1;for(var d=b=0,e=0;d<a.length&&e<=c;d++)e+=a[d].length,b=d;return b},Zl=function(a,b){if(!a.multi_)return[b];b=String(b).split("");for(var c=[],d=[],e=0,g=!1;e<b.length;e++)a.literals_&&-1!=a.literals_.indexOf(b[e])?(a.generateNewTokenOnLiteral_&&!g&&(c.push(d.join("")),d.length=0),d.push(b[e]),g=!g):g||-1==a.separators_.indexOf(b[e])?d.push(b[e]):(d.push(b[e]),c.push(d.join("")),d.length=0);c.push(d.join(""));return c};var om=function(a,b,c){y.call(this);this.url_=a;this.useSimilar_=!b;this.xhr_=new J(c)};v(om,y);f=om.prototype;f.method_="GET";f.content_=void 0;f.headers_=null;f.lastListenerKey_=null;f.setContent=function(a){this.content_=a};f.xhrCallback=function(a,b,c){c=xi(c.target);var d=[];if(c)try{d=JSON.parse(c)}catch(e){}b(a,d)};
f.requestMatchingRows=function(a,b,c){var d=this.useSimilar_;var e=new Ai(this.url_);K(e);e.queryData_.set("token",a);b=String(b);K(e);e.queryData_.set("max_matches",b);d=String(Number(d));K(e);e.queryData_.set("use_similar",d);if(e=e.toString())a=t(this.xhrCallback,this,a,c),this.xhr_.isActive()&&this.xhr_.abort(),this.lastListenerKey_&&id(this.lastListenerKey_),this.lastListenerKey_=$c(this.xhr_,"success",a),this.xhr_.send(e,this.method_,this.content_,this.headers_)};
f.disposeInternal=function(){this.xhr_.dispose();om.superClass_.disposeInternal.call(this)};var pm=function(a,b,c){y.call(this);this.listener_=a;this.interval_=b||0;this.handler_=c;this.callback_=t(this.doAction_,this)};v(pm,y);f=pm.prototype;f.id_=0;f.disposeInternal=function(){pm.superClass_.disposeInternal.call(this);this.stop();delete this.listener_;delete this.handler_};f.start=function(a){this.stop();this.id_=hi(this.callback_,void 0!==a?a:this.interval_)};f.stop=function(){this.isActive()&&m.clearTimeout(this.id_);this.id_=0};f.isActive=function(){return 0!=this.id_};
f.doAction_=function(){this.id_=0;this.listener_&&this.listener_.call(this.handler_)};var Nc={},qm=null,rm=function(a){a=Da(a);delete Nc[a];Mc()&&qm&&qm.stop()},tm=function(){qm||(qm=new pm(function(){sm()},20));var a=qm;a.isActive()||a.start()},sm=function(){var a=Date.now();Gc(Nc,function(b){um(b,a)});Mc()||tm()};var vm=function(){I.call(this);this.state_=0;this.endTime=this.startTime=null};v(vm,I);vm.prototype.onBegin=function(){this.dispatchAnimationEvent("begin")};vm.prototype.onEnd=function(){this.dispatchAnimationEvent("end")};vm.prototype.onStop=function(){this.dispatchAnimationEvent("stop")};vm.prototype.dispatchAnimationEvent=function(a){this.dispatchEvent(a)};var wm=function(a,b,c,d){vm.call(this);if(!Array.isArray(a)||!Array.isArray(b))throw Error("Start and end parameters must be arrays");if(a.length!=b.length)throw Error("Start and end points must be the same length");this.startPoint=a;this.endPoint=b;this.duration=c;this.accel_=d;this.coords=[];this.progress=0;this.lastFrame=null};v(wm,vm);f=wm.prototype;
f.play=function(a){if(a||0==this.state_)this.progress=0,this.coords=this.startPoint;else if(1==this.state_)return!1;rm(this);this.startTime=a=Date.now();-1==this.state_&&(this.startTime-=this.duration*this.progress);this.endTime=this.startTime+this.duration;this.lastFrame=this.startTime;if(!this.progress)this.onBegin();this.dispatchAnimationEvent("play");-1==this.state_&&this.dispatchAnimationEvent("resume");this.state_=1;var b=Da(this);b in Nc||(Nc[b]=this);tm();um(this,a);return!0};
f.stop=function(a){rm(this);this.state_=0;a&&(this.progress=1);xm(this,this.progress);this.onStop();this.onEnd()};f.pause=function(){1==this.state_&&(rm(this),this.state_=-1,this.dispatchAnimationEvent("pause"))};f.disposeInternal=function(){0==this.state_||this.stop(!1);this.dispatchAnimationEvent("destroy");wm.superClass_.disposeInternal.call(this)};f.destroy=function(){this.dispose()};
var um=function(a,b){Oa(a.startTime);Oa(a.endTime);Oa(a.lastFrame);b<a.startTime&&(a.endTime=b+a.endTime-a.startTime,a.startTime=b);a.progress=(b-a.startTime)/(a.endTime-a.startTime);1<a.progress&&(a.progress=1);a.lastFrame=b;xm(a,a.progress);if(1==a.progress)a.state_=0,rm(a),a.dispatchAnimationEvent("finish"),a.onEnd();else if(1==a.state_)a.onAnimate()},xm=function(a,b){"function"===typeof a.accel_&&(b=a.accel_(b));a.coords=Array(a.startPoint.length);for(var c=0;c<a.startPoint.length;c++)a.coords[c]=
(a.endPoint[c]-a.startPoint[c])*b+a.startPoint[c]};wm.prototype.onAnimate=function(){this.dispatchAnimationEvent("animate")};wm.prototype.dispatchAnimationEvent=function(a){this.dispatchEvent(new ym(a,this))};var ym=function(a,b){pb.call(this,a);this.coords=b.coords;this.x=b.coords[0];this.y=b.coords[1];this.z=b.coords[2];this.duration=b.duration;this.progress=b.progress;this.state=b.state_};v(ym,pb);var zm=function(){if(kc){var a=/Windows NT ([0-9.]+)/;return(a=a.exec(Lb()))?a[1]:"0"}return jc?(a=/1[0|1][_.][0-9_.]+/,(a=a.exec(Lb()))?a[0].replace(/_/g,"."):"10"):lc?(a=/Android\s+([^\);]+)(\)|;)/,(a=a.exec(Lb()))?a[1]:""):mc||nc||oc?(a=/(?:iPhone|CPU)\s+OS\s+(\S+)/,(a=a.exec(Lb()))?a[1].replace(/_/g,"."):""):""}();var Am=Ub(),Bm=Zb()||z("iPod"),Cm=z("iPad"),Dm=z("Android")&&!(Vb()||Ub()||Qb()||z("Silk")),Em=Vb(),Gm=z("Safari")&&!(Vb()||(Pb()?0:z("Coast"))||Qb()||Sb()||Tb()||(Pb()?Ob("Opera"):z("OPR"))||Ub()||z("Silk")||z("Android"))&&!$b();var Hm=function(a){return(a=a.exec(Lb()))?a[1]:""},Im=function(){if(Am)return Hm(/Firefox\/([0-9.]+)/);if(B||fc||ec)return vc;if(Em){if($b()||ac()){var a=Hm(/CriOS\/([0-9.]+)/);if(a)return a}return Hm(/Chrome\/([0-9.]+)/)}if(Gm&&!$b())return Hm(/Version\/([0-9.]+)/);if(Bm||Cm){if(a=/Version\/(\S+).*Mobile\/(\S+)/.exec(Lb()))return a[1]+"."+a[2]}else if(Dm)return(a=Hm(/Android\s+([0-9.]+)/))?a:Hm(/Version\/([0-9.]+)/);return""}();var Jm=function(a,b,c,d,e){wm.call(this,b,c,d,e);this.element=a};v(Jm,wm);f=Jm.prototype;f.updateStyle=function(){};f.isRightToLeft=function(){void 0===this.rightToLeft_&&(this.rightToLeft_=bk(this.element));return this.rightToLeft_};f.onAnimate=function(){this.updateStyle();Jm.superClass_.onAnimate.call(this)};f.onEnd=function(){this.updateStyle();Jm.superClass_.onEnd.call(this)};f.onBegin=function(){this.updateStyle();Jm.superClass_.onBegin.call(this)};
var Km=function(a,b,c,d,e){"number"===typeof b&&(b=[b]);"number"===typeof c&&(c=[c]);Jm.call(this,a,b,c,d,e);if(1!=b.length||1!=c.length)throw Error("Start and end points must be 1D");this.lastOpacityUpdate_=-1};v(Km,Jm);var Lm=1/1024;f=Km.prototype;
f.updateStyle=function(){var a=this.coords[0];if(Math.abs(a-this.lastOpacityUpdate_)>=Lm){var b=this.element;x(b);b=b.style;"opacity"in b?b.opacity=a:"MozOpacity"in b?b.MozOpacity=a:"filter"in b&&(b.filter=""===a?"":"alpha(opacity="+100*Number(a)+")");this.lastOpacityUpdate_=a}};f.onBegin=function(){this.lastOpacityUpdate_=-1;Km.superClass_.onBegin.call(this)};f.onEnd=function(){this.lastOpacityUpdate_=-1;Km.superClass_.onEnd.call(this)};f.show=function(){this.element.style.display=""};
f.hide=function(){this.element.style.display="none"};var Mm=function(a,b,c){Km.call(this,a,1,0,b,c)};v(Mm,Km);Mm.prototype.onBegin=function(){this.show();Mm.superClass_.onBegin.call(this)};Mm.prototype.onEnd=function(){this.hide();Mm.superClass_.onEnd.call(this)};var Nm=function(a,b,c){Km.call(this,a,0,1,b,c)};v(Nm,Km);Nm.prototype.onBegin=function(){this.show();Nm.superClass_.onBegin.call(this)};var Qm=function(a,b,c,d,e,g,h,k,l){x(c);var n=Om(c),p=ak(a),r=Sj(a);r&&p.intersection(new Ij(r.left,r.top,r.right-r.left,r.bottom-r.top));r=ye(a);var w=ye(c);if(r.document_!=w.document_){var D=r.document_.body;w=He(w.document_);var F=new E(0,0);var A=(A=xe(D))?He(A):window;if(dc(A,"parent")){var db=D;do{var Fm=A==w?Rj(db):Yj(x(db));F.x+=Fm.x;F.y+=Fm.y}while(A&&A!=w&&A!=A.parent&&(db=A.frameElement)&&(A=A.parent))}D=ke(F,Rj(D));!B||9<=Number(yc)||Ee(r.document_)||(D=ke(D,Ie(r.document_)));p.left+=
D.x;p.top+=D.y}a=Pm(a,b);b=p.left;a&4?b+=p.width:a&2&&(b+=p.width/2);p=new E(b,p.top+(a&1?p.height:0));p=ke(p,n);e&&(p.x+=(a&4?-1:1)*e.x,p.y+=(a&1?-1:1)*e.y);if(h)if(l)var G=l;else if(G=Sj(c))G.top-=n.y,G.right-=n.x,G.bottom-=n.y,G.left-=n.x;e=G;l=p.clone();n=Pm(c,d);d=Zj(c);G=k?k.clone():d.clone();k=l;l=G;k=k.clone();l=l.clone();G=0;if(g||0!=n)n&4?k.x-=l.width+(g?g.right:0):n&2?k.x-=l.width/2:g&&(k.x+=g.left),n&1?k.y-=l.height+(g?g.bottom:0):g&&(k.y+=g.top);h&&(e?(g=k,n=l,G=0,65==(h&65)&&(g.x<e.left||
g.x>=e.right)&&(h&=-2),132==(h&132)&&(g.y<e.top||g.y>=e.bottom)&&(h&=-5),g.x<e.left&&h&1&&(g.x=e.left,G|=1),h&16&&(p=g.x,g.x<e.left&&(g.x=e.left,G|=4),g.x+n.width>e.right&&(n.width=Math.min(e.right-g.x,p+n.width-e.left),n.width=Math.max(n.width,0),G|=4)),g.x+n.width>e.right&&h&1&&(g.x=Math.max(e.right-n.width,e.left),G|=1),h&2&&(G|=(g.x<e.left?16:0)|(g.x+n.width>e.right?32:0)),g.y<e.top&&h&4&&(g.y=e.top,G|=2),h&32&&(p=g.y,g.y<e.top&&(g.y=e.top,G|=8),g.y+n.height>e.bottom&&(n.height=Math.min(e.bottom-
g.y,p+n.height-e.top),n.height=Math.max(n.height,0),G|=8)),g.y+n.height>e.bottom&&h&4&&(g.y=Math.max(e.bottom-n.height,e.top),G|=2),h&8&&(G|=(g.y<e.top?64:0)|(g.y+n.height>e.bottom?128:0)),h=G):h=256,G=h);g=new Ij(0,0,0,0);g.left=k.x;g.top=k.y;g.width=l.width;g.height=l.height;h=G;h&496||(Oj(c,new E(g.left,g.top)),G=g.getSize(),d==G||d&&G&&d.width==G.width&&d.height==G.height||(g=G,c=c.style,C?c.MozBoxSizing="border-box":hc?c.WebkitBoxSizing="border-box":c.boxSizing="border-box",c.width=Math.max(g.width,
0)+"px",c.height=Math.max(g.height,0)+"px"));return h},Om=function(a){if(a=a.offsetParent){var b="HTML"==a.tagName||"BODY"==a.tagName;if(!b||"static"!=Mj(a,"position")){var c=Rj(a);if(!b){b=bk(a);var d;if(d=b){d=Gm&&0<=Kb(Im,10);var e;if(e=pc)e=0<=Kb(zm,10);var g=Em&&0<=Kb(Im,85);d=C||d||e||g}b=d?-a.scrollLeft:b&&!gc&&"visible"!=Mj(a,"overflowX")?a.scrollWidth-a.clientWidth-a.scrollLeft:a.scrollLeft;c=ke(c,new E(b,a.scrollTop))}}}return c||new E},Pm=function(a,b){return(b&8&&bk(a)?b^4:b)&-9};var Rm=function(a,b,c,d){I.call(this);this.parent_=a||document.body;this.dom_=ye(this.parent_);this.reposition_=!a;this.element_=null;this.token_="";this.rows_=[];this.rowDivs_=[];this.startRenderingRows_=this.hilitedRow_=-1;this.visible_=!1;this.className="ac-renderer";this.rowClassName="ac-row";this.legacyActiveClassName_="active";this.activeClassName="ac-active";this.highlightedClassName="ac-highlighted";this.customRenderer_=b||null;this.useStandardHighlighting_=null!=d?d:!0;this.matchWordBoundary_=
!0;this.highlightAllTokens_=!1;this.rightAlign_=!!c;this.topAlign_=!1;this.menuFadeDuration_=0;this.showScrollbarsIfTooLarge_=!1};v(Rm,I);f=Rm.prototype;f.borderWidth_=0;f.getElement=function(){return this.element_};f.setAnchorElement=function(a){this.anchorElement_=a};f.renderRows=function(a,b,c){this.token_=b;this.rows_=a;this.hilitedRow_=-1;this.startRenderingRows_=Date.now();this.target_=c;this.rowDivs_=[];Sm(this)};
f.dismiss=function(){this.visible_&&(this.visible_=!1,Tm(this,!1),0<this.menuFadeDuration_?(nb(this.animation_),this.animation_=new Mm(this.element_,this.menuFadeDuration_),this.animation_.play()):P(this.element_,!1))};f.show=function(){this.visible_||(this.visible_=!0,Tm(this,!0),0<this.menuFadeDuration_?(nb(this.animation_),this.animation_=new Nm(this.element_,this.menuFadeDuration_),this.animation_.play()):P(this.element_,!0))};
var Tm=function(a,b){a.target_&&(M(a.target_,"haspopup",b),M(x(a.element_),"expanded",b),M(a.target_,"expanded",b),b?M(a.target_,"owns",a.element_.id):(a.target_.removeAttribute(vj("owns")),yj(a.target_,null)))};Rm.prototype.isVisible=function(){return this.visible_};
var Um=function(a,b){var c=0<=b&&b<a.rows_.length?a.rows_[b]:void 0,d=0<=b&&b<a.rowDivs_.length?a.rowDivs_[b]:void 0;a.dispatchEvent({type:"rowhilite",rowNode:d,row:c?c.data:null})&&(0<=a.hilitedRow_&&Fj(x(a.rowDivs_[a.hilitedRow_]),[a.activeClassName,a.legacyActiveClassName_]),a.hilitedRow_=b,d&&(Dj(d,[a.activeClassName,a.legacyActiveClassName_]),a.target_&&yj(a.target_,d),Vj(d,a.element_)))};
Rm.prototype.hiliteId=function(a){if(-1==a)Um(this,-1);else for(var b=0;b<this.rows_.length;b++)if(this.rows_[b].id==a){Um(this,b);break}};
var Vm=function(a){if(!a.element_){var b=a.dom_.createDom("DIV",{style:"display:none"});a.showScrollbarsIfTooLarge_&&(b.style.overflowY="auto");a.element_=b;x(b);Dj(b,zb(a.className).split(" "));uj(b,"listbox");b.id=gk(fk.getInstance());a.dom_.appendChild(a.parent_,b);ad(b,"click",a.handleClick_,!1,a);ad(b,"mousedown",a.handleMouseDown_,!1,a);ad(b,"mouseover",a.handleMouseOver_,!1,a)}},Sm=function(a){Vm(a);a.topAlign_&&(a.element_.style.visibility="hidden");a.widthProvider_&&(a.element_.style.minWidth=
a.widthProvider_.clientWidth-a.borderWidth_+"px");a.maxWidthProvider_&&(a.element_.style.maxWidth=a.maxWidthProvider_.clientWidth-a.borderWidth_+"px");a.rowDivs_.length=0;a.dom_.removeChildren(a.element_);if(a.customRenderer_&&a.customRenderer_.render)a.customRenderer_.render(a,a.element_,a.rows_,a.token_);else{var b=null;a.rows_.forEach(function(c){var d=this.token_,e=this.dom_.createDom("DIV",{className:this.rowClassName,id:gk(fk.getInstance())});uj(e,"option");this.customRenderer_&&this.customRenderer_.renderRow?
this.customRenderer_.renderRow(c,d,e):We(e,c.data.toString());d&&this.useStandardHighlighting_&&(this.wasHighlightedAtLeastOnce_=!1,Wm(this,e,d));N(e,this.rowClassName);this.rowDivs_.push(e);c=e;this.topAlign_?this.element_.insertBefore(c,b):this.dom_.appendChild(this.element_,c);b=c},a)}0==a.rows_.length?a.dismiss():(a.show(),a.reposition(),dk(a.element_,!0))};
Rm.prototype.reposition=function(){if(this.target_&&this.reposition_){var a=this.anchorElement_||this.target_;var b=this.rightAlign_?5:1;this.topAlign_&&(b^=1);var c=65;this.showScrollbarsIfTooLarge_&&(this.element_.style.height="",c|=32);Qm(a,b,this.element_,b^1,null,null,c);this.topAlign_&&(this.element_.style.visibility="visible")}};
Rm.prototype.disposeInternal=function(){this.element_&&(hd(this.element_,"click",this.handleClick_,!1,this),hd(this.element_,"mousedown",this.handleMouseDown_,!1,this),hd(this.element_,"mouseover",this.handleMouseOver_,!1,this),this.dom_.removeNode(this.element_),this.element_=null,this.visible_=!1);nb(this.animation_);this.parent_=null;Rm.superClass_.disposeInternal.call(this)};
var Wm=function(a,b,c){if(a.highlightAllTokens_||!a.wasHighlightedAtLeastOnce_)if(3==b.nodeType){var d=null;Array.isArray(c)&&1<c.length&&!a.highlightAllTokens_&&(d=c.slice(1));c=Xm(a,c);if(0!=c.length){var e=b.nodeValue,g=a.matchWordBoundary_?new RegExp("\\b(?:"+c+")","gi"):new RegExp(c,"gi");c=[];for(var h=0,k=g.exec(e),l=0;k;)l++,c.push(e.substring(h,k.index)),c.push(e.substring(k.index,g.lastIndex)),h=g.lastIndex,k=g.exec(e);c.push(e.substring(h));if(1<c.length){d=a.highlightAllTokens_?l:1;for(e=
0;e<d;e++)g=2*e,b.nodeValue=c[g],h=a.dom_.createElement("B"),h.className=a.highlightedClassName,a.dom_.appendChild(h,a.dom_.createTextNode(c[g+1])),h=b.parentNode.insertBefore(h,b.nextSibling),b.parentNode.insertBefore(a.dom_.createTextNode(""),h.nextSibling),b=h.nextSibling;b.nodeValue=c.slice(2*d).join("");a.wasHighlightedAtLeastOnce_=!0}else d&&Wm(a,b,d)}}else for(b=b.firstChild;b;)d=b.nextSibling,Wm(a,b,c),b=d},Xm=function(a,b){var c="";if(!b)return c;Array.isArray(b)&&(b=b.filter(function(d){return!yb(te(d))}));
a.highlightAllTokens_?Array.isArray(b)?c=b.map(re).join("|"):(c=b.replace(/[\s\xa0]+/g," ").replace(/^\s+|\s+$/g,""),c=re(c),c=c.replace(/ /g,"|")):Array.isArray(b)?c=0<b.length?re(b[0]):"":/^\W/.test(b)||(c=re(b));return c},Ym=function(a,b){for(;b&&b!=a.element_&&!Cj(b,a.rowClassName);)b=b.parentNode;return b?a.rowDivs_.indexOf(b):-1};Rm.prototype.handleClick_=function(a){var b=Ym(this,a.target);0<=b&&this.dispatchEvent({type:"select",row:this.rows_[b].id});a.stopPropagation()};
Rm.prototype.handleMouseDown_=function(a){a.stopPropagation();a.preventDefault()};Rm.prototype.handleMouseOver_=function(a){a=Ym(this,a.target);0<=a&&!(300>Date.now()-this.startRenderingRows_)&&this.dispatchEvent({type:"hilite",row:this.rows_[a].id})};var R=angular.module("jfkAutocomplete",[Ll.name]);R.RENDERER_CLASS_NAME="goog-menu jfk-ac-renderer";R.ROW_CLASS_NAME="goog-menuitem";R.ACTIVE_ROW_CLASS_NAME="goog-menuitem-highlight";R.INPUT_CLASS_NAME="jfk-textinput";R.CONFLICTING_ATTRIBUTES_=["values","url","customMatcher"];R.XSSI_PREFIX_=")]}'\n";var Zm=function(a,b){om.call(this,a,b)};ra(Zm,om);
Zm.prototype.xhrCallback=function(a,b,c){var d=c.target;c=R.XSSI_PREFIX_;if(d.xhr_)b:{d=d.xhr_.responseText,c&&0==d.indexOf(c)&&(d=d.substring(c.length)),c=d;if(m.JSON)try{var e=m.JSON.parse(c);x("object"==typeof e);var g=e;break b}catch(h){}g=Ih(c)}else g=void 0;b(a,g)};
R.directive("jfkAutocomplete",["$parse","jfkCommon",function(a,b){return{restrict:"A",require:"?ngModel",link:function(c,d,e,g){R.validateAttributes_(e);var h,k=e.hasOwnProperty("fuzzy"),l=e.hasOwnProperty("createMenuInParent");if(e.hasOwnProperty("ngList")){var n=e.ngList||",";x("/"!=n[0]!=n[n.length-1],"Invalid ngList value: "+n+" Autocomplete input does not support regular expressions")}De(d[0],{autocomplete:"off"});d.addClass(R.INPUT_CLASS_NAME);R.setAccessibilityProperties_(d[0]);e.hasOwnProperty("values")&&
c.$watch(e.values,function(p){h=R.rebuildAutocomplete_(b,c,e,g,h,new Nl(p,!k),d[0],n,l)},!0);e.hasOwnProperty("url")&&c.$watch(e.url,function(p){p=new Zm(p,!k);h=R.rebuildAutocomplete_(b,c,e,g,h,p,d[0],n,l)});e.hasOwnProperty("customMatcher")&&c.$watch(e.customMatcher,function(p){h=R.rebuildAutocomplete_(b,c,e,g,h,{requestMatchingRows:p},d[0],n,l)})}}}]);
R.validateAttributes_=function(a){var b=0;Xa(R.CONFLICTING_ATTRIBUTES_,function(c){a.hasOwnProperty(c)&&b++});if(1!=b)throw Error("Exactly one attribute must be set of the following: "+R.CONFLICTING_ATTRIBUTES_);};R.setAccessibilityProperties_=function(a){uj(a,"combobox");M(a,"autocomplete","list")};R.createRenderer_=function(a,b){a=new Rm(b,a);a.className=R.RENDERER_CLASS_NAME;a.rowClassName=R.ROW_CLASS_NAME;a.activeClassName=R.ACTIVE_ROW_CLASS_NAME;return a};
R.attachAutocomplete_=function(a,b,c,d,e,g){e=R.createRenderer_(e,g?b.parentNode:void 0);e.matchWordBoundary_=!d;a=new Ql(a,e,c);c.ac_=a;c.attachInputs(b);return a};
R.rebuildAutocomplete_=function(a,b,c,d,e,g,h,k,l){e&&e.dispose();c.hasOwnProperty("customInputHandler")?(x(!c.hasOwnProperty("ngList")||yb(te(c.ngList)),"Custom input handler and ngList with delimiter values are mutually exclusive properties."),e=b.$eval(c.customInputHandler),x(e,"Custom input handler must be defined.")):e=new km(k,null,null!=k);if(c.hasOwnProperty("customRenderer")){var n=b.$eval(c.customRenderer);x(n,"Custom renderer must be defined.")}var p=!1;c.hasOwnProperty("matchWithinWords")&&
(p="true"==c.matchWithinWords);e=R.attachAutocomplete_(g,h,e,p,n,l);c.maxMatches&&(e.maxMatches_=c.maxMatches);c.hasOwnProperty("autoHilite")&&(e.autoHilite_="true"==c.autoHilite);c.hasOwnProperty("allowFreeSelect")&&(e.allowFreeSelect_="true"==c.allowFreeSelect);c.hasOwnProperty("triggerSuggestionsOnUpdate")&&(e.triggerSuggestionsOnUpdate_="true"==c.triggerSuggestionsOnUpdate);d&&Hl(b,e,"update",function(r){b.$apply(function(){null!=k?d.$setViewValue(h.value):null!=r.row&&d.$setViewValue(r.row)})});
Gl(a,b,c,e);return e};var $m={LEFT:0,BOTTOM:1,TOP:2,RIGHT:3};var an;an="function"===typeof Symbol&&"symbol"===typeof Symbol()?Symbol("INTERNAL_ARRAY_STATE"):void 0;x(13===Math.round(Math.log2(Math.max.apply(Math,ka(Object.values({IS_REPEATED_FIELD:1,IS_IMMUTABLE_ARRAY:2,IS_API_FORMATTED:4,ONLY_MUTABLE_VALUES:8,ONLY_IMMUTABLE_VALUES_IF_OWNED:16,MUTABLE_REFERENCES_ARE_OWNED:32,CONSTRUCTED:64,TRANSFERRED:128,HAS_SPARSE_OBJECT:256,HAS_MESSAGE_ID:512,IS_IMMUTABLE_JS_REPEATED_FIELD_COERCED_FROM_WIRE:1024,FROZEN_ARRAY:2048,STRING_FORMATTED:4096,GBIGINT_FORMATTED:8192}))))));var bn=Object.getOwnPropertyDescriptor(Array.prototype,"jspbArrayState");
Object.defineProperties(Array.prototype,{jspbArrayState:{get:function(){function a(e,g){e&b&&c.push(g)}var b=cn(this),c=[];a(1,"IS_REPEATED_FIELD");a(2,"IS_IMMUTABLE_ARRAY");a(4,"IS_API_FORMATTED");a(4096,"STRING_FORMATTED");a(8192,"GBIGINT_FORMATTED");a(8,"ONLY_MUTABLE_VALUES");a(32,"MUTABLE_REFERENCES_ARE_OWNED");a(64,"CONSTRUCTED");a(128,"TRANSFERRED");a(256,"HAS_SPARSE_OBJECT");a(512,"HAS_MESSAGE_ID");a(2048,"FROZEN_ARRAY");var d=dn(b);536870912!==d&&c.push("pivot: "+d);d=c.join(",");return bn?
bn.get.call(this)+"|"+d:d},configurable:!0,enumerable:!1}});var cn=an?function(a){Sa(a,"state is only maintained on arrays.");return a[an]|0}:function(a){Sa(a,"state is only maintained on arrays.");return a.internalArrayState|0};function dn(a){a=a>>14&1023;return 0===a?536870912:a};var en="undefined"!=typeof Symbol&&"undefined"!=typeof Symbol.hasInstance;Object.freeze(new function(){});Object.freeze(new function(){});var fn=function(){throw Error("please construct maps as mutable then call toImmutable");};if(en){var gn=function(){throw Error("Cannot perform instanceof checks on ImmutableMap: please use isImmutableMap or isMutableMap to assert on the mutability of a map. See go/jspb-api-gotchas#immutable-classes for more information");},hn={};Object.defineProperties(fn,(hn[Symbol.hasInstance]={value:gn,configurable:!1,writable:!1,enumerable:!1},hn));x(fn[Symbol.hasInstance]===gn,"defineProperties did not work: was it monkey-patched?")};if("undefined"!==typeof Proxy){var kn=jn;new Proxy({},{getPrototypeOf:kn,setPrototypeOf:kn,isExtensible:kn,preventExtensions:kn,getOwnPropertyDescriptor:kn,defineProperty:kn,has:kn,get:kn,set:kn,deleteProperty:kn,apply:kn,construct:kn})}function jn(){throw Error("this array or object is owned by JSPB and should not be reused, did you mean to copy it with copyJspbArray? See go/jspb-api-gotchas#construct_from_array");throw Error();};var ln="src srcdoc codebase data href rel action formaction sandbox cite poster icon".split(" ");var mn=function(){},nn=function(a,b){if(b!==de)throw Error("Bad secret");this.privateDoNotAccessOrElseWrappedAttrPrefix=a};ra(nn,mn);nn.prototype.toString=function(){return this.privateDoNotAccessOrElseWrappedAttrPrefix};var on=ha([""]),pn=ia(["\x00"],["\\0"]),qn=ia(["\n"],["\\n"]),rn=ia(["\x00"],["\\u0000"]),sn=ha([""]),tn=ia(["\x00"],["\\0"]),un=ia(["\n"],["\\n"]),vn=ia(["\x00"],["\\u0000"]);
function wn(a){if(!Array.isArray(a)||!Array.isArray(a.raw)||a.length!==a.raw.length||!xn&&a===a.raw||!(xn&&!yn||zn(a))||1!==a.length)throw new TypeError("\n ############################## ERROR ##############################\n\n It looks like you are trying to call a template tag function (fn`...`)\n using the normal function syntax (fn(...)), which is not supported.\n\n The functions in the safevalues library are not designed to be called\n like normal functions, and doing so invalidates the security guarantees\n that safevalues provides.\n\n If you are stuck and not sure how to proceed, please reach out to us\n instead through:\n - go/ise-hardening-yaqs (preferred) // LINE-INTERNAL\n - g/ise-hardening // LINE-INTERNAL\n - https://github.com/google/safevalues/issues\n\n ############################## ERROR ##############################");}
function zn(a){return Object.isFrozen(a)&&Object.isFrozen(a.raw)}function An(a){return-1===a.toString().indexOf("`")}var xn=An(function(a){return a(on)})||An(function(a){return a(pn)})||An(function(a){return a(qn)})||An(function(a){return a(rn)}),yn=zn(sn)&&zn(tn)&&zn(un)&&zn(vn);var Bn=[],Cn=function(a){console.warn("A URL with content '"+a+"' was sanitized away.")};-1===Bn.indexOf(Cn)&&Bn.push(Cn);function Dn(a){var b={preserveNewlines:!0};b=void 0===b?{}:b;if(a instanceof Ud)return a;a=String(a).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'");b.preserveSpaces&&(a=a.replace(/(^|[\r\n\t ]) /g,"$1 "));b.preserveNewlines&&(a=a.replace(/(\r\n|\n|\r)/g,"<br>"));b.preserveTabs&&(a=a.replace(/(\t+)/g,'<span style="white-space:pre">$1</span>'));return Wd(a)};var En={sanitizedContentKindHtml:!0},Fn={sanitizedContentHtmlAttribute:!0},Gn=function(){throw Error("Do not instantiate directly");};Gn.prototype.contentDir=null;Gn.prototype.getContent=function(){return this.content};Gn.prototype.toString=function(){return this.content};Gn.prototype.toSafeHtml=function(){if(this.contentKind!==En)throw Error("Sanitized content was not of kind HTML.");var a=this.toString();ee("Soy SanitizedContent of kind HTML produces SafeHtml-contract-compliant value.");return Wd(a)};
var Hn=function(){Gn.call(this)};v(Hn,Gn);Hn.prototype.contentKind=En;var In=function(){Gn.call(this)};v(In,Gn);In.prototype.contentKind=Fn;In.prototype.contentDir=1;var Jn=function(a,b,c){(b=null!=a&&a.contentKind===b)&&x(a.constructor===c);return b};var Kn=function(a){if(null!=a)switch(a.contentDir){case 1:return 1;case -1:return-1;case 0:return 0}return null},Ln=function(a){function b(c){this.content=c}b.prototype=a.prototype;return function(c,d){c=new b(String(c));void 0!==d&&(c.contentDir=d);return c}}(Hn),Mn={},S=function(a){return a instanceof Gn?!!a.getContent():!!a},T=function(a){Jn(a,En,Hn)?(a=a.getContent(),a=String(a).replace(Nn,"").replace(On,"<"),a=String(a).replace(Pn,Qn)):a=String(a).replace(Rn,Qn);return a},Sn=function(a){Jn(a,
Fn,In)&&(a=a.getContent());return(a&&!a.startsWith(" ")?" ":"")+a},Tn={},Un=function(){x(Tn===Tn,"found an incorrect call marker, was an internal function called from the top level?")},Vn={"\x00":"�","\t":"	","\n":" ","\v":"","\f":"","\r":" "," ":" ",'"':""","&":"&","'":"'","-":"-","/":"/","<":"<","=":"=",">":">","`":"`","\u0085":"…","\u00a0":" ","\u2028":"
","\u2029":"
"},Qn=function(a){return Vn[a]},Rn=/[\x00\x22\x26\x27\x3c\x3e]/g,
Pn=/[\x00\x22\x27\x3c\x3e]/g,Wn=/^(?!on|src|(?:action|archive|background|cite|classid|codebase|content|data|dsync|href|http-equiv|longdesc|style|usemap)\s*$)(?:[a-z0-9_$:-]*)$/i,Xn=function(a){a=String(a);return Wn.test(a)?a:(Na("Bad value `%s` for |filterHtmlAttributes",[a]),"zSoyz")},Nn=/<(?:!|\/?([a-zA-Z][a-zA-Z0-9:\-]*))(?:[^>'"]+|"[^"]*"|'[^']*')*>/g,On=/</g;/*
Copyright The Closure Library Authors.
SPDX-License-Identifier: Apache-2.0
*/
function Yn(a,b,c){a=a(b||Zn,void 0);c=c||ye();if(a&&a.renderAsElement)c=a.renderAsElement();else{c=c.createElement("DIV");b:if(q(a)){if(a.toSafeHtml&&(b=a.toSafeHtml(),b instanceof Ud)){a=b;break b}Na("Soy template output is unsafe for use as HTML: "+a);a=Xd("zSoyz")}else a=Xd(String(a));b=a.toString();var d=b.match($n);x(!d,"This template starts with a %s, which cannot be a child of a <div>, as required by soy internals. Consider using goog.soy.renderElement instead.\nTemplate output: %s",d&&d[0],
b);he(c,a)}1==c.childNodes.length&&(a=c.firstChild,1==a.nodeType&&(c=a));return c}var $n=/^<(body|caption|col|colgroup|head|html|tr|td|th|tbody|thead|tfoot)>/i,Zn={};var ao=function(a,b){var c=a.showCloseBox;a=a.uid;Un();Mn["jfk.templates.bubble.main"]?c=Mn["jfk.templates.bubble.main"]({showCloseBox:c,uid:a},b):(b='<div class="'+T("jfk-bubble")+'" role="alertdialog"'+(S(a)?' aria-describedby="'+T(a)+'"':"")+'><div class="'+T("jfk-bubble-content-id")+'"'+(S(a)?' id="'+T(a)+'"':"")+"></div>",S(c)&&(b+='<div class="'+T("jfk-bubble-closebtn-id")+" "+T("jfk-bubble-closebtn")+'" aria-label="',b+="Close".replace(Pn,Qn),b+='" role="button" tabindex=0></div>'),b+='<div class="'+
T("jfk-bubble-arrow-id")+" "+T("jfk-bubble-arrow")+'"><div class="'+T("jfk-bubble-arrowimplbefore")+'"></div><div class="'+T("jfk-bubble-arrowimplafter")+'"></div></div></div>',c=Ln(b));return c};var bo=function(){};bo.prototype.reposition=function(){};var co=function(a,b){this.className_=a;this.disableSubpixels_=!!b;this.arrowClassMap_={0:this.className_+"-arrowright",1:this.className_+"-arrowup",2:this.className_+"-arrowdown",3:this.className_+"-arrowleft"}};ra(co,bo);f=co.prototype;f.setAnchorElement=function(a){this.anchorElement_=a};f.setPosition=function(a,b,c,d){null!=a&&(this.boxPosition_=a);null!=b&&(this.arrowAlignment_=b);"number"===typeof c&&(this.arrowOffset_=Math.max(c,15));"number"===typeof d&&(this.offsetFromAnchor_=d)};
f.reposition=function(a,b,c){x(this.arrowElement_,"Must call setElements first.");a=this.arrowAlignment_;2==a&&(a=0);this.reposition_(this.boxPosition_,a,2==this.arrowAlignment_?eo(this.boxPosition_)?this.boxElement_.offsetHeight/2:this.boxElement_.offsetWidth/2:this.arrowOffset_,0,c)};f.setAutoReposition=function(a){this.isAutoReposition_=a};
f.reposition_=function(a,b,c,d,e){if(this.anchorElement_){var g=fo(a,b),h=this.anchorElement_,k=this.boxElement_,l=this.viewport_;var n=Zj(h);a:{n=(eo(a)?n.height/2:n.width/2)-c;var p=Pm(h,g);if(l)l=l.clone(),k&&(k=Om(k),l.left+=k.x,l.right+=k.x,l.top+=k.y,l.bottom+=k.y);else if(l=Sj(h),!l)break a;h=ak(h);h=new Hj(h.top,h.left+h.width,h.top+h.height,h.left);eo(a)?h.top<l.top&&!(p&1)?n-=l.top-h.top:h.bottom>l.bottom&&p&1&&(n-=h.bottom-l.bottom):h.left<l.left&&!(p&4)?n-=l.left-h.left:h.right>l.right&&
p&4&&(n-=h.right-l.right)}n=eo(a)?new E(this.offsetFromAnchor_,n):new E(n,this.offsetFromAnchor_);p=eo(a)?6:9;this.allowBoxOverflowOnPositioningFail_&&2==d&&(p=eo(a)?4:1);h=a^3;eo(a)&&"rtl"==this.anchorElement_.dir&&(h=a);g=Qm(this.anchorElement_,fo(h,b),this.boxElement_,g,n,e,this.isAutoReposition_?p:0,void 0,this.viewport_);if(2!=d&&g&496){this.reposition_(a^3,b,c,this.allowBoxOverflowOnPositioningFail_&&0==d?1:2,e);return}!this.disableSubpixels_||g&496||(d=parseFloat(this.boxElement_.style.left),
e=parseFloat(this.boxElement_.style.top),x(!isNaN(d)&&!isNaN(e),"Could not parse position."),isFinite(d)&&0==d%1&&isFinite(e)&&0==e%1||Oj(this.boxElement_,Math.round(d),Math.round(e)))}go(this,a,b,c)};
var go=function(a,b,c,d){var e=a.arrowElement_;Gc(a.arrowClassMap_,function(g){Gj(e,g,!1)},a);N(e,a.arrowClassMap_[b]);e.style.top=e.style.left=e.style.right=e.style.bottom="";a.anchorElement_?(c=Xj(a.anchorElement_,a.boxElement_),d=ho(a.anchorElement_,b),eo(b)?e.style.top=io(c.y+d.y,a.boxElement_.offsetHeight-15)+"px":e.style.left=io(c.x+d.x,a.boxElement_.offsetWidth-15)+"px"):e.style[0==c?eo(b)?"top":"left":eo(b)?"bottom":"right"]=d+"px"},io=function(a,b){return 15>b?15:Math.min(Math.max(a,15),
b)},fo=function(a,b){switch(a){case 2:return 0==b?1:5;case 1:return 0==b?0:4;case 0:return 0==b?12:13;default:return 0==b?8:9}},ho=function(a,b){var c=0,d=0;a=Zj(a);switch(b){case 2:c=a.width/2;break;case 1:c=a.width/2;d=a.height;break;case 0:d=a.height/2;break;case 3:c=a.width,d=a.height/2}return new E(c,d)},eo=function(a){return 0==a||3==a};f=co.prototype;f.isAutoReposition_=!1;f.arrowAlignment_=2;f.arrowOffset_=20;f.boxPosition_=3;f.viewport_=null;f.offsetFromAnchor_=-5;
f.allowBoxOverflowOnPositioningFail_=!1;var jo=function(){},ko=new jo,lo=["click","keydown","keyup"];jo.prototype.listen=function(a,b,c,d,e){var g=function(h){var k=bd(b),l=Ue(h.target)?h.target.getAttribute("role")||null:null;"click"!=h.type||0!=h.event_.button||jc&&h.ctrlKey?13!=h.keyCode&&3!=h.keyCode||"keyup"==h.type?32!=h.keyCode||"button"!=l&&"tab"!=l&&"radio"!=l||("keyup"==h.type&&k.call(d,h),h.preventDefault()):(h.type="keypress",k.call(d,h)):k.call(d,h)};g.listener_=b;g.scope_=d;e?e.listen(a,lo,g,c):ad(a,lo,g,c)};
jo.prototype.unlisten=function(a,b,c,d,e){for(var g,h=0;g=lo[h];h++){var k=a;var l=g;var n=!!c;l=Cc(k)?k.getListeners(l,n):k?(k=dd(k))?k.getListeners(l,n):[]:[];for(k=0;n=l[k];k++){var p=n.listener;if(p.listener_==b&&p.scope_==d){e?e.unlisten(a,g,n.listener,c,d):hd(a,g,n.listener,c,d);break}}}};var mo=function(a,b){Array.isArray(b)||(b=[b]);x(0<b.length,"At least one Css3Property should be specified.");b=b.map(function(c){if("string"===typeof c)return c;Ra(c,"Expected css3 property to be an object.");var d=c.property+" "+c.duration+"s "+c.timing+" "+c.delay+"s";x(c.property&&"number"===typeof c.duration&&c.timing&&"number"===typeof c.delay,"Unexpected css3 property value: %s",d);return d});O(a,"transition",b.join(","))},no=od(function(){if(B)return!0;var a=Le(document,"DIV"),b=hc?"-webkit":
C?"-moz":B?"-ms":null,c={transition:"opacity 1s linear"};b&&(c[b+"-transition"]="opacity 1s linear");c={style:c};if(!ae.test("div"))throw Error("Invalid tag name <div>.");if("DIV"in ce)throw Error("Tag name <div> is not allowed for SafeHtml.");b=void 0;var d="";if(c)for(n in c)if(Object.prototype.hasOwnProperty.call(c,n)){if(!ae.test(n))throw Error('Invalid attribute name "'+n+'".');var e=c[n];if(null!=e){var g=void 0;var h=n;if(e instanceof td)e=ud(e);else if("style"==h.toLowerCase()){if(!q(e))throw Error('The "style" attribute requires goog.html.SafeStyle or map of style properties, '+
typeof e+" given: "+e);if(!(e instanceof Gd)){var k="";for(g in e)if(Object.prototype.hasOwnProperty.call(e,g)){if(!/^[-_a-zA-Z0-9]+$/.test(g))throw Error("Name allows only [-_a-zA-Z0-9], got: "+g);var l=e[g];null!=l&&(l=Array.isArray(l)?l.map(Jd).join(" "):Jd(l),k+=g+":"+l+";")}e=k?new Gd(k,Fd):Id}e=Hd(e)}else{if(/^on/i.test(h))throw Error('Attribute "'+h+'" requires goog.string.Const value, "'+e+'" given.');if(h.toLowerCase()in be)if(e instanceof wd)e=xd(e).toString();else if(e instanceof zd)e=
Ad(e);else if("string"===typeof e)e=(Dd(e)||Ed).toString();else throw Error('Attribute "'+h+'" on tag "div" requires goog.html.SafeUrl, goog.string.Const, or string, value "'+e+'" given.');}x(e instanceof zd||e instanceof wd||e instanceof Gd||e instanceof Ud||"string"===typeof e||"number"===typeof e,"String or number value expected, got "+typeof e+" with value: "+e);g=h+'="'+Hb(String(e))+'"';d+=" "+g}}var n="<div"+d;null==b?b=[]:Array.isArray(b)||(b=[b]);!0===pd.div?(x(!b.length,"Void tag <div> does not allow content."),
n+=">"):(b=$d(b),n+=">"+Vd(b).toString()+"</div>");n=Wd(n);ie(a,n);a=a.firstChild;x(a.nodeType==Node.ELEMENT_NODE);n=a.style[ue("transition")];return""!=("undefined"!==typeof n?n:a.style[Jj(a,"transition")]||"")});var oo=function(a,b,c,d,e){vm.call(this);this.element_=a;this.duration_=b;this.initialStyle_=c;this.finalStyle_=d;this.transitions_=Array.isArray(e)?e:[e]};v(oo,vm);f=oo.prototype;f.play=function(){if(1==this.state_)return!1;this.onBegin();this.dispatchAnimationEvent("play");this.startTime=Date.now();this.state_=1;if(no())return O(this.element_,this.initialStyle_),this.timerId_=hi(this.play_,void 0,this),!0;this.stop_(!1);return!1};
f.play_=function(){Zj(this.element_);mo(this.element_,this.transitions_);O(this.element_,this.finalStyle_);this.timerId_=hi(t(this.stop_,this,!1),1E3*this.duration_)};f.stop=function(){1==this.state_&&this.stop_(!0)};f.stop_=function(a){O(this.element_,"transition","");m.clearTimeout(this.timerId_);O(this.element_,this.finalStyle_);this.endTime=Date.now();this.state_=0;if(a)this.onStop();else this.dispatchAnimationEvent("finish");this.onEnd()};f.disposeInternal=function(){this.stop();oo.superClass_.disposeInternal.call(this)};
f.pause=function(){x(!1,"Css3 transitions does not support pause action.")};var po=function(a,b,c,d){return new oo(a,.218,{opacity:c},{opacity:d},{property:"opacity",duration:.218,timing:b,delay:0})};var ro=function(a,b){I.call(this);this.handler_=new Ri(this);a=a||null;qo(this);this.element_=a;b&&(this.type_=b)};v(ro,I);f=ro.prototype;f.element_=null;f.autoHide_=!0;f.autoHidePartners_=null;f.autoHideRegion_=null;f.isVisible_=!1;f.shouldHideAsync_=!1;f.lastShowTime_=-1;f.lastHideTime_=-1;f.hideOnEscape_=!1;f.enableCrossIframeDismissal_=!0;f.type_="toggle_display";f.getType=function(){return this.type_};f.getElement=function(){return this.element_};
f.setAutoHide=function(a){qo(this);this.autoHide_=a};f.getHandler=function(){return this.handler_};var qo=function(a){if(a.isVisible_)throw Error("Can not change this state of the popup while showing.");};ro.prototype.isVisible=function(){return this.isVisible_};ro.prototype.isOrWasRecentlyVisible=function(){return this.isVisible_||150>Date.now()-this.lastHideTime_};
ro.prototype.setVisible=function(a){this.showTransition_&&this.showTransition_.stop();this.hideTransition_&&this.hideTransition_.stop();if(a){if(!this.isVisible_&&this.dispatchEvent("beforeshow")){if(!this.element_)throw Error("Caller must call setElement before trying to show the popup");this.reposition();a=xe(this.element_);this.hideOnEscape_&&this.handler_.listen(a,"keydown",this.onDocumentKeyDown_,!0);if(this.autoHide_)if(this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0),B){try{var b=
a.activeElement}catch(d){}for(;b&&"IFRAME"==b.nodeName;){try{var c=b.contentDocument||b.contentWindow.document}catch(d){break}a=c;b=a.activeElement}this.handler_.listen(a,"mousedown",this.onDocumentMouseDown_,!0);this.handler_.listen(a,"deactivate",this.onDocumentBlur_)}else this.handler_.listen(a,"blur",this.onDocumentBlur_);"toggle_display"==this.type_?(this.element_.style.visibility="visible",P(this.element_,!0)):"move_offscreen"==this.type_&&this.reposition();this.isVisible_=!0;this.lastShowTime_=
Date.now();this.lastHideTime_=-1;if(this.showTransition_)$c(this.showTransition_,"end",this.onShow,!1,this),this.showTransition_.play();else this.onShow()}}else so(this)};ro.prototype.reposition=function(){};
var so=function(a,b){if(!a.isVisible_||!a.dispatchEvent({type:"beforehide",target:b}))return!1;a.handler_&&a.handler_.removeAll();a.isVisible_=!1;a.lastHideTime_=Date.now();a.hideTransition_?($c(a.hideTransition_,"end",Ga(a.continueHidingPopup_,b),!1,a),a.hideTransition_.play()):a.continueHidingPopup_(b);return!0};f=ro.prototype;
f.continueHidingPopup_=function(a){"toggle_display"==this.type_?this.shouldHideAsync_?hi(this.hidePopupElement,0,this):this.hidePopupElement():"move_offscreen"==this.type_&&(this.element_.style.top="-10000px");this.dispatchEvent({type:"hide",target:a})};f.hidePopupElement=function(){this.element_.style.visibility="hidden";P(this.element_,!1)};f.onShow=function(){this.dispatchEvent("show")};
f.onDocumentMouseDown_=function(a){a=a.target;Ve(this.element_,a)||to(this,a)||this.autoHideRegion_&&!Ve(this.autoHideRegion_,a)||150>Date.now()-this.lastShowTime_||so(this,a)};f.onDocumentKeyDown_=function(a){27==a.keyCode&&so(this,a.target)&&(a.preventDefault(),a.stopPropagation())};
f.onDocumentBlur_=function(a){if(this.enableCrossIframeDismissal_){var b=xe(this.element_);if("undefined"!=typeof document.activeElement){if(a=b.activeElement,!a||Ve(this.element_,a)||"BODY"==a.tagName||to(this,a))return}else if(a.target!=b)return;150>Date.now()-this.lastShowTime_||so(this)}};var to=function(a,b){return Za(a.autoHidePartners_||[],function(c){return b===c||Ve(c,b)})};
ro.prototype.disposeInternal=function(){ro.superClass_.disposeInternal.call(this);this.handler_.dispose();nb(this.showTransition_);nb(this.hideTransition_);delete this.element_;delete this.handler_;delete this.autoHidePartners_};var uo=function(a,b){this.popupCorner_=8;this.position_=b||void 0;ro.call(this,a)};v(uo,ro);uo.prototype.setPosition=function(a){this.position_=a||void 0;this.isVisible()&&this.reposition()};uo.prototype.reposition=function(){if(this.position_){var a=!this.isVisible()&&"move_offscreen"!=this.getType(),b=this.getElement();a&&(b.style.visibility="hidden",P(b,!0));this.position_.reposition(b,this.popupCorner_,this.margin_);a&&P(b,!1)}};function vo(a,b){if(1===a.nodeType){var c=a.tagName;if("SCRIPT"===c||"STYLE"===c)throw Error("SCRIPT"===c?"Use safeScriptEl.setTextContent with a SafeScript.":"Use safeStyleEl.setTextContent with a SafeStyleSheet.");}a.innerHTML=Vd(b)}
function wo(a,b){var c=xo;if(0===c.length)throw Error("No prefixes are provided");if(c.map(function(d){if(d instanceof nn)d=d.privateDoNotAccessOrElseWrappedAttrPrefix;else throw Error("Unexpected type when unwrapping SafeAttributePrefix");return d}).every(function(d){return 0!=="value".indexOf(d)}))throw Error('Attribute "value" does not match any of the allowed prefixes.');a.setAttribute("value",b)};function yo(a){Q.call(this,a);this.arrowPosition_=new co(this.className_,!0);this.popup_=new uo;ob(this,this.popup_);this.hideYPosition_=0;this.extraCssClasses_=[]}v(yo,Q);f=yo.prototype;f.className_="jfk-bubble";f.showCloseButton_=!0;f.disposeOnHide_=!1;f.setAnchorElement=function(a){this.arrowPosition_.setAnchorElement(a);this.reposition()};
f.setPosition=function(a,b,c,d,e){x(!this.inDocument_,"Must call setPosition() before rendering");this.arrowPosition_.allowBoxOverflowOnPositioningFail_=!!e;this.arrowPosition_.setPosition(a,b,c,d)};var zo=function(a,b){x(!a.inDocument_,"Must call showCloseButton() before rendering");a.showCloseButton_=b};yo.prototype.addClassName=function(a){x(!this.inDocument_,"Must call addClassName() before rendering");this.extraCssClasses_.push(a)};
yo.prototype.setContent=function(a){x("string"===typeof a||a.nodeType||a instanceof Hn||a instanceof Ud,"Content must be a string or HTML.");this.content_=a;Ao(this,a)};var Ao=function(a,b){a=a.getContentElement();b&&a&&("string"===typeof b?We(a,b):b instanceof Hn?vo(a,b.toSafeHtml()):b instanceof Ud?vo(a,b):(a.textContent="",Ne(a,b)))};f=yo.prototype;f.setAutoHide=function(a){this.popup_.setAutoHide(a)};f.setAutoReposition=function(a){this.arrowPosition_.setAutoReposition(a)};
f.getContentElement=function(){return this.getElementByClass(this.className_+"-content-id")};f.createDom=function(){this.element_=Yn(ao,{showCloseBox:this.showCloseButton_,uid:"bubble-"+Da(this)},this.getDomHelper());Ao(this,this.content_);P(this.getElement(),!1);var a=this.popup_,b=this.getElement();qo(a);a.element_=b;if(!ic){a=this.popup_;b=po(this.getElement(),"ease-out",0,1);var c=po(this.getElement(),"ease-in",1,0);a.showTransition_=b;a.hideTransition_=c}Dj(this.getElement(),this.extraCssClasses_)};
f.enterDocument=function(){yo.superClass_.enterDocument.call(this);this.getHandler().listen(this.popup_,["beforeshow","show","beforehide","hide"],this.handlePopupEvent_);if(this.showCloseButton_){var a=this.getHandler(),b=this.getElementByClass(this.className_+"-closebtn-id");ko.listen(b,Ga(this.setVisible,!1),void 0,a.handler_||a,a)}a=this.getElement();x(a,"getElement() returns null.");b=this.getElementByClass(this.className_+"-arrow-id");x(b,"No arrow element is found!");var c=this.arrowPosition_;
c.boxElement_=a;c.arrowElement_=b;this.popup_.setPosition(this.arrowPosition_)};f.setVisible=function(a){this.popup_.setVisible(a)};f.isVisible=function(){return this.popup_.isVisible()};f.isOrWasRecentlyVisible=function(){return this.popup_.isOrWasRecentlyVisible()};f.reposition=function(){this.isVisible()&&this.popup_.reposition()};f.handleScroll_=function(){var a=Wj(this.getElement());this.hideYPosition_&&a.y<this.hideYPosition_&&this.setVisible(!1);return!1};
f.handlePopupEvent_=function(a){if("show"==a.type||"hide"==a.type){var b=this.getHandler(),c=this.getDomHelper();c=B?He(c.document_):c.document_;"show"==a.type?b.listen(c,"scroll",this.handleScroll_):b.unlisten(c,"scroll",this.handleScroll_)}b=this.dispatchEvent(a.type);this.disposeOnHide_&&"hide"==a.type&&this.dispose();return b};function Bo(a,b){yo.call(this,b);this.setAnchorElement(a);this.disposeOnHide_=!0;this.addClassName("jfk-bubble-promo")}v(Bo,yo);Bo.prototype.enterDocument=function(){Bo.superClass_.enterDocument.call(this);this.setVisible(!0)};var Co=angular.module("jfkBubble",[Ll.name]);Co.ALIGNMENT_MAP_={LEFT_OR_TOP:0,RIGHT_OR_BOTTOM:1,CENTER:2};Co.service("jfkBubbleService",function(){return new Do});var Do=function(){this.bubble_=null},Eo=function(a,b,c){if(a.bubble_)throw Error("Only one bubble component allowed to be registered.");var d=new yo;zo(d,!0);d.setContent(b);c(d);a.bubble_=d};
Do.prototype.showBubbleMessage=function(a,b){if(a){this.bubble_||Eo(this,Ke("DIV"),function(d){d.render(document.body)});var c=this.bubble_.getContentElement().firstChild;We(c,a);this.bubble_.setAnchorElement(b);this.bubble_.setVisible(!0)}};Do.prototype.showBubbleMessage=Do.prototype.showBubbleMessage;
Do.prototype.showPromoBubble=function(a,b,c,d,e,g){b=new Bo(b);if(Ue(a))b.setContent(a);else{var h=Ke("DIV");We(h,a);b.setContent(h)}zo(b,!!c);b.setAutoReposition(!!e);d&&b.setPosition(d);g&&b.addClassName(g);b.render(document.body);return b};Do.prototype.showPromoBubble=Do.prototype.showPromoBubble;Co.directive("jfkSharedBubble",["jfkBubbleService",function(a){return{restrict:"A",link:function(b,c){var d=c[0],e=d.nextSibling;Eo(a,d,function(g){e?ok(g,e.parentNode,e):g.render(d.parent)})}}}]);
Co.directive("jfkBubble",["jfkCommon",function(a){return{restrict:"A",link:function(b,c,d){function e(){Jl(b,function(){})}var g=c[0];c=c.parent()[0];if(!c)throw Error("The bubble element must have a parent.");var h=new yo;h.setContent(g);h.setAnchorElement(c);zo(h,d.hasOwnProperty("jfkBubbleShowCloseButton")?"true"==d.jfkBubbleShowCloseButton.toLowerCase():!0);h.setAutoReposition(d.hasOwnProperty("jfkBubbleAutoReposition")?"true"==d.jfkBubbleAutoReposition.toLowerCase():!0);(d.hasOwnProperty("jfkBubblePosition")||
d.hasOwnProperty("jfkBubbleAlignment"))&&h.setPosition(d.hasOwnProperty("jfkBubblePosition")?$m[d.jfkBubblePosition]:void 0,d.hasOwnProperty("jfkBubbleAlignment")?Co.ALIGNMENT_MAP_[d.jfkBubbleAlignment]:void 0);d.hasOwnProperty("jfkBubbleCssClass")&&h.addClassName(d.jfkBubbleCssClass);d.hasOwnProperty("jfkAutoHide")&&h.setAutoHide("true"==d.jfkAutoHide.toLowerCase());h.listen("show",e);h.listen("hide",e);h.render(document.body);Gl(a,b,d,h);a.register(b,d.jfkBubble,new Fo(h))}}}]);
var Fo=function(a){this.bubble_=a};u("ng.jfk.Bubble.BubbleHandle",Fo);Fo.prototype.show=function(){this.bubble_.setVisible(!0)};Fo.prototype.show=Fo.prototype.show;Fo.prototype.hide=function(){this.bubble_.setVisible(!1)};Fo.prototype.hide=Fo.prototype.hide;Fo.prototype.toggle=function(a){this.bubble_.setVisible(void 0!==a?a:!this.bubble_.isOrWasRecentlyVisible())};Fo.prototype.toggle=Fo.prototype.toggle;
Fo.prototype.setAnchorElement=function(a){this.bubble_.setAnchorElement(a&&a.target?a.target:a)};Fo.prototype.setAnchorElement=Fo.prototype.setAnchorElement;Fo.prototype.isOrWasRecentlyVisible=function(){return this.bubble_.isOrWasRecentlyVisible()};Fo.prototype.isOrWasRecentlyVisible=Fo.prototype.isOrWasRecentlyVisible;
Co.directive("jfkPromoBubble",["jfkBubbleService","jfkCommon",function(a,b){return{restrict:"A",link:function(c,d,e){var g=d.parent()[0];if(!g)throw Error("The promo bubble element must have a parent.");g.removeChild(d[0]);c.$on("$destroy",function(){angular.element(d[0]).remove()});var h=e.hasOwnProperty("jfkPromoBubbleShowCloseButton")?"true"==e.jfkPromoBubbleShowCloseButton.toLowerCase():!0,k=e.hasOwnProperty("jfkPromoBubbleAutoReposition")?"true"==e.jfkPromoBubbleAutoReposition.toLowerCase():
!0,l;e.hasOwnProperty("jfkPromoBubblePosition")&&(l=$m[e.jfkPromoBubblePosition]);var n;e.hasOwnProperty("jfkPromoBubbleCssClass")&&(n=e.jfkPromoBubbleCssClass);b.register(c,e.jfkPromoBubble,new Go(function(){var p=a.showPromoBubble(d[0],g,h,l,k,n);Gl(b,c,e,p);return p}))}}}]);var Go=function(a){this.bubble_=null;this.bubbleConstructor_=a};u("ng.jfk.Bubble.PromoBubbleHandle",Go);Go.prototype.show=function(){this.bubble_&&this.bubble_.dispose();this.bubble_=this.bubbleConstructor_()};
Go.prototype.show=Go.prototype.show;Go.prototype.hide=function(){this.bubble_.setVisible(!1)};Go.prototype.hide=Go.prototype.hide;Go.prototype.isOrWasRecentlyVisible=function(){return!!this.bubble_&&!this.bubble_.disposed_&&this.bubble_.isOrWasRecentlyVisible()};Go.prototype.isOrWasRecentlyVisible=Go.prototype.isOrWasRecentlyVisible;var Ho={NONE:0,START:1,END:2,BOTH:3};var Io=function(a,b){if(Mn["jfk.templates.button.strict"])return Mn["jfk.templates.button.strict"](a,b);a=a||{};var c=a.attributes,d=a.content,e=a.disabled,g=a.id,h=a.tabindex,k=a.title,l=a.usingKennedyTooltip,n=a.value;g='<div role="button"'+(S(g)?' id="'+T(g)+'"':"")+' class="';var p=a||{};a=p.classes;var r=p.disabled,w=p.checked,D=p.style;p=p.width;Un();if(Mn["jfk.templates.button.classes_"])b=Mn["jfk.templates.button.classes_"]({classes:a,disabled:r,checked:w,style:D,width:p},b);else{b="goog-inline-block jfk-button ";
switch(q(D)?D.toString():D){case 0:b+="jfk-button-standard";break;case 2:b+="jfk-button-action";break;case 3:b+="jfk-button-primary";break;case 1:b+="jfk-button-default";break;case 4:b+="jfk-button-flat";break;case 5:b+="jfk-button-mini";break;case 6:b+="jfk-button-contrast";break;default:b+="jfk-button-standard"}b+=((p&&p.isInvokableFn&&(1).isInvokableFn?p.contentKind!==(1).contentKind?0:p.toString()===(1).toString():1==p)?" jfk-button-narrow":"")+(S(w)?" jfk-button-checked":"")+(S(a)?" "+a:"")+
(S(r)?" jfk-button-disabled":"")}c=g+T(b)+'"'+(S(e)?' aria-disabled="true"':' tabindex="'+(S(h)?T(h):"0")+'"')+(S(k)?S(l)?' data-tooltip="'+T(k)+'"':' title="'+T(k)+'"':"")+(S(n)?' value="'+T(n)+'"':"")+(S(c)?Sn(Jn(c,Fn,In)?c.getContent():Xn(c)):"")+">";d=null!=d?d:"";d=Jn(d,En,Hn)?d:d instanceof Ud?Ln(Vd(d).toString()):Ln(String(String(d)).replace(Rn,Qn),Kn(d));return Ln(c+d+"</div>")};var Jo={STANDARD:0,DEFAULT:1,ACTION:2,PRIMARY:3,FLAT:4,MINI:5,CONTRAST:6};var Ko={NORMAL:0,NARROW:1};x(!0);function Lo(){};(function(){var a=m.jspbGetTypeName;m.jspbGetTypeName=a?function(b){return a(b)||void 0}:Lo})();var Mo=function(a){y.call(this);this.dom=a||ye()};ra(Mo,y);Mo.prototype.initAriaState=function(){uj(this.getElement(),this.getAriaRole());M(this.getElement(),"live","polite")};Mo.prototype.getAriaRole=function(){return"tooltip"};var No=function(a){Mo.call(this,a);this.contentEl_=this.dom.createDom("DIV","jfk-tooltip-contentId");this.arrowEl_=this.dom.createDom("DIV","jfk-tooltip-arrow",this.dom.createDom("DIV","jfk-tooltip-arrowimplbefore"),this.dom.createDom("DIV","jfk-tooltip-arrowimplafter"));this.tooltipEl_=this.dom.createDom("DIV",{"class":"jfk-tooltip",role:"tooltip"},this.contentEl_,this.arrowEl_);this.initAriaState()};ra(No,Mo);No.prototype.getElement=function(){return this.tooltipEl_};
No.prototype.getContentElement=function(){return this.contentEl_};No.prototype.disposeInternal=function(){Mo.prototype.disposeInternal.call(this);this.tooltipEl_&&Qe(this.tooltipEl_)};var Oo=function(a){No.call(this,a)};ra(Oo,No);Oo.prototype.initAriaState=function(){uj(this.getElement(),this.getAriaRole())};var Ro=function(a){return pe(zb(a.replace(Po,function(b,c){return Qo.test(c)?"":" "}).replace(/[\t\n ]+/g," ")))},Qo=/^(?:abbr|acronym|address|b|em|i|small|strong|su[bp]|u)$/i,Po=/<[!\/]?([a-z0-9]+)([\/ ][^>]*)?>/gi;var So={},To=function(a){Ri.call(this);this.domHelper_=a;this.delay_=new pm(this.throttledHover_,0,this);ob(this,this.delay_);var b=window;this.mutationObserver_="function"===typeof b.MutationObserver?new b.MutationObserver(t(this.handleAttributesChange_,this)):null;a=a.document_;this.listen(a,"mouseout mousedown click blur focusout keydown".split(" "),this.clearActiveElement_,!0);this.listen(a,["mouseover","focus","focusin"],this.setActiveElement_,!0)};ra(To,Ri);
To.prototype.disposeInternal=function(){Uo(this);Ri.prototype.disposeInternal.call(this)};var Vo=function(a,b){switch(b.type){case "mousedown":case "mouseover":case "mouseout":case "click":a.isKeyboardEvent_=!1;break;case "keydown":a.isKeyboardEvent_=!0}};
To.prototype.setActiveElement_=function(a){this.mutationObserver_&&this.mutationObserver_.disconnect();Vo(this,a);var b=a.target;a="focus"==a.type||"focusin"==a.type;var c=this.tooltip_&&Ve(this.tooltip_.getContentElement(),b);if(this.isKeyboardEvent_||!a||c){this.isFocusEvent_=a;if(a=b&&b.getAttribute&&this.mutationObserver_)a=b.getAttribute("role")||null,a=cb(tj,a);a&&(this.mutationObserver_.observe(b,{attributes:!0}),(a=xj(b))&&(b=a));this.activeEl_=b}else this.activeEl_=null;Wo(this)};
To.prototype.clearActiveElement_=function(a){Vo(this,a);var b=a.target;a="mousedown"==a.type||"click"==a.type;b=this.tooltip_&&Ve(this.tooltip_.getContentElement(),b);a&&b||(this.activeEl_=null,Wo(this))};To.prototype.handleAttributesChange_=function(a){Xa(a,t(function(b){var c=xj(b.target);c&&"aria-activedescendant"==b.attributeName&&(this.activeEl_=c,Wo(this))},this))};
var Wo=function(a){if(!(a.delay_.isActive()&&a.hoverEl_&&a.tooltipHideDelayMs_)){Uo(a);var b=null!=a.tooltipHideDelayMs_?a.tooltipHideDelayMs_:50;a.delay_.start(a.hoverEl_?b:300)}},Uo=function(a){a.secondaryTimerId_&&(m.clearTimeout(a.secondaryTimerId_),a.secondaryTimerId_=0,a.hoverEl_=null)};
To.prototype.throttledHover_=function(){if(!this.activeEl_)Xo(this),this.tooltipHideDelayMs_=this.hoverEl_=null;else if(!(this.hoverEl_&&this.tooltip_&&Ve(this.tooltip_.getElement(),this.activeEl_))||this.hoverEl_.getAttribute("data-tooltip-unhoverable")){var a=df(this.activeEl_,function(k){return k.getAttribute&&(k.getAttribute("data-tooltip-contained")||k.getAttribute("data-tooltip")||k.jfkTooltipHtmlInternal)&&!k.getAttribute("data-tooltip-suspended")}),b=!1;this.hoverEl_&&this.hoverEl_!=a&&(Xo(this),
this.tooltipHideDelayMs_=this.hoverEl_=null,b=!0);if(!this.hoverEl_&&a&&(this.hoverEl_=a,!(a.getAttribute("data-tooltip-only-on-overflow")&&a.offsetWidth>=a.scrollWidth&&a.offsetHeight>=a.scrollHeight||this.isFocusEvent_&&"mouse"==a.getAttribute("data-tooltip-trigger")))){var c=Yd;if(a.getAttribute("data-tooltip-contained"))for(var d=Ae("jfk-tooltip-data",a),e=0;e<d.length;e++){if(d[e].parentNode==a){c=d[e].cloneNode(!0);break}}else c=a.jfkTooltipHtmlInternal?a.jfkTooltipHtmlInternal:Dn(a.getAttribute("data-tooltip"));
d=a.getAttribute("data-tooltip-align");e=a.getAttribute("data-tooltip-class");var g=a.getAttribute("data-tooltip-offset");g=yb(te(g))?-1:Number(g);var h=a.getAttribute("data-tooltip-hide-delay");h=yb(te(h))?null:Number(h);if(!b&&(a=a.getAttribute("data-tooltip-delay"),a=Math.max(0,a-300))){this.secondaryTimerId_=hi(Ga(this.showTooltipImpl_,this.hoverEl_,c,d,g,e,h),a,this);return}this.showTooltipImpl_(this.hoverEl_,c,d,g,e,h)}}};
var Yo=function(a){if(a)switch(a.toLowerCase().split(",")[0]){case "l":return 0;case "t":return 2;case "r":return 3}return 1};
To.prototype.showTooltipImpl_=function(a,b,c,d,e,g){this.secondaryTimerId_=0;this.tooltipHideDelayMs_=g;if(!this.tooltip_){this.tooltip_=new Oo(this.domHelper_);Xo(this);Ne(this.domHelper_.document_.body,this.tooltip_.getElement());ob(this,this.tooltip_);this.tooltipPos_=new co("jfk-tooltip",!0);this.tooltipPos_.setAutoReposition(!0);this.tooltipPos_.allowBoxOverflowOnPositioningFail_=!0;g=this.tooltipPos_;var h=this.tooltip_.getElement(),k=this.tooltip_.arrowEl_;g.boxElement_=h;g.arrowElement_=k}a:{if(c)switch(c.toLowerCase().split(",")[1]){case "l":g=
0;break a;case "r":g=1;break a}g=2}this.tooltipPos_.setPosition(Yo(c),g,void 0,d);Ej(this.tooltip_.getElement(),"jfk-tooltip-hide");this.tooltipClass_!=e&&(this.tooltipClass_&&!yb(te(this.tooltipClass_))&&Ej(this.tooltip_.getElement(),this.tooltipClass_),yb(te(e))||N(this.tooltip_.getElement(),e),this.tooltipClass_=e);Oj(this.tooltip_.getElement(),0,0);if(b instanceof Ud)vo(this.tooltip_.getContentElement(),b);else for(Pe(this.tooltip_.getContentElement());c=b.firstChild;)this.tooltip_.getContentElement().appendChild(c);
this.tooltipPos_.setAnchorElement(a);this.tooltipPos_.reposition(null,0)};var Xo=function(a){a.tooltip_&&N(a.tooltip_.getElement(),"jfk-tooltip-hide")};var Zo=function(){},$o;ya(Zo);var bp=function(){var a=new ap;a.getCssClass=function(){return"jfk-checkbox"};return a},cp={button:"pressed",checkbox:"checked",menuitem:"selected",menuitemcheckbox:"checked",menuitemradio:"checked",radio:"checked",tab:"selected",treeitem:"selected"};f=Zo.prototype;f.getAriaRole=function(){};f.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "),a.getContent())};f.getContentElement=function(a){return a};
f.enableClassName=function(a,b,c){(a=a.getElement?a.getElement():a)&&(c?Dj:Fj)(a,[b])};f.canDecorate=function(){return!0};
f.decorate=function(a,b){b.id&&kk(a,b.id);var c=this.getContentElement(b);c&&c.firstChild?dp(a,c.firstChild.nextSibling?gb(c.childNodes):c.firstChild):a.content_=null;var d=0,e=this.getCssClass(),g=this.getCssClass(),h=!1,k=!1,l=gb(Aj(b));l.forEach(function(n){h||n!=e?k||n!=g?d|=this.getStateFromClass(n):k=!0:(h=!0,g==e&&(k=!0));1==this.getStateFromClass(n)&&(Ta(c),$e(c)&&af(c,!1))},this);a.state_=d;h||(l.push(e),g==e&&(k=!0));k||l.push(g);(a=a.extraClassNames_)&&l.push.apply(l,a);h&&k&&!a||Bj(b,
l.join(" "));return b};f.initializeDom=function(a){a.isRightToLeft()&&this.setRightToLeft(a.getElement(),!0);a.isEnabled()&&this.setFocusable(a,a.isVisible())};
var ep=function(a,b,c){if(a=c||a.getAriaRole())x(b,"The element passed as a first parameter cannot be null."),c=b.getAttribute("role")||null,a!=c&&uj(b,a)},fp=function(a,b,c){x(b);x(c);var d=b.ariaLabel_;null!=d&&a.setAriaLabel(c,d);b.isVisible()||M(c,"hidden",!b.isVisible());b.isEnabled()||a.updateAriaState(c,1,!b.isEnabled());U(b,8)&&a.updateAriaState(c,8,b.isSelected());U(b,16)&&a.updateAriaState(c,16,b.isChecked());U(b,64)&&a.updateAriaState(c,64,b.isOpen())};f=Zo.prototype;
f.setAriaLabel=function(a,b){M(a,"label",b)};f.setAllowTextSelection=function(a,b){dk(a,!b,!B)};f.setRightToLeft=function(a,b){this.enableClassName(a,this.getCssClass()+"-rtl",b)};f.isFocusable=function(a){var b;return U(a,32)&&(b=a.getKeyEventTarget())?$e(b):!1};f.setFocusable=function(a,b){var c;if(U(a,32)&&(c=a.getKeyEventTarget())){if(!b&&a.state_&32){try{c.blur()}catch(d){}a.state_&32&&a.handleBlur(null)}$e(c)!=b&&af(c,b)}};f.setVisible=function(a,b){P(a,b);a&&M(a,"hidden",!b)};
f.setState=function(a,b,c){var d=a.getElement();if(d){var e=this.getClassForState(b);e&&this.enableClassName(a,e,c);this.updateAriaState(d,b,c)}};f.updateAriaState=function(a,b,c){$o||($o={1:"disabled",8:"selected",16:"checked",64:"expanded"});x(a,"The element passed as a first parameter cannot be null.");b=$o[b];var d=a.getAttribute("role")||null;d&&(d=cp[d]||b,b="checked"==b||"selected"==b?d:b);b&&M(a,b,c)};
f.setContent=function(a,b){var c=this.getContentElement(a);c&&(Pe(c),b&&("string"===typeof b?We(c,b):(a=function(d){if(d){var e=xe(c);c.appendChild("string"===typeof d?e.createTextNode(d):d)}},Array.isArray(b)?b.forEach(a):!Aa(b)||"nodeType"in b?a(b):gb(b).forEach(a))))};f.getKeyEventTarget=function(a){return a.getElement()};f.getCssClass=function(){return"goog-control"};
f.getClassNames=function(a){var b=this.getCssClass(),c=[b],d=this.getCssClass();d!=b&&c.push(d);b=a.getState();for(d=[];b;){var e=b&-b;d.push(this.getClassForState(e));b&=~e}c.push.apply(c,d);(a=a.extraClassNames_)&&c.push.apply(c,a);return c};f.getClassForState=function(a){this.classByState_||gp(this);return this.classByState_[a]};
f.getStateFromClass=function(a){if(!this.stateByClass_){this.classByState_||gp(this);var b=this.classByState_,c={},d;for(d in b)c[b[d]]=d;this.stateByClass_=c}a=parseInt(this.stateByClass_[a],10);return isNaN(a)?0:a};var gp=function(a){var b=a.getCssClass(),c=!Ib(b.replace(/\xa0|\s/g," ")," ");x(c,"ControlRenderer has an invalid css class: '"+b+"'");a.classByState_={1:b+"-disabled",2:b+"-hover",4:b+"-active",8:b+"-selected",16:b+"-checked",32:b+"-focused",64:b+"-open"}};var hp=function(){};v(hp,Zo);ya(hp);f=hp.prototype;f.getAriaRole=function(){return"button"};f.updateAriaState=function(a,b,c){switch(b){case 8:case 16:x(a,"The button DOM element cannot be null.");M(a,"pressed",c);break;default:case 64:case 1:hp.superClass_.updateAriaState.call(this,a,b,c)}};f.createDom=function(a){var b=hp.superClass_.createDom.call(this,a);this.setTooltip(b,a.getTooltip());var c=a.getValue();c&&this.setValue(b,c);U(a,16)&&this.updateAriaState(b,16,a.isChecked());return b};
f.decorate=function(a,b){b=hp.superClass_.decorate.call(this,a,b);var c=this.getValue(b);a.value_=c;a.tooltip_=this.getTooltip(b);U(a,16)&&this.updateAriaState(b,16,a.isChecked());return b};f.getValue=function(){};f.setValue=function(){};f.getTooltip=function(a){return a.title};f.setTooltip=function(a,b){a&&(b?a.title=b:a.removeAttribute("title"))};
f.setCollapsed=function(a,b){var c=a.isRightToLeft(),d=this.getCssClass()+"-collapse-left",e=this.getCssClass()+"-collapse-right";a.enableClassName(c?e:d,!!(b&1));a.enableClassName(c?d:e,!!(b&2))};f.getCssClass=function(){return"goog-button"};var ip={MOUSEDOWN:"mousedown",MOUSEUP:"mouseup",MOUSECANCEL:"mousecancel",MOUSEMOVE:"mousemove",MOUSEOVER:"mouseover",MOUSEOUT:"mouseout",MOUSEENTER:"mouseenter",MOUSELEAVE:"mouseleave"};var jp={MOUSEDOWN:qb?"pointerdown":"mousedown",MOUSEUP:qb?"pointerup":"mouseup",MOUSECANCEL:qb?"pointercancel":"mousecancel",MOUSEMOVE:qb?"pointermove":"mousemove",MOUSEOVER:qb?"pointerover":"mouseover",MOUSEOUT:qb?"pointerout":"mouseout",MOUSEENTER:qb?"pointerenter":"mouseenter",MOUSELEAVE:qb?"pointerleave":"mouseleave"};var lp=function(a,b){if(!a)throw Error("Invalid class name "+a);if("function"!==typeof b)throw Error("Invalid decorator function "+b);kp[a]=b},mp={},kp={};var V=function(a,b,c){Q.call(this,c);if(!b){for(b=this.constructor;b;){var d=Da(b);if(d=mp[d])break;b=(b=Object.getPrototypeOf(b.prototype))&&b.constructor}b=d?"function"===typeof d.getInstance?d.getInstance():new d:null}this.renderer_=b;this.content_=void 0!==a?a:null;this.ariaLabel_=null};v(V,Q);f=V.prototype;f.content_=null;f.state_=0;f.supportedStates_=39;f.autoStates_=255;f.statesWithTransitionEvents_=0;f.visible_=!0;f.extraClassNames_=null;f.handleMouseEvents_=!0;f.allowTextSelection_=!1;
f.preferredAriaRole_=null;var op=function(a,b){a.inDocument_&&b!=a.handleMouseEvents_&&np(a,b);a.handleMouseEvents_=b};f=V.prototype;f.getKeyEventTarget=function(){return this.renderer_.getKeyEventTarget(this)};f.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new gm)};f.addClassName=function(a){a&&(this.extraClassNames_?cb(this.extraClassNames_,a)||this.extraClassNames_.push(a):this.extraClassNames_=[a],this.renderer_.enableClassName(this,a,!0))};
f.enableClassName=function(a,b){b?this.addClassName(a):a&&this.extraClassNames_&&fb(this.extraClassNames_,a)&&(0==this.extraClassNames_.length&&(this.extraClassNames_=null),this.renderer_.enableClassName(this,a,!1))};f.createDom=function(){var a=this.renderer_.createDom(this);this.element_=a;ep(this.renderer_,a,this.getPreferredAriaRole());this.allowTextSelection_||this.renderer_.setAllowTextSelection(a,!1);this.isVisible()||this.renderer_.setVisible(a,!1)};f.getPreferredAriaRole=function(){return this.preferredAriaRole_};
f.setAriaLabel=function(a){this.ariaLabel_=a;var b=this.getElement();b&&this.renderer_.setAriaLabel(b,a)};f.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())};f.canDecorate=function(a){return this.renderer_.canDecorate(a)};f.decorateInternal=function(a){this.element_=a=this.renderer_.decorate(this,a);ep(this.renderer_,a,this.getPreferredAriaRole());this.allowTextSelection_||this.renderer_.setAllowTextSelection(a,!1);this.visible_="none"!=a.style.display};
f.enterDocument=function(){V.superClass_.enterDocument.call(this);fp(this.renderer_,this,lk(this));this.renderer_.initializeDom(this);if(this.supportedStates_&-2&&(this.handleMouseEvents_&&np(this,!0),U(this,32))){var a=this.getKeyEventTarget();if(a){var b=this.getKeyHandler();fm(b,a);this.getHandler().listen(b,"key",this.handleKeyEvent).listen(a,"focus",this.handleFocus).listen(a,"blur",this.handleBlur)}}};
var np=function(a,b){var c=a.pointerEventsEnabled_?jp:ip,d=a.getHandler(),e=a.getElement();b?(d.listen(e,c.MOUSEDOWN,a.handleMouseDown).listen(e,[c.MOUSEUP,c.MOUSECANCEL],a.handleMouseUp).listen(e,"mouseover",a.handleMouseOver).listen(e,"mouseout",a.handleMouseOut),a.pointerEventsEnabled_&&d.listen(e,"gotpointercapture",a.preventPointerCapture_),a.handleContextMenu!=md&&d.listen(e,"contextmenu",a.handleContextMenu),B&&!a.ieMouseEventSequenceSimulator_&&(a.ieMouseEventSequenceSimulator_=new pp(a),
ob(a,a.ieMouseEventSequenceSimulator_))):(d.unlisten(e,c.MOUSEDOWN,a.handleMouseDown).unlisten(e,[c.MOUSEUP,c.MOUSECANCEL],a.handleMouseUp).unlisten(e,"mouseover",a.handleMouseOver).unlisten(e,"mouseout",a.handleMouseOut),a.pointerEventsEnabled_&&d.unlisten(e,"gotpointercapture",a.preventPointerCapture_),a.handleContextMenu!=md&&d.unlisten(e,"contextmenu",a.handleContextMenu),B&&(nb(a.ieMouseEventSequenceSimulator_),a.ieMouseEventSequenceSimulator_=null))};
V.prototype.exitDocument=function(){V.superClass_.exitDocument.call(this);this.keyHandler_&&this.keyHandler_.detach();this.isVisible()&&this.isEnabled()&&this.renderer_.setFocusable(this,!1)};V.prototype.disposeInternal=function(){V.superClass_.disposeInternal.call(this);this.keyHandler_&&(this.keyHandler_.dispose(),delete this.keyHandler_);delete this.renderer_;this.ieMouseEventSequenceSimulator_=this.extraClassNames_=this.content_=null};V.prototype.getContent=function(){return this.content_};
V.prototype.setContent=function(a){this.renderer_.setContent(this.getElement(),a);this.content_=a};var dp=function(a,b){a.content_=b};f=V.prototype;f.getCaption=function(){var a=this.getContent();if(!a)return"";if("string"!==typeof a)if(Array.isArray(a))a=a.map(cf).join("");else{var b=[];bf(a,b,!0);a=b.join("");a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");a=a.replace(/ +/g," ");" "!=a&&(a=a.replace(/^\s*/,""))}return me(a)};
f.setRightToLeft=function(a){V.superClass_.setRightToLeft.call(this,a);var b=this.getElement();b&&this.renderer_.setRightToLeft(b,a)};f.setAllowTextSelection=function(a){this.allowTextSelection_=a;var b=this.getElement();b&&this.renderer_.setAllowTextSelection(b,a)};f.isVisible=function(){return this.visible_};
f.setVisible=function(a,b){return b||this.visible_!=a&&this.dispatchEvent(a?"show":"hide")?((b=this.getElement())&&this.renderer_.setVisible(b,a),this.isEnabled()&&this.renderer_.setFocusable(this,a),this.visible_=a,!0):!1};f.isEnabled=function(){return!(this.state_&1)};
f.setEnabled=function(a){var b=this.getParent();b&&"function"==typeof b.isEnabled&&!b.isEnabled()||!qp(this,1,!a)||(a||(this.setActive(!1),this.setHighlighted(!1)),this.isVisible()&&this.renderer_.setFocusable(this,a),this.setState(1,!a,!0))};f.setHighlighted=function(a){qp(this,2,a)&&this.setState(2,a)};f.isActive=function(){return!!(this.state_&4)};f.setActive=function(a){qp(this,4,a)&&this.setState(4,a)};f.isSelected=function(){return!!(this.state_&8)};
f.setSelected=function(a){qp(this,8,a)&&this.setState(8,a)};f.isChecked=function(){return!!(this.state_&16)};f.setChecked=function(a){qp(this,16,a)&&this.setState(16,a)};f.setFocused=function(a){qp(this,32,a)&&this.setState(32,a)};f.isOpen=function(){return!!(this.state_&64)};f.setOpen=function(a){qp(this,64,a)&&this.setState(64,a)};f.getState=function(){return this.state_};
f.setState=function(a,b,c){c||1!=a?U(this,a)&&b!=!!(this.state_&a)&&(this.renderer_.setState(this,a,b),this.state_=b?this.state_|a:this.state_&~a):this.setEnabled(!b)};var U=function(a,b){return!!(a.supportedStates_&b)};V.prototype.setSupportedState=function(a,b){if(this.inDocument_&&this.state_&a&&!b)throw Error("Component already rendered");!b&&this.state_&a&&this.setState(a,!1);this.supportedStates_=b?this.supportedStates_|a:this.supportedStates_&~a};
var rp=function(a,b){return!!(a.autoStates_&b)&&U(a,b)},qp=function(a,b,c){return U(a,b)&&!!(a.state_&b)!=c&&(!(a.statesWithTransitionEvents_&b)||a.dispatchEvent(ik(b,c)))&&!a.disposed_};V.prototype.handleMouseOver=function(a){!sp(a,this.getElement())&&this.dispatchEvent("enter")&&this.isEnabled()&&rp(this,2)&&this.setHighlighted(!0)};V.prototype.handleMouseOut=function(a){!sp(a,this.getElement())&&this.dispatchEvent("leave")&&(rp(this,4)&&this.setActive(!1),rp(this,2)&&this.setHighlighted(!1))};
V.prototype.preventPointerCapture_=function(a){var b=a.target;b.releasePointerCapture&&b.releasePointerCapture(a.pointerId)};V.prototype.handleContextMenu=md;var sp=function(a,b){return!!a.relatedTarget&&Ve(b,a.relatedTarget)};f=V.prototype;
f.handleMouseDown=function(a){this.isEnabled()&&(rp(this,2)&&this.setHighlighted(!0),0!=a.event_.button||jc&&a.ctrlKey||(rp(this,4)&&this.setActive(!0),this.renderer_&&this.renderer_.isFocusable(this)&&this.getKeyEventTarget().focus()));this.allowTextSelection_||0!=a.event_.button||jc&&a.ctrlKey||a.preventDefault()};f.handleMouseUp=function(a){this.isEnabled()&&(rp(this,2)&&this.setHighlighted(!0),this.isActive()&&this.performActionInternal(a)&&rp(this,4)&&this.setActive(!1))};
f.performActionInternal=function(a){rp(this,16)&&this.setChecked(!this.isChecked());rp(this,8)&&this.setSelected(!0);rp(this,64)&&this.setOpen(!this.isOpen());var b=new pb("action",this);a&&(b.altKey=a.altKey,b.ctrlKey=a.ctrlKey,b.metaKey=a.metaKey,b.shiftKey=a.shiftKey,b.platformModifierKey=a.platformModifierKey,b.timeStamp=a.timeStamp);return this.dispatchEvent(b)};f.handleFocus=function(){rp(this,32)&&this.setFocused(!0)};f.handleBlur=function(){rp(this,4)&&this.setActive(!1);rp(this,32)&&this.setFocused(!1)};
f.handleKeyEvent=function(a){return this.isVisible()&&this.isEnabled()&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};f.handleKeyEventInternal=function(a){return 13==a.keyCode&&this.performActionInternal(a)};if("function"!==typeof V)throw Error("Invalid component class "+V);if("function"!==typeof Zo)throw Error("Invalid renderer class "+Zo);var tp=Da(V);mp[tp]=Zo;lp("goog-control",function(){return new V(null)});
var pp=function(a){y.call(this);this.control_=a;this.clickExpected_=!1;this.handler_=new Ri(this);ob(this,this.handler_);var b=lk(this.control_);a=a.pointerEventsEnabled_?jp:ip;this.handler_.listen(b,a.MOUSEDOWN,this.handleMouseDown_).listen(b,a.MOUSEUP,this.handleMouseUp_).listen(b,"click",this.handleClick_)};v(pp,y);var up=!B||9<=Number(yc);pp.prototype.handleMouseDown_=function(){this.clickExpected_=!1};pp.prototype.handleMouseUp_=function(){this.clickExpected_=!0};
var vp=function(a,b){if(!up)return a.button=0,a.type=b,a;var c=document.createEvent("MouseEvents");c.initMouseEvent(b,a.bubbles,a.cancelable,a.view||null,a.detail,a.screenX,a.screenY,a.clientX,a.clientY,a.ctrlKey,a.altKey,a.shiftKey,a.metaKey,0,a.relatedTarget||null);return c};
pp.prototype.handleClick_=function(a){if(this.clickExpected_)this.clickExpected_=!1;else{var b=a.event_,c=b.button,d=b.type,e=vp(b,"mousedown");this.control_.handleMouseDown(new Ac(e,a.currentTarget));e=vp(b,"mouseup");this.control_.handleMouseUp(new Ac(e,a.currentTarget));up||(b.button=c,b.type=d)}};pp.prototype.disposeInternal=function(){this.control_=null;pp.superClass_.disposeInternal.call(this)};var wp=function(){};v(wp,hp);ya(wp);f=wp.prototype;f.getAriaRole=function(){};f.createDom=function(a){op(a,!1);a.autoStates_&=-256;a.setSupportedState(32,!1);return a.getDomHelper().createDom("BUTTON",{"class":this.getClassNames(a).join(" "),disabled:!a.isEnabled(),title:a.getTooltip()||"",value:a.getValue()||""},a.getCaption()||"")};f.canDecorate=function(a){return"BUTTON"==a.tagName||"INPUT"==a.tagName&&("button"==a.type||"submit"==a.type||"reset"==a.type)};
f.decorate=function(a,b){op(a,!1);a.autoStates_&=-256;a.setSupportedState(32,!1);if(b.disabled){var c=Pa(this.getClassForState(1));N(b,c)}return wp.superClass_.decorate.call(this,a,b)};f.initializeDom=function(a){a.getHandler().listen(a.getElement(),"click",a.performActionInternal)};f.setAllowTextSelection=function(){};f.setRightToLeft=function(){};f.isFocusable=function(a){return a.isEnabled()};f.setFocusable=function(){};
f.setState=function(a,b,c){wp.superClass_.setState.call(this,a,b,c);(a=a.getElement())&&1==b&&(a.disabled=c)};f.getValue=function(a){return a.value};f.setValue=function(a,b){a&&(a.value=b)};f.updateAriaState=function(){};var xp=function(a,b,c){V.call(this,a,b||wp.getInstance(),c)};v(xp,V);f=xp.prototype;f.getValue=function(){return this.value_};f.setValue=function(a){this.value_=a;this.renderer_.setValue(this.getElement(),a)};f.getTooltip=function(){return this.tooltip_};f.setTooltip=function(a){this.tooltip_=a;this.renderer_.setTooltip(this.getElement(),a)};f.setCollapsed=function(a){this.renderer_.setCollapsed(this,a)};f.disposeInternal=function(){xp.superClass_.disposeInternal.call(this);delete this.value_;delete this.tooltip_};
f.enterDocument=function(){xp.superClass_.enterDocument.call(this);if(U(this,32)){var a=this.getKeyEventTarget();a&&this.getHandler().listen(a,"keyup",this.handleKeyEventInternal)}};f.handleKeyEventInternal=function(a){return 13==a.keyCode&&"key"==a.type||32==a.keyCode&&"keyup"==a.type?this.performActionInternal(a):32==a.keyCode};lp("goog-button",function(){return new xp(null)});var yp=ha(["value"]),Ap=function(a,b,c,d){xp.call(this,a,zp.getInstance(),b);this.style_=c||0;this.width_=d||0;this.usingKennedyTooltip_=!1};v(Ap,xp);Ap.prototype.getWidth=function(){return this.width_};var Cp=function(a,b){a.width_!=b&&(a.width_=b,Bp(a))};f=Ap.prototype;
f.setTooltip=function(a){this.tooltip_=a;var b=this.getElement();if(b)if(this.usingKennedyTooltip_){var c=a instanceof Ud?Ro(Vd(a).toString()):a;b.removeAttribute("title");b.removeAttribute("data-tooltip-contained");b.removeAttribute("data-tooltip");a?(a instanceof Ud?b.jfkTooltipHtmlInternal=a:(b.setAttribute("data-tooltip",a),b.jfkTooltipHtmlInternal=null),b.setAttribute("aria-label",c)):(b.jfkTooltipHtmlInternal=null,b.removeAttribute("aria-label"));a=ye(b)||ye();b=Da(a.document_);So[b]||(So[b]=
new To(a))}else a?b.title=a:b.removeAttribute("title")};f.setEnabled=function(a){this.isEnabled()!=a&&(Ap.superClass_.setEnabled.call(this,a),Bp(this))};f.focus=function(){var a=lk(this);try{a.focus()}catch(b){}};f.setFocused=function(a){Ap.superClass_.setFocused.call(this,a);this.setNoFocusOutline_(!1)};f.handleMouseDown=function(a){Ap.superClass_.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};
f.handleMouseUp=function(a){Ap.superClass_.handleMouseUp.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};f.setNoFocusOutline_=function(a){this.getElement()&&Gj(this.getElement(),"jfk-button-clear-outline",a)};
var Bp=function(a){a.getElement()&&Dp(a.renderer_,a)},Ep=function(a){a=new Ap(a,void 0);a.setSupportedState(16,!0);return a},zp=function(){this.standardButtonClass_=this.getCssClass()+"-standard";this.actionButtonClass_=this.getCssClass()+"-action";this.primaryButtonClass_=this.getCssClass()+"-primary";this.defaultButtonClass_=this.getCssClass()+"-default";this.flatButtonClass_=this.getCssClass()+"-flat";this.narrowButtonClass_=this.getCssClass()+"-narrow";this.miniButtonClass_=this.getCssClass()+
"-mini";this.contrastButtonClass_=this.getCssClass()+"-contrast"};v(zp,hp);zp.getInstance=function(){return $g(zp)};zp.prototype.updateButton_=function(a,b,c){a&&c.style_!=a&&(c.style_=a,Bp(c));b&&Cp(c,b)};zp.prototype.getCssClass=function(){return"jfk-button"};
zp.prototype.createDom=function(a){Va(a,Ap,"Button is expected to be instance of jfk.Button");var b=a.getDomHelper(),c=Yn(Io,{disabled:!a.isEnabled(),checked:a.isChecked(),style:a.style_,title:a.getTooltip(),usingKennedyTooltip:a.usingKennedyTooltip_,value:a.getValue(),width:a.getWidth()},b);b.append(c,a.getContent());this.decorate(a,c);return c};
zp.prototype.decorate=function(a,b){zp.superClass_.decorate.call(this,a,b);this.classNamesToButtonUpdater_||(this.classNamesToButtonUpdater_=Sc(this.standardButtonClass_,Ga(this.updateButton_,0,null),this.actionButtonClass_,Ga(this.updateButton_,2,null),this.primaryButtonClass_,Ga(this.updateButton_,3,null),this.defaultButtonClass_,Ga(this.updateButton_,1,null),this.flatButtonClass_,Ga(this.updateButton_,4,null),this.miniButtonClass_,Ga(this.updateButton_,5,null),this.contrastButtonClass_,Ga(this.updateButton_,
6,null),this.narrowButtonClass_,Ga(this.updateButton_,null,1)));for(var c=Aj(b),d=0;d<c.length;++d){var e=this.classNamesToButtonUpdater_[c[d]];e&&e(a)}if(c=b.getAttribute("data-tooltip"))a.tooltip_=c,a.usingKennedyTooltip_=!0;return b};
var xo=[function(a){wn(a);var b=a[0].toLowerCase();if(0===b.indexOf("on")||0==="on".indexOf(b))throw Error("Prefix '"+a[0]+"' does not guarantee the attribute to be safe as it is also a prefix for event handler attributesPlease use 'addEventListener' to set event handlers.");ln.forEach(function(c){if(0===c.indexOf(b))throw Error("Prefix '"+a[0]+"' does not guarantee the attribute to be safe as it is also a prefix for the security sensitive attribute '"+(c+"'. Please use native or safe DOM APIs to set the attribute."));
});return new nn(b,de)}(yp)];zp.prototype.getValue=function(a){return a.getAttribute("value")||""};zp.prototype.setValue=function(a,b){a&&wo(a,b)};
var Dp=function(a,b){function c(h,k){(h?d:e).push(k)}x(b.getElement(),"Button element must already exist when updating style.");var d=[],e=[],g=b.style_;c(0==g,a.standardButtonClass_);c(2==g,a.actionButtonClass_);c(3==g,a.primaryButtonClass_);c(4==g,a.flatButtonClass_);c(5==g,a.miniButtonClass_);c(1==g,a.defaultButtonClass_);c(6==g,a.contrastButtonClass_);c(1==b.getWidth(),a.narrowButtonClass_);c(!b.isEnabled(),a.getCssClass()+"-disabled");Fj(b.getElement(),e);Dj(b.getElement(),d)};var Fp=angular.module("jfkButton",[Ll.name]),Gp={STANDARD:0,DEFAULT:1,ACTION:2,PRIMARY:3,FLAT:4,MINI:5},Hp;for(Hp in Gp)Jo[Hp]=Gp[Hp];var Ip={NORMAL:0,NARROW:1};for(Hp in Ip)Ko[Hp]=Ip[Hp];function Jp(a,b){if("BUTTON"!=a[0].nodeName.toUpperCase()&&b.hasOwnProperty("ngClick")&&b.hasOwnProperty("ngDisabled"))throw Error("Error: ng-click found with ng-disabled on a jfk-button on a non <button>. This won't respect ng-disabled. Did you mean to use jfk-on-action instead?");}
function Kp(a,b,c){var d=gb(a[0].childNodes);Pe(a[0]);c.decorate(a[0]);(a=c.getContentElement())&&Oe(a,d);N(c.getElement(),"goog-inline-block");N(c.getElement(),"jfk-button-standard");b.hasOwnProperty("jfkButtonStyle")&&b.$observe("jfkButtonStyle",function(e){e=Jo[e];c.style_!=e&&(c.style_=e,Bp(c))});b.hasOwnProperty("jfkButtonWidth")&&b.$observe("jfkButtonWidth",function(e){Cp(c,Ko[e])});b.hasOwnProperty("jfkButtonCollapsed")&&b.$observe("jfkButtonCollapsed",function(e){c.setCollapsed(Ho[e])})}
Fp.directive("jfkButton",["jfkCommon",function(a){return{link:function(b,c,d){Jp(c,d);var e=new Ap("");Kp(c,d,e);Gl(a,b,d,e)},restrict:"EAM"}}]);Fp.directive("jfkToggleButton",["jfkCommon",function(a){return{link:function(b,c,d,e){Jp(c,d);var g=Ep("");Kp(c,d,g);Gl(a,b,d,g);e&&(e.$render=function(){g.setChecked(e.$viewValue)},Hl(b,g,"action",function(){b.$apply(function(){e.$setViewValue(g.isChecked())})}))},require:"?ngModel",restrict:"EAM"}}]);var Mp=function(a){I.call(this);this.items_=[];Lp(this,a)};v(Mp,I);Mp.prototype.selectedItem_=null;Mp.prototype.selectionHandler_=null;var Np=function(a,b){a.selectionHandler_=b};Mp.prototype.getItemCount=function(){return this.items_.length};Mp.prototype.getItemAt=function(a){return this.items_[a]||null};var Lp=function(a,b){b&&(b.forEach(function(c){Op(this,c,!1)},a),hb(a.items_,b))};f=Mp.prototype;f.addItem=function(a){this.addItemAt(a,this.getItemCount())};
f.addItemAt=function(a,b){a&&(Op(this,a,!1),ib(this.items_,b,0,a))};f.removeItem=function(a){a&&fb(this.items_,a)&&a==this.selectedItem_&&(this.selectedItem_=null,this.dispatchEvent("select"))};f.getSelectedItem=function(){return this.selectedItem_};f.getItems=function(){return gb(this.items_)};f.setSelectedItem=function(a){a!=this.selectedItem_&&(Op(this,this.selectedItem_,!1),this.selectedItem_=a,Op(this,a,!0));this.dispatchEvent("select")};
f.getSelectedIndex=function(){var a=this.selectedItem_;return a?this.items_.indexOf(a):-1};f.setSelectedIndex=function(a){this.setSelectedItem(this.getItemAt(a))};f.clear=function(){eb(this.items_);this.selectedItem_=null};f.disposeInternal=function(){Mp.superClass_.disposeInternal.call(this);delete this.items_;this.selectedItem_=null};var Op=function(a,b,c){b&&("function"==typeof a.selectionHandler_?a.selectionHandler_(b,c):"function"==typeof b.setSelected&&b.setSelected(c))};var Pp=angular.module("jfkSegmentedButtons",[Ll.name]),Rp=function(a,b){this.scope_=a;this.element_=b;this.buttonsInDomOrder_=[];this.selectionModel_=new Mp;this.enabled_=!0;Np(this.selectionModel_,function(c,d){c.setChecked(d)});a.$watch(function(){Qp(this)}.bind(this));a.$on("$destroy",t(function(){this.selectionModel_.dispose()},this))};
Rp.prototype.add=function(a){this.selectionModel_.addItem(a);a.listen("action",function(b){this.selectionModel_.getSelectedItem()!=b.target?this.selectionModel_.setSelectedItem(b.target):b.target.setChecked(!0)},void 0,this);a.setEnabled(this.enabled_)};Rp.prototype.remove=function(a){this.selectionModel_.disposed_||this.selectionModel_.removeItem(a)};
var Sp=function(a,b){a.selectionModel_.listen("select",function(d){var e=d.target.getSelectedItem();e&&e.getModel&&e.model_!=b.$viewValue&&this.scope_.$apply(function(){b.$setViewValue(e.model_)})},void 0,a);b.$render=t(function(){var d=bb(this.selectionModel_.getItems(),function(e){return e.getModel&&e.model_==b.$viewValue});this.selectionModel_.setSelectedIndex(d)},a);var c=[];a.scope_.$watch(t(function(){if(!this.selectionModel_.disposed_){var d=this.selectionModel_.getItems().map(function(e){return e.getModel&&
e.model_});kb(c,d)||(c=d,b.$render())}},a))};Rp.prototype.setEnabled=function(a){this.enabled_=a;this.selectionModel_.getItems().forEach(function(b){b.setEnabled(a)})};
var Qp=function(a){var b=Tp(a);kb(b,a.buttonsInDomOrder_)||(b.forEach(function(c,d){var e=0==d;d=d==b.length-1;c.setCollapsed(Ho[e&&d?"NONE":e?"END":d?"START":"BOTH"])}),a.buttonsInDomOrder_=b)},Tp=function(a){var b=Ae("jfk-button",a.element_[0]);return Ya(b,function(c){return ab(this.selectionModel_.getItems(),function(d){return d.getElement()==c})},a).filter(nd)};Rp.$inject=["$scope","$element"];
Pp.directive("jfkSegmentedButtonGroup",function(){return{controller:Rp,restrict:"EA",require:["jfkSegmentedButtonGroup","?ngModel"],link:function(a,b,c,d){b.addClass("jfk-segmented-button-group");d[1]&&Sp(d[0],d[1]);Qp(d[0]);c.ngDisabled&&a.$watch(c.ngDisabled,function(e){d[0].setEnabled(!e)})}}});
Pp.directive("jfkSegmentedButton",["jfkCommon",function(a){var b={NORMAL:0,NARROW:1};return{restrict:"EA",scope:!0,require:"^jfkSegmentedButtonGroup",link:function(c,d,e,g){d.addClass("goog-inline-block");var h=gb(d[0].childNodes);Pe(d[0]);var k=Ep(null);k.render(d[0]);(d=k.getContentElement())&&Oe(d,h);Gl(a,c,e,k);e.hasOwnProperty("jfkButtonWidth")&&e.$observe("jfkButtonWidth",function(l){Cp(k,b[l])});g.add(k);c.$on("$destroy",function(){g.remove(k);k.dispose()})}}}]);var Up=function(a,b){var c=function(e){return null==e||isNaN(e)?null:!!e},d=function(e,g,h,k){e.setLabel?e.setLabel(g):e.setChecked&&Hl(k,g,"click",function(l){!Ve(e.getElement(),l.target)&&e.isEnabled()&&(e.setChecked(!e.isChecked()),e.dispatchEvent(b))})};return function(e,g){var h="g"===g.prefix_+""?"gCheckboxTristate":"tristate";return{priority:Kl,replace:!0,require:"?ngModel",restrict:"EAM",template:"<span></span>",link:function(k,l,n,p){l.unbind("click");var r=new a,w=n.hasOwnProperty(h);if(n.ngClick){var D=
e(n.ngClick);Hl(k,r,b,function(A){k.$apply(function(){D(k,{$event:A})})})}for(var F=l[0].parentNode;F;F=F.parentNode)if(F.tagName&&"LABEL"==F.tagName){d(r,F,g,k);break}n.$observe("id",function(A){A&&setTimeout(function(){var db=document.querySelector("label[for="+A+"]");db&&d(r,db,g,k)},0)});Gl(g,k,n,r);r.render(l[0]);p&&(w&&(eb(p.$formatters),eb(p.$parsers),p.$formatters.push(c)),p.$render=function(){r.setChecked(w?p.$viewValue:!!p.$viewValue)},Hl(k,r,b,function(){var A=r.isChecked()||w&&null==r.checked_&&
null;k.$apply(function(){p.$setViewValue(A)})}));n.ngChecked&&k.$watch(n.ngChecked,function(A){r.setChecked(w?c(A):!!A)})}}}};var Vp=function(a,b){a=a||{};var c=a.attributes;var d=a.classes,e=a.checked,g=a.disabled,h=a.id,k=a.tabindex,l=a.undetermined,n=a.ariaLabel;a=a.ariaLabelledBy;Un();Mn["jfk.templates.checkbox.main"]?c=Mn["jfk.templates.checkbox.main"]({attributes:c,classes:d,checked:e,disabled:g,id:h,tabindex:k,undetermined:l,ariaLabel:n,ariaLabelledBy:a},b):(b=S(l)?" "+T("jfk-checkbox-undetermined"):S(e)?" "+T("jfk-checkbox-checked"):" "+T("jfk-checkbox-unchecked"),e=S(l)?"mixed":S(e)?"true":"false",n=S(a)?' aria-labelledby="'+
T(a)+'"':S(n)?' aria-label="'+T(n)+'"':"",d='<span class="'+T("jfk-checkbox")+" "+T("goog-inline-block")+b+(S(g)?" "+T("jfk-checkbox-disabled"):"")+(S(d)?" "+T(d):"")+'" role="checkbox" aria-checked="'+e+'"'+n+(S(h)?' id="'+T(h)+'"':"")+(S(g)?' aria-disabled="true" tabindex="-1"':' tabindex="'+(S(k)?T(k):"0")+'"'),S(c)?(c=Jn(c,Fn,In)?c.getContent():Xn(c),c=Sn(c)):c="",c=Ln(d+c+' dir="ltr"><div class="'+T("jfk-checkbox-checkmark")+'" role="presentation"></div></span>'));return c};var Wp=function(a,b,c){c=c||ap.getInstance();V.call(this,null,c,b);this.checked_=void 0!==a?a:!1};v(Wp,V);var Xp={CHECKED:!0,UNCHECKED:!1,UNDETERMINED:null};f=Wp.prototype;f.label_=null;f.isChecked=function(){return 1==this.checked_};f.setChecked=function(a){a!=this.checked_&&(this.checked_=a,Yp(this.renderer_,this.getElement(),this.checked_))};
f.setLabel=function(a){if(this.inDocument_){var b=!!(this.state_&32);this.exitDocument();this.label_=a;this.enterDocument();b&&lk(this).focus()}else this.label_=a};f.toggle=function(){this.setChecked(this.checked_?!1:!0)};
f.enterDocument=function(){Wp.superClass_.enterDocument.call(this);if(this.handleMouseEvents_){var a=this.getHandler();this.label_&&a.listen(this.label_,"click",this.handleClickOrSpace_).listen(this.label_,"mouseover",this.handleMouseOver).listen(this.label_,"mouseout",this.handleMouseOut).listen(this.label_,"mousedown",this.handleMouseDown).listen(this.label_,"mouseup",this.handleMouseUp);a.listen(this.getElement(),"click",this.handleClickOrSpace_)}a=lk(this);if(this.label_&&a!=this.label_&&yb(wj(a,
"label"))){if(!this.label_.id){var b=this.label_;var c=jk(this)+".lbl";b.id=c}M(a,"labelledby",this.label_.id)}};f.handleClickOrSpace_=function(a){a.stopPropagation();var b=this.checked_?"uncheck":"check";this.isEnabled()&&!a.target.href&&this.dispatchEvent(b)&&(a.preventDefault(),this.toggle(),this.dispatchEvent("change"))};f.handleKeyEventInternal=function(a){32==a.keyCode&&(this.performActionInternal(a),this.handleClickOrSpace_(a));return!1};var ap=function(){};v(ap,Zo);ya(ap);
ap.prototype.createDom=function(a){var b=a.getDomHelper().createDom("SPAN",this.getClassNames(a).join(" "));Yp(this,b,a.checked_);return b};ap.prototype.decorate=function(a,b){b=ap.superClass_.decorate.call(this,a,b);x(b);var c=Aj(b),d=!1;cb(c,Zp(this,null))?d=null:cb(c,Zp(this,!0))?d=!0:cb(c,Zp(this,!1))&&(d=!1);a.checked_=d;x(b,"The element cannot be null.");M(b,"checked",null==d?"mixed":1==d?"true":"false");return b};ap.prototype.getAriaRole=function(){return"checkbox"};
var Yp=function(a,b,c){if(b){x(b);var d=Zp(a,c);x(d);x(b);Cj(b,d)||(Gc(Xp,function(e){e=Zp(this,e);x(b);Gj(b,e,e==d)},a),M(b,"checked",null==c?"mixed":1==c?"true":"false"))}};ap.prototype.getCssClass=function(){return"goog-checkbox"};var Zp=function(a,b){a=a.getCssClass();if(1==b)return a+"-checked";if(0==b)return a+"-unchecked";if(null==b)return a+"-undetermined";throw Error("Invalid checkbox state: "+b);};lp("goog-checkbox",function(){return new Wp});var $p=function(a,b){var c=bp();Wp.call(this,a,b,c);this.setSupportedState(4,!0)};ra($p,Wp);f=$p.prototype;f.createDom=function(){this.element_=Yn(Vp,{checked:this.isChecked(),disabled:!this.isEnabled(),undetermined:null==this.checked_},this.getDomHelper())};
f.decorateInternal=function(a){Wp.prototype.decorateInternal.call(this,a);N(a,"goog-inline-block");this.getElement().dir="ltr";this.getElementByClass("jfk-checkbox-checkmark")||(a=this.getDomHelper().createDom("DIV","jfk-checkbox-checkmark"),this.getElement().appendChild(a));uj(this.getRequiredElementByClass("jfk-checkbox-checkmark"),"presentation")};f.setFocused=function(a){Wp.prototype.setFocused.call(this,a);this.setNoFocusOutline_(!1)};
f.handleMouseDown=function(a){Wp.prototype.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};f.setNoFocusOutline_=function(a){this.getElement()&&Gj(this.getElement(),"jfk-checkbox-clearOutline",a)};var aq=Up($p,"change");var bq=function(a,b){a=a||{};a=a.checked;Un();Mn["jfk.templates.slideToggle.main"]?b=Mn["jfk.templates.slideToggle.main"]({checked:a},b):(b='<div class="'+T("jfk-slideToggle")+" "+T("goog-inline-block")+(S(a)?" "+T("jfk-slideToggle-checked"):"")+'"><div class="'+T("jfk-slideToggle-on")+'">',b=b+'on</div><div class="'+(T("jfk-slideToggle-off")+'">'),b=b+'off</div><div class="'+(T("jfk-slideToggle-thumb")+'"></div></div>'),b=Ln(b));return b};function cq(a){xp.call(this,"",dq.getInstance(),a);this.setSupportedState(16,!0)}v(cq,xp);cq.prototype.setFocused=function(a){cq.superClass_.setFocused.call(this,a);this.setNoFocusOutline_(!1)};cq.prototype.handleMouseDown=function(a){cq.superClass_.handleMouseDown.call(this,a);this.isEnabled()&&this.setNoFocusOutline_(!0)};cq.prototype.setNoFocusOutline_=function(a){this.getElement()&&Gj(this.getElement(),"jfk-slideToggle-clearOutline",a)};var dq=function(){};v(dq,hp);dq.getInstance=function(){return $g(dq)};
dq.prototype.createDom=function(a){return Yn(bq,{checked:a.isChecked()},a.getDomHelper())};dq.prototype.canDecorate=function(){return!1};dq.prototype.getCssClass=function(){return"jfk-slideToggle"};var eq=Up(cq,"action");var fq=function(a,b){a=a.checked;Un();Mn["jfk.templates.star.main"]?b=Mn["jfk.templates.star.main"]({checked:a},b):(b='<div class="'+T("jfk-star")+(S(a)?" "+T("jfk-star-checked"):"")+'" role="button" aria-label="',b+="Toggle star".replace(Pn,Qn),b+='" aria-checked="'+(S(a)?"true":"false")+'"></div>',b=Ln(b));return b};var gq=function(){};v(gq,hp);ya(gq);f=gq.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),this.createButton(a.getContent(),a.getDomHelper()));this.setTooltip(b,a.getTooltip());return b};f.getAriaRole=function(){return"button"};f.getContentElement=function(a){return a&&a.firstChild&&a.firstChild.firstChild};
f.createButton=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-outer-box"),b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-inner-box"),a))};f.canDecorate=function(a){return"DIV"==a.tagName};
f.decorate=function(a,b){x(b);hq(b,!0);hq(b,!1);a:{var c=a.getDomHelper().getFirstElementChild(b);var d=this.getCssClass()+"-outer-box";if(c&&Cj(c,d)&&(c=a.getDomHelper().getFirstElementChild(c),d=this.getCssClass()+"-inner-box",c&&Cj(c,d))){c=!0;break a}c=!1}c||b.appendChild(this.createButton(b.childNodes,a.getDomHelper()));Dj(b,["goog-inline-block",this.getCssClass()]);return gq.superClass_.decorate.call(this,a,b)};f.getCssClass=function(){return"goog-custom-button"};
var hq=function(a,b){if(a)for(var c=b?a.firstChild:a.lastChild,d;c&&c.parentNode==a;){d=b?c.nextSibling:c.previousSibling;if(3==c.nodeType){var e=c.nodeValue;if(""==zb(e))a.removeChild(c);else{c.nodeValue=b?e.replace(/^[\s\xa0]+/,""):e.replace(/[\s\xa0]+$/,"");break}}else break;c=d}};var iq=function(a,b,c){xp.call(this,a,b||gq.getInstance(),c);this.setSupportedState(16,!0)};v(iq,xp);lp("goog-toggle-button",function(){return new iq(null)});var kq=function(a,b){iq.call(this,"",a||jq.getInstance(),b)};ra(kq,iq);var jq=function(){};ra(jq,hp);jq.prototype.getCssClass=function(){return"jfk-star"};jq.prototype.createDom=function(a){return Yn(fq,{checked:a.isChecked()},a.getDomHelper())};jq.prototype.getAriaRole=function(){return"checkbox"};jq.prototype.updateAriaState=function(a,b,c){16==b?(x(a,"The button DOM element cannot be null."),M(a,"checked",c)):hp.prototype.updateAriaState.call(this,a,b,c)};jq.getInstance=function(){return $g(jq)};var lq=Up(kq,"action");var mq=angular.module("jfkCheckbox",[Ll.name]);mq.directive("jfkCheckbox",["$parse","jfkCommon",aq]);mq.directive("jfkSlideToggle",["$parse","jfkCommon",eq]);mq.directive("jfkStar",["$parse","jfkCommon",lq]);var nq=function(a,b){Q.call(this,b);this.label_=a||""},oq;v(nq,Q);nq.prototype.ffKeyRestoreValue_=null;nq.prototype.labelRestoreDelayMs=10;var pq=function(){null==oq&&(oq="placeholder"in Le(document,"INPUT"));return oq};f=nq.prototype;f.hasFocus_=!1;f.createDom=function(){this.element_=this.getDomHelper().createDom("INPUT",{type:"text"})};
f.decorateInternal=function(a){nq.superClass_.decorateInternal.call(this,a);this.label_||(this.label_=a.getAttribute("label")||"");ef(xe(a))==a&&(this.hasFocus_=!0,a=this.getElement(),x(a),Ej(a,this.labelCssClassName));pq()&&(this.getElement().placeholder=this.label_);a=this.getElement();x(a,"The label input element cannot be null.");M(a,"label",this.label_)};
f.enterDocument=function(){nq.superClass_.enterDocument.call(this);var a=new Ri(this);a.listen(this.getElement(),"focus",this.handleFocus_);a.listen(this.getElement(),"blur",this.handleBlur_);if(pq())this.eventHandler_=a;else{C&&a.listen(this.getElement(),["keypress","keydown","keyup"],this.handleEscapeKeys_);var b=xe(this.getElement());a.listen(b?He(b):window,"load",this.handleWindowLoad_);this.eventHandler_=a;qq(this)}this.check_();this.getElement().labelInput_=this};
f.exitDocument=function(){nq.superClass_.exitDocument.call(this);this.eventHandler_&&(this.eventHandler_.dispose(),this.eventHandler_=null);this.getElement().labelInput_=null};var qq=function(a){!a.formAttached_&&a.eventHandler_&&a.getElement().form&&(a.eventHandler_.listen(a.getElement().form,"submit",a.handleFormSubmit_),a.formAttached_=!0)};f=nq.prototype;
f.disposeInternal=function(){nq.superClass_.disposeInternal.call(this);this.eventHandler_&&(this.eventHandler_.dispose(),this.eventHandler_=null)};f.labelCssClassName="label-input-label";f.handleFocus_=function(){this.hasFocus_=!0;var a=this.getElement();x(a);Ej(a,this.labelCssClassName);if(!pq()&&!rq(this)&&!this.inFocusAndSelect_){var b=this;a=function(){b.getElement()&&(b.getElement().value="")};B?hi(a,10):a()}};
f.handleBlur_=function(){pq()||(this.eventHandler_.unlisten(this.getElement(),"click",this.handleFocus_),this.ffKeyRestoreValue_=null);this.hasFocus_=!1;this.check_()};f.handleEscapeKeys_=function(a){27==a.keyCode&&("keydown"==a.type?this.ffKeyRestoreValue_=this.getElement().value:"keypress"==a.type?this.getElement().value=this.ffKeyRestoreValue_:"keyup"==a.type&&(this.ffKeyRestoreValue_=null),a.preventDefault())};
f.handleFormSubmit_=function(){rq(this)||(this.getElement().value="",hi(this.handleAfterSubmit_,10,this))};f.handleAfterSubmit_=function(){rq(this)||(this.getElement().value=this.label_)};f.handleWindowLoad_=function(){this.check_()};f.hasFocus=function(){return this.hasFocus_};var rq=function(a){return!!a.getElement()&&""!=a.getElement().value&&a.getElement().value!=a.label_};f=nq.prototype;f.clear=function(){this.getElement().value="";null!=this.ffKeyRestoreValue_&&(this.ffKeyRestoreValue_="")};
f.reset=function(){rq(this)&&(this.clear(),this.check_())};f.setValue=function(a){null!=this.ffKeyRestoreValue_&&(this.ffKeyRestoreValue_=a);this.getElement().value=a;this.check_()};f.getValue=function(){return null!=this.ffKeyRestoreValue_?this.ffKeyRestoreValue_:rq(this)?this.getElement().value:""};f.setLabel=function(a){var b=this.getElement();pq()?(b&&(b.placeholder=a),this.label_=a):rq(this)||(b&&(b.value=""),this.label_=a,this.restoreLabel_());b&&M(b,"label",this.label_)};
f.check_=function(){var a=this.getElement();x(a,"The label input element cannot be null.");pq()?this.getElement().placeholder!=this.label_&&(this.getElement().placeholder=this.label_):qq(this);M(a,"label",this.label_);rq(this)?(a=this.getElement(),x(a),Ej(a,this.labelCssClassName)):(this.inFocusAndSelect_||this.hasFocus_||(a=this.getElement(),x(a),N(a,this.labelCssClassName)),pq()||hi(this.restoreLabel_,this.labelRestoreDelayMs,this))};
f.setEnabled=function(a){this.getElement().disabled=!a;var b=this.getElement();x(b);Gj(b,this.labelCssClassName+"-disabled",!a)};f.isEnabled=function(){return!this.getElement().disabled};f.restoreLabel_=function(){!this.getElement()||rq(this)||this.hasFocus_||(this.getElement().value=this.label_)};var sq=angular.module("jfkInput",[Ll.name]);sq.directive("jfkInput",["jfkCommon",function(a){return{link:function(b,c,d){var e=c[0];if("INPUT"!=e.tagName)throw Error("jfkInput directive must be on an INPUT tag, not "+e.tagName);c.addClass("jfk-textinput");var g=new nq;g.decorate(e);d.$observe("placeholder",function(h){g.setLabel(h||"")});Gl(a,b,d,g)}}}]);var tq=function(){};v(tq,hp);ya(tq);f=tq.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),a.getContent());this.setTooltip(b,a.getTooltip());return b};f.getAriaRole=function(){return"button"};f.canDecorate=function(a){return"DIV"==a.tagName};f.decorate=function(a,b){x(b);N(b,"goog-inline-block");return tq.superClass_.decorate.call(this,a,b)};f.getValue=function(){return""};f.getCssClass=function(){return"goog-flat-button"};
lp("goog-flat-button",function(){return new xp(null,tq.getInstance())});var uq=function(a){this.ariaRole_=a};ya(uq);uq.prototype.getAriaRole=function(){return this.ariaRole_};var vq=function(a,b){a&&(a.tabIndex=b?0:-1)};uq.prototype.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "))};uq.prototype.getContentElement=function(a){return a};uq.prototype.canDecorate=function(a){return"DIV"==a.tagName};
uq.prototype.decorate=function(a,b){b.id&&kk(a,b.id);var c=this.getCssClass(),d=!1,e=Aj(b);e&&Array.prototype.forEach.call(e,function(g){g==c?d=!0:g&&(g==c+"-disabled"?a.setEnabled(!1):g==c+"-horizontal"?a.setOrientation("horizontal"):g==c+"-vertical"&&a.setOrientation("vertical"))},this);d||N(b,c);wq(this,a,this.getContentElement(b));return b};
var wq=function(a,b,c){if(c)for(var d=c.firstChild,e;d&&d.parentNode==c;){e=d.nextSibling;if(1==d.nodeType){var g=a.getDecoratorForChild(d);g&&(g.element_=d,b.isEnabled()||g.setEnabled(!1),b.addChild(g),g.decorate(d))}else d.nodeValue&&""!=zb(d.nodeValue)||c.removeChild(d);d=e}};f=uq.prototype;f.getDecoratorForChild=function(a){a:{x(a);a=Aj(a);for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d=d in kp?kp[d]():null){a=d;break a}}a=null}return a};
f.initializeDom=function(a){a=a.getElement();x(a,"The container DOM element cannot be null.");dk(a,!0,C);B&&(a.hideFocus=!0);var b=this.getAriaRole();b&&uj(a,b)};f.getKeyEventTarget=function(a){return a.getElement()};f.getCssClass=function(){return"goog-container"};f.getClassNames=function(a){var b=this.getCssClass(),c=[b,"horizontal"==a.orientation_?b+"-horizontal":b+"-vertical"];a.isEnabled()||c.push(b+"-disabled");return c};var xq=function(a,b,c){Q.call(this,c);this.renderer_=b||uq.getInstance();this.orientation_=a||"vertical"};v(xq,Q);f=xq.prototype;f.keyEventTarget_=null;f.keyHandler_=null;f.renderer_=null;f.orientation_=null;f.visible_=!0;f.enabled_=!0;f.focusable_=!0;f.highlightedIndex_=-1;f.openItem_=null;f.mouseButtonPressed_=!1;f.allowFocusableChildren_=!1;f.openFollowsHighlight_=!0;f.childElementIdMap_=null;f.getKeyEventTarget=function(){return this.keyEventTarget_||this.renderer_.getKeyEventTarget(this)};
f.getKeyHandler=function(){return this.keyHandler_||(this.keyHandler_=new gm(this.getKeyEventTarget()))};f.createDom=function(){this.element_=this.renderer_.createDom(this)};f.getContentElement=function(){return this.renderer_.getContentElement(this.getElement())};f.canDecorate=function(a){return this.renderer_.canDecorate(a)};f.decorateInternal=function(a){this.element_=this.renderer_.decorate(this,a);"none"==a.style.display&&(this.visible_=!1)};
f.enterDocument=function(){xq.superClass_.enterDocument.call(this);pk(this,function(c){c.inDocument_&&yq(this,c)},this);var a=this.getElement();this.renderer_.initializeDom(this);this.setVisible(this.visible_,!0);var b=this.pointerEventsEnabled_?jp:ip;this.getHandler().listen(this,"enter",this.handleEnterItem).listen(this,"highlight",this.handleHighlightItem).listen(this,"unhighlight",this.handleUnHighlightItem).listen(this,"open",this.handleOpenItem).listen(this,"close",this.handleCloseItem).listen(a,
b.MOUSEDOWN,this.handleMouseDown).listen(xe(a),[b.MOUSEUP,b.MOUSECANCEL],this.handleDocumentMouseUp).listen(a,[b.MOUSEDOWN,b.MOUSEUP,b.MOUSECANCEL,"mouseover","mouseout","contextmenu"],this.handleChildMouseEvents);this.pointerEventsEnabled_&&this.getHandler().listen(a,"gotpointercapture",this.preventPointerCapture_);this.isFocusable()&&zq(this,!0)};f.preventPointerCapture_=function(a){var b=a.target;b.releasePointerCapture&&b.releasePointerCapture(a.pointerId)};
var zq=function(a,b){var c=a.getHandler(),d=a.getKeyEventTarget();b?c.listen(d,"focus",a.handleFocus).listen(d,"blur",a.handleBlur).listen(a.getKeyHandler(),"key",a.handleKeyEvent):c.unlisten(d,"focus",a.handleFocus).unlisten(d,"blur",a.handleBlur).unlisten(a.getKeyHandler(),"key",a.handleKeyEvent)};f=xq.prototype;f.exitDocument=function(){this.setHighlightedIndex(-1);this.openItem_&&this.openItem_.setOpen(!1);this.mouseButtonPressed_=!1;xq.superClass_.exitDocument.call(this)};
f.disposeInternal=function(){xq.superClass_.disposeInternal.call(this);this.keyHandler_&&(this.keyHandler_.dispose(),this.keyHandler_=null);this.renderer_=this.openItem_=this.childElementIdMap_=this.keyEventTarget_=null};f.handleEnterItem=function(){return!0};
f.handleHighlightItem=function(a){var b=sk(this,a.target);if(-1<b&&b!=this.highlightedIndex_){var c=Aq(this);c&&c.setHighlighted(!1);this.highlightedIndex_=b;c=Aq(this);this.mouseButtonPressed_&&c.setActive(!0);this.openFollowsHighlight_&&this.openItem_&&c!=this.openItem_&&(U(c,64)?c.setOpen(!0):this.openItem_.setOpen(!1))}b=this.getElement();x(b,"The DOM element for the container cannot be null.");null!=a.target.getElement()&&M(b,"activedescendant",a.target.getElement().id)};
f.handleUnHighlightItem=function(a){a.target==Aq(this)&&(this.highlightedIndex_=-1);a=this.getElement();x(a,"The DOM element for the container cannot be null.");a.removeAttribute(vj("activedescendant"))};f.handleOpenItem=function(a){(a=a.target)&&a!=this.openItem_&&a.getParent()==this&&(this.openItem_&&this.openItem_.setOpen(!1),this.openItem_=a)};
f.handleCloseItem=function(a){a.target==this.openItem_&&(this.openItem_=null);var b=this.getElement(),c=a.target.getElement();b&&a.target.state_&2&&c&&yj(b,c)};f.handleMouseDown=function(a){this.enabled_&&(this.mouseButtonPressed_=!0);var b=this.getKeyEventTarget();b&&$e(b)?b.focus():a.preventDefault()};f.handleDocumentMouseUp=function(){this.mouseButtonPressed_=!1};
f.handleChildMouseEvents=function(a){var b=this.pointerEventsEnabled_?jp:ip;a:{var c=a.target;if(this.childElementIdMap_)for(var d=this.getElement();c&&c!==d;){var e=c.id;if(e in this.childElementIdMap_){c=this.childElementIdMap_[e];break a}c=c.parentNode}c=null}if(c)switch(a.type){case b.MOUSEDOWN:c.handleMouseDown(a);break;case b.MOUSEUP:case b.MOUSECANCEL:c.handleMouseUp(a);break;case "mouseover":c.handleMouseOver(a);break;case "mouseout":c.handleMouseOut(a);break;case "contextmenu":c.handleContextMenu(a)}};
f.handleFocus=function(){};f.handleBlur=function(){this.setHighlightedIndex(-1);this.mouseButtonPressed_=!1;this.openItem_&&this.openItem_.setOpen(!1)};f.handleKeyEvent=function(a){return this.isEnabled()&&this.isVisible()&&(0!=qk(this)||this.keyEventTarget_)&&this.handleKeyEventInternal(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};
f.handleKeyEventInternal=function(a){var b=Aq(this);if(b&&"function"==typeof b.handleKeyEvent&&b.handleKeyEvent(a)||this.openItem_&&this.openItem_!=b&&"function"==typeof this.openItem_.handleKeyEvent&&this.openItem_.handleKeyEvent(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case 27:if(this.isFocusable())this.getKeyEventTarget().blur();else return!1;break;case 36:Bq(this);break;case 35:Cq(this);break;case 38:if("vertical"==this.orientation_)Dq(this);else return!1;
break;case 37:if("horizontal"==this.orientation_)this.isRightToLeft()?Eq(this):Dq(this);else return!1;break;case 40:if("vertical"==this.orientation_)Eq(this);else return!1;break;case 39:if("horizontal"==this.orientation_)this.isRightToLeft()?Dq(this):Eq(this);else return!1;break;default:return!1}return!0};var yq=function(a,b){var c=b.getElement();c=c.id||(c.id=jk(b));a.childElementIdMap_||(a.childElementIdMap_={});a.childElementIdMap_[c]=b};f=xq.prototype;
f.addChild=function(a,b){Va(a,V,"The child of a container must be a control");xq.superClass_.addChild.call(this,a,b)};
f.addChildAt=function(a,b,c){Va(a,V);a.statesWithTransitionEvents_|=2;a.statesWithTransitionEvents_|=64;!this.isFocusable()&&this.allowFocusableChildren_||a.setSupportedState(32,!1);op(a,!1);var d=a.getParent()==this?sk(this,a):-1;xq.superClass_.addChildAt.call(this,a,b,c);a.inDocument_&&this.inDocument_&&yq(this,a);a=d;-1==a&&(a=qk(this));a==this.highlightedIndex_?this.highlightedIndex_=Math.min(qk(this)-1,b):a>this.highlightedIndex_&&b<=this.highlightedIndex_?this.highlightedIndex_++:a<this.highlightedIndex_&&
b>this.highlightedIndex_&&this.highlightedIndex_--};f.removeChild=function(a,b){a="string"===typeof a?mk(this,a):a;Va(a,V);if(a){var c=sk(this,a);-1!=c&&(c==this.highlightedIndex_?(a.setHighlighted(!1),this.highlightedIndex_=-1):c<this.highlightedIndex_&&this.highlightedIndex_--);var d=a.getElement();d&&d.id&&this.childElementIdMap_&&(c=this.childElementIdMap_,d=d.id,d in c&&delete c[d])}a=xq.superClass_.removeChild.call(this,a,b);op(a,!0);return a};
f.setOrientation=function(a){if(this.getElement())throw Error("Component already rendered");this.orientation_=a};f.isVisible=function(){return this.visible_};f.setVisible=function(a,b){if(b||this.visible_!=a&&this.dispatchEvent(a?"show":"hide")){this.visible_=a;var c=this.getElement();c&&(P(c,a),this.isFocusable()&&vq(this.getKeyEventTarget(),this.enabled_&&this.visible_),b||this.dispatchEvent(this.visible_?"aftershow":"afterhide"));return!0}return!1};f.isEnabled=function(){return this.enabled_};
f.setEnabled=function(a){this.enabled_!=a&&this.dispatchEvent(a?"enable":"disable")&&(a?(this.enabled_=!0,pk(this,function(b){b.wasDisabled?delete b.wasDisabled:b.setEnabled(!0)})):(pk(this,function(b){b.isEnabled()?b.setEnabled(!1):b.wasDisabled=!0}),this.mouseButtonPressed_=this.enabled_=!1),this.isFocusable()&&vq(this.getKeyEventTarget(),a&&this.visible_))};f.isFocusable=function(){return this.focusable_};
f.setFocusable=function(a){a!=this.focusable_&&this.inDocument_&&zq(this,a);this.focusable_=a;this.enabled_&&this.visible_&&vq(this.getKeyEventTarget(),a)};f.setHighlightedIndex=function(a){(a=rk(this,a))?a.setHighlighted(!0):-1<this.highlightedIndex_&&Aq(this).setHighlighted(!1)};f.setHighlighted=function(a){this.setHighlightedIndex(sk(this,a))};
var Aq=function(a){return rk(a,a.highlightedIndex_)},Bq=function(a){Fq(a,function(b,c){return(b+1)%c},qk(a)-1)},Cq=function(a){Fq(a,function(b,c){b--;return 0>b?c-1:b},0)},Eq=function(a){Fq(a,function(b,c){return(b+1)%c},a.highlightedIndex_)},Dq=function(a){Fq(a,function(b,c){b--;return 0>b?c-1:b},a.highlightedIndex_)},Fq=function(a,b,c){c=0>c?sk(a,a.openItem_):c;var d=qk(a);c=b.call(a,c,d);for(var e=0;e<=d;){var g=rk(a,c);if(g&&a.canHighlightItem(g)){a.setHighlightedIndex(c);break}e++;c=b.call(a,
c,d)}};xq.prototype.canHighlightItem=function(a){return a.isVisible()&&a.isEnabled()&&U(a,2)};var Gq=function(){};v(Gq,Zo);ya(Gq);Gq.prototype.getCssClass=function(){return"goog-menuheader"};var Hq=function(a,b,c){V.call(this,a,c||Gq.getInstance(),b);this.setSupportedState(1,!1);this.setSupportedState(2,!1);this.setSupportedState(4,!1);this.setSupportedState(32,!1);this.state_=1};v(Hq,V);lp("goog-menuheader",function(){return new Hq(null)});var Iq=function(){this.classNameCache_=[]};v(Iq,Zo);ya(Iq);var Jq=function(a,b){var c=a.classNameCache_[b];if(!c){switch(b){case 0:c=a.getCssClass()+"-highlight";break;case 1:c=a.getCssClass()+"-checkbox";break;case 2:c=a.getCssClass()+"-content"}a.classNameCache_[b]=c}return c};f=Iq.prototype;f.getAriaRole=function(){return"menuitem"};
f.createDom=function(a){var b=a.getDomHelper().createDom("DIV",this.getClassNames(a).join(" "),Kq(this,a.getContent(),a.getDomHelper()));Lq(this,a,b,U(a,8)||U(a,16));return b};f.getContentElement=function(a){return a&&a.firstChild};f.decorate=function(a,b){x(b);var c=Te(b),d=Jq(this,2);c&&Cj(c,d)||b.appendChild(Kq(this,b.childNodes,a.getDomHelper()));Cj(b,"goog-option")&&(a.setCheckable(!0),this.setCheckable(a,b,!0));return Iq.superClass_.decorate.call(this,a,b)};
f.setContent=function(a,b){var c=this.getContentElement(a),d=Mq(this,a)?c.firstChild:null;Iq.superClass_.setContent.call(this,a,b);d&&!Mq(this,a)&&c.insertBefore(d,c.firstChild||null)};var Kq=function(a,b,c){a=Jq(a,2);return c.createDom("DIV",a,b)};Iq.prototype.setSelectable=function(a,b,c){a&&b&&Lq(this,a,b,c)};Iq.prototype.setCheckable=function(a,b,c){a&&b&&Lq(this,a,b,c)};
var Mq=function(a,b){return(b=a.getContentElement(b))?(b=b.firstChild,a=Jq(a,1),!!b&&Ue(b)&&Cj(b,a)):!1},Lq=function(a,b,c,d){ep(a,c,b.getPreferredAriaRole());fp(a,b,c);d!=Mq(a,c)&&(Gj(c,"goog-option",d),c=a.getContentElement(c),d?(a=Jq(a,1),c.insertBefore(b.getDomHelper().createDom("DIV",a),c.firstChild||null)):c.removeChild(c.firstChild))};
Iq.prototype.getClassForState=function(a){switch(a){case 2:return Jq(this,0);case 16:case 8:return"goog-option-selected";default:return Iq.superClass_.getClassForState.call(this,a)}};Iq.prototype.getStateFromClass=function(a){var b=Jq(this,0);switch(a){case "goog-option-selected":return 16;case b:return 2;default:return Iq.superClass_.getStateFromClass.call(this,a)}};Iq.prototype.getCssClass=function(){return"goog-menuitem"};var W=function(a,b,c,d){V.call(this,a,d||Iq.getInstance(),c);this.setValue(b)};v(W,V);f=W.prototype;f.getValue=function(){var a=this.model_;return null!=a?a:this.getCaption()};f.setValue=function(a){this.setModel(a)};f.setSupportedState=function(a,b){W.superClass_.setSupportedState.call(this,a,b);switch(a){case 8:this.isChecked()&&!b&&this.setChecked(!1);(a=this.getElement())&&this.renderer_.setSelectable(this,a,b);break;case 16:(a=this.getElement())&&this.renderer_.setCheckable(this,a,b)}};
f.setSelectable=function(a){this.setSupportedState(8,a)};f.setCheckable=function(a){this.setSupportedState(16,a)};f.getCaption=function(){var a=this.getContent();return Array.isArray(a)?(a=Ya(a,function(b){return Ue(b)&&(Cj(b,"goog-menuitem-accel")||Cj(b,"goog-menuitem-mnemonic-separator"))?"":cf(b)}).join(""),me(a)):W.superClass_.getCaption.call(this)};
f.handleMouseUp=function(a){var b=this.getParent();if(b){var c=b.openingCoords;b.openingCoords=null;if(c&&"number"===typeof a.clientX&&je(c,new E(a.clientX,a.clientY)))return}W.superClass_.handleMouseUp.call(this,a)};f.handleKeyEventInternal=function(a){return a.keyCode==this.mnemonicKey_&&this.performActionInternal(a)?!0:W.superClass_.handleKeyEventInternal.call(this,a)};f.getMnemonic=function(){return this.mnemonicKey_};lp("goog-menuitem",function(){return new W(null)});
W.prototype.getPreferredAriaRole=function(){return U(this,16)?"menuitemcheckbox":U(this,8)?"menuitemradio":W.superClass_.getPreferredAriaRole.call(this)};W.prototype.getParent=function(){return V.prototype.getParent.call(this)};W.prototype.getParentEventTarget=function(){return V.prototype.getParentEventTarget.call(this)};var Nq=function(){};v(Nq,Zo);ya(Nq);Nq.prototype.createDom=function(a){return a.getDomHelper().createDom("DIV",this.getCssClass())};Nq.prototype.decorate=function(a,b){b.id&&kk(a,b.id);if("HR"==b.tagName){var c=b;a=b=this.createDom(a);x(null!=a&&null!=c,"goog.dom.insertSiblingBefore expects non-null arguments");c.parentNode&&c.parentNode.insertBefore(a,c);Qe(c)}else N(b,this.getCssClass());return b};Nq.prototype.setContent=function(){};Nq.prototype.getCssClass=function(){return"goog-menuseparator"};var Oq=function(a,b){V.call(this,null,a||Nq.getInstance(),b);this.setSupportedState(1,!1);this.setSupportedState(2,!1);this.setSupportedState(4,!1);this.setSupportedState(32,!1);this.state_=1};v(Oq,V);Oq.prototype.enterDocument=function(){Oq.superClass_.enterDocument.call(this);var a=this.getElement();x(a,"The DOM element for the separator cannot be null.");uj(a,"separator")};lp("goog-menuseparator",function(){return new Oq});var Pq=function(a){this.ariaRole_=a||"menu"};v(Pq,uq);ya(Pq);f=Pq.prototype;f.canDecorate=function(a){return"UL"==a.tagName||Pq.superClass_.canDecorate.call(this,a)};f.getDecoratorForChild=function(a){return"HR"==a.tagName?new Oq:Pq.superClass_.getDecoratorForChild.call(this,a)};f.containsElement=function(a,b){return Ve(a.getElement(),b)};f.getCssClass=function(){return"goog-menu"};
f.initializeDom=function(a){Pq.superClass_.initializeDom.call(this,a);a=a.getElement();x(a,"The menu DOM element cannot be null.");M(a,"haspopup","true")};var Qq=function(a){Oq.call(this,Nq.getInstance(),a)};v(Qq,Oq);lp("goog-menuseparator",function(){return new Oq});var Rq=function(a,b){xq.call(this,"vertical",b||Pq.getInstance(),a);this.setFocusable(!1)};v(Rq,xq);f=Rq.prototype;f.allowAutoFocus_=!0;f.allowHighlightDisabled_=!1;f.getCssClass=function(){return this.renderer_.getCssClass()};f.containsElement=function(a){if(this.renderer_.containsElement(this,a))return!0;for(var b=0,c=qk(this);b<c;b++){var d=rk(this,b);if("function"==typeof d.containsElement&&d.containsElement(a))return!0}return!1};f.addItem=function(a){this.addChild(a,!0)};
f.addItemAt=function(a,b){this.addChildAt(a,b,!0)};f.removeItem=function(a){(a=this.removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return rk(this,a)};f.getItemCount=function(){return qk(this)};f.getItems=function(){var a=[];pk(this,function(b){a.push(b)});return a};f.setPosition=function(a,b){var c=this.isVisible();c||P(this.getElement(),!0);var d=this.getElement(),e=Rj(d);a instanceof E&&(b=a.y,a=a.x);a=Oa(a)-e.x;Oj(d,d.offsetLeft+a,d.offsetTop+(Number(b)-e.y));c||P(this.getElement(),!1)};
f.setVisible=function(a,b,c){(b=Rq.superClass_.setVisible.call(this,a,b))&&a&&this.inDocument_&&this.allowAutoFocus_&&this.getKeyEventTarget().focus();this.openingCoords=a&&c&&"number"===typeof c.clientX?new E(c.clientX,c.clientY):null;return b};f.handleEnterItem=function(a){this.allowAutoFocus_&&this.getKeyEventTarget().focus();return Rq.superClass_.handleEnterItem.call(this,a)};f.canHighlightItem=function(a){return(this.allowHighlightDisabled_||a.isEnabled())&&a.isVisible()&&U(a,2)};
f.decorateInternal=function(a){var b=this.renderer_;var c=this.getDomHelper();c=ze(c.document_,"DIV",b.getCssClass()+"-content",a);for(var d=c.length,e=0;e<d;e++)wq(b,this,c[e]);Rq.superClass_.decorateInternal.call(this,a)};f.handleKeyEventInternal=function(a){var b=Rq.superClass_.handleKeyEventInternal.call(this,a);b||pk(this,function(c){!b&&c.getMnemonic&&c.mnemonicKey_==a.keyCode&&(this.isEnabled()&&this.setHighlighted(c),b=c.handleKeyEvent(a))},this);return b};
f.setHighlightedIndex=function(a){Rq.superClass_.setHighlightedIndex.call(this,a);(a=rk(this,a))&&Vj(a.getElement(),this.getElement())};var Sq=function(a,b,c){this.element=a;this.corner=b;this.overflow_=c};v(Sq,bo);Sq.prototype.reposition=function(a,b,c){Qm(this.element,this.corner,a,b,void 0,c,this.overflow_)};var Tq=function(a,b,c,d){Sq.call(this,a,b);this.lastResortOverflow_=c?5:0;this.overflowConstraint_=d||void 0};v(Tq,Sq);Tq.prototype.getLastResortOverflow=function(){return this.lastResortOverflow_};Tq.prototype.setLastResortOverflow=function(a){this.lastResortOverflow_=a};
Tq.prototype.reposition=function(a,b,c,d){var e=Qm(this.element,this.corner,a,b,null,c,10,d,this.overflowConstraint_);if(e&496){var g=Uq(e,this.corner);b=Uq(e,b);e=Qm(this.element,g,a,b,null,c,10,d,this.overflowConstraint_);e&496&&(g=Uq(e,g),b=Uq(e,b),Qm(this.element,g,a,b,null,c,this.lastResortOverflow_,d,this.overflowConstraint_))}};var Uq=function(a,b){a&48&&(b^=4);a&192&&(b^=1);return b};var Vq=function(a,b,c,d){Tq.call(this,a,b,c||d);(c||d)&&this.setLastResortOverflow(65|(d?32:132))};v(Vq,Tq);var Wq=function(){};v(Wq,gq);ya(Wq);f=Wq.prototype;f.getContentElement=function(a){return Wq.superClass_.getContentElement.call(this,a&&a.firstChild)};f.decorate=function(a,b){var c=ze(document,"*","goog-menu",b)[0];if(c){P(c,!1);Ne(xe(c).body,c);var d=new Rq;d.decorate(c);a.setMenu(d)}return Wq.superClass_.decorate.call(this,a,b)};f.createButton=function(a,b){return Wq.superClass_.createButton.call(this,[this.createCaption(a,b),this.createDropdown(b)],b)};
f.createCaption=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-caption"),a)};f.createDropdown=function(a){return a.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-dropdown"),"\u00a0")};f.getCssClass=function(){return"goog-menu-button"};var Xq=function(){this.classNameCache_=[]};v(Xq,Iq);ya(Xq);Xq.prototype.createDom=function(a){var b=Xq.superClass_.createDom.call(this,a);x(b);N(b,"goog-submenu");Yq(this,a,b);return b};Xq.prototype.decorate=function(a,b){b=Xq.superClass_.decorate.call(this,a,b);x(b);N(b,"goog-submenu");Yq(this,a,b);var c=ze(document,"DIV","goog-menu",b);if(c.length){var d=new Rq(a.getDomHelper());c=c[0];P(c,!1);a.getDomHelper().document_.body.appendChild(c);d.decorate(c);a.setMenu(d,!0)}return b};
Xq.prototype.setContent=function(a,b){var c=this.getContentElement(a),d=c&&c.lastChild;Xq.superClass_.setContent.call(this,a,b);d&&c.lastChild!=d&&Cj(d,"goog-submenu-arrow")&&c.appendChild(d)};Xq.prototype.initializeDom=function(a){Xq.superClass_.initializeDom.call(this,a);var b=a.getContentElement(),c=a.getDomHelper();c=ze(c.document_,"SPAN","goog-submenu-arrow",b)[0];Zq(a,c);c!=b.lastChild&&b.appendChild(c);a=a.getElement();x(a,"The sub menu DOM element cannot be null.");M(a,"haspopup","true")};
var Yq=function(a,b,c){var d=b.getDomHelper().createDom("SPAN");d.className="goog-submenu-arrow";Zq(b,d);a.getContentElement(c).appendChild(d)},Zq=function(a,b){x(b);a.isRightToLeft()?(N(b,"goog-submenu-arrow-rtl"),We(b,a.alignToEnd_?"\u25c4":"\u25ba")):(Ej(b,"goog-submenu-arrow-rtl"),We(b,a.alignToEnd_?"\u25ba":"\u25c4"))};var $q=function(a,b,c,d){W.call(this,a,b,c,d||Xq.getInstance())};v($q,W);f=$q.prototype;f.dismissTimer_=null;f.showTimer_=null;f.menuIsVisible_=!1;f.subMenu_=null;f.externalSubMenu_=!1;f.alignToEnd_=!0;f.isPositionAdjustable_=!1;f.enterDocument=function(){$q.superClass_.enterDocument.call(this);this.getHandler().listen(this.getParent(),"hide",this.onParentHidden_);this.subMenu_&&ar(this,this.subMenu_,!0)};
f.exitDocument=function(){this.getHandler().unlisten(this.getParent(),"hide",this.onParentHidden_);this.subMenu_&&(ar(this,this.subMenu_,!1),this.externalSubMenu_||(this.subMenu_.exitDocument(),Qe(this.subMenu_.getElement())));$q.superClass_.exitDocument.call(this)};f.disposeInternal=function(){this.subMenu_&&!this.externalSubMenu_&&this.subMenu_.dispose();this.subMenu_=null;$q.superClass_.disposeInternal.call(this)};
f.setHighlighted=function(a){$q.superClass_.setHighlighted.call(this,a);a||(this.dismissTimer_&&m.clearTimeout(this.dismissTimer_),this.dismissTimer_=hi(this.dismissSubMenu,218,this))};f.showSubMenu=function(){var a=this.getParent();a&&Aq(a)==this&&(br(this,!0),cr(this))};f.dismissSubMenu=function(){var a=this.subMenu_;a&&a.getParent()==this&&(br(this,!1),pk(a,function(b){"function"==typeof b.dismissSubMenu&&b.dismissSubMenu()}))};
var dr=function(a){a.dismissTimer_&&m.clearTimeout(a.dismissTimer_);a.showTimer_&&m.clearTimeout(a.showTimer_)};$q.prototype.setVisible=function(a,b){(a=$q.superClass_.setVisible.call(this,a,b))&&!this.isVisible()&&this.dismissSubMenu();return a};var cr=function(a){pk(a.getParent(),function(b){b!=this&&"function"==typeof b.dismissSubMenu&&(b.dismissSubMenu(),dr(b))},a)};f=$q.prototype;
f.handleKeyEvent=function(a){var b=a.keyCode,c=this.isRightToLeft()?37:39,d=this.isRightToLeft()?39:37;if(!this.menuIsVisible_){if(!this.isEnabled()||b!=c&&13!=b&&b!=this.mnemonicKey_)return!1;this.showSubMenu();Bq(this.getMenu());dr(this)}else if(!this.getMenu().handleKeyEvent(a))if(b==d)this.dismissSubMenu();else return!1;a.preventDefault();return!0};f.onChildEnter_=function(){this.subMenu_.getParent()==this&&(dr(this),this.getParentEventTarget().setHighlighted(this),cr(this))};
f.onParentHidden_=function(a){a.target==this.getParentEventTarget()&&(this.dismissSubMenu(),dr(this))};f.handleMouseOver=function(a){this.isEnabled()&&(dr(this),this.showTimer_=hi(this.showSubMenu,218,this));$q.superClass_.handleMouseOver.call(this,a)};f.performActionInternal=function(a){dr(this);if(U(this,8)||U(this,16))return $q.superClass_.performActionInternal.call(this,a);this.showSubMenu();return!0};
var br=function(a,b){!b&&a.getMenu()&&a.getMenu().setHighlightedIndex(-1);a.dispatchEvent(ik(64,b));var c=a.getMenu();b!=a.menuIsVisible_&&Gj(x(a.getElement()),"goog-submenu-open",b);if(b!=c.isVisible()&&(b&&(c.inDocument_||c.render(),c.setHighlightedIndex(-1)),c.setVisible(b),b)){c=new Tq(a.getElement(),a.alignToEnd_?12:8,a.isPositionAdjustable_);var d=a.getMenu(),e=d.getElement();d.isVisible()||(e.style.visibility="hidden",P(e,!0));c.reposition(e,a.alignToEnd_?8:12);d.isVisible()||(P(e,!1),e.style.visibility=
"visible")}a.menuIsVisible_=b},ar=function(a,b,c){var d=a.getHandler();(c?d.listen:d.unlisten).call(d,b,"enter",a.onChildEnter_)};f=$q.prototype;f.addItem=function(a){this.getMenu().addChild(a,!0)};f.addItemAt=function(a,b){this.getMenu().addChildAt(a,b,!0)};f.removeItem=function(a){(a=this.getMenu().removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return rk(this.getMenu(),a)};f.getItemCount=function(){return qk(this.getMenu())};f.getItems=function(){return this.getMenu().getItems()};
f.getMenu=function(){this.subMenu_?this.externalSubMenu_&&this.subMenu_.getParent()!=this&&nk(this.subMenu_,this):this.setMenu(new Rq(this.getDomHelper()),!0);this.subMenu_.getElement()||this.subMenu_.createDom();return this.subMenu_};f.setMenu=function(a,b){var c=this.subMenu_;a!=c&&(c&&(this.dismissSubMenu(),this.inDocument_&&ar(this,c,!1)),this.subMenu_=a,this.externalSubMenu_=!b,a&&(nk(a,this),a.setVisible(!1,!0),a.allowAutoFocus_=!1,a.setFocusable(!1),this.inDocument_&&ar(this,a,!0)))};
f.containsElement=function(a){return this.getMenu().containsElement(a)};lp("goog-submenu",function(){return new $q(null)});var X=function(a,b,c,d,e){xp.call(this,a,c||Wq.getInstance(),d);this.setSupportedState(64,!0);this.menuPosition_=new Vq(null,9);b&&this.setMenu(b);this.menuMargin_=null;this.timer_=new gi(500);this.closeOnEnterOrSpace_=!0;this.menuRenderer_=e||Pq.getInstance()};v(X,xp);f=X.prototype;f.isFocusablePopupMenu_=!1;f.renderMenuAsSibling_=!1;f.selectFirstOnEnterOrSpace_=!1;
f.enterDocument=function(){X.superClass_.enterDocument.call(this);er(this,!0);this.menu_&&fr(this,this.menu_,!0);M(lk(this),"haspopup",!!this.menu_)};f.exitDocument=function(){X.superClass_.exitDocument.call(this);er(this,!1);if(this.menu_){this.setOpen(!1);this.menu_.exitDocument();fr(this,this.menu_,!1);var a=this.menu_.getElement();a&&Qe(a)}};f.disposeInternal=function(){X.superClass_.disposeInternal.call(this);this.menu_&&(this.menu_.dispose(),delete this.menu_);delete this.positionElement_;this.timer_.dispose()};
f.handleMouseDown=function(a){X.superClass_.handleMouseDown.call(this,a);if(this.isActive()&&(this.setOpen(!this.isOpen(),a),this.menu_)){a=this.menu_;var b=this.isOpen();a.mouseButtonPressed_=b}};f.handleMouseUp=function(a){X.superClass_.handleMouseUp.call(this,a);this.menu_&&!this.isActive()&&(this.menu_.mouseButtonPressed_=!1)};f.performActionInternal=function(){this.setActive(!1);return!0};
f.handleDocumentMouseDown=function(a){this.menu_&&this.menu_.isVisible()&&!this.containsElement(a.target)&&this.setOpen(!1)};f.containsElement=function(a){return a&&Ve(this.getElement(),a)||this.menu_&&this.menu_.containsElement(a)||!1};
f.handleKeyEventInternal=function(a){if(32==a.keyCode){if(a.preventDefault(),"keyup"!=a.type)return!0}else if("key"!=a.type)return!1;if(this.menu_&&this.menu_.isVisible()){var b=13==a.keyCode||32==a.keyCode,c=this.menu_.handleKeyEvent(a);return c&&this.menu_&&this.menu_.openItem_ instanceof $q||!(27==a.keyCode||b&&this.closeOnEnterOrSpace_)?c:(this.setOpen(!1),!0)}return 40==a.keyCode||38==a.keyCode||32==a.keyCode||13==a.keyCode?(this.setOpen(!0,a),!0):!1};f.handleMenuAction=function(){this.setOpen(!1)};
f.handleMenuBlur=function(){this.isActive()||this.setOpen(!1)};f.handleBlur=function(a){this.isFocusablePopupMenu_||this.setOpen(!1);X.superClass_.handleBlur.call(this,a)};f.getMenu=function(){this.menu_||this.setMenu(new Rq(this.getDomHelper(),this.menuRenderer_));return this.menu_||null};
f.setMenu=function(a){var b=this.menu_;if(a!=b&&(b&&(this.setOpen(!1),this.inDocument_&&fr(this,b,!1),delete this.menu_),this.inDocument_&&M(lk(this),"haspopup",!!a),a)){this.menu_=a;nk(a,this);a.setVisible(!1);var c=this.isFocusablePopupMenu_;(a.allowAutoFocus_=c)&&a.setFocusable(!0);this.inDocument_&&fr(this,a,!0)}return b};f.addItem=function(a){this.getMenu().addChild(a,!0)};f.addItemAt=function(a,b){this.getMenu().addChildAt(a,b,!0)};
f.removeItem=function(a){(a=this.getMenu().removeChild(a,!0))&&a.dispose()};f.getItemAt=function(a){return this.menu_?rk(this.menu_,a):null};f.getItemCount=function(){return this.menu_?qk(this.menu_):0};f.setVisible=function(a,b){(a=X.superClass_.setVisible.call(this,a,b))&&!this.isVisible()&&this.setOpen(!1);return a};f.setEnabled=function(a){X.superClass_.setEnabled.call(this,a);this.isEnabled()||this.setOpen(!1)};
var gr=function(a){a=a.menuPosition_.corner;return 9==a||8==a},hr=function(a){return a.menuPosition_.getLastResortOverflow&&!!(a.menuPosition_.lastResortOverflow_&32)};
X.prototype.setOpen=function(a,b){X.superClass_.setOpen.call(this,a);if(this.menu_&&!!(this.state_&64)==a){if(a){if(!this.menu_.inDocument_)if(this.renderMenuAsSibling_){var c=this.getElement();(c=void 0!==c.nextElementSibling?c.nextElementSibling:Se(c.nextSibling))?ok(this.menu_,c.parentNode,c):this.menu_.render(this.getElement().parentNode)}else this.menu_.render();this.viewportBox_=Sj(this.getElement());this.buttonRect_=ak(this.getElement());this.positionMenu();c=!!b&&(13==b.keyCode||32==b.keyCode);
b&&(40==b.keyCode||38==b.keyCode)||c&&this.selectFirstOnEnterOrSpace_?Bq(this.menu_):this.menu_.setHighlightedIndex(-1)}else{this.setActive(!1);this.menu_.mouseButtonPressed_=!1;if(c=this.getElement())M(c,"activedescendant",""),M(c,"owns","");if(null!=this.originalSize_&&(this.originalSize_=void 0,c=this.menu_.getElement())){var d="";if(d instanceof le){var e=d.height;d=d.width}else e="";c.style.width=Nj(d,!0);c.style.height=Nj(e,!0)}}this.menu_.setVisible(a,!1,b);this.disposed_||(b=this.getHandler(),
c=a?b.listen:b.unlisten,c.call(b,this.getDomHelper().document_,"mousedown",this.handleDocumentMouseDown,!0),this.isFocusablePopupMenu_&&c.call(b,this.menu_,"blur",this.handleMenuBlur),c.call(b,this.timer_,"tick",this.onTick_),a?this.timer_.start():this.timer_.stop())}this.menu_&&this.menu_.getElement()&&lk(this.menu_).removeAttribute(vj("hidden"))};
X.prototype.positionMenu=function(){if(this.menu_.inDocument_){var a=this.positionElement_||this.getElement(),b=this.menuPosition_;this.menuPosition_.element=a;a=this.menu_.getElement();this.menu_.isVisible()||(a.style.visibility="hidden",P(a,!0));!this.originalSize_&&hr(this)&&(this.originalSize_=Zj(a));b.reposition(a,b.corner^1,this.menuMargin_,this.originalSize_);this.menu_.isVisible()||(P(a,!1),a.style.visibility="visible")}};
X.prototype.onTick_=function(){var a=ak(this.getElement()),b=Sj(this.getElement());var c=this.buttonRect_;(c=!(c==a||c&&a&&c.left==a.left&&c.width==a.width&&c.top==a.top&&c.height==a.height))||(c=this.viewportBox_,c=!(c==b||c&&b&&c.top==b.top&&c.right==b.right&&c.bottom==b.bottom&&c.left==b.left));c&&(this.menu_.inDocument_&&b&&this.viewportBox_&&b.getWidth()<this.viewportBox_.getWidth()&&(c=this.menu_.getElement(),this.menu_.isVisible()||(c.style.visibility="hidden",P(c,!0)),Oj(c,new E(0,0))),this.buttonRect_=
a,this.viewportBox_=b,this.positionMenu())};var fr=function(a,b,c){var d=a.getHandler();c=c?d.listen:d.unlisten;c.call(d,b,"action",a.handleMenuAction);c.call(d,b,"close",a.handleCloseItem);c.call(d,b,"highlight",a.handleHighlightItem);c.call(d,b,"unhighlight",a.handleUnHighlightItem)},er=function(a,b){var c=a.getHandler();(b?c.listen:c.unlisten).call(c,a.getElement(),"keydown",a.handleKeyDownEvent_)};X.prototype.handleHighlightItem=function(a){(a=a.target.getElement())&&ir(this,a)};
X.prototype.handleKeyDownEvent_=function(a){U(this,32)&&this.getKeyEventTarget()&&this.menu_&&this.menu_.isVisible()&&a.stopPropagation()};X.prototype.handleUnHighlightItem=function(){if(!Aq(this.menu_)){var a=this.getElement();x(a,"The menu button DOM element cannot be null.");M(a,"activedescendant","");M(a,"owns","")}};X.prototype.handleCloseItem=function(a){if(this.isOpen()&&a.target instanceof W){a=a.target;var b=a.getElement();a.isVisible()&&a.state_&2&&null!=b&&ir(this,b)}};
var ir=function(a,b){a=a.getElement();x(a,"The menu button DOM element cannot be null.");b=xj(b)||b;if(!b.id){var c=fk.getInstance();b.id=gk(c)}yj(a,b);M(a,"owns",b.id)};lp("goog-menu-button",function(){return new X(null)});var jr=function(){};v(jr,tq);ya(jr);f=jr.prototype;f.createDom=function(a){var b=this.getClassNames(a);b=a.getDomHelper().createDom("DIV","goog-inline-block "+b.join(" "),[this.createCaption(a.getContent(),a.getDomHelper()),this.createDropdown(a.getDomHelper())]);this.setTooltip(b,a.getTooltip());return b};f.getContentElement=function(a){return a&&a.firstChild};
f.decorate=function(a,b){var c=ze(document,"*","goog-menu",b)[0];if(c){P(c,!1);a.getDomHelper().document_.body.appendChild(c);var d=new Rq;d.decorate(c);a.setMenu(d)}ze(document,"*",this.getCssClass()+"-caption",b)[0]||b.appendChild(this.createCaption(b.childNodes,a.getDomHelper()));ze(document,"*",this.getCssClass()+"-dropdown",b)[0]||b.appendChild(this.createDropdown(a.getDomHelper()));return jr.superClass_.decorate.call(this,a,b)};
f.createCaption=function(a,b){return b.createDom("DIV","goog-inline-block "+(this.getCssClass()+"-caption"),a)};f.createDropdown=function(a){return a.createDom("DIV",{"class":"goog-inline-block "+(this.getCssClass()+"-dropdown"),"aria-hidden":!0},"\u00a0")};f.getCssClass=function(){return"goog-flat-menu-button"};lp("goog-flat-menu-button",function(){return new X(null,null,jr.getInstance())});var kr=function(a,b,c,d,e){X.call(this,a,b,c,d,e||new Pq("listbox"));this.defaultCaption_=this.getContent();this.initialAriaLabel_=null;this.preferredAriaRole_="listbox"};v(kr,X);f=kr.prototype;f.selectionModel_=null;f.enterDocument=function(){kr.superClass_.enterDocument.call(this);lr(this);mr(this)};f.decorateInternal=function(a){kr.superClass_.decorateInternal.call(this,a);(a=this.getCaption())?(this.defaultCaption_=a,lr(this)):this.getSelectedItem()||this.setSelectedIndex(0)};
f.disposeInternal=function(){kr.superClass_.disposeInternal.call(this);this.selectionModel_&&(this.selectionModel_.dispose(),this.selectionModel_=null);this.defaultCaption_=null};f.handleMenuAction=function(a){this.setSelectedItem(a.target);kr.superClass_.handleMenuAction.call(this,a);a.stopPropagation();this.dispatchEvent("action")};f.handleSelectionChange=function(){var a=this.getSelectedItem();kr.superClass_.setValue.call(this,a&&a.getValue());lr(this)};
f.setMenu=function(a){var b=kr.superClass_.setMenu.call(this,a);a!=b&&(this.selectionModel_&&this.selectionModel_.clear(),a&&(this.selectionModel_?pk(a,function(c){nr(c);this.selectionModel_.addItem(c)},this):or(this,a)));return b};f.addItem=function(a){nr(a);kr.superClass_.addItem.call(this,a);this.selectionModel_?this.selectionModel_.addItem(a):or(this,this.getMenu());pr(this)};
f.addItemAt=function(a,b){nr(a);kr.superClass_.addItemAt.call(this,a,b);this.selectionModel_?this.selectionModel_.addItemAt(a,b):or(this,this.getMenu())};f.removeItem=function(a){kr.superClass_.removeItem.call(this,a);this.selectionModel_&&this.selectionModel_.removeItem(a)};f.setSelectedItem=function(a){if(this.selectionModel_){var b=this.getSelectedItem();this.selectionModel_.setSelectedItem(a);a!=b&&this.dispatchEvent("change")}};f.setSelectedIndex=function(a){this.selectionModel_&&this.setSelectedItem(this.selectionModel_.getItemAt(a))};
f.setValue=function(a){if(null!=a&&this.selectionModel_)for(var b=0,c;c=this.selectionModel_.getItemAt(b);b++)if(c&&"function"==typeof c.getValue&&c.getValue()==a){this.setSelectedItem(c);return}this.setSelectedItem(null)};f.getValue=function(){var a=this.getSelectedItem();return a?a.getValue():null};f.getSelectedItem=function(){return this.selectionModel_?this.selectionModel_.getSelectedItem():null};
f.getSelectedIndex=function(){return this.selectionModel_?this.selectionModel_.getSelectedIndex():-1};
var or=function(a,b){a.selectionModel_=new Mp;b&&pk(b,function(c){nr(c);this.selectionModel_.addItem(c)},a);mr(a)},mr=function(a){a.selectionModel_&&a.getHandler().listen(a.selectionModel_,"select",a.handleSelectionChange)},lr=function(a){var b=a.getSelectedItem();a.setContent(b?b.getCaption():a.defaultCaption_);var c=a.renderer_.getContentElement(a.getElement());c&&a.getDomHelper().isElement(c)&&(null==a.initialAriaLabel_&&(a.initialAriaLabel_=wj(c,"label")),b=(b=b?b.getElement():null)?wj(b,"label"):
a.initialAriaLabel_,M(c,"label",b),pr(a))},pr=function(a){var b=a.renderer_;if(b&&(b=b.getContentElement(a.getElement()))){var c=lk(a);b.id||(b.id=gk(fk.getInstance()));uj(b,"option");M(b,"selected",!0);M(c,"activedescendant",b.id);a.selectionModel_&&(c=a.selectionModel_.getItems(),M(b,"setsize",qr(c)),a=a.selectionModel_.getSelectedIndex(),M(b,"posinset",0<=a?qr(c.slice(0,a+1)):0))}},qr=function(a){return a.filter(function(b){return b instanceof W}).length},nr=function(a){a.preferredAriaRole_=a instanceof
W?"option":"separator"};kr.prototype.setOpen=function(a,b){kr.superClass_.setOpen.call(this,a,b);this.isOpen()?this.getMenu().setHighlightedIndex(this.getSelectedIndex()):pr(this)};lp("goog-select",function(){return new kr(null)});function rr(a,b,c){kr.call(this,a,b,jr.getInstance(),c);this.prefixTracker_=new sr(1E3);ob(this,this.prefixTracker_)}v(rr,kr);rr.prototype.createDom=function(){rr.superClass_.createDom.call(this);N(this.getElement(),"jfk-select")};
rr.prototype.positionMenu=function(){if(this.getMenu().inDocument_){var a=lk(this),b=gr(this)?8:12,c=this.getMenu().getElement(),d=!1;this.getMenu().isVisible()||(d=!0,c.style.visibility="hidden",P(c,!0));var e=Math.max(this.getSelectedIndex(),0);e=rk(this.getMenu(),e);var g=0;if(hr(this)){var h=c.scrollTop;c.style.overflowY="visible";c.style.height="auto";d||(g=0,e&&(g=Wj(e.getElement()).y-Wj(a).y),g=h-g)}d=e?e.getElement().offsetTop:0;h=Sj(a);var k=0;h&&(k=Sj(c),k=Math.min(Math.max(h.top,k.top+
2),k.bottom-2)-h.top);Qm(a,b,c,gr(this)?8:12,new E(0,k-d),null,65|(hr(this)?32:132),null);hr(this)&&(b=0,e&&(b=Wj(e.getElement()).y-Wj(a).y),c.style.overflowY="auto",c.scrollTop=g+b);this.getMenu().isVisible()||(P(c,!1),c.style.visibility="visible")}};
rr.prototype.handleKeyEventInternal=function(a){var b=rr.superClass_.handleKeyEventInternal.call(this,a);return"key"!=a.type||!this.getMenu()||a.altKey||a.ctrlKey||a.metaKey||a.platformModifierKey?b:this.isOpen()||32!=a.keyCode?b?(!this.isOpen()||38!=a.keyCode&&40!=a.keyCode||tr(this),!0):am(a.keyCode)?(a=a.charCode?String.fromCharCode(a.charCode):" ",this.prefixTracker_.add(a),b=this.prefixTracker_.currentPrefix_,this.prefixTracker_.cycling_?ur(this,a,!1):ur(this,b,1<b.length),!0):!1:(this.prefixTracker_.resetPrefix(),
b)};
var tr=function(a){var b=Aq(a.getMenu());b&&Vj(b.getElement(),a.getMenu().getContentElement())},ur=function(a,b,c){var d=a.isOpen()?a.getMenu().highlightedIndex_:a.getSelectedIndex();b=new RegExp("^"+re(b),"i");c||++d;d=0>d?0:d;for(var e=a.getMenu(),g=0,h=qk(e);g<h;++g){c=(d+g)%h;var k=rk(e,c),l=k.getCaption();if(k.isEnabled()&&l&&b.test(l)){b=c;a.isOpen()?(a.getMenu().setHighlightedIndex(b),tr(a)):a.setSelectedIndex(b);break}}},sr=function(a){y.call(this);this.delay_=new pm(this.resetPrefix,a,this);
ob(this,this.delay_)};v(sr,y);sr.prototype.add=function(a){x(1==a.length,"nextLetter: '"+a+"' must be a single character");a==this.currentPrefix_?this.cycling_=!0:this.cycling_||(this.currentPrefix_+=a);this.delay_.start()};sr.prototype.resetPrefix=function(){this.currentPrefix_="";this.cycling_=!1};sr.prototype.cycling_=!1;sr.prototype.currentPrefix_="";var vr=function(a,b,c){W.call(this,a,b,c);this.setCheckable(!0)};v(vr,W);lp("goog-checkbox-menuitem",function(){return new vr(null)});var wr=function(){this.classNameCache_=[]};v(wr,Iq);ya(wr);wr.prototype.decorate=function(a,b){b=wr.superClass_.decorate.call(this,a,b);this.setCheckable(a,b,!0);x(b);Cj(b,this.getCssClass()+"-fully-checked")?xr(a,2):Cj(b,this.getCssClass()+"-partially-checked")?xr(a,1):xr(a,0);return b};wr.prototype.getCssClass=function(){return"goog-tristatemenuitem"};var yr=function(a,b,c,d,e){W.call(this,a,b,c,d||new wr);this.setCheckable(!0);this.alwaysAllowPartial_=e||!1};v(yr,W);yr.prototype.checkState_=0;yr.prototype.allowPartial_=!1;yr.prototype.alwaysAllowPartial_=!1;
var xr=function(a,b){zr(a,b);a.allowPartial_=1==b},zr=function(a,b){a.dispatchEvent(0!=b?"check":"uncheck")&&(a.setState(16,0!=b),a.checkState_=b,b=a.renderer_,b.enableClassName(a,b.getCssClass()+"-partially-checked",1==a.checkState_),b.enableClassName(a,b.getCssClass()+"-fully-checked",2==a.checkState_))};
yr.prototype.performActionInternal=function(a){switch(this.checkState_){case 0:zr(this,this.alwaysAllowPartial_||this.allowPartial_?1:2);break;case 1:zr(this,2);break;case 2:zr(this,0)}var b=this.renderer_.getCssClass()+"-checkbox";a=a.target&&Cj(a.target,b);return this.dispatchEvent(a||this.allowPartial_?"change":"action")};lp("goog-tristatemenuitem",function(){return new yr(null)});var Y=angular.module("jfkMenu",[Ll.name]);Y.getOrCreateTitleElement=function(a){var b=Re(a);return 1>=b.length?(b=document.createElement("span"),a.insertBefore(b,a.firstChild),b):b[0]};Y.setItemMarker=function(a){a[0][Y.MENU_ITEM_MARKER_]=!0};var Ar=function(a){this.jfkCommon_=a;this.menu_=new Rq;this.menu_.allowAutoFocus_=!1;this.menuItemParent_=null;this.menuItems_=[]};Y.ITEM_POSITION="menuPosition";Ar.prototype.getMenu=function(){return this.menu_};
Ar.prototype.getNumChangedPositions=function(){if(!this.menuItemParent_)return 0;for(var a=0,b=this.menuItemParent_.firstChild,c=0,d=0;b;)b[Y.MENU_ITEM_MARKER_]&&(b[Y.ITEM_POSITION]!=c&&a++,d++),c++,b=b.nextSibling;return d!=this.menuItems_.length?-1:a};Ar.prototype.insertMenuItem_=function(a){var b=this.getMenu(),c=a.element,d=a.item,e=Y.getIndexInParent_(c,b);c[Y.ITEM_POSITION]=e;b.addChildAt(d,e,!d.inDocument_);this.menuItemParent_=c.parentNode;this.menuItems_.push(a)};
Y.getIndexInParent_=function(a,b){for(var c=0,d=a.parentNode.firstChild;d;){if(d===a)return Math.min(c,qk(b));d[Y.MENU_ITEM_MARKER_]&&c++;d=d.nextSibling}throw Error("Could not find index of menu item");};
var Br=function(a,b,c,d,e){a.render(c[0]);c=a.getMenu();e?e.setMenu(c):c.setFocusable(!0);Gl(a.jfkCommon_,b,d,c)},Cr=function(a,b,c,d){var e={item:d,element:c};b.$evalAsync(t(a.insertMenuItem_,a,e));b.$on("$destroy",t(function(){var g=this.getMenu();d.getParent()&&!g.disposed_&&(g.removeChild(d),fb(this.menuItems_,e))},a))};Ar.prototype.render=function(a){var b=this.getMenu();b.render(a);return b.getElement()};var Dr=function(){this.registerSelect_=this.menu_=null};
Dr.prototype.setMenu=function(a){this.menu_=a};Dr.prototype.getMenu=function(){return this.menu_};
Y.directive("jfkMenu",function(){return{require:["jfkMenu","^?jfkMenuHolder"],controller:["jfkCommon",Ar],link:function(a,b,c,d){var e=d[0];Br(e,a,b,c,d[1]);a.$watch(t(e.getNumChangedPositions,e),function(g){if(-1!==g){g=e.getMenu();for(var h=0;h<e.menuItems_.length;h++){var k=e.menuItems_[h].element,l=e.menuItems_[h].item,n=Y.getIndexInParent_(k,e.menu_);k[Y.ITEM_POSITION]=n;g.addChildAt(l,n,!l.inDocument_)}}})},restrict:"EAM"}});Y.MENU_ITEM_MARKER_="jfkMenuItemMarker";
Y.buildItemLinkFunction_=function(a,b){return["jfkCommon",function(c){return{require:["^jfkMenu"],priority:200,terminal:!0,transclude:"element",compile:function(d,e,g){return function(h,k,l,n){n=n[0];Y.setItemMarker(k);k=k[0];var p=g(h,function(){});p=a(p[0],h,l);var r=l.jfkCloseOnAction;ad(p,"action",function(w){(!r&&b||r&&!h.$eval(r))&&w.stopPropagation()});Cr(n,h,k,p);Gl(c,h,l,p)}},restrict:"EAM"}}]};Y.directive("jfkMenuItem",Y.buildItemLinkFunction_(function(a){return new W(a)},!1));
Y.directive("jfkMenuChild",Y.buildItemLinkFunction_(function(a){return new V(a)},!0));Y.directive("jfkCheckBoxMenuItem",Y.buildItemLinkFunction_(function(a,b,c){var d=new vr(a);c.ngChecked&&b.$watch(c.ngChecked,function(e){d.setChecked(!!e)});d.listen("action",function(){var e=d.isChecked()?new pb("check"):new pb("uncheck");x(Cc(d),"Can not use goog.events.dispatchEvent with non-goog.events.Listenable instance.");d.dispatchEvent(e)});return d},!1));
Y.directive("jfkTriStateMenuItem",Y.buildItemLinkFunction_(function(a,b,c){var d=new yr(a);d.render(a[0]);c.ngChecked&&b.$watch(c.ngChecked,function(e){null!=e&&xr(d,!0===e?2:!1===e?0:1)});return d},!1));
Y.directive("jfkSubMenu",["jfkCommon",function(a){return{name:"jfkMenuHolder",require:["^jfkMenu","jfkMenuHolder"],priority:200,controller:Dr,transclude:!1,compile:function(){return function(b,c,d,e){var g=e[0];e=e[1];Y.setItemMarker(c);c=c[0];var h=c.children[0];if("SPAN"!==h.nodeName)throw Error("SubMenu requires a SPAN with the caption as the first child");h=new $q(h);e=e.getMenu();var k=e.getElement().parentElement;Qe(k);Ne(document.body,k);e.setFocusable(!1);nk(h,g.getMenu());h.setMenu(e);Cr(g,
b,c,h);b.$on("$destroy",function(){Qe(k)});Gl(a,b,d,h)}},restrict:"EAM"}}]);Y.directive("jfkMenuSeparator",Y.buildItemLinkFunction_(function(a){var b=new Qq;angular.element(a).remove();return b},!1));var Er=angular.module("jfkMenuButton",[Y.name,Ll.name]),Fr=function(a,b){a.hasOwnProperty("jfkMenuButtonCollapsed")&&a.$observe("jfkMenuButtonCollapsed",function(c){b.setCollapsed(Ho[c])})};
Er.directive("jfkMenuButton",["jfkCommon",function(a){return{name:"jfkMenuHolder",controller:Dr,require:["jfkMenuHolder"],restrict:"EAM",link:function(b,c,d,e){e=e[0].getMenu();e=new X(Y.getOrCreateTitleElement(c[0]),e,jr.getInstance());e.menuPosition_.setLastResortOverflow&&e.menuPosition_.setLastResortOverflow(33);e.isFocusablePopupMenu_=!0;Fr(d,e);e.render(c[0]);Gl(a,b,d,e)}}}]);var Gr=angular.module("jfkSelect",[Y.name,Ll.name]);
Gr.directive("jfkSelect",["jfkCommon",function(a){return{name:"jfkMenuHolder",controller:Dr,require:["jfkMenuHolder","^?ngModel"],restrict:"EAM",link:function(b,c,d,e){function g(){if(n)try{p=!1;var r=n.$viewValue;l.setValue(null!=r?r:Dl)}finally{p=!0}}var h=e[0],k=h.getMenu();k.setFocusable(!1);var l=new rr(Y.getOrCreateTitleElement(c[0]),k);h.registerSelect_&&h.registerSelect_(l,b);l.menuPosition_.setLastResortOverflow&&l.menuPosition_.setLastResortOverflow(33);l.render(c[0]);b.$watch(function(){var r=
[];pk(k,function(w){r.push(jk(w));r.push(w.getModel&&w.model_)});return r},function(){var r=l.isOpen();l.setMenu(null);l.setMenu(k);g();l.setOpen(r)},!0);var n=e[1],p=!0;n&&(n.$render=g,b.$on("$destroy",function(){n=null}),Hl(b,l,"change",function(){p&&Jl(b,function(){var r=l.getValue();n.$setViewValue(r==Dl?null:r)})}));Gl(a,b,d,l)}}}]);var Hr=angular.module("recoveryDirectives",[]).config(["$controllerProvider",function(a){a.allowGlobals()}]);L.overrideJfkSelectTabIndex=function(a,b){setTimeout(function(){a.getElementsByClassName("jfk-select")[0].setAttribute("tabindex",b)},0)};Hr.directive("overrideJfkSelectTabindex",function(){return{link:function(a,b,c){L.overrideJfkSelectTabIndex(b[0],c.overrideJfkSelectTabindex)}}});
Hr.directive("appFooter",function(){return{restrict:"E",scope:{disableForward:"=",disableBack:"=",forward:"&",back:"&",forwardText:"@",backText:"@",hideForward:"@",hideBack:"@"},templateUrl:"html/footer.html"}});L.directives=Hr;var Ir={COMPACT_DECIMAL_SHORT_PATTERN:{1E3:{other:"0K"},1E4:{other:"00K"},1E5:{other:"000K"},1E6:{other:"0M"},1E7:{other:"00M"},1E8:{other:"000M"},1E9:{other:"0B"},1E10:{other:"00B"},1E11:{other:"000B"},1E12:{other:"0T"},1E13:{other:"00T"},1E14:{other:"000T"}},COMPACT_DECIMAL_LONG_PATTERN:{1E3:{other:"0 thousand"},1E4:{other:"00 thousand"},1E5:{other:"000 thousand"},1E6:{other:"0 million"},1E7:{other:"00 million"},1E8:{other:"000 million"},1E9:{other:"0 billion"},1E10:{other:"00 billion"},1E11:{other:"000 billion"},
1E12:{other:"0 trillion"},1E13:{other:"00 trillion"},1E14:{other:"000 trillion"}}},Jr=Ir;Jr=Ir;var Kr={AED:[2,"dh","\u062f.\u0625."],ALL:[0,"Lek","Lek"],AUD:[2,"$","AU$"],BDT:[2,"\u09f3","Tk"],BGN:[2,"lev","lev"],BRL:[2,"R$","R$"],CAD:[2,"$","C$"],CDF:[2,"FrCD","CDF"],CHF:[2,"CHF","CHF"],CLP:[0,"$","CL$"],CNY:[2,"\u00a5","RMB\u00a5"],COP:[32,"$","COL$"],CRC:[0,"\u20a1","CR\u20a1"],CZK:[50,"K\u010d","K\u010d"],DKK:[50,"kr.","kr."],DOP:[2,"RD$","RD$"],EGP:[2,"\u00a3","LE"],ETB:[2,"Birr","Birr"],EUR:[2,"\u20ac","\u20ac"],GBP:[2,"\u00a3","GB\u00a3"],HKD:[2,"$","HK$"],HRK:[2,"kn","kn"],HUF:[34,
"Ft","Ft"],IDR:[0,"Rp","Rp"],ILS:[34,"\u20aa","IL\u20aa"],INR:[2,"\u20b9","Rs"],IRR:[0,"Rial","IRR"],ISK:[0,"kr","kr"],JMD:[2,"$","JA$"],JPY:[0,"\u00a5","JP\u00a5"],KRW:[0,"\u20a9","KR\u20a9"],LKR:[2,"Rs","SLRs"],LTL:[2,"Lt","Lt"],MNT:[0,"\u20ae","MN\u20ae"],MVR:[2,"Rf","MVR"],MXN:[2,"$","Mex$"],MYR:[2,"RM","RM"],NOK:[50,"kr","NOkr"],PAB:[2,"B/.","B/."],PEN:[2,"S/.","S/."],PHP:[2,"\u20b1","PHP"],PKR:[0,"Rs","PKRs."],PLN:[50,"z\u0142","z\u0142"],RON:[2,"RON","RON"],RSD:[0,"din","RSD"],RUB:[50,"\u20bd",
"RUB"],SAR:[2,"SAR","SAR"],SEK:[50,"kr","kr"],SGD:[2,"$","S$"],THB:[2,"\u0e3f","THB"],TRY:[2,"\u20ba","TRY"],TWD:[2,"$","NT$"],TZS:[0,"TSh","TSh"],UAH:[2,"\u0433\u0440\u043d.","UAH"],USD:[2,"$","US$"],UYU:[2,"$","$U"],VND:[48,"\u20ab","VN\u20ab"],YER:[0,"Rial","Rial"],ZAR:[2,"R","ZAR"]};var Lr={DECIMAL_SEP:".",GROUP_SEP:",",PERCENT:"%",ZERO_DIGIT:"0",PLUS_SIGN:"+",MINUS_SIGN:"-",EXP_SYMBOL:"E",PERMILL:"\u2030",INFINITY:"\u221e",NAN:"NaN",DECIMAL_PATTERN:"#,##0.###",SCIENTIFIC_PATTERN:"#E0",PERCENT_PATTERN:"#,##0%",CURRENCY_PATTERN:"\u00a4#,##0.00",DEF_CURRENCY_CODE:"USD"},Mr=Lr;Mr=Lr;var Qr=function(a){this.intlCurrencyCode_=null;this.currencyStyle_=0;this.overrideNumberFormatSymbols_=null;this.maximumIntegerDigits_=40;this.minimumIntegerDigits_=1;this.significantDigits_=0;this.maximumFractionDigits_=3;this.minExponentDigits_=this.minimumFractionDigits_=0;this.showTrailingZeros_=this.useSignForPositiveExponent_=!1;this.positiveSuffix_=this.positivePrefix_="";this.negativePrefix_=Z(this).MINUS_SIGN;this.negativeSuffix_="";this.multiplier_=1;this.negativePercentSignExpected_=!1;
this.groupingArray_=[];this.useExponentialNotation_=this.decimalSeparatorAlwaysShown_=!1;this.compactStyle_=0;this.baseFormattingNumber_=null;this.pattern_="string"===typeof a?a:"";if("number"===typeof a)switch(a){case 1:Nr(this,Z(this).DECIMAL_PATTERN);break;case 2:Nr(this,Z(this).SCIENTIFIC_PATTERN);break;case 3:Nr(this,Z(this).PERCENT_PATTERN);break;case 4:a=Z(this).CURRENCY_PATTERN;var b=["0"],c=Kr[Or(this)];if(c){c=c[0]&7;if(0<c){b.push(".");for(var d=0;d<c;d++)b.push("0")}a=a.replace(/0.00/g,
b.join(""))}Nr(this,a);break;case 5:Pr(this,1);break;case 6:Pr(this,2);break;default:throw Error("Unsupported pattern type.");}else Nr(this,a)},Z=function(a){return a.overrideNumberFormatSymbols_||Mr},Or=function(a){return a.intlCurrencyCode_||Z(a).DEF_CURRENCY_CODE},Rr=function(a,b){if(0<a.significantDigits_&&0<b)throw Error("Can't combine significant digits and minimum fraction digits");a.minimumFractionDigits_=b},Sr=function(a,b){if(308<b)throw Error("Unsupported maximum fraction digits: "+b);
a.maximumFractionDigits_=b},Nr=function(a,b){a.pattern_=b.replace(/ /g,"\u00a0");var c=[0];a.positivePrefix_=Tr(a,b,c);for(var d=c[0],e=-1,g=0,h=0,k=0,l=-1,n=b.length,p=!0;c[0]<n&&p;c[0]++)switch(b.charAt(c[0])){case "#":0<h?k++:g++;0<=l&&0>e&&l++;break;case "0":if(0<k)throw Error('Unexpected "0" in pattern "'+b+'"');h++;0<=l&&0>e&&l++;break;case ",":0<l&&a.groupingArray_.push(l);l=0;break;case ".":if(0<=e)throw Error('Multiple decimal separators in pattern "'+b+'"');e=g+h+k;break;case "E":if(a.useExponentialNotation_)throw Error('Multiple exponential symbols in pattern "'+
b+'"');a.useExponentialNotation_=!0;a.minExponentDigits_=0;c[0]+1<n&&"+"==b.charAt(c[0]+1)&&(c[0]++,a.useSignForPositiveExponent_=!0);for(;c[0]+1<n&&"0"==b.charAt(c[0]+1);)c[0]++,a.minExponentDigits_++;if(1>g+h||1>a.minExponentDigits_)throw Error('Malformed exponential pattern "'+b+'"');p=!1;break;default:c[0]--,p=!1}0==h&&0<g&&0<=e&&(h=e,0==h&&h++,k=g-h,g=h-1,h=1);if(0>e&&0<k||0<=e&&(e<g||e>g+h)||0==l)throw Error('Malformed pattern "'+b+'"');k=g+h+k;a.maximumFractionDigits_=0<=e?k-e:0;0<=e&&(a.minimumFractionDigits_=
g+h-e,0>a.minimumFractionDigits_&&(a.minimumFractionDigits_=0));a.minimumIntegerDigits_=(0<=e?e:k)-g;a.useExponentialNotation_&&(a.maximumIntegerDigits_=g+a.minimumIntegerDigits_,0==a.maximumFractionDigits_&&0==a.minimumIntegerDigits_&&(a.minimumIntegerDigits_=1));a.groupingArray_.push(Math.max(0,l));a.decimalSeparatorAlwaysShown_=0==e||e==k;d=c[0]-d;a.positiveSuffix_=Tr(a,b,c);c[0]<b.length&&";"==b.charAt(c[0])?(c[0]++,1!=a.multiplier_&&(a.negativePercentSignExpected_=!0),a.negativePrefix_=Tr(a,
b,c),c[0]+=d,a.negativeSuffix_=Tr(a,b,c)):(a.negativePrefix_+=a.positivePrefix_,a.negativeSuffix_+=a.positiveSuffix_)},Pr=function(a,b){a.compactStyle_=b;Nr(a,Z(a).DECIMAL_PATTERN);Rr(a,0);Sr(a,2);if(0<a.minimumFractionDigits_)throw Error("Can't combine significant digits and minimum fraction digits");a.significantDigits_=2};
Qr.prototype.parse=function(a,b){b=b||[0];if(0!==this.compactStyle_)throw Error("Parsing of compact numbers is unimplemented");a=a.replace(/ |\u202f/g,"\u00a0");var c=a.indexOf(this.positivePrefix_,b[0])==b[0],d=a.indexOf(this.negativePrefix_,b[0])==b[0];c&&d&&(this.positivePrefix_.length>this.negativePrefix_.length?d=!1:this.positivePrefix_.length<this.negativePrefix_.length&&(c=!1));c?b[0]+=this.positivePrefix_.length:d&&(b[0]+=this.negativePrefix_.length);if(a.indexOf(Z(this).INFINITY,b[0])==b[0]){b[0]+=
Z(this).INFINITY.length;var e=Infinity}else{e=a;var g=!1,h=!1,k=!1,l=-1,n=1,p=Z(this).DECIMAL_SEP,r=Z(this).GROUP_SEP,w=Z(this).EXP_SYMBOL;if(0!=this.compactStyle_)throw Error("Parsing of compact style numbers is not implemented");r=r.replace(/\u202f/g,"\u00a0");for(var D="";b[0]<e.length;b[0]++){var F=e.charAt(b[0]),A=Ur(this,F);if(0<=A&&9>=A)D+=A,k=!0;else if(F==p.charAt(0)){if(g||h)break;D+=".";g=!0}else if(F==r.charAt(0)&&("\u00a0"!=r.charAt(0)||b[0]+1<e.length&&0<=Ur(this,e.charAt(b[0]+1)))){if(g||
h)break}else if(F==w.charAt(0)){if(h)break;D+="E";h=!0;l=b[0]}else if("+"==F||"-"==F){if(k&&l!=b[0]-1)break;D+=F}else if(1==this.multiplier_&&F==Z(this).PERCENT.charAt(0)){if(1!=n)break;n=100;if(k){b[0]++;break}}else if(1==this.multiplier_&&F==Z(this).PERMILL.charAt(0)){if(1!=n)break;n=1E3;if(k){b[0]++;break}}else break}1!=this.multiplier_&&(n=this.multiplier_);e=parseFloat(D)/n}if(c){if(a.indexOf(this.positiveSuffix_,b[0])!=b[0])return NaN;b[0]+=this.positiveSuffix_.length}else if(d){if(a.indexOf(this.negativeSuffix_,
b[0])!=b[0])return NaN;b[0]+=this.negativeSuffix_.length}return d?-e:e};
Qr.prototype.format=function(a){if(this.minimumFractionDigits_>this.maximumFractionDigits_)throw Error("Min value must be less than max value");if(isNaN(a))return Z(this).NAN;var b=[];var c=null===this.baseFormattingNumber_?a:this.baseFormattingNumber_,d=a;if(0==this.compactStyle_)var e=Vr;else c=Math.abs(c),d=Math.abs(d),e=Wr(this,1>=c?0:Xr(c)).divisorBase,d=Yr(d,-e),Zr(this,d),c=Yr(c,-e),c=Zr(this,c),e=Wr(this,e+Xr(c.intValue));a=Yr(a,-e.divisorBase);(c=0>a||0==a&&0>1/a)?e.negative_prefix?b.push(e.negative_prefix):
(b.push(e.prefix),b.push(this.negativePrefix_)):(b.push(e.prefix),b.push(this.positivePrefix_));if(isFinite(a))if(a*=c?-1:1,a*=this.multiplier_,this.useExponentialNotation_)if(d=a,0==d)$r(this,d,this.minimumIntegerDigits_,b),as(this,0,b);else{var g=Math.log(d)/Math.log(10);x(!0);g=Math.floor(g+2E-15);d=Yr(d,-g);var h=this.minimumIntegerDigits_;1<this.maximumIntegerDigits_&&this.maximumIntegerDigits_>this.minimumIntegerDigits_?(h=g%this.maximumIntegerDigits_,0>h&&(h=this.maximumIntegerDigits_+h),d=
Yr(d,h),g-=h,h=1):1>this.minimumIntegerDigits_?(g++,d=Yr(d,-1)):(g-=this.minimumIntegerDigits_-1,d=Yr(d,this.minimumIntegerDigits_-1));$r(this,d,h,b);as(this,g,b)}else $r(this,a,this.minimumIntegerDigits_,b);else b.push(Z(this).INFINITY);c?e.negative_suffix?b.push(e.negative_suffix):(isFinite(a)&&b.push(e.suffix),b.push(this.negativeSuffix_)):(isFinite(a)&&b.push(e.suffix),b.push(this.positiveSuffix_));return b.join("")};
var Zr=function(a,b){var c=Yr(b,a.maximumFractionDigits_);0<a.significantDigits_&&(c=bs(c,a.significantDigits_,a.maximumFractionDigits_));c=Math.round(c);isFinite(c)?(b=Math.floor(Yr(c,-a.maximumFractionDigits_)),a=Math.floor(c-Yr(b,a.maximumFractionDigits_))):a=0;return{intValue:b,fracValue:a}},$r=function(a,b,c,d){if(a.minimumFractionDigits_>a.maximumFractionDigits_)throw Error("Min value must be less than max value");d||(d=[]);b=Zr(a,b);var e=b.intValue,g=b.fracValue,h=0==e?0:Xr(e)+1,k=0<a.minimumFractionDigits_||
0<g||a.showTrailingZeros_&&h<a.significantDigits_;b=a.minimumFractionDigits_;k&&(b=a.showTrailingZeros_&&0<a.significantDigits_?a.significantDigits_-h:a.minimumFractionDigits_);var l="";for(h=e;1E20<h;)l="0"+l,h=Math.round(Yr(h,-1));l=h+l;var n=Z(a).DECIMAL_SEP;h=Z(a).ZERO_DIGIT.charCodeAt(0);var p=l.length,r=0;if(0<e||0<c){for(e=p;e<c;e++)d.push(String.fromCharCode(h));if(2<=a.groupingArray_.length)for(c=1;c<a.groupingArray_.length;c++)r+=a.groupingArray_[c];c=p-r;if(0<c){e=a.groupingArray_;r=p=
0;for(var w,D=Z(a).GROUP_SEP,F=l.length,A=0;A<F;A++)if(d.push(String.fromCharCode(h+1*Number(l.charAt(A)))),1<F-A)if(w=e[r],A<c){var db=c-A;(1===w||0<w&&1===db%w)&&d.push(D)}else r<e.length&&(A===c?r+=1:w===A-c-p+1&&(d.push(D),p+=w,r+=1))}else{c=l;l=a.groupingArray_;e=Z(a).GROUP_SEP;w=c.length;D=[];for(p=l.length-1;0<=p&&0<w;p--){r=l[p];for(F=0;F<r&&0<=w-F-1;F++)D.push(String.fromCharCode(h+1*Number(c.charAt(w-F-1))));w-=r;0<w&&D.push(e)}d.push.apply(d,D.reverse())}}else k||d.push(String.fromCharCode(h));
(a.decimalSeparatorAlwaysShown_||k)&&d.push(n);g=String(g);k=g.split("e+");2==k.length&&(g=String(bs(parseFloat(k[0]),a.significantDigits_,1)),g=g.replace(".",""),g+=se("0",parseInt(k[1],10)-g.length+1));a.maximumFractionDigits_+1>g.length&&(g="1"+se("0",a.maximumFractionDigits_-g.length)+g);for(a=g.length;"0"==g.charAt(a-1)&&a>b+1;)a--;for(b=1;b<a;b++)d.push(String.fromCharCode(h+1*Number(g.charAt(b))))},as=function(a,b,c){c.push(Z(a).EXP_SYMBOL);0>b?(b=-b,c.push(Z(a).MINUS_SIGN)):a.useSignForPositiveExponent_&&
c.push(Z(a).PLUS_SIGN);b=""+b;for(var d=Z(a).ZERO_DIGIT,e=b.length;e<a.minExponentDigits_;e++)c.push(d);c.push(b)},Ur=function(a,b){b=b.charCodeAt(0);if(48<=b&&58>b)return b-48;a=Z(a).ZERO_DIGIT.charCodeAt(0);return a<=b&&b<a+10?b-a:-1},Tr=function(a,b,c){for(var d="",e=!1,g=b.length;c[0]<g;c[0]++){var h=b.charAt(c[0]);if("'"==h)c[0]+1<g&&"'"==b.charAt(c[0]+1)?(c[0]++,d+="'"):e=!e;else if(e)d+=h;else switch(h){case "#":case "0":case ",":case ".":case ";":return d;case "\u00a4":if(c[0]+1<g&&"\u00a4"==
b.charAt(c[0]+1))c[0]++,d+=Or(a);else switch(a.currencyStyle_){case 0:h=Or(a);d+=h in Kr?Kr[h][1]:h;break;case 2:h=Or(a);var k=Kr[h];d+=k?h==k[1]?h:h+" "+k[1]:h;break;case 1:h=Or(a),d+=h in Kr?Kr[h][2]:h}break;case "%":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&100!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");a.multiplier_=100;a.negativePercentSignExpected_=!1;d+=Z(a).PERCENT;break;
case "\u2030":if(!a.negativePercentSignExpected_&&1!=a.multiplier_)throw Error("Too many percent/permill");if(a.negativePercentSignExpected_&&1E3!=a.multiplier_)throw Error("Inconsistent use of percent/permill characters");a.multiplier_=1E3;a.negativePercentSignExpected_=!1;d+=Z(a).PERMILL;break;default:d+=h}}return d},Vr={divisorBase:0,negative_prefix:"",negative_suffix:"",prefix:"",suffix:""},Wr=function(a,b){a=1==a.compactStyle_?Jr.COMPACT_DECIMAL_SHORT_PATTERN:Jr.COMPACT_DECIMAL_LONG_PATTERN;
null==a&&(a=Jr.COMPACT_DECIMAL_SHORT_PATTERN);if(3>b)return Vr;b=Math.min(14,b);var c=a[Yr(1,b)];for(--b;!c&&3<=b;)c=a[Yr(1,b)],b--;if(!c)return Vr;c=c.other;var d=a="",e=c.indexOf(";");0<=e&&(c=c.substring(0,e),e=c.substring(e+1))&&(d=/([^0]*)(0+)(.*)/.exec(e),a=d[1],d=d[3]);return c&&"0"!=c?(c=/([^0]*)(0+)(.*)/.exec(c))?{divisorBase:b+1-(c[2].length-1),negative_prefix:a,negative_suffix:d,prefix:c[1],suffix:c[3]}:Vr:Vr},Xr=function(a){if(!isFinite(a))return 0<a?a:0;for(var b=0;1<=(a/=10);)b++;return b},
Yr=function(a,b){x(0==b%1,'Cannot shift by fractional digits "%s".',b);if(!a||!isFinite(a)||0==b)return a;a=String(a).split("e");return parseFloat(a[0]+"e"+(parseInt(a[1]||0,10)+b))},cs=function(a,b){x(0==b%1,'Cannot round to fractional digits "%s".',b);return a&&isFinite(a)?Yr(Math.round(Yr(a,b)),-b):a},bs=function(a,b,c){if(!a)return a;b=b-Xr(a)-1;return b<-c?cs(a,-c):cs(a,b)};var ds=angular.module("recoveryTranslate",[]).config(["$controllerProvider",function(a){a.allowGlobals()}]);ds.filter("translate",function(){return ds.translate_});ds.filter("translateApiError",function(){return ds.translateApiError_});ds.filter("decimal",function(){return ds.formatDecimal_});ds.filter("percent",function(){return ds.formatPercent_});
ds.translateApiError_=function(a,b){if(!a)return"";var c="APIERRMSG_"+a;b=ds.translate_(c,b);b==c&&(b=ds.translate_("APIERRMSG_UNKNOWN",[a]));switch(c){case "APIERRMSG_UNZIP_ERROR":case "APIERRMSG_DOWNLOAD_INTERRUPTED":case "APIERRMSG_DEVICE_WRITE_ERROR":break;default:b=b+" "+ds.translate_("ERRMSG_PLEASE_TRY_AGAIN")}return b};
ds.translate_=function(a,b){if(!a)return"";var c=Array.prototype.slice.call(arguments,1),d,e=L.appConfig.messageCatalogPostfix;e&&(d=chrome.i18n.getMessage(a+e,c));d||(d=chrome.i18n.getMessage(a,c));if(d)return d;(d=L.logger)&&Yh(d,Mh,"Failed translation for the key "+a+" with parameters "+c);return a};ds.formatDecimal_=function(a,b){var c=new Qr(1);void 0!=b&&(Rr(c,b),Sr(c,b));return c.format(a)};ds.formatPercent_=function(a,b){var c=new Qr(3);void 0!=b&&(Rr(c,b),Sr(c,b));return c.format(a)};
L.translateModule=ds;var es=angular.module("recovery",["ngSanitize",L.directives.name,L.translateModule.name,R.name,Co.name,Fp.name,mq.name,sq.name,Y.name,Er.name,Pp.name,Gr.name,Ml.name]).config(["$controllerProvider",function(a){a.allowGlobals()}]);u("recovery.module",es);es.configure=function(a){a.imgSrcSanitizationWhitelist(/^\s*chrome-extension:/)};es.configure.$inject=["$compileProvider"];es.config(["$compileProvider",es.configure]);u("ng.safehtml.googSceHelper.isGoogHtmlType",function(a){return"object"===typeof a&&(a instanceof wd||a instanceof Ud||a instanceof zd||a instanceof Gd||!1)});u("ng.safehtml.googSceHelper.isCOMPILED",function(){return!0});u("ng.safehtml.googSceHelper.unwrapAny",function(a){if(a instanceof wd)return xd(a).toString();if(a instanceof Ud)return Vd(a).toString();if(a instanceof zd)return Ad(a);if(a instanceof Gd)return Hd(a);throw Error();});
u("ng.safehtml.googSceHelper.unwrapGivenContext",function(a,b){if("html"==a)return Vd(b).toString();if("resourceUrl"==a||"templateUrl"==a)return xd(b).toString();if("url"==a)return b instanceof wd?xd(b).toString():Ad(b);if("css"==a)return Hd(b);if("js"==a)throw Error("Unexpected type when unwrapping SafeScript");throw Error();});